Skip to content

Instantly share code, notes, and snippets.

View dewanshrawat15's full-sized avatar
💻
Building Thoughts, Taption, Jack, Cuisinier, Promptia and Alfred

Dewansh Rawat dewanshrawat15

💻
Building Thoughts, Taption, Jack, Cuisinier, Promptia and Alfred
View GitHub Profile
@dewanshrawat15
dewanshrawat15 / Scientific Calculator
Last active February 1, 2019 08:04
A small demo of using math.h in C++
#include<iostream>
#include<math.h>
using namespace std;
class calc{
public:
void addition(){
char ch;
double a, sum=0;
do{
cout<<"\n\tEnter a number => ";
@dewanshrawat15
dewanshrawat15 / Terminal Alarm
Last active June 11, 2019 07:21
A terminal alarm python script. It is dependent on the playsound library. Plays all songs in the directory until you're awake.
import time
from playsound import playsound
import os
from os import system
filename = os.listdir()
songs = []
for file in filename:
if '.mp3' in file:
songs.append(file)
@dewanshrawat15
dewanshrawat15 / GCloud.png
Last active June 11, 2019 07:29
Achievements
GCloud.png
String url = "jdbc:mysql://localhost:3306/testdb?useSSL=false";
String user = "";
String password = "";
String author = "me";
String sql = "UPDATE table_name SET name = name1, email = email1, ...WHERE condition;";
try (Connection con = DriverManager.getConnection(url, user, password);
PreparedStatement pst = con.prepareStatement(sql)) {
Just a normal script to truncate all numbers and special characters and allow only spaces and alphabets.
@dewanshrawat15
dewanshrawat15 / main.py
Created September 25, 2019 10:09
Python script to extract participant details for sorting different participants according to domain of interest.
import csv
names = []
emails = []
phoneNumbers = []
year = []
department = []
teamInterested = []
with open("data.csv", "r") as file:
row = csv.DictReader(file)

Downloader

Works as a basic downloader where you specify the link of the page from multiple files have to be downloaded. Using that page as reference, you specify the type of files that have to be downloaded (for example, pptx / mp3 / mp4). The downloader does the rest for you.

Index

  • README.md
  • main.py
  • requirements.txt
import 'package:flutter/material.dart';
void main(){
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: HomeScreen(),
)
);
}
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 17 columns, instead of 7 in line 8.
Couple,Season,Location,Name,Age,Gender,Occupation,Decision,Status,DrPepperSchwartz,DrLoganLevkoff,DrJosephCilona,ChaplainGregEpstein,PastorCalvinRoberson,RachelDeAlto,DrJessicaGriffin,DrVivianaColes
1,1,New York City and Northern New Jersey,Jamie Otis-Hehner,27,F,Nurse,Yes,Married,1,1,1,1,0,0,0,0
1,1,New York City and Northern New Jersey,Doug Hehner,31,M,Software salesman,Yes,Married,1,1,1,1,0,0,0,0
2,1,New York City and Northern New Jersey,Cortney Hendrix,26,F,Make-up artist,Yes,Divorced,1,1,1,1,0,0,0,0
2,1,New York City and Northern New Jersey,Jason Carrion,27,M,Fireman,Yes,Divorced,1,1,1,1,0,0,0,0
3,1,New York City and Northern New Jersey,Monet Bell,33,F,Product development manager,No,Divorced,1,1,1,1,0,0,0,0
3,1,New York City and Northern New Jersey,Vaughn Copeland,30,M,Field service technician,No,Divorced,1,1,1,1,0,0,0,0
4,2,New York City and Northern New Jersey,Jaclyn Methuen,30,F,Vodka saleswoman,Yes,Divorced,1,1,1,1,0,0,0,0
4,2,New York City and Northern New Jersey,Ryan Ranellone,28,M,Real estate agen