This file contains hidden or 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
void setup() { | |
pinMode(9, OUTPUT); | |
pinMode(13, OUTPUT); | |
// Serial.begin(9600); | |
} | |
int epoch = 3000; | |
int cycle = 10; | |
int t = 0; |
This file contains hidden or 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
// generating the content of this file: | |
// ldapsearch -x -LLL -o ldif-wrap=no -b cn=Subschema -s base '(objectClass=subschema)' + | perl -ne 'print "$2 -> $1;\n" if /\bNAME\s*\x27(\w+)\x27.*?\bSUP\s+(\w+)/' | grep -v '^top ->' | |
// generating an svg from this file: | |
// dot -Tsvg ldap-objectClass-hierarchy.dot > ldap-objectClass-hierarchy.svg | |
digraph "openldap schemas" { | |
rankdir = LR; | |
overlap = scale; |
This file contains hidden or 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/perl -w | |
# LXC calls us with the following arguments: | |
# fwmp.lxc set $IP $hp1:$cp1 $hp2:$cp2 ... $cname net up veth $iface | |
# fwmp.lxc clear $IP $cname net down veth $iface | |
use strict; | |
my ($iface, undef, $when, undef, $cid, @ARGV) = reverse @ARGV; | |
@ARGV = reverse @ARGV; |
This file contains hidden or 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
#!/opt/conda/bin/python | |
# -*- coding: utf-8 -*- | |
import sys, argparse | |
from keras.preprocessing import image | |
import numpy as np | |
parser = argparse.ArgumentParser(description='classify images') | |
parser.add_argument('-v', '--verbosity', type=int, | |
choices=range(3), default=2, help='increase output verbosity') |
This file contains hidden or 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
# a more flexible and unsafe modification of | |
# https://github.com/fchollet/keras/tree/master/docker | |
# to allow "sudo bash", with some additional tools. | |
FROM nvidia/cuda:8.0-cudnn5-devel | |
ENV CONDA_DIR /opt/conda | |
ENV PATH $CONDA_DIR/bin:$PATH | |
RUN mkdir -p $CONDA_DIR && \ |
This file contains hidden or 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
請改用 https://github.com/ckhung/mbootuz | |
This file contains hidden or 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://newtoypia.blogspot.com/2017/05/pxe-live-cd.html "透過 pxe 網路開機載入 live cd" | |
default grml | |
prompt 1 | |
timeout 100 | |
path modules/bios/ | |
ui vesamenu.c32 | |
menu background /pic/starry-night.jpg | |
menu resolution 800 600 |
This file contains hidden or 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/python | |
# modified from https://nbviewer.jupyter.org/github/BVLC/caffe/blob/master/examples/00-classification.ipynb | |
import numpy as np | |
import argparse, sys, caffe, os, pprint | |
parser = argparse.ArgumentParser( | |
description='classify images using bvlc_reference_caffenet', | |
formatter_class=argparse.ArgumentDefaultsHelpFormatter) | |
parser.add_argument('-c', '--caffe', type=str, |
This file contains hidden or 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/perl -w | |
# post-processing for https://github.com/wavexx/facedetect | |
# 詳見 http://newtoypia.blogspot.com/2017/08/facedetect.html | |
# 「自動(大量批次)尋找擷取、裁剪、模糊化、馬賽克照片中的人臉」 | |
# Author: 洪朝貴 | |
# License: GPL 3 | |
use Getopt::Std; | |
use File::Basename; | |
use strict; |
This file contains hidden or 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/python | |
# wrapper for https://github.com/ageitgey/face_recognition | |
from __future__ import print_function | |
import face_recognition | |
import argparse, ntpath, sys, re, json, csv | |
parser = argparse.ArgumentParser( | |
description='locate faces in pictures', | |
formatter_class=argparse.ArgumentDefaultsHelpFormatter) |