Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit 73c6c65

Browse files
Merge branch 'main' into main
2 parents 7871208 + 4aaa733 commit 73c6c65

11 files changed

Lines changed: 653 additions & 114 deletions

File tree

README.md

Lines changed: 67 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,28 +1297,42 @@
12971297
<sub><b>Guillotine189</b></sub>
12981298
</a>
12991299
</td>
1300+
<td align="center">
1301+
<a href="https://github.com/newtoallofthis123">
1302+
<img src="https://avatars.githubusercontent.com/u/78465651?v=4" width="100;" alt="newtoallofthis123"/>
1303+
<br />
1304+
<sub><b>Ishan Joshi</b></sub>
1305+
</a>
1306+
</td>
13001307
<td align="center">
13011308
<a href="https://github.com/aryangulati">
13021309
<img src="https://avatars.githubusercontent.com/u/42711978?v=4" width="100;" alt="aryangulati"/>
13031310
<br />
13041311
<sub><b>ARYAN GULATI</b></sub>
13051312
</a>
1306-
</td>
1313+
</td></tr>
1314+
<tr>
13071315
<td align="center">
13081316
<a href="https://github.com/AbhinandanSingla">
13091317
<img src="https://avatars.githubusercontent.com/u/52960031?v=4" width="100;" alt="AbhinandanSingla"/>
13101318
<br />
13111319
<sub><b>Abhinandan Singla</b></sub>
13121320
</a>
1313-
</td></tr>
1314-
<tr>
1321+
</td>
13151322
<td align="center">
13161323
<a href="https://github.com/adixoo">
13171324
<img src="https://avatars.githubusercontent.com/u/124980341?v=4" width="100;" alt="adixoo"/>
13181325
<br />
13191326
<sub><b>Aditya Kumar</b></sub>
13201327
</a>
13211328
</td>
1329+
<td align="center">
1330+
<a href="https://github.com/Albinary">
1331+
<img src="https://avatars.githubusercontent.com/u/69315591?v=4" width="100;" alt="Albinary"/>
1332+
<br />
1333+
<sub><b>Albert</b></sub>
1334+
</a>
1335+
</td>
13221336
<td align="center">
13231337
<a href="https://github.com/anishaxtha">
13241338
<img src="https://avatars.githubusercontent.com/u/98213145?v=4" width="100;" alt="anishaxtha"/>
@@ -1333,6 +1347,14 @@
13331347
<sub><b>Anju Chhetri</b></sub>
13341348
</a>
13351349
</td>
1350+
<td align="center">
1351+
<a href="https://github.com/ArifShariar">
1352+
<img src="https://avatars.githubusercontent.com/u/43639863?v=4" width="100;" alt="ArifShariar"/>
1353+
<br />
1354+
<sub><b>Arif Shariar Rahman</b></sub>
1355+
</a>
1356+
</td></tr>
1357+
<tr>
13361358
<td align="center">
13371359
<a href="https://github.com/AtharvaDeshmukh0909">
13381360
<img src="https://avatars.githubusercontent.com/u/97836434?v=4" width="100;" alt="AtharvaDeshmukh0909"/>
@@ -1353,8 +1375,7 @@
13531375
<br />
13541376
<sub><b>David-hosting</b></sub>
13551377
</a>
1356-
</td></tr>
1357-
<tr>
1378+
</td>
13581379
<td align="center">
13591380
<a href="https://github.com/Dhandeep10">
13601381
<img src="https://avatars.githubusercontent.com/u/106858770?v=4" width="100;" alt="Dhandeep10"/>
@@ -1375,7 +1396,8 @@
13751396
<br />
13761397
<sub><b>Dishant Nagpal</b></sub>
13771398
</a>
1378-
</td>
1399+
</td></tr>
1400+
<tr>
13791401
<td align="center">
13801402
<a href="https://github.com/EbrG786">
13811403
<img src="https://avatars.githubusercontent.com/u/82704148?v=4" width="100;" alt="EbrG786"/>
@@ -1396,8 +1418,7 @@
13961418
<br />
13971419
<sub><b>HarsH</b></sub>
13981420
</a>
1399-
</td></tr>
1400-
<tr>
1421+
</td>
14011422
<td align="center">
14021423
<a href="https://github.com/HimanshuSinghNegi">
14031424
<img src="https://avatars.githubusercontent.com/u/72004239?v=4" width="100;" alt="HimanshuSinghNegi"/>
@@ -1418,7 +1439,8 @@
14181439
<br />
14191440
<sub><b>Jyothika Dileepkumar</b></sub>
14201441
</a>
1421-
</td>
1442+
</td></tr>
1443+
<tr>
14221444
<td align="center">
14231445
<a href="https://github.com/kom-senapati">
14241446
<img src="https://avatars.githubusercontent.com/u/92045934?v=4" width="100;" alt="kom-senapati"/>
@@ -1439,8 +1461,7 @@
14391461
<br />
14401462
<sub><b>Kunal Pitale</b></sub>
14411463
</a>
1442-
</td></tr>
1443-
<tr>
1464+
</td>
14441465
<td align="center">
14451466
<a href="https://github.com/manav0702">
14461467
<img src="https://avatars.githubusercontent.com/u/94554798?v=4" width="100;" alt="manav0702"/>
@@ -1461,7 +1482,8 @@
14611482
<br />
14621483
<sub><b>Mohammed El Amine Benkorreche</b></sub>
14631484
</a>
1464-
</td>
1485+
</td></tr>
1486+
<tr>
14651487
<td align="center">
14661488
<a href="https://github.com/NischayGoyal1">
14671489
<img src="https://avatars.githubusercontent.com/u/81116984?v=4" width="100;" alt="NischayGoyal1"/>
@@ -1482,8 +1504,7 @@
14821504
<br />
14831505
<sub><b>Kushal Pareek</b></sub>
14841506
</a>
1485-
</td></tr>
1486-
<tr>
1507+
</td>
14871508
<td align="center">
14881509
<a href="https://github.com/Prajwol-Shrestha">
14891510
<img src="https://avatars.githubusercontent.com/u/70046321?v=4" width="100;" alt="Prajwol-Shrestha"/>
@@ -1504,7 +1525,8 @@
15041525
<br />
15051526
<sub><b>Yashvardhan Singh</b></sub>
15061527
</a>
1507-
</td>
1528+
</td></tr>
1529+
<tr>
15081530
<td align="center">
15091531
<a href="https://github.com/farisfaikar">
15101532
<img src="https://avatars.githubusercontent.com/u/87220004?v=4" width="100;" alt="farisfaikar"/>
@@ -1525,8 +1547,7 @@
15251547
<br />
15261548
<sub><b>Ramii Ahmed</b></sub>
15271549
</a>
1528-
</td></tr>
1529-
<tr>
1550+
</td>
15301551
<td align="center">
15311552
<a href="https://github.com/RishiPastor05">
15321553
<img src="https://avatars.githubusercontent.com/u/87607061?v=4" width="100;" alt="RishiPastor05"/>
@@ -1547,7 +1568,8 @@
15471568
<br />
15481569
<sub><b>Sai Uttej R</b></sub>
15491570
</a>
1550-
</td>
1571+
</td></tr>
1572+
<tr>
15511573
<td align="center">
15521574
<a href="https://github.com/samayita1606">
15531575
<img src="https://avatars.githubusercontent.com/u/64488010?v=4" width="100;" alt="samayita1606"/>
@@ -1568,8 +1590,7 @@
15681590
<br />
15691591
<sub><b>Shubham Kumar</b></sub>
15701592
</a>
1571-
</td></tr>
1572-
<tr>
1593+
</td>
15731594
<td align="center">
15741595
<a href="https://github.com/SulimanSagindykov">
15751596
<img src="https://avatars.githubusercontent.com/u/115887342?v=4" width="100;" alt="SulimanSagindykov"/>
@@ -1590,7 +1611,8 @@
15901611
<br />
15911612
<sub><b>Vikash</b></sub>
15921613
</a>
1593-
</td>
1614+
</td></tr>
1615+
<tr>
15941616
<td align="center">
15951617
<a href="https://github.com/Vishvam10">
15961618
<img src="https://avatars.githubusercontent.com/u/78094956?v=4" width="100;" alt="Vishvam10"/>
@@ -1611,8 +1633,7 @@
16111633
<br />
16121634
<sub><b>Yogeshwar Kumar</b></sub>
16131635
</a>
1614-
</td></tr>
1615-
<tr>
1636+
</td>
16161637
<td align="center">
16171638
<a href="https://github.com/ambushneupane">
16181639
<img src="https://avatars.githubusercontent.com/u/56769633?v=4" width="100;" alt="ambushneupane"/>
@@ -1627,6 +1648,14 @@
16271648
<sub><b>Amitesh Kumar</b></sub>
16281649
</a>
16291650
</td>
1651+
<td align="center">
1652+
<a href="https://github.com/asingh4451">
1653+
<img src="https://avatars.githubusercontent.com/u/108614474?v=4" width="100;" alt="asingh4451"/>
1654+
<br />
1655+
<sub><b>Asingh4451</b></sub>
1656+
</a>
1657+
</td></tr>
1658+
<tr>
16301659
<td align="center">
16311660
<a href="https://github.com/benedictprajwal">
16321661
<img src="https://avatars.githubusercontent.com/u/114901414?v=4" width="100;" alt="benedictprajwal"/>
@@ -1654,8 +1683,7 @@
16541683
<br />
16551684
<sub><b>Harshit Sharma</b></sub>
16561685
</a>
1657-
</td></tr>
1658-
<tr>
1686+
</td>
16591687
<td align="center">
16601688
<a href="https://github.com/faizaslam11">
16611689
<img src="https://avatars.githubusercontent.com/u/60103930?v=4" width="100;" alt="faizaslam11"/>
@@ -1669,6 +1697,14 @@
16691697
<br />
16701698
<sub><b>Dhruv Jagdish</b></sub>
16711699
</a>
1700+
</td></tr>
1701+
<tr>
1702+
<td align="center">
1703+
<a href="https://github.com/kanchanrai7">
1704+
<img src="https://avatars.githubusercontent.com/u/114416916?v=4" width="100;" alt="kanchanrai7"/>
1705+
<br />
1706+
<sub><b>Kanchan Rai</b></sub>
1707+
</a>
16721708
</td>
16731709
<td align="center">
16741710
<a href="https://github.com/kodingkin">
@@ -1697,15 +1733,15 @@
16971733
<br />
16981734
<sub><b>Myudak</b></sub>
16991735
</a>
1700-
</td></tr>
1701-
<tr>
1736+
</td>
17021737
<td align="center">
17031738
<a href="https://github.com/NebulaAnish">
17041739
<img src="https://avatars.githubusercontent.com/u/50112251?v=4" width="100;" alt="NebulaAnish"/>
17051740
<br />
17061741
<sub><b>NebulaAnish</b></sub>
17071742
</a>
1708-
</td>
1743+
</td></tr>
1744+
<tr>
17091745
<td align="center">
17101746
<a href="https://github.com/pingavisek">
17111747
<img src="https://avatars.githubusercontent.com/u/57057681?v=4" width="100;" alt="pingavisek"/>
@@ -1740,15 +1776,15 @@
17401776
<br />
17411777
<sub><b>Shreya Rathore</b></sub>
17421778
</a>
1743-
</td></tr>
1744-
<tr>
1779+
</td>
17451780
<td align="center">
17461781
<a href="https://github.com/ta-brook">
17471782
<img src="https://avatars.githubusercontent.com/u/85091595?v=4" width="100;" alt="ta-brook"/>
17481783
<br />
17491784
<sub><b>Tanawat Jirawttanakul</b></sub>
17501785
</a>
1751-
</td>
1786+
</td></tr>
1787+
<tr>
17521788
<td align="center">
17531789
<a href="https://github.com/LionLostInCode">
17541790
<img src="https://avatars.githubusercontent.com/u/133058949?v=4" width="100;" alt="LionLostInCode"/>

