Python Code Samples



Filters


Get records from azure sql table as python dictionary
kishore_kumar | 5 years, 8 months
from contextlib import contextmanager
import datetime

python azure
Convert yaml / yml file contents to python dictionary object
kishore_kumar | 5 years, 9 months
import yaml

with open('sample.yaml') as f:
python yaml yml
gaya38
generate fibonacci series in python
gaya38 | 6 years, 7 months
n=input("Enter the constraint to print no of fibanocci values:")
m=input("Enter the maximum value t
python
Ramya
Finding usage of the file system in linux using python
Ramya | 5 years, 4 months
import subprocess
threshold = input("Enter the threshold value:")
child = subprocess.Popen(['df','
python linux subprocess
gaya38
Python program for even number checking
gaya38 | 6 years, 7 months
a=input("Enter a value:")
if (a%2==0):
    print "The given number is even number"
python
gaya38
Pass command line arguments in python
gaya38 | 6 years, 7 months
import sys
x=len(sys.argv)
a=[]
python
get all meta tags content from a url using python
kishore_kumar | 6 years, 1 month
#This can be done using BeautifulSoup package
import requests
from bs4 import BeautifulSoup
python bs4 beautifulsoup
Rename columns in pandas python dataframe
kishore_kumar | 4 years, 6 months
import pandas as pd

data = [['Alex',10],['Bob',12],['Clarke',13]]
python pandas
Matplotlib create a bar chart in python
kishore_kumar | 6 years, 5 months
import matplotlib.pyplot as plt

categories = ['Student', 'FreeLancer', 'Employee', 'Others']
python matplotlib
Threading in python basic example - create a Thread
kishore_kumar | 6 years, 4 months
import threading
import time

python threading
Prev Next