Saravanan666/pypi-org huggingface dataset:
Package: febraban-barcode
Febraban BarcodeImplementação em python do layout padrão de arrecadação/recebimento com utilização do código de barras da Febraban.A arrecadação de tributos/taxas estaduais e municipais e contas de concessionárias de serviços públicos com código de barras segue as especificações técnicas definidas pela Febraban - Federação Brasileira de Bancos, atualmente na versão 6 do layout.Layout Padrão de Arrecadação/Recebimento com Utilização do Código de BarrasCom este pacote é possível:Gerar a numeração do código de barrasGerar a linha digitável com os dígitos verificadores de cada blocoCalcular os dígitos verificadores módulo 10Calcular os dígitos verificadores módulo 11Gerar imagem do código de barras em PNGGerar imagem do código de barras em SVGGerar imagem em base64 PNG para uso em HTMLGerar imagem em base64 SVG para uso em HTMLInstalaçãopipinstallfebraban_barcodeUtilizaçãofromdatetimeimportdatefromtinydbimportTinyDBfromfebraban_barcodeimportbarcode,decode_barcode,linha_digitavelfromfebraban_barcode.base64importbase64_png,base64_svg,html_base64_testefromfebraban_barcode.constantsimport(MODULO10_VALOR_EFETIVO,PRODUTO_ARRECADACAO,SEGMENTO_TELECOMUNICACOES,)fromfebraban_barcode.imageimportimage_png,image_svgfromfebraban_barcode.modulo10importmodulo10fromfebraban_barcode.modulo11importmodulo11if__name__=='__main__':# Gera o código de barrascodigo_de_barras=barcode(produto=PRODUTO_ARRECADACAO,segmento=SEGMENTO_TELECOMUNICACOES,codigo_moeda=MODULO10_VALOR_EFETIVO,valor=10.99,id_empresa_orgao='1042',vencimento=date(2023,12,31),dados_campo_livre='54321',)print(codigo_de_barras)# Gera linha digitáveltxt_linha_digitavel=linha_digitavel(codigo_de_barras)print(txt_linha_digitavel)# Decodifica o código de barrasdecode_barcode(codigo_de_barras)# Decodifica o código de barras e grava em um jsondb=TinyDB('db.json')db.insert(decode_barcode(txt_linha_digitavel,True))# Calcula o módulo 10 de 01230067896print(modulo10('01230067896'))# 3# Calcula o módulo 11 de 01230067896print(modulo11('01230067896'))# 0# Gera o código de barras em PNGimage_png(filename='barcode.png',barcode=codigo_de_barras,linha_digitavel=txt_linha_digitavel,)# Gera o código de barras em SVGimage_svg(filename='barcode.svg',barcode=codigo_de_barras,linha_digitavel=txt_linha_digitavel,)# Gera o código de barras em base64 PNG para utilização em htmlhtml_base64_teste('index1.html',base64_png(codigo_de_barras,linha_digitavel=txt_linha_digitavel),)# Gera o código de barras em base64 SVG para utilização em htmlhtml_base64_teste('index2.html',base64_svg(codigo_de_barras,linha_digitavel=txt_linha_digitavel),)
Package: febraban-cnab
GlobalBefore deployment, change the projectversiononsetup.pyfile and
set the correctdownloadurl_. Then make sure you have the file~/.pypircwith the content below and the correct credentials instead
of the provided placeholders:[distutils]
index-servers =
    pypi
    pypitest

[pypi]
repository:https://upload.pypi.org/legacy/
username:myusername
password:mypassword

[pypitest]
repository:https://test.pypi.org/legacy/
username:myusername
password:mypasswordTest environmentRunpython setup.py sdist upload-rpypitestinside the project
directory.Live environmentRunpython setup.py sdist upload-rpypiinside the project
directory.
Package: fec
# FEC API wrapperby Jake Karajkara@trendct.org#### Example 1: Quickstart>>> from fec import Fec
>>> conn = Fec(YOUR_API_KEY)
>>> ret = conn.get("/candidates")
>>> print ret#### Example 2: Optionalsret = conn.get(“/candidates”,pages=[1,2,3,4,5], # Specify which pages to retrieve
params=”&cycle=2012&cycle=2016&office=P”) #Specify parameters#### Unstable code warning!At the moment I don’t have plans to develop this into a stable and
backwards compatible code base. I haven’t added a lot of conveniences
likehard-coding queries you can make. I’m publishing this code in case
someone else finds it useful to see how to build a quick API wrapper.Here are some features I do plan to add:1. A parameter-forming method so you don’t have to pass
all the URL parameters in one mashed-up string.A method to get all pages of results3. Rate limit-friendliness? Maybe I’ll make this prevent you from
running over API rate limits. Maybe not.Maybe I will add convenience methods for common queries.
Package: fec2xlsx
Microsoft Excel can be a powerful tool for analyzing FEC filings. This library (hopefully) makes it easy to create multi-sheet Excel files from files in the .fec file format, with a sheet for the summary data and a sheet for each type of itemization.UsageNote: this library works best with version 3.7+ of Python due to the ordering of dictionary keys beingguaranteedto be in insertion order. The library should still work in older version of Python, but the columns on each sheet might be in a nonsensical order.First, install from PyPi:pip install fec2xlsxThen, call one of the two methods for generating Excel files:import fec2xlsx



