Skip to content

Instantly share code, notes, and snippets.

View kumarsuraj9450's full-sized avatar

Kumar Suraj kumarsuraj9450

  • Gorakhpur,UP,India
View GitHub Profile
@kumarsuraj9450
kumarsuraj9450 / zombies.md
Created October 26, 2020 07:47 — forked from defunkt/zombies.md
—All You Zombies— by Robert A. Heinlein

All You Zombies

2217 Time Zone V (EST) 7 Nov. 1970--NTC-- "Pop's Place": I was polishing a brandy snifter when the Unmarried Mother came in. I noted the time---10:17 P. M. zone five, or eastern time, November 7th, 1970. Temporal agents always notice time and date; we must.

The Unmarried Mother was a man twenty--five years old, no taller than I am, childish features and a touchy temper. I didn't like his looks---I never had---but he was a lad I was here to recruit, he was my boy. I gave him my best barkeep's smile.

Maybe I'm too critical. He wasn't swish; his nickname came from what he always said when some nosy type asked him his line: "I'm an unmarried mother." If he felt less than murderous he would add: "at four cents a word. I write confession stories."

If he felt nasty, he would wait for somebody to make something of it. He had a lethal style of infighting, like a female cop---reason I wanted him. Not the only one.

from DoublyLinkedList import DoublyLinkedList,node_ll
class CustomDLL(DoublyLinkedList):
def add_node(self, key, value):
n = self.headNode
if n.value == None:
self.headNode.value = value
self.headNode.key = key
import os,msvcrt
class node_ll:
def __init__(self, data = None):
self.val = data
self.pointer = None
def __repr__(self):
return str(self.val)
from collections import defaultdict
from linkedList import LinkedList
import random
import math
class node:
def __init__(self,val = None, left = None, right = None, parent = None):
self.val = val
self.right = right
self.left = left
from collections import defaultdict
from linkedList import LinkedList
import random
import math
class node:
def __init__(self,val = None, left = None, right = None, parent = None):
self.val = val
self.right = right
self.left = left
s = '13242523423451325gkhjhbjhjfkghchkfvjklfhl151556647465132'
# s = '12sd465yui'
# s = 'ewrdsdafdsfasyui12324435'
if s[0] in list('1234567890'): a = [(1,0)]
else: a = [(0,1)]
uidx = 0
diff = 999
for e in s[1:] :
# moderate20.py
keys = [list('abc'),
list('def'),
list('ghi'),
list('jkl'),
list('mno'),
list('pqrs'),
list('tuv'),
list('wxyz')]
from msvcrt import getche
s = '0'
curr = ''
while True:
print('\nPRESS "Q" To EXIT')
try: e = eval(s)
except: e = eval(s[:-1])
import math
def permute(n,k):
string = list('123456789'[:-9+n if n!=9 else None])
curr = []
F = math.factorial(n)
fac = n
while n != 0:
f = F//fac
mat = [[3,2,0,4],
[0,5,6,9],
[7,8,9,1]]
# print(len(mat[0]))
index = []
for i in range(len(mat)):
for j in range(len(mat[0])):
if mat[i][j] == 0:
index.extend([i,j])