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 csv | |
>>>> f = open("colors.txt") | |
>>>> ramalan = csv.reader(f, delimiter=',') | |
>>>> colours = [] | |
>>>> for x in ramalan: | |
... colours.append(x) | |
... | |
# Here we get rid of some malformed entries | |
>>>> colours = [c for c in colours if len(c) == 2] |
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
Pale turquoise with Pale blue (AFEEEE) | |
Pale violet-red with Pale red-violet (DB7093) | |
Plum (web)]] with Pale plum]] (DDA0DD) | |
Prune with Persian plum (701C1C) | |
Psychedelic purple with Phlox (DF00FF) | |
Purple (HTML/CSS)]] with Patriarch (800080) | |
Royal yellow with Naples yellow (FADA5E) | |
Sandy taupe with Sand dune (967117) | |
Stil de grain yellow with Naples yellow (FADA5E) | |
Stil de grain yellow with Royal yellow (FADA5E) |
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
;WARNING: this puts your entire tree in memory, so if you're using zippers | |
;to avoid that, do not use this. | |
;Also, potentially terrible clojure. I only learned this a few days ago | |
;couldn't find any way to do this online except for a single | |
;stackoverflow that didn't actually use zippers | |
(require '[clojure.zip :as zip]) | |
(defn zip-down [loc] | |
"Zips to the bottom of the tree from this loc" | |
(loop [p loc] | |
(if (zip/branch? p) |
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
java.lang.OutOfMemoryError: Requested array size exceeds VM limit | |
at java.util.Arrays.copyOf (Arrays.java:2367) | |
java.lang.AbstractStringBuilder.expandCapacity (AbstractStringBuilder.java:130) | |
java.lang.AbstractStringBuilder.ensureCapacityInternal (AbstractStringBuilder.java:114) | |
java.lang.AbstractStringBuilder.append (AbstractStringBuilder.java:587) | |
java.lang.StringBuffer.append (StringBuffer.java:332) | |
java.io.StringWriter.write (StringWriter.java:77) | |
java.io.StringWriter.append (StringWriter.java:202) | |
java.io.StringWriter.append (StringWriter.java:41) | |
clojure.core/fn (core_print.clj:181) |
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/env python | |
#author 100004004 | |
#Huffman encoding | |
import random | |
import math | |
#Constant for the end of transmission symbol | |
EOT = chr(4) | |
def get_source_weights(): |
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, pkgs, ... }: | |
# Enable the X11 windowing system. | |
{ | |
services.xserver = { | |
enable = true; | |
layout = "gb"; | |
xkbVariant = "mac"; | |
xkbOptions = "caps:escape,compose:escape"; |
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
Xft.dpi: 220 | |
Xft.autohint: 0 | |
Xft.rgba: rgb | |
Xft.antialias: 1 | |
Xft.lcdfilter: lcddefault | |
Xft.hintstyle: hintfull | |
Xft.hinting: 1 |
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, pkgs, ... }: | |
{ | |
# Use the gummiboot efi boot loader. | |
# n.b. no GRUB settings like everyone tells you to do | |
boot.loader.gummiboot.enable = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
networking.enableB43Firmware = true; |
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
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
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
background yes | |
out_to_console yes | |
out_to_x no | |
# Update interval in seconds | |
update_interval 1 | |
user_spacer left | |
pad_percents 2 | |
lua_load ~/.xmonad/.conky_lua_scripts.lua | |
TEXT |
OlderNewer