This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Define a graph represented by facts | |
| edge(a, b). | |
| edge(a, c). | |
| edge(b, d). | |
| edge(b, e). | |
| edge(c, f). | |
| % DFS predicate | |
| dfs(Start, End, Path) :- | |
| dfs_helper(Start, End, [], Path). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % inputting the sample edges | |
| edge(a, b). | |
| edge(a, c). | |
| edge(b, d). | |
| edge(b, e). | |
| edge(c, f). | |
| edge(c, g). | |
| edge(d, h). | |
| edge(d, i). | |
| edge(e, c). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % A FLIGHT ROUTE PLANNER | |
| :- op(50,xfy,:). | |
| flight( Place1, Place2, Day, Fnum, Deptime, Arrtime) :- | |
| timetable( Place1 , Place2, Flightlist), | |
| member( Deptime / Arrtime / Fnum / Daylist , Flightlist), | |
| flyday( Day, Daylist). | |
| member(X,[X|L]). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % some sample facts | |
| edge(a,b). | |
| edge(a,c). | |
| edge(b,d). | |
| edge(b,e). | |
| edge(c,f). | |
| edge(c,g). | |
| edge(d,h). | |
| edge(d,i). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| USE HospitalDB; | |
| -- rollup | |
| SELECT SUM(Occupied_Wards) AS Total_Occupied_Wards, | |
| SUM(Vacant_Wards) AS Total_Vacant_Wards | |
| FROM Hospitaloccupancy; | |
| -- drilldown | |
| SELECT * | |
| FROM Hospitaloccupancy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title> | |
| AI/DS time-table | |
| </title> | |
| <style> | |
| table, | |
| th, | |
| td { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| parent(pam,bob). | |
| parent(tom,bob). | |
| parent(tom,liz). | |
| parent(bob ann). | |
| parent(bob,pat). | |
| parent(pat,jim). | |
| female(pam). | |
| male(tom). | |
| female(liz). | |
| female(pat). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE DATABASE HospitalDB; | |
| USE HospitalDB; | |
| CREATE TABLE Hospitaloccupancy | |
| ( | |
| OccupancyID int NOT NULL, | |
| Wardno int, | |
| PatientID varchar(50), | |
| DoctorID varchar(50), | |
| MedicalID varchar(50), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo apt update && sudo apt upgrade -y >> /dev/null | |
| code-server --auth none --bind-addr 127.0.0.1:8083 >> /dev/null & | |
| ngrok http 127.0.0.1:8083 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| udp://tracker.opentrackr.org:1337/announce | |
| https://tracker2.ctix.cn:443/announce | |
| https://tracker1.520.jp:443/announce | |
| udp://opentracker.i2p.rocks:6969/announce | |
| http://tracker.openbittorrent.com:80/announce |