Skip to content

Instantly share code, notes, and snippets.

View theDreamer911's full-sized avatar

Handhika Yanuar Pratama theDreamer911

View GitHub Profile
var fs = require("fs");
var text = fs.readFileSync("data.txt").toString("utf-8");
var arrayText = text.split("\r\n");
console.log(arrayText);
from webbot import Browser
from pynput.keyboard import Key, Controller
import time
username = input('Username: ')
dictionary = input('Choose Dictionary: ')
file = open(f'{dictionary}.txt', 'r')
bruteforce = []
for line in file:
line = line.strip()
word = "hello world what is up?";
function capitalize(words) {
let word = words.split(" ");
let capital = [];
for (i = 0; i < word.length; i++) {
capital.push(word[i].charAt(0).toUpperCase() + word[i].slice(1));
}
return capital.join(" ");
}
const alpha = Array.from(Array(26)).map((e, i) => i + 65);
const alphabet = alpha.map((x) => String.fromCharCode(x));
console.log(alphabet);
function lifePathNumber(dateOfBirth) {
let arr = dateOfBirth.split("-");
let sum = [];
const reducer = (accumulator, currentValue) => accumulator + currentValue;
for (i = 0; i < arr.length; i++) {
for (j = 0; j <= arr[i].length; j++) {
if (arr[i][j] == undefined) {
arr[i][j] = 0;
} else {
sum.push(parseInt(arr[i][j]));
// 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) => {
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
}
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
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')
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