Skip to content

Instantly share code, notes, and snippets.

Houssem Fathallah houssemFat

Block or report user

Report or block houssemFat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
#List unique values in a DataFrame column
#Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
#Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(value_list)]
houssemFat /
Last active Feb 24, 2016
a simple join at java
/* package whatever; // don't place package name! */
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.Set;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
public static void main (String[] args) throws java.lang.Exception
houssemFat / canvas_bkg.js
Created Apr 28, 2016 — forked from victusfate/canvas_bkg.js
creates a dynamic color pattern canvas on mouse move event
View canvas_bkg.js
var body, canvas, color, ctx, grad, canvasAdjust=true;
canvas = document.getElementsByTagName("canvas")[0];
ctx = null;
grad = null;
body = document.getElementsByTagName("body")[0];
color = 255;
if (canvas.getContext("2d")) {
var w = canvas.width;
var h = canvas.height;
ctx = canvas.getContext("2d");
houssemFat / leaflet-custom-map.html
Created May 4, 2016 — forked from MarZab/leaflet-custom-map.html
Leaflet with latlng scale in meters and Control.Scale to match
View leaflet-custom-map.html
<!DOCTYPE html>
<title>Leaflet Custom Simple Map Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="" />
<link rel="stylesheet" href="">
houssemFat /
Created May 12, 2016 — forked from soheilhy/
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

houssemFat / horizontal-infinite-carousel.html
Created Oct 11, 2016 — forked from dongyuwei/horizontal-infinite-carousel.html
infinite loop carousel(vertical or horizontal)
View horizontal-infinite-carousel.html
houssemFat /
Created Oct 24, 2016
Image tools processing
from PIL import Image
from math import floor
from PIL import ImageFilter
def cin():
pil_im ='test.png')
width = pil_im.width
height = pil_im.height
houssemFat / Dockerfile
Last active Nov 10, 2016
Ubuntu 14.04, nginx , passenger and http2
houssemFat /
Last active Nov 10, 2016
how to run 6.4 mqtt client connection with mqq
import paho.mqtt.client as mqtt
from os import path
import json
BASE_URL = "" ;
CHANNEL_ALL = 'common'
CLIENT = '/me-it'
class Client:
def __init__(self, name, suffix =""):
You can’t perform that action at this time.