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
rrooij/youtube-dl
youtube_dl/extractor/mtv.py
18
18984
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_str, compat_xpath, ) from ..utils import ( ExtractorError, find_xpath_attr, fix_xml_ampersands, float_or_none, HEADRequest, RegexNotFoundError, sanitized_Request, s...
unlicense
gangadharkadam/saloon_frappe_install
frappe/model/naming.py
17
5881
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import now_datetime, cint def set_new_name(doc): """Sets the `name`` property for the document based on various rules. 1. ...
mit
alshedivat/tensorflow
tensorflow/python/data/experimental/kernel_tests/serialization/shuffle_and_repeat_dataset_serialization_test.py
21
1562
# 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
HesselTjeerdsma/Cyber-Physical-Pacman-Game
Algor/flask/lib/python2.7/site-packages/past/translation/__init__.py
61
18459
# -*- coding: utf-8 -*- """ past.translation ================== The ``past.translation`` package provides an import hook for Python 3 which transparently runs ``futurize`` fixers over Python 2 code on import to convert print statements into functions, etc. It is intended to assist users in migrating to Python 3.x eve...
apache-2.0
Alir3z4/django-crequest
crequest/middleware.py
3
1411
import threading try: from django.utils.deprecation import MiddlewareMixin except ImportError: MiddlewareMixin = object class CrequestMiddleware(MiddlewareMixin): """ Provides storage for the "current" request object, so that code anywhere in your project can access it, without it having to be pas...
bsd-3-clause
foss-transportationmodeling/rettina-server
.env/local/lib/python2.7/encodings/iso8859_1.py
593
13432
""" Python Character Mapping Codec iso8859_1 generated from 'MAPPINGS/ISO8859/8859-1.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='...
apache-2.0
40223110/2015cd_midterm-
static/Brython3.1.1-20150328-091302/Lib/subprocess.py
728
67282
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/2.4/license for licensing details. r"""subprocess - Subpr...
gpl-3.0
KiranJKurian/XScheduler
venv/lib/python2.7/site-packages/oauth2client/service_account.py
52
5038
# 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 ...
mit
slank/ansible
contrib/vault/vault-keyring.py
35
2367
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2014, Matt Martz <matt@sivel.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 Licens...
gpl-3.0
benthomasson/pyre
pyre/pyre_node.py
3
21338
import zmq import uuid import logging import struct import socket import time from .zactor import ZActor from .zbeacon import ZBeacon from .zre_msg import ZreMsg from .pyre_peer import PyrePeer from .pyre_group import PyreGroup BEACON_VERSION = 1 ZRE_DISCOVERY_PORT = 5670 REAP_INTERVAL = 1.0 # Once per second logge...
lgpl-3.0
loneknightpy/spark
examples/src/main/python/ml/decision_tree_classification_example.py
123
3003
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
memtoko/django
django/utils/formats.py
291
8379
import datetime import decimal import unicodedata from importlib import import_module from django.conf import settings from django.utils import dateformat, datetime_safe, numberformat, six from django.utils.encoding import force_str from django.utils.functional import lazy from django.utils.safestring import mark_safe...
bsd-3-clause
CollabQ/CollabQ
vendor/django/forms/fields.py
3
36775
""" Field classes. """ import copy import datetime import os import re import time import urlparse try: from cStringIO import StringIO except ImportError: from StringIO import StringIO # Python 2.3 fallbacks try: from decimal import Decimal, DecimalException except ImportError: from django.utils._deci...
apache-2.0
soarpenguin/ansible
lib/ansible/modules/network/sros/sros_command.py
8
7153
#!/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.0', 'status': ['preview'], 'suppo...
gpl-3.0
sam-m888/gramps
windows/nonAIO/nsis/gcheck.py
13
1485
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2008 Steve Hall # Copyright (C) 2008 Stephen George # # 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 versi...
gpl-2.0
piotroxp/scibibscan
scib/lib/python3.5/site-packages/numpy/lib/arraypad.py
48
52230
""" The arraypad module contains a group of functions to pad values onto the edges of an n-dimensional array. """ from __future__ import division, absolute_import, print_function import numpy as np __all__ = ['pad'] ############################################################################### # Private utility ...
mit
wevoice/wesub
apps/webdriver_testing/check_api/test_subtitles.py
5
7543
import os import time import codecs from rest_framework.test import APILiveServerTestCase, APIClient from videos.models import * from utils.factories import * from webdriver_testing.webdriver_base import WebdriverTestCase from webdriver_testing.pages.site_pages import video_language_page from webdriver_testing.pages.si...
agpl-3.0
davipeterlini/routeflow_ha
pox/pox/lib/revent/revent.py
25
19848
# Copyright 2011 James McCauley # # This file is part of POX. # # POX 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. # # POX is distri...
apache-2.0
menardorama/ReadyNAS-Add-ons
headphones-1.0.0/debian/headphones/etc/apps/headphones/headphones/transmission.py
7
5994
# This file is part of Headphones. # # Headphones 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. # # Headphones is distributed i...
gpl-2.0
trishnaguha/ansible
lib/ansible/modules/storage/netapp/netapp_e_amg_role.py
52
7909
#!/usr/bin/python # (c) 2016, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
carolinux/QGIS
scripts/context_help_id.py
48
2262
#!/usr/bin/python """ /*************************************************************************** context_help_id.py ------------------- begin : 2009-11-16 copyright : (C) 2009 by Gary E.Sherman email : gs...
gpl-2.0
zhaishaomin/LDS-prefetcher-research
gem5_src/arch/arm/ArmPMU.py
39
5706
# -*- mode:python -*- # Copyright (c) 2009-2014 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 implement...
apache-2.0
bikash/kaggleCompetition
microsoft malware/Malware_Say_No_To_Overfitting/kaggle_Microsoft_malware_small/unique_gram.py
2
1850
from csv import DictReader from datetime import datetime import pickle import heapq import sys # load data def load_label(path, label): result = [] for row in DictReader(open(path)): if int(row['Class']) == label: result.append((row['Id'])) return result # generate grams dictionary fo...
apache-2.0
davidyezsetz/kuma
vendor/packages/ipython/IPython/kernel/map.py
7
3762
# encoding: utf-8 """Classes used in scattering and gathering sequences. Scattering consists of partitioning a sequence and sending the various pieces to individual nodes in a cluster. """ __docformat__ = "restructuredtext en" #------------------------------------------------------------------------------- # Copyr...
mpl-2.0
cloudsigma/cloud-init
tests/unittests/test_data.py
6
14823
"""Tests for handling of userdata within cloud init.""" import StringIO import gzip import logging import os from email.mime.application import MIMEApplication from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from cloudinit import handlers from cloudinit import helpers as c_helper...
gpl-3.0
areski/cdr-stats
cdr_stats/cdr/utils/encoder.py
3
1240
# -*- coding: utf-8 -*- # # This code is borrowed from django-cms # https://raw.githubusercontent.com/divio/django-cms/develop/cms/utils/encoder.py # Licensed as https://github.com/divio/django-cms/blob/develop/LICENSE # from django.utils.html import conditional_escape from django.utils.encoding import force_text fro...
mpl-2.0
spradeepv/dive-into-python
hackerrank/domain/python/numpy/transpose_flatten.py
1
1198
""" Problem Statement Transpose We can generate the transposition of an array using the tool numpy.transpose. It will not affect the original array, but it will create a new array. import numpy my_array = numpy.array([[1,2,3], [4,5,6]]) print numpy.transpose(my_array) #Output [[1 4] [2 5] ...
mit
gwq5210/litlib
thirdparty/sources/boost_1_60_0/tools/build/test/default_toolset.py
51
7777
#!/usr/bin/python # Copyright 2008 Jurko Gospodnetic # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # Test that the expected default toolset is used when no toolset is explicitly # specified on the command line o...
gpl-3.0
Mitali-Sodhi/CodeLingo
Dataset/python/routetable.py
29
3683
# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # 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, modi...
mit
haibuo1981/cuda-convnet2
python_util/data.py
180
7803
# 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...
apache-2.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/pandas/tests/series/test_asof.py
7
4718
# coding=utf-8 import nose import numpy as np from pandas import (offsets, Series, notnull, isnull, date_range, Timestamp) import pandas.util.testing as tm from .common import TestData class TestSeriesAsof(TestData, tm.TestCase): _multiprocess_can_split_ = True def test_basic(self): ...
gpl-3.0
olegpshenichniy/Booktype
lib/booktype/apps/importer/views.py
5
7974
# -*- coding: utf-8 -*- import json import datetime import logging from ebooklib import epub from django.http import HttpResponse from django.shortcuts import get_object_or_404 from django.core.urlresolvers import reverse from django.core.exceptions import PermissionDenied from django.views.generic import UpdateView ...
agpl-3.0
Plantain/sms-mailinglist
lib/requests/packages/chardet/compat.py
2943
1157
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # This 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 the Free Software Foundation; either # versio...
apache-2.0
GdZ/scriptfile
software/googleAppEngine/lib/django_1_4/django/contrib/gis/geos/tests/test_geos_mutation.py
198
5424
# Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved. # Modified from original contribution by Aryeh Leib Taurog, which was # released under the New BSD license. from django.contrib.gis.geos import * from django.contrib.gis.geos.error import GEOSIndexError from django.utils import unittest def getItem(o,i...
mit
huanpc/IoT-1
gui/controller/.venv/lib/python3.5/site-packages/jet/dashboard/views.py
2
8007
from django.contrib import messages from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.forms.formsets import formset_factory from django.http import HttpResponseRedirect from django.views.decorators.http import require_POST, require_GET from jet.dashboard.forms i...
mit
nishigori/boto
boto/datapipeline/exceptions.py
235
1471
# Copyright (c) 2012 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 restriction, including # without limitation the rights ...
mit
project-ncl/pnc-cli
pnc_cli/swagger_client/apis/repositoryconfigurations_api.py
2
28759
# coding: utf-8 """ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os import re # pytho...
apache-2.0
grimmjow8/ansible
lib/ansible/modules/system/selinux_permissive.py
48
4345
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Michael Scherer <misc@zarb.org> # inspired by code of github.com/dandiker/ # # 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 Softwar...
gpl-3.0
christophlsa/odoo
addons/account_asset/__init__.py
446
1135
# -*- encoding: 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 t...
agpl-3.0
smi96/django-blog_website
lib/python2.7/site-packages/django/test/signals.py
240
5928
import os import threading import time import warnings from django.core.signals import setting_changed from django.db import connections, router from django.db.utils import ConnectionRouter from django.dispatch import Signal, receiver from django.utils import timezone from django.utils.functional import empty templat...
mit
Oliver2213/NVDAYoutube-dl
addon/globalPlugins/nvdaYoutubeDL/youtube_dl/extractor/varzesh3.py
120
1696
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class Varzesh3IE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?video\.varzesh3\.com/(?:[^/]+/)+(?P<id>[^/]+)/?' _TEST = { 'url': 'http://video.varzesh3.com/germany/bundesliga/5-%D9%88%D8%A7%DA%A9%D9%86%D8%B4...
gpl-2.0
tonybaloney/st2
st2actions/tests/unit/policies/test_base.py
6
6189
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
apache-2.0
svn2github/vbox
src/VBox/ValidationKit/testmanager/webui/wuireport.py
4
5986
# -*- coding: utf-8 -*- # $Id$ """ Test Manager WUI - Reports. """ __copyright__ = \ """ Copyright (C) 2012-2014 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute it and/or modify it under the te...
gpl-2.0
Plain-Andy-legacy/android_external_chromium_org
tools/site_compare/command_line.py
179
27397
#!/usr/bin/env python # Copyright (c) 2011 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. """Parse a command line, retrieving a command and its arguments. Supports the concept of command line commands, each with its own ...
bsd-3-clause
buaakq/codezero
tools/cml2-tools/autoconfigure.py
7
32845
#!/usr/bin/env python # # linux/scripts/autoconfigure.py : Automagical Kernel Configuration. # # Copyright (C) 2000-2002 Eric S. Raymond <esr@thyrsus.com> # This is free software, see GNU General Public License 2 for details. # # This script tries to autoconfigure the Linux kernel, detecting the # hardware (devices...
gpl-3.0
demiangomez/Parallel.GAMIT
classes/pyBrdc.py
1
1517
""" Project: Parallel.Archive Date: 02/16/2017 Author: Demian D. Gomez This class fetches broadcast orbits from the brdc folder (specified in the gnss_data.cfg file) passed as an argument (brdc_archive) """ import os import pyProducts class pyBrdcException(pyProducts.pyProductsException): pass class GetBrdcOrbi...
gpl-3.0
agnivade/three.js
utils/exporters/blender/addons/io_three/exporter/api/__init__.py
174
1502
import os import bpy from . import object as object_, mesh, material, camera, light from .. import logger def active_object(): """ :return: The actively selected object """ return bpy.context.scene.objects.active def batch_mode(): """ :return: Whether or not the session is interactive ...
mit
SUSE/azure-sdk-for-python
azure-mgmt-commerce/azure/mgmt/commerce/usage_management_client.py
3
3820
# 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
varunnaganathan/django
django/contrib/gis/db/models/lookups.py
46
11511
from __future__ import unicode_literals import re from django.core.exceptions import FieldDoesNotExist from django.db.models.constants import LOOKUP_SEP from django.db.models.expressions import Col, Expression from django.db.models.lookups import Lookup from django.utils import six gis_lookups = {} class GISLookup...
bsd-3-clause
jeroenj/CouchPotatoServer
libs/tornado/platform/caresresolver.py
90
3016
from __future__ import absolute_import, division, print_function, with_statement import pycares import socket from tornado import gen from tornado.ioloop import IOLoop from tornado.netutil import Resolver, is_valid_ip class CaresResolver(Resolver): """Name resolver based on the c-ares library. This is a non...
gpl-3.0
lehins/python-wepay
wepay/tests/test_batch.py
1
1684
from wepay.tests import CallBaseTestCase class BatchTestCase(CallBaseTestCase): def test_batch_find(self): args = [ ('client_id', 67890), ('client_secret', 'secret_6789'), ('calls', [ { 'call': '/preapproval', 'aut...
mit
wdzhou/mantid
Testing/SystemTests/tests/analysis/SANS2DMultiPeriodAddFiles.py
3
3134
#pylint: disable=no-init from __future__ import (absolute_import, division, print_function) import stresstesting from mantid.simpleapi import * from mantid import config from ISISCommandInterface import * class SANS2DMultiPeriodAddFiles(stresstesting.MantidStressTest): def requiredMemoryMB(self): """Re...
gpl-3.0
ejpbruel/servo
tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/handshake/_base.py
652
6143
# Copyright 2012, 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...
mpl-2.0
jpzk/evopy
evopy/external/playdoh/connection.py
2
2971
from debugtools import * from userpref import * from multiprocessing.connection import Listener, Client, AuthenticationError import cPickle import time import socket BUFSIZE = 1024 * 32 try: LOCAL_IP = socket.gethostbyname(socket.gethostname()) except: LOCAL_IP = '127.0.0.1' __all__ = ['accep...
gpl-3.0
justinwp/pyparsecom
docs/conf.py
1
8494
#!/usr/bin/env python # -*- coding: utf-8 -*- # # pyparsecom documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # 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 # ...
mit
sarthfrey/Texty
lib/tests/test_messages.py
14
2006
from datetime import date import unittest from mock import patch from six import u from twilio.rest.resources import Messages DEFAULT = { 'From': None, 'DateSent<': None, 'DateSent>': None, 'DateSent': None, } class MessageTest(unittest.TestCase): def setUp(self): self.resource = Messa...
apache-2.0
romain-dartigues/ansible
test/units/plugins/inventory/test_host.py
56
3412
# Copyright 2015 Marius Gedminas <marius@gedmin.as> # # 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...
gpl-3.0
amstrudy/nao-ncsu
create_test_maps.py
1
3010
# This Python script creates a bunch of test maps of varying number, size, and density. # The output is to a .csv file. import cv2 import numpy import random import time import csv import oop_a_star as aStar MAP_SIZE_MIN = 3 # 3 x 3 is smallest map MAP_SIZE_MAX = 100 # 10 x 10 is biggest map NUM_TESTS = 5 # number o...
mit
sloanyang/aquantic
Tools/Scripts/webkitpy/tool/steps/preparechangelog.py
124
5952
# Copyright (C) 2010 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 th...
gpl-2.0
sebres/fail2ban
fail2ban/server/jails.py
3
2837
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
gpl-2.0
mancoast/CPythonPyc_test
crash/161_test_userlist.py
1
2789
# Check every path through every method of UserList from UserList import UserList l0 = [] l1 = [0] l2 = [0, 1] # Test constructors u = UserList() u0 = UserList(l0) u1 = UserList(l1) u2 = UserList(l2) uu = UserList(u) uu0 = UserList(u0) uu1 = UserList(u1) uu2 = UserList(u2) v = UserList(tuple(u)) class OtherList: ...
gpl-3.0
miptliot/edx-platform
openedx/core/djangoapps/credit/views.py
8
7758
""" Views for the credit Django app. """ from __future__ import unicode_literals import datetime import logging import pytz from django.conf import settings from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from edx_rest_framework_extensions.authentication impor...
agpl-3.0
brandond/ansible
lib/ansible/modules/cloud/vmware/vmware_vmkernel.py
5
47337
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Joseph Callen <jcallen () csc.com> # Copyright: (c) 2017-18, Ansible Project # Copyright: (c) 2017-18, Abhijeet Kasurde <akasurde@redhat.com> # Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de> # GNU General Public License v3.0+ (see COPYING ...
gpl-3.0
geekboxzone/lollipop_external_chromium_org
tools/telemetry/telemetry/core/backends/chrome/android_browser_finder_unittest.py
25
3287
# Copyright 2013 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 unittest from telemetry import benchmark from telemetry.core import browser_options from telemetry.core.platform import android_device from telemetry...
bsd-3-clause
jkmaxwell/dash-jetnoise
requests/packages/chardet/big5prober.py
2931
1684
######################## 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...
gpl-3.0
axbaretto/beam
learning/katas/python/Core Transforms/Partition/Partition/tests.py
7
1455
# 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"); y...
apache-2.0
gangadharkadam/verveerp
erpnext/accounts/doctype/pos_setting/pos_setting.py
6
2364
# 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 msgprint, _ from frappe.utils import cint from frappe.model.document import Document class POSSetting(Document): def...
agpl-3.0
TrimBiggs/calico
calico/test/test_calcollections.py
1
5048
# -*- coding: utf-8 -*- # Copyright 2015 Metaswitch Networks # # 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 applicab...
apache-2.0
eino-makitalo/odoo
addons/l10n_do/__openerp__.py
309
2992
# -*- coding: utf-8 -*- # ############################################################################# # # First author: Jose Ernesto Mendez <tecnologia@obsdr.com> (Open Business Solutions SRL.) # Copyright (c) 2012 -TODAY Open Business Solutions, SRL. (http://obsdr.com). All rights reserved. # # This is a fork to upg...
agpl-3.0
ponty/mangui
docs/conf.py
1
1581
from path import path from setuptools import find_packages import os import sphinx import sys def read_project_version(py=None, where='.', exclude=['bootstrap', 'pavement', 'doc', 'docs', 'test', 'tests', ]): if not py: py = path(where) / find_packages(where=where, exclude=exclude)[0] py = path(py) ...
bsd-2-clause
Weicong-Lin/pymo-global
android/pgs4a-0.9.6/python-install/lib/python2.7/symtable.py
114
7518
"""Interface to the compiler's internal symbol tables""" import _symtable from _symtable import (USE, DEF_GLOBAL, DEF_LOCAL, DEF_PARAM, DEF_IMPORT, DEF_BOUND, OPT_IMPORT_STAR, OPT_EXEC, OPT_BARE_EXEC, SCOPE_OFF, SCOPE_MASK, FREE, GLOBAL_IMPLICIT, GLOBAL_EXPLICIT, CELL, LOCAL) import weakref __all__ = ["sym...
mit
Venturi/cms
env/lib/python2.7/site-packages/phonenumbers/data/region_RE.py
11
1850
"""Auto-generated file, do not edit by hand. RE metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_RE = PhoneMetadata(id='RE', country_code=262, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='[268]\\d{8}', possible_number_pattern='\...
gpl-2.0
pronexo-odoo/odoo-argentina
l10n_ar_pyafipws/pyafipws/setup_wslpg.py
1
2419
#!/usr/bin/python # -*- coding: latin-1 -*- # Para hacer el ejecutable: # python setup.py py2exe # "Creador de instalador para Liquidación Electrónica Primaria de Granos" __author__ = "Mariano Reingart (reingart@gmail.com)" __copyright__ = "Copyright (C) 2013 Mariano Reingart" from distutils.core...
agpl-3.0
amahabal/PySeqsee
farg/apps/seqsee/subspaces/choose_item_to_focus_on.py
1
1660
# Copyright (C) 2011, 2012 Abhijit Mahabal # # 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. # # This program is distribu...
gpl-3.0
akozumpl/dnf
tests/test_config.py
4
3651
# Copyright (C) 2012-2013 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...
gpl-2.0
bgalehouse/grr
lib/data_stores/mysql_advanced_data_store_test.py
2
2003
#!/usr/bin/env python """Tests the mysql data store.""" import unittest # pylint: disable=unused-import,g-bad-import-order from grr.lib import server_plugins # pylint: enable=unused-import,g-bad-import-order import logging from grr.lib import access_control from grr.lib import config_lib from grr.lib import data_st...
apache-2.0
havard024/prego
crm/lib/python2.7/site-packages/django/core/serializers/base.py
33
5714
""" Module for abstract serializer/unserializer base classes. """ from django.db import models from django.utils.encoding import smart_text from django.utils import six class SerializerDoesNotExist(KeyError): """The requested serializer was not found.""" pass class SerializationError(Exception): """Somet...
mit
Lokke/eden
controllers/hrm.py
7
25077
# -*- coding: utf-8 -*- """ Human Resource Management """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) s3db.hrm_vars() # ============================================================================= def ...
mit
DirtyPiece/dancestudio
Build/Tools/Python27/Lib/Queue.py
82
8577
"""A multi-producer, multi-consumer queue.""" from time import time as _time try: import threading as _threading except ImportError: import dummy_threading as _threading from collections import deque import heapq __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue'] class Empty(Exception): "...
mit
pombredanne/pythran
pythran/tests/cases/quicksort.py
4
2085
#pythran export quicksort(int list, int, int) #runas quicksort(range(10),0,9) def partition(list, start, end): pivot = list[end] # Partition around the last value bottom = start-1 # Start outside the area to be partitioned top = end ...
bsd-3-clause
ChaosJohn/autokey
src/lib/qtui/settingswidget.py
50
4191
#!/usr/bin/env python # coding=UTF-8 # # Generated by pykdeuic4 from settingswidget.ui on Sun Mar 4 11:39:40 2012 # # WARNING! All changes to this file will be lost. from PyKDE4 import kdecore from PyKDE4 import kdeui from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: ...
gpl-3.0
scottmcmaster/catapult
tracing/tracing_build/check_common.py
5
2612
# Copyright (c) 2013 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 sys import os import tracing_project FILE_GROUPS = ["tracing_css_files", "tracing_js_html_files", "tracing_img_fi...
bsd-3-clause
alhashash/odoomrp-wip
product_suppliers_from_category/__openerp__.py
28
1457
# -*- encoding: utf-8 -*- ############################################################################## # # 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 Licen...
agpl-3.0
trabacus-softapps/docker-edumedia
additional_addons/Edumedia_India/amount_to_text_softapps.py
1
4624
# -------------------------------------------------------------------------------------------------------------------------- # # SOFTAPPS IT SOLUTIONS PVT LTD # Malleshwaram, Bangalore # # - this file was added to convert the currency amount # to...
agpl-3.0
eleftherioszisis/NeuroM
neurom/stats.py
2
7253
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
bsd-3-clause
sunlightlabs/waterfall
waterfall/cascading_update.py
2
1975
from django.db import connection, models, transaction from django.apps.registry import apps from django.db.utils import IntegrityError class CascadingUpdate(): def get_fk_list(self, obj): for m in apps.get_models(include_auto_created=True): for f in m._meta.get_all_field_names(): ...
bsd-3-clause
looeee/mivart
node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py
2485
5536
# This file comes from # https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py # Do not edit! Edit the upstream one instead. """Python module for generating .ninja files. Note that this is emphatically not a required piece of Ninja; it's just a helpful utility for build-file-generation systems that alr...
mpl-2.0
lidavidm/mathics-heroku
venv/lib/python2.7/site-packages/sympy/simplify/tests/test_cse.py
3
8131
import itertools from sympy import (Add, Pow, Symbol, exp, sqrt, symbols, sympify, cse, Matrix, S, cos, sin, Eq, Function, Tuple, RootOf) from sympy.simplify.cse_opts import sub_pre, sub_post from sympy.functions.special.hyper import meijerg from sympy.simplify import cse_main, cse_opts from sympy.utilities.pytest...
gpl-3.0
repotvsupertuga/repo
script.module.urlresolver/lib/urlresolver/plugins/lib/jjdecode.py
35
13185
#!/usr/bin/env python # # Python version of the jjdecode function written by Syed Zainudeen # http://csc.cs.utm.my/syed/images/files/jjdecode/jjdecode.html # # +NCR/CRC! [ReVeRsEr] - crackinglandia@gmail.com # Thanks to Jose Miguel Esparza (@EternalTodo) for the final push to make it work! # import re class JJDecoder...
gpl-2.0
multikatt/CouchPotatoServer
libs/guessit/transfo/guess_bonus_features.py
150
2155
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
gpl-3.0
mattnenterprise/servo
tests/wpt/web-platform-tests/tools/third_party/pluggy/testing/test_tracer.py
43
2110
from pluggy import _TagTracer def test_simple(): rootlogger = _TagTracer() log = rootlogger.get("pytest") log("hello") out = [] rootlogger.setwriter(out.append) log("world") assert len(out) == 1 assert out[0] == "world [pytest]\n" sublog = log.get("collection") sublog("hello")...
mpl-2.0
caidongyun/Dato-Core
src/unity/python_deps/psutil/test/_bsd.py
21
7771
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # TODO: add test for comparing connections with 'sockstat' cmd """BSD specific tests. These are implicitly run by test_psutil.py."...
agpl-3.0
certik/hermes1d-llnl
examples/system_neutronics_eigenvalue/plot.py
3
1652
import matplotlib.pyplot as plt import numpy as np import sys fig = plt.figure() # one axes for each group ax1 = fig.add_subplot(211) ax1.grid(True) ax1.axhline(0, color='black', lw=2) ax2 = fig.add_subplot(212, sharex=ax1) ax2.grid(True) ax2.axhline(0, color='black', lw=2) # computed solution # plot solutions cor...
bsd-3-clause
rednaxelafx/apache-spark
examples/src/main/python/ml/feature_hasher_example.py
27
1521
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
cle1109/scot
examples/misc/pca.py
4
1411
# Released under The MIT License (MIT) # http://opensource.org/licenses/MIT # Copyright (c) 2013-2016 SCoT Development Team """This example demonstrates that it is possible to reconstruct sources even if we include PCA in the process. """ from __future__ import print_function import numpy as np from scot.pca import...
mit
sdague/home-assistant
homeassistant/components/nanoleaf/light.py
16
7708
"""Support for Nanoleaf Lights.""" import logging from pynanoleaf import Nanoleaf, Unavailable import voluptuous as vol from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_EFFECT, ATTR_HS_COLOR, ATTR_TRANSITION, PLATFORM_SCHEMA, SUPPORT_BRIGHTNESS, SUPPO...
apache-2.0
Thortoise/Super-Snake
Blender/animation_nodes-master/nodes/bvh_tree/is_inside_volume.py
1
1470
import bpy from random import random from mathutils import Vector from ... base_types.node import AnimationNode # in some cases multiple tests have to done # to reduce the probability for errors direction1 = Vector((random(), random(), random())).normalized() direction2 = Vector((random(), random(), random())).normali...
gpl-3.0
algolia/algoliasearch-client-python
tests/unit/http/test_transporter.py
1
7769
import time import unittest import os import mock as mock from algoliasearch.configs import SearchConfig from algoliasearch.exceptions import AlgoliaUnreachableHostException, AlgoliaException from algoliasearch.http.hosts import Host, HostsCollection from algoliasearch.http.request_options import RequestOptions from a...
mit
liu602348184/django
tests/proxy_models/tests.py
260
16941
from __future__ import unicode_literals import datetime from django.apps import apps from django.contrib import admin from django.contrib.auth.models import User as AuthUser from django.contrib.contenttypes.models import ContentType from django.core import checks, exceptions, management from django.core.urlresolvers ...
bsd-3-clause
freedesktop-unofficial-mirror/gstreamer__cerbero
cerbero/commands/rdeps.py
27
1717
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
lgpl-2.1