Generate a 3D Skyline in STL format and a OpenSCAD file from Gitlab contributions

Overview

Your Gitlab's contributions in a 3D Skyline

gitlab-skyline is a Python command to generate a skyline figure from Gitlab contributions as Github did at https://skyline.github.com/

~ usage: gitlab-skyline [-h] [--domain [DOMAIN]] [--max_requests [MAX_REQUESTS]] username [year]

Create STL from Gitlab contributions

positional arguments:
  username              Gitlab username (without @)
  year                  Year of contributions to fetch

optional arguments:
  -h, --help            show this help message and exit
  --domain [DOMAIN]     GitlabEE/CE custom domain
  --max_requests [MAX_REQUESTS]
                        Max. simultaneous requests to Gitlab. Don't mess with their server!

Enjoy!

View a sample result of the preview at samples/gitlab_felixgomez_2020.stl and OpenSCAD generated code at samples/gitlab_felixgomez_2020.scad.

Requirements and installation

gitlab-skyline requires python3 and OpenSCAD. (need Python version >= 3.7)

Create your virtual environment as usual and install dependencies with

pip install -r requirements.txt

Install OpenSCAD from https://www.openscad.org/downloads.html and ensure that openSCAD executable is working with

openscad --version

Quickstart

python gitlab-skyline felixgomez 2020

or

./gitlab-skyline felixgomez 2020

if file has execution permissions.

If you want to get contributions from a custom installation you can use

./gitlab-skyline felixgomez 2020 --domain="https://customdomain.dev:8080"

Docker Usage

For convience, a docker image is produced to generate the stl image file for you:

docker run -v $PWD:/data registry.gitlab.com/felixgomez/gitlab-skyline []

Example: docker run -v $PWD:/data registry.gitlab.com/felixgomez/gitlab-skyline felixgomez

To use any custom parameters, simply append to the docker run command.

Using it in private/custom Gitlab installations

As said before, you can use it in custom installations through the --domain modifier.

Don't forget to make your contributions public in your user profile settings.

Motivation

A few days ago I came across the Github skyline web application and it seemed like a good idea to be able to export the activity in skyline format to STL.

It quickly became viral among my friends, but in my daily work I use Gitlab more. That's when I came up with the idea to replicate it for Gitlab: I needed to have my own contribution skyline!

Some details

The project was developed on a Friday afternoon, although I had consulted some information previously, so do not expect quality code and wonders. As always pull requests are welcome! 😍

At first I was thinking to use the well known Gitlab endpoint https://gitlab.com/users/username/calendar.json but the information it provides is for one year back from now.

As far as I know Gitlab does not provide an endpoint to obtain contribution information by year but digging a bit I found that a call to https://gitlab.com/users/username/calendar_activities?date=2021-02-01 returns an HTML response easy to scrape.

I made use of classic BeautifulSoup for scraping, aiohttp and asyncio to go asynchronous and speed up the scraping process.

There is an extra option (--max-requests) to the gitlab-skyline command to control concurrent requests to Github to avoid the "Too many requests" message from their server.

SolidPython is a beautiful piece of code allowing to generate OpenSCAD code from Python.

Inkscape was used to vectorize the Gitlab logo for extrusion (pending to correct the Viewbox due to lack of time).

Mesh optimization

I love openSCAD for a long time but there are some old well known issues related with errors in the generated geometry. If you detect some on the final STL you could use https://www.meshlab.net/ to correct them.

Thanks!

I hope you like it!

Owner
Félix Gómez
Senior developer at @ultreia_es Degree in Physics.
Félix Gómez
Data-FX is an addon for Blender (2.9) that allows for the visualization of data with different charts

Data-FX Data-FX is an addon for Blender (2.9) that allows for the visualization of data with different charts Currently, there are only 2 chart option

Landon Ferguson 20 Nov 21, 2022
A python script and steps to display locations of peers connected to qbittorrent

