repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
MarkusHackspacher/unknown-horizons | refs/heads/master | horizons/ai/aiplayer/personality/other.py | 1 | # ###################################################
# Copyright (C) 2008-2017 The Unknown Horizons Team
# team@unknown-horizons.org
# This file is part of Unknown Horizons.
#
# Unknown Horizons is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... |
MKLab-ITI/prophet | refs/heads/master | rdflib/plugins/parsers/pyRdfa/extras/__init__.py | 25 | """
Collection of external modules that are used by pyRdfa and are added for an easier
distribution
"""
|
jk1/intellij-community | refs/heads/master | python/testData/copyPaste/SimpleExpressionPartCaretAtLineEnd.src.py | 37 | <selection>20</selection> |
btyh17mxy/dynamic-dns | refs/heads/master | config.py | 2 | #!/usr/bin/env python
# coding: utf-8
from jsob import JsOb
import json
config_file_path = '/etc/dynamic-dns.json'
# config_file_path = 'config.json.sample'
with open(config_file_path, 'r') as f_config:
config = JsOb(**json.load(f_config))
def main():
print config
pass
if __name__ == '__main__':
ma... |
Blaze344/top-down-space-shooter- | refs/heads/master | render.py | 1 | import pygame
from pygame.math import Vector2
from math import sin,cos,pi,degrees,radians,sqrt
from objects import all_groups
graphwidth = 1400
graphheight = 900
MAXDISTANCE = sqrt(graphwidth**2 + graphheight**2)
class Camera(object):
def __init__(self,parent,surface):
self.parent = parent
self.surface = surfa... |
hhursev/recipe-scraper | refs/heads/master | tests/test_cookinglight.py | 1 | from recipe_scrapers.cookinglight import CookingLight
from tests import ScraperTest
class TestCookingLight(ScraperTest):
scraper_class = CookingLight
def test_host(self):
self.assertEqual("cookinglight.com", self.harvester_class.host())
def test_canonical_url(self):
self.assertEqual(
... |
maljac/odoo-addons | refs/heads/8.0 | project_long_term/wizard/__init__.py | 9 | # -*- coding: utf-8 -*-s
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... |
sgallagher/reviewboard | refs/heads/master | reviewboard/webapi/resources/root.py | 5 | from __future__ import unicode_literals
from djblets.util.decorators import augment_method_from
from djblets.webapi.resources.root import RootResource as DjbletsRootResource
from reviewboard.webapi.server_info import get_server_info
from reviewboard.webapi.decorators import (webapi_check_login_required,
... |
KhalidGit/flask | refs/heads/master | Work/Trivia - Module 5/env/Lib/site-packages/pip/commands/show.py | 344 | import os
from pip.basecommand import Command
from pip.log import logger
from pip._vendor import pkg_resources
class ShowCommand(Command):
"""Show information about one or more installed packages."""
name = 'show'
usage = """
%prog [options] <package> ..."""
summary = 'Show information about in... |
runarberg/servo | refs/heads/master | tests/wpt/css-tests/tools/pywebsocket/src/test/test_util.py | 449 | #!/usr/bin/env python
#
# 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... |
kkirsche/trigger | refs/heads/develop | trigger/acl/queue.py | 12 | # -*- coding: utf-8 -*-
"""
Database interface for automated ACL queue. Used primarily by ``load_acl`` and
``acl``` commands for manipulating the work queue.
>>> from trigger.acl.queue import Queue
>>> q = Queue()
>>> q.list()
(('dc1-abc.net.aol.com', 'datacenter-protect'), ('dc2-abc.net.aol.com',
... |
mchiba52/mystocks-angularv2 | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py | 2354 | # Unmodified from http://code.activestate.com/recipes/576693/
# other than to add MIT license header (as specified on page, but not in code).
# Linked from Python documentation here:
# http://docs.python.org/2/library/collections.html#collections.OrderedDict
#
# This should be deleted once Py2.7 is available on all bot... |
ArcherCraftStore/ArcherVMPeridot | refs/heads/master | Python/Lib/test/test_modulefinder.py | 10 | import os
import errno
import importlib.machinery
import py_compile
import shutil
import unittest
import tempfile
from test import support
import modulefinder
TEST_DIR = tempfile.mkdtemp()
TEST_PATH = [TEST_DIR, os.path.dirname(tempfile.__file__)]
# Each test description is a list of 5 items:
#
# 1. a module name t... |
hdinsight/hue | refs/heads/master | desktop/core/ext-py/boto-2.38.0/boto/sdb/db/manager/sdbmanager.py | 153 | # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010 Chris Moyer http://coredumped.org/
#
# 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,... |
cjaymes/pyscap | refs/heads/master | src/scap/model/oval_5/NotesType.py | 1 | # Copyright 2016 Casey Jaymes
# This file is part of PySCAP.
#
# PySCAP 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.
#
# PySCAP is ... |
andymason/istheansweryes | refs/heads/master | lib/itsdangerous.py | 296 | # -*- coding: utf-8 -*-
"""
itsdangerous
~~~~~~~~~~~~
A module that implements various functions to deal with untrusted
sources. Mainly useful for web applications.
:copyright: (c) 2011 by Armin Ronacher and the Django Software Foundation.
:license: BSD, see LICENSE for more details.
"""
imp... |
tumbl3w33d/ansible | refs/heads/devel | test/integration/targets/old_style_cache_plugins/plugins/cache/redis.py | 83 | # (c) 2014, Brian Coca, Josh Drake, et al
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
cache: redis
short_description: Use Redis... |
aaijazi/vitess | refs/heads/master | py/vtproto/queryservice_pb2.py | 1 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: queryservice.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _... |
nextgis/NextGIS_QGIS_open | refs/heads/ngq-15_0 | python/plugins/processing/algs/lidar/lastools/lasgrid.py | 9 | # -*- coding: utf-8 -*-
"""
***************************************************************************
lasgrid.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
---------------------
D... |
dlazz/ansible | refs/heads/devel | lib/ansible/modules/network/f5/bigip_gtm_wide_ip.py | 14 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
openstack/horizon | refs/heads/master | openstack_dashboard/enabled/_1320_project_volumes_panel.py | 6 | # The slug of the panel to be added to HORIZON_CONFIG. Required.
PANEL = 'volumes'
# The slug of the dashboard the PANEL associated with. Required.
PANEL_DASHBOARD = 'project'
# The slug of the panel group the PANEL is associated with.
PANEL_GROUP = 'volumes'
# Python panel class of the PANEL to be added.
ADD_PANEL = ... |
Changaco/oh-mainline | refs/heads/master | vendor/packages/python-social-auth/social/backends/qq.py | 68 | """
Created on May 13, 2014
@author: Yong Zhang (zyfyfe@gmail.com)
"""
import json
from social.utils import parse_qs
from social.backends.oauth import BaseOAuth2
class QQOAuth2(BaseOAuth2):
name = 'qq'
ID_KEY = 'openid'
AUTHORIZE_URL = 'https://graph.qq.com/oauth2.0/authorize'
ACCESS_TOKEN_URL = 'h... |
golivieri/ansible | refs/heads/release1.5.0 | plugins/inventory/vagrant.py | 72 | #!/usr/bin/env python
"""
Vagrant external inventory script. Automatically finds the IP of the booted vagrant vm(s), and
returns it under the host group 'vagrant'
Example Vagrant configuration using this script:
config.vm.provision :ansible do |ansible|
ansible.playbook = "./provision/your_playbook.yml"
... |
DavidMikeSimon/ansible | refs/heads/devel | v1/ansible/runner/lookup_plugins/flattened.py | 122 | # (c) 2013, Serge van Ginderachter <serge@vanginderachter.be>
#
# 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)... |
steedos/odoo7 | refs/heads/master | openerp/addons/base/res/res_users.py | 12 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2013 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you ca... |
neonatura/crotalus | refs/heads/master | lib/libxml2/python/tests/validDTD.py | 35 | #!/usr/bin/python -u
import libxml2
import sys
ARG = 'test string'
class ErrorHandler:
def __init__(self):
self.errors = []
def handler(self, msg, data):
if data != ARG:
raise Exception("Error handler did not receive correct argument")
self.errors.append(msg)
# Memory d... |
MaizerGomes/youtube-dl | refs/heads/master | youtube_dl/extractor/veoh.py | 128 | from __future__ import unicode_literals
import re
import json
from .common import InfoExtractor
from ..compat import (
compat_urllib_request,
)
from ..utils import (
int_or_none,
ExtractorError,
)
class VeohIE(InfoExtractor):
_VALID_URL = r'http://(?:www\.)?veoh\.com/(?:watch|iphone/#_Watch)/(?P<id>... |
suyashphadtare/gd-erp | refs/heads/develop | erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 4 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import frappe.defaults
from frappe.utils import cint, cstr, flt
from frappe import _, msgprint, throw
from frappe.utils import add_day... |
Audacity-Team/Audacity | refs/heads/master | lib-src/lv2/lv2/plugins/eg01-amp.lv2/waflib/Utils.py | 146 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import os,sys,errno,traceback,inspect,re,shutil,datetime,gc
import subprocess
try:
from collections import deque
except ImportError:
class deque(list):
def popleft(self):
... |
Guneet-Dhillon/mxnet | refs/heads/master | python/mxnet/log.py | 50 | #!/usr/bin/env python
# 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
# "L... |
pawigor/PythonFirstStep | refs/heads/master | s2.4-7.py | 1 | __author__ = 'z'
s = input()
p = s[0]
k = 1
for c in s[1:]:
if c == p:
k += 1
else:
print(p, end='')
print(k, end='')
p = c
k = 1
print(p, end='')
print(k, end='')
|
theo-l/django | refs/heads/master | django/contrib/humanize/apps.py | 130 | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class HumanizeConfig(AppConfig):
name = 'django.contrib.humanize'
verbose_name = _("Humanize")
|
zycdragonball/tensorflow | refs/heads/master | tensorflow/contrib/seq2seq/python/ops/helper.py | 4 | # 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... |
misttechnologies/selenium | refs/heads/master | py/test/selenium/webdriver/common/element_attribute_tests.py | 4 | #!/usr/bin/python
# Copyright 2015 Software Freedom Conservancy
# Copyright 2008-2010 WebDriver committers
# Copyright 2008-2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
... |
Yandell-Lab/taxonomer_0.5 | refs/heads/master | taxonomer/scripts/binner_merge_kanalyze.py | 1 | import os
path = os.path.dirname(os.path.abspath(__file__))
import sys
sys.path.append("%s/cython/"%(path))
import argparse
import binner_mergepy
parser = argparse.ArgumentParser(description="Merge kmer count files for subsequent binning")
parser.add_argument("kmer_counts_1", type=str, help="name of kmer count file in... |
mezz64/home-assistant | refs/heads/dev | tests/helpers/test_location.py | 15 | """Tests Home Assistant location helpers."""
from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE
from homeassistant.core import State
from homeassistant.helpers import location
def test_has_location_with_invalid_states():
"""Set up the tests."""
for state in (None, 1, "hello", object):
asser... |
cetic/ansible | refs/heads/devel | lib/ansible/modules/packaging/os/apt_key.py | 7 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2012, Jayson Vantuyl <jayson@aggressive.ly>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass_... |
citrix-openstack-build/heat-templates | refs/heads/master | hot/software-config/elements/heat-config-script/install.d/hook-script.py | 3 | #!/usr/bin/env python
import json
import logging
import os
import subprocess
import sys
WORKING_DIR = os.environ.get('HEAT_SCRIPT_WORKING',
'/var/lib/heat-config/heat-config-script')
OUTPUTS_DIR = os.environ.get('HEAT_SCRIPT_OUTPUTS',
'/var/run/heat-config/heat... |
alcherk/mal | refs/heads/master | python/step3_env.py | 60 | import sys, traceback
import mal_readline
import mal_types as types
import reader, printer
from env import Env
# read
def READ(str):
return reader.read_str(str)
# eval
def eval_ast(ast, env):
if types._symbol_Q(ast):
return env.get(ast)
elif types._list_Q(ast):
return types._list(*map(lamb... |
amgowano/oppia | refs/heads/develop | core/tests/performance_tests/splash_test.py | 16 | # Copyright 2016 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
int19h/PTVS | refs/heads/master | Python/Product/Miniconda/Miniconda3-x64/Lib/email/charset.py | 32 | # Copyright (C) 2001-2007 Python Software Foundation
# Author: Ben Gertzfield, Barry Warsaw
# Contact: email-sig@python.org
__all__ = [
'Charset',
'add_alias',
'add_charset',
'add_codec',
]
from functools import partial
import email.base64mime
import email.quoprimime
from email import errors
fro... |
jamielennox/keystone | refs/heads/master | keystone/contrib/revoke/__init__.py | 27 | # 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
# distributed under t... |
tswast/google-cloud-python | refs/heads/master | talent/google/cloud/talent_v4beta1/proto/histogram_pb2_grpc.py | 573 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
|
OpenNewsLabs/pybossa | refs/heads/master | pybossa/feed.py | 4 | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2015 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... |
ilmir-k/addons-yelizariev | refs/heads/8.0 | reminder_base/reminder_base_models.py | 4 | from openerp import api, models, fields, SUPERUSER_ID
class reminder(models.AbstractModel):
_name = 'reminder'
_reminder_date_field = 'date'
_reminder_description_field = 'description'
# res.users or res.partner fields
_reminder_attendees_fields = ['user_id']
reminder_event_id = fields.Many... |
tuenti/Diamond | refs/heads/master | src/diamond/convertor.py | 63 | # coding=utf-8
import re
_RE_FIND_FIRST_CAP = re.compile('(.)([A-Z][a-z]+)')
_RE_SPAN_OF_CAPS = re.compile('([a-z0-9])([A-Z])')
def camelcase_to_underscore(name):
return _RE_SPAN_OF_CAPS.sub(r'\1_\2',
_RE_FIND_FIRST_CAP.sub(r'\1_\2', name)
).lower(... |
ravindrapanda/tensorflow | refs/heads/master | tensorflow/contrib/learn/python/learn/preprocessing/categorical.py | 153 | # 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... |
TillMobile/httpsql | refs/heads/master | httpsql/api/query_gen.py | 1 | # Copyright (c) 2016 Till Mobile Inc.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import schema
import cStringIO
import json
JSON_TYPE = "jsonb"
HSTORE_TYPE = "h... |
tpbarron/rlflow | refs/heads/master | tests/test_rlflow.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_rlflow
----------------------------------
Tests for `rlflow` module.
"""
import pytest
class TestRlflow(object):
@classmethod
def setup_class(cls):
pass
def test_something(self):
pass
@classmethod
def teardown_class(cls):
... |
linlife/Python | refs/heads/master | lin_jumper/author_agent/paramiko-1.10.1/paramiko/auth_handler.py | 26 | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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.1 of the License, or (a... |
bincentvaret/bsd-cloudinit | refs/heads/master | cloudbaseinit/openstack/common/rpc/matchmaker_ring.py | 5 | # Copyright 2011-2013 Cloudscaling Group, 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 appl... |
thaim/ansible | refs/heads/fix-broken-link | lib/ansible/modules/network/meraki/meraki_organization.py | 8 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
... |
LiZoRN/Charlotte | refs/heads/master | spiders/statisticalBureau/statisticalBureau/items.py | 1 | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
from scrapy_djangoitem import DjangoItem
from spiders.models import AdministrativeCoding
class AdministrativeCodingItem(DjangoItem):
# define the fie... |
ivanlmj/Android-DNSSL | refs/heads/master | Flask/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/dom.py | 1229 | from __future__ import absolute_import, division, unicode_literals
from xml.dom import Node
import gettext
_ = gettext.gettext
from . import _base
class TreeWalker(_base.NonRecursiveTreeWalker):
def getNodeDetails(self, node):
if node.nodeType == Node.DOCUMENT_TYPE_NODE:
return _base.DOCTYP... |
CloudServer/cinder | refs/heads/master | cinder/api/views/limits.py | 30 | # Copyright 2010-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... |
proxysh/Safejumper-for-Mac | refs/heads/master | buildmac/Resources/env/lib/python2.7/site-packages/pyasn1/codec/cer/__init__.py | 3653 | # This file is necessary to make this directory a package.
|
obi-two/Rebelion | refs/heads/master | data/scripts/templates/object/tangible/loot/collectible/collectible_parts/shared_gong_structure_03.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 = Tangible()
result.template = "object/tangible/loot/collectible/collectible_parts/shared_gong_structure_03.iff"
re... |
windskyer/k_nova | refs/heads/master | paxes_nova/scheduler/filters/pci_passthrough_filter.py | 1 | # Copyright (c) 2013 ISP RAS.
# 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 ... |
efortuna/AndroidSDKClone | refs/heads/master | ndk/prebuilt/linux-x86_64/lib/python2.7/ctypes/test/test_simplesubclasses.py | 118 | import unittest
from ctypes import *
class MyInt(c_int):
def __cmp__(self, other):
if type(other) != MyInt:
return -1
return cmp(self.value, other.value)
def __hash__(self): # Silence Py3k warning
return hash(self.value)
class Test(unittest.TestCase):
def test_compare(... |
beeftornado/sentry | refs/heads/master | tests/sentry/api/serializers/test_recent_searches.py | 3 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import six
from sentry.api.serializers import serialize
from sentry.models.recentsearch import RecentSearch
from sentry.models.search_common import SearchType
from sentry.testutils import TestCase
class RecentSearchSerializerTest(TestCase):
def tes... |
analogdevicesinc/openocd | refs/heads/master | contrib/xsvf_tools/svf2xsvf.py | 101 | #!/usr/bin/python3.0
# Copyright 2008, SoftPLC Corporation http://softplc.com
# Dick Hollenbeck dick@softplc.com
# 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 Lic... |
gurneyalex/runbot-addons | refs/heads/8.0 | runbot_janitor/__init__.py | 4 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Odoo, Open Source Management Solution
# This module copyright (C) 2010 - 2014 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/... |
sencha/chromium-spacewalk | refs/heads/master | ui/app_list/PRESUBMIT.py | 46 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Presubmit script for app_list.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built... |
Jgarcia-IAS/SAT | refs/heads/master | openerp/addons-extra/odoo-pruebas/odoo-server/addons/website_sale/__init__.py | 3964 | import controllers
import models
|
emergebtc/evennia | refs/heads/master | evennia/comms/admin.py | 7 | """
This defines how Comm models are displayed in the web admin interface.
"""
from django.contrib import admin
from evennia.comms.models import ChannelDB
from evennia.typeclasses.admin import AttributeInline, TagInline
class ChannelAttributeInline(AttributeInline):
"""
Inline display of Channel Attribute -... |
ojengwa/migrate | refs/heads/master | ibu/backends/postgresql/creation.py | 2 | import sys
from ibu.backends.base.creation import BaseDatabaseCreation
class DatabaseCreation(BaseDatabaseCreation):
def sql_table_creation_suffix(self):
test_settings = self.connection.settings_dict['TEST']
assert test_settings['COLLATION'] is None, (
"PostgreSQL does not support co... |
ga7g08/sympy | refs/heads/master | sympy/physics/unitsystems/systems/mks.py | 75 | # -*- coding: utf-8 -*-
"""
MKS unit system.
MKS stands for "meter, kilogram, second".
"""
from __future__ import division
from sympy.physics.unitsystems.simplifiers import qsimplify
from sympy.physics.unitsystems import (Dimension, DimensionSystem, Unit,
Constant, UnitSystem)... |
broferek/ansible | refs/heads/devel | lib/ansible/modules/database/misc/redis.py | 42 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
sznekol/django-cms | refs/heads/develop | cms/test_utils/project/bunch_of_plugins/models.py | 61 | # -*- coding: utf-8 -*-
from cms.models import CMSPlugin
class TestPlugin1(CMSPlugin):
pass
class LeftMixin(object): pass
class RightMixin(object): pass
class TestPlugin2(LeftMixin, CMSPlugin, RightMixin):
pass
|
ingokegel/intellij-community | refs/heads/master | python/testData/completion/dictKeyPrefix2.after.py | 166 | s = { 'a': 'b', 'kkkappa': 'd', 'lambda': 'foo' }
s['k]kap''<caret>'] |
ol-loginov/intellij-community | refs/heads/master | plugins/hg4idea/testData/bin/mercurial/fileset.py | 90 | # fileset.py - file set queries for mercurial
#
# Copyright 2010 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import parser, error, util, merge, re
from i18n import _
elements = {
"(": (20, (... |
dims/nova | refs/heads/master | nova/tests/unit/conductor/test_conductor.py | 1 | # Copyright 2012 IBM Corp.
# Copyright 2013 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
GeotrekCE/Geotrek-admin | refs/heads/master | geotrek/maintenance/factories.py | 2 | import factory
from django.conf import settings
from geotrek.core.factories import PathFactory, StakeFactory, TopologyFactory
from geotrek.common.factories import OrganismFactory
from geotrek.infrastructure.factories import InfrastructureFactory
from geotrek.signage.factories import SignageFactory
from . import model... |
rbarlow/pulp | refs/heads/master | client_lib/pulp/client/commands/consumer/manage.py | 17 | import os
from gettext import gettext as _
from pulp.bindings.exceptions import NotFoundException
from pulp.client.commands.options import (OPTION_CONSUMER_ID, OPTION_NAME,
OPTION_DESCRIPTION, OPTION_NOTES)
from pulp.client.consumer_utils import load_consumer_id
from pulp.clie... |
hui-w/misc-fragment | refs/heads/master | python/bignum.py | 1 | # Prompt for a number input
def number_input(message):
isValid = False
while not isValid:
userInput = input(message)
try:
val = int(userInput)
for i, ch in enumerate(userInput):
val = int(ch)
# print(ch, '(%d)' %i)
# for i in range(len(userInput)):
# print(userInput[i], '(%d)' %i)
isValid =... |
steveklabnik/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/wptserve/wptserve/handlers.py | 44 | import cgi
import json
import os
import traceback
import urllib
import urlparse
from constants import content_types
from pipes import Pipeline, template
from ranges import RangeParser
from request import Authentication
from response import MultipartContent
from utils import HTTPException
__all__ = ["file_handler", "p... |
wangxuan007/flasky | refs/heads/master | venv/lib/python2.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py | 55 | # sqlite/pysqlite.py
# Copyright (C) 2005-2016 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
"""
.. dialect:: sqlite+pysqlite
:name: pysqlite
:dbapi: sqlite3
:con... |
Michaelmwirigi/lynsays | refs/heads/master | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/_asybuiltins.py | 369 | # -*- coding: utf-8 -*-
"""
pygments.lexers._asybuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file contains the asy-function names and asy-variable names of
Asymptote.
Do not edit the ASYFUNCNAME and ASYVARNAME sets by hand.
TODO: perl/python script in Asymptote SVN similar to asy-list.pl but onl... |
espona/ckanext-envidat_theme | refs/heads/master | ckanext/__init__.py | 878 | # this is a namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
|
andersonresende/django | refs/heads/master | django/contrib/gis/db/backends/postgis/creation.py | 34 | from django.conf import settings
from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation
from django.utils.functional import cached_property
class PostGISCreation(DatabaseCreation):
geom_index_type = 'GIST'
geom_index_ops = 'GIST_GEOMETRY_OPS'
geom_index_ops_nd = 'GIST_GEOMETRY_OPS_ND... |
Team02-TeamGuinness/BIOE421_RoboHand | refs/heads/master | ablation-GUI/CONFIG/2014-October-20/04-13-03 PM 5D-Param1-2-CONFIG.py | 1 | #File
fname = '5D-Param1-2.gcode'
f=open(fname,'w')
#Laser Parameters
laserPower = 10 #% max power
dwellTime = 5 #ms
x_start = 403
y_start = 329
z_start = 110.4 #mm above home
pauseTime = 500 #ms; time paused after movement before ablation
feedRate = 500 #movement speed
# Rect... |
awkspace/ansible | refs/heads/devel | lib/ansible/module_utils/influxdb.py | 25 | # -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import traceback
from ansible.module_utils.basic import miss... |
jmesteve/saas3 | refs/heads/master | openerp/addons/base_import/__openerp__.py | 6 | {
'name': 'Base import',
'description': """
New extensible file import for OpenERP
======================================
Re-implement openerp's file import system:
* Server side, the previous system forces most of the logic into the
client which duplicates the effort (between clients), makes the
import s... |
ismailsunni/f3-factor-finder | refs/heads/master | main.py | 1 | #!/F3/main.py
# This file contain form for classification
# Author : Ismail Sunni/@ismailsunni
# Created : 2012-04-28
import random
from Tkinter import *
import tkMessageBox
from os import getcwd, makedirs, path
import tkFileDialog as tkFD
from core.util import *
from F3 import *
from datetime import datet... |
mheap/ansible | refs/heads/devel | lib/ansible/modules/cloud/openstack/os_zone.py | 1 | #!/usr/bin/python
# Copyright (c) 2016 Hewlett-Packard Enterprise
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'stat... |
obourgain/elasticsearch | refs/heads/master | dev-tools/prepare_release_update_documentation.py | 269 | # Licensed to Elasticsearch under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except... |
aikramer2/spaCy | refs/heads/master | spacy/tests/doc/test_doc_api.py | 2 | # coding: utf-8
from __future__ import unicode_literals
from ..util import get_doc
from ...tokens import Doc
from ...vocab import Vocab
from ...attrs import LEMMA
from ...tokens import Span
import pytest
import numpy
@pytest.mark.parametrize('text', [["one", "two", "three"]])
def test_doc_api_compare_by_string_posi... |
McNetic/CouchPotatoServer-de | refs/heads/master | couchpotato/core/media/movie/providers/userscript/filmcentrum.py | 81 | from couchpotato.core.media._base.providers.userscript.base import UserscriptBase
autoload = 'FilmCentrum'
class FilmCentrum(UserscriptBase):
includes = ['*://filmcentrum.nl/films/*']
|
william-gr/dojango | refs/heads/master | dojango/models.py | 10644 | from django.db import models
# Create your models here.
|
syci/OCB | refs/heads/9.0 | addons/account_analytic_default/__init__.py | 45 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import account_analytic_default
|
uberamd/NGECore2 | refs/heads/master | scripts/object/mobile/dressed_corellia_hal_horn.py | 85615 | import sys
def setup(core, object):
return |
uberamd/NGECore2 | refs/heads/master | scripts/object/mobile/ep3/ep3_clone_relics_leia.py | 85615 | import sys
def setup(core, object):
return |
jmarsik/mopidy | refs/heads/develop | mopidy/ext.py | 7 | from __future__ import absolute_import, unicode_literals
import collections
import logging
import os
import pkg_resources
from mopidy import config as config_lib, exceptions
from mopidy.internal import path
logger = logging.getLogger(__name__)
_extension_data_fields = ['extension', 'entry_point', 'config_schema'... |
stacywsmith/ansible | refs/heads/devel | lib/ansible/modules/system/alternatives.py | 66 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Ansible module to manage symbolic link alternatives.
(c) 2014, Gabe Mulley <gabe.mulley@gmail.com>
(c) 2015, David Wittman <dwittman@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 Gene... |
odootr/odoo | refs/heads/8.0 | addons/hr/__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... |
NeCTAR-RC/neutron | refs/heads/master | neutron/tests/unit/api/rpc/handlers/test_securitygroups_rpc.py | 4 | # 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 agreed to in... |
b-cube/OWSLib | refs/heads/master | owslib/coverage/wcs100.py | 18 | # -*- coding: ISO-8859-15 -*-
# =============================================================================
# Copyright (c) 2004, 2006 Sean C. Gillies
# Copyright (c) 2007 STFC <http://www.stfc.ac.uk>
#
# Authors :
# Dominic Lowe <d.lowe@rl.ac.uk>
#
# Contact email: d.lowe@rl.ac.uk
# =======================... |
nkgilley/home-assistant | refs/heads/dev | homeassistant/components/noaa_tides/__init__.py | 36 | """The noaa_tides component."""
|
jtwaleson/python-oauth2 | refs/heads/master | example/client.py | 375 | """
The MIT License
Copyright (c) 2007 Leah Culver
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, publis... |
x111ong/django | refs/heads/master | tests/migrations/test_executor.py | 202 | from django.apps.registry import apps as global_apps
from django.db import connection
from django.db.migrations.executor import MigrationExecutor
from django.db.migrations.graph import MigrationGraph
from django.db.migrations.recorder import MigrationRecorder
from django.db.utils import DatabaseError
from django.test i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.