Skip to content

Instantly share code, notes, and snippets.

@rohitsuratekar
rohitsuratekar / rules.json
Created July 21, 2016 05:01
FIrebase Rules
{
"rules":{
// Normal users will have access to only "users"
"users":{
"$user_id":{
// grants access to the owner of this user account
// whose uid must exactly match the key ($user_id)
".write":"$user_id === auth.uid",
".read":"$user_id === auth.uid"
@rohitsuratekar
rohitsuratekar / libraryinstall.gradle
Last active August 11, 2016 12:12
Gradle script for library making
apply plugin: 'com.github.dcendents.android-maven'
group = publishedGroupId // Maven Group ID for the artifact
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
@rohitsuratekar
rohitsuratekar / bintrayinstall.gradle
Created August 11, 2016 07:23
Gradle Script for preparing library for bintry upload
apply plugin: 'com.jfrog.bintray'
version = libraryVersion
if (project.hasProperty("android")) { // Android libraries
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
// ==UserScript==// @name Anti-Disabler// @namespace http://diveintomark.org/projects/greasemonkey/// @description Restore context menus on sites that try to disable them// @include http://*// @include https://*// @exclude http://*.google.com/*// @exclude https://*.google.com/*// @exclude http://*.youtube.com/*// @exclude http://youtube.com/*// @exclude https://*.youtube.com/*// @exclude https://youtube.com/*// @exclude http://*.facebook.com/*// @exclude https://*.facebook.com/*// @exclude https://userscripts-mirror.org/*// @exclude https://userscripts-mirror.org/*// @exclude http://*.deviantart.com/*// @exclude http://www.jslint.com/*// @exclude https://www.jslint.com/*// @exclude file:///*/perf.html*// @exclude http://ninjakiwi.com/*// @exclude https://ninjakiwi.com/*// @exclude http://jsfiddle.net/*// @exclude https://jsfiddle.net/*// @exclude
@rohitsuratekar
rohitsuratekar / CDPDAGStructure.tex
Created February 15, 2018 13:33
Simple Latex code to generate CDPDAG (PubChem CID:53477914) structure !
\usepackage{chemfig}
\definesubmol{u}{-[:+30,.6]-[:-30,.6]}
\definesubmol{s}{O-[:0]\color{red}{P}(=[:90]O)(-[:270]OH)-[:0]O-[:0]CH_2
-[:270]CH_2(-[:0]O -([:90]=O)!u!u!u!u=!u!u!u!u)
(-[:270]CH (-[:0]O -([:270]=O)!u!u!u!u!u!u!u ))
}
\begin{figure}[h]
\chemfig[][scale=0.5]{
@rohitsuratekar
rohitsuratekar / BankAnalysis.py
Last active July 16, 2018 14:19
General statastical analysis of Banks in India
"""
Rohit Suratekar
Data file is downloaded from https://github.com/razorpay/ifsc/releases
Data Compilation is done by RazorPay
File has following columns
BANK,IFSC,BRANCH,ADDRESS,CONTACT,CITY,DISTRICT,STATE,RTGS
"""
import csv
from collections import Counter, defaultdict
"""
Rohit Suratekar
July 2018
Simple script to analyze Maps
"""
import os
import geopandas as gpd
import matplotlib.pylab as plt
import networkx as nx
"""
Rohit Suratekar
September 2018
Examples of newly developed library SecretColors
https://pypi.org/project/SecretColors/
"""
import matplotlib
import matplotlib.pylab as plt
import numpy as np
@rohitsuratekar
rohitsuratekar / orf_analysis.py
Last active September 15, 2018 12:39
Code used in the blog post "Grant Proposal, Science Book and Fiction"
"""
Rohit Suratekar
September 2018
We will use universal tagger for this analysis
http://www.nltk.org/book/ch05.html#tab-universal-tagset
I have not included text content of books and proposals to avoid any
copyright issues. You can download them from respective websites mentioned
below.
"""
from collections import Counter, defaultdict

Correct permission of all files from the folder

takeown /f "C:\path\to\folder" /r

icacls "C:\path\to\folder" /reset /T