Skip to content

Instantly share code, notes, and snippets.

View ybur-yug's full-sized avatar

yburyug ybur-yug

View GitHub Profile
module Gkv
class Database
attr_accessor :items
def initialize
`git init`
@items = {}
end
def set(key, value)
require 'digest/sha1'
require 'zlib'
require 'pp'
module Git
OBJECTS = {}
class Object

seriously im blanking so hard on this, check it:

2.2.1 :001 > require 'gkv'
 => true 
2.2.1 :002 > db = Gkv::Database.new
 => #<Gkv::Database:0x000000016395d8> 
2.2.1 :003 > db.set('test', {key: 'val'})
 => "test" 
2.2.1 :004 > db.get('test')
$ irb
2.2.1 :001 > 1.to_f
 => 1.0 
2.2.1 :002 > 1.0.to_i
 => 1 
2.2.1 :003 > 'i fear weasels'.to_f
 => 0.0 
2.2.1 :004 > 'i fear weasels'.to_i
 =&gt; 0
sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev protobuf-compiler gfortran libjpeg62 libfreeimage-dev libatlas-base-dev git python-dev python-pip libgoogle-glog-dev libbz2-dev libxml2-dev libxslt-dev libffi-dev libssl-dev libgflags-dev liblmdb-dev python-yaml
module Parallel
def pmap
collection
|> Enum.map(&(Task.async(fn -> func.(&1) end)))
|> Enum.map(&Task.await/1)
end
end
A horse walks into a bar. The bartender asks the horse if it's an alcoholic considering all the bars he frequents,
to which the horse replies, "Ithink not!" POOF! The horse disappears.
This is the point in time when all the philosophy students in the audience begin to giggle, as they are familiar with
the philosophical proposition of Cogito ergo sum, or I think, therefore, I am.
But to explain the concept aforehand would be putting Descartes before the horse.
"""
Episode 13, this code will get you to ~2:09 in the video
The test will run, you won't get a compile error, the test WILL FAIL as expected
---
Finished in 0.04 seconds (0.04s on load, 0.00s on tests)
2 tests, 1 failures
"""
defmodule BankAccount do
@ybur-yug
ybur-yug / .vimrc
Last active August 28, 2015 15:17
my vimrc
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
fatal: [104.131.191.104] => SSH Error: Permission denied (publickey,password).
while connecting to 104.131.191.104:22
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
confirmation number, 1130am
monday
58009882