Skip to content

Instantly share code, notes, and snippets.

@brokenpylons
brokenpylons / PKGBUILD
Last active August 7, 2017 13:55
Updated PyTorch PKGBUILD file
# Maintainer: Stephen Zhang <stephen at gmail dot com>
pkgbase="python-pytorch"
pkgname=("python-pytorch" "python2-pytorch")
_pkgname="pytorch"
pkgver=0.2.0
pkgrel=1
pkgdesc="Tensors and Dynamic neural networks in Python with strong GPU acceleration"
arch=('x86_64')
url="http://pytorch.org"
#!/bin/bash
in='LVDS1'
ext='HDMI1'
#X server arguments
eval set -- $(pgrep -a X)
while (( $# > 0 ))
do
https://bober.acm.si/simple/competition/drzavno-2018/
@brokenpylons
brokenpylons / .Xmodmap
Created January 13, 2019 18:53
US keyboard layout with Slovenian letters and Caps Lock switched with Escape
keycode 39 = s S scaron Scaron scaron Scaron
keycode 52 = z Z zcaron Zcaron zcaron Zcaron
keycode 54 = c C ccaron Ccaron ccaron Ccaron
keycode 108 = Mode_switch Mode_switch Mode_switch Mode_switch
remove Lock = Caps_Lock
keycode 9 = Caps_Lock NoSymbol Caps_Lock
keycode 66 = Escape NoSymbol Escape
@brokenpylons
brokenpylons / install-couchdb.sh
Created February 18, 2019 10:24
Install CouchDB on Debian stretch
echo 'deb https://apache.bintray.com/couchdb-deb stretch main' | tee -a /etc/apt/sources.list
# E: The method driver /usr/lib/apt/methods/https could not be found.
# N: Is the package apt-transport-https installed?
# E: Failed to fetch https://apache.bintray.com/couchdb-deb/dists/stretch/InRelease
apt install apt-transport-https
# W: GPG error: https://apache.bintray.com/couchdb-deb stretch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 379CE192D401AB61
# E: The repository 'https://apache.bintray.com/couchdb-deb stretch Release' is not signed.
apt install dirmngr

Task

std::string internationalSize() const

M F
XS 46 32/34
S 48 36/38
M 50 40/42
L 52 44/46

Naloga

Dodajte std::string internationalSize() const

M F
XS 46 32/34
S 48 36/38
M 50 40/42
L 52 44/46
# 1 "foo.h"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "foo.h"
# 1 "/usr/include/c++/8.2.1/string" 1 3
# 36 "/usr/include/c++/8.2.1/string" 3
# 37 "/usr/include/c++/8.2.1/string" 3

Naloga

Color

-r
-g
-b

Color(r, g, b)
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#include <stdio.h>
// base declaration
struct vtable {
int (*bar)(void *);
int (*baz)(void *);
void (*destructor)(void *);
};