Python Code Samples



Filters


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

url = "https://httpbin.org/post"
url can be your API/service URL for your request.
python python-requests
durga
Finding Character in a String python
durga | 6 years, 11 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
yogeswaran60
Basic Matrix Manipulations in Python Without Using Any Packages
yogeswaran60 | 7 years, 6 months
#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
Ramya
PYTHON: Email Notification
Ramya | 6 years, 3 months
import win32com.client as win32
outlook = win32.Dispatch('outlook.application')
mail = outlook.Cre
outlook python
Get User Presence of Slack user with slack api and python
kishore_kumar | 7 years, 1 month
from slackclient import SlackClient

user_token = "xoxp-2284524168-327340147858-399021736478-b7ed2
python slack-api
Python logging basic example to print from debug
kishore_kumar | 6 years, 9 months
import logging
logging.basicConfig(level=logging.DEBUG)

python logging
Python pickle dump
Reshma | 6 years, 6 months
import pickle

number_of_data = int(input('Enter the number of data : '))
python pickle dump
get date ctime from python datetime
kishore_kumar | 6 years, 11 months
import datetime

today = datetime.date.today()
python datetime
convert string to python datetime object
kishore_kumar | 6 years, 10 months
import datetime

st = "2019-08-19 05:40"
python datetime
Generate Pie Chart in python using matplotlib
kishore_kumar | 7 years, 7 months
import matplotlib.pyplot as plt

labels = 'Grapes', 'Oranges', 'Mangoes', 'Apples'
python matplotlib
Prev Next