Python Code Samples



Filters


gaya38
Python program for prime number check
gaya38 | 7 years
a=input("Enter a value:")
k=0
b=(a/2)+1
python
Django filter and sum query
kishore_kumar | 3 years, 8 months
from django.db.models import Sum

# Model -> Marks
python django django-orm
gaya38
generate fibonacci series in python
gaya38 | 7 years
n=input("Enter the constraint to print no of fibanocci values:")
m=input("Enter the maximum value t
python
gaya38
Python program for even number checking
gaya38 | 7 years
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 | 7 years
import sys
x=len(sys.argv)
a=[]
python
Find min , max and mean for numpy arrays
kishore_kumar | 6 years, 12 months
import numpy as np

random_arr = np.random.randint(1,50,9)
python numpy
Ramya
Removing IAM Users from IAM group
Ramya | 6 years, 4 months
def remove_user():
    import boto3
    client = boto3.client('iam')
boto3 aws python
gaya38
print list of even numbers within a range
gaya38 | 7 years
n=100
a=[10,20,30,40,50]
b=[60,70,80,90]
python
get all meta tags content from a url using python
kishore_kumar | 6 years, 6 months
#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, 11 months
import pandas as pd

data = [['Alex',10],['Bob',12],['Clarke',13]]
python pandas
Prev Next