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
e-koch/pyspeckit
pyspeckit/wrappers/fitnh3.py
1
16066
""" NH3 fitter wrapper ================== Wrapper to fit ammonia spectra. Generates a reasonable guess at the position and velocity using a gaussian fit Example use: .. code:: python import pyspeckit sp11 = pyspeckit.Spectrum('spec.nh3_11.dat', errorcol=999) sp22 = pyspeckit.Spectrum('spec.nh3_22.dat',...
mit
tempbottle/rethinkdb
test/interface/server_config.py
9
7581
#!/usr/bin/env python # Copyright 2014-2015 RethinkDB, all rights reserved. import os, sys, time sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) import driver, scenario_common, utils, vcoptparse op = vcoptparse.OptParser() scenario_common.prepare_option_parser_mode...
agpl-3.0
Dhivyap/ansible
lib/ansible/modules/cloud/vmware/vmware_guest_find.py
18
4775
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', ...
gpl-3.0
dCache/dcache-docker
dcache/deps/.vim/bundle/jedi-vim/jedi/test/test_evaluate/test_docstring.py
16
4392
""" Testing of docstring related issues and especially ``jedi.docstrings``. """ from textwrap import dedent import jedi from ..helpers import unittest try: import numpydoc except ImportError: numpydoc_unavailable = True else: numpydoc_unavailable = False class TestDocstring(unittest.TestCase): def t...
gpl-3.0
gangadhar-kadam/helpdesk-frappe
frappe/model/create_new.py
15
4829
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """ Create a new document with defaults set """ import frappe from frappe.utils import nowdate, nowtime, now_datetime import frappe.defaults from frappe.model.db_schema import ty...
mit
jessefeinman/FintechHackathon
venv/Lib/site-packages/pip/basecommand.py
79
11648
"""Base Command class, and related routines""" from __future__ import absolute_import import logging import os import sys import optparse import warnings from pip import cmdoptions from pip.index import PackageFinder from pip.locations import running_under_virtualenv from pip.download import PipSession from pip.excep...
bsd-2-clause
jgeewax/gcloud-python
bigtable/setup.py
3
2126
# Copyright 2016 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
lebauce/artub
glumolnamespace.py
1
3055
# Glumol - An adventure game creator # Copyright (C) 1998-2008 Sylvain Baubeau & Alexis Contour # This file is part of Glumol. # Glumol 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 th...
gpl-2.0
josesanch/django-haystack
tests/elasticsearch_tests/tests/inputs.py
10
3525
from django.test import TestCase from haystack import connections from haystack import inputs class ElasticsearchInputTestCase(TestCase): def setUp(self): super(ElasticsearchInputTestCase, self).setUp() self.query_obj = connections['default'].get_query() def test_raw_init(self): raw =...
bsd-3-clause
ds-hwang/chromium-crosswalk
chrome/test/chromedriver/client/chromedriver.py
7
12885
# 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 command_executor from command_executor import Command from webelement import WebElement class ChromeDriverException(Exception): pass class NoSuchE...
bsd-3-clause
bsmr-ansible/ansible-modules-core
network/junos/junos_netconf.py
25
3772
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
henryfjordan/django
django/db/migrations/graph.py
351
10956
from __future__ import unicode_literals import warnings from collections import deque from functools import total_ordering from django.db.migrations.state import ProjectState from django.utils.datastructures import OrderedSet from django.utils.encoding import python_2_unicode_compatible from .exceptions import Circu...
bsd-3-clause
probablytom/tomwallis.net
venv/lib/python2.7/site-packages/django/contrib/gis/geoip/prototypes.py
93
3944
from ctypes import c_char_p, c_float, c_int, string_at, Structure, POINTER from django.contrib.gis.geoip.libgeoip import lgeoip, free #### GeoIP C Structure definitions #### class GeoIPRecord(Structure): _fields_ = [('country_code', c_char_p), ('country_code3', c_char_p), ('countr...
artistic-2.0
Br1an6/ACS_Netplumber_Implementation
hassel-c/tfmod.py
7
3748
#!/usr/bin/python import argparse import json import os from config_parser.transfer_function_to_openflow import OpenFlow_Rule_Generator from config_parser.cisco_router_parser import cisco_router from headerspace.tf import TF from utils.wildcard_utils import set_header_field from utils.wildcard import wildcard_create_...
gpl-2.0
MihaiMoldovanu/ansible
lib/ansible/module_utils/facts/system/env.py
232
1170
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
gpl-3.0
sogelink/ansible
lib/ansible/modules/identity/cyberark/cyberark_authentication.py
83
10846
#!/usr/bin/python # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['pre...
gpl-3.0
malvira/lpc31xx
tools/perf/scripts/python/net_dropmonitor.py
4235
1554
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
gpl-2.0
hortonworks/hortonworks-sandbox
desktop/core/ext-py/processing/examples/ex_synchronize.py
3
6159
# # A test file for the `processing` package # import time, sys, random from Queue import Empty import processing # may get overwritten #### TEST_VALUE def value_func(running, mutex): random.seed() time.sleep(random.random()*4) mutex.acquire() print '\n\t\t\t' + ...
apache-2.0
echinopsii/net.echinopsii.ariane.community.cli.python3
tests/acceptance/mapping/endpoint_nats_at.py
1
19692
# Ariane CLI Python 3 # Endpoint acceptance tests # # Copyright (C) 2015 echinopsii # # This program 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 your option...
agpl-3.0
Comunitea/OCB
addons/account_test/account_test.py
342
2169
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved. # # $Id: product_expiry.py 4304 2006-10-25 09:54:51Z ged $ # # WARNING: This program as such is intended to be used by professional # prog...
agpl-3.0
MostafaGazar/tensorflow
tensorflow/tensorboard/backend/server.py
4
5623
# 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 # # Unless required by applica...
apache-2.0
huang4fstudio/django-contacts
src/contacts/views/company.py
1
5913
from django.core.urlresolvers import reverse from django.template.defaultfilters import slugify from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.http import Http404, HttpResponseForbidden, HttpResponseServerError, HttpResponseRedirect from django.shortcuts import render_to_response, get_o...
bsd-3-clause
Alan-Robertson/python-qinfer
src/qinfer/tests/test_distributions.py
3
28505
#!/usr/bin/python # -*- coding: utf-8 -*- ## # test_distributions.py: Checks that distribution objects act as expected. ## # © 2017, Chris Ferrie (csferrie@gmail.com) and # Christopher Granade (cgranade@cgranade.com). # # Redistribution and use in source and binary forms, with or without # modification, are per...
agpl-3.0
VagrantApe/flaskMicroblog
venv/lib/python2.7/site-packages/migrate/versioning/script/py.py
65
5483
#!/usr/bin/env python # -*- coding: utf-8 -*- import shutil import warnings import logging import inspect from StringIO import StringIO import migrate from migrate.versioning import genmodel, schemadiff from migrate.versioning.config import operations from migrate.versioning.template import Template from migrate.vers...
bsd-3-clause
arenadata/ambari
ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py
1
6733
#!/usr/bin/env python ''' 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")...
apache-2.0
andreif/django
django/utils/http.py
115
10153
from __future__ import unicode_literals import base64 import calendar import datetime import re import sys import unicodedata from binascii import Error as BinasciiError from email.utils import formatdate from django.utils import six from django.utils.datastructures import MultiValueDict from django.utils.encoding im...
bsd-3-clause
alon/servo
tests/wpt/css-tests/css-fonts-3_dev/xhtml1/reference/support/fonts/makegsubfonts.py
1616
14125
import os import textwrap from xml.etree import ElementTree from fontTools.ttLib import TTFont, newTable from fontTools.misc.psCharStrings import T2CharString from fontTools.ttLib.tables.otTables import GSUB,\ ScriptList, ScriptRecord, Script, DefaultLangSys,\ FeatureList, FeatureRecord, Feature,\ LookupLi...
mpl-2.0
discogs/python-livingdocs
src/livingdocs/static_site.py
1
1371
import shutil import os class StaticSite(object): def __init__(self, title='', description='', baseurl=''): self.title = title self.description = description self.baseurl = baseurl def create(self, path="livingdocs"): """ Scaffolds a simple Hugo static site build. ...
bsd-2-clause
Vauxoo/server-tools
database_cleanup/models/purge_modules.py
2
3569
# Copyright 2014-2016 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # pylint: disable=consider-merging-classes-inherited from odoo import _, api, fields, models from odoo.exceptions import UserError from odoo.modules.module import get_module_path from odoo.addons.base.m...
agpl-3.0
Smashman/mods.tf
alembic/versions/4db12e0c5745_initial_pass.py
1
1247
"""Initial pass Revision ID: 4db12e0c5745 Revises: None Create Date: 2014-07-05 15:30:34.596840 """ # revision identifiers, used by Alembic. revision = '4db12e0c5745' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ### ...
gpl-3.0
Manwe56/trueskill-ai-contest-test-tool
trueskill/trueskill/factorgraph.py
1
5876
# -*- coding: utf-8 -*- """ trueskill.factorgraph ~~~~~~~~~~~~~~~~~~~~~ This module contains nodes for the factor graph of TrueSkill algorithm. :copyright: (c) 2012-2013 by Heungsub Lee. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import itert...
gpl-2.0
AntoineLee/spider163
spider163/www/web.py
1
1330
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import Flask, request, json, jsonify from flask import render_template,make_response from spider163.spider import playlist from spider163.utils import pysql import json app = Flask(__name__, static_path='/static') @app.route("/") def index(): return rende...
mit
asedunov/intellij-community
python/testData/inspections/PyTypeCheckerInspection/FunctionReturnTypePy3.py
24
1200
from typing import List, Optional, Union def a(x: List[int]) -> List[str]: return <warning descr="Expected type 'List[str]', got 'List[List[int]]' instead">[x]</warning> def b(x: int) -> List[str]: return <warning descr="Expected type 'List[str]', got 'List[int]' instead">[1,2]</warning> def c() -> int: ...
apache-2.0
aclifton/cpeg853-gem5
src/python/m5/internal/__init__.py
66
1575
# Copyright (c) 2006 The Regents of The University of Michigan # 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 ...
bsd-3-clause
394954369/horizon
horizon/test/settings.py
1
5201
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
spinicist/ITK
Examples/Visualization/CannyEdgeDetectionImageFilterConnectVTKITK.py
4
3820
#========================================================================== # # Copyright Insight Software Consortium # # 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
savoirfairelinux/odoo
addons/account/report/account_balance.py
183
6162
# -*- 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
RagingTiger/CodingInterview
ch15/python/fizbuzz.py
1
2138
#!/usr/bin/env python ''' Author: John D. Anderson Email: jander43@vols.utk.edu Problem Statement: In the classic problem FizzBuzz, you are told to print the numbers from 1 to n. However, when the number is divisible by 3, print "Fizz". When it is divisible by 5, print "Buzz." When it is divisble by 3 and 5, print...
mit
varogami/bt-tools
oldmodules/kck.py
1
8266
#bt-tools - tools to interact with some bittorrent sites by commandline #modified by qbittorrent ( http://www.qbittorrent.org/ ) search plugin #qbittorrent author: Christophe Dumez (chris@qbittorrent.org) #Copyright (C) 2015 varogami #This program is free software: you can redistribute it and/or modify #it under the...
gpl-3.0
x303597316/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/sitemaps/views.py
114
4439
from __future__ import unicode_literals from django.http import HttpResponse, Http404 from django.template import loader from django.contrib.sites.models import get_current_site from django.core import urlresolvers from django.core.paginator import EmptyPage, PageNotAnInteger from django.contrib.gis.db.models.fields i...
apache-2.0
rven/odoo
addons/im_livechat/report/im_livechat_report_channel.py
4
6358
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, tools class ImLivechatReportChannel(models.Model): """ Livechat Support Report on the Channels """ _name = "im_livechat.report.channel" _description = "Livechat Suppor...
agpl-3.0
ryano144/intellij-community
plugins/hg4idea/testData/bin/hgext/largefiles/overrides.py
90
46667
# Copyright 2009-2010 Gregory P. Ward # Copyright 2009-2010 Intelerad Medical Systems Incorporated # Copyright 2010-2011 Fog Creek Software # Copyright 2010-2011 Unity Technologies # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '...
apache-2.0
PeterWangIntel/chromium-crosswalk
tools/telemetry/telemetry/telemetry_dependencies_unittest.py
5
2039
# 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. import json import os import unittest from telemetry.util import path from telemetry.util import find_dependencies _TELEMETRY_DEPS_PATH = os.path.join( ...
bsd-3-clause
rspavel/spack
var/spack/repos/builtin/packages/py-pyfftw/package.py
5
1092
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPyfftw(PythonPackage): """A pythonic wrapper around FFTW, the FFT library, presentin...
lgpl-2.1
ojii/gitstats.ep.io
src/stats/migrations/0001_initial.py
1
1658
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Repository' db.create_table('stats_repository', ( ('id', self.gf('django.db.mo...
bsd-3-clause
3dfxmadscientist/odoo_vi
addons/account/wizard/account_fiscalyear_close_state.py
43
2504
# -*- 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
ytjiang/django
django/contrib/gis/maps/google/gmap.py
526
9223
from __future__ import unicode_literals from django.conf import settings from django.contrib.gis.maps.google.overlays import ( GMarker, GPolygon, GPolyline, ) from django.template.loader import render_to_string from django.utils.html import format_html from django.utils.safestring import mark_safe from django.util...
bsd-3-clause
Antiun/c2c-rd-addons
c2c_budget_chricar/wizard/compare_versions.py
4
5558
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) Camptocamp SA - http://www.camptocamp.com # Author: Arnaud WÃŒst # # This file is part of the c2c_budget module # # WARNING: This program as such is intended to be used by professional # programm...
agpl-3.0
edumatos/namebench
nb_third_party/dns/reversename.py
248
2931
# Copyright (C) 2006, 2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED...
apache-2.0
benoitsteiner/tensorflow
tensorflow/python/grappler/memory_optimizer_test.py
12
3336
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
rgfernandes/LaZagne
Windows/src/LaZagne/softwares/wifi/wifipass.py
11
2712
import xml.etree.cElementTree as ET import os, win32crypt import binascii import tempfile, socket from ctypes import * from config.moduleInfo import ModuleInfo import argparse class WifiPass(ModuleInfo): def __init__(self): options = {'command': '--HiddenWifiArgs', 'action': 'store_true', 'dest': 'wifipas...
lgpl-3.0
LiZoRN/Charlotte
extra_apps/xadmin/filters.py
11
22134
from __future__ import absolute_import from django.db import models from django.core.exceptions import ImproperlyConfigured from django.utils.encoding import smart_text from django.utils.translation import ugettext_lazy as _ from django.utils import timezone from django.template.loader import get_template from django.t...
gpl-3.0
itcropper/tanks
tests/game.py
20
1881
#!/usr/bin/env python # Bzrflag # Copyright 2008-2011 Brigham Young University # # This file is part of Bzrflag. # # Bzrflag 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
tuxerman/cdn-old
cdn/provider/mock/driver.py
1
1130
# Copyright (c) 2014 Rackspace, 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
simonfork/aquaria
ExternalLibs/freetype2/src/tools/docmaker/sources.py
367
10766
# Sources (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009 # David Turner <david@freetype.org> # # # this file contains definitions of classes needed to decompose # C sources files into a series of multi-line "blocks". There are # two kinds of blocks: # # - normal blocks, which contain source code or ordinary comment...
gpl-2.0
jomo/youtube-dl
youtube_dl/extractor/thvideo.py
151
3033
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( unified_strdate ) class THVideoIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?thvideo\.tv/(?:v/th|mobile\.php\?cid=)(?P<id>[0-9]+)' _TEST = { 'url': 'http://thvideo.tv/v/...
unlicense
lzw120/django
tests/modeltests/custom_pk/models.py
34
1122
# -*- coding: utf-8 -*- """ 14. Using a custom primary key By default, Django adds an ``"id"`` field to each model. But you can override this behavior by explicitly adding ``primary_key=True`` to a field. """ from __future__ import absolute_import from django.db import models from .fields import MyAutoField class...
bsd-3-clause
pnavarro/neutron
neutron/tests/tempest/common/cred_provider.py
47
4598
# Copyright (c) 2014 Deutsche Telekom AG # Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # 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...
apache-2.0
mrjaydee82/SinLessKernel-4.4.4
toolchains/491/share/gdb/python/gdb/printing.py
75
10191
# Pretty-printer utilities. # Copyright (C) 2010-2014 Free Software Foundation, 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 l...
gpl-2.0
mrknow/filmkodi
plugin.video.fanfilm/resources/lib/resolvers/realvid.py
2
1129
# -*- coding: utf-8 -*- ''' FanFilm Add-on Copyright (C) 2015 lambda 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 ...
apache-2.0
sursum/buckanjaren
buckanjaren/lib/python3.5/site-packages/pip/_vendor/distlib/compat.py
335
40801
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2016 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import absolute_import import os import re import sys try: import ssl except ImportError: ssl = None if sys.ve...
mit
datapythonista/pandas
pandas/tests/series/methods/test_is_unique.py
6
1050
import numpy as np import pytest from pandas import Series from pandas.core.construction import create_series_with_explicit_dtype @pytest.mark.parametrize( "data, expected", [ (np.random.randint(0, 10, size=1000), False), (np.arange(1000), True), ([], True), ([np.nan], True), ...
bsd-3-clause
d1hotpep/openai_gym
gym/scoreboard/client/api_requestor.py
7
5747
import json import platform import six.moves.urllib as urlparse from six import iteritems from gym import error, version import gym.scoreboard.client from gym.scoreboard.client import http_client verify_ssl_certs = True # [SECURITY CRITICAL] only turn this off while debugging http_client = http_client.RequestsClient(...
mit
multipath-rtp/cerbero
cerbero/packages/package.py
1
23059
# 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
orchardmile/mongo-connector
tests/test_rollbacks.py
14
11412
"""Test Mongo Connector's behavior when its source MongoDB system is experiencing a rollback. """ import os import sys import time from pymongo.read_preferences import ReadPreference from pymongo import MongoClient sys.path[0:0] = [""] from mongo_connector.util import retry_until_ok from mongo_connector.locking_di...
apache-2.0
greenoaktree/MissionPlanner
Lib/site-packages/numpy/_import_tools.py
87
12888
import os import sys __all__ = ['PackageLoader'] class PackageLoader: def __init__(self, verbose=False, infunc=False): """ Manages loading packages. """ if infunc: _level = 2 else: _level = 1 self.parent_frame = frame = sys._getframe(_level) ...
gpl-3.0
jmartinm/invenio-master
modules/webmessage/lib/webmessage_regression_tests.py
16
14143
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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 ## ...
gpl-2.0
ntt-sic/nova
nova/tests/compute/test_vmmode.py
11
1575
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2012 Red Hat, 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...
apache-2.0
LordDamionDevil/Lony
lib/youtube_dl/extractor/myvideo.py
34
6291
from __future__ import unicode_literals import binascii import base64 import hashlib import re import json from .common import InfoExtractor from ..compat import ( compat_ord, compat_urllib_parse_unquote, compat_urllib_parse_urlencode, ) from ..utils import ( ExtractorError, sanitized_Request, ) ...
gpl-3.0
jackkiej/SickRage
lib/imdb/parser/sql/__init__.py
67
66238
""" parser.sql package (imdb package). This package provides the IMDbSqlAccessSystem class used to access IMDb's data through a SQL database. Every database supported by the SQLObject _AND_ SQLAlchemy Object Relational Managers is available. the imdb.IMDb function will return an instance of this class when called wit...
gpl-3.0
cakeboss893/volatility
volatility/plugins/overlays/windows/win7_sp01_x86_syscalls.py
58
45962
# Volatility # Copyright (c) 2008-2013 Volatility Foundation # Copyright (c) 2011 Michael Hale Ligh <michael.hale@gmail.com> # # 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 as published by # the Free Softw...
gpl-2.0
planetlabs/datalake-common
datalake_common/conf.py
2
2968
# Copyright 2015 Planet Labs, 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
gangadhar-kadam/mtn-erpnext
patches/february_2013/fix_outstanding.py
6
1037
def execute(): import webnotes from webnotes.utils import flt records = webnotes.conn.sql(""" select against_voucher_type, against_voucher, sum(ifnull(debit, 0)) - sum(ifnull(credit, 0)) as outstanding from `tabGL Entry` where ifnull(is_cancelled, 'No') = 'No' and against_voucher_type in ("Sales Invoice",...
agpl-3.0
agaffney/ansible
test/units/executor/module_common/test_modify_module.py
84
1383
# Copyright (c) 2018 Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type import pytest from ansible.executor.module_common import modify...
gpl-3.0
MehdiSfr/tensor-flow
tensorflow/python/ops/gradients.py
1
25465
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
oblique-labs/pyVM
rpython/translator/sandbox/test/test_sandlib.py
1
8723
import py import errno, os, StringIO from rpython.tool.sourcetools import func_with_new_name from rpython.rtyper.lltypesystem import rffi from rpython.translator.sandbox.sandlib import SandboxedProc from rpython.translator.sandbox.sandlib import SimpleIOSandboxedProc from rpython.translator.sandbox.sandlib import Virtu...
mit
robinson96/GRAPE
keyring/keyring/backend.py
1
3766
""" Keyring implementation support """ from __future__ import absolute_import import abc import itertools from keyring.keyring import errors from keyring.keyring.util import properties from keyring.keyring import util class KeyringBackendMeta(abc.ABCMeta): """ A metaclass that's both an ABCMeta and a type ...
bsd-3-clause
SamuelDSR/YouCompleteMe-Win7-GVIM
third_party/waitress/waitress/adjustments.py
3
7142
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
gpl-3.0
eBay/restcommander
play-1.2.4/python/Lib/httplib.py
7
43590
"""HTTP/1.1 client library <intro stuff goes here> <other stuff, too> HTTPConnection goes through a number of "states", which define when a client may legally make another request or fetch the response for a particular request. This diagram details these state transitions: (null) | | HTTPConnection()...
apache-2.0
nickpack/reportlab
tools/pythonpoint/styles/projection.py
1
3319
"""This is an example style sheet. You can create your own, and have them loaded by the presentation. A style sheet is just a dictionary, where they keys are style names and the values are ParagraphStyle objects. You must provide a function called "getParagraphStyles()" to return it. In future, we can put thi...
bsd-3-clause
gkarlin/django-jenkins
build/pylint/test/input/func_method_could_be_function.py
1
1339
# pylint: disable=R0903,R0922,W0232,R0924 """test detection of method which could be a function""" __revision__ = None class Toto(object): """bla bal abl""" def __init__(self): self.aaa = 2 def regular_method(self): """this method is a real method since it access to self""" ...
lgpl-3.0
gauribhoite/personfinder
rtd/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py
2930
11275
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
apache-2.0
wuhy80/zhihu-py3
test/zhihu-test.py
3
15149
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = '7sDream' import os import shutil from zhihu import ZhihuClient, ActType def test_question(): url = 'http://www.zhihu.com/question/24825703' question = client.question(url) # 获取该问题的详细描述 print(question.title) # 亲密关系之间要说「谢谢」吗? # 获取该...
mit
Darkheir/pyjection
tests/unit/test_dependency_injector.py
1
3227
from unittest import TestCase from unittest.mock import Mock from pyjection.dependency_injector import DependencyInjector from pyjection.service import Service class TestDependencyInjector(TestCase): def setUp(self): self.injector = DependencyInjector() def test_register(self): result = sel...
mit
pypot/scikit-learn
sklearn/feature_selection/tests/test_rfe.py
209
11733
""" Testing Recursive feature elimination """ import warnings import numpy as np from numpy.testing import assert_array_almost_equal, assert_array_equal from nose.tools import assert_equal, assert_true from scipy import sparse from sklearn.feature_selection.rfe import RFE, RFECV from sklearn.datasets import load_iris,...
bsd-3-clause
saurabh6790/ON-RISAPP
stock/report/stock_ageing/stock_ageing.py
29
3160
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import date_diff def execute(filters=None): columns = get_columns() item_details = get_fifo_queue(filters) ...
agpl-3.0
zadarastorage/zadarapy
tests/vpsa/test_00_drives.py
1
2974
# Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # 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...
apache-2.0
jkstrick/samba
selftest/tests/test_samba.py
20
2864
# test_run.py -- Tests for selftest.target.samba # Copyright (C) 2012 Jelmer Vernooij <jelmer@samba.org> # # 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; version 3 # of the License or (at your ...
gpl-3.0
morpheyesh/ghostblog
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/formatters/svg.py
362
5867
# -*- coding: utf-8 -*- """ pygments.formatters.svg ~~~~~~~~~~~~~~~~~~~~~~~ Formatter for SVG output. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments.util import get_bool_opt, get...
mit
KyleJamesWalker/ansible
lib/ansible/plugins/filter/core.py
5
16905
# (c) 2012, Jeroen Hoekx <jeroen@hoekx.be> # # 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....
gpl-3.0
40223245/w16b_test
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_result.py
788
19069
import io import sys import textwrap from test import support import traceback import unittest class Test_TestResult(unittest.TestCase): # Note: there are not separate tests for TestResult.wasSuccessful(), # TestResult.errors, TestResult.failures, TestResult.testsRun or # TestResult.shouldStop because t...
gpl-3.0
moiseslorap/RIT
Computer Science 1/Labs/lab11/array_heap.py
2
7303
""" A Heap implemented by mapping a tree onto an array (Python list) of the same size. file: array_heap.py language: python3 new language feature: passing (and storing) functions as arguments. """ import copy from rit_lib import * # Utility functions to map tree relations to array indices ### def par...
mit
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/difflib.py
19
82321
""" Module difflib -- helpers for computing deltas between objects. Function get_close_matches(word, possibilities, n=3, cutoff=0.6): Use SequenceMatcher to return list of the best "good enough" matches. Function context_diff(a, b): For two lists of strings, return a delta in context diff format. Function nd...
mit
EasonYi/enjarify
enjarify/jvm/jvmops.py
35
3479
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
nishad-jobsglobal/odoo-marriot
addons/l10n_it/__init__.py
447
1161
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 # OpenERP Italian Community (<http://www.openerp-italia.org>) # Servabit srl # Agile Business Group sagl # Domsense srl # Albatos srl # # Copyright (C)...
agpl-3.0
fantasyfly/git-repo
subcmds/cherry_pick.py
48
3349
# # Copyright (C) 2010 The Android Open Source Project # # 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 la...
apache-2.0
rwl/openpowersystem
cpsm/wires/switch.py
1
1788
#------------------------------------------------------------------------------ # Copyright (C) 2009 Richard Lincoln # # This program 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; version 2 dated June...
agpl-3.0
GinnyN/towerofdimensions-django
django-allauth/build/lib/allauth/socialaccount/providers/openid/migrations/0002_tosocialaccount.py
82
7741
# encoding: utf-8 from south.v2 import DataMigration class Migration(DataMigration): depends_on = (('socialaccount', '0002_genericmodels'),) def forwards(self, orm): for acc in orm.OpenIDAccount.objects.all(): sacc = acc.socialaccount_ptr sacc.uid = acc.identity sa...
bsd-3-clause
pelya/commandergenius
project/jni/python/src/Lib/plat-mac/EasyDialogs.py
32
30567
"""Easy to use dialogs. Message(msg) -- display a message and an OK button. AskString(prompt, default) -- ask for a string, display OK and Cancel buttons. AskPassword(prompt, default) -- like AskString(), but shows text as bullets. AskYesNoCancel(question, default) -- display a question and Yes, No and Cancel buttons....
lgpl-2.1
Dhivyap/ansible
lib/ansible/plugins/cliconf/onyx.py
31
2827
# # (c) 2017 Red Hat 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. # # Ansible is d...
gpl-3.0