Skip to content

Instantly share code, notes, and snippets.

View rohith2506's full-sized avatar

Rohith Uppala rohith2506

View GitHub Profile
ubuntu@blosh-aan-prod-1:/home/blosh$ grep 8165161533673097240 log/latest/ex_adapter_binance_futures/ex_adapter_binance_futures_20240126.log
20240126 16:06:01.809172Z 59572 INFO [ex_adapter] [limit_order] symbol = BTCUSDT.LPBN, client_order_id = 8165161533673097240, price = 41516.1, quantity = 1.114, side = 1, oms_ctx = 94527724685808 - ex_adapter.cpp:141
20240126 16:06:01.809263Z 58931 INFO [http_client] [send_request] method = POST, target = /fapi/v1/order?newClientOrderId=8165161533673097240&symbol=BTCUSDT&side=SELL&type=LIMIT&price=41516.100000&quantity=1.114000&timeInForce=GTX&timestamp=1706285161809&recvWindow=75&signature=554040b18cf42367d173e5577a0b60dcfa8ad93ecc2429dc7bd595a4dbfdbd73, hostname: fapi-mm.binance.com, ip: 54.249.8.178, port: 42628, id = 8151268023928553475, usage = 177, bytes = 456 - http_client.cpp:127
20240126 16:06:01.843808Z 58931 INFO [ex_adapter] [binance_futures] order confirmed through rest client. client_order_id = 8165161533673097240 - binance_futures_rest_client.cpp:367
202
#include <thread>
#include <iostream>
#include <coroutine>
#include <optional>
#include <variant>
#include <vector>
#include <utility>
#include <string>
#include <chrono>
First of all Karo, This is really cool that you are trying to do this. Programming can be a very exciting journey and I hope
this small assignment will help you understand the surface layer well enough
There will be two projects I would like you to do over the course of next 7-10 days
1. Guess the number. Rules are described here ( https://computersciencewiki.org/index.php/Guess_a_number )
2. Hangman game. Rules again are easily googleable. No need of fancy animations. Just implement the logic. You can use this for
reference ( https://www.pythonforbeginners.com/code-snippets-source-code/game-hangman )
import requests
from pprint import pprint
import json
import time
import argparse
current_appointment_date = '2022-02-06'
sleep_seconds = 10
def main():
list = [1,2,3]
return list
main()
@rohith2506
rohith2506 / arr.cpp
Created March 30, 2015 05:27
Search an element in rotated sorted array
/*
Here, the simple logic is
first check a[low] <= a[mid] if it is, then we are in lower sorted half else upper sorted half.
then, check whether the key is in between low & mid, if it is, update right to mid-1, else update left to mid+1
*/
int rotated_binary_search(int A[], int N, int key) {
int L = 0;
int R = N - 1;
http://www.geeksforgeeks.org/largest-subarray-with-equal-number-of-0s-and-1s/
@rohith2506
rohith2506 / pair.cpp
Created March 18, 2015 10:28
swap pairwise elements in linked list
void swap_pair(node *head){
if(head == NULL || head -> next == NULL) return ;
node *cur,*prev,*next;
cur = head -> next;
prev = head;
head = cur -> next;
while(true) {
next = cur -> next;
if(next == NULL || next -> next == NULL){
prev -> next = next;
@rohith2506
rohith2506 / 22.cpp
Created March 4, 2015 06:08
median of an unsorted array
// Using quick sort
void partition(vector<int> v, int low, int high){
int p=low,r=high,x=r,i=p-1;
for(int j=p; j<=r-1; j++){
if(a[j] <= x){
i=i+1;
swap(a[i],a[j]);
}
}
swap(a[j+1],a[r]);
@rohith2506
rohith2506 / 21.cpp
Created March 4, 2015 05:50
iterative pre order traversal
void preorder(root){
stk.push(root);
while(!stk.empty()){
cout << stk.top();
stk.pop();
if(root -> right) stk.push(root->right);
if(root -> left) stk.push(root -> left);
}
}