Skip to content

Instantly share code, notes, and snippets.

View azyobuzin's full-sized avatar

Takuya Sakurai azyobuzin

View GitHub Profile
#!/bin/bash
# Usage: dockerbackup.sh VolumeName
set -e
WORKER_USER=backupworker
WORKER_HOME="/home/${WORKER_USER}"
DEST_DIR_NAME=DockerBackup
for volume_name do
using System;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
TaskScheduler.UnobservedTaskException += (sender, e) =>
import essentia.standard
def estimate_key(filename):
loader = essentia.standard.MonoLoader(filename=filename)
return essentia.standard.KeyExtractor()(loader())
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@azyobuzin
azyobuzin / HiddenMarkovModel.cs
Last active February 17, 2018 19:34
動くかわからない隠れマルコフモデルとビタビアルゴリズムの実装
using System;
using System.Collections.Generic;
namespace HmmMatching
{
public class HiddenMarkovModel<TState, TObservation>
{
private readonly List<HmmState<TState, TObservation>> _states;
private int _edgesCapacity;
private double[,] _edges;
using System;
using System.Numerics;
using System.Threading.Tasks;
using Accord.Math;
using Accord.Math.Transforms;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
namespace ConsoleApp6
{
/// <summary>
/// <see cref="DependencyOnModelPropertyAttribute"/> が指定されたプロパティの変更通知を有効化します。
/// </summary>
protected void EnableAutoPropertyChangedEvent(INotifyPropertyChanged model)
{
PropertyChangedEventListener listener = null;
foreach (var prop in this.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
{
PropertyChangedEventHandler handler = null;
const int AIN1 = 12;
const int BIN1 = 11;
const int BTN = 10;
void setupPin(int pin) {
pinMode(pin, OUTPUT);
}
void setup() {
// put your setup code here, to run once:
@azyobuzin
azyobuzin / Procfile
Last active January 23, 2018 14:47
Share on Croudia のソースコード
web: gunicorn ShareOnCroudia.share_on_croudia:application
using System;
using System.Linq;
using System.Numerics;
using Accord.Math;
using Accord.Math.Transforms;
using OxyPlot;
using OxyPlot.Series;
namespace PitchDetector
{