Skip to content

Instantly share code, notes, and snippets.

View ezntek's full-sized avatar
😋
ib diploma program

ezntek ezntek

😋
ib diploma program
View GitHub Profile
@ezntek
ezntek / excercises.py
Created May 30, 2024 07:14
new excercise
# Authored by Eason Qin
#
# This source code form is dually put into the Public Domain and the Unlicense,
# whichever is more permissive.
import sys
def ex_20():
name = input("what's your name? ")
print(f"the length of your name is: {len(name)}")
# Authored by Eason Qin
#
# This source code form is dually put in the Public Domain
# and the Unlicense, whichever is more permissive.
import sys
def excercise_one():
name = input("what's your name: ")
print(f"hi, {name}!")
@ezntek
ezntek / cursed.rs
Created September 2, 2023 13:38
cursed rust one liner that removes vowels from a string
fn main() { let mut s = String::new(); let stdin = std::io::stdin(); stdin.read_line(&mut s).unwrap(); println!( "{}", s.chars().into_iter().filter(|ch| !['a', 'e', 'i', 'o', 'u'].contains(ch)).collect::<String>()); }
/* De-obfuscated:
fn main() {
let mut s = String::new();
let stdin = std::io::stdin();
stdin.read_line(&mut s).unwrap();
println!(
"{}",
s.chars()
@ezntek
ezntek / devoweler.py
Created September 2, 2023 13:36
Cursed python one-liner to remove vowels from a string
print(' '.join(list(filter((lambda l: l != ''), [''.join(list(filter((lambda v: v != ''), [chr if chr.lower() not in {'a', 'e', 'i', 'o', 'u'} else "" for chr in word])))for word in input().split(" ")]))))
# de-obfuscated:
"""
print(
' '.join(
list(filter((lambda l: l != ''),
[''.join(
list(filter((lambda v: v != ''),
[chr if chr.lower() not in {'a', 'e', 'i', 'o', 'u'} else ""
@ezntek
ezntek / haha.json
Created July 18, 2023 05:41
Rough AST
{
"fib": {
"type": "module",
"content": [
{
"type": "def_stmt",
"content": {
"name": "fib",
"args": [
{