code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
""" By specifying the 'proxy' Meta attribute, model subclasses can specify that they will take data directly from the table of their base class table rather than using a new table of their own. This allows them to act as simple proxies, providing a modified interface to the data from the base class. """ from django.db ...
denisenkom/django
tests/proxy_models/models.py
Python
bsd-3-clause
4,379
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Denis A. Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import os from os import path as op import sys from struct import pack from glob import glob import numpy as...
trachelr/mne-python
mne/surface.py
Python
bsd-3-clause
39,201
""" Tests that apply specifically to the Python parser. Unless specifically stated as a Python-specific issue, the goal is to eventually move as many of these tests out of this module as soon as the C parser can accept further arguments when parsing. """ import csv from io import ( BytesIO, StringIO, ) import...
rs2/pandas
pandas/tests/io/parser/test_python_parser_only.py
Python
bsd-3-clause
9,378
import numpy as np import theano import theano.tensor as T import lasagne as nn import data import load import nn_plankton import dihedral import tmp_dnn import tta features = [ # "hu", # "tutorial", "haralick", # "aaronmoments", # "lbp", # "pftas", # "zernike_moments", # "image_siz...
yejingxin/kaggle-ndsb
configurations/featharalick_sharding_blend_pl_blend4_convroll4_doublescale_fs5_no_dropout_33_66.py
Python
mit
2,560
import frrtest import pytest if 'S["SCRIPTING_TRUE"]=""\n' not in open("../config.status").readlines(): class TestFrrlua: @pytest.mark.skipif(True, reason="Test unsupported") def test_exit_cleanly(self): pass else: class TestFrrlua(frrtest.TestMultiOut): program = "./test_f...
freerangerouting/frr
tests/lib/test_frrlua.py
Python
gpl-2.0
358
#!/bin/env python """ create and put 'PutAndRegister' request with a single local file warning: make sure the file you want to put is accessible from DIRAC production hosts, i.e. put file on network fs (AFS or NFS), otherwise operation will fail!!! """ __RCSID__ = "$Id: $" import os from DIRAC.Core.Base...
Sbalbp/DIRAC
DataManagementSystem/scripts/dirac-dms-put-and-register-request.py
Python
gpl-3.0
2,952
from li_std_except_as_class import * # This test is expected to fail with -builtin option. # Throwing builtin classes as exceptions not supported if is_python_builtin(): try: test_domain_error() except RuntimeError: pass try: test_domain_error() except RuntimeError: pass...
DGA-MI-SSI/YaCo
deps/swig-3.0.7/Examples/test-suite/python/li_std_except_as_class_runme.py
Python
gpl-3.0
657
# -*- 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...
MarcosCommunity/odoo
addons/purchase/purchase.py
Python
agpl-3.0
93,906
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
sputnick-dev/weboob
modules/allrecipes/module.py
Python
agpl-3.0
2,008
#!/usr/bin/env python ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
jmartinezchaine/OpenERP
openerp/addons/auth_openid/res_users.py
Python
agpl-3.0
4,045
import sys try: from gensim.models.word2vec_inner import FAST_VERSION print('FAST_VERSION ok ! Retrieved with value ', FAST_VERSION) sys.exit() except ImportError: print('Failed... fall back to plain numpy (20-80x slower training than the above)') sys.exit(-1)
summanlp/gensim
docker/check_fast_version.py
Python
lgpl-2.1
283
# -*- coding: utf-8 -*- ########################################################################## # # QGIS-meshing plugins. # # Copyright (C) 2012-2013 Imperial College London and others. # # Please see the AUTHORS file in the main source directory for a # full list of copyright holders. # # Dr Adam S. C...
adamcandy/qgis-plugins-meshing-initial
release/rastercalc/rastercalcdialog.py
Python
lgpl-2.1
16,388
# -*- coding: utf-8 -*- # Automatic provisioning of Azure reserved IP addresses. import os import azure import time from nixops.util import attr_property from nixops.azure_common import ResourceDefinition, ResourceState, normalize_location from azure.mgmt.network import * class AzureReservedIPAddressDefinition(Res...
abuibrahim/nixops
nixops/resources/azure_reserved_ip_address.py
Python
lgpl-3.0
6,605
"""Imports for problem modules.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import importlib import re MODULES = [ "problem_hparams", # pylint: disable=line-too-long "translate_ende", # pylint: disable=line-too-long "translate_enfr", #...
mlperf/training_results_v0.6
Google/benchmarks/transformer/implementations/tpu-v3-512-transformer/transformer/data_generators/all_problems.py
Python
apache-2.0
1,542
# # Copyright 2017 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 or agreed to in writing...
google/eclipse2017
photo/app/app/backend/__init__.py
Python
apache-2.0
577
# 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...
tensorflow/tensorflow
tensorflow/python/framework/subscribe.py
Python
apache-2.0
12,914
# Copyright 2001-2005 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
grepme/CMPUT410Lab01
virt_env/virt1/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/util/logging_config.py
Python
apache-2.0
12,245
from .assembler import PysbAssembler
johnbachman/indra
indra/assemblers/pysb/__init__.py
Python
bsd-2-clause
37
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-20 01:24 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('forum_conversation', '0009_auto_20160925_2126'), ] ...
ellmetha/django-machina
tests/_testsite/apps/forum_conversation/migrations/0010_auto_20170120_0224.py
Python
bsd-3-clause
644
#!/usr/bin/python2.4 # # Copyright 2007 Google Inc. All Rights Reserved. """Selects the appropriate scraper for Internet Explorer.""" __author__ = 'jhaas@google.com (Jonathan Haas)' def GetScraper(version): """Returns the scraper module for the given version. Args: version: version string of IE, or None fo...
meego-tablet-ux/meego-app-browser
tools/site_compare/scrapers/ie/__init__.py
Python
bsd-3-clause
735
from nose.tools import eq_ from django.test.client import RequestFactory from airmozilla.base.tests.testbase import DjangoTestCase from airmozilla.base.helpers import abs_static, show_duration class TestAbsStaticHelpers(DjangoTestCase): def tearDown(self): super(TestAbsStaticHelpers, self).tearDown() ...
tannishk/airmozilla
airmozilla/base/tests/test_helpers.py
Python
bsd-3-clause
3,664
from django.contrib import admin from django.contrib.contenttypes import generic from .models import (Media, PhoneNumber, Episode, EpisodeExtra, Contact, Category, EpisodePermanent, EpisodeMaxNum) site = admin.AdminSite(name="admin") class MediaInline(generic.GenericTabularInline): model = Media class Ep...
yceruto/django
tests/generic_inline_admin/admin.py
Python
bsd-3-clause
1,061
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consi...
dafrito/trac-mirror
tracopt/versioncontrol/svn/tests/__init__.py
Python
bsd-3-clause
731
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsFamilies = 'default', kineticsEstimator = 'rate rules', ) # List of species species( label='ethane', reactive=True, structure=SMILES("CC"), ) # Reaction systems sim...
pierrelb/RMG-Py
rmgpy/tools/data/flux/input.py
Python
mit
829
import pingo from time import sleep rpi = pingo.rpi.RaspberryPi() # A B C D E F G dp led_locations = [11, 7, 21, 24, 26, 13, 15, 19] pins = [rpi.pins[loc] for loc in led_locations[:6]] for pin in pins: pin.mode = pingo.OUT pin.low() while True: for pin in pins: pin.h...
garoa/pingo
pingo/examples/rpi_examples/display7_anim.py
Python
mit
363
from __future__ import absolute_import import autograd.numpy as np import autograd.numpy.random as npr from autograd.util import * from autograd import grad npr.seed(1) def test_real_type(): fun = lambda x: np.sum(np.real(x)) df = grad(fun) assert type(df(1.0)) == float assert type(df(1.0j)) == complex...
kcarnold/autograd
tests/test_complex.py
Python
mit
1,428
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
stevenmizuno/QGIS
python/plugins/db_manager/db_plugins/postgis/connector.py
Python
gpl-2.0
44,359
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
dantebarba/docker-media-server
plex/Subliminal.bundle/Contents/Libraries/Shared/guessit/transfo/split_on_dash.py
Python
gpl-3.0
1,659
# # test cases for new-style fields # from datetime import date, datetime from openerp.exceptions import AccessError, except_orm from openerp.tests import common from openerp.tools import mute_logger class TestNewFields(common.TransactionCase): def test_00_basics(self): """ test accessing new fields """...
orchidinfosys/odoo
openerp/addons/test_new_api/tests/test_new_fields.py
Python
gpl-3.0
19,841
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from pelican.generators import ArticlesGenerator from pelican.tests.support import unittest, get_settings from tempfile import mkdtemp from shutil import rmtree import photos CUR_DIR = os.path.dirname(__file__) class TestPhotos(unittest.TestC...
mikitex70/pelican-plugins
photos/test_photos.py
Python
agpl-3.0
5,353
# coding=utf-8 import os import sys import logging import inspect import traceback from diamond.util import load_class_from_name from diamond.collector import Collector def load_include_path(paths): """ Scan for and add paths to the include path """ for path in paths: # Verify the path is va...
tsheasha/fullerite
src/diamond/utils/classes.py
Python
apache-2.0
5,182
import json import shakedown import dcos from dcos import marathon from enum import Enum from tests.command import ( cassandra_api_url, spin, WAIT_TIME_IN_SECONDS ) class PlanState(Enum): ERROR = "ERROR" WAITING = "WAITING" PENDING = "PENDING" IN_PROGRESS = "IN_PROGRESS" COMPLETE = "C...
adobe-mds/dcos-cassandra-service
integration/tests/infinity_commons.py
Python
apache-2.0
1,791
from __future__ import absolute_import, division, print_function import numpy as np import os import logging def _read_amira(src_file): """ Reads all information contained within standard AmiraMesh data sets. Separate the header information from the image/volume, data. Parameters ---------- s...
danielballan/scikit-xray
skbeam/io/avizo_io.py
Python
bsd-3-clause
10,337
#======================================================================= # verilog_test.py #======================================================================= from pymtl import * import os import random import pytest def _sim_setup( model, all_verilog, dump_vcd='' ): #model.vcd_file = dump_vcd # TODO: hack f...
Glyfina-Fernando/pymtl
pymtl/tools/integration/tests/verilog_test.py
Python
bsd-3-clause
12,662
# Copyright (c) 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. import logging import time class TimeProfile: """Class for simple profiling of action, with logging of cost.""" def __init__(self, description='op...
ric2b/Vivaldi-browser
chromium/build/android/pylib/utils/time_profile.py
Python
bsd-3-clause
1,141
# Copyright 2012 the V8 project authors. 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 conditi...
kingland/go-v8
v8-3.28/tools/testrunner/local/testsuite.py
Python
mit
7,417
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2016 CERN. # # Zenodo 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 v...
lnielsen/zenodo
zenodo/modules/github/__init__.py
Python
gpl-2.0
1,057
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
hryamzik/ansible
lib/ansible/modules/cloud/google/gcp_compute_target_pool.py
Python
gpl-3.0
15,890
# -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2009, John Schember <john at nachtimwald.com>' __docformat__ = 'restructuredtext en' ''' Generic USB Mass storage device driver. This is not a complete stand alone driver. It is intended to be subclassed with the relevant parts implemented for a partic...
songfj/calibre
src/calibre/devices/usbms/driver.py
Python
gpl-3.0
23,329
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2014 Bitergia # # 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 ...
jalonsob/Informes
vizgrimoire/metrics/__init__.py
Python
gpl-3.0
766
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA = {'metadata_version': '1.1', ...
alxgu/ansible
lib/ansible/modules/windows/win_xml.py
Python
gpl-3.0
2,841
# -*- coding: utf-8 -*- # Copyright 2015-2017 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import account_move_line from . import account_invoice from . import account_invoice_line from . import account_invoice_report from . import account_cost_center
Domatix/account-financial-tools
account_cost_center/models/__init__.py
Python
agpl-3.0
320
from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.TextBox import TextBox from pyjamas.ui.HTML import HTML from pyjamas.ui.Button import Button from __pyjamas__ import JS class Rect: def __init__(self, x, y): JS("""@{{self}}.rect = new @{{!rectobj}}();""") self.rect.init(x, y) def add(...
Hasimir/pyjs
examples/jsobject/TestRect.py
Python
apache-2.0
1,626
# 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...
chemelnucfin/tensorflow
tensorflow/python/keras/layers/local_test.py
Python
apache-2.0
17,770
# "magictoken" is used for markers as beginning and ending of example text. import unittest # magictoken.ex_structref_type_definition.begin import numpy as np from numba import njit from numba.core import types from numba.experimental import structref from numba.tests.support import skip_unless_scipy # Define a S...
cpcloud/numba
numba/tests/doc_examples/test_structref_usage.py
Python
bsd-2-clause
4,851
""" ============================== Generate simulated evoked data ============================== """ # Author: Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # # License: BSD (3-clause) import numpy as np import matplotlib.pyplot as plt from...
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated
python-packages/mne-python-0.10/examples/simulation/plot_simulate_evoked_data.py
Python
bsd-3-clause
2,787
# Copyright (c) 2017 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 functionality ...
rallylee/gem5
src/mem/ruby/structures/DirectoryMemory.py
Python
bsd-3-clause
2,558
from django.urls import path from wagtail.search.views import queries app_name = 'wagtailsearch_admin' urlpatterns = [ path("queries/chooser/", queries.chooser, name="queries_chooser"), path("queries/chooser/results/", queries.chooserresults, name="queries_chooserresults"), ]
zerolab/wagtail
wagtail/search/urls/admin.py
Python
bsd-3-clause
288
"""Common tasks for managing child processes. To have child processes actually be managed by this module, you should use the Popen() here rather than subprocess.Popen() directly. Some parts do not yet work fully on windows (sending/trapping signals). """ import atexit import inspect import os import signal import su...
Yawning/pyptlib
pyptlib/util/subproc.py
Python
bsd-3-clause
9,484
import warnings import numpy as np from numpy.testing import assert_allclose import pytest from scipy.fft._fftlog import fht, ifht, fhtoffset from scipy.special import poch def test_fht_agrees_with_fftlog(): # check that fht numerically agrees with the output from Fortran FFTLog, # the results were generated...
ilayn/scipy
scipy/fft/tests/test_fftlog.py
Python
bsd-3-clause
5,819
""" Common test utilities for courseware functionality """ from abc import ABCMeta, abstractmethod from datetime import datetime import ddt from mock import patch from urllib import urlencode from lms.djangoapps.courseware.url_helpers import get_redirect_url from student.tests.factories import AdminFactory, UserFacto...
rismalrv/edx-platform
lms/djangoapps/courseware/testutils.py
Python
agpl-3.0
7,642
# # 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...
shakamunyi/beam
sdks/python/apache_beam/utils/annotations_test.py
Python
apache-2.0
6,739
# 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...
tensorflow/tensorflow
tensorflow/python/keras/layers/pooling_test.py
Python
apache-2.0
13,742
""" Test DarwinLog "source include debug-level" functionality provided by the StructuredDataDarwinLog plugin. These tests are currently only supported when running against Darwin targets. """ import lldb import platform import re from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lld...
endlessm/chromium-browser
third_party/llvm/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py
Python
bsd-3-clause
5,655
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.contrib.contenttypes.models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='ContentType', fields=...
doismellburning/django
django/contrib/contenttypes/migrations/0001_initial.py
Python
bsd-3-clause
1,227
#! /usr/bin/env vpython3 # Copyright 2017 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. # pylint: disable=protected-access import tempfile import shutil import unittest from pylib.base import output_manager from pylib....
ric2b/Vivaldi-browser
chromium/build/android/pylib/output/local_output_manager_test.py
Python
bsd-3-clause
930
class Solution(object): def maxSlidingWindow(self, nums, k): """ :type nums: List[int] :type k: int :rtype: List[int] """ if nums == []: return [] dq = [(nums[0], 0)] for i in range(1, k): while dq != [] and nums[i] > dq[-1][0]:...
Chasego/cod
lintcode/239-[DUP]-Sliding-Window-Maximum/SlidingWindowMaximum_001.py
Python
mit
673
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import shutil import logging from migrate import exceptions from migrate.versioning import pathed, script from datetime import datetime import six log = logging.getLogger(__name__) class VerNum(object): """A version number that behaves like a st...
gltn/stdm
stdm/third_party/migrate/versioning/version.py
Python
gpl-2.0
8,887
"""Tests for distutils.command.bdist_dumb.""" import os import sys import zipfile import unittest from test.support import run_unittest from distutils.core import Distribution from distutils.command.bdist_dumb import bdist_dumb from distutils.tests import support SETUP_PY = """\ from distutils.core import setup impo...
FFMG/myoddweb.piger
monitor/api/python/Python-3.7.2/Lib/distutils/tests/test_bdist_dumb.py
Python
gpl-2.0
2,905
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=protected-access import itertools import threading import unittest from devil import devil_env from devil.android i...
mrtnrdl/.macdots
scripts/bin/platform-tools/systrace/catapult/devil/devil/android/logcat_monitor_test.py
Python
unlicense
8,737
""" Unittests for creating a course in an chosen modulestore """ from StringIO import StringIO import ddt from django.core.management import CommandError, call_command from django.test import TestCase from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase...
ahmedaljazzar/edx-platform
cms/djangoapps/contentstore/management/commands/tests/test_create_course.py
Python
agpl-3.0
4,567
# Copyright 2012 Nebula, 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 agree...
zouyapeng/horizon-newtouch
horizon/templatetags/horizon.py
Python
apache-2.0
6,643
# pylint: disable=g-bad-file-header # 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/LICENS...
ghchinoy/tensorflow
tensorflow/python/tools/optimize_for_inference_test.py
Python
apache-2.0
13,544
# -*- 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 'Flash' db.create_table('cmsplugin_flash', ( ('cmsplugin_ptr', self.gf('django.db...
mpetyx/palmdrop
venv/lib/python2.7/site-packages/cms/plugins/flash/migrations/0001_initial.py
Python
apache-2.0
3,244
## # Copyright 2009-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
ULHPC/modules
easybuild/easybuild-easyblocks/easybuild/easyblocks/w/wps.py
Python
mit
14,921
# Copyright (C) 2010 Oregon State University et al. # Copyright (C) 2010 Greek Research and Technology Network # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License...
dannyman/ganeti_webmgr
ganeti_webmgr/utils/vncdaemon/__init__.py
Python
gpl-2.0
821
# -*- coding: utf-8 -*- from dCore import * from dConstants import * from dLog import * from dThread import * from dModules import * class DamnVideoLoader(DamnThread): def __init__(self, parent, uris, thengo=False, feedback=True, allownonmodules=True): DamnThread.__init__(self) self.uris = [] if type(uris) not i...
gordenbrown51/damnvid
dLoader.py
Python
gpl-3.0
3,966
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
drmrd/ansible
lib/ansible/modules/cloud/amazon/ec2_ami_copy.py
Python
gpl-3.0
7,355
# -*- 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...
ksrajkumar/openerp-6.1
win32/setup.py
Python
agpl-3.0
1,676
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
ritchyteam/odoo
addons/mail/mail_group.py
Python
agpl-3.0
12,895
def func(): value = "not-none" # Is none <caret>if value is None: print("None") else: print("Not none")
siosio/intellij-community
python/testData/intentions/PyInvertIfConditionIntentionTest/commentsIf.py
Python
apache-2.0
136
"""Tests related to django.db.backends that haven't been organized.""" import datetime import threading import unittest import warnings from django.core.management.color import no_style from django.db import ( DEFAULT_DB_ALIAS, DatabaseError, IntegrityError, connection, connections, reset_queries, transaction,...
ebar0n/django
tests/backends/tests.py
Python
bsd-3-clause
31,274
#===== # # Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios), # its affiliates and/or its licensors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source cod...
lento/cortex
test/IECoreHoudini/procedurals/subdRender/subdRender-1.py
Python
bsd-3-clause
2,590
"""ckan api key constraint Revision ID: 3da51a88205a Revises: 46c3f68e950a Create Date: 2014-04-01 11:33:01.394220 """ # revision identifiers, used by Alembic. revision = '3da51a88205a' down_revision = '46c3f68e950a' from alembic import op import sqlalchemy as sa def upgrade(): query = '''UPDATE "user" ...
PyBossa/pybossa
alembic/versions/3da51a88205a_ckan_api_key_constraint.py
Python
agpl-3.0
736
pa<caret>th
siosio/intellij-community
python/testData/completion/className/orderingLocalBeforeStdlib/orderingLocalBeforeStdlib.py
Python
apache-2.0
11
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
Metaswitch/horizon
openstack_dashboard/contrib/sahara/content/data_processing/cluster_templates/workflows/create.py
Python
apache-2.0
12,426
# -*- coding: utf-8 -*- """Usage information for the main IPython applications. """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu> # # Distributed under the terms of...
Vvucinic/Wander
venv_2_7/lib/python2.7/site-packages/IPython/core/usage.py
Python
artistic-2.0
23,364
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2012 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 L...
supermari0/ironic
ironic/tests/matchers.py
Python
apache-2.0
3,436
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 fileencoding=utf-8 import json from django.conf import settings from django.core.management import BaseCommand from django.utils import timezone from django.utils.dateparse import parse_datetime from django.utils.translation import ugettext_lazy from onadata.apps.log...
mainakibui/kobocat
onadata/apps/logger/management/commands/sync_deleted_instances_fix.py
Python
bsd-2-clause
1,551
#!/usr/bin/env python # -*- coding: latin-1 -*- ############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2014 Stanford University and the Authors # # Authors: Kyle A. Beauch...
msultan/mdtraj
mdtraj/nmr/scalar_couplings.py
Python
lgpl-2.1
8,005
""" XX. Generating HTML forms from models This is mostly just a reworking of the ``form_for_model``/``form_for_instance`` tests to use ``ModelForm``. As such, the text may not make sense in all cases, and the examples are probably a poor fit for the ``ModelForm`` syntax. In other words, most of these tests should be r...
h4r5h1t/django-hauthy
tests/model_forms/models.py
Python
bsd-3-clause
12,503
# -*- 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...
jmesteve/saas3
openerp/addons/crm_partner_assign/crm_partner_assign.py
Python
agpl-3.0
11,290
# vim:fileencoding=utf-8 # # greetingInGreek.py # # Demonstration of the parsing module, on the prototypical "Hello, World!" example # from pyparsing import Word # define grammar alphas = u''.join(unichr(x) for x in xrange(0x386, 0x3ce)) greet = Word(alphas) + u',' + Word(alphas) + u'!' # input string...
dbbhattacharya/kitsune
vendor/packages/pyparsing/examples/greetingInGreek.py
Python
bsd-3-clause
440
""" Test functions for limits module. """ from __future__ import division, absolute_import, print_function import numpy as np from numpy.core import finfo, iinfo from numpy import half, single, double, longdouble from numpy.testing import ( TestCase, run_module_suite, assert_equal, assert_ ) from numpy.core.getli...
mbayon/TFG-MachineLearning
venv/lib/python3.6/site-packages/numpy/core/tests/test_getlimits.py
Python
mit
4,613
# This file is part of OpenHatch. # Copyright (C) 2009 OpenHatch, Inc. # # 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, either version 3 of the License, or # (at your option) any later v...
jledbetter/openhatch
mysite/profile/migrations/0042_asheesh_make_all_existing_dias_stale.py
Python
agpl-3.0
10,859
# -*- coding: utf-8 -*- import logging logger = logging.getLogger(__name__)
zachjanicki/osf.io
scripts/analytics/logger.py
Python
apache-2.0
76
# -*- coding: utf-8 -*- try: from urllib import urlencode from urlparse import urlparse, urljoin from urllib import unquote except ImportError: from urllib.parse import urlencode # nopyflakes from urllib.parse import urlparse # nopyflakes from urllib.parse import unquote # nopyflakes from...
SurfasJones/djcmsrc3
venv/lib/python2.7/site-packages/cms/utils/compat/urls.py
Python
mit
363
# 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...
karllessard/tensorflow
tensorflow/python/ops/distributions/gamma.py
Python
apache-2.0
12,328
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.db.backends.mysql.features import ( DatabaseFeatures as MySQLDatabaseFeatures, ) from django.utils.functional import cached_property class DatabaseFeatures(BaseSpatialFeatures, MySQLDatabaseFeatures): has_spatialrefsys_ta...
elena/django
django/contrib/gis/db/backends/mysql/features.py
Python
bsd-3-clause
1,481
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ############################################# # WARNING # ############################################# # # This file is au...
thaim/ansible
lib/ansible/modules/network/vyos/vyos_lag_interfaces.py
Python
mit
15,304
# (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' callback: yaml type: stdout short_description: ...
Jorge-Rodriguez/ansible
lib/ansible/plugins/callback/yaml.py
Python
gpl-3.0
4,817
from __future__ import absolute_import, division, unicode_literals from django.utils.translation import ugettext_lazy as _ from django.utils.safestring import mark_safe from debug_toolbar.panels import Panel from debug_toolbar import settings as dt_settings import cProfile from pstats import Stats from colorsys impor...
nirmeshk/oh-mainline
vendor/packages/django-debug-toolbar/debug_toolbar/panels/profiling.py
Python
agpl-3.0
4,968
# 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...
jbedorf/tensorflow
tensorflow/compiler/tests/argminmax_test.py
Python
apache-2.0
3,905
# Copyright (c) 2008 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, ...
kumar303/rockit
vendor-local/boto/mturk/qualification.py
Python
bsd-3-clause
6,761
""" XML serializer. """ from django.conf import settings from django.core.serializers import base from django.db import models, DEFAULT_DB_ALIAS from django.utils.xmlutils import SimplerXMLGenerator from django.utils.encoding import smart_unicode from xml.dom import pulldom class Serializer(base.Serializer): """ ...
nycholas/ask-undrgz
src/ask-undrgz/django/core/serializers/xml_serializer.py
Python
bsd-3-clause
11,755
#### PATTERN | METRICS ############################################################################# # coding: utf-8 # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac.be/pages/pattern import sys from tim...
krishna11888/ai
third_party/pattern/pattern/metrics.py
Python
gpl-2.0
42,773
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014 Anler Hernández <hello@anler.me> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
CoolCloud/taiga-back
tests/fixtures.py
Python
agpl-3.0
2,031
# 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...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/tensorflow/contrib/distributions/python/ops/bijectors/__init__.py
Python
bsd-2-clause
2,469
# Copyright (C) 2014 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 conditions and the ...
sgraham/nope
third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/browser_test_driver.py
Python
bsd-3-clause
4,523
#! /usr/bin/python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import logging import os import sys from processing import (SitesFromDir, WarmGraph, ColdGraph) def main(): logging.b...
ds-hwang/chromium-crosswalk
tools/android/loading/cost_to_csv.py
Python
bsd-3-clause
1,406