Saravanan666/pypi-org huggingface dataset:
Package: darkchess
darkchessdark chess - incomplete information chessDark chess is a python package which has all the functionality of the game chess, with also a dark mode, where the player can only view the tiles of the board they are currently on or can move to.This is an early version of the package. There are still bugs which are being worked on.To install:pip3 install darkchessrun.pyfrom darkchess.src.board import Board
from darkchess.src.gamengine import GameEngine
from darkchess.src.darkboard import DarkBoard

dark_mode = False
ans = ''
while 'y' not in ans and 'n' not in ans:
    ans = input("Do you want to play in dark mode? (y/n): ")

if 'y' in ans:
    dark_mode = True

if dark_mode:
    board = DarkBoard()
else:
    board = Board()
game = GameEngine(board)

while True:
    # game.Board.view_board_debug()
    game.Board.view_board()
    # if dark_mode:
    # game.Board.view_board_true_sight()
    game.choose_move()To run tests:pytest --pyargs darkchess
Package: darkdetect
DarkdetectThis package allows to detect if the user is using Dark Mode on:macOS 10.14+Windows 10 1607+Linux witha dark GTK theme.The main application of this package is to detect the Dark mode from your GUI Python application (Tkinter/wx/pyqt/qt for python (pyside)/...) and apply the needed adjustments to your interface. Darkdetect is particularly useful if your GUI librarydoes notprovide a public API for this detection (I am looking at you, Qt). In addition, this package does not depend on other modules or packages that are not already included in standard Python distributions.Usageimport darkdetect

>>> darkdetect.theme()
'Dark'

>>> darkdetect.isDark()
True

