Saravanan666/pypi-org huggingface dataset:
Package: cardo-python-utils
This library allows the utilization of different utility functions for different scenarios.Main utils:timestringdata_structuresdbdjangodjango_restmathpandasexceptionchoicesQuick startImport wanted function like this:from python_utils.time import date_range
date_range(start_date, end_date)Although the library provides some utility functions related to other libraries like django and pandas, it does not install any dependencies automatically.
This means, you can install the library even if you do not use these libraries, but keep in mind that in this case you cannot use the
functions that depend on them.You can also chose to install the dependencies alongside the library, including the library in the requirements in the form:cardo-python-utils[django]TestsThe library has a 100% coverage by tests. If you want to see tests in action:Inside venv, runpip install-rtests/requirements.txtRun tests viapytestcommand
Package: cardo-sme-sdk
SME SDK for PythonGetting StartedInstallpipinstall-Ucardo-sme-sdkUsageimportsme_sdk# Create a new api config and s3 config for later use, these objects can be created only once# in any module and can be reused in other modules.api_config=sme_sdk.APIConfig(host='http://localhost:8000',api_key='<your-api-key>',)s3_config=sme_sdk.S3Config(access_key_id='access_key_id',secret_access_key='secret_access_key',bucket_name='bucket_name',region_name='region_name',)# When you want to use SME API, you need to create an APIClient object using the api_config created before.data={'key':'value'}client=sme_sdk.APIClient(api_config)s3client=sme_sdk.S3BlobStorageClient(s3_config)result=client.create_new_batch(data,s3client)To learn more about how to use the SDKrefer to our docs
Package: cardpay
Unlimit APIv3 Python SDKYou can sign up for a Unlimit account athttps://www.unlimit.comGetting StartedPlease follow theinstallationinstruction and take a look atusage examples.RequirementsPython 3+Installation & Usagepip installIf the python package is hosted on Github, you can install directly from Githubpipinstallgit+https://github.com/cardpay/python-sdk-v3.git--upgradeorpipinstall'cardpay>=3.64.22'--upgradeThen import the package:fromcardpayimport*SetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--userThen import the package:fromcardpayimport*Usage examplesExample for Authimportosfromcardpayimport*CARDPAY_API_URL=os.getenv('CARDPAY_API_URL','https://sandbox.cardpay.com')GATEWAY_TERMINAL_CODE=os.getenv('GATEWAY_TERMINAL_CODE','00000')GATEWAY_PASSWORD=os.getenv('GATEWAY_PASSWORD','password')auth=AuthApi(ApiClient(baseUrl=CARDPAY_API_URL))result=auth.obtain_tokens(grant_type="password",terminal_code=GATEWAY_TERMINAL_CODE,password=GATEWAY_PASSWORD)access_token=result.access_tokenrefresh_token=result.refresh_tokenprint('access_token:',access_token)print('refresh_token:',refresh_token)Example for paymentimportosfromcardpayimport*CARDPAY_API_URL=os.getenv('CARDPAY_API_URL','https://sandbox.cardpay.com')GATEWAY_TERMINAL_CODE=os.getenv('GATEWAY_TERMINAL_CODE','00000')GATEWAY_PASSWORD=os.getenv('GATEWAY_PASSWORD','password')config=Configuration(base_url=CARDPAY_API_URL,terminal_code=GATEWAY_TERMINAL_CODE,password=GATEWAY_PASSWORD)payments=PaymentsApi(ApiClient(config))request=PaymentRequest(request=ApiClient.uuid_request(),merchant_order=PaymentRequestMerchantOrder(id='merchant order id',description='merchant description'),card_account=PaymentRequestCardAccount(card=PaymentRequestCard(pan='card pan',holder='cardholder in Upper Case',expiration='expiration date',security_code='123'),billing_address=BillingAddress(country='USA',state='NY',zip='10001',city='New York',addr_line_1='address1',addr_line_2='address2')),customer=PaymentRequestCustomer(id='000',full_name='full name',birth_date='birth date',email='e-mail',phone='+###########',work_phone='+###########',home_phone='+###########',locale='en'),payment_method="BANKCARD",payment_data=PaymentRequestPaymentData(currency="currency",amount=1.23))create_payment_response=payments.create_payment(request)payment_id=create_payment_response.payment_data.idredirect_url=create_payment_response.redirect_urlprint("payment_id:",payment_id);print("redirect_url:",redirect_url);payment_response=payments.get_payment(payment_id)print('payment_response:',payment_response)print('payment_status:',payment_response.payment_data.status)Proxy usageThe SDK will automatically use a proxy if theHTTPS_PROXYorHTTP_PROXYenvironment variable is set.If theNO_PROXYenv variable is set, the SDK won't use the proxy for hosts from this variable. The format ofNO_PROXY: comma separated domain names (e.g. "cardpay.com,.example.com").
Package: cardpointe-api-python-client
cardpointe-api-python-clientUnofficial Python client library for CardPointe Gateway and CardSecure APIs.Compatibilitypython>= 3.7InstallationInstall the latest release with pip:pipinstallcardpointe-api-python-clientExample UsageCardPointe Gateway APIfromcardpointe.gateway.apiimportGatewayAPIapi=GatewayAPI(site="fts-uat",merchant_id="496160873888",username="testing",password="testing123")# Inquire Merchantresponse=api.inquireMerchant.get()# Authorization & captureresponse=api.authorization.create(amount="2.50",account="4111 1111 1111 1111",expiry="1225",cvv2="123",name="John Smith",city="Denver",region="CO",postal="80014",email="john@smith.com",ecomind="E",capture="Y",userfields={"invoice":12345,"user_id":3})Check out the table below for the full list of available services:ServiceExamplesInquire Merchantapi.inquireMerchant.get()Authorizationapi.authorization.create(...)Captureapi.capture.create(...)Inquireapi.inquire.get(...)Inquire By Order IDapi.inquireByOrderId.get(...)Voidapi.void.create(...)Void By Order IDapi.voidByOrderId.create(...)Refundapi.refund.create(...)Profileapi.profile.get(...)api.profile.create(...)api.profile.update(...)api.profile.delete(...)Signature Captureapi.signature.create(...)BINapi.bin.get(...)Fundingapi.funding.get(...)CardPointe CardSecure APIfromcardpointe.cardsecure.apiimportCardSecureAPIapi=CardSecureAPI(site="fts-uat",merchant_id="496160873888",username="testing",password="testing123")response=api.tokenize.create(account="4111 1111 1111 1111",expiry="1225",cvv="123")Check out the table below for the full list of available services:ServiceExamplesTokenizeapi.tokenize.create(...)api.tokenize.update(...)Echoapi.echo.create(...)LinksGateway API DocsCardSecure API Docs
Package: card-py-bot
A magic card link auto card data parser and embedder.Installation and UseTo install card-py-bot using pip3 simply enter within your terminal:$ pip3 installcard-py-botAfter installing with pip3, entering the card-py-bot startup command
within terminal will spool up an instance of the card-py-bot. By default
this command is as follows:$card-py-bot-t"path to file containing token string"RequirementsPython3.6:This bot utilizes python3.6 to utilize webscraping on
WOTC MTGâ€™s main card website. Python3.6 (and pip) can be downloaded for
multiple OSes here:https://www.python.org/downloads/release/python-360/Note:Python3.6 should be installed within the C:Program Files
directory.DisclaimerAll card data, card images, and intellectual property owned by Wizards
of the West Coast is rightfully owned by them. This is simply a fan made
creation to help instigate intense Commander Deck discussions.
Package: card-rotator
Card Rotator - Generating 3D Rotation Animation GIFsThis package helps users generate 3D rotating animation cards based on image pairs of front and back. This is similar to what 3dgifmaker (https://www.3dgifmaker.com/) can do, but couldn't really generate them in bulk. This module provides an alternative solution with bulk-generating capabilities.InstallationRun the following to install the python dependencies:pip install opencv-python numpy PillowTo install this package via pip, run:pip install card-rotatorUsageBasic UsagefromCardRotatorimportCardRotatorrotator=CardRotator(input_folder)rotator.run(output_path)ParametersTo vary parameters of the animations,CardRotatorclass has arguments shown below:rotator=CardRotator(input_folder:str,frames:int=240,speed:int=60,buffer_px:int=100,zoom_factor:int=50,verbose:bool=True)NameDescriptionDefault settinginput_folderabsolute path with image file pairs, where each image pair should be formatted exactly as[file_name]_front.jpgand[file_name]_back.jpgfor it to be successfully detectedn/aframesnumber of frames, controls the smoothness240speedspeed of rotation, play around with this number60buffer_pxthe black frame to extend the image by in pixels100zoom_factoraffects the field of view, play around with this50verboseif you'd like to have printed statementsTruerotator.run(output_path)NameDescriptionDefault settingoutput_pathabsolute path of where the output GIFs should be locatedn/aDemoExamples
Package: cardsboard
CardsboardTerminal Kanban board for cards-based project management.Under the hood Cardsboard functions as a file explorer.
Items are stored as simple files directly on the file system.
This means they can be easily edited by opening them in your preferred text editor.
Furthermore, this allows for easy synchronization and integration with scripting and automation.The UI is inspired by simplifying the interface of Nextcloud Deck, removing all advanced features (collaboration, comments etc.).
Only the indicator of content in cards is kept, which allows to discern simple tasks from longer notes.InstallationpipinstallcardsboardUsagecardsboard [-h] [-d DATADIR]KeyDescriptionq, ctrl + cquitarrow leftfocus leftarrow rightfocus rightarrow upfocus uparrow downfocus downgfocus top itemGfocus bottom itemhomefocus first columnendfocus last columnShift + arrow leftmove item leftShift + arrow rightmove item rightShift + arrow upmove item upShift + arrow downmove item downenteropen focused itemrreload data from diskoinsert item belowirename focused itemdddelete focused itemcinsert column rightIrename focused columnhmove column leftlmove column rightdcdelete columnConfigurationIf non-existent, Cardsboard creates a default configuration at~/.config/keepmenu/config.ini.
To be able to open and edit items you additionally need to setcmdto a program that can open Markdown files.
Use the placeholder{}for the absolute path to the file.For example, to open files in vim in a new Alacritty terminal window you can use:cmd=alacritty --title cardsboard-popup -e bash -c 'vim "{}"' > /dev/null`Additional options like--tiltecan tell the window manager to treat the window in a special way, e.g., as a pop-up window.Furthermore, Cardsboard automatically detects when it is running inside Tmux and you can configure a special command for that case, e.g. use:cmd_tmux=tmux popup -E vim "{}"Similar Projectshttps://github.com/PlankCipher/kabmathttps://github.com/smallhadroncollider/taskellhttps://github.com/arakkkkk/kanban.nvimhttps://warmedal.se/~bjorn/posts/vim-kanban-board.html
Package: cardscan
CardscanOpenCV python pipeline to extract black bordered frame in an image. Post process the image, find and filter contours, fix the perspective, crop and rotate. No machine learning involved.Experimental stage projectInstallpipinstallcardscanUsageimportcv2fromcardscanimportscanimg=cv2.imread('path_to_your_image.jpg')img_result_array=scan(img)More exampleshereDevinstall poetrypipinstallpoetryinstall dependencies# cd at the project rootpoetryinstallrun one of the pipeline visualization apppoetryrunpython-mexamples.cam_draw_pip
poetryrunpython-mexamples.cam_use_pipeline
poetryrunpython-mexamples.cam_visual_pipeline
poetryrunpython-mexamples.cam_visual_contours
poetryrunpython-mexamples.cam_simple
poetryrunpython-mexamples.from_file
Package: cards-deck
Deck of CardsThis repo uses code based onAllen Downey’sThinkPython2.InstallAfter cloning this repository:pip install -e .CautionThis project is an example of how to create python packages withnbdev. It’s not a fully-fledged
card dealing library!How to usePlaying cards in python!fromcards_deck.deckimportDeckd=Deck()print(f'Number of playing cards in the deck:{len(d)}')Number of playing cards in the deck: 52card=d.pop()card,len(d)(K♠️, 51)Seethe docsfor more
info.Thedraw_cardscli:We included a handy cli you can use to draw cards as well!!draw_cards-husage: draw_cards [-h] [--replace] [--outfile OUTFILE] n

Draw `n` cards optionally with replacement

positional arguments:
  n                  number of cards to draw

optional arguments:
  -h, --help         show this help message and exit
  --replace          whether or not draw with replacement (default: False)
  --outfile OUTFILE  output file, defaults to stdout!draw_cards105❤️
6❤️
10♠️
4♣️
A♣️
A❤️
9❤️
4❤️
K❤️
3♣️
Package: cardsharp
CardSharpDescriptionCardSharp is a Python package for simulating and testing card games. The package currently supports Blackjack but can be extended to support more card games.Key FeaturesSimulation of multiple games in a batch.Configurable game rules.Test and console-based IO interfaces.InstallationClone the repository.Navigate to the project directoryInstall dependencies with Poetry.UsageYou can run blackjack simulation mode with:$ poetry shell
$ python blackjack.py --simulate --num_games 100For more usage instructions, please refer to the documentation and the code comments.ContributingContributions are welcome!LicenseThis project is licensed under the terms of the MIT license.
Package: cardsol
Cardinality Constrained Quadratic Optimization Solver (cardsol)cardsolis a small package for solving mathematical optimization problems of convex Cardinality Constrained Quadratic
Optimization (CCQP) problems.cardsol translates the CCQP problem into a Mixed-Integer Optimization Problem (MIQP) provides
the following algorithms to solve it:Outer Approximation (OA) methodLP/NLP based Branch and Bound methodDependenciesScipyNumpyGurobipy and gurobi solverInstallpip install cardsolExample: Random convex CCQPImportsfromnumpy.randomimportrandn,randfromnumpyimporteyefromtimeimporttimefromcardsol.problem.constraintsimportLinearConstraintfromcardsol.problem.functionsimportQuadraticFormfromcardsol.problem.modelimportQPModelfromcardsol.problem.objectiveimportQPObjectivefromcardsol.problem.variablesimportVariablefromcardsol.solver.outer_lpnlp.solverimportCCQPSolver,LPNLPCCQPSolverDefine problem Datan=...# number of variablesk=int(n/2)# level of cardinalitym=1maxiter=100Q=rand(n,n)Q=Q+Q.TQ=Q.T@Q# Hessian Matrixc=randn(n,1)# gradient vectorDefine the modelx=Variable(shape=(n,1),name="x")obj_func=QuadraticForm(Q,c,x)objective=QPObjective(obj_func,sense="minimize")constr=LinearConstraint()model=QPModel(objective,constr)Instantiate Solversmultiple_tree=CCQPSolver(model)single_tree=LPNLPCCQPSolver(model)Solve the modelstart_single=time()obj_2=single_tree.solve(k,m)end_single=time()-start_singlestart_multiple=time()_,obj_1=multiple_tree.solve(k,m,100)end_multiple=time()-start_multipleCreating Docker Imagesudo docker build .
Package: cardsort
A Python package to cluster and visualize data from open card sorting tasksCardsort helps UX researchers quickly analyse data from open card sorting exercises using hierarchical cluster analysis. This task helps to understand how people organize information, and is frequently used to develop information architectures for websites. Clickhereto learn more about the card sorting method.More precisely, cardsort helps you to:Create distance matrices using hierarchical cluster analysisCreate dendrograms from based on these matricesExtract user-generated category-labelsUsing data exports fromkardsort.comTable of ContentsDocumentationQuick startInstallationUsageAccepted dataAdvanced usageContributingLicenseCreditsDocumentationcardsort.readthedocs.ioQuick startInstallation$pipinstallcardsortUsagecardsortcan be used to create dendrograms and extract user-generated category-labels:fromcardsortimportanalysisimportpandasaspdpath="example-data.csv"# data with columns: card_id, card_label, category_id, category_label, user_iddf=pd.read_csv(path)The data used in this example can be found under/docs/example-data.csv.Create a dendrogram that summarizes user-generated clustersanalysis.create_dendrogram(df)OutputLearn which category labels users gave to clusterscards=['Banana','Apple']analysis.get_cluster_labels(df,cards)Outputuser_idcluster_labelcards02Healthysnacks[Banana,Apple]13Snacks[Sandwich,Croissant,Banana,Mooncake,Apple]24Fruits[Apple,Banana]35Food[Banana,Croissant,Apple,Sandwich,HotDog,...Interpretation:In this case, the users with IDs 2 and 4 made clusters containing exactly the two cards of interest ('Banana' and 'Apple', as specified in the input variable 'cards'). User 2 labelled this cluster 'Healthy snacks', and user 4 'Fruits'. Users 3 and 5 also clustered these cards together, but they included additional other cards in the same cluster, and labelled the cluster 'Snacks' or 'Food'. User 1 does not appear in the output, because they did not cluster the cards together.Accepted dataThis package works with data exports fromkardsort.com(Export format 'Casolysis Data (.csv) - Recommended') or other data following the same structure.Columns:card_id, card_label, category_id, category_label, user_idAdvanced usageSeedocumentationProject informationLicensecardsortis licensed under the of theMIT license.ContributingInterested in contributing? Check out thecontributing guidelines. Please note that this project is released with aCode of Conduct. By contributing to this project, you agree to abide by its terms.CitationIf you want to cite cardsort, please use the following DOI:Creditscardsortwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.ContributorsThanks goes to these wonderful people (emoji key):Katharina Kloppenborg💻🤔📖🎨📆🔬Bastian Greshake Tzovaras🔍💻🤔🧑‍🏫Alex Batisse👀🤔Semidán Robaina👀🤔khynder👀🤔This project follows theall-contributorsspecification. Contributions of any kind welcome!
Package: card-temps
SummaryThis is a set of scripts used to parse and display the FPGA processor temperature information for a Gatan K3 camera server as reported in the Digital Micrograph (DM) logs.  This is useful for determining if there are overheating problems and to see if the fans on any of the FPGAs has died (indicated by a sustained increase in the temperature of one processor).RequirementsThis script requires a python installation of version 3.6 or higher. Matplotlib is required to use the --plot/-p option but is not required for the summary or csv output.InstallationInstall into an appropriate python environment usingpip install card_tempsor by cloning this repository. Cloning will require running the script directly using the./card_temperaturesstyle.UsageThe script can be run pointing at DM log files and/or zip files containing DM logs. These are located by default at c:\ProgramData\Gatan\Logs. The default zipfile containing logs for the last year is DM.Archive.log and the log for the current day is .DM.log, filling in the date in YYYY-MM-DD format for . This makes the command to look at the log for 2021-07-27card_temperatures c:\ProgramData\Gatan\Logs\2021-07-27.DM.log.  When run without any parameters ascard_temperaturesit will search the default log path for any .DM.log files and operate on them automatically.This mode (no flags) will output a min/max/avg summary for each processor, calculated over the entirety of the input data. In some versions of DM the logged values are the same for both of the processors on a card, in newer versions the temperature of each processor is reported independenly.Specifying --output  will write a csv file. The output will contain summary rows for each processor for each day in the input data. This can the be manipulated in other programs to further slice or analyze the data.Specifying --plot (requires matplotlib) will plot the data on a per-processor basis in time-series, showing the min/max/avg values for each day.Any day that has a zero is the result of a communication error occurring between DM and the card, during which it records 0.00 as the temperature.NotesI've only been able to test this on microscopes that are maintained in very similar condition and which run nearly-identical versions of DM. I'm fairly sure that other versions may cause bugs. If you suspect there's a bug related to the DM version, please contact me and I'll try to take a look at it.
Package: cardtool
CardtoolA card data generation tool with DUKPT key derivation.InstallationYou should have python 3.9 or later to run this tool. So, please be sure you have the python interpreter installed before trying this setup guide.Create a virtual environment:python3-mvenv.envActivate the virtual environment:source.env/bin/activateFor testing purposes with alpha or beta versions, install this tool fromTestPyPI:pip3install-U--extra-index-urlhttps://test.pypi.org/simple/cardtool==x.y.z[ab]NOtherwise, install this tool fromPyPI:pip3installcardtoolFinally, use it:cardtool--helpCommands referenceKey decryptionA command to decrypt a TR-31 key block.cardtooldecrypt-key-kbpk<your_key_block_protection_key>-kcv<key_check_value>YOUR_KEY_BLOCKCard data generationA command to generate a file with encrypted card data using DUKPT key derivation.cardtoolgen-card-cfg<path_to_config_yaml>-fmtjson|yamlpath_to_dump_card_data.[json|yaml]Card data generation configuration fileThe following is a reference configuration file for the gen-card command.!CardConfig# current version of commandversion:"0.1"# terminal informationterminal:!Terminal# terminal countrycountry:MEX# encryption keyskey:# keys used to encrypt datadata:!Key# base derivation keybdk:0123456789ABCDEFFEDCBA9876543210# key serial numberksn:FFFF4545450000100002# keys used to encrypt pinpin:!Key# base derivation keybdk:0123456789ABCDEFFEDCBA9876543210# key serial numberksn:FFFF4545450000100002# transaction informationtransaction:!Transaction# type of transactiontype:charge# transaction amountamount:10.2# another transaction amount, e.g., cashback amountother_amount:10.23# transaction currencycurrency:USD# date of transaction with DDMMYY formatdate:"220125"# array of cards to generatecards:-!Card# card label, useful as an identifier for this cardlabel:"Test"# primary account number 16-19 digitspan:"5477820000001234"# card pin 4-6 digitspin:"1234"# card brand (Visa, Mastercard, Carnet)brand:"Mastercard"# cardholder namecardholder_name:Test 1# card expiry monthexpiry_month:"12"# card expiry yearexpiry_year:"24"# card service codeservice_code:"201"# card sequence numbersequence_number:1
Package: cardutil
Cardutil is a python package for working with payment card systems including
command line tools for working with Mastercard IPM files.FeaturesISO8583 message parsingMastercard IPM file reader/writer/encoderCheck digit calculatorEncrypted pin block generatorVisa PVV calculatorPermissive license (MIT)InstallingInstall and update using pip:pip install -U cardutilInformationSupports python 3.7 and later.Pythonic programmer interfacesCore library haszeropackage dependencies.Low memory usageDownload frompypiDocumentation available atRead The DocsandGitHub PagesSource hosted atGitHubAcknowledgementsThe pythonhexdumplibrary is embedded in this package. Many thank to Anatoly Techtonik <techtonik@gmail.com>
This library is a life saver for debugging issues with binary data.
Available atPypi:hexdump.The iso8583 module in cardutil was inspired by the work of Igor V. Custodio from his
original ISO8583 parser. Available atPypi:ISO8583-Module.Mastercard is a registered trademark of Mastercard International Incorporated.
Package: carefree-client
carefree-clientis a client framework based onFastAPI. It also supports interacting with Triton Inference Server.pipInstallpipinstall-e.Runuvicornapis.interface:app--host0.0.0.0--port8123DockerBuilddockerbuild-tcfclient.If your internet environment lands in China, it might be faster to build withDockerfile.cn:dockerbuild-tcfclient-fDockerfile.cn.Rundockerrun--rm-p8123:8123-v/full/path/to/your/client/logs:/carefree-client/apis/logscfclient:latestordockerrun--rm--linkimage_name_of_your_triton_server-p8123:8123-v/full/path/to/your/client/logs:/carefree-client/apis/logscfclient:latestIn this case, you need to modify theapis/interface.pyfile as well: you need to modify theconstantsvariable (defined at L27) and set the value oftriton_host(defined at L28) fromNonetoimage_name_of_your_triton_server.