repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
shadimh/google-appengine-wx-launcher | refs/heads/master | launcher/html_info_dialog_unittest.py | 28 | #!/usr/bin/env python
#
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
broferek/ansible | refs/heads/devel | test/units/modules/storage/netapp/test_na_ontap_unix_group.py | 23 | # (c) 2018, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
''' unit test template for ONTAP Ansible module '''
from __future__ import print_function
import json
import pytest
from units.compat import unittest
from units.compat.mock import patch, Mock
from ans... |
hainm/scipy | refs/heads/master | scipy/stats/tests/test_kdeoth.py | 27 | from __future__ import division, print_function, absolute_import
from scipy import stats
import numpy as np
from numpy.testing import assert_almost_equal, assert_, assert_raises, \
assert_array_almost_equal, assert_array_almost_equal_nulp, run_module_suite
def test_kde_1d():
#some basic tests comparing to no... |
fkolacek/FIT-VUT | refs/heads/master | bp-revok/python/lib/python2.7/encodings/mac_croatian.py | 593 | """ Python Character Mapping Codec mac_croatian generated from 'MAPPINGS/VENDORS/APPLE/CROATIAN.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,inp... |
coxmediagroup/googleads-python-lib | refs/heads/master | examples/adwords/v201506/basic_operations/get_keywords.py | 3 | #!/usr/bin/python
#
# 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 b... |
laperry1/android_external_chromium_org | refs/heads/cm-12.1 | tools/metrics/histograms/update_histogram_enum.py | 58 | # 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.
"""Updates enums in histograms.xml file with values read from provided C++ enum.
If the file was pretty-printed, the updated version is pretty-printed too.
... |
lthurlow/Network-Grapher | refs/heads/master | proj/external/networkx-1.7/build/lib.linux-i686-2.7/networkx/generators/small.py | 48 | # -*- coding: utf-8 -*-
"""
Various small and named graphs, together with some compact generators.
"""
__author__ ="""Aric Hagberg (hagberg@lanl.gov)\nPieter Swart (swart@lanl.gov)"""
# Copyright (C) 2004-2008 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@la... |
msfrank/mandelbrot | refs/heads/master | test/test_check_systemmemory.py | 1 | import bootstrap
import unittest
import unittest.mock
import cifparser
import collections
from mandelbrot.model.evaluation import *
MockVMem = collections.namedtuple('MockVMem', ['total', 'available',
'percent', 'used', 'free', 'active', 'inactive', 'buffers', 'cached',
'wired', 'shared'])
MockSwap = collect... |
VioletRed/kodi-urplay | refs/heads/master | default.py | 1 | # -*- coding: utf-8 -*-
import re
import json
import sys
import time
import urllib
import xbmc
import xbmcgui
import xbmcaddon
import xbmcplugin
import CommonFunctions as common
import resources.lib.helper as helper
import resources.lib.urplay as ur
import resources.lib.PlaylistManager as PlaylistManager
import resourc... |
eyalfa/spark | refs/heads/master | python/pyspark/ml/evaluation.py | 25 | #
# 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 us... |
hellofwy/shadowsocks | refs/heads/master | shadowsocks/lru_cache.py | 35 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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 b... |
rebost/django | refs/heads/master | django/contrib/gis/geoip/tests.py | 6 | from __future__ import unicode_literals
import os
from django.conf import settings
from django.contrib.gis.geos import GEOSGeometry
from django.contrib.gis.geoip import GeoIP, GeoIPException
from django.utils import unittest
# Note: Requires use of both the GeoIP country and city datasets.
# The GEOIP_DATA path shoul... |
aldebjer/pysim | refs/heads/master | pysim/tests/configfile_test.py | 1 | """Test that a config file can be created and read"""
import tempfile
import json
import pytest
import numpy as np
from pysim.simulation import Sim
from pysim.systems import VanDerPol, SquareWave, MassSpringDamper
from pysim.systems.python_systems import VanDerPol as PyVanDerPol
from pysim.tests.compositesystem_tes... |
jabbalaci/jabbapylib | refs/heads/master | jabbapylib/podium/podium.py | 1 | #!/usr/bin/env python
"""
"platform" is in the standard library, so it was renamed to podium :)
# from jabbapylib.podium import podium
# from jabbapylib.podium.podium import get_short_fingerprint
"""
import os
import sys
import getpass
import socket
from jabbapylib.process import process
from jabbapylib.filesystem i... |
40223104/2015cd_midterm | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/image.py | 603 | #!/usr/bin/env python
'''Pygame module for image transfer.
The image module contains functions for loading and saving pictures, as
well as transferring Surfaces to formats usable by other packages.
Note that there is no Image class; an image is loaded as a
Surface object. The Surface class allows manipulation (drawi... |
SoftwareMaven/django | refs/heads/master | django/contrib/admin/apps.py | 459 | from django.apps import AppConfig
from django.contrib.admin.checks import check_admin_app
from django.core import checks
from django.utils.translation import ugettext_lazy as _
class SimpleAdminConfig(AppConfig):
"""Simple AppConfig which does not do automatic discovery."""
name = 'django.contrib.admin'
... |
JulianEberius/SublimePythonIDE | refs/heads/master | pyflakes/messages.py | 34 | """
Provide the class Message and its subclasses.
"""
class Message(object):
message = ''
message_args = ()
def __init__(self, filename, loc):
self.filename = filename
self.lineno = loc.lineno
self.col = getattr(loc, 'col_offset', 0)
def __str__(self):
return '%s:%s: ... |
ktan2020/legacy-automation | refs/heads/master | win/Lib/xml/dom/minicompat.py | 62 | """Python version compatibility support for minidom."""
# This module should only be imported using "import *".
#
# The following names are defined:
#
# NodeList -- lightest possible NodeList implementation
#
# EmptyNodeList -- lightest possible NodeList that is guaranteed to
# rem... |
ArcherCraftStore/ArcherVMPeridot | refs/heads/master | Python/Lib/test/test_startfile.py | 111 | # Ridiculously simple test of the os.startfile function for Windows.
#
# empty.vbs is an empty file (except for a comment), which does
# nothing when run with cscript or wscript.
#
# A possible improvement would be to have empty.vbs do something that
# we can detect here, to make sure that not only the os.startfile()
#... |
marian-vignau/recordium | refs/heads/master | recordium/main.py | 1 | # Copyright 2016-2017 Facundo Batista
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY;... |
OpenDSA/OpenDSA-stable | refs/heads/master | SourceCode/Python/Sorting/Selectionsort.py | 5 | def sorttime(B):
A = [randrange(1,1000) for _ in range(testsize)] # To make it create a real A for copying
numruns = 5
totaltime = 0
for runs in range(1, numruns):
for i in range(len(B)):
A[i] = B[i]
time1 = datetime.now()
selsort(A)
time2 = datetime.now()
checkorder(A)
totaltime... |
hgascon/pulsar | refs/heads/master | pulsar/core/fuzzer.py | 1 | #!/usr/bin/python
import os
import sys
import socket
import time
import json
import urllib.request, urllib.parse, urllib.error
import errno
import configparser
import numpy as np
from ast import literal_eval
from random import choice, randrange
from socket import error as SocketError
from pulsar.core.lens import Len... |
fkorotkov/pants | refs/heads/master | src/python/pants/backend/codegen/protobuf/java/register.py | 8 | # coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.backend.c... |
baggioss/hadoop-with-transparentcompress | refs/heads/master | src/contrib/hod/testing/testHodRing.py | 64 | #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 thi... |
numerigraphe/odoo | refs/heads/8.0 | addons/board/controllers.py | 348 | # -*- coding: utf-8 -*-
from xml.etree import ElementTree
from openerp.addons.web.controllers.main import load_actions_from_ir_values
from openerp.http import Controller, route, request
class Board(Controller):
@route('/board/add_to_dashboard', type='json', auth='user')
def add_to_dashboard(self, menu_id, act... |
bdelliott/wordgame | refs/heads/master | web/django/contrib/admin/filterspecs.py | 78 | """
FilterSpec encapsulates the logic for displaying filters in the Django admin.
Filters are specified in models with the "list_filter" option.
Each filter subclass knows how to display a filter for a field that passes a
certain test -- e.g. being a DateField or ForeignKey.
"""
from django.db import models
from djan... |
bhargavipatel/808X_VO | refs/heads/master | vendor/googletest/googlemock/scripts/upload_gmock.py | 770 | #!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
TDcoolguy300/HippieStation13 | refs/heads/master | bot/NanoTrasenBot.py | 35 | # -*- coding: utf-8 -*-
# This script is shared under the
# Creative Commons Attribution-ShareAlike 3.0 license (CC BY-SA 3.0)
# Added clause to Attribution:
# - You may not remove or hide the '<Bot_name> who created you?' functionality
# and you may not modify the name given in the response.
#CREDITS
# Author: Skibi... |
ListFranz/tornado | refs/heads/master | demos/s3server/s3server.py | 98 | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
vishnumani2009/OpenSource-Open-Ended-Statistical-toolkit | refs/heads/master | NAIVEBAYES/NaiveBayes.py | 5 | # -*- coding: utf-8 -*-
from __future__ import division
from collections import Counter
import math
class ClassifierNotTrainedException(Exception):
def __str__(self):
return "Classifier is not trained."
class Classy(object):
def __init__(self):
self.term_count_store = {}
self.data = {
'class_term_coun... |
MediaSapiens/autonormix | refs/heads/master | djangotoolbox/test.py | 47 | from .utils import object_list_to_table, equal_lists
from django.test import TestCase
from django.test.simple import DjangoTestSuiteRunner
from django.utils.unittest import TextTestRunner
import sys
try:
from StringIO import StringIO
except ImportError:
from cStringIO import StringIO
class ModelTestCase(TestC... |
TaizoAyase/FSECplotter2 | refs/heads/master | FSECplotter/pyqt/models/__init__.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
FSECplotter2 - The interactive plotting application for FSEC.
Copyright 2015-2017, TaizoAyase, tikuta, biochem-fan
This file is part of FSECplotter2.
FSECplotter2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Lic... |
loumontano/sassconf-maps | refs/heads/master | node_modules/grunt-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/generator/dump_dependency_json.py | 1534 | # 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.
import collections
import os
import gyp
import gyp.common
import gyp.msvs_emulation
import json
import sys
generator_supports_multiple_toolsets = True
generator_... |
ihsanudin/odoo | refs/heads/8.0 | addons/l10n_eu_service/wizard/wizard.py | 242 | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, Open Source Business Applications
# Copyright (C) 2015 Odoo S.A. <http://www.odoo.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Aff... |
mgadi/naemonbox | refs/heads/master | sources/psdash/gevent-1.0.1/greentest/test__semaphore.py | 3 | import greentest
import gevent
from gevent.lock import Semaphore
class TestTimeoutAcquire(greentest.TestCase):
# issue 39
def test_acquire_returns_false_after_timeout(self):
s = Semaphore(value=0)
result = s.acquire(timeout=0.01)
assert result is False, repr(result)
def test_rele... |
simone/django-gb | refs/heads/master | tests/view_tests/urls.py | 5 | # coding: utf-8
from os import path
from django.conf.urls import patterns, url, include
from django.utils._os import upath
from . import views
base_dir = path.dirname(path.abspath(upath(__file__)))
media_dir = path.join(base_dir, 'media')
locale_dir = path.join(base_dir, 'locale')
js_info_dict = {
'domain': 'd... |
40223226/2015cd_midterm | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/logging/config.py | 739 | # Copyright 2001-2013 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... |
chyeh727/django | refs/heads/master | django/contrib/sessions/backends/base.py | 298 | from __future__ import unicode_literals
import base64
import logging
import string
from datetime import datetime, timedelta
from django.conf import settings
from django.contrib.sessions.exceptions import SuspiciousSession
from django.core.exceptions import SuspiciousOperation
from django.utils import timezone
from dj... |
HSAnet/glimpse_distributor | refs/heads/master | distributor/packages/urls.py | 1 | from django.conf.urls import patterns, url
from django.views.decorators.csrf import csrf_exempt
from distributor.packages.views import PackageVersionView, PackageUploadView, DebugSymbolsUploadView
urlpatterns = patterns('',
url(r'^version/$', PackageVersionView.as_view(), name='version'),
url(r'^upload/$', c... |
RealTimeWeb/wikisite | refs/heads/master | MoinMoin/support/passlib/utils/des.py | 21 | """passlib.utils.des -- DES block encryption routines
History
=======
These routines (which have since been drastically modified for python)
are based on a Java implementation of the des-crypt algorithm,
found at `<http://www.dynamic.net.au/christos/crypt/UnixCrypt2.txt>`_.
The copyright & license for that source is ... |
gpapakyriakopoulos/PyFlask | refs/heads/master | pyflask/lib/python2.7/site-packages/werkzeug/testsuite/contrib/iterio.py | 102 | # -*- coding: utf-8 -*-
"""
werkzeug.testsuite.iterio
~~~~~~~~~~~~~~~~~~~~~~~~~
Tests the iterio object.
:copyright: (c) 2013 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import unittest
from functools import partial
from werkzeug.testsuite import WerkzeugTestCase
from werk... |
jrha/aquilon | refs/heads/master | tests/broker/test_add_router.py | 2 | #!/usr/bin/env python2.6
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2011,2013 Contributor
#
# 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... |
meskio/bitmask_client | refs/heads/develop | src/leap/bitmask/services/eip/tests/test_eipconfig.py | 8 | # -*- coding: utf-8 -*-
# test_eipconfig.py
# Copyright (C) 2013 LEAP
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... |
MostafaGazar/tensorflow | refs/heads/master | tensorflow/contrib/ffmpeg/__init__.py | 48 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
MountainWei/nova | refs/heads/master | nova/tests/unit/compute/test_compute_utils.py | 20 | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
# 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... |
zenoss/ZenPacks.Nova.Cisco.Catalyst | refs/heads/master | ZenPacks/Nova/Cisco/Catalyst/lib/__init__.py | 1165 | # __init__.py
|
qe-team/marmot | refs/heads/master | marmot/features/phrase/context_lm_left_feature_extractor.py | 1 | import os
import sys
import codecs
from subprocess import call
from collections import defaultdict
from marmot.features.feature_extractor import FeatureExtractor
from marmot.util.ngram_window_extractor import left_context, right_context
from marmot.experiment.import_utils import mk_tmp_dir
class ContextLMLeftFeatureE... |
pjdelport/django | refs/heads/master | django/contrib/sitemaps/views.py | 7 | from django.contrib.sites.models import get_current_site
from django.core import urlresolvers
from django.core.paginator import EmptyPage, PageNotAnInteger
from django.http import Http404
from django.template.response import TemplateResponse
from django.utils import six
def index(request, sitemaps,
template_... |
akshatharaj/django | refs/heads/master | tests/admin_checks/tests.py | 72 | from __future__ import unicode_literals
from django import forms
from django.contrib import admin
from django.contrib.contenttypes.admin import GenericStackedInline
from django.core import checks
from django.test import SimpleTestCase, override_settings
from .models import Album, Book, City, Influence, Song, State, T... |
suninsky/ReceiptOCR | refs/heads/master | Python/server/lib/python2.7/site-packages/PIL/ExifTags.py | 46 | #
# The Python Imaging Library.
# $Id$
#
# EXIF tags
#
# Copyright (c) 2003 by Secret Labs AB
#
# See the README file for information on usage and redistribution.
#
##
# This module provides constants and clear-text names for various
# well-known EXIF tags.
##
##
# Maps EXIF tags to tag names.
TAGS = {
# possib... |
JSchwehn/ahmia | refs/heads/master | onionbot/dirbot/pipelines.py | 5 | import datetime
import hashlib
from urlparse import urlparse
import pysolr
from scrapy.conf import settings
class SolrPipeline(object):
"""A pipeline for saving the crawled data to Apache Solr"""
def process_item(self, item, spider):
index = hashlib.sha256(item['url']).hexdigest()
item['id']... |
tito/pymt | refs/heads/master | pymt/tools/dumpinput.py | 2 | from pymt import *
class DumpListener(EventDispatcher):
def __init__(self):
super(DumpListener, self).__init__()
self.register_event_type('on_touch_down')
self.register_event_type('on_touch_move')
self.register_event_type('on_touch_up')
def on_touch_down(self, touch):
p... |
agconti/njode | refs/heads/master | env/lib/python2.7/site-packages/django/contrib/gis/tests/geo3d/views.py | 6027 | # Create your views here.
|
mitsuhiko/sentry | refs/heads/master | src/sentry/models/eventuser.py | 1 | from __future__ import absolute_import
from django.db import models
from django.utils import timezone
from sentry.db.models import FlexibleForeignKey, Model, sane_repr
from sentry.utils.hashlib import md5
KEYWORD_MAP = {
'id': 'ident',
'email': 'email',
'username': 'username',
'ip': 'ip_address',
}
... |
wldcordeiro/cookiecutter-django-essentials | refs/heads/master | {{cookiecutter.repo_name}}/setup.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import {{ cookiecutter.repo_name }}
version = {{ cookiecutter.repo_name }}.__version__
setup(
name='{{ cookiecutter.project_name }}',
version=version,
author='{{ co... |
johankaito/fufuka | refs/heads/master | kafka-zk/node_modules/kafka-node/node_modules/snappy/node_modules/pangyp/gyp/pylib/gyp/generator/xcode.py | 526 | # 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.
import filecmp
import gyp.common
import gyp.xcodeproj_file
import errno
import os
import sys
import posixpath
import re
import shutil
import subprocess
import temp... |
quizlet/grpc | refs/heads/master | src/python/grpcio/grpc/framework/foundation/stream.py | 48 | # Copyright 2015 gRPC authors.
#
# 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... |
invisiblek/python-for-android | refs/heads/master | python-build/python-libs/xmpppy/xmpp/commands.py | 200 | ## $Id: commands.py,v 1.17 2007/08/28 09:54:15 normanr Exp $
## Ad-Hoc Command manager
## Mike Albon (c) 5th January 2005
## 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 versio... |
himanshuo/osf.io | refs/heads/develop | website/oauth/views.py | 22 | # -*- coding: utf-8 -*-
import httplib as http
from flask import redirect
from framework.auth.decorators import must_be_logged_in
from framework.exceptions import HTTPError
from website.oauth.models import ExternalAccount
from website.oauth.utils import get_service
from website.oauth.signals import oauth_complete
@... |
cstipkovic/spidermonkey-research | refs/heads/master | testing/web-platform/tests/XMLHttpRequest/resources/empty-div-utf8-html.py | 188 | def main(request, response):
headers = [("Content-type", "text/html;charset=utf-8")]
content = "<!DOCTYPE html><div></div>"
return headers, content
|
popazerty/openblackhole-SH4 | refs/heads/master | lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py | 9 | from enigma import eTimer
from Components.config import config, ConfigSelection, ConfigSubDict, ConfigYesNo
from Components.About import about
from Tools.CList import CList
from Tools.HardwareInfo import HardwareInfo
from os import path
from boxbranding import getBoxType
boxtype = getBoxType()
# The "VideoHardware" ... |
xiaoyaozi5566/DynamicCache | refs/heads/master | src/arch/x86/isa/insts/simd64/__init__.py | 91 | # 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... |
JoKaWare/GViews | refs/heads/master | tools/grit/grit/tool/menu_from_parts.py | 62 | #!/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.
'''The 'grit menufromparts' tool.'''
import types
from grit import grd_reader
from grit import tclib
from grit import util
from g... |
pedro2d10/SickRage-FR | refs/heads/develop | lib/imdb/parser/sql/objectadapter.py | 62 | """
parser.sql.objectadapter module (imdb.parser.sql package).
This module adapts the SQLObject ORM to the internal mechanism.
Copyright 2008-2010 Davide Alberani <da@erlug.linux.it>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published... |
jazzij/powertoken | refs/heads/master | powertoken/api_util.py | 1 | """
Contains various helpers for use by the Flask application.\n
Created by Abigail Franz on 3/13/2018\.n
Last modified by Abigail Franz on 5/5/2018.
"""
import logging, sys
import json, requests
from datetime import datetime, timedelta, MAXYEAR
#from background import db
#from app.models import Activity
logging.basic... |
tuxfux-hlp-notes/python-batches | refs/heads/master | batch-67/19-files/myenv/lib/python2.7/site-packages/pip/vcs/mercurial.py | 514 | from __future__ import absolute_import
import logging
import os
import tempfile
from pip.utils import display_path, rmtree
from pip.vcs import vcs, VersionControl
from pip.download import path_to_url
from pip._vendor.six.moves import configparser
logger = logging.getLogger(__name__)
class Mercurial(VersionControl... |
cainmatt/django | refs/heads/master | tests/sites_framework/models.py | 281 | from django.contrib.sites.managers import CurrentSiteManager
from django.contrib.sites.models import Site
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class AbstractArticle(models.Model):
title = models.CharField(max_length=50)
object... |
kdheepak89/pelican-plugins | refs/heads/master | optimize_images/__init__.py | 78 | from .optimize_images import *
|
farhi-naz/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py | 116 | # Copyright (c) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... |
GladeRom/android_external_chromium_org | refs/heads/gr-3.1 | tools/cr/cr/commands/shell.py | 103 | # 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.
"""A module for the shell command."""
import os
import tempfile
import cr
class ShellCommand(cr.Command):
"""The implementation of the shell command.
... |
luc-demeyer/account-financial-tools | refs/heads/8.0 | account_move_locking/wizard/account_lock_account_move.py | 27 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Vincent Renaville.
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# p... |
tukutela/Kay-Framework | refs/heads/master | kay/handlers/blobstore_handlers.py | 10 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
unnikrishnankgs/va | refs/heads/master | venv/lib/python3.5/site-packages/django/contrib/auth/migrations/0004_alter_user_username_opts.py | 110 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth import validators
from django.db import migrations, models
from django.utils import six
class Migration(migrations.Migration):
dependencies = [
('auth', '0003_alter_user_email_max_length'),
]
# No database ... |
nowls/gnuradio | refs/heads/master | gnuradio-runtime/python/gnuradio/gru/daemon.py | 78 | #
# Copyright 2008 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
#... |
kernc/scikit-learn | refs/heads/master | sklearn/__check_build/__init__.py | 345 | """ Module to give helpful messages to the user that did not
compile the scikit properly.
"""
import os
INPLACE_MSG = """
It appears that you are importing a local scikit-learn source tree. For
this, you need to have an inplace install. Maybe you are in the source
directory and you need to try from another location.""... |
mpvismer/pyqtgraph | refs/heads/develop | pyqtgraph/console/__init__.py | 56 | from .Console import ConsoleWidget |
titansgroup/python-phonenumbers | refs/heads/dev | python/phonenumbers/shortdata/region_WS.py | 11 | """Auto-generated file, do not edit by hand. WS metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_WS = PhoneMetadata(id='WS', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='9\\d{2}', possible_number_pattern='\\d{... |
marissazhou/django | refs/heads/master | tests/backends/tests.py | 16 | # -*- coding: utf-8 -*-
# Unit and doctests for specific database backends.
from __future__ import unicode_literals
import datetime
import re
import threading
import unittest
import warnings
from decimal import Decimal, Rounded
from django.core.exceptions import ImproperlyConfigured
from django.core.management.color ... |
kakunbsc/enigma2.2 | refs/heads/master | lib/python/Components/Converter/ValueBitTest.py | 165 | from Converter import Converter
from Components.Element import cached
class ValueBitTest(Converter, object):
def __init__(self, arg):
Converter.__init__(self, arg)
self.value = int(arg)
@cached
def getBoolean(self):
return self.source.value & self.value and True or False
boolean = property(getBoolean)
|
Huskynarr/gnome15 | refs/heads/master | src/plugins/screensaver/screensaver.py | 8 | # Gnome15 - Suite of tools for the Logitech G series keyboards and headsets
# Copyright (C) 2010 Brett Smith <tanktarta@blueyonder.co.uk>
#
# 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, e... |
siosio/intellij-community | refs/heads/master | python/testData/refactoring/move/dunderAllTwoElementsTuple/after/src/a.py | 79 | __all__ = ('C',)
class C:
pass |
stianvi/ansible-modules-core | refs/heads/devel | network/junos/junos_command.py | 6 | #!/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... |
ltilve/ChromiumGStreamerBackend | refs/heads/master | native_client_sdk/src/build_tools/tests/test_projects_test.py | 45 | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
import unittest
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
BUILD_TOOLS_DIR = os.path.dirname(SCR... |
zstackorg/zstack-woodpecker | refs/heads/master | integrationtest/vm/vm_password/test_chg_vm_passwd_u14.py | 1 | '''
test for changing vm password
@author: SyZhao
'''
import apibinding.inventory as inventory
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.test_state as test_state
import zstackwoodpecker.operations.vm_operations as vm_ops
import zstackl... |
M4sse/chromium.src | refs/heads/nw12 | tools/telemetry/third_party/pyserial/serial/sermsdos.py | 159 | # sermsdos.py
#
# History:
#
# 3rd September 2002 Dave Haynes
# 1. First defined
#
# Although this code should run under the latest versions of
# Python, on DOS-based platforms such as Windows 95 and 98,
# it has been specifically written to be compatible with
# PyDOS, available at:
# http://ww... |
txemi/ansible | refs/heads/devel | test/units/playbook/role/test_include_role.py | 79 | # (c) 2016, Daniel Miranda <danielkza2@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) any later v... |
orangeYao/twiOpinion | refs/heads/master | dustbin/testMultiprocess.py | 1 |
import time
for i in range(1, 100000):
print i
time.sleep(2)
|
kennedyshead/home-assistant | refs/heads/dev | tests/components/water_heater/test_init.py | 21 | """Tests for Water heater."""
from homeassistant.components import water_heater
def test_deprecated_base_class(caplog):
"""Test deprecated base class."""
class CustomWaterHeater(water_heater.WaterHeaterDevice):
pass
CustomWaterHeater()
assert "WaterHeaterDevice is deprecated, modify CustomWa... |
ronzohan/namebench | refs/heads/master | nb_third_party/dns/rdtypes/ANY/NS.py | 248 | # Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... |
jjmachan/activityPointsApp | refs/heads/master | activitypoints/lib/python3.5/site-packages/django/contrib/gis/db/backends/spatialite/introspection.py | 59 | from django.contrib.gis.gdal import OGRGeomType
from django.db.backends.sqlite3.introspection import (
DatabaseIntrospection, FlexibleFieldLookupDict,
)
from django.utils import six
class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict):
"""
Sublcass that includes updates the `base_data_types_reverse` ... |
c0hen/django-venv | refs/heads/master | lib/python3.4/site-packages/setuptools/command/alias.py | 125 | from distutils.errors import DistutilsOptionError
from setuptools.command.setopt import edit_config, option_base, config_file
def shquote(arg):
"""Quote an argument for later parsing by shlex.split()"""
for c in '"', "'", "\\", "#":
if c in arg: return repr(arg)
if arg.split() != [arg]:
re... |
damianam/easybuild-framework | refs/heads/master | easybuild/tools/run.py | 2 | # #
# Copyright 2009-2017 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (... |
dyhpoon/yowsup | refs/heads/master | yowsup/layers/protocol_contacts/protocolentities/iq_sync.py | 41 | from yowsup.structs import ProtocolTreeNode
from yowsup.layers.protocol_iq.protocolentities import IqProtocolEntity
import time
class SyncIqProtocolEntity(IqProtocolEntity):
'''
<iq type="get" id="{{id}}" xmlns="urn:xmpp:whatsapp:sync">
<sync
sid="{{str((time.time() + 11644477200) * 100000... |
google/gfw-toolkit | refs/heads/master | api_sample/third_party/apiclient/schema.py | 149 | # Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... |
oomkiller/mha-helper | refs/heads/master | scripts/lib/__init__.py | 4 | # (c) 2013, Ovais Tariq <ovaistariq@gmail.com>
#
# This file is part of mha-helper
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any la... |
slohse/ansible | refs/heads/devel | test/integration/targets/ansible-runner/filter_plugins/parse.py | 122 | from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import re
import json
def parse_json(value):
return json.dumps(json.loads(re.sub('^.*\n#STARTJSON\n', '', value, flags=re.DOTALL)), indent=4, sort_keys=True)
class FilterModule(object):
def filters(self):
retur... |
sahmed95/sympy | refs/heads/master | sympy/physics/mechanics/lagrange.py | 45 | from __future__ import print_function, division
__all__ = ['LagrangesMethod']
from sympy import diff, zeros, Matrix, eye, sympify
from sympy.physics.vector import dynamicsymbols, ReferenceFrame
from sympy.physics.mechanics.functions import (find_dynamicsymbols, msubs,
_f_list_parser)
from sympy.physics.mechan... |
blois/AndroidSDKCloneMin | refs/heads/master | ndk/prebuilt/linux-x86_64/lib/python2.7/smtplib.py | 35 | #! /usr/bin/env python
'''SMTP/ESMTP client class.
This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP
Authentication) and RFC 2487 (Secure SMTP over TLS).
Notes:
Please remember, when doing ESMTP, that the names of the SMTP service
extensions are NOT the same thing as the option keywords for the RC... |
fartashf/python-mode | refs/heads/develop | pymode/libs/logilab/common/visitor.py | 93 | # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... |
nolanliou/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/stage_op_test.py | 28 | # 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.