Skip to content

Instantly share code, notes, and snippets.

View jkotra's full-sized avatar
🎯
Focusing

Jagadeesh Kotra jkotra

🎯
Focusing
View GitHub Profile
#!/bin/sh
#armeabi-v7a -> armv7a-linux-androideabi
#arm64-v8a -> aarch64-linux-android
#x86 -> i686-linux-android
#x86-64 -> x86_64-linux-android
# https://developer.android.com/ndk/guides/other_build_systems
#set these!
API=31
@jkotra
jkotra / app.c
Created January 17, 2022 11:44
openvpn3 bug
#include <stdio.h>
#include<string.h>
#include<unistd.h>
#include<stdbool.h>
#include <gio/gio.h>
#include <glib.h>
#include "ovpn3.h"
/* gcc app.c ovpn3.c `pkg-config --libs --cflags gtk4` -o app */
algo pnl datasource derivative symbol candles interval target stoploss is_trailing_sl trailing_sl_val quantity sliding intraday buy_signals sell_signals neutral_signals trgt_hits sl_hits b_trgt_hits s_trgt_hits b_sl_hits s_sl_hits peak bottom
algorithms/Reds.so -1099.544556 F.csv None F 3 0 0.500000 0.700000 0 1.000000 100 1 0 0 431 1791 235 196 0 235 0 196 101.983887 -2754.459717
@jkotra
jkotra / Vapoursynthpillow.py
Created December 6, 2019 20:23
Vpy pillow
#vsshow.py
import vapoursynth as vs
from ctypes import *
from PIL import Image
def show(core, clip, frame_number, vflip=1):
format = clip.format.id
width = clip.width
height = clip.height
if format == vs.GRAY16:
@jkotra
jkotra / medium.py
Created November 25, 2019 07:11
Medium Scraper
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from bs4 import BeautifulSoup
class Scraper:
def __init__(self):
self.options = Options()
self.options.add_argument('--headless')
self.driver = webdriver.Firefox(options=self.options)
pm_scaler = scaler.fit(data["pm2.5"].values.reshape(-1, 1))
predicted = pm_scaler.inverse_transform( np.array(predictions).reshape(-1, 1) )
infered = pd.DataFrame(data['pm2.5'].iloc[24:])
infered['Predicted'] = predicted
@jkotra
jkotra / china.jpg
Last active October 20, 2019 11:30
mxnet-lstm
china.jpg
# data preprocessing - I
data.dropna(inplace=True)
le = LabelEncoder()
data["cbwd"] = le.fit_transform(data["cbwd"])
data.head()
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('seaborn')
import mxnet
import mxnet.gluon as G
from sklearn.preprocessing import MinMaxScaler
from sklearn.preprocessing import LabelEncoder
[Unit]
Description=qBittorrent Daemon Service
After=network.target
[Service]
User=root
Group=root
ExecStart=/usr/bin/qbittorrent-nox
ExecStop=/usr/bin/killall -w qbittorrent-nox
Restart=on-failure