Saravanan666/pypi-org huggingface dataset:
Package: ctdd
ctddtl:drC test-driven development framework implemented in Python.InfoThe testing framework is Python's native unittest, with a few extra asserts ans stuff provided by John. The tester looks for a .c and .h pair with the same name as the .py test file. It builds them into a Python extension using Crelm (which in turn uses cffi) and runs the Python tests as if it were testing Python code. C callbacks are mocked in Python (demo to follow..), meaning that there is exactly zero C code involved in the testing.ExampleThere is a demo of a TDD'dadd3function in __main__.py, __main__.c and __main__.h in the root of the repo, run withpython3 .. The silly filenames are to suit the Python auto-run mechanism.The files are reproduced here (possibly out of date) with original filenames:add3.pyfrom ctdd import Tester

class Add3Tests(Tester):

    def test_sut_compiles(self):
        with self.assertDoesNotRaise():
            self.sut

    def test_takes_three_f(self):
        with self.assertDoesNotRaise():
            self.sut.add3(0, 0, 0)

    def test_return_zero_for_zeros(self):
        expected = 0

        actual = self.sut.add3(0, 0, 0)

        self.assertEqual(expected, actual)

    def test_returns_sum(self):
        expected = 14

        actual = self.sut.add3(1, 4, 9)

        self.assertEqual(expected, actual)

Tester.go()add3.h#pragma once

int add3(int a, int b, int c);add3.c#include "__main__.h"

int add3(int a, int b, int c)
{
    return a + b + c;
}To use this in real life install the package withpip install ctdd(in a virtualenv if you prefer), and runpython add3.pyafter each add test or add code iteration.Test output is exactly what unittest said (with distutils deprecation warning removed):...........
----------------------------------------------------------------------
Ran 11 tests in 2.104s

