Skip to content

Instantly share code, notes, and snippets.

View adithyaxx's full-sized avatar
🖥️
Aimlessly staring at the screen

Prem Adithya adithyaxx

🖥️
Aimlessly staring at the screen
View GitHub Profile
@adithyaxx
adithyaxx / environment.yml
Created December 12, 2021 06:44
ML Conda Environment for Apple M1 (arm64) macs with tensorflow 2.7.0 and python 3.8 including GPU support.
name: tf
channels:
- apple
- conda-forge
dependencies:
- absl-py=0.10.0=pyhd8ed1ab_1
- aiohttp=3.8.1=py38hea4295b_0
- aiosignal=1.2.0=pyhd8ed1ab_0
- anyio=3.4.0=py38h10201cd_0
- appnope=0.1.2=py38h10201cd_2
@adithyaxx
adithyaxx / recursive_unzip.sh
Created July 27, 2018 06:45
Script to recursively brute-force and extract password protected zip files
#!/usr/bin/env bash
while [ -e *.zip ]; do
files=*.zip;
for file in $files; do
echo -n "Cracking ${file}… ";
output="$(fcrackzip -u -l 1-6 -c '1' *.zip | tr -d '\n')";
password="${output/PASSWORD FOUND\!\!\!\!: pw == /}";
if [ -z "${password}" ]; then
echo "Failed to find password";
@adithyaxx
adithyaxx / README.md
Last active October 4, 2019 02:43 — forked from willprice/README.md
Install OpenCV 4.1.1 for Raspberry Pi 3 or 4 (Raspbian Buster)

Install OpenCV 4.1.1 on Raspbian Buster

$ chmod +x *.sh
$ ./download-opencv.sh
$ ./install-deps.sh
$ ./build-opencv.sh
$ cd ~/opencv/opencv-4.1.1/build
$ sudo make install
@adithyaxx
adithyaxx / sum_of_primes
Created September 19, 2018 02:58
A python script to calculate the sum of all prime numbers less than n
def sum_primes(limit):
primes = []
for n in range(2, limit+1):
# try dividing n with all primes less than sqrt(n):
for p in primes:
if n % p == 0: break # if p divides n, stop the search
if n < p*p:
primes.append(n) # if p > sqrt(n), mark n as prime and stop search
break
else: primes.append(n) # fallback: we actually only get here for n == 2
@adithyaxx
adithyaxx / decrypt_rsa.py
Last active July 27, 2018 06:43
Script to decrypt RSA encrypted message
#! /usr/bin/env python3
# Script to break RSA
import binascii
# Variables
c=62078086677416686867183857957350338314446280912673392448065026850212685326551183962056495964579782325302082054393933682265772802750887293602432512967994805549965020916953644635965916607925335639027579187435180607475963322465417758959002385451863122106487834784688029167720175128082066670945625067803812970871
p=7901324502264899236349230781143813838831920474669364339844939631481665770635584819958931021644265960578585153616742963330195946431321644921572803658406281
q=12802918451444044622583757703752066118180068668479378778928741088302355425977192996799623998720429594346778865275391307730988819243843851683079000293815051
dp=5540655028622021934429306287937775291955623308965208384582009857376053583575510784169616065113641391169613969813652523507421157045377898542386933198269451
@adithyaxx
adithyaxx / exo_playback_control_view.xml
Created December 25, 2017 17:46
SimpleExoPlayer Fullscreen Playback Control Layout
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layoutDirection="ltr"
android:background="@drawable/video_gradient_bg"
android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"