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
bukun/TorCMS
torcms/handlers/wiki_handler.py
1
5795
# -*- coding:utf-8 -*- ''' Handler for wiki, and page. ''' import json from concurrent.futures import ThreadPoolExecutor import tornado.escape import tornado.gen import tornado.ioloop import tornado.web from torcms.core import privilege, tools from torcms.core.base_handler import BaseHandler from torcms.model.wiki_h...
mit
AlanZatarain/snapfly
src/version.py
4
1062
# -*- coding: utf-8 -*- # Copyright (C) 2010-2011 # Drakmail < drakmail@gmail.com > # NomerUNO < uno.kms@gmail.com > # Platon Peacel☮ve <platonny@ngs.ru> # Elec.Lomy.RU <Elec.Lomy.RU@gmail.com> # ADcomp <david.madbox@gmail.com> # # This program is free software: you can redistribute it and/or modify # it und...
gpl-3.0
JianfengXu/crosswalk-test-suite
webapi/webapi-simd-nonw3c-tests/inst.xpk.py
456
6809
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
bsd-3-clause
prculley/gramps
gramps/gui/merge/mergeevent.py
5
7956
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Michiel D. Nauta # # 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...
gpl-2.0
HewlettPackard/python-hpOneView
tests/unit/resources/facilities/test_racks.py
2
5594
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2017) Hewlett Packard Enterprise Development LP # # 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 limi...
mit
bricky/xbmc-addon-tvtumbler
resources/lib/dns/namedict.py
99
2106
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
gpl-3.0
orchidinfosys/odoo
openerp/addons/test_inherit/models.py
3
4239
# -*- coding: utf-8 -*- from openerp import models, fields, api, osv # We just create a new model class mother(models.Model): _name = 'test.inherit.mother' _columns = { # check interoperability of field inheritance with old-style fields 'name': osv.fields.char('Name'), 'state': osv.fie...
gpl-3.0
adrienbrault/home-assistant
homeassistant/components/hue/binary_sensor.py
3
1539
"""Hue binary sensor entities.""" from aiohue.sensors import TYPE_ZLL_PRESENCE from homeassistant.components.binary_sensor import ( DEVICE_CLASS_MOTION, BinarySensorEntity, ) from .const import DOMAIN as HUE_DOMAIN from .sensor_base import SENSOR_CONFIG_MAP, GenericZLLSensor PRESENCE_NAME_FORMAT = "{} motio...
mit
klickagent/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/environment.py
154
1973
# Copyright (C) 2011 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
dgzurita/odoo
openerp/tools/graph.py
441
26118
#!/usr/bin/env python # -*- 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 unde...
agpl-3.0
halonotes/personal_blog
app/api_1_0/posts.py
1
1735
from flask import jsonify, request, g, abort, url_for, current_app from .. import db from ..models import Post, Permission from . import api from .decorators import permission_required from .errors import forbidden @api.route('/posts/') def get_posts(): page = request.args.get('page', 1, type=int) pagination ...
mit
ryano144/intellij-community
plugins/hg4idea/testData/bin/hgext/inotify/client.py
89
5950
# client.py - inotify status client # # Copyright 2006, 2007, 2008 Bryan O'Sullivan <bos@serpentine.com> # Copyright 2007, 2008 Brendan Cully <brendan@kublai.com> # Copyright 2009 Nicolas Dumazet <nicdumz@gmail.com> # # This software may be used and distributed according to the terms of the # GNU General Public License...
apache-2.0
fighterCui/L4ReFiascoOC
l4/pkg/python/contrib/Lib/mailcap.py
351
7427
"""Mailcap file handling. See RFC 1524.""" import os __all__ = ["getcaps","findmatch"] # Part 1: top-level interface. def getcaps(): """Return a dictionary containing the mailcap database. The dictionary maps a MIME type (in all lowercase, e.g. 'text/plain') to a list of dictionaries corresponding to ...
gpl-2.0
Jazz-823/kernel_sony_togari-216-
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gpl-2.0
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtNetwork/QNetworkConfiguration.py
1
3793
# encoding: utf-8 # module PyQt4.QtNetwork # from /usr/lib/python3/dist-packages/PyQt4/QtNetwork.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QNetworkConfiguration(): # skipped bases: <class 'sip.simplewrapper'> """ QNetworkConfiguration(...
gpl-2.0
eLBati/odoo
addons/base_iban/__init__.py
447
1073
# -*- 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...
agpl-3.0
zchking/odoo
addons/project/tests/test_project_base.py
197
4321
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
fahhem/mbed-os
tools/host_tests/udp_link_layer_auto.py
124
5577
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
apache-2.0
paddyvishnubhatt/cryptocurrency
lib/flask_login/config.py
25
1602
# -*- coding: utf-8 -*- ''' flask_login.config ------------------ This module provides default configuration values. ''' from datetime import timedelta #: The default name of the "remember me" cookie (``remember_token``) COOKIE_NAME = 'remember_token' #: The default time before the "remember me" cookie...
apache-2.0
IV-GII/SocialCookies
ENV1/lib/python2.7/site-packages/setuptools/tests/__init__.py
412
12582
"""Tests for the 'setuptools' package""" import sys import os import unittest from setuptools.tests import doctest import distutils.core import distutils.cmd from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError from distutils.core import Extension fr...
gpl-2.0
premcool/getmydeal
node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
1363
58344
# Copyright (c) 2012 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. import filecmp import gyp.common import gyp.xcodeproj_file import gyp.xcode_ninja import errno import os import sys import posixpath import re import shutil import...
gpl-3.0
MichaelGrupp/evo
contrib/kitti_poses_and_timestamps_to_trajectory.py
1
1586
#!/usr/bin/env python # -*- coding: utf-8 -*- from evo.core.trajectory import PoseTrajectory3D from evo.tools import file_interface import numpy as np DESC = "Combine KITTI poses and timestamps files to a TUM trajectory file" def kitti_poses_and_timestamps_to_trajectory(poses_file, timestamp_file): pose_path = ...
gpl-3.0
mgood7123/UPM
Sources/node-v6.11.2-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
713
115880
# Copyright (c) 2012 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. from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard from compiler.ast import List from compiler.ast import Module from co...
gpl-3.0
CIRCL/lnf-tools
bin/nfdump-replicator.py
1
13375
#!/usr/bin/python # # nfdump-tools - Inspecting the output of nfdump # # Copyright (C) 2011 CIRCL Computer Incident Response Center Luxembourg (smile gie) # Copyright (C) 2011 Gerard Wagener # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
gpl-3.0
OliverG96/android_kernel_samsung_golden
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 i...
gpl-2.0
Meriipu/quodlibet
quodlibet/packages/senf/_winapi.py
5
7208
# -*- coding: utf-8 -*- # Copyright 2016 Christoph Reiter # # 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...
gpl-2.0
joone/chromium-crosswalk
chrome/common/extensions/docs/server2/owners_data_source.py
37
3522
# 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. from operator import itemgetter import random from data_source import DataSource from docs_server_utils import MarkLast from extensions_paths import BROWSER...
bsd-3-clause
goodwinnk/intellij-community
python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/good.py
26
1892
from spam import eggs for eggs in (1, 12): eggs = 12 for a in (1, 12): for b in (2, 24): for (c, d) in {"C": "D"}.items(): (e, f) = (a, d) i = 12 print(i) (z, x) = (i, 12) print(z) for root in settings.STATICFILES_DIRS: if isinstance(root, (list, tuple)): prefix, root = root ...
apache-2.0
BT-ojossen/l10n-switzerland
l10n_ch_fds_postfinance/models/fds_postfinance_directory.py
2
2488
# -*- coding: utf-8 -*- ############################################################################## # # Swiss Postfinance File Delivery Services module for Odoo # Copyright (C) 2015 Compassion CH # @author: Nicolas Tran # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
aequitas/home-assistant
homeassistant/components/xiaomi_aqara/cover.py
7
2366
"""Support for Xiaomi curtain.""" import logging from homeassistant.components.cover import ATTR_POSITION, CoverDevice from . import PY_XIAOMI_GATEWAY, XiaomiDevice _LOGGER = logging.getLogger(__name__) ATTR_CURTAIN_LEVEL = 'curtain_level' def setup_platform(hass, config, add_entities, discovery_info=None): "...
apache-2.0
ALSchwalm/python-prompt-toolkit
prompt_toolkit/contrib/telnet/protocol.py
28
4884
""" Parser for the Telnet protocol. (Not a complete implementation of the telnet specification, but sufficient for a command line interface.) Inspired by `Twisted.conch.telnet`. """ from __future__ import unicode_literals import struct from six import int2byte, binary_type, iterbytes from .log import logger __all__...
bsd-3-clause
amisrs/angular-flask
angular_flask/lib/python2.7/site-packages/requests/packages/charade/mbcssm.py
176
20183
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. ...
mit
kevinconaway/storm
dev-tools/jira-github-join.py
20
1411
#!/usr/bin/python # -*- coding: utf-8 -*- # 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
kayhayen/Nuitka
nuitka/optimizations/Tags.py
1
2194
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
apache-2.0
Metaswitch/calico-nova
nova/virt/vmwareapi/constants.py
4
4706
# Copyright (c) 2014 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
IBM-MIL/IBM-Ready-App-for-Insurance
PerchSimulator/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py
2214
1347
#!/usr/bin/env python import re import json # http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae # http://stackoverflow.com/a/13436167/96656 def unisymbol(codePoint): if codePoint >= 0x0000 and codePoint <= 0xFFFF: return unichr(codePoint) elif codePoint >= 0x010000 and codePoint <= 0x10FFFF: ...
epl-1.0
eatbyte/depot_tools
third_party/gsutil/gslib/commands/getwebcfg.py
51
4285
# 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 a...
bsd-3-clause
h3biomed/ansible
lib/ansible/plugins/loader.py
1
38409
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> and others # (c) 2017, Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import ...
gpl-3.0
subodhchhabra/airflow
docs/conf.py
10
9098
# -*- coding: utf-8 -*- # # Airflow documentation build configuration file, created by # sphinx-quickstart on Thu Oct 9 20:50:01 2014. # # 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. # # A...
apache-2.0
OptimusGitEtna/RestSymf
Python-3.4.2/Lib/ctypes/wintypes.py
197
5628
# The most useful windows datatypes import ctypes BYTE = ctypes.c_byte WORD = ctypes.c_ushort DWORD = ctypes.c_ulong #UCHAR = ctypes.c_uchar CHAR = ctypes.c_char WCHAR = ctypes.c_wchar UINT = ctypes.c_uint INT = ctypes.c_int DOUBLE = ctypes.c_double FLOAT = ctypes.c_float BOOLEAN = BYTE BOOL = ctypes.c_long class ...
mit
Bashar/django
django/contrib/flatpages/tests/test_csrf.py
40
3493
import os from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.test import TestCase, Client from django.test import override_settings @override_settings( LOGIN_URL='/accounts/login/', MIDDLEWARE_CLASSES=( 'django.middleware.common.CommonM...
bsd-3-clause
simonwydooghe/ansible
lib/ansible/modules/network/iosxr/iosxr_netconf.py
21
6250
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, 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', ...
gpl-3.0
teeple/pns_server
work/install/Python-2.7.4/Lib/ctypes/test/test_prototypes.py
81
6738
from ctypes import * import unittest # IMPORTANT INFO: # # Consider this call: # func.restype = c_char_p # func(c_char_p("123")) # It returns # "123" # # WHY IS THIS SO? # # argument tuple (c_char_p("123"), ) is destroyed after the function # func is called, but NOT before the result is actually built. # # If...
gpl-2.0
ldrozdz/Webforming
backend/pipelines/xls_pipeline.py
1
1452
from collections import Counter from xlwt import Workbook import os __author__ = 'admin' class XlsPipeline(object): def __init__(self, data_dir, id): self.data_dir = data_dir self.id = id def process(self, items, nested=False): sorted_items = sorted(items.values(), key=lambda i: i.parsed_post_date.re...
apache-2.0
noxora/flask-base
flask/lib/python3.4/site-packages/Crypto/SelfTest/Hash/test_SHA224.py
7
2533
# -*- coding: utf-8 -*- # # SelfTest/Hash/test_SHA224.py: Self-test for the SHA-224 hash function # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that...
mit
josesanch/django-oscar
src/oscar/apps/catalogue/south_migrations/0009_auto__add_field_product_rating.py
18
13008
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Product.rating' db.add_column('catalogue_product', 'rating', self.gf('...
bsd-3-clause
jordanemedlock/psychtruths
temboo/core/Library/Amazon/Marketplace/Products/__init__.py
5
2004
from temboo.Library.Amazon.Marketplace.Products.GetCompetitivePricingForASIN import GetCompetitivePricingForASIN, GetCompetitivePricingForASINInputSet, GetCompetitivePricingForASINResultSet, GetCompetitivePricingForASINChoreographyExecution from temboo.Library.Amazon.Marketplace.Products.GetCompetitivePricingForSKU imp...
apache-2.0
nwjs/chromium.src
third_party/blink/web_tests/external/wpt/tools/third_party/pytest/testing/test_collection.py
30
31894
from __future__ import absolute_import, division, print_function import pprint import sys import pytest import _pytest._code from _pytest.main import Session, EXIT_NOTESTSCOLLECTED, _in_venv class TestCollector(object): def test_collect_versus_item(self): from pytest import Collector, Item asse...
bsd-3-clause
11craft/django-cms
cms/migrations/0029_limit_visibility_in_menu_step2of3_data.py
385
19523
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Dummy migration pass def backwards(self, orm): # Dummy migration pass models = { ...
bsd-3-clause
rldhont/Quantum-GIS
tests/src/python/test_qgsserver_wms_dimension.py
42
10527
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServer WMS Dimension. From build dir, run: ctest -R PyQgsServerWMSDimension -V .. 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 vers...
gpl-2.0
hflynn/openmicroscopy
components/xsd-fu/xsltbasic.py
4
19981
#!/usr/bin/env python # encoding: utf-8 """ ... """ # # Copyright (c) 2009 University of Dundee. 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 re...
gpl-2.0
imranj131/imranj131.github.io
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
896
91092
# Copyright (c) 2013 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. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
mit
cubicova17/annet
venv/lib/python2.7/site-packages/psycopg2/tests/test_quote.py
9
6080
#!/usr/bin/env python # test_quote.py - unit test for strings quoting # # Copyright (C) 2007-2011 Daniele Varrazzo <daniele.varrazzo@gmail.com> # # psycopg2 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 Foundat...
mit
skirsdeda/django
tests/view_tests/models.py
160
1313
""" Regression tests for Django built-in views. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=100) def __str__(self): return self.name def get_absolute_ur...
bsd-3-clause
agiliq/django
tests/context_processors/tests.py
26
2450
""" Tests for Django's bundled context processors. """ from django.test import TestCase, override_settings @override_settings(ROOT_URLCONF='context_processors.urls') class RequestContextProcessorTests(TestCase): """ Tests for the ``django.core.context_processors.request`` processor. """ def test_requ...
bsd-3-clause
ntts-clo/ryu
ryu/app/wsgi.py
4
4747
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
apache-2.0
appliedx/edx-platform
common/test/acceptance/tests/lms/test_learner_profile.py
28
31827
# -*- coding: utf-8 -*- """ End-to-end tests for Student's Profile Page. """ from flaky import flaky from contextlib import contextmanager from datetime import datetime from bok_choy.web_app_test import WebAppTest from nose.plugins.attrib import attr from ...pages.common.logout import LogoutPage from ...pages.lms.acc...
agpl-3.0
devs1991/test_edx_docmode
cms/djangoapps/contentstore/tests/test_transcripts_utils.py
30
23516
# -*- coding: utf-8 -*- """ Tests for transcripts_utils. """ import unittest from uuid import uuid4 import copy import textwrap from mock import patch, Mock from django.test.utils import override_settings from django.conf import settings from django.utils import translation from nose.plugins.skip import SkipTest fro...
agpl-3.0
bguillot/OpenUpgrade
addons/mail/tests/test_mail_features.py
35
60107
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
indx/indx-core
lib/indx/server.py
1
11256
# Copyright (C) 2011-2013 University of Southampton # Copyright (C) 2011-2013 Daniel Alexander Smith # Copyright (C) 2011-2013 Max Van Kleek # Copyright (C) 2011-2013 Nigel R. Shadbolt # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
agpl-3.0
yanboliang/spark
python/pyspark/sql/tests/test_utils.py
11
2441
# # 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
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/django-1.2/django/contrib/gis/gdal/srs.py
291
11717
""" The Spatial Reference class, represensents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print srs GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORI...
mit
cst13/canstel
moneywagon/bip38.py
3
18809
# -*- coding: utf-8 -*- from __future__ import print_function from binascii import unhexlify, hexlify from hashlib import sha256 from unicodedata import normalize import sys from moneywagon.core import get_magic_bytes from bitcoin import ( privtopub, pubtoaddr, encode_privkey, get_privkey_format, encode_pubke...
mit
jonyroda97/redbot-amigosprovaveis
lib/youtube_dl/extractor/gameone.py
208
4519
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( xpath_with_ns, parse_iso8601, float_or_none, int_or_none, ) NAMESPACE_MAP = { 'media': 'http://search.yahoo.com/mrss/', } # URL prefix to download the mp4 files directly inst...
gpl-3.0
DoubleNegativeVisualEffects/cortex
test/IECore/StandardRadialLensModelTest.py
12
5103
########################################################################## # # Copyright (c) 2013, 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: # # * Redistribu...
bsd-3-clause
jonfoster/pyxb2
pyxb/utils/saxutils.py
3
22473
# -*- coding: utf-8 -*- # Copyright 2009-2013, Peter A. Bigot # # 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...
apache-2.0
israeltobias/DownMedia
youtube-dl/youtube_dl/extractor/scivee.py
25
1950
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import int_or_none class SciVeeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?scivee\.tv/node/(?P<id>\d+)' _TEST = { 'url': 'http://www.scivee.tv/node/62352', 'md5': 'b16699b74c9e6a120f677...
gpl-3.0
StefanRijnhart/OpenUpgrade
openerp/addons/base/ir/ir_exports.py
33
1690
# -*- 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
chugunovyar/factoryForBuild
env/lib/python2.7/site-packages/numpy/doc/constants.py
55
8954
""" ========= Constants ========= NumPy includes several constants: %(constant_list)s """ # # Note: the docstring is autogenerated. # from __future__ import division, absolute_import, print_function import textwrap, re # Maintain same format as in numpy.add_newdocs constants = [] def add_newdoc(module, name, doc): ...
gpl-3.0
AASHE/hub
hub/apps/metadata/admin.py
1
1579
from django.contrib import admin from . import models class SustainabilityTopicFavoriteAdmin(admin.TabularInline): model = models.SustainabilityTopicFavorite raw_id_fields = ('ct',) list_display = ('order',) list_editable = ('order',) extra = 0 class SustainabilityTopicAdmin(admin.ModelAdmin): ...
mit
blaze/dask
dask/dataframe/io/utils.py
1
3139
import pandas as pd import json from uuid import uuid4 def _get_pyarrow_dtypes(schema, categories): """Convert a pyarrow.Schema object to pandas dtype dict""" # Check for pandas metadata has_pandas_metadata = schema.metadata is not None and b"pandas" in schema.metadata if has_pandas_metadata: ...
bsd-3-clause
xwolf12/scikit-learn
examples/ensemble/plot_forest_importances_faces.py
403
1519
""" ================================================= Pixel importances with a parallel forest of trees ================================================= This example shows the use of forests of trees to evaluate the importance of the pixels in an image classification task (faces). The hotter the pixel, the more impor...
bsd-3-clause
tensorflow/moonlight
moonlight/staves/base.py
1
7156
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
jmesteve/openerp
openerp/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py
90
10565
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
knowledgecommonsdc/kcdc3
kcdc3/apps/pinata/migrations/0009_auto__add_snippet.py
1
5913
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Snippet' db.create_table('pinata_snippet', ( ('id', self.gf('django.db.models.fi...
mit
gfreed/android_external_chromium-org
tools/telemetry/telemetry/core/chrome/png_bitmap.py
26
2166
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os import base64 def _EnsurePngIsInPath(): png_path = os.path.join(os.path.dirname(__file__), '..', '..', '...
bsd-3-clause
webshinra/Port-Tales
sources/MapView.py
1
4550
# this file is part of Port Tales # Copyright (C) 2014 # Yann Asset <shinra@electric-dragons.org>, # Vincent Michel <vxgmichel@gmail.com>, # Cyril Savary <cyrilsavary42@gmail.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
gpl-3.0
jackytu/newbrandx
sites/newbrandx/apps/checkout/views.py
35
5404
from django.contrib import messages from django import http from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from datacash.facade import Facade from oscar.apps.checkout import views, exceptions from oscar.apps.payment.forms import BankcardForm from oscar.apps.payment...
bsd-3-clause
Atrasoftware/PyTMCL
PyTMCL/TMCL/error.py
1
1952
class TMCLError(Exception): """Base TMCL exception""" def __init__(self, command=None, message=None): super(TMCLError, self).__init__(command, message) self.command = command self.message = message def __str__(self): if self.message is None: return "TMCL: {}".f...
lgpl-3.0
soscpd/bee
root/tests/zguide/examples/Python/flclient1.py
1
1503
# # Freelance Client - Model 1 # Uses REQ socket to query one or more services # # Author: Daniel Lundin <dln(at)eintr(dot)org> # import sys import time import zmq REQUEST_TIMEOUT = 1000 # ms MAX_RETRIES = 3 # Before we abandon def try_request(ctx, endpoint, request): print "I: Trying echo service at %s..." ...
mit
achang97/YouTunes
lib/python2.7/site-packages/urllib3/exceptions.py
223
6603
from __future__ import absolute_import from .packages.six.moves.http_client import ( IncompleteRead as httplib_IncompleteRead ) # Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class Po...
mit
jsoref/django
tests/utils_tests/test_regex_helper.py
448
1784
from __future__ import unicode_literals import unittest from django.utils import regex_helper class NormalizeTests(unittest.TestCase): def test_empty(self): pattern = r"" expected = [('', [])] result = regex_helper.normalize(pattern) self.assertEqual(result, expected) def te...
bsd-3-clause
calebd/swift
benchmark/scripts/compare_perf_tests.py
10
16354
#!/usr/bin/python # -*- coding: utf-8 -*- # ===--- compare_perf_tests.py -------------------------------------------===// # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library...
apache-2.0
tgcmteam/tgcmlinux
src/tgcm/ui/widgets/dock/LinkButton/LinkButton.py
1
2177
#!/usr/bin/python # -*- coding: utf-8 -*- # # Authors : Cesar Garcia Tapia <cesar.garcia.tapia@openshine.com> # Roberto Majadas <telemaco@openshine.com> # # Copyright (c) 2003-2010, Telefonica Móviles España S.A.U. # # This library is free software; you can redistribute it and/or # modify it under the terms o...
gpl-2.0
brymaster5000/Elite_darksLide_kernel
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
Bionetbook/bionetbook
bnbapp/protocols/helpers.py
2
9411
def shorten(units, reverse = False): d ={'nanograms':'ng', 'micrograms':'ug', 'milligrams':'mg', 'grams':'g', 'kilograms':'kg', 'nanoLiter':'ng', 'microLiter':'ul', 'microliter':'ul', 'milliLiter...
mit
cuong-nguyenduy/django-learning
simplesocial/posts/models.py
1
1099
from django.db import models from django.core.urlresolvers import reverse from django.conf import settings from django.contrib.auth import get_user_model import misaka from groups.models import Group # Create your models here. User = get_user_model() class Post(models.Model): user = models.ForeignKey(User, rel...
gpl-2.0
blueboxgroup/keystone
keystone/common/cache/backends/memcache_pool.py
20
2165
# Copyright 2014 Mirantis 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 ...
apache-2.0
visionegg/visionegg
demo/targetBackground.py
1
2969
#!/usr/bin/env python """Moving target over a spinning drum.""" ############################ # Import various modules # ############################ from VisionEgg import * start_default_logging(); watch_exceptions() from VisionEgg.Core import * from VisionEgg.FlowControl import Presentation, Controller, FunctionC...
lgpl-2.1
rrmartins/eventex
avatar/avatar/templatetags/avatar_tags.py
2
2126
import urllib from django import template from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from django.utils.hashcompat import md5_constructor from avatar import AVATAR_DEFAULT_URL, AVATAR_GRAVATAR_BACKUP, AVATAR_GRAVATAR_DEFAULT register = template.Library() def avatar...
apache-2.0
jairot/tritcask
contrib/handlers.py
2
3339
# -*- coding: utf-8 -*- # Author: Guillermo Gonzalez <guillermo.gonzalez@canonical.com> # Author: Facundo Batista <facundo@canonical.com> # # Copyright 2009-2012 Canonical Ltd. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as ...
gpl-3.0
adamnfish/DjanJinja2
djanjinja_test/simple/tests.py
2
1175
# -*- coding: utf-8 -*- """Tests for simple views which render templates.""" from django.test import TestCase PLAIN_RESPONSE = 'Hello, World!' CONTEXT_RESPONSE = 'a = 1; b = 2' REQ_CONTEXT_RESPONSE = 'user.is_anonymous() => True' NOT_FOUND_RESPONSE = 'NOT FOUND: /this/does/not/exist/' SERVER_ERROR_RESPONSE = 'ERROR...
unlicense
sbesson/openmicroscopy
components/tools/OmeroPy/test/integration/test_annotation.py
3
7338
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013-2014 University of Dundee & Open Microscopy Environment. # All Rights Reserved. Use is subject to license terms supplied in LICENSE.txt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General P...
gpl-2.0
xirdneh/oposum
oPOSum/apps/layaway/models.py
1
8036
from django.db import models from django.utils.translation import ugettext as _ from oPOSum.apps.branches.models import Branch from django.contrib.auth.models import User from oPOSum.apps.client.models import Client from datetime import datetime, timedelta from pytz import timezone import pytz from decimal import Decim...
mit
brenton/cobbler
cobbler/yaml/inline.py
15
1181
""" pyyaml legacy Copyright (c) 2001 Steve Howell and Friends; All Rights Reserved (see open source license information in docs/ directory) """ import re import string class InlineTokenizer: def __init__(self, data): self.data = data def punctuation(self): puncts = [ '[', ']', '...
gpl-2.0
dhermes/gcloud-python
dlp/synth.py
2
8021
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
ddurieux/alignak
test/alignak_modules.py
1
10473
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak 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 So...
agpl-3.0
sgammon/libcloud
libcloud/compute/drivers/vcl.py
36
8760
# 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 use ...
apache-2.0
cetic/ansible
lib/ansible/module_utils/facts/other/facter.py
232
2985
# 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 distributed in the hope that ...
gpl-3.0
ktritz/vispy
vispy/visuals/collections/base_collection.py
6
16741
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- """ A collection is a...
bsd-3-clause