Skip to content

Instantly share code, notes, and snippets.

View dhavalsavalia's full-sized avatar
🦥
Procrastinating

Dhaval Savalia dhavalsavalia

🦥
Procrastinating
View GitHub Profile
@dhavalsavalia
dhavalsavalia / india-state-array
Last active February 13, 2024 16:57
Indian state array for JavaScript/TypeScript
let states = [
"Andhra Pradesh",
"Arunachal Pradesh",
"Assam",
"Bihar",
"Chhattisgarh",
"Goa",
"Gujarat",
"Haryana",
"Himachal Pradesh",
@dhavalsavalia
dhavalsavalia / practicepython-exercise-one.py
Created August 5, 2017 23:08
practicepython-exercise-one | Character Input
# defining a function
def ask():
# asking for an input from user
name = input("What is your name? ")
age = int(input("How old are you? "))
# calculating an age left to turn 100
changeInAge = 100 - age
@dhavalsavalia
dhavalsavalia / practicepython-exercise-two.py
Created August 5, 2017 23:14
practicepython-exercise-two | Odd Or Even
# asking for a number
number = int(input("Enter a number: "))
# checking with if
if number % 2 == 0:
print("Number {} is even!".format(number))
else:
print("Number {} is odd!".format(number))
@dhavalsavalia
dhavalsavalia / .zshrc
Last active February 3, 2019 15:53
My ZSH config
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#export ZSH_THEME="robbyrussell"
#export ZSH_THEME="zanshin"
@dhavalsavalia
dhavalsavalia / CSV_DATA.csv
Last active June 2, 2018 07:58
Resumes collection to train Hemang's model
name age experiences qualifications
Robert Campbell 13 mca
Jonathan Rivers 23
Joseph Ferrell 27 Operational researcher|3|Clinical cytogeneticist|3 mca|bca
Kathleen Lopez 5 bca
Jeremy Clark 25 be
Angela Cain 17 Banker|3|Charity officer|1 be
Alexis Perez 24 Radio broadcast assistant|1|Production engineer|1
Elizabeth Glenn 4 Music tutor|2|Editorial assistant|3
Thomas Flores 30 bca
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
themify_downloader.py
Copyright (C) 2018 Dhaval Savalia <dhaval.savalia6@gmail.com>
All rights reserved.
"""
"""
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPClient.h>
const char* ssid = "<WIFI SSID>";
const char* password = "<WIFI PASSWORD>";
const char* host = "<HOST IP>";
int wifiStatus;
@dhavalsavalia
dhavalsavalia / fingerprint.py
Created April 1, 2019 03:45
Simple init fingerprint R305 fingerprint reader using pyfingerprint library
from pyfingerprint.pyfingerprint import PyFingerprint
## Init fingerprint reader
try:
f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000)
if ( f.verifyPassword() == False ):
raise ValueError('The given fingerprint sensor password is wrong!')
except Exception as e:
#include <Keypad.h>
const byte n_rows = 4;
const byte n_cols = 4;
char keys[n_rows][n_cols] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}

Keybase proof

I hereby claim:

  • I am dhavalsavalia on github.
  • I am dhavalsavalia (https://keybase.io/dhavalsavalia) on keybase.
  • I have a public key ASD7Xu3kb_tYRH4SMkQxoxIVufUyhBqUjWYb85Pl8XB16go

To claim this, I am signing this object: