Saravanan666/pypi-org huggingface dataset:
Package: sc2-env
A StarCraft II bot gym env library over python-sc2This library providepython-sc2as agymenvironment.
So you benefits both from the sc2.BotAI and gym.Env classes to train your bot using existing algorithms.This library (currently) covers only the raw scripted interface.At this time I don't intend to add support for graphics-based interfaces.Documentationclass Sc2Env(gym.Env)definit(self, map, bot_race, get_opponents, **kwargs):mapstrupper camel case name of an installed map (ex: KingsCoveLE)bot_racestrrace of the bot (ex: Zerg)get_opponentsCallablethe opponents of the botreturns alistofAbstractPlayer(BotAI, Player...)initializerCallableCalled on start, must set BotAI.action_space and BotAI.observation_space.
The defined spaces must inherit from gym.spaces.space.Space.example:'''python
def initializer(bot):
bot.action_space = gym.spaces.Box(5,10)
bot.observation_space = gym.spaces.Box(3,11)
'''observer:asyncCallableCalled on step takes asc2.BotAIinstance, must return an observation and a reward.
An observation is anumpy.arraymatching the observation space and a reward isnumber.actuator:asyncCallableCalled on step, takes asc2.BotAIinstance and an action.
An action is anumpy.arraymatching the action space.
Used to run actions using in sc2.**kwargsanysc2.run_game extra argumentsMore on sc2.BotAIhere.InstallationBy installing this library you agree to be bound by the terms of theAI and Machine Learning License.You'll need Python 3.6 or newer.pip3install--user--upgradesc2-envYou'll also need an StarCraft II executable. If you are running Windows or macOS, just install the normal SC2 from blizzard app.The free starter edition works too.. Linux users get the best experience by installing the Windows version of StarCraft II withWine. Linux user can also use theLinux binary, but it's headless so you cannot actually see the game.You probably want some maps too. Official map downloads are available fromBlizzard/s2client-proto. Notice: the map files are to be extracted intosubdirectoriesof theinstall-dir/Mapsdirectory.RunningAfter installing the library, a StarCraft II executable, and some maps, you're ready to get started. Look at the dummy bot example!python3examples/dummy_bot.pyIf you installed StarCraft II on Linux with Wine, set theSC2PFenvironment variable toWineLinux:SC2PF=WineLinuxpython3examples/dummy_bot.py
Package: sc2monitor
sc2monitorPython (>=3.7) script that when executed regularly keeps track of medium amount StarCraft 2 accounts on the 1vs1 ladderInstallationInstall this Python 3 package viapipby executingpip install sc2monitorExecutionTo collect data run the following script regularly (every 5-15 minutes), e.g. via cronjob:importsc2monitorsc2monitor.init(host='db-host',user='db-user',passwd='db-password',db='db-database',protocol='db-protocol',apikey='your-bnet-api-key',apisecret='your-bnet-api-secret')sc2monitor.run()Your API-keyyour-bnet-api-keyand secretyour-bnet-api-secrethave to be created by registering an application athttps://develop.battle.net/access/and have to be passed only once or when you want to change them. If not specifiedmysql+pymysqlwill be used as database protocol - other protocol options can be found athttps://docs.sqlalchemy.org/en/latest/dialects/.If not executed regularly the script will try to make an educated guess for games played since the last execution.At execution a protocol will be automatically logged to the database.You can add and remove players to the monitor by passing their StarCraft 2 URL:# Adding a playersc2monitor.add_player('https://starcraft2.com/en-gb/profile/2/1/221986')# Removing a playersc2monitor.remove_player('https://starcraft2.com/en-gb/profile/2/1/221986')DataThe collected data (including statistics) can be accessed via the database tables.
Package: sc2replay-lib
Starcraft 2 Replay LibraryThis is a simple library that currently parses the fundamental structure and information
of a .SC2Replay file and returns some general information.Information includes: Win/Loss, player teams, colors, races, and such.InstallationTo install simply run>>> python setup.py installor>>> pypi install sc2replay-libExamplesFor examples and getting started please take a look at themain.pyfile ormy GitHub repository
Package: sc2replaystats-uploader
sc2replaystats_uploaderScript to automatically upload new StarCraft II replays appearing in a
directory to sc2replaystats.Free software: MIT licenseDocumentation:https://sc2replaystats-uploader.readthedocs.io.InstallationJustpip install sc2replaystats_uploader!UsageThe parameters are documented:dominik@dell ~/Code/sc2replaystats_uploader % sc2replaystats_uploader --help                                                                                                             [0]
Usage: sc2replaystats_uploader [OPTIONS]

  Console script for sc2replaystats_uploader.

