MongoDB connection: mongodb://127.0.0.1:27017/
show dbs
db
use <databasename>
show collections
#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 = { |
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 *) |
# 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)) |
<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"]; |
<!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" /> |
-- 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`); |
-- 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 */; |
-- 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 */; |
------ 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 |