Skip to content

Instantly share code, notes, and snippets.

James Gill jagill

Block or report user

Report or block jagill

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View console.log
0 $ python train.py
WARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.
WARN: You are calling 'step()' even though this environment has already returned done = True. You should always call 'reset()' once you receive 'done = True' -- any further steps are undefined behavior.
Exception ignored in: <function Viewer.__del__ at 0x119f546a8>
Traceback (most recent call last):
File "/Users/jagill/.envs/gym/lib/python3.7/site-packages/gym/envs/classic_control/rendering.py", line 143, in __del__
File "/Users/jagill/.envs/gym/lib/python3.7/site-packages/gym/envs/classic_control/rendering.py", line 62, in close
File "/Users/jagill/.envs/gym/lib/python3.7/site-packages/pyglet/window/cocoa/__init__.py", line 281, in close
File "/Users/jagill/.envs/gym/lib/python3.7/site-packages/pyglet/window/__init__.py", line 770, in close
ImportError: sys.meta_path is None, Python is likely shutting down
View editor-0df1847531833806dd71e863147724f10f937e15
{"mode":"editor","version":1,"windowDimensions":{"x":1975,"y":-439,"width":1998,"height":1112,"maximized":false},"grammars":{"deserializer":"GrammarRegistry","grammarOverridesByPath":{}},"project":{"paths":["/Users/jag/euler"],"buffers":[{"text":"# coding: utf8\n\n'''\nTriangle, pentagonal, and hexagonal numbers are generated by the following\nformulae:\n\nTriangle\t \tTn=n(n+1)/2\t \t1, 3, 6, 10, 15, ...\nPentagonal\t \tPn=n(3n−1)/2\t \t1, 5, 12, 22, 35, ...\nHexagonal\t \tHn=n(2n−1)\t \t1, 6, 15, 28, 45, ...\nIt can be verified that T285 = P165 = H143 = 40755.\n\nFind the next triangle number that is also pentagonal and hexagonal.\n'''\n\ndef triangle(n):\n return n*(n+1)/2\n\ndef pentagonal(n):\n return n*(3*n-1)/2\n\ndef hexagonal(n):\n return n*(2*n - 1)\n\n\ncurrentTn = 0\ncurrentT = 0\n\ncurrentPn = 0\ncurrentP = 0\n\ni = 0\nwhile True:\n i += 1\n h = hexagonal(i)\n while currentT < h:\n currentTn += 1\n currentT = triangle(currentTn)\n while currentP < h:\n cu
View gist:8ff45414c9ad640a409a
/*
* A Listener has four states: stopped, listening, continuous (listening), and stopping.
* (we'll handling pending/not-supported later).
* It starts off as stopped. It can be started normally, or in continuous mode.
*
* Listener Methods
* ================
*
* Listener.start (normal):
* listener.continous = false
@jagill
jagill / longlinebug.js
Created Sep 10, 2014
Example of syntax highlighting bug for long lines in atom's javascript package
View longlinebug.js
var languageTags6391To6392 = {'ab':'abk','aa':'aar','af':'afr','sq':'sqi','am':'amh','ar':'ara','an':'arg','hy':'hye','as':'asm','ae':'ave','ay':'aym','az':'aze','ba':'bak','eu':'eus','be':'bel','bn':'ben','bh':'bih','bi':'bis','bs':'bos','br':'bre','bg':'bul','my':'mya','ca':'cat','ch':'cha','ce':'che','zh':'zho','cu':'chu','cv':'chv','kw':'cor','co':'cos','hr':'hrv','cs':'ces','da':'dan','dv':'div','nl':'nld','dz':'dzo','en':'eng','eo':'epo','et':'est','fo':'fao','fj':'fij','fi':'fin','fr':'fra','gd':'gla','gl':'glg','ka':'kat','de':'deu','el':'ell','gn':'grn','gu':'guj','ht':'hat','ha':'hau','he':'heb','hz':'her','hi':'hin','ho':'hmo','hu':'hun','is':'isl','io':'ido','id':'ind','ia':'ina','ie':'ile','iu':'iku','ik':'ipk','ga':'gle','it':'ita','ja':'jpn','jv':'jav','kl':'kal','kn':'kan','ks':'kas','kk':'kaz','km':'khm','ki':'kik','rw':'kin','ky':'kir','kv':'kom','ko':'kor','kj':'kua','ku':'kur','lo':'lao','la':'lat','lv':'lav','li':'lim','ln':'lin','lt':'lit','lb':'ltz','mk':'mkd','mg':'mlg','ms':'m
@jagill
jagill / findMergedBranches.sh
Last active Jan 4, 2016
Find remote branches which have been fully merged into a given branch.
View findMergedBranches.sh
baseBranch=develop
for b in `git branch -r | awk '{print $1}'`; do
numLogs=`git log --oneline $baseBranch..$b | wc -l`;
lastModified=`git show $b | grep "^Date:" | sed 's/^Date:\(.*\)/\1/'`
echo $b : $numLogs : $lastModified;
done | grep " 0 "
@jagill
jagill / gist:7953616
Created Dec 13, 2013
Meteor update from 0.6.7-rc0 to 0.6.7-rc1 failure
View gist:7953616
jag@coati:/tmp$ meteor create --release 0.6.7-rc1 test2
Installing Meteor 0.6.7-rc1:
* Package updates: accounts-ui-unstyled facebook facts github google madewith
meetup meteor mongo-livedata spiderable templating test-in-browser twitter
weibo
Failed to load packages for release 0.6.7-rc1
/Users/jag/.meteor/tools/0b2f28e18b/lib/node_modules/fibers/future.js:206
throw(ex);
@jagill
jagill / Build output
Created Dec 13, 2013
My application fails to build when upgrading from Meteor 0.6.6.3 to 0.6.7-rc0.
View Build output
jag@coati:~/madeye/integration-tests/apogee (develop)$ meteor --settings "$PWD/settings.json" --port $MADEYE_APOGEE_PORT --release 0.6.7-rc0 --raw-logs
=> Using Meteor 0.6.7-rc0 as requested (overriding Meteor 0.6.6.3)
[[[[[ ~/madeye/integration-tests/apogee ]]]]]
iron-router: updating npm dependencies -- connect...
stripe: updating npm dependencies -- stripe...
npm ERR! missing: coffee-script@1.6.3, required by pince@0.0.4
npm ERR! missing: underscore@1.5.2, required by pince@0.0.4
npm ERR! missing: moment@2.4.0, required by pince@0.0.4
@jagill
jagill / test output
Created Dec 6, 2013
Test failures for oortcloud/node-ddp-client#master I'm on OS X 10.8.5, with node version 0.8.21
View test output
jag@coati:/tmp/node-ddp-client (master)$ npm install && npm test
> ddp@0.3.7 test /private/tmp/node-ddp-client
> ./node_modules/mocha/bin/mocha test
․․․․․․․․․
✖ 4 of 9 tests failed:
@jagill
jagill / terminal output
Created Nov 14, 2013
undefined to_sym bug in homebrew
View terminal output
jag@coati:~$ brew update
Error: undefined method `to_sym' for nil:NilClass
Please report this bug:
https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/cmd/update.rb:134:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:132:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:132:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:36:in `update'
/usr/local/Library/brew.rb:91:in `send'
/usr/local/Library/brew.rb:91
@jagill
jagill / laikaTest.js
Created Oct 28, 2013
laika fails on pending tests
View laikaTest.js
assert = require('assert');
describe('Test test', function(){
it('should ignore pending tests');
//it('should ignore pending tests', function(){
//assert.ok(true);
//});
You can’t perform that action at this time.