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
[Desktop Entry] | |
Name=Python 3 | |
Comment=Python | |
Exec=/usr/bin/python3 | |
Terminal=true | |
MultipleArgs=false | |
Type=Application | |
Categories=Application;Development; | |
StartupNotify=true |
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
#Original Code Martin Bateman 2013 | |
#Modified by Simon Walters | |
#GPLv2 applies | |
#PC End | |
#V0.2 04Aug13 | |
import sys | |
import time | |
import socket | |
import Tkinter as Tk |
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
/* | |
* /tmp/child.js | |
*/ | |
var run = function () { | |
console.log('awh yeah'); | |
return 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
#I'm looking for a terser way of converting a 2D list into a list of tuples and values - | |
#perhaps using comprehensions or zip/product/enumerate though without sacrificing readability. | |
#. For example: | |
[ | |
[ True, True ], | |
[ False, False] | |
] | |
#Becomes: | |
[((0, 0), True), ((0, 1), True), ((1, 0), False), ((1, 1), False) |
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
class Robot(): | |
def __init__(self): | |
self._heading = 0 | |
@property | |
def heading(self): | |
print("Getting " + str(self._heading)) | |
return self._heading | |
@heading.setter |
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
from itertools import count | |
def is_palindrome(num): | |
return #Hmm, what could go here | |
total = 0 | |
counted = 0 | |
for i in count(): | |
if counted >= 2000: | |
break |
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
extern crate num; | |
use num::bigint::BigUint; | |
use std::collections::treemap::TreeSet; | |
fn main() { | |
let primes = TreeSet<BigUint>::new(); | |
} |
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
Scala on Stilts | |
Python on Plane | |
Javascript on Jetski | |
Haskell on Hot Air Balloon | |
OCaml on Camel |
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
var init, play, result, counter; | |
counter = 0; | |
init = result = function () {}; | |
play = function () { | |
if (counter++ > 44) { | |
return 'dynamite'; | |
} else { |
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
Jacks-MacBook-Pro:juju jack$ juju charm create neo4j-charm | |
INFO: Using default charm template (python). To select a different template, use the -t option. | |
INFO: Generating charm for neo4j-charm in ./neo4j-charm | |
INFO: No neo4j-charm in apt cache; creating an empty charm instead. | |
Symlink all hooks to one python source file? [yN] n | |
INFO:root:Loading charm helper config from charm-helpers.yaml. | |
INFO:root:Checking out lp:charm-helpers to /var/folders/sw/6tqc56714c92ccn44jssxf040000gn/T/tmpG05m3W/charm-helpers. | |
ERROR:root:Could not sync: [Errno 2] No such file or directory | |
Traceback (most recent call last): | |
File "./scripts/charm_helpers_sync.py", line 220, in <module> |
OlderNewer