OK
Package: cTDMS
############Introduction############**cTDMS** is a Python package to read or write TDMS or TDM files.TDMS or TDM are file formats developed by National Instruments and are the main file formatsfor data storage in LabView from National Instruments.**cTDMS** is using the  NILIBDDC library from National Instruments, which is accessed by the help of the Python ``ctypes`` package.Version 0.91 for 32bit and 64bit system=============================1. Reading TDMS or TDM files=============================To read a TDMS or TDM file you simply have to call: ::from cTDMS.cTDMS import TDM_Filetdm=TDM_File("Data4.tdm")tdm.open()or: ::from __future__ import with_statementfrom cTDMS.cTDMS import TDM_Filewith TDM_File("Data4.tdm") as tdm:......======================================Accessing groups in a TDMS or TDM file======================================The tdm file object is organized like a dictionary. The groups contained in the TDM file can be acces by: ::for groupname in tdm:print "Group %s ------------"%( groupname)group=tdm[groupname]====================Creating a new group====================A new group in the TDM file can be created with following command: ::if "newgroupname" is not in tdm:new_group=tdm.add_Group("newgroupname",  "Description of the group")Before creating a new group, it has to be checked, that this group is not already existing.=========================Getting data from a group=========================Measuring data are store in channels of a group. the can be easily accessed by getting the channels from the group: ::for groupname in tdm:print "Group %s ------------"%( groupname)group=tdm[groupname]for channelname in group:print "Channel %s ------------"%(channelname)channel=group[channelname]print "Channel Properties -----"for property in channel.attrs:print property,  channel.attrs[property]# get some datad=channel[5]d=channel[-5]d=channel[:]d=channel[0:]d=channel[10:-1]t=type(d)print "data type: %s, length: %d"%(str(type(d)),  len(d))
Package: ctdproc
CTD data processing in python.Free software: MIT licenseDocumentation:https://ctdproc.readthedocs.io.FeaturesConvert CTD data collected with Seabird 9/11 systems in hex-format to human-readable formats and physical units.Process CTD time series data into depth-binned profiles.CreditsThis package borrows heavily from a toolbox written in MATLAB® with contributions from Jennifer MacKinnon, Shaun Johnston, Daniel Rudnick, Robert Todd and others.
Package: ctd-python
CTD PythonPyhton interface to access data from The Comparative Toxicogenomics Database (CTD)installpip3 install ctd-pythonimport the package in order to pull the datafrom ctd import get_dataThe package offers the following resources as DataFramesGeneInteractionTypesChemicalPathwaysEnrichedGeneDiseaseGenePathwaysDiseasePathwaysChemocalPhenoTypeInteractionsChemicalsGenesChemicalGeneInteractionsChemicalsDiseasesGet the Gene Information for TNFgene_df = get_data('Genes')
tnf_df = gene_df[gene_df['GeneSymbol'] == 'TNF']Get Chemical Interactions for TNFchem_gene_df = get_data('ChemicalGeneInteractions')
tnf_chem_df = chem_gene_df[chem_gene_df['GeneSymbol'] == 'TNF']Get Disease Hierarchy for Parkinson Diseasechild_diseases = get_disease_hierarchy('MESH:D010300')
Package: ctds
cTDSis a full PythonDB API-2.0-compliant
SQL Server database library forLinux,Windows, andMac OS Xsupporting
both Python 2 and Python 3.The full documentation forcTDScan be foundhere.FeaturesSupportsMicrosoft SQL Server2008 and up.CompleteDB API-2.0support.Python 2.6, Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8, and Python 3.9 support.Bulk insert (bcp) support.Written entirely in C.DependenciesFreeTDSPythonSeeinstallation instructionsfor more information on installingFreeTDS.ReleasingPublishing new versions of the egg and documentation is automated using aGithub Actionsworkflow.
Official releases are marked using gittags. Pushing the
tag to the git remote will trigger the automated deployment. E.g.git tag -a v1.2.3 -m 'v1.2.3'
git push --tagsDocumentationGenerate documentation using the following:tox -e docs#Generatedtobuild/docs/Documentation is hosted onGitHub Pages.
As such, the source code for the documentation pages must be committed
to thegh-pagesbranch in
order to update the live documentation.DevelopmentLocal development and testing is supported on Linux-based systems runningtoxandDocker. Docker containers are used for running a local instance
ofSQL Server on Linux. OnlyDockerandtoxare required for running
tests locally on Linux or OS X systems.pyenvis recommended for managing
multiple local versions of Python. By default all tests are run against
the system version ofFreeTDS.GNU Maketargets are provided to make
compiling specificFreeTDSversions locally for testing purposes. For
example:#RuntestsagainstFreeTDSversion1.1.24make test-1.1.24Development and testing will require an instance ofSQL Server on Linuxrunning for validation. A script,./scripts/ensure-sqlserver.sh, is provided
to start aDockercontainer running the database and create the login used
by the tests.#Startadocker-basedSQLServerinstance.#Thedefaulttoxtargetswilldothisautomaticallyforyou.make start-sqlserver#Runtestsasneeded...#Stopthedocker-baseSQLServerinstance.make stop-sqlserverTestingTesting is designed to be relatively seamless usingDockercontainers
andSQL Server on Linux. Thepytestframework is used for running
the automated tests.To run the tests against the system version ofFreeTDSandPython,
use:toxGNU maketargets are provided for convenience and to provide a standard
method for building and installing the various versions ofFreeTDSused
in testing. Most targets are wrappers aroundtoxor replicate some
behavior in the CI/CD automation.To run the tests against an arbitrary version ofFreeTDS:#PythonX.Y&FreeTDSZ.ZZ.ZZmake test_X.Y_Z.ZZ.ZZTo run tests against all supported versions ofFreeTDSandPythonand additional linting and metadata checks:make checkValgrindvalgrindis utilized to ensure memory is managed properly and to detect
defects such as memory leaks, buffer overruns, etc. Becausevalgrindrequires Python is compiled with specific flags, aDockerfile is provided
tocompile Pythonas necessary to run the test suite undervalgrind.To run test test suite undervalgrind:make valgrind
Package: ctec-utils
Python version must be greater than 3.7.1Based on the packagepika>=0.13.1requests>=2.20.0DBUtils>=2.0cx_Oracle>=7.1.1redis-py-cluster>=1.3.4pymongo>=3.8.0pymysql>=0.9.3six>=1.12.0kafka-python>=1.4.6logstash-formatter>=0.5.17kombu>=5.0.2reStructuredText(rst) Quick start:https://www.jianshu.com/p/1885d5570b37To view more go to github
Package: ctef
Cayley tranform ellispoid fitting (CTEF)Python implementation of Cayley tranform ellipsoid fitting (CTEF).The main algorithm is in the ctef.py file.The main function is ctef in the ctef.py file.Basic usageGiven an n-by-p data matrix X with n the number of samples and p the dimension, the ellipsoid fitting isfit=ctef(X)Expanding ctef with all default arguments explicitly expressed,fit=ctef(X,k=None,w=0.5,w_axis=10,ellipsoid_dimensions=None,trr_params=None)The ctef function returns the following dictionary.{'center':avg+V@c,'Lambda':V@R.T@np.diag(1/a),'Lambda_inv':np.diag(a)@R@V.T,'result':result}For details see the ctef.py file and/or our paper.Simple exampleThis example is from the ellipsoid_gaussian.py file in the examples folder. See that file for parameter details.p,tau,axis_ratio,noise_level,n_samples=2,2,3,.01,50# generate data from Ellipsoid-Gaussian modeltruth=generate_truth(p,tau,axis_ratio)X=simulate_data(n_samples,noise_level,truth)# fit ellipsoid to data Xfit=ctef(X)Lambda=fit['Lambda']center=fit['center']Lambda and center yield the ellipsoid $\{\Lambda\eta+c : \lVert\eta\rVert=1\}$ fitted to X pictured below. Note simulate_data is random, so rerunning this code will produce different data and hence a different ellipsoid of best fit.Clusteringctef_clustering.py in the clustering folder implements our ellipsoid clustering algorithm. This algorithm is tested against other clustering algorithms on two toy examples in the compare.py file. Here is its output.
Package: cterasdk
A Python SDK for integrating with the CTERA Global File System API. Compatible with Python
3.5+.DocumentationUser documentation is available onRead the Docs.InstallationInstalling viapip:$pipinstallcterasdkIf you receive a certificate error, add the following trusted hosts:$pipinstallcterasdk--trusted-hostpypi.org--trusted-hostfiles.pythonhosted.org# [SSL: CERTIFICATE_VERIFY_FAILED]Installation via proxy:$pipinstallcterasdk--proxyhttp://user:password@proxyserver:port# use proxyInstall from source:$gitclonehttps://github.com/ctera/ctera-python-sdk.git$cdctera-python-sdk$pythonsetup.pyinstallImporting the LibraryAfter installation, to get started, open a Python console:>>>fromcterasdkimport*Building DocumentationDocumentation can be compiled by runningmake htmlfrom thedocsfolder. After compilation, opendocs/build/html/index.html.TestingWe use thetoxpackage to run tests in Python
3. To install, usepip install tox. Once installed, runtoxfrom the
root directory.$tox
Package: cterminal
Colored Terminal* Python support for colored text in terminalfromcterminalimport*your_fg_color=getfgfromrgb(r,g,b)your_bg_color=getbgfromrgb(r,g,b)"""@params for getfgfromrbg()/getbgfromrgb()- r, g, b:         Required, type(Int)"""cprint(style.RED+"test")"""@params for cprint()- string: 			Required (can be multiple strings)- separator: 		Optional, default is " "- end: 			Optional, default is "\n"- file:			Optional, default is sys.stdout- flush:			Optional, default is False"""cinput(style.RED+"test-input >> ")"""@params for cinput()- prompt:          Required (can be a string concatenate)"""# Only for Windowscmd.setname("name")# Set the window titlecmd.clear()# Clear the terminalcmd.showcursor()# Hide the cursorcmd.hidecursor()# Show the cursorcmd.startcursorblinking()# Start the cursor blinking modecmd.stopcursorblinking()# Stop the cursor blinking modecmd.createscreenbuffer()# Create a new screencmd.switchtomainscreenbuffer()# Switch to the main screencmd.movecursor(x,y)# Move the cursor to (x, y) coordinatescmd.printtoline(line,msg)# Print to the coordinates (line, 0)SupportedPlatformColorsTerminal ToolsWindowsYesYesLinuxYesNoQuick multilines printing examplefromcterminalimport*importtimecmd.clear()foriinrange(101):cmd.printtoline(1,"Progress: "+str(i)+"%")cmd.printtoline(2,"Duplicated progress: "+str(i)+"%")time.sleep(0.01)cmd.printtoline(3,"Complete")Builtin stylesForeground...BLACKBLACK_BRIGHTREDRED_BRIGHTGREENGREEN_BRIGHTYELLOWYELLOW_BRIGHTBLUEBLUE_BRIGHTMAGENTAMAGENTA_BRIGHTCYANCYAN_BRIGHTWHITEWHITE_BRIGHTBackground...BG_BLACKBG_BLACK_BRIGHTBG_REDBG_RED_BRIGHTBG_GREENBG_GREEN_BRIGHTBG_YELLOWBG_YELLOW_BRIGHTBG_BLUEBG_BLUE_BRIGHTBG_MAGENTABG_MAGENTA_BRIGHTBG_CYANBG_CYAN_BRIGHTBG_WHITEBG_WHITE_BRIGHTFont StyleBOLDUNDERLINEREVERSEDOutput ParamsRESET
Package: ctextinct
CT ExtinctThis program uses deep learning and a Cybersecurity dataset to
make Cyber Threats Extinct by educating employees on how to
recognise a threat, and the correct steps to take once identified.Installation'''pip install ctextinct'''How to use it?Sign into your company account or Anonymously. Ask the cyber chatbot
cyber security related questions. Use the buttons to navigate to
different features of the application including a section to find the
latest Cyber News that day, or a Cyber Security Incident or Feedback form.License(c) 2021 CT ExtinctThis repository is licenced under the MIT licence.
See LICENCE for details.
Package: ctf-announcement
SecSE CTF Announcement ToolThis is a simple commandline tool to quickly generate SecSE CTF announcements as markdown posts for usage on meta.Installation$ pip install ctf-announcement --upgradeUsageCallctf-announcementwith either the ID, the link or a substring of the title of an upcoming CTF. The tool will parse upcoming CTFs from CTFtime, and output a link to create the meta post and the markdown post body, e.g.:$ ctf-announcement hitc

