Skip to content

Instantly share code, notes, and snippets.

View manashmandal's full-sized avatar
😭

Manash Kumar Mandal manashmandal

😭
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"openapi": "3.0.3",
"info": {
"title": "Bmi Screen Event",
"description": "All of events will be there which one is trigger on Bmi Screen ui",
"version": "1.0.0"
},
"paths": {},
"tags": [{
"name": "Event Details"
@manashmandal
manashmandal / download.sh
Created May 3, 2020 20:52
Download Asset from Private Repo
curl -L -H 'Accept: application/octet-stream' -H "Authorization: token $TOKEN" 'https://api.github.com/repos/:owner/:repo/releases/assets/:asset_id' --output output.format
@manashmandal
manashmandal / fetch.py
Created April 28, 2020 06:16
Asyncio Concurrent Request
# Need at least Python 3.7 To Run this code
import asyncio
import aiohttp
endpoint = "https://randomuser.me/api/"
num_concurrent_requests = 20
async def fetch(session, url):
async with session.get(url) as response:
@manashmandal
manashmandal / index.js
Created April 27, 2020 11:54
Concurrent Requests Using NodeJs
const axios = require("axios");
const endpoint = "https://randomuser.me/api";
const totalRequests = 20;
(async () => {
let requests = [];
for (let i = 0; i < totalRequests; i++) {
requests.push(axios.get(endpoint));
}
Promise.all(requests)
.then((responses) => {
@manashmandal
manashmandal / self_ngrok.sh
Created February 11, 2020 06:47
self hosted ngrok
ssh -i key.pem -R remote_open_port:localhost:local_open_port user@domain
@manashmandal
manashmandal / variable_rnn_torch.py
Created February 10, 2020 10:21 — forked from dolaameng/variable_rnn_torch.py
Variable Length Sequence for RNN in pytorch Example
import torch
import torch.nn as nn
from torch.autograd import Variable
batch_size = 3
max_length = 3
hidden_size = 2
n_layers =1
# container
sudo apt-get install -y python3.8 python3.8-dev
rm -rf /app/tradingbot/venv
cd /app/tradingbot
virtualenv venv --python /usr/bin/python3.8