Saravanan666/pypi-org huggingface dataset:
Package: osometweet
IntroductionThe OSoMeTweet project intends to provide a set of tools to help researchers work with Twitter's V2 API.TheWikiincludes a detailed documentation of how to use all methods. Also, we will use the wiki to store knowledge gathered by those who are building this package.InstallQuick StartLearn how to use the packageLearn about Twitter V2Example sciptsWikiInstallationInstall the PyPI versionpipinstallosometweetWarning 1: The package is still in development, so not all endpoints are included and those which are included may not be 100% robust. Please see the list of issues for known problems.Warning 2: We will try to keep the interface of the package consistent, but there may be drastic changes in the future.Use the newest features & local developmentThe PyPI version may be behind the GitHub version.
To ensure that you are using the latest features and functionalities, you can install the GitHub version locally.To do so, clone this project, go to the source directory, and runpip install -e .If you want to do this withgitit should look something like the below, run from your command line:gitclonehttps://github.com/osome-iu/osometweet.gitcd./osometweet
pipinstall-e.Requirementspython>=3.5
requests>=2.24.0
requests_oauthlib>=1.3.0TestsGo totestsdirectory and run:pythontests.pyNote: you will need to have the following environment variables set in order for the tests to
work properly.TWITTER_API_KEYTWITTER_API_KEY_SECRETTWITTER_ACCESS_TOKENTWITTER_ACCESS_TOKEN_SECRETTWITTER_BEARER_TOKENIf you're not sure what these are, check outthispage to learn how Twitter authentication works.How to seek help and contributeOSoMeTweet will be a community project and your help is welcome!SeeHow to contribute to the OsoMeTweet packagefor more details on how to contribute.Quick startHere is an example of how to use our package to pull user information:importosometweet# Initialize the OSoMeTweet objectbearer_token="YOUR_TWITTER_BEARER_TOKEN"oauth2=osometweet.OAuth2(bearer_token=bearer_token)ot=osometweet.OsomeTweet(oauth2)# Set some test IDs (these are Twitter's own accounts)ids2find=["2244994945","6253282"]# Call the function with these ids as inputresponse=ot.user_lookup_ids(user_ids=ids2find)print(response["data"])which returns a list of dictionaries, where each dictionary contains the requested information for an individual user.[{'id':'2244994945','name':'Twitter Dev','username':'TwitterDev'},{'id':'6253282','name':'Twitter API','username':'TwitterAPI'}]Learn how to use the packageDocumentation on how to use all package methods are located in theWiki.Start here before using theexample scripts!Learn about Twitter V2We have documented (and will continue to document) information about Twitter's V2 API that we deem is valuable. For example:Details on Twitter's new fields/expansions parametersAvailable EndpointsHTTP Status Codes and ErrorsAcademic TrackBenefitsandDetailsExample ScriptsWe offerexample scriptsfor working with different endpoints. We recommend that you read and understand the methods by reading the relevant packageWikipages prior to using these scripts.
Package: oson
DescIt's a library for python users to encode python objects to json.Use it just like use default json library.Installpip3installosonUnusual UsagefromdatetimeimportdatetimeimportosonclassStudent(object):name='Tom'age=23update_at=datetime.now()__private="don't see it"s=Student()print(oson.dumps(s))MorefromdatetimeimportdatetimeimportosonclassStudent(object):name='Tom'age=23update_at=datetime.now()__private="don't see it"oson.set_config(time_format='%Y-%m-%d%H:%M:%S',date_format='%Y-%m-%d%H:%M:%S',private=False)s=Student()print(oson.dumps(s))Configprivateif you need to encode private column, set it True.time_formatuse it to transfer time from datetime to time stringdate_formatjust like 『time_format』GOOD LUCK!
Package: oso-sdk
Python integrations forOso CloudThe Oso SDK provides web framework middleware foroso-cloud, the Oso Cloud Client for Python.Please Note: The SDK is currently released as a developer preview. Do not use this SDK for production workloads.Getting StartedIf you are looking for the sample application, navigate toexamples/starter-policy/fastapi.Installpipinstall--upgradeoso-sdkIntegrationsThe Oso SDK integrates directly with the following supported web frameworks:FastAPIFlaskIf you want to add support for a new web framework, please submit a Pull Request or open a GitHub issue.DocumentationTo get up and running with Oso, try theQuickstart guide.Full documentation is available athttps://www.osohq.com/docs.To learn about authorization best practices (not specific to Oso), read theAuthorization Academyguides.Community & SupportIf you have any questions on Oso or authorization more generally, you can join our engineering team & hundreds of other developers using Oso in our community Slack:Contributing to the SDKPlease refer toCONTRIBUTING.md.LicenseLicensed under the Apache 2.0 license, seeLICENSE.
Package: ospa
OSpaOSpa is the syntactic sugar for python os package.todo:Sugar for specific data, like get_all_imagesTemplate param for file namesautomate deploy on pypifor release:deploy on pypigithub badges (travis ci,test coverhance,docs, pypi,code quality)done:listdir with all default parametersdeploy on test.pypiconvert . and .. in valuesonly files parameterTest dummy folderunittestsdocstringsFunction for removing root path, return only files namesAdd walk (os.walk) parameterAdd file extension filter in listdir functionFix issue with ..
Package: osparcAPIcontrol
osparcAPIcontrolNameosparcAPIcontrolDescriptionproviding a variety of tools to interact with osparc API faster.Compiles the different functionalities of the osparc package into composites to simplify and speed up its usage.BadgesInstallationpipinstallosparcAPIcontrolUsageimportpprintfromosparcAPIcontrol.controllerimportOsparcAPIcontroller# to instantiate a controller object, pass host, your username and password.# hosts:# "https://api.osparc.io" for osparc.io# "https://api.osparc.speag.com" for s4l.speag.com##username and password can be acquired by creating an API Token on the respective website.username='some_string'password='some_other_string'control=OsparcAPIcontroller(host="https://api.osparc.io",username=username,password=password)# prints a list of all available solvers and their propertiescontrol.print_solvers()# choose a set of solvers to use in your workflow which are saved in a dictionarycontrol.initialize_solvers(solver_list=['isolve-mpi','s4l Python Runner'])print('\n')pprint.pprint(control.solvers_in_use)print('\n')print(control.solvers_in_use['isolve-mpi'])Supportmsteiner@itis.swissRoadmapMore functions to interact with the API will be addedExisting functions will be further unified/combinedFunctionalities to easily store and access the metadata files containing important file IDsAuthors and acknowledgmentpcrespov, main author of the osparc packageLicenseMIT
Package: osparc-control
Osparc ControlInstallationYou can installOsparc ControlviapipfromPyPI:pipinstallosparc-controlDocumentationRead docs athttps://itisfoundation.github.io/osparc-controlExamplesTo run below examples either clone the repo or copy code from the snippets
below the commandsSimple exampleA first example whererequester.pyasks for a random number andreplier.pydefines an interface to provide it.In a first terminal run:pythonexamples/1_simple/requester.pyexamples/1_simple/requester.pyfilenameIn a second terminal run:pythonexamples/1_simple/replier.pyexamples/1_simple/replier.pyfilenameAdvanced exampleA showcase of all the types of supported requests.In a first terminal run:pythonexamples/2_base_time_add/controller.pyexamples/2_base_time_add/controller.pyfilenameIn a second terminal run:pythonexamples/2_base_time_add/solver.pyexamples/2_base_time_add/solver.pyfilenameContributingContributions are very welcome.
To learn more, see theContributor Guide.
OurCode of Conductpledge.LicenseDistributed under the terms of theMIT license,Osparc Controlis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.
Package: osparc-filecomms
oSparc File Communications Python LibraryThis library is meant to perform stable file-based communications between python code that runs in oSparc services.Installationpip install osparc-filecommsHandshake UsageWith a handshake two services can exchange each other's ID, with a guarantee that the service on the other side is alive.
The protocol has an 'initiator' and a 'receiver'.from osparc-filecomms import handshakers
import uuid

