# Enable multiverse repository
sudo sed -i "/^# deb.*multiverse/ s/^# //" /etc/apt/sources.list
sudo apt-get update
sudo apt-get upgrade -y
export LANGUAGE=en\_US.UTF-8
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
# -*- coding: utf-8 -*- | |
""" | |
a simple 'text-mode' version of the Tetris game | |
>>> Board(width=12, height=12).start_game() | |
""" | |
import random | |
import re |
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
# -*- coding: utf-8 -*- | |
""" | |
picit is a module to download URLs contained in an input file | |
to a local directory. | |
>>> import picit | |
>>> downloader = Downloader("/home/pcaulagi/src/picit/input.dat", | |
output_dir="/home/pcaulagi/Downloads") | |
>>> downloader.download() |
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
// A simple HTTP static file server. | |
// | |
// Usage: | |
// go run --root ~/Pictures --port 8001 | |
// | |
package main | |
import ( | |
"errors" |
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
With **mysql 5.7.12** | |
``` | |
mysql> UPDATE product_product INNER JOIN (SELECT product_id, AVG(star) AS avg_star, COUNT(id) AS number FROM rating_productrating GROUP BY product_id) as rating set rating_avg = rating.avg_star, rating_num = rating.number; | |
Query OK, 150 rows affected, 2 warnings (0.02 sec) | |
Rows matched: 150 Changed: 150 Warnings: 2 | |
mysql> show warnings; | |
+-------+------+------------------------------------------------+ | |
| Level | Code | Message | |
I hereby claim:
- I am caulagi on github.
- I am caulagi (https://keybase.io/caulagi) on keybase.
- I have a public key whose fingerprint is F493 BB89 5B64 4792 762E 3A20 BFBE 88C9 AD37 C86E
To claim this, I am signing this object:
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
$ rustup show | |
Default host: x86_64-apple-darwin | |
installed toolchains | |
-------------------- | |
stable-x86_64-apple-darwin | |
beta-x86_64-apple-darwin | |
nightly-x86_64-apple-darwin (default) |
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
$ cargo new double | |
$ cd double | |
$ virtualenv .env | |
$ . ./.env/bin/activate | |
$ pip install cffi | |
$ cargo build | |
$ python double.py |
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
$ cargo new words | |
$ cargo build --release | |
$ python benchmark.py |
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
pradipcaulagi@Pradips-MacBook-Pro|/tmp/bucklescript-frontend-template on master!? | |
± npm run build:dev | |
> tutorial@0.0.0 build:dev /private/tmp/bucklescript-frontend-template | |
> bsb -make-world && webpack --env=dev | |
ninja: no work to do. | |
ninja: Entering directory `lib/bs' | |
[1/2] Building src/components/app.cmj | |
FAILED: src/components/app.cmj /private/tmp/bucklescript-frontend-template/lib/es6/src/components/app.js src/components/app.cmi |
OlderNewer