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
HarryRybacki/osf.io
scripts/add_conference.py
61
2995
#!/usr/bin/env python # encoding: utf-8 from website.conferences.model import Conference from website.models import User from modularodm import Q from modularodm.exceptions import ModularOdmException from website.app import init_app import sys import argparse def main(): init_app(set_backends=True, routes=False) ...
apache-2.0
Bitl/RBXLegacy-src
Cut/RBXLegacyDiscordBot/lib/aiohttp/client.py
17
26106
"""HTTP Client for asyncio.""" import asyncio import base64 import hashlib import os import sys import traceback import urllib.parse import warnings from multidict import CIMultiDict, MultiDict, MultiDictProxy, istr import aiohttp from . import hdrs, helpers from ._ws_impl import WS_KEY, WebSocketParser, WebSocketW...
gpl-3.0
yukkeorg/pyusbio
pyusbio/usbio_config.py
1
2779
#!/usr/bin/env python # Copyright (c) 2011-2020, Yusuke Ohshima All rights reserved. # This software is under MIT License. import sys from optparse import OptionParser from pyusbio import USBIO def toInt(val): if val is None: return None if isinstance(val, (int)): return val val = val....
bsd-2-clause
w1ll1am23/home-assistant
homeassistant/components/smhi/__init__.py
26
1025
"""Support for the Swedish weather institute weather service.""" from homeassistant.config_entries import ConfigEntry from homeassistant.core import Config, HomeAssistant # Have to import for config_flow to work even if they are not used here from .config_flow import smhi_locations # noqa: F401 from .const import DOM...
apache-2.0
timj/scons
test/Ignore.py
5
3925
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, merge, publish, ...
mit
bloomark/python-bitcoinlib
bitcoin/core/_bignum.py
26
2249
# Copyright (C) 2012-2014 The python-bitcoinlib developers # # This file is part of python-bitcoinlib. # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of python-bitcoinlib, including this file, may be copied, modified, # propagated, or dist...
lgpl-3.0
alexzoo/python
selenium_tests/env/lib/python3.6/site-packages/pip/_vendor/progress/spinner.py
510
1314
# -*- coding: utf-8 -*- # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and 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 SOFTWARE IS P...
apache-2.0
master-vic/extend-python-with-c
src/main.py
1
1535
#!/bin/env python # 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 hope that i...
gpl-3.0
sonaht/ansible
lib/ansible/modules/cloud/ovirt/ovirt_storage_connections.py
29
9743
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (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 #...
gpl-3.0
lgiommi/root
interpreter/llvm/src/utils/lit/lit/main.py
21
21621
#!/usr/bin/env python """ lit - LLVM Integrated Tester. See lit.pod for more information. """ from __future__ import absolute_import import math, os, platform, random, re, sys, time import lit.ProgressBar import lit.LitConfig import lit.Test import lit.run import lit.util import lit.discovery class TestingProgress...
lgpl-2.1
balazs-bamer/FreeCAD-Surface
src/Mod/Raytracing/InitGui.py
19
3637
# Raytracing gui init module # (c) 2003 Juergen Riegel # # Gathering all the information to start FreeCAD # This is the second one of three init scripts, the third one # runs when the gui is up #*************************************************************************** #* (c) Juergen Riegel (juergen.riegel@...
lgpl-2.1
ressu/SickGear
sickbeard/scene_exceptions.py
1
12344
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickGear. # # SickGear 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,...
gpl-3.0
BtbN/xbmc
tools/Fake Episode Maker/openAnything.py
169
5467
# -*- coding: utf-8 -*- # Copyright (C) 2008-2013 Team XBMC # http://xbmc.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; either version 2, or (at your option) # any l...
gpl-2.0
science09/xhtml2pdf
xhtml2pdf/w3c/css.py
61
28065
#!/usr/bin/env python ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##~ Copyright (C) 2002-2004 TechGame Networks, LLC. ##~ ##~ This library is free software; you can redistribute it and/or ##~ modify it under the terms of the BSD style License as found in the ##~ LICENSE file included with this distribution....
apache-2.0
LIS/lis-tempest
tempest/services/volume/base/base_qos_client.py
6
6300
# 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 agreed to in...
apache-2.0
Learningtribes/edx-platform
common/djangoapps/microsite_configuration/tests/backends/test_database.py
23
8338
""" Test Microsite database backends. """ import logging from mock import patch from django.conf import settings from microsite_configuration.backends.base import ( BaseMicrositeBackend, BaseMicrositeTemplateBackend, ) from microsite_configuration import microsite from microsite_configuration.models import ( ...
agpl-3.0
aristanetworks/arista-ovs-nova
nova/db/sqlalchemy/session.py
1
16509
# 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
qvazzler/Flexget
flexget/plugins/operate/debug_db_sessions.py
1
3442
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import inspect import logging import time from threading import Lock import sqlalchemy from flexget import options from flexget.event import event from flexget.manager import ...
mit
lacrazyboy/scrapy
scrapy/commands/fetch.py
113
2063
from __future__ import print_function from w3lib.url import is_url from scrapy.commands import ScrapyCommand from scrapy.http import Request from scrapy.exceptions import UsageError from scrapy.utils.spider import spidercls_for_request, DefaultSpider class Command(ScrapyCommand): requires_project = False de...
bsd-3-clause
lento/cortex
python/IECore/MenuItemDefinition.py
13
3960
########################################################################## # # Copyright (c) 2007, Image Engine Design Inc. All rights reserved. # Copyright (c) 2011, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that ...
bsd-3-clause
pcabido/socorro
docs/conf.py
12
7069
# -*- coding: utf-8 -*- # # Socorro documentation build configuration file, created by # sphinx-quickstart on Wed Sep 21 14:59:08 2011. # # 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. # # All...
mpl-2.0
kidaa30/spacewalk
backend/satellite_tools/updatePackages.py
4
24364
# # Copyright (c) 2008--2015 Red Hat, Inc. # # Authors: Pradeep Kilambi # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE....
gpl-2.0
wonder-sk/QGIS
python/plugins/db_manager/db_plugins/connector.py
3
7493
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
gpl-2.0
aronreid/cf-php-buildpack
lib/build_pack_utils/builder.py
7
31479
import os import sys import shutil import re import logging from collections import defaultdict from StringIO import StringIO from subprocess import Popen from subprocess import PIPE from cloudfoundry import CloudFoundryUtil from cloudfoundry import CloudFoundryInstaller from detecter import TextFileSearch from detecte...
apache-2.0
sitoumbaz/libyuv
gyp_libyuv.py
179
1124
#!/usr/bin/env python # # Copyright 2014 The LibYuv 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 in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All cont...
bsd-3-clause
marcydoty/geraldo
site/newsite/django_1_0/django/utils/feedgenerator.py
14
12685
""" Syndication feed generation library -- used for generating RSS, etc. Sample usage: >>> from django.utils import feedgenerator >>> feed = feedgenerator.Rss201rev2Feed( ... title=u"Poynter E-Media Tidbits", ... link=u"http://www.poynter.org/column.asp?id=31", ... description=u"A group weblog by the shar...
lgpl-3.0
dengxiayehu/orps
contrib/webrtc/src/testing/gtest/scripts/upload_gtest.py
1963
2851
#!/usr/bin/env python # # Copyright 2009, 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...
gpl-2.0
pymedusa/SickRage
ext/tornado/test/concurrent_test.py
2
16094
# # Copyright 2012 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
gpl-3.0
corvis/heats-roompi
src/modules/onewire_thermometer/__init__.py
1
1651
from random import random from typing import Dict from common.drivers import OneWireDriver from common.errors import InvalidModuleError from common.model import StateAwareModule, ParameterDef, Driver class OneWireThermometerModule(StateAwareModule): @staticmethod def typeid() -> int: return 0x0103 ...
gpl-2.0
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/PyQt4/QtGui/QGestureRecognizer.py
2
1764
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QGestureRecognizer(): # skipped bases: <type 'sip.wrapper'> """ QGestureRecognizer() QGestureRecognizer(QGestureRecognizer) ...
gpl-2.0
xtopherbrandt/pivotalpdf
pivotal_api_v5.py
1
7472
import time import datetime from poster.encode import multipart_encode from poster.encode import MultipartParam from dateutil import parser import httplib2 import urllib import json import logging def error_from_response(http_response, error_class, response_body=None, parsed_body=None): erro...
gpl-2.0
spthaolt/socorro
webapp-django/crashstats/urls.py
3
1867
import os from django.conf import settings from django.conf.urls import patterns, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from .crashstats import urls from .supersearch import urls as supersearch_urls from .authentication import urls as auth_urls from .monitoring import urls as mon...
mpl-2.0
balint256/gnuradio
gr-digital/python/digital/constellation_map_generator.py
7
1992
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) ...
gpl-3.0
sdague/home-assistant
script/translations/util.py
21
1166
"""Translation utils.""" import argparse import os import pathlib import subprocess from .error import ExitApp def get_base_arg_parser() -> argparse.ArgumentParser: """Get a base argument parser.""" parser = argparse.ArgumentParser(description="Home Assistant Translations") parser.add_argument( "...
apache-2.0
stefanhenneking/mxnet
example/reinforcement-learning/a3c/sym.py
53
1903
# 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
catapult-project/catapult
third_party/gsutil/gslib/vendored/boto/tests/integration/gs/util.py
25
3243
# Copyright (c) 2012, Google, Inc. # All rights reserved. # # 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...
bsd-3-clause
lidavidm/mathics-heroku
venv/lib/python2.7/site-packages/sympy/geometry/entity.py
1
11160
"""The definition of the base geometrical entity with attributes common to all derived geometrical entities. Contains ======== GeometryEntity """ from sympy.core.compatibility import cmp, is_sequence from sympy.core.basic import Basic from sympy.core.sympify import sympify from sympy.functions import cos, sin from s...
gpl-3.0
LumPenPacK/NetworkExtractionFromImages
osx_build/nefi2_osx_amd64_xcode_2015/site-packages/networkx/algorithms/bipartite/tests/test_project.py
31
13836
#!/usr/bin/env python from nose.tools import assert_equal import networkx as nx from networkx.algorithms import bipartite from networkx.testing import assert_edges_equal, assert_nodes_equal class TestBipartiteProject: def test_path_projected_graph(self): G=nx.path_graph(4) P=bipartite.projected_gr...
bsd-2-clause
RTHMaK/RPGOne
jupyter_contrib_nbextensions-master/tests/test_migrate.py
4
6278
# -*- coding: utf-8 -*- """Tests for the retiring old IPython-notebook-extensions installations.""" from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import imp import json import os from unittest import TestCase import nose.tools as nt import pip from jupyter_contrib_core.t...
apache-2.0
Godmaster49/mtasa-blue
vendor/google-breakpad/src/tools/gyp/test/make_global_settings/wrapper/gyptest-wrapper.py
229
1444
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies *_wrapper in make_global_settings. """ import os import sys import TestGyp test_format = ['ninja'] if sys.platform in ('linux...
gpl-3.0
ascott1/regulations-site
regulations/urls.py
3
7467
from django.conf import settings from django.conf.urls import patterns, url from django.views.decorators.cache import cache_page from regulations.views.about import about from regulations.views.chrome_breakaway import ChromeSXSView from regulations.views.chrome import ( ChromeInterpView, ChromeLandingView, ChromeP...
cc0-1.0
v4hn/moveit
moveit_ros/planning_interface/test/cleanup.py
1
1069
#!/usr/bin/env python from __future__ import print_function import unittest import rostest import subprocess import rospkg import roslib.packages PKGNAME = 'moveit_ros_planning_interface' NODENAME = 'moveit_cleanup_tests' # As issue #592 is related to a crash during program exit, # we cannot perform a standard unit...
bsd-3-clause
espadrine/opera
chromium/src/tools/perf/perf_tools/blink_perf.py
6
3111
# 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. """This measurement runs a blink performance test and reports the results.""" import os import sys from telemetry.core import util from telemetry.page ...
bsd-3-clause
Limags/MissionPlanner
Lib/urllib2.py
50
52574
"""An extensible library for opening URLs using a variety of protocols The simplest way to use this module is to call the urlopen function, which accepts a string containing a URL or a Request object (described below). It opens the URL and returns the results as file-like object; the returned object has some ext...
gpl-3.0
dkodnik/Ant
addons/base_import/models.py
33
13761
import csv import itertools import logging import operator try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import psycopg2 from openerp.osv import orm, fields from openerp.osv.orm import BaseModel from openerp.tools.translate import _ FIELDS_RECURSION_LIMIT = 2 ERROR_PR...
agpl-3.0
Averroes/statsmodels
statsmodels/tools/tests/results/datamlw.py
69
17628
import numpy as np from numpy import array class Holder(object): pass data = Holder() data.comment = 'generated data, divide by 1000' data.name = 'data' data.xo = array([[ -419, -731, -1306, -1294], [ 6, 529, -200, -437], [ -27, -833, -6, -564], [ -304, -273, -502, -739], ...
bsd-3-clause
duyetdev/openerp-6.1.1
openerp/addons/google_base_account/wizard/google_login.py
9
3388
# -*- 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
bhargavvader/gensim
gensim/models/lsi_dispatcher.py
17
7220
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ USAGE: %(program)s SIZE_OF_JOBS_QUEUE Dispatcher process which orchestrates distributed LSI computations. Run this \ script onl...
lgpl-2.1
jvkops/django
django/core/management/commands/shell.py
492
3951
import os from django.core.management.base import BaseCommand class Command(BaseCommand): help = "Runs a Python interactive interpreter. Tries to use IPython or bpython, if one of them is available." requires_system_checks = False shells = ['ipython', 'bpython'] def add_arguments(self, parser): ...
bsd-3-clause
nadesico19/com.wcat.gcr
python/wcatgcr_events.py
1
1291
from collections import namedtuple EventCQPInfo = namedtuple('EventCQPInfo', ( 'login_qq', # int64_t 'cookies', # string 'csrf_token', # int32_t )) cqp_info = EventCQPInfo(0, '', 0) EventPrivateMsg = namedtuple('EventPrivateMsg', ( 'sub_type', # int32_t 'send_time', # int32_t 'from_group'...
mit
zhaoweigg/zulip
zerver/management/commands/knight.py
115
2607
from __future__ import absolute_import from django.core.management.base import BaseCommand, CommandError from django.core.exceptions import ValidationError from zerver.lib.actions import do_change_is_admin from zerver.models import UserProfile class Command(BaseCommand): help = """Give an existing user administ...
apache-2.0
gotcha/selenium
py/test/selenium/webdriver/common/text_handling_tests.py
65
8062
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
Xperia-Nicki/android_platform_sony_nicki
external/webkit/Tools/QueueStatusServer/handlers/releasepatch.py
19
2831
# 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 ...
apache-2.0
Comunitea/CMNT_00098_2017_JIM_addons
custom_documents/models/stock_picking.py
1
11479
# -*- coding: utf-8 -*- # © 2017 Comunitea # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields, api from datetime import timedelta from pytz import timezone from odoo.addons import decimal_precision as dp class StockPicking(models.Model): _inherit = 'stock.picking' ...
agpl-3.0
woozzu/pylearn2
pylearn2/devtools/nan_guard.py
18
3976
""" Functionality for detecting NaNs in a Theano graph. """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" import logging from theano.compile im...
bsd-3-clause
msarahan/bokeh
bokeh/application/handlers/tests/test_server_lifecycle.py
6
4894
from __future__ import absolute_import, print_function import unittest from bokeh.application.handlers import ServerLifecycleHandler from bokeh.document import Document def _with_temp_file(func): import tempfile f = tempfile.NamedTemporaryFile() try: func(f) finally: f.close() def _w...
bsd-3-clause
Wattpad/dd-agent
checks.d/openstack.py
5
36668
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from datetime import datetime, timedelta from urlparse import urljoin # project from checks import AgentCheck # 3p import requests import simplejson as json SOURCE_TYPE = 'openstack' V21_NOVA_API_VERS...
bsd-3-clause
mbauskar/Das_Erpnext
erpnext/controllers/selling_controller.py
10
9656
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, flt, cstr, comma_or from erpnext.setup.utils import get_company_currency from frappe import _, throw from e...
agpl-3.0
jeanlinux/calibre
src/calibre/devices/binatone/driver.py
24
1486
# -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2009, John Schember <john at nachtimwald.com>' __docformat__ = 'restructuredtext en' ''' Device driver for Bookeen's Cybook Gen 3 ''' from calibre.devices.usbms.driver import USBMS class README(USBMS): name = 'Binatone Readme Device In...
gpl-3.0
Zhaoyanzhang/-myflasky
venv/lib/python2.7/site-packages/sqlalchemy/testing/suite/test_results.py
35
11736
from .. import fixtures, config from ..config import requirements from .. import exclusions from ..assertions import eq_ from .. import engines from ... import testing from sqlalchemy import Integer, String, select, util, sql, DateTime, text, func import datetime from ..schema import Table, Column class RowFetchTest...
mit
sarumont/py-trello
trello/card.py
1
30423
# -*- coding: utf-8 -*- from __future__ import with_statement, print_function, absolute_import import datetime from operator import itemgetter import pytz from dateutil import parser as dateparser from trello import TrelloBase from trello.attachments import Attachments from trello.checklist import Checklist from tre...
bsd-3-clause
rajmarndi/python-beaver
beaver/tests/service.py
10
3248
import logging import re import select import subprocess import threading import time __all__ = [ 'ExternalService', 'SpawnedService', ] class ExternalService(object): def __init__(self, host, port): logging.info("Using already running service at %s:%d", host, port) self.host = host ...
mit
titos-carrasco/Scribbler2-Python
demos/S2IRSensors.py
1
1432
#!/usr/bin/env python # -*- coding: utf-8 -*- """Test de los sensores infrarojos del S2.""" from __future__ import print_function #from rcr.robots.scribbler2.Scribbler2 import Scribbler2 from rcr.robots.fluke2.Fluke2 import Fluke2 #from rcr.robots.net2.Net2 import Net2 def main(): """Realiza las pruebas de los ...
mit
rottenbytes/Sick-Beard
lib/imdb/parser/http/companyParser.py
143
3439
""" parser.http.companyParser module (imdb package). This module provides the classes (and the instances), used to parse the IMDb pages on the akas.imdb.com server about a company. E.g., for "Columbia Pictures [us]" the referred page would be: main details: http://akas.imdb.com/company/co0071509/ Copyright 2008...
gpl-3.0
stefanseefeld/numba
numba/cuda/tests/cudadrv/test_select_device.py
8
1098
# # Test does not work on some cards. # from __future__ import print_function, absolute_import, division import threading try: from Queue import Queue # Python 2 except: from queue import Queue # Python 3 import numpy as np from numba import cuda from numba.cuda.testing import unittest, CUDATestCase def ne...
bsd-2-clause
laserson/impyla
impala/_thrift_gen/Status/ttypes.py
5
3711
# # Autogenerated by Thrift Compiler (0.9.1) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TP...
apache-2.0
Knewton/lentil
tests/test_est.py
2
9820
""" Module for unit tests that check if parameter estimation converges for toy examples @author Siddharth Reddy <sgr45@cornell.edu> """ import copy import unittest import logging import pandas as pd import numpy as np from lentil import models from lentil import est from lentil import toy logging.basicConfig() _l...
apache-2.0
jayme-github/headphones
lib/unidecode/x095.py
252
4671
data = ( 'Xiao ', # 0x00 'Suo ', # 0x01 'Li ', # 0x02 'Zheng ', # 0x03 'Chu ', # 0x04 'Guo ', # 0x05 'Gao ', # 0x06 'Tie ', # 0x07 'Xiu ', # 0x08 'Cuo ', # 0x09 'Lue ', # 0x0a 'Feng ', # 0x0b 'Xin ', # 0x0c 'Liu ', # 0x0d 'Kai ', # 0x0e 'Jian ', # 0x0f 'Rui ', # 0x10 '...
gpl-3.0
takaaptech/sky_engine
third_party/instrumented_libraries/scripts/download_binaries.py
53
1901
#!/usr/bin/env python # Copyright (c) 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. """Downloads pre-built sanitizer-instrumented third-party libraries from GCS.""" import os import re import subprocess import sys ...
bsd-3-clause
dmuhamedagic/crmsh
test/unittests/test_parse.py
1
34098
# Copyright (C) 2013 Kristoffer Gronlund <kgronlund@suse.com> # See COPYING for license information. # # unit tests for parse.py from crmsh import parse import unittest import shlex from crmsh.utils import lines2cli from lxml import etree from nose.tools import ok_, eq_ class MockValidation(parse.Validation): de...
gpl-2.0
dongnizh/tika-python
tika/config.py
2
1027
#!/usr/bin/env python2.7 # encoding: utf-8 # 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, Vers...
apache-2.0
TerryHowe/ansible-modules-hashivault
ansible/modules/hashivault/_hashivault_audit_enable.py
1
1968
#!/usr/bin/env python from ansible.module_utils.hashivault import hashivault_argspec from ansible.module_utils.hashivault import hashivault_auth_client from ansible.module_utils.hashivault import hashivault_init from ansible.module_utils.hashivault import hashiwrapper ANSIBLE_METADATA = {'status': ['deprecated'], 'sup...
mit
RichardRanft/Torque6
src/testing/googleTest/test/gtest_filter_unittest.py
2826
21261
#!/usr/bin/env python # # Copyright 2005 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...
mit
uiri/pygmy
feedparser.py
28
168065
#!/usr/bin/env python """Universal feed parser Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds Visit http://feedparser.org/ for the latest version Visit http://feedparser.org/docs/ for the latest documentation Required: Python 2.4 or later Recommended: CJKCodecs and iconv_codec <http://cjkpytho...
gpl-3.0
coolbombom/CouchPotato
cherrypy/_cpreqbody.py
82
37768
"""Request body processing for CherryPy. .. versionadded:: 3.2 Application authors have complete control over the parsing of HTTP request entities. In short, :attr:`cherrypy.request.body<cherrypy._cprequest.Request.body>` is now always set to an instance of :class:`RequestBody<cherrypy._cpreqbody.RequestBody>`, and *...
gpl-3.0
linjeffrey/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/webkitunittest.py
124
2362
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
redhatrises/freeipa
ipaclient/remote_plugins/2_114/sudocmd.py
8
10873
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # # pylint: disable=unused-import import six from . import Command, Method, Object from ipalib import api, parameters, output from ipalib.parameters import DefaultFrom from ipalib.plugable import Registry from ipalib.text import _ from ipapython.dn ...
gpl-3.0
VirgilSecurity/virgil-sdk-python
virgil_sdk/client/connections/http_request_adapter.py
1
2025
# Copyright (C) 2016-2019 Virgil Security Inc. # # Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.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: # # (1) Redistribution...
bsd-3-clause
dwlehman/blivet
tests/action_test.py
2
54026
#!/usr/bin/python import unittest from tests.storagetestcase import StorageTestCase import blivet from blivet.formats import getFormat from blivet.size import Size # device classes for brevity's sake -- later on, that is from blivet.devices import DiskDevice from blivet.devices import PartitionDevice from blivet.dev...
lgpl-2.1
udp3f/gemini
gemini/compression.py
3
3588
""" >>> a = np.arange(20) >>> (a == snappy_unpack_blob(snappy_pack_blob(a))).all() True >>> a = np.arange(20, dtype=np.uint8) >>> snappy_unpack_blob(snappy_pack_blob(a)).dtype == a.dtype True >>> a = np.arange(20, dtype=np.float32) >>> b = snappy_unpack_blob(snappy_pack_blob(a)) >>> a.dtype == b.dtype == np.float32 T...
mit
jgoclawski/django
django/db/backends/base/operations.py
192
22514
import datetime import decimal import warnings from importlib import import_module from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends import utils from django.utils import six, timezone from django.utils.dateparse import parse_duration from django.utils.dep...
bsd-3-clause
watonyweng/nova
nova/network/api.py
41
23187
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you...
apache-2.0
Semprini/cbe-retail
retail/loyalty/migrations/0001_initial.py
1
1581
# Generated by Django 2.0.1 on 2018-03-28 01:57 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('human_resources', '0006_auto_20180215_0942'), ('accounts_receivable', '0003_customer...
apache-2.0
prestonso/intro-graphql
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py
1789
10585
# Copyright (c) 2014 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. """Xcode-ninja wrapper project file generator. This updates the data structures passed to the Xcode gyp generator to build with ninja instead. The Xcode project i...
mit
ehsanfar/ofspy_v2
ofspy/test/test_transceiver.py
1
14094
""" Copyright 2015 Paul T. Grogan, Massachusetts Institute of Technology 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 applicabl...
apache-2.0
yati-sagade/pip
pip/commands/completion.py
435
1991
from __future__ import absolute_import import sys from pip.basecommand import Command BASE_COMPLETION = """ # pip %(shell)s completion start%(script)s# pip %(shell)s completion end """ COMPLETION_SCRIPTS = { 'bash': """ _pip_completion() { COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\ CO...
mit
fhe-odoo/odoo
addons/base_import_module/models/base_import_module.py
344
2066
import base64 from StringIO import StringIO from io import BytesIO from openerp.osv import osv, fields class base_import_module(osv.TransientModel): """ Import Module """ _name = "base.import.module" _description = "Import Module" _columns = { 'module_file': fields.binary('Module .ZIP file', r...
agpl-3.0
marc-sensenich/ansible
lib/ansible/modules/network/f5/bigiq_application_fasthttp.py
14
23369
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
tavaresdong/courses-notes
ucb_cs61A/lab/lab06/classes.py
3
10101
# A "simple" adventure game. class Player(object): def __init__(self, name, place): """Create a player object.""" self.name = name self.place = place self.backpack = [] def look(self): self.place.look() def go_to(self, location): """Go to a location if it's...
mit
Mottl/quickpipeline
quickpipeline/__init__.py
1
11960
# -*- coding: utf-8 -*- """ quickpipeline module implements QuickPipeline class that do all the necessary things to prepare data for machine learning tasks. 2017 (c) Dmitry Mottl License: MIT """ from collections import defaultdict import pandas as pd import numpy as np from sklearn.preprocessing import ( Imput...
mit
jboss-container-images/concreate
cekit/tools.py
1
10657
import logging import os import shutil import sys import subprocess import yaml from cekit.errors import CekitError logger = logging.getLogger('cekit') def cleanup(target): """ Prepates target/image directory to be regenerated.""" dirs_to_clean = [os.path.join(target, 'image', 'modules'), ...
mit
raymondnijssen/QGIS
python/plugins/processing/algs/qgis/ExportGeometryInfo.py
8
8462
# -*- coding: utf-8 -*- """ *************************************************************************** ExportGeometryInfo.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ********************...
gpl-2.0
luiseduardohdbackup/odoo
addons/account_analytic_plans/report/crossovered_analytic.py
321
8149
# -*- 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
djabber/Dashboard
bottle/dash/local/lib/python2.7/encodings/utf_16_le.py
860
1037
""" Python 'utf-16-le' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs encode = codecs.utf_16_le_encode def decode(input, errors='strict'): return codecs.utf_16_le_decode(input, errors, True) class IncrementalEncod...
mit
Ares42/Guidebox
Flask/flask/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py
317
10124
""" The httplib2 algorithms ported for use with requests. """ import re import calendar import time from email.utils import parsedate_tz from pip._vendor.requests.structures import CaseInsensitiveDict from .cache import DictCache from .serialize import Serializer URI = re.compile(r"^(([^:/?#]+):)?(//([^/?#]*))?([^?...
mit
titilambert/harbour-squilla
embedded_libs/mdns/lockd.py
2
2232
import uuid import zeroconf import traceback CL_PORT = 12345 HEARTBEAT_TTL = 10 class MutexInfo(object): def __init__(self, uuid): self.uuid = uuid self.service = None self.queue = [] self.counter = 0 self.queues = {} self.watchdog = None class LockDirectory(dic...
gpl-3.0
AnotherIvan/calibre
src/calibre/spell/__init__.py
14
1233
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' import cPickle from collections import namedtuple from calibre.utils.locali...
gpl-3.0
toastedcornflakes/scikit-learn
examples/cluster/plot_ward_structured_vs_unstructured.py
320
3369
""" =========================================================== Hierarchical clustering: structured vs unstructured ward =========================================================== Example builds a swiss roll dataset and runs hierarchical clustering on their position. For more information, see :ref:`hierarchical_clus...
bsd-3-clause
digimarc/django
tests/template_tests/filter_tests/test_wordcount.py
521
1107
from django.template.defaultfilters import wordcount from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class WordcountTests(SimpleTestCase): @setup({'wordcount01': '{% autoescape off %}{{ a|wordcount }} {{ b|wordcount }}{% endautoescape %}'}) def ...
bsd-3-clause
AudioGod/DTS-Sound-Integration_CAF-Android-kernel
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0