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
(undecided) |
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
Index: flame2/api/Makefile.am | |
=================================================================== | |
--- flame2/api/Makefile.am (revision 977) | |
+++ flame2/api/Makefile.am (working copy) | |
@@ -15,7 +15,9 @@ | |
# Note: flame2.h is installed by the master Makefile.am | |
-module_sources = | |
+# compile dummy file so "ar" on OSX does not choke on empty archive |
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
# Description: Alternative Fortran Lexer for pygments that | |
# attempts to address other Fortran standards (not just | |
# Fortran 90 as provided by the official lexer). | |
# | |
# Author: Shawn Chin | |
# Homepage: https://gist.github.com/shawnchin/5031105 | |
# | |
import re |
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
""" | |
Buildbot BuildStep that runs and parses the output of testcode2. | |
Copyright (c) 2013 Shawn Chin | |
This sofware is released under the BSD 3-Clause License | |
""" | |
import re | |
from itertools import chain | |
from collections import defaultdict | |
from buildbot.steps.shell import ShellCommand |
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 zope.interface import implements | |
from twisted.internet.defer import succeed, fail | |
from twisted.cred.error import UnauthorizedLogin | |
from twisted.cred.credentials import IUsernamePassword | |
from twisted.cred.checkers import ICredentialsChecker | |
from twisted.cred.portal import IRealm, Portal | |
from twisted.web.resource import IResource | |
from twisted.web.guard import BasicCredentialFactory, HTTPAuthSessionWrapper | |
from twisted.web.static import File |
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
""" | |
Wrapper client for the blink(1)control REST API. | |
Example Usage: | |
import blinky | |
b = Blinky() | |
b.on() # Let there be (white) light | |
# Have the first LED fade to #336699 over 10 seconds |
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
<html> | |
<head> | |
<meta http-equiv="refresh" content="60" /> | |
<!--link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" --> | |
<!-- link href="picwall.css" rel="stylesheet" /--> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/masonry/3.3.1/masonry.pkgd.min.js"></script> | |
<!--script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script--> | |
<!--script src="picwall.js"></script--> |
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
colours = [(255.0, 245.0, 250.0), | |
(255.0, 244.0, 253.0), | |
(253.0, 244.0, 255.0), | |
(249.0, 244.0, 255.0), | |
(244.0, 243.0, 255.0), | |
(243.0, 245.0, 255.0), | |
(242.0, 249.0, 255.0), | |
(242.0, 253.0, 254.0), | |
(242.0, 254.0, 251.0), | |
(241.0, 254.0, 246.0), |
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
# https://www.hackerrank.com/challenges/coin-change/problem | |
def cc_dp(target, coins): | |
current = [0] * (target + 1) | |
current[0] = 1 | |
prev = current[:] | |
for c in coins: | |
for t in xrange(target + 1): |