I hereby claim:
- I am jaapz on github.
- I am jaapz (https://keybase.io/jaapz) on keybase.
- I have a public key ASDhauBBIob-8oo_8Ngge8gvF2lTyXaGQhQUyspuRpcQ4go
To claim this, I am signing this object:
""" | |
User interface class, responsible for console input and output | |
""" | |
class Ui: | |
def __init__(self): | |
pass | |
class Ui: | |
""" | |
User interface class, responsible for console input and output |
import __builtin__ | |
def test_raw_input(monkeypatch): | |
""" Get user input without actually having a user type letters using monkeypatch """ | |
def mock_raw_input(*args, **kwargs): | |
""" Act like someone just typed 'yolo'. """ | |
return 'yolo'; | |
monkeypatch.setattr(__builtin__, 'raw_input', mock_raw_input) | |
$(function() { | |
"use strict"; | |
// Model. Als toggle gecalled word zal done geinvert worden. Ook word de titel aangepast zodat de view opnieuw rendert. | |
var Todo = Backbone.Model.extend({ | |
defaults: { | |
title: "Something to remember", | |
done: false | |
}, |
#!/usr/bin/env python | |
# Replace the old /usr/bin/cb-exit with this one. | |
import pygtk | |
pygtk.require('2.0') | |
import gtk | |
import os | |
import getpass |
#!/bin/sh | |
# | |
# ~/.xinitrc | |
# | |
# Executed by startx (run your window manager from here) | |
if [ -d /etc/X11/xinit/xinitrc.d ]; then | |
for f in /etc/X11/xinit/xinitrc.d/*; do | |
[ -x "$f" ] && . "$f" | |
done |
from operator import itemgetter | |
mylist = [ | |
["Some", "Data", "30.0", 12.10], | |
["Foo", "Bar", "29.5", 90.00], | |
["Fizz", "Buzz", "29", 13.12] | |
] | |
# Sorting using a field that already has a nice sortable type (for example, a float). | |
my_sorted_list_4 = sorted(mylist, key=itemgetter(3)) |
struct Record { | |
name: String, | |
message: String, | |
} | |
// Let's say `record` is an instance of Record, with strings in name and message. | |
// This will work correctly: | |
let message = |
I hereby claim:
To claim this, I am signing this object:
// simple destructuring without default | |
let obj = {bananaphone: 'hello?'}; | |
let {bananaphone} = obj; | |
console.log(bananaphone); // hello? | |
// destructuring with default | |
let {missingkey = 'hey?'} = obj; | |
console.log(missingkey); // hey? |