Saravanan666/pypi-org huggingface dataset:
Package: cblack
cblackCustom Black Code Formatter for Python with 2-space indentsSame rules as Black, only with two-space indents.Installationcblackcan be installed by runningpip3 install cblack.It requires Python 3.7+ to run but you can reformat Python 2 and Python 3.x code
as well (although you should run cblack with a Python 3.7+ interpreter).NOTE: Running cblack with Python 3.6 is no longer supported since black itself
is failing as well.Usagepython -m cblack {source_file_or_directory}Optionspython -m cblack --helpYou can also go tohttps://github.com/psf/blackfor the latest options availableWhyAftera long discussionabout indentation
levels it was decided by the main author that:Two space indents are not distinct enough to be recommended by the Black coding style.The whole pourpose of this project is to provide an alternative to black, with
the exact same rules and behaviour, but using 2 spaces for indentation instead of 4.
All other black options are still supported.Second reason is thatGoogle YAPFis not able
to produce same output as black (mostly because of function arguments indentation),
otherwise, if it was possible to do it, I would not have created this project.HowI'm a busy man. I don't want to spend my time pulling latest changes from black
regularly, so I've created a small package that depends on black and overrides
a method to reindent using two spaces. Shall black developers break this behaviour
I might end up cloning the whole project. But the aim of this project
would still be the same.Similar projectsYAPFAutopep8pep8ifypyfmtprettier in nodegofmt in gorustfmt in rustVersioningThis project will try to follow the same versioning as black itself, so any
changes introduced in black formatting will be reflected in this project as well.As black project states:This is made explicit by the “Beta” trove classifier, as well as by 
 the “b” in the version number. What this means for you is that until
 the formatter becomes stable, you should expect some formatting to change
 in the future.CreditsAll the credit is deserved to the people who createdblackon the first place.Please visit black website:https://github.com/ambv/black
