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
## GNU Screen Configuration | |
## Justine Tunney <jtunney@gmail.com> | |
# GNU Screen + this config allow you to: | |
# | |
# - Have tabs inside your terminal. | |
# | |
# - Have your terminal sessions persist, even if you close your ssh connection. | |
# This is especially great if you hop between multiple computers or simply | |
# don't want to lose what you're working on. |
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
# problem 1 | |
# add all natural numbers below one thousand that are multiples of 3 or 5. | |
print sum(n for n in xrange(1, 1000) if n % 3 == 0 or n % 5 == 0) | |
# problem 2 | |
# sum of even value fibs below four million | |
def fib(): | |
yield 1 | |
yield 1 | |
a, b = 1, 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
#!/usr/bin/env python | |
# | |
# tl;dr: compresslevel=1 is 4x faster than the default and nearly as good | |
# | |
# https://docs.python.org/2/library/gzip.html | |
# | |
# http11 jart@compy://third_party/tensorflow/tensorboard$ python ~/doodle.py | |
# 1 5% 151ms | |
# 2 4% 149ms | |
# 3 4% 143ms |
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
# NPM Dependency Calculator | |
# | |
# Author: Justine Tunney <jart@google.com> | |
# Copyright 2016 Google Inc. All Rights Reserved. | |
# Licensed under the Apache 2.0 license | |
# Last Updated on 2016-09-22 | |
# | |
# This is a .bashrc addition that lets you inspect the transitive closure of | |
# dependencies for an NPM package. It does not require NPM or node.js to be | |
# installed on your system. It takes into consideration the fact that NPM |
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
licenses(["restricted"]) # GPLv3 | |
exports_files(["LICENSE"]) | |
cc_binary( | |
name = "swig", | |
srcs = [ | |
"Source/CParse/cparse.h", | |
"Source/CParse/cscanner.c", | |
"Source/CParse/parser.c", |
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
# http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/nasm-2.12.02.tar.bz2 | |
licenses(["notice"]) # As of v2.07, nasm is licensed under the 2-clause BSD license. | |
cc_binary( | |
name = "nasm", | |
srcs = [ | |
"assemble.c", | |
"crc64.c", | |
"directiv.c", |
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
/** | |
* @fileoverview Bazel external repository naming algorithm for Maven. | |
*/ | |
var CLEANSE_CHARS_ = new RegExp('[^_0-9A-Za-z]', 'g'); | |
/** | |
* Turns Maven group and artifact into Bazel repository name. | |
* | |
* <p>This algorithm works by turning illegal characters into underscores and |
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
# Copyright 2016 The Closure Rules Authors. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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
/**//* | |
*//** This is perfectly ordinary C | |
**//* | |
*//** cc -std=c99 lol.c | |
**//* ./a.out justine 31 | |
*//**/ | |
#include <stdio.h> | |
#include <stdlib.h> |
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
# pip install yappi | |
# tensorboard-profile-wall-time --logdir=/google/data/ro/users/ja/jart/tensorboard/userlogdirs/1 | |
tensorboard-profile-wall-time() { | |
-tensorboard-profile wall "$@" | |
} | |
tensorboard-profile-cpu-time() { | |
-tensorboard-profile cpu "$@" | |
} |