This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require("node-fetch"); | |
fetch("https://type.fit/api/quotes") | |
.then((response) => response.json()) | |
.then((data) => console.log(data)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pdf2image import convert_from_path | |
title = input("Pdf files name: ") | |
def menu(): | |
global quality | |
print(""" | |
Image format: | |
1. Very High Resolution - 700 dpi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pdf2image import convert_from_path | |
images = convert_from_path('example.pdf', 50) | |
for image in images: | |
image.save('output.png') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getPositions = (s) => [~~s % 3, ~~(s / 3) % 3, ~~(s / 9) % 3]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getPositions = (s) => [Math.floor(s % 3), Math.floor(s / 3) % 3, Math.floor(s / 9) % 3]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) => { |