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
GuillaumeArruda/INF8601
inf8601-lab1-2.1.0/preprocess.py
1
1847
#!/usr/bin/python # # Utilitaire pour pre-traiter les resultats # import os # variables out_dir = "results" base = "time_dragonizer" suffix = ".data" def get_or_create(data, key): if (data.has_key(key) == False): data[key] = {} return data[key] def get_or_create_path(data, path_elem): if (len(path_elem) == 0):...
bsd-3-clause
Nikea/VisTrails
vistrails/packages/spreadsheet/identifiers.py
2
2038
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
bsd-3-clause
ximion/dak-dep11
dak/dakdb/__init__.py
10
1046
""" Database update scripts for usage with B{dak update-db} @contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2008 Michael Casadevall <mcasadevall@debian.org> @license: GNU General Public License version 2 or later Update scripts have to C{import psycopg2} and C{from daklib.dak_exceptions import DBUpdat...
gpl-2.0
eHealthAfrica/kivy
doc/sources/sphinxext/kivy_pygments_theme.py
76
4901
# kivy pygments style based on flask/tango style from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal class KivyStyle(Style): # The background color is set in kivystyle.sty background_color ...
mit
pasiegel/SickGear
lib/httplib2/iri2uri.py
885
3850
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
gpl-3.0
mattdm/dnf
tests/cli/commands/test_repolist.py
13
1450
# Copyright (C) 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be u...
gpl-2.0
liqi328/rjrepaircompany
django/views/debug.py
152
33304
import datetime import os import re import sys import types from django.conf import settings from django.http import HttpResponse, HttpResponseServerError, HttpResponseNotFound from django.template import (Template, Context, TemplateDoesNotExist, TemplateSyntaxError) from django.template.defaultfilters import forc...
bsd-3-clause
chrsrds/scikit-learn
sklearn/utils/tests/test_murmurhash.py
21
2637
# Author: Olivier Grisel <olivier.grisel@ensta.org> # # License: BSD 3 clause import numpy as np from sklearn.utils.murmurhash import murmurhash3_32 from numpy.testing import assert_array_almost_equal from numpy.testing import assert_array_equal def test_mmhash3_int(): assert murmurhash3_32(3) == 847579505 a...
bsd-3-clause
hasteur/pywikibot_minimal
userinterfaces/wxpython_interface.py
5
1983
# -*- coding: utf-8 -*- __version__ = '$Id: 139dc689ef6baf1ed224d300766f7b7ea658cb0f $' import sys; sys.path.append('..') import re import terminal_interface import wx app = wx.App() class UI(terminal_interface.UI): def __init__(self): pass def input(self, question, password = False): """...
gpl-3.0
nagyistoce/photivo
scons-local-2.2.0/SCons/Sig.py
14
2392
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # 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 ...
gpl-3.0
nortikin/sverchok
old_nodes/formula3.py
2
6928
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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. # # This program is distrib...
gpl-3.0
lebabouin/CouchPotatoServer-develop
libs/apscheduler/events.py
144
2529
__all__ = ('EVENT_SCHEDULER_START', 'EVENT_SCHEDULER_SHUTDOWN', 'EVENT_JOBSTORE_ADDED', 'EVENT_JOBSTORE_REMOVED', 'EVENT_JOBSTORE_JOB_ADDED', 'EVENT_JOBSTORE_JOB_REMOVED', 'EVENT_JOB_EXECUTED', 'EVENT_JOB_ERROR', 'EVENT_JOB_MISSED', 'EVENT_ALL', 'SchedulerEvent', 'JobStoreEve...
gpl-3.0
gandelman-a/neutron-lbaas
neutron_lbaas/db/migration/alembic_migrations/versions/lbaasv2_tls.py
2
1818
# Copyright 2014 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
Jumpscale/web
pythonlib/gdata/tlslite/integration/ClientHelper.py
285
7021
""" A helper class for using TLS Lite with stdlib clients (httplib, xmlrpclib, imaplib, poplib). """ from gdata.tlslite.Checker import Checker class ClientHelper: """This is a helper class used to integrate TLS Lite with various TLS clients (e.g. poplib, smtplib, httplib, etc.)""" def __init__...
apache-2.0
BlueLens/bl-magi
tensorflow/object_detection/core/data_decoder.py
23
1349
# 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
CPFDSoftware-Tony/gmv
utils/Mesa/Mesa-7.8.2/src/mesa/glapi/gen/glX_proto_common.py
46
3187
#!/usr/bin/env python # (C) Copyright IBM Corporation 2004, 2005 # 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 # ...
gpl-3.0
jjlee3/openthread
tools/harness-automation/cases/sed_6_2_1.py
16
1869
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # 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 # notic...
bsd-3-clause
pombreda/pydbgr
test/unit/test-lib-pp.py
2
1146
#!/usr/bin/env python 'Unit test for trepan.lib.pp' import sys, unittest from import_relative import import_relative Mpp = import_relative('lib.pp', '...trepan') class TestLibPrint(unittest.TestCase): def setUp(self): self.msgs = [] return def msg_nocr(self, msg): if len(self.msgs) >...
gpl-3.0
wbc2010/django1.2.5
django/contrib/gis/tests/relatedapp/models.py
274
1686
from django.contrib.gis.db import models from django.contrib.localflavor.us.models import USStateField class Location(models.Model): point = models.PointField() objects = models.GeoManager() def __unicode__(self): return self.point.wkt class City(models.Model): name = models.CharField(max_length=50) ...
bsd-3-clause
ffsdmad/flask
flask/sessions.py
142
14369
# -*- coding: utf-8 -*- """ flask.sessions ~~~~~~~~~~~~~~ Implements cookie based sessions based on itsdangerous. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import uuid import hashlib from base64 import b64encode, b64decode from datetime import dateti...
bsd-3-clause
sergiohgz/incubator-airflow
airflow/contrib/operators/file_to_gcs.py
11
2717
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
ccastell/Transfer-System
Website/env/lib/python3.5/site-packages/setuptools/config.py
41
16088
from __future__ import absolute_import, unicode_literals import io import os import sys from collections import defaultdict from functools import partial from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.py26compat import import_module from six import string_types def read_configu...
apache-2.0
alvarolopez/nova
nova/tests/functional/v3/test_personality.py
27
1690
# Copyright 2014 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 ...
apache-2.0
bmedx/modulestore
xmodule/modulestore/xml.py
1
41091
import hashlib import itertools import json import logging import os import re import sys import glob from collections import defaultdict from cStringIO import StringIO from fs.osfs import OSFS from importlib import import_module from lxml import etree from path import Path as path from contextlib import contextmanage...
apache-2.0
johnkeepmoving/oss-ftp
python27/win32/Lib/site-packages/requests/packages/chardet/jpcntx.py
1777
19348
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
2014c2g5/2015cda_g3_0421
static/Brython3.1.1-20150328-091302/Lib/multiprocessing/pool.py
694
23263
# # Module providing the `Pool` class for managing a process pool # # multiprocessing/pool.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # __all__ = ['Pool'] # # Imports # import threading import queue import itertools import collections import time from multiprocessing ...
gpl-3.0
massot/odoo
addons/account/account_cash_statement.py
283
15868
# encoding: utf-8 ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 PC Solutions (<http://pcsol.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # i...
agpl-3.0
oliverlee/sympy
sympy/simplify/tests/test_radsimp.py
54
15672
from sympy import ( sqrt, Derivative, symbols, collect, Function, factor, Wild, S, collect_const, log, fraction, I, cos, Add, O,sin, rcollect, Mul, radsimp, diff, root, Symbol, Rational, exp) from sympy.core.mul import _unevaluated_Mul as umul from sympy.simplify.radsimp import _unevaluated_Add, collect_sq...
bsd-3-clause
beacloudgenius/edx-platform
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
4
146687
""" Provides full versioning CRUD and representation for collections of xblocks (e.g., courses, modules, etc). Representation: * course_index: a dictionary: ** '_id': a unique id which cannot change, ** 'org': the org's id. Only used for searching not identity, ** 'course': the course's catalog number ...
agpl-3.0
jlspyaozhongkai/Uter
third_party_backup/Python-2.7.9/Lib/distutils/util.py
64
18037
"""distutils.util Miscellaneous utility functions -- anything that doesn't fit into one of the other *util.py modules. """ __revision__ = "$Id$" import sys, os, string, re from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn from distutils import ...
gpl-3.0
ukanga/SickRage
lib/unidecode/x053.py
252
4616
data = ( 'Yun ', # 0x00 'Mwun ', # 0x01 'Nay ', # 0x02 'Gai ', # 0x03 'Gai ', # 0x04 'Bao ', # 0x05 'Cong ', # 0x06 '[?] ', # 0x07 'Xiong ', # 0x08 'Peng ', # 0x09 'Ju ', # 0x0a 'Tao ', # 0x0b 'Ge ', # 0x0c 'Pu ', # 0x0d 'An ', # 0x0e 'Pao ', # 0x0f 'Fu ', # 0x10 'Gong...
gpl-3.0
harryface/__1255548754516tftffvvgcgvgvg
blog/models.py
1
1433
from django.db import models from django.core.urlresolvers import reverse from django.template.defaultfilters import slugify # Create your models here. class Post (models.Model): title = models.CharField(max_length=40) post_image = models.ImageField(upload_to='static/blog', blank=True) post_body = models.TextField...
gpl-3.0
EmreAtes/spack
var/spack/repos/builtin/packages/py-numpydoc/package.py
5
1666
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
ovnicraft/openerp-restaurant
account_analytic_analysis/__openerp__.py
5
2322
# -*- 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
mtnman38/Aggregate
Executables/Aggregate 0.8.7 for Macintosh.app/Contents/Resources/lib/python2.7/email/mime/message.py
573
1286
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Class representing message/* MIME documents.""" __all__ = ['MIMEMessage'] from email import message from email.mime.nonmultipart import MIMENonMultipart class MIMEMessage(MIMENonMultipart): """Class...
gpl-2.0
parasite-genomics/Pipelines
HDR.py
1
5656
#! /usr/bin/env python # input parameters header = raw_input('\nhdr: header (1=Yes, 0=No) ?\n') pos_diff = raw_input('hdr: distance (clustering condition) ?\n') cl_size = raw_input('hdr: min cluster size ?\n') collapse_size = raw_input('hdr: min distance to collapse clusters ?\n\n') infile = raw_input('hdr: data filen...
apache-2.0
BrianVermeire/PyFR
pyfr/backends/mic/base.py
1
2224
# -*- coding: utf-8 -*- import numpy as np from pyfr.backends.base import BaseBackend from pyfr.mpiutil import get_local_rank class MICBackend(BaseBackend): name = 'mic' def __init__(self, cfg): super().__init__(cfg) import pymic as mic # Get the device ID to use devid = c...
bsd-3-clause
nikoonia/gem5v
src/mem/cache/BaseCache.py
2
4044
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
tomaaron/raiden
raiden/tests/integration/test_endpointregistry.py
1
1619
# -*- coding: utf-8 -*- import pytest from raiden.utils import make_address, get_contract_path, privatekey_to_address from raiden.network.discovery import ContractDiscovery @pytest.mark.timeout(60) @pytest.mark.parametrize('number_of_nodes', [1]) @pytest.mark.parametrize('poll_timeout', [80]) def test_endpointregist...
mit
naufraghi/python-xlib
examples/childwin.py
3
3884
#!/usr/bin/python # # examples/childwin.py -- demonstrate child windows. # # Copyright (C) 2008 David Bronke <whitelynx@gmail.com> # Copyright (C) 2002 Peter Liljenberg <petli@ctrl-c.liu.se> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
gpl-2.0
vrenaville/ngo-addons-backport
addons/edi/models/__init__.py
442
1116
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
agpl-3.0
btat/Booktype
lib/booktype/apps/edit/views.py
1
8544
# -*- coding: utf-8 -*- import datetime from django.shortcuts import render from django.http import HttpResponse from django.views.generic.base import TemplateView from django.views.generic.edit import FormView from django.contrib.auth.decorators import login_required from django.db import transaction from django.c...
agpl-3.0
isyippee/nova
nova/api/openstack/compute/legacy_v2/contrib/flavorextradata.py
79
2440
# Copyright 2012 OpenStack Foundation # Copyright 2011 Canonical Ltd. # 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/license...
apache-2.0
levkar/odoo
addons/hr_gamification/models/gamification.py
53
1560
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import ValidationError class GamificationBadgeUser(models.Model): """User having received a badge""" _inherit = 'gamification.badge.user' employ...
agpl-3.0
oliciv/youtube-dl
youtube_dl/extractor/niconico.py
34
10884
# encoding: utf-8 from __future__ import unicode_literals import re import json import datetime from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, compat_urlparse, ) from ..utils import ( encode_dict, ExtractorError, int_or_none, parse_dura...
unlicense
sheepray/volatility
volatility/debug.py
54
2718
# Volatility # # Authors: # Michael Cohen <scudette@users.sourceforge.net> # # This file is part of Volatility. # # Volatility 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, o...
gpl-2.0
fran-penedo/dreal
benchmarks/network/water/water-triple-sat.py
11
6919
from gen import * ########## # shared # ########## flow_var[0] = """ (declare-fun tau () Real) (declare-fun x1 () Real) (declare-fun x2 () Real) (declare-fun x3 () Real) """ flow_dec[0] = """ (define-ode flow_1 ((= d/dt[x1] (/ (- 5 (* (* 0.5 (^ (* 2 9.80665) 0.5)) (^ x1 0.5))) 2)) (= d/dt[x2] (...
gpl-3.0
qrkourier/ansible
test/runner/lib/cloud/vcenter.py
32
4693
"""VMware vCenter plugin for integration tests.""" from __future__ import absolute_import, print_function import os from lib.cloud import ( CloudProvider, CloudEnvironment, ) from lib.util import ( find_executable, display, ) from lib.docker_util import ( docker_run, docker_rm, docker_in...
gpl-3.0
userbz/DeMix
deprecated/Version_0/post1_psmMzmlExtend.py
1
1529
# Bo.Zhang@ki.se # extending PSM list from second-pass Morpheus search for rescoring import sys import pymzml import numpy import pandas def nearest(target, arr): try: return arr[numpy.abs(arr - target).argmin()] except: return 0 def peak_pair(target, arr): match = [nearest(p, arr) for ...
mit
jamessergeant/pylearn2
pylearn2/models/mnd.py
49
4148
__authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" from pylearn2.models.model import Model from pylearn2.utils import sharedX import numpy as np impo...
bsd-3-clause
alexandrujuncu/sos
sos/plugins/openstack_cinder.py
7
3713
# Copyright (C) 2009 Red Hat, Inc., Joey Boggs <jboggs@redhat.com> # Copyright (C) 2012 Rackspace US, Inc., # Justin Shepherd <jshepher@rackspace.com> # Copyright (C) 2013 Red Hat, Inc., Flavio Percoco <fpercoco@redhat.com> # Copyright (C) 2013 Red Hat, Inc., Jeremy Agee <jagee@redhat.com> # This pr...
gpl-2.0
thnee/ansible
test/units/modules/network/onyx/test_onyx_config.py
52
4615
# # (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
thaim/ansible
lib/ansible/modules/network/cli/cli_config.py
12
15208
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Ansible by Red Hat, 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', ...
mit
Hao-Liu/avocado
selftests/unit/test_test.py
1
3380
import os import shutil import sys import tempfile if sys.version_info[:2] == (2, 6): import unittest2 as unittest else: import unittest from avocado.core import test from avocado.utils import script PASS_SCRIPT_CONTENTS = """#!/bin/sh true """ FAIL_SCRIPT_CONTENTS = """#!/bin/sh false """ class TestClass...
gpl-2.0
kenshay/ImageScript
Script_Runner/PYTHON/Lib/asyncio/__init__.py
11
1169
"""The asyncio package, tracking PEP 3156.""" # flake8: noqa import sys # This relies on each of the submodules having an __all__ variable. from .base_events import * from .coroutines import * from .events import * from .futures import * from .locks import * from .protocols import * from .runners import * from .queu...
gpl-3.0
zaxliu/scipy
scipy/optimize/_root.py
109
26007
""" Unified interfaces to root finding algorithms. Functions --------- - root : find a root of a vector function. """ from __future__ import division, print_function, absolute_import __all__ = ['root'] import numpy as np from scipy._lib.six import callable from warnings import warn from .optimize import MemoizeJa...
bsd-3-clause
iivic/BoiseStateX
lms/djangoapps/instructor/hint_manager.py
110
11466
""" Views for hint management. Get to these views through courseurl/hint_manager. For example: https://courses.edx.org/courses/MITx/2.01x/2013_Spring/hint_manager These views will only be visible if FEATURES['ENABLE_HINTER_INSTRUCTOR_VIEW'] = True """ import json import re from django.http import HttpResponse, Http...
agpl-3.0
Immortalin/python-for-android
python-modules/twisted/twisted/internet/test/test_sigchld.py
57
6405
# Copyright (c) 2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet._sigchld}, an alternate, superior SIGCHLD monitoring API. """ import os, signal, errno from twisted.python.log import msg from twisted.trial.unittest import TestCase from twisted.internet.fdesc import setNon...
apache-2.0
bill307/shadowsocks
shadowsocks/udprelay.py
924
11154
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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
h3biomed/luigi
test/task_bulk_complete_test.py
23
2415
# -*- coding: utf-8 -*- # # Copyright 2012-2016 Spotify AB # # 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
skipmodea1/plugin.video.xbmctorrent
resources/site-packages/xbmcswift2/constants.py
34
1517
''' xbmcswift2.constants -------------------- This module contains some helpful constants which ease interaction with XBMC. :copyright: (c) 2012 by Jonathan Beluch :license: GPLv3, see LICENSE for more details. ''' from xbmcswift2 import xbmcplugin class SortMethod(object): '''Static cla...
gpl-3.0
rembish/homebank-wui
setup.py
1
1175
#!/usr/bin/env python try: from debian.changelog import Changelog except ImportError: class Changelog(object): def __init__(self, _): pass def get_version(self): return '0.0.0' from os import environ from os.path import abspath, dirname, join from setuptools import setu...
bsd-3-clause
retomerz/intellij-community
python/helpers/pydev/pydevd_attach_to_process/winappdbg/plugins/do_exchain.py
100
2307
#!~/.wine/drive_c/Python25/python.exe # -*- coding: utf-8 -*- # Command line debugger using WinAppDbg # Show exception handlers list # 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 follo...
apache-2.0
SDSG-Invenio/invenio
invenio/legacy/websubmit/functions/Create_Cplx_Approval.py
13
2580
# This file is part of Invenio. # Copyright (C) 2007, 2008, 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 # License, or (at your option) any later version...
gpl-2.0
jendap/tensorflow
tensorflow/contrib/constrained_optimization/__init__.py
39
1769
# 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
polimediaupv/edx-platform
lms/djangoapps/mobile_api/social_facebook/friends/views.py
85
2439
""" Views for friends info API """ from rest_framework import generics, status from rest_framework.response import Response from opaque_keys.edx.keys import CourseKey from student.models import CourseEnrollment from ...utils import mobile_view from ..utils import get_friends_from_facebook, get_linked_edx_accounts,...
agpl-3.0
kalxas/QGIS
tests/src/python/test_qgslayout.py
30
25611
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsLayout .. 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. """ __author...
gpl-2.0
ajayuranakar/django-blog
lib/python2.7/site-packages/django/contrib/gis/db/backends/oracle/schema.py
608
4050
from django.contrib.gis.db.models.fields import GeometryField from django.db.backends.oracle.schema import DatabaseSchemaEditor from django.db.backends.utils import truncate_name class OracleGISSchemaEditor(DatabaseSchemaEditor): sql_add_geometry_metadata = (""" INSERT INTO USER_SDO_GEOM_METADATA ...
gpl-3.0
Spoken-tutorial/spoken-website
spoken/forms.py
1
13015
# Third Party Stuff from builtins import str from builtins import object from django import forms from django.db.models import Count, Q from django.core.exceptions import ValidationError # Spoken Tutorial Stuff from creation.models import TutorialResource, FossCategory from events.models import Testimonials, Induction...
gpl-3.0
kingvuplus/ops
lib/python/Plugins/SystemPlugins/PositionerSetup/rotor_calc.py
103
3251
import math f = 1.00 / 298.257 # Earth flattning factor r_sat = 42164.57 # Distance from earth centre to satellite r_eq = 6378.14 # Earth radius def calcElevation(SatLon, SiteLat, SiteLon, Height_over_ocean = 0): a0 = 0.58804392 a1 = -0.17941557 a2 = 0.29906946E-1 a3 = -0.25187400E-2 a4 = 0.82622101E-4 sin...
gpl-2.0
sosguns2002/interactive-mining
interactive-mining-3rdparty-madis/madis/src/lib/pyparsing.py
16
148777
# module pyparsing.py # # Copyright (c) 2003-2009 Paul T. McGuire # # 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, cop...
gpl-3.0
t-abe/chainer
cupy/statistics/order.py
5
1527
def amin(a, axis=None, out=None, keepdims=False, dtype=None): """Returns the minimum of an array or the minimum along an axis. Args: a (cupy.ndarray): Array to take the minimum. axis (int): Along which axis to take the minimum. The flattened array is used by default. out (cu...
mit
jayceyxc/hue
desktop/core/ext-py/markdown/markdown/extensions/meta.py
131
2607
#!usr/bin/python """ Meta Data Extension for Python-Markdown ======================================= This extension adds Meta Data handling to markdown. Basic Usage: >>> import markdown >>> text = '''Title: A Test Doc. ... Author: Waylan Limberg ... John Doe ... Blank_Data: ... ....
apache-2.0
feliperfranca/FelipeRFranca_site
django/utils/regex_helper.py
361
12079
""" Functions for reversing a regular expression (used in reverse URL resolving). Used internally by Django and not intended for external use. This is not, and is not intended to be, a complete reg-exp decompiler. It should be good enough for a large class of URLS, however. """ # Mapping of an escape character to a r...
bsd-3-clause
EvanK/ansible
lib/ansible/plugins/action/win_updates.py
29
11371
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json from ansible.errors import AnsibleError from ansible.module_utils._text import to_text from ansible.module_utils.parsing.convert_bool import boolean from ansible.parsing.yaml.objects import AnsibleUnicode from ansible....
gpl-3.0
sgraham/nope
third_party/WebKit/Tools/Scripts/webkitpy/common/config/irc.py
69
1467
# 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
Pathfinderdev/Pathfinder
share/qt/extract_strings_qt.py
1294
1784
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by xgettext. Ret...
mit
liuyxpp/blohg
blohg/ext.py
2
5784
# -*- coding: utf-8 -*- """ blohg.ext ~~~~~~~~~ Blohg support for 3rd-party extensions. :copyright: (c) 2010-2013 by Rafael Goncalves Martins :license: GPL-2, see LICENSE for more details. """ from flask import Blueprint from flask.ctx import _app_ctx_stack from flask.globals import current_app f...
gpl-2.0
Valloric/ycmd
ycmd/tests/clang/include_cache_test.py
5
6642
# Copyright (C) 2017 Davit Samvelyan davitsamvelyan@gmail.com # Synopsys. # # This file is part of ycmd. # # ycmd 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 Lice...
gpl-3.0
openembedded/openembedded
contrib/qa/bugzilla.py
32
140512
# # BugZilla query page scanner to work with ancient # Debian Stable bugzilla installationss # # This includes three test sites # site contains one bug entry # all_bugs contains all Openmoko bugs as of \today # no_bug is a query which showed no bug # from HTMLParser import HTMLParser class BugQueryExtractor(HT...
mit
h3llrais3r/SickRage
tests/sickrage_tests/system/restart_tests.py
11
2065
# coding=utf-8 # This file is part of SickRage. # # URL: https://SickRage.GitHub.io # Git: https://github.com/SickRage/SickRage.git # # SickRage 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
heke123/chromium-crosswalk
tools/perf/benchmarks/benchmark_unittest.py
9
3252
# Copyright 2014 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. """For all the benchmarks that set options, test that the options are valid.""" from collections import defaultdict import os import unittest from core imp...
bsd-3-clause
android-ia/platform_external_chromium_org
tools/telemetry/telemetry/util/find_dependencies.py
44
9255
# Copyright 2014 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 fnmatch import imp import logging import modulefinder import optparse import os import sys import zipfile from telemetry import benchmark from teleme...
bsd-3-clause
yamt/ryu
ryu/contrib/tinyrpc/client.py
41
3068
#!/usr/bin/env python # -*- coding: utf-8 -*- from .exc import RPCError class RPCClient(object): """Client for making RPC calls to connected servers. :param protocol: An :py:class:`~tinyrpc.RPCProtocol` instance. :param transport: A :py:class:`~tinyrpc.transports.ClientTransport` i...
apache-2.0
ran5515/DeepDecision
tensorflow/contrib/keras/api/keras/losses/__init__.py
46
2097
# 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
jwaterfield/echidna
echidna/core/config.py
3
30495
""" Echidna's config module. Contains the :class:`Config` class and all classes that inherit from it. """ from echidna.core.parameter import (RateParameter, ScaleParameter, ShiftParameter, ResolutionParameter, SpectraParameter) import echidna.util...
mit
takeshineshiro/django
django/contrib/gis/geos/geometry.py
62
23807
""" This module contains the 'base' GEOSGeometry object -- all GEOS Geometries inherit from this object. """ from __future__ import unicode_literals import json from ctypes import addressof, byref, c_double from django.contrib.gis import gdal from django.contrib.gis.geometry.regex import hex_regex, json_regex, wkt_...
bsd-3-clause
kjenagan/support-tools
wiki_to_md/impl/constants.py
151
6658
# Copyright 2014 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...
apache-2.0
njmube/erpnext
erpnext/accounts/report/gross_profit/gross_profit.py
2
11352
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _, scrub from erpnext.stock.utils import get_incoming_rate from frappe.utils import flt def execute(filters=None): i...
agpl-3.0
bauruine/ansible
lib/ansible/utils/module_docs.py
37
3751
#!/usr/bin/env python # (c) 2012, Jan-Piet Mens <jpmens () 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...
gpl-3.0
christabor/csscms
csscms/parser.py
1
18081
from tinycss.page3 import CSSPage3Parser import css_properties from css_options import css_opts from validations import ValidationHelpersMixin DEBUG = True if __name__ == '__main__' else False class MissingTokenType(Exception): def __init__(self): print('Invalid token type: please add a ' ...
mit
geekaia/edx-platform
common/lib/xmodule/xmodule/modulestore/xml_importer.py
2
34084
import logging import os import mimetypes from path import path import json from .xml import XMLModuleStore, ImportSystem, ParentTracker from xblock.runtime import KvsFieldData, DictKeyValueStore from xmodule.x_module import XModuleDescriptor from opaque_keys.edx.keys import UsageKey from xblock.fields import Scope, R...
agpl-3.0
linucks/ample
ample/util/benchmark_util.py
1
21169
""" Created on 24 Oct 2014 @author: jmht """ import copy import glob import logging import os import pandas as pd import shutil import sys from ample.util import ample_util, csymmatch, mtz_util, pdb_edit, pdb_model, reforigin, residue_map, rio, shelxe, tm_util logger = logging.getLogger(__name__) _oldroot = None _...
bsd-3-clause
jijo-paulose/django-profile
userprofile/forms.py
8
5911
from django import forms from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ImproperlyConfigured from django.db import models from django.utils.translation import ugettext as _ from django.conf import settings from django.contrib.auth.models import User, SiteProfileNotAvailable fro...
bsd-2-clause
Stavitsky/neutron
neutron/tests/functional/sanity/test_sanity.py
16
2331
# Copyright (c) 2014 OpenStack Foundation. # 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...
apache-2.0
HyperBaton/ansible
lib/ansible/modules/network/onyx/onyx_syslog_files.py
9
9770
#!/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
auth0/auth0-python
auth0/v3/management/roles.py
1
6446
from .rest import RestClient class Roles(object): """Auth0 roles endpoints Args: domain (str): Your Auth0 domain, e.g: 'username.auth0.com' token (str): Management API v2 Token telemetry (bool, optional): Enable or disable Telemetry (defaults to True) timeout (f...
mit
jaj42/GraPhysio
graphysio/ui/filter.py
2
1823
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'filter.ui' # # Created by: PyQt5 UI code generator 5.12.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Filter(object): def setupUi(self, Filter): Filter.setObjec...
isc
chrisfilda/edx_platform
common/lib/xmodule/xmodule/open_ended_grading_classes/peer_grading_service.py
10
5756
import json import logging from dogapi import dog_stats_api from .grading_service_module import GradingService, GradingServiceError log = logging.getLogger(__name__) class PeerGradingService(GradingService): """ Interface with the grading controller for peer grading """ METRIC_NAME = 'edxapp.open_e...
agpl-3.0
sallaire/Sick-Beard
sickbeard/history.py
35
2768
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
gpl-3.0