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
<# | |
.SYNOPSIS | |
A snippets for powershell scripting. | |
.NOTE | |
It's WIP. | |
#> | |
<# |
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 hashlib | |
import pathlib | |
import sqlite3 | |
class Tree: | |
def __init__(self, db, tag): | |
self.db = db | |
self.tag = tag |
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
package main | |
import ( | |
"archive/tar" | |
"io" | |
"os" | |
"path/filepath" | |
"gopkg.in/src-d/go-billy.v4" | |
"gopkg.in/src-d/go-billy.v4/osfs" |
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
# http://neocat.hatenablog.com/entry/20120917/1347902845 | |
class Nyaan: | |
table = {'A':'にゃんにゃーん', 'B':'にゃーんにゃんにゃんにゃん', 'C':'にゃーんにゃんにゃーんにゃん', 'D':'にゃーんにゃんにゃん', | |
'E':'にゃん', 'F':'にゃんにゃんにゃーんにゃん', 'G':'にゃーんにゃーんにゃん', 'H':'にゃんにゃんにゃんにゃん', | |
'にゃーん':'にゃんにゃん', 'J':'にゃんにゃーんにゃーんにゃーん', 'K':'にゃーんにゃんにゃーん', 'L':'にゃんにゃーんにゃんにゃん', | |
'M':'にゃーんにゃーん', 'N':'にゃーんにゃん', 'O':'にゃーんにゃーんにゃーん', 'P':'にゃんにゃーんにゃーんにゃん', | |
'Q':'にゃーんにゃーんにゃんにゃーん', 'R':'にゃんにゃーんにゃん', 'S':'にゃんにゃんにゃん', 'T':'にゃーん', | |
'U':'にゃんにゃんにゃーん', 'V':'にゃんにゃんにゃんにゃーん', 'W':'にゃんにゃーんにゃーん', 'X':'にゃーんにゃんにゃんにゃーん', | |
'Y':'にゃーんにゃんにゃーんにゃーん', 'Z':'にゃーんにゃーんにゃんにゃん', |
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
#include <security/pam_appl.h> | |
#include <security/pam_misc.h> | |
#include <stdio.h> | |
#include <string.h> | |
#define USERNAME "this is username" | |
#define PASSWORD "this is password" | |
static int conv_func(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr) { |
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 numpy | |
import chainer | |
import chainer.links as L | |
import chainer.functions as F | |
def judge(board): | |
""" | |
>>> judge(numpy.array([[ 1, 1, 1], | |
... [.5, 0, .5], |
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 os | |
import cv2 | |
import numpy | |
import matplotlib.pyplot as plt | |
from sklearn.cluster import DBSCAN | |
images = [cv2.imread('dataset/samples/' + x) for x in os.listdir('dataset/samples') if x.endswith('.jpg')] # サイコロの特定の面の教師画像 | |
original = cv2.imread('dataset/random/0.jpg') # ランダムにサイコロを転がした画像 |
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
<!doctype html> | |
<title>new blankdown design</title> | |
<meta name=viewport content="width=device-width,initial-scale=1"> | |
<body> | |
<nav> | |
<div id=nav-inner> | |
<textarea id=search-box cols=1 placeholder="search"></textarea> | |
<ul id=tag-area> |
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 base64 | |
import cv2 | |
import numpy | |
import sendgrid | |
SENDGRID_APIKEY = 'your API key here' | |
TO_ADDRESS = '[email protected]' | |
FROM_ADDRESS = '[email protected]' |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/macrat/simplexer" | |
) | |
const ( |