Package: cblind
cblindA colorblind-friendly python module that allows color choice for plotting multiple curvesWorks only with python $\geq$ 3.78 colormaps are now available to map 2D fieldsAuthors: Gaylor Wafflard-Fernandez, Clément RobertAuthor-email:gaylor.wafflard@univ-grenoble-alpes.frInstallationInstall withpippip install cblindTo import cblind:importcblindascbUsage for plotting10 palette functions to plot curves are available for now in the Colorplots class, with the corresponding test plotting functions.cblindcolor,linestyle=cb.Coloplots().cblind(nb_of_plots)from 1 to 12 plots [DISTINCT COLORS]. For more than 12 plots, the linestyle is changed.cb.test_cblind(nb_of_plots)contrastcolor,linestyle=cb.Coloplots().contrast(nb_of_plots)for less than 4 contrast plots [DISTINCT COLORS]. For more than 12 plots, the linestyle is changed.cb.test_contrast(nb_of_plots)huescalecolor,linestyle=cb.Coloplots().huescale(nb_of_plots,*option)from 1 to 9 plots [SEQUENTIAL DATA]. With option "blue","bluegreen","green", "gold","brown","rose","purple" for less than 3 plots, otherwise ocherscale.cb.test_huescale(nb_of_plots,*option)rbscalecolor,linestyle=cb.Coloplots().rbscale(nb_of_plots)from 3 to 11 plots [DIVERGING DATA].cb.test_rbscale(nb_of_plots)rainbowcolor,linestyle=cb.Coloplots().rainbow(nb_of_plots)from 4 to 12 plots [RAINBOW SCHEME].cb.test_rainbow(nb_of_plots)extreme_rainbowcolor,linestyle=cb.Coloplots().extreme_rainbow(nb_of_plots)from 1 to 34 plots [RAINBOW SCHEME].cb.test_extreme_rainbow(nb_of_plots)solsticecolor,linestyle=cb.Coloplots().solstice(nb_of_plots)for less than 11 plots [DIVERGING DATA]cb.test_solstice(nb_of_plots)birdcolor,linestyle=cb.Coloplots().bird(nb_of_plots)for less than 9 plots [DIVERGING DATA]cb.test_bird(nb_of_plots)preguntacolor,linestyle=cb.Coloplots().pregunta(nb_of_plots)for less than 9 plots [DIVERGING DATA]cb.test_pregunta(nb_of_plots)monocolorcolor,linestyle=cb.Coloplots().monocolor(nb_of_plots,*option)from 1 to 13 monochromatic plots [MONOCOLOR/PRINTING] with different linestyles. With option "b&w", "blue", "red", "yellow", "green", "purple".cb.test_monocolor(nb_of_plots,*option)Usage for colormaps8 cblind palettes are available for now : "cb.rbscale", "cb.rainbow", "cb.extreme_rainbow", "cb.huescale",
"cb.solstice", "cb.bird", "cb.pregunta", "cb.iris", but also all colormaps from matplotlib + "_r" variants for reverse colormaps.cmap=cb.cbmap(palette,nbin)Thenbinargument is used to discretize the colormaps.To test the colormaps, you can try:cb.test_mapping(palette,nbin)Example with a fielddata2dimportnumpyasnpimportmatplotlib.pyplotaspltdata2d=np.repeat(np.linspace(0,1,100),20).reshape(100,20).Tfig,ax=plt.subplots()im=ax.imshow(data2d,cmap=cb.cbmap("cb.rainbow_r",nbin=10),aspect='auto')fig.colorbar(im)plt.show()Basic mapping functioncb.mapping(fig,ax,data2d,extent,palette=palette,nbin=nbin)REFERENCEPaul Tol. 2012. "Colour Schemes." SRON Technical Note, SRON/EPS/TN/09-002.https://personal.sron.nl/~pault/data/colourschemes.pdf
Package: cbl-migrator
CBL MigratorSmall SQLAlchemy based library that migrates Oracle DBs to MySQL, PostgreSQL and SQLite. Used in ChEMBL dumps generation process.to use it, as a Python library:fromcbl_migratorimportDbMigratororigin='oracle://{user}:{pass}@{host}:{port}/?service_name={service_name}&encoding=utf8'#dest = 'mysql://{user}:{pass}@{host}:{port}/{dbname}?use_unicode=1&charset=utf8'dest='postgresql://{user}:{pass}@{host}:{port}/{dbname}?client_encoding=utf8'migrator=DbMigrator(origin,dest,['excluded_table1','excluded_table2'],n_workers=4)migrator.migrate()directly from the command line:cbl-migrator"oracle://{user}:{pass}@{host}:{port}/?service_name={service_name}&encoding=utf8""postgresql://{user}:{pass}@{host}:{port}/{dbname}?client_encoding=utf8"--n_workers8What it does (in order of events)Copies tables from origin to dest using the closest data type for each field. No constraints except PKs are initially copied across.Table contents are migrated from origin to dest tables. In parallel.If the data migration is succesful it will first generate the constraints and then the indexes. Any index in a field with a previously created UK will be skipped (UKs are implemented as unique indexes).It logs every time it was not possible to migrate an object, e.g.,(psycopg2.OperationalError) index row size 2856 exceeds maximum 2712 for index.What it does not doIt won't migrate any table without a PK. May hang with a table without PK and containing an UK field referenced as FK in another table.It does not try to migrate server default values.It does not set autoincremental fields.It does not try to migrate triggers nor procedures.SQLiteSQLite can not:concurrently writealter table ADD CONSTRAINTSo only one core is used when migrating to it. All constraints are generated at the time of generating the destination tables and it sequentially inserts rows in tables in correct FKs order.MySQLCLOBs are migrated to LONGTEXT.
Package: cbmc
cbmc麥塊匿名發文平台 api for python安裝pip install cbmc使用fromcbmcimportonpostimportcbmc#當有新文章時asyncdefon_post(updated):print(f"有新的資料!!\n{updated}")onpost(on_update=on_post)#用編號取得文章(無則返回None)cbmc.get_post(1)#取得文章列表(最大300)cbmc.post_list(1)
Package: cbmcodecs
IntroductionThe cbmcodecs package provides a number of encodings for handling text from
Commodore 8-bit systems. Much of the credit for this package must go to
Linus Walleij of Triad, as these codecs were built from his PETSCII to Unicode
mappings which can be found athttp://www.df.lth.se/~triad/krad/recode/petscii.htmlThe screencodes codec was created by hand later and borrows from them.UsageCurrently there are four codecs defined for variations of the PETSCII encoding:petscii-c64en-lcThe English version of the Commodore 64 mixed-case character setpetscii-c64en-ucThe English version of the Commodore 64 upper-case/graphics character setpetscii-vic20en-lcThe English version of the VIC-20 mixed-case character setpetscii-vic20en-ucThe English version of the VIC-20 upper-case/graphics character setThere are two codecs defined to handle the Screencode (POKE) encoding:screencode-c64-lcMixed-case mapping to screencodes (POKE) used by the Commodore 64 and Vic20screencode-c64-ucUpper-case/graphics mapping to screencodes (POKE) used by the Commodore 64 and Vic20Simply import the cbmcodecs package and you will then be able to use them as
with any of the encodings from the standard library:import cbmcodecs


