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
sbesson/registry
omero_qa/qa/urls.py
3
2613
#!/usr/bin/env python # # # # Copyright (c) 2009 University of Dundee. # # 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 la...
agpl-3.0
kamawanu/pydbgr
trepan/lib/print.py
2
4139
# -*- coding: utf-8 -*- # Copyright (C) 2007, 2008, 2009, 2010 Rocky Bernstein # # 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 l...
gpl-3.0
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/Zendesk/Organizations/ListOrganizationsByUser.py
5
4947
# -*- coding: utf-8 -*- ############################################################################### # # ListOrganizationsByUser # Lists all organizations by user. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use ...
gpl-2.0
hefen1/chromium
third_party/markdown/extensions/attr_list.py
109
6363
# markdown is released under the BSD license # Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) # Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) # Copyright 2004 Manfred Stienstra (the original version) # # All rights reserved. # # Redistribution and use in source and binary forms, with or...
bsd-3-clause
drawks/ansible
lib/ansible/modules/cloud/azure/azure_rm_resourcegroup_facts.py
11
6676
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANS...
gpl-3.0
captainpete/rethinkdb
external/v8_3.30.33.16/build/gyp/pylib/gyp/generator/gypsh.py
2779
1665
# Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """gypsh output module gypsh is a GYP shell. It's not really a generator per se. All it does is fire up an interactive Python session with a few local variables...
agpl-3.0
iluxonchik/python-general-repo
scripts/fenix/fenix.py
1
4366
# Fenix Edu Pseudo-API # ################################################################################################################ # This is a simple pseudo-API for Fenix Edu, created just to simplify scraping from fenix, this needs to be # re-worked. # # #########################################################...
mit
40223235/2015cd_midterm2
static/Brython3.1.1-20150328-091302/Lib/unittest/result.py
727
6397
"""Test result object""" import io import sys import traceback from . import util from functools import wraps __unittest = True def failfast(method): @wraps(method) def inner(self, *args, **kw): if getattr(self, 'failfast', False): self.stop() return method(self, *args, **kw) ...
gpl-3.0
antoviaque/huey
docs/conf.py
9
7906
# -*- coding: utf-8 -*- # # huey documentation build configuration file, created by # sphinx-quickstart on Wed Nov 16 12:48:28 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
mit
RoyXiang/ehForwarderBot
plugins/eh_telegram_master/__init__.py
1
63061
# coding=utf-8 import telegram import telegram.ext import config import datetime import utils import urllib import html import logging import time import magic import os import re import mimetypes import pydub import threading import traceback import base64 from . import db, speech from .whitelisthandler import Whiteli...
gpl-3.0
piyush0609/scipy
scipy/io/arff/arffread.py
25
21335
#! /usr/bin/env python # Last Change: Mon Aug 20 08:00 PM 2007 J from __future__ import division, print_function, absolute_import import re import itertools import datetime from functools import partial import numpy as np from scipy._lib.six import next """A module to read arff files.""" __all__ = ['MetaData', 'lo...
bsd-3-clause
xyuanmu/XX-Net
python3.8.2/Lib/site-packages/pip/_vendor/packaging/_structures.py
62
1416
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function class Infinity(object): def __repr__(self): return "Infinity"...
bsd-2-clause
pombredanne/PeachPy
peachpy/encoder.py
6
7810
# This file is part of Peach-Py package and is licensed under the Simplified BSD license. # See license.rst for the full text of the license. from peachpy.abi import Endianness class Encoder: def __init__(self, endianness, bitness=None): assert endianness in {Endianness.Little, Endianness.Big} ...
bsd-2-clause
ganzenmg/lammps_current
tools/eff/lmp2data.py
54
4104
#!/usr/local/bin/python-2.5/bin/python Info=""" Module name: lmp2data.py Author: (c) Andres Jaramillo-Botero California Institute of Technology ajaramil@wag.caltech.edu Project: pEFF Version: August 2009 Extracts the electron radii from a lammps trajectory dump of style custom: dump 1 all custom period dump_fil...
gpl-2.0
dataDogma/Computer-Science
Django-MVP-page/venv/Lib/site-packages/pip/_vendor/colorama/winterm.py
578
6290
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from . import win32 # from wincon.h class WinColor(object): BLACK = 0 BLUE = 1 GREEN = 2 CYAN = 3 RED = 4 MAGENTA = 5 YELLOW = 6 GREY = 7 # from wincon.h class WinStyle(object): NORMAL ...
gpl-3.0
hamzehd/edx-platform
cms/lib/xblock/test/test_authoring_mixin.py
105
6282
""" Tests for the Studio authoring XBlock mixin. """ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.partitions.partitions import Group, UserPartition class AuthoringMixinTestCase(ModuleStoreTestCase): ...
agpl-3.0
scalable-networks/ext
gnuradio-3.7.0.1/gr-vocoder/python/vocoder/qa_codec2_vocoder.py
8
2420
#!/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-2.0
Osndok/zim-desktop-wiki
zim/plugins/distractionfree.py
1
8457
# -*- coding: utf-8 -*- # Copyright 2012 Jaap Karssenberg <jaap.karssenberg@gmail.com> import gtk import logging from zim.plugins import PluginClass, WindowExtension, extends from zim.gui import PATHBAR_NONE, PATHBAR_RECENT logger = logging.getLogger('zim.plugins.distractionfree') _minsize = 300 # prevent pagev...
gpl-2.0
keedio/hue
desktop/core/ext-py/Paste-2.0.1/tests/test_exceptions/test_error_middleware.py
47
3389
from paste.fixture import * from paste.exceptions.errormiddleware import ErrorMiddleware from paste import lint from paste.util.quoting import strip_html # # For some strange reason, these 4 lines cannot be removed or the regression # test breaks; is it counting the number of lines in the file somehow? # def do_reques...
apache-2.0
40223208/2015cdb_g4_0420
static/Brython3.1.1-20150328-091302/Lib/operator.py
674
7736
#!/usr/bin/env python3 """ Operator Interface This module exports a set of functions corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expression x+y. The function names are those used for special methods; variants without leading and trailing '__' are also p...
gpl-3.0
boomsbloom/dtm-fmri
DTM/for_gensim/lib/python2.7/site-packages/matplotlib/axes/_base.py
1
129192
from __future__ import (absolute_import, division, print_function, unicode_literals) from matplotlib.externals import six from matplotlib.externals.six.moves import xrange import itertools import warnings import math from operator import itemgetter import numpy as np from numpy import ma imp...
mit
huiyiqun/check_mk
agents/windows/it/test_section_mem.py
1
1385
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset: 4 -*- import os import pytest import re from remote import actual_output, config, remotetest, wait_agent, write_config class Globals(object): section = 'mem' alone = True @pytest.fixture def testfile(): return os.path.basename(__file__) @pyt...
gpl-2.0
talha81/TACTIC-DEV
src/pyasm/prod/web/texture_wdg.py
6
14159
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
pshchelo/heat
contrib/heat_keystone/heat_keystone/tests/test_group.py
2
11249
# # 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 # ...
apache-2.0
bright-sparks/titanium_mobile
support/common/mako/codegen.py
40
32857
# codegen.py # Copyright (C) 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """provides functionality for rendering a parsetree constructing into module source code.""" import time impo...
apache-2.0
joshainglis/ansible
contrib/inventory/cloudstack.py
111
8221
#!/usr/bin/env python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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...
gpl-3.0
mhnatiuk/phd_sociology_of_religion
scrapper/build/scrapy/scrapy/utils/request.py
15
3096
""" This module provides some useful functions for working with scrapy.http.Request objects """ from __future__ import print_function import hashlib import weakref from urlparse import urlunparse from twisted.internet.defer import Deferred from w3lib.http import basic_auth_header from scrapy.utils.url import canonic...
gpl-2.0
nishigori/boto
tests/unit/cloudsearch2/test_search.py
114
12329
#!/usr/bin env python from boto.cloudsearch2.domain import Domain from boto.cloudsearch2.layer1 import CloudSearchConnection from tests.compat import mock, unittest from httpretty import HTTPretty import json from boto.cloudsearch2.search import SearchConnection, SearchServiceException from boto.compat import six, m...
mit
tenXer/PyDevSrc
pydevsrc/pydevd.py
1
55520
#IMPORTANT: pydevd_constants must be the 1st thing defined because it'll keep a reference to the original sys._getframe from pydevd_constants import * #@UnusedWildImport import pydev_imports from pydevd_comm import CMD_CHANGE_VARIABLE, \ CMD_EVALUATE_EXPRESSION, \ CMD_...
epl-1.0
texcaltech/windmilltownhomes-old
django/utils/http.py
12
3871
import re import urllib from email.Utils import formatdate from django.utils.encoding import smart_str, force_unicode from django.utils.functional import allow_lazy ETAG_MATCH = re.compile(r'(?:W/)?"((?:\\.|[^"])*)"') def urlquote(url, safe='/'): """ A version of Python's urllib.quote() function that can ope...
bsd-3-clause
ddamiani/pyqtgraph
pyqtgraph/graphicsItems/MultiPlotItem.py
49
2062
# -*- coding: utf-8 -*- """ MultiPlotItem.py - Graphics item used for displaying an array of PlotItems Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more infomation. """ from numpy import ndarray from . import GraphicsLayout from ..metaarray import * __all__ = ['MultiPlotIte...
mit
benkul/BBA
coach_init.py
1
5208
import random import sqlite3 from game_variables import motivation, coach_off_iq, coach_def_iq, training, offense_playbook, defense_playbook, leadership, major_bonus from coach_first_names import coach_first_names from player_last_names import player_last_names def create_stat(stat): # assumes a min/max tuple as inpu...
mit
ka7eh/django-oscar
tests/integration/offer/priority_offers_tests.py
55
1700
import mock import datetime from django.test import TestCase from django.utils import timezone from oscar.core.loading import get_model from oscar.apps.offer import utils from oscar.test import factories Voucher = get_model('voucher', 'Voucher') class TestPriorityOffers(TestCase): def test_site_offers_are_orde...
bsd-3-clause
sebastianludwig/SensationDriver
src/sensationdriver/actor.py
1
9850
import asyncio import time import traceback from sortedcontainers import SortedDict from . import platform from . import helper if platform.is_raspberry(): from adafruit import pca9685 from adafruit import wirebus else: from .dummy import pca9685 from .dummy import wirebus def parse_config(config, l...
mit
CoolCloud/ansible
lib/ansible/plugins/callback/osx_say.py
144
2882
# (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 la...
gpl-3.0
madebr/ADuC832_demoproject
loader/diffhex.py
1
2206
#!/usr/bin/env python3 #============================================================================= #Copyright (C) 2016, Anonymous Maarten # #This file is part of ADuC832 demoproject. # #This program is free software; you can redistribute it and/or #modify it under the terms of the GNU General Public License #as publ...
gpl-2.0
andela-ooshodi/codango-debug
codango/comments/views.py
1
1265
import json from django.http import HttpResponse from django.views.generic import View from resources.models import Resource from comments.models import Comment from comments.forms import CommentForm from datetime import datetime # Create your views here. class CommentAction(View): def delete(self, request, **k...
mit
gerald-yang/ubuntu-iotivity-demo
snappy/grovepi/pygrovepi/grove_touch_sensor.py
7
1895
#!/usr/bin/env python # # GrovePi Example for using the Grove Touch Sensor (http://www.seeedstudio.com/wiki/Grove_-_Touch_Sensor) # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi # # Have a question about this example? Ask on ...
apache-2.0
crossbario/autobahn-python
autobahn/wamp/component.py
2
37916
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
mit
comparemetrics/GoogleAppsAccountManager
src/GoogleAppsAccountManager/http.py
1
1152
# # GoogleAppsAccountManager: http # Copyright (C) 2012-2013 KAMEI Yutaka # # License: GNU General Public License version 2 or later # Date: 2013-01-08, since 2012-12-28 # import socket import httplib from GoogleAppsAccountManager import errors def httpsRequest(method, server, path, header, body): for count in ra...
gpl-2.0
yfried/ansible
test/units/module_utils/facts/base.py
47
2309
# base unit test classes for ansible/module_utils/facts/ tests # -*- coding: utf-8 -*- # # 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
mikehulluk/morphforge
src/morphforge/traces/operators/op_variabledt_scalar.py
1
9445
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
bsd-2-clause
hiteshgarg14/openstates
scrapers/ak/__init__.py
2
1974
from utils import State, url_xpath from .bills import AKBillScraper from .events import AKEventScraper settings = dict(SCRAPELIB_TIMEOUT=600) class Alaska(State): scrapers = {"bills": AKBillScraper, "events": AKEventScraper} legislative_sessions = [ { "_scraped_name": "28th Legislature (...
gpl-3.0
ehartsuyker/securedrop
securedrop/alembic/versions/fccf57ceef02_create_submission_uuid_column.py
2
2002
"""create submission uuid column Revision ID: fccf57ceef02 Revises: 3d91d6948753 Create Date: 2018-07-12 00:06:20.891213 """ from alembic import op import sqlalchemy as sa import uuid # revision identifiers, used by Alembic. revision = 'fccf57ceef02' down_revision = '3d91d6948753' branch_labels = None depends_on = ...
agpl-3.0
methoxid/micropystat
tests/bytecode/pylib-tests/dummy_threading.py
210
2815
"""Faux ``threading`` version using ``dummy_thread`` instead of ``thread``. The module ``_dummy_threading`` is added to ``sys.modules`` in order to not have ``threading`` considered imported. Had ``threading`` been directly imported it would have made all subsequent imports succeed regardless of whether ``_thread`` w...
mit
alexis-jacq/Story_CoWriting
src/naoStoryTelling/story_gestures.py
4
3281
#!/usr/bin/env python #coding: utf-8 import sys import time import numpy as np import random import rospy from geometry_msgs.msg import PointStamped from std_msgs.msg import String, Empty, Header #from naoqi_bridge_msgs.msg import JointAnglesWithSpeed import tf from naoqi import ALProxy from naoqi import ALBroker fr...
isc
apdjustino/DRCOG_Urbansim
src/opus_gui/data_manager/controllers/xml_configuration/xml_controller_data_tools.py
1
15456
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE import os from lxml.etree import Element, SubElement, ElementTree from PyQt4.QtCore import QString, QFileInfo from PyQt4.QtGui import QMenu, QCursor, QFile...
agpl-3.0
windedge/odoo
openerp/addons/base/tests/test_ir_actions.py
291
20121
import unittest2 from openerp.osv.orm import except_orm import openerp.tests.common as common from openerp.tools import mute_logger class TestServerActionsBase(common.TransactionCase): def setUp(self): super(TestServerActionsBase, self).setUp() cr, uid = self.cr, self.uid # Models ...
agpl-3.0
okcompute/vim-runners
compiler/tests/test_nose_runner.py
2
10174
#!/usr/bin/env python # encoding: utf-8 import unittest from runners.nose import ( parse, ) class TestNoseRunner(unittest.TestCase): """Test case for runners.nose.py module""" def test_parse_lines(self): input = [ "FF...E..F.........................................", "=...
mit
GrognardsFromHell/TemplePlus
tpdatasrc/co8fixes/scr/py00395ghost.py
1
49243
from toee import * from utilities import * from Co8 import * from combat_standard_routines import * def san_dialog( attachee, triggerer ): san_start_combat(attachee, triggerer) return SKIP_DEFAULT def san_first_heartbeat( attachee, triggerer ): if (attachee.name == 14662 or attachee.name == 14663): # undead leg...
mit
mahak/neutron
neutron/plugins/ml2/drivers/mech_sriov/agent/sriov_nic_agent.py
2
25945
# Copyright 2014 Mellanox Technologies, Ltd # # 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 t...
apache-2.0
ravibhure/ansible
test/units/modules/network/nxos/test_nxos_evpn_vni.py
17
2837
# (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 dis...
gpl-3.0
danakj/chromium
third_party/WebKit/Tools/Scripts/webkitpy/tool/bot/commit_announcer_unittest.py
6
5713
# 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 f...
bsd-3-clause
njvack/masterfile
tests/scripts/test_validate_masterfile.py
1
1658
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/uwmadison-chm/masterfile # Copyright (c) 2020 Board of Regents of the University of Wisconsin System # Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Re...
mit
ruibarreira/linuxtrail
usr/lib/python3/dist-packages/gi/overrides/Gdk.py
5
14014
# -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab # # Copyright (C) 2009 Johan Dahlin <johan@gnome.org> # 2010 Simon van der Linden <svdlinden@src.gnome.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Ge...
gpl-3.0
openhatch/oh-mainline
vendor/packages/twisted/twisted/names/root.py
25
16400
# -*- test-case-name: twisted.names.test.test_rootresolve -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Resolver implementation for querying successive authoritative servers to lookup a record, starting from the root nameservers. @author: Jp Calderone todo:: robustify it doc...
agpl-3.0
hpproliant/ironic
ironic/common/glance_service/v2/image_service.py
1
11995
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
apache-2.0
MwanzanFelipe/rockletonfortune
lib/django/db/migrations/operations/models.py
290
21735
from __future__ import unicode_literals from django.db import models from django.db.migrations.operations.base import Operation from django.db.migrations.state import ModelState from django.db.models.options import normalize_together from django.utils import six from django.utils.functional import cached_property cl...
bsd-3-clause
SINGROUP/pycp2k
pycp2k/classes/_each423.py
1
1114
from pycp2k.inputsection import InputSection class _each423(InputSection): def __init__(self): InputSection.__init__(self) self.Just_energy = None self.Powell_opt = None self.Qs_scf = None self.Xas_scf = None self.Md = None self.Pint = None self.Meta...
lgpl-3.0
asttra/pysces
pysces/PyscesSBML.py
1
29664
""" PySCeS - Python Simulator for Cellular Systems (http://pysces.sourceforge.net) Copyright (C) 2004-2015 B.G. Olivier, J.M. Rohwer, J.-H.S Hofmeyr all rights reserved, Brett G. Olivier (bgoli@users.sourceforge.net) Triple-J Group for Molecular Cell Physiology Stellenbosch University, South Africa. Permiss...
bsd-3-clause
rvalyi/geraldo
site/newsite/django_1_0/django/utils/html.py
26
7416
"""HTML utilities suitable for global use.""" import re import string from django.utils.safestring import SafeData, mark_safe from django.utils.encoding import force_unicode from django.utils.functional import allow_lazy from django.utils.http import urlquote # Configuration for urlize() function. LEADING_PUNCTUATIO...
lgpl-3.0
fumen/gae-fumen
lib/tests/contrib/django_util/test_django_storage.py
21
5763
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
bsd-3-clause
waytai/odoo
addons/account_chart/__openerp__.py
313
1451
# -*- 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
McNetic/CouchPotatoServer-de
libs/dateutil/tz.py
217
32988
""" Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard Python datetime module. """ __license__ = "Simplified BSD" from six import string_types, PY3 import datetime import struct import time import sys import os relativedelta = None parser = None rrule = No...
gpl-3.0
tomkat83/PlexKodiConnect
resources/lib/library_sync/sections.py
2
28788
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals from logging import getLogger import copy from . import nodes from ..plex_db import PlexDB from ..plex_api import API from .. import kodi_db from .. import itemtypes, path_ops from .. import plex_functions ...
gpl-2.0
hamzehd/edx-platform
cms/djangoapps/contentstore/views/export_git.py
146
1723
""" This views handles exporting the course xml to a git repository if the giturl attribute is set. """ import logging from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.views.decorators.csrf import ensure_csrf_cookie from django.utils.translation...
agpl-3.0
caot/intellij-community
plugins/hg4idea/testData/bin/hgext/largefiles/overrides.py
90
46667
# Copyright 2009-2010 Gregory P. Ward # Copyright 2009-2010 Intelerad Medical Systems Incorporated # Copyright 2010-2011 Fog Creek Software # Copyright 2010-2011 Unity Technologies # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '...
apache-2.0
mavit/ansible
test/units/module_utils/aws/test_aws_module.py
12
6353
# -*- coding: utf-8 -*- # (c) 2017, Michael De La Rue # # 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
zding5/Microblog-Flask
flask/lib/python2.7/site-packages/whoosh/analysis/intraword.py
92
18991
# Copyright 2007 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
mit
supunkamburugamuva/course-builder
models/utils.py
4
2019
# Copyright 2012 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 ...
apache-2.0
jwlawson/tensorflow
tensorflow/python/training/basic_loops_test.py
142
3191
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
open-synergy/server-tools
mail_environment/__openerp__.py
17
2173
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
agpl-3.0
2014c2g6/c2g6
exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/binascii.py
103
24362
"""A pure Python implementation of binascii. Rather slow and buggy in corner cases. PyPy provides an RPython version too. """ # borrowed from https://bitbucket.org/pypy/pypy/src/f2bf94943a41/lib_pypy/binascii.py class Error(Exception): pass class Done(Exception): pass class Incomplete(Exception): pass ...
gpl-2.0
benchmark-subsetting/cere
src/cere/regions_selector.py
3
2931
#!/usr/bin/env python # This file is part of CERE. # # Copyright (c) 2013-2016, Universite de Versailles St-Quentin-en-Yvelines # # CERE 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 3 ...
lgpl-3.0
ikoz/mitmproxy
mitmproxy/console/__init__.py
2
22577
from __future__ import absolute_import import mailcap import mimetypes import tempfile import os import os.path import shlex import signal import stat import subprocess import sys import traceback import urwid import weakref from netlib import tcp from .. import controller, flow, script, contentviews from . import f...
mit
bitcity/django
tests/admin_utils/tests.py
45
13439
from __future__ import unicode_literals from datetime import datetime from decimal import Decimal from django import forms from django.conf import settings from django.contrib import admin from django.contrib.admin import helpers from django.contrib.admin.utils import ( NestedObjects, display_for_field, flatten, ...
bsd-3-clause
davidbkemp/node-gyp
gyp/test/copies/gyptest-default.py
264
1268
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies file copies using the build tool default. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('copies.gyp', chdir='src'...
mit
scottpurdy/nupic.vision
src/nupic/vision/regions/ImageSensorFilters/MultipleScales.py
2
2631
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
alkyl1978/gnuradio
gr-filter/python/filter/qa_freq_xlating_fir_filter.py
51
10944
#!/usr/bin/env python # # Copyright 2008,2010,2012,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 ...
gpl-3.0
ludwiktrammer/odoo
addons/mail/models/res_config.py
43
1546
# -*- coding: utf-8 -*- import urlparse import datetime from openerp import api, fields, models, tools class BaseConfiguration(models.TransientModel): """ Inherit the base settings to add a counter of failed email + configure the alias domain. """ _inherit = 'base.config.settings' fail_counter = fi...
agpl-3.0
cpcloud/banyan
setup.py
1
1717
#!/usr/bin/env python from __future__ import print_function import os from fnmatch import fnmatch from setuptools import setup, Extension def find_recursive(pattern, package='banyan'): for r, _, fs in os.walk(package): for f in fs: if fnmatch(f, pattern): yield os.path.join(...
bsd-3-clause
mfaruqui/crosslingual-cca
eval_cluster_embeddings.py
2
2715
import os import re import time import io import sys import argparse from collections import defaultdict import random def compute_shared_prefix_length(bitstring1, bitstring2): common_prefix_length = 0 for i in xrange(min(len(bitstring1), len(bitstring2))): if bitstring1[i] == bitstring2[i]: common_prefi...
gpl-2.0
jc0n/scrapy
scrapy/downloadermiddlewares/httpproxy.py
10
2034
import base64 from six.moves.urllib.request import getproxies, proxy_bypass from six.moves.urllib.parse import unquote try: from urllib2 import _parse_proxy except ImportError: from urllib.request import _parse_proxy from six.moves.urllib.parse import urlunparse from scrapy.utils.httpobj import urlparse_cached...
bsd-3-clause
Mazecreator/tensorflow
tensorflow/python/debug/cli/readline_ui_test.py
81
5646
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
jfcarr/astro-now
client_gui.py
1
1983
#!/usr/bin/python3 import astro_now_lib as AL from tkinter import * # Dayton, Ohio testLatitude = '39.759' testLongitude = '-84.192' myAstro = AL.CAstroNow(lat=testLatitude, long=testLongitude, prettyprint=True) #myAstro = AL.CAstro(lat=testLatitude, long=testLongitude, prettyprint=True, calcdate="2016/01/17 20:00:0...
mit
Oscarbralo/TopBlogCoder
Checkio/MooreNeightbourhood.py
1
1787
def count_neighbours(grid, row, col): neig = 0 if (col - 1 >= 0): if (grid[row][col - 1] == 1): neig += 1 if (col - 1 >= 0 and row - 1 >= 0): if (grid[row - 1][col -1] == 1): neig += 1 if (row - 1 >= 0): if (grid[row - 1][col] == 1): neig += 1 ...
mit
mbr0wn/gnuradio
gr-qtgui/examples/pyqt_time_raster_b.py
6
2126
#!/usr/bin/env python # # Copyright 2012,2013,2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr from gnuradio import blocks from gnuradio import blocks import sys try: from gnuradio import qtgui from PyQt5 import Qt...
gpl-3.0
SUNNYANDPJ/MongoAlchemy
mongoalchemy/fields/fields.py
1
25282
# The MIT License # # Copyright (c) 2010 Jeffrey Jenkins # # 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,...
mit
Cojacfar/Maker
comm/lib/python2.7/site-packages/django/http/utils.py
40
3501
""" Functions that modify an HTTP request or response in some way. """ # This group of functions are run as part of the response handling, after # everything else, including all response middleware. Think of them as # "compulsory response middleware". Be careful about what goes here, because # it's a little fiddly to ...
gpl-2.0
feredean/cs313
notes/6_anagrams_prof.py
1
2070
def anagrams(phrase, shortest = 2): return find_anagrams(phrase.replace(' ',''), '', shortest) def find_anagrams(letters, previous_word, shortest): results = set() print results for w in find_words(letters): if len(w) >= shortest and w >= previous_word: remainder = removed(letters, ...
mit
tophatmonocle/django-tastypie
tests/core/tests/authentication.py
4
8542
import base64 import time import warnings from django.contrib.auth.models import User from django.core import mail from django.http import HttpRequest from django.test import TestCase from tastypie.authentication import Authentication, BasicAuthentication, ApiKeyAuthentication, DigestAuthentication, OAuthAuthentication...
bsd-3-clause
shoyer/numpy
tools/swig/test/testVector.py
5
15010
#! /usr/bin/env python from __future__ import division, absolute_import, print_function # System imports from distutils.util import get_platform import os import sys import unittest # Import NumPy import numpy as np major, minor = [ int(d) for d in np.__version__.split(".")[:2] ] if major == 0: BadListError = TypeE...
bsd-3-clause
elssar/storm
filter_clause.py
1
1640
import datetime class FilterClause(object): FILTER_MAP = { "eq": "=", "neq": "!=", "lt": "<", "lte": "<=", "gt": ">", "gte": ">=", } def __init__(self, key=None, value=None): self.key = key self.value = value def __and__(self, obj): ...
mit
Alwnikrotikz/cortex-vfx
test/IECore/PolygonAlgoTest.py
12
4478
########################################################################## # # Copyright (c) 2008-2009, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
bsd-3-clause
umlfri/umlfri2
umlfri2/metamodel/projecttemplate/diagram.py
1
1079
from enum import Enum, unique from .checkdata import check_any @unique class DiagramTemplateState(Enum): closed = 1 opened = 2 locked = 3 class DiagramTemplate: def __init__(self, type, data, elements, connections, parent_id, state=DiagramTemplateState.closed): self.__type = type se...
gpl-3.0
danielharbor/openerp
openerp/report/print_xml.py
338
11063
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
luckielordie/conan
conans/client/cmd/download.py
1
2899
import os from conans.model.ref import PackageReference, ConanFileReference from conans.client.output import ScopedOutput from conans.errors import ConanException from conans.client.source import complete_recipe_sources def download(reference, package_ids, remote_name, recipe, registry, remote_manager, ...
mit
irenedet/Maxwell-ATC
mygeometry_1.py
1
3995
from ngsolve import * from netgen.csg import * from ngsolve.internal import * def ATCerror_brick_geometry(Rminus, Rplus, Rext, Rpml, delta, hmax): geometry = CSGeometry() o_ext = (Sphere(Pnt(0,0,0), Rext)).bc("outer") pml = Sphere(Pnt(0,0,0),Rpml) o_plus = Sphere(Pnt(0,0,0), Rplus).bc("interface") ...
mit
USGSDenverPychron/pychron
pychron/hardware/aerotech/aerotech_axis.py
1
4812
# =============================================================================== # Copyright 2011 Jake Ross # # 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/licens...
apache-2.0
GhostThrone/django
tests/utils_tests/test_decorators.py
319
4870
from django.http import HttpResponse from django.template import engines from django.template.response import TemplateResponse from django.test import RequestFactory, SimpleTestCase from django.utils.decorators import classproperty, decorator_from_middleware class ProcessViewMiddleware(object): def process_view(s...
bsd-3-clause