R - NaeblisEcho
;; Programming Languages, Homework 5 | |
#lang racket | |
(provide (all-defined-out)) ;; so we can put tests in a second file | |
;; definition of structures for MUPL programs - Do NOT change | |
(struct var (string) #:transparent) ;; a variable, e.g., (var "foo") | |
(struct int (num) #:transparent) ;; a constant number, e.g., (int 17) | |
(struct add (e1 e2) #:transparent) ;; add two expressions | |
(struct ifgreater (e1 e2 e3 e4) #:transparent) ;; if e1 > e2 then e3 else e4 |
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 |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from django.contrib.auth.models import User | |
from django.db import models | |
# Conceptual Model representation in the Mailman API | |
class Member(models.Model): | |
name = models.CharField(max_length=200) |
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.