Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Saran Ahluwalia ahlusar1989

🎯
Focusing
Block or report user

Report or block ahlusar1989

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ahlusar1989
ahlusar1989 / YeoJohnson.py
Created Jun 13, 2019 — forked from mesgarpour/YeoJohnson.py
Yeo-Johnson Transformation
View YeoJohnson.py
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import warnings
import numpy as np
import pandas as pd
import sys
__author__ = "Mohsen Mesgarpour"
__copyright__ = "Copyright 2016, https://github.com/mesgarpour"
__credits__ = ["Mohsen Mesgarpour"]
View unemployment.csv
FIPS_code County State unemployment
01001 Autauga County Alabama 5.9
01003 Baldwin County Alabama 6.1
01005 Barbour County Alabama 10.5
01007 Bibb County Alabama 7.2
01009 Blount County Alabama 6.1
01011 Bullock County Alabama 8.8
01013 Butler County Alabama 8.5
01015 Calhoun County Alabama 8.0
01017 Chambers County Alabama 6.7
View routes.js
import React from 'react';
import App from './containers/AppContainer';
import Login from './containers/LoginContainer';
import Signup from './containers/SignUpContainer';
import MapContainer from './containers/MapContainer';
import ListingsContainer from './containers/ListingsContainer';
import createBrowserHistory from 'history/createBrowserHistory'
import { Router, Route, Switch, Redirect } from 'react-router-dom';
const history = createBrowserHistory()
View map.html
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<style>
</style>
<script type="text/javascript">
function now() {
return new Date().toLocaleDateString()
}
</script>
View route.js
const jsreport = require("jsreport-core")();
const { fetchReportTemplate } = require("../reports/report-template");
const router = require('express').Router()
const fs = require('fs');
const express = require('express');
const path = require('path');
const reportingApp = express();
jsreport.use(require('jsreport-express')({ app: reportingApp }));
jsreport.use(require('jsreport-chrome-pdf')());
@ahlusar1989
ahlusar1989 / GibbsLDA.py
Created Mar 23, 2018 — forked from ChangUk/GibbsLDA.py
Collapsed Gibbs sampler for Latent Dirichlet Allocation
View GibbsLDA.py
#-*- coding: utf-8 -*-
"""
GIBBS SAMPLING IMPLEMENTATION FOR LATENT DIRICHLET ALLOCATION (2003)
IMPLEMENTED BY CHANG-UK, PARK
DATA FORMAT: "DocID\t WordID\t FREQUENCY\n"
"""
import sys
import random
View listdeps.js
/* global require, exports */
var walkdir = require('walkdir'),
fs = require('fs'),
readInstalled = require('read-installed'),
emitter = require('events').EventEmitter;
function listdep(parent, dep, level, deps) {
var stack = [];
View data.json
{
"name": "petal length (cm) > 2.45000004768",
"children": [
{
"name": "petal width (cm) > 1.75",
"children": [
{
"name": "petal length (cm) > 4.85000038147",
"children": [
{
@ahlusar1989
ahlusar1989 / jupyter-google-cloud.md
Last active Jan 4, 2018 — forked from valentina-s/jupyter-google-cloud.md
Jupyter Notebook on Google Cloud Compute Instance
View jupyter-google-cloud.md

On Instance:

pip install jupyter[notebook]

jupyter notebook --generate-config

# nano .jupyter/jupyter_notebook_config.py

echo "c = get_config()
c.NotebookApp.ip = '*'
@ahlusar1989
ahlusar1989 / pytorch_keras_gcloud.txt
Created Jan 2, 2018 — forked from motiur/pytorch_keras_gcloud.txt
Keras and Pytorch in Google Cloud VM
View pytorch_keras_gcloud.txt
# This script is designed to work with ubuntu 16.04 LTS
# with keras 1.2.2 and the latest Pytorch with CUDA 8 support
##########################################################################
#This is used to install CUDA 8 driver for Tesla K80
##########################################################################
#!/bin/bash
echo "Checking for CUDA and installing."
# Check for CUDA and try to install.
if ! dpkg-query -W cuda-8-0; then
You can’t perform that action at this time.