repo_name stringlengths 6 100 | path stringlengths 4 294 | copies stringlengths 1 5 | size stringlengths 4 6 | content stringlengths 606 896k | license stringclasses 15
values |
|---|---|---|---|---|---|
gijs/solpy | tests/unit.py | 2 | 19954 | """solpy unit tests."""
import unittest
import doctest
import json
import logging
from solpy import pv
from solpy import modules
from solpy import design
from solpy import inverters
from solpy import enphase
from solpy import ee
from solpy import vd
logging.basicConfig(level=logging.ERROR)
# modules.py
class TestMod... | lgpl-2.1 |
CJ8664/servo | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servodriver.py | 14 | 5013 | import os
import subprocess
import tempfile
from mozprocess import ProcessHandler
from .base import Browser, require_arg, get_free_port, browser_command, ExecutorBrowser
from ..executors import executor_kwargs as base_executor_kwargs
from ..executors.executorservodriver import (ServoWebDriverTestharnessExecutor,
... | mpl-2.0 |
dfalt974/SickRage | lib/sqlalchemy/dialects/sybase/pysybase.py | 79 | 3228 | # sybase/pysybase.py
# Copyright (C) 2010-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: sybase+pysybase
:name: Python-Sybase
:dbapi: Sybase
:c... | gpl-3.0 |
nzavagli/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/lib2to3/fixes/fix_print.py | 326 | 2865 | # Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Fixer for print.
Change:
'print' into 'print()'
'print ...' into 'print(...)'
'print ... ,' into 'print(..., end=" ")'
'print >>x, ...' into 'print(..., file=x)'
No changes are appl... | mit |
guyemerson/sem-func | src/core/intrinsic.py | 1 | 5876 | import os, pickle, numpy as np
from collections import Counter
from math import log
from warnings import warn
from __config__.filepath import AUX_DIR, FREQ_FILE, VOCAB_FILE
from utils import product
# Load vocabulary
with open(os.path.join(AUX_DIR, VOCAB_FILE), 'rb') as f:
pred_name = pickle.load(f)
with open(... | mit |
epam/DLab | integration-tests/examples/copy_files.py | 1 | 4782 | #!/usr/bin/python
# *****************************************************************************
#
# Copyright (c) 2016, EPAM SYSTEMS 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
#
#... | apache-2.0 |
britcey/ansible | lib/ansible/utils/module_docs_fragments/dimensiondata.py | 192 | 2098 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Dimension Data
#
# 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.
#
# This ... | gpl-3.0 |
slevenhagen/odoo | addons/stock/report/report_stock.py | 376 | 2486 | # -*- 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 |
danigonza/phantomjs | src/breakpad/src/tools/gyp/test/lib/TestGyp.py | 137 | 23211 | #!/usr/bin/python
# Copyright (c) 2009 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.
"""
TestGyp.py: a testing framework for GYP integration tests.
"""
import os
import re
import shutil
import stat
import sys
import TestCommon... | bsd-3-clause |
dosiecki/NewsBlur | apps/rss_feeds/management/commands/refresh_feeds.py | 16 | 3358 | from django.core.management.base import BaseCommand
from django.conf import settings
from django.contrib.auth.models import User
from apps.statistics.models import MStatistics
from apps.rss_feeds.models import Feed
from optparse import make_option
from utils import feed_fetcher
from utils.management_functions import da... | mit |
luciano666/EVAServer | EVAMobile/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py | 1284 | 100329 | # 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.
import collections
import copy
import hashlib
import json
import multiprocessing
import os.path
import re
import signal
import subprocess
import sys
import gyp
imp... | gpl-3.0 |
gem/sidd | sidd/operator/loaders/ms.py | 1 | 3048 | # Copyright (c) 2011-2013, ImageCat Inc.
#
# 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) any later version.
#
# This program is... | agpl-3.0 |
AlmostBetterNetwork/pinecast | pinecast/settings.py | 3 | 9211 | """
Django settings for pinecast project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
import logg... | apache-2.0 |
vadimtk/chrome4sdp | build/android/pylib/uirobot/uirobot_test_instance.py | 42 | 2064 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import json
import logging
from pylib import constants
from pylib.base import test_instance
from pylib.utils import apk_helper
class UirobotTestI... | bsd-3-clause |
ConnorGBrewster/servo | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/metadata.py | 3 | 14183 | import os
import shutil
import tempfile
import uuid
from mozlog import reader
from mozlog import structuredlog
import expected
import manifestupdate
import testloader
import wptmanifest
import wpttest
from vcs import git
manifest = None # Module that will be imported relative to test_root
manifestitem = None
logger... | mpl-2.0 |
beniwohli/apm-agent-python | elasticapm/instrumentation/packages/django/__init__.py | 40 | 1591 | # BSD 3-Clause License
#
# Copyright (c) 2019, Elasticsearch BV
# 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, t... | bsd-3-clause |
fuzeman/trakt.py | trakt/interfaces/users/history.py | 2 | 3409 | from __future__ import absolute_import, division, print_function
from trakt.core.helpers import clean_username, dictfilter, to_iso8601_datetime
from trakt.core.pagination import PaginationIterator
from trakt.interfaces.base import Interface, authenticated
from trakt.mapper import SyncMapper
import requests
class Us... | mit |
jumoconnect/openjumo | jumodjango/org/models.py | 1 | 14137 | from action.models import Action
from django.conf import settings
from django.contrib.contenttypes import generic
from django.db import models
from entity_items.models import Advocate, ContentItem, MediaItem, TimelineItem
from entity_items.models.location import Location
from etc import cache
from etc.templatetags.tags... | mit |
dezelin/vbox | src/libs/xpcom18a4/python/test/regrtest.py | 25 | 3618 | # ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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.mozilla.org/MPL/
#
# Softwa... | gpl-2.0 |
yannrouillard/weboob | weboob/capabilities/housing.py | 4 | 3614 | # -*- coding: utf-8 -*-
# Copyright(C) 2012 Romain Bignon
#
# 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 your opti... | agpl-3.0 |
jendap/tensorflow | tensorflow/contrib/eager/python/saver.py | 9 | 6931 | """Saver for eager mode TensorFlow."""
# 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/LIC... | apache-2.0 |
RobbieNor/amble | src/amble_lib/helpers.py | 2 | 3121 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# This file is in the public domain
### END LICENSE
### DO NOT EDIT THIS FILE ###
"""Helpers for an Ubuntu application."""
import logging
import os
from . ambleconfig import get_data_file
from . Builder import Builder
from ... | gpl-3.0 |
gtklocker/ting | API/chat/tests/message/test_delete_view.py | 3 | 1608 | from chat.tests.message.common import *
class MessageViewDELETETests(ChatTests):
client_class = ChatClient
def test_delete_message(self):
"""
The view should delete the message with the
specified id and respond with a 204(No Content)
code.
"""
timestamp = 10 ** 1... | mit |
bigswitch/horizon | openstack_dashboard/utils/settings.py | 3 | 7585 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 |
cdecker/bitcoin | contrib/signet/getcoins.py | 29 | 1634 | #!/usr/bin/env python3
# Copyright (c) 2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import argparse
import subprocess
import requests
import sys
parser = argparse.ArgumentParser(description='Sc... | mit |
ThePletch/ansible | lib/ansible/modules/system/crypttab.py | 32 | 11852 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Steve <yo@groks.org>
#
# 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
# (a... | gpl-3.0 |
karies/root | tutorials/tmva/keras/ApplicationRegressionKeras.py | 6 | 1042 | #!/usr/bin/env python
from ROOT import TMVA, TFile, TString
from array import array
from subprocess import call
from os.path import isfile
# Setup TMVA
TMVA.Tools.Instance()
TMVA.PyMethodBase.PyInitialize()
reader = TMVA.Reader("Color:!Silent")
# Load data
if not isfile('tmva_reg_example.root'):
call(['curl', '-... | lgpl-2.1 |
2014c2g3/0623exam | static/Brython3.1.1-20150328-091302/Lib/_strptime_1.py | 518 | 21683 | """Strptime-related classes and functions.
CLASSES:
LocaleTime -- Discovers and stores locale-specific time information
TimeRE -- Creates regexes for pattern matching a string of text containing
time information
FUNCTIONS:
_getlang -- Figure out what language is being used for the locale
... | gpl-3.0 |
mgraupe/acq4 | acq4/analysis/scripts/eventExplorer.py | 4 | 15462 | from PyQt4 import QtCore, QtGui
import acq4.Manager
import acq4.pyqtgraph as pg
import acq4.pyqtgraph.opengl as gl
import numpy as np
import acq4.util.functions as fn
import re
man = acq4.Manager.getManager()
## update DB field to reflect dir meta info
#for i in db.select('Cell', ['rowid']): ... | mit |
danellecline/stoqs | stoqs/loaders/MarMenor/loadMarMenor_nov2011.py | 4 | 1224 | #!/usr/bin/env python
__author__ = 'Mike McCann'
__copyright__ = '2011'
__license__ = 'GPL v3'
__contact__ = 'mccann at mbari.org'
__doc__ = '''
Master loader for all CANON activities
Mike McCann
MBARI 22 April 2012
@var __date__: Date of last svn commit
@undocumented: __doc__ parser
@status: production
@lic... | gpl-3.0 |
adngdb/socorro | webapp-django/crashstats/api/views.py | 4 | 15177 | import json
import re
import datetime
import inspect
from django import http
from django.shortcuts import render
from django.contrib.auth.models import Permission
from django.contrib.sites.requests import RequestSite
from django.core.urlresolvers import reverse
from django.conf import settings
from django import forms... | mpl-2.0 |
yelizariev/tkobr-addons | tko_l10n_br_account_invoice/__openerp__.py | 2 | 1886 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# ThinkOpen Solutions Brasil
# Copyright (C) Thinkopen Solutions <http://www.tkobr.com>.
#
# This... | agpl-3.0 |
rkmaddox/mne-python | examples/visualization/topo_compare_conditions.py | 20 | 1828 | """
=================================================
Compare evoked responses for different conditions
=================================================
In this example, an Epochs object for visual and auditory responses is created.
Both conditions are then accessed by their respective names to create a sensor
layout... | bsd-3-clause |
qpython-android/QPYPI | docs/2x/scripts/rterminal.py | 1 | 3854 | #coding=utf-8
# -------------------------------------
#$PYTHONHOME/bin/online2.py
onlinePy='''
#coding=utf-8
import os,sys
from fabric.api import env,run,put,output
env.hosts=['{}']
env.password='{}'
output['running']=False
output['status']=False
output['aborts']=True
env.output_prefix=False
pyhome=os.popen('echo $PY... | apache-2.0 |
fullfanta/mxnet | example/model-parallel/lstm/lstm.py | 13 | 22558 | # 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 |
sauliusl/scipy | benchmarks/run.py | 73 | 4077 | #!/usr/bin/env python
"""
run.py [options] ASV_COMMAND..
Convenience wrapper around the ``asv`` command; just sets environment
variables and chdirs to the correct place etc.
"""
from __future__ import division, absolute_import, print_function
import os
import sys
import subprocess
import json
import shutil
import ar... | bsd-3-clause |
michaelni/audacity | locale/smartmsgmerge.py | 33 | 7285 | #!/usr/bin/python
#
# smartmsgmerge.py
#
# Written by Dominic Mazzoni, 2006
# GNU General Public License 2.0
#
# This is a replacement for the GNU gettext "msgmerge" program, which
# is typically used to update a .po file (def) to the latest .pot file
# (ref). This program is not command-line compatible; it takes no
#... | gpl-2.0 |
amenonsen/ansible | lib/ansible/modules/cloud/amazon/ec2_vpc_subnet.py | 33 | 23367 | #!/usr/bin/python
# Copyright: 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': ['stableinterf... | gpl-3.0 |
chylex/Discord-History-Tracker | build.py | 1 | 7236 | # Python 3
import fileinput
import glob
import shutil
import sys
import os
import re
import distutils.dir_util
VERSION_SHORT = "v.31"
VERSION_FULL = VERSION_SHORT + ", released 3 April 2021"
EXEC_UGLIFYJS_WIN = "{2}/lib/uglifyjs.cmd --parse bare_returns --compress --mangle toplevel --mangle-props keep_quoted,reserve... | mit |
baggioss/hadoop-with-transparentcompress | src/contrib/failmon/bin/scheduler.py | 118 | 6683 | #!/usr/bin/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
# "Licen... | apache-2.0 |
dmlc/tvm | vta/python/vta/top/vta_conv2d_transpose.py | 3 | 7429 | # 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 |
benoitsteiner/tensorflow-opencl | tensorflow/contrib/receptive_field/python/util/graph_compute_order.py | 25 | 2454 | # 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 |
protomouse/Flexget | flexget/plugins/metainfo/imdb_url.py | 6 | 1287 | from __future__ import unicode_literals, division, absolute_import
import re
import logging
from flexget import plugin
from flexget.event import event
log = logging.getLogger('metainfo_imdb_url')
class MetainfoImdbUrl(object):
"""
Scan entry information for imdb url.
"""
schema = {'type': 'bool... | mit |
bryback/quickseq | genescript/Bio/Emboss/Applications.py | 1 | 53527 | # Copyright 2001-2009 Brad Chapman.
# Revisions copyright 2009-2010 by Peter Cock.
# Revisions copyright 2009 by David Winter.
# Revisions copyright 2009-2010 by Leighton Pritchard.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that ... | mit |
interlegis/sigi | sigi/apps/contatos/migrations/0002_auto_20151104_0810.py | 1 | 2409 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import sigi.apps.utils
class Migration(migrations.Migration):
dependencies = [
('contatos', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Mesorregiao',
... | gpl-2.0 |
frreiss/tensorflow-fred | tensorflow/python/data/kernel_tests/from_tensors_test.py | 2 | 11615 | # 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 |
tacaswell/bokeh | tests/integration/webserver.py | 21 | 3888 | # 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... | bsd-3-clause |
dsiddharth/access-keys | keystone/tests/test_cert_setup.py | 2 | 3191 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 |
vinoth3v/In | In/core/context.py | 1 | 13710 | import greenlet
import wsgiref, wsgiref.headers
import datetime
import logging
#import In.nabar
import In.core.response
import In.core.action as action
from In.core.asset import Asset
from In.core.cookie import Cookie
from In.html.menu import PageMenuTab
class ContextEnd(RuntimeError):
'''Context ha... | apache-2.0 |
pratyakshs/pgmpy | pgmpy/models/NoisyOrModel.py | 3 | 5531 | #!/usr/bin/env python3
from itertools import chain
import numpy as np
import networkx as nx
class NoisyOrModel(nx.DiGraph):
"""
Base class for Noisy-Or models.
This is an implementation of generalized Noisy-Or models and
is not limited to Boolean variables and also any arbitrary
function can be ... | mit |
Stratoscale/rackattack-physical | rackattack/physical/provider_tests/test_priority.py | 1 | 1269 | import pytest
import logging
@pytest.fixture()
def chosen(priority):
_chosen = priority.allocated().values()[0].id()
logging.info("CHOSEN: {chosen}".format(chosen=_chosen))
return _chosen
def test_no_tags(chosen):
# some servers with tags, single server without tags -> expect the one with no tags to... | apache-2.0 |
esatel/ADCPy | doc/source/conf.py | 1 | 8929 | # -*- coding: utf-8 -*-
#
# ADCpy documentation build configuration file, created by
# sphinx-quickstart on Tue Oct 07 11:54:34 2014.
#
# 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... | mit |
MayQ/shadowsocks | shadowsocks/crypto/sodium.py | 1032 | 3778 | #!/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 |
jonathonwalz/ansible | test/units/module_utils/facts/test_facts.py | 80 | 22585 | # This file is part of Ansible
# -*- coding: utf-8 -*-
#
#
# 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 dis... | gpl-3.0 |
tupolev/plugin.video.mitele | lib/youtube_dl/extractor/spankwire.py | 20 | 4782 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse_unquote,
compat_urllib_parse_urlparse,
)
from ..utils import (
sanitized_Request,
str_to_int,
unified_strdate,
)
from ..aes import aes_decrypt_text
class SpankwireIE(Inf... | gpl-3.0 |
dennybaa/st2 | st2actions/tests/unit/test_actionchain.py | 2 | 39995 | # Licensed to the StackStorm, Inc ('StackStorm') 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 th... | apache-2.0 |
josecolella/PLD | bin/osx/treasurehunters.app/Contents/Resources/lib/python3.4/numpy/linalg/tests/test_regression.py | 7 | 2479 | """ Test functions for linalg module
"""
from __future__ import division, absolute_import, print_function
from numpy.testing import *
import numpy as np
from numpy import linalg, arange, float64, array, dot, transpose
rlevel = 1
class TestRegression(TestCase):
def test_eig_build(self, level = rlevel):
"... | mit |
knowledgepoint-devs/askbot-devel | askbot/conf/question_lists.py | 13 | 2487 | """
Settings responsible for display of questions lists
"""
from askbot.conf.settings_wrapper import settings
from askbot.conf.super_groups import DATA_AND_FORMATTING
from askbot.deps import livesettings
from django.utils.translation import ugettext_lazy as _
QUESTION_LISTS = livesettings.ConfigurationGroup(
... | gpl-3.0 |
OpenUpgrade/OpenUpgrade | openerp/tools/convert.py | 1 | 41298 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 |
cmbclh/vnpy1.7 | docker/dockerTrader/gateway/sgitGateway/sgitDataType.py | 27 | 257893 | # encoding: UTF-8
defineDict = {}
typedefDict = {}
#//////////////////////////////////////////////////////////////////////
#@system
#@company
#@file SgitFtdcUserApiDataType.h
#@brief 定义了客户端接口使用的业务数据类型
#@history
#20150810
#//////////////////////////////////////////////////////////////////////
#///////////////////... | mit |
Adai0808/wechat-python-sdk | wechat_sdk/lib.py | 20 | 2115 | # -*- coding: utf-8 -*-
from xml.dom import minidom, Node
def disable_urllib3_warning():
"""
https://urllib3.readthedocs.org/en/latest/security.html#insecurerequestwarning
InsecurePlatformWarning 警告的临时解决方案
"""
try:
import requests.packages.urllib3
requests.packages.urllib3.disable... | bsd-2-clause |
th3infinity/libavg | src/test/testcase.py | 2 | 12629 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# libavg - Media Playback Engine.
# Copyright (C) 2003-2014 Ulrich von Zadow
#
# 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... | lgpl-2.1 |
bzennn/blog_flask | python/lib/python2.7/site-packages/pip/utils/ui.py | 490 | 11597 | from __future__ import absolute_import
from __future__ import division
import itertools
import sys
from signal import signal, SIGINT, default_int_handler
import time
import contextlib
import logging
from pip.compat import WINDOWS
from pip.utils import format_size
from pip.utils.logging import get_indentation
from pip... | gpl-3.0 |
luca1897/Pyfacebook | pyfacebook-lite/__init__.py | 1 | 6953 | #
# __init__.py
# Copyright (C) orion 2011 <luca.barbara@live.com>
#
# PyFbGraph 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 |
yamt/networking-ofagent-old3 | networking_ofagent/hacking/checks.py | 6 | 4024 | # Copyright (c) 2014 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 agreed ... | apache-2.0 |
ojake/django | django/db/backends/base/creation.py | 147 | 10102 | import sys
import time
from django.apps import apps
from django.conf import settings
from django.core import serializers
from django.db import router
from django.utils.six import StringIO
from django.utils.six.moves import input
# The prefix to put on the default database name when creating
# the test database.
TEST_... | bsd-3-clause |
rfguri/vimfiles | bundle/ycm/third_party/ycmd/third_party/python-future/src/future/backports/misc.py | 20 | 31552 | """
Miscellaneous function (re)definitions from the Py3.4+ standard library
for Python 2.6/2.7.
- math.ceil (for Python 2.7)
- collections.OrderedDict (for Python 2.6)
- collections.Counter (for Python 2.6)
- collections.ChainMap (for all versions prior to Python 3.3)
- itertools.count ... | mit |
erjohnso/ansible | lib/ansible/modules/network/cloudengine/ce_file_copy.py | 23 | 12414 | #!/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 |
fevxie/odoo | openerp/addons/base/ir/ir_attachment.py | 183 | 16487 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 |
arborh/tensorflow | tensorflow/python/autograph/utils/tensors_test.py | 23 | 2715 | # 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 |
Jordan-wicker/Bread | node_modules/node-gyp/gyp/tools/pretty_vcproj.py | 2637 | 9586 | #!/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.
"""Make the format of a vcproj really pretty.
This script normalize and sort an xml. It also fetches all the properties
inside linked... | mit |
cfelton/myhdl | example/rs232/test_rs232.py | 13 | 4075 | import sys
from random import randrange
import unittest
from unittest import TestCase
from rs232_rx import rs232_rx
from myhdl import Simulation, Signal, intbv, join
from rs232_tx import rs232_tx
from rs232_util import Config, EVEN, ODD, ParityError, Error
class rs232Test(TestCase):
""" rs232 functional unit te... | lgpl-2.1 |
thornomad/django-hitcount | tests/test_admin.py | 1 | 7857 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase, RequestFactory
from django.core.exceptions import PermissionDenied
try:
from django.core.urlresolvers import reverse
except ImportError:
from django.urls import reverse
from django.contrib.admin.sites import Admin... | mit |
trezorg/django | tests/regressiontests/defer_regress/tests.py | 53 | 5528 | from operator import attrgetter
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.contrib.sessions.backends.db import SessionStore
from django.db import connection
from django.db.models.loading import cache
from django.test import TestCase
from models import Resol... | bsd-3-clause |
kbrebanov/ansible | lib/ansible/modules/storage/netapp/netapp_e_volume_copy.py | 41 | 16492 | #!/usr/bin/python
# (c) 2016, NetApp, 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',
'status': ['preview'],
... | gpl-3.0 |
carlgao/lenga | images/lenny64-peon/usr/share/python-support/python-django/django/contrib/comments/templatetags/comments.py | 309 | 11845 | from django import template
from django.template.loader import render_to_string
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.contrib import comments
from django.utils.encoding import smart_unicode
register = template.Library()
class BaseCommentNode(template.N... | mit |
hardbyte/scipy-sim | scipysim/actors/io/bundle.py | 2 | 2225 |
import logging
from scipysim.actors import Actor, Channel
import unittest
import numpy
class Bundle(Actor):
'''
This buffering/compressing/bundling actor takes a source
and waits for a preset number
of events (or for the signal to finish) before passing them on in one.
They get passed on ... | gpl-3.0 |
nburn42/tensorflow | tensorflow/contrib/gan/python/features/python/random_tensor_pool.py | 55 | 1552 | # 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 |
boundlessgeo/qgis-geogig-plugin | geogig/gui/dialogs/remotesdialog.py | 1 | 7621 | # -*- coding: utf-8 -*-
#
# (c) 2016 Boundless, http://boundlessgeo.com
# This code is licensed under the GPL 2.0 license.
#
from PyQt4 import QtCore, QtGui
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class RemotesDialog(QtGui.QDialog):
def __init__(self, parent, repo):
QtGui.QDialog.__init__(sel... | gpl-2.0 |
miselin/grpc | src/python/grpcio/grpc/framework/base/_ingestion.py | 2 | 16422 | # Copyright 2015, 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 |
derricw/pyqtgraph | pyqtgraph/canvas/CanvasTemplate_pyside.py | 42 | 5513 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/canvas/CanvasTemplate.ui'
#
# Created: Mon Dec 23 10:10:52 2013
# by: pyside-uic 0.2.14 running on PySide 1.1.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_Form(object... | mit |
Abi1ity/uniclust2.0 | flask/lib/python2.7/site-packages/decorator.py | 112 | 10639 | ########################## LICENCE ###############################
# Copyright (c) 2005-2012, Michele Simionato
# 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 so... | bsd-3-clause |
phyxl/subber | lib/werkzeug/security.py | 302 | 8407 | # -*- coding: utf-8 -*-
"""
werkzeug.security
~~~~~~~~~~~~~~~~~
Security related helpers such as secure password hashing tools.
:copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import os
import hmac
import hashlib
import posi... | gpl-2.0 |
HughP/stardict-3 | tools/src/lingea-trd-decoder.py | 44 | 28596 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Script for decoding Lingea Dictionary (.trd) file
# Result is <header>\t<definition> file, convertable easily
# by stardict-editor from package stardict-tools into native
# Stardict dictionary (stardict.sf.net and www.stardict.org)
#
# Copyright (C) 2007 - Klokan Petr ... | gpl-3.0 |
windyuuy/opera | chromium/src/chrome/common/extensions/docs/server2/branch_utility.py | 3 | 6320 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import logging
import operator
from appengine_url_fetcher import AppEngineUrlFetcher
import url_constants
class ChannelInfo(object):
def ... | bsd-3-clause |
uskudnik/ggrc-core | src/tests/ggrc/converters/test_audit.py | 2 | 3980 | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: silas@reciprocitylabs.com
# Maintained By: silas@reciprocitylabs.com
from datetime import date, datetime
from os.path import abspath, dirname, join... | apache-2.0 |
vdt/SimpleCV | SimpleCV/examples/util/ColorCube.py | 13 | 1901 | from SimpleCV import Image, Camera, Display, Color
import pygame as pg
import numpy as np
from pylab import *
from mpl_toolkits.mplot3d import axes3d
from matplotlib.backends.backend_agg import FigureCanvasAgg
import cv2
bins = 8
#precompute
idxs = []
colors = []
offset = bins/2
skip = 255/bins
for x in range(0,bins):... | bsd-3-clause |
lnhubbell/tweetTrack | streamScript/domain/analysis_playground.py | 1 | 1928 | """This file is intended to be used as a playground to analyze data pulled
from the database. The code below was used to analyze data from the Tweet200
database, but this is a good place for any sort of extra analysis."""
def count_unique_users(data, n=10000):
u""" Uses blocks of tweets from single users per city.... | mit |
openfun/edx-platform | common/djangoapps/third_party_auth/tests/test_settings.py | 16 | 2420 | """Unit tests for settings.py."""
from third_party_auth import provider, settings
from third_party_auth.tests import testutil
import unittest
_ORIGINAL_AUTHENTICATION_BACKENDS = ('first_authentication_backend',)
_ORIGINAL_INSTALLED_APPS = ('first_installed_app',)
_ORIGINAL_MIDDLEWARE_CLASSES = ('first_middleware_cla... | agpl-3.0 |
aaronzirbes/ansible | lib/ansible/errors/yaml_strings.py | 264 | 3419 | # (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 |
google/adiantum | specification/python/formatperf.py | 1 | 2697 | # Copyright 2018 Google LLC
#
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
import re
def parseperf(fn):
rexp = re.compile(r"(\S+) (encryption|decryption|hashing) \(\S+\)\s+(\d+\.\d+) cpb")
for l in fn.open():... | mit |
debomatic/debomatic | modules/RemovePackages.py | 1 | 2077 | # Deb-o-Matic - RemovePackages module
#
# Copyright (C) 2018-2021 Luca Falavigna
#
# Authors: Luca Falavigna <dktrkranz@debian.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... | gpl-3.0 |
ARMmbed/yotta_osx_installer | workspace/lib/python2.7/site-packages/pip/operations/freeze.py | 284 | 3984 | from __future__ import absolute_import
import logging
import re
import pip
from pip.compat import stdlib_pkgs
from pip.req import InstallRequirement
from pip.utils import get_installed_distributions
from pip._vendor import pkg_resources
logger = logging.getLogger(__name__)
# packages to exclude from freeze output
... | apache-2.0 |
yocheah/DMF | idaes_dmf/base_model.py | 1 | 1598 | import os
import abc
import pwd
import sys
import logging
from metadata import Metadata
from datetime import datetime as dt
__author__ = "You-Wei Cheah"
__version__ = '0.1.0'
_log = logging.getLogger("BaseModel")
class BaseModel:
'''Base model'''
def __init__(self, **metas):
_log.info(self.__class__... | mit |
lancezlin/ml_template_py | lib/python2.7/site-packages/mpl_toolkits/mplot3d/axis3d.py | 7 | 17489 | #!/usr/bin/python
# axis3d.py, original mplot3d version by John Porter
# Created: 23 Sep 2005
# Parts rewritten by Reinier Heeres <reinier@heeres.eu>
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from matplotlib.externals import six
import math
import co... | mit |
tango-controls/pytango | tango/attribute_proxy.py | 4 | 18343 | # ------------------------------------------------------------------------------
# This file is part of PyTango (http://pytango.rtfd.io)
#
# Copyright 2006-2012 CELLS / ALBA Synchrotron, Bellaterra, Spain
# Copyright 2013-2014 European Synchrotron Radiation Facility, Grenoble, France
#
# Distributed under the terms of ... | lgpl-3.0 |
sachinpro/sachinpro.github.io | tensorflow/python/ops/batch_norm_benchmark.py | 9 | 9579 | # 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 |
nicolashainaux/mathmakerlib | mathmakerlib/geometry/bipoint.py | 1 | 8954 | # -*- coding: utf-8 -*-
# Mathmaker Lib offers lualatex-printable mathematical objects.
# Copyright 2006-2017 Nicolas Hainaux <nh.techn@gmail.com>
# This file is part of Mathmaker Lib.
# Mathmaker Lib is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pu... | gpl-3.0 |
Cryptcollector/ARG2.0 | qa/rpc-tests/listtransactions.py | 145 | 6081 | #!/usr/bin/env python
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the listtransactions API
# Add python-bitcoinrpc to module search path:
import os
import sys
sy... | mit |
Dandandan/wikiprogramming | jsrepl/build/extern/python/unclosured/lib/python2.7/distutils/unixccompiler.py | 98 | 14432 | """distutils.unixccompiler
Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
* macros defined with -Dname[=value]
* macros undefined with -Uname
* include search directories specified with -Idir
* libraries specified with -lllib
* library... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.