Skip to content

Instantly share code, notes, and snippets.

View FaisalAl-Tameemi's full-sized avatar

Faisal Al Tameemi FaisalAl-Tameemi

View GitHub Profile
angular.module('d3AngularApp', ['d3'])
.directive('d3Bars', ['$window', '$timeout', 'd3Service',
function($window, $timeout, d3Service) {
return {
restrict: 'A',
scope: {
data: '=',
label: '@',
onClick: '&'
},

Rails and Form Helpers

The reference materials used for this lecture can be found at http://api.rubyonrails.org and http://guides.rubyonrails.org.

We also have to take a quick look at rails's flash object.

Rails Flash

The flash object allows you to set temporary messages that will

@FaisalAl-Tameemi
FaisalAl-Tameemi / 01-02.py
Created September 18, 2016 22:18 — forked from dimi-tree/01-02.py
Udacity: Machine Learning for Trading
# Working with multiple stocks
"""
SPY is used for reference - it's the market
Normalize by the first day's price to plot on "equal footing"
"""
import os
import pandas as pd
import matplotlib.pyplot as plt
@FaisalAl-Tameemi
FaisalAl-Tameemi / erc721-example.sol
Created April 21, 2018 20:56 — forked from aunyks/erc721-example.sol
My implementation of the ERC721 token standard. WARNING: THIS CODE IS FOR EDUCATIONAL PURPOSES. DO NOT DEPLOY TO THE NETWORK.
pragma solidity ^0.4.19;
contract ERC721 {
string constant private tokenName = "My ERC721 Token";
string constant private tokenSymbol = "MET";
uint256 constant private totalTokens = 1000000;
mapping(address => uint) private balances;
mapping(uint256 => address) private tokenOwners;
mapping(uint256 => bool) private tokenExists;
mapping(address => mapping (address => uint256)) private allowed;
mapping(address => mapping(uint256 => uint256)) private ownerTokens;
@FaisalAl-Tameemi
FaisalAl-Tameemi / build_directory.sh
Last active September 5, 2019 15:12 — forked from naesheim/buildWhenAffected.sh
CircleCi - only build features that has changed
set -e
# latest commit
LATEST_COMMIT=$(git rev-parse HEAD)
# latest commit where path/to/folder1 was changed
FOLDER1_COMMIT=$(git log -1 --format=format:%H --full-diff path/to/folder1)
# latest commit where path/to/folder2 was changed
FOLDER2_COMMIT=$(git log -1 --format=format:%H --full-diff path/to/folder2)