Saravanan666/pypi-org huggingface dataset:
Package: decision-trees
Final Project DocumentationThe project being tested and deployed is a Python-based project focused on machine learning using
decision trees.I used GitHub Actions to automate both the testing and the deployment of the project. In
my original Project Design Document, I stated that I planned on using Docker and Jenkins for the testing
and deployment, however I have decided to change course and use GitHub Actions for both. All of the
code is centralized on Github, and the code is built, tested, and deployed upon each new push to the main
branch.I utilized unit tests to test the following functions: building the numpy array, building a list from the array,
building a dictionary, training the data, testing the data, making a prediction for a data sample’s label,
building the decision tree, building a random forest, and testing the random forest. I used integration tests
to test how the different data storage types work together (arrays, lists, and dictionaries), how the data
storage types are passed into the decision tree training, the connection between training the data and
building the tree, how a prediction works with a trained data sample, and the connection between building
a decision tree and a random forest. The automated testing only displays the coverage for test.py, but I
have included a screenshot of the coverage report as shown in PyCharm![README](https://user-images.githubusercontent.com/80922081/235816639-37d8b556-e686-4de5-8f50-88459d326eaf.png)
Package: decision-tree-typed
Generic Decision TreeA python module for decision trees.Note:This module is written for python 3.10 and is not guaranteed to be compatible with previous releases. Python 3.10 is currently in prerelease, and is availablehereCode styleThis project uses pylint and mypy. Both will be run by github actions, but you can (and should) do checking locally withpylint decision_tree
mypy decision_tree
Package: deck
DeckDeck is an implementation of thedeckcollection type, commonly confused withcollections.deque.>>>fromdeckimportDeck>>>d=Deck()>>>d.shuffle()>>>d.deal()Card(<Suit.Diamonds:'♦'>,<Value.Two:2>)>>>d.deal()Card(<Suit.Diamonds:'♦'>,<Value.Three:3>)>>>d.deal()Card(<Suit.Hearts:'♥'>,<Value.Ten:10>)>>>d.deal()Card(<Suit.Diamonds:'♦'>,<Value.Nine:9>)Deck supports cheating, if that's how you want to play.>>>d.deal_from_bottom()Card(<Suit.Spades:'♠'>,<Value.Five:5>)Importing thedeckmodule also globally corrects other typographical errors that may occur in your code.>>>importdeck>>>fromcollectionsimportdeck>>>deck<class'deck.Deck'>Taking this module too seriously would be a mistake.However, if you want to use it to write a Poker game, theget_poker_handfunction will help.>>>fromdeckimportDeck,get_poker_hand>>>d=Deck(include_jokers=False)>>>d.shuffle()>>>p1=[d.deal()for_inrange(5)]>>>p2=[d.deal()for_inrange(5)]>>>ifget_poker_hand(p1)>get_poker_hand(p2):...print("Player 1 wins!")...
Package: deck2pdf
Badgesdeck2pdf is batch application that will convert your html slide into PDF format keeping slide layout.Installdeck2pdf is requiredPySideforGhost.py.$ pip install pyside
$ pyside_postinstall.py -install
$ pip install deck2pdfUsageSimply usage:$ deck2pdf <slide-url> -n 10 -s html5slides
$ ls
slide.pdfSpecify slide name:$ deck2pdf -o myslide.pdf <slide-url> -n 10 -s html5slides
$ ls
myslide.pdfArguments-sSLIDE,--slideSLIDESlide style (required)-oOUTPUT,--outputOUTPUTOutput slide file path (optional)-nNUM,--numNUMNum of slides (optional)Supported styleshtml5slidesGoogle HTML5 slidesio2012Google I/O 2012 slidesFutureI want to …Adjust to be able to save html slide of other styles (reveal.js, impress.js).Deliver makefile setting to make slidepdf
Package: deckcam
deckcamCustom software to manage a StreamDeck with Companion, an ATEM switch, and up to three cameras.developer notesConfiguration setup up by loosely following the articles here:https://www.pythoncheatsheet.org/blog/python-projects-with-poetry-and-vscode-part-1https://www.pythoncheatsheet.org/blog/python-projects-with-poetry-and-vscode-part-2https://www.pythoncheatsheet.org/blog/python-projects-with-poetry-and-vscode-part-3
Package: deckcards
Deck of cardsThis is a python package for building or playing card game.InstallationThis packaged was tested in Python versions 3.8, 3.9 and 3.10. to check your Python vesion,python-VTo install deckcards,python -m pip install deckcardsBasic usageThedeckcardsmodules provide a framework to implement a game of cards in python. For details on cards and games of cards check outthis wikipedia page.The two main classes areCardandDeck.CardAn instance ofCardrepresents a single card. Create a card object providing two parameters: rank and suit. Both string. Valid values for ranks are:>>>importdeckcardsasdc>>>print(cd.Card.ranks)['A','2','3','4','5','6','7','8','9','10','J','Q','K']And valids values for suits are either their names or their symbols inunicode emoji representation.Cardhave dictionaries to map both ways:>>>print(dc.Card.suits){'club':'♣','diamond':'♦','heart':'♥','spade':'♠'}>>>print(dc.Card.suits_name){'♣':'club','♦':'diamond','♥':'heart','♠':'spade'}A card objet is only a representation, meaning that it don't present any behavior (method). Create a card:>>>card=dc.Card('A','♠')>>>print(card.rank)A>>>print(card.suit)♠>>>print(card)A♠>>>cardCard.rank:A,Card.suit:♠By defult, 'A' is the highest rank:>>>card.value13DeckAn instance ofDeckhas four behaviors to build most of popular card games: draw, throw, waste and pick a card, based on three main areas:Pack: cards not in game yet. Also know as draw pile, this area feeds the other two areas.Stock: cards in game. Although not implemented in this package, you can think of sub-areas of stock as players's hands and as stack (faced down cards in front of players).Waste pile: cards not in game anymore.DrawAction of taking the card from the top ofpack(draw pile) and put it instock. Stock is where cards in game are stored. A card in game is a card in a player's hand or in table, or stack (shown of not).ThrowAction of taking a given card from stock and throw it towastepile. In practice the most common throw is discarding card from a player's hand.WasteAction of taking a given card from pack, or the card from it's top, and discard towastepile.PickAction of taking a given card from pack, or the card from it's top, and place it instock.A fith behavior can be reproduced with methoddeal(self, n_players=2, n_cards=2, standard=True), wich returns a list ofn_cardsin each elements, whith lengthn_players. This function puts all cards in stock. The dealing fashion is standard by default, i.e., one card each hand, each round of dealing.In src/examples is a script with black Jack implemented. You can run the game:>>fromdeckcards.examplesimportBlackJack>>game=BlackJack()>>game.run()------------
Dealer's cards: |9 ♥||? ?|      -> score: 9player'scards:|J♠||5♦|->score:15-Digitsforstandorhforhit:AuthorsVagner Bessa-bessavagnerLicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for detailsAcknowlegmentsThis project used the template fromhttps://github.com/tomchen/example_pypi_package
Package: deck-chores
A job scheduler for Docker containers, configured via container labels.Documentation:https://deck-chores.readthedocs.ioImage repositories:https://github.com/funkyfuture/deck-chores/pkgs/container/deck-choreshttps://hub.docker.com/r/funkyfuture/deck-choresCode repository:https://github.com/funkyfuture/deck-choresIssue tracker:https://github.com/funkyfuture/deck-chores/issuesFree software: ISC licenseFeaturesdefine regular jobs to run within a container context with container and optionally with image
labelsuse date, interval and cron-like triggersset a maximum of simultaneously running instances per jobrestrict job scheduling to one container per servicemulti-architecture image supportsamd64,arm64andarmplatforms
(the latter are currently not provided for download)ExampleLet’s say you want to dump the database of a Wordpress once a day. Here’s adocker-compose.ymlthat defines a job that will be handled bydeck-chores:version:"3.7"services:wordpress:image:wordpressmysql:image:mariadbvolumes:-./database_dumps:/dumpslabels:deck-chores.dump.command:sh -c "mysqldump --all-databases > /dumps/dump-$$(date -Idate)"deck-chores.dump.interval:dailyIt is however recommended to use scripts with a proper shebang for such actions. Their outputs tostdoutandstderras well as their exit code will be logged bydeck-chores.MaintenanceThe final release is supposed to receive monthly updates that includes updates
of all updateable dependencies. If one is skipped, don’t worry. When a second
maintenance release is skipped, feel free to open an issue to ask what the
status is.You can always build images upon an up-to-date base image with:make buildLimitationsWhen running on a cluster ofDocker Swarmnodes, eachdeck-choresinstance can only observe the containers on the
node it’s running on, and hence only restrict to run one job per service within
the node’s context.AcknowledgementsIt wouldn’t be as charming to write this piece of software without these projects:APSchedulerfor managing jobscerberusfor processing metadatadocker-pyfor Docker interactionflake8,mypy,pytestandtoxfor testingPythonAuthorsFrank Sachsenheim (maintaining)aeri4listalpine-diggerBrynjar Smári BjarnasonGarret Hohmann
Package: deckgljupyter
Script Deckgl for Jupyter NotebookDeckgl-jupyter 는 위치 데이터 시각화 라이브러리인Deck.gl 을 쥬피터 노트북 에서도 쓸 수 있게 만든 라이브러리입니다.예를 들어, 쥬피터 노트북에서 아래와 같은 방법으로 사용가능합니다.현재까지 제공되는 레이어는 다음과 같습니다.Arc LayerPolygon LayerPath LayerTrips LayerScatterPlot LayerGrid LayerGridCell LayerHeatmap LayerHeatmap Layer 의 경우,WebGL2 가 미설치된 브라우저 상황에 따라 작동하지 않을 수 있습니다.렌더링 부분은 전적으로 Deck.gl 버전을 따라가기에, Deck.gl 에서 해결되지 않은 이슈와 버그가 이 패키지에서도 존재할 수 있습니다.
현재 적용하고 있는 Deck.gl 버전은deck.gl@7.2.0입니다.다음과 같은 특징이 있습니다.Mapbox Basemap 을 사용합니다. 따라서,Mapbox Map 에 사용되는 파라미터들을 사용할 수 있습니다.Mapbox-gl-language 가 기본적으로 Add-on 되어있습니다.
따라서,Basemap 언어가 지역에 따라 알아서 바뀝니다.Mapboxgl_jupyter 의 경우, 하나의 맵에 여러 개의Layer 쌓는 것이 불가능했습니다.
하지만 이 패키지에서는 가능합니다.이 패키지는 Deck.gl의 기능들을 구현하되,
코드는 Mapboxgl_jupyter 를 본 떠 만들었고,
사용 스타일은 Deck.gl과 Folium 스럽게 만들었습니다.현재 Uber 팀에서 deck.gl 의 공식 python 패키지인pydeck을 준비하고 있습니다만, 보다 가볍고 빠르게 사용하기 위해, 해당 패키지를 개발했습니다. 아무래도, pydeck 이 제대로 릴리즈 되기 전까지임시로 deck.gl의 기능들을 사용해볼 수 있는 패키지가 될 듯 합니다.InstallationpipinstalldeckgljupyterExamples 은 직접 git clone 통해Examples.ipynb을 확인해주세요.gitclonehttps://github.com/heumsi/deckgljupyter.gitUsage기본적으로 Deck.gl 사용법과 동일합니다.Example.ipynb를 통해, 어떻게 쓰는지 금방 감을 잡으실 수 있을 것이고,
각 레이어의 파라미터는Deck.gl api reference에서 확인하실 수 있습니다.Development & Issue이 패키지는, 사실 제가 시각화 하는 과정에 답답함을 느껴, 원하는대로 사용하고자 빠르게 만든 패키지입니다.
따라서, 아직 부족한게 매우매우 많습니다.
코드를 보시면 아시겠지만, Deck.gl 에는 존재하지만 지금 당장 필요해보이지 않는 레이어의 일부 파라미터들은 코드에 아예 없거나 주석처리 되어있습니다. 따라서, 사용 중에 뭔가 이상하다 싶으면, 코드를 확인해서, 해당 파라미터가 존재하는지 확인해주시기 바랍니다. 다만, 대부분 시각화와 분석하는데 사용되지 않을 것 같은 파라미터들이라고 생각됩니다.이슈와 추가 개발은 언제든지 환영입니다.
코드는 어렵지 않고, 조금 노가다성을 띄고 있습니다.
Deck.gl 에는 있는데 여기에는 없는 코드, 버그가 있는 코드, 리팩토링 등 수정은 언제든지 부탁드립니다.
Package: deckhand
Deckhand - A Collection of development toolsTable of ContentsUsageInstallationUsing DeckhandQuickstartList of CommandsContributingLicenseUsageInstallationThe recommended way to install Deckhand is from our private release repository. This will ensure that you have the latest working version. If your project requires you to modify deckhand, you can always install from source.From Private Repository:If you have Python 3 with pip installed, just run:pip3 install deckhand --extra-index-url https://pypi.mindcloud.tools/oceanstack/release/+simple/From PyPi:pip3 install deckhandFrom source:Clone the repository:git clone https://mindcloud.dev/oceanstack/deckhand/deckhand.gitChange directories:cd deckhand/Run the installer with Python 3:python3 setup.py installUsing DeckhandDeckhand is designed to get you up and running easily. The quickstart will help you get started. If you're looking for a more detailed guide, see thelist of commands.QuickstartAfter installing Deckhand, the first thing you'll want to do is add the private repositories to your pip configuration and install the optional tools:Configure pip for development or stable releases:deckhand config devordeckhand config stableInstall the optional tools:deckhand installThat's it! You can now utilize all of the commands listedbelow.List of CommandsThe following is a list of arguments and commands with definitions for use when runningdeckhandfrom the command line:Optional ArgumentsArgumentDefinitionDefault Value-h,--helpDisplay the help window and exitfalse-v,--versionDisplay name and version number and exitfalse-V,--verbosePrint more informational data to the consolefalsePositional ArgumentsCommandDefinitionOptionsUsageconfigUpdates pip configuration for development or stable releases from theprivate PyPirepositorydevstableresetdeckhand config <option>installInstalls the optional toolsnonedeckhand installlistLists the optional tools that can be installednonedeckhand listupdateUpdates the optional toolsnonedeckhand updateContributingThanks for your interest in contributing! There are many ways to contribute to this project. Get startedhere.LicenseAll software contained in this repository is © 2019 The Deckhand authors and licensed under theApache License 2.0unless stated otherwise.
Package: deckhouse
Deckhouse python librarySimplifies writing module hooks for Kubernetes operators:DeckhouseAddon OperatorShell Operator(values are unaccessible)NOTE:The API is in alpha stageInstallpipinstalldeckhouseSample hook# hello.pyfromdeckhouseimporthookdefmain(ctx:hook.Context):# Manipulate kubernetes state# ... object = { "kind" : "Pod", "apiVersion" : "v1", ... }ctx.kubernetes.create_or_update(object)# Export metrics# ... metric = { "name" : "power", "group": "my_hook", "set" : 9000, ... }ctx.metrics.collect(metric)# Use in-memory values for helm chart. Shell Operator does not support values, but Addon Operator and Deckhouse do.ctx.values.myModule.deployment.replicas=5if__name__=="__main__":hook.run(main,configpath="hello.yaml")# 'config' arg is also supported for raw string# hello.yamlconfigVersion:v1onStartup:10How to testAn example for pytest# hello_test.pyfromhelloimportmainfromdeckhouseimporthook# Inputs#   initial_values = { ... }#   binding_context = [ { ... } ]# Outputs#   expected_metrics = [ ... ]#   expected_kube_operations = [ ... ]#   expected_values_patches = [ ... ]#   expected_values = { ... }deftest_hello():out=hook.testrun(main,binding_context,initial_values)assertout.metrics.data==expected_metricsassertout.kube_operations.data==expected_kube_operationsassertout.values_patches.data==expected_values_patchesassertout.values.myModule.deployment.replicas==5DevelopmentCreate virtual environment with python >= 3.8Install poetrypoetry installmake test
Package: deckian
deckianDual-booting Debian on a Steam Deck,easily.Why?When I got my Steam Deck, I tried to dual-boot Debian stable on it with the official installer.However, the installer was stretched (and in the incorrect rotation!) and it didn't look like it was going to work.I eventually tried installing Ubuntu on it, and most things were working correctly - But there was no sound, and I couldn't use the controller as an actual controller.At that point, I decided to just make a script that can install Debian to an SD Card and automatically fix all of the driver issues I had with it.InstallationAfter cloning this repository, run the following to install deckian to/dev/sdawith the usernameuser(change it to the correct values for your use case first!):sudo python3 -m deckian bootstrap
sudo python3 -m deckian install-desktop plasma
sudo python3 -m deckian push deckian-plasma
sudo python3 -m deckian install deckian-plasma /dev/sda --username=userCredits@iam_tj:matrix.org: Converted the spi-amd kernel module into a dkms moduleKnown issuesThe built-in speaker does not workGNOME (and even gdm) crashesXFCE doesn't have a way to disable wireless (as a solution for this problem, I've added rfkill to the list of packages installed bydeckian bootstrap)FeaturesFeatureWorks?NotesDisplayYesDisplay rotation is broken, butdeckian install-desktophandles that automatically.WirelessYesOn XFCE, you can't turn off wireless. However, you can turn it off withrfkill.AudioPartiallyHDMI audio works automatically. You will need to runaudiofixbefore headphone audio works, and the built-in speaker currently does not work at all.ControllerNoThe Steam Deck controller simulates a keyboard and mouse by default. Disabling that and using it as an actual controller does not work yet.Desktop environmentsDesktop EnvironmentWorks?NotesKDE PlasmaYesKDE Plasma currently is the best DE choice for deckian, everything works really well.XFCEYesWireless cannot be disabled with the GUI, but everything else works.GNOMENoGNOME crashes when it tries to load gdm.
Package: deckocards
Deck of CardsA basic card and deck class for playing around with cards. Cards are objects that have suits and numbers, with an id consisting of the number plus the first letter of the suit. Decks are arrays of card objects with some basic methods.Getting StartedAll you need to do ispip install deckocardsand then you are done.PrerequisitesYou need:Python 3 (preferably 3.6 and above)pip package managerTestsThere are automated tests built into the deck class. Simply run thedeck.pyfile. This tests ensures that the card and deck objects are functioning.
The output should be a series of decks in the console, along with the number of "flushes" that have occurred.If no output is produced or an error occurs while running using this package, please email mehereContributionsFeel welcome to contribute whatever you see fit to this project, as long as it improves its functionality.LicenseThe license can be found in the LICENSE.md file.
Package: deck-of-cards
deck_of_cardsA module to create a deck of cards object with which you can interact.Documentationhttps://deck-of-cards.readthedocs.io/en/latest/Example usageimport the modulefrom deck_of_cards import deck_of_cardscreate an instance of DeckOfCardsdeck_obj = deck_of_cards.DeckOfCards()add jokersdeck_obj.add_jokers()sort the deck by card valuedeck_obj.order_deck()
print("\nDeck sorted\n")
deck_obj.print_deck()give out a random cardcard = deck_obj.give_random_card()card objects have the following attributescard.suit  # 0=spades, 1=hearts, 2=diamonds, 3=clubs, 4=joker
card.rank  # 1=Ace, 11=Jack, 12=Queen, 13=King, 14=B&W Joker, 15=Color Joker
card.value # defaults: same as rank
card.name  # string representation
card.image_path = ""  # path to an image file corresponding to the cardinsert a new card into the deckprint(len(deck_obj.deck))
card = deck_of_cards.Card((2, 11))
print(card.name)
deck_obj.take_card(card)
print(len(deck_obj.deck))shuffle the deckdeck_obj.shuffle_deck()
print("\nDeck shuffled\n")
deck_obj.print_deck()add a second deck of cards to the first oneprint(len(deck_obj.deck))
deck_obj.add_deck()
print(len(deck_obj.deck))Test coverage============================= test session starts =============================
platform win32 -- Python 3.5.3, pytest-3.6.2, py-1.5.3, pluggy-0.6.0
rootdir: C:\Users\Smoky05\PycharmProjects\deck_of_cards, inifile:
plugins: cov-2.5.1
collected 12 items

