Skip to content

Instantly share code, notes, and snippets.

View loleg's full-sized avatar

Oleg Lavrovsky loleg

View GitHub Profile

DRIBD(at): a brief history

👋 Hello, world! The goal of this document is to put a timeline of the origins of the dribdat open source platform and DRIBD@ collective, together with aspirations for the future. To weave the 'red thread', so to speak - and share some perspective.

Contributing

  1. Join the OpenCollective
  2. Start a pull request on Codeberg
  3. Drop a bio into the People section below
@loleg
loleg / README.md
Last active December 3, 2023 22:38
#ODAdvent #4

Swiss Toy Shops

A dataset of the locations of toy shops around Switzerland.

Last update: 3.12.2023

@loleg
loleg / kiosk.service
Created November 3, 2023 10:57
Startup script for the digital signage based on Raspberry Pi Zero
[Unit]
Description=Kiosk
PartOf=graphical-session.target
After=graphical-session.target
[Service]
Environment=DISPLAY=:0.0
Environment=XAUTHORITY=/home/pi/.Xauthority
ExecStart=/bin/bash /home/pi/kiosk.sh
Restart=always
@loleg
loleg / analysis.md
Created August 24, 2023 08:34
Notes for Stakeholder Analysis at Hackathons

Stakeholder Analysis

A Hack:Org:X project. See https://hackorgx.dribdat.cc/project/12

Motivations

Identify your internal stakeholders and set expectations. Hackathons are cross-functional. No hackathon is run by a community person alone. It is important to ensure everyone is aligned on the goals, what is required to achieve them, and that the necessary resources are committed.

-- Hackathon Guide (opensource.com)

@loleg
loleg / example-frictionless.r
Created March 20, 2023 18:43
R example usage of Frictionless Data library
library(frictionless) # https://docs.ropensci.org/frictionless/
library(readr) # https://readr.tidyverse.org/reference/problems.html
# Read contents of a Data Package
package_local <- read_package("velozuerich/datapackage.json")
resources(package_local)
resource_local = read_resource(package_local, "velonetz-csv")
# Preview the first few rows
head(resource_local)
@loleg
loleg / example-ckan.r
Last active March 20, 2023 19:12
CKAN R Beispiel für BFH CAS
library('ckanr')
# Initialise the CKAN library with a remote portal
ckanr_setup(url = "https://opendata.swiss")
# Run a search to get some data packages
x <- package_search(q = 'video games', rows = 1)
# Note that on the Swiss server the titles are multilingual
x$results[[1]]$title$en
@loleg
loleg / generate.py
Created March 9, 2023 13:22
A small Python script to generate certificates using an SVG template
#!/usr/bin/python
from xml.dom import minidom
import csv, os, re, string, subprocess
from argparse import ArgumentParser
import tempfile
# Create a SVG file with nodes having at least one of:
# name_black
# name_white
@loleg
loleg / csvtsarg.py
Created February 4, 2023 21:31
Utility to aggregate time series (typically, a log file) in CSV format
import pendulum
import argparse
import csv
parser = argparse.ArgumentParser(description='Aggregate time series data')
parser.add_argument('filename', type=str,
help='a CSV file to process')
parser.add_argument('--column', type=str, default='time',
help='in which column is the datetime (default: time)')

Ask Ti Jean

Data safety on the Road

(A humble manifesto for better hackathons)


Journalists, freelancers, designers, everyday citizens - Demand more security in our digital life! Doubly so for people who are involved in critical investigation: all those, whose digital rights and identities may for various reasons be threatened.

@loleg
loleg / docker-compose.yml
Created November 29, 2022 21:58
A quick deployment of dribdat with docker
version: '3.4'
# On first run:
# docker-compose exec dribdat ./release.sh
# (TODO: move to entrypoint script)
services:
dribdat:
image: loleg/dribdat:stable
build:
context: .
dockerfile: ./Dockerfile