Saravanan666/pypi-org huggingface dataset:
Package: pyf.splitter
Introductionpyf.splitter is a fully independent module that can be used with pyf or in
any other projet. It does not have dependencies on pyf.PurposeThe splitter purpose is simple and will stay so. It gives you an abstraction
above a data flow (or any python iterable) and gives the illusion of
manipulating in memory iterables when in fact everything is serialized on disk
to avoid memory consumption.The second and last purpose is to split (hence the name) your data flow
according to some simple rules. Splitting is at the very least important
to be able to store huge data chunks on disk without hitting file systems
limitations (ever tried to store 600Gb files on a fat file system?)It is important to note that we do not encapsulate (ie: hide) the bucket
files. The splitter gives you the bucket file names it produced, you then
use another function to read the files into another stream.Running testsTo run tests you need to install tox:pip install toxand then just launch tox if you want the whole test suite, ie python2.7,
python3.4 and pep8.If you want to only run only kind of test (ie: python2.7 only) you can specify
it like so:tox -e py27all defined test envs are defined in the tox.ini fileChangesOct 9 2015, version 3.1Version 3.0 introduced python3 support and version 3.1 is a bugfix release
to add more sane defaults in the separator. (The datetime objects were not
serializable using the python3 version with the default separator)
Package: pyfspot
https://github.com/leplatrem/pyfspotpyfspot is a python application which allows you to perform and scriptoperations on your F-Spot (http://f-spot.org) photo collection.The command-line application allows you to query your collection (tags, paths),modify photos attributes (ratings, tags), and diagnostic problems (find missing on disk etc.)But you can also build your own script using pyfspot modules.=======INSTALL=======pyfspot requires:* sqlalchemy* pexif* fixtures (optional)System-wide installation------------------------$ sudo python setup.py installVirtualenv installation-----------------------$ virtualenv env$ cd env$ source bin/activate$ python setup.py install=====USAGE=====f-spot-admin [options]Options:-h, --help            show this help message and exit--database=DATABASE   Path to F-Spot database--log-level=LOG_LEVELLogging level for messages (1:debug 2:info, 3:warning,4:errors, 5:critical)Queries:--find-path=FIND_PATHFind by path--find-tag=FIND_TAGFind by tag--find-missing      Find photos missing on diskActions:--list              List photos matching set--rating=RATING     Change rating--safe-rating       Change rating only if superior to current--tag=TAG           Apply specified tag--untag=UNTAG       Remove specified tagExamples--------List all photos of database:f-spot-admin --listFind all photos on a specific partition:f-spot-admin --find-path="/media/ext-disk/*" --listRate all photos with tag "family" with "canon" in file paths:f-spot-admin --find-tag="family" --find-path="*canon*" --rating=2Tag and rate all photos whose path contains "selecta":f-spot-admin --find-path="*selecta*" --tag="selection" --rating=1Remove tag on all photos which are missing on disk:f-spot-admin --find-missing --untag="Family"=======AUTHORS=======* Mathieu Leplatre <contact@mathieu-leplatre.info>=======LICENSE=======* Lesser GNU Public License=========CHANGELOG=========0.3---* Fix command-line actions0.2---* Ability to find missing photos on disk* Ability to add/remove tag from command-line* Fix encoding of paths in database* Fix command-line args0.1---* Initial version. Basic wiring of code and logics. Does basic path and tag search.
Package: pyfst
A Python interface for theOpenFstlibrary.Documentation:http://pyfst.github.ioSource code:https://github.com/vchahun/pyfstExample usage:import fst

t = fst.Transducer()

t.add_arc(0, 1, 'a', 'A', 0.5)
t.add_arc(0, 1, 'b', 'B', 1.5)
t.add_arc(1, 2, 'c', 'C', 2.5)

t[2].final = 3.5

