This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cal | sed "s/.*/ & /;s/ $(date +%e) / [] /" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Back-Propagation Neural Networks | |
# | |
# Written in Python. See http://www.python.org/ | |
# Placed in the public domain. | |
# Neil Schemenauer <[email protected]> | |
import math | |
import random | |
import string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Back-Propagation Neural Networks | |
# Written in Ruby with NArray. See http://narray.rubyforge.org/ | |
# | |
# This program is a translation of bpnn.py written by Neil Schemenauer <[email protected]> | |
# The original source is available at http://python.ca/nas/ | |
require "narray" | |
# calculate a random number where: a <= rand < b | |
class NArray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script src="http://code.jquery.com/jquery.js"></script> | |
<script src="http://google.com/jsapi"></script> | |
<script src="google-contacts-authsub.js"></script> | |
</head> | |
<body> | |
<!-- Google requires an image to be on the page --> | |
<img src="https://localhost/img/1px.png"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.dvliman.tenten.model; | |
import java.util.List; | |
public class Base { | |
public enum Status { | |
ACTIVE, | |
INACTIVE, | |
DELETED, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Server App | |
# This file must be in lib/myapp/api.rb | |
module MyApp | |
module Entities | |
class Products < Grape::Entity | |
expose :id, :code, :name, :short_description | |
expose :description, :unless => { :collection => true } | |
expose (:category) { |model, options| model.category.name } | |
expose (:brand) { |model, options| model.brand.name } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute typical instruction 1 nanosec 1/1,000,000,000 sec | |
fetch from L1 cache memory 0.5 nanosec | |
branch misprediction 5 nanosec | |
fetch from L2 cache memory 7 nanosec | |
Mutex lock/unlock 25 nanosec | |
fetch from main memory 100 nanosec | |
send 2K bytes over 1Gbps network 20,000 nanosec | |
read 1MB sequentially from memory 250,000 nanosec | |
fetch from new disk location (seek) 8,000,000 nanosec | |
read 1MB sequentially from disk 20,000,000 nanosec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def require_all(path) | |
glob = File.join(File.dirname(__FILE__), path, '*.rb') | |
Dir[glob].each do |f| | |
require f | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iterator> | |
#include <algorithm> | |
#include <vector> | |
#include <map> | |
#include <set> | |
#include <iostream> | |
#include <cassert> | |
#include <memory> | |
#include <thread> | |
#include <future> |
OlderNewer