This file contains hidden or 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 ( | |
"context" | |
"flag" | |
"fmt" | |
"time" | |
"github.com/grafana/dskit/middleware" | |
"github.com/grafana/dskit/user" |
This file contains hidden or 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
# Binary format | |
## Tar Archive | |
+--------------------------------------------------------------------------------------------------------+ | |
| Compression (optional) | | |
| +----------------------------------------------------------------------------------------------------+ | | |
| | Tar Archive | | | |
| | +------------------------------------------------------------------------------------------------+ | | | |
| | | `series` file | | | |
This file contains hidden or 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
$ gotest -v ./ -bench=Benchmark -test.run=^$ -benchtime=100000000x | |
goos: linux | |
goarch: amd64 | |
pkg: maptest | |
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz | |
BenchmarkIntMap | |
BenchmarkIntMap-8 100000000 55.85 ns/op 0 B/op 0 allocs/op | |
BenchmarkIntPointerMap | |
BenchmarkIntPointerMap-8 100000000 24.43 ns/op 0 B/op 0 allocs/op |
This file contains hidden or 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 ( | |
"context" | |
"fmt" | |
"os" | |
"time" | |
"github.com/grafana/loki/pkg/logproto" | |
"github.com/weaveworks/common/user" |
This file contains hidden or 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 bash | |
mpc idle > /dev/null | |
TRACK="$(mpc -f '%title%' current)" | |
# long version | |
if [ ${#TRACK} -gt 60 ]; then | |
echo "${TRACK:0:57}..." | |
else | |
echo $TRACK |
This file contains hidden or 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
" Vim syntax file | |
" Language: Prometheus Metrics | |
" Maintainer: Christian Haudum | |
" Last Revision: 10 January 2022 | |
" | |
if exists("b:current_syntax") | |
finish | |
endif |
This file contains hidden or 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 | |
import argparse | |
import json | |
import sys | |
import re | |
from typing import Dict, List, Tuple | |
def parse_args(): |
This file contains hidden or 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
# pip install wetterdienst==0.9.0 crate[sqlalchemy] | |
# pip install cr8 | |
# | |
# Usage: | |
# cr8 run-crate 4.2.x | |
# python example.py | |
from sqlalchemy import create_engine | |
from wetterdienst import DWDObservationData | |
from wetterdienst import Parameter, PeriodType, TimeResolution |
This file contains hidden or 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 | |
# | |
# Brain Dump | |
# | |
# Requirements: | |
# pip install aiofiles aiopg | |
# | |
# Usage: | |
# python dump.py |
This file contains hidden or 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
import abc | |
class Base(abc.ABC): | |
@property | |
@abc.abstractmethod | |
def prop(self): | |
... | |
class Impl(Base): |
NewerOlder