t.shortest_path() # 2 -(a:A/0.5)-> 1 -(c:C/2.5)-> 0/3.5
Package: pyfstab
MIT-licensed libary for parsing and creating fstab filesFeaturesUnlike Canonical’s fstab Python library, this actually works with Python 3
and does not have a cancerous license (GPLv3)SmallInstallationpip3 install pyfstabExamples# Import the classesfrompyfstabimportFstab# Read the filewithopen("/etc/fstab","r")asf:fstab=Fstab().read_file(f)# List all devices/identifiers of fstab entriesforentryinfstab.entries:print(entry.device)# List all mountpoints of CIFS mountsforentryinfstab.entries_by_type["cifs"]:print(entry.dir)# Print filesystem type for mount at /mnt/diskprint(fstab.entry_by_dir["/mnt/disk"].type)# List all mount options for device UUID=123456forentryinfstab.entries_by_device["UUID=123456"]:print(entry.options)# Print Tag value for all entries with device defined as# UUID=something or ID=somethingforentryinfstab.entries:ifentry.device_tag_typein{"UUID","ID"}:print(entry.device_tag_value)# Change device tag type from UUID= to ID=entry.device_tag_type="ID"# Change device tag value from "123456" to "4321"# (Changes from "ID=123456" to "ID=4321")entry.device_tag_value="4321"# Print new device string (it's "ID=4321" now)print(entry.device)# Set both tag type and value at the same time in both valid waysentry.device=("UUID","11223344")entry.device="UUID=11223344"# Add an entry (does not update entries_by_device/type/dir)# but it will be printed when formatting the fstab objectfstab.entries.append(Entry("/dev/sdg4","/mnt/disk","ext4","rw,relatime",0,0))# Remove all entries except ext*fstab.entries=[entryforentryinfstab.entriesifentry.type.startswith("ext")]# Print and write the formatted fstab fileformatted=str(fstab)print(formatted)withopen("/etc/myfstab","w")asf:f.write(formatted)ContributingSend any issues to GitHub’s issue tracker.Before sending a pull request, format it withBlack(-Sl79)Any changes must be updated to the documentationAll pull requests must be tested with tox (if you are using pyenv, add the installed versions for py35-py38 and pypy3 to .python-version at the root of this repository before running tox)
Package: pyf.station
Introduction============PyF.Station is a protocol with client and server to transfer python generators accross tcp networks. Items in the generator must be pyf.transport.Packet instances.Best practice is to provide information about the flow in the first packet, identified as an header (containing for example authentication data, method, target, and so on).Errors are passed on both ends.Server------Please note that the server requires tgscheduler (to spawn tasks, passing generators) and twisted.An example::from twisted.internet import reactorfrom pyf.station import FlowServerdef sample_handler(flow, client=None):header = flow.next()print headerfor i, item in enumerate(flow):if not i%50:print i, itemprint "end of flow..."client.success("Done")factory = FlowServer(sample_handler)reactor.listenTCP(8000,factory)reactor.run()The handler can be a simple callable, as in the example above, or a user defined class:from twisted.internet import reactorfrom pyf.station import FlowServerclass SampleHandler(object):def __init__(self, flow, client):# The __init__ method must accept 'flow' and 'client' paramsself.flow = flowself.client = clientdef handle_data(self):# This method will be called by the FlowServerheader = self.flow.next()print headerfor i, item in enumerate(self.flow):if not i%50:print i, itemprint "end of flow..."self.client.success("Done")factory = FlowServer(SampleHandler)reactor.listenTCP(8000,factory)reactor.run()Another example, if you are in an already threaded env (like a wsgi server)::from tgscheduler import schedulerfrom twisted.internet import reactorfrom pyf.station import FlowServerfrom pyf.transport import Packetdef sample_handler(flow, client=None):header = flow.next()print headerfor i, item in enumerate(flow):# every 50 items...if not i%50:print i, item# we send a message to the clientclient.message(Packet({'type': 'info','message': 'hello ! (%s)' % i}))print "end of flow..."client.success("Done")factory = FlowServer(sample_handler)reactor.listenTCP(8000,factory)scheduler.add_single_task(reactor.run,kw=dict(installSignalHandlers=0),initialdelay=0)# You cloud comment these lines if you were in wsgi applicationscheduler.start_scheduler()while True:passClient------Example of client::from pyf.station import StationClientfrom pyf.transport import Packetclient = StationClient('127.0.0.1', 8000, True)def message_handler(message_packet):# the handler for messages that come back from the serverprint "Message handler triggered: %s" % message_packet# we register our callbackclient.add_listener('message_received', message_handler)# we generate sample packetsflow = (Packet(dict(Field1=i+1,Field2=('titi', 'tata')[i%2], num=i+1,Field3=(i+1)*10))for i in range(10000))values = client.call(flow,header=dict(authtkt='my false auth token :)',action='my_action'))# here values is either "True" (saying that message has passed well) or a packet, comming back from the server.for i, value in enumerate(values):if not i % 5000:print iif isinstance(value, Packet):print value
Package: pyft232
pyft232This module provides a simple Serial-Like interface to FT232 chips while still
allowing access to the CBUS pins for controlling simple signals.Ctypes is used to interface with either FTDI's d2xx library (when available)
or libftdi. In this way this package works on both Windows and Linux (and other
libftdi supported OS's) without needing to mess with the FTDI drivers on windows.In contrast, pyftdi is more feature rich and also cross platform but requires
special drivers on windows so you can't also use the FTDI chip as a pure
COM port.Usageimportft232serial_number="FT1234"try:sp=ft232.Ft232(serial_number,baudrate=115200)exceptft232.Ft232Exception:print("Unable to open the ftdi device:%s"%serial_number)sys.exit(1)#You may use sp as you would a Serial objectsp.write(b"Hello World!\n")resp=sp.read(100)#If you want to use the CBUS pins, you enable them with cbus_setup# 'mask' is a bitmask which specifies which pins to enable# 'init' is a bitmask for the initial value for each pinsp.cbus_setup(mask=3,init=3)#Change the current value of all setup pinssp.cbus_write(2)#Print the current value of all setup pinsprint("CBUS:%s"%sp.cbus_read())
Package: pyftdi
DocumentationThe latest PyFtdi online documentation is always available fromhere.Beware the online version may be more recent than the PyPI hosted version, as
intermediate development versions are not published toPyPi.PyFtdi documentation can be locally build with Sphinx, see the installation
instructions.Source codePyFtdi releases are available from the Python Package Index fromPyPi.PyFtdi development code is available fromGitHub.OverviewPyFtdi aims at providing a user-space driver for popular FTDI devices,
implemented in pure Python language.Supported FTDI devices include:UART and GPIO bridgesFT232R (single port, 3Mbps)FT230X/FT231X/FT234X (single port, 3Mbps)UART and multi-serial protocols (SPI, I2C, JTAG) bridgesFT2232C/D (dual port, clock up to 6 MHz)FT232H (single port, clock up to 30 MHz)FT2232H (dual port, clock up to 30 MHz)FT4232H (quad port, clock up to 30 MHz)FT4232HA (quad port, clock up to 30 MHz)FeaturesPyFtdi currently supports the following features:UART/Serial USB converter, up to 12Mbps (depending on the FTDI device
capability)GPIO/Bitbang support, with 8-bit asynchronous, 8-bit synchronous and
8-/16-bit MPSSE variantsSPI master, with simultanous GPIO support, up to 12 pins per port,
with support for non-byte sized transferI2C master, with simultanous GPIO support, up to 14 pins per portBasic JTAG master capabilitiesEEPROM support (some parameters cannot yet be modified, only retrieved)Experimental CBUS support on selected devices, 4 pins per portSupported host OSesmacOSLinuxFreeBSDWindows, although not officially supported
Package: pyftdi-bitbang
pyftdi-bitbangBit-bang protocol support forPyFtdi.This package adds SPI protocol support for FT232 devices without MPSSE
(e.g. FT232RL) by using the bit-bang mode based on asynchronous
or synchronous GPIO driver.UsageRefer totests/for code examples.The library supports the following baud rates:in async mode: 57600..921600; only standard baud rates can be used (115200, 230400, etc.)in sync mode: 500..2000000; try to stick with "even" rates (aligned to thousands)SPIThe library provides a subclass ofSpiControllercalledBitBangSpiControllerwhich can be used as a drop-in replacement. It doesn't support features like CPOL/CPHA
but should be enough for most applications.Creating the object requires a GPIO controller:GpioAsyncControllerfor fully software-driven
bit writing, orGpioSyncControllerto use a (much faster) transaction-based GPIO control.Example of reading SPI flash ID:frompyftdi.gpioimportGpioSyncControllerfrompyftdibb.spiimportBitBangSpiControllergpio=GpioSyncController()spi=BitBangSpiController(gpio=gpio)spi.configure("ftdi:///1",frequency=1_000_000)port=spi.get_port(cs=0)# half-duplex modeflash_id=port.exchange(b"\x9F",readlen=3,duplex=False)# full-duplex mode (no benefit here, just an example)flash_id=port.exchange(b"\x9F",readlen=4,duplex=True)flash_id=flash_id[1:]Example usage withPySpiFlash:frompyftdi.gpioimportGpioSyncControllerfrompyftdibb.spiimportBitBangSpiControllerfromspiflash.serialflashimportSerialFlashManagergpio=GpioSyncController()spi=BitBangSpiController(gpio=gpio)spi.configure("ftdi:///1",frequency=1_000_000)flash=SerialFlashManager.get_from_controller(spi)data=flash.read(0,0x1000)LicenseMIT
Package: pyftdiwin
PyFtdiDocumentationThe latest PyFtdi online documentation is always available fromhere.Beware the online version may be more recent than the PyPI hosted version, asintermediate development versions are not published toPyPi.PyFtdi documentation can be locally build with Sphinx, see the installationinstructions.Source codePyFtdi releases are available from the Python Package Index fromPyPi.PyFtdi development code is available fromGitHub.OverviewPyFtdi aims at providing a user-space driver for popular FTDI devices,implemented in pure Python language.Supported FTDI devices include:UART and GPIO bridgesFT232R (single port, 3Mbps)FT230X/FT231X/FT234X (single port, 3Mbps)UART and multi-serial protocols (SPI, I2C, JTAG) bridgesFT2232C/D (dual port, clock up to 6 MHz)FT232H (single port, clock up to 30 MHz)FT2232H (dual port, clock up to 30 MHz)FT4232H (quad port, clock up to 30 MHz)FeaturesPyFtdi currently supports the following features:UART/Serial USB converter, up to 12Mbps (depending on the FTDI devicecapability)GPIO/Bitbang support, with 8-bit asynchronous, 8-bit synchronous and8-/16-bit MPSSE variantsSPI master, with simultanous GPIO support, up to 12 pins per port,with support for non-byte sized transferI2C master, with simultanous GPIO support, up to 14 pins per portBasic JTAG master capabilitiesEEPROM support (some parameters cannot yet be modified, only retrieved)Experimental CBUS support on selected devices, 4 pins per portSupported host OSesmacOSLinuxFreeBSDWindows
Package: pyFtest
=====Ftest=====Introduction------------pyFtest is a pure Python library designed to auto-test for secondary development base on FREESWITCH.You can use Ftest to auto-test for secondary development base on FREESWITCH easy.In `/scripts <https://github.com/sudaning/Ftest/tree/master/scripts>`_ , there are some scripts written by me for daily use.Installation------------1. Via pip(recommend)::pip install pyFtest2. Via easy_install::easy_install pyFtest3. From source::python setup.py install
Package: pyftext
Description :The pyftext module converts your words to Ascii. You can draw Pyramid shapes at any height you want.Installation :pip install pyftextHow to UsePyramid Arguments :Piramit(karakter, height, yazi)
karakter	The character to use when creating the shape.
height		Height of the Pyramid
yazi		  Writing in the middle of the created Pyramid
------
full_pyramid()	Full Pyramid
half()		      Half Pyramid 
double()	      Double Half PyramidText Arguments :Text(text, karakter, fontsize)
text		  The text you want to be created
karakter	Character to use when creating the shape
fontsize	Size of the figure (Default 15)
------
yaz()		  Writes text to the screen
rastgele()	Random font assignmentExamplesRandom TextfrompyftextimportTextmetin=Text(text="YAZILIM  FURYASI",karakter='@',fontsize=10)metin.rastgele()OUTPUT:@   @   @@@@@@ @  @    @  @@     @        @@@@ @   @  @@@  @    @   @     @@@@ @
@   @  @ @      @  @  @    @  @@@   @@        @    @   @  @  @  @   @  @ @   @     @
@@ @   @ @     @   @  @    @  @ @   @@        @    @   @  @  @  @@ @   @ @   @     @
 @ @   @ @     @   @  @    @  @ @  @ @        @    @   @  @  @   @ @   @ @    @@   @
  @   @   @   @    @  @    @  @ @@ @ @        @@@@ @   @  @@@     @   @   @     @  @
  @   @@@@@  @     @  @    @  @  @ @ @        @    @   @  @  @    @   @@@@@      @ @
  @  @     @@      @  @    @  @  @@  @        @    @   @  @  @    @  @     @ @   @ @
  @  @     @@@@@@@ @  @@@@ @  @   @  @        @     @@@   @   @   @  @     @  @@@  @Default TextfrompyftextimportTextmetin=Text(text="YAZILIM  FURYASI",karakter='#',fontsize=10)metin.yaz()OUTPUT:#   #    #    ####  #  #     #  #     #        ####  #   #  ####   #   #    #     ###   #
 #   #   # #      #  #  #     #  ##   ##        #     #   #  #   #  #   #   # #   #   #  #
  # #    # #     #   #  #     #  ##   ##        #     #   #  #   #   # #    # #   #      #
   #    #   #   #    #  #     #  # # # #        ####  #   #  ####     #    #   #   ###   #
   #    #####   #    #  #     #  # # # #        #     #   #  #  #     #    #####      #  #
   #    #   #  #     #  #     #  #  #  #        #     #   #  #  #     #    #   #  #   #  #
   #   #     # ####  #  ####  #  #  #  #        #      ###   #   #    #   #     #  ###   #PyramidsfrompyftextimportPiramitpiramit=Piramit(karakter="#",height=10)piramit.full_pyramid()piramit.double()piramit.half()OUTPUT:#
        ###        
       #####       
      #######      
     #########     
    ###########    
   #############   
  ###############  
 ################# 
###################
         #  #      
        ##  ##     
       ###  ###    
      ####  ####   
     #####  #####  
    ######  ###### 
   #######  #######
  ########  ########
 #########  #########
##########  ##########
         #
        ##
       ###
      ####
     #####
    ######
   #######
  ########
 #########
##########
Package: pyftg
pyftgAn interface for implementing python AI in DareFightingICENote:Version 2.0 is the latest version compatible with the legacyFightingICE. Future versions will only supportDareFightingICE-Unity.First, installpyftgwith pip.pip install pyftgInitiateGatewayfor connecting to DareFightingICE platform.from pyftg.gateway import Gateway
gateway = Gateway(port=50051)Construct an agent and register it to gateway and then run the game by using following code.agent = KickAI()
gateway.register_ai("KickAI", agent)
gateway.run_game(["ZEN", "ZEN"], ["KickAI", "MctsAi23i"], 1)After all the process are done, please also close the gateway.gateway.close()
Package: pyftpclient
FTP client wrapperpyftpclient is a library that is made to make work with FTP/SFTP simple. it has the common functions that you would use when working with a regular file system, like open a file listdir, and glob, delete file or directory. It also has funcitons to simple download/upload of the files and directories from/to remote drive. The library takes care about opening and closing the sessions, so you don't have to worry about itSFTPClient examplefrom pyftpclient.sftp_client import SFTPClient

connection_config = {
    'hostname': '127.0.0.1',
    'username': 'viewonly',
    'password': 'viewonly'
}


with SFTPClient(**connection_config) as sftp:
    print(sftp.listdir('/')
    sftp.download_file('/home/src_file'), '~/dst_file')
    sftp.download_tree(src_dir, dst_dir)FTPClient examplefrom pyftpclient.ftp_client import FTPClient

connection_config = {
    'hostname': '127.0.0.1',
    'username': 'viewonly',
    'password': 'viewonly'
    'port': 21
}


with FTPClient(**connection_config) as ftp:
    print(ftp.listdir('/')
    ftp.download_file('/home/src_file'), '~/dst_file')
    ftp.download_tree(src_dir, dst_dir)
Package: pyftpdlibsqladdon
pyftpdlibsqladdonModule for implementing FTP users in pyftpdlib through a SQL serverInstallationpip install pyftpdlibsqladdonGet startedHow to start pyftpdlib with user support via SQLfrompyftpdlib.handlersimportFTPHandlerfrompyftpdlib.serversimportFTPServerfrompyftpdlibsqladdonimportDummySqlAuthorizerdefmain():#define DummySqlAuthorizerauthorizer=DummySqlAuthorizer()#add SQL server configurationauthorizer.add_sql_config('host_ip','database','sql_user','sql_password')#add SQL column names where data is storedauthorizer.add_sql_query('table','user_column','password_column','home_path_column','permission_colum')handler=FTPHandlerhandler.authorizer=authorizerserver=FTPServer(('',21),handler)server.serve_forever()if__name__=="__main__":main()ConsiderationsThis authorizer cannot be used in conjunction with DummyAuthorizer, as it overwrites the virtual table of users with those obtained from the database.
Package: pyftpdlib-zipreaderfilesystem
## pyftpdlib_zipreaderfilesystempyftpdlib abstracted_fs for reading zip entries.### InstallationI’m not planning to upload this mess to pypi, use git.` pip installgit+https://github.com/cielavenir/pyftpdlib_zipreaderfilesystem.git`### Sample` python-mpyftpdlib_zipreaderfilesystem [zip_filename] `
Package: py-ftp-receiver
Ftp ReceiverChecks existing files in output directory.List files in root directory on FTP server.Downloads all files which filename is not present in the output directory.After each file download, publish an event to Kafka with the name of the downloaded file.ConfigurationThe application is configured via environment variables. Seeexample.env.DevelopmentFor help getting started developing checkDEVELOPMENT.md
Package: pyftpsync
pyftpsyncSynchronize directories using FTP(S), SFTP, or file system access.SummarySynchronize directories using FTP(S), SFTP, or file system access.This is a command line tool...... and a library for use in your Python projects.Upload, download, and bi-directional synch mode.Allows FTP-to-FTP and Filesystem-to-Filesystem synchronization as well.Architecture is open to add other target types.Note:Version 4.0 drops support for Python 2.QuickstartPython3.7+ is required,piprecommended:$pipinstallpyftpsync--upgrade
$pyftpsync--helpSeeCommand Line Interfacefor details.In addition to the direct invocation ofupload,download, orsynccommands, version 3.x allows to define apyftpsync_yamlfile
in your project's root folder which then can be executed like so::$ pyftpsync runSeeRun from pyftpsync.yamlfor details.Note:Windows users may prefer theMSI Installer.DocumentationRead the Docsfor details.
Package: pyftpsync-s3
Amazon S3 synchronisation target for pyftpsyncAllows to copy remote FTP files and immediately upload
to S3 bucket as soon as each individual file is downloaded.Installation>>>pipinstall-Upyftpsync-s3UsageS3Target() is a drop in replacement for FsTarget(). Use examples in pyftpsync documentation.
Initialize S3Target() with boto3 s3 client and bucket name.>>>frompyftpsyncs3.s3targetimportS3Target>>>local=S3Target(root_dir="/abc/",extra_opts=dict(s3=boto3s3client,bucket='test'))BugsFTP to S3 is supported. S3 to FTP is not implemented yet.