Skip to content

Instantly share code, notes, and snippets.

View henry0312's full-sized avatar
💭
I may be slow to respond.

OMOTO Tsukasa henry0312

💭
I may be slow to respond.
View GitHub Profile
@henry0312
henry0312 / AppDelegate.swift
Last active August 29, 2015 14:02
TracMix written in Swift
import Cocoa
class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet var window: NSWindow
var track: Track!
@IBOutlet var textField : NSTextField
@IBOutlet var slider : NSSlider
From: Tsukasa OMOTO <[email protected]>
Date: Sun, 22 Jun 2014 23:14:40 +0900
Subject: [PATCH 1/3] index: Correct henry's real name.
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index ab0cab3..385f1bf 100644
@henry0312
henry0312 / mpv-open.sh
Last active August 29, 2015 14:03
mpv-open
mpv-open() {
mpv $@ "$(find . -type f \( -name "*.ts" -o -name "*.mp4" -o -name "*.mov" -o name "*.mkv" \) | peco)"
}
@henry0312
henry0312 / dirichlet_distribution.hpp
Last active August 29, 2015 14:07
Dirichlet distribution
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Tsukasa ŌMOTO <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
==> Upgrading macvim --with-override-system-vim --with-lua --with-luajit --with-python3
==> Downloading https://github.com/macvim-dev/macvim/archive/snapshot-143.tar.gz
Already downloaded: /Users/tsukasa_omoto/Library/Caches/Homebrew/macvim-8.0-143.tar.gz
==> ./configure --with-features=huge --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-rubyinterp --ena
==> make
Last 15 lines from /Users/tsukasa_omoto/Library/Logs/Homebrew/macvim/02.make:
export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --strip /tmp/macvim-20171220-2976-1jlx0fa/macvim-snapshot-143/src/MacVim/build/Release/MacVim.app/Contents/Resources/English.lproj/FindAndReplace.nib --output-format human-readable-text /tmp/macvim-20171220-2976-1jlx0fa/macvim-snapshot-143/src/MacVim/English.lproj/FindAndReplace.nib
CopyPlistFile build/Release/MacVim.app/Contents/Resources/KeyBinding.plist KeyBinding.plist
@henry0312
henry0312 / optuna_cv.py
Last active June 24, 2023 07:57
k-fold cross validation with Optuna
class LocalObjective(object):
def __init__(self, params):
self.params = dict(params)
def __call__(self, trial):
# fit
return loss
class GlobalObjective(object):