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
rofi usage: | |
rofi [-options ...] | |
Command line only options: | |
-no-config Do not load configuration, use default values. | |
-v,-version Print the version number and exit. | |
-dmenu Start in dmenu mode. | |
-display [string] X server to contact. | |
${DISPLAY} | |
-h,-help This help message. |
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
docopt breaks: | |
-o=<folder-path>, location of the output folder, by default `_build` in | |
--output-folder=<folder-path> the current working folder | |
this scrolls off the screen for all the options if we are lining up columns | |
-o=<folder-path>, --output-folder=<folder-path> location of the output folder, by default `_build` in | |
the current working folder |
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 timeit import Timer | |
# ........................................................................... # | |
FORBIDDEN_CHARS = \ | |
('!', | |
'@', | |
'#', | |
'$', | |
'%', |
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 wsgiref.simple_server import make_server | |
from pyramid.config import Configurator | |
from pyramid.response import Response | |
from rest_toolkit import resource | |
@resource('/') | |
class Greeting(object): | |
def __init__(self, request): | |
pass |
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
Copying src/zope.interface.egg-info to build/bdist.linux-x86_64/wheel/zope.interface-4.1.3-py3.5.egg-info | |
Installing build/bdist.linux-x86_64/wheel/zope.interface-4.1.3-py3.5-nspkg.pth | |
running install_scripts | |
Traceback (most recent call last): | |
File "<string>", line 1, in <module> | |
File "/tmp/pip-build-ctv9n1fs/zope.interface/setup.py", line 147, in <module> | |
**extra) | |
File "/usr/lib64/python3.5/distutils/core.py", line 148, in setup | |
dist.run_commands() | |
File "/usr/lib64/python3.5/distutils/dist.py", line 955, in run_commands |
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
class Engine(object): | |
def __init__(self, size): | |
self.size = size | |
def turn_on(self): | |
print "vrooom" | |
class BiggerEngine(object): | |
def __init__(self, size): |
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
{ system ? builtins.currentSystem, foo ? "hello" }: | |
let | |
pkgs = import <nixpkgs> { inherit system; }; | |
callPackage = pkgs.lib.callPackageWith (pkgs // self // { foo = foo;} ); | |
self = rec { | |
myPackage = callPackage ./pkgs/my_package { | |
some_argument = foo; | |
}; | |
}; |
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
diff --git a/nixops/backends/__init__.py b/nixops/backends/__init__.py | |
index 86ed0f4..c52e9d3 100644 | |
--- a/nixops/backends/__init__.py | |
+++ b/nixops/backends/__init__.py | |
@@ -93,6 +93,17 @@ class MachineState(nixops.resources.ResourceState): | |
except nixops.ssh_util.SSHCommandFailed: | |
return None | |
+ def get_os_arch(self): | |
+ """Get the machine's OS archicture.""" |
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
class NoRequestParamsPredicate(object): | |
def __init__(self, val, config): | |
self.val = bool(val) | |
def text(self): | |
return 'no_request_params = %s' % self.val | |
phash = text | |
def __call__(self, context, request): |
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
class ExactRequestParamPredicate(object): | |
def __init__(self, val, config): | |
val = _as_sorted_tuple(val) | |
reqs = [] | |
for p in val: | |
k = p | |
v = None | |
if '=' in p: | |
k, v = p.split('=', 1) | |
k, v = k.strip(), v.strip() |
NewerOlder