Skip to content

Instantly share code, notes, and snippets.

View Sarvesh-CSE's full-sized avatar

Sarvesh Pandey Sarvesh-CSE

  • Banaras Hindu University
  • Varanasi, India
View GitHub Profile
@horeaporutiu
horeaporutiu / demoContract.js
Last active July 9, 2023 11:40
a Hyperleger Smart Contract that is able to retrieve the history of updates for a certain key
'use strict';
const { Contract } = require('fabric-contract-api');
class MyContract extends Contract {
//add a member along with their email, name, address, and number
async addMember(ctx, email, name, address, phoneNumber) {
let member = {
name: name,
address: address,
@NikhilAshodariya
NikhilAshodariya / Divide.asm
Created August 29, 2017 17:25
Assembly language program to divide two 8-bit nos
;Division
ansprint macro res
mov dl,res
add dl,30h
mov ah,02h
int 21h
endm
data segment
@affo
affo / 2pc.py
Created October 17, 2016 11:06
Implementation of 2 Phase Commit protocol
'''
Implementation of 2 Phase Commit as explained at Wikipedia:
https://en.wikipedia.org/wiki/Two-phase_commit_protocol
'''
import random, logging, time
from threading import Thread, Semaphore, Lock
_fmt = '%(user)s:%(levelname)s >>> %(message)s'
logging.basicConfig(format=_fmt)
LOG = logging.getLogger(__name__)
@rvanbruggen
rvanbruggen / linkedin-query.py
Last active March 28, 2024 19:53 — forked from ThomasCabrol/linkedin-2-query.py
Python script to query your LinkedIn network and get all your network's connections and their interconnections.
#!/usr/bin/env python
# encoding: utf-8
"""
linkedin-query.py
Created by Thomas Cabrol on 2012-12-03.
Customised by Rik Van Bruggen
Copyright (c) 2012 dataiku. All rights reserved.
Building the LinkedIn Graph
@dideler
dideler / example.md
Last active November 14, 2024 03:33
A python script for extracting email addresses from text files.You can pass it multiple files. It prints the email addresses to stdout, one address per line.For ease of use, remove the .py extension and place it in your $PATH (e.g. /usr/local/bin/) to run it like a built-in command.
@tanayseven
tanayseven / strings2.asm
Created October 9, 2012 21:01
program to compare two strings using string instructions using 8086 asm lang.
;program to compare two strings using string instructions
INCLUDE io.h
Cr EQU 0ah
Lf EQU 0dh
data SEGMENT
p_str1 DB Cr, Lf, 'Enter 1st string: ',0
p_str2 DB Cr, Lf, 'Enter 2nd string: ',0
p_not DB Cr, Lf, 'The strings are not same',0
@tanayseven
tanayseven / ass12.asm
Created August 4, 2012 06:08
program to compare two strings without using string instructions using 8086 compatible assembly language
;program to compare two strings without using string instructions
INCLUDE io.h
Cr EQU 0ah
Lf EQU 0dh
data SEGMENT
p_str1 DB Cr, Lf, 'Enter 1st string: ',0
p_str2 DB Cr, Lf, 'Enter 2nd string: ',0