- xml-rs: roughly XML 1.0, low-level StAX-style streaming parser; no DTD validation;
- serde-xml-rs builds on xml-rs
- xmlparser: very similar to xml-rs
- quick-xml: almost zero-copy,
- xml_dom builds on it.
- roxmltree: a read-only zero-copy "DOM" based on the source data. Not streaming? XML 1.0.
- rxml: "alpha-quality" restricted SAX parsing of XML 1.0 with namespacing.
- minidom builds on it, focused on xmpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
"os/exec" | |
"path/filepath" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This module serves as the root of the `Json` library. | |
-- Import modules here that should be built as part of the library. | |
import Std | |
inductive Json where | |
| null : Json | |
| bool (b: Bool) | |
| number (n: Int) | |
| array (a: List Json) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import ABC, abstractmethod | |
from typing import Callable, Generic, Iterable, Iterator, Optional, Tuple, TypeVar, Union | |
T = TypeVar('T') | |
U = TypeVar('U') | |
class Functor(ABC, Generic[T]): | |
@abstractmethod | |
def fmap(self, f: Callable[[T], U]) -> 'Functor[U]': | |
raise NotImplemented |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// This is an example of encoding state of a Builder | |
/// into a const generic bitmask. [`PipelineBuilder`] | |
/// only allows `.build()` when all of the fields have | |
/// been set. | |
/// This requires a scary nightly feature that rustc | |
/// marks with a stark warning: | |
/// ```ignore | |
/// the feature `generic_const_exprs` is incomplete | |
/// and may not be safe to use and/or cause compiler crashes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
A swaybar implementation. | |
Current plugins: | |
- keyboard layout state and tracking | |
- PulseAudio-compatible sound: device, volume and mute status | |
- power supply: on battery/ac, percentage, time to emtpy/full | |
- network: the name of the primary connection, `nmmenu` on click | |
- time in different formats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
This is a driver for Gravity 16x2 LCD (single-color, not RGB) for Raspberry Pi. | |
It is tested on Raspberry Pi Zero W with | |
- i2c_arm,baudrate=100000 | |
- i2c_arm,baudrate=400000 | |
- dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1 | |
""" |
This is a set of systemd timers and services that ensures that computer goes to bed at night (00:00-07:00), hopefully helping me to go to bed as well.
dmytrish-sleep.timer
starts sending desktop notifications about
computer going to sleep 1 minute before the night start and then
suspends the computer. Then it tries to ensure that computer sleeps
during the night time: it puts computer back to sleep in a loop until
the morning time.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import Coq.Sets.Ensembles. | |
Require Import Coq.Sets.Powerset_facts. | |
Require Import Coq.Setoids.Setoid. | |
Section SetExample. | |
Variable U: Type. | |
Definition USet := Ensemble U. | |
Notation "X ∩ Y" := (Intersection U X Y) (at level 41). |
NewerOlder