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/pip/commands/list.py b/pip/commands/list.py | |
index 3a0330a..3e4fcc7 100644 | |
--- a/pip/commands/list.py | |
+++ b/pip/commands/list.py | |
@@ -45,6 +45,12 @@ class ListCommand(Command): | |
help=('If in a virtualenv that has global access, do not list ' | |
'globally-installed packages.'), | |
) | |
+ cmd_opts.add_option( | |
+ '-L', '--location', |
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
data = {} | |
data["extend"] = function (data, t) | |
for n, recipe in ipairs(t) do | |
for i, component in ipairs(recipe["ingredients"]) do | |
cname = component[1] or component["name"] | |
camt = component[2] or component["amount"] | |
print('"' .. recipe["name"] .. '","' .. cname .. '",' .. camt) | |
end | |
end | |
end |
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
# Default User | |
d-i passwd/user-fullname string XXXXXXXX | |
d-i passwd/username string XXXXXXXX | |
d-i passwd/user-password-crypted password XXXXXXXX | |
d-i user-setup/encrypt-home boolean false | |
d-i user-setup/allow-password-weak boolean true | |
# Time Zone, system clock is UTC | |
d-i time/zone string Europe/London | |
d-i clock-setup/utc-auto boolean true |
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
"""Standalone wheel file installer. | |
Wheels are a binary install format for Python. The wheel package provides | |
hooks to allow pip to install wheels, as well as a "wheel install" command for | |
standalone use. However, it is still necessary to have the wheel package | |
installed if you want to install a wheel. Given that the wheel format is | |
intended to be "truly easy to install", it seems reasonable to expect to be | |
able to install a wheel without needing any special tools. | |
Hence this utility. |
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
function! ExecRange(cmd) range | |
let l:old_a = @a | |
exec a:firstline . ',' . a:lastline . 'yank a' | |
if a:cmd == '' | |
exec @a | |
else | |
echo system(a:cmd, @a) | |
endif | |
let @a = l:old_a | |
endfunction |
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
"""A dummy loader implementation. | |
This is a deliberate attempt to implement an absolutely minimal finder/loader | |
combination. | |
The spec is: | |
1. If I add an entry dummy:XXX to sys.path, then that entry will be picked | |
up by my finder and used to satisfy import requests for any modules | |
starting with 'XXX'. |
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 importlib.abc import PathEntryFinder, SourceLoader, FileLoader | |
from importlib.util import module_for_loader | |
class MyFinder(PathEntryFinder): | |
def __init__(self, pathentry): | |
"""Create a finder for the given `pathentry`""" | |
if pathentry == 'foo': | |
return | |
raise ImportError | |
def find_loader(self, fullname): |
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 python | |
import os | |
import sys | |
import shutil | |
import tempfile | |
import subprocess | |
from glob import glob | |
from argparse import ArgumentParser |
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, os | |
here = os.path.dirname(os.path.abspath(__file__)) | |
def add(name): | |
fullname = os.path.join(here, name) | |
if os.path.isdir(fullname): | |
sys.path.append(fullname) | |
add('py{0[0]}'.format(sys.version_info)) | |
add('py{0[0]}{0[1]}'.format(sys.version_info)) |
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 code can be put in any Python module, it does not require IPython | |
# itself to be running already. It only creates the magics subclass but | |
# doesn't instantiate it yet. | |
from IPython.core.magic import (Magics, magics_class, line_magic, | |
cell_magic, line_cell_magic) | |
import sqlite3 | |
# The class MUST call this class decorator at creation time | |
@magics_class | |
class MyMagics(Magics): |
NewerOlder