A simple script that displays pixel-based animation on GitHub Activity

Overview

GitHub Activity Animator

This project contains a simple Javascript snippet that produces an animation on your GitHub activity tracker.

Video Capture

The project also contains simple scripts that completes the pipeline from video files to GitHub activity.

User Guide

TLDR;

Usage: bash end_to_end.sh "VIDEO_FILE.mp4" | "YOUR SYSTEM'S CLIPBOARD UTILITY"

MacOS: bash end_to_end.sh "VIDEO_FILE.mp4" | pbcopy

Linux: bash end_to_end.sh "VIDEO_FILE.mp4" | xclip

Then simply paste the copied data into the browser console.

Conversion of video to frames

Usage: python extract_frames.py "VIDEO_FILE.mp4"

The above script will create a folder video_frames, and dump all the image frames from the video file into it.

Conversion of frames to array

There is a choice between using compressed data or uncompressed data. Compressed data requires more pre-processing, but code injection will be quicker, vice versa for uncompressed data.

(Lossless) Compressed data

Usage: python dump_compressed_data.py

The above script will search the video_frames array and dump the base64 encoded data to standard output. The data is precompressed with Huffman encoding

Example output can be seen in frame_data_compressed.

Uncompressed data

Usage: python dump_data.py

The above script will search the video_frames array and dump the formatted (Javascript) array string to standard output.


Users are advised to redirect the output to their clipboard utility to prepare for the next step, as per below.

MacOS: python dump_data.py | pbcopy

Linux: python dump_data.py | xclip

Injection of Javascript into browser

  1. Navigate to your desired GitHub profile
  2. Open the browser console
  3. Input the data
    • (For compressed data) Type compressedData = followed by the encoded string from the dump. Complete declaration of the variable.
    • (For uncompressed data) Type videoArr = followed by the array string obtained by the dump. Complete declaration of the variable. NOTE: This step is likely to freeze the browser for a while if the array is large.
  4. Insert the script in github_activity_animator.js into the console. Tweak the FPS in the script if need be.
  5. Enjoy

Attributions

Inspired by projects that makes pixel arts using GitHub's activity tracker, such as gitfiti.

Further inspired by Junferno's Bad Apple on everything.

A simple agent-based model used to teach the basics of OOP in my lectures

Pydemic A simple agent-based model of a pandemic. This is used to teach basic principles of object-oriented programming to master students. It is not

Fabien Maussion 2 Jun 08, 2022
A python-generated website for visualizing the novel coronavirus (COVID-19) data for Greece.

COVID-19-Greece A python-generated website for visualizing the novel coronavirus (COVID-19) data for Greece. Data sources Data provided by Johns Hopki

Isabelle Viktoria Maciohsek 23 Jan 03, 2023
A simple interpreted language for creating basic mathematical graphs.

graphr Introduction graphr is a small language written to create basic mathematical graphs. It is an interpreted language written in python and essent

2 Dec 26, 2021
Data aggregated from the reports found at the MCPS COVID Dashboard into a set of visualizations.

Montgomery County Public Schools COVID-19 Visualizer Contents About this project Data Support this project About this project Data All data we use can

James 3 Jan 19, 2022
This is a Boids Simulation, written in Python with Pygame.

PyNBoids A Python Boids Simulation This is a Boids simulation, written in Python3, with Pygame2 and NumPy. To use: Save the pynboids_sp.py file (and n

Nik 17 Dec 18, 2022
Python Data Validation for Humans™.

validators Python data validation for Humans. Python has all kinds of data validation tools, but every one of them seems to require defining a schema

Konsta Vesterinen 670 Jan 09, 2023
Set of matplotlib operations that are not trivial

Matplotlib Snippets This repository contains a set of matplotlib operations that are not trivial. Histograms Histogram with bins adapted to log scale

Raphael Meudec 1 Nov 15, 2021
Easily convert matplotlib plots from Python into interactive Leaflet web maps.

mplleaflet mplleaflet is a Python library that converts a matplotlib plot into a webpage containing a pannable, zoomable Leaflet map. It can also embe

Jacob Wasserman 502 Dec 28, 2022
3D Vision functions with end-to-end support for deep learning developers, written in Ivy.

Ivy vision focuses predominantly on 3D vision, with functions for camera geometry, image projections, co-ordinate frame transformations, forward warping, inverse warping, optical flow, depth triangul

Ivy 61 Dec 29, 2022
Simple spectra visualization tool for astronomers

SpecViewer A simple visualization tool for astronomers. Dependencies Python = 3.7.4 PyQt5 = 5.15.4 pyqtgraph == 0.10.0 numpy = 1.19.4 How to use py

5 Oct 07, 2021
High performance, editable, stylable datagrids in jupyter and jupyterlab

An ipywidgets wrapper of regular-table for Jupyter. Examples Two Billion Rows Notebook Click Events Notebook Edit Events Notebook Styling Notebook Pan

J.P. Morgan Chase 75 Dec 15, 2022
Fast 1D and 2D histogram functions in Python

About Sometimes you just want to compute simple 1D or 2D histograms with regular bins. Fast. No nonsense. Numpy's histogram functions are versatile, a

Thomas Robitaille 237 Dec 18, 2022
clock_plot provides a simple way to visualize timeseries data, mapping 24 hours onto the 360 degrees of a polar plot

clock_plot clock_plot provides a simple way to visualize timeseries data mapping 24 hours onto the 360 degrees of a polar plot. For usage, please see

12 Aug 24, 2022
An intuitive library to add plotting functionality to scikit-learn objects.

Welcome to Scikit-plot Single line functions for detailed visualizations The quickest and easiest way to go from analysis... ...to this. Scikit-plot i

Reiichiro Nakano 2.3k Dec 31, 2022
Python package to visualize and cluster partial dependence.

partial_dependence A python library for plotting partial dependence patterns of machine learning classifiers. The technique is a black box approach to

NYU Visualization Lab 25 Nov 14, 2022
A package for plotting maps in R with ggplot2

Attention! Google has recently changed its API requirements, and ggmap users are now required to register with Google. From a user’s perspective, ther

David Kahle 719 Jan 04, 2023
OpenStats is a library built on top of streamlit that extracts data from the Github API and shows the main KPIs

Open Stats Discover and share the KPIs of your OpenSource project. OpenStats is a library built on top of streamlit that extracts data from the Github

Pere Miquel Brull 4 Apr 03, 2022
Comparing USD and GBP Exchange Rates

Currency Data Visualization Comparing USD and GBP Exchange Rates This is a bar graph comparing GBP and USD exchange rates. I chose blue for the UK bec

5 Oct 28, 2021
FairLens is an open source Python library for automatically discovering bias and measuring fairness in data

FairLens FairLens is an open source Python library for automatically discovering bias and measuring fairness in data. The package can be used to quick

Synthesized 69 Dec 15, 2022