All Samples(94879) | Call(89744) | Derive(5127) | Import(8)
dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
d = {}
for k, v in iterable:
d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
src/p/y/pyelftools-0.20/elftools/elf/descriptions.py pyelftools(Download)
_DESCR_EI_CLASS = dict(
ELFCLASSNONE='none',
ELFCLASS32='ELF32',
ELFCLASS64='ELF64',
)
_DESCR_EI_DATA = dict(
ELFDATANONE='none',
_DESCR_EI_OSABI = dict(
ELFOSABI_SYSV='UNIX - System V',
ELFOSABI_HPUX='UNIX - HP-UX',
ELFOSABI_NETBSD='UNIX - NetBSD',
_DESCR_E_TYPE = dict(
ET_NONE='NONE (None)',
ET_REL='REL (Relocatable file)',
ET_EXEC='EXEC (Executable file)',
_DESCR_E_MACHINE = dict(
EM_NONE='None',
EM_M32='WE32100',
EM_SPARC='Sparc',
src/s/t/statsmodels-0.4.3/statsmodels/iolib/table.py statsmodels(Download)
self._html_fmt.update(fmt_dict)
#substitute any output-type specific formatting
self._csv_fmt.update(csv_fmt or dict())
self._txt_fmt.update(txt_fmt or dict())
self._latex_fmt.update(ltx_fmt or dict())
self._html_fmt.update(html_fmt or dict())
self.output_formats = dict(
txt=self._txt_fmt,
src/p/y/pyobjc-framework-Cocoa-2.5.1/Examples/AppKit/TinyURLService/setup.py pyobjc-framework-Cocoa(Download)
plist = dict(
CFBundleIdentifier = u'net.sf.pyobjc.TinyURLService',
LSBackgroundOnly = 1,
NSServices = [
dict(
NSKeyEquivalent=dict(
default=u'0',
),
NSMenuItem=dict(
default=u'Shorten URL'
),
NSMessage=u'doTinyURLService',
setup(
app=["TinyURLService.py"],
options=dict(py2app=dict(plist=plist)),
)
src/p/y/pyobjc-framework-Cocoa-2.5.1/Examples/AppKit/Todo/setup.py pyobjc-framework-Cocoa(Download)
plist = dict(
CFBundleShortVersionString='To Do v1',
CFBundleIconFile='ToDoApp.icns',
CFBundleGetInfoString='To Do v1',
CFBundleIdentifier='net.sf.pyobjc.ToDo',
CFBundleDocumentTypes=[
dict(
CFBundleTypeName='To Do list',
app=["main.py"],
data_files=["English.lproj" ] + images + icons,
options=dict(py2app=dict(plist=plist)),
)
src/p/a/parse-1.6.1/parse.py parse(Download)
MONTHS_MAP = dict(
Jan=1, January=1,
Feb=2, February=2,
Mar=3, March=3,
DAYS_PAT = '(Mon|Tue|Wed|Thu|Fri|Sat|Sun)'
MONTHS_PAT = '(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)'
ALL_MONTHS_PAT = '(%s)' % '|'.join(MONTHS_MAP)
TIME_PAT = r'(\d{1,2}:\d{1,2}(:\d{1,2}(\.\d+)?)?)'
AM_PAT = r'(\s+[AP]M)'
m = int(m)
else:
m = MONTHS_MAP[m]
d = int(d)
d = datetime(y, m, d, H, M, S, u, tzinfo=tz)
# now figure the match spans
spans = dict((n, m.span(name_map[n])) for n in named_fields)
spans.update((i, m.span(n+1)) for i, n in enumerate(self._fixed_fields))
src/w/e/web2py-HEAD/applications/examples/models/menu.py web2py(Download)
def toggle_menuclass(cssclass='pressed', menuid='headermenu'):
"""This function changes the menu class to put pressed appearance"""
positions = dict(
index='',
});
</script>
""" % dict(cssclass=cssclass,
menuid=menuid,
function=request.function,
src/d/i/dionea-HEAD/dionea/trunk/sample/tg/depot/depot/controllers/admin_controller.py dionea(Download)
def list(self):
products=Product.select()
return dict(products=products)
@expose(template="depot.templates.admin_show")
def show(self,productID):
product = Product.get(productID)
return dict(product=product)
def new(self):
return dict()
@expose()
controllers.redirect("../new")
return dict(tg_template="depot.templates.admin_list")
@expose("depot.templates.admin_edit")
for column in product._columns:
values[column.name]=product.__getattribute__(column.name)
return dict(product=product,form=self.edit_form,values=values,action="../update/"+str(product.id),
css=self.edit_form.css,javascript=self.edit_form.javascript)
src/d/i/dionea-HEAD/dionea/trunk/sample/tg/depot-ajax/depot_ajax/controllers/admin_controller.py dionea(Download)
def list(self):
products=Product.select()
return dict(products=products)
@expose(template="depot_ajax.templates.admin_show")
def show(self,productID):
product = Product.get(productID)
return dict(product=product)
def new(self):
return dict()
@expose()
controllers.redirect("../new")
return dict(tg_template="depot_ajax.templates.admin_list")
@expose("depot_ajax.templates.admin_edit")
for column in product._columns:
values[column.name]=product.__getattribute__(column.name)
return dict(product=product,form=self.edit_form,values=values,action="../update/"+str(product.id),
css=self.edit_form.css,javascript=self.edit_form.javascript)
src/i/p/ipython-0.13.1/docs/examples/core/appconfig.py ipython(Download)
help="Load this config file")
aliases = Dict(dict(i='Foo.i',j='Foo.j',name='Foo.name', running='MyApp.running',
enabled='Bar.enabled', log_level='MyApp.log_level'))
flags = Dict(dict(enable=({'Bar': {'enabled' : True}}, "Enable Bar"),
src/o/r/org_wayround_utils-0.3/org/wayround/utils/stream.py org_wayround_utils(Download)
args = (stdin, stdout),
kwargs = dict(
bs = bs,
count = count,
threaded = False,
target = lbl_write,
args = (stdin, stdout),
kwargs = dict(threaded = False)
)
else:
Previous 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 Next