This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!!!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Joel likes coding" | |
echo "I just edited" | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+++[>++++++[>+++>++++>+++++>++++++>++++++>+++++++<<<<<<-]<-]>> | |
++++++.>>>----.>++++++++.<+++++.-.<<<++. | |
<<++++++[>++<-]>+.----.---------< | |
>>--.>>>----.---.----.+++.<<<++. | |
<<++++++[>++<-]>+.----..---------< | |
>>--.>>>>.<+++++.>.<+++.-------.<<<++. | |
++++.>>>>--.<----.++++++++.+++++.<<--.<<< | |
+++++[>+++++++++<-]>..>>>>---.<<<------.<++. | |
>>>>>++.<--.>.<+++.-------.<<<++. | |
<[-]<++++++[>++<-]>+.----.>--.<[<+++++>-]<++. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>> | |
.>-------.+++++++++++++++..+++++++++.>>. | |
<<<-------.>---------.++.---------.+++.>>. | |
<<<+++++.>+++..---.+++++++.>>. | |
<<<--.>>+++++++++.<++++++.>>+.>+++++. | |
<<+++++++++.<-----.>---------.+++..+.++++. | |
<<----.>>--.++++++. | |
<<<++++[>>>---<<<-]>>>.++++++++.+++. | |
<<<++++[>>>>+++<<<<-]>>>>+. | |
<---------.<-----.--. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find day of the week in python 3 | |
from enum import Enum | |
class DayOfWeek(Enum): | |
Sunday = 0 | |
Monday = 1 | |
Tuesday = 2 | |
Wednesday = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# __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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BaseBackground = ig.Class.extend({ | |
init: function () { | |
this.map = new MapTiles(); | |
}, | |
draw: function () { | |
if (this.map.tilesLoaded()){ | |
this.drawMap(); | |
} | |
}, | |
drawMap: function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 PRINT "fart" | |
20 GOTO 10 |
NewerOlder