Skip to content

Instantly share code, notes, and snippets.

View shekarsiri's full-sized avatar
👋

Shekar Siri shekarsiri

👋
View GitHub Profile
@shekarsiri
shekarsiri / gc.py
Created March 6, 2024 18:45
OpenAI / Groq grammar check
import sys
import os
import pyperclip
class GrammarCorrector:
def __init__(self, api_key):
self.api_key = api_key
def correct_grammar(self, text):
raise NotImplementedError("This method should be implemented by subclasses.")
@shekarsiri
shekarsiri / cagr.py
Last active February 10, 2024 22:19
Check for mutual funds with more than 8% CAGR (Cash Component - To pledge in Zerodha)
import csv
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from webdriver_manager.chrome import ChromeDriverManager
from concurrent.futures import ThreadPoolExecutor, as_completed
def read_fund_ids_from_csv(file_path):
fund_ids = []
@shekarsiri
shekarsiri / run.sh
Created October 13, 2023 17:15
flutter-strcuture
#!/bin/bash
# Ensure we're in the right directory
if [ ! -d "./lib" ]; then
echo "This script should be run from the root of your Flutter project!"
exit 1
fi
# Create core directories and files
mkdir -p core/constants
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shekarsiri
shekarsiri / minute_notifier.py
Created November 6, 2022 17:37 — forked from spkprav/minute_notifier.py
This is one of the strategies that I am using to catch a trade at the earliest, yet to work on automating the trade
# This script will fetch the notifier data from unstructured CSV data
# and convert that into structured and store the same into MongoDB
# This converted structured data is used to visualize in charts
import pdb
import os
import csv
import pandas as pd
import numpy as np
from datetime import datetime
@shekarsiri
shekarsiri / MLP.py
Created November 6, 2022 17:27 — forked from umitanuki/MLP.py
blog-mlp-scripts
import argparse
import sys
import tempfile
from time import time
import random
from os import listdir
from os.path import isfile, join
import pandas
@shekarsiri
shekarsiri / consumer_db.py
Created November 6, 2022 17:23 — forked from hellovertex/consumer_db.py
Faust App that redirects websocket traffic via Kafka topic
"""
1. Launch Kafka:
- $KAFKA_HOME/bin/zookeeper-server-start.sh $KAFKA_HOME/config/zookeeper.properties
- $KAFKA_HOME/bin/kafka-server-start.sh $KAFKA_HOME/config/server.properties
run via faust -A <filename> worker -l info
2. Faust library:
faust.App.agent: - main processing actor in Faust App
"""

FXCM Webinar Series

on Algorithmic Trading

Python & Historical Tick Data

Dr. Yves J. Hilpisch | The Python Quants GmbH

Online, 24. October 2017

@shekarsiri
shekarsiri / EncryptDecrypt.php
Created January 2, 2021 17:42
Encryption and Decrytion for PHP
<?php
/**
* Encrypts a string using Rijndael with a 256-bit (32 character) salt.
*
* @param string $text The text to encrypt.
* @param string $key The encryption key to use.
* @param string $iv The optional initialization vector to use.
*
* @return string Base64 encoded encrypted text.
*/
import twitter
# initialize api instance
twitter_api = twitter.Api(consumer_key='YOUR_CONSUMER_KEY',
consumer_secret='YOUR_CONSUMER_SECRET',
access_token_key='YOUR_ACCESS_TOKEN_KEY',
access_token_secret='YOUR_ACCESS_TOKEN_SECRET')
# test authentication
print(twitter_api.VerifyCredentials())