import numpy as np
class GoBoard:
def __init__(self, size):
self.size = size
self.board = np.zeros((size, size))
self.current_player = 1
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
"""Shape key syncronization | |
* This script create drivers for shape keys in selected objects to reference the same named shape keys in the base object. | |
1. Select the objects for which you want to create drivers. | |
2. While holding the shift key, select the base object. | |
3. Run this script. | |
4. When you change any shape key of the base object, the corresponding shape key in the other objects will follow! |
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 UnityEngine; | |
using UnityEditor.Animations; | |
using UnityEditor; | |
public class RealTimeRecorder : MonoBehaviour { | |
public AnimationClip clip; | |
private AnimationClip clip_transform; | |
private AnimationClip clip_blendshape; |
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 bpy | |
import math | |
import bmesh | |
import numpy as np | |
import sys | |
# CONSTANT | |
ARMATURE = "Armature" | |
HEAD = "Head" |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Playables; | |
using UnityEngine.Timeline; | |
using System.Linq; | |
using VRM; | |
public class LipSync : MonoBehaviour | |
{ |
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 numpy | |
# 例1. 10個分の等差数列を作成する | |
res = [] # 結果を入れるリスト | |
init = 1 # 初期値 | |
delta = 2 # 等差 | |
for i in range(10): | |
res.append(init) | |
init += delta | |
print(res) |
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 numpy as np | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
import matplotlib.animation as animation | |
import random | |
from mpl_toolkits.mplot3d import Axes3D | |
from scipy.interpolate import griddata | |
import pandas as pd | |
from keras import regularizers | |
import datetime |
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 pandas as pd | |
import numpy as np | |
## リスト | |
print("\n===LIST===\n") | |
# リストの作成 | |
list_a = [1,3,5] | |
print(list_a) |
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 Gene: | |
def __init__(self, num, mins, maxs): | |
one_gene = np.ones(num) | |
set_gene = np.stack([one_gene, mins, maxs], axis=1) | |
init_gene = [x[0] * random.uniform(x[1], x[2]) for x in set_gene] | |
self.gene = init_gene | |
self.num = num | |
self.mins = mins | |
self.maxs = maxs | |
self.fitness = 0 |
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 Graphics(): | |
def dayPlot2D(self, startday, y, title, xlabel, ylabel): | |
row = y[1].shape[0] | |
col = 2 | |
data_range = pd.date_range(startday, periods=y[1].shape[1], freq='d') | |
plt.rcParams["font.size"] = 12 | |
fig = plt.figure(figsize=(15,20)) |
NewerOlder