repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
FedoraScientific/salome-smesh
refs/heads/master
doc/salome/examples/quality_controls_ex21.py
1
# Volume import SMESH_mechanic_tetra import SMESH smesh = SMESH_mechanic_tetra.smesh mesh = SMESH_mechanic_tetra.mesh salome = SMESH_mechanic_tetra.salome # Criterion : VOLUME < 7. volume_margin = 7. aFilter = smesh.GetFilter(SMESH.VOLUME, SMESH.FT_Volume3D, SMESH.FT_LessThan, volume_margin) anIds = mesh.GetIds...
danakj/chromium
refs/heads/master
chrome/app/PRESUBMIT.py
42
# 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. """Presubmit script for changes affecting chrome/app/ See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the...
kkdd/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Tools/scripts/lfcr.py
100
#! /usr/bin/env python "Replace LF with CRLF in argument files. Print names of changed files." import sys, re, os def main(): for filename in sys.argv[1:]: if os.path.isdir(filename): print filename, "Directory!" continue data = open(filename, "rb").read() if '\0'...
ty707/airflow
refs/heads/master
airflow/example_dags/example_docker_operator.py
24
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
gh0std4ncer/thug
refs/heads/master
src/DOM/W3C/HTML/HTMLAnchorElement.py
7
#!/usr/bin/env python import logging import time import datetime from .HTMLElement import HTMLElement from .attr_property import attr_property from .compatibility import * log = logging.getLogger("Thug") class HTMLAnchorElement(HTMLElement): def __init__(self, doc, tag): HTMLElement.__init__(self, doc, t...
phac-nml/neptune
refs/heads/release/1.2
neptune/Database.py
1
""" # ============================================================================= Copyright Government of Canada 2015-2017 Written by: Eric Marinier, Public Health Agency of Canada, National Microbiology Laboratory Funded by the National Micriobiology Laboratory and the Genome Canada / Alberta Innovates Bi...
Snesha/azure-linux-extensions
refs/heads/master
CustomScript/test/test_uri_utils.py
8
#!/usr/bin/env python # #CustomScript extension # # Copyright 2014 Microsoft 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 # #...
desalesouche/android_kernel_dazzozo
refs/heads/master
tools/perf/scripts/python/syscall-counts.py
11181
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
XiaodunServerGroup/medicalmooc
refs/heads/master
cms/djangoapps/contentstore/tests/test_orphan.py
6
""" Test finding orphans via the view and django config """ import json from contentstore.tests.utils import CourseTestCase from xmodule.modulestore.django import loc_mapper from student.models import CourseEnrollment from xmodule.modulestore.django import modulestore class TestOrphan(CourseTestCase): """ Test...
arenadata/ambari
refs/heads/branch-adh-1.6
ambari-common/src/test/python/mock/tests/testhelpers.py
109
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from tests.support import unittest2, inPy3k from mock import ( call, _Call, create_autospec, MagicMock, Mock, ANY, _CallList, patch, PropertyMock ) from datetime i...
EricssonResearch/calvin-base
refs/heads/master
calvin/actorstore/systemactors/time/Timestamp.py
1
# -*- coding: utf-8 -*- # Copyright (c) 2017 Ericsson 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 ...
jn7163/django
refs/heads/master
tests/null_queries/models.py
282
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Poll(models.Model): question = models.CharField(max_length=200) def __str__(self): return "Q: %s " % self.question @python_2_unicode...
supersven/intellij-community
refs/heads/master
python/testData/codeInsight/smartEnter/docRest.py
166
def foo(a, b): """<caret> pass def foo1(): """ :return : """
PersonalGenomesOrg/archive-genevieve-201505
refs/heads/master
genes/admin.py
13848
from django.contrib import admin # Register your models here.
c2theg/DDoS_Infomation_Sharing
refs/heads/master
libraries/suds-jurko-0.6/suds/xsd/sxbasic.py
7
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will b...
fotinakis/sentry
refs/heads/master
src/sentry/utils/__init__.py
9
""" sentry.utils ~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import # Make sure to not import anything here. We want modules below # sentry.utils to be able to import without having to pull ...
sivel/ansible-modules-extras
refs/heads/devel
windows/win_updates.py
23
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Matt Davis <mdavis_ansible@rolpdog.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 t...
sql-zuiwanyuan/Impala
refs/heads/master
tests/query_test/test_scanners.py
3
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # # This test suite validates the scanners by running queries against ALL file formats and # their permutations (e.g. compression codec/compression type). This works by exhaustively # generating the table format test vectors for this specifi...
kevinwilde/WildeBot
refs/heads/master
src/mybot/Lib/site-packages/flask/views.py
50
# -*- coding: utf-8 -*- """ flask.views ~~~~~~~~~~~ This module provides class-based views inspired by the ones in Django. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from .globals import request from ._compat import with_metaclass http_method_funcs =...
sciyoshi/gini
refs/heads/master
frontend/src/gbuilder/Devices/Wireless_access_point.py
6
from Router import * from PyQt4 import QtCore ## # Class: the wireless router class class Wireless_access_point(Router): type="Wireless_access_point" ## # Constructor: Initial a router device # @param x the x axis of the device on the canvas # @param y the y axis of the device on the canvas #...
david-xie/OldPasteCookie
refs/heads/master
tools/generate_avatar.py
1
#!/usr/bin/env python #-*-coding:utf-8-*- """ 这个代码的主要作用, 是从gravatar下拿到用户的头像图片, 然后存到服务器上 会使用crontab来定期执行, 定期更新用户的头像 做的操作有: 1. 连接数据库 2. 得到所有use_gravatar为True的用户列表 3. 去gravatar下下载头像 4. 如果失败, 则什么也不做 5. 如果成功, 则保存下来 """ import os import hashlib import urllib import shutil import psycopg2 import psycopg2.extras def sumfile(...
0k/openerp-server
refs/heads/ocb-7.0
win32/setup.py
105
# -*- 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...
dgellis90/nipype
refs/heads/master
nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairachMask.py
12
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from .....testing import assert_equal from ..segmentation import BRAINSTalairachMask def test_BRAINSTalairachMask_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), expand=dict(argstr='--expan...
agry/NGECore2
refs/heads/master
scripts/object/building/kashyyyk/decd_wroshyr_bent_tree_dead.py
85615
import sys def setup(core, object): return
uberamd/NGECore2
refs/heads/master
scripts/object/building/restuss/restuss_guild_commerce.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/tangible/lair/gurreck/lair_gurreck_mountain.py
85615
import sys def setup(core, object): return
vvvityaaa/PyImgProcess
refs/heads/master
filter/kuwahara_filter.py
1
from PIL import Image import numpy as np import matplotlib.pyplot as plt import math import time import exmod from open_image import open_image def kuwahara_filter(path, mask_size): ''' Applies kuwahara filter on the given image :param path: path to the image :param mask_size: should be odd number, ...
8l/beri
refs/heads/master
cheritest/trunk/tests/branch/test_raw_blezl_lt.py
2
#- # Copyright (c) 2011 Robert N. M. Watson # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @BERI_LICENSE_HEADER_START@ # # License...
chaupt/google-diff-match-patch
refs/heads/master
python2/__init__.py
636
from .diff_match_patch import diff_match_patch, patch_obj
mfalesni/cfme_tests
refs/heads/master
cfme/tests/cloud_infra_common/test_power_control_rest.py
1
# -*- coding: utf-8 -*- import pytest from cfme import test_requirements from cfme.common.provider import BaseProvider from cfme.common.vm import VM from cfme.utils.generators import random_vm_name from cfme.utils.wait import wait_for from cfme.utils.log import logger from cfme.cloud.provider.azure import AzureProvide...
sumanthha/fundafriend
refs/heads/master
django/contrib/localflavor/ca/forms.py
86
""" Canada-specific Form helpers """ from __future__ import absolute_import import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, CharField, Select from django.utils.encoding import smart_unicode from django.utils.translation import ...
junorouse/ullyeo-fuzzer
refs/heads/master
fuzzer/ullyeo/db.py
1
from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from time import time engine = create_engine('sqlite:///databases/db'+str(int(time()))+'.sqlite3', echo=False) Session = sessionmaker(bind=engine)
ychfan/tensorflow
refs/heads/master
tensorflow/python/keras/_impl/keras/layers/simplernn_test.py
13
# 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...
CVML/cvxpy
refs/heads/master
cvxpy/problems/solvers/mosek_intf.py
6
""" Copyright 2015 Enzo Busseti This file is part of CVXPY. CVXPY 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. CVXPY is distributed in ...
buguelos/odoo
refs/heads/master
addons/project_issue_sheet/__openerp__.py
260
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
ramjothikumar/Diamond
refs/heads/master
src/collectors/servertechpdu/servertechpdu.py
31
# coding=utf-8 """ SNMPCollector for Server Tech PDUs Server Tech is a manufacturer of PDUs http://www.servertech.com/ """ import time import re import os import sys # Fix Path for locating the SNMPCollector sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ...
qzane/you-get
refs/heads/develop
src/you_get/extractors/netease.py
1
#!/usr/bin/env python __all__ = ['netease_download'] from ..common import * from ..common import print_more_compatible as print from ..util import fs from json import loads import hashlib import base64 import os def netease_hymn(): return """ player's Game Over, u can abandon. u get pissed, get ...
quasar1/boxeebox-xbmc
refs/heads/master
tools/EventClients/examples/python/example_simple.py
228
#!/usr/bin/python # This is a simple example showing how you can send a key press event # to XBMC using the XBMCClient class import sys sys.path.append("../../lib/python") import time from xbmcclient import XBMCClient def main(): host = "localhost" port = 9777 # Create an XBMCClient object and con...
toshywoshy/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_report_theme.py
7
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
showell/zulip
refs/heads/master
zerver/webhooks/gci/tests.py
3
from zerver.lib.test_classes import WebhookTestCase class GoogleCodeInTests(WebhookTestCase): STREAM_NAME = 'gci' URL_TEMPLATE = "/api/v1/external/gci?&api_key={api_key}&stream={stream}" FIXTURE_DIR_NAME = 'gci' def test_abandon_event_message(self) -> None: expected_topic = 'student-yqqtag' ...
cgstudiomap/cgstudiomap
refs/heads/develop
main/eggs/Django-1.9-py2.7.egg/django/contrib/admin/forms.py
472
from __future__ import unicode_literals from django import forms from django.contrib.auth.forms import AuthenticationForm, PasswordChangeForm from django.utils.translation import ugettext_lazy as _ class AdminAuthenticationForm(AuthenticationForm): """ A custom authentication form used in the admin app. ...
qgis/QGIS
refs/heads/master
tests/src/python/test_qgsmultiedittoolbutton.py
45
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsMultiEditToolButton. .. note:: 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...
SAM-IT-SA/odoo
refs/heads/8.0
addons/hr_recruitment/report/__init__.py
442
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
sambler/oiio
refs/heads/master
testsuite/texture-filtersize/run.py
7
#!/usr/bin/env python # This test verifies that the TextureSystem is sampling the correct # MIPmap levels given the input derivatives. # # It uses 'testtex --filtertest', which produces an image where each # pixel samples at the center of the source image, and keeps the minor # axis of the filter at 1/256, but we vary...
zaina/nova
refs/heads/master
nova/tests/unit/api/openstack/compute/contrib/test_instance_usage_audit_log.py
33
# Copyright (c) 2012 OpenStack Foundation # 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 ...
magic0704/neutron
refs/heads/master
neutron/extensions/quotasv2.py
19
# Copyright 2011 OpenStack Foundation. # 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 req...
AmesianX/js-beautify
refs/heads/master
python/jsbeautifier/unpackers/tests/testmyobfuscate.py
111
# # written by Stefano Sanfilippo <a.little.coder@gmail.com> # """Tests for MyObfuscate unpacker.""" import unittest import os from jsbeautifier.unpackers.myobfuscate import detect, unpack from jsbeautifier.unpackers.tests import __path__ as path INPUT = os.path.join(path[0], 'test-myobfuscate-input.js') OUTPUT ...
davidvon/pipa-pay-server
refs/heads/master
site-packages/wtforms/ext/django/templatetags/wtforms.py
177
""" Template tags for easy WTForms access in Django templates. """ from __future__ import unicode_literals import re from django import template from django.conf import settings from django.template import Variable from ....compat import iteritems register = template.Library() class FormFieldNode(template.Node): ...
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Source/Python/Lib/python27/lib2to3/fixes/fix_ne.py
334
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer that turns <> into !=.""" # Local imports from .. import pytree from ..pgen2 import token from .. import fixer_base class FixNe(fixer_base.BaseFix): # This is so simple that we don't need the pattern com...
blackzw/openwrt_sdk_dev1
refs/heads/master
staging_dir/host/lib/python2.7/distutils/tests/test_install.py
18
"""Tests for distutils.command.install.""" import os import sys import unittest import site from test.test_support import captured_stdout, run_unittest from distutils import sysconfig from distutils.command.install import install from distutils.command import install as install_module from distutils.command.build_ex...
jinxiaoye1987/RyzomCore
refs/heads/master
nel/tools/build_gamedata/processes/1_export.py
3
#!/usr/bin/python # # \file 1_export.py # \brief Run all export processes # \date 2009-02-18 09:22GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Run all export processes # # NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> # Copyright (C) 2010 Winch Gate Property Limited # #...
project-generator/project_generator_definitions
refs/heads/master
tests/test_targets/test_targets.py
4
# Copyright 2015 0xc0170 # # 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, soft...
techmuch/jupyter-wheel
refs/heads/master
__init__.py
1
import ipywidgets as widgets from traitlets import Unicode from IPython.display import display # Used to display widgets in the notebook from IPython.display import Javascript # Used to insert javascript in the notebook from IPython.display import HTML # Used to insert HTML in the notebook # Thank you to the authors ...
blmousee/pyctp
refs/heads/master
example/pyctp2/sbin/xtrader.py
7
# -*- coding:utf-8 -*- """ 在pyctp2的父目录中, 执行 python red.py pyctp2.sbin.trade """ import logging import time from ..common.base import INFO_PATH from ..common.utils import fcustom from ..trader.environ import Environ from ..trader.account import Account from ..md import ctp_md as cm #定制部分 from ..my.ports impo...
ppyordanov/HCI_4_Future_Cities
refs/heads/master
Server/src/virtualenv/Lib/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py
2
# ####################### BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights ...
vipul-sharma20/oh-mainline
refs/heads/master
vendor/packages/scrapy/scrapy/core/downloader/middleware.py
87
""" Downloader Middleware manager See documentation in docs/topics/downloader-middleware.rst """ from scrapy.http import Request, Response from scrapy.middleware import MiddlewareManager from scrapy.utils.defer import mustbe_deferred from scrapy.utils.conf import build_component_list class DownloaderMiddlewareManage...
mindnervestech/mnrp
refs/heads/master
addons/analytic/__init__.py
424
# -*- 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...
jaredly/pyjamas
refs/heads/master
pygtkweb/demos/005-packbox.py
9
#!/usr/bin/env python # example packbox.py import pygtk pygtk.require('2.0') import gtk import sys, string # Helper function that makes a new hbox filled with button-labels. Arguments # for the variables we're interested are passed in to this function. We do # not show the box, but do show everything inside. def m...
vipmike007/tp-qemu
refs/heads/master
qemu/tests/ovs_mirror.py
9
import re import os import glob import shutil import time import logging from autotest.client import os_dep from autotest.client.shared import error from autotest.client.shared import utils from virttest import utils_net from virttest import env_process @error.context_aware def run(test, params, env): """ T...
math-foo/cloudpebble
refs/heads/master
ide/forms.py
3
from django.forms import ModelForm, Select from ide.models.user import UserSettings class SettingsForm(ModelForm): class Meta: model = UserSettings exclude = ('user', 'accepted_terms', 'whats_new') widgets = { 'use_spaces': Select }
lmazuel/ansible
refs/heads/devel
lib/ansible/playbook/task_include.py
48
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
manassolanki/erpnext
refs/heads/develop
erpnext/stock/report/item_price_stock/item_price_stock.py
1
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ def execute(filters=None): columns, data = [], [] columns=get_columns() data=get_data(filters,columns) return columns, da...
rubensmachado/nolearn
refs/heads/master
nolearn/_compat.py
8
import sys PY2 = sys.version_info[0] == 2 if PY2: from ConfigParser import ConfigParser from StringIO import StringIO import cPickle as pickle import __builtin__ as builtins basestring = basestring def chain_exception(exc1, exc2): exec("raise exc1, None, sys.exc_info()[2]") else: ...
wanglei828/apollo
refs/heads/master
modules/tools/prediction/data_pipelines/data_preprocessing/features_labels_utils.py
3
############################################################################### # Copyright 2019 The Apollo 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 # # h...
Orav/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_genexps.py
2
doctests = """ Test simple loop with conditional >>> sum(i*i for i in range(100) if i&1 == 1) 166650 Test simple nesting >>> list((i,j) for i in range(3) for j in range(4) ) [(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (1, 3), (2, 0), (2, 1), (2, 2), (2, 3)] Test nesting wit...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/mobile/shared_dressed_noble_fat_twilek_female_01.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_noble_fat_twilek_female_01.iff" result.attribute_templ...
jordij/wagtail
refs/heads/master
wagtail/wagtailsearch/models.py
9
from __future__ import unicode_literals import datetime from django.db import models from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailsearch.utils import normalise_query_string, MAX_QUERY_STRING...
sbesson/openmicroscopy
refs/heads/develop
components/tools/OmeroPy/test/integration/clitest/test_import_bulk.py
3
# -*- coding: utf-8 -*- # # Copyright (C) 2018 University of Dundee & Open Microscopy Environment. # All rights reserved. # # 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 t...
xingyepei/edx-platform
refs/heads/release
openedx/core/djangoapps/course_groups/migrations/0001_initial.py
112
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models, connection class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'CourseUserGroup' def table_exists(name): return name in connection....
Innovahn/odoo.old
refs/heads/master
openerp/addons/test_documentation_examples/tests/__init__.py
53
# -*- coding: utf-8 -*- from . import test_inheritance, test_extension, test_delegation fast_suite = [ ] checks = [ test_inheritance, test_extension, test_delegation, ]
zomux/nlpy
refs/heads/master
nlpy/deep/trainers/scipy_trainer.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 NLPY.ORG # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html from trainer import SGDTrainer, NeuralTrainer import logging import theano import numpy as np import theano.tensor as T import scipy class ScipyTrainer(NeuralTrainer...
balohmatevz/-tg-station
refs/heads/master
bot/minibot.py
64
#!/usr/bin/env python3 # This bot was made by tkdrg. # Ask #coderbus@irc.rizon.net if this breaks. # See LICENSE-bot_folder.txt for the license of the files in this folder. from config import * import collections import time import pickle import socket import sys import threading import logging logging.basicConfig(lev...
ShanghaiTimes/Audacity2015
refs/heads/master
lib-src/lv2/lv2/plugins/eg-midigate.lv2/waflib/extras/__init__.py
1037
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
foss-transportationmodeling/rettina-server
refs/heads/master
app/views.py
1
import urllib, zipfile, os, shutil, gtfs_parser, glob, uuid from flask import jsonify, request from app import app, db, models from sets import Set from datetime import datetime import thread # decodes a URL-encoded string def decode(url): return urllib.unquote(url).decode('utf8') # returns all agencies @app.ro...
fab13n/caracole
refs/heads/master
floreal/views/getters.py
1
#!/usr/bin/python3 # -*- coding: utf-8 -*- from numbers import Number from floreal import models as m def model_getter(cls, field_names=None): def f(x): if isinstance(x, str) and x.isdigit() or isinstance(x, Number): return cls.objects.get(pk=x) elif isinstance(x, cls): r...
mattt416/neutron
refs/heads/master
neutron/agent/dhcp/agent.py
6
# Copyright 2012 OpenStack Foundation # 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 requ...
NikNitro/Python-iBeacon-Scan
refs/heads/master
sympy/matrices/densearith.py
79
""" Fundamental arithmetic of dense matrices. The dense matrix is stored as a list of lists. """ from sympy.core.compatibility import range def add(matlist1, matlist2, K): """ Adds matrices row-wise. Examples ======== >>> from sympy.matrices.densearith import add >>> from sympy import ZZ ...
mbr/git-todo
refs/heads/master
git_todo/parser.py
1
import click import parsley from visitor import Visitor class Heading(object): def __init__(self, text, underline): self.text = text self.ctype = underline[0] class Entry(object): def __init__(self, text, ctype): self.text = text self.ctype = ctype @property def done...
rcbops/python-django-buildpackage
refs/heads/master
django/core/serializers/xml_serializer.py
293
""" XML serializer. """ from django.conf import settings from django.core.serializers import base from django.db import models, DEFAULT_DB_ALIAS from django.utils.xmlutils import SimplerXMLGenerator from django.utils.encoding import smart_unicode from xml.dom import pulldom class Serializer(base.Serializer): """ ...
slp/qemu-riscos
refs/heads/master
scripts/tracetool.py
85
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Command-line wrapper for the tracetool machinery. """ __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__...
ryancanhelpyou/servo
refs/heads/master
tests/wpt/css-tests/tools/sslutils/openssl.py
43
import functools import os import shutil import subprocess import tempfile from datetime import datetime class OpenSSL(object): def __init__(self, logger, binary, base_path, conf_path, hosts, duration): """Context manager for interacting with OpenSSL. Creates a config file for the duration of the c...
muntasirsyed/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/gdal/prototypes/srs.py
321
from ctypes import c_char_p, c_int, c_void_p, POINTER from django.contrib.gis.gdal.libgdal import lgdal, std_call from django.contrib.gis.gdal.prototypes.generation import \ const_string_output, double_output, int_output, \ srs_output, string_output, void_output ## Shortcut generation for routines with known p...
sansan88/wetterstation
refs/heads/master
identify_sensor.py
1
#=============================================================================== # # load required modules #=============================================================================== import os import glob import time import json os.system('modprobe w1-gpio') os.system('modprobe w1-therm') #===================...
metpy/MetPy
refs/heads/master
tutorials/upperair_soundings.py
2
# Copyright (c) 2016,2017 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ =========================== Upper Air Sounding Tutorial =========================== Upper air analysis is a staple of many synoptic and mesoscale analysis problems. In this...
dmnfarrell/epitopemap
refs/heads/master
languages/it-it.py
1
# -*- coding: utf-8 -*- { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ', '%s rows deleted': '%s righe ("record") canc...
cybertk/depot_tools
refs/heads/master
third_party/logilab/astng/exceptions.py
21
# This program 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 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be usefu...
vinodkc/spark
refs/heads/master
python/pyspark/streaming/__init__.py
152
# # 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...
yencarnacion/jaikuengine
refs/heads/master
.google_appengine/lib/django-1.2/django/contrib/gis/db/backends/mysql/creation.py
613
from django.db.backends.mysql.creation import DatabaseCreation class MySQLCreation(DatabaseCreation): def sql_indexes_for_field(self, model, f, style): from django.contrib.gis.db.models.fields import GeometryField output = super(MySQLCreation, self).sql_indexes_for_field(model, f, style) ...
zhengwsh/InplusTrader_Linux
refs/heads/master
rqalpha/examples/data_source/__init__.py
21
# -*- coding: utf-8 -*- # # Copyright 2017 Ricequant, 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 ...
npiganeau/odoo
refs/heads/master
addons/payment_adyen/models/adyen.py
136
# -*- coding: utf-'8' "-*-" import base64 try: import simplejson as json except ImportError: import json from hashlib import sha1 import hmac import logging import urlparse from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment_adyen.controllers.main import Adye...
40223148/2015cd_midterm
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/importlib/abc.py
743
"""Abstract base classes related to import.""" from . import _bootstrap from . import machinery try: import _frozen_importlib except ImportError as exc: if exc.name != '_frozen_importlib': raise _frozen_importlib = None import abc import imp import marshal import sys import tokenize import warnings ...
bswartz/cinder
refs/heads/master
cinder/db/sqlalchemy/migrate_repo/versions/065_add_replication_info_to_service.py
8
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
coolbombom/CouchPotatoServer
refs/heads/master
libs/requests/packages/charade/sbcsgroupprober.py
2935
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
brunobergher/dotfiles
refs/heads/master
sublime/python-jinja2/all/jinja2/__init__.py
303
# -*- coding: utf-8 -*- """ jinja2 ~~~~~~ Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment. Nutshell -------- Here a small example of a Jinja2 template:: {% ...
papouso/odoo
refs/heads/8.0
addons/sales_team/__init__.py
365
# -*- 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...
cstavr/synnefo
refs/heads/develop
snf-astakos-app/astakos/im/migrations/0016_auth_providers_and_projects.py
10
# encoding: utf-8 import datetime import uuid from south.db import db from south.v2 import DataMigration from django.db import models from django.core.validators import email_re from django.conf import settings class Migration(DataMigration): def forwards(self, orm): # valid activation_sent/email_verifi...
lmr/autotest
refs/heads/master
client/deps/disktest/disktest.py
10
#!/usr/bin/python pass
sprintingkiwi/PYDOJO
refs/heads/master
actors/pyco.py
1
from pydojo import * from . gobo import Gobo class Pyco(Actor): def setup(self): self.touched_gobo = False self.setx(100) self.testtimer = Timer(2000) self.rotate('flip') def update(self): if key(RIGHT): self.point(90) self.forward(10) ...
openfun/edx-platform
refs/heads/master
common/test/acceptance/tests/studio/test_studio_settings_certificates.py
20
""" Acceptance tests for Studio's Setting pages """ from .base_studio_test import StudioCourseTest from ...pages.studio.settings_certificates import CertificatesPage class CertificatesTest(StudioCourseTest): """ Tests for settings/certificates Page. """ def setUp(self, is_staff=False): super(C...
hunch/hunch-gift-app
refs/heads/master
django/contrib/localflavor/in_/in_states.py
12
""" A mapping of state misspellings/abbreviations to normalized abbreviations, and an alphabetical list of states for use as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ STATE_CHOICES = ( ('KA', 'Karnataka'), ('AP', ...