Skip to content

Instantly share code, notes, and snippets.

View vipul43's full-sized avatar
😇
BUSY IN ENGINEERING

vipul vipul43

😇
BUSY IN ENGINEERING
View GitHub Profile
@vipul43
vipul43 / mongo_commands.py
Last active May 10, 2021 14:50
first experiment with pymongo python client commands
#pip install pymongo -> to install pymongo
from pymongo import MongoClient
import pprint
#creating client, database, collection and inserting one record
client = MongoClient()
print(client.list_database_names()) #will not be printed here
db = client['python_test_db']
collection = db['actors']
actor = {
@vipul43
vipul43 / mongo_commands.md
Last active May 11, 2021 06:11
first experiment with mongo db shell

MONGO DB SHELL COMMANDS

MongoDB connection: mongodb://127.0.0.1:27017/


  • show dbs
  • db
  • use <databasename>
  • show collections
@vipul43
vipul43 / temp.sig
Last active May 3, 2021 10:22
compilers lab tiger to ir translation
signature TREE =
sig
datatype binop = PLUS | MINUS | STAR | SLASH | AND | PIPE
datatype relop = EQ | NEQ | GT | LT | GTE | LTE
datatype ir = EXPRESSION of expr
| STATEMENT of stmt
and expr = CONST of int
| NAME of Temp.label (* tiger level : functions, destinations for conditionals etc *) (* processor : assembly language address *)
| TEMP of Temp.temp (* tiger level : variables unbounded number *) (* processor level : processor registers *)
@vipul43
vipul43 / from_scratch_rnn.py
Created April 29, 2021 16:21
plan to implement rnn from scratch
# class RNN:
# def __init__(self, input_shape, hidden_shape, output_shape):
# self.input_shape = input_shape
# self.hidden_shape = hidden_shape
# self.output_shape = output_shape
# self.initialise()
# self.bptt_truncate = 2
# def initialise(self):
# self.Whx = np.random.normal(0, 0.01, shape=(self.hidden_shape, self.input_shape))
@vipul43
vipul43 / add_billing.php
Last active April 30, 2021 11:47
hospital database patient, surgery, doctor, billing, emergency patient
<html>
<body>
ID <?php echo $_POST["id"]; ?><br>
Type <?php echo $_POST["type"]; ?><br>
Patient_ID <?php echo $_POST["patient_id"]; ?><br>
Amount <?php echo $_POST["amount"]; ?><br>
Date <?php echo $_POST["date"]; ?><br>
Contact <?php echo $_POST["contact_number"]; ?><br>
<?php
$BILLINGID=$_POST["id"];
@vipul43
vipul43 / template.php
Created April 28, 2021 06:56
template for hospital database project
<!DOCTYPE html>
<html>
<body>
<h1>Hospital</h1>
<form method="post">
<input type="submit" name="addPatient"
class="button" value="add patient" />
<input type="submit" name="showPatient"
class="button" value="show patient" />
@vipul43
vipul43 / hospital_views.sql
Last active May 8, 2021 09:34
views from the hospital database
-- AUTHOR: VIPUL
CREATE VIEW `patient_appointment_service` AS
(SELECT `patient`.`id` AS `patient_id`,
`patient`.`name` AS `patient_name`,
`appointment`.`reason` AS `appointment_reason`,
`appointment`.`date_and_time` AS `appointment_date_and_time`,
`service`.`name` AS `service_name`,
`service`.`availed_date` AS `service_availed_date`
FROM `patient` LEFT JOIN `appointment` ON `patient`.`id` = `appointment`.`patient_id`
LEFT JOIN `service` ON `patient`.`id` = `service`.`patient_id`);
@vipul43
vipul43 / backup_hospital_data.sql
Last active May 12, 2021 19:27
backup of hospital database structure with data
-- MariaDB dump 10.19 Distrib 10.5.9-MariaDB, for osx10.16 (x86_64)
--
-- Host: localhost Database: hospital
-- ------------------------------------------------------
-- Server version 10.5.9-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
@vipul43
vipul43 / backup_hospital_structure.sql
Last active May 12, 2021 19:27
backup of hospital database structure (without data)
-- MariaDB dump 10.19 Distrib 10.5.9-MariaDB, for osx10.16 (x86_64)
--
-- Host: localhost Database: hospital
-- ------------------------------------------------------
-- Server version 10.5.9-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
@vipul43
vipul43 / hospital_data.sql
Last active May 6, 2021 05:25
hospital database schema data
------ AUTHOR: VIPUL------
-- PATIENT TABLE FORMAT (id, name, address, contact_number, gender)
INSERT INTO `patient`(`id`, `name`, `address`,`contact_number`, `gender`) VALUES ('111801001', 'Captain Jack Sparrow', '1-1, Black Pearl Island, Atlantic Ocean', '2715144000', 'male');
INSERT INTO `patient`(`id`, `name`, `address`,`contact_number`, `gender`) VALUES ('111801003', 'Elizabeth Swann', '34-(90/A) High Land, California', '9752762770', 'female');
INSERT INTO `patient`(`id`, `name`, `address`,`contact_number`, `gender`) VALUES ('111801002', 'Gellert Grindelwald', '22-121, Maldives, Indian Ocean', '8558134440', 'male');
INSERT INTO `patient`(`id`, `name`, `address`,`contact_number`, `gender`) VALUES ('111801004', 'Harry Potter', '4, Privet Drive, Little Whinging, Surrey', '7603341062', 'male');
INSERT INTO `patient`(`id`, `name`, `address`,`contact_number`, `gender`) VALUES ('111801005', 'Ronald Weasley', 'The main, Tree house, Amazon Forest', '8132047892', 'male');
INSERT INTO `patient`(`id`, `name`, `addr