Skip to content

Instantly share code, notes, and snippets.

View khayyamsaleem's full-sized avatar
🏠
Working from home

khayyam khayyamsaleem

🏠
Working from home
View GitHub Profile
def getBit(n, x):
return n&(1<<x)
def setBit(n,x,b):
return n&(~(1<<x)) if b == 0 else n|(1<<x)
def encodeChunk(word):
output = 0
for i,char in enumerate(map(ord, word)):
for c,j in enumerate(range(i,32,4)):
def getBit(n, x):
return n&(1<<x)
def setBit(n,x,b):
return n&(~(1<<x)) if b == 0 else n|(1<<x)
def encodeChunk(word):
output = 0
for i,char in enumerate(map(ord, word)):
for c,j in enumerate(range(i,32,4)):
inp = list(map(ord, "ryan"))
output = 0
getBit = lambda n,x: n&(1<<x)
setBit = lambda n,x,b: n&(~(1<<x)) if b == 0 else n|(1<<x)
for i in range(len(inp)):
print("input[i]", inp[i])
c = 0
for j in range(i,32,4):
{"status":"ok","totalResults":38,"articles":[{"source":{"id":"nbc-news","name":"NBC News"},"author":"Doha Madani","title":"2 dead, 8 others injured in Greenville, South Carolina, nightclub shooting - NBC News","description":"Two people were killed and another eight injured during a nightclub shooting in Greenville, South Carolina, early Sunday.","url":"https://www.nbcnews.com/news/us-news/2-dead-8-others-injured-greenville-south-carolina-nightclub-shooting-n1232927","urlToImage":"https://media4.s-nbcnews.com/j/newscms/2019_01/2705191/nbc-social-default_b6fa4fef0d31ca7e8bc7ff6d117ca9f4.nbcnews-fp-1200-630.png","publishedAt":"2020-07-05T16:00:35Z","content":"Two people were killed and another eight injured during a nightclub shooting in Greenville, South Carolina, during a musical performance early Sunday.\r\nDeputies who had been patrolling in the area ru… [+2494 chars]"},{"source":{"id":null,"name":"New York Post"},"author":"Howie Kussoy","title":"Redskins are total disaster as Dan Snyder mulls name change -
[
{
"source": {
"id": "nbc-news",
"name": "NBC News"
},
"author": "Doha Madani",
"title": "2 dead, 8 others injured in Greenville, South Carolina, nightclub shooting - NBC News",
"description": "Two people were killed and another eight injured during a nightclub shooting in Greenville, South Carolina, early Sunday.",
"url": "https://www.nbcnews.com/news/us-news/2-dead-8-others-injured-greenville-south-carolina-nightclub-shooting-n1232927",
@khayyamsaleem
khayyamsaleem / docker-compose.yml
Last active June 18, 2020 16:20
setup for Neo4j
version: '3'
services:
neo4j:
image: neo4j
ports:
- "7687:7687"
- "7474:7474"
environment:
NEO4J_AUTH: none
import java.util.*;
/**
* Class to represent an undirected graph as an adjacency list
*/
public class Graph<E>{
private Map<E,List<E>> graph;
/**
import java.util.*;
/**
* Class to represent an undirected graph as an adjacency list
*/
public class Graph<E>{
private Map<E,List<E>> graph;
/**
import java.util.*;
/**
* Class to represent an undirected graph as an adjacency list
*/
public class Graph<E>{
private Map<E,List<E>> graph;
private static class Pair<E> {

Keybase proof

I hereby claim:

  • I am khayyamsaleem on github.
  • I am khayyam (https://keybase.io/khayyam) on keybase.
  • I have a public key whose fingerprint is 6904 842E F791 2F16 8098 0C9D DC66 6D4B 592C 02F1

To claim this, I am signing this object: