First add your twitter username and password. Then server.rb and once it's started open websocket.html in your browser. You should see some tweets appear. If not take a look at the javascript console.
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
''' | |
redis_search.py | |
Written by Josiah Carlson July 3, 2010 | |
Released into the public domain. | |
This module implements a simple TF/IDF indexing and search algorithm using | |
Redis as a datastore server. The particular algorithm implemented uses the |
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
//Poisson distribution | |
//http://en.wikipedia.org/wiki/Poisson_distribution | |
function poisson(expectvalue){ | |
var n = 0, //循环计数 | |
limit = Math.exp(-expectvalue), // e -v, 其中v是期望值 | |
x = Math.random(); //生成 0-1之间随机数 | |
while(x > limit){ |
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
require 'camping' | |
Camping.goes :Async | |
module Async | |
def service(*a) | |
return super unless respond_to?(:async?) | |
EM.next_tick do | |
send(@method, *a) |
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
web: node app.js | |
worker: node consumer.js |
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
module JasmineFixtures | |
extend ActiveSupport::Concern | |
module InstanceMethods | |
# Saves the markup to a fixture file using the given name | |
def save_fixture(name) | |
response.should be_success | |
fixture_path = File.join(Rails.root, '/spec/javascripts/fixtures') | |
fixture_file = File.join(fixture_path, name) |
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 main | |
import ( | |
"container/heap" | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
const nRequester = 100 |
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> | |
<head> | |
<script data-main="usage" src="http://requirejs.org/docs/release/1.0.8/comments/require.js"></script> | |
</head> | |
<body> | |
<p>Check your JavaScript console for output!</p> | |
</body> | |
</head> |
Most active GitHub users (git.io/top)
The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.
Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:
githubUsers
.filter(user => user.followers > 1000)
OlderNewer