Skip to content

Instantly share code, notes, and snippets.

@xeningem
xeningem / russia_vote.md
Last active January 25, 2022 08:04
Данные по регионам проекта "Выборы России"

GeoJSON

Архив с данными в виде GeoJSON russia_votes_geo_data.7z

Состав архива:

  • map.json - карта всей России
  • каталог map_split - данные по отдельным регионам (соответствие файлов регионам - в таблице ниже)
  • map_full.json - карта всей России с расширенным списком полей по каждому из регионов
@trongthanh
trongthanh / mojave.xml
Last active January 26, 2023 19:04
macOS Mojave dynamic background re-implement as GTK+ background slideshow. Background images are changed to reflect the time of the day.
<!-- Instructions:
- Download and unzip Mojave dynamic background here: https://files.rb.gd/mojave_dynamic.zip
- Rename the extracted folder as "mojave-background" (Excuse the trouble but I renamed it on my machine and already use that path in the XML file)
- Save this xml file next to the Mojave background files
- Fix the path to the background images below (better using absolute path)
- Lastly, either:
+ GNOME: Use gnome-tweaks tool to select this XML as wallpaper (as default wallpaper settings won't let you choose wallpaper from custom path)
+ MATE: Go to background setting (in Appearance) > Choose +Add... > make sure **All files** filter is selected at the bottom right > Then choose mojave.xml
-->
<background>
"""
"PyTorch must serve man, not rule over him" (c) DAO
A module for simple conversion between numpy and torch types.
Created out of frustration from lines like:
- x = Variable(torch.FloatTensor(x)).cuda() # now var(x, 'float32')
- (model(x).max(1)[1].data.cpu().numpy() == y).mean() # now numpy(x)
"""
import torch
@alexvorobiev
alexvorobiev / configuration.nix
Last active February 10, 2019 06:10
NixOS on rpi3
{ config, pkgs, lib, ... }:
{
# NixOS wants to enable GRUB by default
boot.loader.grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = true;
# !!! If your board is a Raspberry Pi 1, select this:
# boot.kernelPackages = pkgs.linuxPackages_rpi;
# !!! Otherwise (even if you have a Raspberry Pi 2 or 3), pick this:
@RenatoUtsch
RenatoUtsch / template.tex
Last active April 15, 2020 12:30
Modern barebones template for LuaLaTeX and BibLaTeX
\documentclass[12pt]{article}
% Encoding
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{csquotes}
\setdefaultlanguage{english}
% Formatting
\usepackage{fullpage}