Saravanan666/pypi-org huggingface dataset:
Package: wosclient
Web of Science API ClientWeb of Science Article Match Retrival Client for Python 3.6 by IPLweb.This product is not endorsed or connected with Clarivate Analytics in any way.Free software: MIT licenseDocumentation:https://wosclient.readthedocs.io.Featuresquery the Article Match Retrival API of Web of Science Core Collection,internally usesrequeststo handle web traffic andgeneratorsto save
memory,Clickfor handling of the command-line,supports Python 3.6.Example usePlease review the original README file athttps://github.com/Clarivate-SAR/wos-amr.wosclientmodule, after installation, provides a command calledlookup_idswhich should behave in a similar way, as thelookup_ids.pyexample in original
module in Clarivate-SAR repo. There are some minor improvements, though,
like the outfile is stdout by default, you can pass username and password
in the command line, check it out:$lookup_ids--help(env:wosclient)2↵Usage:lookup_ids[OPTIONS]INFILEOptions:--outfilePATH--passwordTEXTAPIpassword--userTEXTAPIusername--helpShowthismessageandexit.$# These are completely optional, you will be prompted:
# export WOS_USER=username
# export WOS_PASSWORD=Password$lookup_idstests/example.csvUser[username]:Password[password]:id,ut,doi,pmid,timescited,source# ... after a second0,WOS:000276621200002,10.1016/j.bbr.2009.10.030,19883697,123,http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000276621200002&DestLinkType=FullRecord&DestApp=ALL_WOS&UsrCustomerID=536ab1eb96204d8944f0b2ff5513dbea1,WOS:000299789100009,10.1080/09602011.2011.621275,22011016,40,http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000299789100009&DestLinkType=FullRecord&DestApp=ALL_WOS&UsrCustomerID=536ab1eb96204d8944f0b2ff5513dbea2,WOS:000300816600006,10.1016/j.neuropsychologia.2011.12.011,22223077,25,http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000300816600006&DestLinkType=FullRecord&DestApp=ALL_WOS&UsrCustomerID=536ab1eb96204d8944f0b2ff5513dbeaCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-04-18)First release on PyPI.
Package: wosfile
wosfilewosfileis a Python package designed to read and handle data exported from Clarivate AnalyticsWeb of Science™. It supports both tab-delimited files and so-called ‘plain text’ files.The point of wosfile is to read export files from WoS and give you a simple data structure—essentially a dict—that can be further analyzed with tools available in standard Python or with third-party packages. If you're looking for a ‘one-size-fits-all’ solution, this is probably not it.Pros:It has no requirements beyond Python 3.6+ and the standard library.Completely iterator-based, so useful for working with large datasets. At no point should we ever have more than one single record in memory.Simple API: usually one needs just one functionwosfile.records_from().Cons:Pure Python, so might be slow.At the moment, wosfile does little more than reading WoS files and generatingRecordobjects for each record. While it does some niceties like parsing address fields, it does not have any analysis functionality.ExamplesThese examples use a dataset exported from Web of Science in multiple separate files(the maximum number of exported records per file is 500).Subject categories in our dataimportglobimportwosfilefromcollectionsimportCountersubject_cats=Counter()# Create a list of all relevant files. Our folder may contain multiple export files.files=glob.glob("data/savedrecs*.txt")# wosfile will read each file in the list in turn and yield each record# for further handlingforrecinwosfile.records_from(files):# Records are very thin wrappers around a standard Python dict,# whose keys are the WoS field tags.# Here we look at the SC field (subject categories) and update our counter# with the categories in each record.subject_cats.update(rec.get("SC"))# Show the five most common subject categories in the data and their number.print(subject_cats.most_common(5))Citation networkFor this example you will need theNetworkXpackage. The data must be exported as ‘Full Record and Cited References’.importnetworkxasnximportwosfile# Create a directed network (empty at this point).G=nx.DiGraph()nodes_in_data=set()forrecinwosfile.records_from(files):# Each record has a record_id, a standard string uniquely identifying the reference.nodes_in_data.add(rec.record_id)# The CR field is a list of cited references. Each reference is formatted the same# as a record_id. This means that we can add citation links by connecting the record_id# to the reference.forreferenceinrec.get("CR",[]):G.add_edge(rec.record_id,reference)# At this point, our network also contains all references that were not in the original data.# The line below ensures that we only retain publications from the original data set.G.remove_nodes_from(set(G)-nodes_in_data)# Show some basic statistics and save as Pajek file for visualization and/or further analysis.print(nx.info(G))nx.write_pajek(G,'network.net')Other Python packagesThe following packages also read WoS files (+ sometimes much more):WOS+metaknowledgewostoolsOther packages query WoS directly through the API and/or by scraping the web interface:pywos(elsewhere calledwos-statistics)woswosclient
Package: woshi
woshiOn-the-go HTML Abstraction and Generator for Python.Woshi is simple, it abstracts XML nesting and leverages CSS3 selectors to append elements into the HTML document!Version 2.0 is a breaking upgrade, which means the general usage and the internal algorithms were change to make it more flexible and lighter. The package lxml was removed in favor of a custom-made builder function. Only simple CSS3 selectors are supported, but will add support in the upcoming versions.Here's a sample syntax:page["tag#id"]="tag #id.class property='10' > inner text"And scroll down below for more examples.Official ReleaseCurrent version is 2.0, but more updates are coming soon. Compatible with Python 3.10 or later.pip install woshiUsageImport PackagefromwoshiimportWoshiInitializationpage=Woshi()# initializing with a valid HTML textpage=Woshi("<div></div>")# setting up filenamepage=Woshi(filepath="home.html")Creating elements with an inner textpage["head"]="title > Woshi v1.0"Creating other elementsBasically, you set the parent selector to append the new element.# create container boxpage["body"]="div #content"page["#content"]="div #box.container.light"# create the popup textpage["#box"]="div #title.header > Woshi"page["#box"]="div .message data-default='Lorem ipsum...' > Hello, world!"# populate the action buttonspage["#box"]="div #action.btn-list"page["#action"]="button #btn1.btn.btn-no style='background-color:#b22222;color:#fff;' > CLOSE"page["#action"]="button #btn2.btn.btn-maybe > LATER"Setting Propertiespage["html"]="lang=en"page["body"]="#canvas"Yield all matchesformatchinpage["button"]:print(match)Save to HTML filepage.save()page.save("newFile.html")
Package: wosPyFile
PyFilePyFile is a simple library which provides you some funcionalities for file reading and writing.Installfrom wosPyFile import pyFileFilesPyFile is effective on simple text files, let's see some examples:ReadingRead allThis will return all linespyFile.read("file.txt")Read with conditionsThis will return only lines that begins with the list elementspyFile.read("file.txt", ["AAA", "BBB", "CCC"])Extracting data from linesLet's assume that we have a variable calledlinewith the value bellowABC1234567To extract data from this line, you can use pyFile.getLineData(), the second parameter is responsible to split the line in list elementspyFile.getLineData(line, [3,10])Output:["ABC", "1234567]MatrixIf you have a defined range you can use pyFile.generateMatrix()data = []
collumns = 240
size = 2
matrix = pyFile.generateMatriz(collumns, len(lines), size)
for index, line in  enumerate(lines):
    pyFile.getLineData(line, matrix[index])A list element will be generated according with the interval defined insize
Package: wos-search-service
wos-search-serviceWOS Search Service is a RESTful web service that provides access to the Web of Science (WOS) citation data.
It use Web of Science SOAP API to access WOS data. You need premium API account in order use this service.Mantis Software Company has no relation with Thomson Reuters, Web of Science and Web of Science WWS API.
This web service is just a wrapper, was built top onwos python package.
Seethis sectionfor more information.Currently , the service supports the following WOS search queries:Author search (with combinations of author name)Environment Variables__SERVICE_WOS_USER: Username to access WOS SOAP API__SERVICE_WOS_PASSWORD: Password to access WOS SOAP API
Package: wos-tabfile
WoS Tab FileExtract information from the exported Web of Science's tab delimited text fileInstallationpip install wos-tabfileBasic UsageRetrieve publication year and numbers of citations in different indicators.fromwostabfile.coreimportWosTabFilefromcollectionsimportOrderedDict# data sourceroot_path="data/social network"file_path=root_path+"/part1.txt"# header fields in the text file# Tag from: https://images.webofknowledge.com/images/help/WOS/hs_wos_fieldtags.htmlwos_fields=["PY","NR","TC","U1","U2"]# load data by specific keyswtf=WosTabFile(file_path=file_path)table=wtf.generate_table(wos_fields)print()# group by year using count for numbers of publications per yearnew_table=wtf.group_by(table,key_index=0,value_index=1,method="count")new_table=OrderedDict(sorted(new_table.items()))print("Year\tNumber of publication")foryearinnew_table:print(f'{year}\t{new_table[year]}')Retrieve keywords and its frequency from the bibliometric datafromwostabfile.coreimportWosTabFilefromnltk.stemimportWordNetLemmatizerfromnltk.tokenizeimportword_tokenizeroot_path="data/social network"wos_fields=["DE"]wtf=WosTabFile(file_path=root_path)dict_words={}defsingularize(text):wnl=WordNetLemmatizer()tokens=[token.lower()fortokeninword_tokenize(text)]lemmatized_words=[wnl.lemmatize(token)fortokenintokens]return(' '.join(lemmatized_words)).strip()defprocess_row(rows):globaldict_wordsforksinrows:wlist=ks[0]forwinwlist.split(";"):w=w.strip()ifw=="":continuew=singularize(w)ifwnotindict_words.keys():dict_words[w]=1else:dict_words[w]+=1table=wtf.generate_table_by_folder(wos_fields,func=process_row)dict_words=dict(sorted(dict_words.items(),reverse=True,key=lambdaitem:item[1]))print("Word\tTerm Count")forkinlist(dict_words.keys())[:20]:print(f'{k}\t{dict_words[k]}')print()print("Number of unique words: ",len(dict_words.keys()))Sample bibliometric data in the above examples can be downloaded in thislink.LicenseThewos-tabfileproject is provided byDonghua Chen.
Package: wostools
Python WoS toolsTranslates ISI Web of Knowledge files into python objects.QuickstartInstall the library by:$pipinstallwostoolsSay you want to grab the title of all the articles in an ISI file, you
can grabthis example file.>>>fromwostoolsimportCached>>>collection=Cached.from_filenames('docs/examples/bit-pattern-savedrecs.txt')>>>forarticleincollection:...print(article.title)Insitugrazingincidencesmall-angleX-rayscatteringstudyofsolventvaporannealinginlamellae-formingblockcopolymerthinfilms:Trade-offofdefectsindeswellingStructuralcontrolofultra-fineCoPtnanodotarraysviaelectrodepositionprocessPorphyrin-basedPt/Pd-containingmetallopolymers:Synthesis,characterization,opticalpropertyandpotentialapplicationinbioimagingSynthesesandControllableSelf-AssemblyofLuminescencePlatinum(II)Plane-CoilDiblockCopolymers# ...Never fear wostools cli is here. To help you do some common tasks right
from your terminal.$wostools--help
$# To extract all the properties in a json file$wostoolsto-jsondocs/examples/bit-pattern-savedrecs.txt--output=document.jsonFeaturesFree software: MIT licenseParses an ISI Web of Knowledge file and produces a native python object.Parses RIS scopus files and produces a native python object.Merges ISI and RIS files into enriched collections.It has a cli to extract documents and citation pairs for you :smile:CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.Development of this package is supported byCore of Science.History3.0.2 (2020-10-15)Fix packaging accident to allow package to install correclty.3.0.1 (2020-10-15)Clear logging error channel.3.0.0 (2020-10-15)(!) Adds scopus RIS format support.Drops support forLazyCollection.Adds docummented support for Python 3.8 and 3.9Drops docummented support for Python 3.6.Improves article matching in collections.2.0.7 (2020-08-23)Remove from the collection those documents whose label is unknow or conflictive.2.0.6 (2020-08-21)Accomodate for unknown fields in ISI WOS files.2.0.5 (2020-08-15)Fix and prevent distribution accidents.2.0.4 (2020-08-15)Add issue to the articles plain dict output.Fix some bugs with issues.2.0.3 (2020-08-15)Add issue to the articles top level.2.0.2 (2020-08-09)Fix bug with first author merging articles.Remove instances where we inherit fromobject.2.0.1 (2020-08-09)Fix error with wos files that have an invisible character before the field
key.2.0.0 (2020-08-08)Make the article class more concreteMake collections iterableAdd cached and lazy collections for different use cases0.2.0 (2018-08-12)Add support for all WOS fields.Add graph building support.Add a little cli for common tasks.0.1.1 (2018-05-10)First release on PyPI.
Package: wotconsole
IntroductionWOTConsole is a Python module for interacting with the Wargaming’s developer
API, specifically for theWorld of Tanks - Consolegame. It is a tool designed for convenience
and ease-of-use.Why create another API wrapper?While Wargaming offers their own API wrapper, and another was built by a
third-party, they respectively do not have the WOTX (World of Tanks Console)
endpoints or do not have sufficient documentation to understand how to fully
utilize their libraries. As such, I took it upon myself to create one that was
thorough and easy to use.Why not stick withrequests <https://pypi.org/project/requests/>?While therequestslibrary may suffice for
general use, it can be a bit of a pain having to remember what parameters
should be sent and what the URL endpoint is. It’s also inconvenient when
trying to code offline. This module has all of this documented and will track
the URLs for you.Eww, Python!Grow up ;)What can it do?WOTConsole is designed for convenience to the developer. Let’s say that you’re
needing to search for a tank.This module intends to address some of these issues and even those that most
developers may not care for. We can rewrite the code as follows:>>>from__future__importprint_function>>>fromcopyimportcopy>>>fromwotconsoleimporttank_info>>>apikey='demo'# You can specify the platform and language you want.>>>psinfo=vehicle_info(apikey,tank_id='1',fields=['short_name',...'tier','type','nation'],api_realm='ps4',language='ru')# Some parameters accept lists of multiple types>>>xinfo=tank_info(apikey,tank_id=[1,'257'])>>>printtype(psinfo)<class'wotconsole.WOTXResponse'># The data returned was a dictionary; the WOTXResponse will behave as one>>>fortank_id,datainpsinfo.iteritems():...print(tank_id,data)1{u'tier':5,u'type':u'mediumTank',u'short_name':u'T-34',u'nation':u'ussr'}# You can directly access the data using indices>>>print(xinfo['1']['short_name'])T-34>>>print(xinfo['257']['short_name'])SU-85# Should you need to `copy` the data, access it as an attribute>>>copied=copy(xinfo.data)>>>print(type(copied))<type'dict'>>>>try:...vehicle_info(apikey,tank_id='A')>>>exceptWOTXResponseErroraswat:# If an error occurs from bad parameters being sent to the API, the# `Exception` will instead use the error message sent back in the JSON....print(wat)INVALID_TANK_ID# The JSON becomes part of the `Exception`, allowing for debugging even# outside of a method's scope....print(wat.error['code'])407...print(wat.error['field'])tank_id# Both `WOTXResponse` and `WOTXResponseError` save the original# `requests` instance, just in case the developer wishes to review the# parameters, URL, etc....print(type(wat.raw))<class'requests.models.Response'>What improvements will we see?An up-to-date list of planned features will always be in the TODO.rst
file.
Package: wot-datfile-parser-py
World of Tanks Datfile Parser (Python)A parser for.datbattle result files generated by the game World of Tanks..datfiles are generated whenever a battle's results are viewed in-game. For Windows, these files are found in a location like:C:\Users\<YOUR_USER_NAME>\AppData\Roaming\Wargaming.net\WorldOfTanks\battle_resultsThis project simply provides python bindings for the Rust library:wot_datfile_parserInstall with:pip install wot_datfile_parser_pyExample:fromwot_datfile_parser_pyimportDatfileParser# You can use this same parser for any number of datfilesparser=DatfileParser()withopen("9252658313363554.dat","rb")asfile:battle=parser.parse(file)print(battle)Supported WoT Versions1.20.0
Package: wotreplay
World of Tanks - Replay data extract1. DescriptionThe package can extract only the metrics data from World of Tanks replays.
It does not access any data such as tank positions or chat.Data can be extracted only from replays in which the player has waited until the end of the battle. If the player has
quit the battle after dying and the battle was not ended, then only the battle metadata is available (which does not
contain any battle performance / credits / xp data).The replays should be set to be "all" collected and not "last" one recorded.All data extracted can be saved to a local sqlite database.2. UsagepipinstallwotreplayThe package provides the possibility of exploring the data contained within one replay or process all replays in a
directory and store the data in a local database.fromwotreplayimportReplayDatareplay=ReplayData(file_path='path_to_replay/replay_file.wotreplay',db_path='',db_name='',load=False)print(replay.battle_metadata)print(replay.battle_performance)print(replay.common)print(replay.battle_frags)print(replay.battle_economy)print(replay.battle_xp)Process all the replay files and store the results in the databasefromwotreplayimportProcessReplaysProcessReplays.process_all(replay_dir='/path/to/replay/dir',db_path='path/where/to/save/the/database',db_name='wotreplay')This will process the replays sequentially.Note: Once a replay has been processed and added to the database, it will not be processed again to avoid data
duplication.3. CompatibilityThe replays from the following client versions have been tested.Client VersionPassed0.9.21True0.9.22True1.0.0True1.0.1True1.0.2True1.1.0True1.2.0True1.3.0True1.4.0True1.4.1True1.5.0True1.5.1True1.6.1True1.7.0True1.7.1True1.8.0True1.9.0TrueNo replays before 0.9.21 have been tested due to lack of replays available.4. Data TaxonomyExamples of data retrieved:Battle metadata:Battle Metadata FieldsBattle performance:Battle Performance FieldsCommon:Common Data FieldsBattle frags:Battle Frags FieldsBattle economy:Battle Economy FieldsBattle xp:Battle XP Fields5.Access and rightsIf you are using this on any online tools please give the appropriate credit.6.To DoThe extraction of data from replays is more or less complete.
There are a few features to be created in the future to create the aliases of tank names and maps.7. Development5. DevelopmentTo further develop this package please follow the instructions below# Install the virtual environments and packagespython3-mvirtualenv.venvsource.venv/bin/activate
pip3install-rrequirements.txt# Run test suite# Tests contain unittests, coverage and lintingtox
Package: wotw-highlighter
.. image:: https://badge.fury.io/py/wotw-highlighter.svg:target: https://badge.fury.io/py/wotw-highlighter.. image:: https://travis-ci.org/wizardsoftheweb/wotw-highlighter.svg?branch=master:target: https://travis-ci.org/wizardsoftheweb/wotw-highlighter.. image:: https://coveralls.io/repos/github/wizardsoftheweb/wotw-highlighter/badge.svg?branch=master:target: https://coveralls.io/github/wizardsoftheweb/wotw-highlighter?branch=master(if these look broken it's probably because they're connected to ``master`` branch; click through to the current release or ``dev`` results)``wotw-highlighter``==================This generates a block formatted like current editors (Sublime, VS Code) via some opinionated markup decorating Pygments... contents::Overview--------TODOExamples--------TODOThemes------`v0` only includes Monokai support. Eventually I'm going to add a few other defaults and ``.tmTheme`` parsing. Right now I'm just trying to finish a blog post I started three weeks ago that's now spawned three Python packages.Wishlist--------These are things that I'd like to add but don't haven't added yet. It's not a roadmap; I don't have a release schedule.* Logging* ``less`` instead of ``css``* ``tmTheme`` parsing* font conversion* examples* pygit2* parse repo for remote to build links* remote parsing, i.e. ``load_from_url``
Package: wotwrapper
wotwrapper========A python library to wrap python objects onto WotioAbout-----Most APIs are wrapped in python as classes, of which you'd instantiate an object and call it's methods. This library wraps those functions onto the Wotio environment, allowing you to publish data to it, and access the API via s-expressions in JSON.Example:```pythonclass MyClass(object):def getdata(self):return "Some Data"def somefunc(self, param):return "Function called with parameter: {0}".format(param)```Those functions then become available on the bus using the JSON arrays:```javascript["getdata"]["somefunc","param"]```In addition, a function can be used to publish data onto the bus consistently. The wrapper contains a loop that will call a specific function and publish its data periodically. More info below.Getting Started---------------To install, run:```shellpip install wotwrapper```To use it, include it in your project and wrap an object:```pythonimport wotwrapperfrom phue import Bridgeb = Bridge('192.168.24.10')wotwrapper.connect('http://wot.io/account/path', b, b.get_api, 10)```Parameters----------```pythonwotwrapper.connect(path, objectToWrap, sendDataFunction, delay)```- **path:** This is the path for either the HTTP or Websocket endpoint that will be connected to. The path is in the format: `(http|ws)://host/account/in_exchange/in_key/in_queue/out_exchange/out_key/token`- **objectToWrap:** This is the obejct to be wrapped.- **sendDataFunction:** This is the function that provides the data to be published. Note that it does not have to be part of the same object.- **delay:** This specifies the delay, in seconds, between each iteration of the data publishing loop.