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
[remote "origin"] | |
url = [email protected]:DataDog/dd-source.git | |
#fetch = +refs/heads/*:refs/remotes/origin/* | |
fetch = +refs/heads/ebnull/*:refs/remotes/origin/ebnull/* | |
fetch = +refs/heads/spr/ebnull/*:refs/remotes/origin/spr/ebnull/* | |
fetch = +refs/heads/main:refs/remotes/origin/main | |
#fetch = +refs/heads/wip:refs/remotes/origin/wip | |
tagOpt = --no-tags | |
[branch "main"] | |
remote = origin |
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 a systemd user service | |
# | |
[Unit] | |
Description=Start krfb | |
After=graphical-session.target | |
[Service] | |
Type=exec | |
ExecStart=krfb --display $DISPLAY --nodialog | |
Restart=always |
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
#!/bin/bash | |
token() { | |
echo -n 'Authorization: Bearer YOUR_TOKEN_HERE' | |
} | |
acurl() { | |
curl \ | |
-H 'tz: America/New_York' \ | |
-H "$(token)" \ |
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
import subprocess | |
import signal | |
def pipeline(cmds, first_stdin=None, last_stdout=None): | |
"""Pipe together programs using subprocess""" | |
pcount = len(cmds) | |
plist = [] | |
for i, cmd in enumerate(cmds): | |
stdin = None | |
stdout = None |
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
__all__ = ( | |
FormatMessageSystem, | |
LCID_ENGLISH, | |
LCID_NEUTRAL, | |
) | |
import ctypes | |
import ctypes.wintypes | |
LANG_NEUTRAL = 0x00 |
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
import sys; import os; _p = os.path.join(sys.real_prefix, 'lib', 'site-packages'); sys.path.append(_p); import sip; import PyQt4; sys.path.remove(_p) |
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
import os | |
import sys | |
import ctypes | |
ES_AWAYMODE_REQUIRED = 0x00000040 | |
ES_CONTINUOUS = 0x80000000 | |
ES_DISPLAY_REQUIRED = 0x2 #Forces the display to be on by resetting the display idle timer. | |
ES_SYSTEM_REQUIRED = 0x1 #Forces the system to be in the working state by resetting the system idle timer. |
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 file is a testcase of http://bugs.python.org/issue706263 with a workaround. | |
#Z:\>python 4096_tc.py | |
#Z:\>cat result.txt | |
#stdin: 0 stdout: 1 stderr: 2 | |
#Bytes printed: 199998 | |
#Z:\>pythonw 4096_tc.py | |
#Z:\>cat result.txt | |
#stdin: -2 stdout: -2 stderr: -2 | |
#Bytes printed before exception was raised: 4096 | |
#Traceback (most recent call last): |
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
import csv | |
class StreamedDataConverter(object): | |
"""A conversion description that can convert one list of data into a processed dict using the cols attribute. | |
>>> class MyConverter(StreamedDataConverter): | |
... cols = ['a', 'b', 'c'] | |
... | |
>>> c = MyConverter(iter([[4,5,6],[6,7,8]])) | |
>>> c.map_fieldnames(['a','b','c']) |
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
import os | |
import sys | |
import glob | |
import ctypes | |
import logging | |
log = logging.getLogger(__name__) | |
from collections import namedtuple | |
def path_iter(path, root=None, dirsortkey=None): |
NewerOlder