Skip to content

Instantly share code, notes, and snippets.

@VijayaMalla
VijayaMalla / BookCategoryList.txt
Created February 10, 2020 21:18
Scrape http://books.toscrape.com/ and get all categories and page links
{'Category': 'Travel', 'Link': 'http://books.toscrape.com/catalogue/category/books/travel_2/index.html'}
{'Category': 'Mystery', 'Link': 'http://books.toscrape.com/catalogue/category/books/mystery_3/index.html'}
{'Category': 'Historical Fiction', 'Link': 'http://books.toscrape.com/catalogue/category/books/historical-fiction_4/index.html'}
{'Category': 'Sequential Art', 'Link': 'http://books.toscrape.com/catalogue/category/books/sequential-art_5/index.html'}
{'Category': 'Classics', 'Link': 'http://books.toscrape.com/catalogue/category/books/classics_6/index.html'}
{'Category': 'Philosophy', 'Link': 'http://books.toscrape.com/catalogue/category/books/philosophy_7/index.html'}
{'Category': 'Romance', 'Link': 'http://books.toscrape.com/catalogue/category/books/romance_8/index.html'}
{'Category': 'Womens Fiction', 'Link': 'http://books.toscrape.com/catalogue/category/books/womens-fiction_9/index.html'}
{'Category': 'Fiction', 'Link': 'http://books.toscrape.com/catalogue/category/books/fiction_10/index.html'}
{'Ca
@VijayaMalla
VijayaMalla / StateBoundariesJson
Created May 7, 2019 14:57
State Boundaries JSON. With Min Lat, Max Lat, Min Lon and Max Lon
{
"AK": {
"name": "Alaska",
"min_lat": 52.5964,
"max_lat": 71.5232,
"min_lng": -169.9146,
"max_lng": -129.993
},
"AL": {
"name": "Alabama",
@VijayaMalla
VijayaMalla / CreateSha1Hash.cs
Last active April 10, 2018 15:32
Create SHA1 Hash for a string
class Program
{
static void Main(string[] args)
{
var pwd = "password"; //Sample Password string
//GetBytes converts the string to byte[]
//ComputeHash computes the Hash value of the byte[]
byte[] bytes = SHA1.Create().ComputeHash(Encoding.UTF8.GetBytes(pwd));
StringBuilder sb = new StringBuilder();
foreach (byte b in bytes)