Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kevin-brown
kevin-brown / data.txt
Last active August 29, 2015 14:16
GeoJSON data links
Public transportation
Bus stops: https://gist.github.com/tredzko/b89eb0f45344fbd6cb6f
Bike shelters: https://gist.github.com/kevin-brown/6105cd9e2ec0b48ca8cd
Subways: https://gist.github.com/kevin-brown/82c27f157cf0fda54a66
For hire vehicles: https://gist.github.com/kevin-brown/75f5f0a11b9c90e4a8f4
Crime
Burglaries: https://gist.github.com/tredzko/34fae8671d98716e3298
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
init: function(elevators, floors) {
function randomElevator(elevators) {
return elevators[Math.floor(Math.random() * elevators.length)];
};
function bestElevator(floorNum) {
var bestElevator = elevators[0];
var emptyElevators = [];
<p>Thank you for your interest in contributing to Select2 ("We" or "Us").</p>
<p>This contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please sign it and send it to Us by electronic submission, following the instructions at . This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.</p>
<h2>1. Definitions</h2>
<p>"You" means the individual who Submits a Contribution to Us.</p>
<p>"Contribution" means any work of authorship that is Submitted by You to Us in which You own or assert ownership of the Copyright. If You do not own the Copyright in the entire work of authorship, please follow the instructions in .</p>
@kevin-brown
kevin-brown / hr-new.js
Created December 16, 2014 01:13
Croation pluralization rules - New method for "character"
function character (n) {
var message = ' ' + n + ' znak';
if (n % 10 < 5 && n % 10 > 0 && (n % 100 < 5 || n % 100 > 19)) {
if (n % 10 > 1) {
message += 'a';
}
} else {
message += 'ova';
}
@kevin-brown
kevin-brown / backtrace.txt
Last active August 29, 2015 14:08
MouseTrap Backtrace
#0 0x00007fffe1c8230e in int cv::predictOrderedStump<cv::HaarEvaluator>(cv::CascadeClassifierImpl&, cv::Ptr<cv::FeatureEvaluator>&, double&) () from /usr/local/lib/libopencv_objdetect.so.3.0
#1 0x00007fffe1c82e67 in cv::CascadeClassifierImpl::runAt(cv::Ptr<cv::FeatureEvaluator>&, cv::Point_<int>, int, double&) () from /usr/local/lib/libopencv_objdetect.so.3.0
#2 0x00007fffe1c85639 in cv::CascadeClassifierInvoker::operator()(cv::Range const&) const () from /usr/local/lib/libopencv_objdetect.so.3.0
#3 0x00007fffe1c863d1 in cv::CascadeClassifierImpl::detectMultiScaleNoGrouping(cv::_InputArray const&, std::vector<cv::Rect_<int>, std::allocator<cv::Rect_<int> > >&, std::vector<int, std::allocator<int> >&, std::vector<double, std::allocator<double> >&, double, cv::Size_<int>, cv::Size_<int>, bool) () from /usr/local/lib/libopencv_objdetect.so.3.0
#4 0x00007fffe1c8e42d in cv::CascadeClassifierImpl::detectMultiScale(cv::_InputArray const&, std::vector<cv::Rect_<int>, std::allocator<cv::Rect_<int> > >&, std::vect
@kevin-brown
kevin-brown / python-3.md
Last active August 29, 2015 14:07
MouseTrap instructions
  1. Install Python 3 and the development packages
  • sudo yum install python3 python3-devel
  1. Install the package manager for Python 3
  • sudo yum install python3-setuptools python3-pip
  1. Modify setup.py to work for us.
  • Change os.walk(LOCALE_PATH).next() to next(os.walk(LOCALE_PATH)) on line 123
  1. Install MouseTrap using pip