This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_bpm 60 | |
live_loop :pulse do | |
notes = scale( :e3, :minor_pentatonic).shuffle | |
with_fx :bitcrusher do | |
notes.each do |n| | |
sample :ambi_choir | |
play n, release: 1 | |
sleep 0.25 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ghpythonlib.components as ghcomp | |
import Rhino | |
import math | |
objList = [] | |
ptList = [] | |
for i in range(num): | |
#球状に配列する | |
y = i * 2 / num - 1 + (1 / num) | |
r = math.sqrt(1 - y * y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
# Prevent CSRF attacks by raising an exception. | |
# For APIs, you may want to use :null_session instead. | |
protect_from_forgery with: :exception | |
def hello | |
render text: "Hello World" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sc.doc = Rhino.RhinoDoc.ActiveDoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using System.Linq; | |
using Emgu.CV.CvEnum; | |
using UnityEngine; | |
using System; | |
using System.Drawing; | |
using System.Collections; | |
using System.Text; | |
using Emgu.CV; | |
using Emgu.CV.Structure; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
from urllib.request import urlretrieve | |
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
import re | |
import os | |
baseUrl = "http://www.trainfrontview.net/" | |
trainUrl = "sozai.htm" | |
html = urlopen(baseUrl + trainUrl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pprint | |
import requests | |
import os | |
from urllib.request import urlopen | |
accessToken = "xxxxxxxxxx" | |
boardId = "0000000000" | |
folderPath = "./images" | |
response = requests.get( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void RunScript(List<Point3d> pts, int res, ref object A) | |
{ | |
List<Point3d> points = new List<Point3d>(); | |
if(pts.Count >= 3){ | |
for(int i = 0; i < pts.Count - 2; i++){ | |
Point3d pt1, pt2, pt3 = new Point3d(); | |
if(pts.Count == 3){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void DetectDeviceRotation(){ | |
Vector3 acc = Input.acceleration; | |
if(Mathf.Abs(acc.x) > Mathf.Abs(acc.y)){ | |
if(acc.x < 0){ | |
Debug.Log("Landscape Left"); | |
}else{ | |
Debug.Log("Landscape Right"); | |
} | |
}else{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var startFrame = 60.0; | |
var totalFrame = 240.0; | |
var totalTime = 10.0; | |
var t = Math.round((timeToFrames(time)-startFrame)/totalFrame*totalTime); | |
if(t <0){ | |
"0 時間" | |
}else if(t <= totalTime){ | |
t + " 時間" | |
}else{ | |
Math.round(totalTime) + " 時間" |
OlderNewer