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
#! /usr/bin/python3 | |
import sys | |
import os | |
import shutil | |
from lxml.etree import Element, tostring | |
from lxml import etree | |
def gen_project_xml_tree(name): | |
assert len(name) > 0, "no project name given" |
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
Config { font = "xft:Fira Mono:pixelsize=13" | |
, borderColor = "black" | |
, border = TopB | |
, bgColor = "black" | |
, fgColor = "grey" | |
, position = Top | |
, lowerOnStart = True | |
, pickBroadest = False | |
, persistent = False | |
, hideOnStart = 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
import System.Exit | |
import Data.Monoid | |
import XMonad | |
import XMonad.Layout.Spacing | |
import XMonad.Hooks.SetWMName | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.Run (safeSpawnProg) | |
import XMonad.Hooks.EwmhDesktops (ewmh) | |
import qualified XMonad.StackSet as W |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <dirent.h> | |
#include <string.h> | |
#define error(msg) printf("%s\n", msg); exit(1); | |
void showdir(char *, char *); |
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 flask import Flask | |
import os | |
app = Flask(__name__) | |
seen = 0 | |
@app.route('/') | |
def hello(): | |
global seen |
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 hypothesis | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "c:\Python34\lib\site-packages\hypothesis\__init__.py", line 31, in <module> | |
from hypothesis.core import given, assume, find, example | |
File "c:\Python34\lib\site-packages\hypothesis\core.py", line 608, in <module> | |
load_entry_points() | |
File "c:\Python34\lib\site-packages\hypothesis\extra\__init__.py", line 30, in load_entry_points | |
package = entry_point.load() # pragma: no cover | |
File "c:\Python34\lib\site-packages\pkg_resources\__init__.py", line 2309, in load |
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 tutum/nginx | |
RUN rm /etc/nginx/sites-enabled/default | |
ADD sites-enabled/ /etc/nginx/sites-enabled | |
ADD static/ /www/static | |
# the directory structure of the nginx component: | |
# ./nginx | |
# ├── Dockerfile | |
# ├── sites-enabled | |
# │ └── app |
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
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/")) | |
(package-initialize) ;; You might already have this line | |
(require 'multiple-cursors) |
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 random import shuffle | |
from math import log2, floor | |
def main(): | |
A = list(range(15)) | |
B = list(range(10)) | |
print("Before:\t A =", A) | |
print("\t B =", B) | |
N = len(A) | |
P = 5 # Number of procs |
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
int count = 1; | |
void setup() { | |
size(500, 500); | |
} | |
void keyPressed() { | |
if (keyCode == UP) { | |
count += 1; | |
} else if (keyCode == DOWN) { |
OlderNewer