Giter Club home page Giter Club logo

auditorium's Introduction

Hi there 🖖!

Twitter Follow GitHub followers Discord


Hi there 🖖!

My name is 👨Alejandro Piad Morffis. Here are some things about me:

I live in Havana, 🇨🇺Cuba.

I recently finished a 🎓PhD in Computer Science in the domain of NLP and knowledge discovery.

My two passions are 📚teaching and ⚗️researching. I teach Programming, Compilers, AI, and a bunch of other stuff at the University of Havana. I also do research there, mostly on how to use artificial intelligence to better understand human languages, and on the democratization of machine learning tools.

In my free time, I also enjoy 💻coding (mostly in 🐍Python), 🎮playing video games (sadly not much lately), and ✏️writing.

You can find me online on 🗨️Twitter and 📱Telegram.


💌 The best way to contact me is to mention @AlejandroPiad on Twitter. I follow very few people (only those with whom I interact frequently) but I try to reply whenever someone asks me to.


And these are the values I stand for:

❤️ I believe that people are generally good, and if given the chance, they will show the better parts of themselves.

❤️ I believe people should have the chance to speak their minds, without fear to be silenced or hated for it, even if they are wrong. And they should have the option to honestly recognize their mistakes, learn from them, and be forgiven.

❤️ I do not tolerate racism or discrimination of any kind, towards me or others around me, and I work very hard to apply those same standards to myself.

❤️ I'm dedicated to education because I think that access to high-quality, unbiased, and free education is one of the best gifts anyone can receive, and one of the easiest ways to make people more reasonable and tolerant.

auditorium's People

Contributors

apiad avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auditorium's Issues

Make pyplot Configurable

I've been giving a shot to auditorium for presentations and like it so far, but there are a few things that it would be great to make configurable. I'd love to submit a PR, but wanted to check on preferred approach to implementing feature.

The issue I'm trying to solve is that when using plotnine, many figures (especially legends) get cropped out. I traced this down to that pyplot https://github.com/apiad/auditorium/blob/master/auditorium/show.py#L340 calls plt.tight_layout(). On the other hand, plotnine does not call that, but makes a call like plt.savefig(filename, bbox_inches='tight' (https://plotnine.readthedocs.io/en/stable/_modules/plotnine/ggplot.html#ggplot.save).

I'd propose something like:

  1. Add a parameter to pyplot like savefig_args and change the savefig call to plt.savefig(buffer, format=fmt, **savefig_args)
  2. Add a parameter tight_layout=True (or False) so only call plt.tight_layout() if it is True

Combined, this would make it so that I can display plotnine plots as they're intended to look, without monkey patching the pyplot call. Another possibility is in addition to (1)/(2), add argument on Show where the defaults can be set, although a similar thing could be accomplished in user code like

def myplot(ctx, plt):
    ctx.pyplot(plt, savefig_args={}, tight_layout=False)

def myslide(ctx):
    myplot(ctx, someplot)

Themes: FileNotFoundError

Hi! Really cool idea!

I'm trying to reuse the themes options on reveal.js but getting an error. Is the themes list restricted somehow?


static_html = show.render(theme="beige")

....

Traceback (most recent call last):
  File "test.py", line 45, in <module>
    static_html = show.render(theme="beige")
  File "/usr/local/lib/python3.8/site-packages/auditorium/show.py", line 241, in render
    return self._template_static.render(
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 13, in top-level template code
  File "/usr/local/lib/python3.8/site-packages/auditorium/show.py", line 256, in _embed
    with open(path(src)) as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.8/site-packages/auditorium/static/css/auditorium-beige.css'

On a separate note: is there a way to pass custom CSS styles ? Eg I have a slide with a lot of text so I'd like to set the base font to a smaller size cause otherwise it gets cropped..

Make `Show` stateless

Refactor Show methods such as do_markup and do_code so that all logic is executed against a local context (something like a dict that passes through the functions), so that there is no show state stored in the Show instance.

Highlight doesn't work on static render

When using auditorium render the rendered HTML embeds all JS, but reveal-js needs to load plugins from source files, so there is no trivial way of getting highlight.js and potentially other plugins to work in the static context.

Solution idea: Replace highlight.js for a Python alternative, such as Pygments.

Make `render` generate animations

When using render, allow for a possibly optional flag --animations that makes auditorium inject into the generated HTML the content for all frames of animations, and corresponding JavaScript to change them.

Beware that in general is it not possible to cover all possible cases, e.g., animations that have some randomness, animations that interact with input values, nested animations whose state depends on different combinations of frames.

Since this can potentially create very large HTML files, perhaps it should be opt-in and log a warning when animations are found and --animations is not passed.

auditorium: command not found

Hi, I am using version 0.6.1 and I can't and my OS (Ubuntu 18.04) can't seem to find the auditorium command. Did a pip install auditorium and then tried: auditorium demo I looked at my installation directories and can't seem to find auditorium anywhere.

Ensure compatibility with Python 3.5 -- 3.8

Right now auditorium only works on Python 3.6. In order to make it work with 3.5 up to 3.8 I think some changes are necessary to the coroutine handling in sanic. Also, we need some way to setup the development environment so that we can test all versions. Maybe creating multiple virtual-envs inside the Docker container?

Switch to WebSocket

Rewrite backend logic to use WebSockets instead of pure REST requests. This will allow for server-to-client updates, such as updating an animated progress bar based on backend progress.

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.