repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
hopshadoop/hops-tensorflow | refs/heads/master | yarntf/examples/slim/nets/nets_factory.py | 6 | # 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 applicable ... |
emon10005/sympy | refs/heads/master | sympy/simplify/hyperexpand.py | 62 | """
Expand Hypergeometric (and Meijer G) functions into named
special functions.
The algorithm for doing this uses a collection of lookup tables of
hypergeometric functions, and various of their properties, to expand
many hypergeometric functions in terms of special functions.
It is based on the following paper:
... |
Nexenta/cinder | refs/heads/master | cinder/tests/unit/scheduler/test_scheduler.py | 1 | # 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 compliance with the License. You may obtain
# a ... |
Lekanich/intellij-community | refs/heads/master | python/helpers/python-skeletons/lettuce/__init__.py | 70 | # coding=utf-8
__author__ = 'Ilya.Kazakevich'
|
fengbaicanhe/intellij-community | refs/heads/master | python/testData/codeInsight/controlflow/listcomp.py | 83 | [(x, y) for k, v in params.items()
if k
for x, y in v
if x > y]
|
wanghe4096/website | refs/heads/master | website/models.py | 1 | from __future__ import unicode_literals
from django.db import models
from django.conf import settings
from django.contrib.auth.models import User
import datetime
# Create your models here.
def datetime_now():
return datetime.datetime.now()
class Organization(models.Model):
organization_name = models.CharF... |
mpihlak/skytools-dev | refs/heads/master | python/pgq/__init__.py | 1 | """PgQ framework for Python."""
__pychecker__ = 'no-miximport'
import pgq.event
import pgq.consumer
import pgq.remoteconsumer
import pgq.producer
import pgq.ticker
import pgq.maint
import pgq.status
import pgq.cascade
import pgq.cascade.nodeinfo
import pgq.cascade.admin
import pgq.cascade.consumer
import pgq.cascad... |
inim4/googletest | refs/heads/master | test/gtest_xml_outfiles_test.py | 2526 | #!/usr/bin/env python
#
# Copyright 2008, 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... |
exocad/exotrac | refs/heads/master | trac/admin/tests/console.py | 2 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2004-2013 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consi... |
largelymfs/MTMSWord2Vec | refs/heads/master | adapter.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: largelyfs
# @Date: 2015-02-24 10:58:11
# @Last Modified by: largelyfs
# @Last Modified time: 2015-02-27 16:34:17
#convert the MS-word2vec to Word2vec model
def convert(input, output):
with open(input) as fin, open(output,"w") as fout:
print >>fout, fin.r... |
utecuy/edx-platform | refs/heads/master | lms/djangoapps/support/tests/test_refund.py | 52 | """
Tests for refunds on the support dashboard
DEPRECATION WARNING:
This test suite is deliberately separate from the other view tests
so we can easily deprecate it once the transition from shoppingcart
to the E-Commerce service is complete.
"""
import datetime
from django.test.client import Client
from course_mode... |
GeodesicCarbon/protopaja-sick | refs/heads/master | src/rosserial_embeddedlinux/src/examples/ExampleServiceClient/exampleService.py | 61 | #!/usr/bin/env python
"""
Sample code to use with ServiceClient.pde
"""
import roslib; roslib.load_manifest("rosserial_arduino")
import rospy
from rosserial_arduino.srv import *
def callback(req):
print "The arduino is calling! Please send it a message:"
t = TestResponse()
t.output = raw_input()
re... |
hughsie/PackageKit | refs/heads/master | contrib/fix_translations.py | 5 | #!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1+
import sys
import os
import subprocess
def _do_msgattrib(fn):
argv = [
'msgattrib',
'--no-location',
'--translated',
'--no-wrap',
'--sort-output',
fn,
'--output-file=' + fn,
]
ret = subprocess.... |
rdegraaf/dyphal | refs/heads/master | tools/DyphalGenerator.py | 1 | #!/usr/bin/python3
"""Server-side data generator for Dyphal, the Dynamic Photo Album.
Copyright (c) Rennie deGraaf, 2005-2017.
DyphalGenerator is a tool to create photo albums to display using
Dyphal. It can import metadata from a variety of embedded photo tags
(EXIF, IPTC, etc.) and it understands catalog files c... |
JulienMcJay/eclock | refs/heads/master | windows/Python27/Lib/site-packages/Cython/Plex/__init__.py | 135 | #=======================================================================
#
# Python Lexical Analyser
#
#=======================================================================
"""
The Plex module provides lexical analysers with similar capabilities
to GNU Flex. The following classes and functions are exported;
see t... |
ktan2020/legacy-automation | refs/heads/master | win/Lib/test/test_popen.py | 10 | #! /usr/bin/env python
"""Basic tests for os.popen()
Particularly useful for platforms that fake popen.
"""
import unittest
from test import test_support
import os, sys
# Test that command-lines get down as we expect.
# To do this we execute:
# python -c "import sys;print sys.argv" {rest_of_commandl... |
jaywink/diaspora-hub | refs/heads/master | config/production.py | 2 | '''
Production Configurations
'''
from .base import * # noqa
# SECRET CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
# Raises ImproperlyConfigured exception if DJANGO_SECRET_KEY not in os.environ
SEC... |
kingland/go-v8 | refs/heads/master | v8-3.28/build/gyp/test/win/gyptest-link-debug-info.py | 344 | #!/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 sure debug info setting is extracted properly.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = TestGyp.TestGy... |
be-cloud-be/horizon-addons | refs/heads/9.0 | server/addons/website_partner/__init__.py | 616 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import models
import controllers
|
mt2d2/servo | refs/heads/master | python/mach/mach/test/test_logger.py | 128 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, unicode_literals
import logging
import time
import unittest
from mach.logging ... |
byt3bl33d3r/Empire | refs/heads/master | lib/modules/powershell/situational_awareness/network/powerview/get_domain_policy.py | 4 | from lib.common import helpers
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Get-DomainPolicyData',
'Author': ['@harmj0y','@DisK0nn3cT','@OrOneEqualsOne'],
'Description': ('Returns the default domain or DC policy for a given domain or ... |
benschmaus/catapult | refs/heads/master | third_party/gsutil/gslib/tests/__init__.py | 38 | # -*- coding: utf-8 -*-
# Copyright 2013 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 require... |
denisenkom/django | refs/heads/master | django/contrib/staticfiles/handlers.py | 106 | from django.conf import settings
from django.core.handlers.base import get_path_info
from django.core.handlers.wsgi import WSGIHandler
from django.utils.six.moves.urllib.parse import urlparse
from django.utils.six.moves.urllib.request import url2pathname
from django.contrib.staticfiles import utils
from django.contrib... |
bOOm-X/spark | refs/heads/master | python/docs/epytext.py | 85 | import re
RULES = (
(r"<(!BLANKLINE)[\w.]+>", r""),
(r"L{([\w.()]+)}", r":class:`\1`"),
(r"[LC]{(\w+\.\w+)\(\)}", r":func:`\1`"),
(r"C{([\w.()]+)}", r":class:`\1`"),
(r"[IBCM]{([^}]+)}", r"`\1`"),
('pyspark.rdd.RDD', 'RDD'),
)
def _convert_epytext(line):
"""
>>> _convert_epytext("L{A}... |
zerc/django | refs/heads/master | tests/template_tests/filter_tests/test_striptags.py | 324 | from django.template.defaultfilters import striptags
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class StriptagsTests(SimpleTestCase):
@setup({'striptags01': '{{ a|striptags }} {{ b|striptags }}'})
def test_striptags01(self):
output ... |
evanccnyc/ansible | refs/heads/devel | test/units/parsing/__init__.py | 7690 | # (c) 2012-2014, Michael DeHaan <[email protected]>
#
# 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... |
lwerdna/chess | refs/heads/master | BpgnParser.py | 1 | #!/usr/bin/python
# Copyright 2012, 2013 Andrew Lamoureux
#
# This file is a part of FunChess
#
# FunChess 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... |
zlatinski/p-android-omap-3.4-new-ion-topic-sync-dma-buf-fence2 | refs/heads/p-android-omap-3.4-new-ion | scripts/tracing/draw_functrace.py | 14679 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <[email protected]>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... |
bplower/cssef | refs/heads/refactor | WebInterface/WebInterface/modules/organization/urls.py | 1 | from django.conf.urls import patterns
from django.conf.urls import url
from WebInterface.modules.organization import views
urlpatterns = patterns('',
url(r'^(?P<organizationId>\d+)/$', views.home),
url(r'^(?P<organizationId>\d+)/home/$', views.home),
url(r'^(?P<organizationId>\d+)/members/$', views.memb... |
glwu/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/subprocess.py | 43 | # subprocess - Subprocesses with accessible I/O streams
#
# For more information about this module, see PEP 324.
#
# Copyright (c) 2003-2005 by Peter Astrand <[email protected]>
#
# Licensed to PSF under a Contributor Agreement.
# See http://www.python.org/2.4/license for licensing details.
r"""subprocess - Subpr... |
flashycud/timestack | refs/heads/master | django/__init__.py | 76 | VERSION = (1, 3, 0, 'beta', 1)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = '%s %s... |
jacshfr/mozilla-bedrock | refs/heads/master | bedrock/newsletter/tests/test_misc.py | 25 | import mock
from django.test.utils import override_settings
from basket import BasketException, errors
from bedrock.mozorg.tests import TestCase
from bedrock.newsletter.utils import get_newsletters, get_languages_for_newsletters
from bedrock.newsletter.tests import newsletters
cache_mock = mock.Mock()
cache_mock.ge... |
leiferikb/bitpop | refs/heads/master | src/third_party/pywebsocket/src/test/test_endtoend.py | 449 | #!/usr/bin/env python
#
# Copyright 2012, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
sahiljain/catapult | refs/heads/master | third_party/gsutil/third_party/boto/boto/cacerts/__init__.py | 260 | # Copyright 2010 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, merg... |
romain-dartigues/ansible | refs/heads/devel | test/units/modules/network/f5/test_bigip_qkview.py | 21 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 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
import os
import json
import pytest
import sys
if sys.version_info < (2, ... |
jermowery/xos | refs/heads/master | xos/core/models/__init__.py | 1 | from .plcorebase import PlCoreBase,PlCoreBaseManager,PlCoreBaseDeletionManager,PlModelMixIn
from .project import Project
from .singletonmodel import SingletonModel
from .service import Service, Tenant, TenantWithContainer, CoarseTenant, ServicePrivilege, TenantRoot, TenantRootPrivilege, TenantRootRole, TenantPrivilege,... |
jhona22baz/blog-flask | refs/heads/master | python2.7/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/compat.py | 2942 | ######################## BEGIN LICENSE BLOCK ########################
# Contributor(s):
# Ian Cordasco - port to Python
#
# 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
# versio... |
takis/odoo | refs/heads/8.0 | openerp/tools/test_reports.py | 337 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... |
aaldaber/owid-grapher | refs/heads/master | importer/edstats_importer.py | 1 | import sys
import os
import hashlib
import json
import logging
import requests
import unidecode
import shutil
import time
import zipfile
sys.path.insert(1, os.path.join(sys.path[0], '..'))
import grapher_admin.wsgi
from openpyxl import load_workbook
from grapher_admin.models import Entity, DatasetSubcategory, DatasetCa... |
iascchen/eggduino-station | refs/heads/master | tests/paramsDemo.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import argparse
CMD_T = 'AB010105'
CMD_H = 'AB020105'
CMD_Q = 'AB030101'
CMD_T_STOP = 'AB0100'
CMD_H_STOP = 'AB0200'
CMD_Q_STOP = 'AB0300'
init_cmds = [CMD_T_STOP, CMD_H_STOP, CMD_Q_STOP, CMD_T, CMD_H, CMD_Q]
parser = argparse.ArgumentParser(description='For example AB0100... |
ramanajee/phantomjs | refs/heads/master | src/qt/qtwebkit/Source/ThirdParty/gtest/test/gtest_env_var_test.py | 233 | #!/usr/bin/env python
#
# Copyright 2008, 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... |
dago/ansible-modules-core | refs/heads/devel | cloud/openstack/quantum_subnet.py | 45 | #!/usr/bin/python
#coding: utf-8 -*-
# (c) 2013, Benno Joy <[email protected]>
#
# 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 ... |
ProgVal/Limnoria-test | refs/heads/debug-pypy-sqlite | plugins/PluginDownloader/test.py | 3 | ###
# Copyright (c) 2011, Valentin Lorentz
# 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 conditi... |
h4r5h1t/django-hauthy | refs/heads/hauthy | django/contrib/gis/geos/geometry.py | 82 | """
This module contains the 'base' GEOSGeometry object -- all GEOS Geometries
inherit from this object.
"""
from __future__ import unicode_literals
# Python, ctypes and types dependencies.
from ctypes import addressof, byref, c_double
from django.contrib.gis.gdal.error import SRSException
from django.contrib.gis.g... |
zhangjunli177/sahara | refs/heads/master | sahara/topology/topology_helper.py | 4 | # Copyright (c) 2013 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... |
shaanlan/youtube-dl | refs/heads/master | youtube_dl/extractor/drtv.py | 112 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
ExtractorError,
parse_iso8601,
)
class DRTVIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?dr\.dk/tv/se/(?:[^/]+/)*(?P<id>[\da-z-]+)(?:[/#?]|$)'
_TEST = {
'url': 'https://www.... |
holyangel/LGE_G3 | refs/heads/Redo | Documentation/target/tcm_mod_builder.py | 4981 | #!/usr/bin/python
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
#
# Copyright (c) 2010 Rising Tide Systems
# Copyright (c) 2010 Linux-iSCSI.org
#
# Author: [email protected]
#
import os, sys
import subprocess as sub
import string
import re
import optparse
tcm_dir = ""
fabric_ops... |
spirrello/spirrello-pynet-work | refs/heads/master | applied_python/lib/python2.7/site-packages/pylint/test/input/func_block_disable_msg.py | 12 | # pylint: disable=C0302,bare-except,print-statement
"""pylint option block-disable"""
from __future__ import print_function
class Foo(object):
"""block-disable test"""
def __init__(self):
self._test = "42"
def meth1(self, arg):
"""this issues a message"""
print(self)
def meth... |
HBEE/odoo-addons | refs/heads/8.0 | sale_order_mail_product_attachment/sale.py | 3 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp import netsvc
from openerp.osv import... |
destijl/forensicartifacts | refs/heads/master | frontend/thirdparty/networkx-1.9/networkx/generators/line.py | 8 | # -*- coding: ascii -*-
"""
Line graph algorithms.
Undirected Graphs
-----------------
For an undirected graph G without multiple edges, each edge can be written as
a set {u,v}. Its line graph L has the edges of G as its nodes. If x and y
are two nodes in L, then {x,y} is an edge in L if and only if the intersection
... |
chrish42/pylearn | refs/heads/master | pylearn2/utils/tests/test_general.py | 45 | """
Tests for pylearn2.utils.general functions.
"""
from pylearn2.utils import contains_nan, contains_inf, isfinite
import numpy as np
def test_contains_nan():
"""
Tests that pylearn2.utils.contains_nan correctly
identifies `np.nan` values in an array.
"""
arr = np.random.random(100)
assert no... |
felliott/osf.io | refs/heads/develop | api_tests/files/views/test_file_detail.py | 6 | from __future__ import unicode_literals
import itsdangerous
import mock
import pytest
import pytz
from django.utils import timezone
from addons.base.utils import get_mfr_url
from addons.github.models import GithubFileNode
from addons.osfstorage import settings as osfstorage_settings
from addons.osfstorage.listeners i... |
avanov/django | refs/heads/master | tests/aggregation/tests.py | 14 | from __future__ import unicode_literals
import datetime
import re
from decimal import Decimal
from django.core.exceptions import FieldError
from django.db import connection
from django.db.models import (
F, Aggregate, Avg, Count, DecimalField, DurationField, FloatField, Func,
IntegerField, Max, Min, Sum, Valu... |
frankxu2004/WeixinCrawler | refs/heads/master | crawler/bs4/builder/_htmlparser.py | 412 | """Use the HTMLParser library to parse HTML files that aren't too bad."""
__all__ = [
'HTMLParserTreeBuilder',
]
from HTMLParser import (
HTMLParser,
HTMLParseError,
)
import sys
import warnings
# Starting in Python 3.2, the HTMLParser constructor takes a 'strict'
# argument, which we'd like to s... |
payamsm/django-allauth | refs/heads/master | allauth/socialaccount/providers/tumblr/__init__.py | 85 | __author__ = 'jshedd'
|
amvtek/Djam | refs/heads/master | djam/utils.py | 1 | # -*- coding: utf-8 -*-
"""
djam.utils
~~~~~~~~~~
:email: [email protected]
"""
from __future__ import unicode_literals, division
import os, re, hashlib, threading, string
from binascii import hexlify
from django.conf import settings
from django.utils import six
class SharedStateBase(object):
"Allow ... |
julienr/vispy | refs/heads/master | vispy/geometry/parametric.py | 21 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
import numpy as np
f... |
nacc/cobbler | refs/heads/master | tests/profile_test.py | 3 | """
new_profile.py defines a set of methods designed for testing Cobbler
profiles.
Copyright 2009, Red Hat, Inc and Others
Steve Salevan <[email protected]>
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 Fou... |
andrewgailey/robogen | refs/heads/master | robogen/rgkit/gamestate.py | 2 | from __future__ import division
import random
from collections import defaultdict
from rgkit import rg
from rgkit.settings import settings, AttrDict
class GameState(object):
def __init__(self, use_start=False, turn=0,
next_robot_id=0, seed=None, symmetric=True):
if seed is None:
... |
0x0all/SASM | refs/heads/master | Windows/MinGW64/opt/lib/python2.7/encodings/gb18030.py | 816 | #
# gb18030.py: Python Unicode Codec for GB18030
#
# Written by Hye-Shik Chang <[email protected]>
#
import _codecs_cn, codecs
import _multibytecodec as mbc
codec = _codecs_cn.getcodec('gb18030')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEncoder(mbc.MultibyteInc... |
googleapis/googleapis-gen | refs/heads/master | google/cloud/documentai/v1beta2/documentai-v1beta2-py/google/cloud/documentai/__init__.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2020 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... |
xuweiliang/Codelibrary | refs/heads/master | nova/network/rpcapi.py | 4 | # Copyright 2013, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... |
samthor/intellij-community | refs/heads/master | python/testData/quickFixes/RenameElementQuickFixTest/pep8Function_after.py | 62 | def a(): pass |
ausarbluhd/EternalLLC | refs/heads/master | scripts/mallory/src/config_if.py | 1 | """
This module interfaces with the getifaddrs libc function to return a list
of ethernet devices in a reliable fashion. This should be portable on
any POSIX compliant system. Only tested on Linux.
(grepping ifconfig is nasty)
"""
from ctypes import *
import subprocess
# Structures as defined by:
# http://www.kerne... |
pk400/catering | refs/heads/master | myvenv/lib/python3.4/site-packages/django/conf/locale/zh_Hans/formats.py | 1008 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'Y年n月j日' # 2016年9月5... |
ortylp/scipy | refs/heads/master | scipy/fftpack/basic.py | 56 | """
Discrete Fourier Transforms - basic.py
"""
# Created by Pearu Peterson, August,September 2002
from __future__ import division, print_function, absolute_import
__all__ = ['fft','ifft','fftn','ifftn','rfft','irfft',
'fft2','ifft2']
from numpy import zeros, swapaxes
import numpy
from . import _fftpack
im... |
rmoorman/feedhq | refs/heads/master | feedhq/feeds/utils.py | 2 | # -*- coding: utf-8 -*-
import datetime
from django.utils import timezone
from rache import job_key, job_details
from .. import __version__
from ..utils import get_redis_connection
USER_AGENT = (
'FeedHQ/%s (https://github.com/feedhq/feedhq; %%s; https://github.com/'
'feedhq/feedhq/wiki/fetcher; like FeedF... |
tjackiw/zaproxy | refs/heads/develop | python/api/src/zapv2/authentication.py | 15 | # Zed Attack Proxy (ZAP) and its related class files.
#
# ZAP is an HTTP/HTTPS proxy for assessing web application security.
#
# Copyright 2015 the ZAP development team
#
# 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... |
wang1986one/pyo | refs/heads/master | pyolib/server.py | 11 | # -*- coding: utf-8 -*-
"""
Copyright 2009-2015 Olivier Belanger
This file is part of pyo, a python module to help digital signal
processing script creation.
pyo 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 Founda... |
Jorge-Rodriguez/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/rds_instance_facts.py | 27 | #!/usr/bin/python
# Copyright (c) 2017, 2018 Michael De La Rue
# Copyright (c) 2017, 2018 Will Thames
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'communi... |
Fedik/gramps | refs/heads/master | gramps/gui/widgets/fanchart2way.py | 5 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001-2007 Donald N. Allingham, Martin Hawlisch
# Copyright (C) 2009 Douglas S. Blank
# Copyright (C) 2012 Benny Malengier
# Copyright (C) 2014 Bastien Jacquet
#
# This program is free software; you can redistribute it and/or modify
# it under the term... |
zjh3123629/qt210-linux | refs/heads/master | tools/perf/scripts/python/sctop.py | 11180 | # system call top
# (c) 2010, Tom Zanussi <[email protected]>
# Licensed under the terms of the GNU GPL License version 2
#
# Periodically displays system-wide system call totals, broken down by
# syscall. If a [comm] arg is specified, only syscalls called by
# [comm] are displayed. If an [interval] arg is specified,... |
shayan72/Courseware | refs/heads/master | Courseware/urls.py | 1 | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'Courseware.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^courses/', include('course.urls')),
url(r'^manage/', ... |
SaptakS/pune.pycon.org | refs/heads/master | pycon/sponsorship/tests/test_models.py | 5 | import datetime
from django.conf import settings
from django.core.exceptions import ValidationError
from django.test import TestCase
from symposion.conference.models import current_conference, Conference
from ..models import Benefit, Sponsor, SponsorBenefit, SponsorLevel
from .factories import SponsorFactory
class... |
unusedPhD/amoco | refs/heads/release | amoco/system/msp430.py | 6 | # -*- coding: utf-8 -*-
# This code is part of Amoco
# Copyright (C) 2014 Axel Tillequin ([email protected])
# published under GPLv2 license
from amoco.system.core import *
from amoco.arch.msp430 import cpu
#----------------------------------------------------------------------------
class MSP430(CoreExec):
de... |
edx/django-rest-framework | refs/heads/master | tests/test_authentication.py | 3 | # coding: utf-8
from __future__ import unicode_literals
import base64
import pytest
from django.conf.urls import include, url
from django.contrib.auth.models import User
from django.db import models
from django.http import HttpResponse
from django.test import TestCase, override_settings
from django.utils import six
... |
smmribeiro/intellij-community | refs/heads/master | python/testData/optimizeImports/multilineImportElementsInCombinedFromImports.after.py | 30 | from collections import deque as d, OrderedDict as od, namedtuple # comment 1; comment 2
print(d, od, namedtuple)
|
ESOedX/edx-platform | refs/heads/master | lms/djangoapps/verify_student/migrations/0007_idverificationaggregate.py | 2 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-12 15:22
from __future__ import absolute_import, unicode_literals
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
from django.conf import settings
from django.db import migrations, models
class Migration(migratio... |
JCROM-Android/jcrom_external_chromium_org | refs/heads/kitkat | media/tools/constrained_network_server/traffic_control_test.py | 187 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""End-to-end tests for traffic control library."""
import os
import re
import sys
import unittest
import traffic_control
class... |
payeezy/payeezy-deprecated | refs/heads/master | python/Dependancy/requests-master/requests/packages/chardet/hebrewprober.py | 2928 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#... |
MonicaHsu/truvaluation | refs/heads/master | venv/lib/python2.7/plat-mac/FrameWork.py | 40 | "A sort of application framework for the Mac"
DEBUG=0
from warnings import warnpy3k
warnpy3k("In 3.x, the FrameWork module is removed.", stacklevel=2)
import MacOS
import traceback
from Carbon.AE import *
from Carbon.AppleEvents import *
from Carbon.Ctl import *
from Carbon.Controls import *
from Carbon.Dlg import ... |
Mlieou/lXXtcode | refs/heads/master | leetcode/python/ex_531.py | 3 | class Solution(object):
def findLonelyPixel(self, picture):
"""
:type picture: List[List[str]]
:rtype: int
"""
if not picture or not picture[0]: return 0
row = [0] * len(picture)
col = [0] * len(picture[0])
for i in range(len(picture)):
f... |
neumodisch/RIOT | refs/heads/master | dist/tools/pyterm/testbeds/testbeds.py | 100 | #!/usr/bin/python2
# -*- coding: utf-8 -*-
# Copyright (C) 2014 Philipp Rosenkranz <[email protected]>
#
# 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... |
MihaiMoldovanu/ansible | refs/heads/devel | lib/ansible/plugins/terminal/asa.py | 28 | #
# (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is d... |
victorbriz/rethinkdb | refs/heads/next | scripts/VirtuaBuild/smoke_test.py | 46 | #!/usr/bin/env python
# Copyright 2010-2012 RethinkDB, all rights reserved.
# usage: ./smoke_test.py --mode OS_NAME --num-keys SOME_NUMBER_HERE
import time, sys, os, socket, random, time, signal, subprocess
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir, 'test',... |
Ichag/openerp-server | refs/heads/master | openerp/tools/amount_to_text.py | 31 | # -*- 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... |
Tivix/wagtail | refs/heads/master | wagtail/wagtailadmin/templatetags/wagtailadmin_tags.py | 4 | from __future__ import unicode_literals
from django.conf import settings
from django import template
from django.contrib.humanize.templatetags.humanize import intcomma
from django.template.defaultfilters import stringfilter
from wagtail.wagtailcore import hooks
from wagtail.wagtailcore.models import get_navigation_me... |
fillycheezstake/MissionPlanner | refs/heads/master | Lib/ctypes/_endian.py | 51 | ######################################################################
# This file should be kept compatible with Python 2.3, see PEP 291. #
######################################################################
import sys
from ctypes import *
_array_type = type(c_int * 3)
def _other_endian(typ):
"""Ret... |
talau/ns-3.18-wifi-queue-red | refs/heads/master | .waf-1.7.11-edc6ccb516c5e3f9b892efc9f53a610f/waflib/Tools/c_tests.py | 330 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
from waflib import Task
from waflib.Configure import conf
from waflib.TaskGen import feature,before_method,after_method
import sys
LIB_CODE='''
#ifdef _MSC_VER
#define testEXP... |
jpetto/bedrock | refs/heads/master | bedrock/tabzilla/models.py | 1447 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
lokeshjindal15/pd-gem5 | refs/heads/master | src/arch/x86/isa/insts/general_purpose/logical.py | 89 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... |
ella/ella-polls | refs/heads/master | test_ella_polls/urls.py | 1 | from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^polls', include('ella_polls.urls')),
(r'^', include('ella.core.urls')),
)
|
movicha/dcos | refs/heads/master | packages/spartan/extra/gen_resolvconf.py | 1 | #!/opt/mesosphere/bin/python
import os
import socket
import sys
import random
import dns.query
# Constants
MAX_SERVER_COUNT = 3
SPARTANS = ['198.51.100.1', '198.51.100.2', '198.51.100.3']
if len(sys.argv) != 2:
print('Usage: gen_resolvconf.py RESOLV_CONF_PATH', file=sys.stderr)
print('Received: {}'.format... |
lycanthia/Find7-Kernel-Source-4.3 | refs/heads/master | tools/perf/util/setup.py | 4998 | #!/usr/bin/python2
from distutils.core import setup, Extension
from os import getenv
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.install_lib import install_lib as _install_lib
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_optio... |
AlanZheng/heekscnc | refs/heads/master | pycnc/Operation.py | 24 | from Object import Object
from consts import *
import HeeksCNC
from CNCConfig import CNCConfig
class Operation(Object):
def __init__(self):
Object.__init__(self)
self.active = True
self.comment = ''
self.title = self.TypeName()
self.tool_number = 0
... |
jdar/phantomjs-modified | refs/heads/master | src/qt/qtwebkit/Tools/QueueStatusServer/filters/webkit_extras.py | 121 | # Copyright (C) 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 of conditions and the... |
Dev-Cloud-Platform/Dev-Cloud | refs/heads/master | dev_cloud/web_service/__init__.py | 4 | # -*- coding: utf-8 -*-
# @COPYRIGHT_begin
#
# Copyright [2015] Michał Szczygieł, M4GiK Software
#
# 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... |
RJVB/audacity | refs/heads/master | lib-src/lv2/lv2/plugins/eg02-midigate.lv2/waflib/Tools/cs.py | 133 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
from waflib import Utils,Task,Options,Logs,Errors
from waflib.TaskGen import before_method,after_method,feature
from waflib.Tools import ccroot
from waflib.Configure import co... |
OSU-slatelab/specGAN | refs/heads/master | data_io.py | 1 | """
Functions for dealing with data input and output.
"""
from os import path
import _pickle as pickle
import gzip
import logging
import numpy as np
import struct
logger = logging.getLogger(__name__)
#-----------------------------------------------------------------------------#
# GENERA... |
DoWhatILove/turtle | refs/heads/master | programming/python/library/scikit-learn/knn/tryIt.py | 1 | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 2 23:22:37 2018
@author: davch
"""
#%%
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.