Saravanan666/pypi-org huggingface dataset:
Package: custom-user-profiles
Quick startAdd toINSTALLED_APPSsettingINSTALLED_APPS = (
    # ...
    'custom_user',
    'custom_user_profiles
)SetAUTH_USER_MODELsettingAUTH_USER_MODEL = 'custom_user_profiles.CustomUser'theCustomUserinherit fromAbstractEmailUsermodel from [django-custom-user](https://github.com/jcugat/django-custom-user)If you want to create your own custom user, extendcustom_user_profiles.models.AbstractCustomUser.from custom_user_profiles.models import AbstractCustomUser

class CustomUser(AbstractCustomUser):
    # ...Create your profile modelsfrom custom_user_profiles.models import Profile

class Buyer(Profile):
    # ...

class Seller(Profile):
    # ...Usage@login_required
def view(request):
    profile = request.user.profile
    if request.user.is_seller:
        # ...AlsoAbstractCustomUserprovides achainableQuerySetmanager:from django.contrib.auth import get_user_model
User = get_user_model()

User.queryset.seller() # get all users with 'seller' profile
User.queryset.buyer() # get all users with 'buyer' profile
User.queryset.something() # raises django.core.exceptions.FieldErrorobjectsmanager is still available and inherit from django’sBaseUserManager
Package: custom-user-roles
AdduserrolesdoINSTALLED_APPSINSTALLED_APPS = (
    ...
    'userroles',
)Add theUSER_ROLESsettingUSER_ROLES = (
    'manager',
    'moderator',
    'client',
)Define your Custom User model (optional)AUTH_USER_MODEL = 'custom_user.EmailUser'Add subroles for any of the roles defined in theUSER_ROLESsetting (optional)MANAGER_ROLES = (
    'staff_manager', 'business_manager'
)Subroles can have sub-subroles and so on. But be careful not to repeat the names!Therole_requireddecorator provides similar behavior to Django’slogin_requiredandpermission_requireddecorators.  If the user accessing the view does not have the required roles, they will be redirected to the login page.from userroles.decorators import role_required

@role_required('manager', 'moderator')
def view(request):
    ...orfrom userroles.decorators import role_required
from userroles import roles

@role_required(roles.manager, roles.moderator)
def view(request):
    ...If user has a subrole of the required role, it passes de user test as well!
Package: customusers
Users is a simple Django app that create own custom users and a RESTful API for the users that is allauth enabled.Quick startAdd “users” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
        ...
        'app_users',
        'rest_framework',

]Include the usres URLconf in your project urls.py like this:path('users/', include('app_users.urls')),Runpython manage.py migrateto create the users models.Start the development server and visithttp://127.0.0.1:8000/users/to view the users API
Package: custom_uuid
CustomUUIDCustomUUID is a versatile UUID generation library designed to create unique identifiers with optional embedded information such as dates or custom values. It's ideal for applications requiring unique IDs with additional embedded context.Table of ContentsIntroductionFeaturesInstallationUsageConfigurationIntroductionCustomUUID provides a flexible way to generate UUIDs (Universally Unique Identifiers) with optional embedding of dates, application-specific IDs, or other relevant data. It supports various customization levels, from simple UUIDs to complex ones containing multiple data types.FeaturesStandard UUID Generation:Generate regular UUIDs compliant with RFC 4122.Date Embedding:Option to embed the current date into the UUID for temporal context.Custom Value Embedding:Embed up to three custom values into the UUID for additional context.Length Management:Automatically handles the length of UUIDs to ensure they stay within standard limits.Predefined Templates:Includes several template functions for common use cases, facilitating ease of use.InstallationTo install CustomUUID, run the following command:pipinstallcustom_uuidUsageBasic Usage Examples with Sample OutputsGenerating a Standard UUID:importcustom_uuidstandard_uuid=custom_uuid.generate_custom_uuid()print("Standard UUID:",standard_uuid)Output:Standard UUID: 123e4567-e89b-12d3-a456-426614174000Generating a UUID with Current Date:date_uuid=custom_uuid.uuid_with_date()print("UUID with Date:",date_uuid)Output:UUID with Date: 20231109-123e4567-e89b-12d3-a456-426614174000Generating a UUID for a Specific Application:app_uuid=custom_uuid.uuid_for_app("MyApp123")print("UUID for App:",app_uuid)Output:UUID for App: MyApp123-20231109-123e4567-e89b-12d3-a456-426614174000Generating a Compact UUID Without Separators:compact_uuid=custom_uuid.compact_uuid()print("Compact UUID:",compact_uuid)Output:Compact UUID: 123e4567e89b12d3a456426614174000Generating a UUID with Custom Elements:custom_elements_uuid=custom_uuid.uuid_with_custom_elements("Element1","Element2")print("UUID with Custom Elements:",custom_elements_uuid)Output:UUID with Custom Elements: Element1-Element2-20231109-123e4567-e89b-12d3-a456-426614174000Generating a Timestamped UUID:timestamped_uuid=custom_uuid.timestamped_uuid()print("Timestamped UUID:",timestamped_uuid)Output:Timestamped UUID: 20231109123000-123e4567-e89b-12d3-a456-426614174000ConfigurationCustomUUID allows various configurations to tailor the UUID generation to your specific needs. Refer to the documentation for detailed configuration options.LicenseCustomUUID is licensed under the MIT License.
Package: custom_vision_client
py_custom_vision_clientThis repository contains a simple Python client for theCustom Vision Service.Usage# first, train a modelfromcustom_vision_clientimportTrainingClient,TrainingConfigazure_region="southcentralus"training_key="my-training-key"# from settings pane on customvision.aitraining_client=TrainingClient(TrainingConfig(azure_region,training_key))project_id=training_client.create_project("my-project-name").Idtraining_client.create_tag(project_id,"Cat")training_client.create_tag(project_id,"Dog")training_client.add_training_images(project_id,["kitten.jpg"],"Cat")training_client.add_training_images(project_id,["akita.png","spitz.png"],"Dog")training_client.add_training_images(project_id,["best-animal-pals.jpg"],"Cat","Dog")model_id=training_client.trigger_training(project_id).Id# then, use the model to predict:fromcustom_vision_clientimportPredictionClient,PredictionConfigazure_region="southcentralus"prediction_key="my-prediction-key"# from settings pane on customvision.aiprediction_client=PredictionClient(PredictionConfig(azure_region,project_id,prediction_key))predictions=prediction_client.classify_image("cat.jpg",model_id)# could also be a url to a filebest_prediction=max(predictions,key=lambda_:_.Probability)print(best_prediction.Tag)Command-line interfaceYou can also interact with the Custom Vision Service via a command-line interface:# first, train a modelpython3-mcustom_vision_client.training\--key="my-training-key"\--projectname="my-project-name"\--imagesroot="/path/to/images"# then, use the model to predict:python3-mcustom_vision_client.prediction\--key="my-prediction-key"\--projectid="my-project-id-from-training"\--modelid="my-model-id-from-training"\--image="path-or-url-to-image"The command-line interface assumes that your training images are organized in folders
such that every folder contains all the training images for that label:/path/to/images├──label_one│├──image_1.jpg│├──image_2.png│└──image_3.png└──label_two├──image_4.jpg└──image_5.jpg
Package: custom-vsearch
What is this?This is a module created basically for test and learning purposes.search4letters function takes a positional argument called ‘phrase’, which is any given string
and an optional argument called ‘letters’ (by default ‘aeiou’).
The function search the letters in the given phrase and returns a set with the found elements.—Arguments———-(default value)
1st - ‘phrase’
2nd - ‘letters’ (‘aeiou’)Requirementspython >= 3.9CreditsAriel Denaro
Package: custom-wkt
Custom WKTTooling to render WKT values based on specific, custom data layouts.Given two series of 2-D data, grouped by classes, render into a list ofWKTLINESTRINGs.importcustom_wktimportnumpyasnpcustom_wkt.linestring(np.linspace(0,5,6),np.linspace(0,5,6)/2.0,np.array([0,0,0,0,1,1]),1)# ['LINESTRING (0.0 0.0, 1.0 0.5, 2.0 1.0, 3.0 1.5)', 'LINESTRING (4.0 2.0, 5.0 2.5)']Operationxyc0.00.001.00.502.01.003.01.504.02.015.02.51Wherex,yare the elements arenp.float64values for the points andcare the classes for the points asnp.int64.Note that classes must already be consecutive and returnedLINESTRINGs will match the classes' order.LINESTRING (0.0 0.0, 1.0 0.5, 2.0 1.0, 3.0 1.5)for class 0 andLINESTRING (4.0 2.0, 5.0 2.5)for class 1.Function SignatureNote that this package istype strict- point valuesmustbenp.float64, classes must benp.int64, and precision must be anint.The underlying code is written in Rust and offers a function signature equivalent to:deflinestring(x:np.ndarray,y:np.ndarray,classes:np.ndarray,precision:int)->List[str]:"""Parameters----------x : np.ndarrayFirst Point Value - float64y : np.ndarraySecond Point Values - float64classes : np.ndarrayClasses - int64precision : intNumber of places for rendering in string, >= 0Returns-------List[str]List of LineStrings"""Example Usageimportpandasaspdimportnumpyasnpimportcustom_wktdf=(pd.DataFrame({"x":np.arange(6).astype(np.float64)}).assign(y=lambdaidf:idf["x"]/2,c=lambdaidf:(idf["x"]>3).astype(np.int64)).sort_index("c"))result=custom_wkt.linestring(df["x"].values,df["y"].values,df["c"].values,1)# ['LINESTRING (0.0 0.0, 1.0 0.5, 2.0 1.0, 3.0 1.5)', 'LINESTRING (4.0 2.0, 5.0 2.5)']If classes are available as Pandas series as strings or another type,str_series=df["c"].astype(str)int_classes=str_series.astype("category").cat.codes.astype(np.int64).values# NOTE: Cast to int64. Pandas will return the smallest int dtype to fit number of categories# but custom_wkt requires strict typesresult=custom_wkt.linestring(df["x"].values,df["y"].values,int_classes,1)# ['LINESTRING (0.0 0.0, 1.0 0.5, 2.0 1.0, 3.0 1.5)', 'LINESTRING (4.0 2.0, 5.0 2.5)']PerformancePerformance varies greatly depending on size of inputs, size of the groups, and relative precision.Rough estimates measure 2-3x speedup and decreased memory usage over normal python logic.SimilarPandasoperations are much less efficient computation. The nature of the solution includes groupbys and python function calls, which have richer functionality but negatively impact performance for this operation.
Package: custools
Toolspdf合并图片合并usage: tool.exe [-h] {pdf,img} ...

