code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# Generated by Django 2.1.7 on 2019-03-21 07:55 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('activitylog', '0001_initial'), ] operations = [ migrations.AlterField( model_name='uploadedactivity...
DigitalCampus/django-oppia
activitylog/migrations/0002_auto_20190321_0755.py
Python
gpl-3.0
968
# Copyright 2016 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. """ This ensures that each front-end module does not accidentally rely on a module that isn't listed as a transitive dependency in the module.json. How this ...
youtube/cobalt
third_party/devtools/scripts/build/dependency_preprocessor.py
Python
bsd-3-clause
3,349
# -*- coding: UTF-8 -*- #! python3 # noqa E265 """ Isogeo API v1 - Model of Share entity See: http://help.isogeo.com/api/complete/index.html#definition-share """ # ############################################################################# # ########## Libraries ############# # ###########################...
Guts/isogeo-api-py-minsdk
isogeo_pysdk/models/share.py
Python
gpl-3.0
14,698
import a_package_name_that_does_not_exist content = 'Bad Module'
openhatch/new-mini-tasks
vendor/packages/Django/tests/regressiontests/utils/test_module/bad_module.py
Python
apache-2.0
65
# -*- coding: utf-8 -*- import re from module.network.RequestFactory import getURL as get_url from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class OneFichierCom(SimpleHoster): __name__ = "OneFichierCom" __type__ = "hoster" __version__ = "0.90" __status__ = "test...
jansohn/pyload
module/plugins/hoster/OneFichierCom.py
Python
gpl-3.0
4,254
class AvatarUploader(): def upload_avatar(self, file, user): return
bgroff/kala-app
django_kala/django_kala/platforms/test/avatar.py
Python
mit
80
# Copyright 2013-2015 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
Sticklyman1936/workload-automation
wlauto/workloads/geekbench/__init__.py
Python
apache-2.0
17,982
# Copyright Aaron Smith 2009 # # This file is part of Gity. # # Gity 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. # # Gity is dis...
gngrwzrd/gity
python/__nyi/submodulepush.py
Python
gpl-3.0
1,296
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django.utils.timezone import now from rest_framework.serializers import...
akx/shoop
shoop/core/api/orders.py
Python
agpl-3.0
1,561
from setuptools import setup, find_packages, Extension setup( name="whipper", use_scm_version=True, description="a secure cd ripper preferring accuracy over speed", author=['Thomas Vander Stichele', 'The Whipper Team'], maintainer=['The Whipper Team'], url='https://github.com/whipper-team/whipp...
JoeLametta/morituri
setup.py
Python
gpl-3.0
881
# -*- coding: utf-8 -*- # Copyright 2017 KMEE # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import api, models class ResPartnerBank(models.Model): _inherit = 'res.partner.bank' @api.multi @api.constrains('bank_bic') def check_bic_length(self): ''' sobre...
kmee/odoo-brazil-banking
l10n_br_financial_payment_order/models/res_partner_bank.py
Python
agpl-3.0
456
import os import textwrap import unittest from conans.paths import CONANFILE from conans.test.utils.tools import TestClient class UserInfoTest(unittest.TestCase): def test_user_info_propagation(self): client = TestClient() def export_lib(name, requires, infolines): base = textwrap.d...
conan-io/conan
conans/test/integration/conanfile/user_info_test.py
Python
mit
2,873
#common sets up the conduit environment from common import * import conduit.datatypes.Contact as Contact import conduit.utils as Utils import conduit.Exceptions as Exceptions if not is_online(): skip() SAFE_CONTACT_ID="http://www.google.com/m8/feeds/contacts/conduitproject%40gmail.com/base/89c42ac889d80b8" v...
arsfeld/conduit
test/python-tests/TestDataProviderGoogleContacts.py
Python
gpl-2.0
1,509
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('countries_plus', '0004_auto_20150616_1242'), ] operations = [ migrations.AlterField( model_name='country', ...
cordery/django-countries-plus
countries_plus/migrations/0005_auto_20160224_1804.py
Python
mit
452
#pylint: disable=no-init from __future__ import (absolute_import, division, print_function) import mantid.simpleapi as api from mantid.api import * from mantid.kernel import * class NormaliseByThickness(PythonAlgorithm): """ Normalise detector counts by the sample thickness """ def category(self...
wdzhou/mantid
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/NormaliseByThickness.py
Python
gpl-3.0
2,442
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from shoop.admin.base import AdminModule, MenuEntry from django.utils.transl...
lawzou/shoop
shoop/admin/modules/media/__init__.py
Python
agpl-3.0
1,165
import praw from pprint import pprint from prawoauth2 import PrawOAuth2Mini import time from peewee import * from peewee import OperationalError from peewee import DoesNotExist from tokens import app_key, app_secret, access_token, refresh_token from settings import scopes, user_agent, bot_name, bot_password...
tplaskota/TMBR-bot
tmbr.py
Python
mit
14,613
import cgi import HTMLParser import re from htmlentitydefs import name2codepoint def html_quote(v): if v is None: return '' elif hasattr(v, '__html__'): return v.__html__() elif isinstance(v, basestring): return cgi.escape(v, 1) else: if hasattr(v, '__unicode__'): ...
scith/htpc-manager_ynh
sources/libs/formencode/rewritingparser.py
Python
gpl-3.0
5,021
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
Azure/azure-sdk-for-python
sdk/cognitiveservices/azure-cognitiveservices-search-autosuggest/azure/cognitiveservices/search/autosuggest/_auto_suggest_client.py
Python
mit
2,085
# We can not use pytest here, because we run # build_tools/azure/test_pytest_soft_dependency.sh on these # tests to make sure estimator_checks works without pytest. import unittest import sys import warnings import numpy as np import scipy.sparse as sp import joblib from sklearn.base import BaseEstimator, Classifier...
manhhomienbienthuy/scikit-learn
sklearn/utils/tests/test_estimator_checks.py
Python
bsd-3-clause
36,690
# PopGen 1.1 is A Synthetic Population Generator for Advanced # Microsimulation Models of Travel Demand # Copyright (C) 2009, Arizona State University # See PopGen/License # Running IPF on Person and Household data from psuedo_sparse_matrix import generate_index_matrix import time import MySQLdb from math i...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/synthesizer/synthesizer_algorithm/heuristic_algorithm.py
Python
gpl-2.0
3,589
from parsley.decorators import update_widget_attrs # # Hack of parsleyfy decorator: remove hardcoded jquery url. # def parsleyfy(klass): "A decorator to add {prefix}-* attributes to your form.fields" old_init = klass.__init__ def new_init(self, *args, **kwargs): old_init(self, *args, **kwargs) ...
aaee-enscachan/aaee-front
aaee_front/lib/parsley_decorator.py
Python
mit
1,386
""" This is example how to use postgresql DB local settings Rename _local_settings.py to local_settings.py locally change DB_NAME, DB_USER as you wish, enjoy To create DB on ubuntu, login to psql console: sudo -u postgres psql > > CREATE DATABASE let_me_app; > CREATE USER developer WITH PASSWORD '123456'; > GRANT ALL...
oleg-chubin/let_me_play
let_me_play/_local_settings.py
Python
apache-2.0
1,829
from __future__ import absolute_import import unittest from .test_genetree import * from .test_sptree import * from .test_manual_alg import * from .test_modeltest import * def run(): unittest.main() if __name__ == '__main__': run()
jhcepas/ete
ete3/test/test_ete_build/__main__.py
Python
gpl-3.0
243
# -*- coding: utf-8 -*- """ tmdbsimple.discover ~~~~~~~~~~~~~~~~~~~ This module implements the Discover functionality of tmdbsimple. Created by Celia Oakley on 2013-10-31. :copyright: (c) 2013-2022 by Celia Oakley :license: GPLv3, see LICENSE for more details """ from .base import TMDB class Discover(TMDB): "...
celiao/tmdbsimple
tmdbsimple/discover.py
Python
gpl-3.0
13,381
from pathlib import Path import numpy as np from sdhc.SHCPostProc import SHCPostProc from sdhc.sdhc import calculate_sdhc, SdhcResult from sdhc.fc import load_force_constants from tests.utils import np_load RESOURCES_PATH = Path("tests") / "resources" def test_compute_sdhc(): def compute_sdhc(folder: Path, re...
ksaaskil/shc-python-tools
tests/test_sdhc.py
Python
gpl-3.0
3,042
""" RSS/Atom feeds for the bug tracker app. """ from django.core.urlresolvers import reverse_lazy from django.contrib.syndication.views import Feed from django.utils.feedgenerator import Atom1Feed from django.utils.translation import ugettext_lazy as _ from .models import (IssueTicket, IssueComme...
TamiaLab/carnetdumaker
apps/bugtracker/feeds.py
Python
agpl-3.0
6,891
# -*- coding: utf-8 -*- # # twitterauth.py # A controller for OAuth. # # Copyright 2010 Atsushi Shibata # """ A controller for OAuth. $Id: twitterauth.py 649 2010-08-16 07:44:47Z ats $ """ __author__ = 'Atsushi Shibata <shibata@webcore.co.jp>' __docformat__ = 'plaintext' __licence__ = 'MIT' from google.appengine.ap...
Letractively/aha-gae
plugins/aha.plugin.twitteroauth/twitteroauth/twitteroauth.py
Python
bsd-3-clause
3,952
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Simple demonstration of the plane geometry. """ import sys from vispy import scene, geometry canvas = scene.SceneCanvas(keys='interactive', size=(800, 600), show=True) ...
sbtlaarzc/vispy
examples/basics/visuals/plane.py
Python
bsd-3-clause
1,092
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import six from django.conf import settings from django.db.models ...
shoopio/shoop
shuup/admin/modules/contacts/__init__.py
Python
agpl-3.0
4,558
from django.conf.urls import patterns, url urlpatterns = patterns( 'tiempo.contrib.django.views', url(r'^$', 'dashboard', name='tiempo_dashboard'), url(r'^all_tasks/$', 'all_tasks', name='all_tiempo_tasks'), url(r'^recent/$', 'recent_tasks', name='recent_tasks'), url(r'^results/(?P<key>.+)', 'resul...
jmgamboa/tiempo
tiempo/contrib/django/urls.py
Python
gpl-2.0
348
# # Copyright 2015 Naver Corp. # # 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...
cl9200/nbase-arc
smr/test/integrated/Cm.py
Python
apache-2.0
1,132
# -*- coding: UTF-8 -*- # TcosMonitor version __VERSION__ # # Copyright (c) 2006-2011 Mario Izquierdo <mariodebian@gmail.com> # # This package 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 ...
mariodebian/tcosmonitor
tcosmonitor/TcosCommon.py
Python
gpl-2.0
12,958
""" End to end test of video timelines. """ import datetime import logging from edx.analytics.tasks.tests.acceptance import AcceptanceTestCase log = logging.getLogger(__name__) class VideoAcceptanceTest(AcceptanceTestCase): """End to end test of video timelines.""" INPUT_FILE = 'video_timeline.log' ...
sssllliang/edx-analytics-pipeline
edx/analytics/tasks/tests/acceptance/test_video.py
Python
agpl-3.0
3,564
#!/usr/bin/python # -*- encoding: utf-8 -*- ############################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (http://www.vauxoo.com). # All Rights Reserved ############# Credits ########################...
3dfxsoftware/cbss-addons
pos_delivery_restaurant/model/point_of_sale.py
Python
gpl-2.0
1,908
"""helloworld URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-ba...
tansuo1989/mydemo
python/helloworld/helloworld/urls.py
Python
mit
1,551
import os import sys sys.path.insert(0, os.path.realpath(os.path.join(__file__, '../../'))) for p in os.environ.get('PYTHONPATH', '').split(';'): sys.path.append(p) from asserts import * from ckstyle.entity.Rule import Rule from ckstyle.entity.RuleSet import RuleSet from ckstyle.entity.StyleSheet import StyleShe...
wangjeaf/CSSCheckStyle
tests/unit/entity/helper.py
Python
bsd-3-clause
380
"""Utility meter from sensors providing raw data.""" from datetime import date, timedelta from decimal import Decimal, DecimalException import logging import voluptuous as vol from homeassistant.const import ( ATTR_UNIT_OF_MEASUREMENT, CONF_NAME, EVENT_HOMEASSISTANT_START, STATE_UNAVAILABLE, STATE...
nkgilley/home-assistant
homeassistant/components/utility_meter/sensor.py
Python
apache-2.0
10,345
# Base classes for the graphical user interface. # # Copyright (C) 2011-2012 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # T...
itoed/anaconda
pyanaconda/ui/gui/__init__.py
Python
gpl-2.0
36,233
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-04 04:58 from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djangocms_text_ckeditor', '0002_remove_related_name_for_cmsp...
yakky/djangocms-text-ckeditor
djangocms_text_ckeditor/migrations/0003_set_related_name_for_cmsplugin_ptr.py
Python
bsd-3-clause
675
#cap_openni2.cpp usa status = device.open(filename); #cap_openni.cpp : status = context.OpenFileRecording( filename, productionNode ); import numpy as np import cv2,sys import cv2.cv as cv cap = cv2.VideoCapture(sys.argv[1]) if True: print("Depth generator output mode:") print("FRAME_WIDTH " + str(cap.get...
eruffaldi/pyoni
test.py
Python
mit
1,237
from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ # Examples: # url(r'^$', 'bikino_server.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), ]
bikino-bikini/bikino-serveur
bikino_server/urls.py
Python
apache-2.0
261
from pycparser import c_parser, c_ast class _TreeCutter(c_ast.NodeVisitor): """ Local node visitor for c abstract syntax trees. :ivar accum: (dict) Information on variables, functions, and structs accumulated from an abstract syntax tree. :ivar cache: (dict or None) Information stored about p...
earwig/bitshift
bitshift/parser/c.py
Python
mit
2,997
#!/usr/bin/env python # -*- coding: UTF-8 -*- #----------------------------------------------------------------------------- """sbdstore test case.""" __author__ = ('Lance Finn Helsten',) __version__ = '0.7.4' __copyright__ = """Copyright (C) 2014 Lance Helsten""" __docformat__ = "reStructuredText en" import sys impor...
lanhel/ftpysetup
test/runtestTestSuite/test_User.py
Python
apache-2.0
2,998
# -*- coding: utf-8 -*- # This file is part of the OpenSYMORO project. Please see # https://github.com/symoro/symoro/blob/master/LICENCE for the licence. """Perform file management operations for the SYMORO package.""" import os SYMORO_ROBOTS_FOLDER = "symoro-robots" def get_base_path(base_folder=SYMORO_ROBOT...
ELZo3/symoro
symoroutils/filemgr.py
Python
mit
2,549
# Copyright 2018 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/tpu
models/hyperparameters/flags_to_params.py
Python
apache-2.0
2,887
from pyclbr import Class from telebot.storage.base_storage import StateStorageBase, StateContext import json redis_installed = True try: from redis import Redis, ConnectionPool except: redis_installed = False class StateRedisStorage(StateStorageBase): """ This class is for Redis storage. This wil...
eternnoir/pyTelegramBotAPI
telebot/storage/redis_storage.py
Python
gpl-2.0
5,509
# -*- coding: utf-8 -*- # Copyright 2017 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import retur_pajak_masukan
open-synergy/opnsynid-l10n-indonesia
l10n_id_taxform_retur_pajak_masukan/models/__init__.py
Python
agpl-3.0
162
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # 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...
googleapis/python-service-usage
samples/generated_samples/serviceusage_v1_generated_service_usage_list_services_async.py
Python
apache-2.0
1,497
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011-2015 EDF SA # Contact: # CCN - HPC <dsp-cspit-ccn-hpc@edf.fr> # 1, Avenue du General de Gaulle # 92140 Clamart # # Authors: CCN - HPC <dsp-cspit-ccn-hpc@edf.fr> # # This file is part of HPCStats. # # HPCStats is free software: you ca...
edf-hpc/hpcstats
HPCStats/Tests/tests_UserImporterLdap.py
Python
gpl-2.0
15,058
# -*- coding: utf-8 -*- """Queue management implementation for Plaso. This file contains an implementation of a queue used by plaso for queue management. The queue has been abstracted in order to provide support for different implementations of the queueing mechanism, to support multi processing and scalability. """ ...
rgayon/plaso
plaso/engine/plaso_queue.py
Python
apache-2.0
1,383
import django.dispatch cache_read = django.dispatch.Signal(providing_args=["func", "hit"])
Tapo4ek/django-cacheops
cacheops/signals.py
Python
bsd-3-clause
92
from fabric.api import local def push(): local("git add --all") local("git commit -m 'update'") local("git push origin master")
fandi-peng/Nebula
fabfile.py
Python
mit
141
import os import shutil from django.db import transaction from django.utils import timezone from WhatManager2 import manage_torrent, settings from WhatManager2.settings import SYNC_SYNCS_FILES from home.models import WhatTorrent, DownloadLocation, TransTorrent, LogEntry, ReplicaSet, \ WhatFulltext, get_what_clien...
MADindustries/WhatManager2
WhatManager2/trans_sync.py
Python
mit
5,084
# Backport of the match_hostname logic from python 3.5, with small # changes to support IP address matching on python 2.6, 2.7, 3.3, and 3.4. import re import sys try: # Python 3.3+, or the ipaddress module from pypi. from ipaddress import ip_address except ImportError: ip_address = lambda address: None ...
tstieven/amiunique
website/venv/lib/python2.7/site-packages/pymongo/ssl_match_hostname.py
Python
mit
4,688
''' Given input of a file, reg.py returns the most commmonly used word. BASIC USAGE: python reg.py FILE FULL USAGE: python reg.py [-h] [-v VERBOSE ] FILE VERBOSE will allow the user to find the most commmonly used words up to the limit of all unique words. ''' import argparse import re import operator def uniqueWords...
zzeleznick/zzeleznick.github.io
python-practice/reg.py
Python
mit
3,211
#!/usr/bin/python # (c) 2016, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/storage/netapp/netapp_e_snapshot_volume.py
Python
bsd-3-clause
9,992
''' Copyright (C) 2017 The Board of Trustees of the Leland Stanford Junior University. Copyright (C) 2016-2017 Vanessa Sochat. 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...
singularityware/singularity-python
singularity/analysis/utils.py
Python
agpl-3.0
2,428
## begin license ## # # Meresco RDF contains components to handle RDF data. # # Copyright (C) 2011-2013, 2015 Seecr (Seek You Too B.V.) http://seecr.nl # Copyright (C) 2015 Stichting Kennisnet http://www.kennisnet.nl # # This file is part of "Meresco RDF" # # "Meresco RDF" is free software; you can redistribute it and/...
seecr/meresco-rdf
meresco/rdf/bnode.py
Python
gpl-2.0
1,571
#pylint: disable=I0011,W0613,W0201,W0212,E1101,E1103 from ....core import Hub from ....core.data_collection import DataCollection from ..histogram_widget import HistogramWidget from ..scatter_widget import ScatterWidget from ..image_widget import ImageWidget import pytest from mock import MagicMock ALL_WIDGETS = [Hi...
glue-viz/glue-qt
glue/qt/widgets/tests/test_data_viewer.py
Python
bsd-3-clause
735
# -*- coding:utf8 -*- import pygame, sys import collections #classe modélisant les Cartes Pieces class Room: # wall directions NORTH = 0 WEST = 1 SOUTH = 2 EAST = 3 # possible walls: WALL = 1 OPEN = 2 CLOSED_DOOR = 3 OPENED_DOOR = 4 # room types EMPTY = "Vi...
Bramas/OpenPS
openps/room.py
Python
gpl-3.0
2,795
# script constants __plugin__ = "JDownloader" __addonID__ = "plugin.program.jdownloader" __author__ = "Ppic & pgoeri" __url__ = "http://pgoeri-xbmc-plugins.googlecode.com" __svn_url__ = "http://pgoeri-xbmc-plugins.googlecode.com/svn/trunk/plugin.program.jdownloader/" __credits__ = "Team XBMC passion, http:...
noba3/KoTos
addons/plugin.program.jdownloader/default.py
Python
gpl-2.0
9,746
""" Contains the base Client class for accessing Swift services. """ """ Copyright 2011-2013 Gregory Holt 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-...
gholt/swiftly
swiftly/client/client.py
Python
apache-2.0
31,104
# # 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...
practice-vishnoi/dev-spark-1
python/pyspark/ml/tests.py
Python
apache-2.0
12,684
#!/usr/bin/env python """ main.py -- Udacity conference server-side Python App Engine HTTP controller handlers for memcache & task queue access $Id$ created by wesc on 2014 may 24 """ __author__ = 'wesc+api@google.com (Wesley Chun)' import webapp2 from google.appengine.api import app_identity from google.appe...
yamrock/confcentral
main.py
Python
apache-2.0
1,700
import unittest from mock import Mock from taskqueue.workitem import Workitem, BasicWorkitem, RuoteWorkitem, \ get_workitem from taskqueue.workitem import BasicWorkitemError, RuoteWorkitemError, \ WorkitemError class TestModule(unittest.TestCase): de...
rojkov/taskqueue
tests/test_workitem.py
Python
gpl-2.0
4,367
#!/usr/bin/env python # =================================== # Copyright (c) Microsoft Corporation. All rights reserved. # See license.txt for license information. # =================================== import socket import os import sys import imp import md5 import sha import codecs import base64 import platform import...
MSFTOSSMgmt/WPSDSCLinux
Providers/Scripts/2.4x-2.5x/Scripts/nxOMSAgentNPMConfig.py
Python
mit
15,607
# 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 'Source.enable_robot_classifier' db.add_column('images_source', 'enable_robot_classifier', ...
DevangS/CoralNet
images/migrations/0026_auto__add_field_source_enable_robot_classifier.py
Python
bsd-2-clause
15,905
from __future__ import unicode_literals from django.apps import AppConfig class CheckoutConfig(AppConfig): name = 'checkout'
EvanHahn/braintree-web-issue-120
mysite/checkout/apps.py
Python
unlicense
132
# Copyright 2018 Datawire. 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 agr...
datawire/ambassador
python/ambassador/envoy/v3/v3_static_resources.py
Python
apache-2.0
1,136
################################################################################ # Copyright (C) 2015 Surfacingx # # # # This Program is free software; you can redistribute it and/or modify ...
repotvsupertuga/tvsupertuga.repository
script.module.projectx.wizard/resources/libs/downloader.py
Python
gpl-2.0
3,248
# # # 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 (ht...
ULHPC/modules
easybuild/easybuild-framework/easybuild/framework/easyblock.py
Python
mit
91,374
""" Exceptions raised by ``django-projector``. All internal error classes should extend from one of those exceptions. :error:`ProjectorError` should always be *top-level* exception class. """ class ProjectorError(Exception): """ Main ``django-projector`` exception. """ pass class ConfigAlreadyExist(...
lukaszb/django-projector
projector/core/exceptions.py
Python
bsd-3-clause
390
from setuptools import find_packages from setuptools import setup setup( name="plcd", version="0.1.0", provides=["plcd"], author="gatoatigrado", author_email="gatoatigrado@gmail.com", url="https://github.com/gatoatigrado/plcd", description=( 'This is a python library for facilitati...
gatoatigrado/plcd
setup.py
Python
apache-2.0
1,251
# -*- coding: utf-8 -*- # Generated by Django 1.10.dev20160107235441 on 2016-08-14 06:35 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ ...
yayoiukai/signalserver
groups/migrations/0001_initial.py
Python
mit
1,330
# protobuf_parser.py # # simple parser for parsing protobuf .proto files # # Copyright 2010, Paul McGuire # from pyparsingOD import (Word, alphas, alphanums, Regex, Suppress, Forward, Group, oneOf, ZeroOrMore, Optional, delimitedList, Keyword, restOfLine, quotedString) ident = Word(alphas+"_",alp...
schlichtanders/pyparsing-2.0.3-OrderedDict
examples/protobuf_parser.py
Python
mit
3,567
# encoding: utf-8 # module _dbus_bindings # from /usr/lib/python2.7/dist-packages/_dbus_bindings.so # by generator 1.130 """ Low-level Python bindings for libdbus. Don't use this module directly - the public API is provided by the `dbus`, `dbus.service`, `dbus.mainloop` and `dbus.mainloop.glib` modules, with a lower-le...
akiokio/centralfitestoque
src/.pycharm_helpers/python_stubs/-1807332816/_dbus_bindings.py
Python
bsd-2-clause
64,690
from core.himesis import Himesis import uuid class HRootRule(Himesis): def __init__(self): """ Creates the himesis graph representing the DSLTrans rule RootRule. """ # Flag this instance as compiled now self.is_compiled = True super(HRootRule, sel...
levilucio/SyVOLT
ATLTrans/w_equations/HRootRule.py
Python
mit
2,182
import re import time from datetime import datetime from django.conf import settings from boto.s3.connection import S3Connection from boto.s3.key import Key from boto.s3.bucket import Bucket from copy import deepcopy import os def upload_data_to_s3(file_obj, filename): file_obj.seek(0) if settings.AWS_ACCESS_K...
VikParuchuri/movide
api/uploads.py
Python
agpl-3.0
2,947
__author__ = 'bspeakmon@atlassian.com' from .version import __version__
blackspiraldev/jira-python
jira/__init__.py
Python
bsd-2-clause
73
#!/usr/bin/env python import zmq ZMQSOCKET="tcp://127.0.0.1:6660" def main(): context = zmq.Context() socket = context.socket(zmq.PUB) socket.connect(ZMQSOCKET) print "sending message" socket.send("radius") if __name__ == "__main__": main()
cmek/radiusdev-web
services/test_client.py
Python
bsd-2-clause
270
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017 David Gunter <david.gunter@tivix.com> # Copyright (c) 2017 Chris Hoffman <christopher.hoffman@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function _...
roadmapper/ansible
lib/ansible/modules/packaging/language/yarn.py
Python
gpl-3.0
11,924
from proboscis import * class BeforeAndAfter(object): def getName(self): return str(type(self)) def println(self, msg): print("%s : %s" % (self.getName(), msg)) class BeforeAndAfterSuccess(BeforeAndAfter): @before_class def beforeEverything(self): self.println("@BeforeClass...
rackerlabs/python-proboscis
tests/compatability/testng/before_and_after/src/python/BeforeAndAfter.py
Python
apache-2.0
701
#!/usr/bin/env python # rFactor Remote LCD # Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com> # # 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 ...
Grumbel/rfactorlcd
rfactorlcd-client.py
Python
gpl-3.0
6,724
from flask_restful import Resource, Api from flask_restful_swagger import swagger from flauthority import app from flauthority import api, app, celery, auth from ModelClasses import AnsibleCommandModel, AnsiblePlaybookModel, AnsibleExtraArgsModel import celery_runner class TaskOutput(Resource): @swag...
trondhindenes/Flauthority
flauthority/api_task_output.py
Python
mit
1,589
""" The framework for making database tests. """ import sys import os import re from py.test import raises import py import sqlobject import sqlobject.conftest as conftest if sys.platform[:3] == "win": def getcwd(): return os.getcwd().replace(':', '|') else: getcwd = os.getcwd """ supportsMatrix defi...
bieschke/nuffle
lib/python/sqlobject/tests/dbtest.py
Python
gpl-2.0
8,675
""""[cgm-tools] Data handling utilities.""" ###################################################################### # Copyright (C) 2017 Samuele Fiorini, Chiara Martini, Annalisa Barla # # GPL-3.0 License ###################################################################### import datetime import numpy as np import pa...
samuelefiorini/cgm-tools
cgmtools/utils.py
Python
gpl-3.0
3,715
from __future__ import print_function #### DOCUMENTATION GENERATOR ########################################################################## # Keeps the offline documention in synch with the online documentation. # Simply run "python update.py" to generate the latest version. import os, sys; sys.path.insert(0, os.pat...
shubhangiKishore/pattern
docs/update.py
Python
bsd-3-clause
5,140
# proxy module from traitsui.qt4.set_editor import *
enthought/etsproxy
enthought/traits/ui/qt4/set_editor.py
Python
bsd-3-clause
53
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import report_picking_batch
Gebesa-Dev/Addons-gebesa
stock_picking_batch/report/__init__.py
Python
agpl-3.0
155
# Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
wfxiang08/Nuitka
tests/syntax/FutureUnknown.py
Python
apache-2.0
805
############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensees holding valid commercial ...
qtproject/pyside-pyside
tests/QtUiTools/bug_909.py
Python
lgpl-2.1
1,908
# -*- coding: utf-8 -*- """ :copyright: Copyright 2013-2014 by Łukasz Mierzwa :contact: l.mierzwa@gmail.com """ class InvalidConfiguration(Exception): """ Raised if upaas-builder configuration is invalid. """ pass class BuildError(Exception): """ General class for catching any build ...
prymitive/upaas-common
upaas/builder/exceptions.py
Python
gpl-3.0
890
import sqlalchemy as sa from sqlalchemy.dialects.postgresql import JSONB from .expressions import jsonb_change_key_name def get_activity_table(schema=None): return sa.Table( 'activity', sa.MetaData(), sa.Column('id', sa.Integer, primary_key=True), sa.Column('table_name', sa.String...
kvesteri/postgresql-audit
postgresql_audit/migrations.py
Python
bsd-2-clause
8,738
__author__ = "David Rusk <drusk@uvic.ca>"
CFIS-Octarine/octarine
validate/gui/views/__init__.py
Python
gpl-3.0
42
# Copyright (c) 2014 Hoang Do, Phuc Vo, P. Michiardi, D. Venzano # # 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...
tellesnobrega/storm_plugin
sahara/plugins/spark/scaling.py
Python
apache-2.0
3,981
from django import forms from django.forms.widgets import HiddenInput from crits.campaigns.campaign import Campaign from crits.core.forms import add_bucketlist_to_form, add_ticket_to_form, SourceInForm from crits.core.handlers import get_item_names from crits.core import form_consts from crits.vocabulary.relationshi...
Magicked/crits
crits/campaigns/forms.py
Python
mit
2,989
# Copyright (c) 2014 Rackspace, 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...
rackerlabs/finding_dory
setup.py
Python
apache-2.0
1,393
# coding: utf-8 # # Copyright 2021 The Oppia 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 requi...
brianrodri/oppia
core/jobs/types/topic_validation_errors.py
Python
apache-2.0
1,155
from collections import OrderedDict import logging LOG = logging.getLogger(__name__) class Dispatcher(object): def __init__(self, mount=None): self._endpoints = OrderedDict() self.mount = mount def add_endpoint(self, nickname, endpoint): if self.mount: endpoint = self.moun...
BillArnold/barnoldjg
jumpgate/common/dispatcher.py
Python
mit
1,767