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
worker_processes 1; | |
error_log logs/error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
server { |
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 | |
from uliweb import manage, models | |
from uliweb.manage import make_simple_application | |
os.chdir('demo') | |
manage.call('uliweb syncdb -v') | |
manage.call('uliweb dbinit -v') | |
def test_apijson_get(): |
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 time | |
import ntplib | |
c = ntplib.NTPClient() | |
response = c.request('pool.ntp.org') | |
ts = response.tx_time | |
_date = time.strftime('%Y-%m-%d',time.localtime(ts)) | |
_time = time.strftime('%X',time.localtime(ts)) | |
os.system('date {} && time {}'.format(_date,_time)) |
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
#!/usr/bin/env python | |
#coding=utf-8 | |
from __future__ import print_function | |
import os | |
import sys | |
def main(): | |
dpath_in = os.path.expanduser(r"~/1del/") | |
dpath_out = os.path.expanduser(r"~/1delt/") |
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
{{use "ui.vue"}} | |
<div id="app"> | |
</div> | |
<script> | |
var app = new Vue({ | |
el: '#app', | |
data: { |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
def main(): | |
pass | |
if __name__=='__main__': | |
main() |
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
{ | |
"emojis": [ | |
{"emoji": "π©βπ©βπ§βπ§", "name": "family_mothers_two_girls", "shortname": "", "unicode": "", "html": "👩‍👩‍👧‍👧", "category": "p", "order": ""}, | |
{"emoji": "π©βπ©βπ§βπ¦", "name": "family_mothers_children", "shortname": "", "unicode": "", "html": "👩‍👩‍👧‍👦", "category": "p", "order": ""}, | |
{"emoji": "π©βπ©βπ¦βπ¦", "name": "family_mothers_two_boys", "shortname": "", "unicode": "", "html": "👩‍👩‍👦‍👦", "category": "p", "order": ""}, | |
{"emoji": "π¨βπ©βπ§βπ§", "name": "family_two_girls", "shortname": "", "unicode": "", "html": "👨‍👩‍👧‍👧", "category": "p", "order": ""}, | |
{"emoji": "π¨βπ©βπ§βπ¦", "name": "family_children", "shortname": "", "unicode": "", "html": "👨‍👩‍👧‍👦", "category": "p", "order": ""}, | |
{"emoji": "π¨βπ©βπ¦βπ¦", "name": "family_two_biys", "shortname": "", "unicode": "", "html": "👨&zw |
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
from subprocess import Popen, PIPE, STDOUT | |
import os | |
def runcmd(cwd,cmd): | |
oldcwd = os.getcwd() | |
os.chdir(cwd) | |
runcmd_timeout = 3600 | |
p = Popen(cmd,stdout=PIPE,stderr=STDOUT,shell=True,preexec_fn=os.setpgrp) | |
p.wait(runcmd_timeout) | |
if p.returncode==None: |
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
worker_processes 1; | |
error_log logs/error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
server { | |
listen 6699; | |
location / { |
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 time | |
tstr = time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(time.time())) | |
print tstr |
NewerOlder