Skip to content

Instantly share code, notes, and snippets.

View programmer290399's full-sized avatar
🎯
Focusing

Saahil Ali programmer290399

🎯
Focusing
View GitHub Profile
@yashlamba
yashlamba / GSOC19.md
Last active March 16, 2021 07:33
Google Summer of Code 2019 Final Work Submission
@techguybiswa
techguybiswa / WhatsAppAutomationScript.js
Created March 11, 2019 18:36
What's App Automated "New Year Wish" Script
let listOfRecentContacts = document.getElementsByClassName("_3j7s9");
console.log("listOfRecentContacts.length = " + listOfRecentContacts.length);
var eventToSwitchMessageBox = new MouseEvent('mousedown', {
bubbles: true,
});
let count =1;
let openMessageBox = setInterval(function(){
// if(count>listOfRecentContacts.length) {
if(count>5) {
console.log("Clearing interval with clearInterval...");
@aallan
aallan / throttled.sh
Last active March 17, 2024 04:42
Script to parse the output of the 'vcgencmd get_throttled' command on a Raspberry Pi
#!/bin/bash
# https://retropie.org.uk/forum/topic/2295/runcommand-warning-if-voltage-temperature-throttling
#Flag Bits
UNDERVOLTED=0x1
CAPPED=0x2
THROTTLED=0x4
HAS_UNDERVOLTED=0x10000
HAS_CAPPED=0x20000
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import random
import sys
def print_same_line(text):
sys.stdout.write('\r')
sys.stdout.flush()
@leimao
leimao / tqdm_download.py
Created June 12, 2018 03:41
Tqdm Download Example
"""
Tqdm Download Hook
Lei Mao
University of Chicago
Modified from https://github.com/tqdm/tqdm/blob/master/examples/tqdm_wget.py
"""
import os
@bshishov
bshishov / forecasting_metrics.py
Last active April 20, 2024 04:29
Python Numpy functions for most common forecasting metrics
import numpy as np
EPSILON = 1e-10
def _error(actual: np.ndarray, predicted: np.ndarray):
""" Simple error """
return actual - predicted
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 13, 2024 23:36
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active June 27, 2024 17:48
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array