Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
"""
Repeatedly runs a command and checks its output via a Python regex,
displaying a progress bar in KDE’s notification area.
The regex must have the named groups “i” and “max”, which determine the achieved progress.
"""
from PyQt4.QtCore import QObject, QTimer
#![feature(macro_rules)]
use std::fmt;
trait Element {}
macro_rules! Elem(
($name:ident { $($element:ident: $ty:ty),* }) => (
struct $name {
$(
_name=breeze
pkgname=xcursor-breeze
pkgver=5.1.0
pkgrel=1
pkgdesc="A really awesome part of kde5 cursor themes"
arch=('any')
url="https://projects.kde.org/projects/kde/workspace/$_name/repository/show/cursors"
license=('GPL')
depends=('libxcursor')
source=("git://anongit.kde.org/$_name")
@flying-sheep
flying-sheep / plasmoid-tempinstall-run.sh
Last active December 6, 2018 14:28
installs and runs a plasmoid with a plugin
#!/bin/sh
#usage: ./plasmoid-tempinstall-run.sh plasmoidname
export QML2_IMPORT_PATH="$HOME/.local/share/qml"
myplasmoid=$1
mysopath="$QML2_IMPORT_PATH/org/kde/plasma/private/$myplasmoid"
if [[ -d "$HOME/.local/share/plasma/plasmoids/org.kde.plasma.$myplasmoid" ]]; then
plasmapkg2 -u ./package
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

d3

  • Riesen-datenverarbeitungs- und utility-Bibliothek
  • Wenig Fokus auf bestimmte Technologie (SVG, DOM, …), aber ein paar SVG-Helfer (z.B. Achsen). Auch Zusammenarbeit mit Canvas möglich
  • Viele viele Beispiele auf http://bl.ocks.org/mbostock
  • Beliebt

Design

helpgrep = function(pattern, topic) {
helpfile = utils:::.getHelpFile(do.call(help, list(topic)))
temp = tools::Rd2txt(helpfile, out = tempfile('Rtxt'))
str = readChar(temp, file.info(temp)$size)
unlink(temp)
lins = unlist(strsplit(str, '\n'))
lins[grep(pattern, lins)]
}
import csv
from collections import Counter
from operator import itemgetter
from matplotlib import rcParams
import matplotlib.pyplot as plt
rcParams.update({'figure.autolayout': True})
answers_2013 = {"written_python2": (4660, 119),

code python

will this work:

def foo(bar):
    return baz
// ==UserScript==
// @name Reddit stylesheet editor
// @namespace flying-sheep
// @description CodeMirror-based stylesheet editor for reddit mods
// @include http://www.reddit.com/r/*/about/stylesheet/
// @version 1
// @require https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/codemirror.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/addon/hint/show-hint.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/mode/css/css.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/addon/hint/css-hint.js