Skip to content

Instantly share code, notes, and snippets.

View CodeByAidan's full-sized avatar
💻
i love HPC/DL

aidan CodeByAidan

💻
i love HPC/DL
View GitHub Profile
@CodeByAidan
CodeByAidan / fonts.txt
Created December 9, 2022 03:30
Fonts from Sty module
['1943____', '3-d', '3x5', '4x4_offr', '5lineoblique', '5x7', '5x8', '64f1____', '6x10', '6x9', 'acrobatic', 'advenger', 'alligator', 'alligator2', 'alphabet', 'aquaplan', 'arrows', 'ascii___', 'asc_____', 'assalt_m', 'asslt__m', 'atc_gran', 'atc_____', 'avatar', 'a_zooloo', 'banner', 'banner3-D', 'banner3', 'banner4', 'barbwire', 'basic', 'battlesh', 'battle_s', 'baz__bil', 'beer_pub', 'bell', 'big', 'bigchief', 'binary', 'block', 'brite', 'briteb', 'britebi', 'britei', 'broadway', 'bubble', 'bubble_b', 'bubble__', 'bulbhead', 'b_m__200', 'c1______', 'c2______', 'calgphy2', 'caligraphy', 'catwalk', 'caus_in_', 'char1___', 'char2___', 'char3___', 'char4___', 'charact1', 'charact2', 'charact3', 'charact4', 'charact5', 'charact6', 'characte', 'charset_', 'chartr', 'chartri', 'chunky', 'clb6x10', 'clb8x10', 'clb8x8', 'cli8x8', 'clr4x6', 'clr5x10', 'clr5x6', 'clr5x8', 'clr6x10', 'clr6x6', 'clr6x8', 'clr7x10', 'clr7x8', 'clr8x10', 'clr8x8', 'coil_cop', 'coinstak', 'colossal', 'computer', 'com_sen_', 'contessa', 'c
year population
2000 12400
2001 12800
2002 13800
2003 13600
2004 14200
2005 15600
2006 17600
2007 19200
2008 20300
@CodeByAidan
CodeByAidan / Boston-population.csv
Last active December 19, 2022 17:05
Estimated population based on average from 1950-2037
Date Population
1950 2551000
1951 2576000
1952 2602000
1953 2628000
1954 2654000
1955 2680000
1956 2707000
1957 2734000
1958 2761000
[{"categories":[{"decimal":"3.77","digital":"3:46:46","hours":3,"minutes":46,"name":"Coding","percent":100,"seconds":46,"text":"3 hrs 46 mins","total_seconds":13606.321242}],"dependencies":[{"decimal":"2.78","digital":"2:47:13","hours":2,"minutes":47,"name":"json","percent":14.22,"seconds":13,"text":"2 hrs 47 mins","total_seconds":10033.253908},{"decimal":"2.58","digital":"2:35:13","hours":2,"minutes":35,"name":"time","percent":13.2,"seconds":13,"text":"2 hrs 35 mins","total_seconds":9313.32205},{"decimal":"2.55","digital":"2:33:24","hours":2,"minutes":33,"name":"requests","percent":13.05,"seconds":24,"text":"2 hrs 33 mins","total_seconds":9204.54127},{"decimal":"2.50","digital":"2:30:12","hours":2,"minutes":30,"name":"selenium","percent":12.78,"seconds":12,"text":"2 hrs 30 mins","total_seconds":9012.040473},{"decimal":"2.15","digital":"2:09:31","hours":2,"minutes":9,"name":"csv","percent":11.02,"seconds":31,"text":"2 hrs 9 mins","total_seconds":7771.328642},{"decimal":"2.10","digital":"2:06:16","hours":2,"mi

The goal of this kata is to write a function tower(base, height, modulus) that returns base ** base ** ... ** base, with height occurrences of base, modulo modulus. (** is the power operator in Python, in case this kata gets translated.) As input constraints, we have:

1 <= base < 1e20
0 <= height < 1e20
1 <= modulus < 1e7
from selenium import webdriver
from selenium.webdriver.chrome.options import DesiredCapabilities
from selenium.webdriver.common.proxy import Proxy, ProxyType
import time
co = webdriver.ChromeOptions()
co.add_argument("log-level=3")
co.add_argument("--headless")
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: sun;
let widget = await createWidget();
if (!config.runsInWidget) {
await widget.presentSmall();
}
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: sun;
// Make a scriptable that will show the current weather and the location of the user
// Get the location of the user
let location = await Location.current();
console.log(location);
// Get the weather of the user
@CodeByAidan
CodeByAidan / main.cpp
Created March 12, 2023 20:11
Fixed `std::cout << ____ << ___` with this snippit of code! It's good for debugging the cout macro in C++!
#include <iostream>
#include <vector>
#include <iterator>
template <class Argument>
class manipulator
{
private:
typedef std::ostream& (*Function)(std::ostream&, Argument);
public:
@CodeByAidan
CodeByAidan / main.cpp
Created March 12, 2023 20:19
Intro to requests using "cpr" in C++. I made a function that removes the entire line in the "Origin" key of the request, that way it doesn't show my IP! 😁
#include <cpr/cpr.h>
#include <iostream>
#include <string>
std::string removeLine(std::string text, const std::string& line) {
/* removeLine( text, line ):1
* Remove a line from a string
* @param text: The string to remove the line from
* @param line: The line to remove
* @return: The string without the line