Skip to content

Instantly share code, notes, and snippets.

View fanbyprinciple's full-sized avatar
🙀
Out on an adventure !

Ashwin Jayaprakash fanbyprinciple

🙀
Out on an adventure !
View GitHub Profile

Fundraising Grader

Fully responsive multi-step form grader with validation pre-submit and pop up model.

Using math to calculate a grade between 0 and 400 based on the data you enter.

A Pen by Ashwin on CodePen.

License.

@fanbyprinciple
fanbyprinciple / installing hugging face locally.md
Last active January 13, 2022 11:46
Steps to install hugging face locally

If you have a conda environment, create a new environement using conda create --name myenv

activate myenv

Install pytorch in the environment. if you have cuda: check commandline corresponding to your version.

conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

@fanbyprinciple
fanbyprinciple / gist:0abc32544a5fa3699bf024118e4a0bc1
Last active January 19, 2022 17:27
praw_ini_sample_file.txt
[DEFAULT]
# A boolean to indicate whether or not to check for package updates.
check_for_updates=True
# Object to kind mappings
comment_kind=t1
message_kind=t4
redditor_kind=t2
submission_kind=t3
subreddit_kind=t5
@fanbyprinciple
fanbyprinciple / creating a reddit bot.py
Last active January 19, 2022 18:25
creating a reddit bot.py
## importing all the required libraries
import praw
import os
import re
## initialising praw
reddit = praw.Reddit('brevity_bot')
subreddit = reddit.subreddit("botjungle")
@fanbyprinciple
fanbyprinciple / main.rs
Created January 23, 2022 06:41
madlib generator
fn main() {
let color = std::env::args().nth(1).expect("Please provide a color");
let animal = std::env::args().nth(2).expect("Please provide an animal");
let friend = std::env::args().nth(3).expect("Please provide a friend's name");
println!("Roses can be {}, {} could be blue, {} is open minded and so should be you.", color, animal, friend);
}
@fanbyprinciple
fanbyprinciple / get_hash.py
Created February 15, 2022 11:45
getting file md5 hashes and sha1 hashes
import os
import hashlib
import sys
import pandas as pd
import numpy as np
all_files = []
all_files_without_path = []
all_hashes = []
@fanbyprinciple
fanbyprinciple / whatsapp bot with hugging face.py
Created February 17, 2022 02:08
Creating a whatsapp bot with selenium and hugging face traansformers.
# PYTHON Example
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver import ActionChains
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
import time
@fanbyprinciple
fanbyprinciple / rlotto_htb_solution.py
Last active July 7, 2022 09:42
RLotto htb solution
# from https://medium.com/@wiiz4rd/hackthebox-rlotto-challenge-68f4b01006ba
# connect to rlotto using nc or telnet
# get the first sequence of numbers
# input into this program
import time
import random
seed = int(input("Enter the timestamp (enter 0 if not aware) :"))
@fanbyprinciple
fanbyprinciple / invoke_mim_win10.ps1
Created August 12, 2022 05:20
invoke-mimikatz powershell that works for latest win 10
This file has been truncated, but you can view the full file.
function Invoke-Mimikatz
{
[CmdletBinding(DefaultParameterSetName="DumpCreds")]
Param(
[Parameter(Position = 0)]
[String[]]
$ComputerName,
[Parameter(ParameterSetName = "DumpCreds", Position = 1)]
[Switch]