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 os | |
def listfilepath(space, path): | |
lst = os.listdir(path) | |
for f in lst: | |
if os.path.isdir(path+"/"+f): | |
print(space, "[folder]:", f) | |
listfilepath(space+" ", path+"/"+f) | |
else: | |
print(space, "file:", 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
from PIL import Image | |
arImg = [ | |
"android_128_px.png", | |
"apache_128_px.png", | |
"coupon_128_px.png", | |
"graphs_128_px.png", | |
"lab_128_px.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
/* | |
final output | |
type Simple struct { | |
Status string `json:"status"` | |
Message string `json:"message"` | |
Test float64 `json:"test"` | |
Test1 float64 `json:"test1"` | |
Ar []string `json:"ar"` | |
type Result struct { | |
Eligible float64 `json:"eligible"` |
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" | |
"time" | |
"math/rand" | |
) | |
func main() { | |
fmt.Println("generate time in/out") |
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
from datetime import datetime, timedelta | |
import random | |
def main(): | |
print "generate time attendant" | |
for i in range(30): | |
t = random.randrange(45) | |
dStart = datetime(2009, 1, 6, 9, t+15, 24, 78915) |
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
/* | |
* | |
*** | |
***** | |
******* | |
********* | |
*********** | |
********* | |
******* | |
***** |
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
/* | |
* | |
*** | |
***** | |
******* | |
********* | |
*********** | |
********* | |
******* | |
***** |
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}} | |
} | |
} |
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
import json | |
from pprint import pprint | |
import datetime | |
import os | |
classCol = [] | |
def writefile(filepath, txt): | |
print '[write file]: '+filepath |
NewerOlder