常用工具

positional arguments:
  {pdf,img}
    pdf       pdf合并
    img       图片合并

optional arguments:
  -h, --help  show this help message and exitusage: tool.exe img [-h] -i INPUT [INPUT ...] [-d {horizontal,vertical}] [-o OUTPUT] [-g {left,center,right}]
                           [-s SPACE]

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT [INPUT ...], --input INPUT [INPUT ...]
                        图片或图片所在文件夹的路径
  -d {horizontal,vertical}, --direction {horizontal,vertical}
                        图片合并方向
  -o OUTPUT, --output OUTPUT
                        合成图片的输出路径
  -g {left,center,right}, --gravity {left,center,right}
                        图片的水平方向
  -s SPACE, --space SPACE
                        图片的间距usage: tool.exe pdf [-h] -i INPUT [INPUT ...] [-o OUTPUT]

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT [INPUT ...], --input INPUT [INPUT ...]
                        pdf的路径
  -o OUTPUT, --output OUTPUT
                        合成pdf的输出路径
Package: custos-jupyterhub-authenticator
Apache Custos Jupyterhub AuthenticatorThe Apache Custos Jupyterhub Authenticator provides CILogon based federated authentication for Jupyterhub. In addtion it provides access to Custos IAM solutions such asFine-Grained AuthorizationSecret ManagementService Accounts ..etc.Additional Information :https://airavata.apache.org/custos/Folder StructurecustosauthenticatorIncludes oidc plugin to connect with custos oauth servicesConfigurationAdd following configuration to Jupyter  Hub in helm chart configuration (values.yaml). You need to request an tenant from
Custos Portal to startdev:https://dev.portal.usecustos.org/production:https://portal.usecustos.org/Hub configurationhub:
 config:
   CustosOAuthenticator:
     client_id: CHANGE_ME
     client_secret: CHANGE_ME
     oauth_callback_url: https://<jupyter_host>/hub/oauth_callback
     custos_host: custos.scigap.org      
   JupyterHub:     
     authenticator_class: custosauthenticator.custos.CustosOAuthenticator
