repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
wslfh2005/hbtz
refs/heads/master
views/__init__.py
12133432
luckielordie/conan
refs/heads/develop
conans/test/functional/__init__.py
12133432
eonpatapon/neutron
refs/heads/master
neutron/plugins/ml2/drivers/arista/__init__.py
12133432
JianfengXu/crosswalk-test-suite
refs/heads/master
wrt/wrt-packertool-android-tests/metacomm/__init__.py
12133432
albertoconnor/website
refs/heads/master
core/templatetags/__init__.py
12133432
dblalock/flock
refs/heads/master
python/analyze/motif/__init__.py
12133432
LoLab-VU/pymc
refs/heads/master
pymc/examples/GHME_2013.py
2
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> from pylab import * import pandas as pd from pymc import * from pymc.distributions.timeseries import * # <markdowncell> # Data # ---- # <codecell> data = pd.read_csv(get_data_file('pymc.examples', 'data/pancreatitis.csv')) countries = ['CYP', 'DNK', '...
tallakahath/pymatgen
refs/heads/master
pymatgen/entries/tests/test_entry_tools.py
11
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ FIXME: Proper module docstring """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer...
jcoady9/youtube-dl
refs/heads/master
youtube_dl/extractor/lifenews.py
6
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_str, compat_urlparse, ) from ..utils import ( determine_ext, ExtractorError, int_or_none, parse_iso8601, remove_end, ) class LifeNewsIE(InfoExtractor): ...
kromain/chromium-tools
refs/heads/master
third_party/gsutil/gslib/thread_pool.py
51
# Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
mohittahiliani/PIE-ns3
refs/heads/master
src/mesh/bindings/modulegen__gcc_ILP32.py
14
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
fidomason/kbengine
refs/heads/master
kbe/src/lib/python/Lib/idlelib/ToolTip.py
86
# general purpose 'tooltip' routines - currently unused in idlefork # (although the 'calltips' extension is partly based on this code) # may be useful for some purposes in (or almost in ;) the current project scope # Ideas gleaned from PySol from tkinter import * class ToolTipBase: def __init__(self, button): ...
mSenyor/sl4a
refs/heads/master
python/src/Lib/test/test_fcntl.py
51
"""Test program for the fcntl C module. OS/2+EMX doesn't support the file locking operations. """ import fcntl import os import struct import sys import unittest from test.test_support import verbose, TESTFN, unlink, run_unittest # TODO - Write tests for flock() and lockf(). def get_lockdata(): if sys.platform....
darkleons/lama
refs/heads/master
addons/website_mail_group/__openerp__.py
372
{ 'name': 'Mailing List Archive', 'category': 'Website', 'summary': '', 'version': '1.0', 'description': """ OpenERP Mail Group : Mailing List Archives ========================================== """, 'author': 'OpenERP SA', 'depends': ['website_mail'], 'data': [ 'views/w...
alijafargholi/prman_rfmPrimVarTool
refs/heads/master
src/gui/rmanCwidget.py
1
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/rmanCwidget.ui' # # Created by: PySide UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from Qt import QtWidgets as QtGui from Qt import QtCore try: _fromUtf8 = QtCore.QString.fromUtf8 except Attribu...
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/django/contrib/admin/bin/compress.py
100
#!/usr/bin/env python import argparse import os import subprocess import sys js_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'static', 'admin', 'js') def main(): description = """With no file paths given this script will automatically compress all jQuery-based files of the admin app. Requires ...
AtonLerin/pymel
refs/heads/master
tests/test_language.py
5
import unittest import pymel.core.language as lang # do this after pymel.core, so maya has initialized from maya.mel import eval as meval import maya.cmds as cmds class testCase_pythonToMelCmd(unittest.TestCase): def test_bool_flag(self): self.assertEqual(lang.pythonToMelCmd('xform', rao=1).strip(), ...
rohitwaghchaure/erpnext_develop
refs/heads/develop
erpnext/hr/email_alert/training_feedback/training_feedback.py
309
from __future__ import unicode_literals import frappe def get_context(context): # do your magic here pass
rupran/ansible
refs/heads/devel
lib/ansible/modules/cloud/rackspace/rax_identity.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...
lifemapper/LmQGIS
refs/heads/master
lifemapperTools/tools/MultiSps/common/__init__.py
12133432
realestate-com-au/python-dashing
refs/heads/master
dashmat/server/__init__.py
12133432
pilou-/ansible
refs/heads/devel
lib/ansible/modules/network/ios/ios_l3_interface.py
23
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (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', ...
DiCarloLab-Delft/PycQED_py3
refs/heads/develop
pycqed/analysis_v2/gate_set_tomography_analysis.py
1
import numpy as np from collections import OrderedDict from copy import deepcopy import os import pycqed.analysis_v2.base_analysis as ba from pycqed.analysis import analysis_toolbox as a_tools from pycqed.analysis import measurement_analysis as ma_old import pygsti from pycqed.measurement.gate_set_tomography.pygsti_hel...
2013Commons/hue
refs/heads/master
desktop/core/src/desktop/lib/daemon_utils.py
10
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
cytec/SickRage
refs/heads/master
sickrage/helper/__init__.py
13
# coding=utf-8 from common import setup_github, pretty_file_size, episode_num, CUSTOM_GLOB as glob, \ HTTP_STATUS_CODES, MEDIA_EXTENSIONS, SUBTITLE_EXTENSIONS, try_int, sanitize_filename from media_info import video_screen_size
sudosurootdev/external_chromium_org
refs/heads/L5
tools/perf/benchmarks/image_decoding.py
44
# 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. from telemetry import benchmark from measurements import image_decoding import page_sets class ImageDecodingToughImageCases(benchmark.Benchmark): test =...
remaudcorentin-dev/getnextmusic
refs/heads/master
website/apps.py
27
from django.apps import AppConfig class WebsiteConfig(AppConfig): name = 'website'
CameronLonsdale/sec-tools
refs/heads/master
python2/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/dom.py
435
from __future__ import absolute_import, division, unicode_literals from collections import MutableMapping from xml.dom import minidom, Node import weakref from . import base from .. import constants from ..constants import namespaces from .._utils import moduleFactoryFactory def getDomBuilder(DomImplementation): ...
sarthakmeh03/django
refs/heads/master
django/http/response.py
45
from __future__ import unicode_literals import datetime import json import re import sys import time from email.header import Header from django.conf import settings from django.core import signals, signing from django.core.exceptions import DisallowedRedirect from django.core.serializers.json import DjangoJSONEncode...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.5/Lib/plat-mac/Carbon/Sndihooks.py
82
from _Sndihooks import *
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.4/Lib/test/test_getargs2.py
11
import unittest from test import test_support import sys import warnings, re warnings.filterwarnings("ignore", category=DeprecationWarning, message=".*integer argument expected, got float", module=__name__) warnings.filterwarnings("ignore", ...
jeremydw/macgrow
refs/heads/master
macgrow/GrowLauncherModel.py
1
from Foundation import NSObject from AppKit import NSBeep from grow.server import manager class Pod(NSObject, manager.PodServer): def __new__(cls, *args, **kwargs): return cls.alloc().init() class GrowLauncherModel(NSObject): """A delegate and a data source for NSTableView.""" def __init__(self): se...
jeffrey4l/nova
refs/heads/master
nova/api/openstack/compute/contrib/hosts.py
48
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
nttks/jenkins-test
refs/heads/gacco/birch
openedx/core/djangoapps/user_api/api/account.py
7
"""Python API for user accounts. Account information includes a student's username, password, and email address, but does NOT include user profile information (i.e., demographic information and preferences). """ from django.conf import settings from django.db import transaction, IntegrityError from django.core.valid...
isandlaTech/cohorte-demos
refs/heads/dev
led/src/led_dummy_wrapper/__init__.py
12133432
hryamzik/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/redshift.py
50
#!/usr/bin/python # Copyright 2014 Jens Carl, Hothead Games 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', 'stat...
brianlsharp/MissionPlanner
refs/heads/master
Lib/site-packages/scipy/fftpack/benchmarks/bench_basic.py
63
""" Test functions for fftpack.basic module """ import sys from numpy.testing import * from scipy.fftpack import ifft, fft, fftn, irfft, rfft from numpy import arange, asarray, zeros, dot, exp, pi, double, cdouble import numpy.fft from numpy.random import rand def random(size): return rand(*size) def direct_dft(...
jhd/spunout
refs/heads/master
flask/lib/python2.7/site-packages/setuptools/tests/doctest.py
332
# Module doctest. # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). # Major enhancements and refactoring by: # Jim Fulton # Edward Loper # Provided as-is; use at your own risk; no warranty; no promises; enjoy! try: basestring except NameError: basestring = str try: enum...
gkroch/mbed-os
refs/heads/master
tools/test_exporters.py
50
""" mbed SDK Copyright (c) 2011-2014 ARM Limited 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 wr...
MissCatLady/AlarmEZ
refs/heads/master
venv/lib/python2.7/site-packages/sqlalchemy/testing/requirements.py
10
# testing/requirements.py # Copyright (C) 2005-2014 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 """Global database feature support policy. Provides decorators to mark test...
memtoko/django
refs/heads/master
django/db/models/sql/aggregates.py
76
""" Classes to represent the default SQL aggregate functions """ import copy import warnings from django.db.models.fields import FloatField, IntegerField from django.db.models.lookups import RegisterLookupMixin from django.utils.deprecation import RemovedInDjango20Warning from django.utils.functional import cached_pro...
MyRobotLab/pyrobotlab
refs/heads/master
home/brotherbrown831/inmoov/bots/gestures/takeball.py
2
def takeball(): rest() i01.setHandSpeed("right", 0.85, 0.75, 0.75, 0.75, 0.85, 0.75) i01.setArmSpeed("right", 0.85, 0.85, 0.85, 0.85) i01.setHeadSpeed(0.9, 0.9) i01.setTorsoSpeed(0.75, 0.55, 1.0) i01.moveHead(30,70) i01.moveArm("left",5,84,16,15) i01.moveArm("right",6,73,76,16) i01.moveHand("left",50,...
gilhooley/python_koans
refs/heads/master
python2/koans/about_proxy_object_project.py
78
#!/usr/bin/env python # -*- coding: utf-8 -*- # Project: Create a Proxy Class # # In this assignment, create a proxy class (one is started for you # below). You should be able to initialize the proxy object with any # object. Any attributes called on the proxy object should be forwarded # to the target object. As e...
Lektorium-LLC/edx-platform
refs/heads/master
openedx/core/djangoapps/embargo/admin.py
22
""" Django admin page for embargo models """ import textwrap from config_models.admin import ConfigurationModelAdmin from django.contrib import admin from .forms import IPFilterForm, RestrictedCourseForm from .models import CountryAccessRule, IPFilter, RestrictedCourse class IPFilterAdmin(ConfigurationModelAdmin): ...
yongxin1029/pywinauto
refs/heads/master
pywinauto/__init__.py
14
# GUI Application automation and testing library # Copyright (C) 2006 Mark Mc Mahon # # 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...
nowls/gnuradio
refs/heads/master
gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/text.py
333
# # Copyright 2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # #...
iemejia/beam
refs/heads/master
sdks/python/apache_beam/runners/interactive/options/interactive_options.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 us...
shubhdev/openedx
refs/heads/master
lms/djangoapps/dashboard/management/commands/tests/__init__.py
12133432
barbuza/django
refs/heads/master
tests/dispatch/__init__.py
12133432
gfyoung/pandas
refs/heads/master
pandas/tests/arrays/masked/__init__.py
12133432
hassanabidpk/django
refs/heads/master
django/conf/locale/uk/__init__.py
12133432
cevaris/pants
refs/heads/master
src/python/pants/backend/python/__init__.py
12133432
eeshangarg/zulip
refs/heads/master
pgroonga/__init__.py
12133432
rnd0101/urbanmediator
refs/heads/master
local/packages/scrapers/__init__.py
12133432
Codefans-fan/odoo
refs/heads/8.0
openerp/report/render/rml2pdf/utils.py
381
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2003, Fabien Pinckaers, UCL, FSA # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesse...
phoebusliang/parallel-lettuce
refs/heads/master
tests/integration/lib/Django-1.3/tests/regressiontests/admin_ordering/tests.py
50
from django.test import TestCase from django.contrib.admin.options import ModelAdmin from models import Band, Song, SongInlineDefaultOrdering, SongInlineNewOrdering class TestAdminOrdering(TestCase): """ Let's make sure that ModelAdmin.queryset uses the ordering we define in ModelAdmin rather that orderin...
kubespray/kpm
refs/heads/master
kpm/commands/deploy.py
1
import kpm.platforms.kubernetes import kpm.formats from kpm.commands.command_base import CommandBase, LoadVariables class DeployCmd(CommandBase): name = 'deploy' help_message = "deploy a package on kubernetes" def __init__(self, options): super(DeployCmd, self).__init__(options) self.pack...
dagdaggo/coala
refs/heads/master
coalib/bearlib/languages/definitions/__init__.py
52
""" This directory holds language definitions. Language definitions hold expressions that help defining specific syntax elements for a programming language. Currently defined keys are: names extensions comment_delimiter multiline_comment_delimiters string_delimiters multiline_string_delimiters keywords...
Timeship/scrapy
refs/heads/master
scrapy/utils/ftp.py
210
from ftplib import error_perm from posixpath import dirname def ftp_makedirs_cwd(ftp, path, first_call=True): """Set the current directory of the FTP connection given in the `ftp` argument (as a ftplib.FTP object), creating all parent directories if they don't exist. The ftplib.FTP object must be already c...
zyrikby/androguard
refs/heads/master
androguard/core/api_specific_resources/api_permission_mappings/api_permission_mappings_api18.py
37
null
cwyark/micropython
refs/heads/master
tests/io/file_readinto.py
56
b = bytearray(30) f = open("io/data/file1", "rb") print(f.readinto(b)) print(b) f = open("io/data/file2", "rb") print(f.readinto(b)) print(b) # readinto() on writable file f = open('io/data/file1', 'ab') try: f.readinto(bytearray(4)) except OSError: print('OSError')
datenbetrieb/odoo
refs/heads/8.0
addons/product_extended/wizard/__init__.py
374
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify #...
npe9/binutils-gdb
refs/heads/master
gdb/python/lib/gdb/command/unwinders.py
50
# Unwinder commands. # Copyright 2015 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. # ...
allotria/intellij-community
refs/heads/master
python/helpers/pycharm/nose_helper/__init__.py
85
from nose_helper.suite import ContextSuite from nose_helper.loader import TestLoader
Chilledheart/chromium
refs/heads/master
tools/telemetry/telemetry/__init__.py
3
# 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. """A library for cross-platform browser tests.""" import os import sys # Ensure Python >= 2.7. if sys.version_info < (2, 7): print >> sys.stderr, 'Need Py...
skycucumber/xuemc
refs/heads/master
python/venv/lib/python2.7/site-packages/migrate/tests/versioning/test_repository.py
63
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import shutil from migrate import exceptions from migrate.versioning.repository import * from migrate.versioning.script import * from migrate.tests import fixture from datetime import datetime class TestRepository(fixture.Pathed): def test_create(self): ...
nicksergeant/finisht
refs/heads/master
__init__.py
12133432
yanheven/neutron
refs/heads/master
neutron/plugins/ml2/extensions/__init__.py
12133432
mozilla/captain
refs/heads/master
vendor/lib/python/django/contrib/gis/tests/distapp/__init__.py
12133432
bluevoda/BloggyBlog
refs/heads/master
lib/python3.4/site-packages/pip/_vendor/requests/__init__.py
149
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ Requests HTTP library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('https://www.python.org') >>> ...
scenarios/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/lrn_op_test.py
138
# 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...
curtisstpierre/django
refs/heads/master
tests/view_tests/tests/test_csrf.py
253
from django.test import Client, SimpleTestCase, override_settings from django.utils.translation import override @override_settings(ROOT_URLCONF="view_tests.urls") class CsrfViewTests(SimpleTestCase): def setUp(self): super(CsrfViewTests, self).setUp() self.client = Client(enforce_csrf_checks=True...
clubcapra/Ibex
refs/heads/master
src/capra_camera/scripts/publish_image.py
2
#!/usr/bin/env python import roslib roslib.load_manifest('capra_camera') import rospy from cv_bridge import CvBridge from sensor_msgs.msg import Image import cv2 import sys rospy.init_node('capra_camera') rate = rospy.Rate(20) file = sys.argv[1] img = cv2.imread(file) bridge = CvBridge() msg = bridge.cv2_to_imgmsg(...
barry-scott/git-workbench
refs/heads/master
Source/Git/wb_git_callback_client_unix.py
2
''' ==================================================================== Copyright (c) 2016-2017 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ======================================================...
arhik/nupic
refs/heads/master
tests/swarming/nupic/swarming/experiments/field_threshold_temporal/description.py
6
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
SurfasJones/djcmsrc3
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/comments/admin.py
178
from __future__ import unicode_literals from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.comments.models import Comment from django.utils.translation import ugettext_lazy as _, ungettext_lazy from django.contrib.comments import get_model from django.contrib.comments.v...
cbenhagen/kivy
refs/heads/master
kivy/core/clipboard/clipboard_nspaste.py
59
''' Clipboard OsX: implementation of clipboard using Appkit ''' __all__ = ('ClipboardNSPaste', ) from kivy.core.clipboard import ClipboardBase from kivy.utils import platform if platform != 'macosx': raise SystemError('Unsupported platform for appkit clipboard.') try: from pyobjus import autoclass from p...
Lekanich/intellij-community
refs/heads/master
python/testData/inspections/PyCompatibilityInspection/binaryExpression.py
45
print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4, 3.5 do not support <>, use != instead.">a <> b</warning>) if <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4, 3.5 do not support <>, use != instead.">a <> 2</warning>: var = a
simonwydooghe/ansible
refs/heads/devel
test/units/parsing/vault/test_vault.py
44
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016, Toshio Kuratomi <tkuratomi@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 So...
mdeejay/msm7x30-ics
refs/heads/master
tools/perf/scripts/python/check-perf-trace.py
948
# perf trace event handlers, generated by perf trace -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. Ba...
Astroua/TurbuStat
refs/heads/master
turbustat/tests/generate_test_images.py
2
# Licensed under an MIT open source license - see LICENSE import numpy as np from astropy.modeling.models import Gaussian2D, Const2D, Gaussian1D, Const1D from astropy.utils import NumpyRNGContext # Define ways to make 1D and 2D profiles (typically Gaussian for ease) def twoD_gaussian(shape=(201, 201), x_std=10., y_s...
AkademieOlympia/sympy
refs/heads/master
sympy/series/tests/test_limitseq.py
62
from sympy import symbols, oo, Sum, harmonic, Add, S, binomial, factorial from sympy.series.limitseq import limit_seq from sympy.series.limitseq import difference_delta as dd from sympy.utilities.pytest import raises, XFAIL n, m, k = symbols('n m k', integer=True) def test_difference_delta(): e = n*(n + 1) e...
ddasilva/numpy
refs/heads/master
numpy/matlib.py
161
from __future__ import division, absolute_import, print_function import numpy as np from numpy.matrixlib.defmatrix import matrix, asmatrix # need * as we're copying the numpy namespace from numpy import * __version__ = np.__version__ __all__ = np.__all__[:] # copy numpy namespace __all__ += ['rand', 'randn', 'repmat...
ujjwal96/mitmproxy
refs/heads/master
mitmproxy/addons/__init__.py
3
from mitmproxy.addons import anticache from mitmproxy.addons import anticomp from mitmproxy.addons import block from mitmproxy.addons import browser from mitmproxy.addons import check_ca from mitmproxy.addons import clientplayback from mitmproxy.addons import core from mitmproxy.addons import cut from mitmproxy.addons ...
40223136/w11-2
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/weakref.py
769
"""Weak reference support for Python. This module is an implementation of PEP 205: http://www.python.org/dev/peps/pep-0205/ """ # Naming convention: Variables named "wr" are weak reference objects; # they are called this instead of "ref" to avoid name collisions with # the module-global ref() function imported from ...
risicle/django
refs/heads/master
tests/migration_test_data_persistence/tests.py
368
from django.test import TestCase, TransactionTestCase from .models import Book class MigrationDataPersistenceTestCase(TransactionTestCase): """ Tests that data loaded in migrations is available if we set serialized_rollback = True on TransactionTestCase """ available_apps = ["migration_test_data...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/aio/operations/_ddos_protection_plans_operations.py
1
# 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 may ...
grantdelozier/TopoCluster
refs/heads/master
experimental/TestResolver_LGL.py
1
import sys import os import io import psycopg2 import xml.etree.ElementTree as ET from lxml import etree import math from collections import Counter from operator import itemgetter import datetime import nltk import collections #For use in reading LGL test sets def block(ch): ''' Return the Unicode block nam...
way2heavy/youtube-dl-1
refs/heads/master
youtube_dl/extractor/historicfilms.py
142
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import parse_duration class HistoricFilmsIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?historicfilms\.com/(?:tapes/|play)(?P<id>\d+)' _TEST = { 'url': 'http://www.historicfilms.com/tapes/4728', 'md5'...
svisser/crossword
refs/heads/master
tests/__init__.py
12133432
Gurvan/MelAPI
refs/heads/master
MelAPI/__init__.py
12133432
siosio/intellij-community
refs/heads/master
python/testData/refactoring/move/relativeImportsToModulesInSameMovedPackageNotUpdated/after/src/subpkg/m2.py
12133432
open-machine-learning/mldata
refs/heads/master
blog/__init__.py
12133432
Fuchai/Philosophy-Machine
refs/heads/master
analysis/ind_weight_analys.py
1
from analysis.ind_datagen import * class Filter(nn.Module): def __init__(self): super(Filter, self).__init__() self.lin1=nn.Linear(100,100) self.lin2=nn.Linear(100,100) self.lin3=nn.Linear(100,1) def forward(self,input): x0=self.lin1(input) x1=F.relu(x0) ...
takluyver/weatbag
refs/heads/master
weatbag/tiles/n2w1.py
2
from weatbag import words class Tile: def __init__(self): self.challenge_completed = False self.minutes = "40" def describe(self): print("You see two children who you notice now are a boy and a girl.\n" "They are playing and running around a raft.\n") if not self....
omnirom/android_external_chromium-org
refs/heads/android-5.1
tools/coverity/coverity.py
179
#!/usr/bin/env python # Copyright (c) 2011 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. """ Runs Coverity Prevent on a build of Chromium. This script should be run in a Visual Studio Command Prompt, so that the INCLUDE...
johan-sports/pyheatshrink
refs/heads/master
heatshrink/__init__.py
1
from .core import encode, decode from .streams import open, EncodedFile __all__ = ['encode', 'decode', 'open', 'EncodedFile']
doomsterinc/odoo
refs/heads/8.0
addons/crm_claim/report/__init__.py
446
# -*- 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...
LUTAN/tensorflow
refs/heads/master
tensorflow/tensorboard/backend/event_processing/event_file_loader.py
68
# 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...
embedded1/django-oscar-paypal
refs/heads/master
paypal/gateway.py
1
import requests import time from django.utils.encoding import force_text from django.utils.http import urlencode import urlparse from paypal import exceptions def post(url, params, headers=None): """ Make a POST request to the URL using the key-value pairs. Return a set of key-value pairs. :url: U...