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
Dik1s/volatility
volatility/plugins/overlays/windows/pe_vtypes.py
44
17470
# Volatility # Copyright (c) 2008-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. You may not use, modify or # distribu...
gpl-2.0
dethos/cloudroutes-service
src/web/reactionforms/digitalocean-powercycle/__init__.py
12
1062
###################################################################### # Cloud Routes Web Application # ------------------------------------------------------------------- # Reaction - Forms Class ###################################################################### from wtforms import TextField, SelectField from wtf...
agpl-3.0
att-comdev/drydock
drydock_provisioner/drivers/node/maasdriver/models/volumegroup.py
1
5548
# Copyright 2017 AT&T Intellectual Property. All other 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
mzdaniel/oh-mainline
vendor/packages/twisted/twisted/protocols/dict.py
60
10727
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Dict client protocol implementation. @author: Pavel Pergamenshchik """ from twisted.protocols import basic from twisted.internet import defer, protocol from twisted.python import log from StringIO import StringIO def parseParam(line): ...
agpl-3.0
oshepherd/eforge
eforge/pluginloader.py
1
1408
# -*- coding: utf-8 -*- # EForge project management system, Copyright © 2010, Element43 # # Permission to use, copy, modify, and/or distribute this software 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 SOFTWA...
isc
jesseengel/magenta
magenta/tensor2tensor/t2t_decoder.py
2
1130
# Copyright 2019 The Magenta Authors. # # 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 ...
apache-2.0
edwardzhou1980/bite-project
deps/gdata-python-client/src/gdata/apps/groups/service.py
94
12924
#!/usr/bin/python # # Copyright (C) 2008 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
nickster5001/ctracker
flask/lib/python3.4/site-packages/whoosh/analysis/acore.py
93
5525
# Copyright 2007 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
mit
dims/cinder
cinder/api/contrib/snapshot_manage.py
15
5569
# Copyright 2015 Huawei Technologies Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
kursitet/edx-platform
lms/djangoapps/course_api/api.py
11
2388
""" Course API """ from django.contrib.auth.models import User from rest_framework.exceptions import PermissionDenied from lms.djangoapps.courseware.courses import ( get_courses, get_course_overview_with_access, get_permission_for_course_about, ) from .permissions import can_view_courses_for_username d...
agpl-3.0
afandria/mojo
build/android/pylib/utils/findbugs.py
39
5105
# 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 argparse import logging import os import re import shlex import sys import xml.dom.minidom from pylib import cmd_helper from pylib import constan...
bsd-3-clause
perror/checkstyle
checkstyle/rules.py
1
3951
# -*- coding: utf-8 """Describes the coding style rules and how to check it.""" from checkstyle.utils import error from pygments.token import * class Rule(object): """Abstract class to check a precise coding style rule.""" def __init__(self): pass def name(self): """Return the name of ...
bsd-3-clause
tylesmit/openstack-dashboard
django-openstack/django_openstack/tests/broken/volume_tests.py
21
6562
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
dermute/ansible
lib/ansible/vars/hostvars.py
26
3405
# (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
tvincentNuoDB/nuodb-python
tests/dbapi20.py
1
31896
#!/usr/bin/env python ''' Python DB API 2.0 driver compliance unit test suite. This software is Public Domain and may be used without restrictions. "Now we have booze and barflies entering the discussion, plus rumours of DBAs on drugs... and I won't tell you what flashes through my mind each time I read the ...
bsd-3-clause
alyosha1879/ryu
ryu/services/protocols/bgp/operator/commands/show/importmap.py
52
1464
from ryu.services.protocols.bgp.operator.command import Command from ryu.services.protocols.bgp.operator.command import CommandsResponse from ryu.services.protocols.bgp.operator.command import STATUS_ERROR from ryu.services.protocols.bgp.operator.command import STATUS_OK from ryu.services.protocols.bgp.operator.command...
apache-2.0
Jasonmk47/OpenWPM
automation/DeployBrowsers/deploy_firefox.py
1
6296
from ..MPLogger import loggingclient from ..Commands.profile_commands import load_profile import configure_firefox from selenium.webdriver.firefox.firefox_binary import FirefoxBinary from selenium import webdriver from pyvirtualdisplay import Display import shutil import os import random DEFAULT_SCREEN_RES = (1366, ...
gpl-3.0
Lujeni/ansible
lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule_info.py
8
13438
#!/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
kl0u/flink
flink-python/pyflink/table/table_result.py
5
11562
################################################################################ # 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...
apache-2.0
idea4bsd/idea4bsd
python/lib/Lib/site-packages/django/contrib/gis/tests/distapp/data.py
114
5247
au_cities = (('Wollongong', 150.902, -34.4245), ('Shellharbour', 150.87, -34.5789), ('Thirroul', 150.924, -34.3147), ('Mittagong', 150.449, -34.4509), ('Batemans Bay', 150.175, -35.7082), ('Canberra', 144.963, -37.8143), ('Melbourne', 145.963...
apache-2.0
hychyc07/mosesdecoder
mingw/MosesGUI/datamodel.py
8
17128
# -*- coding: utf-8 -*- from PyQt4.QtCore import ( QDateTime, SIGNAL, ) from PyQt4.QtGui import ( QMessageBox, ) from PyQt4.QtSql import ( QSqlDatabase, QSqlQuery, QSqlTableModel, QVariant, ) import ConfigParser import os import shutil import sys import threading import urllib2...
lgpl-2.1
marcellodesales/svnedge-console
ext/solaris/pkg-toolkit/pkg/vendor-packages/pkg/bundle/SolarisPackageDatastreamBundle.py
4
6082
#!/usr/bin/python2.4 # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://w...
agpl-3.0
willharris/django
django/db/backends/base/schema.py
2
42715
import hashlib from django.db.backends.utils import truncate_name from django.db.transaction import atomic from django.utils import six from django.utils.encoding import force_bytes from django.utils.log import getLogger logger = getLogger('django.db.backends.schema') def _related_non_m2m_objects(opts): # filte...
bsd-3-clause
EmadMokhtar/Django
tests/mail/tests.py
14
65241
import asyncore import base64 import mimetypes import os import shutil import smtpd import sys import tempfile import threading from email import charset, message_from_binary_file, message_from_bytes from email.header import Header from email.mime.text import MIMEText from email.utils import parseaddr from io import St...
mit
gorczynski/dotfiles
vim/bundle/powerline/powerline/renderers/shell/__init__.py
20
4566
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) from powerline.renderer import Renderer from powerline.theme import Theme from powerline.colorscheme import ATTR_BOLD, ATTR_ITALIC, ATTR_UNDERLINE def int_to_rgb(num): r = (num >> 16) & 0xff g = (num ...
gpl-3.0
1013553207/django
django/core/serializers/xml_serializer.py
184
15662
""" XML serializer. """ from __future__ import unicode_literals from collections import OrderedDict from xml.dom import pulldom from xml.sax import handler from xml.sax.expatreader import ExpatParser as _ExpatParser from django.apps import apps from django.conf import settings from django.core.serializers import bas...
bsd-3-clause
pap/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/backends/backend_gtkagg.py
70
4184
""" Render to gtk from agg """ from __future__ import division import os import matplotlib from matplotlib.figure import Figure from matplotlib.backends.backend_agg import FigureCanvasAgg from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\ show, draw_if_interactive,\ error_ms...
agpl-3.0
ammaradil/fibonacci
Lib/encodings/undefined.py
860
1299
""" Python 'undefined' Codec This codec will always raise a ValueError exception when being used. It is intended for use by the site.py file to switch off automatic string to Unicode coercion. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ impo...
mit
yograterol/django
tests/urlpatterns_reverse/urls.py
199
5421
import warnings from django.conf.urls import include, patterns, url from django.utils.deprecation import RemovedInDjango110Warning from .views import ( absolute_kwargs_view, defaults_view, empty_view, empty_view_partial, empty_view_wrapped, nested_view, ) other_patterns = [ url(r'non_path_include/$', emp...
bsd-3-clause
amyshi188/osf.io
api_tests/nodes/serializers/test_serializers.py
2
4870
# -*- coding: utf-8 -*- from urlparse import urlparse from nose.tools import * # flake8: noqa from dateutil.parser import parse as parse_date from tests.base import DbTestCase, assert_datetime_equal from tests.utils import make_drf_request from tests.factories import UserFactory, NodeFactory, RegistrationFactory, Pr...
apache-2.0
edry/edx-platform
common/lib/xmodule/xmodule/modulestore/split_mongo/caching_descriptor_system.py
82
14841
import sys import logging from contracts import contract, new_contract from fs.osfs import OSFS from lazy import lazy from xblock.runtime import KvsFieldData from xblock.fields import ScopeIds from xblock.core import XBlock from opaque_keys.edx.locator import BlockUsageLocator, LocalId, CourseLocator, LibraryLocator, D...
agpl-3.0
bayespy/bayespy
bayespy/inference/vmp/nodes/concatenate.py
3
5955
################################################################################ # Copyright (C) 2015 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ import numpy as np from bayespy.utils import misc from .deterministi...
mit
nugget/home-assistant
tests/components/binary_sensor/test_threshold.py
12
13078
"""The test for the threshold sensor platform.""" import unittest from homeassistant.setup import setup_component from homeassistant.const import ( ATTR_UNIT_OF_MEASUREMENT, STATE_UNKNOWN, TEMP_CELSIUS) from tests.common import get_test_home_assistant class TestThresholdSensor(unittest.TestCase): """Tes...
apache-2.0
hitszxp/scikit-learn
sklearn/utils/stats.py
12
1672
import numpy as np from scipy.stats import rankdata as _sp_rankdata # To remove when we support scipy 0.13 def _rankdata(a, method="average"): """Assign ranks to data, dealing with ties appropriately. Ranks begin at 1. The method argument controls how ranks are assigned to equal values. Parameters ...
bsd-3-clause
Endika/c2c-rd-addons
chricar_sale_internal_shippment/wizard/make_ship_internal.py
4
8457
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify ...
agpl-3.0
Accelerite/cinder
cinder/volume/rpcapi.py
3
10524
# Copyright 2012, Intel, 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 agree...
apache-2.0
silenceli/nova
nova/tests/unit/cmd/test_idmapshift.py
30
25617
# Copyright 2014 Rackspace, Andrew Melton # # 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...
apache-2.0
tempbottle/kbengine
kbe/res/scripts/common/Lib/test/test_unicode.py
67
116018
""" Test script for the Unicode implementation. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import _string import codecs import itertools import struct import sys import unittest import warnings from test import support, string_tests # Error handling ...
lgpl-3.0
mdrumond/tensorflow
tensorflow/contrib/tensor_forest/hybrid/python/kernel_tests/k_feature_routing_function_op_test.py
103
3383
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/snowballstemmer/russian_stemmer.py
19
20090
# self file was generated automatically by the Snowball to Python interpreter from .basestemmer import BaseStemmer from .among import Among class RussianStemmer(BaseStemmer): ''' self class was automatically generated by a Snowball to Python interpreter It implements the stemming algorithm defined by a s...
gpl-3.0
graingert/aiohttp_session
docs/conf.py
2
11072
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # aiohttp_session documentation build configuration file, created by # sphinx-quickstart on Wed Apr 1 21:54:09 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in t...
apache-2.0
georgiadavis/drydrop
dryapp/pygments/formatters/html.py
7
24128
# -*- coding: utf-8 -*- """ pygments.formatters.html ~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for HTML output. :copyright: 2006-2008 by Georg Brandl, Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys, os import StringIO try: set except NameError: from sets import Set a...
bsd-3-clause
lucashmorais/x-Bench
mozmill-env/python/Lib/lib2to3/fixes/fix_next.py
327
3181
"""Fixer for it.next() -> next(it), per PEP 3114.""" # Author: Collin Winter # Things that currently aren't covered: # - listcomp "next" names aren't warned # - "with" statement targets aren't checked # Local imports from ..pgen2 import token from ..pygram import python_symbols as syms from .. import fixer_base f...
mit
p-l-/ivre
ivre/parser/argus.py
1
2854
#! /usr/bin/env python # This file is part of IVRE. # Copyright 2011 - 2021 Pierre LALET <pierre@droids-corp.org> # # IVRE 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 #...
gpl-3.0
mbroadst/rethinkdb
test/common/http_support/flask/testsuite/reqctx.py
557
5960
# -*- coding: utf-8 -*- """ flask.testsuite.reqctx ~~~~~~~~~~~~~~~~~~~~~~ Tests the request context. :copyright: (c) 2012 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import flask import unittest try: from greenlet import greenlet except ImportError: greenlet = None...
agpl-3.0
jayvdb/pywikibot-core
tests/isbn_tests.py
5
9475
# -*- coding: utf-8 -*- """Tests for isbn script.""" # # (C) Pywikibot team, 2014-2016 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals import pywikibot try: from stdnum.exceptions import ValidationError as StdNumValidationError except ImportError: ...
mit
louisLouL/pair_trading
capstone_env/lib/python3.6/site-packages/numpy/f2py/tests/test_return_complex.py
145
4777
from __future__ import division, absolute_import, print_function from numpy import array from numpy.compat import long from numpy.testing import run_module_suite, assert_, assert_raises, dec import util class TestReturnComplex(util.F2PyTest): def check_function(self, t): tname = t.__doc__.split()[0] ...
mit
fti7/ansible-modules-core
utilities/fail.py
86
1443
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.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 Lice...
gpl-3.0
libo/Enigma2
lib/python/Components/ChoiceList.py
9
1109
from MenuList import MenuList from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, gFont from Tools.LoadPixmap import LoadPixmap def ChoiceEntryComponent(key = "", text = ["--"]): res = [ text ] if text[0] == "--": res.append((eListboxPyth...
gpl-2.0
gabrielfalcao/lettuce
tests/integration/lib/Django-1.3/django/contrib/formtools/preview.py
229
6829
""" Formtools Preview application. """ import cPickle as pickle from django.conf import settings from django.http import Http404 from django.shortcuts import render_to_response from django.template.context import RequestContext from django.utils.hashcompat import md5_constructor from django.utils.crypto import consta...
gpl-3.0
rananda/cfme_tests
fixtures/screenshots.py
2
1571
# -*- coding: utf-8 -*- """Taking screenshots inside tests! If you want to take a screenshot inside your test, just do it like this: .. code-block:: python def test_my_test(take_screenshot): # do something take_screenshot("Particular name for the screenshot") # do something else """ impo...
gpl-2.0
heynemann/thumborizeme
thumborizeme/app.py
1
5153
import sys import os.path from json import dumps, loads from datetime import datetime import lxml.html import tornado.ioloop import tornado.web import tornado.gen from tornado.httpclient import AsyncHTTPClient, HTTPRequest from tornado.concurrent import return_future from toredis import Client import settings roo...
mit
webrecorder/webrecorder
webrecorder/auto_tests/runauto.py
1
4145
import requests import pytest import subprocess # ============================================================================ class TestAuto(object): PREFIX = 'http://localhost:8089' USER = 'testauto' LIST_ID = '' AUTO_ID = '' NUM_BROWSERS = 2 @classmethod def setup_class(cls): c...
apache-2.0
cortedeltimo/SickRage
lib/unidecode/x0b0.py
253
4853
data = ( 'ggwem', # 0x00 'ggweb', # 0x01 'ggwebs', # 0x02 'ggwes', # 0x03 'ggwess', # 0x04 'ggweng', # 0x05 'ggwej', # 0x06 'ggwec', # 0x07 'ggwek', # 0x08 'ggwet', # 0x09 'ggwep', # 0x0a 'ggweh', # 0x0b 'ggwi', # 0x0c 'ggwig', # 0x0d 'ggwigg', # 0x0e 'ggwigs', # 0x0f 'gg...
gpl-3.0
MoRgUiJu/morguiju.repo
plugin.video.pelisalacarta/servers/vidbux.py
4
3956
# -*- coding: iso-8859-1 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para vidbux # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re from core import logger from core import scra...
gpl-2.0
labsquare/CuteVariant
cutevariant/core/querybuilder.py
1
20200
"""Functions to build a complex SQL Select statement to query variant. In the most of cases, you will only use build_sql_query function. Examples:: conn = sqlite3.Connection("::memory::") query = build_sql_query(["chr","pos"]) conn.execute(query) A variant query can be understood from the following 3 p...
gpl-3.0
zturchan/CMPUT410-Lab6
bookmarks/bookmarks/settings.py
1
2278
""" Django settings for bookmarks project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) ...
apache-2.0
MotorolaMobilityLLC/external-chromium_org
tools/perf/metrics/timeline.py
23
2196
# 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 TRACING_MODE = 'tracing-mode' TIMELINE_MODE = 'timeline-mode' class TimelineMetrics(object): def __init__(self, mode): assert mode ...
bsd-3-clause
vicky2135/lucious
oscar/lib/python2.7/site-packages/phonenumbers/data/region_CA.py
1
1901
"""Auto-generated file, do not edit by hand. CA metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_CA = PhoneMetadata(id='CA', country_code=1, international_prefix='011', general_desc=PhoneNumberDesc(national_number_pattern='[2-9]\\d{9}|3\\d{6}', possible_number_pat...
bsd-3-clause
mojeto/django
tests/shortcuts/views.py
114
1930
from django.shortcuts import render, render_to_response def render_to_response_view(request): return render_to_response('shortcuts/render_test.html', { 'foo': 'FOO', 'bar': 'BAR', }) def render_to_response_view_with_multiple_templates(request): return render_to_response([ 'shortc...
bsd-3-clause
csgrad/ns-3-9-ngwmn
bindings/python/apidefs/gcc-LP64/ns3_module_global_routing.py
6
26483
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() ## global-route-manager.h: ns3::GlobalRouteManager [class] module.add_class('GlobalRouteManager') ## global-router-interface.h: ns3::GlobalRoutingLSA [class...
gpl-2.0
windyuuy/opera
chromium/src/third_party/trace-viewer/third_party/pywebsocket/src/mod_pywebsocket/mux.py
29
54713
# 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...
bsd-3-clause
yanirs/servo
components/script/dom/bindings/codegen/parser/tests/test_enum.py
134
2866
import WebIDL def WebIDLTest(parser, harness): parser.parse(""" enum TestEnum { "", "foo", "bar" }; interface TestEnumInterface { TestEnum doFoo(boolean arg); readonly attribute TestEnum foo; }; """) results = parser.finish...
mpl-2.0
bdeggleston/cassandra
pylib/cqlshlib/cqlhandling.py
15
12554
# 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 u...
apache-2.0
ibmsoe/tensorflow
tensorflow/contrib/keras/__init__.py
60
1261
# -*- coding: utf-8 -*- # Copyright 2015 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 # # Un...
apache-2.0
laperry1/android_external_chromium_org
tools/export_tarball/export_tarball.py
44
5761
#!/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 tool creates a tarball with all the sources, but without .svn directories. It can also remove files which are not strictl...
bsd-3-clause
gemmaan/moviesenal
Hasil/Lib/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py
2929
3791
######################## 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 ...
mit
steveb/heat
heat/tests/api/openstack_v1/test_resources.py
3
37637
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
apache-2.0
clarko1/Cramd
bigquery/api/streaming.py
3
3350
#!/usr/bin/env python # Copyright 2015, 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 or ...
apache-2.0
alon/servo
tests/wpt/harness/wptrunner/config.py
196
1851
# 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 ConfigParser import os import sys from collections import OrderedDict here = os.path.split(__file__)[0] class C...
mpl-2.0
MarkusHackspacher/unknown-horizons
tests/unittests/test_main.py
1
8122
# ################################################### # Copyright (C) 2008-2017 The Unknown Horizons Team # team@unknown-horizons.org # This file is part of Unknown Horizons. # # Unknown Horizons is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
gpl-2.0
mquandalle/rethinkdb
external/v8_3.30.33.16/tools/unittests/run_perf_test.py
36
13568
#!/usr/bin/env python # Copyright 2014 the V8 project 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 collections import namedtuple import coverage import json from mock import DEFAULT from mock import MagicMock import os from os ...
agpl-3.0
XperiAMM/royss_shinkumara_kernel
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
evanma92/routeh
flask/lib/python2.7/site-packages/whoosh/lang/porter.py
53
4231
""" Reimplementation of the `Porter stemming algorithm <http://tartarus.org/~martin/PorterStemmer/>`_ in Python. In my quick tests, this implementation about 3.5 times faster than the seriously weird Python linked from the official page. """ import re # Suffix replacement lists _step2list = { "ational...
bsd-3-clause
kidaa/avmplus
test/performance/runtests.py
5
53768
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4 -*- # vi: set ts=4 sw=4 expandtab: (add to ~/.vimrc: set modeline modelines=5) # 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...
mpl-2.0
N30nHaCkZ/android-platform_frameworks_base
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
1891
3300
# Core.py - Python extension for perf script, core functions # # 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. from collections import defaultdict def aut...
gpl-2.0
jbornschein/y2k
show-W0.py
6
2819
#!/usr/bin/env python from __future__ import division import sys import logging from time import time import cPickle as pickle import numpy as np import h5py import pylab #import theano #import theano.tensor as T _logger = logging.getLogger() #===================================================================...
agpl-3.0
ypkang/Dato-Core
src/unity/python/graphlab/lua_python_functions.py
13
1734
''' Copyright (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the DATO-PYTHON-LICENSE file for details. ''' class builtin_info(object): input_type = None output_type = None predeclarations = None translatefn = "" builtin_fu...
agpl-3.0
markoshorro/gem5
util/find_copyrights.py
76
7739
#!/usr/bin/env python import os import re import sys from file_types import lang_type, find_files mode_line = re.compile('(-\*- *mode:.* *-\*-)') shell_comment = re.compile(r'^\s*#') lisp_comment = re.compile(r';') cpp_comment = re.compile(r'//') c_comment_start = re.compile(r'/\*') c_comment_end = re.compile(r'\*...
bsd-3-clause
DavidGuben/rcbplayspokemon
app/pywin32-220/Pythonwin/pywin/framework/intpydde.py
17
1334
# DDE support for Pythonwin # # Seems to work fine (in the context that IE4 seems to have broken # DDE on _all_ NT4 machines I have tried, but only when a "Command Prompt" window # is open. Strange, but true. If you have problems with this, close all Command Prompts! import win32ui import win32api, win32con from py...
mit
mjudsp/Tsallis
sklearn/preprocessing/tests/test_imputation.py
18
14289
import numpy as np from scipy import sparse from sklearn.base import clone from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_true f...
bsd-3-clause
SmithsonianEnterprises/djangocms-text-ckeditor
djangocms_text_ckeditor/fields.py
8
1392
from django.db import models from django.contrib.admin import widgets as admin_widgets from .html import clean_html from .widgets import TextEditorWidget try: from south.modelsinspector import add_introspection_rules add_introspection_rules([], ['^djangocms_text_ckeditor\.fields\.HTMLField']) except ImportErro...
bsd-3-clause
yujikato/DIRAC
src/DIRAC/Core/Security/m2crypto/asn1_utils.py
2
12972
""" This module contains utilities for parsing extensions in general, but mostly the VOMS extensions. It has been done based on the reading of the VOMS standard (https://www.ogf.org/documents/GFD.182.pdf) and on the RFC 5755 (http://www.ietf.org/rfc/rfc5755.txt) This module relies on definition of the RFC 3281, which ...
gpl-3.0
ovidiu-beldie/closure-linter-tweaked
closure_linter/common/tokenizer.py
127
5827
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
apache-2.0
chuan9/chromium-crosswalk
net/tools/tld_cleanup/make_dafsa_unittest.py
84
22606
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import unittest import make_dafsa class ParseGperfTest(unittest.TestCase): def testMalformedKey(self): """Tests exc...
bsd-3-clause
heladio/my-blog
pelica-env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.py
2994
1676
######################## 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. # # Con...
mit
J861449197/edx-platform
cms/djangoapps/contentstore/context_processors.py
150
3481
import ConfigParser from django.conf import settings import logging log = logging.getLogger(__name__) # Open and parse the configuration file when the module is initialized config_file = open(settings.REPO_ROOT / "docs" / "config.ini") config = ConfigParser.ConfigParser() config.readfp(config_file) def doc_url(r...
agpl-3.0
m3dev/pptx-template
.eggs/python_pptx-0.6.6-py3.6.egg/pptx/oxml/shapes/connector.py
4
3548
# encoding: utf-8 """ lxml custom element classes for shape-related XML elements. """ from __future__ import absolute_import from .. import parse_xml from ..ns import nsdecls from .shared import BaseShapeElement from ..simpletypes import ST_DrawingElementId, XsdUnsignedInt from ..xmlchemy import ( BaseOxmlElemen...
apache-2.0
nwiizo/workspace_2017
ansible-modules-extras/storage/netapp/netapp_e_snapshot_group.py
45
15206
#!/usr/bin/python # (c) 2016, NetApp, Inc # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
mit
openweave/happy
bin/happy-state.py
1
2508
#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, 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/lice...
apache-2.0
s-leger/archipack
pygeos/affine.py
1
5340
# -*- coding:utf-8 -*- # Copyright (c) 2007, Sean C. Gillies # 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, ...
gpl-3.0
FusionSP/android_external_chromium_org
chrome/common/extensions/docs/server2/data_source_registry.py
78
2003
# 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 api_data_source import APIDataSource from api_list_data_source import APIListDataSource from data_source import DataSource from manifest_data_source imp...
bsd-3-clause
Dhivyap/ansible
lib/ansible/modules/database/postgresql/postgresql_copy.py
10
12362
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru> # 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 =...
gpl-3.0
aguformoso/google-visualization-python
gviz_api_test.py
10
27401
#!/usr/bin/python # # Copyright (C) 2009 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
jlegendary/scikit-learn
benchmarks/bench_lasso.py
297
3305
""" Benchmarks of Lasso vs LassoLars First, we fix a training set and increase the number of samples. Then we plot the computation time as function of the number of samples. In the second benchmark, we increase the number of dimensions of the training set. Then we plot the computation time as function of the number o...
bsd-3-clause
ramadhane/odoo
addons/l10n_ec/__openerp__.py
260
1695
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010-2012 Cristian Salamea Gnuthink Software Labs Cia. Ltda # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
agpl-3.0
timchenxiaoyu/Diamond
src/collectors/lmsensors/test/testlmsensors.py
31
2836
#!/usr/bin/python # coding=utf-8 ############################################################################### from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import patch from diamond.collector import Collector from lmsensors import LMSensorsCollector t...
mit
madjam/mxnet
example/profiler/profiler_imageiter.py
25
1784
# 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 u...
apache-2.0
anki1909/peach
peach/nn/base.py
6
8686
################################################################################ # Peach - Computational Intelligence for Python # Jose Alexandre Nalon # # This file: nn/base.py # Basic definitions for layers of neurons ################################################################################ # Doc string, reSt...
lgpl-2.1
sszlm/MissionPlanner
Lib/macpath.py
49
6467
"""Pathname and path-related operations for the Macintosh.""" import os import warnings from stat import * import genericpath from genericpath import * __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", "getat...
gpl-3.0