repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
TrackDR/dx
refs/heads/master
dx/dx_models.py
2
# # DX Analytics # Base Classes and Model Classes for Simulation # dx_models.py # # DX Analytics is a financial analytics library, mainly for # derviatives modeling and pricing by Monte Carlo simulation # # (c) Dr. Yves J. Hilpisch # The Python Quants GmbH # # This program is free software: you can redistribute it and/...
r-o-b-b-i-e/pootle
refs/heads/master
pootle/apps/pootle_fs/state.py
1
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from collections import OrderedDict from dj...
nvoron23/avos
refs/heads/master
openstack_dashboard/dashboards/identity/groups/urls.py
64
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 requir...
rue89-tech/edx-platform
refs/heads/master
common/test/data/capa/prog2.py
270
# prog2 # Make this file long, since that seems to affect how uploaded files are # handled in webob or cgi.FieldStorage. moby_dick_ten_chapters = """ CHAPTER 1. Loomings. Call me Ishmael. Some years ago--never mind how long precisely--having little or no money in my purse, and nothing particular to interest me on s...
BonexGu/Blik2D-SDK
refs/heads/master
Blik2D/addon/tensorflow-1.2.1_for_blik/tensorflow/contrib/distributions/python/ops/bijectors/chain_impl.py
51
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
vdmann/cse-360-image-hosting-website
refs/heads/master
lib/python2.7/site-packages/django/contrib/sessions/backends/db.py
101
import logging from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.exceptions import SuspiciousOperation from django.db import IntegrityError, transaction, router from django.utils import timezone from django.utils.encoding import force_text class SessionStore(SessionBase): ...
benjamindeleener/odoo
refs/heads/master
addons/crm/__openerp__.py
4
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'CRM', 'version': '1.0', 'category': 'Customer Relationship Management', 'sequence': 5, 'summary': 'Leads, Opportunities, Activities', 'description': """ The generic Odoo Customer Relat...
frankk00/realtor
refs/heads/master
simplejson/decoder.py
2
"""Implementation of JSONDecoder """ import re import sys import struct from simplejson.scanner import make_scanner def _import_c_scanstring(): try: from simplejson._speedups import scanstring return scanstring except ImportError: return None c_scanstring = _import_c_scanstring() __all...
Outernet-Project/outernetrx-linux
refs/heads/pillar
tools/perf/python/twatch.py
7370
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
dimroc/tensorflow-mnist-tutorial
refs/heads/master
lib/python3.6/site-packages/numpy/tests/test_warnings.py
38
""" Tests which scan for certain occurances in the code, they may not find all of these occurances but should catch almost all. """ from __future__ import division, absolute_import, print_function import sys if sys.version_info >= (3, 4): from pathlib import Path import ast import tokenize import nu...
janhui/test_engine
refs/heads/master
dev/tests/gaussian_bump.py
2
#!/usr/bin/env python import numpy import argparse import os import math from Scientific.IO import NetCDF def main(): parser = argparse.ArgumentParser( prog="gaussian_bump", description="""Create a Gaussian bump in a netcdf file""" ) parser.add_argument( '-v', ...
ritchyteam/odoo
refs/heads/master
addons/l10n_hn/__init__.py
411
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009-2010 Salvatore J. Trimarchi <salvatore@trimarchi.co.cc> # (http://salvatoreweb.co.cc) # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
ArcherSys/ArcherSys
refs/heads/master
Lib/site-packages/cms/tests/forms.py
8
# -*- coding: utf-8 -*- from __future__ import with_statement from django.contrib.sites.models import Site from django.core.cache import cache from cms.admin import forms from cms.admin.forms import PageUserForm from cms.api import create_page, create_page_user from cms.forms.fields import PageSelectFormField, SuperL...
MFoster/breeze
refs/heads/master
django/contrib/messages/models.py
634
# Models module required so tests are discovered.
MphasisWyde/eWamSublimeAdaptor
refs/heads/master
POC/v0_4_POC_with_generic_cmd_and_swagger/plugin/environment.py
1
import sublime, uuid from bravado.client import SwaggerClient swaggerClient = None def get_environments(): settings = sublime.load_settings("wam.sublime-settings") if settings == None: return [] env_list = settings.get("environments") if env_list == None: env_list = [] return env_list d...
gon1213/SDC
refs/heads/master
behavioral_cloning/project_3/video.py
29
from moviepy.editor import ImageSequenceClip import argparse def main(): parser = argparse.ArgumentParser(description='Create driving video.') parser.add_argument( 'image_folder', type=str, default='', help='Path to image folder. The video will be created from these images.' ...
drjova/invenio-deposit
refs/heads/master
invenio_deposit/config.py
2
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
stoewer/nixpy
refs/heads/master
nixio/entity_with_sources.py
1
# Copyright (c) 2014, German Neuroinformatics Node (G-Node) # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted under the terms of the BSD License. See # LICENSE file in the root of the Project. from __future__ import (absolute_import, division,...
LiveZenLK/CeygateERP
refs/heads/master
addons/l10n_be/__openerp__.py
5
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Belgium - Accounting', 'version': '1.1', 'category': 'Localization/Account Charts', 'description': """ This is the base module to manage the accounting chart for Belgium in Odoo. ==============...
Applemann/hypatia
refs/heads/master
hypatia/__init__.py
1
"""This module contains all of the important meta-information for Hypatia such as the author's name, the copyright and license, status, and so on. """ __author__ = "Lillian Lemmer" __copyright__ = "Copyright 2015 Lillian Lemmer" __credits__ = ["Lillian Lemmer"] __license__ = "MIT" __maintainer__ = __author__ __site__...
jortel/suds
refs/heads/master
tests/builtin.py
65
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 distributed in the hope that it will ...
LokiNetworks/empower-runtime
refs/heads/master
empower/core/vap.py
1
#!/usr/bin/env python3 # # Copyright (c) 2016 Roberto Riggio # # 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 applicabl...
Gillu13/scipy
refs/heads/master
scipy/sparse/tests/test_spfuncs.py
122
from __future__ import division, print_function, absolute_import from numpy import array, kron, matrix, diag from numpy.testing import TestCase, run_module_suite, assert_, assert_equal from scipy.sparse import spfuncs from scipy.sparse import csr_matrix, csc_matrix, bsr_matrix from scipy.sparse._sparsetools import cs...
botland/bitcoin
refs/heads/master
contrib/linearize/linearize-hashes.py
214
#!/usr/bin/python # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import pr...
ContinuumIO/watchdog
refs/heads/master
src/watchdog/observers/inotify_buffer.py
1
# -*- coding: utf-8 -*- # # Copyright 2014 Thomas Amland <thomas.amland@gmail.com> # # 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 # # Unles...
jgcaaprom/android_external_chromium_org
refs/heads/cm-12.1
tools/roll_swarming_client.py
63
#!/usr/bin/env python # Copyright 2014 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. """Rolls swarming_client. While it is currently hard coded for swarming_client/, it is potentially modifiable to allow different depen...
joshk/FrameworkBenchmarks
refs/heads/master
frameworks/Python/AsyncIO/yocto_http/hello/services/redis.py
108
from operator import itemgetter import asyncio from random import randint @asyncio.coroutine def get_random_record(container): idx = randint(1, 10000) random_number = yield from container.engines['redis'].get('world:%i' % idx) return {'Id': idx, 'RandomNumber': random_number} @asyncio.coroutine def get_r...
alihalabyah/ansible
refs/heads/devel
lib/ansible/playbook/play.py
23
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
2014c2g14/c2g14
refs/heads/master
w2/static/Brython2.0.0-20140209-164925/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...
russellb/nova
refs/heads/master
nova/tests/test_virt.py
14
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Isaku Yamahata # 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/...
g3-3k/libreant
refs/heads/master
libreantdb/__init__.py
2
from api import DB
sjsucohort6/openstack
refs/heads/master
python/venv/lib/python2.7/site-packages/pymongo/response.py
17
# Copyright 2014-2015 MongoDB, 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 or agreed to in writin...
sunlianqiang/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_dbm_ndbm.py
91
from test import support support.import_module("dbm.ndbm") #skip if not supported import unittest import os import random import dbm.ndbm from dbm.ndbm import error class DbmTestCase(unittest.TestCase): def setUp(self): self.filename = support.TESTFN self.d = dbm.ndbm.open(self.filename, 'c') ...
jumpstarter-io/neutron
refs/heads/master
neutron/db/migration/alembic_migrations/versions/ed93525fd003_bigswitch_quota.py
3
# Copyright 2014 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 ...
lepistone/sale-workflow
refs/heads/8.0
__unported__/account_invoice_reorder_lines/invoice.py
24
# -*- coding: utf-8 -*- # # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2013-2014 Camptocamp (<http://www.camptocamp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero...
procandi/openwebrtc
refs/heads/master
bindings/java/standard_types.py
32
# Copyright (c) 2014-2015, Ericsson AB. 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 copyright notice, this # list of conditions and th...
allmende/synnefo
refs/heads/develop
snf-cyclades-app/synnefo/volume/management/commands/snapshot-show.py
6
# Copyright (C) 2010-2014 GRNET S.A. # # 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 distributed i...
iismd17/scikit-learn
refs/heads/master
sklearn/cluster/hierarchical.py
68
"""Hierarchical Agglomerative Clustering These routines perform some hierarchical agglomerative clustering of some input data. Authors : Vincent Michel, Bertrand Thirion, Alexandre Gramfort, Gael Varoquaux License: BSD 3 clause """ from heapq import heapify, heappop, heappush, heappushpop import warnings im...
benjaminabel/pelican-plugins
refs/heads/master
filetime_from_hg/__init__.py
26
from .filetime_from_hg import *
yuzhu/kubernetes
refs/heads/master
cluster/juju/charms/trusty/kubernetes/hooks/lib/registrator.py
97
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
cancro7/gem5
refs/heads/master
src/mem/SerialLink.py
20
# Copyright (c) 2012-2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
jiazichenzhan/Server_Manage_Plugin
refs/heads/master
ironic-plugin-pike/ironic/tests/unit/drivers/test_base.py
4
# Copyright 2014 Cisco Systems, 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 requi...
sixuanwang/SAMSaaS
refs/heads/master
wirecloud-develop/src/build/lib.linux-x86_64-2.7/wirecloud/proxy/views.py
2
# -*- coding: utf-8 -*- # Copyright (c) 2008-2015 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud 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 v...
delete/spymanager
refs/heads/master
src/__init__.py
1
import pymongo from .myexceptions import AlreadyExistsOnDatabaseException TELEGRAM_URL = 'https://api.telegram.org/bot{token}/{method}?chat_id={chat_id}&text={text}' class Manager(): """ Manage objects adding, removing and getting from database """ def __init__(self, collection): self.collection = c...
sysadminmatmoz/OCB
refs/heads/9.0
addons/hw_posbox_homepage/controllers/main.py
28
# -*- coding: utf-8 -*- import logging import os import time import werkzeug import subprocess from os import listdir import openerp from openerp import http from openerp.http import request from openerp.tools.translate import _ _logger = logging.getLogger(__name__) index_style = """ <style> body...
galbrads/Gear_Manager
refs/heads/master
Tests/tests_util.py
1
import unittest from PySide import QtCore import Util class IsNumTests(unittest.TestCase): def test_IsFloat(self): self.assertTrue(Util.is_number(5.2), 'Is Float') def test_IsInt(self): self.assertTrue(Util.is_number(5), 'Is Int') def test_IsChar(self): self.assertFalse(Util.is_...
tbabej/astropy
refs/heads/master
astropy/coordinates/tests/test_sites.py
2
from __future__ import (absolute_import, division, print_function, unicode_literals) from ...tests.helper import pytest, assert_quantity_allclose, remote_data, quantity_allclose from ... import units as u from .. import Longitude, Latitude, EarthLocation from ..sites import get_builtin_sites, g...
tylerjereddy/scipy
refs/heads/master
scipy/special/_precompute/wright_bessel.py
12
"""Precompute coefficients of several series expansions of Wright's generalized Bessel function Phi(a, b, x). See https://dlmf.nist.gov/10.46.E1 with rho=a, beta=b, z=x. """ from argparse import ArgumentParser, RawTextHelpFormatter import numpy as np from scipy.integrate import quad from scipy.optimize import minimize...
bittorrent/bigcouch
refs/heads/master
couchjs/scons/scons-local-2.0.1/SCons/Tool/as.py
61
"""SCons.Tool.as Tool-specific initialization for as, the generic Posix assembler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010...
mhbu50/erpnext
refs/heads/develop
erpnext/agriculture/doctype/detected_disease/detected_disease.py
23
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class DetectedDisease(Document): pass
emgee/formal
refs/heads/master
formal/test/test_form.py
1
from twisted.trial import unittest from nevow import testutil from nevow import context import formal from formal.validation import FieldRequiredError class TestForm(unittest.TestCase): def test_fieldName(self): form = formal.Form() form.addField('foo', formal.String()) self.assertRaises(...
2014cdbg7/2014cdbg7
refs/heads/master
wsgi/static/Brython2.1.0-20140419-113919/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...
alfa-addon/addon
refs/heads/master
plugin.video.alfa/lib/python_libtorrent/linux_x86_64/1.0.9/__init__.py
362
#-*- coding: utf-8 -*- ''' python-libtorrent for Kodi (script.module.libtorrent) Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman 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 t...
Medigate/cutiuta-server
refs/heads/master
cutiuta-server/env/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py
1776
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
masschallenge/django-accelerator
refs/heads/development
accelerator_abstract/models/base_nav_tree_item.py
1
from __future__ import unicode_literals import swapper from django.db import models from sitetree.models import TreeItemBase from accelerator_abstract.models.accelerator_model import AcceleratorModel from accelerator_abstract.models.base_base_profile import ( EXPERT_USER_TYPE, ENTREPRENEUR_USER_TYPE ) NAV_TR...
alexforencich/python-ivi
refs/heads/master
ivi/agilent/agilentMSO6054A.py
2
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2017 Alex Forencich 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...
artwr/airflow
refs/heads/master
airflow/www/decorators.py
2
# -*- coding: utf-8 -*- # # 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 #...
maniteja123/numpy
refs/heads/master
benchmarks/benchmarks/bench_linalg.py
51
from __future__ import absolute_import, division, print_function from .common import Benchmark, get_squares_, get_indexes_rand, TYPES1 import numpy as np class Eindot(Benchmark): def setup(self): self.a = np.arange(60000.0).reshape(150, 400) self.ac = self.a.copy() self.at = self.a.T ...
newswangerd/ansible
refs/heads/devel
lib/ansible/plugins/shell/cmd.py
29
# Copyright (c) 2019 Ansible Project # 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 DOCUMENTATION = ''' name: cmd version_added: '2.8' short_description: Windows Command Prompt descript...
daenamkim/ansible
refs/heads/devel
lib/ansible/modules/files/template.py
49
# this is a virtual module that is entirely implemented server side # Copyright: (c) 2017, Ansible Project # 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_ve...
homeworkprod/byceps
refs/heads/master
byceps/blueprints/admin/ticketing/authorization.py
1
""" byceps.blueprints.admin.ticketing.authorization ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.util.authorization import create_permission_enum TicketingPermission = create_permission_enum('ticketing', [...
weolar/miniblink49
refs/heads/master
v8_7_5/tools/snapshot/asm_to_inline_asm.py
9
#!/usr/bin/env python # Copyright 2018 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ''' Converts a given file in clang assembly syntax to a corresponding representation in inline assembly. Specifically, this is used ...
kalinochkind/vkbot
refs/heads/master
pack.py
1
import os.path import shutil import tarfile COMPRESSION_MODE = 'gz' def pack_dirs(filename, dirs): try: with tarfile.open(filename, 'w:' + COMPRESSION_MODE) as f: for d in dirs: f.add(d) except Exception as e: print(e) def pack(filename): pack_dirs(filename, ['...
DreamerKing/LightweightHtmlWidgets
refs/heads/master
publish-rc/v1.0/files/Ipy.Lib/encodings/punycode.py
586
# -*- coding: iso-8859-1 -*- """ Codec for the Punicode encoding, as specified in RFC 3492 Written by Martin v. Löwis. """ import codecs ##################### Encoding ##################################### def segregate(str): """3.1 Basic code point segregation""" base = [] extended = {} for c in st...
davidak/openxenmanager
refs/heads/master
src/OXM/oxcSERVER_storage.py
2
# ----------------------------------------------------------------------- # OpenXenManager # # Copyright (C) 2009 Alberto Gonzalez Rodriguez alberto@pesadilla.org # Copyright (C) 2014 Daniel Lintott <daniel@serverb.co.uk> # # This program is free software; you can redistribute it and/or # modify it under the terms of t...
psychopy/versions
refs/heads/master
psychopy/visual/basevisual.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """Provides class BaseVisualStim and mixins; subclass to get visual stimuli """ # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). from __fu...
vipins/ccccms
refs/heads/master
env/Lib/site-packages/django/contrib/gis/sitemaps/kml.py
482
from django.core import urlresolvers from django.contrib.sitemaps import Sitemap from django.contrib.gis.db.models.fields import GeometryField from django.db import models class KMLSitemap(Sitemap): """ A minimal hook to produce KML sitemaps. """ geo_format = 'kml' def __init__(self, locations=Non...
SlicerRt/SlicerDebuggingTools
refs/heads/master
PyDevRemoteDebug/ptvsd-4.1.3/ptvsd/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py
2
import os.path import sys from _pydevd_bundle.pydevd_constants import Null #======================================================================================================================= # get_coverage_files #=============================================================================================...
projectodd/kubernetes
refs/heads/kubesh
examples/cluster-dns/images/frontend/client.py
504
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
aewhatley/scikit-learn
refs/heads/master
sklearn/externals/joblib/hashing.py
194
""" Fast cryptographic hash of Python objects, with a special case for fast hashing of numpy arrays. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import warnings import pickle import hashlib import sys import types import ...
zhaishaomin/LDS-prefetcher-research
refs/heads/master
gem5_src/arch/x86/isa/insts/simd64/integer/data_transfer/move_mask.py
91
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
pytest-dev/pytest
refs/heads/main
testing/python/integration.py
3
from typing import Any import pytest from _pytest import runner from _pytest._code import getfslineno from _pytest.fixtures import getfixturemarker from _pytest.pytester import Pytester class TestOEJSKITSpecials: def test_funcarg_non_pycollectobj( self, pytester: Pytester, recwarn ) -> None: # rough...
angelapper/odoo
refs/heads/9.0
openerp/addons/test_access_rights/__init__.py
2355
# -*- coding: utf-8 -*- import models
programadorjc/django
refs/heads/master
tests/migrations/test_multidb.py
366
import unittest from django.db import connection, migrations, models from django.db.migrations.state import ProjectState from django.test import override_settings from .test_operations import OperationTestBase try: import sqlparse except ImportError: sqlparse = None class AgnosticRouter(object): """ ...
analurandis/Tur
refs/heads/master
backend/venv/Lib/site-packages/Cheetah/Template.py
14
''' Provides the core API for Cheetah. See the docstring in the Template class and the Users' Guide for more information ''' ################################################################################ ## DEPENDENCIES import sys # used in the error handling code import re ...
jcsp/manila
refs/heads/master
manila/api/views/limits.py
4
# Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
RandallDW/Aruba_plugin
refs/heads/Aruba_plugin
plugins/org.python.pydev/tests/pysrc/testlib/unittest/relative/toimport.py
11
class Test1: def test1():pass class Test2: def test2():pass def Met1():pass
zhlinh/leetcode
refs/heads/master
0349.Intersection of Two Arrays/test.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from solution import Solution nums1 = [1, 2, 2, 3, 1] nums2 = [2, 3] sol = Solution() res = sol.intersection(nums1, nums2) print(res)
dekisha/dartlamp
refs/heads/master
libraries/codemirror/component-tools/update.py
28
#!/usr/bin/env python from distutils.version import StrictVersion as V import os import re from subprocess import check_output, check_call import sys # the first version we started maintaining as a component first_version = V('5.20') blacklist_tags = ['v3.02', '5.13.4'] tools = os.path.dirname(os.path.abspath(__fil...
mmnelemane/nova
refs/heads/master
nova/tests/unit/api/openstack/compute/test_cloudpipe.py
26
# Copyright 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 requ...
ngokevin/zamboni
refs/heads/master
mkt/abuse/urls.py
3
from django.conf.urls import include, patterns, url from rest_framework.routers import SimpleRouter from mkt.abuse.views import AppAbuseViewSet, UserAbuseViewSet abuse = SimpleRouter() abuse.register('user', UserAbuseViewSet, base_name='user-abuse') abuse.register('app', AppAbuseViewSet, base_name='app-abuse') api_...
johnsliao/bostonservicemap
refs/heads/master
draw_dots_at_requests.py
1
import sys import pandas from PIL import Image from config import MIN_LAT, MIN_LON, MAX_LAT, MAX_LON, CANVAS_X, CANVAS_Y def ll_to_pixel(lat, lon): x_frac = (MAX_LAT - lat) / (MAX_LAT - MIN_LAT) y_frac = (MAX_LON - lon) / (MAX_LON - MIN_LON) x = x_frac * CANVAS_X y = y_frac * CANVAS_Y return x, ...
SerialShadow/SickRage
refs/heads/master
autoProcessTV/lib/requests/packages/chardet/jpcntx.py
1776
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
jiangzhixiao/odoo
refs/heads/8.0
addons/website_event_sale/__openerp__.py
307
# -*- coding: utf-8 -*- { 'name': "Online Event's Tickets", 'category': 'Hidden', 'summary': "Sell Your Event's Tickets", 'website': 'https://www.odoo.com/page/events', 'version': '1.0', 'description': """ Online Event's Tickets ====================== """, 'author': 'OpenERP SA', ...
gregorynicholas/raven-python
refs/heads/master
raven/contrib/django/raven_compat/__init__.py
41
""" raven.contrib.django.raven_compat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from raven.contrib.django import * # NOQA
adrienbrault/home-assistant
refs/heads/dev
homeassistant/components/ozw/fan.py
6
"""Support for Z-Wave fans.""" import math from homeassistant.components.fan import ( DOMAIN as FAN_DOMAIN, SUPPORT_SET_SPEED, FanEntity, ) from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.util.percentage import ( int_state...
PanDAWMS/panda-server
refs/heads/master
pandaserver/taskbuffer/SupErrors.py
1
# Supplemental error codes # Error values must be less than 1000 class SupErrors (object): error_codes = { 'SUCCEEDE': 0, 'INVALID_BATCH_ID': 1, 'WORKER_ALREADY_DONE': 2, }
zsiciarz/django
refs/heads/master
tests/migrations/test_migrations_initial_false/0001_not_initial.py
21
from django.db import migrations, models class Migration(migrations.Migration): initial = False operations = [ migrations.CreateModel( "Author", [ ("id", models.AutoField(primary_key=True)), ("name", models.CharField(max_length=255)), ...
mozilla/inventory
refs/heads/master
core/network/migrations/0001_initial.py
3
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Network' db.create_table('network', ( ('id', self.gf('django.db.models.fields.Au...
Endika/rma
refs/heads/8.0
crm_rma_lot_mass_return/tests/test_crm_rma_lot_mass_return.py
3
# -*- coding: utf-8 -*- ############################################################################## # # Copyright 2015 Vauxoo # Author: Osval Reyes, # Yanina Aular # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
yhfudev/docsis3ns3
refs/heads/master
src/nix-vector-routing/bindings/callbacks_list.py
331
callback_classes = [ ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', ...
pirate/bookmark-archiver
refs/heads/master
archivebox/cli/__init__.py
1
__package__ = 'archivebox.cli' __command__ = 'archivebox' import os import sys import argparse from typing import Optional, Dict, List, IO, Union from pathlib import Path from ..config import OUTPUT_DIR, check_data_folder, check_migrations from importlib import import_module CLI_DIR = Path(__file__).resolve().pare...
jideobs/twilioAngular
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py
2923
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
avlach/univbris-ocf
refs/heads/ofelia.opticaldevelopment
expedient/src/python/expedient/common/permissions/models.py
4
''' Created on May 28, 2010 @author: jnaous ''' from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.auth.models import User from expedient.common.permissions.exceptions import PermissionCannotBeDel...
siosio/intellij-community
refs/heads/master
python/testData/inspections/PyStringFormatInspection/NewStylePackedReference.py
29
ref = {"fst": 1, "snd": 2} print "first is {fst}, second is {snd}".format(**ref) <warning descr="Too few arguments for format string">"{}"</warning>.format()
liveperson/Auto-Merger
refs/heads/master
src/merger/svn/svnutils.py
1
# Copyright (c) 2012 Liveperson. 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 conditions and the fo...
aruizramon/alec_erpnext
refs/heads/master
erpnext/patches/v4_0/countrywise_coa.py
120
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc("setup", 'doctype', "company") frappe.reload_doc("accounts", 'doctype', "account") frappe.db.sql("""...
pranavk/xhtml2pdf
refs/heads/master
test/linkloading.py
154
# -*- coding: utf-8 -*- # Copyright 2010 Dirk Holtwick, holtwick.it # # 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 ...
sorgerlab/belpy
refs/heads/master
indra/tests/test_model_checker.py
2
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import os import pickle import random import numpy as np import pygraphviz as pgv from indra.statements import * from collections import Counter from pysb import * from pysb.core import SelfExporter from pysb.tools i...
adieu/authentic2
refs/heads/master
authentic2/hashers.py
3
import hashlib import base64 import math from django.contrib.auth import hashers from django.utils.crypto import constant_time_compare from django.utils.datastructures import SortedDict from django.utils.translation import ugettext_noop as _ from django.utils.encoding import force_bytes class Drupal7PasswordHasher(ha...