Skip to content

Instantly share code, notes, and snippets.

View loleg's full-sized avatar

Oleg Lavrovsky loleg

View GitHub Profile
@loleg
loleg / ubuntu-nginx-docker-stackscript.sh
Created May 24, 2017 08:05
A handy script to start a new box, based on other people's Stackscripts
#! /bin/bash
#
# Base server that sets a root SSH key and disables password auth. Used by me for Ansible-based deploys.
# <UDF name="HOSTNAME" Label="Hostname" />
# <UDF name="USERNAME" Label="Username" />
# <UDF name="PASSWORD" Label="Password" />
# <UDF name="SSH_KEY" Label="SSH Key" />
# <UDF name="FQDN" Label="Domain Name">
source <ssinclude StackScriptID=46109>
@loleg
loleg / git-bokeh-demo.ipynb
Last active August 9, 2017 12:28
Exploring Git data with Python, Pandas, Numpy and Bokeh
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@loleg
loleg / dribdat-hacknight-challenge.md
Last active October 18, 2017 08:53
A sample challenge in Markdown for the DINAcon HACKnight

Dribdat is an open platform for data-driven team collaboration, such as Hackathons. It works as a website and project board for running exciting, productive events..with Impact Factor. The platform allows organisers and participants to aggregate project details from multiple sources (Markdown, Wikis, GitHub, Bitbucket), display challenges and projects, reuse the data, plug in community tools like Discourse, Slack, Let's Chat, and chatbots to enhance the hackathon.


{ hacknight challenges }

Yes, Dribdat is the website you see running here. Just [create an account](/register) to login, and add a project you are working on - or join an existing one as team member. Find out how projects are sync'ed and scored for bonus points.

Read the Documentati

@loleg
loleg / generate-datapackage.ipynb
Created November 6, 2017 13:50
Generate Data Package
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@loleg
loleg / datajamdays-24112017.ipynb
Created November 24, 2017 17:45
DataJamDays 2017 Julia notebook for Jupyter workshop
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@loleg
loleg / conda.fish
Last active December 8, 2017 12:37 — forked from jiffyclub/conda.fish
Activate and deactivate commands for working with conda environments in the fish shell. Currently assumes you are switching to a named environment, not specifying a directory.. Adapted from https://penandpants.com/2014/02/28/using-conda-environments-and-the-fish-shell/
# To use this, add to the ~/.config/fish/ directory and source them from
# the end of the ~/.config/fish/config.fish file:
#
# source $HOME/.config/fish/conda.fish
#
# set this to YOUR anaconda/miniconda path:
set CONDAHOME $HOME/miniconda3/envs
function condalist -d 'List conda environments.'
for dir in (ls $CONDAHOME)
@loleg
loleg / ckan-opendata-example.r
Last active August 9, 2018 10:07
A snippet of R showing how to access a CKAN portal via its API, in this case opendata.swiss
install.packages("ckanr")
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 = 'name:arbeitslosenquote', rows = 1)
# Note that on the Swiss server the titles are multilingual
@loleg
loleg / openfood-dribdat-event.md
Last active January 19, 2018 13:04
Dribdat configuration for a Open Food Data event

Description:

At the «Open Food Data Hackdays» diverse food-interested actors, including big data specialists, software engineers, nutrition experts, farmers, app designers, students and entrepreneurs, are united. This potential is combined with publicly available data on the production, movement, consumption and impact of food, in order to enable groundbreaking projects.

Guide to datasets:

# Data resources

We are preparing a [collection of data packages](https://openfood.schoolofdata.ch) for use at the Hackdays. At the Hackdays, you are free to use these, your own, or other data - just remember to always properly **attribute your sources** and respect each license. Be aware of the Terms of Use before you dig in. Your experience and support will help us to open more data according to the [Open Definition](http://opendefinition.org/) and [open licenses](http://licenses.opendefinition.org/)! 
@loleg
loleg / classification.ipynb
Last active February 16, 2018 08:32
An experiment with PyTorch, Torchvision, RESNET18 and melted cheese
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@loleg
loleg / avalanche_switzerland_mapboxgl.ipynb
Last active February 25, 2018 00:42
Avalanches in Switzerland visualized with the Mapboxgl-Jupyter Python Library
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.