repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
RoboPi-CSEDU/rupai
refs/heads/master
Adafruit_Python_SSD1306/emotion/emotion.py
1
import math import time import os import Adafruit_GPIO.SPI as SPI import Adafruit_SSD1306 from PIL import Image from PIL import ImageFont from PIL import ImageDraw # Raspberry Pi pin configuration: RST = 24 # Note the following are only used with SPI: DC = 23 SPI_PORT = 0 SPI_DEVICE = 0 # 128x64 display with hardw...
yfried/ansible
refs/heads/devel
lib/ansible/modules/system/pamd.py
11
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Kenneth D. Evensen <kdevensen@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': ...
andykimpe/chromium-test-npapi
refs/heads/master
third_party/bintrees/bintrees/treemixin.py
156
#!/usr/bin/env python #coding:utf-8 # Author: Mozman # Purpose: treemixin provides top level functions for binary trees # Created: 03.05.2010 # Copyright (c) 2010-2013 by Manfred Moitzi # License: MIT License from __future__ import absolute_import from .walker import Walker from .treeslice import TreeSlice class Tr...
poojavade/Genomics_Docker
refs/heads/master
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/boto-2.19.0-py2.7.egg/boto/beanstalk/layer1.py
1
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
PaulKinlan/physical-web-1
refs/heads/master
metadata-server/main.py
1
#!/usr/bin/env python # # Copyright 2014 Google 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-2.0 # # Unless required by applicable law o...
martynovp/edx-platform
refs/heads/master
cms/wsgi.py
167
# Patch the xml libs before anything else. from safe_lxml import defuse_xml_libs defuse_xml_libs() # Disable PyContract contract checking when running as a webserver import contracts contracts.disable_all() import openedx.core.operations openedx.core.operations.install_memory_dumper() import os os.environ.setdefault...
powerlim2/project_free_insight
refs/heads/master
data_api/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py
499
"""A collection of modules for iterating through different kinds of tree, generating tokens identical to those produced by the tokenizer module. To create a tree walker for a new type of tree, you need to do implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method taking a ...
Applied-GeoSolutions/geokit
refs/heads/master
layers/utils.py
1
import os from django.conf import settings from django.http import HttpResponse from django.middleware.gzip import GZipMiddleware from django.template.loader import render_to_string from layers.models import Layer def mapnik_xml(func): def wrapped_function(request, layer_name, *args, **kwargs): layer_ca...
valtech-mooc/edx-platform
refs/heads/master
lms/djangoapps/mobile_api/users/tests.py
8
""" Tests for users API """ import datetime from django.utils import timezone from xmodule.modulestore.tests.factories import ItemFactory, CourseFactory from student.models import CourseEnrollment from certificates.models import CertificateStatuses from certificates.tests.factories import GeneratedCertificateFactory ...
sgraham/nope
refs/heads/master
chrome/test/data/safe_browsing/two_phase_testserver.py
60
#!/usr/bin/env python # Copyright 2013 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. """Testserver for the two phase upload protocol.""" import base64 import BaseHTTPServer import hashlib import os import sys import url...
hainm/elyxer
refs/heads/master
src/elyxer/maths/misc.py
2
#! /usr/bin/env python # -*- coding: utf-8 -*- # eLyXer -- convert LyX source files to HTML output. # # Copyright (C) 2009 Alex Fernández # # 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 Foundat...
louisLouL/pair_trading
refs/heads/master
capstone_env/lib/python3.6/site-packages/setuptools/depends.py
336
import sys import imp import marshal from distutils.version import StrictVersion from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN from .py33compat import Bytecode __all__ = [ 'Require', 'find_module', 'get_module_constant', 'extract_constant' ] class Require: """A prerequisite to building o...
Gisleude/speakerfight
refs/heads/master
deck/urls.py
11
from django.conf.urls import patterns from smarturls import surl as url import views urlpatterns = patterns( '', url(regex=r'/my_proposals/', view=views.ListMyProposals.as_view(), name='my_proposals'), url(regex=r'/events/', view=views.ListEvents.as_view(), name='list_even...
thejens/luigi
refs/heads/master
test/create_packages_archive_root/package/subpackage/submodule.py
122
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
c0710204/edx-platform
refs/heads/master
lms/djangoapps/instructor/tests/utils.py
47
""" Utilities for instructor unit tests """ import datetime import json import random from django.utils.timezone import utc from util.date_utils import get_default_time_display class FakeInfo(object): """Parent class for faking objects used in tests""" FEATURES = [] def __init__(self): for featur...
petrus-v/odoo
refs/heads/8.0
addons/bus/bus.py
325
# -*- coding: utf-8 -*- import datetime import json import logging import select import threading import time import random import simplejson import openerp from openerp.osv import osv, fields from openerp.http import request from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT _logger = logging.getLogger(__...
Y3K/django
refs/heads/master
django/contrib/contenttypes/__init__.py
809
default_app_config = 'django.contrib.contenttypes.apps.ContentTypesConfig'
Motaku/ansible
refs/heads/devel
lib/ansible/module_utils/gce.py
305
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
michaelBenin/django-shop
refs/heads/master
setup.py
13
from setuptools import setup, find_packages import os import shop CLASSIFIERS = [ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'To...
pauloschilling/sentry
refs/heads/master
tests/sentry/web/api/tests.py
13
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from django.core.urlresolvers import reverse from exam import fixture from sentry.models import OrganizationMember, ProjectKey, User from sentry.testutils import TestCase from sentry.utils import json class StoreViewTest(TestCase): @fi...
cratuki/solent
refs/heads/master
solent/pyinstaller/__init__.py
2
# // license # Copyright 2016, Free Software Foundation. # # This file is part of Solent. # # Solent 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 3 of the License, or (at your option) ...
rockychen-dpaw/borgcollector
refs/heads/master
livelayermanager/forms.py
2
from django import forms from tablemanager.models import Workspace from livelayermanager.models import Datasource,Layer,SqlViewLayer from borg_utils.form_fields import GeoserverSettingForm,MetaTilingFactorField,GridSetField from borg_utils.form_fields import GroupedModelChoiceField,BorgSelect from borg_utils.forms imp...
mcking49/apache-flask
refs/heads/master
Python/Lib/lib2to3/fixes/fix_itertools.py
178
""" Fixer for itertools.(imap|ifilter|izip) --> (map|filter|zip) and itertools.ifilterfalse --> itertools.filterfalse (bugs 2360-2363) imports from itertools are fixed in fix_itertools_import.py If itertools is imported as something else (ie: import itertools as it; it.izip(spam, eggs)) method calls w...
t794104/ansible
refs/heads/devel
lib/ansible/modules/network/junos/junos_netconf.py
55
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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', ...
jss-emr/openerp-7-src
refs/heads/master
openerp/addons/account_payment/wizard/account_payment_populate_statement.py
40
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
dufresnedavid/hr
refs/heads/8.0
__unported__/hr_labour_recruitment/__openerp__.py
18
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program 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, eit...
MontmereLimited/django-lean
refs/heads/master
django_lean/lean_retention/tests/__init__.py
2
import os import types import unittest for filename in os.listdir(os.path.dirname(__file__)): if (filename[-3:] == ".py" and filename != "__init__.py" and filename[0] != '.'): module = __import__('.'.join((__name__, filename[:-3])), (), (), ["*"]) for name in dir(module): ...
Kagami/kisa
refs/heads/master
lib/twisted/trial/test/test_test_visitor.py
90
from twisted.trial import unittest from twisted.trial.runner import TestSuite, suiteVisit pyunit = __import__('unittest') class MockVisitor(object): def __init__(self): self.calls = [] def __call__(self, testCase): self.calls.append(testCase) class TestTestVisitor(unittest.TestCase): ...
suneeshtr/persona
refs/heads/master
node_modules/l/node_modules/hook.io/node_modules/npm/node_modules/node-gyp/gyp/test/relative/gyptest-default.py
336
#!/usr/bin/env python # Copyright (c) 2011 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. """ Verifies simplest-possible build of a "Hello, world!" program using the default build target. """ import TestGyp test = TestGyp.TestGy...
q1ang/scikit-learn
refs/heads/master
examples/ensemble/plot_forest_importances.py
241
""" ========================================= Feature importances with forests of trees ========================================= This examples shows the use of forests of trees to evaluate the importance of features on an artificial classification task. The red bars are the feature importances of the forest, along wi...
dimacus/selenium
refs/heads/master
py/test/selenium/webdriver/common/form_handling_tests.py
65
# 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...
Shaps/ansible
refs/heads/devel
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testbroken/plugins/filter/broken_filter.py
6
from __future__ import (absolute_import, division, print_function) __metaclass__ = type class FilterModule(object): def filters(self): return { 'broken': lambda x: 'broken', } raise Exception('This is a broken filter plugin')
BaySchoolCS2/Golem
refs/heads/master
golemDaemon.py
1
from ConfigParser import ConfigParser from golemUtils import breakUp from WPAW import Wrapper from time import sleep from tinydb import import TinyDB, where db = TinyDB('db.json') badWords = db.table('badWords') badPhrases2 = db.table('badPhrases2') badPhrases3 = db.table('badPhrases3') goodWords = db.table('goodWor...
prometheanfire/portage
refs/heads/master
pym/portage/util/_eventloop/__init__.py
70
# Copyright 2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2
cannabiscoindev/cannabiscoin420
refs/heads/master-0.13
qa/rpc-tests/httpbasics.py
106
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test rpc http basics # from test_framework.test_framework import BitcoinTestFramework from test_fram...
hgl888/crosswalk-efl
refs/heads/efl/crosswalk-14/42.0.2311.39
tools/build/android/generate_version_code.py
39
#!/usr/bin/env python # Copyright (c) 2009 The Chromium Authors. All rights reserved. # Copyright (c) 2013 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ VersionCode is needed for AndroidManifest.xml, This script will g...
exabon/godot
refs/heads/master
methods.py
5
import os def add_source_files(self, sources, filetype, lib_env=None, shared=False): import glob import string # if not lib_objects: if not lib_env: lib_env = self if type(filetype) == type(""): dir = self.Dir('.').abspath list = glob.glob(dir + "/" + filetype) for...
Balachan27/django
refs/heads/master
django/contrib/gis/db/models/aggregates.py
414
from django.contrib.gis.db.models.fields import ExtentField from django.db.models.aggregates import Aggregate __all__ = ['Collect', 'Extent', 'Extent3D', 'MakeLine', 'Union'] class GeoAggregate(Aggregate): function = None is_extent = False def as_sql(self, compiler, connection): # this will be c...
qsnake/gpaw
refs/heads/master
oldtest/spline.py
3
from gpaw.spline import Spline import numpy as np a = np.array([1, 0.9, 0.1, 0.0]) s = Spline(0, 2.0, a) dx = 0.0001 for x in [0.5, 1, 1.2, 3]: y, dydx = s.get_value_and_derivative(x) z = (s(x + dx) - s(x - dx)) / (2 * dx) print y, dydx - z assert abs(dydx - z) < 1e-7
celebritycoin/CelebrityCoin
refs/heads/master
share/qt/extract_strings_qt.py
2945
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by x...
DonBeo/scikit-learn
refs/heads/master
sklearn/cluster/affinity_propagation_.py
21
""" Algorithms for clustering : Meanshift, Affinity propagation and spectral clustering. """ # Author: Alexandre Gramfort alexandre.gramfort@inria.fr # Gael Varoquaux gael.varoquaux@normalesup.org # License: BSD 3 clause import numpy as np from ..base import BaseEstimator, ClusterMixin from ..utils import a...
srware/upm
refs/heads/master
examples/python/grovecollision.py
16
#!/usr/bin/python # Author: Zion Orent <zorent@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 limi...
kdebrab/pandas
refs/heads/master
pandas/tests/io/test_clipboard.py
2
# -*- coding: utf-8 -*- import numpy as np from numpy.random import randint from textwrap import dedent import pytest import pandas as pd from pandas import DataFrame from pandas import read_clipboard from pandas import get_option from pandas.compat import PY2 from pandas.util import testing as tm from pandas.util.te...
uucidl/hammer
refs/heads/master
src/bindings/cpp/vendor/gtest-1.7.0/test/gtest_shuffle_test.py
3023
#!/usr/bin/env python # # Copyright 2009 Google Inc. All Rights Reserved. # # Redistribution and use 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...
BrotherPhil/django
refs/heads/master
django/contrib/gis/gdal/__init__.py
327
""" This module houses ctypes interfaces for GDAL objects. The following GDAL objects are supported: CoordTransform: Used for coordinate transformations from one spatial reference system to another. Driver: Wraps an OGR data source driver. DataSource: Wrapper for the OGR data source object, supports OGR-su...
gerardosteel/Proyectofinal
refs/heads/master
proyectofinal/vendor/psy/psysh/test/tools/vis.py
710
""" vis.py ====== Ctypes based module to access libbsd's strvis & strunvis functions. The `vis` function is the equivalent of strvis. The `unvis` function is the equivalent of strunvis. All functions accept unicode string as input and return a unicode string. Constants: ---------- * to select alternate encoding for...
kun--hust/sccloud
refs/heads/master
swift/account/utils.py
17
# Copyright (c) 2010-2013 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 agree...
Dapid/scipy
refs/heads/master
scipy/io/harwell_boeing/__init__.py
155
from __future__ import division, print_function, absolute_import from scipy.io.harwell_boeing.hb import MalformedHeader, HBInfo, HBFile, \ HBMatrixType, hb_read, hb_write
mrquim/repository.mrquim
refs/heads/master
repo/plugin.video.neptune-1.2.2/resources/lib/modules/dom_parser.py
35
""" Based on Parsedom for XBMC plugins Copyright (C) 2010-2011 Tobias Ussing And Henrik Mosgaard Jensen 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,...
tovrstra/horton
refs/heads/master
tools/qa/install_deps_extra.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2017 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Licens...
lintzc/gpdb
refs/heads/master
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/filerep/mpp18932/steps/__init__.py
9
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
megaumi/django
refs/heads/master
django/utils/deprecation.py
199
from __future__ import absolute_import import inspect import warnings class RemovedInDjango20Warning(PendingDeprecationWarning): pass class RemovedInDjango110Warning(DeprecationWarning): pass RemovedInNextVersionWarning = RemovedInDjango110Warning class warn_about_renamed_method(object): def __init...
niktre/espressopp
refs/heads/master
contrib/mpi4py/mpi4py-2.0.0/demo/mpi-ref-v1/ex-3.07.py
12
execfile('ex-3.02.py') count = 2 blklen = 3 stride = 4 * dtype.extent newtype = dtype.Create_hvector(count, blklen, stride) assert newtype.size == dtype.size * count * blklen dtype.Free() newtype.Free()
tongchuanwei/alfred-workflow-objectid
refs/heads/master
process.py
2
__author__ = 'zephyre' from datetime import datetime import alfred from bson import ObjectId from bson.errors import InvalidId def process(query_str): """ Entry point """ query_str = query_str.strip().lower() if query_str else '' results = [] if query_str == 'gen': ret = gen_objectid_result...
waterponey/scikit-learn
refs/heads/master
sklearn/feature_selection/base.py
119
# -*- coding: utf-8 -*- """Generic feature selection mixin""" # Authors: G. Varoquaux, A. Gramfort, L. Buitinck, J. Nothman # License: BSD 3 clause from abc import ABCMeta, abstractmethod from warnings import warn import numpy as np from scipy.sparse import issparse, csc_matrix from ..base import TransformerMixin f...
maartenq/ansible
refs/heads/devel
test/runner/test.py
2
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK """Test runner for all Ansible tests.""" from __future__ import absolute_import, print_function import errno import os import sys from lib.util import ( ApplicationError, display, raw_command, get_docker_completion, generate_pip_command, ) from lib.d...
stuarteberg/numpy
refs/heads/master
numpy/ma/tests/test_core.py
16
# pylint: disable-msg=W0401,W0511,W0611,W0612,W0614,R0201,E1102 """Tests suite for MaskedArray & subclassing. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu """ from __future__ import division, absolute_import, print_function __author__ = "Pierre GF Gerard-Marchant" import warnings import pickle i...
seshurajup/phrasal
refs/heads/master
ptm/scripts/human_eval/mfas_solver.py
10
#!/usr/bin/python import sys from collections import defaultdict from collections import namedtuple # Utility functions def bitmap(sequence): """ Generate a coverage bitmap for a sequence of indexes """ return reduce(lambda x,y: x|y, [long('1'+'0'*i,2) for i in sequence], 0) def bitmap2str(b, n, on='o', off='.'):...
jcpowermac/ansible-modules-extras
refs/heads/devel
cloud/amazon/ec2_vpc_net_facts.py
6
#!/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...
trangel/Insight-Data-Science
refs/heads/master
flaskapp/__init__.py
1
from flask import Flask app = Flask(__name__) from flaskapp import views
Lh4cKg/brython
refs/heads/master
www/src/Lib/test/unittests/test_with.py
83
#!/usr/bin/env python3 """Unit tests for the with statement specified in PEP 343.""" __author__ = "Mike Bland" __email__ = "mbland at acm dot org" import sys import unittest from collections import deque from contextlib import _GeneratorContextManager, contextmanager from test.support import run_unittest class Mo...
netman92/coala
refs/heads/master
tests/output/InteractionsTest.py
25
import unittest from pyprint.NullPrinter import NullPrinter from coalib.output.Interactions import fail_acquire_settings from coalib.output.printers.LogPrinter import LogPrinter from coalib.settings.Section import Section class InteractionsTest(unittest.TestCase): def test_(self): log_printer = LogPrin...
hagabbar/pycbc_copy
refs/heads/master
pycbc/fft/cufft.py
2
# Copyright (C) 2012 Josh Willis, Andrew Miller # # 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. # # This program is d...
gnuhub/intellij-community
refs/heads/master
python/testData/refactoring/move/qualifiedImport/before/src/a.py
415
def f(x): return x
htzy/bigfour
refs/heads/master
lms/djangoapps/courseware/management/commands/regrade_partial.py
38
''' This is a one-off command aimed at fixing a temporary problem encountered where partial credit was awarded for code problems, but the resulting score (or grade) was mistakenly set to zero because of a bug in CorrectMap.get_npoints(). ''' import json import logging from optparse import make_option from django.core...
patrickspencer/compass
refs/heads/master
scripts/cli_shortcuts/setup.py
2
#!/usr/bin/env python #-*- coding: utf-8 -*- from setuptools import setup readme = open('README.rst').read() setup( name = 'cli-shortcuts', version = '1.5', description = "You spend way too much time typing 'python manage.py'", long_description = readme, author = "Johannes Gorset, Patrick Spencer...
cancan101/StarCluster
refs/heads/remove_hacks_squash
starcluster/commands/spothistory.py
4
# Copyright 2009-2014 Justin Riley # # This file is part of StarCluster. # # StarCluster 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 3 of the License, or (at your option) any # later ...
avadacatavra/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/formatters.py
20
import json from mozlog.structured.formatters.base import BaseFormatter class WptreportFormatter(BaseFormatter): """Formatter that produces results in the format that wpreport expects.""" def __init__(self): self.raw_results = {} def suite_end(self, data): results = {} results["...
as110/as110.github.io
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/trac.py
364
# -*- coding: utf-8 -*- """ pygments.styles.trac ~~~~~~~~~~~~~~~~~~~~ Port of the default trac highlighter design. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Na...
mattvonrocketstein/smash
refs/heads/master
smashlib/ipy3x/lib/deepreload.py
1
# -*- coding: utf-8 -*- """ Provides a reload() function that acts recursively. Python's normal :func:`python:reload` function only reloads the module that it's passed. The :func:`reload` function in this module also reloads everything imported from that module, which is useful when you're changing files deep inside a...
noironetworks/heat
refs/heads/master
heat/tests/openstack/sahara/test_image.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 t...
elenagradovich/python_training
refs/heads/master
conftest.py
1
import pytest from fixture.application import Application import json import os.path new words plesssssss fixture = None target = None @pytest.fixture def app(request): global fixture global target browser = request.config.getoption("--browser") #Путь к текущему файлу config_file = os.path.join(os.p...
mavit/ansible
refs/heads/devel
lib/ansible/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py
55
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 Red Hat, Inc. # # 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 #...
cpennington/edx-platform
refs/heads/master
cms/djangoapps/contentstore/management/commands/tests/test_git_export.py
1
""" Unittests for exporting to git via management command. """ import copy import os import shutil from six import StringIO import subprocess import unittest from uuid import uuid4 import six from django.conf import settings from django.core.management import call_command from django.core.management.base import Comm...
pipetree/pipetree
refs/heads/master
pipetree/__init__.py
1
from pipetree.stage import LocalFilePipelineStage,\ LocalDirectoryPipelineStage, ExecutorPipelineStage,\ ParameterPipelineStage, IdentityPipelineStage __version__ = '0.1.0' STAGES = { "LocalDirectoryPipelineStage": LocalDirectoryPipelineStage, "LocalFilePipelineStage": LocalFilePipelineStage, "Exe...
anki1909/peach
refs/heads/master
peach/nn/nnet.py
6
################################################################################ # Peach - Computational Intelligence for Python # Jose Alexandre Nalon # # This file: nn/nn.py # Basic topologies of neural networks ################################################################################ # Doc string, reStructur...
diagramsoftware/odoo
refs/heads/8.0
addons/website_sale/models/product.py
262
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
javierTerry/odoo
refs/heads/8.0
addons/website_sale/models/product.py
262
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
udapi/udapi-python
refs/heads/master
udapi/block/write/tikz.py
1
"""Tikz class is a writer for LaTeX with tikz-dependency.""" import logging from udapi.core.basewriter import BaseWriter class Tikz(BaseWriter): r"""A writer of files in the LaTeX with tikz-dependency format. Usage:: udapy write.Tikz < my.conllu > my.tex # or for 2D tree-like rendering ud...
40223101/w16b_test
refs/heads/master
2015cd_midterm-master/static/Brython3.1.0-20150301-090019/Lib/textwrap.py
745
"""Text wrapping and filling. """ # Copyright (C) 1999-2001 Gregory P. Ward. # Copyright (C) 2002, 2003 Python Software Foundation. # Written by Greg Ward <gward@python.net> import re __all__ = ['TextWrapper', 'wrap', 'fill', 'dedent', 'indent'] # Hardcode the recognized whitespace characters to the US-ASCII # whit...
rdev-hackaton/msze_www
refs/heads/master
msze_www/settings/__init__.py
1
# -*- coding: utf-8 -*- DEBUG = False MOBILE_APP_STORE_URL = ( 'https://play.google.com/store/apps/' 'details?id=com.ionicframework.msze322845' ) DATAFILE_URL_PATH = '/api/datafile.json' DATAFILE_FILEPATH = 'data/datafile.json' CACHE_TIME = 24 * 60 * 60 # 24h
luwei0917/awsemmd_script
refs/heads/master
small_script/cross_q.py
1
#!/usr/bin/env python3 import os import sys import random import time from random import seed, randint import argparse import platform from datetime import datetime import imp import subprocess import glob import re # compute cross Q for every pdb pair in one folder parser = argparse.ArgumentParser(description="Compute...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/tangible/hair/human/shared_hair_human_female_s17.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 = Tangible() result.template = "object/tangible/hair/human/shared_hair_human_female_s17.iff" result.attribute_templ...
2014c2g5/cd0505
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/multiprocessing/util.py
696
# # Module providing various facilities to other parts of the package # # multiprocessing/util.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # import sys import functools import os import itertools import weakref import atexit import threading # we want threading to ...
littlstar/chromium.src
refs/heads/nw
chrome/browser/sync/PRESUBMIT.py
32
# 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. """Chromium presubmit script for src/chrome/browser/sync. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details o...
esi-mineset/spark
refs/heads/master
examples/src/main/python/sql/datasource.py
20
# # 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 us...
LPM-HMS/COSMOS-2.0
refs/heads/master
cosmos/job/drm/drm_lsf.py
2
import subprocess as sp import re import os from cosmos.job.drm.DRM_Base import DRM from cosmos.job.drm.util import exit_process_group from cosmos import TaskStatus decode_lsf_state = dict( [ ("UNKWN", "process status cannot be determined"), ("PEND", "job is queued and active"), ("PSUSP", ...
marty331/jakesclock
refs/heads/master
flask/lib/python2.7/site-packages/pyglet/event.py
25
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
xzturn/caffe2
refs/heads/master
caffe2/python/operator_test/deform_conv_test.py
5
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from hypothesis import assume, given import hypothesis.strategies as st from caffe2.proto import caffe2_pb2 from caffe2.python import core, workspace import caffe2.python.hypothesis_test_uti...
alexthered/kienhoc-platform
refs/heads/master
common/djangoapps/django_comment_common/models.py
11
import logging from django.db import models from django.contrib.auth.models import User from django.dispatch import receiver from django.db.models.signals import post_save from django.utils.translation import ugettext_noop from student.models import CourseEnrollment from xmodule.modulestore.django import modulestor...
stanley-cheung/grpc
refs/heads/master
test/cpp/naming/gen_build_yaml.py
8
#!/usr/bin/env python2.7 # Copyright 2015 gRPC 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 applicable la...
alivecor/tensorflow
refs/heads/master
tensorflow/compiler/tests/reduce_ops_test.py
94
# 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...
idl3r/ktsan
refs/heads/tsan
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
4653
# EventClass.py # # This is a library defining some events types classes, which could # be used by other scripts to analyzing the perf samples. # # Currently there are just a few classes defined for examples, # PerfEvent is the base class for all perf event sample, PebsEvent # is a HW base Intel x86 PEBS event, and use...
ODM2/ODMToolsPython
refs/heads/master
odmtools/gui/frmFlagValues.py
1
# Boa:Dialog:frmFlagValues import wx from odmtools.odmdata import Qualifier def create(parent): return frmFlagValues(parent) NEW = "[New Qualifier]" class frmFlagValues(wx.Dialog): def _init_coll_boxSizer1_Items(self, parent): # generated method, don't edit parent.AddWindow(self.splitter...
sclabs/sccms-nonrel
refs/heads/master
django/contrib/gis/db/backends/oracle/introspection.py
388
import cx_Oracle from django.db.backends.oracle.introspection import DatabaseIntrospection class OracleIntrospection(DatabaseIntrospection): # Associating any OBJECTVAR instances with GeometryField. Of course, # this won't work right on Oracle objects that aren't MDSYS.SDO_GEOMETRY, # but it is the only o...
rvmoura96/projeto-almoxarifado
refs/heads/master
myvenv/Lib/site-packages/django/contrib/flatpages/migrations/0001_initial.py
308
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.CreateModel( name='FlatPage', fields=[ ...
betoesquivel/fil2014
refs/heads/master
filenv/lib/python2.7/site-packages/django/utils/archive.py
229
""" Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/ Copyright (c) 2010 Gary Wilson Jr. <gary.wilson@gmail.com> and contributors. 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 So...
xiaoixa/python
refs/heads/master
agmcs/0010/0010.py
40
from PIL import Image, ImageDraw, ImageFont import random im = Image.new('RGBA',(120,50),(255,255,255)) text = random.sample('abcdefghijklmnopqrstuvwxyz\ ABCDEFGHIJKLMNOPQRSTUVWXYZ',4) draw = ImageDraw.Draw(im) font = ImageFont.truetype("msyh.ttf",40) x=0 y=0 for i in xrange(200): x1 = random.randint(0,120) ...
jeremysalwen/Ecasound-LV2
refs/heads/LV2
pyecasound/eci.py
1
""" # eci.ECI -- A higher-level interface to pyeca. # Copyright 2001 Eric S. Tiedemann (est@hyperreal.org) # GPLed some updates by Janne Halttunen """ import pyeca as _pyeca import types as _types class ECIError(Exception): def __init__(self, what): Exception.__init__(self, what) self.what = what...
mancoast/CPythonPyc_test
refs/heads/master
fail/313_test_resource.py
6
import unittest from test import support import time resource = support.import_module('resource') # This test is checking a few specific problem spots with the resource module. class ResourceTest(unittest.TestCase): def test_args(self): self.assertRaises(TypeError, resource.getrlimit) self.asser...