Skip to content

Instantly share code, notes, and snippets.

View aveek22's full-sized avatar
🏠
Working from home

Aveek aveek22

🏠
Working from home
View GitHub Profile
# imports the Pandas library to work in python
import pandas as pd
# assign the JSON data to a variable
json_data = """{
"data": [
{
"type": "articles",
"id": "1",
"attributes": {
# imports the Pandas library to work in python
import pandas as pd
# Create the data as a list
data = [['Bob', 30], ['Fred', 35], ['Nick', 40]]
# Load the data as a dataframe
df = pd.DataFrame(data=data, columns=['Name','Age'])
# Covnert the dataframe to JSON
import json
def greet():
print('Hello user')
def main():
greet()
if __name__ == '__main__':
main()
import json
def greet(user):
print(f'Hello {user}')
def main():
greet('Aveek')
if __name__ == '__main__':
main()
import json
def pos_arg(a,b,c):
print(f'The value of a is: {a}')
print(f'The value of b is: {b}')
print(f'The value of c is: {c}')
def main():
pos_arg(10,20,30)
import json
def greet(*users):
for user in users:
print(f'Welcome {user}')
def main():
greet('Fred', 'Harry', 'Tom')
if __name__ == '__main__':
import json
def greet(**users):
for key,value in users.items():
print(f'{key} => {value}.')
def main():
greet(user='Tom', city='London', pet=['Dog', 'Cat', 'Fish'])
if __name__ == '__main__':
def quicktext():
print('Hello, welcome to QuickSample package.')
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="quicksample", # This is the name of the package
version="0.0.1", # The initial release version
author="Aveek Das", # Full name of the author
description="Quicksample Test Package for SQLShack Demo",

QuickSample

A sample python package deployment utility for SQLShack Demo.