fec2xlsx.file_number_xlsx(1326061, 'Gillibrand_Q1.xlsx')



fec2xlsx.file_location_xlsx('/path/to/1326016.fec', 'Harris_Q1.xlsx')Thefile_number_xlsxmethod requests the specifiedfile_numbervia http from the FEC's server's, first trying the URL for digital filings, then trying the URL for paper filings if the first response returns a 404 status code.Thefile_location_xlsxmethod reads from the specifiedfile_path(which takes anything you might pass to Python'sopenmethod) then writes to the specifiedfilenameoutput.Both methods take an optionaloptionskeyword argument.Optionsfilter_memo_x: (default:True) if True, ignores rows that have "X" as theirmemo_code. If, for example, a contribution comes in through a conduit committee like ActBlue, there are two rows: one for the contribution from an individual to the conduit and one from the conduit to the committee filing the report. Generally the second of those rows is marked with an "X" in thememo_codefield and is the less useful of the two.money_format: (default:$#,##0.00) The format used for displaying monetary values. Seeherefor more details/documentation.date_format: (default:d mmm yyyy) The format used for displaying date values. Seeherefor more details/documentation.
Package: fec-filing-iterator
Overviewfec-filing-iteratorprovides a simple interface for iterating through
results from theFederal Election Commission’s APIas a single, lazily evaluated stream.
The FEC’s API provides access to a wealth of data on where candidates and
committees get their funds, what they spend them on, and more.  This library
simply tries to make the API easier to work with in Python.Getting StartedIn order to use this library you will first need to get adata.govAPI key, whichyou can request here. Once you get an API key you will be allowed to
make 1,000 requests to the FEC API per hour.  If you want more throughput you
can request that your key be upgraded to be allowed to make 120 calls per
minute by emailingAPIinfo@fec.govand asking
nicely.Next, you’ll have to install the library:pip install fec-filing-iteratorNow you’re all set to start exploring campaign finance data! For example:import json
from fec_filing_iterator import schedules

api_key = '<YOUR_DATA_DOT_GOV_API_KEY>'

params = {
    'two_year_transaction_period': 2020,
    'committee_id': 'C00696948',
}

for filing in schedules('a', api_key=api_key, params=params):
    print(json.dumps(filing, indent=4))Factories and IteratorsThis library only tries to provide an easy way to access and iterate through
the paginated results returned by the FEC API. It doesnotcurrently attempt
to provide a full and consistent interface for retrieving arbitrary subsets of
information from the API. Lots of powerful searches and queries can be
parameterized through the API, but we leave it up to you to read theFEC’s
documentationand find the appropriate
parameters yourself.The main workhorse of the library is theFilingIteratorclass. Construct it with API credentials, an API endpoint to iterate over, and
whatever parameters you want, and you can treat the full set of records as one
big iterable.The library also provides several handy factory functions that will construct
theFilingIteratorobject and configure it for the appropriate endpoint.
Package: fecho
fechoUses Facebook's debugging tool to bypass CAPTCHA and other blacklists.InstallpipinstallfechoUsageThe cookie can be extracted using theEditThisCookiebrowser extension. Just export the cookies after logging intoFacebook.Command Linefecho--url'https://www.google.com/search?q=sample+query'--cookie'[{"domain": ".facebook.com","expirationDate": 1597023793.932123,"hostOnly": false,"httpOnly": false,"name": "c_user","path": "/","sameSite": "unspecified","secure": true,"session": false,"storeId": "0","value": "","id": 1},...]'PythonfromfechoimportClientCOOKIE="""[{"domain": ".facebook.com","expirationDate": 1597023793.932123,"hostOnly": false,"httpOnly": false,"name": "c_user","path": "/","sameSite": "unspecified","secure": true,"session": false,"storeId": "0","value": "","id": 1},...]"""client=Client(COOKIE)response=client.get("https://www.google.com/search?q=test")print(client.unescape(response.text))NoteThis project was inspired bys0md3v/goop
Package: feco3
FECo3Python bindings for a.fecfile parser in rust.Install withpip install feco3API docsRepositoryExampleimportpyarrowaspaimportfeco3# ruff: noqa: E501# You can supply a URL or a path to a file.src="https://docquery.fec.gov/dcdev/posted/1002596.fec"# src = "path/to/file.fec"# src = pathlib.Path("path/to/file.fec")# This doesn't actually read or parse any data yetfec=feco3.FecFile(src)print(fec)# FecFile(src='https://docquery.fec.gov/dcdev/posted/1002596.fec')# Only when we access something do we actually start parsing.# Still, we only parse as far as we need to, so this is quite fast.# This is useful, for example, if you only need the header or cover,# or if you only want to look at the itemizations in certain forms.print(fec.header)print(fec.cover)# Header(fec_version='8.1', software_name='NetFile', software_version='199199', report_id=None, report_number='0')# Cover(form_type='F3N', filer_committee_id='C00479188')# Iterate through the itemizations in the file in batches of pyarrow RecordBatches.# By iterating, this keeps us from having to load the entire file into memory.# By using pyarrow, we can avoid copying the underlying data from Rust to Python.# It integrates well with the rest of the Python data ecosystem, for example# it's easy to convert to a pandas DataFrames.batcher=feco3.PyarrowBatcher(fec,max_batch_size=1024*1024)forbatchinbatcher:# The record code for this kind of itemizations, eg. 'SA11AI'assertisinstance(batch.code,str)# A pyarrow RecordBatch of the itemizationsassertisinstance(batch.records,pa.RecordBatch)df=batch.records.to_pandas()print(batch.code)print(df.head(3))# SA15#   filer_committee_id_number transaction_id back_reference_tran_id_number back_reference_sched_name  ... conduit_zip_code memo_code memo_text_description reference_code# 0                 C00479188        INCA994                                                          ...# 1                 C00479188        INCA992                                                          ...# 2                 C00479188        INCA993                                                          ...# [3 rows x 44 columns]# TEXT#   filer_committee_id_number transaction_id_number back_reference_tran_id_number back_reference_sched_form_name            text# 0                 C00479188              TPAYC760                       PAYC760                          SC/10  PERSONAL FUNDS# SC/10#   filer_committee_id_number transaction_id_number receipt_line_number entity_type  ... lender_candidate_state lender_candidate_district memo_code memo_text_description# 0                 C00479188               PAYC760                 13B         CAN  ...# [1 rows x 37 columns]                       ...
Package: fec-reader
FEC Data ReaderA quick way to retrieve FEC bulk data fromhttps://www.fec.gov:>>> import fec_reader as fec
>>> reader = fec.DataReader(data_dir='/raw') # pick a target directory
>>> reader.get_pac_summary(2010, 2018)Each reader function allows you to specify year ranges for the data downloads. For example, the code below
retrieves 3 data files:reader.get_pac_summary(2014, 2018)This is because the data in each file spans two calendar years.This package is a demonstration of ETL skills for Alexus Wong. However, it is also important
that we as a society can efficiently consume the inordinate amount of information available
today. If we can process it, we can take steps in the right direction.There is a 5 second delay between files to respect FEC.gov's bandwith.FeaturesFEC Reader currently retrieves these data files:PAC Summary -https://www.fec.gov/campaign-finance-data/pac-and-party-summary-file-description/-reader.get_pac_summary(start, end)Candidate Master -https://www.fec.gov/campaign-finance-data/candidate-master-file-description/-reader.get_candidate_master(start, end)Contributions from committees to candidates and independent expenditures -https://www.fec.gov/campaign-finance-data/contributions-committees-candidates-file-description/-reader.get_contributions_to_candidates(start, end)InstallationTo install FEC Reader, simply use pip:$ pip install fec-reader
Package: fec-to-sqlite
fec-to-sqliteCreate a SQLite database using FEC campaign contributions data.This tool builds onfecfileby Evan Sonderegger.How to install$ pip install fec-to-sqliteUsage$ fec-to-sqlite filings filings.db 1146148This fetches the filing with ID1146148and stores it in tables in a SQLite database calledfilings.db. It will create any tables it needs.You can pass more than one filing ID, separated by spaces.
Package: fedbase
FedBaseAn easy, modularized, DIY Federated Learning framework with many baselines for individual researchers.Installationfedbase @ pypipipinstall--upgradefedbaseBaselinesCentralized trainingLocal trainingFedAvg,Communication-Efficient Learning of Deep Networksfrom Decentralized DataFedAvg + FinetuneFedprox,Federated Optimization in Heterogeneous NetworksDitto,Ditto: Fair and Robust Federated Learning Through PersonalizationWeCFL,On the Convergence of Clustered Federated LearningIFCA,An Efficient Framework for Clustered Federated LearningFeSEM,Multi-Center Federated LearningTo be continued...Three steps to achieve FedAvg!Data partitionNodes and server simulationTrain and testDesign philosophyDatasetDatasetMNISTCIFAR-10Fashion-MNIST...Dataset partitionIIDNon-IIDDirichlet distributionN-class...Fake data...NodeLocal datasetModelObjectiveOptimizerLocal updateTestServerModelAggregateDistributeServer & NodeTopologyClient samplingExchange messageBaselinesGlobalLocalFedAvgVisualizationHow to develop your own FL with fedbase?
Package: fedbiomed-cli
Fedbiomed clientInstallingpipinstallfedbiomed-cliAdding a datasetfedbiomed-node--addStart the nodefedbiomed-node--start-node# An automated ID will be generatedListing my datafedbiomed-node--listMaking a dataset unavailablefedbiomed-node--deleteA summary of the available commandsfedbiomed-node-h
Package: fedcontinuum
FedContinuum: Federated Continual Learning Scenarios Management ToolSystem EnvironmentsPython Dependent PackagesPackagenameVersionNoteloguru0.6.0== to latesttqdm4.65.0== to latestpyyaml6.0== to latestwandb0.14.0== to latesttorch2.0.0== to latesttorchvision0.15.1== to latest
Package: fedcred
The following identity providers are currently supported:Active Directory Federation Services (ADFS)OktaInstallation:Option 1$pipinstallfedcredOption 21.Clonethisrepo2.$pythonsetup.pyinstallConfig File SetupThe configuation file is namedfedcred.configand should exist in the users home directory.[fedcred]provider={okta, adfs}aws_credential_profile=defaultsslverify=True[okta]organization=<yourorg>.okta.comapp_url=<okta application url>[adfs]ntlmauth={True, False}url=https://<adfs fqdn>/adfs/ls/idpinitiatedsignon.aspx?loginToRp=urn:amazon:webservicesUsage$fedcred
Package: federa
Federated Learning FrameworkFedERAis a highly dynamic and customizable framework that can accommodate many use cases with flexibility by implementing several functionalities over different federated learning algorithms, and essentially creating a plug-and-play architecture to accommodate different use cases.Supported DevicesFedERA has been extensively tested on and works with the following devices:Intel CPUsNvidia GPUsNvidia JetsonRaspberry PiIntel NUCWithFedERA, it is possible to operate the server and clients onseparate devicesor on asingle devicethrough various means, such as utilizing different terminals or implementing multiprocessing.InstallationInstall the stable version via PyPi:$ pip install federaFor more installation options check out theonline documentation.DocumentationWebsite documentation has been made availbale forFedERA. Please visitFedERA Documentationfor more details.OverviewInstallationTutorialsContributionAPI ReferenceFederated Learning AlgorithmsFollowing federated learning algorithms are implemented in this framework:MethodPaperPublicationFedAvgCommunication-Efficient Learning of Deep Networks from Decentralized DataAISTATS'2017FedDynFederated Learning Based on Dynamic RegularizationICLR' 2021ScaffoldSCAFFOLD: Stochastic Controlled Averaging for Federated LearningICML'2020Personalized FedAvgImproving Federated Learning Personalization via Model Agnostic Meta LearningPre-printFedAdagradAdaptive Federated OptimizationICML'2020FedAdamAdaptive Federated OptimizationICML'2020FedYogiAdaptive Federated OptimizationICML'2020MimeMime: Mimicking Centralized Stochastic Algorithms in Federated LearningICML'2020MimeliteMime: Mimicking Centralized Stochastic Algorithms in Federated LearningICML'2020Datasets SupportedDatasetTraining samplesTest samplesClassesMNIST60,00010,00010FashionMnist60,00010,00010CIFAR-1050,00010,00010CIFAR-10050,00010,000100Custom Dataset SupportWe also provide a simple way to add your own dataset to the framework. The models employed in this framework were trained using a limited subset of the publicly accessible benchmark dataset MedMNIST v2(link). We specifically selected four different medical image classes from this dataset, which include breast ultrasound (US), chest X-ray, retinal optical coherence tomography (OCT), and tissue microscopy. Each image within the dataset possesses dimensions of 28x28 pixels.
For the framework's implementation, we utilized this custom dataset for both the side server and the client.   Look intodocsfor more details.Models SupportedFedERAhas support for the following Deep Learning models, which are loaded fromtorchvision.models:LeNet-5ResNet-18ResNet-50VGG-16AlexNetCustom Model SupportWe also provide a simple way to add your own models to the framework. Look intodocsfor more details.ContactFor technical issues related toFedERAdevelopment, please contact our development team through Github issues or email (federa.team@gmail.com).
Package: federal-register
Federal Register Python API ClientTable of ContentsOverviewSetupUsageSupport These ProjectsOverviewThis library is used to grab federal documents from the United States Federal Register.
Additionally, it will help simplify the process of building requests for the different
fields that can be returned for specific documents.SetupRight now, the library is not hosted onPyPiso you will need to do a local
install on your system if you plan to use it in other scrips you use.First, clone this repo to your local system. After you clone the repo, make sure
to run thesetup.pyfile, so you can install any dependencies you may need. To
run thesetup.pyfile, run the following command in your terminal.pip install federal-registerThis will install all the dependencies listed in thesetup.pyfile. Once done
you can use the library wherever you want.UsageHere is a simple example of using thefederal_registerlibrary to grab a document
using the document number.frompprintimportpprintfromfederal_register.clientimportFederalRegister# Initialize the client.federal_register_client=FederalRegister()# Grab a specific document.federal_document=federal_register_client.document_by_id(document_id='2020-17469',fields='all')# Print it out.pprint(federal_document)Support These ProjectsPatreon:Help support this project and future projects by donating to myPatreon Page. I'm always looking to add more content for individuals like yourself, unfortuantely some of the APIs I would require
me to pay monthly fees.YouTube:If you'd like to watch more of my content, feel free to visit my YouTube channelSigma Coding.
Package: federatedcore
FederatedCoreA research-oriented federal learning framework.FeaturesCompatibility. FederatedCore can work seamlessly with mainstream deep learning frameworks, e.g., PyTorch and Tensorflow.Modular. The code of the algorithm module can be used individually.Easy to use. Retrofit existing code to data parallelism with no more than 100 lines code.SupportAttributesValueFrameworkPytorch, TensorflowEngineparallelism, sequenceDatasetlabel distribution, quality distributionTopologyparameter server, gossip, all reduceCommunicationqueue, TCPQuickStartInstall m3u8_To_MP4 via pip# via pypi.orgpython-mpipinstallfederatedcore# first clone project, and install.gitclonehttps://github.com/songs18/FederatedCore.gitpython-mpipinstall./FederatedCoreA small example (FedAvg)Implement FedAvg in fewer than 100 lines.(/examples/FedAvg/federated_average.py)defrun(num_nodes,has_server):defbuild_host_ids():ifhas_server:return[iforiinrange(num_nodes+1)]else:return[iforiinrange(num_nodes)]defbuild_func_libs():func_libs={'train_dataset':'self_contained_dnn',# load_train_dataset,'test_dataset':'self_contained_dnn',# load_test_dataset,'model':'self_contained_dnn',# get_model,'loss':'self_contained_dnn',# get_loss,'optimizer':'self_contained_dnn',# get_optimizer,'metric_loss':'self_contained_dnn',# get_metric_loss,'metric_acc':'self_contained_dnn',# get_metric_acc,'train_step':'self_contained_dnn',# get_train_step,'test_step':'self_contained_dnn',# get_test_step,'aggregation_func':average_parameters,}returnfunc_libsdefbuild_linkers():node_inboxes=queuer.node_inbox(num_nodes+1)linkers=list()forhost_idinrange(num_nodes):linker=queuer.LocalQueue(host_id,node_inboxes)linkers.append(linker)ifhas_server:linker=queuer.LocalQueue(num_nodes,node_inboxes)linkers.append(linker)returnlinkersdefbuild_execution_plans():execution_plans=ExecutionPlanTemplate.client_train*5execution_plans=[[[c,{}]forcinexecution_plans]for_inrange(num_nodes)]ifhas_server:server_execution_plan=ExecutionPlanTemplate.server_init+ExecutionPlanTemplate.server_sync_train*5server_execution_plan.pop(-1)server_execution_plan=[[s,{'iteration':3}]forsinserver_execution_plan]execution_plans.append(server_execution_plan)returnexecution_planshost_ids=build_host_ids()func_libs=build_func_libs()linkers=build_linkers()execution_plans=build_execution_plans()parallelism.run_parallel(host_ids,func_libs,linkers,execution_plans)defmain():num_nodes=2generate_topology(num_nodes)split_dataset(num_nodes)build_host(num_nodes)run(num_nodes,True)if__name__=='__main__':main()