R - NaeblisEcho
def gen_pop(limit): | |
for num in range(1, limit): | |
if num % 3 == 0 and num % 5 == 0: | |
yield "CracklePop" | |
elif num % 3 == 0: | |
yield "Crackle" | |
elif num % 5 == 0: | |
yield "Pop" | |
else: | |
yield num |
#!/usr/bin/env python | |
def bin(x): | |
return "{0:b}".format(x) | |
def rs_one(x): | |
""" Right Shift by 1 """ | |
return x >> 1 | |
def ls_one(x): |
We intend to bring a distributed systems meetup group to Delhi. We are inspired by @nishantmodak and @ShripadAgashe who have been running the meetups and conferences in Pune. Please, go through their previous meetups at @dist_sys. We want to be the space where people can talk about the various problems they have been solving around distributed systems and hopefully try and bring more academicians and engineers from industry to talk about the theoretical principles and practical experience building reliable and consistent systems on top the entropy that usually comes with distributed systems.
We are looking for all kinds of people who can help us get going with the group. Speakers, potential attendees, sponsors, volunteers etc .. So if you are interested in the idea, please shout out to us:
These commands were taking from the talk Introduction to Advanced Bash Usage by James Pannacciulli
Updated 21 Jan 2017 06:54:53
A type is a collection of possible values. An integer can have values 0, 1, 2, 3, etc.; a boolean can have values true and false. We can imagine any type we like: for example, a HighFive type that allows the values "hi" or 5, but nothing else. It's not a string and it's not an integer; it's its own, separate type.
Statically typed languages constrain variables' types: the programming language might know, for example, that x is an Integer.
In that case, the programmer isn't allowed to say x = true
; that would be an invalid program.
The compiler will refuse to compile it, so we can't even run it.
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
- Stores data elements based on an sequential, most commonly 0 based, index.
- Based on tuples from set theory.
# Text Analysis for the Markov chain | |
# class Object | |
# def method_missing( name, *args ) | |
# puts "There is no method '##{name}' defined on #{self.class}, you dummy!" | |
# end | |
# end | |
def get_ngrams(n, corpus) | |
output_list = [] |
# Markov chain implementation in Ruby | |
# We take some text as input, apply the Markov chain algorithm to it, | |
# and produce some other text as output. Lets see how it is done! | |
# Markov chain means running an FSM with the states having unequal probability | |
# of transition. | |
# References: | |
# A Mathematical theory of Communication, by C.E. Shannon |