Skip to content

Instantly share code, notes, and snippets.

Avatar

Tony Colston tonetheman

View GitHub Profile
@tonetheman
tonetheman / find_radio.py
Created Sep 27, 2020
find a radio button to click on
View find_radio.py
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
@tonetheman
tonetheman / ReadMaps.py
Created Jun 30, 2020
add a size (in k) for maps file in /proc
View ReadMaps.py
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()
@tonetheman
tonetheman / main.lua
Created Jun 28, 2020
joystick love2d testing
View main.lua
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
@tonetheman
tonetheman / CheckSwap.py
Created Jun 10, 2020
Show swap for linux processes
View CheckSwap.py
import os,glob,string,time,sys
all_the_things = []
class P:
def __init__(self,pid,name,swap):
self.pid = pid
self.name = name
self.swap = swap
def __repr__(self):
return str(self.pid) + " " + str(self.name) + " " + str(self.swap)
@tonetheman
tonetheman / CheckSwap.py
Created Jun 10, 2020
Show swap for linux processes
View CheckSwap.py
import os,glob,string,time,sys
all_the_things = []
class P:
def __init__(self,pid,name,swap):
self.pid = pid
self.name = name
self.swap = swap
def __repr__(self):
return str(self.pid) + " " + str(self.name) + " " + str(self.swap)
@tonetheman
tonetheman / wl.html
Created Feb 6, 2020
html to handle number controls
View wl.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport"
content="user-scalable=no, width=device-width" />
<style>
input {
border : 3px solid black;
padding : 2px;
@tonetheman
tonetheman / example_classic.lua
Created Feb 6, 2020
classic example for lua OO
View example_classic.lua
--[[
example of using
https://github.com/rxi/classic
]]
local Object = require("classic")
local Actor = Object:extend() -- new class
@tonetheman
tonetheman / example_classic.lua
Created Feb 6, 2020
classic example for lua OO
View example_classic.lua
--[[
example of using
https://github.com/rxi/classic
]]
local Object = require("classic")
local Actor = Object:extend() -- new class
View oli.py
import random
class Person:
def __init__(self,id):
self.amount = 100
self.id = id
def __repr__(self):
return str(self.id) + " :: " + str(self.amount)
# setup
@tonetheman
tonetheman / c.rkt
Created Dec 13, 2019
collatz in racket
View c.rkt
#lang racket
(define (foo n)
(if (= (modulo n 2) 0)
(/ n 2)
(+ (* 3 n) 1)
))
(define (goo a)
You can’t perform that action at this time.