Skip to content

Instantly share code, notes, and snippets.

View sachaarbonel's full-sized avatar
👨‍💻
Uncovering bugs

Sacha Arbonel sachaarbonel

👨‍💻
Uncovering bugs
View GitHub Profile
@sachaarbonel
sachaarbonel / cartodb-install-ubuntu-1204.md
Created October 11, 2016 14:42 — forked from arjendk/cartodb-install-ubuntu-1204.md
Installing CartoDB on Ubuntu Server 12.04

Installation

warning

CartoDB is guaranteed to run without any issue in Ubuntu 12.04 x64. This documentation describes the process to install CartoDB in this specific OS version.

However this doesn’t mean that it won’t work with other Operating Systems or other Ubuntu. There are also many successful installations on Amazon EC2, Linode, dedicated instances and development machines running OS X and Ubuntu 12.04+.

System requirements

@sachaarbonel
sachaarbonel / gist:2641a0eb48e274404a90ea193cfa0f76
Last active December 6, 2016 09:30
Practicing elasticsearch
PUT /gb
POST /gb/_close
PUT /gb/_settings
{
"analysis": {
"filter": {
"autocomplete_filter": {
@sachaarbonel
sachaarbonel / gist:c4f08524dd74d386e87ec5b3aea43d66
Last active December 31, 2016 14:45
Shell script pandirate : rate your neighboorhood !
#!/bin/bash
curl -X DELETE 'localhost:9200/pandirate'
sleep 1
curl -XPUT 'localhost:9200/pandirate?pretty' -d '
{
"mappings": {
"tag": {
"properties": {
"location": {
@sachaarbonel
sachaarbonel / gist:c0a29118dcaaa7f0665803a72ac74742
Last active February 23, 2017 08:21
Spark Install on Ubuntu
http://www.xavierdupre.fr/app/ensae_teaching_cs/helpsphinx/td_3a_spark.html#installation-de-spark-sous-linux
https://github.com/mGalarnyk/Installations_Mac_Ubuntu_Windows.git
@sachaarbonel
sachaarbonel / gist:092175a53e6496b16ffb0132f17616be
Created February 16, 2017 03:33
Estimation de pi par la méthode de monte carlo
def sample(p):
x, y = random(), random()
return 1 if x*x + y*y < 1 else 0
count = sc.parallelize(xrange(0, NUM_SAMPLES)).map(sample) \
.reduce(lambda a, b: a + b)
print "Pi is roughly %f" % (4.0 * count / NUM_SAMPLES)
from __future__ import print_function
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
https://github.com/quantopian/research_public/blob/master/presentations/How%20To%20-%20Estimate%20Pi.ipynb
re.sub(r'[^a-z0-9\s]','',text.lower().strip())