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
| ffmpeg -hwaccel cuvid -i in.MP4 -c:v h264_nvenc -c:a copy -crf 28 out.mp4 |
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
| $x('//div[@class="btn"]/a').forEach((el,i)=>{ | |
| setTimeout( ()=>{ | |
| el.click() | |
| }, i*3000 ); | |
| }) |
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
| class LSTMCell(Layer): | |
| """Cell class for the LSTM layer. | |
| # Arguments | |
| units: Positive integer, dimensionality of the output space. | |
| activation: Activation function to use | |
| (see [activations](../activations.md)). | |
| Default: hyperbolic tangent (`tanh`). | |
| If you pass `None`, no activation is applied | |
| (ie. "linear" activation: `a(x) = x`). | |
| recurrent_activation: Activation function to use |
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
| \copy allcountrydata(geonameid,name,asciiname,alternatenames,latitude,longitude,feature_class,feature_code,country_code,cc2,admin1_code,admin2_code,admin3_code,admin4_code,population,elevation,dem,timezone,modification_date) from '/Users/fang/workspace/geonameworkspace/GeoNames-MySQL-DataImport/data/allCountries.txt' DELIMITERS E'\t' CSV QUOTE E'\b' NULL AS ''; |
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
| for x in c_resources: | |
| if "url" in dir(x.store): | |
| r.append(x.store.url) | |
| elif "connection_parameters" in dir(x.store): | |
| r.append(x.store.connection_parameters['url']) |
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
| #coding=utf8 | |
| import os | |
| import sys | |
| def copyStructure(inpath,outpath): | |
| for dirpath, dirnames, filenames in os.walk(inpath): | |
| print("walking, outpath {}, dirpath {}".format(outpath, dirpath)) | |
| structure = os.path.join(outpath, os.path.relpath(dirpath, inpath)) | |
| if not os.path.isdir(structure): | |
| print("mkdir: {}".format(structure)) | |
| os.mkdir(structure) |
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
| function getdht() | |
| status, temp, humi, temp_dec, humi_dec = dht.read(4) | |
| if status == dht.OK then | |
| print("temperature=" .. (temp) .. ", humidity=" .. (humi) .. "") | |
| -- send message | |
| msg = "温度" .. (temp) .. ",湿度" .. (humi) .. "" | |
| elseif status == dht.ERROR_CHECKSUM then | |
| print("DHT Checksum error.") | |
| elseif status == dht.ERROR_TIMEOUT then | |
| print("DHT timed 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
| ffmpeg -i "$1" -ab 320k "${1%.*}.mp3" |
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
| for i in *.png; do sips -s formatOptions 95 -s format jpeg "$i" --out ../binganout/"${i%png}".jpg;done |
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
| # coding=utf-8 | |
| import sqlite3 | |
| import xml.etree.ElementTree | |
| from datetime import datetime | |
| from datetime import timedelta | |
| import pdb | |
| EPOCH_AS_FILETIME = 116444736000000000 |