Skip to content

Instantly share code, notes, and snippets.

View mukkachaitanya's full-sized avatar
:electron:
Focusing

Chaitanya Mukka mukkachaitanya

:electron:
Focusing
View GitHub Profile
@mukkachaitanya
mukkachaitanya / timer.c
Created March 9, 2019 11:18
TCP timer explaantions
/*
* linux/net/sunrpc/timer.c
*
* Estimate RPC request round trip time.
*
* Based on packet round-trip and variance estimator algorithms described
* in appendix A of "Congestion Avoidance and Control" by Van Jacobson
* and Michael J. Karels (ACM Computer Communication Review; Proceedings
* of the Sigcomm '88 Symposium in Stanford, CA, August, 1988).
*
@mukkachaitanya
mukkachaitanya / CodeReview.md
Last active August 26, 2017 06:25
FR Pair Eval

Requirements

  • Input: Two csv files:

    • teams.csv : <memberID,teamID>
    • scores.csv : <memberID,score>
  • Output : a csv file

    • teamScores.csv : <memberID,score>
    • Grades both the teams memebers with the higeest score
  • End/Special cases :

  • If no team member submits, 0 for both

@mukkachaitanya
mukkachaitanya / function.js
Last active August 25, 2017 18:18
Callback
var assignTeamMarks = function(idNo, cb) {
var fetchTeamID =
"SELECT teamId FROM " +
tables.team +
" WHERE memberID = '" +
idNo +
"'";
connection.query(fetchTeamID, function(err, rows, fields) {
//if(rows.length!=0)
@mukkachaitanya
mukkachaitanya / exp.test.js
Created August 25, 2017 12:28
Catching exceptions
it("no db exists", function(done){
testConfig = {
db: "eval",
user: "root"
};
expect(input.sqlContents(testConfig, table)).to.exventually.throw("No contents in table");
});
@mukkachaitanya
mukkachaitanya / csv-sql.sql
Created August 14, 2017 15:39
Csv-to-sql
LOAD DATA LOCAL INFILE 'uniq.csv'
INTO TABLE tblUniq
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES
(uniqName, uniqCity, uniqComments)
@mukkachaitanya
mukkachaitanya / git-workflow.md
Created July 1, 2017 16:32 — forked from forest/git-workflow.md
Git Feature Branch Workflow

We subscribe to the Git Featrue Branch workflow, briefly described in that link.

In practice, it works as follows:

FEATURE DEVELOPMENT

Steps to Follow:

  1. Start with an updated local development branch -- by checking out the dev branch and pulling changes:
    git checkout development
    git pull origin development
@mukkachaitanya
mukkachaitanya / README-Template.md
Created July 18, 2016 07:07 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisities

import Tkinter as tk
class SampleApp(tk.Tk):
def __init__(self, *args, **kwargs):
tk.Tk.__init__(self, *args, **kwargs)
lb = tk.Listbox(self)
lb.insert("end", "one")
lb.insert("end", "two")
lb.insert("end", "three")
lb.bind("<Double-Button-1>", self.OnDouble)