deck_of_cards\test_deck_of_cards.py ............                         [100%]

----------- coverage: platform win32, python 3.5.3-final-0 -----------
Name                             Stmts   Miss  Cover
----------------------------------------------------
deck_of_cards\deck_of_cards.py     131     29    78%


========================== 12 passed in 0.15 seconds ==========================
Package: deckor
=======Deckor=======Decorate your functions and with 'deckor'ators. A module created while learning decorators.Installation=============pip install deckorDecorators Supported:======================* timer : Measure execution time of functions@deckor.timerdef fact(x):if x <= 0:return 1return x*fact(x-1)* cacheit : Cache intermediate results@deckor.cacheitdef fact(x):if x <= 0:return 1return x*fact(x-1)* trace : Print the pretty recursion trace@deckor.tracedef fib(x):if x < 2:return xreturn fib(x-1)+fib(x-2)fib(10)Now, try trace with cacheit@deckor.cacheit@deckor.tracedef fib(x):if x < 2:return xreturn fib(x-1)+fib(x-2)fib(10)* with_retries : function signature: with_retries(tries=5, delay=0, increment=0). Try execution of function with retries. Retry'tries' no of times. Delay of 'delay' seconds between retries. Increase the delay by 'increment' between retries@with_retries(5)def random_f():try: r = requests.get("random")except: return* syncronize : Provides very basic syncronization. Note: Not free from race condition only for basic usageimport threadinglock = threading.Lock()sample_list = []@deckor.syncronize(lock)def sample(sample_list):sample_list.append(1)#sample list is modified only after lock is acquired#so, mdification is sample_list os thread safe
Package: deckset-inline
Deckset InlineInclude content from other files in your Deckset slides.Okay how?First install the tool:pipinstalldeckset-inlinerThen prepare a file from which you want to include some content. This isa_file.py:print("Hello I am a text file, but this line is not interesting.")print("This second line, though, is vital for any presentation.")print("This third line should be included too.")print("But not this fourth one, don't care for this one.")Then add an openinginlinedirectiveand a closinginlinedirectiveto your presentation Markdown file, where you want the content to appear:<!-- <inline src="a_file.py" verbatim lang="python" start="2" end="3"> -->
<!-- </inline> -->Then run the tool with your presentation file:deckset-inliner--in-place--backup-extbakslides.mdSee how your file has been modifiedin-place, and you now have the lines 2 to 3 ofa_file.pyincluded between the directives:<!-- <inline src="a_file.py" verbatim lang="python" start="2" end="3"> -->```pythonprint("This second line, though, is vital for any presentation.")print("This third line should be included too.")```<!-- </inline> -->See how the directives stay? You can now run the command again after you change the source files.I see, but why?I want to test the code that I put in my slides, so I write it in proper code files that I then run and test (Yes, I sometimes write tests for the code in my slides). If I find an issue with the code, I don't want to be copy-pasting code into the slides again. This tools takes care of that for me.Okay, I want this, tell me moreWelcome!Directives are one line HTML comments with a home made tag inside. The basic directive has the tag nameinlineand these are the available attributes:src: The only mandatory attribute, it specifies the path of the file to include.verbatim: A flag. When present (it takes no value), the included code will be surrounded by lines with 3 backtics each```lang: Impliesverbatim. Specifies the language that will appear at the top of the backticks block.start: Thefirstline of the source file (counted starting at 1) that will appear in the block.end: Thelastline of the source file (counted starting at 1) that will appear in the block.For convenience, I've added a second directive calledpython, which is equivalent of settinglang="python"on aninlinedirective.The tool puts its output on stdout by default, likeseddoes, only if you pass the-i(--in-place) flag it will modify the original file. I recommend you also use the-b(--backup-ext) flag to force the creation of a backup of your file, if you aren't using version control for your slides.There is also an option (-cor--clean) which deletes all the content between opening and closing directives, while leaving the directives themselves intact.Any caveats?The inline operation is not recursive, and the tool will not handle well if you include files that contain other directives.The parsing is quite rudimentary and line based, so directives cannot span across multiple lines.