Skip to content

Instantly share code, notes, and snippets.

View haydarai's full-sized avatar

Haydar Ali Ismail haydarai

View GitHub Profile
/* Nyari sekolah yang deket traffic light */
SELECT name, ST_DISTANCE(geom, (SELECT geom from public."traffic lights" WHERE gid = 10))
FROM
public."school and universities"
WHERE ST_DISTANCE(geom, (SELECT geom from public."traffic lights" WHERE gid = 10)) < 1000
ORDER BY ST_DISTANCE ASC
{
"Discussion": {
"DiscussionID": "1",
"Type": null,
"ForeignID": "stub",
"CategoryID": "1",
"InsertUserID": "2",
"UpdateUserID": null,
"FirstCommentID": "1",
"LastCommentID": "48",
ArrayList<int> fibonaccip = new ArrayLiatt<int>();
fibonaccip.add(1);
int ip1
for (int i = 0; i < n; i++) {
int ip1;
if ((i - p - 1) > 0) {
ip1 = 0;
} else {
ip1 = i - p - 1;
@haydarai
haydarai / info.json
Last active November 2, 2016 04:39
Disease Information
{
"data": {
"paragraphs": [
{
"title": "First paragraph",
"image": "http://pasienia.com/1.jpg",
"content": "This is first paragraph",
"list": [
"This is first point",
"This is second point",
HttpURLConnection urlConnection = null;
BufferedReader reader = null;
String forecastJsonStr = null;
try {
String baseUrl = "http://api.openweathermap.org/data/2.5/forecast/daily?q=94043&mode=json&units=metric&cnt=7";
String apiKey = "&APPID=" + BuildConfig.OPEN_WEATHER_MAP_API_KEY;
URL url = new URL(baseUrl.concat(apiKey));
@haydarai
haydarai / Import statements.py
Created January 6, 2017 10:56
Importing required libraries
%matplotlib inline
import numpy as np
import pandas as pd
import scipy.stats as stats
import matplotlib.pyplot as plt
import sklearn
import statsmodels.api as sm
import seaborn as sns
@haydarai
haydarai / Dataset feature names.py
Created January 6, 2017 11:09
Check for feature names in the dataset
print(boston.feature_names)
@haydarai
haydarai / Dataset description.py
Created January 6, 2017 11:17
Check for Boston dataset description
print(boston.DESCR)
@haydarai
haydarai / Check target shape.py
Last active January 6, 2017 11:42
Check the target column shape
print(boston.target.shape)
@haydarai
haydarai / Import Boston Dataset.py
Last active January 6, 2017 13:22
Importing the Boston dataset from scikit-learn
from sklearn.datasets import load_boston
boston = load_boston()