A python script (along with instructions) to display the locations of all the peers your qBittorrent client is connected to in a Grafana worldmap dash

62 Dec 07, 2022
Python script to generate a visualization of various sorting algorithms, image or video.

sorting_algo_visualizer Python script to generate a visualization of various sorting algorithms, image or video.

146 Nov 12, 2022
Browse Dash docsets inside emacs

Helm Dash What's it This package uses Dash docsets inside emacs to browse documentation. Here's an article explaining the basic usage of it. It doesn'

504 Dec 15, 2022
A script written in Python that generate output custom color (HEX or RGB input to x1b hexadecimal)

ColorShell ─ 1.5 Planned for v2: setup.sh for setup alias This script converts HEX and RGB code to x1b x1b is code for colorize outputs, works on ou

Riley 4 Oct 31, 2021
Mattia Ficarelli 2 Mar 29, 2022
Peloton Stats to Google Sheets with Data Visualization through Seaborn and Plotly

Peloton Stats to Google Sheets with Data Visualization through Seaborn and Plotly Problem: 2 peloton users were looking for a way to track their metri

9 Jul 22, 2022
A curated list of awesome Dash (plotly) resources

Awesome Dash A curated list of awesome Dash (plotly) resources Dash is a productive Python framework for building web applications. Written on top of

Luke Singham 1.7k Jan 07, 2023
Area-weighted venn-diagrams for Python/matplotlib

Venn diagram plotting routines for Python/Matplotlib Routines for plotting area-weighted two- and three-circle venn diagrams. Installation The simples

Konstantin Tretyakov 400 Dec 31, 2022
Example Code Notebooks for Data Visualization in Python

This repository contains sample code scripts for creating awesome data visualizations from scratch using different python libraries (such as matplotli

Javed Ali 27 Jan 04, 2023
Visualise top-rated GitHub repositories in a barchart by keyword

This python script was written for simple purpose -- to visualise top-rated GitHub repositories in a barchart by keyword. Script generates html-page with barchart and information about repository own

Cur1iosity 2 Feb 07, 2022
A custom qq-plot for two sample data comparision

QQ-Plot 2 Sample Just a gist to include the custom code to draw a qq-plot in python when dealing with a "two sample problem". This means when u try to

1 Dec 20, 2021
Lightweight data validation and adaptation Python library.

Valideer Lightweight data validation and adaptation library for Python. At a Glance: Supports both validation (check if a value is valid) and adaptati

Podio 258 Nov 22, 2022
Show Data: Show your dataset in web browser!

Show Data is to generate html tables for large scale image dataset, especially for the dataset in remote server. It provides some useful commond line tools and fully customizeble API reference to gen

Dechao Meng 83 Nov 26, 2022
Dipto Chakrabarty 7 Sep 06, 2022
HW 2: Visualizing interesting datasets

HW 2: Visualizing interesting datasets Check out the project instructions here! Mean Earnings per Hour for Males and Females My first graph uses data

7 Oct 27, 2021
Schema validation just got Pythonic

Schema validation just got Pythonic schema is a library for validating Python data structures, such as those obtained from config-files, forms, extern

Vladimir Keleshev 2.7k Jan 06, 2023
Numerical methods for ordinary differential equations: Euler, Improved Euler, Runge-Kutta.

Numerical methods Numerical methods for ordinary differential equations are methods used to find numerical approximations to the solutions of ordinary

Aleksey Korshuk 5 Apr 29, 2022
Frbmclust - Clusterize FRB profiles using hierarchical clustering, plot corresponding parameters distributions

frbmclust Getting Started Clusterize FRB profiles using hierarchical clustering,

3 May 06, 2022
A curated list of awesome Dash (plotly) resources

Awesome Dash A curated list of awesome Dash (plotly) resources Dash is a productive Python framework for building web applications. Written on top of

Luke Singham 1.7k Dec 26, 2022