Python Code Samples



Filters


POST request in python using requests
kishore_kumar | 7 years, 1 month
import requests

url = "https://httpbin.org/post"
url can be your API/service URL for your request.
python python-requests
Ramya
PYTHON: Email Notification
Ramya | 5 years, 9 months
import win32com.client as win32
outlook = win32.Dispatch('outlook.application')
mail = outlook.Cre
outlook python
yogeswaran60
Basic Matrix Manipulations in Python Without Using Any Packages
yogeswaran60 | 7 years
#Matrix Manipulations Without using any packages
#Define Matrix A,B,C 
A=[[1,2,3],
Change the result matrix dimension according to Matrix Dimensions properties Product of (M*N) and (
python matrix
Get User Presence of Slack user with slack api and python
kishore_kumar | 6 years, 7 months
from slackclient import SlackClient

user_token = "xoxp-2284524168-327340147858-399021736478-b7ed2
python slack-api
durga
Finding Character in a String python
durga | 6 years, 5 months
S1=raw_input("enter String")
S2=raw_input("enter character")
S1=S1.upper() #we are changing into u
We can use lower() also, But both the strings should be changed into the same case(upper/lower).
python string in operator
convert string to python datetime object
kishore_kumar | 6 years, 4 months
import datetime

st = "2019-08-19 05:40"
python datetime
Python logging basic example to print from debug
kishore_kumar | 6 years, 3 months
import logging
logging.basicConfig(level=logging.DEBUG)

python logging
Create a line chart using python matplotlib
kishore_kumar | 7 years
import matplotlib.pyplot as plt

t = ['12-03-18','12-04-18' , '12-05-18', '12-06-18', '12-07-18']
python matplotlib
Generate Pie Chart in python using matplotlib
kishore_kumar | 7 years, 1 month
import matplotlib.pyplot as plt

labels = 'Grapes', 'Oranges', 'Mangoes', 'Apples'
python matplotlib
get date ctime from python datetime
kishore_kumar | 6 years, 5 months
import datetime

today = datetime.date.today()
python datetime
Prev Next