Skip to content

Instantly share code, notes, and snippets.

@tienhv
tienhv / demo.txt
Created June 24, 2015 13:55
a sample gist
Hey GitHub
@tienhv
tienhv / demo.txt
Created June 24, 2015 13:42
a sample gist
Hey GitHub
@tienhv
tienhv / list_dir.py
Created June 15, 2015 13:22
list file in directory
#http://josechristian.com/category/python/page/2/
How to make quick directory lists in python.
All of these will use listdir in the os module.
so we need to import it first
from os import listdir
Now we want to list all the files in a directory called my_folder.
#http://stackoverflow.com/questions/25212986/how-to-set-some-xlim-and-ylim-in-seaborn-lmplot-facetgrid
import pandas as pd
import seaborn as sns
import random
n = 200
random.seed(2014)
base_x = [random.random() for i in range(n)]
base_y = [2*i for i in base_x]
errors = [random.uniform(0,1) for i in range(n)]
START "converting RAWs to JPEG" "C:\Program Files (x86)\GIMP-2.0\bin\ufraw-batch.exe" --out-type=jpg %*
E:\Personal\Photos\Unix_Outing_17022013>”E:\Programs\GIMP 2\bin\ufraw-batch.exe”
–out-type=jpg –compression=95 *
Picasa
"""
Settings for root logger.
Log messages will be printed to console and also to log file (rotated, with
specified size). All log messages from used libraries will be also handled.
Three approaches for defining logging settings are used:
1. using logging classes directly (py25+, py30+)
2. using fileConfig (py26+, py30+)
3. using dictConfig (py27+, py32+)
Choose any variant as you like, but keep in mind python versions, that
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: Vincent
#
# Created: 23/04/2015
# Copyright: (c) Vincent 2015
# Licence: <your licence>
#-------------------------------------------------------------------------------
Pastebin.com is a website where you can store text for a certain period of time. The website is mainly used by programmers to store pieces of sources code or configuration information, but anyone is more than welcome to paste any type of text. The idea behind the site is to make it more convenient for people to share large amounts of text online