Skip to content

Instantly share code, notes, and snippets.

View theDreamer911's full-sized avatar

Handhika Yanuar Pratama theDreamer911

View GitHub Profile
const fetch = require("node-fetch");
fetch("https://type.fit/api/quotes")
.then((response) => response.json())
.then((data) => console.log(data))
from pdf2image import convert_from_path
title = input("Pdf files name: ")
def menu():
global quality
print("""
Image format:
1. Very High Resolution - 700 dpi
from pdf2image import convert_from_path
images = convert_from_path('example.pdf', 50)
for image in images:
image.save('output.png')
const getPositions = (s) => [~~s % 3, ~~(s / 3) % 3, ~~(s / 9) % 3];
const getPositions = (s) => [Math.floor(s % 3), Math.floor(s / 3) % 3, Math.floor(s / 9) % 3];
import speedtest
speed = speedtest.Speedtest()
def main():
while True:
print('\a')
choice=int(input("""Check Your Connection Speed
1) Download Speed
2) Upload Speed
3) Exit
import MySQLdb
import csv
import sys
conn = MySQLdb.connect(host="127.0.0.1", user="root", password="", database="Fruit_Shop")
cursor = conn.cursor()
csv_data = csv.reader(open('products.csv'))
header = next(csv_data)
print('Importing the CSV Files')
echo "# nothing" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/theDreamer911/nothing.git
git push -u origin main
function wordMesh(arr){
let r=""
for(let i=0;i<arr.length-1;i++){
let t=(arr[i]+" "+arr[i+1]).match(/(.+) \1/)
if(!t) return "failed to mesh"
r+=t[1]
}
return r
}
// Solution One
smallest = (arr) => {
const sorted = arr.sort((a, b) => a - b);
const lowest = sorted[0];
const highest = sorted[sorted.length - 1];
return `lowest: ${lowest} \nhighest: ${highest}\n`;
};
// Solution Two
smallest = (arr) => {