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
""" | |
This script contains adjusted cli codes from https://github.com/openai/whisper but uses https://github.com/guillaumekln/faster-whisper instead | |
Initialize models using this step: | |
mkdir -p ~/.cache/faster-whisper | |
# assuming a python venv installed on venv dir.... | |
venv/bin/python -m pip install --force-reinstall "faster-whisper @ https://github.com/guillaumekln/faster-whisper/archive/refs/heads/master.tar.gz" |
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
var zeroPad = function(n) { | |
return n > 9 ? '' + n : '0' + n; | |
} | |
var formatDate = function(dt) { | |
return "" + dt.getFullYear() + "-" + zeroPad(dt.getMonth() + 1) + "-" + zeroPad(dt.getDate()); | |
} | |
exports.genDateRange = function(_startDate, _endDate) { | |
var startDate = new Date(_startDate); |
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 | |
# Bolt! Super 4G LTE modem restart script. | |
# Why? 1) I'm not sure why this works. Unbased explanation: This modem type frequently stucked to a bad signal probably coming from a far BTS. Restarting forces it to reacquire 4G signals, hopefuly getting a closer BTS. | |
# Copyright 2014 Dody Suria Wijaya <[email protected]> | |
import urllib, urllib2, base64 | |
PASSWORD = 'admin' | |
MODEM_IP = '192.168.1.1' | |
dataLogin = dict(isTest='false', goformId='LOGIN', password=base64.b64encode(PASSWORD)) | |
dataRestart = dict(isTest='false', goformId='REBOOT_DEVICE') | |
url = "http://%s/goform/goform_set_cmd_process" % MODEM_IP |
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
sudo su | |
cd /etc/nginx | |
mkdir sslmulti | |
cd sslmulti | |
# create a new certificate authority (for importing to our browser so that all child certs are trusted automatically) | |
openssl genrsa -out rootCA.key 2048 | |
openssl req -x509 -new -nodes -key rootCA.key -days 1024 -out rootCA.pem | |
# you can import rootCA.pem to your browser now |
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
""" | |
Pull a table of Indonesia province (Propinsi), city/regency name and type (Kotamadya/Kabupaten), village name (Kelurahan/Desa), and their zip code into csv file | |
Dody Suria Wijaya 2014 [email protected] | |
""" | |
import urllib2, re |