Skip to content

Instantly share code, notes, and snippets.

"""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!
@gyosit
gyosit / RealTimeRecorder.cs
Created June 22, 2023 03:23
Recording humanoid model animation with skkinnedmeshrenderer
using UnityEngine;
using UnityEditor.Animations;
using UnityEditor;
public class RealTimeRecorder : MonoBehaviour {
public AnimationClip clip;
private AnimationClip clip_transform;
private AnimationClip clip_blendshape;

Untitled

import numpy as np

class GoBoard:
    def __init__(self, size):
        self.size = size
        self.board = np.zeros((size, size))
        self.current_player = 1
import bpy
import math
import bmesh
import numpy as np
import sys
# CONSTANT
ARMATURE = "Armature"
HEAD = "Head"
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
using System.Linq;
using VRM;
public class LipSync : MonoBehaviour
{
@gyosit
gyosit / homework2.py
Created October 8, 2020 07:06
homework2
import numpy
# 例1. 10個分の等差数列を作成する
res = [] # 結果を入れるリスト
init = 1 # 初期値
delta = 2 # 等差
for i in range(10):
res.append(init)
init += delta
print(res)
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
import pandas as pd
import numpy as np
## リスト
print("\n===LIST===\n")
# リストの作成
list_a = [1,3,5]
print(list_a)
@gyosit
gyosit / gene.py
Created September 18, 2020 05:38
PD
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
@gyosit
gyosit / graphic.py
Created September 18, 2020 04:40
RF_For_Lettuce
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))