Skip to content

Instantly share code, notes, and snippets.

View awg01's full-sized avatar

Akash Gudadhe awg01

View GitHub Profile
@awg01
awg01 / CP1.md
Created September 12, 2018 11:42 — forked from sharmaeklavya2/CP1.md
Getting started with Competitive Programming

Starting out with Competitive Programming

(This guide is meant for beginners. If you have solved 100+ problems and are looking for guidance on how to solve problems involving algorithms and data structures, this document is not for you.)

Competitive Programming is an interesting activity which mixes problem solving with programming. It is not only enjoyable but also very demanded in placements. Competitive programming will make you very good at writing efficient programs quickly.

package com.android.akashgudadhe.dreamproject;
import java.util.ArrayList;
import com.android.akashgudadhe.dreamproject.MainClass;
import sun.applet.Main;
public class Pattern1 {
public static void displaySession2()
{
@awg01
awg01 / NodeMongo.js
Created March 23, 2019 13:23
Connecting mongodb database with NodeJS.
/*
DOWNLOAD OFFICIAL MONGODB DRIVER USING
npm install mongodb
*/
var MongoClient = require('mongodb').MongoClient;
var url = "mongodb://localhost:27017";
MongoClient.connect(url, function(err, db) {
if (err) throw err;
@awg01
awg01 / MysqlNodeJs.js
Created March 23, 2019 13:26
Connecting mysql database with NodeJS
/*
FOR INSTALLING OFFICIAL MYSQL DRIVER
npm install mysql
*/
var mysql = require('mysql');
//For Configuration
var connection = mysql.createConnection({
host: "localhost",
@awg01
awg01 / button_html.markdown
Last active March 23, 2019 16:26
button_html
@awg01
awg01 / index.html
Created March 24, 2019 14:14
TicTacToe
<!-- Front End for Tic Tac Toe game-->
<html>
<head>
<title>Tic Tac Toe Board</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<table>
<tr>
<td></td>
@awg01
awg01 / index.html
Created March 25, 2019 09:46
InvalidInputBox
<!-- :invalid demo in css -->
<html>
<head>
<title>Invalid Input</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<form action="#">
<input type="text" id="username" name="username" required>
<input type="submit" value="Submit">
@awg01
awg01 / validation.txt
Last active March 25, 2019 10:06
HTML data validation methods
1. Validation using css
elementName:invalid{
//action to be performed
}
2. Validation using HTML5 pattern attribute
It uses regular expression
3. minlenght, maxlength parameter or using javascript setCustomValidity() method
@awg01
awg01 / cityNameFromCSV.py
Created June 26, 2019 09:35
I want to whether the cityname(from csv file) is present in given sentence.
import csv
from re import search
#example_sent2 = "Sunset is the time of day when our sky meets the outer space solar winds. There are blue, pink, and purple swirls, spinning and twisting, like clouds of balloons caught in a whirlwind. The sun moves slowly to hide behind the line of horizon, while the moon races to take its place in prominence atop the night sky. People slow to a crawl, entranced, fully forgetting the deeds that must still be done. There is a coolness, a calmness, when the sun does set..XYZ, Example Exports as my Post Office Box 924 Yavatmal - 445001 INDIA.Ram is a very good student."
pin = []
ct = []
#for loading csv file into list
with open('pincode_final.csv',"r") as csvfile:
csv_f = csv.reader(csvfile)