Skip to content

Instantly share code, notes, and snippets.

View mostaphaRoudsari's full-sized avatar

Mostapha Sadeghipour Roudsari mostaphaRoudsari

View GitHub Profile
@mostaphaRoudsari
mostaphaRoudsari / HTML5 progress bar update.html
Created March 30, 2015 23:30
An example of updating progress bar inside multiple loops. I assume there should be a smarter way to do it but for now this works for me
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<div class="col-xs-12">
<progress style="width:50%" value="0" max="100" id="progBar">
<span id="calcProgress">
<!-- Fallback goes here -->
</span>
</progress>
</div>
@mostaphaRoudsari
mostaphaRoudsari / README.md
Last active December 31, 2015 15:52
Reusable Stacked Chart: Ladybug group interactions
@mostaphaRoudsari
mostaphaRoudsari / README.md
Last active December 31, 2015 15:55
Reusable Area Chart: Ladybug group interactions

This example is code originally written by Mike Bostock in 2012 as part of his tutorial Towards Reusable Charts. Curran put together a bl.ock Towards Reusable Charts Example based on the post which I forked from to create this bl.ock and learn more about re-usable charts and a step forward to write Ladybug for web.

Here are some learning resources related to this example from Curran's bl.ock:

@mostaphaRoudsari
mostaphaRoudsari / README.md
Last active December 31, 2015 21:34
Heatmap (Canvas + D3)
@mostaphaRoudsari
mostaphaRoudsari / .block
Last active April 27, 2017 15:28
simple pie chart for comfort
license: mit
@mostaphaRoudsari
mostaphaRoudsari / .block
Last active April 29, 2017 22:00
getting started with A-Frame
license: mit
@mostaphaRoudsari
mostaphaRoudsari / .block
Last active April 30, 2017 02:05
generate simple mass
license: mit
@mostaphaRoudsari
mostaphaRoudsari / redirect.py
Created June 17, 2017 00:31
Redirect print to a variable
"""
Redirect print to a variable.
"""
from cStringIO import StringIO
import sys
originalStdout = sys.stdout
sys.stdout = newStdout = StringIO()
@mostaphaRoudsari
mostaphaRoudsari / gendaylit_test.c
Last active July 12, 2017 00:12
code to test gendaylit against the python version
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
float coeff_perez[] = {
1.3525,-0.2576,-0.2690,-1.4366,-0.7670,0.0007,1.2734,-0.1233,2.8000,0.6004,1.2375,1.000,1.8734,0.6297,
0.9738,0.2809,0.0356,-0.1246,-0.5718,0.9938,-1.2219,-0.7730,1.4148,1.1016,-0.2054,0.0367,-3.9128,0.9156,
6.9750,0.1774,6.4477,-0.1239,-1.5798,-0.5081,-1.7812,0.1080,0.2624,0.0672,-0.2190,-0.4285,-1.1000,-0.2515,
@mostaphaRoudsari
mostaphaRoudsari / .block
Created July 17, 2017 12:44
01_workshop_select and append
license: mit