projects/BlackJack/ReadMe.md

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
11
# BLACKJACK
22

3-
BlackJack is very popular card game mainly played in casinos around the world.
4-
Let's imagine this program as a virtual casino with computer as the **Dealer**.
5-
The purpose of this game is to beat the Dealer, which can be done in various ways.
3+
Blackjack is a very popular card game commonlu played in casinos worldwide.
4+
This program will simulate a virtual casino, with computer as the dealer.
5+
The purpose of this game is to beat the dealer, which can be done in various ways.
66

77
## Rules
88

9-
- Both the player and the dealer are given 2 cards at the beginning , but one of the dealer's card is kept hidden.
10-
11-
Each card holds a certain value.
12-
13-
- Numbered cards contain value identical to their number.
14-
- All face cards hold a value of 10
15-
- Ace can either hold a value of 1 or 11 depending on the situation.
16-
17-
BlackJack means **21**. Whoever gets a total value of 21 with their cards immediately wins!
18-
*(winning through blackjack results in 3x the money)*
19-
20-
If the value of cards goes over 21, its called a BUST, which results in immediate loss...
21-
If both the players get the same value of cards , it's a TIE and the betted money is returned.
22-
23-
If none of the above cases are met ,the person with closer value to 21 wins.
24-
*(winning like this returns 2x the betted money)*
9+
- At the start of the game, both the player and the dealer are given 2 cards, however one of the dealer's card is kept hidden.
10+
- Each card holds a certain value.
11+
- Numbered cards have a value identical to their number.
12+
- All face cards (e.g. King, Queen) hold a value of 10.
13+
- Aces can either hold a value of 1 or 11, depending on the situation.
14+
- Blackjack refers to a total card value of **21**. When a player achieves this, they immediately win, and the victory results in a payout 3x the amount of the bet!
15+
- If the total value of cards exceeds 21, it's called a BUST, which results in immediate loss. If both participants bust, the result is a tie, and the bets are returned.
16+
- If none of the above conditions are met, the person with a closer value to 21 wins. Winning in this manner results in a payout 2x the amount of the bet!
2517

