Saravanan666/pypi-org huggingface dataset:
Package: cnv-suite
CNV_SuiteVarious methods for dealing with copy number data, primarily through visualization, comparison, and simulation.Comparison: Compare the allelic copy ratio profiles from two segment files. Allows for comparison of the copy number pipeline within different Whole-Exome or Whole-Genome pipelines or using different CN tools.Simulation: Generate a random copy number profile based on phylogenetic history and overlapping CN events. Apply profile to normal samples (SNVs VCF and coverage .bed files) to generate reference sample with known copy number events for testing and comparing pipelines/tools/technologies.Visualization: Produce static or interactive plots to display the CN profile (of a single sample or multiple).InstallationClone this repo into your environment:git clone git@github.com:getzlab/cnv_suite.gitInstall from the setup.py script:pip install .Requirements includepandas,numpy,scipy,matplotlib,plotly,intervaltree,natsort, andpandarallel.Command Line UsageCompareRuns various comparison tools on the two given ACR segment profiles. Choose--allto run all tools.compare First_profile_filename Second_profile_filename [--num_segments] [--compare_length_dist] [--mu_sigma_diff] [--breakpoint_dist] [--all] [--sample_names] [--mu_lim] [--sigma_lim]For more details, runcompare -hSimulateSimulate the VCF read depths and binned coverage according to the given criteria. Requires a pickle file of a CNV_profile object created using thecnv_suite.simulatepackage.simulate cnv_pickle_file coverage_file vcf_file read_depths purity [--output_coverage filename] [--output_hets filename] [--normal_coverage coverage_file] [--normal_depths read_depths]For more details, runsimulate -hVisualizeSave a static CNV plot for the given segment profile with the given options.visualize segment_filename output_filename [--csize_file] [--segment_colors] [--hide_sigmas] [--min_seg_lw] [--y_upper]For more details, runvisualize -hPackage UsageBeyond the static plotting, the visualization package allows for the production of interactive plots using plotly (cnv_suite.visualize.plot_acr_interactive). Methods also exist for updating the segment colors, copy number values, and sigma visibility (for use in a dashboard or notebook).The simulation package provides theCNV_Profileclass which can generate random (or specified) copy number events (arm level, focal level, chromothripsis, WGD) with haplotype and phylogeny awareness. This profile can then be applied to reference samples to return simulated SNV read counts and binned coverage.Finally, other utilities exist to calculate absolute copy number values given purity and ploidy (cnv_suite.calc_absolute_cn), the average weighted copy number for a profile (cnv_suite.calc_avg_cn), copy number values at a particular loci (cnv_suite.return_seg_data_at_lociandcnv_suite.apply_segment_data_to_dfto apply this to a maf dataframe), and many others.
Package: cnwigee
CNWI-GEECanadian National Wetland Inventory Google Earth Engie Random Forest Classifications. Provides high
level access for doing standardized random forest wetland classifications.Installation and SetupThis package is built to be used with the annaconda project. For best user experience use some
recent version of conda. These walk though will be using a miniconda3DependenciesGeopandasgoogle earth enginecondacreate-ncnwi-geepython=3.10-cconda-forgeearthengine-apigeopandaspandas# Step 2): activate new conda env and authenticate earth engine api$condaactivatecnwi-gee# authenticate earth engine api(cnwi-gee)$earthengineauthenticateExample Pipelinefromdataclassesimportdataclassimporteefromcnwiimportinputs,rf,td,funcs,sfiltersfromcnwiimportprebuiltdefmain():# load datasetdataset=ee.FeatureCollection("users/ryangilberthamilton/BC/williston/fpca/willistonA_no_floodplain")williston=prebuilt.WillistonA()# create a training objecttraining=td.TrainingData(collection=dataset,label='cDesc')# create s1 inputss1s:List[ee.Image]=inputs.s1_inputs(williston.s1)# create s2 inputss2s:List[ee.Image]=inputs.s2_inputs(williston.s2)# create elevation inputselevation=inputs.nasa_dem()filter=sfilters.gaussian_filter(3)smoothed=filter(elevation)slope=ee.Terrain.slope(smoothed)# Create the inputs stackstack=ee.Image.cat(*s1s,*s2s,smoothed,slope)# sample the stacktraining.sample(stack=stack)# create the rf modelmodel=rf.RandomForestModel()# train the modeltrained=model.train(training_data=training.samples,predictors=stack.bandNames(),classProperty=training.value)# classify the imageclassified_img=stack.classify(trained).uint8()# export image and samples to cloudreturnsys.exit(0)if__name__=='__main__':main()
Package: cn-workday
cn_workdayWorkday detection for the People's Republic of China.Installationpipinstall-Ucn_workdayUsageThis package provides only a single function currently.>>>fromcn_workdayimportis_workday>>>fromdatetimeimportdatetime>>>is_workday(datetime.now())>>>...Data filesThis package is based on data files in CSV formats. They are stored indatadirectory inside the package. Each file contains the official holidays
and their tradeoffs (if any).Currently we only have data files from 2017 to 2020. If you'd like
to contribute, please take a look at the existing data files.The official holiday definitions of the next year is usually published
in November by Chinese government, you can find themhere.
Each data file should also contain a link to the official announcement, as a
comment at the end of file.NoticeThis package is currently not compatible withPyOxidizerdue to its using of__file__(to load data files). Until there is a recommended way to handle
data files, this is likely to stay the same. Read morehere.
Package: cnx-common
# CNX commonA library of utilities used across CNX applications.# Utilities description## urlslugGenerates a URL slug for REX. See:https://github.com/openstax/cnx/issues/348# LicenseThis software is subject to the provisions of the GNU Affero General
Public License Version 3.0 (AGPL). See LICENSE.txt for details.
Copyright (c) 2019 Rice University
Package: cnx-cssselect2
Fork ofcssselect2by Simon Sapin.cssselect2 is a straightforward implementation ofCSS3 Selectorsfor markup
documents (HTML, XML, etc.) that can be read byElementTree-like parsers
(including cElementTree,lxml,html5lib, etc.)Unlikecssselect, it does not translate selectors toXPathand therefore does
not have all the correctness corner cases that are hard or impossible to fix in
cssselect.Quick facts:Free software: BSD licensedCompatible with Python 2.7+ and 3.3+Latest documentation:http://cssselect2.readthedocs.io/Source, issues and pull requestson GithubReleaseson PyPIInstall withpip install cssselect2
Package: cnxfastvector
FastVectorTemplate For Python ProjectsThis is a template for Python projects. What you get:Source code and test code is seperated in different directories.External libraries installed and managed byPip.Setup for tests usingPytest.Continuous testing withGithub-Actions.Code coverage reports, including automatic upload toCodecov.Code documentation withMkdocs.Optional: Use ofVSCodewith the Python and UnitTest extension.Structure├── setup.py
├── setup.cfg
├── pyproject.toml
├── ... other config files ...
├── tests
│   ├── __init__.py
│   └── test_vector.py
├── docs
│   ├── api.md
│   └── index.md
├── fastvector
│   ├── __init__.py
│   ├── vector.py
│   └── version.py
└── tests
    ├── __init__.py
    └── test_vector.pyCommands# Build and Install (local)pipinstall-e.# Testpytesttests# Code Coveragepytest--cov=fastvectortests--cov-report=html
