Skip to content

Instantly share code, notes, and snippets.

View thangarajan8's full-sized avatar
💭
Learning to How to Learn

itsthanga thangarajan8

💭
Learning to How to Learn
View GitHub Profile
@thangarajan8
thangarajan8 / index.html
Created July 19, 2017 11:55
LineChart created by thangarajan8 - https://repl.it/J84m/7
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script src="index.js"></script>
@thangarajan8
thangarajan8 / mongodb_2_pandas.py
Created July 3, 2017 08:20 — forked from jmquintana79/mongodb_2_pandas.py
Functions to connect and read mongodb data to pandas df
import pandas as pd
from pymongo import MongoClient
# set connection with mongodb
def _connect_mongo(host, port, username, password, db):
""" A util for making a connection to mongo """
if username and password:
mongo_uri = 'mongodb://%s:%s@%s:%s/%s' % (username, password, host, port, db)
conn = MongoClient(mongo_uri)
@thangarajan8
thangarajan8 / import_csv_to_mongo
Created July 3, 2017 08:08 — forked from mprajwala/import_csv_to_mongo
Store CSV data into mongodb using python pandas
#!/usr/bin/env python
import sys
import pandas as pd
import pymongo
import json
def import_content(filepath):
mng_client = pymongo.MongoClient('localhost', 27017)

Windows System Metrics

Processes

  • system.proc.queue_length: The process queue length.
  • system.proc.count: The count of running processes.

Memory

@thangarajan8
thangarajan8 / clk.tsv
Created May 24, 2016 10:49 — forked from ceteri/clk.tsv
Intro to Apache Spark: code example for (K,V), join, operator graph
2014-03-04 15dfb8e6cc4111e3a5bb600308919594 11
2014-03-06 81da510acc4111e387f3600308919594 61
makeCacheMatrix <- function(x = numeric()) {
s <- NULL
set <- function(y) {
x <<- y
s <<- NULL
}
get <- function() x
setsolve <- function(solve) s <<- solve
getsolve <- function() s
list(set = set, get = get,
cacheSolve <- function(x, ...) {
s <- x$getsolve()
if(!is.null(s)) {
message("getting cached data")
return(s)
}
data <- x$get()
s <- solve(data, ...)
x$setsolve(s)
s