Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw
Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw
| class SimpleLinearRegression | |
| def initialize(xs, ys) | |
| @xs, @ys = xs, ys | |
| if @xs.length != @ys.length | |
| raise "Unbalanced data. xs need to be same length as ys" | |
| end | |
| end | |
| def y_intercept | |
| mean(@ys) - (slope * mean(@xs)) |
| var express = require('express'), | |
| passport = require('passport'), | |
| TwitterStrategy = require('passport-twitter').Strategy, | |
| ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn, | |
| app = express(); | |
| app.use(express.static(__dirname + '/public')); | |
| app.use(express.cookieParser()); | |
| app.use(express.session({ secret: 'keyboard cat' })); | |
| app.use(passport.initialize()); |
Changes:
this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .
ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.
this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.
This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.
| // Sonic Screw Driver | |
| // CONSTANTS AND VARIABLES | |
| const int button2 = 2; | |
| const int button3 = 3; | |
| const int speaker = 4; | |
| const int inputVoltagePin = 6; | |
| const int IREMITTER = 7; | |
| const int IRRECEIVER = 8; | |
| const int LED = 9; |
| var gpio = require("gpio") | |
| var gpio22, intervalTimer | |
| // Flashing lights if LED connected to GPIO22 | |
| gpio22 = gpio.export(22, { | |
| ready: blinkLED | |
| }) | |
| function blinkLED() { | |
| intervalTimer = setInterval(function() { |
| require 'singleton' | |
| # outputs a colored call-trace graph to the Rails logger of the lines of ruby code | |
| # invoked during a single request. | |
| # | |
| # Example: | |
| # | |
| # 1) Make sure this file is loaded in an initializer | |
| # | |
| # 2) Add the following to your application.rb in Rails3: |
| def write_backtrace name, backtrace, filename | |
| exceptions = Regexp.union([ | |
| /\.bundle/, | |
| /spec/, | |
| /test/, | |
| /lib\/ruby\/1.9.1/ | |
| ]) | |
| backtrace.reject! { |line| line =~ exceptions } |
| require 'rubygems' | |
| require 'mechanize' | |
| FIRST_NAME = 'FIRST_NAME' | |
| LAST_NAME = 'LAST_NAME' | |
| PHONE = 'PHONE' | |
| EMAIL = 'EMAIL@provider.com' | |
| PARTY_SIZE = 2 | |
| SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' } |
| # Basically the nginx configuration I use at konklone.com. | |
| # I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com | |
| # | |
| # To provide feedback, please tweet at @konklone or email eric@konklone.com. | |
| # Comments on gists don't notify the author. | |
| # | |
| # Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites. | |
| # Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration. | |
| server { |