2618
-----------------------------------------------------------------------------------------------------------------
2719

28-
For simplicity of the program a lot of moves like double down,split and surrender were skipped.
29-
The program also lacks proper linting , debugging and optimization at the moment.
20+
PLEASE NOTE: For simplicity, this program does not include advanced moves, such as double downs, splits and surrenders. The program also currently lacks proper linting, debugging and optimization.
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# CRUD CLI with 🐘 PostgreSQL
2+
3+
Well, this is a simple CRUD CLI with PostgreSQL. I made this project to help others learn more about PostgreSQL driver for Python and how to create beautiful and interactive CLI's with Python.
4+
5+
Well it is basically a book mark manager, you can add, edit, delete and list your bookmarks.
6+
7+
It is called the Query DB btw.
8+
9+
## What you can learn
10+
11+
I highly recommend you try and read through the code.
12+
As a beginner, it is far easier to read code that is more like what you would write yourself, and this is a good example of that.
13+
It doesn't use any advanced Python features, and it doesn't use any advanced SQL features either.
14+
15+
So, no classes, confusing context managers, or anything like that.
16+
Just plain old functions and SQL.
17+
18+
So, if you are a beginner, you can learn:
19+
20+
- Asking better input from the user
21+
- Using PostgreSQL with Python
22+
- Creating beautiful and interactive CLI's with Python
23+
- Create, Read, Update and Delete (CRUD) operations with PostgreSQL
24+
25+
If you find this project useful, please give it's parent a star.
26+
27+
## Screenshot
28+
29+
![Screenshot](assets/screenshot.png)
30+
31+
## Features
32+
33+
1. Easy to use
34+
2. Interactive
35+
3. Beautiful
36+
4. No need to remember SQL commands
37+
5. Fast and lightweight
38+
39+
## Prerequisites
40+
41+
- Python 3.6 or higher
42+
- PostgreSQL 9.5 or higher
43+
44+
### Python dependencies
45+
46+
- psycopg2
47+
- rich
48+
49+
These dependencies are already in the `requirements.txt` file.
50+
51+
### Create a database
52+
53+
We use postgresql as our database, so you need to create a database with any name and enter the credentials in the `creds.json` file.
54+
55+
```bash
56+
createdb db_name
57+
```
58+
59+
## How to use
60+
61+
First, you need to install the dependencies:
62+
63+
```bash
64+
pip install -r requirements.txt
65+
```
66+
67+
Then, you need to create a `creds.json` file with the following info:
68+
69+
```json
70+
{
71+
"username": "postgres",
72+
"password": "password",
73+
"host": "127.0.0.1",
74+
"port": "5432",
75+
"database": "test"
76+
}
77+
```
78+
79+
After that, you can run the CLI with:
80+
81+
```bash
82+
python main.py
83+
```
84+
85+
It's done! Now you can use the CLI.
50 KB
Loading

0 commit comments

Comments
 (0)