Options:
  --auth TEXT     sc2replaystats authorization key; find it in
                  https://sc2replaystats.com/account/settings -> API Access
                  [required]

  --path PATH     Directories in which to find replays. You can put multiple
                  such options here. If using multiple in an environment
                  variable, separate them with a colon ':'.  [required]

  --help          Show this message and exit.You can either put them in as flags:sc2replaystats_uploader --auth "AUTHKEYGOESHERE" --path "EU_REPLAY_DIR" --path "US_REPLAY_DIR"Or you can use environment variables:export SC2REPLAYSTATS_AUTH="AUTHKEYGOESHERE"
export SC2REPLAYSTATS_PATH="EU_REPLAY_DIR:US_REPLAY_DIR"
sc2replaystats_uploaderYou can exit through Control-C.Usage with LutrisI launch these scripts with SC2 through Lutris. In "System options", set a path
to a pre-launch script to an executable Bash file containing the following:#!/usr/bin/bash
# do other stuff, Toggl tracking, etc
export SC2REPLAYSTATS_AUTH="AUTHKEYGOESHERE"
export SC2REPLAYSTATS_PATH="EU_REPLAY_DIR:US_REPLAY_DIR"
sc2replaystats_uploaderThen, to shut the script down, have a post-exit script that goes#!/usr/bin/bash
pkill -f sc2replaystats_uploaderCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-08-25)First release on PyPI.
Package: sc2-tournament-analysis
Replay Parsing for Tournament Replay PacksThis is a script for parsing tournament replay packs. It recursively searches sub-directories for replay files, then parses the replays using theZephyrus Replay Parser.You can inject a function to analyze output data. Analyzed data is aggregated and stored, then exported as JSON.Information from directory names such as group, BoX and player names can be also be parsed and associated with replay data.Installation and UsageThis script is hosted on PyPI and can be installed with pippip install recursive_parseTherecursive_parsefunction is imported by defaultimport recursive_parseRequired ArgumentsThere are 2 required keyword arguments for the function:sub_diranddata_function.sub_dirspecifies the relative path of the replays you want to parse from the location of the scriptdir/
  analysis.py <-- recursive_parse called here
  replays/
    ...

