Git Product home page Git Product logo

elite's Introduction

Elite Planet Name Generator

I found the original pytxtelite (written by Ian Sparks) at http://automaticromantic.com/static/misc/pytxtelite.txt. You can find a copy of the original script in the "pytxtelite" folder.

pytxtelite is a conversion of Ian Bell's txtelite.c 1.2 (and parts of 1.4) to Python (2.5, maybe earlier).

As I was interested in planet names only, I removed everything else. This script contains the minimum for generating planet names.

It also has a simple command-line interface for printing planet names (n) and for jumping to the next galaxy (j).

I made a simple wrapper script too called elite.py. If you want to get the name of a random planet, use elite.py.

Examples

Print the planet names in Galaxy 1:

import pyplanets

galaxy = pyplanets.Galaxy()
print(galaxy.planets)

Print the name of a random planet:

import random
...
print(random.choice(galaxy.planets))

Author

Rest API

This part was added by Richard Hannah ([email protected]).

python elitePlanetApi.py

Then navigate to http://localhost:5000/planet.

Links

elite's People

Contributors

jabbalaci avatar richardhannah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.