Skip to content

Instantly share code, notes, and snippets.

John Feminella fj

Block or report user

Report or block fj

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 keybase.md

Keybase proof

I hereby claim:

  • I am fj on github.
  • I am jxf (https://keybase.io/jxf) on keybase.
  • I have a public key whose fingerprint is 7ABF 8675 8B7B C923 C9B6 897C FD58 7CB2 6A5D 8BEC

To claim this, I am signing this object:

@fj
fj / observations.csv
Last active Aug 29, 2015
ARIMA issues
View observations.csv

We're noticing two major things:

  • Occasionally, the prediction service returns illegal NaN values. This should never happen. If there's some problem with the input data it should fail immediately and raise an exception, but it shouldn't return bogus data. This series will generate a NaN:
242.0 267.0 756.0 1101.0 1211.0 1181.0 929.0 271.0 381.0 1212.0 1277.0 1265.0 1207.0 955.0 233.0 268.0 1020.0 1049.0 1140.0 1185.0 925.0 251.0 286.0 1020.0 1187.0 1094.0 1082.0 863.0 214.0 305.0 972.0 1014.0 1046.0 1046.0 929.0 213.0 285.0 1119.0 1224.0 1140.0 1062.0 862.0 234.0 273.0 1099.0
  • It's still a little too slow. Previously we had discussed not trying every possible combination of ARIMA parameters and instead just picking a few that would be representative and trying those. What is your assessment of this strategy as a tactic for speeding things up? What datasets do you need to perform this analysis and make this happen?
View gist:f8ed5d318178682bd2a2
Pandora: [X....X -->
Spotify: [X..X.. -->
Rhapsody: [X....X -->
Rdio: [X...X. -->
* song at index 0 is on all 4 services
* song at index 3 is only on Spotify
* song at index 4 is only on Rdio
* song at index 5 is on Pandora and Rhapsody but not Spotify or Rdio
* songs at indices 1, 2 are on no services
View gist:3f2d8c39acee5ef6d486
case point
pattern (x, y): ... # 2d point
pattern (x, y, z): ... # 3d point
pattern (x, y, z, w): ... # quaternion
# etc.
View gist:077c22abe453ec2d921f
sealed abstract class Expression
case class X() extends Expression
case class Const(value : Int) extends Expression
case class Add(left : Expression, right : Expression) extends Expression
case class Mult(left : Expression, right : Expression) extends Expression
case class Neg(expr : Expression) extends Expression
def eval(e : Expression, x : Int) : Int = e match {
case X() => x
case Const(c) => c
@fj
fj / .rubocop.yml
Created Nov 5, 2014
UpHex's Rubocop and Rakefile
View .rubocop.yml
Metrics/LineLength:
Max: 125
@fj
fj / time.rb
Created Oct 31, 2014
perplexing round-trip Time instance behavior
View time.rb
t1 = Time.now
# => 2014-10-31 13:48:12 -0400
t2 = Time.at(t1.to_i)
# => 2014-10-31 13:48:12 -0400
t1.to_a
# => [12, 48, 13, 31, 10, 2014, 5, 304, true, "EDT"]
t2.to_a
@fj
fj / gist:2900f29c6dc77d0e7c00
Last active Aug 29, 2015 — forked from cammckinnon/gist:2369233
fizzbuzz-in-brainfuck
View gist:2900f29c6dc77d0e7c00
[-]>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]<<<<<
>>>>>>
[-]>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]<<<<<
>>>>>>
>
[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
View gist:62953162c079eeca30bb
Loaded in 1.3 seconds
/home/polytope/.local/share/Steam/SteamApps/common/Star Ruler 2/scripts/server/empire.as:
Compiling void markDesignObsolete(Player&inout, const Design@, bool)
Error (302:5): Expression must be of boolean type
ERROR: Failed to build module 'empire' in manager 'server' (code -1).
ERROR: 'cheats': Cannot import function 'void setInstantColonize(bool)': module 'planets.SurfaceComponent' does not exist.
ERROR: 'empire_ai.EmpireAI': Cannot import function 'AIController@ createBasicAI()': module 'empire_ai.BasicAI' does not exist.
ERROR: 'orbitals': Cannot import function 'SystemDesc@ getSystem(Region@)': module 'game_start' does not exist.
ERROR: 'system_pathing': Cannot import function 'SystemDesc@ getSystem(uint)': module 'game_start' does not exist.
ERROR: 'system_pathing': Cannot import function 'SystemDesc@ getSystem(Region@)': module 'game_start' does not exist.
@fj
fj / game.rb
Created Jul 10, 2014
My work on the Uncle Bob bowling kata.
View game.rb
class Game
def roll(*pins)
(@rolls ||= []).push *pins
end
def score
scores.inject(:+)
end
def scores
You can’t perform that action at this time.