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 | |
# encoding: utf-8 | |
# 或者用这个 http://debugo.com/apscheduler/ | |
import threading | |
import time | |
import schedule | |
class Task(threading.Thread): | |
# 作为整个类 类本身是线程 | |
# 时间 |
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 socket | |
HOST = 'localhost' | |
PORT = 9876 | |
ADDR = (HOST,PORT) | |
BUFSIZE = 4096 | |
videofile = "videos/royalty-free_footage_wien_18_640x360.mp4" | |
bytes = open(videofile).read() |
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
/* | |
http "http://pwnote.paperweekly.site/api/search?_separate_replies=true&limit=200&offset=0&order=asc&sort=created&uri=https://arxiv.org/pdf/1703.00573.pdf" "Authorization:Bearer 6879-XqkNxdWgJ_HQ1AN9OjiA_c7WWmgUvfnhtWIROKFYCZk" | |
HTTP/1.1 200 OK | |
Access-Control-Allow-Origin: * | |
Connection: keep-alive | |
Content-Length: 2854 | |
Content-Type: application/json; charset=UTF-8 | |
Date: Wed, 29 Mar 2017 13:49:34 GMT | |
ETag: "UMUfVM/pkH5Ct3NYwKwXIA" | |
Referrer-Policy: origin-when-cross-origin |
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
<!DOCTYPE html> | |
<head></head> | |
<body> | |
<pre id="log"></pre> | |
<script> | |
// helper function: log message to screen | |
function log(msg) { | |
document.getElementById('log').textContent += msg + '\n'; | |
} | |
// setup websocket with callbacks |
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 | |
# encoding: utf-8 | |
import os | |
import datetime | |
import shutil | |
from shutil import copytree, ignore_patterns | |
from shutil import copyfile | |
import 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 | |
# encoding: utf-8 | |
#!/usr/bin/env python3 | |
import subprocess | |
import time | |
import shutil | |
#-- |
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 | |
# encoding: utf-8 | |
from ws4py.client.threadedclient import WebSocketClient | |
class DummyClient(WebSocketClient): | |
def opened(self): | |
#这里发射 | |
self.send("wwj") |
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 | |
# encoding: utf-8 | |
import os | |
import datetime | |
import shutil | |
from shutil import copytree, ignore_patterns | |
from shutil import copyfile | |
import time | |
import subprocess | |
import hashlib |
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 python3 | |
# NOTE: this example requires PyAudio because it uses the Microphone class | |
import speech_recognition as sr | |
# obtain audio from the microphone | |
r = sr.Recognizer() | |
with sr.Microphone() as source: | |
print("Say something!") |
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
//chrome中 | |
//朗读 | |
var utterThis = new window.SpeechSynthesisUtterance('你好,世界!'); | |
window.speechSynthesis.speak(utterThis); | |
//识别 | |
var newRecognition = new webkitSpeechRecognition(); | |
//newRecognition.continuous = false; | |
newRecognition.onresult = function(event) { |