Skip to content

Instantly share code, notes, and snippets.

Avatar
😑
My demo is your production

Sochima Biereagu kodejuice

😑
My demo is your production
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am kodejuice on github.
  • I am kodejuice (https://keybase.io/kodejuice) on keybase.
  • I have a public key whose fingerprint is 4EF1 0FDD F84F 3BCC 8E0C 1888 F5FB A1CC C744 DCF9

To claim this, I am signing this object:

@kodejuice
kodejuice / movie info script.py.md
Last active May 19, 2020
Python script for fetching information of movies from your local directory, sorting them from best to worse using a Bayesian Estimate formular.
View movie info script.py.md

movie info fetch script

A python script which scans your local directory for movies and fetches the IMDb information of those movies,

storing that info in a json file where they are sorted from best to worse using a bayesian estimate formular based on user rating and vote count.

if you have tons of unwatched movies and you're not sure which to watch first then you could use this script to decide the movie to watch first.

Installing dependencies

@kodejuice
kodejuice / perf_test.cc
Created Jul 30, 2018
A minimal C++ code perfomance tester
View perf_test.cc
/**
A minimal code perfomance tester for C++ that aids in measuring the execution speed of parts of your program,
it reports the (operatations per second) as opposed to the traditional (time taken to run) approach,
the programs repeatedly runs the given function for a couple of seconds,
and returns the number of operations it could perform in a single second (cycles per second).
See Example/Sample usage at bottom of code
@kodejuice
kodejuice / brainfuck.c
Last active Jul 30, 2018
A simple brainfuck interpreter written in C
View brainfuck.c
char * brain_fuck(char * code, char * input){
const int BUFSIZE = 30000;
int * ptr = (int *) malloc(BUFSIZE * sizeof(int)),
i_sz = strlen(input), c_sz = strlen(code),
idx = -1, j = 0, o = 0;
char cmd, * output = (char *) malloc(BUFSIZE);
while (idx++ < c_sz){
cmd = code[idx];
@kodejuice
kodejuice / javascript_object_iteration.js
Created Mar 2, 2017
Iterate over JavaScript objects like its a Map, with the for...of statement
View javascript_object_iteration.js
Object.prototype[Symbol.iterator] = function* (){
var c = 0;
while (c < Object.values(this).length) {
yield [Object.keys(this)[c], Object.values(this)[c++]]
}
}
// usage