repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
redbear/Espruino
refs/heads/redbear-duo
boards/NUCLEOF401RE.py
3
#!/bin/false # -*- coding: utf8 -*- # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk> # Copyright (C) 2014 Alain Sézille for NucleoF401RE specific lines of this file # # This Source Code Form is subject to the terms of the Mozilla Publi...
ondra-novak/chromium.src
refs/heads/nw
chrome/common/extensions/docs/server2/api_list_data_source.py
7
# 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. from data_source import DataSource from future import Future from operator import itemgetter from platform_util import GetPlatforms from docs_server_uti...
cwxda/android_kernel_xiaomi_armani_caf
refs/heads/master
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
dnozay/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/contrib/comments/urls.py
293
from django.conf.urls.defaults import * urlpatterns = patterns('django.contrib.comments.views', url(r'^post/$', 'comments.post_comment', name='comments-post-comment'), url(r'^posted/$', 'comments.comment_done', name='comments-comment-done'), url(r'^flag/(\d+)/$', 'moderation....
nawawi/poedit
refs/heads/stable
deps/boost/libs/python/test/class.py
20
# Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ''' >>> from class_ext import * Ensure sanity: >>> x = X(42) >>> x_function(x) 42 Demonstrate extraction in the presence of metaclass changes: >>> ...
jjmleiro/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/core/management/commands/sqlclear.py
242
from __future__ import unicode_literals from optparse import make_option from django.core.management.base import AppCommand from django.core.management.sql import sql_delete from django.db import connections, DEFAULT_DB_ALIAS class Command(AppCommand): help = "Prints the DROP TABLE SQL statements for the given a...
CaptorOfSin/pogom
refs/heads/master
pogom/pgoapi/protos/POGOProtos/Enums/ItemEffect_pb2.py
16
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Enums/ItemEffect.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf ...
rohitw1991/innoworth-lib
refs/heads/master
webnotes/translate.py
2
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt from __future__ import unicode_literals """ Contributing: 1. Add the .csv file 2. Run import 3. Then run translate """ import webnotes import os import codecs import json import re from csv import reader from webnotes.modules imp...
paulrouget/servo
refs/heads/master
components/style/properties/build.py
7
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. import json import os.path import re import sys BASE = os.path.dirname(__file__.replace('\\', '/')) sys.path.insert(0,...
abhishek-ch/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/urlpatterns_reverse/middleware.py
58
from __future__ import absolute_import from django.core.urlresolvers import reverse from django.http import HttpResponse, StreamingHttpResponse from . import urlconf_inner class ChangeURLconfMiddleware(object): def process_request(self, request): request.urlconf = urlconf_inner.__name__ class NullChang...
hunter007/django-rest-framework
refs/heads/master
rest_framework/authtoken/views.py
76
from rest_framework import parsers, renderers from rest_framework.authtoken.models import Token from rest_framework.authtoken.serializers import AuthTokenSerializer from rest_framework.response import Response from rest_framework.views import APIView class ObtainAuthToken(APIView): throttle_classes = () permi...
grehx/spark-tk
refs/heads/master
regression-tests/sparktkregtests/lib/spark_context_config.py
4
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # 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 require...
django-danceschool/django-danceschool
refs/heads/master
danceschool/core/migrations/0032_auto_20200120_1323.py
1
# Generated by Django 2.2.6 on 2020-01-20 18:23 import danceschool.core.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0031_datamigrate_20200116_2332'), ] operations = [ migrations.RemoveField( model_name='ev...
0Chencc/CTFCrackTools
refs/heads/master
Lib/Queue.py
188
"""A multi-producer, multi-consumer queue.""" from time import time as _time try: import threading as _threading except ImportError: import dummy_threading as _threading from collections import deque import heapq __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue'] class Empty(Exception): "...
Scifabric/pybossa-onesignal
refs/heads/master
pbsonesignal/__init__.py
1
# -*- coding: utf8 -*- # This file is part of PYBOSSA. # # Copyright (C) 2017 Scifabric LTD. # # PYBOSSA is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
CallaJun/hackprince
refs/heads/master
indico/networkx/classes/digraph.py
8
"""Base class for directed graphs.""" # Copyright (C) 2004-2011 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. from copy import deepcopy import networkx as nx from networkx.classes.graph import Graph from ne...
kstrauser/ansible
refs/heads/devel
v1/ansible/inventory/dir.py
134
# (c) 2013, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2014, Serge van Ginderachter <serge@vanginderachter.be> # # 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, ...
IntersectAustralia/asvo-tao
refs/heads/master
ui/mock_image/taoui_mock_image/__init__.py
1
""" ======================== taoui_mock_image UI module ======================== .. toctree:: :maxdepth: 2 forms models """
diorcety/translate
refs/heads/master
translate/convert/symb2po.py
4
# -*- coding: utf-8 -*- # # Copyright 2008-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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 2 of the...
Bitergia/allura
refs/heads/master
ForgeDiscussion/forgediscussion/tests/test_forum_roles.py
3
from pylons import c from alluratest.controller import setup_basic_test, setup_global_objects from allura import model as M from allura.lib import security from allura.tests import decorators as td def setUp(): setup_basic_test() setup_global_objects() @td.with_discussion def test_role_assignments(): adm...
dataplumber/edge
refs/heads/master
src/main/python/libraries/edge/opensearch/atomresponse.py
1
import logging from xml.dom.minidom import Document import xml.sax.saxutils from edge.opensearch.response import Response class AtomResponse(Response): def __init__(self): super(AtomResponse, self).__init__() self.namespaces = { '': 'http://www.w3.org/2005/Atom', 'opensear...
scenarios/tensorflow
refs/heads/master
tensorflow/python/ops/concat_benchmark.py
177
# 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...
kaushik94/boto
refs/heads/develop
boto/emr/emrobject.py
12
# Copyright (c) 2010 Spotify AB # Copyright (c) 2010 Jeremy Thurgood <firxen+boto@gmail.com> # Copyright (c) 2010-2011 Yelp # # 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 restricti...
sonya/eea
refs/heads/master
py/wiod/plotutils.py
1
# # Copyright 2012 Sonya Huang # # 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 law or agreed to in writing...
Ravenm/2143-OOP-NASH
refs/heads/master
python3env/Lib/site-packages/PIL/PdfImagePlugin.py
46
# # The Python Imaging Library. # $Id$ # # PDF (Acrobat) file handling # # History: # 1996-07-16 fl Created # 1997-01-18 fl Fixed header # 2004-02-21 fl Fixes for 1/L/CMYK images, etc. # 2004-02-24 fl Fixes for 1 and P images. # # Copyright (c) 1997-2004 by Secret Labs AB. All rights reserved. # Copyright (c) ...
trujunzhang/djzhang-targets
refs/heads/master
cwemail/cwemail/items.py
1
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class Email(scrapy.Item): url = scrapy.Field() guid = scrapy.Field() created_at = scrapy.Field() updated_at = scrapy.Field() clust...
andreif/django
refs/heads/master
tests/model_inheritance_regress/models.py
243
from __future__ import unicode_literals import datetime from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Place(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=80) class Meta: ...
veronicagg/autorest
refs/heads/master
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/AzureReport/fixtures/acceptancetestsazurereport/version.py
1003
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
wkschwartz/django
refs/heads/stable/3.2.x
tests/forms_tests/field_tests/test_uuidfield.py
19
import uuid from django.core.exceptions import ValidationError from django.forms import UUIDField from django.test import SimpleTestCase class UUIDFieldTest(SimpleTestCase): def test_uuidfield_1(self): field = UUIDField() value = field.clean('550e8400e29b41d4a716446655440000') self.asser...
anastue/netforce
refs/heads/stable-3.1
netforce/netforce/database.py
2
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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 without limitation the rights # to use, copy, modify, merge, publ...
heymark/calculator
refs/heads/master
node_modules/node-gyp/gyp/PRESUBMIT.py
1369
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Top-level presubmit script for GYP. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
ansible/ansible
refs/heads/devel
lib/ansible/parsing/splitter.py
15
# (c) 2014 James Cammarata, <jcammarata@ansible.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) any late...
gildo/guessit
refs/heads/master
guessit/transfo/guess_video_rexps.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
rspavel/spack
refs/heads/develop
var/spack/repos/builtin/packages/libdrm/package.py
3
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import sys class Libdrm(Package): """A userspace library for accessing the DRM, direct rendering...
unaizalakain/django
refs/heads/master
docs/conf.py
45
# -*- coding: utf-8 -*- # # Django documentation build configuration file, created by # sphinx-quickstart on Thu Mar 27 09:06:53 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleab...
RudyReeves/ud858-master
refs/heads/master
Lesson_4/Additions/TODO_1_models.py
12
class Conference(ndb.Model): """Conference -- Conference object""" name = ndb.StringProperty(required=True) description = ndb.StringProperty() organizerUserId = ndb.StringProperty() topics = ndb.StringProperty(repeated=True) city = ndb.StringProperty() star...
mzizzi/ansible
refs/heads/devel
lib/ansible/plugins/lookup/nested.py
46
# (c) 2012, 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) any lat...
pawelld/webias
refs/heads/master
webias/gnosis/xml/pickle/test/test_init.py
3
"demo of instance_noinit" import pickle, sys, string import gnosis.xml.pickle as xml_pickle from gnosis.xml.pickle.util import setParanoia from UserList import UserList import funcs import gnosis.pyconfig as pyconfig funcs.set_parser() # *** test_getinitargs() does all of this, and is better commented. # *** just ke...
pantsbuild/pants
refs/heads/2.6.x
src/python/pants/engine/internals/engine_test.py
3
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import itertools import time import unittest from dataclasses import dataclass, field from textwrap import dedent from typing import List, Optional, Tuple import pytest from pants.backen...
totolef/Sick-beard
refs/heads/master
lib/requests/packages/chardet/latin1prober.py
191
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
rgayon/plaso
refs/heads/master
setup.py
2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Installation and deployment script.""" from __future__ import print_function import glob import os import sys try: from setuptools import find_packages, setup except ImportError: from distutils.core import find_packages, setup try: from distutils.command.bdist...
nju520/django
refs/heads/master
django/template/loaders/eggs.py
302
# Wrapper for loading templates from eggs via pkg_resources.resource_string. from __future__ import unicode_literals import warnings from django.apps import apps from django.template import Origin, TemplateDoesNotExist from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from .b...
nghiattran/self-steering
refs/heads/master
models/evaluator.py
1
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorkit.base import EvaluatorBase import os import random import time import pandas as pd import scipy as scp import numpy as np import matplotlib.pyplot as plt BINS = np.linspace(-2, 2, 100) def mak...
truki/logopedasur
refs/heads/develop
logopedasur/urls.py
1
"""logopedasur URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Clas...
ardneh/mdb-conduit
refs/heads/master
third_party/gyp/pylib/gyp/generator/xcode_test.py
2479
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Unit tests for the xcode.py file. """ import gyp.generator.xcode as xcode import unittest import sys class TestEscapeXcodeDefine(unit...
davidzchen/tensorflow
refs/heads/master
tensorflow/python/distribute/multi_process_runner.py
1
# Lint as: python3 # Copyright 2019 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 ...
codeforamerica/pittsburgh-purchasing-suite
refs/heads/master
purchasing_test/integration/import/test_nigp_import.py
3
# -*- coding: utf-8 -*- from flask import current_app from purchasing_test.test_base import BaseTestCase from purchasing.data.importer.nigp import main from purchasing.opportunities import models from purchasing.users.models import User from purchasing.opportunities.models import Category class TestNigpImport(BaseTe...
hfp/libxsmm
refs/heads/master
samples/deeplearning/sparse_training/fairseq/scripts/compare_namespaces.py
1
#!/usr/bin/env python3 """Helper script to compare two argparse.Namespace objects.""" from argparse import Namespace # noqa def main(): ns1 = eval(input('Namespace 1: ')) ns2 = eval(input('Namespace 2: ')) def keys(ns): ks = set() for k in dir(ns): if not k.startswith('_'):...
weiting-chen/manila
refs/heads/master
manila/scheduler/filter_scheduler.py
2
# Copyright (c) 2011 Intel Corporation # Copyright (c) 2011 OpenStack, LLC. # 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/l...
ahb0327/intellij-community
refs/heads/master
python/testData/refactoring/changeSignature/chooseSuperMethod.after.py
83
class B(): def baz(self): print(2) class A(object): def m(self): print(1) class C(B, A): def baz(self): super(C, self).baz() print(3)
jasonabele/gnuradio
refs/heads/rfx2200
usrp2/host/apps/gen_2tone.py
8
#!/usr/bin/env python # # Copyright 2007 Free Software Foundation, Inc. # # 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 your option) any later version...
deepesch/scikit-learn
refs/heads/master
examples/bicluster/plot_spectral_coclustering.py
276
""" ============================================== A demo of the Spectral Co-Clustering algorithm ============================================== This example demonstrates how to generate a dataset and bicluster it using the the Spectral Co-Clustering algorithm. The dataset is generated using the ``make_biclusters`` f...
BSI-CERT-Bund/cortex-analyzers
refs/heads/master
analyzers/VMRay/vmray.py
1
#!/usr/bin/env python3 from cortexutils.analyzer import Analyzer from vmrayclient import VMRayClient class VMRayAnalyzer(Analyzer): """ VMRay analyzer that uses VMRayClient to connect to an VMRay instance. Allows uploading a sample and getting information via hash. More info regarding configuration in the...
UOMx/edx-platform
refs/heads/master
openedx/core/djangoapps/credit/views.py
51
""" Views for the credit Django app. """ from __future__ import unicode_literals import logging import datetime from django.conf import settings from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from opaque_keys import InvalidKeyError from opaque_keys.edx.keys im...
wangjun/odoo
refs/heads/8.0
openerp/addons/test_new_api/models.py
79
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-2014 OpenERP (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
ambitioninc/django-data-schema
refs/heads/develop
data_schema/tests/tests.py
1
from copy import copy from datetime import datetime from functools import partial from django.contrib.contenttypes.models import ContentType from django.test import TestCase from django_dynamic_fixture import G from mock import patch import pytz from data_schema.models import DataSchema, FieldSchema, FieldOption from...
jhajek/euca2ools
refs/heads/master
euca2ools/commands/ec2/describenetworkinterfaceattribute.py
3
# Copyright 2014 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
serge-gaia/biosys
refs/heads/master
biosys/apps/main/tests/api/test_filtering_and_ordering.py
2
import json from django.urls import reverse from django.contrib.gis.geos import Polygon, Point, MultiPolygon from rest_framework import status from main.models import Record, Dataset from main.tests.api import helpers class TestJsonSearchAndOrdering(helpers.BaseUserTestCase): def test_filter_dataset(self): ...
kevclarx/ansible
refs/heads/devel
lib/ansible/modules/cloud/rackspace/rax_queue.py
70
#!/usr/bin/python # 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) any later version. # # Ansible is distributed...
mikebrevard/UnixAdministration
refs/heads/master
vagrant/etc/data/genData/venv/lib/python3.4/site-packages/setuptools/tests/test_sdist.py
132
# -*- coding: utf-8 -*- """sdist tests""" import locale import os import shutil import sys import tempfile import unicodedata import contextlib import pytest import pkg_resources from setuptools.compat import StringIO, unicode, PY3, PY2 from setuptools.command.sdist import sdist from setuptools.command.egg_info impo...
navodissa/python-flask
refs/heads/master
flask/lib/python2.7/site-packages/jinja2/testsuite/regression.py
414
# -*- coding: utf-8 -*- """ jinja2.testsuite.regression ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests corner cases and bugs. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Template, Enviro...
bikash/h2o-dev
refs/heads/master
h2o-py/tests/testdir_algos/glm/pyunit_NOPASS_shuffling_largeGLM.py
1
import sys sys.path.insert(1, "../../../") import h2o def shuffling_large(ip,port): # Connect to h2o h2o.init(ip,port) print("Reading in Arcene training data for binomial modeling.") train_data = h2o.upload_file(path=h2o.locate("smalldata/arcene/shuffle_test_version/arcene.csv")) train_data_shuffl...
IKholopov/HackUPC2017
refs/heads/master
hackupc/env/lib/python3.5/site-packages/social/backends/ubuntu.py
4
from social_core.backends.ubuntu import UbuntuOpenId
acsone/server-tools
refs/heads/8.0
setup/fetchmail_notify_error_to_sender/odoo_addons/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
Shawn-WangDapeng/dyci-main
refs/heads/master
Scripts/dyci-recompile.py
4
#!/usr/bin/env python import hashlib import os import time import shutil import random from subprocess import Popen import subprocess from sys import stderr, stdout from clangParams import parseClangCompileParams from os.path import normpath, basename, dirname import sys # Running process def runAndFailOnError(string...
Tao-Ma/incubator-hawq
refs/heads/master
tools/bin/gppylib/testold/programs/test_clsAddMirrors.py
44
#!/usr/bin/env python # # from gppylib.testold.testDriver import TestDriver from gppylib.programs.clsAddMirrors import * from gppylib.operations.buildMirrorSegments import * from gppylib.mainUtils import * from gppylib.testold.testUtils import * from gppylib.system import fileSystemImplTest, fileSystemInterface from gp...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/mobile/shared_dressed_marooned_pirate_hum_f.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_marooned_pirate_hum_f.iff" result.attribute_template_i...
qrkourier/ansible
refs/heads/devel
lib/ansible/modules/cloud/vmware/vmware_guest.py
9
#!/usr/bin/python # -*- coding: utf-8 -*- # # This module is also sponsored by E.T.A.I. (www.etai.fr) # 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_versio...
danilito19/django
refs/heads/master
django/db/migrations/operations/models.py
290
from __future__ import unicode_literals from django.db import models from django.db.migrations.operations.base import Operation from django.db.migrations.state import ModelState from django.db.models.options import normalize_together from django.utils import six from django.utils.functional import cached_property cl...
TNT-Samuel/Coding-Projects
refs/heads/master
DNS Server/Source - Copy/Lib/encodings/cp437.py
272
""" Python Character Mapping Codec cp437 generated from 'VENDORS/MICSFT/PC/CP437.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_map) def decode(self,input,errors='strict...
andy928/xpenology
refs/heads/master
tools/perf/scripts/python/futex-contention.py
11261
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
daoluan/decode-Django
refs/heads/master
Django-1.5.1/django/core/xheaders.py
518
""" Pages in Django can are served up with custom HTTP headers containing useful information about those pages -- namely, the content type and object ID. This module contains utility functions for retrieving and doing interesting things with these special "X-Headers" (so called because the HTTP spec demands that custo...
da1z/intellij-community
refs/heads/master
python/testData/inspections/PyTupleAssignmentBalanceInspection/unpackNonePy2.py
60
a, b = <warning descr="Need more values to unpack">None</warning>
pmorie/origin
refs/heads/master
cmd/cluster-capacity/go/src/github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/kubernetes/cluster/juju/return-node-ips.py
583
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # 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 appli...
tomturner/django-tenants
refs/heads/master
django_tenants/management/commands/migrate.py
2
from django_tenants.management.commands.migrate_schemas import MigrateSchemasCommand Command = MigrateSchemasCommand
afolson/sloth-draw
refs/heads/master
slothdraw.py
2
import webapp2 import jinja2 import os, urllib2, re, base64, urllib, datetime from time import gmtime, strftime from google.appengine.ext import db from google.appengine.api import images, files, memcache, users # cache bustin # # feel free to clear memcached from the appengine dashboard if you forget to # bump this ...
kit-cel/gr-specest
refs/heads/master
docs/doxygen/doxyxml/generated/compound.py
23
#!/usr/bin/env python """ Generated Mon Feb 9 19:08:05 2009 by generateDS.py. """ from __future__ import absolute_import from __future__ import unicode_literals from xml.dom import minidom from xml.dom import Node import sys from . import compoundsuper as supermod from .compoundsuper import MixedContainer class...
Winterflower/mdf
refs/heads/master
mdf/viewer/excel.py
3
""" Util functions for exporting data to Excel """ from decorator import decorator import numpy as np import pywintypes import re try: import win32com.client _com_available = True except ImportError: _com_available = False @decorator def needs_com(func, *args, **kwargs): if not _com_available: ...
SohKai/ChronoLogger
refs/heads/master
web/flask/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/base.py
17
# mysql/base.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Support for the MySQL database. Supported Versions and Features --------------------...
xkmato/youtube-dl
refs/heads/master
youtube_dl/extractor/dcn.py
34
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( int_or_none, parse_iso8601, ) class DCNIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?dcndigital\.ae/(?:#/)?(?...
rail-berkeley/d4rl
refs/heads/master
d4rl/infos.py
1
""" This file holds all URLs and reference scores. """ #TODO(Justin): This is duplicated. Make all __init__ file URLs and scores point to this file. DATASET_URLS = { 'maze2d-open-v0' : 'http://rail.eecs.berkeley.edu/datasets/offline_rl/maze2d/maze2d-open-sparse.hdf5', 'maze2d-umaze-v1' : 'http://rail.eecs.ber...
azverkan/scons
refs/heads/master
test/CacheDir/symlink.py
5
#!/usr/bin/env python # # __COPYRIGHT__ # # 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 # without limitation the rights to use, copy, modify, merge, publish, ...
gijs/inasafe
refs/heads/master
safe/storage/utilities_test.py
7
"""**Utilities to to support test suite** """ import types def _same_API(X, Y, exclude=None): """Check that public methods of X also exist in Y """ if exclude is None: exclude = [] for name in dir(X): # Skip internal symbols if name.startswith('_'): continue ...
csmengwan/autorest
refs/heads/master
AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Validation/autorestvalidationtest/version.py
1003
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
PaddlePaddle/Paddle
refs/heads/develop
python/paddle/utils/download.py
1
# Copyright (c) 2020 PaddlePaddle 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 app...
zootsuitbrian/zxing
refs/heads/master
cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/masm.py
34
"""SCons.Tool.masm Tool-specific initialization for the Microsoft Assembler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The S...
peterbe/bramble
refs/heads/master
vendor-local/lib/python/django_extensions/management/commands/unreferenced_files.py
25
from collections import defaultdict import os from django.conf import settings from django.core.management.base import NoArgsCommand from django.db import models from django.db.models.loading import cache class Command(NoArgsCommand): help = "Prints a list of all files in MEDIA_ROOT that are not referenced in the...
alexgorban/models
refs/heads/master
research/cognitive_planning/preprocessing/cifarnet_preprocessing.py
9
# Copyright 2016 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 applicable ...
eyohansa/django
refs/heads/master
tests/m2m_recursive/tests.py
424
from __future__ import unicode_literals from operator import attrgetter from django.test import TestCase from .models import Person class RecursiveM2MTests(TestCase): def setUp(self): self.a, self.b, self.c, self.d = [ Person.objects.create(name=name) for name in ["Anne", "Bill"...
daenamkim/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/s3_bucket.py
25
#!/usr/bin/python # # This is a 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) any later version. # # This Ansible library is distributed in the hope that i...
lgscofield/odoo
refs/heads/8.0
openerp/addons/base/tests/test_expression.py
64
import unittest2 import openerp from openerp.osv.expression import get_unaccent_wrapper from openerp.osv.orm import BaseModel import openerp.tests.common as common class test_expression(common.TransactionCase): def _reinit_mock(self): self.query_list = list() def _mock_base_model_where_calc(self, mo...
pschmitt/home-assistant
refs/heads/dev
tests/components/pushbullet/test_notify.py
7
"""The tests for the pushbullet notification platform.""" import json import unittest from pushbullet import PushBullet import requests_mock import homeassistant.components.notify as notify from homeassistant.setup import setup_component from tests.async_mock import patch from tests.common import assert_setup_compon...
proxysh/Safejumper-for-Desktop
refs/heads/master
buildmac/Resources/env/lib/python2.7/site-packages/pip/_vendor/distlib/index.py
328
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import hashlib import logging import os import shutil import subprocess import tempfile try: from threading import Thread except ImportErr...
erjohnso/libcloud
refs/heads/trunk
libcloud/compute/drivers/softlayer.py
5
# 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 ...
redixin/paramiko
refs/heads/master
paramiko/message.py
8
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
cccs-web/mezzanine
refs/heads/master
mezzanine/blog/migrations/0007_auto__add_field_blogpost_site.py
8
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_label = '%s...
cokelaer/bioconda-recipes
refs/heads/master
recipes/clipandmerge/clipandmerge.py
45
#!/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...
shunlir/ctags
refs/heads/master
Units/parser-python.r/python-anonymous-nestlevel_ctags-bug-356.d/input.py
40
class Testclass(): def main(self): variable = True if __name__ == "__main__": module_level_attribute = True
django-notifications/django-notifications
refs/heads/master
notifications/signals.py
3
''' Django notifications signal file ''' # -*- coding: utf-8 -*- from django.dispatch import Signal notify = Signal(providing_args=[ # pylint: disable=invalid-name 'recipient', 'actor', 'verb', 'action_object', 'target', 'description', 'timestamp', 'level' ])
astorije/ansible-modules-core
refs/heads/devel
cloud/openstack/os_ironic.py
3
#!/usr/bin/python # coding: utf-8 -*- # (c) 2014, Hewlett-Packard Development Company, L.P. # # This module 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 optio...