Saravanan666/pypi-org huggingface dataset:
Package: pydf2json
This code was written so that I could do more detailed analysis of PDF documents, on the fly and incorporate it into a security stack. “On the fly” is key. PyDF2JSON simply creates a json structure out of PDF documents. It breaks a PDF document down into all its individual parts, and retains those parts for analysis. Once this is done, a more detailed analysis should be possible.InstallationClone the repo and use it. Optionally, run python setup.py build/install to make the pydf2json module importable by all the things. You can also use pip install [–upgrade] pydf2jsonUsage> pydf.py
  usage: pydf.py [-h] [-d LOCATION] [-s MAX_SIZE] [-p PASSWORD] [--no_summary]
                 [--show_json]
                 pdf

> pydf.py secure_dropbox.pdf -p 29576AE2
  Summary of PDF attributes:
  --------------------------

  Encrypted:                    True
  User Pass:                    None
  Key:                          030359FF89FC8A8EB764E97AD2ED7091
  Key Length:                   128 bits
  Algo:                         RC4

  Additional Actions:           0
  AcroForms:                    0
  Embedded Files:               0
  JS:                           0
  Launch:                       0
  Object Streams:               8
  OpenActions:                  0
  Pages:                        1

  URIs in document:
          http://<redacted>.xyz/sign-up/
          http://<redacted>.xyz/signup/

  Document Hashes:
          SHA1       8733CC6196C7F26F027078E6A51B822462DA2CA3
          SHA256     9D64D1EBA74F7078F5F524CCB4F79F3D41F1B7A631DE81D9FF2870FF5E4D2DFD
          MD5        0F49F102421C286E50CD40EBDDB105AFpydf.py calls the pydf2json module to convert the PDF into a json-style dict and then accesses the structure to create the summary you see above.
