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
-- | |
pl = { | |
sp_size=16,x=100,y=100,anim=false,sp=48, | |
fall=false,jump=false,jumping=false, | |
speed=1,gspeed=2,jspeed=1,jtick=8, | |
upblock=false,lblock=false,rblock=false | |
} |
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 machine import Pin | |
import time | |
import _thread | |
display_number = 0 | |
padding = True | |
dataPIN1 = 18 | |
dataPIN2 = 20 | |
latchPIN2 = 19 |
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 machine import Pin, PWM | |
from time import sleep | |
import random | |
pwm = PWM(Pin(15)) | |
pwm2 = PWM(Pin(13)) | |
pwm3 = PWM(Pin(11)) | |
pwm.freq(1000) | |
pwm2.freq(1000) |
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
""" | |
Takes the passed text file and sends it to OpenAI GPT-3 to turn it into a To-Do list. | |
""" | |
import os, sys, openai | |
openai.api_key = os.getenv("OPENAI_API_KEY") | |
text = open(sys.argv[1], "r").read().strip() |
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 sys | |
# Get first argument | |
filename = sys.argv[1] | |
# Open the file | |
pgn = open(filename, "r").read().strip() | |
# Split it into headers and moves | |
pgns = pgn.split("\n\n") |
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 fmt; | |
use strings; | |
use net::dial; | |
use net::ip; | |
use strings; | |
use os; | |
export fn main() void = { | |
if (len(os::args) < 2) { | |
fmt::println("Usage: get <hostname>")!; |
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
" Basics | |
syntax enable | |
set expandtab | |
set splitbelow | |
set ruler | |
set scrolloff=3 " lines above/below cursor | |
set fileformats=unix,mac,dos | |
set cursorline | |
set autoread " automatically reloads file if changed outside | |
set splitbelow " split new window below current window |
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 requests, sys | |
def check_status_code(url, endpoint): | |
return requests.get(f'{url}{endpoint}').status_code | |
def check_endpoint(endpoint): | |
try: | |
print(endpoint, '->', check_status_code(target_url, endpoint)) | |
except: |
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 ( | |
"image/color" | |
"log" | |
"github.com/hajimehoshi/ebiten/v2" | |
) | |
// Game implements ebiten.Game interface. |
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 requests | |
import os.path | |
ip_address_file = "./last_ip_address.txt" | |
discord_webhook_url = "<webhook-url-goes-here>" | |
# Get current IP address from icanhazip | |
def get_current_ip() -> str: | |
r = requests.get("https://icanhazip.com") | |
return r.content.decode().strip() |
NewerOlder