Skip to content

Instantly share code, notes, and snippets.

$ pip install -t /opt/azure azure-cli
Collecting azure-cli
Using cached azure_cli-2.0.10-py2.py3-none-any.whl
Collecting azure-cli-keyvault (from azure-cli)
Using cached azure_cli_keyvault-2.0.8-py2.py3-none-any.whl
Collecting azure-cli-consumption (from azure-cli)
Using cached azure_cli_consumption-0.1.3-py2.py3-none-any.whl
Collecting azure-cli-batch (from azure-cli)
Using cached azure_cli_batch-3.0.3-py2.py3-none-any.whl
Collecting azure-cli-configure (from azure-cli)
"""
Given a scrape of the HTML page for a Kiln project, download everything.
"""
__requires__ = [
'lxml',
]
import lxml.etree
@jaraco
jaraco / a.rb
Created October 30, 2017 13:08
/home/site/wwwroot>cd libs/lxml
/home/site/wwwroot/libs/lxml>ls
_elementpath.cpython-36m-x86_64-linux-gnu.so
etree.cpython-36m-x86_64-linux-gnu.so
/home/site/wwwroot/libs/lxml>ls -la
total 6868
drwxrwxrwx 2 nobody nogroup 4096 Oct 28 01:13 .
drwxrwxrwx 2 nobody nogroup 16384 Oct 28 01:23 ..
-rwxrwxrwx 1 nobody nogroup 304689 Oct 27 20:09 _elementpath.cpython-36m-x86_64-linux-gnu.so
-rwxrwxrwx 1 nobody nogroup 6704624 Oct 27 20:09 etree.cpython-36m-x86_64-linux-gnu.so
@jaraco
jaraco / a.rb
Created November 16, 2017 14:10
$ curl -6 -v -l https://www.python.org/
* Trying 2a04:4e42:2f::223...
* TCP_NODELAY set
* Connected to www.python.org (2a04:4e42:2f::223) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
__requires__ = [
'flask>=0.12.2',
'flask-restful>=0.3.6',
'requests_toolbelt',
'autocommand',
]
import contextlib
from requests_toolbelt import sessions
@jaraco
jaraco / a.rb
Created November 29, 2017 22:43
$ git bisect start
$ git bisect bad v11.1.0
$ git bisect good v11.0.0
Bisecting: 126 revisions left to test after this (roughly 7 steps)
[937216bd92d623cc415860f41a4762122d91ce61] Remove extraneous parenthesis. Replace faux em dash with semicolon.
$ git bisect run rwt -q . -- ~/issue-1662.py
running rwt -q . -- /Users/jaraco/issue-1662.py
first a get
then options no params
then options with params
@jaraco
jaraco / a.rb
Created December 5, 2017 16:33
$ cd issue-61
$ cat > setup.py
import distutils.core
distutils.core.setup(
name='foo',
version='1.0',
)
$ touch blah.py
$ python setup.py sdist
@jaraco
jaraco / a.rb
Created December 5, 2017 16:47
$ cat > setup.py
__import__('setuptools').setup(name='foo', version='1.0', packages=__import__('setuptools').find_packages())
$ python setup.py sdist
running sdist
running egg_info
writing foo.egg-info/PKG-INFO
writing dependency_links to foo.egg-info/dependency_links.txt
writing top-level names to foo.egg-info/top_level.txt
reading manifest file 'foo.egg-info/SOURCES.txt'
writing manifest file 'foo.egg-info/SOURCES.txt'
@jaraco
jaraco / Dockerfile
Last active December 7, 2017 15:11
Dockerfile reproducer for pypa/setuptools#1229
FROM ubuntu:xenial
# general environment for docker
ENV DEBIAN_FRONTEND=noninteractive \
FORCE_UNSAFE_CONFIGURE=1
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
build-essential \
import functools
import collections
import cherrypy
class SelectedMethod:
"""
Descriptor allowing a series of handler methods to satisfy
a variety of behaviors based on the request method.