Package: cusum
CusumPackage for processing Cumulative Sum (CuSum) change detection algorithm from downloading SAR images to visual shapefile resultEnvironment SetupStart with creating a dedicated environment with conda, installing python 3.9. In a terminal or command prompt :conda create -n my_env python=3.9InstallIn a terminal, activate your dedicated environment and install gdal 3.6.4 :conda activate my_envconda install -c conda-forge gdal=3.6.4Install the cusum package using pip :pip install cusum
Package: cutadapt
CutadaptCutadapt finds and removes adapter sequences, primers, poly-A tails and other
types of unwanted sequence from your high-throughput sequencing reads.Cleaning your data in this way is often required: Reads from small-RNA
sequencing contain the 3’ sequencing adapter because the read is longer than
the molecule that is sequenced. Amplicon reads start with a primer sequence.
Poly-A tails are useful for pulling out RNA from your sample, but often you
don’t want them to be in your reads.Cutadapt helps with these trimming tasks by finding the adapter or primer
sequences in an error-tolerant way. It can also modify and filter single-end
and paired-end reads in various ways. Adapter sequences can contain IUPAC
wildcard characters. Cutadapt can also demultiplex your reads.Cutadapt is available under the terms of the MIT license.Cutadapt development was started atTU Dortmund Universityin the group ofProf. Dr. Sven Rahmann.
It is currently being developed withinNBIS (National Bioinformatics Infrastructure Sweden).If you use Cutadapt, please citeDOI:10.14806/ej.17.1.200.LinksDocumentationSource codeReport an issueProject page on PyPI (Python package index)Wrapper for the Galaxy platform
Package: cutaudio
Cut the original audio into more granular files with new names,
saving the cut specifications in text files so you can edit your cuts.Run like so.cutaudio 'audio/long raw audio file.mp3' 'another file.wav'The following happens to each audio file that you pass.If a cut file does not exist alongside the original file,
play the file and prompt for cuts. Cuts are saved to the cutfile.If an output directory does not exist alongside the original file,
process the cut file to produce the output directory.Step 1 depends on mplayer, and step 2 depends on sox.Install from PyPI.pip install cutaudioRead more help.cutaudio -h
Package: cutci
CutciCutci is a library to calculate Human Thermal Comfort Index (UTCI) by GPU-accelerated computing with CuPy.The original (CPU version) code for calculating MRT and UTCI referenced theCalcHiTiSea_pkg.Free software: Apache Software License 2.0Documentation:https://cutci.readthedocs.io.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.build: python setup.py sdist bdist_wheelHistory1.0.0 (2023-08-15)First release on PyPI.
Package: cutcut
cutcut通用分词工具在开源数据上使用albert进行实体识别，切分句子，得到对应的单词序列。更新说明2021-06-30基本完成分词功能，后期需要增加自定义词典及自定义词添加。将模型打包成wheel格式，使用pip进行安装。使用说明调用get_wheel.sh生成安装文件，在dist目录下；使用pip install XXX.whl文件；在python中使用import cutcut引入分词包；使用cutcut.lcut进行分词。
Package: cut-detector
Cut DetectorAutomatic micro-tubules cut detector.Thisnapariplugin was generated withCookiecutterusing@napari'scookiecutter-napari-plugintemplate.InstallationConda environmentIt is highly recommended to create a dedicated conda environment, by following these few steps:Install anAnacondadistribution of Python. Note you might need to use an anaconda prompt if you did not add anaconda to the path.Open an Anaconda prompt as admin to create a new environment usingconda. We advice to use python 3.10 and conda 23.10.0, to get conda-libmamba-solver as default solver. Note than openjdk is necessary to call Fiji from python, which is needed as you will see below.conda create --name cut_detector python=3.10 conda=23.10.0
conda activate cut_detector
conda install -c conda-forge openjdk=8Package installationOnce in a dedicated environment, our package can be installed viapip:pip install cut_detectorFijiThis package relies onTrackmateto perform cell tracking. Trackmate is called throughFiji, which has to be installed independently. Please follow the stepshereto install it.GPUWe highly recommend to use GPU to speed up segmentation. To use your NVIDIA GPU, the first step is to download the dedicated driver fromNVIDIA.Next we need to remove the CPU version of torch:pip uninstall torchThe GPU version of torch to be installed can be foundhere. You may choose the CUDA version supported by your GPU, and install it with conda. This package has been developed with the version 11.6, installed with this command:conda install numpy==1.25 pytorch==1.12.1 torchvision pytorch-cuda=11.6 -c pytorch -c nvidiaNote that we have added numpy here to prevent conda from installing a version higher than 1.25, which is not supported by numba.UpdateTo update cut-detector to the latest version, open an Anaconda prompt and use the following commands:conda activate cut_detector
pip install cut-detector --upgradeContributingContributions are very welcome. Tests can be run withtox, please ensure
the coverage at least stays the same before you submit a pull request.LicenseDistributed under the terms of theBSD-3license,
"cut-detector" is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: cuteborg
Third-party scheduler user interface for borgbackup.Features:Robust architecture (UI cannot crash scheduler, UI monitors scheduler).Backups to remote and local repositories.Support for repositories on removable and LUKS encrypted devices (mounts
automatically, handles absence gracefully).Schedule based on custom regular intervalsQt-based system tray icon with schedule overviewCLI interface to control and monitor schedulerUsageStart scheduler (in foreground; add-dto daemonize):cuteborg-scheduler -vvv runCheck status:cuteborg-scheduler statusStop scheduler (interrupts jobs which are currently running; borg can cope with
that; they will be re-started on the next scheduler invocation):cuteborg-scheduler stopStart system tray icon (starts scheduler if not running):qtborg-trayicon
Package: cuteci
CuteCICuteCI is a simple tool allowing you to install Qt framework with desired packages in headless mode.
Qt installers are using Qt Installer Framework which provides scripting ability,
CuteCI takes advantage of this.RequirementsPython3pip3cuteciis in Python but has only been tested on Ubuntu (+docker).cuteciis tested with latest patch version of Qt5.95.125.13,5.14(5.105.11are not online anymore).Installationpip3 install cuteciPrinciplecutecidoes few things:Download Qt installer if you pass an urlMake installer executableInstall Qt with desired packages in the directory you choosecutecican also only lists packages available in the installer.UsageCommon options:--installer(required): path or url to Qt installer. If url, choose an official one fromdownload.qt.io/official_releases/qt/, this is becausemd5sums.txtis retrieved implicitely from it.--ui: if set, Qt installer UI is shown (useful for debugging).--rm: if set, Qt installer is removed at the end.--timeout: duration in seconds to wait for the operation to be finished.List packagescuteci\--installer<pathorofficialurl>\[--ui][--rm]\listWill output:===LISTOFPACKAGES===qtQt
qt.qt5.5122Qt5.12.2
qt.toolsDeveloperandDesignerTools
qt.installer.changelogQtInstallerChangelog
qt.license.lgplQtLicenseLGPL
qt.license.thirdpartyQt3rdPartyLicenses
qt.license.pythonPythonSoftwareFoundationLicenseVersion2qt.license.gplv3exceptLicenseGPL3-EXCEPT
qt.qt5.5122.gcc_64Desktopgcc64-bit
qt.qt5.5122.android_x86Androidx86
qt.qt5.5122.android_arm64_v8aAndroidARM64-v8a
qt.qt5.5122.android_armv7AndroidARMv7
...===ENDOFPACKAGES===Installcuteci\--installer<pathorofficialurl>\[--ui][--rm]\install\--destdir/opt/Qt\--packagesqt.qt5.5122.gcc_64,qt.qt5.5122.android_x86\[--verbose][--keep-tools]Notesdestdirshould not contain a previous Qt installation (unless it has been installed withcuteci),
otherwise installer will complain and script does not handle it.If--keep-toolsis set, QtCreator, Maintenance Tools, samples and doc will be kept,
but you will not be able to install another version of Qt indestdir.Docker integrationHere is the sample of a minimalist Dockerfile usingcutecito install Qt 5.12.2:FROMubuntu:18.04

