repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
jgoclawski/django
refs/heads/master
tests/template_tests/test_callables.py
347
from __future__ import unicode_literals from unittest import TestCase from django.template import Context, Engine class CallableVariablesTests(TestCase): @classmethod def setUpClass(cls): cls.engine = Engine() super(CallableVariablesTests, cls).setUpClass() def test_callable(self): ...
salamb/girder
refs/heads/master
girder/api/v1/resource.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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 cop...
BrandoJS/Paparazzi_vtol
refs/heads/master
sw/ground_segment/python/dashboard/dashboardframe.py
52
import wx import sys import os import time import threading import math import pynotify sys.path.append(os.getenv("PAPARAZZI_HOME") + "/sw/lib/python") import messages_tool WIDTH = 120 HEIGHT = 120 UPDATE_INTERVAL = 250 WARN_INTERVAL = 3000 BATTERY_WARN = 6.5 RADS_SEC_TO_RPM = 60 / (2 * math.pi) class DashboardFra...
ftrader-bitcoinabc/bitcoin-abc
refs/heads/master
contrib/linearize/linearize-data.py
3
#!/usr/bin/env python3 # # linearize-data.py: Construct a linear, no-fork version of the chain. # # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import print...
tundebabzy/frappe
refs/heads/develop
frappe/tests/test_email.py
6
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import unittest, frappe, re, email from frappe.test_runner import make_test_records make_test_records("User") make_test_records("Email Account") class TestEmail(unittest.TestCa...
rlr/fjord
refs/heads/master
vendor/packages/translate-toolkit/translate/misc/typecheck/doctest_support.py
30
""" This module allows doctest to find typechecked functions. Currently, doctest verifies functions to make sure that their globals() dict is the __dict__ of their module. In the case of decorated functions, the globals() dict *is* not the right one. To enable support for doctest do: import typecheck.doctest...
kingsdigitallab/gssn-django
refs/heads/master
cms/migrations/0002_alter_streamfield_blocks.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-29 11:24 from __future__ import unicode_literals import cms.models.streamfield from django.db import migrations import wagtail.wagtailcore.blocks import wagtail.wagtailcore.fields import wagtail.wagtaildocs.blocks import wagtail.wagtailembeds.blocks import...
mdj2/django
refs/heads/master
tests/admin_scripts/app_with_import/models.py
152
from django.db import models from django.contrib.comments.models import Comment # Regression for #13368. This is an example of a model # that imports a class that has an abstract base class. class CommentScore(models.Model): comment = models.OneToOneField(Comment, primary_key=True)
goodwinnk/intellij-community
refs/heads/master
python/testData/refactoring/move/reformatFromImports/after/src/lib.py
60
class Class1: pass class Class2: pass
WillianPaiva/ycmd
refs/heads/master
cpp/ycm/tests/gmock/gtest/scripts/fuse_gtest_files.py
2577
#!/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...
leafstorm/matthews-flask-skeleton
refs/heads/master
myapp/manager.py
1
# -*- coding: utf-8 -*- """ myapp.manager ============= This contains commands for the management script. :copyright: (C) 2011, Matthew Frazier :license: MIT/X11, see LICENSE for details """ from flask import current_app from flaskext.script import Manager from .application import create_app manager = Manager(creat...
leekchan/django_test
refs/heads/master
tests/admin_custom_urls/models.py
78
from functools import update_wrapper from django.contrib import admin from django.core.urlresolvers import reverse from django.db import models from django.http import HttpResponseRedirect from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Action(models.Model): name ...
NEAT-project/neat
refs/heads/master
policy/pmrest.py
1
import asyncio import json import logging import random from contextlib import suppress import pmdefaults as PM try: import aiohttp from aiohttp import web except ImportError as e: web = None logging.warning("aiohttp in required to start the REST interface, but it is not installed") try: resthelp...
sravaniaitha/python
refs/heads/master
burness/0019/xls2xml3.py
40
#-*- coding: utf-8-*- import xlrd,codecs from lxml import etree def xls_xml(file_name): data = [] excel = xlrd.open_workbook(file_name) table = excel.sheet_by_name('numbers') # print(table.row_values(0)) nrows = table.nrows for i in range(nrows): data.append(table.row_values(i)) output = codecs.open('numbers...
zfil/ansible
refs/heads/devel
lib/ansible/plugins/connections/winrm.py
69
# (c) 2014, Chris Church <chris@ninemoreminutes.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 lat...
waprin/gcloud-python
refs/heads/master
gcloud/bigquery/test_dataset.py
3
# 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 by applicable law or a...
DanielDelchev/HomeAutomation
refs/heads/master
setup.py
1
from setuptools import setup, find_packages setup( name="HomeAutomation", version="0.2", packages=find_packages(), install_requires=['RPi.GPIO>=0.6.2', 'bottle>=0.12.9','Beaker>=1.8.1','bottle-beaker>=0.1.3','bottle-cork>=0.12.0'], author="DanielDelchev", author_email="i...
harukaeru/django-nose
refs/heads/master
testapp/plugins.py
8
"""Additional plugins for testing plugins.""" from nose.plugins import Plugin plugin_began = False class SanityCheckPlugin(Plugin): """Test plugin that registers that it ran.""" enabled = True def options(self, parser, env): """Register commandline options.""" def configure(self, options,...
ville-k/tensorflow
refs/heads/master
tensorflow/python/ops/standard_ops.py
21
# 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...
gquirozbogner/contentbox-master
refs/heads/master
third_party/social/backends/douban.py
82
""" Douban OAuth1 and OAuth2 backends, docs at: http://psa.matiasaguirre.net/docs/backends/douban.html """ from social.backends.oauth import BaseOAuth2, BaseOAuth1 class DoubanOAuth(BaseOAuth1): """Douban OAuth authentication backend""" name = 'douban' EXTRA_DATA = [('id', 'id')] AUTHORIZATION_URL...
tarikkdiry/Flock
refs/heads/master
flask/lib/python2.7/site-packages/sqlalchemy/orm/util.py
7
# orm/util.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .. import sql, util, event, exc as sa_exc, inspection from ..sql import expression...
Just-D/chromium-1
refs/heads/master
tools/symsrc/pefile.py
187
# -*- coding: Latin-1 -*- """pefile, Portable Executable reader module All the PE file basic structures are available with their default names as attributes of the instance returned. Processed elements such as the import table are made available with lowercase names, to differentiate them from the upper case basic s...
ChameleonCloud/horizon
refs/heads/chameleoncloud/train
openstack_dashboard/theme_settings.py
3
# Copyright 2016 Hewlett Packard Enterprise Software, LLC # 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...
jeasoft/odoo
refs/heads/marcos-8.0
addons/web_calendar/__openerp__.py
422
{ 'name': 'Web Calendar', 'category': 'Hidden', 'description':""" OpenERP Web Calendar view. ========================== """, 'author': 'OpenERP SA, Valentino Lab (Kalysto)', 'version': '2.0', 'depends': ['web'], 'data' : [ 'views/web_calendar.xml', ], 'qweb': [ 'stat...
Aloomaio/googleads-python-lib
refs/heads/master
examples/ad_manager/v201811/activity_service/update_activities.py
1
#!/usr/bin/env 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 requir...
gangadharkadam/v6_frappe
refs/heads/develop
frappe/patches/v5_0/fix_null_date_datetime.py
68
from __future__ import unicode_literals import frappe def execute(): for table in frappe.db.get_tables(): changed = False desc = frappe.db.sql("desc `{table}`".format(table=table), as_dict=True) for field in desc: if field["Type"] == "date": frappe.db.sql("""update `{table}` set `{fieldname}`=null where ...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/mobile/shared_dressed_rebel_specforce_sergeant_moncal_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_rebel_specforce_sergeant_moncal_female_01.iff" result....
Danceiny/HackGirlfriend
refs/heads/master
Spider/WeiboSpider/tasks/repost.py
1
# -*-coding:utf-8 -*- from db import wb_data from db import weibo_repost from tasks.workers import app from page_parse import repost from logger.log import crawler from db.redis_db import IdNames from page_get.basic import get_page from page_get import user as user_get from config.conf import get_max_repost_page base...
waynenilsen/cookiecutter-python-rust-proto
refs/heads/master
tests/__init__.py
14224
# -*- coding: utf-8 -*-
adrienbrunet/django-angular
refs/heads/master
examples/server/tests/__init__.py
14224
# -*- coding: utf-8 -*-
rwl/openpowersystem
refs/heads/master
rdflib/syntax/parsers/n3p/n3meta.py
4
#!/usr/bin/env python """n3meta - For use with n3p.py.""" # Automatically generated by pkltopy.py import re branches = {u'_:jcOJHCYs16': {u',': [u',', 'http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs16'], u'.': [], ...
izhan/Stream-Framework
refs/heads/master
feedly/tests/storage/redis/timeline_storage.py
5
from feedly.tests.storage.base import TestBaseTimelineStorageClass from feedly.storage.redis.timeline_storage import RedisTimelineStorage class TestRedisTimelineStorageClass(TestBaseTimelineStorageClass): storage_cls = RedisTimelineStorage
uclouvain/OSIS-Louvain
refs/heads/master
attribution/views/perms.py
2
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
dgzurita/odoo
refs/heads/8.0
addons/base_import_module/__openerp__.py
322
{ 'name': 'Base import module', 'description': """ Import a custom data module =========================== This module allows authorized users to import a custom data module (.xml files and static assests) for customization purpose. """, 'category': 'Uncategorized', 'website': 'https://www.odoo.com', ...
henriknelson/micropython
refs/heads/master
tests/basics/async_with2.py
43
# test waiting within async with enter/exit functions import sys if sys.implementation.name == 'micropython': # uPy allows normal generators to be awaitables coroutine = lambda f: f else: import types coroutine = types.coroutine @coroutine def f(x): print('f start:', x) yield x + 1 yield x...
cwisecarver/osf.io
refs/heads/develop
scripts/osfstorage/files_audit.py
4
#!/usr/bin/env python # encoding: utf-8 """Verify that all OSF Storage files have Glacier backups and parity files, creating any missing backups. TODO: Add check against Glacier inventory Note: Must have par2 installed to run """ from __future__ import division import gc import os import math import hashlib import ...
bradkav/WIMpy
refs/heads/master
MyParser.py
1
import numpy as np def ReadParam(filename, param_name): f = open(filename) for line in f: vals = np.array(map(str, line.split())) if (len(vals) > 0): if (vals[0] == param_name): return vals[1] #f=open("Xenon.txt") #for line in f: # vals = np.array(map(str, line....
eneldoserrata/marcos_openerp
refs/heads/master
addons/stock/wizard/stock_partial_picking.py
19
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
kivymd/KivyMD
refs/heads/master
demos/rally/libs/baseclass/settings_screen.py
1
from kivy.properties import BooleanProperty from kivymd.uix.list import OneLineListItem from kivymd.uix.screen import MDScreen class RallySettingsScreen(MDScreen): list_created = BooleanProperty(False) def on_pre_enter(self): if not self.list_created: items = [ "Manage ac...
dllsf/odootest
refs/heads/master
openerp/addons/base/tests/test_db_cursor.py
175
# -*- coding: utf-8 -*- import unittest2 import openerp from openerp.tools.misc import mute_logger from openerp.tests import common DB = common.DB ADMIN_USER_ID = common.ADMIN_USER_ID def registry(): return openerp.modules.registry.RegistryManager.get(DB) class test_cr_execute(unittest2.TestCase): """ Try...
choffee/tetris_table
refs/heads/master
test_tetris.py
1
#!/usr/bin/env python3 from games import tetris import pytest def test_rotate_shape_test(): tm = [[1, 0, 1], [0, 1, 0]] assert tetris.rotate_shape(tm) == [[1, 0], [0, 1], [1, 0]]
smurn/augast
refs/heads/master
lenatu/__init__.py
2
from lenatu._block import Block, augment_blocks from lenatu._scope import augment_scopes def augment(node): augment_blocks(node) augment_scopes(node.defined_block)
dylanlesko/youtube-dl
refs/heads/master
youtube_dl/extractor/iqiyi.py
49
# coding: utf-8 from __future__ import unicode_literals import hashlib import math import random import time import uuid from .common import InfoExtractor from ..compat import compat_urllib_parse from ..utils import ExtractorError class IqiyiIE(InfoExtractor): IE_NAME = 'iqiyi' IE_DESC = '爱奇艺' _VALID_U...
VasuAgrawal/tartanHacks2015
refs/heads/master
site/flask/lib/python2.7/site-packages/migrate/versioning/config.py
153
#!/usr/bin/python # -*- coding: utf-8 -*- from sqlalchemy.util import OrderedDict __all__ = ['databases', 'operations'] databases = ('sqlite', 'postgres', 'mysql', 'oracle', 'mssql', 'firebird') # Map operation names to function names operations = OrderedDict() operations['upgrade'] = 'upgrade' operations['downgra...
blublud/networkx
refs/heads/master
networkx/readwrite/nx_yaml.py
42
""" **** YAML **** Read and write NetworkX graphs in YAML format. "YAML is a data serialization format designed for human readability and interaction with scripting languages." See http://www.yaml.org for documentation. Format ------ http://pyyaml.org/wiki/PyYAML """ __author__ = """Aric Hagberg (hagberg@lanl.gov)"...
KaranToor/MA450
refs/heads/master
google-cloud-sdk/lib/surface/compute/target_http_proxies/describe.py
6
# Copyright 2014 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 by applicable law or ag...
ksemish/KseniyaRepository
refs/heads/master
conftest.py
1
import pytest from fixture.application import Application import json import os.path import importlib import jsonpickle from fixture.db_data import DbFixture fixture = None target = None def load_config(file): global target if target is None: config_file = os.path.join(os.path.dirname(os.path.abspa...
lightcn/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...
Charleo85/SIS-Rebuild
refs/heads/master
webv2/web/settings.py
2
""" Django settings for web project. Generated by 'django-admin startproject' using Django 1.8.14. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths i...
glovebx/odoo
refs/heads/8.0
addons/stock_dropshipping/wizard/__init__.py
313
# -*- 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...
Krienas/allianceauth
refs/heads/master
allianceauth/eveonline/autogroups/tests/test_signals.py
4
from django.test import TestCase from django.contrib.auth.models import User from allianceauth.tests.auth_utils import AuthUtils from allianceauth.eveonline.models import EveCharacter, EveCorporationInfo, EveAllianceInfo from ..models import AutogroupsConfig from . import patch, disconnect_signals, connect_signals ...
timduru/platform-external-chromium_org
refs/heads/katkiss-4.4
tools/json_schema_compiler/highlighters/none_highlighter.py
179
# 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. import cgi class NoneHighlighter(object): """Highlighter that just wraps code in a <pre>. """ def GetCSS(self, style): return '' def GetCod...
diorcety/intellij-community
refs/heads/master
python/testData/intentions/beforeConvertTripleQuotedUnicodeString.py
83
s = u"""<caret>string """
dbbhattacharya/kitsune
refs/heads/master
vendor/packages/selenium/py/selenium/webdriver/common/utils.py
26
# Copyright 2008-2011 WebDriver committers # Copyright 2008-2011 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 requ...
Luffin/powerline
refs/heads/develop
powerline/segments/common/env.py
15
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import os from powerline.lib.unicode import out_u from powerline.theme import requires_segment_info from powerline.segments import Segment, with_docstring @requires_segment_info def environment(pl, seg...
pcm17/tensorflow
refs/heads/master
tensorflow/contrib/training/python/training/sampling_ops.py
41
# 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...
rackerlabs/django-DefectDojo
refs/heads/master
dojo/unittests/test_sslscan_parser.py
2
from django.test import TestCase from dojo.tools.sslscan.parser import SslscanXMLParser from dojo.models import Test class TestSslscanParser(TestCase): def test_parse_without_file_has_no_findings(self): parser = SslscanXMLParser(None, Test()) self.assertEqual(0, len(parser.items)) def test_p...
pymedusa/Medusa
refs/heads/master
ext/wrapt/__init__.py
10
__version_info__ = ('1', '10', '11') __version__ = '.'.join(__version_info__) from .wrappers import (ObjectProxy, CallableObjectProxy, FunctionWrapper, BoundFunctionWrapper, WeakFunctionProxy, resolve_path, apply_patch, wrap_object, wrap_object_attribute, function_wrapper, wrap_function_wrapper...
vponomaryov/rally
refs/heads/master
rally/common/broker.py
13
# Copyright 2014: Mirantis 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...
alexandreleroux/mayavi
refs/heads/master
tvtk/pyface/ui/qt4/__init__.py
8
# Copyright (c) 2005-2011, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only # under the conditions described in the aforementioned license. The license # is also available online at http://ww...
googleapis/python-dialogflow
refs/heads/master
google/cloud/dialogflow_v2beta1/services/sessions/async_client.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
frewsxcv/servo
refs/heads/master
tests/wpt/web-platform-tests/old-tests/webdriver/element_state/method_test.py
141
import os import sys import unittest sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) import base_test class GetElementAttributeTest(base_test.WebDriverBaseTest): def test_get_element_attribute(self): self.driver.get(self.webserver.where_is("element_state/res/element-with-id-attribute...
iScienceLuvr/quepy
refs/heads/develop
examples/dbpedia/dbpedia/dsl.py
4
# coding: utf-8 # Copyright (c) 2012, Machinalis S.R.L. # This file is part of quepy and is distributed under the Modified BSD License. # You should have received a copy of license in the LICENSE file. # # Authors: Rafael Carrascosa <rcarrascosa@machinalis.com> # Gonzalo Garcia Berrotaran <ggarcia@machinalis....
vipul-sharma20/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/conch/test/test_cftp.py
17
# -*- test-case-name: twisted.conch.test.test_cftp -*- # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE file for details. """ Tests for L{twisted.conch.scripts.cftp}. """ import locale import time, sys, os, operator, getpass, struct from StringIO import StringIO from twisted.conch.test.test_ssh i...
upeu-jul-20161-epis-ads2/MedicFast
refs/heads/master
apps/sad/managers.py
3
# _*_ coding: utf-8 _*_ """ @copyright Copyright (c) 2014 Submit Consulting @author Angel Sullon (@asullom) @package sad Descripcion: Implementacion de los managers de la app sad """ from django.db import models #from django.db.models.query import QuerySet from django.db.models import Q from django.conf im...
kaiix/depot_tools
refs/heads/master
third_party/gsutil/gslib/wildcard_iterator.py
50
# Copyright 2010 Google Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge,...
ArcherSys/ArcherSys
refs/heads/master
skulpt/src/lib/httplib.py
1
raise NotImplementedError("httplib is not yet implemented in Skulpt")
akretion/odoo
refs/heads/12-patch-paging-100-in-o2m
addons/product/tests/common.py
12
# -*- coding: utf-8 -*- from odoo.tests import common class TestProductCommon(common.SavepointCase): @classmethod def setUpClass(cls): super(TestProductCommon, cls).setUpClass() # Customer related data cls.partner_1 = cls.env['res.partner'].create({ 'name': 'Julia Agrola...
charityscience/csh-sms
refs/heads/master
cshsms/urls.py
1
"""cshsms URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
benhoff/plugins
refs/heads/master
listenerplugins/factoids.py
18
import string import asyncio import re from sqlalchemy import Table, Column, String import requests from cloudbot import hook from cloudbot.util import database, colors, web re_lineends = re.compile(r'[\r\n]*') FACTOID_CHAR = "?" # TODO: config table = Table( "mem", database.metadata, Column("word", ...
bramalingam/openmicroscopy
refs/heads/develop
components/tests/ui/setup.py
5
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Set up script These are fairly trivial script that creates a Project/Dataset and import the images into the newly created datasets. this is only for the root user. Copyright 2013 University of Dundee. All rights reserved. Use is subject to ...
bdoner/SickRage
refs/heads/master
lib/pyasn1/codec/cer/__init__.py
3653
# This file is necessary to make this directory a package.
gravyboat/python-exercises
refs/heads/master
tests/ex17_tests.py
1
from nose.tools import * from exercises import ex17 def test_palindrome_sentence_recognizer(): ''' Check a basic sentence works as a palindrome ''' filtered_sentence = ex17.palindrome_sentence_recognizer('Rise to vote sir') assert_true(filtered_sentence) def test_not_palindrome_sentence_recogni...
rooshilp/CMPUT410W15-project
refs/heads/master
testenv/lib/python2.7/site-packages/django/middleware/transaction.py
54
import warnings from django.core.exceptions import MiddlewareNotUsed from django.db import connection, transaction from django.utils.deprecation import RemovedInDjango18Warning class TransactionMiddleware(object): """ Transaction middleware. If this is enabled, each view function will be run with commit_...
campbe13/openhatch
refs/heads/master
vendor/packages/kombu/examples/simple_receive.py
31
""" Example receiving a message using the SimpleQueue interface. """ from kombu import Connection #: Create connection #: If hostname, userid, password and virtual_host is not specified #: the values below are the default, but listed here so it can #: be easily changed. with Connection('amqp://guest:guest@localhost:5...
arbrandes/edx-platform
refs/heads/master
openedx/core/djangoapps/ace_common/settings/common.py
5
""" Settings for ace_common app. """ def plugin_settings(settings): # lint-amnesty, pylint: disable=missing-function-docstring, missing-module-docstring settings.ACE_ENABLED_CHANNELS = [ 'django_email' ] settings.ACE_ENABLED_POLICIES = [ 'bulk_email_optout' ] settings.ACE_CHANNEL_...
pam-bot/SMSBeds
refs/heads/master
lib/mechanize/_auth.py
137
"""HTTP Authentication and Proxy support. Copyright 2006 John J. Lee <jjl@pobox.com> This code is free software; you can redistribute it and/or modify it under the terms of the BSD or ZPL 2.1 licenses (see the file COPYING.txt included with the distribution). """ from _urllib2_fork import HTTPPasswordMgr # TODO:...
mglukhikh/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/tests/test_geoforms.py
94
from django.forms import ValidationError from django.contrib.gis import forms from django.contrib.gis.geos import GEOSGeometry from django.utils import unittest class GeometryFieldTest(unittest.TestCase): def test00_init(self): "Testing GeometryField initialization with defaults." fld = forms.Geo...
anne-urai/serialDDM
refs/heads/master
graphicalModels/docs/gen_example.py
7
#!/usr/bin/env python from __future__ import print_function import os import sys import json from subprocess import check_call this_path = os.path.dirname(os.path.abspath(__file__)) daft_path = os.path.dirname(this_path) sys.path.insert(0, daft_path) example_dir = os.path.join(daft_path, "examples") out_dir = os.p...
loopCM/chromium
refs/heads/trunk
third_party/tlslite/make_release.py
83
#When run on (my) windows box, this builds and cleans everything in #preparation for a release. import os import sys #Replace version strings if len(sys.argv)>1: oldVersion = sys.argv[1] newVersion = sys.argv[2] query = raw_input("Replace %s with %s?: " % (oldVersion, newVersion)) if query == "y": ...
noemis-fr/custom
refs/heads/7.0
patch_email_templates/models/__init__.py
1
# -*- encoding: utf-8 -*- #from . import sale_order from . import mail_mail
cdcapano/pycbc
refs/heads/master
tools/timing/correlate_perf.py
11
from pycbc.filter import correlate from pycbc.filter.matchedfilter import BatchCorrelator, Correlator from pycbc.types import zeros, complex64, complex128, Array from time import time from numpy.random import uniform niter = 2000 for N in [2**10, 2**15, 2**18]: a = zeros(N, dtype=complex64) a.data += uniform(...
eort/OpenSesame
refs/heads/master
libopensesame/sketchpad_elements/_circle.py
3
#-*- coding:utf-8 -*- """ This file is part of OpenSesame. OpenSesame 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. OpenSesame is distri...
wpoely86/easybuild-framework
refs/heads/develop
test/framework/asyncprocess.py
3
## # Copyright 2012-2016 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 (F...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/networkx/algorithms/centrality/katz.py
6
# coding=utf8 # Copyright (C) 2004-2018 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. # # Authors: Aric Hagberg (aric.hagberg@gmail.com) # Pieter Swart (swart@lanl.gov) # Sasha Gutfraind (...
pedro2d10/SickRage-FR
refs/heads/develop
lib/unidecode/x05a.py
252
data = ( 'Song ', # 0x00 'Wei ', # 0x01 'Hong ', # 0x02 'Wa ', # 0x03 'Lou ', # 0x04 'Ya ', # 0x05 'Rao ', # 0x06 'Jiao ', # 0x07 'Luan ', # 0x08 'Ping ', # 0x09 'Xian ', # 0x0a 'Shao ', # 0x0b 'Li ', # 0x0c 'Cheng ', # 0x0d 'Xiao ', # 0x0e 'Mang ', # 0x0f 'Fu ', # 0x1...
Buckmarble/elite_shamu
refs/heads/cm-12.0
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# system call counts, by pid # (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, sys sys.path.append(os.env...
MakeHer/edx-platform
refs/heads/dashboard.2
lms/djangoapps/courseware/tests/test_self_paced_overrides.py
31
""" Tests for self-paced course due date overrides. """ from datetime import datetime from dateutil.tz import tzutc from django.test.utils import override_settings from student.tests.factories import UserFactory from lms.djangoapps.ccx.tests.test_overrides import inject_field_overrides from lms.djangoapps.courseware....
bulentsoykan/or-tools
refs/heads/master
examples/python/3_jugs_regular.py
32
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com # # 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 ...
gsnbng/erpnext
refs/heads/develop
erpnext/patches/v11_0/update_delivery_trip_status.py
6
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc('setup', 'doctype', 'global_defaults', force=True) frappe.reload_doc('stock', 'doctype', 'delivery_trip') frappe.reload_doc(...
kronat/ns-3-dev-git
refs/heads/master
src/mesh/bindings/callbacks_list.py
3
callback_classes = [ ['ns3::ObjectBase *', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['...
geekboxzone/lollipop_external_chromium-trace
refs/heads/geekbox
trace-viewer/third_party/pywebsocket/src/example/bench_wsh.py
495
# Copyright 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 f...
rbaindourov/v8-inspector
refs/heads/master
Source/chrome/tools/gyp/pylib/gyp/input_test.py
1841
#!/usr/bin/env python # Copyright 2013 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. """Unit tests for the input.py file.""" import gyp.input import unittest import sys class TestFindCycles(unittest.TestCase): def setUp(self...
GoogleCloudPlatform/datacatalog-connectors-bi
refs/heads/master
google-datacatalog-looker-connector/src/google/datacatalog_connectors/looker/prepare/datacatalog_entry_factory.py
1
#!/usr/bin/python # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
tillahoffmann/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/ops/bijectors/chain.py
85
# 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...
pranner/CMPUT410-Lab6-Django
refs/heads/master
v1/lib/python2.7/site-packages/django/contrib/gis/gdal/prototypes/ds.py
79
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER from django.contrib.gis.gdal.envelope import OGREnvelope from djang...
emergent-interfaces/open-playout
refs/heads/master
src/config/test_simple.py
1
self.install(VideoTestGen, "video1", (100, 100)) self.install(Monitor, "screen1", (300, 100)) self.wire('video1.out', 'screen1.in')
groschovskiy/keyczar
refs/heads/master
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Scanner/IDL.py
19
"""SCons.Scanner.IDL This module implements the depenency scanner for IDL (Interface Definition Language) files. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and asso...
jctanner/ansible
refs/heads/devel
test/units/ansible_test/conftest.py
40
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import pytest import sys @pytest.fixture(autouse=True, scope='session') def ansible_test(): """Make ansible_test available on sys.path for unit testing ansible-test.""" test_lib = os.path.join(os.path.dirname(o...
pipermerriam/django
refs/heads/master
tests/i18n/patterns/urls/default.py
384
from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns from django.utils.translation import ugettext_lazy as _ from django.views.generic import TemplateView view = TemplateView.as_view(template_name='dummy.html') urlpatterns = [ url(r'^not-prefixed/$', view, name='not-prefixed')...