with open('file.seq', encoding='petscii-c64en-lc') as f:
    for line in f:
        print(line)Python Version NoteCurrently only Python 3 is supported (tested on 3.5+). May or may not work on older versions.LicenseAs with the original PETSCII to Unicode mapping files, the cbmcodecs package
is Licensed under the GNU GPL Version 2, see theLICENSE.txtfile for the
full text.Unicode symbols usedAside from the regular alphanumerics and symbols, the unicode mapping uses the
following unicode block drawing and other symbols to mimic a bunch of PETSCII characters:£ π ✓ ← ↑ ─ │ ┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼ ╭ ╮ ╯ ╰
╱ ╲ ╳ ▁ ▂ ▃ ▄ ▌ ▍ ▎ ▏ ▒ ▔ ▕ ▖ ▗ ▘ ▚ ▝
○ ● ◤ ◥ ♠ ♣ ♥ ♦CreditsLinus Walleij - Original C64 and VIC-20 mappings
Dan Johnson - Translation of C64 & VIC-20 mappings to python codecs
Irmen de Jong - Screencode mappings, bug fixes and unit tests.
Package: cbmcodecs2
IntroductionThe cbmcodecs2 package provides a number of encodings for handling text from
Commodore 8-bit systems. Much of the credit for this package must go to
Linus Walleij of Triad, as these codecs were built from his PETSCII to Unicode
mappings which can be found athttp://www.df.lth.se/~triad/krad/recode/petscii.htmlThe screencodes codec was created by hand later and borrows from them.This package is an updated fork of the original cbmcodecs package, which now seems unmaintained.Requires Python 3.xInstallationEasiest is to install the latest version directlyfrom Pypi:pip install cbmcodecs2UsageCurrently there are four codecs defined for variations of the PETSCII encoding:petscii_c64en_lcThe English version of the Commodore 64 mixed-case character setpetscii_c64en_ucThe English version of the Commodore 64 upper-case/graphics character setpetscii_vic1001jp_grThe Japanese version of the VIC-1001 Latin upper-case/graphics character setpetscii_vic1001jp_kkThe Japanese version of the VIC-1001 Latin upper-case/katakana character setpetscii_vic20en_lcThe English version of the VIC-20 mixed-case character setpetscii_vic20en_ucThe English version of the VIC-20 upper-case/graphics character setThere are two codecs defined to handle the Screencode (POKE) encoding:screencode_c64_lcMixed-case mapping to screencodes (POKE) used by the Commodore 64 and Vic20screencode_c64_ucUpper-case/graphics mapping to screencodes (POKE) used by the Commodore 64 and Vic20Simply import the cbmcodecs2 package and you will then be able to use them as
with any of the encodings from the standard library:import cbmcodecs2


with open('file.seq', encoding='petscii_c64en_lc') as f:
    for line in f:
        print(line)LicenseAs with the original PETSCII to Unicode mapping files, the cbmcodecs2 package