# Existing input/output directories
input_dir = Path("input_dir") 
output_dir = Path("output_dir")

my_uuid = str(uuid.uuid4())

is_initiator = True # Change this according to if you are the initiator or the receiver
handshaker = handshakers.FileHandshaker(my_uuid, input_dir, output_dir, is_initiator=is_initiator)

other_side_uuid = handshaker.shake()
print(f"I performed a handshake. My uuid is: {my_uuid}. The other side's uuid is: {other_side_uuid}")After this code has run on both sides, both uuid's can be used in data files that are exchanged.
If the processes accessing these files make sure the receiver and sender uuid match, they can be sure the files are coming from another service that is live.
For example to send a file:import json

output_file_path = output_dir \ 'some_data.json'
data = [4, 3]
file_content = {
  'sender_uuid': my_uuid,
  'receiver_uuid': other_side_uuid, 
  'data': data
}
output_file_path.write_text(json.dumps(file_content))The other process can the receive it then using:import json

input_file_path = input_dir \ 'some_data.json'

sender_uuid = None
receiver_uuid = None
while receiver_uuid != my_uuid and sender_uuid != other_side_uuid:
  while not input_file_path.exists():
    time.sleep(1)

  file_content = json.loads(input_file_path.read_text())
  receiver_uuid = file_content['receiver_uuid']
  sender_uuid = file_content['sender_uuid']

