repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
nesdis/djongo
refs/heads/master
tests/django_tests/tests/v21/tests/postgres_tests/models.py
5
from django.core.serializers.json import DjangoJSONEncoder from django.db import models from .fields import ( ArrayField, BigIntegerRangeField, CICharField, CIEmailField, CITextField, DateRangeField, DateTimeRangeField, FloatRangeField, HStoreField, IntegerRangeField, JSONField, SearchVectorField, ) clas...
pkoutsias/SickRage
refs/heads/master
sickbeard/providers/nyaatorrents.py
2
# coding=utf-8 # Author: Mr_Orange # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or...
JavML/django
refs/heads/master
tests/user_commands/management/commands/transaction.py
553
from django.core.management.base import BaseCommand class Command(BaseCommand): help = "Say hello." args = '' output_transaction = True def handle(self, *args, **options): return 'Hello!'
thomashaw/SecGen
refs/heads/master
modules/utilities/unix/audit_tools/ghidra/files/release/Ghidra/Features/Python/data/jython-2.7.1/Lib/distutils/jythoncompiler.py
6
"""distutils.jythoncompiler Jython does not support extension libraries. This CCompiler simply raises CCompiler exceptions. """ from distutils.ccompiler import CCompiler import warnings class JythonCompiler(CCompiler): """Refuses to compile C extensions on Jython""" compiler_type = 'jython' executables...
kindersung/servo
refs/heads/master
tests/wpt/web-platform-tests/webdriver/network.py
212
# this comes from this stack overflow post: # http://stackoverflow.com/a/1947766/725944 # module for getting the lan ip address of the computer import os import socket if os.name != "nt": import fcntl import struct def get_interface_ip(ifname): sckt = socket.socket(socket.AF_INET, socket.SOCK_DGR...
Pakketeretet2/lammps
refs/heads/master
tools/i-pi/ipi/engine/cell.py
33
"""Contains the classes which deal with the system box. Copyright (C) 2013, Joshua More and Michele Ceriotti This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at y...
maackle/ILC-app
refs/heads/master
lib/pyspatialite-3.0.1/lib/test/hooks.py
1
#-*- coding: ISO-8859-1 -*- # pyspatialite/test/hooks.py: tests for various SQLite-specific hooks # # Copyright (C) 2006-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable ...
idea4bsd/idea4bsd
refs/heads/idea4bsd-master
python/testData/docstrings/googleKeywordArgumentsSection.py
53
def f(): """ Keyword arguments: """
andrewmoses/ssquiz
refs/heads/master
flask/lib/python2.7/site-packages/sqlparse/engine/__init__.py
119
# Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com # # This module is part of python-sqlparse and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php. """filter""" from sqlparse import lexer from sqlparse.engine import grouping from sqlparse.engine.filter import StatementF...
inonit/wagtail
refs/heads/master
wagtail/wagtailimages/utils.py
40
import base64 import hmac import hashlib from django.conf import settings def generate_signature(image_id, filter_spec): # Based on libthumbor hmac generation # https://github.com/thumbor/libthumbor/blob/b19dc58cf84787e08c8e397ab322e86268bb4345/libthumbor/crypto.py#L50 url = str(image_id) + '/' + str(fil...
naerthon/cursodjango
refs/heads/master
cursodjango/settings_local.py
10
from settings import *
theotherjimmy/mbed
refs/heads/master
tools/misc/remove-device-h.py
53
import json import os import stat import re from collections import OrderedDict from subprocess import Popen git_processes = [] class MyJSONEncoder(json.JSONEncoder): def __init__(self, *args, **kwargs): super(MyJSONEncoder, self).__init__(*args, **kwargs) self.current_indent = 0 self.curr...
kazitanvirahsan/scrapy
refs/heads/master
scrapy/contrib/spiders/crawl.py
144
import warnings from scrapy.exceptions import ScrapyDeprecationWarning warnings.warn("Module `scrapy.contrib.spiders.crawl` is deprecated, " "use `scrapy.spiders.crawl` instead", ScrapyDeprecationWarning, stacklevel=2) from scrapy.spiders.crawl import *
galah-group/galah-interact-python
refs/heads/master
docs/guides/examples/unittest_tutorial/harness_with_capture.py
2
import interact from interact.capture import capture_function student_code = interact.unittest.load_files(["main.cpp"]) captured_function = capture_function(student_code["main"]["bar"], 3, 4) # Wait for the function to end. captured_function.wait() print "The function returned:", repr(captured_function.return_value...
CodeForKuwait/reForm
refs/heads/master
reForm/reForm/__init__.py
12133432
sabi0/intellij-community
refs/heads/master
python/testData/resolve/multiFile/fromQualifiedPackageImportFile/mypackage/child/testfile.py
12133432
gjtorikian/readthedocs.org
refs/heads/master
readthedocs/gold/migrations/__init__.py
12133432
koebbe/homeworks
refs/heads/master
visit/__init__.py
12133432
bitcity/django
refs/heads/master
django/conf/locale/km/__init__.py
12133432
okffi/decisions
refs/heads/master
web/decisions/news/templatetags/__init__.py
12133432
Juniper/nova
refs/heads/master
nova/tests/unit/api/openstack/__init__.py
12133432
saurabh6790/medapp
refs/heads/master
patches/june_2013/p05_remove_search_criteria_reports.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes def execute(): try: webnotes.conn.sql("""delete from `tabSearch Criteria` where ifnull(standard, 'No') = 'Yes'""") except Except...
prometheanbob/clowdflows
refs/heads/master
workflows/noise/interaction_views.py
7
from django.shortcuts import render def noise_filter_integers(request,input_dict,output_dict,widget): return render(request, 'interactions/noise_filter_integers.html',{'widget':widget,'intList':input_dict['intList']})
bixbydev/Bixby
refs/heads/master
google/dist/gdata-2.0.18/samples/apps/marketplace_sample/gdata/tlslite/X509CertChain.py
238
"""Class representing an X.509 certificate chain.""" from utils import cryptomath class X509CertChain: """This class represents a chain of X.509 certificates. @type x509List: list @ivar x509List: A list of L{tlslite.X509.X509} instances, starting with the end-entity certificate and with ever...
sauloal/pycluster
refs/heads/master
pypy-1.9_64/lib_pypy/dbm.py
2
from ctypes import Structure, c_char_p, c_int, c_void_p, CDLL import ctypes.util import os, sys class error(Exception): def __init__(self, msg): self.msg = msg def __str__(self): return self.msg class datum(Structure): _fields_ = [ ('dptr', c_char_p), ('dsize', c_int), ] ...
kaushik94/sympy
refs/heads/master
sympy/codegen/matrix_nodes.py
3
""" Additional AST nodes for operations on matrices. The nodes in this module are meant to represent optimization of matrix expressions within codegen's target languages that cannot be represented by SymPy expressions. As an example, we can use :meth:`sympy.codegen.rewriting.optimize` and the ``matin_opt`` optimizatio...
jdunaravich/thumbor
refs/heads/master
thumbor/loaders/https_loader.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com from thumbor.loaders import http_loader from tornado.concurrent impor...
vasyarv/edx-platform
refs/heads/master
cms/djangoapps/contentstore/features/video_editor.py
101
# -*- coding: utf-8 -*- # disable missing docstring # pylint: disable=missing-docstring import requests from lettuce import world, step from nose.tools import assert_true, assert_equal, assert_in, assert_not_equal # pylint: disable=no-name-in-module from terrain.steps import reload_the_page from django.conf import se...
possel/possel
refs/heads/dev
possel/web_client.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import tornado.web class WebUIServer(tornado.web.RequestHandler): def get(self): self.render('client.html')
Nova-Boy/zeppelin
refs/heads/master
interpreter/lib/python/mpl_config.py
23
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
dursk/django
refs/heads/master
tests/migration_test_data_persistence/tests.py
368
from django.test import TestCase, TransactionTestCase from .models import Book class MigrationDataPersistenceTestCase(TransactionTestCase): """ Tests that data loaded in migrations is available if we set serialized_rollback = True on TransactionTestCase """ available_apps = ["migration_test_data...
TeamNext/EmpressX
refs/heads/master
empressx/contrib/auth/forms.py
1
from django import forms class AuthenticationForm(forms.Form): ticket = forms.SlugField(max_length=512)
lberruti/ansible-modules-core
refs/heads/maint1.99
database/mysql/__init__.py
12133432
muffinresearch/amo-validator
refs/heads/master
validator/testcases/l10n/__init__.py
12133432
aleksandra-tarkowska/django
refs/heads/master
tests/custom_columns/__init__.py
12133432
naphthalene/hubcave
refs/heads/master
hubcave/core/management/commands/__init__.py
12133432
lkastler/Analysis-DbpediaLogs
refs/heads/master
DatasetAnalyzer/src/dbpedia_analyzer/__init__.py
12133432
learn-ml/ml
refs/heads/master
optimiz/__init__.py
12133432
Immortalin/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/distutils/tests/test_msvc9compiler.py
47
"""Tests for distutils.msvc9compiler.""" import sys import unittest import os from distutils.errors import DistutilsPlatformError from distutils.tests import support from test.support import run_unittest _MANIFEST = """\ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-co...
sergafts/django-registration
refs/heads/master
registration/forms.py
2
""" Forms and validation code for user registration. Note that all of these forms assume Django's bundle default ``User`` model; since it's not possible for a form to anticipate in advance the needs of custom user models, you will need to write your own forms if you're using a custom model. """ from __future__ import...
vijayanandnandam/youtube-dl
refs/heads/master
youtube_dl/extractor/tele13.py
90
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from .youtube import YoutubeIE from ..utils import ( js_to_json, qualities, determine_ext, ) class Tele13IE(InfoExtractor): _VALID_URL = r'^https?://(?:www\.)?t13\.cl/videos(?:/[^/]+)+/(?P<id>[\w-]+)' _TESTS...
priyankajain18/nereid-webshop
refs/heads/develop
tests/test_base.py
3
''' Test Base Case :copyright: (c) 2014 by Openlabs Technologies & Consulting (P) LTD :license: GPLv3, see LICENSE for more details ''' import datetime from decimal import Decimal from dateutil.relativedelta import relativedelta import pycountry import trytond.tests.test_tryton from trytond.tests.test_tr...
alikins/ansible
refs/heads/devel
lib/ansible/modules/packaging/language/gem.py
27
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Johan Wiren <johan.wiren.se@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1...
daymer/xWIKI_Karma
refs/heads/master
CustomModules/mysql-connector-python-2.1.7/tests/test_pep249.py
13
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
samdoran/ansible
refs/heads/devel
lib/ansible/plugins/strategy/free.py
36
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
abhikumar22/MYBLOG
refs/heads/master
blg/Lib/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py
2715
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including with...
SecretImbecile/McrRaspJam
refs/heads/master
006_Picraft_advancedMinecraft/3_tntsword.py
2
#API setup from picraft import Vector from picraft import World, Block def operation(world, position): world.blocks[position] = Block(8, 1) def main(): #API setup world = World() while True: #get recent sword hits hits = world.events.poll() for hit in hits: currenthit...
tgoodyear/dpkt
refs/heads/master
dpkt/rpc.py
17
# $Id$ """Remote Procedure Call.""" import struct import dpkt # RPC.dir CALL = 0 REPLY = 1 # RPC.Auth.flavor AUTH_NONE = AUTH_NULL = 0 AUTH_UNIX = 1 AUTH_SHORT = 2 AUTH_DES = 3 # RPC.Reply.stat MSG_ACCEPTED = 0 MSG_DENIED = 1 # RPC.Reply.Accept.stat SUCCESS = 0 PROG_UNAVAIL = 1 PROG_MISMATCH = 2 PROC_UNAVAIL = 3 ...
mzdaniel/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/introspection/tests.py
47
from django.conf import settings from django.db import connection, DEFAULT_DB_ALIAS from django.test import TestCase, skipUnlessDBFeature from django.utils import functional from models import Reporter, Article # # The introspection module is optional, so methods tested here might raise # NotImplementedError. This is...
gisce/OCB
refs/heads/7.0
addons/crm/crm_phonecall.py
23
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
CharlesMcKinnis/stack-recon
refs/heads/master
stack-recon/mysql/connector/fabric/connection.py
17
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
jaruba/chromium.src
refs/heads/nw12
tools/telemetry/telemetry/page/record_wpr.py
11
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import sys from telemetry import benchmark from telemetry.core import browser_options from telemetry.core import discover from telemetry.core...
Bounder/xhtml2pdf
refs/heads/master
demo/tgpisa/tgpisa/__init__.py
12133432
itbabu/django-filer
refs/heads/develop
filer/fields/__init__.py
12133432
nolanliou/tensorflow
refs/heads/master
tensorflow/python/estimator/canned/optimizers.py
73
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tumi8/sKnock
refs/heads/master
server/benchmarks/__init__.py
1
__all__ = ['ap_firewall']
macosforge/ccs-calendarserver
refs/heads/master
txdav/caldav/datastore/scheduling/test/test_implicit.py
1
## # Copyright (c) 2005-2017 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
kamotos/sendprism
refs/heads/master
docs/conf.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # sendprism documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...
GhostThrone/django
refs/heads/master
tests/migrations/test_operations.py
105
from __future__ import unicode_literals import unittest from django.db import connection, migrations, models, transaction from django.db.migrations.migration import Migration from django.db.migrations.state import ProjectState from django.db.models.fields import NOT_PROVIDED from django.db.transaction import atomic f...
saketkc/bioconda-recipes
refs/heads/master
recipes/embl-api-validator/embl-api-validator.py
46
#!/usr/bin/env python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # Program Parameters # import os import s...
kobejean/tensorflow
refs/heads/master
tensorflow/python/layers/base.py
4
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
gyang/nova
refs/heads/master
nova/virt/vmwareapi/io_util.py
5
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # htt...
alonisser/Open-Knesset
refs/heads/master
user/templatetags/__init__.py
12133432
mrfelcio/where-do-you-go
refs/heads/master
gheatae/__init__.py
12133432
labkaxita/lakaxita
refs/heads/master
lakaxita/tests/__init__.py
12133432
iamkingmaker/trading-with-python
refs/heads/master
lib/__init__.py
12133432
edxzw/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/util/__init__.py
12133432
loic/django
refs/heads/master
tests/template_tests/syntax_tests/test_cache.py
45
from django.core.cache import cache from django.template import Context, Engine, TemplateSyntaxError from django.test import SimpleTestCase, override_settings from ..utils import setup class CacheTagTests(SimpleTestCase): libraries = { 'cache': 'django.templatetags.cache', 'custom': 'template_tes...
bankonmecoin/namecoin-legacy
refs/heads/namecoinq
client/DNS/Type.py
40
# -*- encoding: utf-8 -*- """ $Id: Type.py,v 1.6.2.2 2009/06/09 18:39:06 customdesigned Exp $ This file is part of the pydns project. Homepage: http://pydns.sourceforge.net This code is covered by the standard Python License. TYPE values (section 3.2.2) """ A = 1 # a host address NS = 2 # an...
sandeepgupta2k4/tensorflow
refs/heads/master
tensorflow/python/platform/resource_loader.py
75
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
isra17/hubot-against-humanity-backend
refs/heads/master
hah/server.py
1
from hah import create_app app = create_app() app.logger.info('[server] init done')
appsembler/edx-platform
refs/heads/appsembler/tahoe/master
common/djangoapps/terrain/stubs/lti.py
20
""" Stub implementation of LTI Provider. What is supported: ------------------ 1.) This LTI Provider can service only one Tool Consumer at the same time. It is not possible to have this LTI multiple times on a single page in LMS. """ import base64 import hashlib import textwrap import urllib from uuid import uuid4 ...
kapt/django-oscar
refs/heads/master
sites/demo/apps/order/migrations/__init__.py
12133432
nirmeshk/oh-mainline
refs/heads/master
vendor/packages/Django/tests/modeltests/update_only_fields/__init__.py
12133432
indictranstech/erpnext
refs/heads/develop
erpnext/education/doctype/student_language/__init__.py
12133432
kawamon/hue
refs/heads/master
desktop/core/ext-py/Mako-1.0.7/test/test_filters.py
7
# -*- coding: utf-8 -*- from mako.template import Template import unittest from test import TemplateTest, eq_, requires_python_2 from test.util import result_lines, flatten_result from mako.compat import u from mako import compat class FilterTest(TemplateTest): def test_basic(self): t = Template(""" ...
aricooperman/Jzipline
refs/heads/master
zipline/pipeline/factors/factor.py
2
""" factor.py """ from functools import wraps from operator import attrgetter from numbers import Number from numpy import inf, where from zipline.errors import UnknownRankMethod from zipline.lib.normalize import naive_grouped_rowwise_apply from zipline.lib.rank import masked_rankdata_2d from zipline.pipeline.api_uti...
MadeiraCloud/salt
refs/heads/master
libs/requests/packages/chardet/escprober.py
2935
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
zubair-arbi/edx-platform
refs/heads/master
common/djangoapps/student/migrations/0046_auto__add_entranceexamconfiguration__add_unique_entranceexamconfigurat.py
93
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'EntranceExamConfiguration' db.create_table('student_entranceexamconfiguration', ( ...
Communities-Communications/cc-odoo
refs/heads/master
openerp/addons/base/ir/ir_qweb.py
9
# -*- coding: utf-8 -*- import collections import cStringIO import datetime import hashlib import json import itertools import logging import math import os import re import sys import textwrap import uuid from subprocess import Popen, PIPE from urlparse import urlparse import babel import babel.dates import werkzeug ...
patrickm/chromium.src
refs/heads/nw
chrome/test/functional/netflix.py
68
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import time import pyauto_functional import pyauto import test_utils class NetflixTestHelper(): """He...
wietsefranssen/RVIC
refs/heads/master
rvic/__init__.py
3
from .version import short_version as __version__
kwagyeman/openmv
refs/heads/master
scripts/examples/OpenMV/02-Board-Control/i2c_control.py
5
# I2C Control # # This example shows how to use the i2c bus on your OpenMV Cam by dumping the # contents on a standard EEPROM. To run this example either connect the # Thermopile Shield to your OpenMV Cam or an I2C EEPROM to your OpenMV Cam. from pyb import I2C i2c = I2C(2, I2C.MASTER) # The i2c bus must always be 2....
archifix/settings
refs/heads/master
sublime/Packages/pyyaml/st2/yaml/emitter.py
388
# Emitter expects events obeying the following grammar: # stream ::= STREAM-START document* STREAM-END # document ::= DOCUMENT-START node DOCUMENT-END # node ::= SCALAR | sequence | mapping # sequence ::= SEQUENCE-START node* SEQUENCE-END # mapping ::= MAPPING-START (node node)* MAPPING-END __all__ = ['Emitter', 'Emi...
brunosmmm/hdltools
refs/heads/master
hdltools/verilog/codegen.py
1
"""Generate Verilog Statements.""" import math from ..abshdl.codegen import HDLCodeGenerator from scoff.codegen import indent from ..abshdl.const import HDLIntegerConstant _INDENT_STR = " " class VerilogCodeGenerator(HDLCodeGenerator): """Generate verilog code.""" VERILOG_CONSTANT_RADIX = ["d", "b", "h...
thiriel/maps
refs/heads/master
venv/lib/python2.7/site-packages/django/conf/locale/de/formats.py
329
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j. F Y H:i:s' YEAR_MONTH...
40223249-1/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/sre_parse.py
630
# # Secret Labs' Regular Expression Engine # # convert re-style regular expression to sre pattern # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" # XXX: show string offset and offending ch...
gear/motifwalk
refs/heads/master
research/src/mane/datamanager.py
1
"""data manager """ # Coding: utf-8 # File name: mane.py # Created: 2016-07-19 # Description: Main file to run the model. ## v0.0: File created. Add argparse import csv import random def read_edges_from_txt(filepath, sep=" ", one_origin=False): edges = [] with open(filepath) as f: for line in f: ...
nelmiux/CarnotKE
refs/heads/master
jyhton/lib-python/2.7/encodings/cp1253.py
593
""" Python Character Mapping Codec cp1253 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1253.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
geminy/aidear
refs/heads/master
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/skia/make.py
1
# Copyright 2011 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # "Makefile" replacement to build skia for Windows. # More info at https://skia.org. # # Some usage examples: # make clean # make dm # make bench BUILDTYPE=Release # make gm GYP_...
alex/django-old
refs/heads/master
django/template/smartif.py
331
""" Parser and utilities for the smart 'if' tag """ import operator # Using a simple top down parser, as described here: # http://effbot.org/zone/simple-top-down-parsing.htm. # 'led' = left denotation # 'nud' = null denotation # 'bp' = binding power (left = lbp, right = rbp) class TokenBase(object): """ Ba...
trishnaguha/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_trunk.py
14
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
petrvanblokland/Xierpa3
refs/heads/master
xierpa3/adapters/dynamodbadapter.py
1
# -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # xierpa server # Copyright (c) 2014+ buro@petr.com, www.petr.com, www.xierpa.com # # X I E R P A 3 # Distribution by the MIT License. # # -----------------------------------------------------------...
rafael-neri/bigbashview
refs/heads/master
usr/share/bigbashview3/ui/__init__.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2008 Wilson Pinto Júnior <wilson@openlanhouse.org> # Copyright (C) 2011 Thomaz de Oliveira dos Reis <thor27@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
kool79/intellij-community
refs/heads/master
python/testData/inspections/PyMethodMayBeStaticInspection/property.py
83
__author__ = 'ktisha' class C(object): def __init__(self): self._x = None @property def x(self): """I'm the 'x' property.""" return "property" @x.setter def x(self, value): print "setter" @x.deleter def x(self): print "deleter"
vmindru/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_postgresqldatabase_facts.py
22
#!/usr/bin/python # # Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
ikaritw/crouton
refs/heads/master
chroot-etc/xbmc-cycle.py
13
#!/usr/bin/env python # Copyright (c) 2015 The crouton Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # Python script to call croutoncycle. This is needed to let the # hotkeys ctr-shift-alt F1/F2 work when xbmc is in fullscreen. imp...
beni55/django-tastypie
refs/heads/master
tastypie/api.py
44
from __future__ import unicode_literals import warnings from django.conf.urls import url, patterns, include from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseBadRequest from tastypie.exceptions import NotRegistered, Bad...
eggmaster/tempest
refs/heads/master
tempest/api/compute/admin/test_quotas.py
3
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
ilayn/scipy
refs/heads/master
scipy/sparse/csgraph/tests/test_connected_components.py
21
import numpy as np from numpy.testing import assert_equal, assert_array_almost_equal from scipy.sparse import csgraph def test_weak_connections(): Xde = np.array([[0, 1, 0], [0, 0, 0], [0, 0, 0]]) Xsp = csgraph.csgraph_from_dense(Xde, null_value=0) for X in Xsp, X...