Skip to content

Instantly share code, notes, and snippets.

View mohamed-ali's full-sized avatar

Mohamed Ali Jamaoui mohamed-ali

View GitHub Profile
@mohamed-ali
mohamed-ali / conv_deconv_variational_autoencoder.py
Created February 23, 2016 10:20 — forked from Newmu/conv_deconv_variational_autoencoder.py
Prototype code of conv/deconv variational autoencoder, probably not runable, lots of inter-dependencies with local codebase =/
import theano
import theano.tensor as T
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
from theano.tensor.signal.downsample import max_pool_2d
from theano.tensor.extra_ops import repeat
from theano.sandbox.cuda.dnn import dnn_conv
from time import time
import numpy as np
from matplotlib import pyplot as plt
@mohamed-ali
mohamed-ali / index.html
Created December 16, 2015 12:33
Tunisia's map with governorates names
<!DOCTYPE html>
<meta charset="utf-8">
<style>
svg {
border: 1px solid #ccc;
}
path {
fill: #ccc;
@mohamed-ali
mohamed-ali / README.md
Created October 18, 2015 12:01 — forked from cjrd/README.md
Interactive tool for creating directed graphs using d3.js.

directed-graph-creator

Interactive tool for creating directed graphs, created using d3.js.

Demo: http://bl.ocks.org/cjrd/6863459

Operation:

  • drag/scroll to translate/zoom the graph
@mohamed-ali
mohamed-ali / index.html
Last active August 29, 2015 14:07
Satellite projection of Tunisia.
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.graticule {
fill: none;
stroke: #777;
}
.boundary {
@mohamed-ali
mohamed-ali / index.html
Last active August 29, 2015 14:06
D3.js HTML5 canvas Map of Tunisia.
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script>
var width = 960,
height = 700;
@mohamed-ali
mohamed-ali / index.html
Last active August 29, 2015 14:06
change projection on the fly, for map of Tunisia
<!DOCTYPE html>
<html>
<head>
<meta content="utf-8">
<style type="text/css">
svg {
border: 1px solid #ccc;
}
path {
@mohamed-ali
mohamed-ali / README.md
Last active September 30, 2015 02:16
d3.js and topoJson zoomable map of Tunisia
@mohamed-ali
mohamed-ali / README.md
Last active November 12, 2021 21:58
Map of Tunisia with d3.js
@mohamed-ali
mohamed-ali / getListOfMeasuresAndDimensions.sql
Created January 4, 2014 18:40
a SQLScript stored procedure to get the list of measures and dimension for a given OLAP cube (Analytic view) in SAP HANA
drop type measuresAndDimensionsType;
create type measuresAndDimensionsType as table("ATTRIBUTE_NAME" varchar(100),"DIMENSION_NAME" varchar(100), "ATTRIBUTE_DESCRIPTION" varchar(100), "ATTRIBUTE_TYPE" integer);
drop procedure getListOfMeasuresAndDimensions;
create procedure getListOfMeasuresAndDimensions(in currentCubeName varchar(100), in currentPackageName varchar(100), out outputResults measuresAndDimensionsType)
language sqlscript as
cursor listOfDimensions for select distinct "DIMENSION_NAME"
from "_SYS_BI"."BIMC_DIMENSIONS" where "CUBE_NAME"='KDD' and
@mohamed-ali
mohamed-ali / lexer.py
Created January 4, 2014 13:34
a simple python lexer for HTML
import ply.lex as lex
#list of tokens
tokens = (
'LANGLE', #<
'LANGLESLASH', #</
'RANGLE', #>
'EQUAL', # =
'STRING', # "hello"
'WORD', # Welcome!