29 upcoming CTFs found.
Here is the template for HITCON CTF 2018:

-- URL -------------------------------------------------------------------------
https://security.meta.stackexchange.com/questions/ask?title=HITCON+CTF+2018+%7C+Sat%2C+20+Oct+02%3A00+%E2%80%94+Mon%2C+22+Oct+02%3A00+UTC+%2848h%29&tags=ctf,discussion

-- Body ------------------------------------------------------------------------
Let's participate in the [HITCON CTF 2018](https://ctftime.org/event/669)!

- **Format:** Jeopardy
- **Duration:** 48h
- **Start:** Sat, 2018-10-20 02:00 UTC <sup>[(See other timezones)](https://www.timeanddate.com/worldclock/fixedtime.html?msg=HITCON+CTF+2018&iso=20181020T020000&ah=48)</sup>
- **Finish:** Mon, 2018-10-22 02:00 UTC
- **Official URL:** [https://ctf.hitcon.org/](https://ctf.hitcon.org/)
- **CTFtime URL:** [https://ctftime.org/event/669](https://ctftime.org/event/669)
- **Rating weight:** 98.32 <sup>[(?)](https://ctftime.org/faq/#weight)</sup>
- **Organizers:** [217](https://ctftime.org/team/5160), [HITCON](https://ctftime.org/team/8299)
- **Event series:** [HITCON CTF](https://ctftime.org/ctf/79)

General info:

- We compete as team [secse](https://security.meta.stackexchange.com/q/1117/).
- We communicate over [Slack](http://sec-ctf.slack.com/). To get an invitation
  to the workspace you can contact any active team member. (We will need to
  know an email address to send the invitation to and a reference to your
  Security.SE profile.)
- For questions, join us in the [public chat room](https://chat.stackexchange.com/rooms/151/the-dmz).

Good luck everyone!
--------------------------------------------------------------------------------
Package: ctf-architect
CTF-ArchitectA tool for managing challenges for CTFs.NOTE: this tool is still a work in progress, bugs are to be expected.I'm just a single person making this tool, so please be patient. 😇InstallationNote: This tool only supports python 3.10 and above.Installing from PyPITo install from PyPI, run the following command:# Linux and MacOSpython3-mpipinstallctf-architect# Windowspy-3-mpipinstallctf-architectNOTE: If the above command produces an error during installation, try running the command in a terminal with administrator privileges.Installing from sourceGit clone the repository, and pip install itgitclonehttps://github.com/Jus-Codin/CTF-ArchitectcdCTF-Architect# Linux and MacOSpython3-mpipinstall.# Windowspy-3-mpipinstall.If the installation is successful, you should be able to run the following commands:ctf-architect--help

chall-architect--helpIf, after installation, you get an error saying that the command is not found, you may need to add the python scripts folder to your PATH environment variable.UsageCreating a new challenge collectionTo create a new CTF challenge collection, run the following command:ctf-architectinitFollow the prompts to create a new challenge collection.Packaging a challenge for submissionTo package a challenge for submission, run the following command:chall-architectFollow the prompts, and a folder will be created with the packaged challenge in your current directory.⚠️ Warning ⚠️This command will overwrite any files you have if they have the same name as the challenge you are packaging.
Package: ctfbe
CTFBE (codes texts files big data encrypted)A simple project to encrypt data and files. This program encrypts any type of file, whatever its size. Nothing can be decrypted without the password.Installation:pip install ctfbe==1.0.2Usage:fromctfbeimportctfbeExamples:fromctfbeimportctfbe#to encrypt:ctfbe("<THE_PATH_TO_THE_FILE_TO_BE_ENCRYPTED>").encode(passw="<PASSWORD>")#to decode:ctfbe("<THE_PATH_TO_THE_FILE_TO_BE_DECRYPTED>").decode(passw="<PASSWORD>",key_path="<KEY_FILE_PATH>")Changelog:## 1.0.2
 - Cancel the second level of encryption to increase speed.
## 1.0.1
 - Fix bugs.
## 1.0.0
 - First public release.BTC : 16mUJYXdNh9VkjN3MQawA8wvYJqL9F5CKZ
Package: ctfcicd
ctf-cicdProgram to deploy automatically CTF challenges in CTFD.
This tool tries to answer the limitations of ctfcli, when you use it for continuos deployment. The settings are passed to the program using environment variables and there is no need to have config files in the repository.The majority of the features are implemented using ctfcli and also inpired by the blogpost fromRohan Mukherjee.Running and configure this toolctf-cicddeploys all challenges (challenge.yml) that are detected in the current directory or any of its subfolders. To define challenges, they must respect thectfcli specification.Installation$ pip3 install .Running$ ctfcicdSettingsCTFD_TOKEN: CTFd Admin Access Token (ex. d41d8cd98f00b204e9800998ecf8427e)CTFD_URL: CTFd instance URL (ex.https://demo.ctfd.io)DEPLOY_HOST: URI of the method that you want to use to deploy your dockerized challenge (More info).DEPLOY_NETWORK: Optional variable to specify to which network you want the container attached.
Package: ctfdfetch
CTFd FetchOften it would be nice to download all the challenges (descriptions/files/etc)
from a CTF so that you have them for future reference, or to have offline, or to
share with a team.That's all this script does.Since many CTFs have standardized aroundCTFdas a platform, we use that as
a starting point.CaveatsUse this tool considerately. It makes every attempt to respond sanely, and
only download things not already downloaded, but make sure you are not abusing
the good will of a CTF Host/Organizer.This tool primarily uses the JSON response from a CTFd endpoint (/challs).
Any changes to CTFd have the potential to break this tool.Quick StartInstall.pip3 install ctfdfetchDownload all the challenges from a CTF into the current folder.ctfdfetch --server https://ctf.example.com --user hackerFor more options such as out directory, nested categories, verbosity, etc).ctfdfetch -hDevelopmentDevelopment occurs onmaster. Thereleasebranch has the version currently
pushed to pypi.# get code
git clone https://gitlab.com/royragsdale/ctfdfetch.git
cd ctfdfetch

# setup virtualenv
python3 -m venv venv3
. venv3/bin/activate

# install in dev mode
pip install -e .
Package: ctfi2
CTFd Interface 2 (ctfi2)Table of ContentsCTFd Interface 2 (ctfi2)DescriptionChange LogLimitationsInstallationRequirementsCross-platform From PIPLinux From SourceDescriptionctfi2 is a management tool forCTFdServer instance(s).Key Features:Handsome Graphical User Interface!Add and Remove configuration objects (Users, Challenges, Flags, Hints, Files) in real time.Import Users from CSV or bulk create generic ones.Manage multipleindependentCTFd instances simultaneouslyChange LogVersion 1.5.4 (Acceptable Axolotl)NewPublished package to pypi.org for easy pip installationUpdateREADME.mdVersion 1.5 (Acceptable Axolotl)NewServer Level Functionality: Initialize, Reset and Wipe CTFd Instances!New"Documentation"UpdateReadmeUpdateSquished a bug in the file handler that saved challenge files to funky pathsVersion 1.0 (Acceptable Axolotl)Initial ReleaseTODO:DocumentationReduce the volume of tastey spaghetti!Inuitive, msfconsole-esq, Command Line ModeImport/Export of configuration dataLimitationsThe system is unable to init, reset or wipe an existsing CTFd instance at this time.(Fixed as of v1.5)Installationctfi2 has been tested on:Ubuntu 20.04 LTSDebian BusterRequirementsPython >= 3.6 (64-bit)Requests >= 2.22.0PyQt5 >= 5.9.2Cross-Platform From PIPpip3 install ctfi2Linux From SourceClone the repogit clone https://github.com/drpresq/ctfcli2Install using setuptoolspip3 install -r ./ctfi2/requirements.txt 
pip3 install ./ctfi2Run it!:ctfi2
Package: ctfile
Thectfilepackage is a Python library that facilitates reading and writing
ofCTfileformats.CTfilestands forChemical Table filewhich is a family of text-based chemical
file formats and is used to describe chemical molecules and reactions.Thectfilepackage provides ability to parse various chemical table file formats
(CTfileformats), currentlymolfileandSDfile.Linksctfile @GitHubctfile @PyPIInstallationThectfilepackage runs under Python 2.7 and Python 3.4+. Usepipto install.Install on Linux, Mac OS Xpython3-mpipinstallctfileInstall on Windowspy-3-mpipinstallctfileQuickstart>>>importctfile>>>>>>withopen('path/to/ctfile','r')asinfile:>>>ctf=ctfile.load(infile)>>>TODOAdd support for versionV3000reading  ofCTfileformatted files.Add command-line interface.Add ability to convert betweenV2000andV3000syntax.Add proper package documentation.LicenseThis package is distributed under theBSDlicense.
Package: ctf-stockobjects
stockobjectsA simple set of objects for representing stock and sector objects in Python.Learning intentionPackaging my own reusable modulesWorking towards mastery of OO in Python - more advance scoping, testing, inversion of control, dunder methodsMore advanced testing approachestodoMore testingUse mockingAdditional validation for dates and checking that exceptions are raised in all edge casesMoving from dict to custom objects for quote collections so that I can use built-in methods via dunders and type hinting for how to interact (dicts provide no hints)UsageData structureSectorCollection object contains 0:m Sector objects
Sector object contains 0:m SectorQuote objects
Sector object contains 0:m Company objects
Company object contains 0:m CompanyQuote objectsExamplesInstantiate the SectorCollection.  A better name (todo!) would be Market instead of SectorCollectionmy_collection = SectorCollection(name="My first collection")Instantiate a sector to add to the SectorCollectionmy_sector = Sector(sector_name="Fruit sector", sector_code="xbf")
my_collection.add_sector(my_sector)Instantiate a company and add it to the sectormy_company = Company(company_name="Banana company", company_code="ban", sector_object=my_sector)
my_collection.get_sector(my_sector.sector_code).add_company(my_company)From here, instantiate SectorQuotes and Company quotes
And then start querying them