Skip to content

Instantly share code, notes, and snippets.

Pramod Kotipalli p13i

Block or report user

Report or block p13i

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
@p13i
p13i / LevenshteinStringSimilarityIndex.java
Created Aug 13, 2019
Produces a 0.0 to 1.0 index of the similarity between two strings using the Levenshtein edit distance function
View LevenshteinStringSimilarityIndex.java
package io.p13i.ra.similarity;
import io.p13i.ra.utils.Assert;
import io.p13i.ra.cache.ICache;
import io.p13i.ra.cache.LimitedCapacityCache;
import io.p13i.ra.utils.Tuple;
import java.util.Objects;
View BufferingLogFileWriter.java
import java.io.Closeable;
import java.io.Flushable;
import java.io.PrintWriter;
import java.util.LinkedList;
import java.util.Queue;
import java.util.logging.Logger;
/**
* Writes log files to a after a specified number of items are writen to the buffer
View 2019-07-07 | Glass Notes observations.md
  • One side effect of using GitHub Gists as a data store is the ability to track how documents change over time, in addition to their current contents. It's really fun to see how documents change over time!

  • The automatic saving feature to a cloud service is incredibly reassuring for me.

Next features

  • A menu status bar at all times at the top of the screen showing the current time, updated every second, and status of the app

  • Ability to modify certain settings like the API oAuth keys and preferred update duration online, perhaps by using a QR code read by Glass populated online that conveys JSON information

    • achieved for the time-being: using uncommitted Preferences.java file that the developer will have to fill out
@p13i
p13i / JSON.swift
Created Feb 15, 2018
Simple JSON wrapper for Foundation's JSONEncoder and JSONDecoder
View JSON.swift
//
// JSON.swift
//
// Created by Pramod Kotipalli on 11/1/17.
// Copyright © 2017 Pramod Kotipalli. All rights reserved.
//
import Foundation
public class JSON {
@p13i
p13i / frameworks.txt
Created Sep 6, 2016
Common CSS frameworks
View frameworks.txt
(In order of complexity)
Skeleton CSS (http://getskeleton.com/)
Foundation (http://foundation.zurb.com/)
Bootstrap (http://getbootstrap.com/)
Materialize CSS (http://materializecss.com/)
Angular Material (https://material.angularjs.org/latest/)
View Find Dec 25ths that are Wednesdays.py
import math
def findDayOfWeek(month, day, year):
monthCode = getMonthCode(month, year)
yearCode = getYearCode(year)
dayOfWeekNumber = day + monthCode + yearCode
daysOfWeek = dict({
View Finding GCD.py
import math
def GCD(a , b):
if(b == 0):
return a
return GCD(b, a - math.floor(a/b)*b)
# Input values here and run
print(GCD(9876, 54321))
View Finding_PPTs.js
// FOR THE PURPOSES of this code sample, some code essential
// for the functioning of this script was removed.
// Please view the "Finding PPTs" page source of
// http://pramodk.net/GT/MATH2803/PPTs/
// to see a functional example.
$("input[name='submit']").click(function () { // Upon clicking the submit button, run this function
// Get the input values
var maxS = $("input[name='s_bound']").val();
You can’t perform that action at this time.