Skip to content

Instantly share code, notes, and snippets.

View yamahigashi's full-sized avatar

Takayoshi Matsumoto yamahigashi

View GitHub Profile
@ryusas
ryusas / workspaceControl.py
Created April 18, 2017 06:57
A simple example to avoid the issue of Maya 2017 workspaceControl.
# coding: utf-8
u"""
Maya 2017 workspaceControl の問題回避のサンプル
workspaceControl workspaceControlState のゴミが残らないようにする
retain=False の場合でも何故か state のゴミが残ってしまうが
scriptJob workspaceControl の削除を監視して state も同時に削除するようにする
retain=True の場合はUI が閉じたとしても state は残って良いはずなので監視はしない
@koaning
koaning / claude.md
Last active November 13, 2025 12:26
Claude.md file for marimo

Marimo notebook assistant

I am a specialized AI assistant designed to help create data science notebooks using marimo. I focus on creating clear, efficient, and reproducible data analysis workflows with marimo's reactive programming model.

<assistant_info>

  • I specialize in data science and analytics using marimo notebooks
  • I provide complete, runnable code that follows best practices
  • I emphasize reproducibility and clear documentation
  • I focus on creating interactive data visualizations and analysis
  • I understand marimo's reactive programming model
@yoggy
yoggy / explanation_of_eye_grep_reloaded_in_avtokyo2012.md
Created November 20, 2012 09:01
君にもできる目grepを使わない目grepリローデッドへの挑戦 (010 Editor編)

君にもできる目grepを使わない目grepリローデッドへの挑戦 (010 Editor編)

はじめに

2012/11/17に開催されたAVTokyo2012の中で「目grepリローデッド」という題目で murachue氏、ucq氏が目grep力を競うイベントが行われた。

その際に愛甲氏によって出題された問題が以下のURLで公開されている。

@yasaichi
yasaichi / x_means.py
Last active May 1, 2025 11:26
Implementation of X-means clustering in Python
"""
以下の論文で提案された改良x-means法の実装
クラスター数を自動決定するk-meansアルゴリズムの拡張について
http://www.rd.dnc.ac.jp/~tunenori/doc/xmeans_euc.pdf
"""
import numpy as np
from scipy import stats
from sklearn.cluster import KMeans
@mstevenson
mstevenson / SaveFBX.cs
Created August 5, 2013 20:05
ASCII FBX file exporter for Unity. Extracted from Michal Mandrysz's Unity Summer of Code 2009 external lightmapping project.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using UnityEditor;
using UnityEngine;
/*
@defTechAndrew
defTechAndrew / fbx_animation_editing.py
Created April 1, 2019 22:01
Here are some useful calls I've developed for editing FBX animation files using the Python FBX SDK.
import FbxCommon
def fbx_trim_keys(scene, start, end, take_buffer=10):
"""
Uses the FBX SDK to remove unnecessary keys.
:param scene: FBX SDK scene class that hold data to edit
:param int start: start frame of animation keys to keep
:param int end: end frame of animation keys to keep
// Maya Mel UI Configuration File.Maya Mel UI Configuration File..
//
//
// This script is machine generated. Edit at your own risk.
//
//
////////////////////////////////////////////////////////////////////
global proc UI_Mel_Configuration_think(){
string $localized_resources_path = `getenv MAYA_LOCATION`+("/resources/l10n/");
string $all_file[]=`getFileList -folder $localized_resources_path`;
@rgl
rgl / python-embedded.md
Last active March 18, 2024 15:33
notes about python embedded in windows

The gist is:

  1. install the normal python from python.org
  2. install everything into a venv
  3. copy the venv into python embed.

A raw example

unzip python-3.8.0-embed-amd64.zip
@justinfx
justinfx / maya_script_editor.py
Last active March 8, 2024 18:33
An example of how to use multiprocessing from within Maya, by actually running it as a subprocess and communicating back the results.
"""
This code can be run from a Maya script editor
"""
import subprocess
import cPickle
print 'This value below should be a 1000:'
p = subprocess.Popen(["/path/to/multi_test.py", "-po"], stdout=subprocess.PIPE)
result = cPickle.load(p.stdout)
@cyrilmottier
cyrilmottier / CityBikesContract.java
Last active January 12, 2024 18:04
Using the new Gradle-based Android build system: a second example
package com.cyrilmottier.android.citybikes.provider;
import android.net.Uri;
import com.cyrilmottier.android.avelov.BuildConfig;
/**
* @author Cyril Mottier
*/
public class CityBikesContract {