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
'''OpenGL extension NV.texgen_emboss This module customises the behaviour of the OpenGL.raw.GL.NV.texgen_emboss to provide a more Python-friendly API Overview (from the spec) This extension provides a new texture coordinate generation mode suitable for multitexture-based embossing (or bump mapping) effects. ...
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGL/GL/NV/texgen_emboss.py
Python
lgpl-3.0
1,741
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
pombredanne/pants
src/python/pants/binaries/binary_util.py
Python
apache-2.0
9,303
# # 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...
airbnb/airflow
tests/providers/apache/hive/sensors/test_hive_partition.py
Python
apache-2.0
1,659
""" Implementation of stack data structure in Python. """ class Stack: def __init__(self,*vargs): self.stack = list(vargs) def __repr__(self): return str(self.stack) def top(self): return self.stack[0] def push(self,elem): self.stack.insert(0,elem) def pop(self):...
beqa2323/learntosolveit
languages/python/design_stack.py
Python
bsd-3-clause
507
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Copyright © 2016, Continuum Analytics, Inc. All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. # -------------------------------------------------------------------...
conda/kapsel
conda_kapsel/test/__init__.py
Python
bsd-3-clause
331
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/google/appengine/api/conf.py
Python
bsd-3-clause
11,771
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. """PyCrypto AES implementation.""" from .cryptomath import * from .aes import * if pycryptoLoaded: import Crypto.Cipher.AES def new(key, mode, IV): return PyCrypto_AES(key, mode, IV) c...
rebolinho/liveit.repository
script.video.F4mProxy/lib/f4mUtils/pycrypto_aes.py
Python
gpl-2.0
869
import logging import os from autotest.client.shared import error, utils from virttest import data_dir, utils_test def umount_fs(mountpoint): if os.path.ismount(mountpoint): result = utils.run("umount -l %s" % mountpoint, ignore_status=True) if result.exit_status: logging.debug("Umount...
liuzzfnst/tp-libvirt
libguestfs/tests/guestmount.py
Python
gpl-2.0
2,688
from django.conf.urls import patterns, include, url from misago.threads.views.privatethreads import PrivateThreadsView urlpatterns = patterns('', url(r'^private-threads/$', PrivateThreadsView.as_view(), name='private_threads'), url(r'^private-threads/(?P<page>\d+)/$', PrivateThreadsView.as_view(), name='priva...
390910131/Misago
misago/threads/urls/privatethreads.py
Python
gpl-2.0
5,045
# -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2016-11-04 16:36 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('pootle_app', '0014_set_directory_tp_path'), ] operations = [ migrations.AlterIndexT...
claudep/pootle
pootle/apps/pootle_app/migrations/0015_add_tp_path_idx.py
Python
gpl-3.0
470
from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse_lazy from django.utils.decorators import method_decorator from django.views.generic import (DetailView, ListView) from django.views.generic.edit import (CreateView, ...
adusca/treeherder
treeherder/credentials/views.py
Python
mpl-2.0
1,507
#-*- coding: utf-8 -*- """ Group Configuration Tests. """ import json import mock import ddt from django.conf import settings from django.test.utils import override_settings from opaque_keys.edx.keys import AssetKey from opaque_keys.edx.locations import AssetLocation from contentstore.utils import reverse_course_ur...
IndonesiaX/edx-platform
cms/djangoapps/contentstore/views/tests/test_certificates.py
Python
agpl-3.0
28,836
import types def is_string_like(maybe): """Test value to see if it acts like a string""" try: maybe+"" except TypeError: return 0 else: return 1 def is_list_or_tuple(maybe): return isinstance(maybe, (types.TupleType, types.ListType))
luxnovalabs/enjigo_door
web_interface/keyedcache/utils.py
Python
unlicense
281
# Copyright 2013, Red Hat, 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 agr...
leilihh/nova
nova/scheduler/rpcapi.py
Python
apache-2.0
5,246
# Copyright 2013: Mirantis 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 b...
afaheem88/rally
tests/unit/deployment/engines/test_devstack.py
Python
apache-2.0
4,402
#!/usr/bin/env python # RSSI production test import serial, sys, optparse, time, fdpexpect parser = optparse.OptionParser("update_mode") parser.add_option("--baudrate", type='int', default=57600, help='baud rate') parser.add_option("--rtscts", action='store_true', default=False, help='enable rtscts') parser.add_optio...
RFDesign/SiK
Firmware/tools/rssi.py
Python
bsd-2-clause
1,670
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
eunchong/build
third_party/buildbot_8_4p1/buildbot/schedulers/filter.py
Python
bsd-3-clause
851
import unittest import uuid from django.core.checks import Error, Warning as DjangoWarning from django.db import connection, models from django.test import ( SimpleTestCase, TestCase, skipIfDBFeature, skipUnlessDBFeature, ) from django.test.utils import isolate_apps, override_settings from django.utils.functional ...
ar4s/django
tests/invalid_models_tests/test_ordinary_fields.py
Python
bsd-3-clause
31,641
""" =============================================== Create topographic ERF maps in delayed SSP mode =============================================== This script shows how to apply SSP projectors delayed, that is, at the evoked stage. This is particularly useful to support decisions related to the trade-off between deno...
trachelr/mne-python
examples/visualization/plot_evoked_topomap_delayed_ssp.py
Python
bsd-3-clause
2,301
import os import CTK UPLOAD_DIR = "/tmp" def ok (filename, target_dir, target_file, params): txt = "<h1>It worked!</h1>" txt += "<pre>%s</pre>" %(os.popen("ls -l '%s'" %(os.path.join(target_dir, target_file))).read()) txt += "<p>Params: %s</p>" %(str(params)) txt += "<p>Filename: %s</p>" %(filename) ...
cherokee/pyscgi
tests/test5.py
Python
bsd-3-clause
850
# The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/license/. # # Software di...
rays/ipodderx-core
khashmir/khash.py
Python
mit
3,533
#!/usr/bin/env python """ demonstrate adding a FigureCanvasGTK3Agg widget to a Gtk.ScrolledWindow using GTK3 accessed via pygobject """ from gi.repository import Gtk from matplotlib.figure import Figure from numpy import arange, sin, pi from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanv...
lthurlow/Network-Grapher
proj/external/matplotlib-1.2.1/lib/mpl_examples/user_interfaces/embedding_in_gtk3.py
Python
mit
834
__version__ = "2.0"
sbidoul/pip
tests/data/src/simplewheel-2.0/simplewheel/__init__.py
Python
mit
20
# Simple test suite for Cookie.py from test.test_support import verify, verbose, run_doctest import Cookie import warnings warnings.filterwarnings("ignore", ".* class is insecure.*", DeprecationWarning) # Currently this only tests SimpleCookie cases = [ ('chips=ah...
trivoldus28/pulsarch-verilog
tools/local/bas-release/bas,3.9/lib/python/lib/python2.3/test/test_cookie.py
Python
gpl-2.0
1,516
#!/usr/bin/python # coding: utf-8 -*- # (c) 2017, Wayne Witzel III <wayne@riotousliving.com> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
HuaweiSwitch/ansible
lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_launch.py
Python
gpl-3.0
4,901
"""Copyright 2008 Orbitz WorldWide 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, softwa...
absalon-james/graphite-api
graphite_api/utils.py
Python
apache-2.0
2,513
import unittest import random, sys, time, re sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_glm, h2o_util, h2o_rf class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): # ...
vbelakov/h2o
py/testdir_single_jvm/test_parse_mnist_fvec.py
Python
apache-2.0
2,023
# Copyright (C) 2014, Red Hat, 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...
joker946/nova
nova/objects/virtual_interface.py
Python
apache-2.0
3,823
#!/usr/bin/env python """Grover's quantum search algorithm example.""" from sympy import pprint from sympy.physics.quantum import qapply from sympy.physics.quantum.qubit import IntQubit from sympy.physics.quantum.grover import (OracleGate, superposition_basis, WGate, grover_iteration) def demo_vgate_app(v):...
kaushik94/sympy
examples/advanced/grover_example.py
Python
bsd-3-clause
2,081
# Copyright 2018 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 re import subprocess import sys import six _RE_INFO_USER_EMAIL = r'Logged in as (?P<email>\S+)\.$' class AuthorizationError(Exception): pass d...
scheib/chromium
tools/perf/core/services/luci_auth.py
Python
bsd-3-clause
1,316
import sys from functools import update_wrapper from future.utils import iteritems from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models.base import ModelBase from django.utils import six from django.views.decorators.cache import never_cache from django.template....
sshwsfc/django-xadmin
xadmin/sites.py
Python
bsd-3-clause
15,155
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
mpasternak/pyglet-fix-issue-552
pyglet/image/codecs/pypng.py
Python
bsd-3-clause
41,571
"""Functions used by least-squares algorithms.""" from math import copysign import numpy as np from numpy.linalg import norm from scipy.linalg import cho_factor, cho_solve, LinAlgError from scipy.sparse import issparse from scipy.sparse.linalg import LinearOperator, aslinearoperator EPS = np.finfo(float).eps # Fu...
jlcarmic/producthunt_simulator
venv/lib/python2.7/site-packages/scipy/optimize/_lsq/common.py
Python
mit
20,742
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import sys, os from calibre import prints as prints_, preferred_encoding, isbytestring from calibre.utils.config import Co...
alexston/calibre-webserver
src/calibre/utils/pyconsole/__init__.py
Python
gpl-3.0
1,289
# Copyright (C) 2010, 2011 Sebastian Thiel (byronimo@gmail.com) and contributors # # This module is part of GitDB and is released under # the New BSD License: http://www.opensource.org/licenses/bsd-license.php
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/gitdb/test/__init__.py
Python
agpl-3.0
210
"""The met component.""" from datetime import timedelta import logging from random import randrange import metno from homeassistant.const import ( CONF_ELEVATION, CONF_LATITUDE, CONF_LONGITUDE, EVENT_CORE_CONFIG_UPDATE, LENGTH_FEET, LENGTH_METERS, ) from homeassistant.core import Config, HomeA...
tchellomello/home-assistant
homeassistant/components/met/__init__.py
Python
apache-2.0
4,998
I am a bad file that should not pass compileall.
pelson/conda-build
tests/test-recipes/metadata/_compile-test/f2_bad.py
Python
bsd-3-clause
49
from blur.quickinit import * def tableSizeInMegs(tableName): q = Database.current().exec_('SELECT * FROM table_size_in_megs(?)',[QVariant(tableName)]) if q.next(): return q.value(0) return None def pruneTable(tableName, defaultSizeLimit, orderColumn, rowsPerIteration = 100): maxSize = Config.getInt('assburnerT...
jacksonwilliams/arsenalsuite
python/scripts/db_pruner.py
Python
gpl-2.0
794
"""cascade folder deletes to imapuid Otherwise, since this fk is NOT NULL, deleting a folder which has associated imapuids still existing will cause a database IntegrityError. Only the mail sync engine does such a thing. Nothing else should be deleting folders, hard or soft. This also fixes a problem where if e.g. so...
nylas/sync-engine
migrations/versions/034_cascade_folder_deletes_to_imapuid.py
Python
agpl-3.0
4,899
from coalib.bearlib.aspects import Root, Taste @Root.subaspect class Spelling: """ How words should be written. """ class docs: example = """ 'Tihs si surly som incoreclt speling. `Coala` is always written with a lowercase `c`. """ example_language = 'reStructur...
kartikeys98/coala
coalib/bearlib/aspects/Spelling.py
Python
agpl-3.0
2,014
########################################################################## # # Copyright (c) 2017, Image Engine Design 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: # # * Redistrib...
lucienfostier/gaffer
python/GafferImageUI/MedianUI.py
Python
bsd-3-clause
2,161
#!/usr/bin/env python # # Released under the BSD license. See LICENSE file for details. """ This program basically does face detection an blurs the face out. """ print __doc__ from SimpleCV import Camera, Display, HaarCascade # Initialize the camera cam = Camera() # Create the display to show the image display = Di...
nils-werner/SimpleCV
SimpleCV/examples/detection/facetrack.py
Python
bsd-3-clause
849
import numpy as np from numpy.testing import * from numpy.testing.noseclasses import KnownFailureTest import nose def test_slow(): @dec.slow def slow_func(x,y,z): pass assert_(slow_func.slow) def test_setastest(): @dec.setastest() def f_default(a): pass @dec.setastest(True) ...
lthurlow/Network-Grapher
proj/external/numpy-1.7.0/numpy/testing/tests/test_decorators.py
Python
mit
4,070
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-11 15:33 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('third_party_auth', '0020_cleanup_slug_fields'), ] operations = [ migration...
ahmedaljazzar/edx-platform
common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py
Python
agpl-3.0
1,186
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
Novasoft-India/OperERP-AM-Motors
openerp/addons/base/ir/ir_attachment.py
Python
agpl-3.0
13,948
from ..broker import Broker class IssueDetailBroker(Broker): controller = "issue_details" def show(self, **kwargs): """Shows the details for the specified issue detail. **Inputs** | ``api version min:`` None | ``api version max:`` None | ``required...
infobloxopen/infoblox-netmri
infoblox_netmri/api/broker/v3_8_0/issue_detail_broker.py
Python
apache-2.0
78,423
from django.utils.translation import ugettext_lazy as _ import horizon from horizon.test.test_dashboards.dogs import dashboard class Puppies(horizon.Panel): name = _("Puppies") slug = "puppies" dashboard.Dogs.register(Puppies)
trunglq7/horizon
horizon/test/test_dashboards/dogs/puppies/panel.py
Python
apache-2.0
241
# # 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...
dcristoloveanu/qpid-proton
proton-c/env.py
Python
apache-2.0
2,444
########################################################################## # # Copyright (c) 2010, Image Engine Design 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: # # * Redistribu...
lento/cortex
python/IECoreMaya/VectorParameterUI.py
Python
bsd-3-clause
4,276
#!/usr/bin/python # # Peteris Krumins (peter@catonmat.net) # http://www.catonmat.net -- good coders code, great reuse # # http://www.catonmat.net/blog/python-library-for-google-search/ # # Code is licensed under MIT license. # import re import urllib from htmlentitydefs import name2codepoint from BeautifulSoup impor...
forweipan/fimap
src/xgoogle/search.py
Python
gpl-2.0
7,862
# encoding: 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 field 'XForm.shared_data' db.add_column('odk_logger_xform', 'shared_data', self.gf('django.db.mod...
awemulya/fieldsight-kobocat
onadata/apps/logger/south_migrations/0009_auto__add_field_xform_shared_data.py
Python
bsd-2-clause
6,913
"""Test the california_housing loader, if the data is available, or if specifically requested via environment variable (e.g. for travis cron job).""" import pytest from sklearn.datasets.tests.test_common import check_return_X_y from functools import partial def test_fetch(fetch_california_housing_fxt): data = fe...
glemaitre/scikit-learn
sklearn/datasets/tests/test_california_housing.py
Python
bsd-3-clause
1,370
# -*- coding: utf-8 -*- # Natural Language Toolkit: IBM Model 2 # # Copyright (C) 2001-2013 NLTK Project # Authors: Chin Yee Lee, Hengfeng Li, Ruxin Hou, Calvin Tanujaya Lim # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Lexical translation model that considers word order. IBM Model 2 improv...
sdoran35/hate-to-hugs
venv/lib/python3.6/site-packages/nltk/translate/ibm2.py
Python
mit
12,271
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
BorgERP/borg-erp-6of3
server/openerp/workflow/wkf_expr.py
Python
agpl-3.0
3,130
#!/usr/bin/env python3 #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgp...
nuclear-wizard/moose
modules/tensor_mechanics/doc/tests/yf.py
Python
lgpl-2.1
4,579
# 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...
karllessard/tensorflow
tensorflow/python/platform/resource_loader.py
Python
apache-2.0
4,522
""" Read SAS sas7bdat or xport files. """ from pandas import compat from pandas.io.common import _stringify_path def read_sas(filepath_or_buffer, format=None, index=None, encoding=None, chunksize=None, iterator=False): """ Read SAS files stored as either XPORT or SAS7BDAT format files. Param...
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/io/sas/sasreader.py
Python
apache-2.0
2,558
# Copyright 2015 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 ...
wolverineav/neutron
neutron/db/migration/alembic_migrations/dvr_init_opts.py
Python
apache-2.0
2,619
# -*- coding: utf-8 -*- # # Django documentation build configuration file, created by # sphinx-quickstart on Thu Mar 27 09:06:53 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't picklabl...
kutenai/django
docs/conf.py
Python
bsd-3-clause
12,643
# (c) 2017, Brian Coca # (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 = ''' cache: pickle short_descript...
hryamzik/ansible
lib/ansible/plugins/cache/pickle.py
Python
gpl-3.0
2,016
# -*- coding: utf-8 -*- from openerp import models, fields, api, osv # We just create a new model class mother(models.Model): _name = 'test.inherit.mother' _columns = { # check interoperability of field inheritance with old-style fields 'name': osv.fields.char('Name', required=True), } ...
OpenUpgrade-dev/OpenUpgrade
openerp/addons/test_inherit/models.py
Python
agpl-3.0
2,104
# -*- encoding: utf-8 -*- ############################################################################## # # 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...
odoocn/odoomrp-wip
mrp_product_variants_configurable_timing/models/mrp_production.py
Python
agpl-3.0
1,568
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( parse_duration, fix_xml_ampersands, ) class TNAFlixIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tnaflix\.com/(?P<cat_id>[\w-]+)/(?P<display_id>[\w-]+)/video(?P<id>\d+)' _TITLE_REGEX = r...
marxin/youtube-dl
youtube_dl/extractor/tnaflix.py
Python
unlicense
2,854
#!/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...
haad/ansible-modules-extras
cloud/profitbricks/profitbricks.py
Python
gpl-3.0
21,799
#!/usr/bin/env python # encoding: utf-8 # Ali Sabil, 2007 import os.path, shutil import Task, Runner, Utils, Logs, Build, Node, Options from TaskGen import extension, after, before EXT_VALA = ['.vala', '.gs'] class valac_task(Task.Task): vars = ("VALAC", "VALAC_VERSION", "VALAFLAGS") before = ("cc", "cxx") def ...
mantaraya36/xmms2-mantaraya36
wafadmin/Tools/vala.py
Python
lgpl-2.1
10,297
from django.conf import settings from django.template import loader from django.views.i18n import set_language from xadmin.plugins.utils import get_context_dict from xadmin.sites import site from xadmin.views import BaseAdminPlugin, CommAdminView, BaseAdminView class SetLangNavPlugin(BaseAdminPlugin): def block...
sshwsfc/django-xadmin
xadmin/plugins/language.py
Python
bsd-3-clause
1,002
""" Database models for the badges app """ from importlib import import_module from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from jsonfield import JSONF...
cecep-edu/edx-platform
lms/djangoapps/badges/models.py
Python
agpl-3.0
12,190
import unittest import re import os class ImportLoadLibs(unittest.TestCase): """ Test which libraries are loaded during importing ROOT """ # The whitelist is a list of regex expressions that mark wanted libraries # Note that the regex has to result in an exact match with the library name. kno...
root-mirror/root
bindings/pyroot/pythonizations/test/import_load_libs.py
Python
lgpl-2.1
3,705
# -*- coding: utf-8 -*- # # 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 ...
zodiac/incubator-airflow
tests/api/common/mark_tasks.py
Python
apache-2.0
9,129
# # Copyright 2014 Quantopian, 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 wr...
wilsonkichoi/zipline
zipline/utils/tradingcalendar_bmf.py
Python
apache-2.0
7,576
# Copyright 2016 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...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/tensorflow/models/real_nvp/celeba_formatting.py
Python
bsd-2-clause
3,106
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Point of Sale', 'version': '1.0.1', 'category': 'Point Of Sale', 'sequence': 20, 'summary': 'Touchscreen Interface for Shops', 'description': """ Quick and Easy sale process ===========...
chienlieu2017/it_management
odoo/addons/point_of_sale/__manifest__.py
Python
gpl-3.0
2,501
# sqlalchemy/interfaces.py # Copyright (C) 2007-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # Copyright (C) 2007 Jason Kirtland jek@discorporate.us # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Deprecated core ev...
Drvanon/Game
venv/lib/python3.3/site-packages/sqlalchemy/interfaces.py
Python
apache-2.0
10,918
# mako/ast.py # Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """utilities for analyzing expressions and blocks of Python code, as well as generating Python from AST no...
nwjs/chromium.src
third_party/mako/mako/ast.py
Python
bsd-3-clause
6,789
def f(a, L=<warning descr="Default argument value is mutable">[]</warning>): L.append(a) return L def f(a, L=<warning descr="Default argument value is mutable">list()</warning>): L.append(a) return L def f(a, L=<warning descr="Default argument value is mutable">set()</warning>): L.append(a) r...
smmribeiro/intellij-community
python/testData/inspections/PyDefaultArgumentInspection/test.py
Python
apache-2.0
658
# (c) 2012, Jan-Piet Mens <jpmens(at)gmail.com> # (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 DOCUMENTATION = """ lookup: redis_kv author: Jan-Piet M...
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/plugins/lookup/redis_kv.py
Python
bsd-3-clause
2,846
#!/usr/bin/python # # Copyright (c) 2017 Julien Stroheker, <juliens@microsoft.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/cloud/azure/azure_rm_acs.py
Python
bsd-3-clause
27,547
from __future__ import unicode_literals, division, absolute_import from tests import FlexGetBase class TestSortBy(FlexGetBase): __yaml__ = """ tasks: test1: sort_by: title mock: - {title: 'B C D', url: 'http://localhost/1'} - {title: 'A B C', ...
ratoaq2/Flexget
tests/test_sort_by.py
Python
mit
2,714
"""Meta-estimators for building composite models with transformers In addition to its current contents, this module will eventually be home to refurbished versions of Pipeline and FeatureUnion. """ from ._column_transformer import ColumnTransformer, make_column_transformer from ._target import TransformedTargetRegre...
vortex-ape/scikit-learn
sklearn/compose/__init__.py
Python
bsd-3-clause
431
import json def lambda_handler(event, context): return { 'statusCode': 200, 'body': json.dumps('Hello from Lambda!') }
thaim/ansible
test/integration/targets/s3_bucket_notification/files/mini_lambda.py
Python
mit
145
import wx import sys import os import time import threading import math import pynotify import pygame.mixer sys.path.append(os.getenv("PAPARAZZI_HOME") + "/sw/ext/pprzlink/lib/v1.0/python") from pprzlink.ivy import IvyMessagesInterface WIDTH = 150 HEIGHT = 40 UPDATE_INTERVAL = 250 class RadioWatchFrame(wx.Frame):...
baspijhor/paparazzi
sw/ground_segment/python/dashboard/radiowatchframe.py
Python
gpl-2.0
2,290
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Simon Dodsley (simon@purestorage.com) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1',...
hryamzik/ansible
lib/ansible/modules/storage/purestorage/purefa_volume.py
Python
gpl-3.0
6,827
# Copyright (c) 2015 Red Hat 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 a...
mattt416/neutron
neutron/tests/functional/agent/l3/test_keepalived_state_change.py
Python
apache-2.0
2,853
""" Test Cython optimize zeros API functions: ``bisect``, ``ridder``, ``brenth``, and ``brentq`` in `scipy.optimize.cython_optimize`, by finding the roots of a 3rd order polynomial given a sequence of constant terms, ``a0``, and fixed 1st, 2nd, and 3rd order terms in ``args``. .. math:: f(x, a0, args) = ((args[2...
WarrenWeckesser/scipy
scipy/optimize/tests/test_cython_optimize.py
Python
bsd-3-clause
2,638
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # # 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, eith...
camradal/ansible
lib/ansible/modules/windows/win_file.py
Python
gpl-3.0
2,738
import multiprocessing import os _is_travis = os.environ.get('TRAVIS') == 'true' workers = multiprocessing.cpu_count() if _is_travis: workers = 2 bind = ['0.0.0.0:8080', '0.0.0.0:8081', '0.0.0.0:8082'] keepalive = 120 errorlog = '-' pidfile = '/tmp/api_hour.pid' pythonpath = 'hello' backlog = 10240000
actframework/FrameworkBenchmarks
frameworks/Python/api_hour/yocto_http/etc/hello/api_hour/gunicorn_conf.py
Python
bsd-3-clause
309
from collections import defaultdict from openerp.tools import mute_logger from openerp.tests import common UID = common.ADMIN_USER_ID class TestORM(common.TransactionCase): """ test special behaviors of ORM CRUD functions TODO: use real Exceptions types instead of Exception """ def setUp(self):...
vileopratama/vitech
src/openerp/addons/base/tests/test_orm.py
Python
mit
18,738
from __future__ import unicode_literals from django.utils.functional import cached_property from django.contrib.contenttypes.models import ContentType from wagtail.wagtailcore.blocks import ChooserBlock class SnippetChooserBlock(ChooserBlock): def __init__(self, target_model, **kwargs): super(SnippetChoo...
iho/wagtail
wagtail/wagtailsnippets/blocks.py
Python
bsd-3-clause
637
""" Fantasm: A taskqueue-based Finite State Machine for App Engine Python Docs and examples: http://code.google.com/p/fantasm/ Copyright 2010 VendAsta Technologies 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 ob...
rafasashi/userinfuser
serverside/fantasm/utils.py
Python
gpl-3.0
4,909
"""Views fo the node settings page.""" # -*- coding: utf-8 -*- from flask import request import logging from addons.dropbox.serializer import DropboxSerializer from addons.base import generic_views from website.project.decorators import must_have_addon, must_be_addon_authorizer logger = logging.getLogger(__name__) de...
icereval/osf.io
addons/dropbox/views.py
Python
apache-2.0
1,287
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # # 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...
jalilm/ryu
ryu/tests/unit/packet/test_igmp.py
Python
apache-2.0
34,411
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2011-2015, 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 p...
ywcui1990/nupic
tests/integration/nupic/opf/opf_checkpoint_test/experiments/temporal_multi_step/a_plus_b/description.py
Python
agpl-3.0
2,100
import re from itertools import islice #from geopy import util, units, format import util, units, format class Point(object): """ A geodetic point with latitude, longitude, and altitude. Latitude and longitude are floating point values in degrees. Altitude is a floating point value in kilometers. ...
nck0405/ChennaiEden
modules/geopy/point.py
Python
mit
10,655
#!/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...
j00bar/ansible
lib/ansible/modules/cloud/amazon/elasticache_subnet_group.py
Python
gpl-3.0
5,426
"""i18n_subsites plugin creates i18n-ized subsites of the default site This plugin is designed for Pelican 3.4 and later """ import os import six import logging import posixpath from copy import copy from itertools import chain from operator import attrgetter from collections import OrderedDict from contextlib impo...
tijptjik/thegodsproject
plugins/i18n_subsites/i18n_subsites.py
Python
mit
17,012
__author__ = 'rolandh' RESEARCH_AND_SCHOLARSHIP = "http://refeds.org/category/research-and-scholarship" RELEASE = { "": ["eduPersonTargetedID"], RESEARCH_AND_SCHOLARSHIP: ["eduPersonPrincipalName", "eduPersonScopedAffiliation", "mail", "givenName",...
Runscope/pysaml2
src/saml2/entity_category/refeds.py
Python
bsd-2-clause
345
########################### 1. 導入所需模組 import cherrypy import os ########################### 2. 設定近端與遠端目錄 # 確定程式檔案所在目錄, 在 Windows 有最後的反斜線 _curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) # 設定在雲端與近端的資料儲存目錄 if 'OPENSHIFT_REPO_DIR' in os.environ.keys(): # 表示程式在雲端執行 download_root_dir = os.environ['OP...
2014c2g12/c2g12
wsgi/w2/c2_w2.py
Python
gpl-2.0
9,606
#!/usr/bin/env python ############################################################################ # # Copyright (C) 2012, 2013 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
RickHutten/paparazzi
sw/tools/px4/px_mkfw.py
Python
gpl-2.0
4,811
#!/usr/bin/env python # This simple example shows how to do basic texture mapping. import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Load in the texture map. A texture is any unsigned char image. If it # is not of this type, you will have to map it through a lookup table # or by ...
CMUSV-VisTrails/WorkflowRecommendation
examples/vtk_examples/Rendering/TPlane.py
Python
bsd-3-clause
1,344
"""California housing dataset. The original database is available from StatLib http://lib.stat.cmu.edu/ The data contains 20,640 observations on 9 variables. This dataset contains the average house value as target variable and the following input variables (features): average income, housing average age, averag...
chaluemwut/fbserver
venv/lib/python2.7/site-packages/sklearn/datasets/california_housing.py
Python
apache-2.0
3,825