Skip to content

Instantly share code, notes, and snippets.

View taddeimania's full-sized avatar
☄️
Hi!

Joel Taddei taddeimania

☄️
Hi!
View GitHub Profile
@taddeimania
taddeimania / pickle_rick.py
Created August 14, 2017 01:39
I'M PYTHON PICKLE RICK!!!!
import pickle
class Rick:
def __str__(self):
return "i'm pickle rick!!!!"
pickle_rick = pickle.dumps(Rick())
regular_rick = pickle.loads(pickle_rick)
print(regular_rick)
# >>> i'm pickle rick!!!!
@taddeimania
taddeimania / chaos.py
Last active January 7, 2022 22:49
Proposal for Maybe type in python (True OR False)
import ast
import random
class MaybeType(type):
def __repr__(cls):
return str(bool(random.randint(0, 1)))
def __nonzero__(cls):
return ast.literal_eval(repr(cls))
echo "Joel likes coding"
echo "I just edited"
exit
<script type="application/javascript">
$( document ).ready(function() {
var callAgain = function(stuff){
// Do work here
// Why not make an ajax call and replace an element on the page?
// Delay another call in 10 seconds
setTimeout(function(){
callAgain(stuff);
@taddeimania
taddeimania / hello_html.bf
Created April 2, 2016 02:07
Hello World in BF That outputs a webpage.
+++[>++++++[>+++>++++>+++++>++++++>++++++>+++++++<<<<<<-]<-]>>
++++++.>>>----.>++++++++.<+++++.-.<<<++.
<<++++++[>++<-]>+.----.---------<
>>--.>>>----.---.----.+++.<<<++.
<<++++++[>++<-]>+.----..---------<
>>--.>>>>.<+++++.>.<+++.-------.<<<++.
++++.>>>>--.<----.++++++++.+++++.<<--.<<<
+++++[>+++++++++<-]>..>>>>---.<<<------.<++.
>>>>>++.<--.>.<+++.-------.<<<++.
<[-]<++++++[>++<-]>+.----.>--.<[<+++++>-]<++.
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>
.>-------.+++++++++++++++..+++++++++.>>.
<<<-------.>---------.++.---------.+++.>>.
<<<+++++.>+++..---.+++++++.>>.
<<<--.>>+++++++++.<++++++.>>+.>+++++.
<<+++++++++.<-----.>---------.+++..+.++++.
<<----.>>--.++++++.
<<<++++[>>>---<<<-]>>>.++++++++.+++.
<<<++++[>>>>+++<<<<-]>>>>+.
<---------.<-----.--.
# Find day of the week in python 3
from enum import Enum
class DayOfWeek(Enum):
Sunday = 0
Monday = 1
Tuesday = 2
Wednesday = 3
@taddeimania
taddeimania / mat_mul_fun.py
Last active December 22, 2015 02:25
__matmul__ abuse for the greater good
# __matmul__ abuse for the greater good
"""One thing that caught my eye when learning more about the new Matrix / Matrix
multiplication operator was that it itself was not batteries included.
Having the wind taken out of my sails, it dawned on me I was looking
at the missing implentation the wrong way. What we have on our hands is an
operator with an ambiguously open ended realm of opportunities.
@taddeimania
taddeimania / grassbackground.js
Last active December 14, 2015 16:19
More efficient way to handle map generation
BaseBackground = ig.Class.extend({
init: function () {
this.map = new MapTiles();
},
draw: function () {
if (this.map.tilesLoaded()){
this.drawMap();
}
},
drawMap: function () {
@taddeimania
taddeimania / butts.bs
Last active November 24, 2015 03:48
heh
10 PRINT "fart"
20 GOTO 10