Skip to content

Instantly share code, notes, and snippets.

@piroux
piroux / hello.py
Created October 23, 2010 10:35
Hello World for the microframework Flask in python
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return "Hello World!"
if __name__ == '__main__':
app.run()
#!/bin/sh
sudo apt-get install -y python2.6 python-virtualenv
sudo apt-get install -y libamd2.2.0 libblas3gf libc6 libgcc1 libgfortran3 liblapack3gf libumfpack5.4.0 libstdc++6 build-essential gfortran libatlas-sse2-dev python-all-dev
python2.6 virtualenv --no-site-package --distribute scilab
cd ./scilab
source ./bin/activate
@piroux
piroux / install_scilab.sh
Created December 5, 2010 00:30
Install pylab on Ubuntu 10.04 (december 2010)
#!/bin/bash
CURWD=$(pwd)
ENVHOME=scilab
sudo apt-get -qq update &&
sudo apt-get -qq install -y python2.6 python-virtualenv &&
sudo apt-get -qq install -y libamd2.2.0 libblas3gf libc6 libgcc1 libgfortran3 liblapack3gf libumfpack5.4.0 libstdc++6 build-essential gfortran libatlas-sse2-dev python-all-dev
if [ -d ./$ENVHOME ]

pysandbox is a Python sandbox. By default, untrusted code executed in the sandbox cannot modify the environment (write a file, use print or import a module). But you can configure the sandbox to choose exactly which features are allowed or not, eg. import sys module and read /etc/issue file.

Website: http://github.com/haypo/pysandbox/

Features

@piroux
piroux / designer.html
Created November 2, 2015 21:42
designer
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-element">
<template>
<style>
# Uncrustify 0.60
#
# General options
#
# The type of line endings
newlines = auto # auto/lf/crlf/cr
# The original size of tabs in the input
target triple = "x86_64-none-linux-gnu"
declare i32 @printf(i8*, ...) nounwind
declare i32* @malloc(i32) nounwind
declare void @free(i32*) nounwind
@format_int_s = internal constant [3 x i8] c"%d\00"
[web]
browser = google-chrome
[user]
name = Pierre Roux
email = pierre.roux01@gmail.com
[color]
ui = auto
branch = auto
diff = auto
interactive = auto
function FindProxyForURL(url, host) {
// access the CIMCs via the SSH-tunneled SOCKS proxy that is hopefully
// running on port 8181, but allow fallback if it's not running
if (isInNet(dnsResolve(host), "10.0.7.0", "255.255.255.0")) {
return "SOCKS localhost:8181; DIRECT";
}
// Everything else directly!
return "DIRECT";
}