configure /etc/network/interfaces like so:
auto lo
iface lo inet loopback
describe 'sponsored pushes' do | |
@league = create(:soccer_league) # <- .create() not in context outside of let/before blocks | |
@job_data = { # <- can't be defined inside let block if used in before(:context) | |
tube: @tube_name, | |
message: @message, | |
article_uri: @article_uri, | |
category: @category, | |
league: @league | |
primary_tag_uris: @primary_tag_uris, | |
resource_uris: @resource_uris |
class ScoreChangeEvents | |
class << self | |
def all | |
{ football: football, soccer: soccer, baseball: baseball } | |
end | |
def save(foo = all) | |
File.write( | |
'foo', | |
"Occurrance Rate:\n\nFootball: #{foo[:football].count} / #{Football::Event.count}\n\nSoccer: #{foo[:soccer].count} / #{Soccer::Event.count}\n\nBaseball: #{foo[:baseball].count} / #{Baseball::Event.count}\n\n```js\n#{JSON.pretty_generate foo}\n```") |
obj = {} | |
Football::Event.all.each { |e| | |
obj[e.id] = { summaries: e.box_score.score_summaries.map { |s| | |
{ home: s.home_score, away: s.away_score } unless s.home_score == 0 and s.away_score == 0 } | |
} if e.box_score | |
} | |
obj.delete_if { |k,v| v[:summaries].compact.empty? == true } | |
obj.delete_if { |k,v| |
# WARNING: | |
# Horrible things happening here for development reasons. | |
# Do not leave this in. | |
require 'colorize' | |
module Zing | |
module PlayerRecommender | |
class Todo | |
def self.warn | |
str ||= '' |
/** | |
* Trainins input vectors. | |
* | |
* Input used to train neural network. | |
*/ | |
// Square | |
var s_1 = [ | |
-1, -1, -1, -1, -1, | |
-1, 1, 1, 1, -1, |
var sample = [ | |
[0,1], | |
[0,2], | |
[0,3], | |
[3,8], | |
[3,9], | |
[4,8], | |
[4,10], | |
[3,1], |
use std::str::from_utf8; | |
use std::io::{TcpListener, TcpStream}; | |
use std::io::{Acceptor, Listener}; | |
fn main() { | |
let listener = TcpListener::bind("0.0.0.0", 8000); | |
let mut acceptor = listener.listen(); | |
fn handle_client(mut stream: TcpStream) { |
Problem solved by geniuses on IRC: check final comment for complete log. The cause of this bug is unexpected to say the least!
This is the code that isn't working:
Assume the input is "Hello world @123"
def memo_content(input, remote: false)
content = sanitize input
These are my notes for my guide on screencasting in Linux. The instructional screencast can be found here link.
arandr (easily manage your screens and their resolution)
recordmydesktop (record your desktop activity)