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
""" | |
TONY notes | |
This is a DIRECT copy pasta of the server.py file in the official cpython github https://github.com/python/cpython/tree/main/Lib/http | |
I added the following two headers from SHEER FRUSTRATION to get past a random SharedArrayBuffer not defined error | |
line 749 or so | |
self.send_header("Cross-Origin-Opener-Policy", "same-origin") | |
self.send_header("Cross-Origin-Embedder-Policy", "require-corp") |
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/python3 | |
import turtle | |
import sys | |
MAX_ITER = 100 | |
def mand(c): | |
z = 0 | |
n = 0 | |
while abs(z) <= 2 and n < MAX_ITER: |
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
# predicate zero or not | |
proc zero(n : int) : bool = | |
return n==0 | |
# simple subtract 1 | |
proc sub1(n : int) : int = | |
return n-1 | |
# forward defs since this is recursive |
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
#![feature(llvm_asm)] | |
fn main() { | |
let message = String::from("hello world tony!\n"); | |
syscall(message); | |
} | |
#[cfg(target_os = "linux")] | |
#[inline(never)] | |
fn syscall(message: String) { | |
let msg_ptr = message.as_ptr(); |
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
program TestMe; | |
var | |
i : Longint; | |
x : Longint = 0; | |
y : Real = 0; | |
begin | |
for i:=0 to 116000 do | |
begin | |
x := i; |
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
git clone [email protected]:love2d/love.git | |
cd love | |
git checkout 11.3 | |
sudo apt-get install autoconf | |
sudo apt-get install libtool | |
platform/unix/automagic | |
sudo apt-get install libsdl2-dev | |
sudo apt-get install libluajit-5.1-dev | |
sudo apt-get install libopenal-dev | |
sudo apt-get install libfreetype6-dev |
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
# define an object type | |
type Foo = object | |
x : int | |
y : int | |
name : string | |
# define a proc that takes a Foo | |
# I named it self for no real reason | |
proc bob(self:Foo) = | |
echo "foo.bob",self |
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
URI = "https://www.16personalities.com/free-personality-test" | |
from selenium.webdriver import Chrome, ChromeOptions | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.common.by import By |
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 | |
pid = None | |
for i in range(len(sys.argv)): | |
if sys.argv[i] == "--pid" or sys.argv[i] == "-p": | |
pid = int(sys.argv[i+1]) | |
inf = open("/proc/{0}/maps".format(pid),"r") | |
data=inf.readlines() |
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
function love.load() | |
--backgroundImage = love.graphics.newImage("bg2.png") | |
--mainFont = love.graphics.newFont("m7.ttf", 20) | |
--love.graphics.setFont(mainFont) | |
local font = love.graphics.newFont(24) | |
love.graphics.setFont(font) | |
screenWidth = love.graphics.getWidth() | |
screenHeight = love.graphics.getHeight() | |
internalWidth = 1600 | |
internalHeight = 1200 |