Skip to content

Instantly share code, notes, and snippets.

View ShekharReddy4's full-sized avatar
💻
Graduated

Shekhar Reddy ShekharReddy4

💻
Graduated
  • Texas
  • 04:17 (UTC -05:00)
View GitHub Profile
@ShekharReddy4
ShekharReddy4 / generate-cnf.js
Created November 16, 2021 08:34 — forked from huyen-nguyen/generate-cnf.js
Generate DIMACS CNF formula for N-queens problem
// helper functions
// cnf formula exactly one of the variables in the chosen list to be true
function ext_one(list) {
let temp = ""
temp=temp+atl_one(list)
temp=temp+atm_one(list)
return temp
}
@ShekharReddy4
ShekharReddy4 / explanation.md
Created May 10, 2018 21:29 — forked from masak/explanation.md
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

Inspired by this article. Neat tricks for speeding up integer computations.

Note: cin.sync_with_stdio(false); disables synchronous IO and gives you a performance boost. If used, you should only use cin for reading input (don't use both cin and scanf when sync is disabled, for example) or you will get unexpected results.

Multiply by a power of 2

x = x << 1; // x = x * 2

@ShekharReddy4
ShekharReddy4 / README.md
Created October 21, 2017 10:54 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@ShekharReddy4
ShekharReddy4 / C implementation
Created August 10, 2017 11:41 — forked from sandromello/C implementation
MD5 and TripleDES - C# and Python implementation
using System.Security.Cryptography;
class Program
{
static void Main(string[] args)
{
var privatekey = "RN4nog0661VvjzphNg48372t747365mNfSxirueSDYstqsqeQn?=";
var skey = "e99308c2e3373fb041775a0c813f397d";
var c = new Program();
var encrypted = c.crypto(skey, privatekey, "encrypt");
@ShekharReddy4
ShekharReddy4 / README-Template.md
Created April 5, 2017 16:54 — 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.

Prerequisites

@ShekharReddy4
ShekharReddy4 / analysis.ipynb
Created January 2, 2017 09:30 — forked from minrk/analysis.ipynb
running one notebook from another
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ShekharReddy4
ShekharReddy4 / xlsxParser.js
Created November 5, 2016 16:23 — forked from trevordixon/xlsxParser.js
Parse an Excel xlsx file with javascript, jquery, and zip.js
/*
Relies on jQuery, underscore.js, Async.js (https://github.com/caolan/async), and zip.js (http://gildas-lormeau.github.com/zip.js).
Tested only in Chrome on OS X.
Call xlsxParser.parse(file) where file is an instance of File. For example (untested):
document.ondrop = function(e) {
var file = e.dataTransfer.files[0];
excelParser.parse(file).then(function(data) {
console.log(data);
@ShekharReddy4
ShekharReddy4 / readme.md
Created August 21, 2016 07:47 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@ShekharReddy4
ShekharReddy4 / War Movies List
Created August 8, 2016 04:06 — forked from bastos/War Movies List
War Movies List
ok 25. The Pianist (2002)
24. Seargeant York (1941)
23. Stalag 17 (1953)
ok 22. The Thin Red Line (1998)
21. The African Queen (1951)
20. MASH (1970)
19. Downfall (2005)
18. Patton (1970)
17. All Quiet on the Western Front (1930)
ok 16. Letters from Iwo Jima (2006)