See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
def scrape_reviews(review_url, pages) | |
for i in 1..14 do | |
results = scraper(review_url+"&page="+i.to_s) | |
append_to_file(results) | |
end | |
end | |
def scraper(url) | |
results = [] | |
browser = Watir::Browser.new :chrome |
import com.twitter.algebird.{ | |
HLL, | |
HyperLogLog, | |
HyperLogLogAggregator, | |
HyperLogLogMonoid | |
} | |
object HLL extends App { | |
val hllMonoid = new HyperLogLogMonoid(bits = 4) |
#!/bin/sh | |
mkdir -p src/{main,test}/{java,resources,scala} | |
mkdir lib project target | |
# create an initial build.sbt file | |
echo 'name := "MyProject" | |
version := "1.0-SNAPSHOT" | |
scalaVersion := "2.13.1"' > build.sbt | |
# create alias in bashrc |
**********Redis*************** | |
Single threaded | |
No need to worry about locks | |
Cannot explore multiple cores.Need to run multiple instance in multiple coress. | |
Both master and slave in the same machine. Master goes down there is high change for data loss | |
Data structures | |
Rich data structures. Lot of operation on data structures is supported natively. | |
Nested data structures is not supported. |
Design Principles | |
1. Sacrifice space for time | |
2. Single partition per query | |
Cassandra Data Modelling Process | |
1. Conceptual Modelling | |
Identify Entities, attributes and their relationships | |
Eg: User one -> many Campaigns (relationship) |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
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 |
Originally: | |
https://gist.github.com/7565976a89d5da1511ce | |
Hi Donald (and Martin), | |
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I | |
appreciate the tone. This is a Yegge-long response, but given that you and | |
Martin are the two people best-situated to do anything about this, I'd rather | |
err on the side of giving you too much to think about. I realize I'm being very | |
critical of something in which you've invested a great deal (both financially |
# Bootcamp | |
The following guide will help you acquire the required skills. Also we suggest you go through the books and videos linked throughout the guide. | |
### Week 1 | |
We measure our productivity all the time. This is the only way to improve our skills. Measure and push ourself to do slightly better the next time. A huge part of productivity is managing time. The following video and books will give some tips and strategies which you can start implementing right now! | |
#### Your Brain @ Work |