Saravanan666/pypi-org huggingface dataset:
Package: ob-example
An nbdev-org-babel exampleLiterate Programming using nbdev, org-babel and emacs-jupyterAn nbdev-org-babel exampleLiterate Programming using nbdev, org-babel and emacs-jupyterInstallationSeethis linkfor the jekyll website documentation generated usingnbdev_build_docs_from_org.There are currently (as of 2020-05-29) many unmentioned dependencies
in nbdev-org-babel, such as ox-ipynb, xq, moreutils (sponge) and
various emacs libraries. Checkout the bash script in the source code
in nbdev-org-babel, to figure those out if you are missing some. I
hope nbdev-org-babel gets rewritten in python and merged to fastai's
nbdev master in some distant future.Install procedure(assuming you have dependencies installed):git clone https://github.com/methuselah-0/nbdev-org-babel.gitcd to nbdev-org-babelpip install -e .cd ~/srcnbdev_new my_new_projectcd my_new_projectEdit the settings.ini file as you normally would with any nbdev project.However, make sure that the following two settings correspond to the github repo name isntead of the defaults:doc_baseurl = /nbdev-org-babel-example/git_url = https://github.com/%(user)s/nbdev-org-babel-example/tree/%(branch)s/create an index.org file in yournbs_pathdirectory.create a directory inside thenbs_pathdirectory with the same name aslib_name(as defined in settings.ini)create your literate program in/path/to/repo_name/nbs_path/lib_name/my_project.orgcreate index.org in/path/to/repo_name/nbs_path/.Runnbdev_install_git_hooks.Finally, runnbdev_build_docs_from_orgwhich will create the needed
library and documentation for your project.Note that if you don't want to run the whole procedure from org-files,
to ipynb files to building the docs, you can do for examplenbdev_build_docs --force_all '*'to just rebuild the html docs from
current ipynb files.To see the results of the.github/workflows/main.ymlCI-definition;Click Actions -> Click some commit-message -> Click Build in the left pane -> Click the 3 dots in the upper right corner -> view raw logsIf you are using some dependency packages, make sure to add those insettings.iniunder requirements, e.g.requirements = scipy>=1.4.1 numpy>=1.18.4 matplotlib>=3.2.1.Also, seehow to setup console scripts, andhow to upload your project
to pypi. However, you might find 2 problems out-of-the-box when
runningmake release. In the Makefile from the nbdev template
project, you may need to changepython setup.py sdist bdist_wheeltopython3 set.... Secondly, you may need to install the wheel
and twine packages:pip install wheel twine.Emacs Python Setup SuggestionsList of stuff that is useful for Python LP-programming in emacs:repl: interactively exploring and testing code (emacs-jupyter)version control (git)automatic check for the code's adherence to best practices and
syntax highlighting (flycheck-pycheckers)debugging, debugger (real-gud)code definition lookup (emacs-jupyter, ag)docs-generation (org-babel, nbdev, pandoc)code generation & completion (yasnippet, jedi)
Package: obff
obff [python]Open Book File Format Handler for python
Seespecsfor more informations.Examplestructureexample_book
├── example.py
├── hello_world.obff
├── book_content
│   ├── cover.png
│   ├── page_1.png
│   ├── page_2.png
│   └── page_3.png
└── exported_bookSnippet Writeimportobffimportos# NOT REQUIRED TO IMPORTmyBook=obff.Book()myBook.title="Hello World Book"myBook.description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."myBook.cover=obff.Cover(open("./book_content/cover.png","rb").read())pages=natsorted(os.listdir("./book_content"))forpageinpages:ifpage.startswith("cover"):continuepath=os.path.join("./book_content",page)myBook.addPage(obff.Page(open(path,"rb").read()))obff.write("./hello_world.obff",myBook)Snippet ReadimportobffmyBook=obff.read("./hello_world.obff")print("Title:{0}".format(myBook.title))print("Description:{0}".format(myBook.description))myBook.cover.saveImage("./exported_book/cover.jpg")
Package: obfuscator
IntroductionObfuscator is a Python package used to obfuscate a set of data (e.g.
bytes). It providesnoencryption! It’s strictly a “security through
obscurity” tool, with limited usefulness. You have been warned!DocumentationDocumentation is hosted on readthedocs:obfuscator.readthedocs.orgInstallDownload the tarball and install withpip install <package>.UsageSee the unit tests for more in-depth examples. Here are the basics:importobfuscatororiginal_bytes=map(ord,"testing")_key,obfuscated_bytes=obfuscator.obfuscate_xor(original_bytes,key=0x66)deobfuscated_bytes=obfuscator.deobfuscate_xor(key=0x66,data=obfuscated_bytes)assertoriginal_bytes==deobfuscated_bytesofile=obfuscator.file.ObfuscatedFile("test.bin")data=map(ord,"testing")ofile.write(data,key=123,minimum_length=32)self.assertEqual(32,os.path.getsize("test.bin"))
Package: obfuskey
ObfuskeyTaking lessons learned from supportingBaseHashover the years, it was
obvious that it could be optimized, thus Obfuskey was born. BaseHash had some
misconceptions, mainly that consumers thought it was a crypto library due to the word
"hash". Since a hashes are generally irreversible, this new project was born to clearly
convey what it is used for.Obfuskey was a way to both modernize and simplifyBaseHash, while keeping
the same functionality. Obfuskey generates obfuscated keys out of integer values that
have a uniform length using a specified alphabet. It was built solely for Python 3.6 and
up. There are no guarantees that it will work for lower versions. If you need this for
a lower version, please useBaseHash.When generating keys, the combination of key length and alphabet used will determine the
maximum value it can obfuscate,len(alphabet) ** key_length - 1.UsageTo use Obfuskey, you can use one of the available alphabets, or provide your own. You
can also provide your own multiplier, or leave it blank to use the built-in prime
generator.fromobfuskeyimportObfuskey,alphabetsobfuscator=Obfuskey(alphabets.BASE36,key_length=8)key=obfuscator.get_key(1234567890)# FWQ8H52Ivalue=obfuscator.get_value('FWQ8H52I')# 1234567890To provide a custom multiplier, or if you to provide the prime generated from a
previous instance, you can pass it in withmultiplier=. This value has to be an odd
integer.fromobfuskeyimportObfuskey,alphabetsobfuscator=Obfuskey(alphabets.BASE62)key=obfuscator.get_key(12345)# d2Aaslobfuscator=Obfuskey(alphabets.BASE62,multiplier=46485)key=obfuscator.get_key(12345)# 0cpqVJIf you wish to generate a prime not within the golden prime set, you can overwrite the
multiplier withset_prime_multiplier.fromobfuskeyimportObfuskey,alphabetsobfuscator=Obfuskey(alphabets.BASE62,key_length=2)key=obfuscator.get_key(123)# 3fobfuscator.set_prime_multiplier(1.75)key=obfuscator.get_key(123)# RPThere are predefinedalphabetsthat you can use, but Obfuskey allows you to
specify a custom one during instantiation.fromobfuskeyimportObfuskeyobfuscator=Obfuskey('012345abcdef')key=obfuscator.get_key(123)#022d43ExtrasIf you need to obfuscate integers that are larger than 512-bit, you will need to also
havegmp2installed.$ pip install gmpy2

