Skip to content

Instantly share code, notes, and snippets.

View FrancoMuniz's full-sized avatar

Franco Muñiz FrancoMuniz

View GitHub Profile
import math
def main():
while True:
print(isPrime(int(input('Enter a number to check if it is prime: '))))
def isPrime(n):
ans = [num for num in range(2,int(math.sqrt(n)+1)) if n % num == 0]
return not bool(ans)
@FrancoMuniz
FrancoMuniz / dolarblue.py
Created September 14, 2019 22:58
Dolar Blue - A real time currency bot that updates the price on a Telegram Channel
import sys
from urllib.request import urlopen
import time
import string
import telebot
import json
import pymongo
import re
uri = 'insertyourmongodburlhere'
@FrancoMuniz
FrancoMuniz / hangman.py
Created January 18, 2020 05:26
Hangman Game
import random
def main():
wordList = ["field","shocking","ordinary","tiresome","reminiscent","girls","bulb","willing","curved","brave","poor","comfortable","cloistered","quiver","rescue","sheep","obnoxious","hook","early","guttural","comfortable","quack","suspect","shaggy","clumsy","good","development","worry","silver","hulking","meat","third","sun","flippant","pinch","manage","rod","ratty","base","omniscient","picayune","marked","bow","smelly","belong","envious","crush","bikes","attractive","fair","hurt","belligerent","cakes","hop","apparel","wipe","permit","appreciate","dam","walk","mute"]
selectedWord = wordList[random.randrange(len(wordList)-1)]
print('New Game. Start guessing')
print("".join(selectedWord) + "\n")
@FrancoMuniz
FrancoMuniz / search_number_binary_tree.py
Created January 18, 2020 06:12
Search if number exists on Binary Tree
import collections
Node = collections.namedtuple('Node', ['left', 'right', 'value'])
def contains(currentNode, value):
if value == currentNode.value:
return(True)
else:
if not currentNode.right and value > currentNode.value:
return(False)
@FrancoMuniz
FrancoMuniz / script.js
Last active March 22, 2022 18:36
Convert EML to HTML
const fs = require('fs');
const simpleParser = require('mailparser').simpleParser; //Remember to do npm install mailparser
const myFile = "myEmail.eml" // Replace this with your .eml file
var eml = fs.readFileSync(myFile, "utf-8");
simpleParser(eml).then(parsed => {
@FrancoMuniz
FrancoMuniz / README.md
Created May 13, 2021 07:58 — forked from Sunlighter/README.md
Installing Python 3.7 in Amazon Linux 2

Installing Python 3.7 in Amazon Linux 2

This is a way to build Python 3.7 from source and temporarily install it in Amazon Linux 2 without overwriting the system Python and without interfering with the Python in amazon-linux-extras.

At the time of this writing, Amazon Linux 2 offers Python 2.7.14 and (through the extras) Python 3.6.2, but Python 3.7.0 was just released.

  1. Start Amazon Linux 2 and sign in. (I recommend a c5.large instance.)