Skip to content

Instantly share code, notes, and snippets.

import os
import sys
import threading
import subprocess
import time
def create_child(id):
print("create_child >>> [{}] {} ".format(threading.get_ident(), id))
time.sleep(2)
@nirmalya123
nirmalya123 / secure_decrypted_text_handling.py
Created August 1, 2019 02:59
Encapsulating decrypted text handling in Python.
import sys
import os
import copy
import psutil
import socket
import pprint
import getpass
import argparse
import json
import requests
@nirmalya123
nirmalya123 / find_item_index_in_bitonic_array.py
Created July 18, 2018 19:08
Added find_item_index_in_bitonic_array.py.
# Find the index of an item in a Bitonic array
# Bitonic array is an array where the sequence first increases then decreases
arr1 = [99,100,102,103,104,55,50,40,20,10,6]
arr2 = [99,100,102,103,104,105]
arr3 = [55,50,40,20,10,6]
arr4 = [99,100,102,103,104,105,50]
arr5 = [110,55,50,40,20,10,6]
def find_max_bitonic(arr,lb, ub):
# Find the index of the max value in a Bitonic array
# Bitonic array is an array where the sequence first increases then decreases
arr1 = [99,100,102,103,104,55,50,40,20,10,6]
arr2 = [99,100,102,103,104,105]
arr3 = [55,50,40,20,10,6]
arr4 = [99,100,102,103,104,105,50]
arr5 = [110,55,50,40,20,10,6]
def find_max_bitonic(arr,lb, ub):
Test submission from linux
Test submission from linux
@nirmalya123
nirmalya123 / test1.txt
Created July 18, 2018 18:08
Test1 from web.
Test1 from web.