Package: cnx-litezip
This is a python library for working with the litezip file format, which is a Connexions cut down version of the completezip export file format.This library contains tools for working with the litezip file structure. It also contains tools for converting a completezip to litezip.LicenseThis software is subject to the provisions of the GNU Affero General
Public License Version 3.0 (AGPL). See license.txt for details.
Copyright (c) 2016 Rice University
Package: cnx-query-grammar
The Connections project query grammar parsing library.InstallUse setup.py to install cnx-query-grammar:$ python setup.py installThis creates a script calledquery_parser.Usage>>> from cnxquerygrammar.query_parser import grammar, DictFormater

>>> node_tree = grammar.parse('Some text')
>>> DictFormater().visit(node_tree)
[('text', 'Some'), ('text', 'text')]

>>> node_tree = grammar.parse('"A phrase"')
>>> DictFormater().visit(node_tree)
[('text', 'A phrase')]

>>> node_tree = grammar.parse('author:"John Smith" type:book')
>>> DictFormater().visit(node_tree)
[('author', 'John Smith'), ('type', 'book')]

>>> node_tree = grammar.parse('author:"John Smith" type:book title:" A Title   With Spaces"')
>>> DictFormater().visit(node_tree)
[('author', 'John Smith'), ('type', 'book'), ('title', 'A Title With Spaces')]TestTo run the tests:$ python -m unittest discoverLicenseThis software is subject to the provisions of the GNU Affero General
Public License Version 3.0 (AGPL). See license.txt for details.
Copyright (c) 2013 Rice University
Package: cnyear
===========================A Brief Introduction===========================This a tool for conversion between Chinese regnal year and Comman Era,and a module can be directly used in python.*This is just an alpha version, which only supports years from Ming Dynasty till doday, and there may be some mistakes. More data will be added in the future.*Examples:============ ============清乾隆元年   1736年============ ============明正德十二年 1517年============ ============民國20年     1931年============ ============一九八〇年   1980年============ ============1621年       明天啓元年============ ============1861年       清咸豐十一年============ ============1948年       民國37年============ ============Installation===============::pip install cnyearUsage Samples=================.. code:: pythonfrom cnyear import Cnyear# get the Common Era for a Chinese regnal yearyear_obj1 = Cnyear('清康熙十二年')year_obj1.cny2y() # return a tuple (1673, None, True) which means (first year, last year, validity)year_obj1.y2cny(dig=True) # 清康熙12年# get a span of timeyear_obj2 = Cnyear('明正統間')year_obj2.cny2y() # (1436, 1449, True)# correct the wrong regnal yearyear_obj3 = Cnyear('清咸豐十二年')year_obj3.cny2y() # (1862, None, False)year_obj3.y2cny() # 清同治元年# get the Chinese regnal year for a Common EraCnyear('明崇禎十八年').y2cny(ldefaultdy=['清','南明']) # 清順治二年Cnyear('明崇禎十八年').y2cny(ldefaultdy=['南明','清']) # 南明弘光元年Other Features===================#. Convert an invalid Chinese regnal year into a valid Chinese regnal year.#. Convert Chinese digit numbers into Arabic digit numbers in a year and vice versa.#. Get each component in an expression of year.Future Features===================#. To support sexagenary cycle 干支.#. To support operand like minus and plus between years.Acknowledgement===================All the year data come from *Zhongguo Lishi Jinianbiao* (中國歷史紀年表).
Package: co
CoCois a Python library for altering annotated DNA sequences. It keeps track of components and lifts
over feature annotations when a component is “mutated” by applying a series of mutations. Withcoyou can
build new consensus sequences for cloned organisms and trace changes to features within a lineage.For more information, check out theDocumentation.Hello Co!>>> from co import Component
>>> from co.mutation import *
>>> hello = Component('Hello X!')
>>> hello.seq
Seq('Hello X!', Alphabet())
>>> hello_world = hello.mutate([Mutation(6, 1, 'world')])
>>> hello_world.seq
Seq('Hello world!', Alphabet())Working with Feature AnnotationsComponents are modeled after BioPython’sSeqRecord– they have both a sequence, and features:>>>fromBio.SeqFeatureimport*>>>slogan=Component('CoPy is for DNA components',features=[...SeqFeature(FeatureLocation(0,4),type='name'),...SeqFeature(FeatureLocation(12,15),id='DNA')])>>>>>># features are bound to components -- and you can always access their DNA sequence...>>>slogan.features.add(FeatureLocation(16,26)).seqSeq('components',Alphabet())>>>[f.seqforfinslogan.features][Seq('CoPy',Alphabet()),Seq('DNA',Alphabet()),Seq('components',Alphabet())]>>>>>># New Components are made through series of mutations...# You not only get the new sequence but a mutated component: Features are translated to the...# new sequence as well....>>>new_slogan=slogan.mutate([DEL(2,2),DEL(12,4)])>>>new_slogan.seqSeq('Co is for components',Alphabet())>>>new_slogan.featuresComponentFeatureSet([Feature(FeatureLocation(ExactPosition(0),ExactPosition(2)),type='name'),Feature(FeatureLocation(ExactPosition(10),ExactPosition(20)))])>>>[f.seqforfinnew_slogan.features][Seq('Co',Alphabet()),Seq('components',Alphabet())]>>>list(new_slogan.features.find(type='name'))# features can be filtered by type, id, strand, position, and qualifiers[Feature(FeatureLocation(ExactPosition(0),ExactPosition(2)),type='name')]>>>>>># Using Component.fdiff you can get a summary of what features where affected by mutation. (Unchanged features...# that have a new coordinate -- e.g. the 'components' feature in this example -- are not included)....>>>slogan.fdiff(new_slogan)Diff(added=(Feature(FeatureLocation(ExactPosition(12),ExactPosition(15)),id='DNA'),Feature(FeatureLocation(ExactPosition(0),ExactPosition(4)),type='name')),removed=(Feature(FeatureLocation(ExactPosition(0),ExactPosition(2)),type='name'),))AuthorsLars Schöninghas created Co. Contributions are very welcome.
Contact the main author for bigger changes.
Package: co2dice
Version:x.x.xupdated:x.x.xDocumentation:http://co2mpas.io/repository:https://github.com/JRCSTU/CO2MPAS-TA/pypi-repo:https://pypi.org/project/co2dice/Copyright:2018 JRC.C4(STU), European Commission (JRC)license:EUPL 1.1+All project’s documentation hosted athttps://co2mpas.io/DevelopmentTo run Test-Cases you may set these env-vars:envvar(WEBSTAMPER_CHECK_URL)envvar(WEBSTAMPER_STAMP_URL)envvar(STAMP_CHAIN_DIR)or create a traits-configuration file on~/co2dice_config.pyby default,
or specify more files with envvar(CO2DICE_VAR_NAME).Also you need to  contain in oyur envvar(PATH):
- the project installed (e.g. in “develop” mode) for the executable commands to work;
- GnuPG-2;
- Git (Git MinGW for Windows, either the official or the one inMSYS2);
- Python
Package: co2gui
Version:x.x.xupdated:x.x.xDocumentation:http://co2mpas.io/repository:https://github.com/JRCSTU/CO2MPAS-TA/pypi-repo:https://pypi.org/project/co2gui/Copyright:2018 JRC.C4(STU), European Commission (JRC)license:EUPL 1.1+All project’s documentation hosted athttps://co2mpas.io/
Package: co2logserver
co2logserver Python packageThis package provides a simple server for logging data.DocumentationYou can find detailed documentation of this packagehere on on
Gitlab.Local installationInstall this module from the repository root viapip:# local user library under ~/.localpip3install--user.# also install msgpack supportpip3install--user'.[msgpack]'# also install OpenSenseMap supportpip3install--user'.[opensensemap]'RunningDevelopmentTo run the server in development mode, run after the installation:python3-mco2logserverYou might want to add the options-v -t -d.ProductionTo run the server in a production environment, use thegunicornWSGI-server for example:pip3install--usergunicongunicornco2logserverConfigurationYou can always specify the path to a configuration file via theCO2LOGSERVER_CONFIGenvironment variable. See the fileco2logserver/config_default.pyfor default settings.Data ManagementTo upload data to the server, you may sendPOSTrequests to the/uploadpath:TypeContent-Typedata exampleJSONapplication/json{"time_utc":[43,23],"co2":[1223,2351]}CSVtext/csvtime_utc,co2\n43,1223\n23,2351FORMapplication/x-www-form-urlencodedtime_utc=43&co2=1223&time_utc=23&co2=2351MSGPACKapplication/msgpack82a874696d655f757463922b17a3636f3292cd04c7cd092f(HEX)New data columns are automatically added to the database. Every column
name is converted to lowercase.AuthenticationIf you want to control who is allowed to upload data to the server, you
may use the PSK (pre-shared-key) salting mechanism built into the
server.SetCO2LOGSERVER_UPLOAD_REQUIRES_AUTH=Trueand specify one or more PSK salt
strings, e.g.CO2LOGSERVER_CHECKSUM_SALTS = ["my-super-secret-psk"].By default, the server then only accepts requests including at least one header
fieldContent-HASHALGORITHM-Saltedcontaining the hexadecimal hash of the
sent payload with the salt appended calculated with HASHALGORITHM (e.g. MD5,
SHA1, SHA256, etc...).For example, if you want to upload the JSON data{"time_utc":[43,23],"co2":[1223,2351]}and your salt string ismy-super-secret-psk, your header fieldContent-MD5-Saltedwould beb71e91feb2be18ccca019914a1da5b1dwhich is the MD5-sum of{"time_utc":[43,23],"co2":[1223,2351]}my-super-secret-psk.This is a simple yet effective way of preventing spam uploads.Security NoteNote, however, that communication to the server is still unencrypted (only
HTTP, not HTTPS). The reason for this is that embedded devices like Arduinos
do not have the capabilities for encrypted web traffic. Thus, the sent data
including the checksums can theoretically be intercepted and reused toreupload the exact same dataset.OpenSenseMap uploadUsing thesensemapi package,co2logserveris able to redirect uploaded data to theOpenSenseMap. For this to work, an OpenSenseMap
account is necessary whose login credentials are set in theco2logserverconfiguration. The default configuration takes the credentials from the
environment variablesSENSEMAP_EMAIL,SENSEMAP_USERNAMEandSENSEMAP_PASSWORD. Also settingCO2LOGSERVER_OSEM_UPLOADtoTruein the
configuration enables uploaded data to also be redirected to the OpenSenseMap.
Theconfig_default.pycontains explanations for further customization
options.
Package: co2mini
CO2 monitoring with PrometheusThis reads from the CO2 Meter and makes it available as a Prometheus service.
The core logic comes fromthis hackaday article.SetupNote this assumes you are running on a Raspberry Pi running Raspberry Pi OS (Bullseye)Install Python 3Install the monitor withpython3 -m pip install co2mini[homekit](remove[homekit]if you don't use HomeKit)Set up CO2 udev rules by copying90-co2mini.rulesto/etc/udev/rules.d/90-co2mini.rulesSet up the service by copyingco2mini.serviceto/etc/systemd/system/co2mini.service(Optional) Put a configuration file (see Configuration section below) in/etc/co2mini.envRunsystemctl enable co2mini.serviceConfigurationThe/etc/co2mini.envfile contains the environment variables used to configure co2mini beyond the defaults.
This is mostly necessary when enabling MQTT.Example:MQTT_ENABLED=trueMQTT_BROKER=localhostMQTT/Home AssistantThe MQTT feature is meant to work with Home Assistant, although nothing bad will happen if you just want to use the MQTT messages directly.When co2mini starts up, it will send out the discovery message that Home Assistant expects, as well as responding to homeassistant's status when coming online.
Be sure those are enabled in the Home Assistant MQTT integration (usually is enabled by default) if you have any issues.To configure co2mini, the following environment variables are available:VariableDefaultDescriptionNAMEco2miniThis is used for the default display name of the device in Home AssistantMQTT_ENABLEDFalseUsed to enable/disable sending information over MQTTMQTT_BROKERlocalhostMQTT Broker hostnameMQTT_PORT1883MQTT broker port number (1883 is the standard MQTT broker port)MQTT_USERNAMEUsername for authenticating to MQTT broker (leave blank if no authentication is needed)MQTT_PASSWORDPassword for authenticating to MQTT broker (leave blank if no authentication is needed)MQTT_DISCOVERY_PREFIXhomeassistantPrefix for sending MQTT discovery and state messages.MQTT_RETAIN_DISCOVERYFalseFlag to enable settingretain=Trueon the discovery messages. You probably don't need this.MQTT_OBJECT_IDco2mini_{HOSTNAME}Override for setting theobject_idin Home Assistant. Default builds using the hostname of the device.HomekitIf you have thehomekitdependencies installed, on the first startup you will need to check the logs to get the setup code to integrate with Homekit.
You can find the code usingjournalctl -u co2mini.serviceor possibly by checking the status withsystemctl status co2mini.service.Note also that it's sometimes possible that co2mini will have some errors logged and won't be reporting in Homekit anymore.
If this happens, it seems like the easiest thing to do is to remove the device from your homekit, remove theaccessory.statefile in your home (rm accessory.state) and restartco2mini(sudo systemctl restart co2mini.service) to get a new code to pair.Special notes for Dietpi usersBe sure to installPython3 pipas well (ID130)Make sure the dietpi user is inplugdevgroup (sudo usermod -aG plugdev dietpi)
Package: co2mpas
What is CO2MPAS?CO2MPAS is backward-looking longitudinal-dynamics CO2 and
fuel-consumption simulator for light-duty M1 & N1 vehicles (cars and
vans), specially crafted toestimate the CO2 emissions of vehicles
undergoing NEDCtesting based on the emissions producedWLTP
testingduring type-approval, according to the EU legislations1152/EUR/2017 and 1153/EUR/2017(seeHistorysection, below).It is an open-source project (EUPL 1.1+) developed for
Python-3.6+. It runs either as aconsole commandor as adesktop
GUI application, and it uses Excel-files or pure python structures
(dictionary and lists) for its input & output data.HistoryTheEuropean Commissionhas introduced theWLTPas the test
procedure for the type I test of the European type-approval of
Light-duty vehicles as of September 2017. Its introduction has
required the adaptation of CO2 certification and monitoring procedures
set by European regulations (443/2009, 510/2011, 1152/EUR/2017 and
1153/EUR/2017). European Commission’sJoint Research Centre(JRC)
has been assigned the development of this vehicle simulator to
facilitate this adaptation.The European Regulation setting the conditions for using CO2MPAS can
be found inthe Comitology Registerafter its adoption by theClimate Change Committeewhich took place
on June 23, 2016, and its 2nd vote for modifications, in April 27,
2017.InstallationTo install CO2MPAS use (with root privileges):$pipinstallco2mpasOr download the latest git version and use (with root privileges):$pythonsetup.pyinstallSome additional functionality is enabled installing the following
extras:cli: enables the command line interface.sync: enables the time series synchronization tool (i.e.,syncingpreviously
nameddatasync).gui: enables the graphical user interface.plot: enables to plot the CO2MPAS model and the workflow of
each run.io: enables to read/write excel files.driver: enables the driver model (currently is not available).To install co2mpas and all extras, do:$pipinstall'co2mpas[all]'
Package: co2ncientes
CO2nscientes CODEFEST 2023Problema de detección de objetosLibrerías necesariasPara el desarrollo de este reto, la libreria core con la que se realizó la detección de objetos fue tensorflow(Instalar las librerias requeridas en el requirements.txt)Proceso de trabajoPrimero hubo una etapa de creación de un modelo de detección de objetos:Basados en los videos que nos entregaron, con la herramienta v2 segmentamos el video en framesLos frames del video fueron examinados por una persona que se encargo de anotar cuando encontrara algo de interés (carros, barcos, zonas deforestadas, etc)Se creó un diccionario de imágenes, anotando elementos de interés con la herramienta labelImg.pytensorflow generó un modelo que podía identificar objetos en un frameLuego hubo una segunda etapa que es la de creación de la herramientaSe registra cada 60 frames una imágenLa imágen es pasada por una función que primero trata de identificar la hora y las coordenadas usando easyocrLuego la misma imágen es pasada por un proceso de detección de objetos usando el modelo anteriormente creadoFinalmente si algún objeto es detectado en la imágen, esta pasa a guardarse y a ser registrado el valor en el csvImágen de una máquinaria identificada