>>> darkdetect.isLight()
FalseIt's that easy.You can create a dark mode switch listener daemon thread withdarkdetect.listenerand pass a callback function. The function will be called with string "Dark" or "Light" when the OS switches the dark mode setting.importthreadingimportdarkdetect# def listener(callback: typing.Callable[[str], None]) -> None: ...t=threading.Thread(target=darkdetect.listener,args=(print,))t.daemon=Truet.start()InstallThe preferred channel is PyPI:pip install darkdetectAlternatively, you are free to vendor directly a copy of Darkdetect in your app. Further information on vendoring can be foundhere.Optional InstallsTo enable the macOS listener, additional components are required, these can be installed via:pipinstalldarkdetect[macos-listener]NotesThis software is licensed under the terms of the 3-clause BSD License.This package can be installed on any operative system, but it will always returnNoneunless executed on a OS that supports Dark Mode, including older versions of macOS and Windows.On macOS, detection of the dark menu bar and dock option (available from macOS 10.10) is not supported.Detailson the detection method used on macOS.Detailson the experimental detection method used on Linux.
Package: darkdisplay
This is a package that can make notifis and overlays in an easy wayexample notification:fromdarkdisplay.notificationimportDisplayNotification# make an example notificationDisplayNotification(message="Hello World!",title_text="Title",window_size="250x150",window_timeout=5,# time for the window to stay open in secondsdebug=True)# auto displays and does not return anything# to wait until the notification is done displaying pass wait_until_closed=True, for example:# make an example notificationDisplayNotification(message="Hello World!",title_text="Title",window_size="250x150",debug=True,window_timeout=5,wait_until_closed=True,)example overlay:fromdarkdisplay.overlayimportOverlay# make an example overlayoverlay=Overlay(message="your text here...",window_size="250x85",debug=True,start_hidden=True)# starts overlayoverlay.start()# shows overlayoverlay.show()# hide overlayoverlay.hide()# stop overlayoverlay.close()# update message/overlayoverlay.update_message(message="updated message")
Package: dark-emulator
Dark EmulatorA repository for a cosmology tooldark_emulatorto emulate halo clustering statistics. The code is developed based on Dark Quest simulation suite (https://darkquestcosmology.github.io/). The current version supports the halo mass function and two point correlation function (both halo-halo and halo-matter cross).InstallIn order to install dark emulator package, use pip:pip install dark_emulatoror use conda:conda install -c nishimichi dark_emulatorPlease note that updates on conda are currently halted due to an unresolved issue in conda build. Therefore, we recommend using the version in pip or installing from the source using the following command.If the above does not work for you, you may download the source files from this repository and install viapython -m pip install -e .after moving to the top directory of the source tree.
In that case, you need to installgeorge(a software package for the Gaussian process) and colossusconda install -c conda-forge george
pip install colossusFrom version 1.1.0,dark_emulatoruses FFTLog implementation byFang et al (2019); arXiv:1911.11947.UsageYou can then check how Dark Emulator works by running a tutorial notebook atdocs/tutorial.ipynb
docs/tutorial-hod.ipynbSee also the documentation onreadthedocs.Code PaperThe main reference for our halo emulation strategy is: "Dark Quest. I. Fast and Accurate Emulation of Halo Clustering Statistics and Its Application to Galaxy Clustering", by T. Nishimichi et al.,ApJ 884, 29 (2019),arXiv:1811.09504. Please also refer to the paper "Cosmological inference from emulator based halo model I: Validation tests with HSC and SDSS mock catalogs", by H. Miyatake et al.,arXiv:2101.00113for the implementation and performance of the halo-galaxy connection routines.
Package: darkencryption
IntroductionThis code implements a simple encryption/decryption mechanism to secure messages using the cryptography library in Python.Features- PBKDF2 key derivation is used to derive a secret key from a given password and salt
- The message is encrypted using the Fernet module from the cryptography library
- The encryption process uses a random 16-byte salt, a user-specified number of iterations for the key derivation function, and the derived key to encrypt the message.
- The encrypted message is returned as a base64 encoded string
- The decryption process takes the encrypted message, password and decodes the encrypted message to retrieve the salt, iteration count and encrypted token
- The secret key is derived again using the password and salt, and the encrypted message is decrypted using Fernet
- The decrypted message is returned as a stringRequirements- Python 3.x
- cryptography libraryUsageThe code provides two main functions:message_encrypt(message, password, iterations=100_000) and message_decrypt(token, password).message_encrypt takes in the following arguments:message: The message to be encrypted, as a string
password: The password used to derive the secret key, as a string
iterations: The number of iterations for the key derivation function. The default value is 100,000.message_decrypt takes in the following arguments:token: The encrypted message, as a string
password: The password used to derive the secret key and decrypt the message, as a string
The code returns the encrypted message or the decrypted message as a string.LimitationsThe encryption mechanism is only secure if the password is strong and kept confidential.
Package: darkest-parser
darkest-parserdarkest-parseris a module to parser.darkestfile originally fromDarkest Dungeonprogramatically.Usagepipinstalldarkest-parserfromdarkest_parserimportparse,unparsetext='''resistances: .stun 40% .poison 40% .bleed 40% .disease 30% .move 40% .debuff 30% .death_blow 67% .trap 40%weapon: .name "houndmaster_weapon_0" .atk 0% .dmg 4 7 .crit 4% .spd 5armour: .name "houndmaster_armour_0" .def 10% .prot 0 .hp 21 .spd 0combat_skill: .id "hounds_rush" .level 0 .type "ranged" .atk 85% .dmg 0% .crit 5% .launch 432 .target 1234 .effect "Beast Killer 1"combat_skill: .id "hounds_rush" .level 1 .type "ranged" .atk 90% .dmg 0% .crit 6% .launch 432 .target 1234 .effect "Beast Killer 2"'''dark=parse(text)dark[0].tag=='resistances'dark[0].set('stun','60%')dark[0].poison='40%'weapon0=dark.find('weapon',name='houndmaster_weapon_0')weapon0.tag=='weapon'weapon0.dmg=[14,17]weapon0.spd=25forrushindark.finditer('combat_skill',id='hounds_rush'):rush.type='meele'rush.set('ignore_guarded')rush0=dark.find(id='hounds_rush',level=0)# x invalid:# rush0.effect.append('Human Killer 1')# √ use instead:rush0.effect=[*rush0.effect,'Human Killer 1']rush1=dark.find(id='hounds_rush',level=1)rush1.has('target')==Truerush1.set('target','~1234','literal')# literal means that the value is unquoted, it's useful in some case,# for example: launch, target, valid_modes, etc.print(unparse(dark))API Referencedefparse(str)->Darkest:...defunparse(Darkest)->str:...classDarkest:def__getitem__(int)->Element:...deffinditer(str|None,**{str:Any})->Generator[Element,Any,Any]:...deffindall(str|None,**{str:Any})->List[Element]:...deffind(str|None,**{str:Any})->Element:...classElement:defget(str)->List[Any]:...defset(str,Any|List[Any]|None,Literal['number','bool','string','literal']|None):...defpop(str):...defhas(str)->bool:...
Package: darkfly
Installation :pip install darkfly && darkflyFeatures :darkfly, ** 500+ termux tools installer **How to install :$ pkg install python -y
$ pip install darkfly
$ darkflyRun :$ darkflyDisclaimer :We are not responsible for your loss by this tool.
this tool is made for Education/Learning Purpose.
Dont harm anyone using this tool.About Us :Created by Parixit Sutariya
Github : github.com/Bhai4You
Blogspot : https://bhai4you.blogspot.com
Package: dark-gateway
dark-gatewaydARK Web3 Core LibHow to useWe created anotebookto ilustrate how to use the dark-gateway libMain componentsDarkGatewayThe DarkGateway class is a Python class that provides a simple interface to interact with the dARK blockchain. The class is initialized with the name of the blockchain network and the configuration file. The configuration file specifies the URL of the blockchain node, the chain ID, and the minimum gas price.Once the class is initialized, you can use it to send transactions, query the blockchain state, and interact with smart contracts. To send a transaction, you need to specify the smart contract, the method to call, and the arguments to pass to the method. The class will then sign the transaction and send it to the blockchain.To query the blockchain state, you can use the get_balance method to get the balance of an address, or the get_transaction_receipt method to get the receipt of a transaction.To interact with smart contracts, you can use the call method to call a function on a smart contract, or the transact method to send a transaction to a smart contract.The DarkGateway class is a powerful tool that can be used to interact with the Darkweb blockchain. It provides a simple and easy-to-use interface that makes it easy to send transactions, query the blockchain state, and interact with smart contracts.Here are some of the specific things that the DarkGateway class can do:Send transactionsQuery the blockchain stateInteract with smart contractsGet the balance of an addressGet the receipt of a transactionCall a function on a smart contractSend a transaction to a smart contractDarkMapA Python class that provides a simple interface to interact with the Darkweb blockchain. It inherits from theDarkGatewayclass and adds some additional methods for interacting with the blockchain.MethodsTheDarkMapclass has two main types of methods:Sync methods:These methods block until the operation is complete.Async methods:These methods return a future object that can be used to get the result of the operation.TheDarkMapclass also has some utility methods for converting between different types of identifiers, such as the hash value of a PID and its ARK identifier.Examples>>>fromdarkmapimportDarkMap>>>darkmap=DarkMap(dark_gateway)>>>darkmap.request_pid_hash()'0x1234567890abcdef'>>>darkmap.get_pid_by_hash('0x1234567890abcdef')Differences from DarkGatewayThe main difference between theDarkMapclass and theDarkGatewayclass is that theDarkMapclass provides some additional methods for interacting with the blockchain, such as the ability to request a PID and convert between different types of identifiers.Here is a table that summarizes the differences between the two classes:FeatureDarkGatewayDarkMapCan send transactionsYesYesCan query the blockchain stateYesYesCan interact with smart contractsYesYesCan request a PIDNoYesCan convert between different types of identifiersNoYes
Package: darkgmailapi
Gmail API Python LibraryThis library provides an easy way to interact with the Gmail API using Python. With this library, you can send emails with attachments, authenticate with the Gmail API, and manage your email accounts.UsageTo use this library, you'll need to have a Google API Console project with the Gmail API enabled. You can follow the steps outlined in the Gmail API Quickstart Guide to set up your project.The library requires the following dependencies:google-api-python-client
google-auth-httplib2
google-auth-oauthlibyou can install these dependencies using pip:pip install -r requirements.txtYou'll also need to have a credentials.json file for your API project, which you can download from the API Console.You can use the following code to get started with the Gmail API:fromdarkgmailapiimportGmailApi# Create a GmailApi objectgmail=GmailApi(credentials="path/to/credentials.json",send_email="you@example.com",token_file="path/to/token.pickle",scope="https://mail.google.com/")# Build a message to sendmessage=gmail.build_message(destination="recipient@example.com",obj="Subject of the email",body="Body of the email")# Send the messagegmail.send_message("me",message.as_bytes())You can also attach files to your emails using the add_attachment method:# Add an attachment to the messagegmail.add_attachment(message,"path/to/attachment.pdf")to search for emails, you can use the search method:# Search for emailsemails=gmail.search("search query")# returns a list of messagesto get the body of an email, you can use the read_message method:# Read the data of an emailmessage_data=gmail.read_message(emails[0])# returns a dictionary with the email data, in this format# {#   "from": "",#   "to": "",#   "subject": "",#   "date": "",#   "body_html": "",#   "body_text": ""# }to delete an email, you can use the delete_message method:# Delete an emailgmail.delete_message(emails[0])to read and unread emails, you can use the mark_as_read and mark_as_unread methods:# Mark an email as readgmail.mark_as_read(emails[0])# Mark an email as unreadgmail.mark_as_unread(emails[0])
Package: darkhex
DarkHexDark Hex is the imperfect information version of the game Hex. This game has a really scarce work on it. In this repository I am including an implementation of the game along with some algorithms implemented specifically for DarkHex. Also I included the results of some of the experiments.For details on DarkHex and any of the algorithms used as well as the experiments please check my thesis-link-.What is HexDark-Hex Open Spiel ImplementationSample GameImplementationspONEVanilla CFRFSI-CFRBackward Induction Best ResponseAlphaZero Approximate Best ResponseCFR+MCCFRNFSPDeep CFRInstallationThe library is uploaded on Pypi and can be installed using pip. Before pip called make sure you have the following packages installed:Python 3.6PyGObject - bindings for GTK3GraphvizGCCLibcairoThey are mostly required for graph drawing and setup reasons. Please make sure you have these packages installed before installing the library.For Debian / Ubuntusudoapt-getinstalllibgirepository1.0-devgcclibcairo2-devpkg-configgir1.2-gtk-3.0graphvizFor MacOSbrewinstallgobject-introspectiongraphvizcairopkg-configgtk+3gccAfter installing the packages you can install the library using pypi.pipinstalldarkhexSetup from source using pipInstalling from source would be helpful if you wanted a custom version of the library / helping with development. Make sure you have the packages above installed.Virtual EnvironmentWe recommend using a virtual environment for the development.E.g. for Ubuntu or Debian:sudoapt-getinstallvirtualenvpython3-virtualenv
virtualenvvenvsourcevenv/bin/activateRest of the installation is just installing python requirements.E.g. for Ubuntu or Debian:# Install the libraries listed abovesudoapt-getinstalllibgirepository1.0-devgcclibcairo2-devpkg-configgir1.2-gtk-3.0graphviz# Install the python packagespipinstall-rrequirements.txtUpdate PYTHONPATH on your .bashrc or .zshrc file (or .venv/bin/activate)
Package: dark-keeper
Dark KeeperDark Keeper is open source simple web-parser for podcast-sites. Also you can use it for any sites.Goal idea: parsing full information per each podcast episodes like number, description and download link.Featuressimple web-spider walking on sitecache for all downloaded pagesparse any information from pagesexport parsed data to MongoDBQuick start$ mkvirtualenv keeper(keeper)$ pip install dark-keeper(keeper)$ cat app.pyfromdark_keeperimportBaseParser,DarkKeeperfromdark_keeper.exportsimportExportMongofromdark_keeper.httpimportHttpClientfromdark_keeper.storagesimportUrlsStorage,DataStorageclassPodcastParser(BaseParser):defparse_urls(self,content):urls=content.parse_urls('.posts-list > .container-fluid .text-left a')returnurlsdefparse_data(self,content):data=[]forpost_itemincontent.get_block_items('.posts-list .posts-list-item'):post_data=dict(title=post_item.parse_text('.number-title'),desc=post_item.parse_text('.post-podcast-content'),mp3=post_item.parse_attr('.post-podcast-content audio','src'),)ifpost_data['title']andpost_data['mp3']:data.append(post_data)returndataif__name__=='__main__':pk=DarkKeeper(http_client=HttpClient(delay=2,user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) ''AppleWebKit/537.36 (KHTML, like Gecko) ''Chrome/81.0.4044.138 Safari/537.36 OPR/68.0.3618.125',),parser=PodcastParser(),urls_storage=UrlsStorage(base_url='https://radio-t.com/'),data_storage=DataStorage(),export_mongo=ExportMongo(mongo_uri='mongodb://localhost/podcasts.radio-t.com'),)pk.run()
Package: darklab-utils
Library of darklab utility programmscontains:Scripts:A package built on top of argparse.
intended usage to be a python version of makefile, for uniform command acceess to run tests/lints in dev env and CIcode example:importdarklab_utilsasutilsclassInputDataFactory(utils.AbstractInputDataFactory):@staticmethoddefregister_cli_arguments(argpase_reader:utils.ArgparseReader)->utils.ArgparseReader:returnargpase_reader\.add_argument("--cli_argument",type=str,default="example")@staticmethoddefregister_env_arguments(env_reader:utils.EnvReader)->utils.EnvReader:returnenv_reader.add_arguments(env_argument1=env_reader["PWD"],env_argument2=env_reader.get("NOT_EXISTING_VAR","default_value"),)classMyScripts(utils.AbstractScripts):input_data_factory=InputDataFactory@utils.registered_actiondefenv_example(self):self.shell(f"echo debug_{self.globals.env_argument2}")@utils.registered_actiondefcli_example(self):self.shell(f"echo debug_{self.globals.cli_argument}")@utils.registered_actiondefcli_extra_arg_example(self):args=self.globals.cli_reader\.add_argument("--argument",type=int,default=456)\.get_data()self.shell(f"echo debug_{args.argument}")if__name__=="__main__":MyScripts().process()# run with `python scripts.py cli_example`, `python scripts.py cli_extra_arg_example --argument=123`Link to Pypihttps://pypi.org/project/darklab-utils/
Package: darklim
DarkLimDarkLim provides statistical tools for calculating dark matter exclusion limits and sensitivity estimates.To install the most recent release of DarkLim, type the following line into your command linepip install darklim --upgradeTo install the most recent development version of DarkLim from source, clone this repo, then from the top-level directory of the repo, type the following line into your command linepip install .If using a shared Python installation, you may want to add the--userflag to the above line(s).NOTE:This package also requires a Fortran compiler if installing from source (or a wheel is not available for your setup). We recommend installinggfortran, which can be done viasudo apt-get install gfortranon Linux orbrew install gccon macOS.
Package: darkmark
DarkMarkRuns codeblocks marked with the darkmark, and inserts the results.DarkMark uses tree-sitter to identify codeblocks.  Currently it only supports python codeblocks in markdown files and runs them with ipython.  Handy for writing docs/blog posts so you can stay right in your markdown editor of choice and get the outputs in line.  No need to jump into a whole other tool just to do live execution.Installationpip install darkmark❯ darkmark --helpUsage: darkmark [OPTIONS] COMMAND [ARGS]...run code blocks in markdown╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────╮│ --install-completion        [bash|zsh|fish|powershell|pwsh]  Install completion for the specified shell.       ││                                                              [default: None]                                   ││ --show-completion           [bash|zsh|fish|powershell|pwsh]  Show completion for the specified shell, to copy  ││                                                              it or customize the installation.                 ││                                                              [default: None]                                   ││ --help                                                       Show this message and exit.                       │╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────╮│ run                                                                                                            ││ sexp                                                                                                           ││ tui                                                                                                            ││ watch                                                                                                          │╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯UsageMark your codeblocks with the darkmark.```python{.python .darkmark}r=requests.get('https://waylonwalker.com')r.status_code```Then rundarkmark <file>.mdand darkmark will insert the results of the codeblock.``` {.console .darkmark_output}
200
```Automatic importsAutomatic imports are provided bypyflyby.Supported LanguagesCurrently the only language supported is python.pythonExampleRunningdarkmark watch <file.md>updates the file on save.darkmark.webmLicensedarkmarkis distributed under the terms of theMITlicense.
Package: darknet1
Info====`vcvf 2018-07-04``Author: Zhao Mingming <471106585@qq.com>``Copyright: This module has been placed in the public domain.``version:2.0.0.1`Classes:- `face_detector`: detect the hand in the imageFunctions:- `test()`: test function- `face_detector()`:  a class- `face_detector.detect_face(image)`: return the face_number,face position,and the confidenseHow To Use This Module======================.. image:: funny.gif:height: 100px:width: 100px:alt: funny cat picture:align: center1. example code:.. code:: pythonfrom vcvf import face_detector as fdimport cv2fd1=fd.face_detector()fd1.test()imf=os.path.join(self.site_package,'test.jpg')print imfimage=cv2.imread(imf)print(fd1.detect_face(image))Refresh========