is Licensed under the GNU GPL Version 2, see theLICENSE.txtfile for the
full text.Unicode symbols usedAside from the regular alphanumerics and symbols, the unicode mapping uses the
following unicode block drawing and other symbols to mimic a bunch of PETSCII characters:£ π ✓ ← ↑ ─ │ ┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼ ╭ ╮ ╯ ╰
╱ ╲ ╳ ▁ ▂ ▃ ▄ ▌ ▍ ▎ ▏ ▒ ▔ ▕ ▖ ▗ ▘ ▚ ▝
○ ● ◤ ◥ ♠ ♣ ♥ ♦CreditsLinus Walleij - Original C64 and VIC-20 mappingsDan Johnson - Translation of C64 & VIC-20 mappings to python codecsIrmen de Jong - Screencode mappings, bug fixes and unit tests. Updated to cbmcodecs2 package.Simon Rowe - box drawing character improvements and Japanese VIC-1001 codecs.
Package: cbmc.py
cbmc.pyUnofficial 麥塊匿名發文平台 API Wrapper for PythonInstallationpipinstallcbmc.pyUsage# Import the libraryfromcbmcimportAsyncCbmc,SyncCbmcapi=SyncCbmc()# Obtain post with post id, raise cbmc.NotFound if not foundapi.get_post(1)# List recent posts, maximum 300 posts.api.get_posts()# Directly call the method also works# Creating an instance is not required, but it is recommended for future updates.# (some planned new features will require that)SyncCbmc.get_post(1)# Also available in asyncasyncdefmain():awaitAsyncCbmc.get_post(1)awaitAsyncCbmc.get_posts()DocumentationDocumentationChangelogCredits麥塊匿名發文平台 API Documents:CBMC API DocsInspired byHansHans135'scbmclibrary.LicenseThis project is licensed underMIT License. See theLICENSEfor more details.
Package: cbmc-starter-kit
CBMC starter kitThis is a starter kit for writing CBMC proofs.CBMCis a model checker for
C. This means that CBMC will explore all possible paths through your code
on all possible inputs, and will check that all assertions in your code are
true.
CBMC can also check for the possibility of
memory safety errors (like buffer overflow) and for instances of
undefined behavior (like signed integer overflow).
CBMC is a bounded model checker, however, which means that the set of all
possible inputs may have to be restricted to all inputs of some bounded size.Thestarter kit overviewgives a fairly complete example of how to use the starter kit to add
CBMC verification to an existing software project.Thestarter kit wikiis currently the primary user guide for the starter kit.InstallationThe starter kit is distributed as both a brew package and a pip package, and therelease pagegives installation instructions that we repeat here.brew installationOn MacOS, we recommend using brew to install the starter kit withbrew tap aws/tap
brew install cbmc-starter-kitand upgrade to the latest version withbrew upgrade cbmc-starter-kitIn these instructions, the first line taps an AWS repository that hosts the starter kit.
Thebrew home pagegives instructions for installing brew.pip installationOn any operating system with python installed, use pip to install the
starter kit withpython3 -m pip install cbmc-starter-kitand upgrade to the latest version withpython3 -m pip install --upgrade cbmc-starter-kitThepython download pagegives instructions
for installing python.SecuritySeeCONTRIBUTINGfor more information.LicenseThis project is licensed under the Apache-2.0 License.
Package: cbmc-viewer
CBMC ViewerCBMCis a Bounded Model Checker for C.
It can prove that (for computations of bounded depth) a C program exhibits
no memory safe errors (no buffer overflows, no invalid pointers, etc),
no undefined behaviors, and no failures of assertions in the code.CBMC Vieweris a tool
that scans the output of CBMC and produces a browsable summary of its findings.ExampleHere is a simple example of using cbmc-viewer.
Running this example requires installingCBMC.
Installation on MacOS is justbrew install cbmc.
Installation on other operation systems is described on theCBMC
release page.Create a source filemain.ccontaining#include <stdlib.h>

static int global;

