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 | |
import codecs | |
import re | |
import unicodedata | |
import sys | |
# wikipedia2csv.py | |
# ref | |
# http://aidiary.hatenablog.com/entry/20101230/1293691668 |
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
apt-get install haproxy |
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 org.eclipse.paho.client.mqttv3.MqttClient; | |
import org.eclipse.paho.client.mqttv3.MqttConnectOptions; | |
import org.eclipse.paho.client.mqttv3.MqttException; | |
import org.eclipse.paho.client.mqttv3.MqttMessage; | |
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence; | |
import org.eclipse.paho.client.mqttv3.MqttCallback; | |
import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; | |
class SimpleCallback implements MqttCallback { |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 sys | |
import os | |
import argparse | |
import dropbox | |
from dropbox.files import WriteMode | |
from dropbox.exceptions import ApiError | |
# Add OAuth2 access token here. | |
# You can generate one for yourself in the App Console. |
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 | |
# Create directories for ansible | |
# . | |
# ├── common-roles/ | |
# │ ├── base/ | |
# │ │ ├── defaults/ | |
# │ │ │ └── main.yml | |
# │ │ ├── files/ | |
# │ │ │ ├── ... | |
# │ │ │ └── ... |
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 time | |
import asyncio | |
import threading | |
import numpy as np | |
def fib(n): | |
if n in (1, 2): | |
return 1 | |
return fib(n - 1) + fib(n - 2) |
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
$ echo 1 > /proc/sys/net/ipv4/tcp_ecn |
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
$ cat /etc/redhat-release | |
CentOS Linux release 7.1.1503 (Core) |
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
$ wget http://www.apache.org/dyn/closer.cgi/spark/spark-1.4.0/spark-1.4.0.tgz | |
$ tar zxvf spark-1.4.0-bin-hadoop2.6.tgz |