data = file_content['data']
Package: os.path2
Theos.pathlibrary replacement with simple API.>>>fromosimportpath2aspath>>>path('/var/log')/var/log>>>path('/var','log')/var/log>>>path('/home/you/file').user'you'>>>[(element.user,element.group,element.mod)forelementinpath('.')][('user','user','0664'),('user','user','0664'),('user','user','0664'),('user','user','0664'),('user','user','0664'),('user','user','0664'),('user','user','0664'),('user','user','0775'),('user','user','0664')]StatusLibrary seems to be pretty stable. Feel free to use it as you want.
But I think this no the final version of API.InstallYou can install it from PyPi, by simplypip:$pipinstallos.path2only if you don’t have pip installed, an alternative method iseasy_install:$easy_installos.path2to test it, launchpython>>>fromosimportpath2aspathSupported platformsPython2.6Python2.7Python3.3PyPy1.9Tests>>>pythonsetup.pytest
Package: os-paw
OS-PAWOS-PAW is the Ordnance Survey Python API Wrapper designed to make data from the OS Data Hub APIs readily accessible to python developers.RequirementsPython 3.8 or higher.InstallationUse the package managerpipto install OS-PAW.pipinstallos-pawUsagefromos_paw.wfs_apiimportWFS_API# Generate an API key from https://osdatahub.os.uk/productsAPI_KEY='my_api_key'# Choose a Spatial Reference SystemSRS='EPSG:27700'# Choose an OS Web Feature Service productTYPE_NAME='Zoomstack_RoadsRegional'# Create Bounding BoxBBOX='440000, 112000, 443000, 115000'# Create WFS_API object and run querywfs_api=WFS_API(api_key=API_KEY)payload=wfs_api.get_all_features_within_bbox(type_name=TYPE_NAME,bbox=BBOX,srs=SRS)FeaturesOS-PAW has improved error handling compared to requesting data directly from the OS Data Hub APIs. In particular, the user may search for a product that does not exist such as 'water' and the following message will be returned:ValueError: "Water" is not a valid Product.Best matches: ['WaterNetwork_WatercourseLink', 'WaterNetwork_HydroNode', 'Zoomstack_Waterlines', 'Zoomstack_Surfacewater'].Another advantage of os-paw is that there is no upper bound on the amount of data that can be requested during one method call. The raw API places a limit at 100 features per request, but there is no such limit on the payload here. In order to save time and costs when developing, there are two extra arguments available within theget_all_features_within_bboxmethod:allow_premium=False ,max_feature_count=1000 .The former means no premium data requests will be made and the latter means the user can restrict the amount of data returned if they happen to have picked a bounding box with a particularly high feature density.The APIs currently accept two Spatial Reference Systems, namely British National Grid ('EPSG:27700') and World Geodetic System 1984 ('EPSG:4326').TestsThere are currently some limited tests of the functionality of theWFS_APIobject. To check that these tests pass, open a command prompt and navigate to the installation of OS-PAW, then runpytestfrom the command line.LimitationsCurrently (12/11/2020), there is only a python wrapper for the Web Feature Service (WFS) API. If there is sufficient interest, we shall add similar functionality for the other APIs available on theOS Data Hub.It is currently not possible to filter the results before returning the payload. For example, to return all of the schools within a bounding box, it is first necessary to return all of the buildings and then filter the resulting GeoJSON payload using your preferred method. If pre-filtering is integral to your project, you may wish to refer to thetutorialon using the raw API, or submit an issue to this project, or feel free to contribute extra functionality yourself.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: osp-core
OSP coreNative implementation of the core cuds object and the class generation
by the SimPhoNy team at Fraunhofer IWM. Builds up on the previous
version, simphony-common (SimPhoNy, EU FP7 Project (Nr. 604005)www.simphony-project.eu).RequirementsPyYaml (on Windows, usehttps://stackoverflow.com/a/33673823) for parsing yaml filesnumpy for vector attributes of cudswebsockets for the transport layerrequests for sending CUDS to a servertox to run unittestsunittest2 to run unittestspympler for the performance testresponses for unittesting requestsInstallationOSP-core is available on PyPI, so it can be installed usingpippipinstallosp-coreFor more detailed instructions, seehttps://simphony.readthedocs.io/en/latest/installation.html.Visualization of ontologiesWe provide the toolontology2dotto visualize your ontologies. You can visualize installed namespaces together with non-installed yaml files (requires Graphvizhttps://graphviz.gitlab.io/):ontology2dot<installed-namespace-1>...<installed-namespace-n><path/to/ontology-1.yml>...<path/to/ontology-m.yml># Alternativepython-mosp.core.tools.ontology2dot<installed-namespace-1>...<installed-namespace-n><path/to/ontology-1.yml>...<path/to/ontology-m.yml>You can use parameter-gto group the namespaces. Use-oto change the filename of the resulting png file.TestingTesting is done using tox (pip install tox):# run tests automatically in different environmentstox# run tests in your current environment (you must manually install unittest2, responses for that)python-munittest-vDocumentationOur documentation is located athttps://simphony.readthedocs.io.If you want to build the documentation locally, refer to ourdocumentation repostitory.ExamplesFurther examples can be found in the /examples folder. There the usage of wrappers is explained.TroubleshootingIf installation fails, try to install the dependencies one by one before installing osp-core.
The dependencies are listed at the top of this readme file.On Windows, unittests can fail when you use a virtual environment.
For testing the transport layer, we start a transport layer server using pythons subprocess package.
It can happen, that the started subprocess does not pick up the correct virtual environment, causing the server to crash and the corresponding tests to fail.
From our experience, this will not happen if you use the virtual environements of conda.Directory structureosp/core -- The source codetools -- various tools to work with osp-core.ontology -- the parser and generation of the entities and classes.yml -- The supplied ontology filessession -- Different abstract classes for wrappers.examples -- examples of usage.tests -- unittesting of the codeAcknowledgementsThe OSP-core Python package originates from the European ProjectSimPhoNy(Project Nr. 604005). We would like to acknowledge and thank our project partners, especiallyEnthought, Inc,Centre Internacional de Mètodes Numèrics a l'Enginyeria (CIMNE)and theUniversity of Jyväskylä, for their important contributions to some of the core concepts of OSP-core, which were originally demonstrated under the projecthttps://github.com/simphony/simphony-common.
Package: ospd
ospdospd is a base class for scanner wrappers which share the same communication
protocol: OSP (Open Scanner Protocol). OSP creates a unified interface for
different security scanners and makes their control flow and scan results
consistently available under the central Greenbone Vulnerability Manager service.OSP is similar in many ways to GMP (Greenbone Management Protocol): XML-based,
stateless and non-permanent connection.The design supports wrapping arbitrary scanners with same protocol OSP,
sharing the core daemon options while adding scanner specific parameters and
options.Table of ContentsTable of ContentsReleasesInstallationRequirementsInstall using pipHow to write your own OSP Scanner WrapperSupportMaintainerContributingLicenseReleases￼
Allrelease filesare signed with
theGreenbone Community Feed integrity key.
This gpg key can be downloaded athttps://www.greenbone.net/GBCommunitySigningKey.ascand the fingerprint is8AE4 BE42 9B60 A59B 311C  2E73 9823 FAA6 0ED1 E580.InstallationRequirementsospd requires Python >= 3.7 along with the following libraries:- python3-paramiko

- python3-lxml

- python3-defusedxmlInstall using pipYou can install ospd from the Python Package Index usingpip:python3 -m pip install ospdAlternatively download or clone this repository and install the latest development version:python3 -m pip install .How to write your own OSP Scanner WrapperAs a core you need to derive from the class OSPDaemon from ospd.py.
See the documentation there for the single steps to establish the
full wrapper.See the filedoc/INSTALL-ospd-scanner.mdabout how to register a OSP scanner at
the Greenbone Vulnerability Manager which will automatically establish a full
GUI integration for the Greenbone Security Assistant (GSA).There are some online resources about this topic:https://docs.greenbone.net/GSM-Manual/gos-3.1/en/osp.html#how-to-write-your-own-osp-wrapperSupportFor any question on the usage of OSPD please use theGreenbone Community Portal. If you found a problem with the software, pleasecreate an issueon GitHub.MaintainerThis project is maintained byGreenbone Networks GmbH.ContributingYour contributions are highly appreciated. Pleasecreate a pull requeston GitHub. For bigger changes, please discuss it first in theissues.For development you should usepoetryto keep you python packages separated in different environments. First install
poetry via pippython3 -m pip install --user poetryAfterwards runpoetry installin the checkout directory of ospd (the directory containing thepyproject.tomlfile) to install all dependencies including the packages only
required for development.The ospd repository usesautohooksto apply linting and auto formatting via git hooks. Please ensure the git hooks
are active.poetry install
poetry run autohooks activate --forceLicenseCopyright (C) 2009-2020Greenbone Networks GmbHLicensed under theGNU Affero General Public License v3.0 or later.
Package: ospeak
ospeakCLI tool for running text through theOpenAI Text to speechAPI and speaking or saving the resultSeeospeak: a CLI tool for speaking text in the terminal via OpenAIfor background on this project.InstallationInstall this tool usingpipx:pipxinstallospeakNote, on MacOS there's abroken dependencywith Python 3.12 so instead run:pipxinstall--python/path/to/python3.11ospeakThis tool also depends onffmpeg. You can install that on macOS usingHomebrewlike this:brewinstallffmpegNote thatospeakhas dependencies that are currently incompatible withLLM(seethis issue) so the two tools need to be installed in different virtual environments, hence the recommendation to usepipx.UsageTo get your computer to say something, run:ospeak"Hello there"You will need an OpenAI API key. You can set that as an environment variable:exportOPENAI_API_KEY="..."Or you can pass it using--token:ospeak--token"...""Hello there"You can pipe content into the tool:echo"Hello there"|ospeakUse-v/--voice VOICEto select a voice. The default isalloy. The other options are:echofableonyxnovashimmerYou can pass-v allto hear all of the voices, each with the name of the voice spoken first.ospeak"This is my voice"-vallThe-m/--modeloption can be used to select a different model. The default istts-1. Use-m tts-1-hdfor a higher quality model that takes slightly longer to generate audio:ospeak"This is higher quality"-mtts-1-hdTo adjust the speed, pass-x/--speedwith a value between 0.25 and 4 (the default is 1.0):ospeak"This is my fast voice"-x2To write the audio to a file, pass-o/--outputwith a filename ending in either.mp3or.wav:ospeak"This is my voice"-ovoice.mp3This will not speak out loud. If you want it to also speak, add the-s/--speakoption:ospeak"This is my voice"-ovoice.mp3-sospeak --helpUsage: ospeak [OPTIONS] [TEXT]

  CLI tool for running text through OpenAI Text to speech

  Set the OPENAI_API_KEY environment variable to your OpenAI API key to avoid
  using the --token option every time.

  Example usage:

      ospeak "Everyone deserves a pelican" --voice alloy -x 1.5

Options:
  --version                       Show the version and exit.
  -v, --voice [alloy|echo|fable|onyx|nova|shimmer|all]
                                  Voice to use
  -m, --model TEXT                Model to use - defaults to tts-1
  -o, --output FILE               Save audio to this file on disk
  -x, --speed FLOAT RANGE         Speed of the voice  [0.25<=x<=4.0]
  -s, --speak                     Speak the text even when saving to a file
  --token TEXT                    OpenAI API key
  --help                          Show this message and exit.DevelopmentTo contribute to this tool, first checkout the code. Then create a new virtual environment:cdospeak
python-mvenvvenvsourcevenv/bin/activateNow install the dependencies and test dependencies:pipinstall-e'.[test]'To run the tests:pytest
Package: os-performance-tools
Python scripts for use in OpenStack’s QA processPlease feel here a long description which must be at least 3 lines wrapped on
80 cols, so that distribution package maintainers can use it in their packages.
Note that this is a hard requirement.Free software: Apache licenseDocumentation:http://docs.openstack.org/developer/os-performance-toolsSource:http://git.openstack.org/cgit/openstack/os-performance-toolsBugs:http://bugs.launchpad.net/openstack-qaFeaturesTODO
Package: ospfe.occhiello
IntroductionOcchiellois an italian word taken from journalism that can be translated ashalf title.Plone integrationThis add-on enable a new field (half-title) for all Plone content types, displayed beforetitle.It’s a simple text line that can be used for an introduction text to be read before the title
(commonly it introduce the document, but it’s not detailed as the abstract/description).Content typesYou can select the set of types where to add the field to from the Plone control panel.Field is displayed through a viewlet, so no content view customization is needed.CreditsDeveloped with the support ofS. Anna Hospital, Ferrara;
S. Anna Hospital supports thePloneGov initiative.AuthorsThis product was developed by RedTurtle Technology team.Changelog2.0.1 (2014-10-28)Fixed issue with calling@@manage-viewlets[keul]2.0 (2012-11-28)First public releaseNow using archetypes.schemaextenderMoved source from legacy code