repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
henrix/rpi-linux | refs/heads/rpi-4.1.y | scripts/gdb/linux/tasks.py | 367 | #
# gdb helper commands and functions for Linux kernel debugging
#
# task & thread tools
#
# Copyright (c) Siemens AG, 2011-2013
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
from linux import utils
task_type = utils.CachedType(... |
Isabek/python-koans | refs/heads/master | python3/koans/about_none.py | 79 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Based on AboutNil in the Ruby Koans
#
from runner.koan import *
class AboutNone(Koan):
def test_none_is_an_object(self):
"Unlike NULL in a lot of languages"
self.assertEqual(__, isinstance(None, object))
def test_none_is_universal(self):
... |
abramhindle/UnnaturalCodeFork | refs/heads/master | python/testdata/launchpad/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py | 1 | # Copyright 2010-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for bug subscription filter browser code."""
__metaclass__ = type
from functools import partial
from urlparse import urlparse
from lazr.restfulclient.errors import... |
ojengwa/oh-mainline | refs/heads/master | vendor/packages/PyJWT/jwt/exceptions.py | 15 | class InvalidTokenError(Exception):
pass
class DecodeError(InvalidTokenError):
pass
class ExpiredSignatureError(InvalidTokenError):
pass
class InvalidAudienceError(InvalidTokenError):
pass
class InvalidIssuerError(InvalidTokenError):
pass
class InvalidIssuedAtError(InvalidTokenError):
... |
thehyve/variant | refs/heads/master | eggs/django-1.3.1-py2.7.egg/django/contrib/localflavor/sk/forms.py | 344 | """
Slovak-specific form helpers
"""
from django.forms.fields import Select, RegexField
from django.utils.translation import ugettext_lazy as _
class SKRegionSelect(Select):
"""
A select widget widget with list of Slovak regions as choices.
"""
def __init__(self, attrs=None):
from sk_regions i... |
lirenjie95/DataMining | refs/heads/master | ImageRecognition/face_recognize.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''Author = Renjie Li'''
import os
import cv2
from math import sqrt
from time import time
from PIL import Image,ImageDraw,ImageFilter,ImageFont
threshold = (1024+512)
#detectFaces()返回图像中所有人脸的矩形坐标(矩形左上、右下顶点)
#使用haar特征的两个级联分类器需要灰度图作为输入
def detectFaces(image_name):
refe... |
Venturi/cms | refs/heads/master | env/lib/python2.7/site-packages/djangocms_flash/models.py | 2 | import os
import re
from django.db import models
from django.utils.translation import ugettext_lazy as _
from cms.models import CMSPlugin
try:
from cms.models import get_plugin_media_path
except ImportError:
def get_plugin_media_path(instance, filename):
"""
See cms.models.pluginmodel.get_plug... |
beres/waliki | refs/heads/master | waliki/slides/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
jdhp-sap/data-pipeline-standalone-scripts | refs/heads/master | datapipe/benchmark/__init__.py | 2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# This script is provided under the terms and conditions of the MIT license:
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... |
JFriel/honours_project | refs/heads/master | venv/lib/python2.7/site-packages/numpy/doc/structured_arrays.py | 33 | """
=================
Structured Arrays
=================
Introduction
============
Numpy provides powerful capabilities to create arrays of structured datatype.
These arrays permit one to manipulate the data by named fields. A simple
example will show what is meant.: ::
>>> x = np.array([(1,2.,'Hello'), (2,3.,"Wo... |
elsigh/browserscope | refs/heads/master | gaeunit.py | 9 | #!/usr/bin/env python
'''
GAEUnit: Google App Engine Unit Test Framework
Usage:
1. Put gaeunit.py into your application directory. Modify 'app.yaml' by
adding the following mapping below the 'handlers:' section:
- url: /test.*
script: gaeunit.py
2. Write your own test cases by extending unittest.TestCas... |
modoboa/modoboa | refs/heads/master | modoboa/admin/api/v2/serializers.py | 1 | """Admin API v2 serializers."""
import os
from django.conf import settings
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext as _
from django.contrib.auth import password_validation
from rest_framework import serializers
from modoboa.admin.api.v1 import serializers as... |
CVML/pybrain | refs/heads/master | pybrain/supervised/evolino/individual.py | 26 | __author__ = 'Michael Isik'
from pybrain.supervised.evolino.gindividual import Individual
from copy import copy, deepcopy
class EvolinoIndividual(Individual):
""" Individual of the Evolino framework, that consists of a list of
sub-individuals. The genomes of the sub-individuals are used as
the c... |
jcftang/ansible | refs/heads/devel | test/units/mock/path.py | 48 | #!/usr/bin/env python
def mock_unfrackpath_noop(path):
''' Do not expand the path '''
return path
|
HackLinux/androguard | refs/heads/master | androguard/core/api_specific_resources/aosp_permissions/aosp_permissions_api22.py | 27 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#################################################
### Extracted from platform version: 5.1.1
#################################################
AOSP_PERMISSIONS = {
'android.permission.REMOTE_AUDIO_PLAYBACK' : {'permissionGroup' : 'android.permission-group.SYSTEM_TOOLS', 'desc... |
hackday-profilers/flocker | refs/heads/master | flocker/route/_memory.py | 15 | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Objects related to an in-memory implementation of ``INetwork``.
"""
from zope.interface import implementer
from eliot import Logger
from ._interfaces import INetwork
from ._model import Proxy, OpenPort
@implementer(INetwork)
class MemoryNetwork(objec... |
timlinux/QGIS | refs/heads/master | python/plugins/processing/algs/grass7/Grass7Utils.py | 6 | # -*- coding: utf-8 -*-
"""
***************************************************************************
GrassUtils.py
---------------------
Date : February 2015
Copyright : (C) 2014-2015 by Victor Olaya
Email : volayaf at gmail dot com
*********************... |
amith01994/intellij-community | refs/heads/master | python/helpers/profiler/thrift/TSerialization.py | 36 | #
# 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... |
ncos/hometasks | refs/heads/master | CMSC733/amitrokh_P2/Code/FaceDetectorCodes/DLib/dist/dlib/examples/train_shape_predictor.py | 10 | #!/usr/bin/python
# The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt
#
# This example program shows how to use dlib's implementation of the paper:
# One Millisecond Face Alignment with an Ensemble of Regression Trees by
# Vahid Kazemi and Josephine Sullivan, CVPR 2014
#
# ... |
unseenlaser/python-for-android | refs/heads/master | python3-alpha/python3-src/PC/VS7.1/field3.py | 96 | # An absurd workaround for the lack of arithmetic in MS's resource compiler.
# After building Python, run this, then paste the output into the appropriate
# part of PC\python_nt.rc.
# Example output:
#
# * For 2.3a0,
# * PY_MICRO_VERSION = 0
# * PY_RELEASE_LEVEL = 'alpha' = 0xA
# * PY_RELEASE_SERIAL = 1
# *
# * and 0*1... |
i-maravic/ns-3 | refs/heads/master | utils/python-unit-tests.py | 155 | import unittest
from ns.core import Simulator, Seconds, Config, int64x64_t
import ns.core
import ns.network
import ns.internet
import ns.mobility
import ns.csma
import ns.applications
class TestSimulator(unittest.TestCase):
def testScheduleNow(self):
def callback(args):
self._args_received = ... |
elcritch/csvkit | refs/heads/master | tests/test_utilities/test_csvsql.py | 21 | #!/usr/bin/env python
import six
try:
import unittest2 as unittest
except ImportError:
import unittest
from csvkit.utilities.csvsql import CSVSQL
from tests.utils import stdin_as_string
class TestCSVSQL(unittest.TestCase):
def test_create_table(self):
args = ['--table', 'foo', 'examples/testfixe... |
gpospelov/BornAgain | refs/heads/develop | Doc/FFCatalog/fig/ff2/sim_Cone.py | 1 | #!/usr/bin/env python3
"""
Plot form factor.
"""
import bornagain as ba
from bornagain import nm, deg
import bornplot as bp
det = ba.SphericalDetector(200, 5*deg, 2.5*deg, 2.5*deg)
n = 4
results = []
for i in range(n):
theta = 30*i/(n - 1)
title = r'$\vartheta=%d^\circ$' % theta
ff = ba.FormFactorCone(4*nm... |
PayloadSecurity/VxAPI | refs/heads/master | cli/wrappers/scan/cli_scan_url_to_file.py | 1 | from cli.wrappers.cli_caller import CliCaller
from constants import ACTION_OVERVIEW_GET
from cli.arguments_builders.submission_cli_arguments import SubmissionCliArguments
class CliScanUrlToFile(CliCaller):
help_description = 'Submit a file by url for quick scan (you can check results by \'' + ACTION_OVERVIEW_GET... |
peterayeni/rapidsms | refs/heads/develop | run_tests.py | 1 | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
def run_tests(options, args):
if django.VERSION > (1, 7):
# http://django.readthedocs.org/en/latest/releases/1.7.html#standalone-scripts
... |
doduytrung/odoo-8.0 | refs/heads/master | addons/purchase_double_validation/__openerp__.py | 260 | # -*- 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... |
arcean/pyopenssl | refs/heads/master | setup.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) AB Strakt 2001, All rights reserved
# Copyright (C) Jean-Paul Calderone 2008, All rights reserved
#
# @(#) $Id: setup.py,v 1.28 2004/08/10 10:59:01 martin Exp $
#
"""
Installation script for the OpenSSL module
"""
import distutils.log
distutils.log.set_v... |
davide-ceretti/DEPRECATED-googleappengine-djangae-skeleton | refs/heads/master | application/crud/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
thnee/ansible | refs/heads/devel | hacking/build_library/build_ansible/jinja2/filters.py | 31 | # Copyright: (c) 2019, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import re
try:
from html import escape as html_escape
except I... |
maackle/ILC-app | refs/heads/master | lib/pyspatialite-3.0.1/doc/includes/sqlite3/progress.py | 49 | from pysqlite2 import dbapi2 as sqlite3
def progress():
print "Query still executing. Please wait ..."
con = sqlite3.connect(":memory:")
con.execute("create table test(x)")
# Let's create some data
con.executemany("insert into test(x) values (?)", [(x,) for x in xrange(300)])
# A progress handler, executed ever... |
midroid/mediadrop | refs/heads/master | mediacore/lib/compat/functional.py | 14 | from mediadrop.lib.compat.functional import *
|
getsmap/smap4 | refs/heads/master | WS/print/printIt.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#
# Author: Johan Lahti <johanlahti at gmail com>
# Copyright: Malmö Stad (City of Malmö, Sweden)
# License: MIT license
# Date: August 10, 2010.
#
# About: This code is meant to be used with the
# OpenLaye... |
sharifmamun/ansible | refs/heads/devel | lib/ansible/plugins/callback/hipchat.py | 101 | # (C) 2014, Matt Martz <matt@sivel.net>
# 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.
#
#... |
eduNEXT/edunext-platform | refs/heads/master | cms/envs/common.py | 1 | # -*- coding: utf-8 -*-
"""
This is the common settings file, intended to set sane defaults. If you have a
piece of configuration that's dependent on a set of feature flags being set,
then create a function that returns the calculated value based on the value of
FEATURES[...]. Modules that extend this one can change th... |
hoosteeno/mozillians | refs/heads/master | vendor-local/lib/python/rest_framework/negotiation.py | 18 | """
Content negotiation deals with selecting an appropriate renderer given the
incoming request. Typically this will be based on the request's Accept header.
"""
from __future__ import unicode_literals
from django.http import Http404
from rest_framework import exceptions
from rest_framework.settings import api_setting... |
jkyeung/XlsxWriter | refs/heads/master | xlsxwriter/test/comparison/test_types01.py | 1 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... |
stephensong/runtime | refs/heads/master | deps/v8/tools/gc-nvp-trace-processor.py | 31 | #!/usr/bin/env python
#
# Copyright 2010 the V8 project authors. 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
# noti... |
r0k3/arctic | refs/heads/master | arctic/store/_version_store_utils.py | 1 | from bson import Binary
import hashlib
import numpy as np
import pickle
import pandas as pd
import functools
import six
from pandas.compat import pickle_compat
def _split_arrs(array_2d, slices):
"""
Equivalent to numpy.split(array_2d, slices),
but avoids fancy indexing
"""
if len(array_2d) == 0:
... |
kalahbrown/HueBigSQL | refs/heads/master | desktop/core/ext-py/Paste-2.0.1/tests/test_multidict.py | 47 | # -*- coding: utf-8 -*-
# (c) 2007 Ian Bicking and Philip Jenvey; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
import cgi
import six
from six.moves import StringIO
from nose.tools import assert_raises
from paste.util.multidict import M... |
tashaband/RYU295 | refs/heads/master | ryu/contrib/ncclient/transport/__init__.py | 69 | # Copyright 2009 Shikhar Bhushan
#
# 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 writin... |
tobsan/softwarecontainer | refs/heads/master | servicetest/filesystem/fileapp.py | 6 | #!/usr/bin/env python
# Copyright (C) 2016-2017 Pelagicore AB
#
# Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AN... |
ibinti/intellij-community | refs/heads/master | python/testData/refactoring/rename/docstringParams.py | 80 | class SomeClass(object):
""" Awesome class
@ivar someVar: great stuff
@type someVar: string
"""
def __init__(self):
self.some<caret>Var = None |
mcella/django | refs/heads/master | tests/urlpatterns_reverse/nonimported_module.py | 633 | def view(request):
"""Stub view"""
pass
|
brstra/ozvuchka | refs/heads/master | ozvuchka/default_settings.py | 1 | """
Django settings for ozvuchka project.
Generated by 'django-admin startproject' using Django 1.9.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
... |
kilon/sverchok | refs/heads/master | nodes/modifier_make/wireframe.py | 1 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# 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.
#
# This program is distrib... |
deserted/letsencrypt | refs/heads/master | letsencrypt/tests/crypto_util_test.py | 3 | """Tests for letsencrypt.crypto_util."""
import logging
import shutil
import tempfile
import unittest
import OpenSSL
import mock
import zope.component
from letsencrypt import interfaces
from letsencrypt.tests import test_util
RSA256_KEY = test_util.load_vector('rsa256_key.pem')
RSA512_KEY = test_util.load_vector('r... |
incuna/django-denorm | refs/heads/master | test_denorm_project/test_denorm_project/urls.py | 27 | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'test_project.views.home', name='home'),
# url(r'^test_project/', include('test_pro... |
ivanhorvath/openshift-tools | refs/heads/prod | ansible/roles/lib_oa_openshift/src/ansible/oc_service.py | 50 | # pylint: skip-file
# flake8: noqa
def main():
'''
ansible oc module for services
'''
module = AnsibleModule(
argument_spec=dict(
kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'),
state=dict(default='present', type='str',
... |
gdub/django | refs/heads/master | django/core/cache/utils.py | 585 | from __future__ import unicode_literals
import hashlib
from django.utils.encoding import force_bytes
from django.utils.http import urlquote
TEMPLATE_FRAGMENT_KEY_TEMPLATE = 'template.cache.%s.%s'
def make_template_fragment_key(fragment_name, vary_on=None):
if vary_on is None:
vary_on = ()
key = ':'... |
mapr/hue | refs/heads/hue-3.9.0-mapr | desktop/libs/hadoop/src/hadoop/mini_cluster.py | 23 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
saghul/gyn | refs/heads/master | test/win/gyptest-link-subsystem.py | 239 | #!/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 subsystem setting is extracted properly.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = TestGyp.TestGyp... |
gitromand/phantomjs | refs/heads/master | src/breakpad/src/tools/gyp/test/generator-output/actions/subdir2/make-file.py | 973 | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
contents = "Hello from make-file.py\n"
open(sys.argv[1], 'wb').write(contents)
|
atyndall/cits4211 | refs/heads/master | testdata/GenerateTetris.py | 1 | from random import randint
fn = input("What's the input filename? ")
ls = open(fn).read().split("\n")
n = int(ls[0]) #total no. of pieces
ns = [(max(0, float(ls[k])), k) for k in range(1, 8)] #ratios
t = sum([x for (x, k) in ns]) #total of ratios
ps = [k for (x, k) in ns for i in range(int(x / t * n))] #the pieces
... |
yongwen/makahiki | refs/heads/master | makahiki/apps/widgets/wallpost/forms.py | 27 | """post form"""
from django import forms
class WallForm(forms.Form):
"""Wall post form"""
post = forms.CharField(widget=forms.widgets.Textarea())
page_name = forms.CharField(widget=forms.HiddenInput(), required=False)
|
MaximeGLegault/StrategyIA | refs/heads/dev | tests/Algorithm/test_evaluation_module.py | 1 | import unittest
import numpy as np
from unittest.mock import create_autospec
from RULEngine.Util.Position import Position
from RULEngine.Util.Pose import Pose
from RULEngine.Game.Player import Player
from RULEngine.Game.Team import Team
from ai.states.game_state import GameState
from ai.Algorithm.evaluation_module imp... |
edx/ecommerce | refs/heads/master | ecommerce/extensions/dashboard/forms.py | 1 |
from django import forms
from django.utils.translation import ugettext_lazy as _
class UserFormMixin(forms.Form):
""" Mixin for user field filtering. """
username = forms.CharField(required=False, label=_("Username"))
email = forms.CharField(required=False, label=_("Email"))
|
robmagee/django-cms | refs/heads/develop | cms/forms/fields.py | 35 | # -*- coding: utf-8 -*-
import six
from django import forms
from django.contrib.admin.widgets import RelatedFieldWidgetWrapper
from django.forms.fields import EMPTY_VALUES
from django.utils.translation import ugettext_lazy as _
from cms.forms.utils import get_site_choices, get_page_choices
from cms.forms.widgets impo... |
MFoster/breeze | refs/heads/master | django/conf/locale/is/formats.py | 433 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i:s'
# DATETIME_FORMAT =
YEAR_MONTH_FORMAT = 'F... |
YYWen0o0/python-frame-django | refs/heads/master | django/contrib/flatpages/admin.py | 80 | from django.contrib import admin
from django.contrib.flatpages.models import FlatPage
from django.utils.translation import ugettext_lazy as _
from django.contrib.flatpages.forms import FlatpageForm
class FlatPageAdmin(admin.ModelAdmin):
form = FlatpageForm
fieldsets = (
(None, {'fields': ('url', 'titl... |
panchenji/Ryu_modified | refs/heads/master | ryu/app/rest_router.py | 2 | # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
#
# 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... |
zenn1989/scoria-interlude | refs/heads/master | L2Jscoria-Game/data/scripts/quests/378_MagnificentFeast/__init__.py | 1 | # Magnificent Feast - v0.1 by DrLecter
import sys
from com.l2scoria.gameserver.model.quest import State
from com.l2scoria.gameserver.model.quest import QuestState
from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest
qn = "378_MagnificentFeast"
#NPC
RANSPO = 30594
#ITEMS
WINE_15,WINE_30,WINE_6... |
erikld/Bobo | refs/heads/master | python3/koans/a_package_folder/__init__.py | 279 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
an_attribute = 1984 |
mrkm4ntr/incubator-airflow | refs/heads/master | tests/test_utils/asserts.py | 7 | # 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... |
samedder/azure-cli | refs/heads/master | src/azure-cli-core/azure/cli/core/_profile.py | 3 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
gpapaz/eve-wspace | refs/heads/develop | evewspace/POS/urls.py | 9 | # Eve W-Space
# Copyright 2014 Andrew Austin and contributors
#
# 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 requi... |
mantl/mantl | refs/heads/master | plugins/inventory/terraform.py | 7 | #!/usr/bin/env python
#
# Copyright 2015 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
YuiYukihira/traffic-sim | refs/heads/master | utils/controllers.py | 1 | """
traffic-sim - Simulates basic traffic conditions, allows users to compare different driving methods.
Copyright (C) 2017 Yui Yukihira
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 Foundatio... |
android-ia/platform_external_chromium_org_third_party_WebKit | refs/heads/master | Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py | 53 | # Copyright (c) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... |
technologiescollege/s2a_fr | refs/heads/portable | s2a/Python/Lib/distutils/bcppcompiler.py | 250 | """distutils.bcppcompiler
Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
"""
# This implementation by Lyle Johnson, based on the original msvccompiler.py
# module and using the directions originally published by Gordon Williams.
# XXX looks like there's a L... |
bregman-arie/ansible | refs/heads/devel | lib/ansible/utils/module_docs_fragments/vyos.py | 58 | #
# (c) 2015, Peter Sprygada <psprygada@ansible.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 late... |
mickele77/FreeCAD | refs/heads/master | src/Mod/Fem/_FemAnalysis.py | 1 | #***************************************************************************
#* *
#* Copyright (c) 2013-2015 - Juergen Riegel <FreeCAD@juergen-riegel.net> *
#* *
#* This pr... |
Seagate/hadoop-on-lustre | refs/heads/master | contrib/hod/hodlib/ServiceProxy/serviceProxy.py | 182 | #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... |
anand-c-goog/tensorflow | refs/heads/master | tensorflow/python/user_ops/user_ops.py | 33 | # 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... |
pombredanne/parakeet | refs/heads/master | test/numpy_lib/test_linspace.py | 2 | import numpy as np
from parakeet import testing_helpers
def test_simple_linspace():
testing_helpers.expect(np.linspace, [0.2, 0.9], np.linspace(0.2, 0.9))
def test_linspace_with_count():
testing_helpers.expect(np.linspace, [-0.2, 0.9, 30], np.linspace(-0.2, 0.9, 30))
if __name__ == "__main__":
testing_helper... |
ARTbio/GalaxyKickStart | refs/heads/master | extra-files/get_tool_list_from_galaxy.py | 3 | #!/usr/bin/env python
import json
import requests
import yaml
from argparse import ArgumentParser
from argparse import ArgumentDefaultsHelpFormatter
class GiToToolYaml:
def __init__(self, url,
output_file,
include_tool_panel_section_id=False,
skip_tool_panel_se... |
tarzasai/Flexget | refs/heads/develop | flexget/utils/archive.py | 3 | """
Utilities for handling RAR and ZIP archives
Provides wrapper archive and exception classes to simplify
archive extraction
"""
from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
import zipfile
import os
import shutil
import ... |
jlspyaozhongkai/Uter | refs/heads/master | third_party_backup/Python-2.7.9/Lib/plat-mac/lib-scriptpackages/Explorer/Microsoft_Internet_Explorer.py | 82 | """Suite Microsoft Internet Explorer Suite: Events defined by Internet Explorer
Level 1, version 1
Generated from /Applications/Internet Explorer.app
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'MSIE'
class Microsoft_Internet_Explorer_Events:
def GetSource(self,... |
westinedu/wrgroups | refs/heads/master | django/conf/locale/bn/formats.py | 433 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F, Y'
TIME_FORMAT = 'g:i:s A'
# DATETIME_FORMAT =
YEAR_MONTH_FORMAT = ... |
Pluto-tv/chromium-crosswalk | refs/heads/master | tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/pass_through.py | 31 | # Copyright 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.
from telemetry.page import page as page_module
from telemetry import story
class PassThroughPage(page_module.Page):
"""
A test page for the chrome proxy... |
1mgOfficial/vyked | refs/heads/master | vyked/config.py | 1 | from .utils.common_utils import json_file_to_dict, valid_timeout
class CONFIG:
config = json_file_to_dict('./config.json')
HTTP_TIMEOUT = config['HTTP_TIMEOUT'] if isinstance(config, dict) and 'HTTP_TIMEOUT' in config and valid_timeout(config['HTTP_TIMEOUT']) else 60
TCP_TIMEOUT = config['TCP_TIMEOUT'] if... |
wainersm/buildbot | refs/heads/master | worker/buildbot_worker/compat.py | 9 | # coding=utf-8
# This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRAN... |
BaladiDogGames/baladidoggames.github.io | refs/heads/master | mingw/bin/lib/lib2to3/fixes/fix_filter.py | 326 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Fixer that changes filter(F, X) into list(filter(F, X)).
We avoid the transformation if the filter() call is directly contained
in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or
for V in <>:.
NOTE: This... |
endlessm/systemd | refs/heads/master | hwdb.d/parse_hwdb.py | 1 | #!/usr/bin/env python3
# SPDX-License-Identifier: MIT
#
# This file is distributed under the MIT license, see below.
#
# The MIT 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 deal
# in the Softwar... |
jhaux/tensorflow | refs/heads/master | tensorflow/python/ops/metrics.py | 72 | # 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... |
mfcabrera/luigi | refs/heads/master | luigi/scalding.py | 38 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... |
AlexOugh/horizon | refs/heads/master | openstack_dashboard/dashboards/project/images/snapshots/forms.py | 81 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# 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... |
GunnerJnr/_CodeInstitute | refs/heads/master | Stream-3/Full-Stack-Development/2.Hello-Django-Templates/3.Template-Inheritance/hello_django/HelloWorld_prj/HelloWorld_app/tests.py | 873 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
# Create your tests here.
|
stack-of-tasks/rbdlpy | refs/heads/master | tutorial/lib/python2.7/site-packages/OpenGL/raw/GLES1/OES/vertex_array_object.py | 8 | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GLES1 import _types as _cs
# End users want this...
from OpenGL.raw.GLES1._types import *
from OpenGL.raw.GLES1 import _errors
from OpenGL.constant import Constant as _C
import... |
jennyzhang0215/incubator-mxnet | refs/heads/master | python/mxnet/ndarray_doc.py | 43 | # 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... |
minhphung171093/GreenERP_V8 | refs/heads/master | openerp/addons/crm_partner_assign/crm_partner_assign.py | 89 | # -*- 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... |
amishb/youtube-dl | refs/heads/master | youtube_dl/extractor/buzzfeed.py | 133 | # coding: utf-8
from __future__ import unicode_literals
import json
import re
from .common import InfoExtractor
class BuzzFeedIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?buzzfeed\.com/[^?#]*?/(?P<id>[^?#]+)'
_TESTS = [{
'url': 'http://www.buzzfeed.com/abagg/this-angry-ram-destroys-a-punchin... |
antiface/OpenCLNoise | refs/heads/master | raw_to_mc_schematic.py | 2 | #!/usr/bin/python
from nbt import *
import numpy
from openclnoise.vec import vec # Our own local copy! :)
import sys,os
if len(sys.argv) < 3:
print "Usage: raw_to_mc_schematic.py <input.raw> <output.schematic>"
sys.exit(1)
inf = sys.argv[1]
if not os.path.exists(inf):
print "Can't find",inf
sys.ex... |
mujiansu/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32comext/shell/test/testShellFolder.py | 37 | from win32com.shell import shell
from win32com.shell.shellcon import *
sf = shell.SHGetDesktopFolder()
print "Shell Folder is", sf
names = []
for i in sf: # Magically calls EnumObjects
name = sf.GetDisplayNameOf(i, SHGDN_NORMAL)
names.append(name)
# And get the enumerator manually
enum = sf.EnumObjects(0... |
lsinfo/odoo | refs/heads/8.0 | addons/website_mail_group/models/mail_group.py | 321 | # -*- coding: utf-8 -*-
from openerp.osv import osv
from openerp import tools
from openerp.tools.translate import _
from openerp.tools.safe_eval import safe_eval as eval
from openerp.addons.website.models.website import slug
class MailGroup(osv.Model):
_inherit = 'mail.group'
def message_get_email_values(sel... |
alexiskulash/ia-caucus-sentiment | refs/heads/master | src/prediction.py | 1 | from sklearn.ensemble import RandomForestClassifier
from sklearn import model_selection as ms
from gensim.models import Word2Vec
from vectorizer import vectorize
from cleaning import clean
import pandas as pd
import numpy as np
def prediction(vectorized_data):
headers = list(vectorized_data.columns.values)
... |
mattupstate/overholt | refs/heads/master | overholt/users/forms.py | 9 | # -*- coding: utf-8 -*-
"""
overholt.users.forms
~~~~~~~~~~~~~~~~~~~~
User forms
"""
|
hwmay/pordb3 | refs/heads/master | pypordb_neu.py | 1 | # -*- coding: utf-8 -*-
'''
Copyright 2012-2018 HWM
This file is part of PorDB3.
PorDB3 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 o... |
steventimberman/masterDebater | refs/heads/master | venv/lib/python2.7/site-packages/whoosh/qparser/taggers.py | 96 | # Copyright 2011 Matt Chaput. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the... |
sharhar/USB-Thing | refs/heads/master | UpdaterFiles/Lib/python-3.5.1.amd64/Lib/site-packages/pip/_vendor/distlib/database.py | 224 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2014 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""PEP 376 implementation."""
from __future__ import unicode_literals
import base64
import codecs
import contextlib
import hashlib
import logging
import os
import posixpath
import sys
import z... |
Changaco/oh-mainline | refs/heads/master | vendor/packages/twisted/twisted/mail/test/test_smtp.py | 17 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for twisted.mail.smtp module.
"""
from zope.interface import implements
from twisted.python.util import LineLog
from twisted.trial import unittest, util
from twisted.protocols import basic, loopback
from twisted.mail import smtp
f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.