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
| package main | |
| import "fmt" | |
| import "time" | |
| var ss = []string{"foo", "bar"} | |
| func main() { | |
| for _, name := range ss { | |
| go func(){ |
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
| // 8.15 project main.go | |
| // generate a pic of moon | |
| package main | |
| import ( | |
| "fmt" | |
| "image" | |
| "image/color" | |
| "image/draw" | |
| "image/png" |
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
| #!/bin/bash | |
| # | |
| # | |
| Echo(){ | |
| echo ">>> $(date "+%Y-%m-%d %H:%M:%S")" "$@" | |
| } | |
| Die(){ Echo "$@"; exit 1; } |
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
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "time" | |
| ) | |
| type Record struct { | |
| a int |
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 | |
| # Written by Henry 'Pi' James and Loring Holden | |
| # modified for multitracker display by John Hoffman | |
| # see LICENSE.txt for license information | |
| # dependency | |
| # $ pip install bencode | |
| from sys import * |
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/env python | |
| # -*- coding: utf-8 -*- | |
| import cv2 | |
| import numpy as np | |
| def _cv2open(filename, arg=0): | |
| obj = cv2.imread(filename, arg) | |
| if obj == None: | |
| raise IOError('cv2 read file error:'+filename) |
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
| import goless | |
| import time | |
| import gevent | |
| from gevent import monkey | |
| monkey.patch_all() | |
| def time_after(seconds): | |
| c = goless.chan() | |
| def _fn(): | |
| gevent.sleep(seconds) |
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/env python | |
| # coding: utf-8 | |
| # | |
| import fnmatch | |
| import os | |
| import pathspec | |
| import pyftpdlib | |
| from pyftpdlib.filesystems import AbstractedFS | |
| from pyftpdlib.authorizers import DummyAuthorizer |
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
| go run_percent.go -p $PID |
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
| #!/bin/bash | |
| # | |
| # help tool of supervisorctl | |
| # | |
| # reference: http://supervisord.org/ | |
| RUNUSER=hzsunshx | |
| CONFDIR="/etc/supervisor/conf.d/" | |
| CRED='\033[0;31m' |
OlderNewer