?limit=3&offset=0
----------
111 ?limit=3&offset=0
222 ?limit=3&offset=3
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 ruby | |
# Updates path to Python executables in ~/.pyenv/shims. `brew upgrade` breaks | |
# them. Set the correct versions in the EXPECTED and REPLACED variables below | |
# and run in ~/.pyenv/shims. WARNING! It replaces the files, not making any | |
# backups. Use at your own risk! | |
EXPECTED = <<~EOS.chomp | |
exec "/usr/local/Cellar/pyenv/1.2.13/libexec/pyenv" exec "$program" "$@" | |
EOS |
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 glob import glob | |
from os.path import join | |
from pre_commit_hooks.end_of_file_fixer import fix_file | |
PATTERNS = ( | |
"*.py", | |
"*.ini", | |
"README", |
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
;; Added by Package.el. This must come before configurations of | |
;; installed packages. Don't delete this line. If you don't want it, | |
;; just comment it out by adding a semicolon to the start of the line. | |
;; You may delete these explanatory comments. | |
(package-initialize) | |
;; Disable tool bar and menu bar in GUI | |
(menu-bar-mode 0) | |
(tool-bar-mode 0) |
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 ruby | |
=begin | |
PgAdmin 4 runs on a random port. Once you close its browser window, there | |
is no way to get back to it. But it stores its address in a hidden file. | |
This script finds the file and opens the address inside in a default | |
browser. | |
=end | |
path = File::expand_path('~') |
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
# Prevent warning caused by upgrade to Python 3.10. | |
# See https://github.com/xonsh/xonsh//issues/4409. | |
import warnings | |
warnings.filterwarnings( | |
'ignore', | |
message='There is no current event loop', | |
category=DeprecationWarning, | |
module='prompt_toolkit', | |
) |
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 simple tornado application that produces to and consumes from a single | |
# Kafka topic. It works as follows: | |
# * inputer is fired whenever new data are entered to stdin. Assumes that this | |
# data is in JSON format. Decodes them and puts them on a local produce_queue. | |
# * producer connects to Kafka and watches for new items to appear in a local | |
# produce_queue. Produces those items to Kafka. | |
# * consumer connects to Kafka and reads messages from it. It does nothing with | |
# them, just retrieving them to demonstrate the bug. | |
# | |
# Usage: |
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
# -*- coding: UTF-8 -*- | |
from insights.client.client import collect | |
from insights.client.config import InsightsConfig | |
from insights.client.connection import InsightsConnection | |
from mock.mock import patch | |
def main(): | |
with patch("insights.client.client.get_branch_info", return_value={}): |
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
Traceback (most recent call last): | |
File "/Users/Glutexo/dev/my_repo/venv/lib/python3.7/site-packages/kiel/iterables.py", line 24, in drain | |
yield next_item(iterable) | |
File "/Users/Glutexo/dev/my_repo/venv/lib/python3.7/site-packages/kiel/iterables.py", line 17, in next_item | |
return coll.popitem() | |
KeyError: 'popitem(): dictionary is empty' | |
During handling of the above exception, another exception occurred: | |
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
________________________________ test_shadowing ________________________________ | |
def test_shadowing(): | |
httpd1 = HttpdConf(context_wrap(HTTPD_CONF_SHADOWTEST_1, path='/etc/httpd/conf/httpd.conf')) | |
httpd2 = HttpdConf(context_wrap(HTTPD_CONF_SHADOWTEST_2, path='/etc/httpd/conf.d/00-z.conf')) | |
httpd3 = HttpdConf(context_wrap(HTTPD_CONF_SHADOWTEST_3, path='/etc/httpd/conf.d/z-z.conf')) | |
result = HttpdConfAll([httpd1, httpd2, httpd3]) | |
# get_setting_list returns ALL matching data |