Skip to content

Instantly share code, notes, and snippets.

View conquistadorjd's full-sized avatar

Pravin conquistadorjd

View GitHub Profile
@conquistadorjd
conquistadorjd / datetimesample.py
Last active May 14, 2017 15:06
datetime sample
import datetime
# get todays date
dt = datetime.datetime.today()
print dt
DATE='22-May-2017'
# get todays date
dt = datetime.datetime.today().strftime('%Y-%m-%d')
print dt
@conquistadorjd
conquistadorjd / email_simple.py
Created June 8, 2018 11:31
How to send an email with Python3.6
###############################################################################################################
# program to send an email without subject or attachment
###############################################################################################################
import smtplib
print('*** Start of the Program ***')
sender = "sender@gmail.com"
sender_password = "sender_password"
receivers = 'receiver@gmail.com'
server = smtplib.SMTP('smtp.gmail.com', 587)
@conquistadorjd
conquistadorjd / convert_daily_to_monthly.py
Last active August 1, 2022 14:24
Pandas Equity Market
################################################################################################
# name: convert_daily_to_monthly.py
# desc: takes inout as daily prices and convert into monthly data
# date: 2018-06-15
# Author: conquistadorjd
################################################################################################
import pandas as pd
import numpy as np
print('*** Program Started ***')
@conquistadorjd
conquistadorjd / barplot-03.py
Last active December 7, 2021 22:02
Matplotlib
################################################################################################
# name: barplot-03.py
# desc: Simple bar plot with options
# date: 2018-07-02
# Author: conquistadorjd
# Documentation : https://matplotlib.org/api/_as_gen/matplotlib.pyplot.bar.html#matplotlib.pyplot.bar
################################################################################################
from matplotlib import pyplot as plt
import numpy as np
################################################################################################
# name: correlationexamples-00.py
# desc: Correlations
# date: 2018-07-14
# Author: conquistadorjd
# remark : goodman_kruskal_gamma formula taken from https://github.com/shilad/context-sensitive-sr/blob/master/SRSurvey/src/python/correlation.py
################################################################################################
from matplotlib import pyplot as plt
import numpy as np
from scipy import stats
@conquistadorjd
conquistadorjd / indiasampleequitydata.csv
Created August 4, 2018 17:35
indiasampleequitydata
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 6.
"symbol","series","date","prevclose","open","high","low","last","close","vwap","volume","turnover","nooftrades","deliverableqty","percentdelivery","insert_timestamp"
"TCS ","EQ ","2018-07-27",1964.70,1960.85,1964.65,1940.30,1943.75,1943.75,1948.53,2033977,3963271946.50,103516,1389322,68.31,"2018-07-28 19:27:19.008727"
"INFY ","EQ ","2018-07-27",1373.25,1373.20,1389.00,1368.30,1371.20,1373.45,1377.08,3246616,4470848815.00,101649,2173390,66.94,"2018-07-28 19:27:19.008727"
"KOTAKBANK ","EQ ","2018-07-27",1311.25,1313.05,1327.00,1305.65,1312.90,1311.10,1316.74,1885821,2483145144.90,73950,944774,50.10,"2018-07-28 19:27:19.008727"
"RELIANCE ","EQ ","2018-07-27",1110.65,1119.50,1137.40,1112.15,1128.00,1129.85,1127.43,6679468,7530602219.35,140124,2217077,33.19,"2018-07-28 19:27:19.008727"
"KOTAKBANK ","EQ ","2018-07-26",1314.90,1311.65,1322.50,1294.35,1310.55,1311.25,1307.55,3664497,4791512541.15,76422,1433092,39.11,"2018
@conquistadorjd
conquistadorjd / webscrapping_01_simple.py
Last active November 8, 2018 10:51
python webscrapping
################################################################################################
# name: webscrapping_01_simple.py
# desc: webscraping using beautifulsoup
# date: 2018-11-08
# Author: conquistadorjd
################################################################################################
from bs4 import BeautifulSoup
import requests
################################################################################################
# name: correlation_coefficient_01.py
# desc: correlation coefficient
# date: 2018-12-22
# Author: conquistadorjd
################################################################################################
import numpy as np
from scipy import stats
#Calculate mean by python
@conquistadorjd
conquistadorjd / README.md
Last active February 2, 2019 04:22
python-07-ml-gist

python-07-ml

@conquistadorjd
conquistadorjd / TensorFlow
Last active January 20, 2019 13:21
TensorFlow
TensorFlow