repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
cfjhallgren/shogun | refs/heads/develop | applications/asp/model.py | 31 | #
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Written (W) 2006-2008 Soeren Sonnenburg
# Written (W) 2007 Gunnar ... |
ruuk/script.evernote | refs/heads/master | lib/thrift/transport/TSSLSocket.py | 24 | #
# 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... |
GunoH/intellij-community | refs/heads/master | python/testData/refactoring/invertBoolean/import.before.py | 83 | from my_file import B<caret>OOL |
hyperized/ansible | refs/heads/devel | lib/ansible/module_utils/network/eos/config/l3_interfaces/l3_interfaces.py | 2 | # -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The eos_l3_interfaces class
It is in this file where the current configuration (as dict)
is compared to the provided configuration (as dict) and the command set
necessary t... |
MediaBrowser/plugin.video.emby | refs/heads/master | libraries/emby/core/connection_manager.py | 2 | # -*- coding: utf-8 -*-
#################################################################################################
import json
import logging
import hashlib
import socket
import time
from datetime import datetime
from distutils.version import LooseVersion
from credentials import Credentials
from http import H... |
aroraenterprise/projecteos | refs/heads/master | backend/pylibs/flask/views.py | 782 | # -*- coding: utf-8 -*-
"""
flask.views
~~~~~~~~~~~
This module provides class-based views inspired by the ones in Django.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from .globals import request
from ._compat import with_metaclass
http_method_funcs =... |
amandersillinois/landlab | refs/heads/master | landlab/graph/structured_quad/__init__.py | 3 | from .dual_structured_quad import (
DualRectilinearGraph,
DualStructuredQuadGraph,
DualUniformRectilinearGraph,
)
from .structured_quad import (
RectilinearGraph,
StructuredQuadGraph,
UniformRectilinearGraph,
)
__all__ = [
"StructuredQuadGraph",
"RectilinearGraph",
"UniformRectiline... |
stewnorriss/LibCloud | refs/heads/master | libcloud/compute/drivers/gogrid.py | 56 | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... |
candy7393/VTK | refs/heads/master | ThirdParty/Twisted/twisted/protocols/dict.py | 60 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Dict client protocol implementation.
@author: Pavel Pergamenshchik
"""
from twisted.protocols import basic
from twisted.internet import defer, protocol
from twisted.python import log
from StringIO import StringIO
def parseParam(line):
... |
KingxBanana/zulip | refs/heads/master | zerver/management/commands/realm_filters.py | 6 | from __future__ import absolute_import
from __future__ import print_function
from typing import Any
from argparse import ArgumentParser
from optparse import make_option
from django.core.management.base import BaseCommand
from zerver.models import RealmFilter, all_realm_filters, get_realm_by_string_id
from zerver.lib... |
Distrotech/intellij-community | refs/heads/master | python/helpers/epydoc/apidoc.py | 90 | # epydoc -- API Documentation Classes
#
# Copyright (C) 2005 Edward Loper
# Author: Edward Loper <edloper@loper.org>
# URL: <http://epydoc.sf.net>
#
# $Id: apidoc.py 1675 2008-01-29 17:12:56Z edloper $
"""
Classes for encoding API documentation about Python programs.
These classes are used as a common representation f... |
effigies/mne-python | refs/heads/master | mne/tests/test_selection.py | 22 | from mne import read_selection
def test_read_selection():
"""Test reading of selections"""
# test one channel for each selection
ch_names = ['MEG 2211', 'MEG 0223', 'MEG 1312', 'MEG 0412', 'MEG 1043',
'MEG 2042', 'MEG 2032', 'MEG 0522', 'MEG 1031']
sel_names = ['Vertex', 'Left-temporal... |
aipescience/queryparser | refs/heads/master | utils/adql_queries.py | 1 | queries = [
"""SELECT POINT('icrs', 10, 10) FROM db.b;""",
"""SELECT CIRCLE('ICRS', RA, -20/4., 1) FROM db.b""",
"""SELECT BOX('ICRS', 25.4, -20, 1, 1) FROM db.b""",
"""SELECT TOP 10 AREA(CIRCLE('ICRS', RA, -20, 1)) FROM db.b""",
"""SELECT TOP 10 CONTAINS(POINT('ICRS', 0, 0), CIRCLE('ICRS', 0, 0, 1)) FROM db.b""",
"""... |
eezee-it/account-invoicing | refs/heads/8.0 | setup/account_invoice_supplierinfo_update_discount/setup.py | 7073 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
|
cedk/odoo | refs/heads/8.0 | addons/account/account.py | 77 | # -*- 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... |
byterom/android_external_chromium_org | refs/heads/12.1 | build/android/gyp/jar.py | 41 | #!/usr/bin/env python
#
# 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 fnmatch
import optparse
import os
import sys
from util import build_utils
from util import md5_check
def Jar(class_files, c... |
crmccreary/openerp_server | refs/heads/master | openerp/pychart/afm/Helvetica_Narrow_BoldOblique.py | 15 | # -*- coding: utf-8 -*-
# AFM font Helvetica-Narrow-BoldOblique (path: /usr/share/fonts/afms/adobe/phvbo8an.afm).
# Derived from Ghostscript distribution.
# Go to www.cs.wisc.edu/~ghost to get the Ghostcript source code.
import dir
dir.afm["Helvetica-Narrow-BoldOblique"] = (500, 500, 500, 500, 500, 500, 500, 500, 500, ... |
openearth/delft3d-gt-backend | refs/heads/master | roles/worker_dummy/files/dummy_create_config.py | 1 | import logging
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)
logger.info('STARTED: Preprocessing is started. Progress is 0%.')
logger.info('FINISHED: Preprocessing is finished. Progress is 100%.') |
skg-net/ansible | refs/heads/devel | lib/ansible/module_utils/facts/system/platform.py | 93 | # 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 ... |
phisiart/tvm | refs/heads/opengl | topi/python/topi/nn/upsampling.py | 1 | """TVM operator upsampling compute."""
from __future__ import absolute_import
import tvm
from .. import util
def upsampling(data, scale, layout="NCHW"):
"""Perform nearest neighbor upsampling on the data.
Bilinear upsampling is not supported.
Parameters
----------
data : tvm.Tensor
4-D... |
shinglyu/ns3-h264-svc | refs/heads/master | waf-tools/pkgconfig.py | 52 | # -*- mode: python; encoding: utf-8 -*-
# Gustavo Carneiro (gjamc) 2008
import Options
import Configure
import subprocess
import config_c
import sys
def configure(conf):
pkg_config = conf.find_program('pkg-config', var='PKG_CONFIG')
if not pkg_config: return
@Configure.conf
def pkg_check_modules(conf, uselib_name,... |
echanna/EdxNotAFork | refs/heads/master | lms/djangoapps/django_comment_client/middleware.py | 236 | from lms.lib.comment_client import CommentClientRequestError
from django_comment_client.utils import JsonError
import json
import logging
log = logging.getLogger(__name__)
class AjaxExceptionMiddleware(object):
"""
Middleware that captures CommentClientRequestErrors during ajax requests
and tranforms the... |
zak-k/iris | refs/heads/master | lib/iris/tests/unit/experimental/um/test_FixedLengthHeader.py | 14 | # (C) British Crown Copyright 2014 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris 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 3 of the License, or
# (at your option) any l... |
markllama/openshift-ansible | refs/heads/master | roles/openshift_facts/library/openshift_facts.py | 1 | #!/usr/bin/python
# pylint: disable=too-many-lines
# -*- coding: utf-8 -*-
# Reason: Disable pylint too-many-lines because we don't want to split up this file.
# Status: Permanently disabled to keep this module as self-contained as possible.
"""Ansible module for retrieving and setting openshift related facts"""
# py... |
jeremiahyan/odoo | refs/heads/master | addons/l10n_multilang/models/account.py | 1 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
#in this file, we mostly add the tag translate=True on existing fields that we now want to be translated
class AccountAccountTag(models.Model):
_inherit = 'account.account.tag'
... |
koobonil/Boss2D | refs/heads/master | Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/contrib/keras/python/keras/layers/merge_test.py | 52 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
MicroTrustRepos/microkernel | refs/heads/master | src/l4/pkg/python/contrib/Lib/xml/parsers/__init__.py | 1254 | """Python interfaces to XML parsers.
This package contains one module:
expat -- Python wrapper for James Clark's Expat parser, with namespace
support.
"""
|
systers/mailman | refs/heads/master | src/mailman/core/runner.py | 7 | # Copyright (C) 2001-2015 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman 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 you... |
adrn/gary | refs/heads/master | gala/dynamics/representation_nd.py | 2 | # Standard library
from collections import OrderedDict
import operator
# Third-party
import astropy.coordinates as coord
import astropy.units as u
import numpy as np
__all__ = ['NDCartesianRepresentation', 'NDCartesianDifferential']
class NDMixin(object):
def _apply(self, method, *args, **kwargs):
"""Cr... |
geminy/aidear | refs/heads/master | oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/net/data/verify_certificate_chain_unittest/generate-constrained-root-lacks-basic-constraints.py | 5 | #!/usr/bin/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.
"""Certificate chain with 1 intermediate and a trust anchor. The trust anchor
lacks the basic constraints extension, and is loaded with... |
SteveViss/readthedocs.org | refs/heads/master | readthedocs/redirects/utils.py | 5 | from django.http import HttpResponseRedirect
import logging
import re
from readthedocs.projects.models import Project
log = logging.getLogger(__name__)
def project_and_path_from_request(request, path):
if hasattr(request, 'slug'):
project_slug = request.slug
elif path.startswith('/docs/'):
... |
OCM-Lab-PUC/switch-chile | refs/heads/master | tests/__init__.py | 4 | # Copyright 2015 The Switch Authors. All rights reserved.
# Licensed under the Apache License, Version 2, which is in the LICENSE file.
|
JMaio/Askii2 | refs/heads/master | AskiiServer.py | 1 | import time
import BaseHTTPServer
from twilio.rest import TwilioRestClient
import urlparse
import urllib2
from bs4 import BeautifulSoup
import string
import WolframInterface
import ModeSelect
account_sid = "AC4f02d451f59ae0003a8cf9e6d93cc62d" # Account SID from www.twilio.com/console
auth_token = "471c7653... |
QuickClaim/Services | refs/heads/branch-3.5 | src/contrib/zkpython/src/test/acl_test.py | 148 | #!/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
# "Lic... |
redbear/micropython | refs/heads/redbear-duo | tests/bench/from_iter-3-tuple_bound.py | 101 | import bench
def test(num):
for i in iter(range(num//10000)):
l = [0] * 1000
l2 = tuple(l)
bench.run(test)
|
Justin-Yuan/Image2Music-Generator | refs/heads/master | library/jython2.5.3/Lib/logging/__init__.py | 8 | # Copyright 2001-2007 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permissio... |
40223247/2015test2-1 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/test/pystone.py | 718 | #! /usr/bin/python3.3
"""
"PYSTONE" Benchmark Program
Version: Python/1.1 (corresponds to C/1.1 plus 2 Pystone fixes)
Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013.
Translated from ADA to C by Rick Richardson.
Every method to preserve ADA-likeness ha... |
nyalldawson/QGIS | refs/heads/master | python/PyQt/PyQt5/QtNetwork.py | 45 | # -*- coding: utf-8 -*-
"""
***************************************************************************
QtNetwork.py
---------------------
Date : March 2016
Copyright : (C) 2016 by Juergen E. Fischer
Email : jef at norbit dot de
****************************... |
abgoswam/data-science-from-scratch | refs/heads/master | code-python3/multiple_regression.py | 4 | from collections import Counter
from functools import partial
from linear_algebra import dot, vector_add
from statistics import median, standard_deviation
from probability import normal_cdf
from gradient_descent import minimize_stochastic
from simple_linear_regression import total_sum_of_squares
import math, random
de... |
gnrfan/django-sequence-field | refs/heads/master | sequence_field/settings.py | 2 | # Sequence Field Settings
from django.conf import settings
from sequence_field import constants
SEQUENCE_FIELD_DEFAULT_VALUE = getattr(
settings,
'SEQUENCE_FIELD_DEFAULT_VALUE',
constants.SEQUENCE_DEFAULT_VALUE
)
SEQUENCE_FIELD_ADMIN = getattr(
settings,
'SEQUENCE_FIELD_ADMIN',
constants.SEQ... |
rebolinho/liveit.repository | refs/heads/master | plugin.video.SportsDevil/dateutil/tz/_common.py | 55 | from six import PY3
__all__ = ['tzname_in_python2']
def tzname_in_python2(namefunc):
"""Change unicode output into bytestrings in Python 2
tzname() API changed in Python 3. It used to return bytes, but was changed
to unicode strings
"""
def adjust_encoding(*args, **kwargs):
name = namefun... |
andresriancho/moto | refs/heads/master | tests/test_autoscaling/test_policies.py | 1 | import boto
from boto.ec2.autoscale.launchconfig import LaunchConfiguration
from boto.ec2.autoscale.group import AutoScalingGroup
from boto.ec2.autoscale.policy import ScalingPolicy
import sure # noqa
from moto import mock_autoscaling
def setup_autoscale_group():
conn = boto.connect_autoscale()
config = Lau... |
aurule/HiToDo | refs/heads/master | dialogs/labeledit.py | 1 | # Copyright 2013 Peter Andrews
# This file is part of HiToDo.
#
# HiToDo 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.
#
# HiToDo is... |
ChristosChristofidis/bokeh | refs/heads/master | examples/plotting/server/linked_brushing.py | 42 | # The plot server must be running
# Go to http://localhost:5006/bokeh to view this plot
import numpy as np
from bokeh.plotting import figure, gridplot, show, output_server
from bokeh.models import ColumnDataSource
output_server("linked_brushing")
N = 300
x = np.linspace(0, 4*np.pi, N)
y1 = np.sin(x)
y2 = np.cos(x)
... |
nooperpudd/pulsar | refs/heads/master | pulsar/apps/wsgi/utils.py | 5 | '''
The :mod:`pulsar.apps.wsgi.utils` module include several utilities used
by various components in the :ref:`wsgi application <apps-wsgi>`
'''
import time
import re
import textwrap
import logging
from datetime import datetime, timedelta
from email.utils import formatdate
from urllib.parse import parse_qsl
from pulsa... |
infobloxopen/infoblox-netmri | refs/heads/master | infoblox_netmri/api/broker/v3_3_0/discovery_statuses_broker.py | 12 | from ..broker import Broker
class DiscoveryStatusesBroker(Broker):
controller = "discovery_statuses"
def check_withdrawal_license(self, **kwargs):
"""Check Management Server and Managed Devices when device unlicensed with SDC license
**Inputs**
| ``api version min:`` None
... |
jwoglom/ionbot | refs/heads/master | commands/quote.py | 1 | # Copyright (C) 2013-2015 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Fox Wilson
#
# 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 ve... |
ceb8/astroquery | refs/heads/track_master | astroquery/utils/tests/test_utils.py | 1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from collections import OrderedDict
import os
import requests
import pytest
import tempfile
import textwrap
import astropy.coordinates as coord
from six.moves import urllib
import six
from astropy.io import fits
import astropy.io.votable as votable
impor... |
HonzaKral/django | refs/heads/master | django/contrib/auth/tokens.py | 433 | from datetime import date
from django.conf import settings
from django.utils import six
from django.utils.crypto import constant_time_compare, salted_hmac
from django.utils.http import base36_to_int, int_to_base36
class PasswordResetTokenGenerator(object):
"""
Strategy object used to generate and check token... |
neumerance/cloudloon2 | refs/heads/master | horizon/browsers/views.py | 11 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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 License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... |
ptisserand/ansible | refs/heads/devel | test/units/modules/remote_management/oneview/test_oneview_fc_network.py | 73 | # -*- coding: utf-8 -*-
#
# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
#
# 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 optio... |
adrpar/incubator-airflow | refs/heads/master | airflow/example_dags/example_trigger_target_dag.py | 45 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... |
Teagan42/home-assistant | refs/heads/dev | tests/components/http/test_data_validator.py | 7 | """Test data validator decorator."""
from unittest.mock import Mock
from aiohttp import web
import voluptuous as vol
from homeassistant.components.http import HomeAssistantView
from homeassistant.components.http.data_validator import RequestDataValidator
async def get_client(aiohttp_client, validator):
"""Gener... |
mlperf/training_results_v0.7 | refs/heads/master | NVIDIA/benchmarks/minigo/implementations/tensorflow/minigo/ml_perf/train_loop.py | 1 | # Copyright 2019 Google LLC
#
# 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, ... |
zfrenchee/pandas | refs/heads/master | pandas/tests/frame/test_timeseries.py | 1 | # -*- coding: utf-8 -*-
from __future__ import print_function
from datetime import datetime, time
import pytest
from numpy import nan
from numpy.random import randn
import numpy as np
from pandas import (DataFrame, Series, Index,
Timestamp, DatetimeIndex, MultiIndex,
to_date... |
cuboxi/android_external_chromium_org | refs/heads/kitkat | chrome/test/pyautolib/timer_queue.py | 80 | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import copy
import threading
import time
class TimerQueue(threading.Thread):
"""Executes timers at a given interval.
This class provides the abilit... |
sgerhart/ansible | refs/heads/maintenance_policy_module | lib/ansible/modules/windows/win_dotnet_ngen.py | 52 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Peter Mounce <public@neverrunwithscissors.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# this is a windows documentation stub. actual code lives in the .ps1
# file of the same name
ANSIBLE_METADATA ... |
Jgarcia-IAS/localizacion | refs/heads/master | openerp/addons-extra/odoo-pruebas/odoo-server/addons/report_webkit/company.py | 431 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com)
# All Right Reserved
#
# Author : Nicolas Bessi (Camptocamp)
#
# WARNING: This program as such is intended to be used by professional
# programmers who... |
mjumbewu/jokosher | refs/heads/master | Jokosher/MixerStrip.py | 3 | #
# THIS FILE IS PART OF THE JOKOSHER PROJECT AND LICENSED UNDER THE GPL. SEE
# THE 'COPYING' FILE FOR DETAILS
#
# MixerStrip.py
#
# Contains the VU widget, the buttons below it and levels,
# for an Instrument in the mixing view.
#
#------------------------------------------------------------... |
lateminer/bitcoin | refs/heads/master | test/functional/rpc_getchaintips.py | 53 | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the getchaintips RPC.
- introduce a network split
- work on chains of different lengths
- join th... |
flavour/ifrc_qa | refs/heads/master | modules/tests/asset/asset_search.py | 1 | # -*- coding: utf-8 -*-
""" Sahana Eden Asset Module Automated Tests
@copyright: 2011-2016 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to de... |
dpiers/coderang-meteor | refs/heads/master | public/jsrepl/extern/python/unclosured/lib/python2.7/pickletools.py | 134 | '''"Executable documentation" for the pickle module.
Extensive comments about the pickle protocols and pickle-machine opcodes
can be found here. Some functions meant for external use:
genops(pickle)
Generate all the opcodes in a pickle, as (opcode, arg, position) triples.
dis(pickle, out=None, memo=None, indentl... |
getsentry/sentry-heroku | refs/heads/master | setup.py | 1 | #!/usr/bin/env python
"""
sentry-heroku
=============
An extension for Sentry which adds release tracking via Heroku.
:copyright: (c) 2015 by Sentry Team, see AUTHORS for more details.
:license: Apache 2.0, see LICENSE for more details.
"""
from setuptools import setup, find_packages
install_requires = [
# 'sen... |
pratyushmittal/drf-extensions | refs/heads/master | tests_app/tests/unit/routers/nested_router_mixin/models.py | 5 | # -*- coding: utf-8 -*-
from django.db import models
class UnitNestedRouterMixinUserModel(models.Model):
name = models.CharField(max_length=10)
groups = models.ManyToManyField('UnitNestedRouterMixinGroupModel', related_name='user_groups')
class Meta:
app_label = 'tests_app'
verbose_name =... |
sugartom/tensorflow-alien | refs/heads/master | tensorflow/contrib/framework/python/framework/experimental_test.py | 112 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
pplatek/odoo | refs/heads/8.0 | addons/website_quote/controllers/__init__.py | 3646 | import main
# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4:
|
graphite-project/carbon | refs/heads/master | lib/carbon/tests/test_log.py | 5 | # -*- coding: utf-8 -*-
from unittest import TestCase
from os import path
from twisted.python.log import addObserver, removeObserver
from carbon import log
try:
from tempfile import TemporaryDirectory
except ImportError:
from backports.tempfile import TemporaryDirectory
class CarbonLogFileTest(TestCase):
... |
tommyip/zulip | refs/heads/master | zerver/lib/emoji.py | 1 | import os
import re
import ujson
from django.utils.translation import ugettext as _
from typing import Optional, Tuple
from zerver.lib.request import JsonableError
from zerver.lib.storage import static_path
from zerver.lib.upload import upload_backend
from zerver.models import Reaction, Realm, RealmEmoji, UserProfile... |
kaichogami/sympy | refs/heads/master | sympy/functions/special/beta_functions.py | 111 | from __future__ import print_function, division
from sympy.core.function import Function, ArgumentIndexError
from sympy.functions.special.gamma_functions import gamma, digamma
###############################################################################
############################ COMPLETE BETA FUNCTION #########... |
mrooney/wxbanker | refs/heads/master | wxbanker/lib/pubsub/core/arg1/publisher.py | 8 | '''
Mixin for publishing messages to a topic's listeners. This will be
mixed into topicobj.Topic so that a user can use a Topic object to
send a message to the topic's listeners via a publish() method.
:copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved.
:license: BSD, see LICENSE.txt for details... |
dslackw/slpkg | refs/heads/master | slpkg/load.py | 1 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# load.py file is part of slpkg.
# Copyright 2014-2021 Dimitris Zlatanidis <d.zlatanidis@gmail.com>
# All rights reserved.
# Slpkg is a user-friendly package manager for Slackware installations
# https://gitlab.com/dslackw/slpkg
# Slpkg is free software: you can redistrib... |
cocoonlife/pubnub-python-mobile-push | refs/heads/master | common/unit-test-async.py | 1 | ## www.pubnub.com - PubNub Real-time push service in the cloud.
# coding=utf8
## PubNub Real-time Push APIs and Notifications Framework
## Copyright (c) 2010 Stephen Blum
## http://www.pubnub.com/
## -----------------------------------
## PubNub 3.1 Real-time Push Cloud API
## -----------------------------------
imp... |
lmcro/webserver | refs/heads/master | qa/213-Post-Chunked1.py | 8 | import random
import string
from base import *
from util import *
FILE = "Chunked_post_tiny.php"
MAGIC = 'Alvaro_alobbs.com'
SCRIPT = """<?php
echo "Testing Chunked encoded POSTs\n";
echo $_POST['var'] . "\n";
echo "The end\n";
?>"""
class Test (TestBase):
def __init__ (self):
TestBase.__init__ (s... |
NEricN/RobotCSimulator | refs/heads/master | Python/App/Lib/test/test_compileall.py | 45 | import compileall
import imp
import os
import py_compile
import shutil
import struct
import tempfile
from test import test_support
import unittest
class CompileallTests(unittest.TestCase):
def setUp(self):
self.directory = tempfile.mkdtemp()
self.source_path = os.path.join(self.directory, '_test.... |
rowemoore/odoo | refs/heads/8.0 | addons/mail/mail_thread.py | 111 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
neikusc/FEMInc | refs/heads/master | FEMInc_interview_questions.py | 2 | import nltk
import ner
import re
import json
import os
import urllib2
from urllib import urlencode
from pprint import pprint
# open the contents
with open('CodeAssignmentDataSet.json') as json_file:
json_data = json.load(json_file)
json_file.close()
pprint(json_data[0:4])
# The OMDB API's constant fo... |
kirpit/couchbasekit | refs/heads/master | example/samples/book.py | 1 | #! /usr/bin/env python
import datetime
from couchbasekit import Document, Connection
Connection.auth('couchbasekit_samples', 'couchbasekit')
class Book(Document):
__bucket_name__ = 'couchbasekit_samples'
doc_type = 'book'
structure = {
'title': unicode,
'published_at': datetime.date,
... |
neiudemo1/django | refs/heads/master | tests/template_tests/syntax_tests/test_spaceless.py | 521 | from django.test import SimpleTestCase
from ..utils import setup
class SpacelessTagTests(SimpleTestCase):
@setup({'spaceless01': "{% spaceless %} <b> <i> text </i> </b> {% endspaceless %}"})
def test_spaceless01(self):
output = self.engine.render_to_string('spaceless01')
self.assertEqu... |
mollstam/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/boto-2.38.0/boto/sts/__init__.py | 131 | # Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.
#
# 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, includin... |
darkleons/lama | refs/heads/master | addons/note_pad/__openerp__.py | 312 | # -*- 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... |
drowsy810301/NTHUOJ_web | refs/heads/master | vjudge/status.py | 1 | """
The MIT License (MIT)
Copyright (c) 2014 NTHUOJ team
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, ... |
dhamaniasad/mythbox | refs/heads/master | resources/lib/twisted/twisted/scripts/__init__.py | 81 |
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
#
# $Id: __init__.py,v 1.1 2002/03/18 23:33:48 jh Exp $
__doc__ = '''
Subpackage containing the modules that implement the command line tools.
Note that these are imported by script stubs generated by "setup.py".
'''
|
rolandpoulter/RackHD | refs/heads/master | test/tests/api/redfish_1_0/account_service_tests.py | 15 | from config.redfish1_0_config import *
from modules.logger import Log
from modules.redfish_auth import Auth
from on_http_redfish_1_0 import RedfishvApi as redfish
from on_http_redfish_1_0 import rest
from datetime import datetime
from proboscis.asserts import assert_equal
from proboscis.asserts import assert_false
from... |
SKA-ScienceDataProcessor/integration-prototype | refs/heads/master | sip/execution_control/alarms/prometheus/alarm_receiver/app/app.py | 1 | # -*- coding: utf-8 -*-
"""Proof of concept alarm handler."""
import logging
import time
import json
from flask import request
from flask_api import FlaskAPI
from kafka import KafkaProducer
APP = FlaskAPI(__name__)
logging.basicConfig(level=logging.INFO)
# This sleep is needed to give kafka time to start up.
time.s... |
aelawson/snowranger | refs/heads/master | chatbot/main.py | 5 | from client import *
from Bot import *
from IrcEndpoint import *
import FirebaseAPI
import Boston311
from datetime import datetime, timedelta
bot = None
def main():
CreateBot()
#ConnectToIRC()
#FB_Test()
#ConnectToFacebook()
B311Test()
while 1:
pass
def CreateBot():
global bot
... |
EvgeneOskin/termius-cli | refs/heads/master | termius/core/storage/__init__.py | 2 | # -*- coding: utf-8 -*-
"""Module for Application storage."""
import logging
from collections import namedtuple
from ..signals import (
pre_create_instance, post_create_instance,
pre_update_instance, post_update_instance,
pre_delete_instance, post_delete_instance,
)
from .idgenerators import UUIDGenerator
f... |
simudream/PyDev.Debugger | refs/heads/development | pydev_run_in_console.py | 47 |
from pydevconsole import *
import pydev_imports
from pydevd_utils import save_main_module
def run_file(file, globals=None, locals=None):
if os.path.isdir(file):
new_target = os.path.join(file, '__main__.py')
if os.path.isfile(new_target):
file = new_target
if globals is None:
... |
hchen1202/django-react | refs/heads/master | virtualenv/lib/python3.6/site-packages/django/db/backends/signals.py | 1430 | from django.dispatch import Signal
connection_created = Signal(providing_args=["connection"])
|
gangadharkadam/v6_erp | refs/heads/master | erpnext/setup/doctype/company/test_company.py | 65 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
test_ignore = ["Account", "Cost Center"]
import frappe
import unittest
class TestCompany(unittest.TestCase):
pass
test_records = frappe.get_test_re... |
pombredanne/algos-urv | refs/heads/master | gdata/auth.py | 190 | #!/usr/bin/python
#
# Copyright (C) 2007 - 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
jmcarbo/openerp7 | refs/heads/master | openerp/addons/l10n_cr/__init__.py | 438 | # -*- encoding: utf-8 -*-
##############################################################################
#
# __init__.py
# l10n_cr_account
# First author: Carlos Vásquez <carlos.vasquez@clearcorp.co.cr> (ClearCorp S.A.)
# Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.... |
DouglasHeriot/pjproject | refs/heads/master | tests/pjsua/scripts-sendto/200_ice_success_3.py | 22 | # $Id$
import inc_sip as sip
import inc_sdp as sdp
sdp = \
"""
v=0
o=- 0 0 IN IP4 127.0.0.1
s=pjmedia
c=IN IP4 127.0.0.1
t=0 0
m=audio 4000 RTP/AVP 0 101
a=ice-ufrag:1234
a=ice-pwd:5678
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=candidate:XX 1 UDP 1234 127.0.0.1 4000 typ host
a... |
AttiJeong98/Elf-Kernel_M250S_JB | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | # Core.py - Python extension for perf script, core functions
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
from collections import defaultdict
def aut... |
ASinanSaglam/westpa | refs/heads/master | lib/wwmgr/work_managers/zeromq/worker.py | 3 | '''
Created on May 29, 2015
@author: mzwier
'''
import sys
import logging
from _ast import Break
log = logging.getLogger(__name__)
from core import ZMQCore, Message, ZMQWMTimeout, PassiveMultiTimer, Task, Result, TIMEOUT_MASTER_BEACON
import threading, multiprocessing, os, signal
from contextlib import contextmanag... |
wwj718/ANALYSE | refs/heads/master | common/lib/xmodule/xmodule/discussion_module.py | 28 | from pkg_resources import resource_string
from xmodule.x_module import XModule
from xmodule.raw_module import RawDescriptor
from xmodule.editing_module import MetadataOnlyEditingDescriptor
from xblock.fields import String, Scope
from uuid import uuid4
# Make '_' a no-op so we can scrape strings
_ = lambda text: text
... |
w1ll1am23/home-assistant | refs/heads/dev | tests/components/group/conftest.py | 6 | """group conftest."""
from tests.components.light.conftest import mock_light_profiles # noqa: F401
|
spotify/luigi | refs/heads/master | test/contrib/mysqldb_test.py | 2 | from luigi.tools.range import RangeDaily
import mock
import luigi.contrib.mysqldb
import datetime
from helpers import unittest
import pytest
def datetime_to_epoch(dt):
td = dt - datetime.datetime(1970, 1, 1)
return td.days * 86400 + td.seconds + td.microseconds / 1E6
class MockMysqlCursor(mock.Mock):
... |
saurabh6790/omni-apps | refs/heads/master | selling/doctype/sales_bom_item/__init__.py | 37694 | from __future__ import unicode_literals
|
karrrt/scale | refs/heads/master | lib/python2.7/site-packages/setuptools/command/build_ext.py | 177 | from distutils.command.build_ext import build_ext as _du_build_ext
from distutils.file_util import copy_file
from distutils.ccompiler import new_compiler
from distutils.sysconfig import customize_compiler
from distutils.errors import DistutilsError
from distutils import log
import os
import sys
import itertools
from s... |
nealedj/djangae | refs/heads/master | djangae/indexing.py | 3 | import logging
import yaml
import os
import datetime
from djangae.sandbox import allow_mode_write
from django.conf import settings
_special_indexes = {}
_last_loaded_time = None
MAX_COLUMNS_PER_SPECIAL_INDEX = getattr(settings, "DJANGAE_MAX_COLUMNS_PER_SPECIAL_INDEX", 3)
CHARACTERS_PER_COLUMN = [31, 44, 54, 63, 71, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.