Skip to content

Instantly share code, notes, and snippets.

View vidhan13j07's full-sized avatar

Vidhan Jain vidhan13j07

  • Jaipur
View GitHub Profile
<!DOCTYPE html>
<html>
<head></head>
<body>
<form>
<label>First Name:</label><input type="text" id="firstName" /><br/>
<label>Last Name:</label> <input type="text" id="lastName" /><br/>
<label>City:</label> <input type="text" id="city" /><br/>
<label>Phone Number:</label>
<select id="ccode">
@vidhan13j07
vidhan13j07 / LineGraph.sql
Last active October 18, 2017 13:33
This gist contains the sample queries used in the LineGraph presentation: https://docs.google.com/presentation/d/1TTSvKvF-a6P1WD_Aezc541vUHsoCUAQXMOfnBX3orcU/edit
DROP TABLE IF EXISTS edge_table;
CREATE TABLE edge_table (
id BIGSERIAL,
source BIGINT,
target BIGINT,
cost FLOAT,
reverse_cost FLOAT
);
INSERT INTO edge_table (
@vidhan13j07
vidhan13j07 / Errors
Created May 16, 2017 21:59
Linting errors remaining in the following files mentioned here: https://github.com/pgRouting/pgrouting/pull/787
src/trsp/src/GraphDefinition.cpp
src/trsp/src/GraphDefinition.cpp:77: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/trsp/src/GraphDefinition.cpp:116: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/trsp/src/GraphDefinition.cpp:120: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/trsp/src/GraphDefinition.cpp:125: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/trsp/src/GraphDefinition.cpp:128: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/trsp/src/GraphDefinition.cpp:152: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/trsp/src/GraphDefinition.cpp:223: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/trsp/src/GraphDefinition.cpp:228: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
--------------------
------ *.c ------
--------------------
src/trsp/src/trsp.c:36: Include the directory when naming .h files [build/include] [4]
src/trsp/src/trsp.c:38: Include the directory when naming .h files [build/include] [4]
src/trsp/src/trsp.c:43: Include the directory when naming .h files [build/include] [4]
src/trsp/src/trsp.c:46: Include the directory when naming .h files [build/include] [4]
Done processing src/trsp/src/trsp.c
Total errors found: 4
--------------------
@vidhan13j07
vidhan13j07 / nptel-pdf-downloader,py
Last active December 5, 2016 17:48
Downloads pdf files in nptel videos.
from bs4 import BeautifulSoup
import requests
import os
r = requests.get(raw_input('Enter the url: '))
soup = BeautifulSoup(r.text, 'html.parser')
pdfs = soup.find('div', {'class': 'pdf-label'}).findAll('a')
os.chdir('Enter the location where the files are to be stored: ')
for label in pdfs:
@vidhan13j07
vidhan13j07 / vid_to_aud.py
Created July 12, 2016 17:24
A small script to extract the audio from the videos in a particular directory
#!/usr/bin/env python3
import sys
import string
import os
def message():
print ('Command: python3 vid_to_audio.py <Absolute path of directory>')
def split_file(filename):
l = filename.split('.')