Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Check if all required arguments are provided
if [ "$#" -ne 5 ]; then
echo "Usage: $0 <HF_TOKEN> <WANDB_TOKEN> <GDRIVE_FILE_ID> <GITHUB_USERNAME> <GITHUB_PASSWORD>"
datasets[audio]
evaluate
git+https://github.com/huggingface/transformers.git
jiwer
accelerate
wandb
torchaudio
gdown
{"div": {"\u0627": 1, "\u0644": 2, "\u0647": 3, "\u0651": 4, "\u0780": 5, "\u0781": 6, "\u0782": 7, "\u0783": 8, "\u0784": 9, "\u0785": 10, "\u0786": 11, "\u0787": 12, "\u0788": 13, "\u0789": 14, "\u078a": 15, "\u078b": 16, "\u078c": 17, "\u078d": 18, "\u078e": 19, "\u078f": 20, "\u0790": 21, "\u0791": 22, "\u0792": 23, "\u0793": 24, "\u0794": 25, "\u0795": 26, "\u0796": 27, "\u0797": 28, "\u0798": 29, "\u0799": 30, "\u079a": 31, "\u079b": 32, "\u079c": 33, "\u079d": 34, "\u079e": 35, "\u079f": 36, "\u07a0": 37, "\u07a1": 38, "\u07a2": 39, "\u07a3": 40, "\u07a4": 41, "\u07a5": 42, "\u07a6": 43, "\u07a7": 44, "\u07a8": 45, "\u07a9": 46, "\u07aa": 47, "\u07ab": 48, "\u07ac": 49, "\u07ad": 50, "\u07ae": 51, "\u07af": 52, "\u07b0": 53, "\ufdf2": 54, "\ufdfa": 55, "|": 0, "[UNK]": 56, "[PAD]": 57}}
-- phpMyAdmin SQL Dump
-- version 5.1.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 15, 2022 at 07:36 PM
-- Server version: 10.4.24-MariaDB
-- PHP Version: 7.4.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@Dharisd
Dharisd / kill_m1.py
Last active September 8, 2021 19:49
import random
import time
""" basically we try hit m1 hard as i can with based mat multiple op written in `pure' python"""
mat_a = [[2,2,2],[2,2,2]]
mat_b = [[2,2,1],[2,2,1]]
import argparse
from tts import TTSModel
import os
import time
#import soundfile as sf
model_path = "/Users/dharis/projects/tts_demo/male_naail"
text = 'ރައްޔިތުންގެ މަޖިލީހުގެ އިދާރާ އިން ކުރިއަށް ގެންދާ "އާސްކް ސްޕީކާ"ގެ މިރޭގެ ޕްރޮގްރާމްގައި ނަޝީދު ވިދާޅުވީ ރާއްޖެ އަށް އެންމެ ރަނގަޅު ވާނީ ބަރުލަމާނީ ނިޒާމު ކަމަށް އަދިވެސް ގަބޫލުފުޅު ކުރައްވާ ކަމަށާއި ނަމަވެސް ރިޔާސީ އިންތިހާބެއް އޮވެއްޖެ ނަމަ އެމްޑީޕީގެ ޕްރައިމަރީގައި އެ މަނިކުފާނު ވާދަކުރައްވާނެ ކަމަށެވެ'

Why Viber sucks

Viber isnt a terrible app, calling it a terrible/bad app would be an insult to other bad apps. viber is the worst app and the worst platform, it is below what is humanly possible.its one of the main reasons i hate the maldivian community as a whole. this can be attributed to its shitty/dark origins (spying tool created by the ISRAELI goverment), although they tried to hide its past or origins some still remains available (https://web.archive.org/web/20131010072724/http://www.moh10ly.com/home/security/viberisaspy), although they claim the app is fully end to end encrypted theres no proof to back it up

Privacy

privacy on viber is basically non existent, in fact its literally inviting predators and other potential dangerous people to you, Id not be surprised if majority number leaks or similar are through viber

Mass Scraping

import requests
import time
import json
import os
BML_URL ="https://www.bankofmaldives.com.mv/internetbanking/api"
TG_URL = "https://api.telegram.org/bot"
TG_TOKEN = os.getenv("TG_TOKEN")
TG_CHATID = os.getenv("TG_CHATID")
BML_USERNAME = os.getenv("BML_USERNAME")
ones = [
"",
"އެއް",
"ދެ",
"ތިން",
"ހަތަރު",
"ފަސް",
"ހަ",
"ހަތް",
"އަށް",

Automating the boring stuff: past papers

While i was studying for a levels. i found out i was spending a lot of time searching for and downloading past papers.since the sites that offered these files were clumsy had not so great ux.finding a single past past paper required you to naviagte to atleast three pages.The final page being an index of all past papers for that particular subject. so like any sane person i went on and created pastpaper bot aka ppbot.

insert image of ppbot

how it works?

i found out that the pastpaper sites are like huge indexes containing files which are named to a standard convenient format.