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
{"schemaVersion":1,"label":"coverage","message":"0%","color":"red"} |
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
{} |
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
<!DOCTYPE NETSCAPE-Bookmark-file-1> | |
<!-- This is an automatically generated file. | |
It will be read and overwritten. | |
DO NOT EDIT! --> | |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | |
<TITLE>Bookmarks</TITLE> | |
<H1>Bookmarks</H1> | |
<DL><p> | |
<DT><H3 ADD_DATE="0" LAST_MODIFIED="1593032001" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3> | |
<DL><p> |
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
#! /usr/bin/env python | |
# | |
# Run this before running this script | |
# pip install CppHeaderParser | |
# Run as python gen.py header.h | |
# Prints C file with printer-funbctions. | |
import json, CppHeaderParser, sys | |
cppHeader = CppHeaderParser.CppHeader(sys.argv[1]) |
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
import luigi | |
import btarget | |
FIELDSEP="--{FIELDSEP}--" | |
class SubTask(luigi.Task): | |
job_task = luigi.Parameter(description="JobTask") | |
@property | |
def job_task_inst(self): |
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
ODE TO PROGRAMMING | |
------------------- | |
Fire in the hall! | |
A bug on the wall! | |
Take it down, patch it around. | |
Two bugs on the wall. | |
Two bugs on the wall. | |
Take one down, patch it around. |
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
import numpy | |
import sys | |
import datetime | |
def hours_per_day(latitude, day_of_year): | |
# From https://www.quora.com/How-can-you-calculate-the-length-of-the-day-on-Earth-at-a-given-latitude-on-a-given-date-of-the-year | |
latitude = numpy.radians(latitude) | |
# compute declination using approx from | |
# https://en.wikipedia.org/wiki/Position_of_the_Sun | |
# XXX check that day_of_year is correcly 0 or 1 referenced |
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
Getting org.scala-sbt sbt 0.13.7 ... | |
:: problems summary :: | |
:::: WARNINGS | |
module not found: org.scala-sbt#sbt;0.13.7 | |
==== local: tried | |
/home/redhog/.ivy2/local/org.scala-sbt/sbt/0.13.7/ivys/ivy.xml |
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
#### Sometimes you only have one of something, so no reason to make instances: | |
class X(object): | |
base = 13 | |
@classmethod | |
def foo(cls, a, b): | |
return cls.base + a + b | |
class Y(X): |
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 Galaxy(object): | |
def __init__(self, size, expansionRate): | |
self.size = size | |
self.time = 0 | |
self.expansionRate = expansionRate | |
def update(self): | |
self.time += 1 | |
self.size += self.expansionRate |
NewerOlder