RUNapt-getupdate&&apt-getinstall-y--no-install-recommends\libdbus-1-3\xvfb\libfontconfig\python3\python3-pip# For some reason Qt installer 5.12 requires:libxrender1\libxkbcommon-x11-0

RUNpip3installcuteci&&\cuteci\--rm\--installerhttp://download.qt.io/official_releases/qt/5.12/5.12.2/qt-opensource-linux-x64-5.12.2.run\install\--destdir/opt/Qt\--packagesqt.qt5.5122.gcc_64

ENTRYPOINT["/bin/bash"]
Package: cute_format
cute_format=========pack random data and fast retrieval in pythonQuick Install-------------Quick install for debian/ubuntu like linux distributions... code-block:: bash$ pip install cute_formatQuick Usage Guide-----------------.. code-block:: pythonfrom cute.cute_reader import CuteReaderfrom cute.cute_writer import CuteWritercw = CuteWriter('tmp')a = 1000b = 2000cute_writer.write(bytes(a))cute_writer.write(bytes(b))cute_writer.close()cr = CuteReader('tmp')# get the object by indexassert cr.num_data == 2byte_object = cr.get(0)assert int(byte_object) == abyte_object = cr.get(1)assert int(byte_object) == b
Package: cutelog
Table of contentscutelogFeaturesInstallationUsageCode, issues, changelogcutelogThis is a graphical log viewer for Python’s standard logging module.
It can be targeted with a SocketHandler with no additional setup (seeUsage).
cutelog is cross-platform, although it’s mainly written and optimized for Linux.FeaturesAllows any number of simultaneous connectionsCustomizable look of log levels and columns, with presets for eachFiltering based on level and namespace, as well as filtering by searchingSearch through all records or only through filtered onesDisplay extra fields under the message withExtra modeView exception tracebacks or messages in a separate windowDark theme (with its own set of colors for levels)Pop tabs out of the window, merge records of multiple tabs into oneSave/load records to/from a file in JSON formatInstallationIf you’re using Linux, install PyQt5 (or PySide2) from your package manager before installing cutelog (package name is probablypython3-pyqt5orpython-pyqt5). Or just runpip install pyqt5to install it from pip, which is sub-optimal.$ pip install --upgrade cutelogOr install the latest development version from the source:$ pip install git+https://github.com/busimus/cutelog.gitRequirementsPython 3.5 (or newer)PyQt5 (preferably 5.6 or newer) or PySide2QtPyUsageStartcutelogPut the following into your code:importloggingfromlogging.handlersimportSocketHandlerlog=logging.getLogger('Root logger')log.setLevel(1)# to send all messages to cutelogsocket_handler=SocketHandler('127.0.0.1',19996)# default listening addresslog.addHandler(socket_handler)log.info('Hello world!')Afterwards it’s recommended to designate different loggers for different parts of your program withlog_2 = log.getChild(“Child logger”).
This will create “log namespaces” which allow you to filter out messages from various subsystems of your program.Code, issues, changelogVisit the project’sGitHub page.