Saravanan666/pypi-org huggingface dataset:
Package: maz
MAZA functional programming package.Installpip install mazMain usageFunction compositionYou can usemazto compose function calls such that they call one another in a series.NOTE:functions are called from right to left.>>>importmaz>>>succ=lambdax:x+1>>>add_three=maz.compose(succ,succ,succ)>>>add_three(4)>>>7Partial functionWhen you want to fix a parameter in a function, you could just use thefunctools.partial. However, that doesn't support fixing a positional argument on a specific index, which are quite common later on when you want to build complex compositions. Here you can use themaz.partialposinstead>>>importmaz>>>defadd(x,y):returnx+y>>>add_two=maz.partialpos(add,{1:2})# fixing argument for index 1 to 2 (y=2)>>>add_two(3)>>>5Complex compositionsTo support more complex compositions we've added some special functions such asimportmazimportoperatorimportitertools# "invoke" function - a function calling other functionsdefadd(x,y):returnx+ymaz.invoke(add,[1,2])# >>> 3maz.invoke_star(add,1,2)# >>> 3# "fnmap" function will compute all input functions in a# series with same given argumentsfn=maz.fnmap(add,add,add)fn(1,2)# >>> [3, 3, 3]# "ifttt" returns a new function that checks the input somehow# then does something depending on the result from the checkfn=maz.ifttt(# if x is greater than 3,lambdax:x>3,# then subtract 1 from xlambdax:x-1,# else add 1 to xlambdax:x+1)fn(3)# >>> 4fn(4)# >>> 3# "starfilter" just as itertools.starmap but a filter instead# Example, filter tuples who's sum is greater than 4next(maz.starfilter(maz.compose(lambdai:i>4,add),itertools.product(range(3),range(3,6))))# >>> (0,5)# "constant" returns a function which, no matter the argument, returns a constant value.cnst_fn=maz.constant(True)cnst_fn()# >>> Truecnst_fn(cnst_fn())# >>> TrueOther functionsWe've added atoolsmodule to provide functions that are in the middle of being simple enough to just write it yourself but tideous enough to not do it.frommaz.toolsimportreverse_otm_dict# Reversing a one-to-many relationship mapd=reverse_otm_dict({"a":[1,2,3],"b":[1,2,4],"c":[4,5]})# >>> d# {#     1: frozenset({"a", "b"}),#     2: frozenset({"a", "b"}),#     3: frozenset({"a"}),#     4: frozenset({"b", "c"}),#     5: frozenset({"c"}),# }
Package: mazagui
# MAZAlibCross-platform 2d/3d image segmentation C++ libraryCompliles with: MSVC 14.0 and later, GCC 9.2. Other GCC: not tested yet.
Compatible with C++17Authors: Roman V. Vasilyev, Timofey Sizonenko, Kirill M. Gerke, Marina V. Karsanina
Moscow, 2017-2021## Prerequisites1. Install CMake 3.13 or later. (Or you may lower version requirements by hand to your actual version in all CMakeFiles.txt and hopefully it would work, just not tested yet).
Linux (Ubuntu): sudo apt-get install cmake
Windows:https://cmake.org/download/, add cmake into PATH system variable during installation
2. Install a modern C++ compiler.
Linux (Ubuntu): sudo apt-get install g++
Windows: Visual Studio 2015 or later with C++ tools installed
3. Optionally, for hardware support of non-local means denoising, CUDA-enabled GPU and CUDA toolkit installed## Building(Optionally) make a build subdirectory and move there, for example “build_release”run cmake <relative path to project>, for example “cmake ..” inside build directory. If you’re building project with CUDA support, you can specify compute capability of your GPU (to define the one, go to NVIDIA web site). For example, GeForce GTX 1080Ti has compute capability 6.1, then use following command: “cmake DCMAKE_CUDA_FLAGS=”-arch=sm61” ..”If you have CUDA compiler and NVIDIA GPU, the project automatically configures itself to use GPU for NLM denoising. Otherwise, CPU host code will be usedThen under Linux just run “make”, under Windows open a generated solution file using Visual Studio and build “segmentation_test_exe” project. A library and “segmentation_probny_loshar.exe” will be compiled and builtRun segmentation_probny_loshar under console to check that all is OK## Config file structurewidth height depth
radius VarMethod CorMethod OutFormat
LowThreshold HighThreshold
binary_input_file_name
Package: mazalib
# MAZAlibCross-platform 2d/3d image segmentation C++ libraryAuthors: Roman V. Vasilyev, Timofey Sizonenko, Kirill M. Gerke, Marina V. Karsanina, Andrey A. Ananev
Moscow, 2017-2023## Prerequisites1. Install CMake 3.13 or later. (Or you may lower version requirements by hand to your actual version in all CMakeFiles.txt and hopefully it would work, just not tested yet).
Linux (Ubuntu): sudo apt-get install cmake
Windows:https://cmake.org/download/, add cmake into PATH system variable during installation
2. Install a modern C++ compiler.
Mac OS: /bin/bash -c “$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)” && xcode-select –install
Linux (Ubuntu): sudo apt-get install g++
Windows: Visual Studio 2015 or later with C++ tools installed
Package: maze
mazeWebsiteMaze generator with crossings.Installationpip3installmazeOr install from source:python3setup.pyinstallTo export a 20 by 30 maze SVG and a solution SVG, run:mazesvgmaze.svg-smaze-solved.svg-W23-H30To using python3 directly, change into the directory with the filemaze.pyand run:python3maze.pysvgmaze.svg-smaze-solved.svg-W23-H30will produce:maze.svgmaze-solved.svgUsing the-Soption will produce a maze with no curves e.g.:mazesvgmaze-straight.svg-smaze-straight-solved.svg-W23-H30maze.svgmaze-solved.svgTo generate PDF (currenlty this options doesn't allow solutions to be generated)mazepdfmy_maze.pdfwill produce a pdf.Runmazewithout any arguments to see all options.
Package: mazebox
Mazebox is a suite of tools for analyzing single-cell transcriptomics data.InstallationTo installMazebox, please use:pip install mazeboxDependenciesThedropkickpython package will need to be installed, as seenhere.
Thegraph-toolpython package will need to be installed. This can be installed withConda,homebrew, etc as seen on graph-tool’swebsite.All other dependencies will be installed with this package.Mazebox Usage:
Package: mazeexplorer
MazeExplorerMazeExplorer is a customisable 3D benchmark for assessing generalisation in Reinforcement Learning.Simply put, MazeExplorer makes it easy to create separate training and test environments for your agents.It is based on the 3D first-person gameDoomand the open-source
environmentVizDoom.This repository contains the code for the MazeExplorer Gym Environment along with the scripts to generate baseline results.By Luke Harries*, Sebastian Lee*, Jaroslaw Rzepecki, Katja Hofmann, and Sam Devlin.* Joint first authorThe MissionThe goal is to navigate a procedurally generated maze and collect a set number of keys.The environment is highly customisable, allowing you to create different training and test environments.The following features of the environment can be configured:Unique or repeated mapsNumber of mapsMap Size (X, Y)Maze complexityMaze densityRandom/Fixed keysRandom/Fixed texturesRandom/Fixed spawnNumber of keysEnvironment SeedEpisode timeoutReward clippingFrame stackResolutionAction frame repeatActions spaceSpecific textures (Wall,
ceiling, floor)Data AugmentationExample UsagefrommazeexplorerimportMazeExplorertrain_env=MazeExplorer(number_maps=1,size=(15,15),random_spawn=True,random_textures=False,keys=6)test_env=MazeExplorer(number_maps=1,size=(15,15),random_spawn=True,random_textures=False,keys=6)# trainingfor_inrange(1000):obs,rewards,dones,info=train_env.step(train_env.action_space.sample())# testingfor_inrange(1000):obs,rewards,dones,info=test_env.step(test_env.action_space.sample())InstallationInstall the dependencies for VizDoom:Linux,MacOSorWindows.pip3 install virtualenv pytestCreate a virtualenv and activate itvirtualenv mazeexplorer-envsource maze-env/bin/activateGit clone this repogit clone https://github.com/microsoft/MazeExplorercd into the repo:cd MazeExplorerPull the submodules withgit submodule update --init --recursiveInstall the dependencies:pip3 install -e .Run the tests:bash test.shBaseline experimentsThe information to reproduce the baseline experiments is shown inbaseline_experiments/experiments.md.ContributingThis project welcomes contributions and suggestions.  Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visithttps://cla.microsoft.com.When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.This project has adopted theMicrosoft Open Source Code of Conduct.
For more information see theCode of Conduct FAQor
contactopencode@microsoft.comwith any additional questions or comments.
Package: mazeforge
MazeForgeGeneration of mazes in PythonInstallationYou can installMazeForgefromPyPIby running the following in your terminal.python -m pip install mazeforgeMazeForge is supported on Python 3.7 and above.Documentationclass mazeforge.Maze(width, height)This generates a perfect maze, which means that any two cells are connected by one single unique path. The maze is generated using the prim's algorithm.>>>importmazeforge>>>mazeforge.Maze(width=5,height=5)Maze(width=5,height=5)print()You can print the Maze using the print method.>>>importmazeforge>>>mazeforge.Maze(5,5).print()┌───────┬───────────┐│││├───╴└───╴╷│││││┌───────╴├───┤││││├───┘╷╷╵│││││├───────┘│╷│││││└───────────┴───┴───┘For further use, you may also convert the maze into a string.>>>importmazeforge>>>maze=mazeforge.Maze(5,5)>>>str(maze)'┌───────┬───────────┐\n│       │           │\n├───╴   └───╴   ╷   │\n│               │   │\n│   ┌───────╴   ├───┤\n│   │           │   │\n├───┘   ╷   ╷   ╵   │\n│       │   │       │\n├───────┘   │   ╷   │\n│           │   │   │\n└───────────┴───┴───┘'
Package: mazegen
MazegenMazegen is a python command line tool to generate and solve mazesInstallationpip install mazegenHelpYou can get help information by running-hor--helpmazegen --helpThis will output the following documentationUsage: mazegen [option] [filename] [optional]

OPTIONS:
generate        Generates .maze file
view            Views existing .maze file as an image
solve           Solves a .maze file

OPTIONAL ARGUMENTS:
-s, --save      Save generated .png fileUsageTo generate a pxq maze namedfirst.maze, run the following commandmazegen generate first.mazeTo view the output from a .maze filemazegen view first.mazeTo solve a .maze filemazegen solve first.mazeOptions-sor--savewill save the generated image fileExampleAn unsolved 42x42 mazeSolutionNoteAll mazes start from the top left and end at bottom right
Package: mazegenerator
Maze GeneratorThis program generates a random black and white maze image. The mazes that are generated can be solved withmazesolverInstallingCheck that your python version is >=3.5 withpython3 -V.
Also make sure that pip is installed withpython3 -m pip -V.To install, simply runpython3 -m pip install mazegenerator --useron the command line.You can run the tool usingmazegenerator(unix-based) ormazegenerator.exe(windows).How do I use it?You can usemazegenerator --helpto get a list of commands.Normal usage will look something like this:mazegenerator -x 200 -y 300What are the rules for maze images?Walls marked with black pixels and paths marked with white pixelsWalls around the entire mazeOne entrance on the top row and one exit on the bottom row
Package: maze-gitb
Getting Inside The BoxThis game was developed by the teamBenevolent Bonobos, during theSummer Code Jam 2021held byPython Discord.Teams that participated in the code jam had to create a TUI based on the themeThink Inside the Box.ContentsHow To PlayRequirementsInstallationScreenshotsFuture ImprovementsAbout UsHow To PlayThere are 6 options in start menu:Start: Play the normal levels.Infinite: Never ending gameplay.Tutorial: How to play.CreditsLeaderboardQuitUsearrow keysto move.On starting, a glimpse of the whole maze will be shown. After it disappears, the game will start.Player has to reach&with minimum collisions with the walls and in minimum time.Boxes:The place to stop and think.Will show the part of the maze associated with the box.Time slows down here.Echolocation:Presseto make a noise.An echo will come from the direction in which player last moved.The echo will get stronger the nearer the player is to the wall.Persistence:It acts as a score for a player.Higher is better.It will decrease with time.It will decrease more and more with each collision.Since time slows down in a box, persistence will decrease slower inside the box.It is visible in the top right corner.In the top left corner, the number of collisions made in the current level is visible.On pressingq, the game will be paused. There will be an option toplay againorquit.In normal mode, a player can play 9 levels.In infinite mode, a player will have to pressqfor quitting.After completing all normal levels, a player, if they want, can put their name in theleaderboardwhich stores their score.RequirementsPython 3.8.6 or greaterA stereo headset (for echolocation)The terminal window should be sufficiently large (At least50 x 15characters in width and height). You should not resize the terminal during the game.InstallationWindowspipinstallmaze-gitbLinuxpip3installmaze-gitbContribution1. Clone the repositorygitclonehttps://github.com/Anand1310/summer-code-jam-2021.gitcdsummer-code-jam-20212. Install required dependenciesWindowspipinstall-rdev-requirements.txtLinuxapt-getinstallopenal-soft
pip3install-rdev-requirements.txt3. Run the gameWindowspythonmain.pyLinuxpython3main.pyNote:The player should visit thetutorialfor a hands-on understanding of the game.ScreenshotsFuture ImprovementsReveal the map with animation at the start of the level.Allow player to move during echo.Fix bug: Hitting leaderboard in the main menu exits game. (This can be fixed withthis change, we shall update the repo once the code jam finishes.)Fix bug: Game background music does not start on tutorial. (This can also be fixed bythis commit.)AddMain menuoption in pause menu. (Thiswill do it)About UsAnandPritam DeyHimiOliviaStoneSteelJason Ho
Package: mazel
mazel: make helpers for monoreposbazel(-ish) for Makefiles =mazelmazelis a simplebazel-inspired Makefile-based build system for monorepos.The goal is to not create another build system, rather we provide simple helpers around GNUmake, along with common (though not required) Makefile patterns.mazel provides:Ability to execute make targets in one or more subpaths.Dependency graph to allow execution of targets in a logical order. Either parsed from the package manager (e.g. poetry'spyproject.tomlor npm'spackage.json).mazel test //libs/py/common          # Runs `make test` for the common library
mazel test                           # Runs tests for any packages under the current directory
mazel format //libs/py               # Code formats all code under libs/py
mazel run //tools/docker/base:image  # Builds the base docker imageSeehttps://mazel.readthedocs.io/for more info
Package: mazely
MazelyAn API for solving and generating mazes, written in Python.InstallationInstallmazelywithpip:pipinstallmazelyDocumentationA library reference can be foundhere.Usage examplesAlso, see theexamplesfolder.Load and display a mazeCreate an instance ofMazeand pass a path to a maze file to load an existing maze. Use theshow_grid()method fromUtilitiesto display a grid of the maze.frommazelyimportMaze,Utilitiesmaze=Maze(path="resources/2015apec.maze")utils=Utilities()utils.show_grid(maze.grid)Solve a maze and display its solutionA solution is always made when you create an instance ofMaze. To display the solution, use theshow_solution()method fromUtilities.frommazelyimportMaze,Utilitiesmaze=Maze(path="resources/2019japan.maze")utils=Utilities()utils.show_solution()Generate a maze and display its solutionTo generate a maze, pass the row and column counts as you create aMazeinstance. Refer to the previous section to display its solution.frommazelyimportMaze,Utilitiesmaze=Maze(32,32)utils=Utilities()utils.show_solution()Maze filesThe library only supports a single maze format, as specified below.File formatEach cell is 3 characters wide and 3 characters tall.+---+
|   |
+---+To specify the goal cell, replace the center withG.+---+
| G |
+---+And replace withSfor the start cell.+---+
| S |
+---+Here is an example of a 3x3 maze.+---+---+---+
|           |
+   +---+   +
|     G |   |
+---+---+   +
| S         |
+---+---+---+LinksHere are a couple links to collections of maze files (format may not be supported):https://github.com/micromouseonline/mazefileshttp://www.tcp4me.com/mmr/mazes/
Package: mazemastery
How to runThis ismazemastery, a Python package that allows you to conquer mazes of various shapes using the power of coding!You can read all aboutmazemasteryin great length inour paper. This short guide covers only the basics and will help you to set upmazemasteryon your device as fast as possible.You can use your favourite IDE (or text editor), but we assume you have set up a Python 3 (andpip) with VS Code.InstallingmazemasteryOpen your terminal and type:python3 -m pip install mazemasteryDone!RunningmazemasteryTo runmazemastery, all you need is a Python file with the following content:frommazemastery.apiimport*defmy_solution():# My code to solve the maze goes here!passrun(level=0,solve=my_solution,delay=100,cell_size=100,rows=11,cols=11)Let's go over it. The first line imports all functions from themazemasteryAPI, which allow you to control the protagonist in the maze. If you don't like the*-import, you can also import only the functions you need.Then you can define a function thatmazemasterywill use to try and solve the maze. The function does not need to take any arguments.The last line contains theruncommand imported frommazemastery.api. It manages the creation and visualization of the maze, and runs your code to see if you managed to reach the Minotaur. Its arguments have the following meaning:level: This is the level number you'd like to attempt, ranging from 1-6 (easiest to hardest).solve: This is the function that will be run on the maze. Remember that in Python, functions can be defined and used like variables. Here, you can just type the name of the function that contains your code (my_solution), which passes this function as an argument.delay: The delay in milliseconds between frames (sodelay=1000means one second). Increase this value to slow down the visualization and vice versa.cell_size: The size of a single cell of the maze in pixels.rowsandcols: The number of rows and columns in the maze respectively.Running the code above will open up the first and simplest level:All levelsIn the second level, the column-position of the minotaur is randomized.The third level is a corridor with randomized turns.The fourth level includes dead-ends.The fifth level features dead-ends and cycles.Example solutions and student attemptsExample solutions for all levels can be found in./src/level<level_nr>.py, where<level_nr>indicates the level number. Student attempts from our user study can be found in./src/student_solutions.py.Feedback and ImprovementsWe would love to hear your feedback. If you find a bug or have an idea for an improvement, please open up a new issue.
Package: maze-nd
maze-ndA python package for generating n-dimensional mazes viarandomized Prim's AlgorithmInitial implementation in 2D from:https://github.com/ArneStenkrona/MazeFunGetting StartedPrerequisitesPoetry:https://python-poetry.org/docs/#installationInstallationClone the repository:git clone https://github.com/dthuff/maze-ndand install dependencies:cd maze-nd/
poetry installOr, install via pip:pip install maze-ndUsageGenerating maze structuresThe MazeND class defines a maze data structure represented by a boolean array of arbitrary shapemaze.grid.A 2D maze of 40 rows and 40 columns can be generated with:from maze_nd.maze_nd import MazeND
maze = MazeND([40, 40])Note that maze dimensions must be odd to ensure a solid outer border. If even shape args are passed, they will be forced to be odd.maze = MazeND([40, 40])

>>> maze.grid.shape
(39, 39)A 3D maze of 40 rows, 40 columns, and 20 slices can be generated with:maze = MazeND([40, 40, 20])A 7D maze:maze = MazeND([20, 20, 20, 10, 10, 20, 5])Caution: generation time is proportional tonp.prod(maze.grid.shape). This can quickly blow up for mazes with more than 4 dimensions.Visualizing maze structuresThe maze generation process can be visualized usingexamples/draw_maze.py:poetry run python draw_maze.py 40 40By default, this will save an image of the maze atexamples/maze_image.pngAny number of shape dimensions can be passed. A 3D maze can be generated via:poetry run python draw_maze.py 20 20 20For mazes with dimension N > 2, 2D planes of the maze will be drawn separated by a vertical border. For an N-D maze, N-1 planes are shown.The animation can be turned off using--skip-animation:poetry run python draw_maze.py 40 40 --skip-animationFun color themes can be applied via--theme:poetry run python draw_maze.py --theme beachy 40 40Available themes are:defaultbeachy,woodsy,christmas,andkaboom.
Package: mazenv
# mazenv-pyA Python port of [unixpickle/mazenv](https://github.com/unixpickle/mazenv) that uses OpenAI Gym.# InstallationYou can install mazenv with pip:```pip install mazenv```# UsageYou can generate a random 8x8 maze like this:```import mazenvmaze = mazenv.prim((8, 8))print(maze)```You can create a Gym environment out of your maze like this:```env = mazenv.Env(maze)```If you want to restrict the observations to a 5x5 grid centered around the current position, you can do:```restricted_env = mazenv.HorizonLimit(env, horizon=2)```