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 rsa | |
import base64 | |
# modulus in integer | |
MODULUS = 123456789996582395910301286053968077124788323801012630967456380836472396333396466272319708473453610663848909708214595391668878270127153659315097128748348977528953482874935452127643776505027944666257946919553474879512809890824078158244248097149714260265207481163611166304138228724039676901039297181889888815151 | |
# exponent in integer | |
EXPONENT = 65537 | |
PUBLIC_KEY = rsa.PublicKey(MODULUS, EXPONENT) |
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
# 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 |
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
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 |
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
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 |
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
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) |
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
**********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. |
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
#!/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 |
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 com.twitter.algebird.{ | |
HLL, | |
HyperLogLog, | |
HyperLogLogAggregator, | |
HyperLogLogMonoid | |
} | |
object HLL extends App { | |
val hllMonoid = new HyperLogLogMonoid(bits = 4) |
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
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 |
OlderNewer