n-dimensional hyperplane (line for 2D, plane for 3D) fitting via singular value decomposition method
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
#!/usr/bin/env python | |
# vim: set fileencoding=utf8 : | |
"""Singleton Mixin""" | |
class Singleton(object): | |
"""Singleton Mixin Class | |
Inherit this class and make the subclass Singleton. | |
Usage: |
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
import sys | |
import os | |
import datetime | |
import pyauto | |
from keyhac import * | |
def configure(keymap): | |
# Setting with callable object (Advanced usage) |
% wget https://gist.github.com/lambdalisue/5911291/raw/install_vim_debian.sh -O - | bash
ASAHIネットがDS-Lite対応したので、 自宅の適当なLinuxルーターにて設定しようとして詰まったAFTR取得に関するメモ。
Linuxルーターを使ってる人向けのニッチなものだけど、情報として残しておく。
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
javascript:(function() { | |
const t = document.querySelector('.c-MainLayout_Content article div'); | |
t.style.maxWidth = "none"; | |
t.style.width = "99%"; | |
}()) |
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
check() { | |
# -z: True when the string length is 0 | |
if [ -z $DUMMY ]; then | |
echo '-z $DUMMY' | |
fi | |
if [ -z "$DUMMY" ]; then | |
echo '-z "$DUMMY"' | |
fi | |
if [ -z "${DUMMY+xxx}" ]; then | |
echo '-z "${DUMMY+xxx}"' |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: jupyterhub | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start jupyterhub | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
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
#!/usr/bin/env python | |
# vim: set fileencoding=utf-8: | |
import pickle | |
import json | |
from math import exp | |
from random import random | |
from random import shuffle | |
def sigmoid(x): |
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
# coding=utf-8 | |
""" | |
""" | |
__author__ = 'Alisue <lambdalisue@hashnote.net>' | |
try: | |
from PySide import QtCore | |
from PySide import QtGui | |
except ImportError: | |
from PyQt4 import QtCore | |
from PyQt4 import QtGui |
NewerOlder