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
// ==UserScript== | |
// @name HardcoreGaming101 DomainFix | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://hg101.kontek.net/* | |
// @include http://blog.hardcoregaming101.net/* | |
// @grant none | |
// ==/UserScript== |
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
import System.IO | |
import Data.List | |
data Digit = Digit { actualDigit :: Int | |
, pixels :: [Int] | |
} deriving Show | |
type Classifier = [Digit] | |
type KNNClassifier = [[Digit]] |
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
" Global | |
set noautofocus | |
let searchalias g = "google" | |
let blacklists = ["*://github.com/*","*://*.github.com/*","http://45.55.219.52/*","https://portal.azure.com/*"] | |
command g tabnew google | |
map <C-d> scrollPageDown | |
map <C-e> scrollPageUp |
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
<?php | |
namespace Flagship\Event; | |
use Flagship\Model\User; | |
use Flagship\Model\Lander; | |
class View extends AbstractEvent { | |
const NAME = "view"; | |
const SEGMENT_NAME = "Landing Pageview"; |
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
{ response: 200, body: '' } //The write | |
{ response: 200, //The read | |
body: | |
{ series: | |
{ id: 'e61390b2cf0b47688c2d54af7ff742b4', | |
key: 'São Paulo', | |
name: '', | |
tags: [], | |
attributes: {} }, | |
start: '2013-11-07T00:00:00.000Z', |
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
import Data.List | |
data Point = Point Float Float deriving (Show, Eq) | |
data Direction = LeftDirection | |
| RightDirection | |
| StraightDirection deriving (Show) | |
dot :: Point -> Point -> Float | |
dot (Point x1 y1) (Point x2 y2) = x1*x2 + y1*y2 |
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
import random | |
def stay_strategy(objects): | |
first = random.randint(0, len(objects)-1) | |
return objects[first] | |
def switch_strategy(objects): | |
first = random.randint(0, len(objects)-1) | |
goat = random.choice([i for i,x in enumerate(objects) if x == 'G' and i != first]) |
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
ABT | |
ABBV | |
ANF | |
ACE | |
ACN | |
ACT | |
ADBE | |
ADT | |
AMD | |
AES |
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
import random | |
import sys | |
CIRCLE_RADIUS = 1 | |
NUM_GUESSES = int(sys.argv[1]) | |
def insideCircle(px, py): | |
l = px**2 + py**2 | |
return (l <= CIRCLE_RADIUS) |
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
import datetime | |
import dateutil.parser | |
import optparse | |
from Queue import Queue | |
import tempodb | |
from threading import Thread | |
class Worker(Thread): | |
"""Thread executing tasks from a given tasks queue""" | |
def __init__(self, tasks): |
NewerOlder