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
iex(14)> ring = HashRing.new() |> HashRing.add_node(:a) |> HashRing.add_node(:b) | |
#<Ring[:a, :b]> | |
iex(15)> [:foo, :bar, :baz, :flop] |> Enum.each(fn(k) -> IO.puts(HashRing.key_to_node(ring, k)) end) | |
b | |
b | |
b | |
a | |
:ok | |
iex(16)> ring = HashRing.add_node(ring, :c) | |
#<Ring[:a, :c, :b]> |
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
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 {Injectable, Inject, Optional} from '@angular/core'; | |
import { | |
HttpInterceptor, | |
HttpHandler, | |
HttpRequest, | |
HttpHeaders, | |
HttpResponse, | |
HttpErrorResponse | |
} from '@angular/common/http'; | |
import {Request} from 'express'; |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "dumb_agent", | |
"type": "python", | |
"request": "launch", |
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
from concurrent.futures import ProcessPoolExecutor, wait | |
from multiprocessing import Manager | |
from argparse import ArgumentParser | |
from concurrent.futures import Future | |
from typing import List, Dict | |
import fastparquet | |
import os | |
import pandas as pd | |
import numpy as np |
OlderNewer