(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<configuration> | |
<property> | |
<name>fs.s3a.access.key</name> | |
<description>AWS access key ID. Omit for Role-based authentication.</description> | |
<value>YOUR_ACCESS_KEY</value> | |
</property> | |
<property> | |
<name>fs.s3a.secret.key</name> | |
<description>AWS secret key. Omit for Role-based authentication.</description> |
import org.apache.spark.graphx._ | |
import org.apache.spark.rdd.RDD | |
case class Peep(name: String, age: Int) | |
val vertexArray = Array( | |
(1L, Peep("Kim", 23)), | |
(2L, Peep("Pat", 31)), | |
(3L, Peep("Chris", 52)), | |
(4L, Peep("Kelly", 39)), |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This is a plain-text version of Bret Victorβs reading list. It was requested by hf on Hacker News.
Highly recommended things!
This is my five-star list. These are my favorite things in all the world.
A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. β
People
![]() :bowtie: |
π :smile: |
π :laughing: |
---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |
# (C) Mathieu Blondel, November 2013 | |
# License: BSD 3 clause | |
import numpy as np | |
def ranking_precision_score(y_true, y_score, k=10): | |
"""Precision at rank k | |
Parameters |
The most likely reason is that cron runs in a very limited environment and doesn't have access to gsutil or to gsutil's configuration.To fix this you should set your Path variable and the gsutil configuration inside your script like so: | |
#!/bin/bash | |
PATH=path/to/gsutil | |
export BOTO_CONFIG="/path/to/.boto" | |
#rest of script here | |
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 |
import paramiko | |
k = paramiko.RSAKey.from_private_key_file("/Users/whatever/Downloads/mykey.pem") | |
c = paramiko.SSHClient() | |
c.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
print "connecting" | |
c.connect( hostname = "www.acme.com", username = "ubuntu", pkey = k ) | |
print "connected" | |
commands = [ "/home/ubuntu/firstscript.sh", "/home/ubuntu/secondscript.sh" ] | |
for command in commands: | |
print "Executing {}".format( command ) |