Skip to content

Instantly share code, notes, and snippets.

@dharm6619
dharm6619 / DbConn.py
Created Oct 15, 2019
For Database Connectivity
View DbConn.py
import pymysql
connection = pymysql.connect("localhost","root","root","TEST")
print("Connected to Database")
cursor = connection.cursor()
sql = "insert into demo values(1,'Dharmendra',98)"
cursor.execute(sql)
print("Inserted")
@dharm6619
dharm6619 / python_prac.py
Created Oct 15, 2019
Python Demo of Basic and functions
View python_prac.py
from functools import reduce
# import Module1 as model
from Module1 import Jutsu
from Module1 import Hello
from MyPackage import module1
# Defining a list over here
li = [1, 2, 3]
multiply = lambda x,y : x+y
@dharm6619
dharm6619 / septckt.cpp
Last active Sep 29, 2017
September Circuits Problem 2
View septckt.cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
vector<int>height;
int num;
while(n--)
{