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 os | |
while True: os.fork() |
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
cd ~/src/sage-git/ | |
while true; do | |
git gc --aggressive | |
done |
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
[1] fs-boone@zhenghe ~/classes/cs321/hw1 $ cat print-ast.py | |
#!/usr/bin/env python | |
import sys, ast | |
print ast.dump(ast.parse(sys.stdin.read())) | |
[1] fs-boone@zhenghe ~/classes/cs321/hw1 $ cat test1 | |
if x == 1: | |
print 1 | |
elif x == 2: | |
print 3 | |
else: |
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
module Colour where | |
data Colour = Colour {redPart, greenPart, bluePart :: Double} deriving (Eq, Show) | |
cmap :: (Double -> Double) -> Colour -> Colour | |
cmap f (Colour r g b) = Colour (f r) (f g) (f b) | |
czip :: (Double -> Double -> Double) -> Colour -> Colour -> Colour | |
czip f (Colour r1 g1 b1) (Colour r2 g2 b2) = Colour (f r1 r2) (f g1 g2) (f b1 b2) | |
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
-- | baserep base num digits = (mantissa, exponent) | |
baserep :: (RealFrac a) => a -> a -> Int -> ([Int], Int) | |
baserep _ _ 0 = ([], 0) | |
baserep base num digits | |
| num < 0 = undefined | |
| num >= base = let (x, y) = baserep base (num / base) digits in (x, y+1) | |
| otherwise = let d = fromIntegral (floor num) | |
(x, y) = baserep base ((num - fromIntegral d) * base) (digits - 1) | |
in (d : x, y) |
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
### Do the version bump in the repository | |
cd ~/src/sagenb/ | |
git remote update # sync with github | |
git checkout master | |
git pull --ff-only # this branch is set to track upstream/master | |
# edit ./Changes and ./setup.py | |
git status | |
git commit -am 'Version bump to 0.10.7' | |
# before actually finalizing this, need to test |
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
#!/bin/bash | |
######################################################################## | |
# A small script to help upload cover art sets to CAA, for example | |
# from VGMDB. Put this script in a staging directory, which will | |
# contain a subdirectory for each release you will be adding cover | |
# art sets for. Then copy or download all the cover art into the | |
# staging directory and run this script with [a URL ending in] a | |
# release MBID as an argument. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
checking for gfind... no | |
checking for find... /usr/bin/find | |
checking for sort... /usr/bin/sort | |
checking for ghc... /opt/ghc/7.8.3/bin/ghc | |
checking version of ghc... 7.8.3 | |
checking build system type... x86_64-unknown-linux-gnu | |
checking host system type... x86_64-unknown-linux-gnu | |
checking target system type... x86_64-unknown-linux-gnu | |
Build platform inferred as: x86_64-unknown-linux | |
Host platform inferred as: x86_64-unknown-linux |
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
#!/bin/bash | |
set -ex | |
PACKAGE="$1" | |
DEPENDENCY="$2" | |
TMPDIR="$(mktemp -d)" | |
pushd "$TMPDIR" | |
cabal get --pristine "$PACKAGE" |
OlderNewer