This file contains hidden or 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 Initializer: | |
""" Initializes this demo | |
""" | |
def __init__(self): | |
""" Create a Messenger and pass this messenger | |
to a new formed Sensor. | |
""" | |
self.messenger = create_messenger() |
This file contains hidden or 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
for gene in genes: | |
# Length of the gene | |
gene_length = gene.length | |
indexes = [] | |
for i in enumerate(gene_length): | |
indexes[i] = '' |
This file contains hidden or 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
set nocompatible | |
set number | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
syntax on | |
filetype plugin indent on | |
" Bundles | |
Bundle 'gmarik/vundle' |
This file contains hidden or 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
### app.py ### | |
app = Flask(__name__) | |
app.register_blueprint(keywords.blueprint) | |
manager = CouchDBManager() | |
manager.setup(app) | |
manager.add_document(Keyword) | |
server = Server() |
This file contains hidden or 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
# irssi-xmpp plugin required | |
# http://cybione.org/~irssi-xmpp/ | |
servers = ( | |
{ | |
address = "chat.facebook.com"; | |
chatnet = "facebook"; | |
password = "<password>"; | |
autoconnect = "true"; | |
}, | |
{ |
This file contains hidden or 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
<line fill="#848484" x1="93.67" y1="98.35" x2="100.9" y2="98.35"/> | |
# Should become | |
# rect.x = line.x2-line.x1; | |
# rect.y = line.y2-line.y1; | |
# width = 7.23 // This is a static | |
# height = 7.23 // This is a static | |
<rect x="4.68" y="2.55" fill="#848484" width="7.23" height="7.23" |
This file contains hidden or 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
""" computer.py """ | |
from internet import visit_website | |
class Computer: | |
def __init__(self): | |
print('Booting') | |
def play_game(self, game): | |
print('You are playing %s.' % game) | |
This file contains hidden or 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
""" adapters.py """ | |
class PinAdapter: | |
def __init__(self, *args): | |
if(os.uname()[4][:3] != 'arm'): | |
return MockPin(*args) | |
else: | |
from ablib import Pin | |
return Pin(*args) | |
class MockPin: |
This file contains hidden or 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
function checkEmpty ($item, $errormessage, &$error){ | |
if (!empty($_POST[$item])){ | |
$name = $_POST[$item]; | |
} | |
else{ | |
$error[] = $errormessage; | |
} | |
} | |
# Initialize empty array. |
This file contains hidden or 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
<?php | |
function ref($var) | |
{ | |
$var[] = 'Item'; | |
} | |
$es = array(); | |
ref($es); | |
ref($es); |
OlderNewer