pydf2json.py can be called from your own programs withimport pydf2json.Error ReportingI am versed in the concept of OPSEC. If you have a PDF that this fails on / causes crash, Please send me the PDF in question if possible. No document sent to me will be shared with anyone at anytime and will be destroyed when I’m done testing with it. Archive it with a utility like 7Zip and encrypt it with the following password:fr74ed83e.dj#ifkkSend it tokingaling@meatchicken.netThe password is simply to keep PDF from being scanned by AV. :)My ReasonsThis code was inspired by my desire to have a pdf analysis module for the LaikaBOSS framework.
See:LaikaBOSSdeveloped by Lockheed Martin.
Package: pydfm
Copyright (c) 2010,2011,2015,2016 Jérémie DECOCK (http://www.jdhp.org)Web site:http://www.jdhp.org/projects_en.html#pydfmOnline documentation:http://pydfm.readthedocs.orgSource code:https://github.com/jeremiedecock/pydfmIssue tracker:https://github.com/jeremiedecock/pydfm/issuesPyDuplicateFileManager on PyPI:https://pypi.python.org/pypi/pydfmNote:This project is still in beta stage, so the API is not finalized yet.DescriptionPyDuplicateFileManager finds duplicated files and directories.PyDuplicateFileManager is written in Python and released under the MIT license.DependenciesPyDuplicateFileManager is tested to work with Python 3.4 under Gnu/Linux Debian
8 and Windows 7.
It should also work with Python 3.X under recent Gnu/Linux and Windows systems.
It hasn’t been tested (yet) on MacOSX and BSD systems.InstallationGnu/LinuxYou can install, upgrade, uninstall PyDuplicateFileManager with these commands
(in a terminal):pip install --pre pydfm
pip install --upgrade pydfm
pip uninstall pydfmOr, if you have downloaded the PyDuplicateFileManager source code:python3 setup.py installWindowsNote:The following installation procedure has been tested to work with Python
3.4 under Windows 7.
It should also work with recent Windows systems.You can install, upgrade, uninstall PyDuplicateFileManager with these commands
(in acommand prompt):py -m pip install --pre pydfm
py -m pip install --upgrade pydfm
py -m pip uninstall pydfmOr, if you have downloaded the PyDuplicateFileManager source code:py setup.py installDocumentationOnline Documentation:http://pydfm.readthedocs.orgAPI Documentation:http://pydfm.readthedocs.org/en/latest/api.htmlExample usageTODO…Bug reportsTo search for bugs or report them, please use the PyDuplicateFileManager Bug
Tracker at:https://github.com/jeremiedecock/pydfm/issuesLicensePyDuplicateFileManager is provided under the terms and conditions of theMIT License.
Package: pydfql
Python Display Filter Query LanguageA Wireshark-like display filter various data formats, including Python dictionaries, lists, objects, and SQL databases.Table of ContentsQuick Start1.1Installation1.2Initialization1.3Filtering DataExamplesAcknowledgementsQuick StartTo quickly get started follow the steps below:InstallationFirst, install the package using pip:pip3 install pydfqlInitializationNext, import the necessary module and initialize the appropriate display filter with some data.
In the example below we are initializing theObjectDisplayFilterwith a list of objects:fromdataclassesimportdataclassfrompydfqlimportObjectDisplayFilter@dataclassclassActor:name:listage:dictgender:stractors=[Actor(["Laurence","Fishburne"],{"born":"1961"},"male"),Actor(["Keanu","Reeves"],{"born":"1964"},"male"),Actor(["Joe","Pantoliano"],{"born":"1951"},"male"),Actor(["Carrie-Anne","Moss"],{"born":"1967"},"female")]df=ObjectDisplayFilter(actors)Filtering DataOnce the display filter is initialized, you can start filtering the data using thedisplay filter query language.
For example, let's filter the actors whose birth year is after 1960:filter_query="age.born > 1960"filtered_data=df.filter(filter_query)print(list(filtered_data))[Actor(name=['Laurence','Fishburne'],age={'born':'1961'},gender='male'),Actor(name=['Keanu','Reeves'],age={'born':'1964'},gender='male'),Actor(name=['Carrie-Anne','Moss'],age={'born':'1967'},gender='female')]You can also use more complex queries to filter the data.
For example, let's filter male actors born between 1960 and 1964 whose names end with "e":filter_query="gender == male and (age.born > 1960 and age.born < 1965) and name matches .*e$"filtered_data=df.filter(filter_query)print(list(filtered_data))This will output the filtered data:[Actor(name=['Laurence','Fishburne'],age={'born':'1961'},gender='male')]Overall, PyDFQL supports a wide range of features, including:Data Types:Dictionaries,Lists,Objects,SQLComparison Operators:==,!=,<=,<,>=,>,~=,~,&Combining Operators:and,or,xor,notMembership Operators:inTypes:Text,Number,Date & Time,Ethernet-,IPv4-,IPv6-AddressSlicing:Text,Ethernet-,IPv4-,IPv6-AddressFunctions:upper,lower,lenFor a detailed description of the individual features check out theUser Guide.ExamplesFor detailed examples of how the display filter can be utilized, please refer to the following:CSV Display FilterJSON Display FilterSQLite Display FilterNmap Display FilterAcknowledgementsThis project wouldn't be possible without these awesome projects:wireshark display filter: Display filter for filtering network packagesparameterized: Parameterized testing with any Python test frameworkpyparsing: Creating PEG-parsers made easyipranger: Parsing and matching IPv4-addressespython-dateutil: Parsing and comparing dates
Package: pydfs-lineup-optimizer
PYDFS-LINEUP-OPTIMIZERpydfs-lineup-optimizer is a tool for creating optimal lineups for daily fantasy sport.InstallationTo install pydfs-lineup-optimizer, simply run:$ pip install pydfs-lineup-optimizerSupportNow it supports following dfs sites:LeagueDraftKingsFanDuelFantasyDraftYahooFanBallDraftKings Captain ModeFanDuel Single GameDraftKings TiersNFL++++++++NBA++++-+++NHL++++-+++MLB++++-+++WNBA++---+--Golf++++----Soccer+--+-+--CFL+-------CFB+-------LOL-+---++-MMA++------NASCAR++------Tennis+-------CSGO+-------DocumentationDocumentation is available athttps://pydfs-lineup-optimizer.readthedocs.io/en/latestExampleHere is an example for evaluating optimal lineup for Yahoo fantasy NBA. It loads players list from "yahoo-NBA.csv" and select 10 best lineups.frompydfs_lineup_optimizerimportSite,Sport,get_optimizeroptimizer=get_optimizer(Site.YAHOO,Sport.BASKETBALL)optimizer.load_players_from_csv("yahoo-NBA.csv")forlineupinoptimizer.optimize(10):print(lineup)
Package: pydft
PyDFTPython based Density Functional Theory code for educational purposes. The documentation
of PyDFT can be foundhere.PurposeThis repository contains a working density functional code using a localized
Gaussian-type basis set and Becke grids for the numerical evaluation
of density functionals.InstallationThis code depends on a few other packages. To install this code and its
dependencies, run the following one-liner from Anaconda promptcondainstall-cifilotpydftpyqintpylebedevpytesselUsageCheck the current versionimportpydftprint(pydft.__version__)Performing a simple calculationfrompydftimportMoleculeBuilder,DFTCO=MoleculeBuilder().get_molecule("CO")dft=DFT(CO,basis='sto3g',verbose=True)en=dft.scf(1e-4)print("Total electronic energy:%fHt"%en)
Package: pydftools
pydftoolsA pure-python port of thedftoolsR package.This package attempts to imitate thedftoolspackage (repo:https://github.com/obreschkow/dftools) quite closely,
while being as Pythonic as possible. Do note that 2D+ models are not yet implemented in this Python port, and neither
are non-parametric models. Hopefully they will be along soon.Fromdftool’s description:This package can find the most likely P parameters of a D-dimensional distribution function (DF) generating
N objects, where each object is specified by D observables with measurement uncertainties. For instance, if the objects
are galaxies, it can fit a MF (P=1), a mass-size distribution (P=2) or the mass-spin-morphology distribution (P=3).
Unlike most common fitting approaches, this method accurately accounts for measurement is uncertainties and complex
selection functions. A full description of the algorithm can be found in Obreschkow et al. (2017).In short, clean out Eddington bias from your fits:Free software: MIT licenseDocumentation:https://pydftools.readthedocs.io.FeaturesSimple and fast parameter fitting for generative distribution functionsSeveral examples (with astronomical applications in mind)Several plotting routines so that you can go from nothing to a plot in minutesAmockdata()function which can produce data to fit.Support for arbitrary 1D models, several kinds of selection functions, jackknife and bootstrap resampling, Gaussian
error estimation and more.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2017-10-25)First release on PyPI.All basic examples working as expectedTravisCI, Readthedocs set up.Does not have multi-dimension support, or non-parametric support.
Package: pydfu
# pydfu[![Build Status](https://travis-ci.org/rrajaravi/pydfu.svg?branch=master)](https://travis-ci.org/rrajaravi/pydfu)Python Interface and cli for Disk and Filesystem Utils### RequirementsUnix/Linux Operating System### How to Use#### Installation$ git clone https://github.com/rrajaravi/pydfu.git$ cd pydfu$ python setup.py install#### Command Line$ pydfu --helpusage: pydfu [-h] [-s] [-d]Disk and FileSystem Utilsoptional arguments:-h, --help  show this help message and exit-s, --scan-d, --df$ pydfu --dfFileSystem    1K-blocks     Used          Avail         Use%          Mounted Onudev          3780128       0             3780128       0%            /devtmpfs         760264        17780         742484        3%            /run/dev/sda1     102049120     9684784       87157504      11%           /tmpfs         3801300       436           3800864       1%            /dev/shmtmpfs         5120          4             5116          1%            /run/locktmpfs         3801300       0             3801300       0%            /sys/fs/cgroupvmhgfs-fuse   249414652     134421324     114993328     54%           /mnt/hgfstmpfs         760264        76            760188        1%            /run/user/1000#### Libraryimport pydfudf = pydfu.df()# get list of file system objectdf.query()# query for a file system based on path and get file system objectfs = df.query_one(path='/')# query all file systems based on size and get matches in listfs = df.query(size='>10g')# query for a file system based on used sizefs = df.query_one(use='<100%')# query for a file system based on multiple conditionsfs = df.query_one(size='>10g', use='<50%')
Package: pydfuutil
PyDfuUtil - Pure python fork ofdfu-utilwrappers tolibusbTable of contentsIntroductionRequirementsInstallingTodosGetting helpAboutFootnotesIntroductionPyDFUUtilprovides for easy access to the devices that supportsDFUinterface over host machine'sUniversal Serial Bus (USB)system for Python 3.PyDFUUtilis an open realisation of originaldfu-utiland thin wrapper overlibusb(usesPyUsblibrary as a backend).Requirements and platform supportSincePyDFUUtiluses thelibusblibrary it has similar dependencies for usinglibusbIt uses pythonconstructlibrary for simple unpacking C-structs.PyDFUUtilprimarily tested on Linux and Windows,
but also can work on each platform wherePyUsbandconstructlibraries are available, including MacOSInstallingPyDFUUtilis generally installed through pip# the latest official release
python -m pip install pydfuutil

# install a specific version (e.g. 0.0.1b1)
python -m pip install pydfuutil==0.0.1b1TodosModules to implement:dfusemaindfu_load.PROGRESS_BAR -> rich.ProgressDone:dfudfu_filedfu_loadportablequirkssuffixusb_dfulmdfudfuse_memGetting helpTo report a bug or propose a new feature, use our issue tracker. But please search the database before opening a new issue.AboutDfu-util - Device Firmware Upgrade UtilitiesDfu-util is the host side implementation of theDFU 1.0andDFU 1.1specification of the USB forum.DFU is intended to download and upload firmware to devices connected over
USB. It ranges from small devices like micro-controller boards up to mobile
phones. With dfu-util you are able to download firmware to your device or
upload firmware from it.dfu-util has been tested with Openmoko Neo1973 and Freerunner and many
other devices.The official websiteDFU 1.0 specDFU 1.1 specFootnotesOn systems that still default to Python 2, replace python with python3Project is in develop, it fulls of not implemented statements that's not according to originaldfu-util!
Package: pydg1000z
Rigol DG1000Z arbitrary waveform generator Python library (unofficial)A simple Python library and utility to control Rigol DG1000Z arbitrary waveform generator. This library implements thefunctiongeneratorclass from
thelabdevicespackage which exposes the public interface.InstallingThere is a PyPi package that can be installed usingpip install pydg1000zSimple example to generate waveforms:importtimefrompydg1000zimport*fromlabdevices.scpiimportSCPIDeviceEthernetfromlabdevices.functiongeneratorimportFunctionGeneratorWaveformwithPYDG1000Z(address="10.0.0.124")asawg:awg.set_channel_enabled(0,True)awg.set_channel_enabled(1,True)awg.set_channel_frequency(0,600000)awg.set_channel_waveform(channel=0,waveform=FunctionGeneratorWaveform.SINE)awg.set_channel_waveform(channel=1,waveform=FunctionGeneratorWaveform.SINE)awg.set_channel_amplitude(0,5.0)awg.set_coupling(True)awg.set_channel_frequency(0,1000)time.sleep(10)awg.set_channel_frequency(0,10000)print("Press Key to switch off")input()awg.set_channel_enabled(0,False)awg.set_channel_enabled(1,False)Supported waveformsFunctionGeneratorWaveform.SINE : Set the waveform of the specified channel to sine waveform with the specified frequency, amplitude, offset and phaseFunctionGeneratorWaveform.SQUARE : Set the waveform of the specified channel to square waveform with the specified frequency, amplitude, offset and phase.FunctionGeneratorWaveform.RAMP : Set the waveform of the specified channel to ramp waveform with the specifiedfrequency, amplitude, offset and phase.FunctionGeneratorWaveform.TRGL : Set the waveform of the specified channel to triangle waveform with the specified frequency, amplitude, offset and phase.FunctionGeneratorWaveform.DC : Set the waveform of the specified channel to DC with the specified offset.FunctionGeneratorWaveform.WHITENOISE : Set the waveform of the specified channel to noise with the specified amplitude and offset.For more detailed information about waveforms see:SOURce:FUNCtioninDG1000Z Progamming GuideSupported methodsidentify()Connection management (when not usingwithcontext management):connect()disconnect()set_channel_enable(channel, enabled)is_channel_enabled(channel)set_channel_waveform(channel, waveform[, arbitrary])get_channel_waveform(channel)set_channel_frequency(channel, freq_Hz)get_channel_frequency(channel)set_channel_phase(channel, phase_deg:float)get_channel_phase(channel)set_channel_amplitude(channel, amp_Vpp:float)get_channel_amplitude(channel)set_channel_offset(channel, offset_V:float)get_channel_offset(channel)set_coupling(on)get_coupling()
Package: pydgeot_jinja
# Jinja2 Support for PydgeotAdd support for [Jinja2](https://github.com/mitsuhiko/jinja2) templates to[Pydgeot](http://www.github.com/broiledmeat/pydgeot). Any changes to extended or included templates will propagateregeneration to the file that used those templates. Templates may set context variables that are accessible fromother templates, which will also affect the regeneration.### Features- Standard [Jinja2](https://github.com/mitsuhiko/jinja2) templating.- Globally available context variables.- Regenerate files dependent on other templates or context variables.### Requirements- Python 3.*- [Pydgeot](http://www.github.com/broiledmeat/pydgeot)- [Jinja2](https://github.com/mitsuhiko/jinja2)### InstallationVia pip:```bashpip install pydgeot_jinja```Or via source:```bashgit clone https://github.com/broiledmeat/pydgeot_jinja.git pydgeot_jinjacd pydgeot_jinjapython setup.py install```### ConfigurationAdd `jinja` to your pydgeot.conf `plugins` list to enable the plugin. Then add `jinja` to the `processors` list inpydgeot.conf, or nested .pydgeot.conf's, to use the file processor. Options are, also, placed under a `jinja` key.- `source_ext` Extension of source files to build. _Default: .html_- `build_ext` Extension of built files. _Default: .html_```json{"plugins": ["jinja"],"processors": ["jinja"],"jinja" {"source_ext": ".jinja"}}```### UsageThe Jinja2 plugin will process any `.html` (or `source_ext` extension specified in pydgeot.conf) file as a Jinja2template.A page may be marked as template only by setting the `template_only` variable to `True`. This will cause the file to notbe generated, but any changes will still cause dependent files to be generated.#### Context VariablesSetting a context variable makes it available to the file it was created in, and to any other template file.`{% setcontext name="value" }%`Context variables can be accessed in the setting file (or extended and included files,) in the same way as if it hadbeen created with the standard Jinja `set`.Context variables may be created with the same names across multiple sources, so global access is done iteratively.`getcontexts(name, "value")` will retrieve a list of files that have set a context variable matching the name and value.The value may be a [glob pattern](https://github.com/broiledmeat/pydgeot#glob-patterns).For example, `{% for page in getcontexts("fullname", "test.*") %}` would find any file with context variables named"fullname" with values starting with "test.", then grab all of that files context variables and set them as propertiesof `page`.
Package: pydgets
Python3 command line widget library.WarningThis library is still work in progress.NoteFor usage and examples please see the source code, for demonstration execute
the appropriate module with Python3 interpreter.CopyrightCopyright (C) since 2016 Jan Mach <honza.mach.ml@gmail.com>
Use of this package is governed by the MIT license, see LICENSE file.ChangelogVersion 0.11Released 2022-06-27Added a config file for GitLab CI/CD.Updated the repository information.Updated packages versions.
Package: pydgi
pydgiPython implementation for Microchip/Atmel Data Gateway InterfaceThe Atmel Embedded Debugger (EDBG) offers aData Gateway Interface (DGI)for streaming data to a host PC. This is meant as an aid in debugging and demonstration of features in the application running on the target device. DGI consists of multiple interfaces for data streaming. The supported interfaces are SPI Interface, USART Interface, TWI Interface, GPIO Interface.The protocol is available on Xplained Pro boards and on theAtmel Power Debugger, that also provide current sensing channels for measuring power consumption.The only tool that shows power data isAtmel Data Visualizer: while very powerful, it unfortunately requires Windows and integrates poorly with an automated setup.My implementation of the DGI protocol is in pure Python, with the only external requirement of PyUSB; it should work on any platform.The generic communication protocol is fully implemented; configuration and data parsing are still WIP.Presently there is a single working interface - the power one: pydgi can stream current data from the XAM module available on Xplained Pro boards.UsageCreate a virtualenv, install via pip and launch the provided console power measure reader:virtualenv -p python3 env
. env/bin/activate
pip install pydgi
dgi_power_measure.pyRefer toplot.pyfor a matplotlib integration example.
Package: pydgilib
Pydgilib provides python bindings for AtmelÂ® Data Gateway Interface (DGI) devices.
See theData Gateway Interface user guidefor further details. This package works best if you haveAtmel Studio 7.0installed. If you do it will automatically make use of the installed files it requires. Otherwise you can
download the required DLL from Atmelhereand point pydgilib to the location where you downloaded the file.FeaturesThe main features of this library are:It wraps the C functions of DGILib in pythonfunctionsIt provides aclassto easily log data from the power and gpio interfaces to a.csvfile or a plot (usingmatplotlib)It provides afunctionthat wrapsatprogram.exeandmake.exeso it can compile projects and flash them to a boardThe documentation of all the functions can be found in thisoverviewor thislist.InstallationYou will need to install pydgilib in a32-bit Pythonenvironment on Windows becauseDGILib.dllis compiled for 32-bit. Other operating systems are not supported.Installation via pipNormal installation:$ pip install pydgilibStatic InstallationIf you want to install a static copy of the master you can run:$ pip install git+https://github.com/EWouters/pydgilibDevelopment InstallationClone the repo:$ git clone https://github.com/EWouters/pydgilib.gitInstall symlinked to repo:$ pip install -e .If you want to be able to run the tests or compile the docs run instead:$ pip install -e .[test,docs]Getting StartedConnect your device that supports DGIPrint the serial number of your device:>>> from pydgilib import DGILib
>>> with DGILib() as dgilib:
...     print(dgilib.device_sn)
...
b'ATML3138061800001604'Log the current of the board and the states of the gpio pins for one second and write the results to.csvfiles:>>> from pydgilib_extra import DGILibExtra
>>> with DGILibExtra() as dgilib:
...     dgilib.logger.log(1)
...Log the current of the board and the states of the gpio pins for one second and show a plot of the results:>>> from pydgilib_extra import DGILibExtra, LOGGER_PLOT
>>> with DGILibExtra(loggers=[LOGGER_PLOT]) as dgilib:
...     dgilib.logger.log(1)
...
{48: <pydgilib_extra.dgilib_data.InterfaceData object at 0x00F22A90>, 256: <pydgilib_extra.dgilib_data.InterfaceData object at 0x00F229F0>}Plot of a SAML11 board running the unit test project.