Giter Site home page Giter Site logo

spudde123 / sc2mapanalysis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eladyaniv01/sc2mapanalysis

14.0 14.0 4.0 25.63 MB

A standalone plugin for python SC2 API

License: GNU General Public License v3.0

Python 66.26% C 33.38% Shell 0.08% Dockerfile 0.07% Makefile 0.20%

sc2mapanalysis's People

Contributors

actions-user avatar august-k avatar dependabot[bot] avatar eladyaniv01 avatar raspersc2 avatar shostyn avatar spudde123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sc2mapanalysis's Issues

Optimize `MapData.closest_towards_point`

Current implementation:

return points[self.closest_node_idx(node=target, nodes=points)]

Where closest_node_idx does the calculation

22.5 µs ± 176 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)

Changing the logic to something like

return points[np.abs(points- np.array([[target[0], target[1]]])).argmin()]

9.76 µs ± 32.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)

Though this can return a different result to the original so needs a bit more investigating, or different implementation.
Would help reduce the time compiling map

Convert project to poetry

The current build process via setuptools will be deprecated in python 3.12, and pip install . is currently failing on python 3.11

  • Setup project as a poetry project
  • Remove setup.py and requirements.txt
  • Add dependencies via poetry
  • Add poetry build process to compile c extension
  • Add tutorial to readme
  • If time allows, ensure CI / github actions still work. Otherwise, disable them

Optimize `Polygon.outer_perimeter`

There appears to be a bottleneck during the compilation of MapData._calc_vision_blockers() and profiling suggests it's the Polygon.outer_perimeter property

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.