Skip to content

Instantly share code, notes, and snippets.

View faisal-w's full-sized avatar

Faisal Wirakusuma faisal-w

  • Jakarta East Customs Software
  • Jakarta, Indonesia
View GitHub Profile
@faisal-w
faisal-w / ws_geo_geojson.php
Created June 7, 2020 05:34 — forked from mjfoster83/ws_geo_geojson.php
Dirt-Simple PostGIS HTTP Rest API: Get GeoJSON
<?php
/*
Get GeoJSON
Returns a GeoJSON from your table.
Based on:
https://github.com/bmcbride/PHP-Database-GeoJSON by Brian McBride
To be used with the Dirt-Simple PostGIS HTTP API:
https://github.com/tobinbradley/dirt-simple-postgis-http-api by @tobinbradley
*/
@faisal-w
faisal-w / automobile.ipynb
Created September 20, 2017 10:04 — forked from martinwicke/automobile.ipynb
Estimator demo using Automobile dataset
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@faisal-w
faisal-w / BagOfFeatures.py
Created August 4, 2017 15:21 — forked from alfredplpl/BagOfFeatures.py
This is a class of Bag-of-Features for OpenCV
import cv2
import numpy as np
class BagOfFeatures:
"""This is a class of Bag-of-Features by K-means for OpenCV"""
codebookSize=0
classifier=None
def __init__(self, codebookSize):
self.codebookSize=codebookSize
self.classifier=cv2.KNearest()
@faisal-w
faisal-w / server.R
Created April 4, 2017 03:06 — forked from trestletech/server.R
A Shiny app combining the use of dplyr and SQLite. The goal is to demonstrate a full-fledged, database-backed user authorization framework in Shiny.
library(shiny)
library(dplyr)
library(lubridate)
# Load libraries and functions needed to create SQLite databases.
library(RSQLite)
library(RSQLite.extfuns)
saveSQLite <- function(data, name){
path <- dplyr:::db_location(filename=paste0(name, ".sqlite"))
@faisal-w
faisal-w / geoserver.conf
Created January 24, 2017 13:09 — forked from thanhleviet/geoserver.conf
Setting up proxy for geoserver with nginx
Tested on nginx version 1.1.9, ubuntu 12.04
-Command lines in order:
sudo touch /etc/nginx/site-availables/geoserver.conf
sudo vi /etc/nginx/site-availables/geoserver.conf
sudo ln -s /etc/nginx/site-availables/geoserver.conf /etc/nginx/site-enabled/geoserver.conf
sudo service nginx start
Content of geoserver.conf
server {
@faisal-w
faisal-w / config.py
Created June 29, 2016 19:27 — forked from bonzanini/config.py
Twitter Stream Downloader
consumer_key = 'your-consumer-key'
consumer_secret = 'your-consumer-secret'
access_token = 'your-access-token'
access_secret = 'your-access-secret'

Credit Card Fraud Detection

This interactive Neo4j graph tutorial covers a common credit card fraud detection scenario.


@faisal-w
faisal-w / System Design.md
Created April 19, 2016 15:27 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
"""
This example requires the body-streaming tornado fork at https://github.com/nephics/tornado.
Refer to http://groups.google.com/group/python-tornado/browse_thread/thread/791c67cb86c2dea2.
Supports uploading an unlimited number/size of files in a single
PUT multipart/form-data request. Each file is processed as the stream
finds the part in the form data.
==USAGE==