repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
nafex/pyload
module/plugins/crypter/SafelinkingNet.py
13
2936
# -*- coding: utf-8 -*- import re import BeautifulSoup from module.common.json_layer import json_loads from module.plugins.internal.Crypter import Crypter from module.plugins.captcha.SolveMedia import SolveMedia class SafelinkingNet(Crypter): __name__ = "SafelinkingNet" __type__ = "crypter" __ver...
gpl-3.0
dsfsdgsbngfggb/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/About.py
293
3815
######################################################################### # # 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
Jericho/deep-learning
language-translation/problem_unittests.py
98
13080
import numpy as np import tensorflow as tf import itertools import collections import helper def _print_success_message(): print('Tests Passed') def test_text_to_ids(text_to_ids): test_source_text = 'new jersey is sometimes quiet during autumn , and it is snowy in april .\nthe united states is usually chill...
mit
twobob/buildroot-kindle
output/build/host-python-2.7.2/Lib/test/test_md5.py
194
1790
# Testing md5 module import warnings warnings.filterwarnings("ignore", "the md5 module is deprecated.*", DeprecationWarning) import unittest from md5 import md5 from test import test_support def hexstr(s): import string h = string.hexdigits r = '' for c in s: i = ord(c)...
gpl-2.0
plastboks/Pulpy
pulpy/scripts/initializedb.py
1
1151
import os import sys import transaction from getpass import getpass from sqlalchemy import engine_from_config from cryptacular.bcrypt import BCRYPTPasswordManager as BPM from pyramid.paster import ( get_appsettings, setup_logging, ) from pulpy.models.meta import ( DBSession, Base, ) from pulpy.m...
mit
elingg/tensorflow
tensorflow/contrib/learn/python/learn/learn_runner.py
12
5127
# 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
jiangxb1987/spark
examples/src/main/python/ml/logistic_regression_with_elastic_net.py
123
2029
# # 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
asrie/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/config/ports_mock.py
121
2482
# 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 f...
bsd-3-clause
rafaeltomesouza/frontend-class1
aula2/a12/linkedin/client/.gradle/yarn/node_modules/node-gyp/gyp/tools/pretty_gyp.py
2618
4756
#!/usr/bin/env python # 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. """Pretty-prints the contents of a GYP file.""" import sys import re # Regex to remove comments when we're counting braces. COMMENT_RE = ...
mit
allanino/nupic
tests/swarming/nupic/swarming/experiments/simple_cla_multistep/description.py
32
13701
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
JFriel/honours_project
venv/lib/python2.7/site-packages/requests/packages/chardet/euckrprober.py
2931
1675
######################## 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...
gpl-3.0
SripriyaSeetharam/tacker
tacker/vm/mgmt_drivers/rpc/rpc.py
1
3910
# Copyright 2014 Intel Corporation. # Copyright 2014 Isaku Yamahata <isaku.yamahata at intel com> # <isaku.yamahata at gmail com> # All Rights Reserved. # # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the Lic...
apache-2.0
faux123/Galaxy_Note_2
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
eyohansa/django
tests/messages_tests/base.py
319
14243
from django import http from django.contrib.messages import constants, get_level, set_level, utils from django.contrib.messages.api import MessageFailure from django.contrib.messages.constants import DEFAULT_LEVELS from django.contrib.messages.storage import base, default_storage from django.contrib.messages.storage.ba...
bsd-3-clause
CTSRD-SOAAP/chromium-42.0.2311.135
tools/deps2git/deps2submodules.py
8
6032
#!/usr/bin/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. """Read .DEPS.git and use the information to update git submodules""" import optparse import os import re import subprocess import sys...
bsd-3-clause
basepi/hubble
hubblestack/splunklogging.py
1
7572
''' Hubblestack python log handler for splunk Uses the same configuration as the rest of the splunk returners, returns to the same destination but with an alternate sourcetype (``hubble_log`` by default) .. code-block:: yaml hubblestack: returner: splunk: - token: XXXXXXXX-XXXX-XXXX-XXXX-...
apache-2.0
jesusfcr/airflow
tests/configuration.py
52
1889
# -*- 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 to in writing, softw...
apache-2.0
pinotlytics/pinot
pinot-dashboard/pinotui/config.py
17
2368
#!/usr/bin/env python2.6 # # Copyright (C) 2015 LinkedIn Corp. (pinot-core@linkedin.com) # # 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
eceglov/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/server_process_mock.py
129
2993
# Copyright (C) 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
sestrella/ansible
lib/ansible/modules/network/illumos/dladm_linkprop.py
52
7820
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Adam Števko <adam.stevko@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 = {'metadata_version': '1.1', ...
gpl-3.0
johnkeepmoving/oss-ftp
python27/win32/Lib/site-packages/requests/packages/chardet/__init__.py
1778
1295
######################## BEGIN LICENSE BLOCK ######################## # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ve...
mit
psi4/mongo_qcdb
qcfractal/server.py
1
25510
""" The FractalServer class """ import asyncio import datetime import logging import ssl import time import traceback from concurrent.futures import ThreadPoolExecutor from typing import Any, Dict, List, Optional, Union import tornado.ioloop import tornado.log import tornado.options import tornado.web from .extras i...
bsd-3-clause
qenter/vlc-android
toolchains/arm/lib/python2.7/test/test_pkgimport.py
126
2881
import os, sys, string, random, tempfile, unittest from test.test_support import run_unittest class TestImport(unittest.TestCase): def __init__(self, *args, **kw): self.package_name = 'PACKAGE_' while self.package_name in sys.modules: self.package_name += random.choose(string.letters)...
gpl-2.0
sinergatis/pathagar
books/utils.py
2
3484
from collections import namedtuple from language_tags import tags from pycountry import languages LanguageTuple = namedtuple('languagetuple', ['code', 'description']) # ISO-6639/2 bibliographic synonyms. # https://en.wikipedia.org/wiki/ISO_639-2#B_and_T_codes ISO_6639_2_B = {'alb': 'sqi', 'arm': 'hye'...
gpl-2.0
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/virtual_network_gateway_connection_list_entity.py
1
7717
# 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
rcbops/python-django-buildpackage
tests/regressiontests/generic_views/models.py
52
1031
from django.db import models class Artist(models.Model): name = models.CharField(max_length=100) class Meta: ordering = ['name'] verbose_name = 'professional artist' verbose_name_plural = 'professional artists' def __unicode__(self): return self.name @models.permalink...
bsd-3-clause
michalliu/OpenWrt-Firefly-Libraries
staging_dir/host/lib/python2.7/uu.py
251
6555
#! /usr/bin/env python # Copyright 1994 by Lance Ellinghouse # Cathedral City, California Republic, United States of America. # All Rights Reserved # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provide...
gpl-2.0
semirook/sphinxit
sphinxit/tests/test_processor.py
4
7295
# coding=utf-8 from __future__ import unicode_literals import datetime try: import unittest2 as unittest except ImportError: import unittest from sphinxit.core.nodes import Count, OR, RawAttr from sphinxit.core.processor import Search, Snippet from sphinxit.core.helpers import unix_timestamp, BaseSearchConfig...
bsd-3-clause
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.5/Lib/test/test_htmllib.py
43
1937
import formatter import htmllib import unittest from test import test_support class AnchorCollector(htmllib.HTMLParser): def __init__(self, *args, **kw): self.__anchors = [] htmllib.HTMLParser.__init__(self, *args, **kw) def get_anchor_info(self): return self.__anchors def ancho...
mit
saymonpires/Iskrillex
core/tests.py
4
1114
"""Copyright (C) <2014> <Saymon Pires da Silva> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed i...
gpl-3.0
tribeiro/chimera
src/chimera/util/tests/test_position.py
3
2292
from nose.tools import assert_raises from chimera.util.position import Position, Epoch from chimera.util.coord import Coord import ephem from datetime import datetime as dt from dateutil import tz def equal (a, b, e=0.0001): return ( abs(a-b) <= e) class TestPosition (object): def test_ra_dec (self): ...
gpl-2.0
roadmapper/ansible
test/units/modules/network/fortios/test_fortios_system_replacemsg_traffic_quota.py
21
8643
# 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
Bloodyaugust/sugarlabcppboilerplate
lib/boost/tools/build/test/expansion.py
6
1766
#!/usr/bin/python # Copyright 2003 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) import BoostBuild t = BoostBuild.Tester(use_test_config=False) t.write("a.cpp", """ #ifdef CF_IS_OFF int main(...
gpl-2.0
boisvert42/npr-puzzle-python
2016/0417_musicals.py
1
2370
''' NPR Puzzle 2016-04-17 http://www.npr.org/2016/04/17/474509250/what-do-you-get-when-a-city-slicker-drops-his-vowels Here's a tricky challenge from Sandy Weisz of Chicago. Take the name of a famous musical. Write it in upper- and lowercase letters, as you usually would. Now turn one of the characters upside-down...
cc0-1.0
qk4l/Flexget
flexget/api/core/server.py
3
19094
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import copy import base64 import os import json import sys import logging import threading import traceback from time import sleep import binascii import cherrypy import ...
mit
Guzi219/Python
com/github/crawlspider/eng-website/englishDownloadWithBrowserUI.py
1
15021
# -*- coding: utf-8 -*- import datetime import os import string import sys import thread import time import urllib import urllib2 import requests from BeautifulSoup import BeautifulSoup from requests.exceptions import MissingSchema, ReadTimeout from selenium.common.exceptions import StaleElementReferenceException f...
mit
kangkot/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/ctypes/test/test_stringptr.py
66
2504
import unittest from ctypes import * import _ctypes_test lib = CDLL(_ctypes_test.__file__) class StringPtrTestCase(unittest.TestCase): def test__POINTER_c_char(self): class X(Structure): _fields_ = [("str", POINTER(c_char))] x = X() # NULL pointer access self.assertR...
apache-2.0
tiredtyrant/CloudBot
plugins/minecraft_ping.py
4
2219
import socket from mcstatus import MinecraftServer from cloudbot import hook mc_colors = [('\xa7f', '\x0300'), ('\xa70', '\x0301'), ('\xa71', '\x0302'), ('\xa72', '\x0303'), ('\xa7c', '\x0304'), ('\xa74', '\x0305'), ('\xa75', '\x0306'), ('\xa76', '\x0307'), ('\xa7e', '\x0308'), ('\xa7a', '\...
gpl-3.0
DanMcInerney/clusterd
src/platform/jboss/deployers/dfs_deploy.py
6
2476
from src.platform.jboss.interfaces import JINTERFACES from src.platform.jboss.authenticate import checkAuth from src.module.deploy_utils import parse_war_path from collections import OrderedDict from os.path import abspath from log import LOG import utility title = JINTERFACES.JMX versions = ["3.2", "4.0", "4.2", "5.0...
mit
AMOboxTV/AMOBox.LegoBuild
plugin.video.salts/service.py
1
7404
""" SALTS XBMC Addon Copyright (C) 2014 tknorris 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. T...
gpl-2.0
metacloud/python-neutronclient
neutronclient/tests/unit/test_cli20_floatingips.py
7
5680
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat # 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://...
apache-2.0
robclark/chromium
tools/find_depot_tools.py
74
1374
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Small utility function to find depot_tools and add it to the python path. Will throw an ImportError exception if depot_tools can't be found since it i...
bsd-3-clause
sunpeak/MITMf
plugins/ferretng.py
25
4149
# Copyright (c) 2014-2016 Marcello Salvati # # 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 distrib...
gpl-3.0
Acidburn0zzz/sdk
doc/source/conf.py
2
9222
# -*- coding: utf-8 -*- # # MEGA Client SDK documentation build configuration file, created by # sphinx-quickstart on Tue Oct 1 16:55:52 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file....
bsd-2-clause
ppanczyk/ansible
lib/ansible/modules/packaging/os/apt_key.py
22
12347
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2012, Jayson Vantuyl <jayson@aggressive.ly> # 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_...
gpl-3.0
Technux/linux
scripts/gdb/linux/dmesg.py
630
1991
# # gdb helper commands and functions for Linux kernel debugging # # kernel log buffer dump # # Copyright (c) Siemens AG, 2011, 2012 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import utils class LxDmesg(gdb.Command...
gpl-2.0
nborggren/zipline
zipline/test_algorithms.py
1
34680
# # Copyright 2014 Quantopian, 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 to in wr...
apache-2.0
metamx/spark
python/pyspark/sql/column.py
15
15008
# # 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
jn7163/django
tests/forms_tests/tests/test_forms.py
46
148965
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import datetime import json import uuid from django.core.exceptions import NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import RegexValidator from django.forms import ( Boolean...
bsd-3-clause
android-ia/platform_tools_idea
plugins/hg4idea/testData/bin/mercurial/lsprof.py
96
3673
import sys from _lsprof import Profiler, profiler_entry __all__ = ['profile', 'Stats'] def profile(f, *args, **kwds): """XXX docstring""" p = Profiler() p.enable(subcalls=True, builtins=True) try: f(*args, **kwds) finally: p.disable() return Stats(p.getstats()) class Stats(ob...
apache-2.0
Konubinix/weboob
modules/mangareader/module.py
7
1388
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Noé Rubinstein # # 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 you...
agpl-3.0
google/seq2seq
seq2seq/decoders/attention_decoder.py
4
6750
# Copyright 2017 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 agreed to in writing,...
apache-2.0
elastic/elasticsearch-parent
dev-tools/build_release.py
7
17678
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
apache-2.0
eschloss/FluFuture
openpds/connectors/funf/views.py
3
6026
#-*- coding: utf-8 -*- from django.shortcuts import render_to_response import datetime from django.http import HttpResponse, HttpResponseBadRequest from django.utils import simplejson as json_simple import dbmerge, os import dbdecrypt import decrypt import sqlite3 import json, ast from openpds import settings from ope...
mit
indictranstech/erpnext
erpnext/patches/v6_4/fix_journal_entries_due_to_reconciliation.py
29
1884
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import print_function, unicode_literals import frappe def execute(): frappe.reload_doctype("Sales Invoice Advance") frappe.reload_doctype("Purchase Invoice Advance") j...
agpl-3.0
weebygames/boto
boto/s3/multidelete.py
244
4757
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, m...
mit
trhura/python-myanmar
myanmar/romanizer/ipa.py
1
3114
# ipa.py - ipa transliteration module # coding: utf-8 # The MIT License (MIT) # Credit for IPA rules - Wikipedia, LionSlayer ... # Copyright (c) 2018 Thura Hlaing # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to de...
mit
dvliman/jaikuengine
.google_appengine/lib/django-1.2/django/contrib/sessions/middleware.py
90
1813
import time from django.conf import settings from django.utils.cache import patch_vary_headers from django.utils.http import cookie_date from django.utils.importlib import import_module class SessionMiddleware(object): def process_request(self, request): engine = import_module(settings.SESSION_ENGINE) ...
apache-2.0
FFMG/myoddweb.piger
monitor/api/python/Python-3.7.2/Lib/test/test_dynamicclassattribute.py
19
9795
# Test case for DynamicClassAttribute # more tests are in test_descr import abc import sys import unittest from types import DynamicClassAttribute class PropertyBase(Exception): pass class PropertyGet(PropertyBase): pass class PropertySet(PropertyBase): pass class PropertyDel(PropertyBase): pass c...
gpl-2.0
StephenWeber/ansible
lib/ansible/modules/cloud/openstack/os_nova_host_aggregate.py
21
6727
#!/usr/bin/python # Copyright 2016 Jakub Jursa <jakub.jursa1@gmail.com> # # This module 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....
gpl-3.0
bikong2/scikit-learn
examples/ensemble/plot_random_forest_embedding.py
286
3531
""" ========================================================= Hashing feature transformation using Totally Random Trees ========================================================= RandomTreesEmbedding provides a way to map data to a very high-dimensional, sparse representation, which might be beneficial for classificati...
bsd-3-clause
CybOXProject/python-cybox
cybox/test/objects/image_file_test.py
1
2412
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import unittest from mixbox.vendor.six import u from cybox.objects.image_file_object import ImageFile from cybox.common import Hash, String from cybox.compat import long import cybox.test from cybox.test import E...
bsd-3-clause
technologiescollege/Blockly-rduino-communication
scripts_XP/Lib/test/test_pstats.py
175
1295
import unittest from test import support from io import StringIO import pstats class AddCallersTestCase(unittest.TestCase): """Tests for pstats.add_callers helper.""" def test_combine_results(self): # pstats.add_callers should combine the call results of both target # and source by adding th...
gpl-3.0
chenyyx/scikit-learn-doc-zh
examples/zh/linear_model/plot_theilsen.py
76
3848
""" ==================== Theil-Sen Regression ==================== Computes a Theil-Sen Regression on a synthetic dataset. See :ref:`theil_sen_regression` for more information on the regressor. Compared to the OLS (ordinary least squares) estimator, the Theil-Sen estimator is robust against outliers. It has a breakd...
gpl-3.0
meimz/linux
tools/perf/scripts/python/netdev-times.py
1544
15191
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
Gobberwart/PokemonGo-Bot
pokemongo_bot/base_task.py
9
1463
import logging import time class BaseTask(object): TASK_API_VERSION = 1 def __init__(self, bot, config): """ :param bot: :type bot: pokemongo_bot.PokemonGoBot :param config: :return: """ self.bot = bot self.config = config self._validate_work_exists() self.logger = loggi...
mit
JacerOmri/PokemonGo-Bot-Desktop
pywin/Lib/encodings/iso8859_3.py
593
13345
""" Python Character Mapping Codec iso8859_3 generated from 'MAPPINGS/ISO8859/8859-3.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
mit
mdodsworth/hadoop-common
src/contrib/hod/testing/main.py
182
2928
#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 thi...
apache-2.0
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/webapp2-2.5.2/webapp2_extras/config.py
67
7380
# -*- coding: utf-8 -*- """ webapp2_extras.config ===================== Configuration object for webapp2. This module is deprecated. See :class:`webapp2.WSGIApplication.config`. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from __future__ impor...
mit
flexVDI/cerbero
cerbero/hacks.py
5
5184
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
lgpl-2.1
log2timeline/dfvfs
dfvfs/path/ntfs_path_spec.py
2
2400
# -*- coding: utf-8 -*- """The path NTFS specification implementation.""" from dfvfs.lib import definitions from dfvfs.path import factory from dfvfs.path import path_spec class NTFSPathSpec(path_spec.PathSpec): """NTFS path specification. Attributes: data_stream (str): data stream name, where None indicate...
apache-2.0
guybedo/minos
tests/model/parameters_test.py
1
5078
''' Created on Feb 7, 2017 @author: julien ''' import unittest from keras.layers.core import Dense from minos.experiment.experiment import ExperimentParameters, Experiment,\ check_experiment_parameters, InvalidParametersException from minos.experiment.training import Training from minos.model.parameter import ra...
apache-2.0
mer-tools/chromium-trace
trace-viewer/third_party/pywebsocket/src/mod_pywebsocket/dispatch.py
35
14459
# 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
diorcety/intellij-community
python/lib/Lib/xml/dom/minicompat.py
139
5287
"""Python version compatibility support for minidom.""" # This module should only be imported using "import *". # # The following names are defined: # # isinstance -- version of the isinstance() function that accepts # tuples as the second parameter regardless of the # Python...
apache-2.0
onitake/ansible
lib/ansible/modules/files/iso_extract.py
101
6645
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be> # Copyright: (c) 2016, Matt Robinson <git@nerdoftheherd.com> # Copyright: (c) 2017, Dag Wieers <dag@wieers.com> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.g...
gpl-3.0
anksp21/Community-Zenpacks
ZenPacks.vmware.VirtualMachines/ZenPacks/vmware/VirtualMachines/VMDevice.py
3
1658
from Globals import InitializeClass from Products.ZenModel.Device import Device from Products.ZenModel.ZenossSecurity import ZEN_VIEW from Products.ZenRelations.RelSchema import * import copy class VMDevice(Device): "VMWare ESX Server" _relations = Device._relations + ( ('virtualmachines', ToManyCont(ToOne, ...
gpl-2.0
herow/planning_qgis
python/ext-libs/owslib/coverage/wcs110.py
29
18511
# -*- coding: ISO-8859-15 -*- # ============================================================================= # Copyright (c) 2004, 2006 Sean C. Gillies # Copyright (c) 2007 STFC <http://www.stfc.ac.uk> # # Authors : # Dominic Lowe <d.lowe@rl.ac.uk> # # Contact email: d.lowe@rl.ac.uk # =======================...
gpl-2.0
jlspyaozhongkai/Uter
third_party_backup/Python-2.7.9/Lib/trace.py
153
29890
#!/usr/bin/env python # portions copyright 2001, Autonomous Zones Industries, Inc., all rights... # err... reserved and offered to the public under the terms of the # Python 2.2 license. # Author: Zooko O'Whielacronx # http://zooko.com/ # mailto:zooko@zooko.com # # Copyright 2000, Mojam Media, Inc., all rights reserv...
gpl-3.0
kevinr/750book-web
750book-web-env/lib/python2.7/site-packages/django/contrib/gis/tests/relatedapp/models.py
20
1525
from django.contrib.gis.db import models from django.contrib.localflavor.us.models import USStateField class Location(models.Model): point = models.PointField() objects = models.GeoManager() def __unicode__(self): return self.point.wkt class City(models.Model): name = models.CharField(max_length=50) ...
mit
dhruvsrivastava/OJ
flask/lib/python2.7/site-packages/sqlalchemy/testing/suite/test_select.py
78
5729
from .. import fixtures, config from ..assertions import eq_ from sqlalchemy import util from sqlalchemy import Integer, String, select, func, bindparam from sqlalchemy import testing from ..schema import Table, Column class OrderByLabelTest(fixtures.TablesTest): """Test the dialect sends appropriate ORDER BY e...
bsd-3-clause
indeedops/dd-agent
tests/checks/integration/test_windows_service.py
8
1127
# 3p from nose.plugins.attrib import attr # project from tests.checks.common import AgentCheckTest INSTANCE = { 'host': '.', 'services': ['EventLog', 'Dnscache', 'NonExistingService'], } INVALID_HOST_INSTANCE = { 'host': 'nonexistinghost', 'services': ['EventLog'], } @attr('windows') @attr(requires...
bsd-3-clause
maelnor/nova
nova/tests/api/openstack/compute/contrib/test_evacuate.py
3
11001
# Copyright 2013 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 a...
apache-2.0
nwjs/chromium.src
tools/flakiness/is_flaky_test.py
94
2089
# 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. """Unit tests for is_flaky.""" import is_flaky import subprocess import sys import threading import unittest class IsFlakyTest(unittest.TestCase): def ...
bsd-3-clause
borosnborea/SwordGO_app
example/kivymap/.buildozer/venv/lib/python2.7/site-packages/setuptools/command/build_py.py
55
9596
from glob import glob from distutils.util import convert_path import distutils.command.build_py as orig import os import fnmatch import textwrap import io import distutils.errors import itertools from setuptools.extern import six from setuptools.extern.six.moves import map, filter, filterfalse try: from setuptool...
gpl-3.0
codekaki/odoo
addons/project_gtd/project_gtd.py
53
5207
# -*- 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
jnovinger/django
tests/custom_migration_operations/operations.py
518
2171
from django.db.migrations.operations.base import Operation class TestOperation(Operation): def __init__(self): pass def deconstruct(self): return ( self.__class__.__name__, [], {} ) @property def reversible(self): return True d...
bsd-3-clause
battlecat/Spirit
spirit/comment/flag/migrations/0001_initial.py
12
2062
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('spirit_comme...
mit
napsternxg/gensim
gensim/test/test_scripts.py
4
6136
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2018 Vimig Socrates <vimig.socrates@gmail.com> heavily influenced from @AakaashRao # Copyright (C) 2018 Manos Stergiadis <em.stergiadis@gmail.com> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for checking ...
gpl-3.0
mdkent/percona-xtrabackup
test/python/testtools/testsuite.py
42
2921
# Copyright (c) 2009 testtools developers. See LICENSE for details. """Test suites and related things.""" __metaclass__ = type __all__ = [ 'ConcurrentTestSuite', 'iterate_tests', ] try: from Queue import Queue except ImportError: from queue import Queue import threading import unittest import testtool...
gpl-2.0
newemailjdm/scipy
scipy/linalg/blas.py
16
6609
""" Low-level BLAS functions ======================== This module contains low-level functions from the BLAS library. .. versionadded:: 0.12.0 .. warning:: These functions do little to no error checking. It is possible to cause crashes by mis-using them, so prefer using the higher-level routines in `scipy....
bsd-3-clause
Jandersoft/angular
scripts/ci/travis_after_all.py
179
3535
import os import json import time import logging try: import urllib.request as urllib2 except ImportError: import urllib2 log = logging.getLogger("travis.leader") log.addHandler(logging.StreamHandler()) log.setLevel(logging.INFO) TRAVIS_JOB_NUMBER = 'TRAVIS_JOB_NUMBER' TRAVIS_BUILD_ID = 'TRAVIS_BUILD_ID' POL...
apache-2.0
suutari/shoop
shuup_tests/core/test_sales_unit.py
1
1391
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from decimal import Decimal import pytest from django.test import ...
agpl-3.0
sencha/chromium-spacewalk
build/android/pylib/utils/apk_helper.py
52
2208
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module containing utilities for apk packages.""" import os.path import re from pylib import cmd_helper from pylib import constants _AAPT_PATH = os...
bsd-3-clause
hubsaysnuaa/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py
384
1320
######################################################################### # # 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
barseghyanartur/django-authority
authority/managers.py
13
2352
from django.db import models from django.db.models import Q from django.contrib.contenttypes.models import ContentType class PermissionManager(models.Manager): def get_content_type(self, obj): return ContentType.objects.get_for_model(obj) def get_for_model(self, obj): return self.filter(cont...
bsd-3-clause
jeremypogue/ansible
lib/ansible/parsing/dataloader.py
3
17974
# (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
bob-the-hamster/commandergenius
project/jni/python/src/PC/VS8.0/build_ssl.py
32
9154
# Script for building the _ssl and _hashlib modules for Windows. # Uses Perl to setup the OpenSSL environment correctly # and build OpenSSL, then invokes a simple nmake session # for the actual _ssl.pyd and _hashlib.pyd DLLs. # THEORETICALLY, you can: # * Unpack the latest SSL release one level above your main Python ...
lgpl-2.1
thomasrogers03/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/thread/messagepump_unittest.py
124
3119
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
mcsalgado/ansible
test/units/playbook/test_block.py
228
2451
# (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
DelazJ/QGIS
cmake/FindQsci.py
77
2612
# -*- coding: utf-8 -*- # # Copyright (c) 2012, Larry Shaffer <larry@dakotacarto.com> # 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 reta...
gpl-2.0