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
#!/usr/bin/env bash | |
## create an ubuntu 14.04 hvm instance, then from your home directory: | |
# 1. download this script | |
# wget https://gist.githubusercontent.com/waylonflinn/506f563573600d944923/raw/install-python-data-science.sh | |
# 2. make it executable | |
# chmod a+x install-python-data-science.sh |
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
# download and unpack distribution | |
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.6-linux-x86_64.tar.bz2 | |
tar xf phantomjs-1.9.6-linux-x86_64.tar.bz2 | |
# copy binary | |
cd phantomjs-1.9.6-linux-x86_64 | |
cp bin/phantomjs /usr/local/bin |
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
<toolSet name="Code Checking"> | |
<tool name="Flake8" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="true" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="/usr/local/bin/flake8" /> | |
<option name="PARAMETERS" value="--max-complexity 10 $FilePath$" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
<filter> | |
<option name="NAME" value="Filter 1" /> | |
<option name="DESCRIPTION" /> |
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
mkvirtualenv datascience | |
sudo apt-get install python-scipy libblas-dev liblapack-dev gfortran | |
sudo apt-get install libffi-dev # for cryptography from scrapy | |
sudo apt-get install libxslt-dev # for libxml from scrapy | |
export BLAS=/usr/lib/libblas.so | |
export LAPACK=/usr/lib/liblapack.so | |
pip install numpy | |
pip install scipy | |
pip install scikit-learn | |
pip install pandas |
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
from contextlib import contextmanager | |
@contextmanager | |
def block_system_import(): | |
block_import = ["os",'sys'] | |
saved = {} | |
import sys | |
for i in block_import: | |
saved[i] = sys.modules[i] | |
sys.modules[i] = None | |
yield None |
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 the OS X firewall enabled, you can remove the "Do you want the application "python" to accept incoming network connections?" message. | |
Create a self-signed certificate. | |
Open Keychain Access. Applications > Utilities > Keychain Access. | |
Keychain Access menu > Certificate Assistant > Create a Certificate... | |
Enter a Name like "My Certificate". | |
Select Identity Type: Self Signed Root | |
Select Certificate Type: Code Signing | |
Check the Let me override defaults box |
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
from Queue import Queue | |
from threading import Thread | |
from random import randrange | |
queue = Queue(10) | |
class Consumer(Thread): | |
def __init__(self, queue): | |
Thread.__init__(self) | |
self.queue = queue |
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/bash | |
# `` sudo sh install.sh `` | |
# Developement environnement | |
# Important: use 'i686' instead of 'x86_64' | |
# | |
# For stable environnement see also : https://gist.github.com/mickaelandrieu/6312724 | |
echo Installation de Phantomjs | |
cd /usr/local/share | |
sudo wget https://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2 |
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
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |
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
version: "3.3" | |
services: | |
mongo: | |
image: mongo:4.1.1 | |
restart: on-failure | |
command: --wiredTigerCacheSizeGB 3 | |
ports: | |
# Charts db is available under port 27018 to not block the default mongo port | |
- "8082:8081" |
OlderNewer