Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Readme
Single-player Blackjack including GUI and CLI interfaces, written in Python. Can be used to simulate games with or without card counting and to practise basic strategy.
blackjack-gui
requires Python 3.8 or newer and uses tkinter. Make sure it's installed in your system:
$ sudo apt install python3-tk
or similar (otherwise, you'll see ModuleNotFoundError: No module named 'tkinter'
).
Then:
$ python3 -m venv venv
$ source venv/bin/activate
$ pip3 install blackjack-gui
blackjack [OPTION...]
blackjack --gui=False [OPTION...]
Name | Default | CLI only | Description |
---|---|---|---|
--stack | 1000 | Initial stack. | |
--bet | 1 | Initial bet size. | |
--n_games | 10 | x | Number of rounds to be played. |
--ai | False | x | If True, computer plays instead of you. |
--count | False | x | If True, ai uses card counting. |
--loglevel | DEBUG | x | Adjust amount of logging: DEBUG or INFO. |
--cards | Determine the first player cards, e.g. --cards=A,8,K . Shuffles the shoe after every hand. | ||
--dealer_cards | Determine the first dealer cards. Useful for testing. |
Open the GUI version:
$ blackjack
With the default settings, play 10 rounds of Blackjack without GUI:
$ blackjack --gui=False
Let the computer play perfect basic game and use card counting technique to bring down the house:
$ blackjack --n_games=100000 --ai=True --count=True --loglevel=INFO --gui=False
Simulate soft 19 starting hand only:
$ blackjack --n_games=10000 --ai=True --loglevel=INFO --gui=False --cards=A,8
Blackjack rules vary depending on the casino. In this application they follow: https://casinohelsinki.fi/en/games/blackjack-eng/, i.e.:
Install blackjack-gui
from GitHub and pytest
:
$ git clone https://github.com/tukiains/blackjack-gui
$ cd blackjack-gui/
$ python3 -m venv venv
$ source venv/bin/activate
$ pip3 install .
$ pip3 install pytest
Run unit and integration tests:
$ pytest-3 tests/unit.py
$ pytest-3 tests/integration.py
MIT
FAQs
A game of Blackjack with graphical user interface.
We found that blackjack-gui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.