Python Code Samples



Filters


Run SQL update statement using python pyodbc
kishore_kumar | 6 years, 8 months
import pyodbc

conn = pyodbc.connect('Driver={SQL Server};'
pyodbc python
find all numbers in a string using python regular expression
kishore_kumar | 7 years, 1 month
import re

inp_st = "This 1 line has 100 number, 34 and 90s two"
re python string
sandeep
Python Script to create AWS beanstalk
sandeep | 8 years, 3 months
#!/usr/bin/python
  
import boto
python aws beanstalk
Get current environment variables in python
kishore_kumar | 8 years, 3 months
import os
env = os.environ

python python-os
Get records from azure sql table as python dictionary
kishore_kumar | 7 years, 1 month
from contextlib import contextmanager
import datetime

python azure
Ramya
Finding usage of the file system in linux using python
Ramya | 6 years, 9 months
import subprocess
threshold = input("Enter the threshold value:")
child = subprocess.Popen(['df','
python linux subprocess
gaya38
Shuffle list elements in python
gaya38 | 8 years
import random;
z = [1,90,4,2]
z = random.shuffle(z)
python
gaya38
Python sample codes for beginners
gaya38 | 8 years
print "Welcome to python"
Basic python programs available in below links which will covers most of the examples of Level 1 pyt
python
Matrix transpose using list comprehensions in python
harika | 7 years, 7 months
a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
#Procedure1:--------
transposed = [[row[i] for row in a ] fo
List comprehensions in python basically reduce the loc. Check the difference between two procudures
python matrix list
Use map function in python
kishore_kumar | 8 years
def get_double(num):
    return num * 2

python
Prev Next