int main() {
  int *ptr = malloc(sizeof(int));

  assert(global > 0);
  assert(*ptr > 0);

  return 0;
}and run the commandsgoto-cc -o main.goto main.c
cbmc main.goto --trace --xml-ui > result.xml
cbmc main.goto --cover location --xml-ui > coverage.xml
cbmc main.goto --show-properties --xml-ui > property.xml
cbmc-viewer --goto main.goto --result result.xml --coverage coverage.xml --property property.xml --srcdir .and open the report created by cbmc-viewer in a web browser withopen report/html/index.htmlWhat you will see isAcoverage reportsummarizing what lines of source code were
exercised by cbmc.  In this case, coverage is 100%.  Clicking onmain,
you can see the source code formainannotated with coverage data
(all lines are green because all lines were hit).Abug reportsummarizing what issues cbmc found with the code. In this case,
the bugs are violations of the assertions because, for example, it is possible
that the uninitialized integer allocated on the heap contains a negative value.
For each bug, there is a link toThe line of code where the bug occurred.An error trace showing the steps of the program leading to the bug.
For each step, there a link to the line of code that generated the step,
making it easy to follow the error trace and root cause the bug.DocumentationThecbmc-viewer documentationincludes areference manualand auser guide.
These documents are currently works in progress and will improve over time.InstallationMost people should just follow the instructions on therelease page.Developers can install the package in Python "development mode" as follows.Clone the repository and install dependencies withgit clone https://github.com/awslabs/aws-viewer-for-cbmc.git cbmc-viewer
    apt install python3-pip python3-venv python3-jinja2 python3-voluptuous universal-ctagsInstalling ctags is optional. See the ctags discussion at the end of therelease page.Install development mode withcd cbmc-viewer
    make develop
    export PATH=/tmp/cbmc-viewer/bin:$PATHUninstall development mode withcd cbmc-viewer
    make undevelopSecuritySeeCONTRIBUTINGfor more information.LicenseThis project is licensed under the Apache-2.0 License.
