Skip to content

Instantly share code, notes, and snippets.

View SamsadSajid's full-sized avatar

SamsadSajid

View GitHub Profile
@SamsadSajid
SamsadSajid / dropbox-db-schema.sql
Created December 29, 2021 13:51
Drop box sql schema
CREATE TABLE user(
user_id varchar(50) PRIMARY KEY,
name varchar(50)
);
CREATE TABLE devices(
device_id varchar(50) PRIMARY key,
user_id varchar(50) not null,
foreign key(user_id) references user(user_id)
query {
getCourseDetails(
courseId: 123
) {
title
description
ratings
numOfStudents
reviews {
review
@SamsadSajid
SamsadSajid / cpu-memory-usage-comparison-go-vs-spring-boot.csv
Last active February 9, 2021 11:01
cpu-memory-usage-comparison-go-vs-spring-boot.csv
Proxy type % CPU Number of OS threads Memory (MB)
Spring Boot proxy 7.2 46 124.2
Go Proxy 0.1 26 7.8
Number of Requests Standard Deviation (Spring Boot - Golang) Throughput req/sec (Spring Boot - Golang) Avg (Spring Boot - Golang) Min (Spring Boot - Golang) Max (Spring Boot - Golang) Received KB/sec (Spring Boot - Golang) Avg Bytes (Spring Boot - Golang) Notes
10000 4.14 --- 2.70 100.77801 --- 101.02337 2 --- 0 1 --- 0 208 --- 150 95.14 --- 88.99 966.7 --- 902.0 Ramp up period 100s
20000 7.82 --- 2.79 100.36483 --- 100.47373 3 --- 0 1 --- 0 342 --- 125 94.75 --- 88.50 966.7 --- 902.0 Ramp up period 100s
30000 5.85 --- 2.34 299.98200 --- 301.09599 3 --- 0 1 --- 0 275 --- 119 283.20 --- 265.22 966.7 --- 902.0 Ramp up period 100s
30000 14.20 --- 3.19 150.07654 --- 150.38348 5 --- 0 1 --- 0 495 --- 125 141.68 --- 88.50 966.7 --- 902.0 Ramp up period 200s
30000 5.00 --- 2.89 100.26671 --- 100.31834 2 --- 0 0 --- 0 245 --- 121 94.66 --- 88.37 966.7 --- 902.0 Ramp up period 300s
80000 11.63 --- 3.49 199.98850 --- 200.20772 4 --- 0 1 --- 0 497 --- 168 188.8 --- 176.35 966.7 --- 902.0 Ramp up perio
{
"StartAt": "InvokeLambdaState",
"States": {
"InvokeLambdaState": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-2:XXXXXXX:function:step-function-invoking-lambda-function",
"Parameters": {
"target_value": 9
},
"Next": "CheckStatusFromLambda"
def lambda_handler(event, context):
target_value = event['target_value']
print("Lambda is Invoked with the Integer:: ", target_value)
nums = [-1,0,3,5,9,12]
found, index = search(nums, target_value)
if found:
Executing produce method
Recieved message The world itself's
Job "The world itself's" produced by worker 0
Message "The world itself's" is consumed by consumer 0 from worker 0
Recieved message just one big hoax.
Job "just one big hoax." produced by worker 0
Message "just one big hoax." is consumed by consumer 0 from worker 0
Recieved message
Recieved message
Found quit command
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null
!apt-get update -qq 2>&1 > /dev/null
!apt-get -y install -qq google-drive-ocamlfuse fuse
from google.colab import auth
auth.authenticate_user()
from oauth2client.client import GoogleCredentials
creds = GoogleCredentials.get_application_default()
// denotes the Solidity compiler version
pragma solidity ^0.4.17;
contract Lottery {
// "address" is a datatype
// see the slides for details
address public manager;
address[] public players;
// "msg" is global object. You can use it from any function you create inside a contract.
import heapq
from collections import deque
import math
import numpy as np
import pandas as pd
import Queue as Q
import networkx as nx
def heuristic(a, b):