Skip to content

Instantly share code, notes, and snippets.

#!/home/guru/anaconda3/bin/python
import sys, time
import pandas as pd
from alpha_vantage.timeseries import TimeSeries
stock_dir = '/home/guru/history/stock/'
fd = open('/home/guru/history/config/nifty50list.dat')
ts = TimeSeries(key='ABCDEFGHIJKLMNOP', output_format='pandas')
#!/usr/bin/bash
file=`echo $1 | sed 's/\(.*\)\.\(.*\)/\1/'`
ext=`echo $1 | sed 's/.*\.\(.*\)/\1/'`
if [ ! -f $1 ]; then
if [ $ext = "pl" ]; then
echo "#!/usr/bin/perl " > $1
elif [ $ext = "py" ]; then
echo "#!/usr/bin/python " > $1
#!/bin/bash
LIMIT=5
IFILE="$HOME/bday.csv"
OFILE="bday_out"$$
MAILID="guru@xyz.com"
for((i=1 ; i<=$LIMIT; i++))
do
arr[$i]=`date '+%d-%b' -d "$i days"`
#!/bin/bash
#Setting the initial variables
IFILE="$HOME/bday.csv"
OFILE="bday_out"$$
MAILID="guru@xyz.com"
# Retrieving today's date and month
class TestIterator:
def __init__(self, list1):
self.index = 0
self.data = list1
def __iter__(self):
print('Iter got called')
return self
def __next__(self):