repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
glenngillen/dotfiles
refs/heads/master
.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/lib/python/jedi/file_io.py
4
import os from parso import file_io class AbstractFolderIO(object): def __init__(self, path): self.path = path def get_base_name(self): raise NotImplementedError def list(self): raise NotImplementedError def get_file_io(self, name): raise NotImplementedError de...
luser/socorro
refs/heads/master
webapp-django/crashstats/documentation/__init__.py
12133432
chares-zhang/you-get
refs/heads/develop
src/you_get/cli_wrapper/player/mplayer.py
12133432
kingvuplus/xx-n
refs/heads/master
lib/python/Plugins/SystemPlugins/OSD3DSetup/__init__.py
12133432
ibinti/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/db/backends/postgresql_psycopg2/__init__.py
12133432
epandurski/django
refs/heads/master
django/contrib/gis/management/__init__.py
12133432
tersmitten/ansible
refs/heads/devel
test/units/plugins/lookup/__init__.py
12133432
spreeker/democracygame
refs/heads/master
external_apps/oauth_provider/tests.py
2
""" ===================== Django OAuth provider ===================== The `OAuth protocol`_ enables websites or applications (Consumers) to access Protected Resources from a web service (Service Provider) via an API, without requiring Users to disclose their Service Provider credentials to the Consumers. More gener...
thaReal/scramble-solver
refs/heads/master
tools/monkeyrunner_example.py
1
import os from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice device = MonkeyRunner.waitForConnection() package = 'com.zynga.scramble' # activity = 'com.example.android.myapplication.MainActivity' # sets the name of the component to start # runComponent = package + '/' + activity # Runs the component de...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/numpy/lib/tests/test_polynomial.py
37
from __future__ import division, absolute_import, print_function ''' >>> p = np.poly1d([1.,2,3]) >>> p poly1d([ 1., 2., 3.]) >>> print(p) 2 1 x + 2 x + 3 >>> q = np.poly1d([3.,2,1]) >>> q poly1d([ 3., 2., 1.]) >>> print(q) 2 3 x + 2 x + 1 >>> print(np.poly1d([1.89999+2j, -3j, -5.12345678, 2+1j])) ...
edwardslabs/CloudBot
refs/heads/gonzobot
plugins/fact.py
7
import random from cloudbot import hook from cloudbot.util import http types = ['trivia', 'math', 'date', 'year'] @hook.command(autohelp=False) def fact(reply): """- Gets a random fact about numbers or dates.""" fact_type = random.choice(types) try: json = http.get_json('http://numbersapi.com/ra...
eckardm/archivematica
refs/heads/stable/1.5.x
src/dashboard/src/main/models.py
1
# This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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 ...
frreiss/tensorflow-fred
refs/heads/master
tensorflow/python/keras/optimizer_v2/ftrl_test.py
5
# 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...
joebowen/movement_validation_cloud
refs/heads/master
djangodev/lib/python2.7/site-packages/django/contrib/sites/management.py
62
""" Creates the default Site object. """ from django.apps import apps from django.core.management.color import no_style from django.db import DEFAULT_DB_ALIAS, connections, router from django.db.models import signals def create_default_site(app_config, verbosity=2, interactive=True, db=DEFAULT_DB_ALIAS, **kwargs): ...
ktan2020/legacy-automation
refs/heads/master
win/Lib/site-packages/robot/parsing/htmlreader.py
2
# Copyright 2008-2013 Nokia Siemens Networks Oyj # # 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...
ToonTownInfiniteRepo/ToontownInfinite
refs/heads/master
toontown/safezone/OZPlayground.py
4
from pandac.PandaModules import * from toontown.toonbase import ToontownGlobals import Playground from toontown.launcher import DownloadForceAcknowledge from toontown.building import Elevator from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer from toontown.racing import RaceGlobals from...
catapult-project/catapult-csm
refs/heads/master
devil/devil/android/constants/__init__.py
1038
# Copyright 2015 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.
stack-of-tasks/rbdlpy
refs/heads/master
tutorial/lib/python2.7/site-packages/OpenGL/raw/GLES2/AMD/compressed_ATC_texture.py
8
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLES2 import _types as _cs # End users want this... from OpenGL.raw.GLES2._types import * from OpenGL.raw.GLES2 import _errors from OpenGL.constant import Constant as _C import...
aptana/Pydev
refs/heads/development
bundles/org.python.pydev.jython/Lib/encodings/cp424.py
9
""" Python Character Mapping Codec generated from 'CP424.TXT' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,error...
loonycyborg/scons-plusplus
refs/heads/master
python_modules/Tool/PharLapCommon.py
2
"""SCons.Tool.PharLapCommon This module contains common code used by all Tools for the Phar Lap ETS tool chain. Right now, this is linkloc and 386asm. """ # # Copyright (c) 2001 - 2019 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associ...
jjmleiro/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/db/backends/postgis/adapter.py
222
""" This object provides quoting for GEOS geometries into PostgreSQL/PostGIS. """ from __future__ import unicode_literals from psycopg2 import Binary from psycopg2.extensions import ISQLQuote class PostGISAdapter(object): def __init__(self, geom): "Initializes on the geometry." # Getting the WKB ...
beck/django
refs/heads/master
tests/expressions_case/tests.py
162
from __future__ import unicode_literals import unittest from datetime import date, datetime, time, timedelta from decimal import Decimal from operator import attrgetter, itemgetter from uuid import UUID from django.core.exceptions import FieldError from django.db import connection, models from django.db.models import...
tchernomax/ansible
refs/heads/devel
lib/ansible/module_utils/facts/network/freebsd.py
232
# 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 in the hope that ...
akusok/website-ibc
refs/heads/master
wibc/mp/mp_worker.py
1
# -*- coding: utf-8 -*- """Input/Output multiprocessing module, hdf5 storage. Created on Sat Apr 6 21:01:26 2013 """ from wibc.config.wibc_config import cf from wibc.modules.add_website import add_website from wibc.modules.get_csift import csift from wibc.modules.sift_pdist import sift_pdist from wibc.modules.sift...
unseenlaser/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/crashers/borrowed_ref_2.py
63
""" _PyType_Lookup() returns a borrowed reference. This attacks PyObject_GenericSetAttr(). NB. on my machine this crashes in 2.5 debug but not release. """ class A(object): pass class B(object): def __del__(self): print("hi") del C.d class D(object): def __set__(self, obj, value): ...
getupcloud/django-example-nginx-python-2.7
refs/heads/master
app.py
3
#!/usr/bin/env python import imp import os import sys PYCART_DIR = ''.join(['python-', '.'.join(map(str, sys.version_info[:2]))]) try: zvirtenv = os.path.join(os.environ['OPENSHIFT_HOMEDIR'], PYCART_DIR, 'virtenv', 'bin', 'activate_this.py') execfile(zvirtenv, dict(__file__ = zvirtenv...
nafergo/axsz_toolz
refs/heads/master
storyboardz/uploads/utils/minify.py
76
#!/usr/bin/python2.6 # Minify Filemanager javascript files # Usage : $ python ./utils/minify.py class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' def disable(self): self.HEADER = '' self.OKB...
jmesteve/openerp
refs/heads/master
openerp/report/render/html2html/__init__.py
77
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
shiquanwang/numba
refs/heads/master
numba/tests/test_unbound_variables.py
1
from numba import * a = 10 b = 11 c = 12 def jitter(): a = 20 b = 21 c = 22 @jit(object_()) def func(): return a, c return func func = jitter() assert func() == (20, 22)
josephnoir/RIOT
refs/heads/master
tests/pkg_micro-ecc-with-hwrng/tests/01-run.py
28
#!/usr/bin/env python3 import sys from testrunner import run # Use a custom global timeout for slow hardware. On microbit (nrf51), the # test completes in 120s. TIMEOUT = 200 def testfunc(child): child.expect_exact('micro-ecc compiled!') child.expect_exact('Testing 16 random private key pairs and signature...
mavenlin/tensorflow
refs/heads/master
tensorflow/python/ops/image_ops.py
13
# 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...
envoyproxy/envoy-wasm
refs/heads/master
tools/protoxform/migrate.py
2
# API upgrade business logic. import copy import re from tools.api_proto_plugin import traverse from tools.api_proto_plugin import visitor from tools.protoxform import options from tools.protoxform import utils from envoy_api_canonical.envoy.annotations import resource_pb2 from udpa.annotations import migrate_pb2 fr...
Kitware/arctic-viewer
refs/heads/master
scripts/examples/vtk/samples/syntax-evolution-volume_v2.py
2
# ----------------------------------------------------------------------------- # User configuration # ----------------------------------------------------------------------------- dataset_destination_path = '/Users/seb/Desktop/vtk_volume_v2' # -------------------------------------------------------------------------...
amremam2004/pygtk
refs/heads/master
tests/test_api.py
6
import os import sys import unittest from common import gobject, gtk class APITest(unittest.TestCase): def testKeysyms(self): self.failUnless('Escape' in dir(gtk.keysyms)) self.failUnless(hasattr(gtk.keysyms, 'Escape')) self.assertEqual(gtk.keysyms.Escape, 0xFF1B) def testWindow(self)...
WarmMe/alpha1
refs/heads/master
WarmMe/thermostat/thirdPartyTools/Adafruit_Python_DHT/build/lib.linux-armv6l-2.7/Adafruit_DHT/__init__.py
17
# Copyright (c) 2014 Adafruit Industries # Author: Tony DiCola # 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, mo...
erickt/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/defer/models.py
94
""" Tests for defer() and only(). """ from django.db import models from django.utils.encoding import python_2_unicode_compatible class Secondary(models.Model): first = models.CharField(max_length=50) second = models.CharField(max_length=50) @python_2_unicode_compatible class Primary(models.Model): name ...
patricklaw/pip
refs/heads/develop
tests/data/packages/FSPkg/fspkg/__init__.py
9480
#
eatbyte/Swift
refs/heads/master
swift/common/middleware/x_profile/profile_model.py
52
# Copyright (c) 2010-2012 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
sjsucohort6/openstack
refs/heads/master
python/venv/lib/python2.7/site-packages/cinderclient/tests/unit/v1/contrib/test_list_extensions.py
3
# 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, software # distributed under the...
mattharley/pdpdmeetup
refs/heads/master
spa/apps.py
1
from django.apps import AppConfig class SpaConfig(AppConfig): name = "spa"
yongshengwang/builthue
refs/heads/master
desktop/core/ext-py/thrift-0.9.1/src/protocol/TMultiplexedProtocol.py
146
# # 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 u...
Balachan27/django
refs/heads/master
tests/utils_tests/test_autoreload.py
191
import os import shutil import tempfile from importlib import import_module from django import conf from django.contrib import admin from django.test import SimpleTestCase, override_settings from django.test.utils import extend_sys_path from django.utils import autoreload from django.utils._os import npath LOCALE_PAT...
shawnsilva/ansible-modules-core
refs/heads/devel
cloud/openstack/quantum_router_gateway.py
99
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # 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 option) any later ...
Vaidyanath/tempest
refs/heads/master
tempest/api/compute/admin/test_instance_usage_audit_log_negative.py
1
# Copyright 2013 IBM Corporation # 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 ...
mittya/duoclub
refs/heads/master
duoclub/accounts/oauthsdk/__init__.py
12133432
2ndQuadrant/ansible
refs/heads/master
test/integration/targets/module_utils/module_utils/spam2/ham/__init__.py
12133432
maxsocl/django
refs/heads/master
tests/migrations/related_models_app/__init__.py
12133432
cericoda/rua
refs/heads/master
rua/apps/agencies/admin.py
2
from __future__ import absolute_import from django.contrib import admin from django.contrib.admin import SimpleListFilter from django.utils.translation import ugettext_lazy as _ from .models import (Agency, AgencyPosition, AgencyDepartment, DepartmentEmployee, DepartmentLocation) class InitialListFilter(SimpleL...
miiicmueller/TerraZoo
refs/heads/master
contiki-2.7/cpu/cc253x/bank-alloc.py
16
#!/usr/bin/env python # Copyright (c) 2010, Loughborough University - Computer Science # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above ...
harisbal/pandas
refs/heads/master
pandas/io/common.py
1
"""Common IO api utilities""" import codecs from contextlib import closing, contextmanager import csv import mmap import os import zipfile import pandas.compat as compat from pandas.compat import BytesIO, StringIO, string_types, text_type from pandas.errors import ( # noqa DtypeWarning, EmptyDataError, ParserErr...
darren-wang/ks3
refs/heads/master
keystone/identity/routers.py
1
# Copyright 2012 OpenStack Foundation # # 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...
TheJJ/x-tier
refs/heads/master
time_measure.py
1
#!/usr/bin/python3 import argparse import subprocess import sys import time if __name__ == "__main__": p = argparse.ArgumentParser(description='x-tier time measurement utility') p.add_argument("-c", "--count", type=int, default=1, help="repeat the measurement by a given count") p.add_argument("-o", "--ou...
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/paver/misctasks.py
4
"""Miscellaneous tasks that don't fit into one of the other groupings.""" import pkgutil import zipfile import paver.deps.six as six from os.path import join, dirname, exists, abspath from paver.easy import dry, task from paver.tasks import VERSION, cmdopts _docsdir = join(dirname(__file__), "docs") if exists(_docsdir...
1st/django
refs/heads/master
django/contrib/gis/gdal/feature.py
439
from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import GDALException, OGRIndexError from django.contrib.gis.gdal.field import Field from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType from django.contrib.gis.gdal.prototypes import ds as capi, geom as geom_api fro...
fnouama/intellij-community
refs/heads/master
python/testData/resolve/multiFile/fromPackageModuleImportStarElementNamedAsModule/p1/__init__.py
83
from p1.foo import *
ns950/calibre
refs/heads/master
src/calibre/srv/users.py
3
#!/usr/bin/env python2 # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2015, Kovid Goyal <kovid at kovidgoyal.net> from __future__ import (unicode_literals, division, absolute_import, print_function) import os, json, re from threading import RLock import apsw from calibre.constants impor...
drunknbass/plexpy
refs/heads/master
plexpy/webserve.py
1
# This file is part of PlexPy. # # PlexPy 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. # # PlexPy is distributed in the hope t...
alu042/edx-platform
refs/heads/master
lms/djangoapps/commerce/api/v0/views.py
27
""" API v0 views. """ import logging from edx_rest_api_client import exceptions from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from rest_framework.authentication import SessionAuthentication from rest_framework.permissions import IsAuthenticated from rest_framework.status import HTT...
Yuudachimoe/HikariChun-RedBot
refs/heads/master
lib/pip/_vendor/distlib/__init__.py
335
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2016 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import logging __version__ = '0.2.4' class DistlibException(Exception): pass try: from logging import NullHandler except Impor...
Windy-Ground/scikit-learn
refs/heads/master
sklearn/tree/tree.py
12
""" This module gathers tree-based methods, including decision, regression and randomized trees. Single and multi-output problems are both handled. """ # Authors: Gilles Louppe <g.louppe@gmail.com> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # Brian Holt <bdholt1@gmail.com> # Noel Da...
qwertyTom/android_kernel_cyanogen_msm8916
refs/heads/cm-13.0
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
Jens-G/thrift
refs/heads/master
test/features/string_limit.py
21
#!/usr/bin/env python import argparse import sys from util import add_common_args, init_protocol from local_thrift import thrift # noqa from thrift.Thrift import TMessageType, TType # TODO: generate from ThriftTest.thrift def test_string(proto, value): method_name = 'testString' ttype = TType.STRING pr...
westinedu/newertrends
refs/heads/master
django/contrib/gis/geometry/__init__.py
12133432
zeroc0d3/docker-lab
refs/heads/master
nodejs/rootfs/usr/lib/python2.7/dist-packages/powerline/bindings/ipython/__init__.py
12133432
kubeflow/pipelines
refs/heads/master
components/aws/sagemaker/tests/integration_tests/utils/kfp_client_utils.py
2
import os import utils import pytest from utils import argo_utils def compile_and_run_pipeline( client, experiment_id, pipeline_definition, input_params, output_file_dir, pipeline_name, ): pipeline_path = os.path.join(output_file_dir, pipeline_name) utils.run_command( f"dsl-co...
jiadaizhao/LeetCode
refs/heads/master
0901-1000/0908-Smallest Range I/0908-Smallest Range I.py
1
class Solution: def smallestRangeI(self, A: List[int], K: int) -> int: return max(0, max(A) - min(A) - K * 2)
nachandr/cfme_tests
refs/heads/master
cfme/fixtures/depot.py
2
"""Global fixtures for depot tests""" import fauxfactory import pytest from wrapanapi import VmState from cfme.utils.conf import cfme_data from cfme.utils.log import logger from cfme.utils.net import find_pingable from cfme.utils.net import find_pingable_ipv6 from cfme.utils.net import pick_responding_ip from cfme.uti...
zhanghenry/stocks
refs/heads/master
tests/auth_tests/urls.py
37
from django.conf.urls import include, url from django.contrib import admin from django.contrib.auth import views from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.urls import urlpatterns from django.contrib.messages.api import inf...
csdev/ns3-ftca
refs/heads/master
examples/tutorial/examples-to-run.py
56
#! /usr/bin/env python ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # A list of C++ examples to run in order to ensure that they remain # buildable and runnable over time. Each tuple in the list contains # # (example_name, do_run, do_valgrind_run). # # See test.py for more i...
erjohnso/libcloud
refs/heads/trunk
docs/examples/compute/cloudstack/instantiate_driver_insecure_port.py
63
from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver apikey = 'your api key' secretkey = 'your secret key' host = 'localhost' path = '/path/to/api' port = 8080 Driver = get_driver(Provider.CLOUDSTACK) conn = Driver(key=apikey, secret=secretkey, host=host, path=pa...
zrhans/pythonanywhere
refs/heads/master
.virtualenvs/django19/lib/python3.4/site-packages/pandas/stats/tests/__init__.py
12133432
aditiiyer/CERR
refs/heads/master
CERR_core/ModelImplementationLibrary/SegmentationModels/ModelDependencies/CT_PharyngealConstrictor_DeepLabV3/model_wrapper/structures/__init__.py
12133432
Achuth17/scikit-learn
refs/heads/master
sklearn/cluster/tests/test_hierarchical.py
230
""" Several basic tests for hierarchical clustering procedures """ # Authors: Vincent Michel, 2010, Gael Varoquaux 2012, # Matteo Visconti di Oleggio Castello 2014 # License: BSD 3 clause from tempfile import mkdtemp import shutil from functools import partial import numpy as np from scipy import sparse from...
fangxingli/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/conf/locale/it/__init__.py
12133432
CVL-GitHub/karaage
refs/heads/master
karaage/plugins/kgapplications/views/states.py
2
# Copyright 2015 VPAC # # This file is part of Karaage. # # Karaage 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. # # Karaage is dist...
nirmeshk/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/test/test_randbytes.py
18
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for L{twisted.python.randbytes}. """ import os from twisted.trial import unittest from twisted.python import randbytes class SecureRandomTestCaseBase(object): """ Base class for secureRandom test cases. """ def...
JetBrains/intellij-community
refs/heads/master
python/testData/refactoring/pullup/instanceNotDeclaredInInit.py
80
class Parent(object): pass class Child(Parent): def foo(self): self.foo = 12
aristanetworks/arista-ovs-quantum
refs/heads/master
quantum/plugins/cisco/db/l2network_db.py
7
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011, Cisco Systems, Inc. # # 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-...
htwenhe/DJOA
refs/heads/master
env/Lib/site-packages/odf/namespaces.py
2
# -*- coding: utf-8 -*- # Copyright (C) 2006-2013 Søren Roug, European Environment Agency # # This library 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 (at you...
SylvainGuieu/smartplotlib
refs/heads/master
axis.py
1
from . import plotfuncs as pfs from .base import PlotFactory, CatRecObject, KWS, PlotFunc, rproperty pltAxis = pfs.pltAxis class SetFactory(PlotFactory): @staticmethod def finit(p, **kwargs): p.set(**kwargs) def _axis_args(self, *lst): axis = self.get("axis",None) if axis is None...
fdupoux/ansible-modules-extras
refs/heads/fdevel
cloud/amazon/sts_assume_role.py
8
#!/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...
valfirst/selenium
refs/heads/master
py/test/unit/selenium/webdriver/webkitgtk/webkitgtk_options_tests.py
7
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
AkademieOlympia/sympy
refs/heads/master
sympy/physics/mechanics/linearize.py
62
from __future__ import print_function, division __all__ = ['Linearizer'] from sympy import Matrix, eye, zeros, Dummy from sympy.utilities.iterables import flatten from sympy.physics.vector import dynamicsymbols from sympy.physics.mechanics.functions import msubs import collections class Linearizer(object): """T...
catchmrbharath/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/html5lib/html5lib/filters/whitespace.py
1730
from __future__ import absolute_import, division, unicode_literals import re from . import _base from ..constants import rcdataElements, spaceCharacters spaceCharacters = "".join(spaceCharacters) SPACES_REGEX = re.compile("[%s]+" % spaceCharacters) class Filter(_base.Filter): spacePreserveElements = frozenset...
jwyang/JULE-Caffe
refs/heads/master
tools/extra/extract_seconds.py
45
#!/usr/bin/env python import datetime import os import sys def extract_datetime_from_line(line, year): # Expected format: I0210 13:39:22.381027 25210 solver.cpp:204] Iteration 100, lr = 0.00992565 line = line.strip().split() month = int(line[0][1:3]) day = int(line[0][3:]) timestamp = line[1] p...
ZazieTheBeast/oscar
refs/heads/master
oscar/lib/python2.7/site-packages/pip/_vendor/requests/utils.py
148
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import io import os import re import socket import struct import warnings from . import __ver...
timoMa/vigra
refs/heads/master
vigranumpy/test/test3.py
13
####################################################################### # # Copyright 2009-2010 by Ullrich Koethe # # This file is part of the VI...
LiquidSmooth-Devices/android_kernel_samsung_smdk4412
refs/heads/lollipop
tools/perf/util/setup.py
2554
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv cflags = ['-fno-strict-aliasing', '-Wno-write-strings'] cflags += getenv('CFLAGS', '').split() perf = Extension('perf', sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c', 'util/evsel.c', 'util/cpumap.c', 'util/...
kawamon/hue
refs/heads/master
desktop/core/ext-py/celery-4.2.1/celery/utils/objects.py
2
# -*- coding: utf-8 -*- """Object related utilities, including introspection, etc.""" from __future__ import absolute_import, unicode_literals from functools import reduce __all__ = ('Bunch', 'FallbackContext', 'getitem_property', 'mro_lookup') class Bunch(object): """Object that enables you to modify attribute...
TuoDrable/homeautomation-expert
refs/heads/master
wsgi/openshift/manage.py
790
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
migonzalvar/rs232-obd-sim
refs/heads/master
lib/utils.py
6
import random import string def debug(msg): pass #print('-- ' + msg) def sample(var): if var == 'VSS': self = hex (int(random.randrange(40,90)))[2:].upper() elif var == 'RPM': self = hex (int(random.randrange(750,4500)))[2:].upper() else: self = hex (int(random.ran...
mcking49/apache-flask
refs/heads/master
Python/Lib/site-packages/astroid/tests/testdata/python3/data/absimp/string.py
34
from __future__ import absolute_import, print_function import string print(string)
lehinevych/smrs
refs/heads/master
project/lib/_abstract_manager.py
1
import json import os import sys import logging import string import time from _logging import setup_logging try: import psycopg2 except ImportError, e: print "Error loading psycopg2 module: %s" % e sys.exit(5) from psycopg2.extras import DictCursor from psycopg2.pool import ThreadedConnectionPool #DEBUG import ...
pshevade/Conference-Central-App
refs/heads/master
main.py
1
#!/usr/bin/env python """ main.py -- Udacity conference server-side Python App Engine HTTP controller handlers for memcache & task queue access $Id$ created by wesc on 2014 may 24 UPDATED to include the SetFeaturedSpeaker class and the _cacheFeaturedSpeaker function to enable storing a featured speaker in memc...
caesar2164/edx-platform
refs/heads/master
cms/djangoapps/contentstore/views/import_export.py
26
""" These views handle all actions in Studio related to import and exporting of courses """ import base64 import logging import os import re import shutil import tarfile from path import Path as path from tempfile import mkdtemp from django.conf import settings from django.contrib.auth.decorators import login_required...
multidadosti-erp/multidadosti-addons
refs/heads/develop
hr_timesheet_to_invoice/__manifest__.py
1
{ 'name': 'HR Timesheet to Invoice', 'version': '11.0.1.0.0', 'author': 'MultidadosTI', 'maintainer': 'MultidadosTI', 'website': 'www.multidadosti.com.br', 'license': 'LGPL-3', 'category': 'Timesheets', 'summary': 'Allow check a timesheet record will be invoiced or not', 'contributor...
kumarshivam675/Mobile10X-Hack
refs/heads/master
yowsup/demos/contacts/stack.py
14
from yowsup.stacks import YowStack from .layer import SyncLayer from yowsup.layers import YowLayerEvent from yowsup.layers.auth import YowCryptLayer, YowAuthenticationProtocolLayer, AuthError from yowsup.layers.coder import YowCoderLayer from yowsup.layers.network ...
jiriprochazka/lnst
refs/heads/master
recipes/switchdev/mr-008-lone-pimreg.py
1
""" Copyright 2017 Mellanox Technologies. All rights reserved. Licensed under the GNU General Public License, version 2 as published by the Free Software Foundation; see COPYING for details. """ __author__ = """ yotamg@mellanox.com (Yotam Gigi) """ from lnst.Controller.Task import ctl from lnst.Common.Consts import M...
zhangbright1986/cvgtracker
refs/heads/master
setup.py
1
#!/usr/bin/env python from distutils.core import setup import os def readme(): with open('README.rst') as f: return f.read() packages = [] for dirname, dirnames, filenames in os.walk('cvgtracker'): if '__init__.py' in filenames: packages.append(dirname.replace('/', '.')) setup(name='cvgtracke...
sam-tsai/django
refs/heads/master
django/conf/locale/eu/formats.py
611
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'Yeko M\re\n d\a' TIME_FORMAT = '...