One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
/* | |
* PREFACE | |
*/ | |
const log = (...a) => console.log("\t", ...a); | |
class Yet { | |
constructor(s) { | |
this.s = s; | |
} |
#include <assert.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct { | |
void *ptr; | |
size_t len; | |
size_t cap; | |
} slice; |
docker rmi $(docker images | grep none | awk '{ print $3 }' | xargs) |
""" | |
Hangman Game | |
Make sure to have a lengthy words.txt file saved in the same folder. | |
You can get one here: | |
https://raw.githubusercontent.com/Tom25/Hangman/master/wordlist.txt | |
If you compose it yourself, make all words lowercase and each on a separate line | |
or otherwise separated by whitespace characters (parser relies on that). |
class Stack: | |
def __init__(self): | |
self.mem = [] | |
def __len__(self): | |
return len(self.mem) | |
def __str__(self): | |
return str(self.mem) |
from typing import List | |
from random import randint | |
def shuffle(arr: List[int]) -> List[int]: | |
out: List[int] = [] | |
while len(arr) > 0: | |
idx: int = randint( 0, len(arr) - 1 ) | |
out.append( arr.pop(idx) ) |
#include <stdio.h> | |
#include <stdlib.h> | |
#ifdef _WIN32 | |
#include <Windows.h> | |
#define CLEAR "cls" | |
#else | |
#include <unistd.h> | |
#define CLEAR "clear" | |
#endif |
#!/usr/bin/python3 | |
""" | |
********** OVERVIEW ************************************************************ | |
This is a library + utility that allows for easier file deletion and Trash | |
management. Read this comment to learn how to use it properly! | |
def bin_format(n, length): | |
b = bin(n)[2:] | |
if len(b) < length: | |
b = '0' * ( length - len(b) ) + b | |
return b | |
def powerset(s): | |
s = list(s) | |
out = list() | |
for n in range( 0, 2 ** len(s) ): |