Skip to content

Instantly share code, notes, and snippets.

Andrew Bolster andrewbolster

Block or report user

Report or block andrewbolster

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 ssh_tunnel.sh
#!/bin/bash
# Example script to start up tunnel with autossh.
# This script will tunnel 22 from the local host
# to 11122 on the remote host. If that post isn't
# availabile it'll increment. Also does the same
# with 8888/11188 for ipython notebook
# REQUIRED autossh
HOST=${@: -1}
REMOTE_SSH_PORT=11122
REMOTE_HTTP_PORT=11188
View lines.py
if Pos_Component == 3:
Actual_Pos_Index = Actual_Pos_Index + Configurable_Parameters.Number_Of_State_Vector_Components_Per_Probe - 3
Inertial_Pos_Measurement[(Index - 1), :] = Measurements[(Index - 1), :]
Inertial_Pos_Err[(Index - 1), :] = Inertial_Pos_Measurement[(Index - 1), :] - Actual_Pos[
(Index - 1), :]
View stacktrace_oct2pyerr
Error
Traceback (most recent call last):
File "/home/bolster/src/aietes/src/contrib/Ghia/ecea/mfiles/test_ecea.py", line 53, in test_Phi
oct_phi = octave.Set_State_Propagation_Matrix(sim_conf)
File "/usr/local/lib/python2.7/dist-packages/oct2py/session.py", line 364, in octave_command
return self.call(name, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/oct2py/session.py", line 177, in call
argin_list, load_line = self._writer.create_file(inputs)
File "/usr/local/lib/python2.7/dist-packages/oct2py/matwrite.py", line 69, in create_file
savemat(self.in_file, data, appendmat=False, oned_as='row')
View IRC_THEROOM
10:51 <bolster> Is it passable to describe a movie as being "If Ed Wood and Christopher Walken had a thalidomide baby" or is that too much?
10:51 <bolster> Oh, maybe should have started with "Morning"
10:56 <clairebones> bolster: if it's the movie I think you're referring to it's probably apt
10:58 <^Richard> o_O
10:59 <bolster> clairebones: yup, just concious that as a statement it sits on the very bloodiest edge of decorum. Much like the movie.
11:02 <stealthii> film in question: http://imgur.com/C0PoSVX
11:03 <^Richard> even the description is fucking mental.
11:03 <stealthii> that's my favourite bit.
11:04 <stealthii> of course he didn't hit her
11:04 <stealthii> men don't hit.
View keybase.md

Keybase proof

I hereby claim:

  • I am andrewbolster on github.
  • I am bolster (https://keybase.io/bolster) on keybase.
  • I have a public key whose fingerprint is 03D4 CCE9 AC04 1177 3D00 924D 49DC 9F11 AEFD 5969

To claim this, I am signing this object:

View KF Filter Sample.py
def update_filter(self):
#####################################################################################
# KALMAN STEP #
#####################################################################################
t = self.t_index
#_Y = np.vstack(np.concatenate((self.Inertial_Measurement.flatten(),self.TOF_Measurement.flatten())))
Y = np.vstack(self.SIM.Measurement)
# Form estimated error correction of positions form reduced form
# Y is the positions observed, and is corrected by the X_estimation from the previous round
View Luke and Leia Ipythn Notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewbolster
andrewbolster / os.nice.py
Created May 7, 2014
Code Samples for os.nice post
View os.nice.py
import os
...
def thread_mask(args):
# Properly Parallel RNG
#http://stackoverflow.com/questions/444591/convert-a-string-of-bytes-into-an-int-python
myid=current_process()._identity[0]
np.random.seed(myid^struct.unpack("<L",os.urandom(4))[0])
os.nice(5)
View danhomeworkplot.py
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <markdowncell>
# basically, want to parse a file, load values in it into a dictionary (name, x, y, z, r, g, b), and scatter lot them, with labels based on RGB color
# <codecell>
%matplotlib inline
View Farbot Help
Since Farbot triggers freenodes flood detection, here's the help.
<question> why not zoidberg? - Generates a Why Not Zoidberg? meme
<something> does not work that way! - Generates a Morbo meme
<something> is bad and you should feel bad - Generates a Zoidberg meme
<things> are bad and you should feel bad - Generates a Zoidberg meme
<things> do not work that way! - Generates a Morbo meme
Events:
alot - Shows a picture of an alot
countdown [for] #meetupname# e.g. countdown punerbmeetup
You can’t perform that action at this time.