Skip to content

Instantly share code, notes, and snippets.

View lunaroyster's full-sized avatar

Arnav Bansal lunaroyster

View GitHub Profile
// List all files in a directory in Node.js recursively in an asynchronous fashion
let walkAsync = async(dir, filelist)=> {
if( dir[dir.length-1] != '/') dir=dir.concat('/')
let fse = fse || require('fs-extra'),
files = await fse.readdir(dir);
filelist = filelist || [];
for (let file of files) {
if ((await fse.stat(dir + file)).isDirectory()) {
class ITEMINFO:
def __init__(self, ICode, Item, Price, Qty, Discount):
self.ICode = ICode
self.Item = Item
self.Price = Price
self.Qty = Qty
self.Discount = Discount
# self.Netprice =
def FindDisc(self):
pass;
print sorted(input("Enter your Strings: "), key=lambda string: len(string))