Giter Site home page Giter Site logo

winter_hackday's Introduction

winter python hackathon

Getting Started

You'll need:

Move into a folder you want to work in and run the command to download this codebase:

git clone https://github.com/ElliotSalisbury/winter_hackday.git

and then to install the required libraries (matplotlib, numpy, etc)

cd winter_hackday
pip install -r requirements.txt

On the day, there may need to be a reason to pull changes to this repository, if there are bug fixes.

git pull 

Important files

animations/start_here.py

This will be the main file you will be working on. make a copy of this file, name it something sensible, and start writing your code

In order to run your code, the working directory needs to be the project root (in order to find the coordinates file) IDE's can usually handle this fine, but if you are running from a terminal, try this:

python -m animations.my_animation_file

animations/exploding_lights.py

animations/spinning_lights.py

animations/moving_object.py

I have written a few examples of animations, hopefully these will give you an idea of how you can interact with the data being passed into the calculate_colors() function, and how to return sensible colors

python -m animations.spinning_lights

single_animation.py

If you are having problems running your script directly, the most common problem is the working directory isn't configured right. You can try using this file to run your animation instead, it works the same way as the demo_cycle, but only plays the animation you name in the command line

python single_animation.py name_of_your_animation

demo_cycle.py

This will be used on the raspberry pi to cycle through the animations in the animations directory. We are

anything else

No real need to dive too deep into these, you should be able to work without them. They just handle the direct communication with the lights, or matplotlib. Feel to explore if you wish.

winter_hackday's People

Contributors

connrich avatar elliotsalisbury avatar rosbo avatar ryanovas avatar

Watchers

 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.