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 subprocess | |
import json | |
import os | |
from datetime import datetime | |
import logging | |
import base64 | |
from io import BytesIO | |
from PIL import Image, ImageDraw |
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
''' | |
it shows a log message when an object is detected. | |
references | |
https://medium.com/@sebastiaan.panasj/occupancy-counting-with-unitv2-by-m5stack-d35455037882 | |
''' | |
import subprocess | |
import json |
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
package main | |
import ( | |
"context" | |
"log/slog" | |
"os" | |
) | |
type contextKey string |
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
.env | |
*.db |
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 sqlite3 | |
from linkedin_api import Linkedin | |
import logging | |
def extract_id(urn): | |
return urn.split(":")[-1] | |
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
// package main example of the book Concurrency in Go by Katherine Cox-Buday | |
// it includes the patterns: orChannel, orDone, take, and bridge. | |
// newSteward monitors a goroutine and restarts it if it stops sending heartbeats | |
package main | |
import ( | |
"log" | |
"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
import os | |
import urllib.request | |
import urllib.parse | |
TELEGRAM_TOKEN = os.environ["TELEGRAM_TOKEN"] | |
TELEGRAM_CHANNEL_ID = os.environ["TELEGRAM_CHANNEL_ID"] | |
telegram_url = f"https://api.telegram.org/bot{TELEGRAM_TOKEN}/sendMessage" | |
telegram_url += f"?chat_id={TELEGRAM_CHANNEL_ID}" |
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
// go playground | |
// https://go.dev/play/p/3HjtqJlbMnE | |
package main | |
import ( | |
"log" | |
"time" | |
) | |
func 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
imgs | |
.DS_Store | |
node_modules |
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
#!/bin/bash | |
# get channel id | |
# https://api.telegram.org/bot<YourBOTToken>/getUpdates | |
# crontab | |
# */5 * * * bash /path/gas_alert.sh 2>&1 | logger -t gas_alert | |
cheapPrice="80" | |
url="https://api.etherscan.io/api?module=gastracker&action=gasoracle" |
NewerOlder