Giter Club home page Giter Club logo

felpy's Introduction

FelPy

Intro

This is an assortment of Python tools that I have/will write/n, usually because they help me. If something that I've bodged together can be made to work within 4h of work to a standard I can publish, I'll throw it in here

Install

These tools are all published as one package, but are all used with seperate import statements. To install:

sudo pip install FelPy

This will install everything automagically.

Usage

listFormat

This uses the import listFormat. It uses a class, and must be instantiated as follows:

variableName = listFormat.Formatter()

If you wish to give it an list to start, just put one inbetween the brackets. The list can be added to like so:

variableName.add("List item")

To randomize, or scramble, the order of the items in the list, run:

variableName.randomize()

To simply take out the raw list, run:

variableName.simpleOutput()

Or, to format to a 2D list, use:

variableName.formatOutput(x,y)

Where x and y are the width and height of the desired list.

All of the above methods work standalone.

print(listFormat.random(["a","b"]))

print(listFormat.formatOutput(["a","b","c","d"],2,2))

confReturn

This is another import, confReturn

Very simply, run it like so:

variableName = confReturn.do("gender")

Where "gender" can be any string being set. Play arround with it in IDLE, you'll get the gist of it.

leaderboard

For this one, import leaderboard

It will generate a 10 line leaderboard. You can write to it with a name, up to 10 characters, and a points value, between 0 and 99. When placing entries, they are sorted first by value, so higher scores occur higher up. If you are adding an entry when there is already an entry with the same points value, the new entry will appear above.

All of the functions below will accept one (more) parameter, the filename. Without it, it will default to filename.txt. Leaderboard data is stored as UTF-8 text, but can be given any file extension. NB: Remember to include a file extension (I personally like .lbd) if you are using a custom filename.

To generate (or clear) a leaderboard:

leaderboard.make()

To write to the leaderboard:

leaderboard.write(points, name)

To read the leaderboard (outputs as a 10-line String):

leaderboard.read()

Contributions

Financial aid is always welcome at Paypal, or of couse feel free to fork the project. If you do fork, please make pull requests back - I am always looking to improve my work.

felpy's People

Contributors

3licks avatar

Watchers

James Cloos avatar  avatar

Forkers

python3pkg

felpy's Issues

ArrayFormat name

Arrays in python aren't really called Arrays, they're called Lists

ListFormat Standalone methods

The methods in arrayformat should be able to be called without having to house the class in a variable etc - saves time and is more usable

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.