repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
astagi/django-cms
cms/appresolver.py
12
9080
# -*- coding: utf-8 -*- from __future__ import with_statement from django.conf import settings from django.conf.urls import patterns from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import (RegexURLResolver, Resolver404, reverse, Reg...
bsd-3-clause
nicobustillos/odoo
addons/l10n_ro/__init__.py
152
1120
# -*- encoding: utf-8 -*- ############################################################################## # # @author - Fekete Mihai <feketemihai@gmail.com> # Copyright (C) 2011 TOTAL PC SYSTEMS (http://www.www.erpsystems.ro). # Copyright (C) 2009 (<http://www.filsystem.ro>) # # This program is free softwa...
agpl-3.0
sankha93/selenium
py/selenium/webdriver/firefox/webelement.py
5
1995
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
2014c2g14/cda0519
static/Brython3.1.1-20150328-091302/Lib/pydoc.py
637
102017
#!/usr/bin/env python3 """Generate Python documentation in HTML or text for interactive use. In the Python interpreter, do "from pydoc import help" to provide help. Calling help(thing) on a Python object documents the object. Or, at the shell command line outside of Python: Run "pydoc <name>" to show documentation ...
agpl-3.0
waterponey/scikit-learn
sklearn/feature_extraction/hashing.py
74
6153
# Author: Lars Buitinck # License: BSD 3 clause import numbers import numpy as np import scipy.sparse as sp from . import _hashing from ..base import BaseEstimator, TransformerMixin def _iteritems(d): """Like d.iteritems, but accepts any collections.Mapping.""" return d.iteritems() if hasattr(d, "iteritems...
bsd-3-clause
yjmade/odoo
addons/mrp_repair/wizard/make_invoice.py
172
3150
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
douggeiger/gnuradio
gr-vocoder/python/vocoder/qa_g723_40_vocoder.py
57
1518
#!/usr/bin/env python # # Copyright 2011,2013 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 your optio...
gpl-3.0
mpetyx/palmdrop
venv/lib/python2.7/site-packages/django/contrib/gis/geos/prototypes/io.py
103
8497
import threading from ctypes import byref, c_char_p, c_int, c_char, c_size_t, Structure, POINTER from django.contrib.gis import memoryview from django.contrib.gis.geos.base import GEOSBase from django.contrib.gis.geos.libgeos import GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_geom, check_stri...
apache-2.0
drcapulet/sentry
src/sentry/migrations/0105_auto__chg_field_projectcountbyminute_time_spent_total__chg_field_group.py
36
28446
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'ProjectCountByMinute.time_spent_total' db.alter_column(u'sentry_projectcountbyminute', 't...
bsd-3-clause
shsingh/ansible
lib/ansible/modules/cloud/ovirt/_ovirt_quota_facts.py
2
4925
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # 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 #...
gpl-3.0
warriorframework/warriorframework
warrior/Framework/ClassUtils/kafka_utils_class.py
1
11178
''' Copyright 2017, Fujitsu Network Communications, 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 w...
apache-2.0
Aravinthu/odoo
addons/stock/models/stock_traceability.py
4
17037
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, _ rec = 0 def autoIncrement(): global rec pStart = 1 pInterval = 1 if rec == 0: rec = pStart else: rec += pInterval return rec class MrpStockRepor...
agpl-3.0
fidomason/kbengine
kbe/res/scripts/common/Lib/idlelib/HyperParser.py
86
12877
"""Provide advanced parsing abilities for ParenMatch and other extensions. HyperParser uses PyParser. PyParser mostly gives information on the proper indentation of code. HyperParser gives additional information on the structure of code. """ import string from keyword import iskeyword from idlelib import PyParse ...
lgpl-3.0
JustgeekDE/gatorV2
tests/unitTests/twoInputGateTest.py
1
4143
from unittest import TestCase from scoville.signal import GenericSignal, DelayedSignal from constants import MAX_LOW, MIN_HIGH, MAX_CURRENT, INPUT_RESISTANCE class TwoInputGateTest(TestCase): def assertOutputIsLow(self, a, b, outputName, circuit = None): if circuit == None: circuit = self.getCircuit() ...
mit
alete89/PyCGI
src/gui/CodeBox.py
1
4653
# -*- coding: utf-8 -*- from PyQt4 import QtGui, QtCore class LineNumberArea(QtGui.QWidget): def __init__(self, editor): super(LineNumberArea, self).__init__(editor) self.myeditor = editor def sizeHint(self): return QtCore.QSize(self.editor.lineNumberAreaWidth(), 0) def paintEve...
gpl-3.0
txemi/ansible
lib/ansible/plugins/action/vyos.py
10
4467
# # (c) 2016 Red Hat Inc. # # 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 d...
gpl-3.0
pistruiatul/hartapoliticii
python/src/ro/vivi/youtube_crawler/atom/token_store.py
280
4048
#!/usr/bin/python # # Copyright (C) 2008 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 ...
agpl-3.0
yunojuno/django-perimeter
tests/test_forms.py
1
3622
import datetime from django.core.exceptions import ValidationError from django.test import RequestFactory, TestCase from django.utils.timezone import now from perimeter.forms import TokenGatewayForm, UserGatewayForm from perimeter.models import AccessToken, AccessTokenUse YESTERDAY = now().date() - datetime.timedelt...
mit
hiearth/langstyle
langstyle/database/word_meaning_repository.py
1
1754
#!/usr/bin/env python from . import base_repository from .. import helper from ..entity import word_meaning class WordMeaningRepository(base_repository.BaseRepository): def get(self, word_meaning_id): word_meaning_info = self._call_proc_query_one("WordMeaning_S", [word_meaning_id]) if word_meanin...
gpl-2.0
tbeadle/selenium
py/test/selenium/webdriver/common/click_tests.py
39
1423
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
liuguanyu/evparse
lib/sohu/get_base_info.py
1
3662
# -*- coding: utf-8 -*- # get_base_info.py, part for evparse : EisF Video Parse, evdh Video Parse. # get_base_info: evparse/lib/sohu # version 0.1.0.0 test201505032157 # author sceext <sceext@foxmail.com> 2009EisF2015, 2015.05. # copyright 2015 sceext # # This is FREE SOFTWARE, released under GNU GPLv3+ # please se...
gpl-3.0
cipriancraciun/linux
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
fabiking/plugin.video.Mfabiking
default.py
1
373042
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------------------------------------------------------- # PalcoTV / Kodi Add-on by Juarrox (juarrox@gmail.com) # Version 0.3.3 (30.10.2015) #------------------------------------------------------------------------------------...
gpl-2.0
joyxu/autotest
frontend/afe/rpc_utils.py
2
31176
""" Utility functions for rpc_interface.py. We keep them in a separate file so that only RPC interface functions go into that file. """ __author__ = 'showard@google.com (Steve Howard)' import datetime import os import sys import inspect import django.http from autotest.frontend.afe import models, model_logic, model_...
gpl-2.0
mediafactory/tryton_core_daemon
trytond/exceptions.py
2
1053
#This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. class UserError(Exception): def __init__(self, message, description=''): super(UserError, self).__init__('UserError', (message, description)) self.message ...
gpl-3.0
whitepages/nova
nova/api/openstack/compute/schemas/tenant_networks.py
80
1548
# Copyright 2015 NEC Corporation. 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...
apache-2.0
fapcoin/fapcoin
share/qt/make_spinner.py
4415
1035
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
mit
amisrs/angular-flask
angular_flask/lib/python2.7/site-packages/pip/utils/outdated.py
513
5455
from __future__ import absolute_import import datetime import json import logging import os.path import sys from pip._vendor import lockfile from pip._vendor.packaging import version as packaging_version from pip.compat import total_seconds, WINDOWS from pip.models import PyPI from pip.locations import USER_CACHE_DI...
mit
ifduyue/sentry
src/sentry/lang/native/utils.py
1
8201
from __future__ import absolute_import import re import six import logging from collections import namedtuple from django.core.files.uploadedfile import InMemoryUploadedFile, TemporaryUploadedFile from symbolic import parse_addr, arch_from_breakpad, arch_from_macho, arch_is_known, ProcessState, id_from_breakpad from...
bsd-3-clause
dbbhattacharya/kitsune
vendor/packages/setuptools/setuptools/tests/doctest.py
32
99714
# Module doctest. # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). # Major enhancements and refactoring by: # Jim Fulton # Edward Loper # Provided as-is; use at your own risk; no warranty; no promises; enjoy! try: basestring except NameError: basestring = str,unicode try: ...
bsd-3-clause
hmen89/odoo
addons/crm_partner_assign/__init__.py
364
1116
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
cogniteev/python-gdrive
python_gdrive/client.py
1
6511
import logging import requests LOGGER = logging.getLogger(__name__) class GoogleDrive(object): """ A simple API wrapper for google drive """ def __init__(self, token, refresh_token, client_id, client_secret, refresh_callback=None): """ :param token: the granted acces...
apache-2.0
happyleavesaoc/home-assistant
homeassistant/components/fan/insteon_local.py
3
6481
""" Support for Insteon fans via local hub control. For more details about this component, please refer to the documentation at https://home-assistant.io/components/fan.insteon_local/ """ import json import logging import os from datetime import timedelta from homeassistant.components.fan import ( ATTR_SPEED, SPE...
apache-2.0
Khan/git-bigfile
vendor/boto/dynamodb/layer2.py
135
33814
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Amazon.com, Inc. or its affiliates. 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 ...
mit
Split-Screen/android_kernel_motorola_msm8960dt-common
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gpl-2.0
nzavagli/UnrealPy
UnrealPyEmbed/Source/Python/Lib/python27/encodings/iso8859_7.py
593
13100
""" Python Character Mapping Codec iso8859_7 generated from 'MAPPINGS/ISO8859/8859-7.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
mit
beacloudgenius/edx-platform
cms/djangoapps/contentstore/views/tabs.py
28
7943
""" Views related to course tabs """ from student.auth import has_course_author_access from util.json_request import expect_json, JsonResponse from django.http import HttpResponseNotFound from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.exceptions import Permi...
agpl-3.0
zgchizi/oppia-uc
core/controllers/uc.py
1
9572
import Cookie import hashlib import logging import urlparse import xml.etree.cElementTree as ET from core.controllers import base from core.platform import models from core.controllers import ucnote from core.domain import user_services from core.domain import email_manager import utils import feconf API_RETURN_SUCCEE...
apache-2.0
repotvsupertuga/tvsupertuga.repository
script.module.projectx.wizard/resources/libs/wizard.py
1
157669
import base64, codecs magic = 'IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMNCiMgICAgICBDb3B5cmlnaHQgKEMpIDIwMTUgU3VyZmFjaW5neCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjDQojICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA...
gpl-2.0
alistairlow/tensorflow
tensorflow/contrib/kfac/__init__.py
45
2045
# 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...
apache-2.0
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/numpy-1.0.4-py2.5-linux-x86_64.egg/numpy/f2py/lib/extgen/py_support.py
1
44229
__all__ = ['PySource', 'PyCFunction', 'PyCModule', 'PyCTypeSpec', 'PyCArgument', 'PyCReturn'] import os import sys from base import Component from utils import * from c_support import * class PySource(FileSource): template_py_header = '''\ #!/usr/bin/env python # This file %(path)r is generated using ExtGen too...
bsd-3-clause
softliumin/zookeeper
src/contrib/huebrowser/zkui/src/zkui/stats.py
114
4911
# 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 ...
apache-2.0
jaloren/robotframework
src/robot/variables/assigner.py
5
8783
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework 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 ...
apache-2.0
a-parhom/edx-platform
common/lib/xmodule/xmodule/modulestore/tests/factories.py
2
25785
""" Factories for use in tests of XBlocks. """ from __future__ import print_function import datetime import functools import pymongo.message import pytz import threading import traceback from collections import defaultdict from contextlib import contextmanager from uuid import uuid4 from factory import Factory, Seque...
agpl-3.0
ImageEngine/gaffer
python/GafferTest/ExpressionTest.py
3
49171
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2012-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
bsd-3-clause
ImpalaToGo/ImpalaToGo
thirdparty/thrift-0.9.0/contrib/fb303/py/fb303/FacebookBase.py
173
1917
#!/usr/bin/env python # # 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 # "L...
apache-2.0
spring-week-topos/cinder-week
cinder/tests/keymgr/mock_key_mgr.py
4
4247
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
apache-2.0
kalahbrown/HueBigSQL
desktop/core/ext-py/Django-1.6.10/tests/utils_tests/test_archive.py
102
2176
import os import shutil import tempfile from django.utils import unittest from django.utils.archive import Archive, extract from django.utils._os import upath TEST_DIR = os.path.join(os.path.dirname(upath(__file__)), 'archives') class ArchiveTester(object): archive = None def setUp(self): """ ...
apache-2.0
bgris/ODL_bgris
lib/python3.5/site-packages/odl/tomo/geometry/spect.py
2
3318
# Copyright 2014 - 2016 The ODL development group # # This file is part of ODL. # # ODL 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....
gpl-3.0
shssoichiro/servo
tests/wpt/css-tests/tools/pytest/setup.py
167
4475
import os, sys import setuptools import pkg_resources from setuptools import setup, Command classifiers = ['Development Status :: 6 - Mature', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: POSIX', 'Operating...
mpl-2.0
mrquim/mrquimrepo
script.module.nanscrapers/lib/nanscrapers/jsunpack.py
11
8094
""" urlresolver XBMC Addon Copyright (C) 2013 Bstrdsmkr This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version....
gpl-2.0
cwolferh/heat-scratch
heat_integrationtests/functional/test_default_parameters.py
3
3045
# 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 # d...
apache-2.0
stutivarshney/Bal-Aveksha
WebServer/BalAvekshaEnv/lib/python3.5/site-packages/psycopg2/psycopg1.py
15
3329
"""psycopg 1.1.x compatibility module This module uses the new style connection and cursor types to build a psycopg 1.1.1.x compatibility layer. It should be considered a temporary hack to run old code while porting to psycopg 2. Import it as follows:: from psycopg2 import psycopg1 as psycopg """ # psycopg/psycop...
gpl-3.0
amith01994/intellij-community
python/lib/Lib/site-packages/django/core/handlers/wsgi.py
83
9881
from pprint import pformat import sys from threading import Lock try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import socket from django import http from django.core import signals from django.core.handlers import base from django.core.urlresolvers import set_script_pref...
apache-2.0
khoffrath/httrack-py
setup.py
4
1585
"""httrack-py library: wrapper to use httrack website copier """ classifiers = """\ Development Status :: 3 - Alpha Intended Audience :: Developers License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) Programming Language :: Python Topic :: Software Development :: Libraries :: Python Modules ...
gpl-2.0
dgomezunican/network-coding-ns3
ns-3.13/src/visualizer/visualizer/base.py
17
3660
import ns.point_to_point import ns.csma import ns.wifi import ns.bridge import ns.internet import ns.mesh import ns.wimax import ns.wimax import gobject import os.path import sys PIXELS_PER_METER = 3.0 # pixels-per-meter, at 100% zoom level class PyVizObject(gobject.GObject): __gtype_name__ = "PyVizObject" ...
gpl-2.0
arnaudsj/mdp-toolkit
mdp/nodes/svm_classifiers.py
1
2541
import mdp from mdp import ClassifierCumulator from mdp import numx from itertools import count """General routines and base classes for Support Vector Machine classifiers. TODO: Implement some scaling. Either by special Scaling Node or internally. """ class _LabelNormalizer(object): """This class provides ...
bsd-3-clause
balajikris/autorest
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/AzureBodyDuration/autorestdurationtestservice/operations/duration_operations.py
14
8824
# 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 ...
mit
Mic92/ansible
contrib/inventory/digital_ocean.py
15
17846
#!/usr/bin/env python ''' DigitalOcean external inventory script ====================================== Generates Ansible inventory of DigitalOcean Droplets. In addition to the --list and --host options used by Ansible, there are options for generating JSON of other DigitalOcean data. This is useful when creating d...
gpl-3.0
danieljaouen/ansible
lib/ansible/modules/identity/cyberark/cyberark_user.py
83
16083
#!/usr/bin/python # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['pre...
gpl-3.0
JioCloud/neutron
neutron/tests/unit/agent/linux/test_bridge_lib.py
17
2270
# Copyright 2015 Intel Corporation. # Copyright 2015 Isaku Yamahata <isaku.yamahata at intel com> # <isaku.yamahata at gmail com> # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the Licen...
apache-2.0
marcore/edx-platform
cms/djangoapps/contentstore/views/entrance_exam.py
13
11117
""" Entrance Exams view module -- handles all requests related to entrance exam management via Studio Intended to be utilized as an AJAX callback handler, versus a proper view/screen """ from functools import wraps import logging from django.contrib.auth.decorators import login_required from django.views.decorators.cs...
agpl-3.0
dvliman/jaikuengine
.google_appengine/lib/django-1.4/django/db/backends/postgresql_psycopg2/introspection.py
82
4121
from django.db.backends import BaseDatabaseIntrospection class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type codes to Django Field types. data_types_reverse = { 16: 'BooleanField', 20: 'BigIntegerField', 21: 'SmallIntegerField', 23: 'IntegerField', 25: '...
apache-2.0
timpalpant/calibre
src/calibre/devices/winusb.py
1
40055
#!/usr/bin/env python2 # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net> from __future__ import (unicode_literals, division, absolute_import, print_function) import os, string, _winreg as winreg, re, sys from collections import namedtuple, default...
gpl-3.0
bobsilverberg/oneanddone-sugardough
oneanddone/users/south_migrations/0001_initial.py
2
4390
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): needed_by = ( ('authtoken', '0001_initial'), ) def forwards(self, orm): # Adding model 'UserProfile' db.create_table...
mpl-2.0
lekum/ansible-modules-extras
cloud/misc/virt_net.py
4
18806
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Maciej Delmanowski <drybjed@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 th...
gpl-3.0
asafpr/RILseq
bin/map_chimeric_fragments.py
1
8553
#!/usr/bin/env python """ After a library is mapped to the genome (using map_single_fragments.py or any other mapper), the bam file is screened for reads that weren't mapped to the genome or weren't concise and try to map wach of the ends to a different location. This script report the reads that are chimeric in a tab...
mit
Pablo126/SSBW
Entrega1/lib/python3.5/site-packages/rest_framework/utils/field_mapping.py
5
10927
""" Helper functions for mapping model fields to a dictionary of default keyword arguments that should be used for their equivalent serializer fields. """ import inspect from django.core import validators from django.db import models from django.utils.text import capfirst from rest_framework.compat import DecimalVali...
gpl-3.0
cfelton/myhdl
cosimulation/icarus/test/test_all.py
7
1448
# This file is part of the myhdl library, a Python package for using # Python as a Hardware Description Language. # # Copyright (C) 2003-2008 Jan Decaluwe # # The myhdl library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License as # published by t...
lgpl-2.1
gnumdk/eolie
eolie/sites_manager.py
1
12074
# Copyright (c) 2017 Cedric Bellegarde <cedric.bellegarde@adishatz.org> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
gpl-3.0
webmasterraj/FogOrNot
flask/lib/python2.7/site-packages/pip/exceptions.py
280
1257
"""Exceptions used throughout package""" from __future__ import absolute_import class PipError(Exception): """Base pip exception""" class InstallationError(PipError): """General exception during installation""" class UninstallationError(PipError): """General exception during uninstallation""" class ...
gpl-2.0
SwordYork/sequencing
nmt_train.py
1
8143
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Sword York # GitHub: https://github.com/SwordYork/sequencing # No rights reserved. # import argparse import os import time from datetime import datetime import tensorflow as tf import config from build_inputs import build_parallel_inputs from build_model...
mit
zhuridartem/samples
AllJoyn/Samples/OICAdapter/iotivity-1.0.0/build_common/iotivityconfig/compiler/gcc_configuration.py
64
4297
# ------------------------------------------------------------------------ # Copyright 2015 Intel 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/li...
mit
tiagocardosos/stoq
stoqlib/lib/test/test_sintegragenerator.py
2
4194
from stoqdrivers.enum import TaxType from stoqlib.database.runtime import get_current_branch from stoqlib.domain.fiscal import CfopData from stoqlib.domain.inventory import InventoryItem from stoqlib.domain.payment.method import PaymentMethod from stoqlib.domain.payment.payment import Payment from stoqlib.domain.sell...
gpl-2.0
alphafoobar/intellij-community
python/helpers/pydev/pydevd_attach_to_process/winappdbg/win32/gdi32.py
102
16829
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Mario Vilas # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above...
apache-2.0
CARocha/plasystem
plasystem/settings.py
1
3017
""" Django settings for plasystem project. Generated by 'django-admin startproject' using Django 1.10.5. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ from loc...
mit
igemsoftware/SYSU-Software2013
project/Python27/Lib/site-packages/win32com/test/testvb.py
17
20276
# Test code for a VB Program. # # This requires the PythonCOM VB Test Harness. # import sys import winerror import pythoncom, win32com.client, win32com.client.dynamic, win32com.client.gencache from win32com.server.util import NewCollection, wrap from win32com.test import util from pywin32_testutil import str2memory i...
mit
pysb/pysb
pysb/pattern.py
5
38235
import collections from collections.abc import Iterable from .core import ComplexPattern, MonomerPattern, Monomer, \ ReactionPattern, ANY, as_complex_pattern, DanglingBondError, \ ReusedBondError, Rule import networkx as nx from networkx.algorithms.isomorphism.vf2userfunc import GraphMatcher from networkx.algor...
bsd-2-clause
sebrandon1/neutron
neutron/db/migration/alembic_migrations/versions/mitaka/expand/0e66c5227a8a_add_desc_to_standard_attr.py
9
1105
# Copyright 2016 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 ...
apache-2.0
biomadeira/gae_pubmed2rss
config.py
1
1496
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- """ --------- config.py --------- This defines the methods that load and validate user defined parameters. .. moduleauthor:: Fabio Madeira :module_version: 1.0 :created_on: 28-02-2015 """ from __future__ import print_function import os import sys from ConfigParser imp...
mit
doismellburning/django
django/utils/archive.py
562
7070
""" Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/ Copyright (c) 2010 Gary Wilson Jr. <gary.wilson@gmail.com> and contributors. 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 So...
bsd-3-clause
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/application_gateway_firewall_rule_group.py
1
1756
# 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 ...
mit
CloudVLab/professional-services
examples/cloudml-collaborative-filtering/trainer/utils.py
2
3146
# Copyright 2019 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 ag...
apache-2.0
nmenon/ti-linux-kernel-nm
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
cknv/charcoal
charcoal/packets.py
1
1034
"""Packet formatter functions.""" def timer_packet(name, value): """Return a timer formatted packet.""" yield packet( name, int(value * 1000), 'ms', ) def counter_packet(name, value): """Return a counter formatted packet.""" yield packet(name, str(value), 'c') def gauge...
mit
com4/eventmq
eventmq/utils/__init__.py
2
1370
# This file is part of eventmq. # # eventmq is free software: you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) # any later version. # # eventmq is distributed in the ...
lgpl-2.1
PolicyStat/django
django/contrib/staticfiles/management/commands/findstatic.py
42
1745
from __future__ import unicode_literals import os from django.core.management.base import LabelCommand from django.utils.encoding import force_text from django.contrib.staticfiles import finders class Command(LabelCommand): help = "Finds the absolute paths for the given static file(s)." label = 'static file...
bsd-3-clause
Clever/Diamond
src/collectors/endecadgraph/test/testendecadgraph.py
31
2013
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from mock import patch from diamond.collector import Collector from endecadgraph import EndecaDgraphCollector class TestEndecaDgraphCol...
mit
oberlin/panoptes
panoptes/accounts/views.py
2
1072
from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from panoptes.accounts.forms import UserPreferencesForm from panoptes.core.utils.pages import Page _PREFS_UPDATED_KEY = "preferences_updated" @login_required def prefer...
bsd-3-clause
behrouzsh/LINCS-Proteomics-Landing-Page
python/plp/plpSearch/harmonizomeClient.py
1
1945
#!/usr/bin/env python # # Author: Behrouz Shamsaei <behrouz.shamsaei@uc.edu> # Date: Sep 2016 # import requests #import csv #from requests.exceptions import Timeout class HarmonizomeClient(object): """Client class is to connect the prosite server and psi-mod csv file to search2 for motifs. :param motifs: List ...
mit
shvets/GidOnline.bundle
Contents/Libraries/Shared/plex_storage.py
1
2064
import json from media_info_storage import MediaInfoStorage import library_bridge Core = library_bridge.bridge.objects['Core'] DirectoryObject = library_bridge.bridge.objects['DirectoryObject'] Callback = library_bridge.bridge.objects['Callback'] L = library_bridge.bridge.objects['L'] R = library_bridge.bridge.objec...
mit
SrNetoChan/QGIS
tests/src/python/test_qgsrendercontext.py
2
27065
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsRenderContext. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ ...
gpl-2.0
timlinux/geonode
geonode/contrib/geosites/populate_sites_data.py
24
1065
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
smishenk/blink-crosswalk
Source/bindings/scripts/v8_utilities.py
5
18168
# Copyright (C) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
cseed/hail
datasets/load/old/load.dbsnp_build151.GRCh37.py
3
1321
import argparse import hail as hl parser = argparse.ArgumentParser() parser.add_argument('-v', required=True, choices=['150', '151'], help='dbSNP build to load.') parser.add_argument('-b', required=True, choices=['GRCh37', 'GRCh38'], help='Reference genome build to load.') args = parser.parse_args() name = 'dbSNP' v...
mit
alsrgv/tensorflow
tensorflow/python/data/util/structure_test.py
1
31498
# 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...
apache-2.0
vmindru/ansible
lib/ansible/modules/cloud/amazon/elasticache_snapshot.py
89
7532
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
debops/debops
ansible/roles/ansible_plugins/library/cran.py
3
4028
#!/usr/bin/env python # -*- coding: utf-8 -*- # cran.py: install or remove R packages # Homepage: https://github.com/yutannihilation/ansible-module-cran # Copyright (C) 2016 Hiroaki Yutani <yutani.ini@gmail.com> # Copyright (C) 2017 Maciej Delmanowski <drybjed@gmail.com> # Copyright (C) 2017 DebOps <https://debops.or...
gpl-3.0
lovesecho/xrepo
subcmds/__init__.py
35
1369
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
apache-2.0
js345/AutomaticQA
src/AutomaticQA.py
1
3897
''' AutomaticQA AutomaticQA Created on 11/30/16 @author: xiaofo ''' from __future__ import division from src.QueryLikelihoodModel import QueryLikelihoodModel from src.LMHRank import LMHRANK from src.WordTranslation import WordTranslation from src.TranslationModel import TranslationModel import numpy as np import json ...
mit