Skip to content

Instantly share code, notes, and snippets.

View rvente's full-sized avatar
🚩
Keeping it ℝ

Blake Vente rvente

🚩
Keeping it ℝ
View GitHub Profile
@rvente
rvente / discord_bot.py
Last active May 27, 2023 05:12
Context: this is a weekend-ware demonstration. This code isn't running in prod anywhere.
import discord
import os
from dotenv import load_dotenv
from zmq_client import ZMQClient
import zmq
load_dotenv()
DISCORD_AUTH_KEY = os.getenv('DISCORD_AUTH_KEY', "")
import itertools
def decode_multi_tap(multitap_encoded: str):
if not multitap_encoded.replace(" ", "").isdecimal():
return ""
if "1" in multitap_encoded:
return ""
t9_map = {
value = None
running_sum = 0
num_positives = 0
num_negatives = 0
count = 0
while value != 0:
value = int(input("Enter an integer, the input ends if it is 0: "))
prompt = "Enter a hex digit: "
reject_too_long = "Only one number must be input."
reject_invalid_input = "Invalid input"
hex_candidate = input(prompt).upper()
if len(hex_candidate) != 1:
print(reject_too_long)
elif not hex_candidate.isalnum():
print(reject_invalid_input)
elif not "A" <= hex_candidate <= "F":
match number:
case 0:
print("Nothing")
case 1:
print("Just one")
case 2:
print("A couple")
case -1:
print("One less than nothing")
case 1-1j:
# Solution A
for i in range(100):
rem3 = (i % 3 == 0)
rem5 = (i % 5 == 0)
while not rem3 and not rem5:
print(i)
break
@rvente
rvente / output.txt
Last active January 11, 2020 02:44
Solves math puzzle.
#1 → 1
#2 → 11
#3 → 20
#4 → 102
#5 → 111
#6 → 120
#7 → 201
#8 → 210
#9 → 300
#10 → 1003
@rvente
rvente / check_link.py
Created January 1, 2020 01:34 — forked from hackerdem/check_link.py
A simple python script to check broken links of a wesite
@rvente
rvente / googletechinterviewnotes.md
Last active August 23, 2019 20:56
These are notes that I typed up when google was presenting on effective strategies for the technical interview.
title date author
Google Technical Interview Prep Workshop
\today{}
Ralph Vente

Interviewers

  • Brendan
  • Raymond
@rvente
rvente / ttp-assignment2.js
Last active May 30, 2019 02:39
Assignment 2 TTP Bootcamp Summer 2019
/*
Ralph Vente
2019 05 29
Assignment #2
*/
const square = (x) => x*x;
const greaterThanOne = (x) => x > 1;
const sum = (x,y) => x+y;