Skip to content

Instantly share code, notes, and snippets.

View galleon's full-sized avatar
🏠
Working from home

Guillaume Alleon galleon

🏠
Working from home
  • Toulouse
  • 05:43 (UTC +02:00)
View GitHub Profile
@galleon
galleon / gist:6123079
Created July 31, 2013 15:35
brew install --verbose homebrew/science/vtk --with-qt
==> Downloading http://www.vtk.org/files/release/5.10/vtk-5.10.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/vtk-5.10.1.tar.gz
tar xf /Library/Caches/Homebrew/vtk-5.10.1.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file Wrapping/Python/setup_install_paths.py
brew: Appending to PYTHONPATH: /usr/local/Cellar/vtk/5.10.1/lib/python2.7/site-packages
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/vtk/5.10.1 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DVTK_REQUIRED_OBJCXX_FLAGS='' -DVTK_USE_CARBON=OFF -DVTK_USE_TK=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON -DIOKit:FILEPATH=/System/Library/Frameworks/IOKit.framework -DCMAKE_INSTALL_RPATH:STRING=/usr/local/Cellar/vtk/5.10.1/lib/vtk-5.10 -DCMAKE_INSTALL_NAME_DIR:STRING=/usr/local/Cellar/vtk/5.10.1/lib/vtk-5.10 -DBUILD_EXAMPLES=OFF -DVTK_USE_GUISUPPORT=ON -DVTK_USE_QT=ON -DVTK_USE_QVTK=ON -DVTK_USE_COCOA=ON -DVTK_WRAP_PYTHON=ON -DPYTHON_INCLUDE_DIR='/System/Library/Frameworks/Python.framework/Versions/2.7/Head
@galleon
galleon / gist:1f1498b016125fbcb9cf
Created December 4, 2014 17:23
ES date & aggregations
curl -XPOST "http://localhost:9200/myindex/"
curl -XPOST "http://localhost:9200/myindex/travel/_mapping" -d '
{
"travel": {
"properties": {
"end_date": {
"format": "dateOptionalTime",
"type": "date"
},
import wordcloud.PolarWordCloud
import wordcloud.CollisionMode
import wordcloud.PolarBlendMode
import wordcloud.bg.CircleBackground
import wordcloud.bg.PixelBoundryBackground
import wordcloud.bg.RectangleBackground
import wordcloud.font.CloudFont
import wordcloud.font.FontWeight
import wordcloud.font.scale.LinearFontScalar
import wordcloud.font.scale.SqrtFontScalar
@galleon
galleon / gist:362b5b2d21878bfd1dd2
Created June 25, 2015 17:30
Zeppelin build error
toggy:incubator-zeppelin tog$ git pull
Already up-to-date.
toggy:incubator-zeppelin tog$ mvn -e -DskipTests clean package
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.zeppelin:zeppelin-spark:jar:0.6.0-incubating-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.scala-tools:maven-scala-plugin is missing. @ line 916, column 15
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.zeppelin:zeppelin-flink:jar:0.6.0-incubating-SNAPSHOT
import org.apache.spark.api.java.JavaSparkContext
def ctx = new JavaSparkContext("local", "GroovySparkPi")
def slices = 1000
def n = 10000 * slices
def l = 0..n
def dataSet = ctx.parallelize(l, slices)
def count = dataSet.map({
def x = Math.random() * 2 - 1
@galleon
galleon / GroovySparkWordcount.groovy
Last active November 15, 2015 18:33
GroovySparkWordcount.groovy
@Grab('org.apache.spark:spark-core_2.10:1.5.2')
import org.apache.spark.SparkConf
import org.apache.spark.api.java.JavaSparkContext
def conf = new SparkConf().setMaster("local[2]").setAppName("WordCount")
println conf
def ctx = new JavaSparkContext(conf)
import groovy.lang.Binding;
import groovy.lang.GroovyShell;
import org.codehaus.groovy.control.CompilerConfiguration;
import org.codehaus.groovy.control.MultipleCompilationErrorsException;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
@galleon
galleon / Tests JSBSIM.ipynb
Created November 24, 2019 07:08
Small experiment using JSBSim python api
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@galleon
galleon / delete_git_submodule.md
Created August 18, 2020 10:24 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule