Skip to content

Instantly share code, notes, and snippets.

from datetime import date, timedelta
from jugaad_data.nse import bhavcopy_save
from mysql_details import mydb
from mysql_details import cursor
import pandas as pd
from tenacity import retry, stop_after_attempt
from jugaad_trader import Zerodha
from sqlalchemy import create_engine
import urllib.parse
import pprint as pp
@rtcoms
rtcoms / csl.py
Created October 1, 2022 16:58 — forked from PVSS/csl.py
Combine Stop Loss with Trailing Stop Loss
from time import sleep
from pushbullet import PushBullet
from pywebio.input import *
from pywebio.output import *
from pywebio.session import *
import requests
MONTH='SEP'
YEAR='22'
strike_price=18000
@rtcoms
rtcoms / gist:e3716ad7197e900146a4068149e9eee8
Created August 31, 2022 11:04 — forked from ohammersmith/gist:48788
Ruby script in a Windows batch script
@echo off
goto endofruby
#!/bin/ruby
git_repo = "git://github.com/rails/rails.git"
help = %Q{
Rails Info:
-v, --version Show the Rails version number and quit.
-h, --help Show this help message and quit.
@rtcoms
rtcoms / choice.bat
Created August 31, 2022 11:04 — forked from jcefoli/choice.bat
Template for Yes/No Choice input in batch files
@ECHO OFF
:start
SET choice=
SET /p choice=Do something? [N]:
IF NOT '%choice%'=='' SET choice=%choice:~0,1%
IF '%choice%'=='Y' GOTO yes
IF '%choice%'=='y' GOTO yes
IF '%choice%'=='N' GOTO no
IF '%choice%'=='n' GOTO no
IF '%choice%'=='' GOTO no
@rtcoms
rtcoms / Gemfile
Created March 14, 2022 16:48 — forked from rccursach/Gemfile
redis_pubsub_demo.rb
source "https://rubygems.org"
gem 'eventmachine'
gem 'sinatra'
gem 'yajl-ruby', require: 'yajl'
gem 'thin'
gem 'em-websocket'
# What is CSRF attack ?
Cross-Site Request Forgery is an attack where a third party from forges a request to
another site.
Here is an example of CSRF attack:
1. You visit site bad.com
2. bad.com has a hidden form that submit request to yourbacnk.com/transfer_credits. If you're logged on yourbank.com
@rtcoms
rtcoms / .rspec
Created September 29, 2021 17:45 — forked from alistairtweed/.rspec
Testing Rails with RSpec, Factory Bot, Faker and Shoulda Matchers
--require spec_helper

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@rtcoms
rtcoms / The Technical Interview Cheat Sheet.md
Created May 19, 2018 19:10 — forked from avinassh/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@rtcoms
rtcoms / levelsio-by.html
Created April 16, 2018 13:59 — forked from levelsio/levelsio-by.html
Maker Link (aka the @levelsio by link)
<!-- Maker Link by @levelsio -->
<!-- MIT License -->
<style>
body {
background:#333;
}
.levelsio-by {
font-family:"Helvetica Neue",sans-serif;
right:0;