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 Image | |
| import os | |
| listfile = os.listdir(os.getcwd()) | |
| scale = 2 | |
| for f in listfile: | |
| if f.split('.')[1] == 'png': | |
| print f |
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
| sudo port install python27 | |
| sudo port select --set python python27 | |
| sudo port install py27-numpy | |
| sudo port install opencv +python27 | |
| # add export file | |
| sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit ~/.bash_profile | |
| #or | |
| open -t ~/.bash_profile |
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 cv | |
| cv.NamedWindow("testcam", cv.CV_WINDOW_AUTOSIZE) | |
| camera_index = 0 | |
| capture = cv.CaptureFromCAM(camera_index) | |
| def repeat(): | |
| global capture #declare as globals since we are assigning to them now | |
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
| /* | |
| // method checkList timezone | |
| private void checkListTimeZone(){ | |
| String[]TZ = TimeZone.getAvailableIDs(); | |
| for(int i = 0; i < TZ.length; i++) { | |
| Log.d("TIMEZONE", TimeZone.getTimeZone(TZ[i]).getID()); | |
| } | |
| } | |
| */ |
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" | |
| "net/http" | |
| ) | |
| func Handler(writer http.ResponseWriter, request *http.Request) { | |
| fmt.Fprintf(writer, "Hello, world ") | |
| } |
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" | |
| "net/http" | |
| ) | |
| func HelloHandlers(w http.ResponseWriter, r *http.Request) { | |
| fmt.Fprintf(w, "Hello, world.") | |
| } |
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
| #------------------------------------- | |
| // monitor | |
| kubectl proxy -p 8080 -w . | |
| //http://127.0.0.1/ui | |
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 json | |
| from pprint import pprint | |
| import datetime | |
| import os | |
| classCol = [] | |
| def writefile(filepath, txt): | |
| print '[write file]: '+filepath |
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" | |
| "encoding/json" | |
| "io/ioutil" | |
| "strings" | |
| "reflect" | |
| "os" | |
| "bytes" |
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
| {{range .GetArrayProperties}}{{$d := SplitText . ":" }}{{$t := index $d 1}}{{$t := Replace (Replace $t "[" "" 2) "]" "" 2}} {{if or (eq $t "any") (or (eq $t "string") (eq $t "number") ) }}{{else}} | |
| import { {{$t}} } from './{{ToLower $t}}'{{end}}{{end}} | |
| export class {{.ClassName}} { | |
| {{range .GetArrayProperties }} {{.}}; | |
| {{end}} | |
| constructor(obj?: any){ {{range .GetArrayProperties }}{{$d := SplitText . ":" }} | |
| this.{{index $d 0}} = obj && obj.{{index $d 0}} || null;{{end}} | |
| } | |
| } |