sub_dir = 'replays'data_functionis a function supplied by the user to analyze output data from parsed replays. Returned data is appended to a list which is exported as JSON after all replays have been parsed.You can access all the information available from parsed replay (players, timeline, stats, metadata) as well as enclosed information in your supplied function viakwargs. This includes default values and any information parsed from directory names.Defaults currently available areignore_unitsandmerge_units.ignore_unitsis a list of temporary unit which are usually not wanted.merge_unitsis a dictionary in the format of<unit name>: <changed name>. It can be used to merge information from different unit modes or to re-name a unit, such asLurkerMP-->Lurker.Optional Argumentsrecursive_parsetakes 2 optional keyword arguments:player_matchandidentifiers. Both are RegEx patterns that parse information from directory names.player_matchis specifically for parsing player names from directories. It takes a list of tuples of RegEx patterns and the type of search to perform.Ex:(<pattern>, <search type>)You can choose betweensearchorsplitfor search type, but the last pattern must be asplitto separate the player names.The default patterns are:standard_player_match = [
    ('\\w+ +[v,V][s,S]\\.? +\\w+', 'search'),
    ('.vs\\.?.', 'split'),
]identifiersis for parsing information from directory names. It contains a list of tuples of RegEx patterns and the chosen name of the pattern. It has no default patterns.Ex:(<pattern name>, <pattern>)The list of tuples can be accessed throughkwargs['identifier']in yourdata_function.ExampleThehsc_analysis.pyfile is an example of usage for replay files from HSC XX.Theparse_datafunction loops through each player's units and buildings that were created during the game and records information about the unit/building and game. It also indentifies and stores groups that players were in.Exporting DataData is exported as JSON to a JSON file by default, but you can use thejson_to_csv.pyfile to create a CSV file from the JSON data.In future there will be an option to define a data schema as an argument forrecursive_parse.
Package: sc3
SuperCollider library for PythonThis project is a port of core features of SuperCollider's language to Python 3. It is intended to be the same library in a different language and to keep sclang elegance in a pythonic way (if possible).The main reason for this port is Python's capacity of interaction with other libraries applicable to composition, sonic-art and research. My wish is for this project to be useful for the SuperCollider community.Note that this project is still under development and there are missing parts, bugs you are welcome to report, and documentation is under construction. The best way to learn about SuperCollider is going to thesource.ExamplesThe idea is that you can write the same in Python as in sclang, with the same logic regarding multichannel expansion, arguments conversion to Control ugens, etc., it should be the same result. For example:fromsc3.allimport*s.boot()@synthdefdefsine(freq=440,amp=0.1,gate=1):sig=SinOsc(freq)*ampenv=EnvGen(Env.adsr(),gate,done_action=2)Out(0,(sig*env).dup())sine.dump_ugens()Wait for boot...n=Synth('sine')n.set('amp',0.05)n.set('freq',550)s.dump_tree(True)n.release()# s.free_nodes()  # If something went wrong free all nodes.s.quit()# Stop server at the end of interactive session or just quit ipython.More examples can be found as python notebooks in the following repo:https://github.com/pabloriera/SC3_notebooksInstallDepending on your operating system you may need to usepython3andpip3commands instead ofpythonandpip.From source using pip (recomended by now):pipinstallgit+https://github.com/smrg-lm/sc3.gitOr with optional MIDI support:pipinstall"sc3[midi] @ git+https://github.com/smrg-lm/sc3.git"From source in develop mode (having a clone of this repo already):pythonsetup.pydevelopFor optional MIDI support also install mido and rtmidi backend:pipinstallmidopython-rtmidiFrom PyPI (usually outdated by now, there will be a more stable beta version soon):pipinstallsc3# [midi] or [midi-nrt] for MIDI support, the nrt variant# installs mido but not the driver.LicenseThe sc3 library is free software available under Version 3 of the GNU General Public License. SeeCOPYINGfor details.NB: The sc3 library is a Python translation of the SuperCollider's library and inherits its same license and community guidelines.
Package: sc3microapi
sc3microapiMicro web service for SeisComP3 systemsOverviewIn order to integrate systems running SeisComP3 with other systems or tools
is important to expose at least some basic information related to the system
in operation. For instance, which networks and stations are present in the
inventory with some attributes that are not visible through the FDSN Station-WS.Some other internal data, like access control lists, are important for other
systems providing data. Thus, the permissions can be managed in SC3 and used in
many other places, offering the operator a single management point.API SpecificationFull OpenAPI specification can be seenhere.
Package: sc3nb
sc3nbsc3nb is a python package that offers an interface to SuperCollider3 (SC3), with special support to be used within jupyter notebooks.DocumentationSource codeBug reportsThe goal of sc3nb is to facilitate the development of auditory displays and interactive sonifications by teaming uppython (and particularly numpy, scipy, pandas, matplotlib etc.) for data scienceand SuperCollider3 for interactive real-time sound rendering.
​It allows:to interface with the SuperCollider audio server (scsynth) aswell as the SuperCollider Language and Interpreter (sclang) via the SC classThe SuperCollider audio server can be started and addressed viaOSC directly with OSC messages and bundlesPython implementations of Classes from SuperCollider likeSynth,SynthDef,BufferandBustheScoreclass for non-realtime synthesisuse the SuperCollider language (sclang) interactively via a subprocess.write SuperCollider language code in Jupyter Notebooks and let sclang evaluate it.inject Python variables into your sclang codeget the results of the sclang code in Pythonhelper functions such as linlin, cpsmidi, midicps, clip, ampdb, dbamp which work like their SC3 counterparts.sc3nb can be used formulti-channel audio processingauditory display and sonificationsound synthesis experimentaudio applications in general such as games or GUI-enhancementssignal analysis and plottingcomputer music and just-in-time music controlany usecase that the SuperCollider 3 language supportsIt is meant to grow into a backend for a sonification package, and can be used both from jupyter and in standard python software development.InstallationTo use sc3nb you need a installation of SuperCollider on your system. SeeSuperCollider Downloadfor installation files.To install sc3nb you caninstall it locally in editable mode (i.e. changes to sc3nb code will automatically be "re-installed").clone the repository fromhttps://github.com/interactive-sonification/sc3nbfrom inside the sc3nb directory runpip install -e .or install it directly from PyPI usingpip install sc3nbExamplesWe provide examples in the form of Jupyter notebooks. You see them executed in the User Guide section of thedocumentationand also download them from thesc3nb examples folder.Publications & CitationA paper introducing sc3nb can be found athttps://doi.org/10.1145/3478384.3478401The belonging supplementary material can be found athttps://doi.org/10.4119/unibi/2956379The presentation of the paper can be found athttps://www.youtube.com/watch?v=kuZZSNCS53EIf you use sc3nb please cite the sc3nb introduction paperhttps://doi.org/10.1145/3478384.3478401
Package: sc8pr
sc8prAn educational programming package forPython 3. Inspired byScratchandProcessing,sc8pr’s aim is to make it easy for new and experienced Python programmers to create animations, games, and other graphics-based programs.sc8pr 3features include:a simple, event-driven approach to creating interactive animationssprite managementphysics-based collisionsvideo effects / transitionsa selection of GUI controlscurve plottingrobotics simulatorFor more information, please see thetutorial and reference.InstallationLatest stable release (3.0) including extras with additional dependencies:pip3 install sc8prxLatest stable release (3.0), core features that depend only onpygame:pip3 install sc8prAlternatively, you can downloadsc8prfrom GitHub and run it from the source code. Ensure thatpygame 2is installed!See the documentation for moredetailed instructions.
Package: sca2d
SCA2D - Static Code Analysis for SCADThis is an experimental linter for OpenSCAD. The focus is to properly lex the.scadfiles so that we can test for dangerous code like redefining variable from other scopes. SCA2D is in a very early stage of development.How to installIf you have Python 3.6 or later installed on your machine (and on the PATH) you can install SCA2D from PyPi by running the following command from a terminalpip install sca2dto upgrade your current versions of SCA2D run:pip install sca2d --upgradeYou can check that SCA2D is installed by running the following:sca2d -hyou should see a help screen.Install issuesIf you have problems with installation possible problems include:You may need to runpip3instead ofpipPython may not be on the PATH, this often happens in Windows depending on how python was installedHow to runTo analyse a.scadfile run:sca2d filename.scadThis will print any code messages to the screen.To analyse all.scadfiles in a directory run:sca2d directory_pathThis will also print any code messages to the screen.If you wish to inspect the parse tree that SCA2D generates and then uses you can instead run:sca2d --output-tree filename.scadthe tree will be printed into a file calledfilename.sca2d.What worksParsing most.scadfiles. We don't yet do extensive testing. Please raise an issue if you find a parsing error in SCA2D.Parsing included and used.scadfiles and checking variable, function, and module usage in different scopes.Checking for a minimal number of code errorsHow to get involvedThe best way to get involved is to find bugs and thenopen an issue. You could also make changes and open a merge request.
Package: sca3300
SCA3300 Driver PackageSCA3300 3-axis accelerometer Linux driver Python3 package.RequirementsPython 3.5+ (package uses static typing.)Linux (i.e Raspberry Pi orhttps://github.com/TCAllen07/raspi-device-mocks)InstallationPyPihttps://pypi.org/project/sca3300/You can install viapip install sca3300From SourceClone repogit clone https://github.com/algebratech/sca3300-driverInstallpython3 setup.py install --userUsageimporttimefromsca3300importSCA3300,Modesdefmain():sca=SCA3300()sca.mode=Modes.MODE_3whileTrue:print(sca.acceleration)time.sleep(0.02)if__name__=='__main__':main()
Package: sca3s-cli
SCA3S: command-line interfaceActing as a component part of the widerSCARVproject,
SCA3S is a collection of resources that support the development
and analysis of cryptographic implementations wrt.side-channel attack:
SCA3A is, more specifically, pitched as offering
"side-channel analysis as a service":
it allows users to acquire and analyse side-channel data-sets which stem
from execution of their implementation, without (necessarily) owning or
operating the associated infrastructure.
Mirroring the goals of SCARV, it places particular emphasis on analogue
side-channels (e.g., power and EM) stemming fromRISC-V-based
platforms.
The mainrepositoryacts as a general container for associated resources;
this specific submodule houses
aCLIwhich allows interaction with the front-end infrastructure without using the web-based UI.Organisation├── bin                     - scripts (e.g., environment configuration)
├── build                   - working directory for build
├── extern                  - external resources (e.g., submodules)
│   └── wiki                  - submodule: scarv/sca3s-cli.wiki
└── src
    └── sca3s
        └── cliInstallationpipinstallsca3s_cliConfigurationSCA3S CLI links to a pre-existing SCA3S account via an API token which can be obtained via the user profile page.Once a token is obtained andsca3s-cliinstalled, edit the config file in~/.sca3s/configas follows:[default]tokenThis will link the cli to your SCA3S account. If you possess multiple SCA3S accounts you can add additional tokens
with friendly names to the config file and utilise these tokens via thescopeparameter in the cli.Questions?read thewiki,raise anissue,raise apull request,drop us anemail.AcknowledgementsThis work has been supported in partby EPSRC via grantEP/R012288/1(under theRISEprogramme),
andby theAWS Cloud Credits for Researchprogramme.
Package: scAAnet
Single-cell archetypal analysis neural network (scAAnet)scAAnet is an autoencoder-based neural network which can perform nonlinear archetypal analysis on single-cell RNA-seq data. The underlying assumption is that the expression profile of each single cell is a nonlinear combination of several gene expression programs [1] (GEPs) with each program corresponds to an archetype in the archetypal analysis. The purpose of scAAnet is to decompose an expression profile into a usage matrix and a GEP/archetype matrix. From the usage matrix, we can know how much a cell utilizes different GEPs and from the GEP matrix we will be able to quantify the relative importance of genes in each GEP. One novelty of this method is to make use of the nonlinearity of neural network to take into consideration the complex interaction among genes. Another novelty is that the negative log-likelihood of some discrete distribution (Poisson, zero-inflated Poisson, negative binomial, or zero-inflated negative binomial distribution) is used as the reconstruction loss instead of the traditional MSE loss. This is because single-cell RNA-seq data is a type of count data.More details about scAAnet can be found in ourmanuscript.UsagescAAnet is implemented in Python. To use scAAnet, TensorFlow 2, numpy and pandas are required. A virtual environment is recommended to be used for installing these packages. You can create a virtual environment and install packages as follows:Create a virtual environment bypython3 -m venv ./venv(./venv can be changed to your path).Activate the virtual environment bysource ./venv/bin/activate.Install required packages bypip install --upgrade tensorflow(numpy wil be installed together with tensorflow) andpip install pandas.Then you can use scAAnet after activating the virtual environment. Here is an example of running scAAnet:from scAAnet.api import scAAnetre = scAAnet(count, hidden_size=(128, K, 128), ae_type='zinb', epochs=200, batch_size=64, early_stop=100, reduce_lr=10, learning_rate=0.01)recon, usage, spectra = re['recon'], re['usage'], re['spectra']The inputcountvariable is single-cell expression raw count data with N cells and G genes andKis the number of archetypes/GEPs. The inputcountcan be a pandas dataframe, a numpy array, or an AnnData object. Note thatrecon,usageandspectraare reconstructed expression count data (N by G), the usage matrix (N by K) and the archetype matrix (K by G) of the input count data, respectively. The argument ae_type can be chosen from poisson, zipoisson, nb and zinb.More details about how to use scAAnet can be found in thistutorialon simulated data based on Splatter鈥檚 [2] framework. Analysis code for the manuscript and more usage of scAAnet can be found in thisfolder.References[1]: Kotliar, Dylan, et al. "Identifying gene expression programs of cell-type identity and cellular activity with single-cell RNA-Seq." Elife 8 (2019).[2]: Zappia, Luke, Belinda Phipson, and Alicia Oshlack. "Splatter: simulation of single-cell RNA sequencing data." Genome biology 18.1 (2017): 174.