repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
fabianvf/osf.io
scripts/staff_public_regs.py
25
1355
# -*- coding: utf-8 -*- """Get public registrations for staff members. python -m scripts.staff_public_regs """ from collections import defaultdict import logging from modularodm import Q from website.models import Node, User from website.app import init_app logger = logging.getLogger('staff_public_regs') STAFF...
apache-2.0
denfromufa/PTVS
Python/Tests/TestData/VirtualEnv/env/Lib/encodings/shift_jis.py
61
1078
# # shift_jis.py: Python Unicode Codec for SHIFT_JIS # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('shift_jis') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEnc...
apache-2.0
elventear/ansible
lib/ansible/module_utils/bigswitch_utils.py
73
3351
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
EduPepperPDTesting/pepper2013-testing
common/xml_cleanup.py
67
3431
#!/usr/bin/env python """ Victor's xml cleanup script. A big pile of useful hacks. Do not use without carefully reading the code and deciding that this is what you want. In particular, the remove-meta option is only intended to be used after pulling out a policy using the metadata_to_json management command. """ i...
agpl-3.0
EricNeedham/assignment-1
venv/lib/python2.7/site-packages/jinja2/environment.py
614
47244
# -*- coding: utf-8 -*- """ jinja2.environment ~~~~~~~~~~~~~~~~~~ Provides a class that holds runtime and parsing time options. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys from jinja2 import nodes from jinja2.defaults import BLOCK_S...
mit
uiri/pxqz
venv/lib/python2.7/site-packages/pip/vendor/html5lib/tokenizer.py
1710
76929
from __future__ import absolute_import, division, unicode_literals try: chr = unichr # flake8: noqa except NameError: pass from collections import deque from .constants import spaceCharacters from .constants import entities from .constants import asciiLetters, asciiUpper2Lower from .constants import digits, ...
gpl-3.0
justrypython/EAST
svm_model_v2.py
1
2801
#encoding:UTF-8 import os import numpy as np import sys import cv2 import matplotlib.pyplot as plt from sklearn.svm import NuSVC, SVC import datetime import pickle #calculate the area def area(p): p = p.reshape((-1, 2)) return 0.5 * abs(sum(x0*y1 - x1*y0 for ((x0, y0), (x1, y1)) in segme...
gpl-3.0
agualis/test-django-nonrel
django/contrib/localflavor/pt/forms.py
309
1561
""" PT-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ import re phone_digits_re = re.com...
bsd-3-clause
waheedahmed/edx-platform
common/djangoapps/student/tests/test_certificates.py
3
9401
"""Tests for display of certificates on the student dashboard. """ import unittest import ddt import mock from django.conf import settings from django.core.urlresolvers import reverse from mock import patch from django.test.utils import override_settings from xmodule.modulestore import ModuleStoreEnum from xmodule.m...
agpl-3.0
edbrannin/robotframework
utest/running/test_timeouts.py
23
7133
import unittest import sys import time import os from robot.errors import TimeoutError from robot.running.timeouts import TestTimeout, KeywordTimeout from robot.utils.asserts import (assert_equals, assert_false, assert_true, assert_raises, assert_raises_with_msg) from robot.utils impor...
apache-2.0
adamnovak/hgvm-graph-bakeoff-evalutations
scripts/evaluateVariantCalls.py
6
34163
#!/usr/bin/env python2.7 """ evaluateVariantCalls.py: download platinum genomes call sets, break them out by region, and compare them against Glenn-format variant calls on vg graphs, by using a VCF comparison tool. Requires vt (not to be confused with vg), bcftools, and vg to be installed. """ import argparse, sys, ...
mit
2014c2g5/cd0505
static/Brython3.1.1-20150328-091302/Lib/shutil.py
720
39101
"""Utility functions for copying and archiving files and directory trees. XXX The functions here don't copy the resource fork or other metadata on Mac. """ import os import sys import stat from os.path import abspath import fnmatch import collections import errno import tarfile try: import bz2 del bz2 _...
agpl-3.0
kentatogashi/ansible
v1/ansible/inventory/group.py
136
3395
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
xiangel/hue
apps/metastore/src/metastore/tests.py
4
17347
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (...
apache-2.0
pexip/os-pyyaml
tests/lib3/canonical.py
35
12371
import yaml, yaml.composer, yaml.constructor, yaml.resolver class CanonicalError(yaml.YAMLError): pass class CanonicalScanner: def __init__(self, data): if isinstance(data, bytes): try: data = data.decode('utf-8') except UnicodeDecodeError: rai...
mit
mojoboss/scikit-learn
examples/neighbors/plot_approximate_nearest_neighbors_scalability.py
225
5719
""" ============================================ Scalability of Approximate Nearest Neighbors ============================================ This example studies the scalability profile of approximate 10-neighbors queries using the LSHForest with ``n_estimators=20`` and ``n_candidates=200`` when varying the number of sa...
bsd-3-clause
BorgERP/borg-erp-6of3
l10n_hr/l10n_hr_fiskal/__openerp__.py
1
2505
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Module: l10n_hr_fiskal # Author: Davor Bojkić # mail: bole@dajmi5.com # Copyright (C) 2012- Daj Mi 5, # http://www.dajmi5.com # Co...
agpl-3.0
lmazuel/azure-sdk-for-python
azure-mgmt-storage/azure/mgmt/storage/v2017_10_01/operations/skus_operations.py
2
4078
# 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
Dhivyap/ansible
test/units/modules/network/fortios/test_fortios_system_csf.py
21
7764
# Copyright 2019 Fortinet, Inc. # # 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 distributed in the...
gpl-3.0
ric2b/Vivaldi-browser
chromium/build/landmines.py
3
5043
#!/usr/bin/env python # 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. """ This script runs every build as the first hook (See DEPS). If it detects that the build should be clobbered, it will delete the...
bsd-3-clause
takaaptech/sky_engine
testing/legion/common_lib.py
23
1441
# Copyright 2015 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. """Common library methods used by both coordinator and task machines.""" import argparse import logging import os import socket LOGGING_LEVELS = ['DEBUG', ...
bsd-3-clause
KyleAMoore/KanjiNani
Android/.buildozer/android/platform/build/dists/KanjiNani/crystax_python/crystax_python/site-packages/kivy/interactive.py
12
10253
''' Interactive launcher ==================== .. versionadded:: 1.3.0 .. deprecated:: 1.10.0 The interactive launcher has been deprecated. The :class:`InteractiveLauncher` provides a user-friendly python shell interface to an :class:`App` so that it can be prototyped and debugged interactively. .. note:: T...
gpl-3.0
dmort27/panphon
panphon/test/test_permissive_methods.py
1
2679
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals, division, absolute_import import unittest from panphon import permissive class TestFeatureTableAPI(unittest.TestCase): def setUp(self): self.ft = permissive.PermissiveFeatureTable() def test_fts(self): self.ass...
mit
summychou/CSForOSS
CA/OSSQt_DataMasterRigster.py
1
2535
# -*- coding: utf-8 -*- # import sqlite3 as sqlite import sys import uuid from pysqlcipher3 import dbapi2 as sqlite def main(): print("***************** Welcome to OSS DataMaster-Rigster System *******************") print("* *") pri...
mit
watonyweng/nova
nova/tests/unit/scheduler/filters/test_image_props_filters.py
66
10627
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
showell/zulip
zerver/migrations/0092_create_scheduledemail.py
7
1087
# Generated by Django 1.11.2 on 2017-07-11 23:41 import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('zerver', '0091_realm_allow_edit_history'), ] operations = [ migrations.Cre...
apache-2.0
Microvellum/Fluid-Designer
win64-vc/2.78/scripts/startup/fluid_operators/fd_api_doc.py
1
10496
''' Created on Jan 27, 2017 @author: montes ''' import bpy from inspect import * import mv import os import math from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import legal,inch,cm from reportlab.platypus import Image from reportlab.platypus import Paragraph,Table,TableStyle from reportlab.platypus ...
gpl-3.0
sol/pygments
tests/test_julia.py
1
1791
# -*- coding: utf-8 -*- """ Julia Tests ~~~~~~~~~~~ :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import unittest from pygments.lexers import JuliaLexer from pygments.token import Token class JuliaTests(unittest.TestCase): def set...
bsd-2-clause
hyowon/servo
python/mozlog/mozlog/structured/commandline.py
39
8909
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import sys import os import optparse from collections import defaultdict from structuredlog import StructuredLogger, se...
mpl-2.0
RouxRC/weboob
modules/sfr/module.py
7
2129
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Christophe Benz # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
agpl-3.0
Pluto-tv/chromium-crosswalk
tools/perf/benchmarks/startup.py
2
2786
# 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. from core import perf_benchmark from measurements import startup import page_sets from telemetry import benchmark class _StartupCold(perf_benchmark.PerfBe...
bsd-3-clause
Ramyak/CodingPractice
algo_practice/sort/merge_sort.py
1
1251
#!/usr/bin/env python a = [5, 3, 6, 3, 1, 2] def merge_sort(in_array, left, right): print 'Before: ({} , {}) : {}'.format(str(left), str(right), (in_array[left:right + 1])) if right - left >= 1: mid = ((right - left) / 2) + left if mid > right: return merge_sort(in_array, ...
gpl-2.0
hnoerdli/hussa
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
1534
3426
# 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 collections import os import gyp import gyp.common import gyp.msvs_emulation import json import sys generator_supports_multiple_toolsets = True generator_...
mit
UQ-UQx/edx-platform_lti
common/lib/symmath/symmath/symmath_check.py
20
12580
#!/usr/bin/python # -*- coding: utf-8 -*- # # File: symmath_check.py # Date: 02-May-12 (creation) # # Symbolic mathematical expression checker for edX. Uses sympy to check for expression equality. # # Takes in math expressions given as Presentation MathML (from ASCIIMathML), converts to Content MathML using Snuggl...
agpl-3.0
souravbadami/zulip
api/integrations/hg/zulip-changegroup.py
15
6462
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Zulip hook for Mercurial changeset pushes. # Copyright © 2012-2014 Zulip, Inc. # # 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 res...
apache-2.0
carmark/vbox
src/VBox/Devices/EFI/Firmware/BaseTools/Tests/RunTests.py
12
1060
## @file # Unit tests for BaseTools utilities # # Copyright (c) 2008, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license m...
gpl-2.0
Mirantis/tempest
tempest/api/compute/servers/test_availability_zone.py
4
1383
# 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
JGarcia-Panach/odoo
openerp/addons/base/module/report/ir_module_reference_print.py
384
3704
# -*- 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
poljeff/odoo
openerp/addons/base/res/res_config.py
243
30944
# -*- 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 GNU...
agpl-3.0
crazy-canux/django
django/db/backends/sqlite3/operations.py
180
9372
from __future__ import unicode_literals import datetime import uuid from django.conf import settings from django.core.exceptions import FieldError, ImproperlyConfigured from django.db import utils from django.db.backends import utils as backend_utils from django.db.backends.base.operations import BaseDatabaseOperatio...
bsd-3-clause
keedio/hue
desktop/core/ext-py/Django-1.6.10/tests/model_formsets_regress/tests.py
40
18918
from __future__ import absolute_import, unicode_literals from django import forms from django.forms.formsets import BaseFormSet, DELETION_FIELD_NAME from django.forms.util import ErrorDict, ErrorList from django.forms.models import modelform_factory, inlineformset_factory, modelformset_factory, BaseModelFormSet from d...
apache-2.0
Fusion-Rom/android_external_chromium_org
tools/telemetry/telemetry/core/platform/profiler/__init__.py
94
2391
# 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 collections from telemetry.core import exceptions class Profiler(object): """A sampling profiler provided by the platform. A profiler is starte...
bsd-3-clause
mmbtba/odoo
addons/hr_contract/base_action_rule.py
389
2646
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013 OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
agpl-3.0
michaelld/gnuradio
gnuradio-runtime/apps/evaluation_random_numbers.py
7
5284
#!/usr/bin/env python # # Copyright 2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # ...
gpl-3.0
AaronTao1990/scrapy
scrapy/core/engine.py
109
12431
""" This is the Scrapy engine which controls the Scheduler, Downloader and Spiders. For more information see docs/topics/architecture.rst """ import logging from time import time from twisted.internet import defer from twisted.python.failure import Failure from scrapy import signals from scrapy.core.scraper import ...
bsd-3-clause
SimenB/thefuck
tests/rules/test_dirty_unzip.py
4
2168
# -*- coding: utf-8 -*- import os import pytest import zipfile from thefuck.rules.dirty_unzip import match, get_new_command, side_effect from thefuck.types import Command from unicodedata import normalize @pytest.fixture def zip_error(tmpdir): def zip_error_inner(filename): path = os.path.join(str(tmpdir...
mit
jzt5132/scikit-learn
examples/ensemble/plot_adaboost_twoclass.py
347
3268
""" ================== Two-class AdaBoost ================== This example fits an AdaBoosted decision stump on a non-linearly separable classification dataset composed of two "Gaussian quantiles" clusters (see :func:`sklearn.datasets.make_gaussian_quantiles`) and plots the decision boundary and decision scores. The di...
bsd-3-clause
xydinesh/flask-restful
jinja2/testsuite/inheritance.py
90
7682
# -*- coding: utf-8 -*- """ jinja2.testsuite.inheritance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the template inheritance feature. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Env...
apache-2.0
kevin8909/xjerp
openerp/addons/share/__openerp__.py
56
2419
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2011 OpenERP SA (<http://www.openerp.com>). # # This program is free software: you ...
agpl-3.0
hwjworld/xiaodun-platform
lms/djangoapps/courseware/tests/test_masquerade.py
12
4326
""" Unit tests for masquerade Based on (and depends on) unit tests for courseware. Notes for running by hand: ./manage.py lms --settings test test lms/djangoapps/courseware """ import json from django.test.utils import override_settings from django.core.urlresolvers import reverse from django.contrib.auth.models i...
agpl-3.0
doug-fish/horizon
openstack_dashboard/dashboards/admin/defaults/tests.py
27
5796
# Copyright 2013 Kylin, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
apache-2.0
timoschwarzer/blendworks
BlendWorks Server/python/Lib/test/test_threaded_import.py
72
8337
# This is a variant of the very old (early 90's) file # Demo/threads/bug.py. It simply provokes a number of threads into # trying to import the same module "at the same time". # There are no pleasant failure modes -- most likely is that Python # complains several times about module random having no attribute # randran...
gpl-2.0
Freso/picard
picard/oauth.py
2
7451
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2014 Lukáš Lalinský # # 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...
gpl-2.0
tashaxe/Red-DiscordBot
lib/youtube_dl/extractor/facebook.py
12
17905
# coding: utf-8 from __future__ import unicode_literals import re import socket from .common import InfoExtractor from ..compat import ( compat_etree_fromstring, compat_http_client, compat_urllib_error, compat_urllib_parse_unquote, compat_urllib_parse_unquote_plus, ) from ..utils import ( clea...
gpl-3.0
gboudreau/CouchPotato
library/mako/lexer.py
21
16144
# lexer.py # Copyright (C) 2006, 2007, 2008, 2009, 2010 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """provides the Lexer class for parsing template strings into parse trees.""" import re, codecs fro...
gpl-3.0
AMOboxTV/AMOBox.LegoBuild
plugin.video.exodus/resources/lib/sources/ninemovies_mv_tv.py
1
7333
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
gpl-2.0
upsuper/servo
tests/wpt/web-platform-tests/tools/third_party/pytest/testing/code/test_code.py
14
4951
# coding: utf-8 from __future__ import absolute_import, division, print_function import sys import _pytest._code import py import pytest from test_excinfo import TWMock def test_ne(): code1 = _pytest._code.Code(compile('foo = "bar"', '', 'exec')) assert code1 == code1 code2 = _pytest._code.Code(compile('...
mpl-2.0
oli-kester/advanced-av-examples
amp-osc-lv2/.waf-1.8.5-3556be08f33a5066528395b11fed89fa/waflib/Tools/xlcxx.py
2
1177
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file from waflib.Tools import ccroot,ar from waflib.Configure import conf @conf def find_xlcxx(conf): cxx=conf.find_program(['xlc++_r','xlc++'],var='CXX') conf.get_xlc_version(cx...
gpl-2.0
meerkat-code/meerkat_api
meerkat_api/test/settings.py
2
1100
from passlib.hash import pbkdf2_sha256 import calendar import time import jwt import os # Need this module to be importable without the whole of meerkat_auth config # Directly load secret settings file from which to import required variables # File must include JWT_COOKIE_NAME, JWT_ALGORITHM and JWT_PUBLIC_KEY variabl...
mit
holmes/intellij-community
python/lib/Lib/aifc.py
91
33417
"""Stuff to parse AIFF-C and AIFF files. Unless explicitly stated otherwise, the description below is true both for AIFF-C files and AIFF files. An AIFF-C file has the following structure. +-----------------+ | FORM | +-----------------+ | <size> | +----+------------+ | | AIFC ...
apache-2.0
smerritt/swift
test/unit/obj/test_reconstructor.py
2
207832
# Copyright (c) 2010-2012 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 or agree...
apache-2.0
binoculars/osf.io
tests/test_registrations/test_retractions.py
7
42743
"""Tests related to retraction of public registrations""" import datetime import httplib as http import mock from django.utils import timezone from django.db import DataError from nose.tools import * # noqa from framework.auth import Auth from framework.exceptions import PermissionsError from tests.base import fake...
apache-2.0
frederick-masterton/django
tests/admin_registration/tests.py
34
4118
from __future__ import unicode_literals from django.contrib import admin from django.contrib.admin.decorators import register from django.contrib.admin.sites import site from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from .models import Person, Place, Location, Traveler cla...
bsd-3-clause
Lukiqq/GT-I9100-Galaxian-ICS-Kernel
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
gylian/sickbeard
lib/hachoir_core/field/helper.py
90
1905
from lib.hachoir_core.field import (FieldError, RawBits, RawBytes, PaddingBits, PaddingBytes, NullBits, NullBytes, GenericString, GenericInteger) from lib.hachoir_core.stream import FileOutputStream def createRawField(parent, size, name="raw[]", description=None): if size <= 0: raise FieldE...
gpl-3.0
sdulal/oppia
extensions/rules/music_phrase.py
7
1602
# coding: utf-8 # # Copyright 2013 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 ...
apache-2.0
pigworlds/asuswrttest
release/src/router/wget/testenv/Test-auth-basic.py
23
1565
#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures Wget's Basic Authorization Negotiation. Also, we ensure that Wget saves the host after a successfull auth and doesn't wait for a challenge the second time. """ TEST_NAME...
gpl-2.0
mindnervestech/mnrp
addons/crm/__openerp__.py
41
4555
# -*- 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
LibraryOfCongress/gazetteer
etl/parser/hmdb.py
1
1998
import sys, json, os, datetime from shapely.geometry import asShape, mapping from fiona import collection from core import Dump import core import codecs #name, cmt, desc, link1_href def extract_shapefile(shapefile, uri_name, simplify_tolerance=None): for feature in collection(shapefile, "r"): ...
mit
ULHPC/modules
easybuild/easybuild-easyblocks/test/__init__.py
21
1479
## # Copyright 2009-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
mit
wilvk/ansible
lib/ansible/modules/packaging/language/npm.py
21
8644
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Chris Hoffman <christopher.hoffman@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'met...
gpl-3.0
duoduo369/leaning-frontend
node_modules/gulp-iconfont/node_modules/gulp-ttf2woff2/node_modules/ttf2woff2/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
2736
6387
# 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. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml #-------------------------------------------------------------------...
mit
shenlong3030/asv-django-guestbook
django/conf/locale/lv/formats.py
9
1226
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = r'Y. \g\a\d\a j. F' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = r'Y. \g\a\d\a j. F, H:i:s' YEAR_MONTH_FORMAT = r'Y. \g. F' MONTH_DAY_FORMAT = 'j. F' SHORT_DATE_FORMAT = r'j.m.Y' SHORT_DATETIME_FORMA...
bsd-3-clause
lucasmello/Driloader
driloader/browser/internet_explorer.py
1
4135
# pylint: disable=anomalous-backslash-in-string, too-many-locals, # pylint: disable=multiple-statements """ Module that abstract operations to handle Internet Explorer versions. """ import os import platform import re import xml.etree.ElementTree as ET import requests from driloader.browser.exceptions import Brow...
mit
virtualopensystems/neutron
neutron/tests/unit/services/firewall/drivers/linux/test_iptables_fwaas.py
8
10024
# Copyright 2013 Dell 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 app...
apache-2.0
SM-G920P/kernel_samsung_exynos7420
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
lewislone/mStocks
packets-analysis/lib/dpkt-1.7/dpkt/icmp6.py
15
2647
# $Id: icmp6.py 23 2006-11-08 15:45:33Z dugsong $ """Internet Control Message Protocol for IPv6.""" import dpkt, ip6 ICMP6_DST_UNREACH = 1 # dest unreachable, codes: ICMP6_PACKET_TOO_BIG = 2 # packet too big ICMP6_TIME_EXCEEDED = 3 # time exceeded, code: ICMP6_PARAM_PROB...
mit
BizzCloud/PosBox
openerp/report/render/rml2txt/rml2txt.py
442
16460
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009, P. Christeas, Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or ...
agpl-3.0
1HLtd/linux
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
romain-dartigues/ansible
lib/ansible/modules/cloud/google/gcp_compute_ssl_policy.py
7
13755
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
gwwfps/boxrps
werkzeug/script.py
20
10686
# -*- coding: utf-8 -*- r''' werkzeug.script ~~~~~~~~~~~~~~~ Most of the time you have recurring tasks while writing an application such as starting up an interactive python interpreter with some prefilled imports, starting the development server, initializing the database or something similar....
mit
PyBossa/pybossa
pybossa/auth/webhook.py
1
1833
# -*- coding: utf8 -*- # This file is part of PYBOSSA. # # Copyright (C) 2015 SF Isle of Man Limited # # PYBOSSA is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
agpl-3.0
spring01/libPSI
lib/python/grendel/chemistry/molecule_stub.py
1
11089
# FAILED ATTEMPT AT REFORMING MOLECULESTUB # Perhaps I'll come back to this later... #from grendel import type_checking_enabled, sanity_checking_enabled #from grendel.chemistry.atom import Atom #from grendel.gmath import magnitude, angle_between_vectors #from grendel.gmath.matrix import Matrix #from grendel.util.decora...
gpl-2.0
kawasaki2013/python-for-android-x86
python-build/python-libs/gdata/tests/gdata_tests/codesearch_test.py
133
1930
#!/usr/bin/python # # Copyright (C) 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
plotly/python-api
packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickformatstops.py
2
2318
import _plotly_utils.basevalidators class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="layout.ternary.baxis", **kwargs ): super(TickformatstopsValidator, self).__init__( ...
mit
flying-sheep/omnitool
version.py
1
1888
from functools import total_ordering @total_ordering class Version(): """Organization Class for comparable Version System Version integer uses decimal shift: 2 digits major version, 2 digits minor version, 2 digits micro version 170100 -> 17.1.0 """ def __init__(self, in...
mit
khofosec/BeastBot
src/inc/modules/suggest.py
4
1611
from inc import * modFunc.addCommand('suggest', 'suggest', 'suggest') modFunc.addCommand('sug', 'suggest', 'suggest') modFunc.addCommand('issue', 'suggest', 'suggest') modFunc.addCommand('sug-read', 'suggest', 'read') modFunc.addCommand('sug-clear', 'suggest', 'clear') def suggest(line, irc): message, username, m...
gpl-3.0
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/django-1.4/django/contrib/localflavor/mk/forms.py
89
3582
from __future__ import absolute_import import datetime from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, Select from django.utils.translation import ugettext_lazy as _ from django.contrib.localflavor.mk.mk_choices import MK_MUNICIPALI...
mit
Bitcoinsulting/dark-test-v2
qa/rpc-tests/skeleton.py
148
2426
#!/usr/bin/env python # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Skeleton for python-based regression tests using # JSON-RPC # Add python-bitcoinrpc to module search pa...
mit
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/git/objects/submodule/util.py
21
2745
import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref __all__ = ('sm_section', 'sm_name', 'mkhead', 'find_first_remote_branch', 'SubmoduleConfigParser') #{ Utilities def sm_section(name): """:return: section title used in...
gpl-3.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.0/Lib/dos-8x3/robotpar.py
8
3256
""" Robots.txt file parser class. Accepts a list of lines or robots.txt URL as input, builds a set of rules from that list, then answers questions about fetchability of other URLs. """ class RobotFileParser: def __init__(self): self.rules = {} self.debug = 0 self.url = '' self.l...
mit
defnull/bottle
test/test_plugins.py
3
7526
# -*- coding: utf-8 -*- import unittest from . import tools from bottle import HTTPResponse, HTTPError, json_dumps class MyPlugin(object): def __init__(self): self.app = None self.add_args = {} self.add_content = '' def setup(self, app): self.app = app def apply(self, fu...
mit
domthu/gasistafelice
gasistafelice/auth/__init__.py
1
2945
from django.utils.translation import ugettext as _, ugettext_lazy from django.db.models.signals import post_syncdb import permissions from permissions.utils import register_role, register_permission ## role-related constants NOBODY = 'NOBODY' GAS_MEMBER = 'GAS_MEMBER' GAS_REFERRER_SUPPLIER = 'GAS_REFERRER_SUPPLIER' ...
agpl-3.0
ewandor/home-assistant
homeassistant/components/sensor/demo.py
17
1577
""" Demo platform that has a couple of fake sensors. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ from homeassistant.const import ATTR_BATTERY_LEVEL, TEMP_CELSIUS from homeassistant.helpers.entity import Entity # pylint: disable=unused-argumen...
apache-2.0
cheral/orange3
Orange/canvas/application/outputview.py
6
6738
""" """ import traceback from AnyQt.QtWidgets import QWidget, QPlainTextEdit, QVBoxLayout, QSizePolicy from AnyQt.QtGui import QTextCursor, QTextCharFormat, QFont from AnyQt.QtCore import Qt, QObject, QCoreApplication, QThread, QSize from AnyQt.QtCore import pyqtSignal as Signal class TerminalView(QPlainTextEdit): ...
bsd-2-clause
andyliuliming/WALinuxAgent
azurelinuxagent/daemon/resourcedisk/openbsd.py
4
4899
# Microsoft Azure Linux Agent # # Copyright 2018 Microsoft Corporation # Copyright 2017 Reyk Floeter <reyk@openbsd.org> # # 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.apac...
apache-2.0
heisencoder/route-finder
third_party/lib/python/django/utils/ipv6.py
113
7965
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/ # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from django.utils.six.moves import xrang...
mit
dago/ansible-modules-extras
cloud/amazon/s3_lifecycle.py
27
14782
#!/usr/bin/python # # This is a 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 Ansible library is distributed in the hope that i...
gpl-3.0
dentaku65/pelisalacarta
python/main-classic/channels/mocosoftx.py
9
6772
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para mocosoftx # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os import sys from ...
gpl-3.0
dentaku65/pelisalacarta
python/main-classic/lib/cerealizer/__init__.py
27
23344
# -*- coding: utf-8 -*- # Cerealizer # Copyright (C) 2005-2008 Jean-Baptiste LAMY # Copyright (C) 2008 Peter Eckersley # # This program is free software. # It is available under the Python licence. """Cerealizer -- A secure Pickle-like module The interface of the Cerealizer module is similar to Pickle, and it support...
gpl-3.0