Package: cbm-explorer
#cbm_explorerversion 0.1.1Here,cbm_exploreris a package for exploring the results of a CBM run and the corresponding Access databases## WarningsThis package is currently under heavy development and the master branch is subject to breaking changes at each commit. Until we reach version 1.0 we recommend all users to first contact the authors before building something that depends on the stability of the API ofcbm_explorer.## InstallingUse the python package index and the pip tool to obtain this package. From the command line:$ pip install –user cbm_explorer
Package: cbmfiles
cbmfilesThis Python module enables access to various types of file formats used by Commodore microcomputers.It provides classes to translate BASIC and binary program files between their native format and standard text files.ExamplesClasses reside in thecbm_filesmodule, the whole module may be imported or just those definitions referenced by the user.List the contents of a BASIC filefromcbm_filesimportBASICFilewithopen('example.prg','rb')asf:prog=BASICFile(f)forlineinprog.to_text():print(line)TODOdetailed documentationsupport PET, C16, C128support BASIC variantsmore examples
Package: cbmi-utils
cbmi_utilsUtility package for common features at CBMI. Further Information can be found in theWiki.Installpip install cbmi-utilsUsageExample PyTorch Layer Importfrom cbmi_utils.pytorch.layers import ReshapeNew Release Procedurecommit your changes on the dev branch and push to devincrease version number insetup.pyand commit with messageincrease version numberand push to devmerge to master and pushon the gitlab-page create new tagTag Name:0.X.XXMessage:new version 0.X.XXRelease Notes:<your actual changes>
Package: cbmos
CBMOSCBMOS is a Python framework for the numerical analysis of center-based models.
It focuses on flexibility and ease of use and is capable of simulating up to a
few thousand cells within a few seconds, or even up to 10,000 cells if GPU
support is available. CBMOS shines best for exploratory tasks and prototyping,
for instance when one wants to compare different sets of parameters or solvers.
At the moment, it implements most popular force functions, a few first and
second-order explicit solvers, and even one implicit solver.InstallationCBMOS is available on PyPI and can be installed through:pip install cbmosGetting StartedInitial conditionSetting up the initial condition of a simulation is very simple, all you need is create a list of cell objects. In this example we set up a Cartesian grid of 25 cells. Each cell will immediately divides after the simulation starts. This behavior is defined by the list ofCellDivisionEventobjects. We then plot the current cell configuration using the basic plotting function provided in theutilsmodule.importnumpyasnpimportmatplotlib.pyplotaspltimportcbmosimportcbmos.force_functionsasffimportcbmos.solvers.euler_forwardasefimportcbmos.cellasclimportcbmos.utilsasutilsimportcbmos.eventsaseventsn_x=5n_y=5coordinates=utils.generate_cartesian_coordinates(n_x,n_y)sheet=[cl.ProliferatingCell(i,# Cell ID, must be unique to each cell[x,y],# Initial coordinates-6.0,# Birthtime, in this case 6 hours before the simulation startsTrue,# Whether or not the cell is proliferatinglambdat:6+t# Function generating the next division time)fori,(x,y)inenumerate(coordinates)]event_list=[events.CellDivisionEvent(cell)forcellinsheet]utils.plot_2d_population(sheet)SimulationIn this simulation, we use the Gls force and the Euler forward solver. The force function's parameters are given to the simulate function as a dictionary. Parameters can also be passed to the solver in the same way. This function returns a tuple containing the time points and a list of cells for each of these time points. If needed a detailed log of the division events can be displayed bysetting the log leveltodebug.# Initialize modelmodel=cbmos.CBModel(ff.Gls(),ef.solve_ivp,dimension=2)dt=0.01t_data=np.arange(0,4,dt)t_data,history=model.simulate(sheet,# Initial cell configurationt_data,# Times at which the history is saved{"mu":5.70,"s":1.0,"rA":1.5},# Force parameters{'dt':dt},# Solver parametersevent_list=event_list)utils.plot_2d_population(history[-1])DocumentationThe package's documentation, as well as a few examples are available atsomathias.github.io/cbmos/PublicationsMathias, S., Coulier, A., Bouchnita, A. et al. Impact of Force Function
Formulations on the Numerical Simulation of Centre-Based Models. Bull Math
Biol 82, 132 (2020).DOI(tagexp-Mathias2020)Mathias, S., Coulier, A. & Hellander, A. CBMOS: a GPU-enabled Python
framework for the numerical study of center-based models. BMC Bioinformatics
23, 55 (2022).DOI(tagexp-Mathias2022)
Package: cbm-runner
#cbm_runnerversion 0.2.0Here,cbm_runneris a python package for dealing with the automation and running of a complex series of models involving the European economy, carbon budgets and their interactions. Notably in relation to the CBM-CFS3 model developed by Canada.## WarningsThis package is currently under heavy development and the master branch is subject to breaking changes at each commit. If you are interested in using this package in your own installation, please contact the authors.## InstallingNo automated installation has been developed for thecbm_runnerpackage yet. In the meantime, following this document and typing these commands on your command-line interface should get you started. If you cannot get a functional installation set up, contact the authors.#### Step 1: Cloning the repository
Here you will download a copy of the code from github and place it in your file system.$ cd /
$ mkdir repos
$ cd repos
$ git clonehttps://emsincllu@webgate.ec.europa.eu/CITnet/stash/scm/bioeconomy/cbm_runner.gitNB: Currently the access to this repository is restricted.#### Step 2: Modify your python search path
Here you will edit your.bashrcor.bash_profileto add a reference to the module you just downloaded. If you are on Windows, you can change your environment variables with thesetxcommand.$ vim ~/.bash_profile
export PYTHONPATH=”/repos/cbm_runner/”:$PYTHONPATHWhen you typeimport cbm_runnerpython will know where to look.#### Step 4: Install all required python packagescbm_runneruses many third party python libraries. You can get them by running these commands:$ pip install –user autopaths
$ pip install –user plumbing
$ pip install –user pymarktex
$ pip install –user pbs#### Step 3: Follow other instructionsSetting up the machine and installing the required programs is covered in htegcbmiorepository.## Data Flowchart
Below is drawn the flowchart describing the data processing along all the steps ofcbm_runner:![Flowchart](documentation/data_flowchart.png)## Objects Diagram
Below is presented a tentative UML-style diagram detailing not the inheritance of the classes but the use of the composition design pattern between the objects created.![Diagram](documentation/objects_diagram.png)