Saravanan666/pypi-org huggingface dataset:
Package: catchexception
Development Status :: RefactoringCatchExceptionpip install catchexceptionpip install git+https://github.com/dsdanielpark/catchexception.gitNightly version ofExcept Notifierfor refactoringIn preparation for the beta release, the package architecture is overhauled. Test by refactoring with some extensibility open.Applies toExceptNotifierafter QA.RemarkRefactoring was delayed for the following reasons:The functional implementation, documentation, and example writing for most applications were completed by a single developer(@dsdanielpark) in just 7 days.I also released all realted package(BardAPI), sub-package(Co-Coder), and prompt engineering GitHub resources(Amazing-Bard-prompts) for implementing Google Bard intoExceptNotifierwithin 3 days.Due to commitments to other live projects and competitions, I have limited time.As time allows, I plan to refactor, conduct QA for each application, and distribute the package.Once the package structure is finalized, I intend to recruit contributors for each application.
Package: catchment
catchmentAn open-source Python package for catchment delineation 🔥Figure Here⚡  UsageInstallpipinstallcatchmentExampleimportcatchmentpath=f'{catchment._path}/example.csv'Q,date=catchment.load_streamflow(path)b,KGEs=catchment.delineation(Q,date,area=276)print(f'Best Method:{b.dtype.names[KGEs.argmax()]}')Project StructureThe directory structure of catchment looks like this:├── methods                 <- implements for 12 catchment delineation methods
│
├── recession_analysis      <- tools for estimating recession coefficiency
│
├── param_estimate          <- backward and calibration approaches to estimate other parameters
│
├── comparison              <- an evaluation criterion to comparison different methods
│
├── requirements.txt        <- File for installing catchment dependencies
│
└── README.md📌  TodoNolinear reservoir assumptionImplement the nolinear reservoir assumption from thepaperEmploy a time-varing recession coefficiency for catchment delineationApplicable to other time scalesThe current version only applies to the daily scaleThe package needs to be updated to support hourly catchment delineation🚀  PublicationsThe following articles detail the 12 catchment delineation methods and their evaluation criterion.Xie, J., Liu, X., Wang, K., Yang, T., Liang, K., & Liu, C. (2020). Evaluation of typical methods for catchment delineation in the contiguous United States. Journal of Hydrology, 583, 124628.https://doi.org/10.1016/j.jhydrol.2020.124628
Package: catchments
🌍 catchmentsPython wrapper for multiple APIs, that provide catchments-areas.
It allows to acquire and manipulate catchments from those APIs.Installation$pipinstallcatchmentsUsageCurrently there are implemented two classes:SkobblerAPIandHereAPI.You can use them as follows:>>>fromcatchmentsimportSkobblerAPI>>># get catchment from Skobbler API>>>skobbler=SkobblerAPI('your_api_key')>>># if you don't provide params values default ones will be used>>>params={"range":600,"highways":1}>>>catchment=skobbler.get_catchment({"lat"52.05,"lon":16.82},**params)>>>{"realReach":{...}...}>>>geojson=skobbler.catchment_as_geojson(catchment)>>>{"type":"Feature",geometry:{"type":"Polygon",...},...}>>>skobbler.save_as_geojson(geojson)>>>'SKOBBLER_52.05_16.82.geojson'As you can see.get_catchmentmethod usesparamsas second argument. Params keys names should be exactly the same
as mentioned in APIs documentations, otherwise they will be ignored and default values will be used.Params supported by SKOBBLER and HERE:SKOBBLER(startMercator, response_type - not supported)HEREYou can use also inbuilt command line scripts which accept *.csv file input with points as coordinates resource.
Scripts generate *.geojson files for every point in given *.csv file.Example *.csv file structure (name column is optional):namelatlonpoint152.055716.8278point252.463916.9410Example command line script usage:$catchments-skobbler.py-kyour_api_key-ppath/to/file/with/points/*.csvAll scripts and their options are mentioned below:$catchments-skobbler.py-k –key [REQUIRED] [DEFAULT:None]-p –points [REQUIRED] [DEFAULT:None]-r –range - [OPTIONAL] [DEFAULT:600]-u –units - [OPTIONAL] [DEFAULT:sec]-t –transport - [OPTIONAL] [DEFAULT:car]-l –toll - [OPTIONAL] [DEFAULT:0]-w –highways - [OPTIONAL] [DEFAULT:0]-n –nonReachable - [OPTIONAL] [DEFAULT:0]$catchments-here.py-i –app_id [REQUIRED] [DEFAULT:None]-c –app_code [REQUIRED] [DEFAULT:None]-r –range - [OPTIONAL] [DEFAULT:600]-e –range-type - [OPTIONAL] [DEFAULT:time]-m –mode - [OPTIONAL] [DEFAULT:fastest;car;traffic:disabled]Tests$pythonsetup.pytestTODOAdd support for Mapzen API catchmentsAdd support for OpenRouteService catchmentsAdd support for concurrent HTTP requestsRelease History1.1.1 (2017-05-04)Split catchments-cls.py into separate scripts (one for each API)Documentation1.0.0 (2017-05-01)Bug fixes, code reorganizationBetter documentation0.9.1b (2017-03-11)Required params validation in catchments-cls.py0.9.0b (2017-03-11)Initial release (beta)
Package: catchphrase
catchphraseHoly Hooligan Coders, Batman! A python package for generating/retrieving common catchphrases!Installationpip install catchphraseUsage>>> import catchphrase
>>> catchphrase.batman.random_holy()
'Holy Roadblocks, Batman!'
>>> catchphrase.batman.random_holy(suffix=', Robin!')
'Holy Hallucination, Robin!'
Package: catch-turtle
catch-turtle是使用turtle模块制作的一款娱乐游戏。游戏玩法:运行catch_turtle模块目录下的catch_turtle.py, 或在命令行输入python -m catch_turtle,将弹出一个窗口; 点击”开始游戏”按钮,开始游戏。按↑,↓,←,→键移动玩家,使其触碰被追逐者。触碰即追逐成功，一次得10分,追逐时，请小心红色的”敌人”,触碰”敌人”即追逐失败。触碰后,被追逐者将会回到原位。每得到40分升一级。游戏结束后上一次的等级、最高分将会被保存,但分数不会保存,失败后分数清零。附游戏截图:1.1.4版改进: 继续修复一些bug和错误, 游戏更加稳定。源程序: 见https://github.com/qfcy/Python/tree/main/catch_turtle。作者:qfcy 百度贴吧账号:qfcy_作者CSDN主页:https://blog.csdn.net/qfcy_/
Package: catchword
# Catchword
Catchword prints out the matched lowercase words from the file. Search term exists on the last line of the file at all times. If there is no match, “There is no word that matches with Search Term!” will be printed out on console.The search function was implemented by using“Prefix Tree”.I try to follow [this][google/styleguide] style guide for this project. Check my docstrings and comments for detailed explanations.[google/styleguide]:https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings# Setup
This project uses “setup.py” for packaging project. But since it is not recommened way for packaging the project, [this][packaging] can be followed instead of using “setup.py”.[packaging]:https://packaging.python.org/en/latest/tutorials/packaging-projects/## 1. Check Python version
This project needsPythonversion that is greater than or equal to3.10.` python--version`## 2. Create virtual environment and activate it
See details at [here][venv].[venv]:https://docs.python.org/3/library/venv.html` python-mvenv venv `Once you create it.` (POSIX) source venv/bin/activate `## 3. Install requirements` python-mpip install-rrequirements.txt `## 4. Run tests` python-mpytest `## 5. Build
This will create “dist” folder.` python-mbuild `## 6. Install
You can find the “wheel_file” at the “dist” folder.` python-mpip install["wheel_file".whl]`## 7. Usage
“FILEPATH” should be absolute path of a file.` wordsearch ["FILEPATH"] `
Package: catchy-toolbox
## CATCHY### Corpus Analysis Tools for Computational Hook discoveryPython tools for the corpus analysis of popular music recordings. The tools can be used separately or together. I.e.: you can use your own psychoacoustic features and still use the other modules. Note that to use all scripts, it is assumed that audio files come pre-segmented (e.g., into structural sections).The base feature modules’ requirements include Matlab, Librosa and VAMP.### StructureExtracting catchy features from a folder of files involves three steps (look for theeurovision_demo.ipynbipython notebook for a more detailed demo):Base feature extractionHere, basic, familiar feature time series are extracted. The toolbox currently implements (wrappers for) MFCC, chroma, melody and perceptual feature extraction. (Rhythm features under development in branchrhythm.)
This part of the toolbox relies on a lot of external code, but it’s also easy to work around: if you want to use other features, just save them to a set of csv files (1 per song section–see below) in some folder (1 per feature).Pitch (and rhythm) descriptor extractionThis part computes mid-level pitch descriptors from chroma and/or melody information computed in step one. Essentially an implementation of several kinds of audio bigram descriptors. See also [1] and [2].Feature transformsCompute ‘first’ and ‘second order’ aggregates of any of the features computed in step 1 and step 2. See [2].The above three steps correspond to the three columns in below diagram.![Module Diagram](docs/catchy%20modules.png?raw=true)### Known issues:i/o currently very conservative–you may have to do your own mkdirs when writing features.Matlab path handling hasn’t been checked on other machines than mine.Hopefully these will be addressed soon.### LicenseMatlab scripts under GNU Public license; everything else, see LICENSE.If you use this, feel free to refer to [2].[1] Van Balen, J., Wiering, F., & Veltkamp, R. (2015). Audio Bigrams as a Unifying Model of Pitch-based Song Description. In Proc. 11th International Symposium on Computer Music Multidisciplinary Research (CMMR). Plymouth, United Kingdom.[2] Van Balen, J., Burgoyne, J. A., Bountouridis, D., Müllensiefen, D., & Veltkamp, R. (2015). Corpus Analysis Tools for Computational Hook Discovery. In Proc. 16th International Society for Music Information Retrieval Conference (pp. 227–233). Malaga, Spain.Home page: [http://www.github.com/jvbalen/catchy](http://www.github.com/jvbalen/catchy)2016 Jan Van Balen ([@jvanbalen](https://twitter.com/jvanbalen))
Package: catconfig
CatConfig🐱Make more easy for reading/validating/updating config for python appInstallpip install catconfigIf you want to use validation feature, installcerberusmodule for your project to use it normally.Installtomlorpyyamlmodule for toml/yaml format parsing.Quickstart# Example.pyfromcatconfigimportCatConfig,ValidationError# Load# Load config from stringc=CatConfig()c.load_from_string("""{"foo": "bar"}""")# Load config when initalizing CatConfig objectc=CatConfig(data={'foo':'bar'})# load config from filec=CatConfig()c.load_from_file('./tests/assests/test.json')# Specify config type when initalizing CatConfig objectc=CatConfig(format='json')c.load_from_file('./tests/assests/test.json')# Specify config type when loading config filec=CatConfig()c.load_from_file('./tests/assests/test.json',format='json')# Get itemprint(c.foo)# Print: barprint(bool(c.some.value.does.nt.exists))# Print: Falseprint(str(c.some.value.does.nt.exists))# Print: Noneprint(c['foo'])# Print: barprint(c.get('foo'))# Print: bar# Validation# visit https://docs.python-cerberus.org/en/stable/usage.html for more info of schemaschema={'foo':{'type':'integer'},'some_field':{'type':'string'}}c=CatConfig(validator_schema=schema)try:c.load_from_file('./tests/assests/test.json')exceptValidationErroraserr:print(err.message)# Print:# arr: unknown field# foo: must be of integer typeLicenseMIT
Package: catcoocc
catcooccThecatcoocclibrary is designed for the study of co-occurrence association
between categorical variables by implementing a number of symmetric and
asymmetric measures of association.The library has been expanded and renamed to ASymCat, and can now be found athttps://pypi.org/project/asymcat/. Thecatcooccversion will not be updated and will only be kept to prevent
cybersquatting on PyPI.
Package: catd
catdA Chinese co-word analysis with topic discovery package.OverviewThe catd co-word analysis with topic discovery package is intend for Chinese corpus analysis.Use caseFor better experience, you can run this script (with your corpus which have list of documents separated by'\n'.)Corpus('$ProjectRoot/data/original_data/tianya_posts_test_set_10.txt):documents1
documents2
...Program:importcatdimportoscorpus=[]withopen(os.path.join('data','original_data','tianya_posts_test_set_10.txt'),encoding='utf-8')asf:forlineinf:corpus.append(line)stop_words_set=catd.util.collect_all_words_to_set_from_dir(os.path.join('data','stop_words'))cut_corpus=catd.util.word_cut(corpus,stop_words_set)word_net=catd.WordNet()coded_corpus=word_net.generate_nodes_hash_and_edge(cut_corpus)word_net.add_cut_corpus(coded_corpus)NoteNow I am working on the efficient visualization for big graph (hundreds of millions of edges).If you have any question or suggestion, feel free to contactthe Authorin English or Chinese. But for the benefit of all users, please make communicate in English when it is public.Data Structure* WordNet
    * nodes   list[WordNode1, WordNode2, ...])
    * edges   dict[word][neighbors] -> weight)
    * docs    list[Doc1, Doc2, ...]
    * get_node_by_str dict[word] -> WordNode

* WordNode
    * id
    * name
    * doc_count
    * word_count
    * inverse_document_frequency

* Doc
    * id
    * word_count_in_doc
    * word_tf_in_doc
    * word_tf_idf
    * num_of_wordslog0.3.0Add support for lda model and topic information aggregation from words.LicenseMIT License
Package: cat-data-tools
Cat data toolsOverviewPython module with tools to process cat data.AdaptadoresEsta nota está inspirada en el tema de arquitectura hexagonal.
La necesidad nació de la petición de que nos hizo el equipo de trampeo por tener las coordenadas de las trampas con capturas.
En el estado actual no tenemos las coordenadas, pero nos hicieron llegar las coordenadas en un archivo GPX.
Ese archivo lo cambiamos a formato GeoJSON y de ahí a csv.
La promesa es que ese archivo ya no nos lo van a mandar.
El próximo formato serán archivos de mapsource.¿Qué hicimos?Sabemos que las próximas coordenadas vendrán de un archivo distinto.
Así que decidimos que un adaptador decida cómo generar el DataFrame a partir de diferentes fuentes de datos.
El adaptador nos regresará objetos que transforan de la fuente de datos a DataFrame.
El nombre del archivo fuente es el criterio para saber el tipo de objeto que nos entregará el DataFrame que necesitamos.¿Dónde lo hicimos?Trabajamos en el repositoriocat_data_tools.
¿Cuál es el objetivo de este repositorio?
¿Dónde utilizamos este repositorio?Aquípodemos ver la implementación.¿Qué hace el adaptador?La funciónAdapter_for_path_to_dataframe()nos entrega un objeto del tipoAdapter_from_path(creo que podemos mejorar el nombre. Tal vez transformer en lugar de adapter).
Estos objetos tienen un métodoget_dataframe()encargado de entregar el DataFrame con las columnas correctas.
La única razón para cambiar a la funciónAdapter_for_path_to_dataframe()es que agreguemos a una clase "transformer" nueva.
Las clasestransformercambian de manera independiente, cada una dependen del archivo con el que las inicializamos.
La razón por la que podrían cambiar todas las clasestransformeres que las columnas de salida cambien de nombre.¿Qué logramos?El cambio que nos prometieron que vendría lo tenemos encapsulado.
Cuando la fuente de datos sea distinta tenemos que escribir una nueva clase que cumpla con la misma interfaz. ¿Podemos decir lo mismo sin usar la palabra interfaz?
Además tendremos que agregar un opción en el diccionariochoice.
Package: catecs
Copyright (c) 2018 Rik HendriksPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.Description-Content-Type: UNKNOWNDescription: # Categorical Entity Component System (CATECS)A categorical entity component system.This package is inspired by the package named Esper, which can be found at the following link:https://github.com/benmoran56/esper## Installing and running### InstallationCATECS can be installed with `pip`.pip install catecs### Running the programComing soon!Platform: UNKNOWN
Package: categorical
Categorical Sampler-----Install from pip: `pip install categorical-sampler`Let&rsquo;s generate a probability distribution to get us started.  First, sample a bunch of random numbers to determine probability &ldquo;scores&rdquo;.>>> from random import random>>> k = 10**6>>> scores = [random() for i in range(k)]>>> total = sum(scores)>>> probabilities = [s / total for s in scores]We've normalized the scores to sum to 1, i.e. makethem into proper probabilities, but actually the categorical sampler will do that for us, so it&rsquo;s not necessary:>>> from categorical import Categorical as C>>> my_sampler = C(scores)>>> print my_sampler.sample()487702Comparing to numpy, assuming we draw 1000 individual samples *individually*:>>> from numpy.random import choice>>> import time>>>>>> def time_numpy():>>>     start = time.time()>>>     for i in range(1000):>>>         choice(k, p=probabilities)>>>     print time.time() - start>>>>>> def time_my_alias():>>>     start = time.time()>>>     for i in range(1000):>>>         my_sampler.sample()>>>     print time.time() - start>>>>>> time_numpy()31.0555009842>>> time_my_alias()0.0127031803131Get the actual probability of a given outcome:>>> my_sampler.get_probability(487702)1.0911282101090306e-06
Package: categorical-embedder
Categorical EmbedderCategorical Embedderis a python package that let's you convert your categorical variables into numeric via Neural NetworksInstallationpip install categorical_embedderExampleimportcategorical_embedderascefromsklearn.model_selectionimporttrain_test_splitdf=pd.read_csv('HR_Attrition_Data.csv')X=df.drop(['employee_id','is_promoted'],axis=1)y=df['is_promoted']embedding_info=ce.get_embedding_info(X)X_encoded,encoders=ce.get_label_encoded_data(X)X_train,X_test,y_train,y_test=train_test_split(X_encoded,y)embeddings=ce.get_embeddings(X_train,y_train,categorical_embedding_info=embedding_info,is_classification=True,epochs=100,batch_size=256)A more detailedJupyter Notebookcan be found hereWhat's insideCategorical Embedder?ce.get_embedding_info(data,categorical_variables=None): This function identifies all categorical variables in the data, determines its embedding size. Embedding size of the categorical variables are determined by minimum of 50 or half of the no. of its unique values i.e. embedding size of a column  = Min(50, # unique values in that column)
One can pass explicit list of categorical variables incategorical_variablesparameter. IfNone, this function automatically takes all the variables with data typeobjectce.get_label_encoded_data(data, categorical_variables=None): This function label encodes (integer encoding) all the categorical variables using sklearn.preprocessing.LabelEncoder and returns a label encoded dataframe for training. Keras/tensorflow or any other deep learning library would expect the data to be in this format.ce.get_embeddings(X_train, y_train, categorical_embedding_info=embedding_info, is_classification=True,                          epochs=100,batch_size=256): This function trains a shallow neural networks and returns embeddings of categorical variables. Under the hood, It is a 2 layer neural network architecture with 1000 and 500 neurons with 'ReLU' activation. It takes 4 required inputs -X_train,y_train,categorical_embedding_info:output of get_embedding_info function andis_classification:Truefor classification tasks;Falsefor regression tasks.For classification:loss = 'binary_crossentropy'; metrics = 'accuracy'and for regression:loss = 'mean_squared_error'; metrics = 'r2'Dependenciespandasscikit-learntensorflowkerastqdmkeras-tqdm
Package: categorical-encode
This package can be used to convert dataset into numerical categorical data.
This can be utilized for the pre-processing of various kinds of data for many Machine Learning Models. There are various features available such as normalizing the data to make the data more useful for the model. This function will work on any kind of data in the DataFrame.IMPORT:from categorical_encode.categorical import categoricalThe Parameters:-dataframe: The Input DataFrame(X) which you want to categorically encode.normalize: This parameter determines if it will be between 0-1(1 included) or 1 to no. of classes (1 - no. of classes). default:Falsedrop_columns:  This specifies the dataframe columns that need to be dropped as they are useless. default: No Columnsdrop_na: This drops empty values (NaN) if is set to True. default: Falsetarget_columns: This creates the target DataFrame(Y) without applying any Encoding. default: No ColumnsReturnThis Returns Two DataFrame (X,Y) if target_columns are provided Else only the Input dataframe (X) which is encoded.Example:from categorical_encode.categorical import categoricaldf = categorical(dataframe = df, normalize= True)This returns df as categorically encoded column-wise for all the columns having values between 0-1(1 included).
Package: categorical-encoding
categorical-encodingcategorical-encoding is a Python library for encoding categorical data, intended for use withFeaturetools.
categorical-encoding allows for seamless encoding of data and integration into Featuretools pipeline for automated feature engineering within the machine learning pipeline.Installpython-mpipinstall"featuretools[categorical_encoding]"DescriptionInstall Demo Guide Requirementspython-mpipinstalldemo-requirements.txtFor more general questions regarding how to use categorical encoding in a machine learning pipeline, consult the guides located in thecategorical encoding github repository.>>>feature_matrixproduct_idpurchasedvaluecountrycodeid0cokezeroTrue0.0US1cokezeroTrue5.0US2cokezeroTrue10.0US3carTrue15.0US4carTrue20.0US5toothpasteTrue0.0ALIntegrates into standard procedure of train/test split within applied machine learning processes.>>>train_data=feature_matrix.iloc[[0,1,4,5]]>>>train_dataproduct_idpurchasedvaluecountrycodeid0cokezeroTrue0.0US1cokezeroTrue5.0US4carTrue20.0US5toothpasteTrue0.0AL>>>test_data=feature_matrix.iloc[[2,3]]>>>test_dataproduct_idpurchasedvaluecountrycodeid2cokezeroTrue10.0US3carTrue15.0US>>>importcategorical_encodingasce>>>encoder=ce.Encoder(method='leave_one_out')>>>train_enc=encoder.fit_transform(train_data,features,train_data['value'])>>>test_enc=encoder.transform(test_data)Encoder fits and transforms to train data, and then transforms test data using its learned fitted encoding.>>>train_encPRODUCT_ID_leave_one_outpurchasedvalueCOUNTRYCODE_leave_one_outid05.00True0.012.5010.00True5.010.0046.25True20.02.5056.25True0.06.25>>>test_encPRODUCT_ID_leave_one_outpurchasedvalueCOUNTRYCODE_leave_one_outid22.50True10.08.33333336.25True15.08.333333Supports easy integration into Featuretools through its support and use of features.
First, learn features through fitting an encoder to data. Then, when new data comes in, easily prepare it for your trained machine learning model by using those features to seamlessly generate new tables of encoded data.>>>features=encoder.get_features()[<Feature:PRODUCT_ID_leave_one_out>,<Feature:purchased>,<Feature:value>,<Feature:COUNTRYCODE_leave_one_out>]>>>features_encoded=enc.get_features()>>>fm2_encoded=ft.calculate_feature_matrix(features_encoded,es,instance_ids=[6,7])>>>fm2_encodedPRODUCT_ID_leave_one_outpurchasedvalueCOUNTRYCODE_leave_one_outid66.25True1.06.2576.25True2.06.25Feature Labscategorical-encoding is an open source project created byFeature Labs. To see the other open source projects we're working on visit Feature LabsOpen Source. If building impactful data science pipelines is important to you or your business, pleaseget in touch.