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
# Reference #1: https://note.com/npaka/n/nc55e44e407ff | |
# Reference #2: https://huggingface.co/blog/gemma-peft | |
# Licence: MIT | |
from peft import LoraConfig | |
lora_config = LoraConfig( | |
r=8, | |
target_modules=["q_proj", "o_proj", "k_proj", "v_proj", "gate_proj", "up_proj", "down_proj"], | |
task_type="CAUSAL_LM", |
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; | |
[ExecuteInEditMode] | |
public class LookAtIKInEditMode : MonoBehaviour | |
{ | |
[SerializeField] private bool active; | |
[SerializeField] private Transform target; | |
[SerializeField, Range(0f, 1f)] private float lookAt; | |
[SerializeField, Range(0f, 1f)] private float body; | |
[SerializeField, Range(0f, 1f)] private float 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 UnityEngine; | |
/// <summary> | |
/// RectTransformのAnchorのプリセットをスクリプトから「インスペクタ上のenumと同じように」 | |
/// 指定する為の拡張クラス | |
/// プロジェクト内の適当な場所に保存しておくと、以下のようにRectTransformに対してSetAnchor()メソッドが使えるようになる | |
/// </summary> | |
/* usage | |
var rect = GetComponent<RectTransform>(); |
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 strict'; | |
function getInstance(consumer_key, consumer_secret) { | |
return new TwitterWebService_(consumer_key, consumer_secret); | |
} | |
var TwitterWebService_ = function (consumer_key, consumer_secret) { | |
this.consumer_key = consumer_key; | |
this.consumer_secret = consumer_secret; | |
} |