OR

poetry install -E gmpy2
Package: ob_graphql
Ob-GraphqlSetup a simple GraphQL client over websocket usingapollo-transport-wsprotocol.GraphQL over WebSocket ProtocolClient-server communicationEach message has atypefield, which defined in the protocol of this package, as well as associated fields insidepayloadfield, depending on the message type, andidfield so the client can identify each response from the server.Each WebSocket message is represented in JSON structure, and being stringified before sending it over the network.This is the structure of each message:exportinterfaceOperationMessage{payload?:any;id?:string;type:string;}Installpipinstallob_graphqlOb-Graphql depends onwebsocket-clientis a WebSocket client for Python. It provides access to low level APIs for WebSockets.ExamplesSetup subscriptions super easilyfromob_graphqlimportOBQLClientquery="""subscription {notifications {idtitlecontent}}"""defcallback(_id,data):print("got new data..")print(f"msg id:{_id}. data:{data}")withOBQLClient("ws://localhost:8080/graphql")asclient:sub_id=client.subscribe(query,callback=callback)client.stop_subscribe(sub_id)Variables can be passedfromob_graphqlimportOBQLClientquery="""subscription ($limit: Int!) {notifications (order_by: {created: "desc"}, limit: $limit) {idtitlecontent}}"""defcallback(_id,data):print("got new data..")print(f"msg id:{_id}. data:{data}")withOBQLClient('ws://localhost:8080/graphql')asclient:sub_id=client.subscribe(query,variables={'limit':10},callback=callback)Headers can be passed toofromob_graphqlimportOBQLClientquery="""subscription ($limit: Int!) {notifications (order_by: {created: "desc"}, limit: $limit) {idtitlecontent}}"""defcallback(_id,data):print("got new data..")print(f"msg id:{_id}. data:{data}")withOBQLClient("ws://localhost:8080/graphql")asclient:sub_id=client.subscribe(query,variables={"limit":10},headers={"Authorization":"Bearer xxxx"},callback=callback,)client.stop_subscribe(sub_id)Normal queries and mutations work toofromob_graphqlimportOBQLClientquery="""query ($limit: Int!) {notifications (order_by: {created: "desc"}, limit: $limit) {idtitlecontent}}"""withOBQLClient('ws://localhost:8080/graphql')asclient:res=client.query(query,variables={'limit':10},headers={'Authorization':'Bearer xxxx'})print(res)Without the context manager APIfromob_graphqlimportOBQLClientquery="""query ($limit: Int!) {notifications (order_by: {created: "desc"}, limit: $limit) {idtitlecontent}}"""client=OBQLClient('ws://localhost:8080/graphql')res=client.query(query,variables={'limit':10},headers={'Authorization':'Bearer xxxx'})print(res)client.close()
Package: obiba-agate
Agate PythonThis Python-based command line tool allows to access to a Agate server through its REST API. This is the perfect tool
for automating tasks in Agate. This will be the preferred client developed when new features are added to the REST API.Read thedocumentation.Have a bug or a question? Please create an issue onGitHub.Continuous integration is onTravis.UsageInstall with:pip install obiba-agateTo get the options of the command line:agate --helpThis command will display which sub-commands are available. For each sub-command you can get the help message as well:agate <subcommand> --helpThe objective of having sub-command is to hide the complexity of applying some use cases to the Agate REST API. More
sub-commands will be developed in the future.DevelopmentAgate Python client can be easily extended by using the classes defined incore.pyand inprotobuf/*.pyfiles.Mailing listHave a question? Ask on our mailing list!obiba-users@googlegroups.comhttp://groups.google.com/group/obiba-usersLicenseOBiBa software are open source and made available under theGPL3 licence. OBiBa software are free of charge.OBiBa acknowledgmentsIf you are using OBiBa software, please cite our work in your code, websites, publications or reports."The work presented herein was made possible using the OBiBa suite (www.obiba.org), a  software suite developed by Maelstrom Research (www.maelstrom-research.org)"
Package: obiba-mica
Mica PythonThis Python-based command line tool allows to access to a Mica server through its REST API. This is the perfect tool
for automating tasks in Mica. This will be the preferred client developed when new features are added to the REST API.Read thedocumentation.Have a bug or a question? Please create an issue onGitHub.Continuous integration is onTravis.UsageInstall with:pip install obiba-micaTo get the options of the command line:mica --helpThis command will display which sub-commands are available. For each sub-command you can get the help message as well:mica <subcommand> --helpThe objective of having sub-command is to hide the complexity of applying some use cases to the Mica REST API. More
sub-commands will be developed in the future.DevelopmentMica Python client can be easily extended by using the classes defined incore.pyfile.Mailing listHave a question? Ask on our mailing list!obiba-users@googlegroups.comhttp://groups.google.com/group/obiba-usersLicenseOBiBa software are open source and made available under theGPL3 licence. OBiBa software are free of charge.OBiBa acknowledgmentsIf you are using OBiBa software, please cite our work in your code, websites, publications or reports."The work presented herein was made possible using the OBiBa suite (www.obiba.org), a  software suite developed by Maelstrom Research (www.maelstrom-research.org)"
Package: obiba-opal
Opal PythonThis Python-based command line tool allows to access to a Opal server through its REST API. This is the perfect tool
for automating tasks in Opal using shell scripts.See also theOpal R Clientwhich offers a comprehensive programming interface.Read thedocumentation.Have a bug or a question? Please create an issue onGitHub.Continuous integration is onTravis.UsageInstall with:pipinstallobiba-opalNote:obiba-opaldepends onpycurlwhich itself depends on system libraries (mostly OpenSSL related). In casepycurlinstallation
fails withpip, a quick fix is to install it via a system package:# on Debian systemssudoapt-getinstallpython3-pycurl# on RPM systemssudoyuminstallpython3-pycurlCLITo get the options of the command line:opal--helpThis command will display which sub-commands are available. For each sub-command you can get the help message as well:opal<subcommand>--helpThe objective of having sub-command is to hide the complexity of applying some use cases to the Opal REST API. More
sub-commands will be developed in the future.APIOpal Python client can be easily extended by using theexposed classes. The classes*Commandreturn an Opal task object, to be followed with theTaskService. The classes*Serviceperform immediate operations.fromobiba_opalimportOpalClient,HTTPError,Formatter,ImportCSVCommand,TaskService,FileService,DictionaryService# if 2-factor auth is enabled, user will be asked for the secret code# Personal access token authentication is also supported (and recommended)client=OpalClient.buildWithAuthentication(server='https://opal-demo.obiba.org',user='administrator',password='password')try:# upload a local CSV data file into Opal file systemfs=FileService(client)fs.upload_file('./data.csv','/tmp')# import this CSV file into a projecttask=ImportCSVCommand(client).import_data('/tmp/data.csv','CNSIM')status=TaskService(client).wait_task(task['id'])# clean data file from Opalfs.delete_file('/tmp/data.csv')ifstatus=='SUCCEEDED':dico=DictionaryService(client)table=dico.get_table('CNSIM','data')# do something ...dico.delete_tables('CNSIM',['data'])else:print('Import failed!')# do something ...exceptHTTPErrorase:Formatter.print_json(e.error,True)finally:client.close()Mailing listHave a question? Ask on our mailing list!obiba-users@googlegroups.comhttp://groups.google.com/group/obiba-usersLicenseOBiBa software are open source and made available under theGPL3 licence. OBiBa software are free of charge.OBiBa acknowledgmentsIf you are using OBiBa software, please cite our work in your code, websites, publications or reports."The work presented herein was made possible using the OBiBa suite (www.obiba.org), a  software suite developed by Maelstrom Research (www.maelstrom-research.org)"
Package: obify
obifyA python library that will provide all algorithms working on objectThis library can be used following wayfromobifyimportheapclassNode():def__init__(self,data):self.data=datadefcompare(self,node):ifself.data<node.data:return-1elifself.data>node.data:return1else:return0deftest_heap():h=heap.MinHeap()h.insert(Node(12))h.insert(Node(2))h.insert(Node(20))h.remove()h.insert(Node(0))
Package: obis-laser-controller
OBIS Laser ControllerController for OBIS Lasers.The controller is built off of theeasy_scpi. For more info about running custom commands, consult it's documentation.MethodsObisLaserController( port, timeout = 5, auto_off = True ):Creates a new laser controller on the given port. [Inherits from easy_scpi.Instrument]on():Turns the laser on.off():Turns the laser off.set_power( power = 0 ):Sets the laser's power.Propertiesnominal_power:Nominal power of the laser.max_power:Maximum power of the laser.min_power:Minimum power of the laser.wavelength:Wavelength of the laser.power_rating:Power rating of the laser.power:Present output power of the laser.current:Present output current of the laser.enabled():Returns if the laser is on or off.Examplefromobis_laser_controllerimportObisLaserController# create laser controller and connect to devicelaser=ObisLaserController('COM16')laser.connect()# set power to half of nominal and turn onlaser.set_power(laser.nominal_power/2)laser.on()# turn laser off and disconnect# NOTE: By default the laser will turn off when disconnected.laser.off()laser.disconnect()
Package: obiter
Obiter.AiComputational methods and artificial intelligence will transform the
study and practice of law by significantly expanding the reach of
empirical enquiries.“A computer calls a database,” AI artist
(2022)The volume of legal data increased exponentially over the past decades.
In Canada, an average size tribunal will issue tens of millions of words
each year. Thousands of hours of proceedings will be recorded. Trillions
of words will be filed as evidence.Making sense of, and understanding this data, is a pressing challenge
for scholars and lawyers. Is the law consistent? Do different
adjudicators reach similiar conclusions when presented with similiar
facts? What types of disputes are people bringing to decision makers?
How are those disputes resolved?Answering these questions at scale exceeds human capacities. Consider
this example. In 2021, theOntario Workplace Safety and Insurance
Appeals Tribunal,
issued2,053 written
decisions. If each
decision averages 2,500 words in length, the tribunal outputted
5,132,500 words—the equivalent of 9 editions ofWar and Peace. The
volume of data means that the jurisprudence regarding workers,
disability, and compensation cannot be comprehensively grasped or
synthesized by researchers. Who could ever read so much?But computers are not so limited. Recent advances in artificial
intelligence and machine learning have significantly expanded machines’
ability to understand, organize, and sythesize complex data. Computers
can now credibly answer complex questions about documents, detect
patterns, and reason with facts.Lawyers, law students, and researchers should understand how these
methods can be leveraged for research at scale. The goal ofObiter.Aiis to build out a suite of open source and accessible
computational tools to facilitate computational research of Canadian
law.
Package: obito
Obitois a URL file downloader which can download multiple files concurrently over internet.What's different?Downloads multiple files through single command.Downloads files concurrently.Support for large files.USAGEInstallationPyPipipinstallObitoManual InstallationNote:You will needPoetryfor manual installation.pipinstallpoetryDownload or clone the repository.gitclonehttps://github.com/777advait/ObitoInstall the project by running the following command in the root of the directory.poetryinstallExamples1. Downloading Github API and Python concurrency docs2. DownloadingRust.
Package: obj2cli
Installpip install obj2cliUsage(single)importsysimportobj2cliclassA:def__init__(self,arg1,arg2):self.a=arg1self.b=arg2defcall1(self,c,d=None):print("hello{}c={}, d={}".format(self.__dict__,c,d))if__name__=="__main__":obj2cli.main_single(A,A,sys.argv[1:])# python cmd.py --help
usage: A [-h] [--arg1 str] [--arg2 str] {call1} ...

Initialize self. See help(type(self)) for accurate signature.

positional arguments:
  {call1}
    call1

optional arguments:
  -h, --help  show this help message and exit
  --arg1 str
  --arg2 str

# python cmd.py call1 --help
usage: A call1 [-h] [-c str] [-d str]

optional arguments:
  -h, --help  show this help message and exit
  -c str
  -d str

# python cmd.py --arg1 123 --arg2 345 call1 -c hello -d world
hello {'a': '123', 'b': '345'} c=hello, d=worldUsage(multi)importsysimportobj2cliclassA:def__init__(self,a,b):self.a=aself.b=bdefcall1(self,c,d):print("hello{}:{}, c={}, d={}".format(self.__class__.__name__,self.__dict__,c,d))classB(A):passif__name__=="__main__":obj2cli.main_cls({A:A,B:B},sys.argv[1:])Usage(cli)# obj2cli --module os.path --function basename -- --help
usage: basename [-h] [-p str]

Returns the final component of a pathname

optional arguments:
  -h, --help  show this help message and exit
  -p str

# obj2cli --module os.path --function basename -- -p /usr/bin/ls
ls

# obj2cli --module logging --function warning --positional -- --help
usage: warning [-h] str [str [str ...]]

Log a message with severity 'WARNING' on the root logger. If the logger has no
handlers, call basicConfig() to add a console handler with a pre-defined format.

positional arguments:
  str
  str

optional arguments:
  -h, --help  show this help message and exit
# obj2cli --module logging --function warning --positional -- "hello %s" "world"
2020-01-04 23:16:05,264 WARNING hello worldLinkspypicoveragelocal pypi repo
Package: obj2html
You can use that lib to create html file from a .obj path:fromobj2htmlimportobj2htmlobj2html('model.obj','index.html')# firefox index.htmlUse in a Jupyter notebook to display a .obj 3D file:!pipinstallobj2html!wgethttps://gitlab.com/nicolalandro/obj2html/-/raw/main/test/assets/model.objfromobj2htmlimportobj2htmlfromIPython.displayimportdisplay,HTMLobj2html('model.obj','index.html')display(HTML('index.html'))Use in streamlit app to display a .obj 3D file and create download button:importstreamlitasstimportstreamlit.components.v1ascomponentsfromobj2htmlimportobj2htmlhtml_string=obj2html("model.obj",html_elements_only=True)components.html(html_string)withopen("model.obj")asf:st.download_button('Download model.obj',f,file_name="download_name.obj")It is also possible to set the scale factor, light and camera options:camera={"fov":45,"aspect":2,"near":0.1,"far":100,"pos_x":0,"pos_y":10,"pos_z":20,"orbit_x":0,"orbit_y":5,"orbit_z":0,},light={"color":"0xFFFFFF","intensity":1,"pos_x":0,"pos_y":10,"pos_z":0,"target_x":-5,"target_y":0,"target_z":0,},obj_options={"scale_x":30,"scale_y":30,"scale_z":30,}obj2html('model.obj','index.html',camera,light,obj_options)
Package: obj2mjcf
obj2mjcfobj2mjcfis a CLI for proccessing composite WavefrontOBJfiles for use inMuJoCo. It automatically:Splits an OBJ file into sub-meshes that are grouped by the materials referenced in the OBJ's MTL fileGenerates an MJCF XML file that is pre-filled with materials, meshes and geom elements referencing these OBJ filesOptionally generates a collision mesh by performing a convex decomposition of the OBJ usingCoACDobj2mjcfwas used to process model meshes forMuJoCo Menagerie:MotivationAs of June 2022, MuJoCo does not support composite OBJ files consisting of groups or objects (oorgOBJ tags) and only 1 material can be assigned per mesh. This means that you have to manually split your OBJ file into sub-meshes, a process that is tedious and error-prone. This tool is meant to automate this process.InstallationImportant.MuJoCo support for OBJ files is only available in versions 2.1.2 and above. Make sure you upgrade to the latest version via theReleases page.The recommended way to install this package is viaPyPI:pipinstall--upgradeobj2mjcfUsageType the following at the command line for a detailed description of available options:obj2mjcf--help
Package: obj2stl
obj2stlThis project aims to be a simple and lightweight 3D model format converter fromobjtostlThis project is written in python3.InstallusageList of all supported formatsInstallsudo pip install obj2stlusagefrom obj2stl import obj2stl

obj2stl.convert(input='sample.obj',output='sample2.stl')FormatsHere is the list of all the supported formatsWavefront.objSTL files.stl