repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
srvg/ansible
lib/ansible/template/template.py
42
1631
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
beni55/gunicorn
examples/frameworks/django/testing/testing/wsgi.py
40
1359
""" WSGI config for testing project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` ...
mit
pixunil/Cinnamon
files/usr/share/cinnamon/cinnamon-settings/modules/cs_accessibility.py
3
20975
#!/usr/bin/env python2 import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk, CDesktopEnums from GSettingsWidgets import * DPI_FACTOR_LARGE = 1.25 DPI_FACTOR_NORMAL = 1.0 HIGH_CONTRAST_THEME = "HighContrast" KEY_TEXT_SCALING_FACTOR = "text-scaling-factor" KEY_GTK_THEME ...
gpl-2.0
The-Compiler/pytest
src/_pytest/cacheprovider.py
1
19650
"""Implementation of the cache provider.""" # This plugin was not named "cache" to avoid conflicts with the external # pytest-cache version. import json import os from typing import Dict from typing import Generator from typing import Iterable from typing import List from typing import Optional from typing import Set f...
mit
eloquence/unisubs
apps/widget/migrations/0003_fix_thumb_options.py
4
25218
# 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): pass def backwards(self, orm): pass models = { 'accountlinker.thirdpartyacc...
agpl-3.0
exercism/python
exercises/practice/isbn-verifier/isbn_verifier_test.py
1
1998
import unittest from isbn_verifier import ( is_valid, ) # Tests adapted from `problem-specifications//canonical-data.json` class IsbnVerifierTest(unittest.TestCase): def test_valid_isbn(self): self.assertIs(is_valid("3-598-21508-8"), True) def test_invalid_isbn_check_digit(self): self.a...
mit
Javier-Acosta/meran
dev-plugins/node64/lib/node/wafadmin/ansiterm.py
4
8364
# Meran - MERAN UNLP is a ILS (Integrated Library System) wich provides Catalog, # Circulation and User's Management. It's written in Perl, and uses Apache2 # Web-Server, MySQL database and Sphinx 2 indexing. # Copyright (C) 2009-2013 Grupo de desarrollo de Meran CeSPI-UNLP # # This file is part of Meran. # # Meran is...
gpl-3.0
JukkaL/typeshed
tests/mypy_test_suite.py
6
1151
#!/usr/bin/env python3 """Script to run mypy's test suite against this version of typeshed.""" import shutil import subprocess import sys import tempfile from pathlib import Path if __name__ == "__main__": with tempfile.TemporaryDirectory() as tempdir: dirpath = Path(tempdir) subprocess.run(["git"...
apache-2.0
khkaminska/scikit-learn
sklearn/utils/tests/test_extmath.py
70
16531
# Authors: Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Denis Engemann <d.engemann@fz-juelich.de> # # License: BSD 3 clause import numpy as np from scipy import sparse from scipy import linalg from scipy import stats from sklearn.utils.testing import assert_eq...
bsd-3-clause
ccastell/Transfer-System
Website/env/lib/python3.5/site-packages/django/contrib/admin/migrations/0001_initial.py
419
1958
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.admin.models from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('conten...
apache-2.0
simbs/edx-platform
common/djangoapps/course_action_state/migrations/0001_initial.py
50
1808
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings import xmodule_django.models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_US...
agpl-3.0
luci/luci-py
appengine/auth_service/gcs_test.py
2
6388
#!/usr/bin/env vpython # Copyright 2019 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import logging import sys import unittest import test_env test_env.setup_test_env() from test_support import test_case f...
apache-2.0
Tehnix/slight
daemon.py
1
4491
#!/usr/bin/env python """ Credit goes to Sander Michaels for this script. http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ """ import sys import os import time import atexit from signal import SIGTERM from abc import abstractmethod class Daemon: """ A generic daemon class. ...
bsd-3-clause
flattermann/TCE-Relay
server/prices.py
1
3984
from flask import Blueprint, request, jsonify import peewee from peewee import * import timeit import zlib import json from datetime import datetime, timedelta import time import config prices = Blueprint('prices', __name__) db = MySQLDatabase(config.mysql["db"], user=config.mysql["user"], passwd=config.mysql["pw"]) m...
gpl-3.0
uvchik/Open_eQuarterPy
Open_eQuarterPy/stat_corr/rb_contemporary_buiding_cube_uvalue_by_building_age_lookup.py
2
2499
# coding: utf8 # OeQ autogenerated lookup function for 'Contemporary Average U-Value of a 1mx1mx1m-Cube in correlation to year of construction, based on the source data of the survey for the "German Building Typology developed by the "Institut für Wohnen und Umwelt", Darmstadt/Germany, 2011-2013' import math import nu...
gpl-3.0
sevein/archivematica
src/MCPClient/lib/clientScripts/manualNormalizationRemoveMNDirectories.py
1
2759
#!/usr/bin/env python2 # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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, ...
agpl-3.0
google-research/tf-slim
tf_slim/layers/regularizers_test.py
1
7065
# coding=utf-8 # 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 requ...
apache-2.0
leafclick/intellij-community
python/helpers/py2only/docutils/parsers/rst/directives/body.py
128
9243
# $Id: body.py 7267 2011-12-20 14:14:21Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Directives for additional body elements. See `docutils.parsers.rst.directives` for API details. """ __docformat__ = 'reStructuredText' import sys from doc...
apache-2.0
taotie12010/bigfour
cms/tests/test_startup.py
154
1524
""" Test cms startup """ from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from mock import patch from cms.startup import run, enable_theme class StartupTestCase(TestCase): """ Test cms startup """ def setUp(self): super(Start...
agpl-3.0
deanishe/alfred-fakeum
src/libs/faker/providers/phone_number/fa_IR/__init__.py
2
2168
from __future__ import unicode_literals from .. import Provider as PhoneNumberProvider class Provider(PhoneNumberProvider): formats = ( # Mobile '+98 91# ### ####', '091# ### ####', '+98 920 ### ####', '0920 ### ####', '+98 921 ### ####', '0921 ### ####', ...
mit
kdart/pycopia
audio/pycopia/audio/vimplayer.py
2
4986
#!/usr/bin/python # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab """ Interface to alsaplayer from Vim! This module is meant to be used by vim's embedded python interpreter. """ import sys, os import atexit from pycopia import timelib from pycopia.audio import alsacontrol from pycopia.audio import alsaplayer try...
apache-2.0
wfxiang08/Nuitka
nuitka/tree/Operations.py
2
1702
# Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
apache-2.0
ApplauseOSS/djangoevents
djangoevents/schema.py
1
3437
""" Aggregate event avro schema validation """ import avro.schema import itertools import os import stringcase from avro.io import Validate as avro_validate from .settings import get_avro_dir from .utils import list_concrete_aggregates from .utils import list_aggregate_events from .utils import event_to_json from .ex...
mit
emrah-b/ocl_web
ocl_web/libs/ocl/constants.py
4
14328
""" OCL Resource Constants """ class OclConstants(object): """ OCL Resource Constants """ # Resource types RESOURCE_ID_USER = 0 RESOURCE_ID_ORG = 1 RESOURCE_ID_SOURCE = 2 RESOURCE_ID_CONCEPT = 3 RESOURCE_ID_COLLECTION = 4 RESOURCE_ID_MAPPING = 5 RESOURCE_ID_SOURCE_VERSION =...
mpl-2.0
gem/oq-hazardlib
openquake/hazardlib/tests/gsim/edwards_faeh_2013_alpine_test.py
1
3575
# The Hazard Library # Copyright (C) 2012-2017 GEM Foundation # # 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 version. #...
agpl-3.0
mementum/httxlib
httxlib/version.py
1
1037
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
gpl-3.0
blighj/django
tests/template_tests/syntax_tests/test_firstof.py
177
3215
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class FirstOfTagTests(SimpleTestCase): @setup({'firstof01': '{% firstof a b c %}'}) def test_firstof01(self): output = self.engine.render_to_string('firstof01', {'a': 0, 'c': 0, 'b': 0}) ...
bsd-3-clause
dvspirito/pymeasure
pymeasure/instruments/yokogawa/yokogawa7651.py
2
9126
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2017 PyMeasure Developers # # 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 limit...
mit
DrSpaceMonkey/script.pseudotv.live
resources/lib/couchpotato.py
1
1952
# # Copyright (C) 2013 Tommy Winther # http://tommy.winther.nu # # 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, or (at your option) # any later version. # # Thi...
gpl-3.0
appsembler/edx-platform
cms/djangoapps/api/v1/views/course_runs.py
15
3822
from django.conf import settings from django.http import Http404 from edx_rest_framework_extensions.authentication import JwtAuthentication from opaque_keys.edx.keys import CourseKey from rest_framework import parsers, permissions, status, viewsets from rest_framework.authentication import SessionAuthentication from re...
agpl-3.0
dohamann/paparazzi
sw/airborne/test/math/compare_utm_enu.py
77
2714
#!/usr/bin/env python from __future__ import division, print_function, absolute_import import sys import os PPRZ_SRC = os.getenv("PAPARAZZI_SRC", "../../../..") sys.path.append(PPRZ_SRC + "/sw/lib/python") from pprz_math.geodetic import * from pprz_math.algebra import DoubleRMat, DoubleEulers, DoubleVect3 from math ...
gpl-2.0
lnielsen/invenio
invenio/legacy/bibrank/citation_searcher.py
3
11622
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version ...
gpl-2.0
gaddman/ansible
lib/ansible/modules/network/meraki/meraki_config_template.py
28
10493
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net> # 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 = { ...
gpl-3.0
azverkan/scons
test/VariantDir/CPPPATH-subdir.py
5
2144
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, merge, publish, ...
mit
papados/ordersys
Lib/_weakrefset.py
135
6389
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from _weakref import ref __all__ = ['WeakSet'] class _IterationGuard(object): # This context manager registers itself in the current iterators of the # weak containe...
unlicense
pcostell/apitools
apitools/base/py/list_pager.py
3
3419
#!/usr/bin/env python # # Copyright 2015 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...
apache-2.0
agoravoting/agora-ciudadana
agora_site/accounts/urls.py
2
6328
# Copyright (C) 2012 Eduardo Robles Elvira <edulix AT wadobo DOT com> # # 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 ve...
agpl-3.0
scotthartbti/android_external_chromium_org
native_client_sdk/src/build_tools/tests/easy_template_test.py
60
3235
#!/usr/bin/env python # Copyright (c) 2012 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 cStringIO import difflib import os import sys import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) BUILD...
bsd-3-clause
soldag/home-assistant
homeassistant/components/devolo_home_control/config_flow.py
5
2935
"""Config flow to configure the devolo home control integration.""" import logging from devolo_home_control_api.mydevolo import Mydevolo import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.core import callback from .const i...
apache-2.0
tta/gnuradio-tta
gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py
11
3042
#!/usr/bin/env python # # Copyright 2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at you...
gpl-3.0
kogotko/carburetor
openstack_dashboard/dashboards/project/instances/tabs.py
3
4141
# 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...
apache-2.0
RAtechntukan/CouchPotatoServer
libs/dateutil/parser.py
103
33736
# -*- coding:iso-8859-1 -*- """ Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard Python datetime module. """ from __future__ import unicode_literals __license__ = "Simplified BSD" import datetime import string import time import collections try: from...
gpl-3.0
mrquim/repository.mrquim
repo/script.module.unidecode/lib/unidecode/x07f.py
252
4664
data = ( 'Zhui ', # 0x00 'Zi ', # 0x01 'Ke ', # 0x02 'Xiang ', # 0x03 'Jian ', # 0x04 'Mian ', # 0x05 'Lan ', # 0x06 'Ti ', # 0x07 'Miao ', # 0x08 'Qi ', # 0x09 'Yun ', # 0x0a 'Hui ', # 0x0b 'Si ', # 0x0c 'Duo ', # 0x0d 'Duan ', # 0x0e 'Bian ', # 0x0f 'Xian ', # 0x10 '...
gpl-2.0
freeflightsim/fg-flying-club
google_appengine/google/appengine/api/queueinfo.py
2
6271
#!/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...
gpl-2.0
gwforg/gwf
tests/backends/test_logmanager.py
2
1790
import pytest from gwf import Target from gwf.backends.exceptions import LogError from gwf.backends.logmanager import FileLogManager @pytest.fixture def log_manager(tmpdir): with tmpdir.as_cwd(): yield FileLogManager() def test_file_log_manager_creates_logs_dir(log_manager, tmpdir): assert tmpdir.j...
gpl-3.0
pridemusvaire/youtube-dl
youtube_dl/extractor/tv2.py
113
4640
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, int_or_none, float_or_none, parse_iso8601, remove_end, ) class TV2IE(InfoExtractor): _VALID_URL = 'http://(?:www\.)?tv2\.no/v/(?P<id>\d+)' _TEST = { ...
unlicense
ingadhoc/odoo
addons/knowledge/res_config.py
378
1436
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
rajat1994/scikit-learn
examples/cluster/plot_mean_shift.py
351
1793
""" ============================================= A demo of the mean-shift clustering algorithm ============================================= Reference: Dorin Comaniciu and Peter Meer, "Mean Shift: A robust approach toward feature space analysis". IEEE Transactions on Pattern Analysis and Machine Intelligence. 2002. ...
bsd-3-clause
mw46d/ardupilot
Tools/mavproxy_modules/lib/magcal_graph_ui.py
108
8248
# Copyright (C) 2016 Intel Corporation. All rights reserved. # # This file 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 fi...
gpl-3.0
mclaughlin6464/pearce
bin/mcmc/pearce_mcmc_xigm_data.py
1
2890
# This file just makes the data for the sampler, so multiple samplers can use the exact same data. from pearce.mocks import cat_dict from scipy.optimize import minimize_scalar import numpy as np import cPickle as pickle from os import path fixed_params = {}#'f_c':1.0}#,'logM1': 13.8 }# 'z':0.0} boxno, realization = 3...
mit
digimarc/django
django/core/management/templates.py
34
12977
import cgi import errno import mimetypes import os import posixpath import re import shutil import stat import sys import tempfile from os import path import django from django.core.management.base import BaseCommand, CommandError from django.core.management.utils import handle_extensions from django.template import C...
bsd-3-clause
archen/django
django/core/management/commands/inspectdb.py
6
11091
from __future__ import unicode_literals from collections import OrderedDict import keyword import re from optparse import make_option from django.core.management.base import NoArgsCommand, CommandError from django.db import connections, DEFAULT_DB_ALIAS class Command(NoArgsCommand): help = "Introspects the data...
bsd-3-clause
heroku/fig
tests/integration/cli_test.py
1
8163
from __future__ import absolute_import from .testcases import DockerClientTestCase from mock import patch from fig.cli.main import TopLevelCommand from fig.packages.six import StringIO import sys class CLITestCase(DockerClientTestCase): def setUp(self): super(CLITestCase, self).setUp() self.old_sys...
apache-2.0
nixware/maoaberta
maoaberta/maoaberta/settings.py
1
2647
""" Django settings for maoaberta project. Generated by 'django-admin startproject' using Django 1.8.5. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build pa...
gpl-2.0
Comunitea/l10n-spain
l10n_es_vat_book/models/l10n_es_vat_book_issued_lines.py
5
2053
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2017 Praxya (http://praxya.com/) # Daniel Rodriguez Lijo <drl.9319@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the te...
agpl-3.0
briancurtin/python-openstacksdk
openstack/bare_metal/v1/port_group.py
1
2781
# 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 t...
apache-2.0
Tesora-Release/tesora-horizon
openstack_dashboard/enabled/_3031_identity_users_panel.py
20
1142
# Copyright 2015 IBM 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, s...
apache-2.0
ganeshnalawade/ansible
lib/ansible/module_utils/facts/ansible_collector.py
19
6177
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
richardspirit/engineering_project
solutions.py
1
2498
import os import sqlite3 from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, flash # create application reqapp = Flask(__name__) reqapp.config.from_object(__name__) #Load configurations reqapp.config.update(dict( DATABASE=os.path.join(reqapp.root_path, 'request_repo.db'...
gpl-3.0
rdipietro/tensorflow
tensorflow/python/kernel_tests/extract_image_patches_op_test.py
21
3805
# 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...
apache-2.0
dsseter/tornado
tornado/template.py
64
35308
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
apache-2.0
hnakamur/django
django/db/backends/sqlite3/schema.py
309
13518
import codecs import contextlib import copy from decimal import Decimal from django.apps.registry import Apps from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.utils import six class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_delete_table = "DROP TABLE %(table)s" sql_c...
bsd-3-clause
michhar/flask-webapp-aml
env/Lib/site-packages/pip/_vendor/ipaddress.py
170
79904
# Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. """A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ from __future__ import unicode_literals import itertools import struct __version...
mit
nesi/easybuild-framework
easybuild/toolchains/gmpich.py
4
1426
## # Copyright 2012-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...
gpl-2.0
logust79/phenopolis
views/igv.py
4
3126
from views import * from lookups import * import requests import re from utils import * import itertools from config import config if config.IMPORT_PYSAM_PRIMER3: import pysam import csv #hpo lookup import random from flask import Response, request import os from werkzeug.datastructures import Headers import re @a...
mit
julien78910/CouchPotatoServer
libs/suds/builder.py
197
4220
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
gpl-3.0
danieljjh/instant-press
modules/links.py
7
15364
# -*- coding: utf-8 -*- # # Instant Press. Instant sites. CMS developed in Web2py Framework # Site: http://www.instant2press.com # # Copyright (c) 2010 Mulone, Pablo Martín # # License Code: GPL, General Public License v. 2.0 # License Content: Creative Commons Attribution 3.0 # # Also visit: www.web2py.com # ...
gpl-2.0
bsipocz/astropy
astropy/io/ascii/__init__.py
6
1565
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ An extensible ASCII table reader and writer. """ from .core import (InconsistentTableError, ParameterError, NoType, StrType, NumType, FloatType, IntType, AllType, Column, Ba...
bsd-3-clause
overdev/easygl-0.1.0-alpha1
easygl/arrays/__init__.py
1
1441
# !/usr/bin/python # -*- coding: utf-8 -*- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # The MIT License (MIT) # # Copyright (c) 2017 Jorge A. Gomes (jorgegomes83 at hotmail dot com) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this softwar...
mit
yestech/gae-django-template
django/contrib/databrowse/sites.py
329
5628
from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.shortcuts import render_to_response from django.utils.safestring import mark_safe class AlreadyRegistered(Exception): pass class NotRegistered(Exception): pass class DatabrowsePlugi...
bsd-3-clause
konstruktoid/ansible-upstream
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py
44
16565
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013-2014, Epic Games, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
ferabra/edx-platform
lms/djangoapps/instructor/tests/utils.py
121
2732
""" Utilities for instructor unit tests """ import datetime import json import random from django.utils.timezone import utc from util.date_utils import get_default_time_display class FakeInfo(object): """Parent class for faking objects used in tests""" FEATURES = [] def __init__(self): for featur...
agpl-3.0
bearstech/ansible
test/units/modules/cloud/amazon/test_ec2_vpc_nat_gateway.py
41
15733
import pytest import unittest from collections import namedtuple from ansible.parsing.dataloader import DataLoader from ansible.vars.manager import VariableManager from ansible.inventory.manager import InventoryManager from ansible.playbook.play import Play from ansible.executor.task_queue_manager import TaskQueueMana...
gpl-3.0
yoelk/kivy
kivy/utils.py
21
14542
# pylint: disable=W0611 ''' Utils ===== The Utils module provides a selection of general utility functions and classes that may be useful for various applications. These include maths, color, algebraic and platform functions. .. versionchanged:: 1.6.0 The OrderedDict class has been removed. Use collections.Ordere...
mit
TRex22/xbmc
tools/EventClients/examples/python/example_button2.py
228
2074
#!/usr/bin/python # This is a simple example showing how you can send a key press event # to XBMC in a non-queued fashion to achieve a button pressed down # event i.e. a key press that repeats. # The repeat interval is currently hard coded in XBMC but that might # change in the future. # NOTE: Read the comments in '...
gpl-2.0
luyishisi/tensorflow
4.Object_Detection/object_detection/anchor_generators/multiple_grid_anchor_generator_test.py
21
11513
# 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...
bsd-2-clause
pianomania/cifar10
trainer.py
1
4648
import tensorflow as tf import numpy as np class trainer(object): def __init__(self, sess, model, Input, hps, path): self.sess = sess self.model = model self.Input = Input self.hps = hps self.path = path self.image = model.image self.target = model.target self.logits = model.logits...
mit
lxsmnv/spark
examples/src/main/python/sql/streaming/structured_kafka_wordcount.py
51
3211
# # 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...
apache-2.0
F5Networks/f5-ansible
ansible_collections/f5networks/f5_modules/tests/unit/modules/network/f5/test_bigip_firewall_dos_profile.py
2
3222
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks 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 import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
MSusik/invenio
invenio/modules/formatter/format_elements/bfe_addresses.py
21
2131
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## ...
gpl-2.0
open-synergy/hr
hr_policy_presence/__openerp__.py
25
1608
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # 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, eit...
agpl-3.0
sirex/Misago
misago/threads/admin.py
8
1123
from django.conf.urls import url from django.utils.translation import ugettext_lazy as _ from misago.threads.views.labelsadmin import (LabelsList, NewLabel, EditLabel, DeleteLabel) class MisagoAdminExtension(object): def register_urlpatterns(self, urlpatterns): ...
gpl-2.0
jrha/aquilon
lib/python2.6/aquilon/aqdb/model/campus.py
2
1331
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # 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...
apache-2.0
rherault-insa/numpy
numpy/tests/test_ctypeslib.py
4
4239
from __future__ import division, absolute_import, print_function import sys import numpy as np from numpy.ctypeslib import ndpointer, load_library from numpy.distutils.misc_util import get_shared_lib_extension from numpy.testing import TestCase, run_module_suite, dec try: cdll = load_library('multiarray', np.cor...
bsd-3-clause
zhouguangfu/FreeROI
froi/algorithm/unused/featuredistancemapper.py
6
1951
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Mapper to compute distance matrix Date: 2012.05.29 """ __docformat__ = 'restructuredtext' import numpy as np import scipy.sparse as sp from mvpa2.base import warning from mvpa2.base.d...
bsd-3-clause
klahnakoski/ActiveData-ETL
vendor/jx_python/windows.py
5
7412
# encoding: utf-8 # # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divis...
mpl-2.0
HarryRybacki/osf.io
tests/base.py
2
10660
# -*- coding: utf-8 -*- '''Base TestCase class for OSF unittests. Uses a temporary MongoDB database.''' import os import re import shutil import logging import unittest import functools import datetime as dt from flask import g import blinker import httpretty from webtest_plus import TestApp import mock from faker im...
apache-2.0
shakamunyi/docker-py
tests/integration/models_networks_test.py
6
2338
import docker from .. import helpers from .base import BaseIntegrationTest, TEST_API_VERSION class ImageCollectionTest(BaseIntegrationTest): def test_create(self): client = docker.from_env(version=TEST_API_VERSION) name = helpers.random_name() network = client.networks.create(name, labels...
apache-2.0
shiitakeo/Arduino
arduino-core/src/processing/app/i18n/python/requests/models.py
151
21105
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import logging import datetime from io import BytesIO from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth from .c...
lgpl-2.1
axtra/ansible
v2/test/playbook/test_play.py
35
3886
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
s20121035/rk3288_android5.1_repo
cts/suite/cts/deviceTests/opengl/cob_exporter.py
6
3185
import os, bpy, struct from bpy_extras.io_utils import ExportHelper from bpy.props import StringProperty, BoolProperty, EnumProperty # This is a custom Blender export script to output an object to a format that's easy to use in # android. While open gl allows the use of an index buffer for vertices, the same cannot be...
gpl-3.0
liyouchang/webrtc-qt
third_party/jsoncpp/source/makerelease.py
169
15483
"""Tag the sandbox for release, make source and doc tarballs. Requires Python 2.6 Example of invocation (use to test the script): python makerelease.py --platform=msvc6,msvc71,msvc80,msvc90,mingw -ublep 0.6.0 0.7.0-dev When testing this script: python makerelease.py --force --retag --platform=msvc6,msvc71,msvc80,min...
gpl-3.0
DirtyPiece/dancestudio
Build/Tools/Python27/Lib/test/test_strptime.py
23
25965
"""PyUnit testing against strptime""" import unittest import time import locale import re import sys from test import test_support from datetime import date as datetime_date import _strptime class getlang_Tests(unittest.TestCase): """Test _getlang""" def test_basic(self): self.assertEqual(_strptime._...
mit
eleonrk/SickRage
lib/unidecode/x018.py
252
4099
data = ( ' @ ', # 0x00 ' ... ', # 0x01 ', ', # 0x02 '. ', # 0x03 ': ', # 0x04 ' // ', # 0x05 '', # 0x06 '-', # 0x07 ', ', # 0x08 '. ', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '[?]', # 0x0f '0', # 0x10 '1', # 0x11 '2', # 0x12 '3', # 0x13 '...
gpl-3.0
kwikadi/orange3
Orange/projection/base.py
5
2725
import inspect import Orange.data from Orange.misc.wrapper_meta import WrapperMeta from Orange.misc.cache import single_cache import Orange.preprocess __all__ = ["Projector", "Projection", "SklProjector"] class Projector: #: A sequence of data preprocessors to apply on data prior to projecting name = 'proje...
bsd-2-clause
thresholdsoftware/asylum-v2.0
openerp/addons/web_printscreen_zb/__init__.py
14
1103
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2013 ZestyBeanz Technologies Pvt. Ltd. # (http://wwww.zbeanztech.com) # contact@zbeanztech.com # prajul@zbeanztech.com # # This program is free software: you can redistribute it and/...
agpl-3.0
cyclecomputing/boto
tests/integration/storage_uri/test_storage_uri.py
132
2355
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # All rights reserved. # # 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 ...
mit
mariianna/kodi
pelisalacarta/channels/peliculasyonkis_generico.py
3
17149
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para peliculasyonkis # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # Adaptado por Boludiko basado en el canal seriesyonkis V9 Por Truenon y Jesus # v11 #-------------------------------...
gpl-3.0
hortonworks/hortonworks-sandbox
desktop/core/ext-py/Django-1.2.3/django/contrib/gis/management/commands/ogrinspect.py
324
6252
import os, sys from optparse import make_option from django.contrib.gis import gdal from django.contrib.gis.management.base import ArgsCommand, CommandError def layer_option(option, opt, value, parser): """ Callback for `make_option` for the `ogrinspect` `layer_key` keyword option which may be an integer o...
apache-2.0
RadioFreeAsia/RDacity
lib-src/lv2/lv2/waflib/Tools/intltool.py
330
2949
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,re from waflib import Configure,TaskGen,Task,Utils,Runner,Options,Build,Logs import waflib.Tools.ccroot from waflib.TaskGen import feature,before_method from waflib....
gpl-2.0