repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
TangxingZhou/linux | refs/heads/master | scripts/tracing/draw_functrace.py | 14679 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <[email protected]>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... |
valerauko/kcbridge | refs/heads/master | kconfig.py | 1 | #!/usr/bin/env python
#coding=utf-8
theLimit = 45 ## time limit to mark returning fleets / completed repairs
theServer = '125.6.189.135' ## default brunei
'''
### These are just minor stuff for/about the code. No need to touch them.
'''
theName = u'母港執務室'
theSoft = 'KC Bridge' |
valtech-mooc/edx-platform | refs/heads/master | common/test/acceptance/performance/test_studio_performance.py | 139 | """
Single page performance tests for Studio.
"""
from bok_choy.web_app_test import WebAppTest, with_cache
from ..pages.studio.auto_auth import AutoAuthPage
from ..pages.studio.overview import CourseOutlinePage
from nose.plugins.attrib import attr
@attr(har_mode='explicit')
class StudioPagePerformanceTest(WebAppTest)... |
PatidarWeb/poedit | refs/heads/master | deps/boost/tools/build/test/chain.py | 44 | #!/usr/bin/python
# Copyright 2003 Dave Abrahams
# Copyright 2002, 2003 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# This tests that :
# 1) the 'make' correctly assigns types to produced targets
# 2) if... |
tximikel/kuma | refs/heads/master | kuma/wiki/kumascript.py | 10 | import base64
from collections import defaultdict
import json
import hashlib
import time
from urlparse import urljoin
from django.conf import settings
from django.contrib.sites.models import Site
from constance import config
import requests
from kuma.core.cache import memcache
from .constants import KUMASCRIPT_TIME... |
piagarwal11/GDriveLinuxClient | refs/heads/master | src/watchdog-0.8.2/setup.py | 7 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011 Yesudeep Mangalapilly <[email protected]>
# Copyright 2012 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
#
# ... |
kobejean/tensorflow | refs/heads/master | tensorflow/python/util/serialization_test.py | 32 | # Copyright 2018 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... |
kaustubh-kabra/modified-xen | refs/heads/master | tools/xm-test/tests/memset/01_memset_basic_pos.py | 38 | #!/usr/bin/python
# Copyright (C) International Business Machines Corp., 2005
# Author: Woody Marvel <[email protected]>
##
## Description:
## Tests that verify mem-set output and return code
## 1) Test for xm mem-set
## create domain,
## verify domain and ls output,
## mem-set in dom0,
## verify with xm list memory c... |
benrudolph/commcare-hq | refs/heads/master | corehq/apps/importer/models.py | 3 | # This file is only here so that django will recognize that
# this is a valid app and run the associated unit tests.
from couchdbkit.ext.django.schema import Document
class _(Document): pass |
blbrock/WildPlanner10-v2a | refs/heads/master | Scripts/calculate_density_tool.py | 3 | # ------------------------------------------------------------------------------
#
# Copyright 2011, 2012, 2013 Brent L. Brock and the Craighead Institute
#
# This file is part of Wild Planner.
#
# Wild Planner is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Publi... |
TheWebMonks/equipo | refs/heads/master | app/freelancers/migrations/0038_remove_company_social_account.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-06-14 19:17
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('freelancers', '0037_auto_20170611_0024'),
]
operations = [
migrations.RemoveField(
... |
RagBillySandstone/google-python-exercises | refs/heads/master | my_own_exercises/web_server/webserver2.py | 1 | # A web server that can run various web frameworks thanks to WSGI
import socket
import StringIO
import sys
class WSGIServer(object):
address_family = socket.AF_INET
socket_type = socket.SOCK_STREAM
request_queue_size = 1
def __init__(self, server_address):
# Create a listening socket
self.listen_so... |
Ruide/angr-dev | refs/heads/master | simuvex/simuvex/engines/vex/expressions/base.py | 2 | print '... Importing simuvex/engines/vex/expressions/base.py ...'
from angr.engines.vex.expressions.base import *
|
40223138/2015cd_0505 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/http/__init__.py | 1383 | # This directory is a Python package.
|
redhat-cip/horizon | refs/heads/master | openstack_dashboard/api/rest/cinder.py | 2 | # Copyright 2015 IBM Corp.
#
# 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, sof... |
amosnier/python_for_kids | refs/heads/master | course_code/12_028_tkinter_canvas.py | 1 | import tkinter
tk = tkinter.Tk()
canvas = tkinter.Canvas(tk, width = 500, height = 500)
canvas.pack()
canvas.create_line(1, 1, 500, 500)
canvas.create_rectangle(10, 10, 50, 50)
canvas.create_rectangle(70, 10, 300, 50)
canvas.create_rectangle(10, 70, 50, 500)
tk.mainloop()
|
wantee/pocolm | refs/heads/master | scripts/text_to_int.py | 2 | #!/usr/bin/env python
# we're using python 3.x style print but want it to work in python 2.x,
from __future__ import print_function
import os
import argparse
import sys
parser = argparse.ArgumentParser(description="Transforms text data into integer form "
"using a symbol table, e.g. t... |
gw0/myhdl | refs/heads/master | myhdl/_ShadowSignal.py | 1 | # This file is part of the myhdl library, a Python package for using
# Python as a Hardware Description Language.
#
# Copyright (C) 2003-2011 Jan Decaluwe
#
# The myhdl library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as
# published by t... |
mbauskar/omnitech-demo-frappe | refs/heads/develop | frappe/custom/doctype/custom_field/__init__.py | 1829 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
|
Yoshiofthewire/CrunchyXBMC-Legacy | refs/heads/master | script.module.cryptopy/lib/crypto/cipher/aes_cbc_test.py | 3 | #! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
""" crypto.cipher.cbc_test
Tests for cbc encryption, uses AES for base algorithm
Copyright (c) 2002 by Paul A. Lambert
Read LICENSE.txt for license information.
"""
from crypto.cipher.aes_cbc import AES_CBC
from crypto.cipher.base import noPadding, padW... |
IKholopov/HackUPC2017 | refs/heads/master | hackupc/env/lib/python3.5/site-packages/django/http/cookie.py | 119 | from __future__ import unicode_literals
import sys
from django.utils import six
from django.utils.encoding import force_str
from django.utils.six.moves import http_cookies
# http://bugs.python.org/issue2193 is fixed in Python 3.3+.
_cookie_allows_colon_in_names = six.PY3
# Cookie pickling bug is fixed in Python 2.7... |
joachimmetz/plaso | refs/heads/main | plaso/containers/reports.py | 3 | # -*- coding: utf-8 -*-
"""Report related attribute container definitions."""
from plaso.containers import interface
from plaso.containers import manager
class AnalysisReport(interface.AttributeContainer):
"""Analysis report attribute container.
Attributes:
analysis_counter (collections.Counter): counter of... |
wwu-numerik/scripts | refs/heads/master | python/misc_csv/pivot.py | 1 | #!/usr/bin/env python
import csv
from itertools import izip
import sys
import os
first = sys.argv[1]
merged = '{}_merged.csv'.format(''.join(first[:-4]))
for i,fn in enumerate(sys.argv[1:]):
a = list(csv.reader(open(fn, "rb")))
base = os.path.dirname(fn)
a[0].append('file')
a[1].append(base)
outp... |
Kazade/NeHe-Website | refs/heads/master | google_appengine/lib/django-1.2/django/contrib/admindocs/utils.py | 314 | "Misc. utility functions/classes for admin documentation generator."
import re
from email.Parser import HeaderParser
from email.Errors import HeaderParseError
from django.utils.safestring import mark_safe
from django.core.urlresolvers import reverse
from django.utils.encoding import smart_str
try:
import docutils.... |
duguhaotian/os | refs/heads/master | tests/integration/setup.py | 9 | from distutils.core import setup
setup(
name='RancherOSIntegrationTests',
version='0.1',
packages=[
'rancherostest'
],
license='ASL 2.0',
long_description=open('README.txt').read(),
)
|
dragon-skeleton/mcache-client | refs/heads/master | powertest/lib/results.py | 3 | #!/usr/bin/env python
#
# Copyright (c) 2010 Corey Goldberg ([email protected])
# License: GNU LGPLv3
#
# This file is part of Multi-Mechanize
import time
from collections import defaultdict
import graph
import reportwriter
def output_results(results_dir, results_file, run_time, rampup, ts_interval, user_group_... |
rjschof/gem5 | refs/heads/master | util/stats/profile.py | 87 | # Copyright (c) 2005 The Regents of The University of Michigan
# 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 ... |
FireCARES/firecares | refs/heads/develop | firecares/firestation/migrations/0039_auto_20170126_0857.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('firestation', '0038_firedepartment_domain_name'),
]
operations = [
migrations.AlterField(
model_name='firedepart... |
efornal/mollys | refs/heads/master | app/migrations/0020_alter_emails_to_person.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-05-09 13:53
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0019_add_emails_to_person'),
]
operations = [
migrations.AlterField(
... |
GDGLima/contentbox | refs/heads/master | third_party/social/tests/backends/test_xing.py | 92 | import json
from social.p3 import urlencode
from social.tests.backends.oauth import OAuth1Test
class XingOAuth1Test(OAuth1Test):
backend_path = 'social.backends.xing.XingOAuth'
user_data_url = 'https://api.xing.com/v1/users/me.json'
expected_username = 'FooBar'
access_token_body = json.dumps({
... |
BMeu/Orchard | refs/heads/master | instance/__init__.py | 1 | # -*- coding: utf-8 -*-
"""
The configuration specific to a certain instance of |projectname|.
"""
from .configuration import Configuration
__all__ = ['Configuration']
|
ayushgoel/FixGoogleContacts | refs/heads/master | phonenumbers/shortdata/region_PY.py | 1 | """Auto-generated file, do not edit by hand. PY metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_PY = PhoneMetadata(id='PY', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='1[1-4]\\d', possible_number_pattern='\\... |
csm0042/bob_wemo_service | refs/heads/master | bob_wemo_service/wemo.py | 1 | #!/usr/bin/python3
""" wemo.py:
"""
# Import Required Libraries (Standard, Third Party, Local) ********************
import copy
import datetime
import logging
import pywemo
from bob_wemo_service.ipv4_help import check_ipv4
# Authorship Info *************************************************************
__author__ = "... |
ar4s/django | refs/heads/master | django/contrib/auth/tests/utils.py | 220 | from unittest import skipIf
from django.conf import settings
def skipIfCustomUser(test_func):
"""
Skip a test if a custom user model is in use.
"""
return skipIf(settings.AUTH_USER_MODEL != 'auth.User', 'Custom user model in use')(test_func)
|
JuliBakagianni/CEF-ELRC | refs/heads/master | lib/python2.7/site-packages/unidecode/x077.py | 252 | data = (
'Ming ', # 0x00
'Sheng ', # 0x01
'Shi ', # 0x02
'Yun ', # 0x03
'Mian ', # 0x04
'Pan ', # 0x05
'Fang ', # 0x06
'Miao ', # 0x07
'Dan ', # 0x08
'Mei ', # 0x09
'Mao ', # 0x0a
'Kan ', # 0x0b
'Xian ', # 0x0c
'Ou ', # 0x0d
'Shi ', # 0x0e
'Yang ', # 0x0f
'Zheng ', # 0... |
sakura-internet/saklient.python | refs/heads/master | saklient/errors/httpnotacceptableexception.py | 1 | # -*- coding:utf-8 -*-
# This code is automatically transpiled by Saklient Translator
import six
from .httpexception import HttpException
import saklient
str = six.text_type
# module saklient.errors.httpnotacceptableexception
class HttpNotAcceptableException(HttpException):
## 要求を受け付けできません。サポートサイトやメンテナンス情報をご確認く... |
martynovp/edx-platform | refs/heads/master | lms/djangoapps/circuit/views.py | 93 | import json
import xml.etree.ElementTree
from django.http import Http404
from django.http import HttpResponse
from edxmako.shortcuts import render_to_response
from .models import ServerCircuit
def circuit_line(circuit):
''' Returns string for an appropriate input element for a circuit.
TODO: Rename. ''... |
somsak/youtube-dl | refs/heads/master | test/helper.py | 63 | from __future__ import unicode_literals
import errno
import io
import hashlib
import json
import os.path
import re
import types
import sys
import youtube_dl.extractor
from youtube_dl import YoutubeDL
from youtube_dl.utils import (
compat_str,
preferredencoding,
write_string,
)
def get_params(override=No... |
rcarmo/soup-strainer | refs/heads/master | chardet/constants.py | 237 | ######################## 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... |
twolfson/restructuredtext-lint | refs/heads/master | docs/sphinx/index.py | 1 | # Load in our dependencies
from docutils.parsers.rst.directives import register_directive
from sphinx.directives.code import Highlight
import restructuredtext_lint
# Load our new directive
register_directive('highlight', Highlight)
# Lint our README
errors = restructuredtext_lint.lint_file('docs/sphinx/README.rst')
p... |
damiansoriano/odoo | refs/heads/master | addons/point_of_sale/controllers/__init__.py | 382 | import main
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
shengzhou/onie | refs/heads/master | test/lib/connection.py | 6 | #
# DUT Connection classes
#
# Copyright (C) 2013 Curt Brune <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0
'''
Defines a Connection object that the test fixture uses to communicate
with a DUT.
'''
#-------------------------------------------------------------------------------
#
# Imports
#
... |
aioue/ansible | refs/heads/devel | hacking/tests/gen_distribution_version_testcase.py | 80 | #!/usr/bin/env python
"""
This script generated test_cases for test_distribution_version.py.
To do so it outputs the relevant files from /etc/*release, the output of platform.dist() and the current ansible_facts regarding the distribution version.
This assumes a working ansible version in the path.
"""
import platf... |
XXMrHyde/android_external_chromium_org | refs/heads/darkkat-4.4 | third_party/protobuf/python/google/protobuf/internal/service_reflection_test.py | 559 | #! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... |
okuribito/GiftConcierge | refs/heads/master | dialogue_system/knowledge/__init__.py | 15 | __author__ = 'h-nakayama'
|
xLegoz/marshmallow | refs/heads/dev | tests/test_fields.py | 1 | # -*- coding: utf-8 -*-
import pytest
from marshmallow import fields, Schema, ValidationError
from marshmallow.marshalling import missing
from tests.base import ALL_FIELDS, User
class TestFieldAliases:
def test_int_is_integer(self):
assert fields.Int is fields.Integer
def test_str_is_string(self):
... |
testmana2/test | refs/heads/master | Plugins/VcsPlugins/vcsMercurial/HgNewProjectOptionsDialog.py | 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2010 - 2015 Detlev Offenbach <[email protected]>
#
"""
Module implementing the Mercurial Options Dialog for a new project from the
repository.
"""
from __future__ import unicode_literals
import os
from PyQt5.QtCore import pyqtSlot, QDir
from PyQt5.QtWidgets import QDi... |
chrisglass/xhtml2pdf | refs/heads/master | xhtml2pdf/config/httpconfig.py | 3 | '''
Created on 1 dic. 2017
@author: luisza
'''
import ssl
class HttpConfig(dict):
"""
Configuration settings for httplib
See
- python2 : https://docs.python.org/2/library/httplib.html#httplib.HTTPSConnection
- python3 : https://docs.python.org/3.4/library/http.client.html#http.client.HTTPS... |
zjost/antsystem | refs/heads/master | functions/colMutate.py | 1 | ''' This function will reproduce a colony with mutated individuals.
It will generate a shifted alpha_weight array and assign new alpha
values to the ants based on these probabilities'''
import random
from functions.alphaWeightMutate import alphaWeightMutate
from functions.alphaAssign import alphaAssign
def colMutate(c... |
saurabh6790/test-frappe | refs/heads/develop | frappe/website/doctype/web_form/web_form.py | 11 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, json
from frappe.website.website_generator import WebsiteGenerator
from frappe import _
from frappe.utils.file_manager import save_file, remove_f... |
mxklabs/mxklabs-python | refs/heads/master | mxklabs/expr/valtype/bool/semantics.py | 1 | class ValtypeSemantics:
def __init__(self, ctx):
self.ctx = ctx
def is_valid_value(self, valtype, value):
if type(value) == int:
return value == 0 or value == 1
if type(value) == bool:
return True
def values(self, valtype):
yield False
yield True
def num_values(self, valtype)... |
ilsawa/p2pool-lit | refs/heads/master | p2pool/util/switchprotocol.py | 280 | from twisted.internet import protocol
class FirstByteSwitchProtocol(protocol.Protocol):
p = None
def dataReceived(self, data):
if self.p is None:
if not data: return
serverfactory = self.factory.first_byte_to_serverfactory.get(data[0], self.factory.default_serverfactory)
... |
kylemsguy/FPGA-Litecoin-Miner | refs/heads/master | ICARUS-LX150/MiningSoftware/pyserial-2.6/examples/setup-rfc2217_server-py2exe.py | 7 | # setup script for py2exe to create the miniterm.exe
# $Id: setup-rfc2217_server-py2exe.py 320 2009-08-07 18:22:49Z cliechti $
from distutils.core import setup
import glob, sys, py2exe, os
sys.path.append('..')
sys.argv.extend("py2exe --bundle 1".split())
setup(
name='rfc2217_server',
zipfile=None,
opti... |
da1z/intellij-community | refs/heads/master | python/testData/completion/percentStringDictRefKeys.py | 31 | f = "fst"
s1 = "snd"
print("first is %(<caret>)s, second is %(snd)s" % {f: 1, s1: 2}) |
alsrgv/tensorflow | refs/heads/master | tensorflow/contrib/nearest_neighbor/python/kernel_tests/hyperplane_lsh_probes_test.py | 25 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
cmelange/ansible | refs/heads/devel | lib/ansible/plugins/action/ios.py | 21 | #
# (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is d... |
armet/python-armet | refs/heads/master | tests/connectors/django/settings.py | 1 | # -*- coding: utf-8 -*-
# from __future__ import absolute_import, unicode_literals, division
from os import path
DEBUG = True
TEMPLATE_DEBUG = DEBUG
PROJECT_ROOT = path.abspath(path.dirname(__file__))
ADMINS = (
# ('Your Name', '[email protected]'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
... |
chuan9/chromium-crosswalk | refs/heads/master | tools/chrome_proxy/live_tests/chrome_proxy_measurements.py | 12 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import chrome_proxy_metrics as metrics
from telemetry.core import exceptions
from telemetry.page import page_test
class ChromeProxyLatency(p... |
harayz/raspberry_pwn | refs/heads/master | src/pentest/voiper/sulley/impacket/structure.py | 8 | # Copyright (c) 2003-2006 CORE Security Technologies
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# $Id: structure.py,v 1.2 2006/05/23 21:19:26 gera Exp $
#
from struct import pack, unpack, calcsize
... |
uehara1414/serverctl-prototype | refs/heads/master | serverctl/migrations/0008_auto_20170412_1031.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-04-12 01:31
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('serverctl', '0007_serverhistory_data_s3_key'),
]
operations = [
migrations.... |
nicolargo/intellij-community | refs/heads/master | python/testData/inspections/PyUnboundLocalVariableInspection/UnboundNonLocal.py | 83 | def f1():
nonlocal <warning descr="Nonlocal variable 'x' must be bound in an outer function scope">x</warning> #fail
def f2():
def g():
nonlocal <warning descr="Nonlocal variable 'x' must be bound in an outer function scope">x</warning> #fail
print(x)
x = 1
def f3():
nonlocal <warning d... |
rikima/spark | refs/heads/master | python/pyspark/context.py | 1 | #
# 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... |
rezeck/ros_tamiya | refs/heads/master | src/node_tamiya.py | 1 | #!/usr/bin/env python
import rospy
from math import radians, cos, sin, asin, sqrt, atan2, degrees, pi, log, tan
import pid_class
import wp_manager
from ros_tamiya.msg import Gps_msg
from ros_tamiya.msg import Imu
from std_msgs.msg import Float32
from geometry_msgs.msg import Twist
from geometry_msgs.msg import Vector... |
stephenjoe1/gaap_product_pages | refs/heads/master | node_modules/grunt-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py | 1509 | # Copyright (c) 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.
"""Handle version information related to Visual Stuio."""
import errno
import os
import re
import subprocess
import sys
import gyp
import glob
class VisualStudi... |
servo/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/ci/pr_preview.py | 4 | #!/usr/bin/env python
# The service provided by this script is not critical, but it shares a GitHub
# API request quota with critical services. For this reason, all requests to
# the GitHub API are preceded by a "guard" which verifies that the subsequent
# request will not deplete the shared quota.
#
# In effect, this... |
aitkend/piers | refs/heads/master | fabfile/assets.py | 15 | #!/usr/bin/env python
"""
Commands related to the syncing assets.
"""
from glob import glob
import os
import boto
from fabric.api import prompt, task
import app_config
from fnmatch import fnmatch
import utils
ASSETS_ROOT = 'www/assets'
@task
def sync():
"""
Intelligently synchronize assets between S3 and l... |
ixcoinofficialpage/master | refs/heads/master | qa/rpc-tests/invalidblockrequest.py | 104 | #!/usr/bin/env python3
# Copyright (c) 2015-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 test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
from ... |
xbmc/atv2 | refs/heads/atv2 | xbmc/lib/libPython/Python/Lib/test/test_textwrap.py | 7 | #
# Test suite for the textwrap module.
#
# Original tests written by Greg Ward <[email protected]>.
# Converted to PyUnit by Peter Hansen <[email protected]>.
# Currently maintained by Greg Ward.
#
# $Id: test_textwrap.py 38573 2005-03-05 02:38:33Z gward $
#
import unittest
from test import test_support
from textwrap... |
Rut0/RutoApp | refs/heads/master | ruto/apps.py | 1 | from django.apps import AppConfig
class RutoConfig(AppConfig):
name = 'ruto'
|
bittner/django-allauth | refs/heads/master | allauth/socialaccount/providers/dataporten/urls.py | 6 | from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns
from .provider import DataportenProvider
urlpatterns = default_urlpatterns(DataportenProvider)
|
ghchinoy/tensorflow | refs/heads/master | tensorflow/contrib/testing/python/framework/fake_summary_writer.py | 63 | # 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... |
freedesktop-unofficial-mirror/telepathy__telepathy-spec | refs/heads/master | tools/specparser.py | 1 | #
# specparser.py
#
# Reads in a spec document and generates pretty data structures from it.
#
# Copyright (C) 2009-2010 Collabora Ltd.
#
# This library 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; e... |
be-cloud-be/horizon-addons | refs/heads/9.0 | server/addons/account_check_printing/account_journal.py | 29 | # -*- coding: utf-8 -*-
from openerp import models, fields, api, _
from openerp.exceptions import ValidationError
class AccountJournal(models.Model):
_inherit = "account.journal"
@api.one
@api.depends('outbound_payment_method_ids')
def _compute_check_printing_payment_method_selected(self):
se... |
samukasmk/django_dashboard_example | refs/heads/master | smkcpanel_django/smkcpanel/views.py | 6027 | # Create your views here.
|
mmalyska/eve-wspace | refs/heads/develop | evewspace/account/nav_entries.py | 21 | from core.nav_registry import registry
registry.register('account_nav.html')
|
mrquim/mrquimrepo | refs/heads/master | repo/plugin.video.Rising.Tides/resources/modules/js2py/legecy_translators/constants.py | 31 | from string import ascii_lowercase, digits
##################################
StringName = u'PyJsConstantString%d_'
NumberName = u'PyJsConstantNumber%d_'
RegExpName = u'PyJsConstantRegExp%d_'
##################################
ALPHAS = set(ascii_lowercase+ ascii_lowercase.upper())
NUMS = set(digits)
IDENTIFIER_START = ... |
cman131/MakeFriendsYouCanCallByNicknamesEvenWhenYouAreOld | refs/heads/master | server/app/tabletop_generator.py | 1 | from PIL import Image
from io import BytesIO
from app import tabletop_entity, config
import json, glob, os, requests, base64
class TableTopGenerator:
@staticmethod
def getWeissImages(cards):
baseurl = 'http://ws-tcg.com/en/cardlist/cardimages/'
for card in cards:
isGif = False
... |
merry-bits/DCache | refs/heads/master | client/src/dcache_client/zmq_client.py | 1 | from enum import Enum
from enum import unique
from logging import getLogger
# noinspection PyUnresolvedReferences
from zmq import Context, REQ, RCVTIMEO, SNDTIMEO
_LOG = getLogger(__name__)
class Cache:
_VERSION = b"1"
_GET = b"get"
_SET = b"set"
ENCODING = "utf-8"
IO_TIMEOUT = 5 * 1000 #... |
leth/nose2 | refs/heads/master | nose2/tests/unit/test_testid_plugin.py | 18 | """Test testid plugin."""
import os.path
import pickle
from six import StringIO
from nose2 import session
from nose2.events import ReportTestEvent
from nose2.plugins import testid
from nose2.tests._common import (FakeStartTestEvent, FakeLoadFromNameEvent,
FakeLoadFromNamesEvent, TestC... |
machinaut/gym | refs/heads/master | gym/envs/algorithmic/algorithmic_env.py | 3 | from gym import Env
from gym.spaces import Discrete, Tuple
from gym.utils import colorize, seeding
import numpy as np
from six import StringIO
import sys
import math
hash_base = None
def ha(array):
return (hash_base * (array + 5)).sum()
class AlgorithmicEnv(Env):
metadata = {'render.modes': ['human', 'ansi']... |
luiseduardohdbackup/odoo | refs/heads/8.0 | addons/website_crm/__openerp__.py | 321 | {
'name': 'Contact Form',
'category': 'Website',
'website': 'https://www.odoo.com/page/website-builder',
'summary': 'Create Leads From Contact Form',
'version': '1.0',
'description': """
OpenERP Contact Form
====================
""",
'author': 'OpenERP SA',
'depends': ['website_... |
TeachAtTUM/edx-platform | refs/heads/master | common/djangoapps/entitlements/api/v1/urls.py | 4 | from django.conf.urls import url, include
from rest_framework.routers import DefaultRouter
from .views import EntitlementViewSet, EntitlementEnrollmentViewSet
router = DefaultRouter()
router.register(r'entitlements', EntitlementViewSet, base_name='entitlements')
ENROLLMENTS_VIEW = EntitlementEnrollmentViewSet.as_vie... |
wdaher/zulip | refs/heads/master | zerver/management/commands/create_realm.py | 115 | from __future__ import absolute_import
from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand
from zerver.lib.actions import do_create_realm, set_default_streams
from zerver.models import RealmAlias
if not settings.VOYAGER:
from zilencer.models import... |
zzeleznick/zDjango | refs/heads/master | venv/lib/python2.7/site-packages/django/conf/locale/da/formats.py | 315 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i'
DATET... |
repotvsupertuga/tvsupertuga.repository | refs/heads/master | script.module.livestreamer/lib/livestreamer/plugins/letontv.py | 34 | import re
from livestreamer.plugin import Plugin
from livestreamer.plugin.api import http, validate
from livestreamer.stream import RTMPStream
PLAYER_URL = "http://leton.tv/player.php"
SWF_URL = "http://files.leton.tv/jwplayer.flash.swf"
_url_re = re.compile("""
http?://(\w+.)?leton.tv
(?:
/player\.p... |
denfromufa/PTVS | refs/heads/master | Python/Tests/TestData/VirtualEnv/env/Lib/encodings/iso8859_6.py | 93 | """ Python Character Mapping Codec iso8859_6 generated from 'MAPPINGS/ISO8859/8859-6.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,i... |
betzw/mbed-os | refs/heads/master | tools/host_tests/udp_link_layer_auto.py | 124 | """
mbed SDK
Copyright (c) 2011-2013 ARM Limited
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 wr... |
Gustry/QGIS | refs/heads/master | python/core/auto_additions/qgsproviderconnectionmodel.py | 32 | # The following has been generated automatically from src/core/qgsproviderconnectionmodel.h
QgsProviderConnectionModel.Role.baseClass = QgsProviderConnectionModel
|
sdeepanshu02/microblog | refs/heads/master | flask/Lib/site-packages/pbr/hooks/commands.py | 46 | # Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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
#
# Unles... |
marcelocure/django | refs/heads/master | tests/template_tests/syntax_tests/test_url.py | 108 | # coding: utf-8
from django.core.urlresolvers import NoReverseMatch, resolve
from django.template import RequestContext, TemplateSyntaxError
from django.test import (
RequestFactory, SimpleTestCase, ignore_warnings, override_settings,
)
from django.utils.deprecation import RemovedInDjango110Warning
from ..utils im... |
silverlogic/djangorestframework-expander | refs/heads/master | setup.py | 1 | from setuptools import setup
setup(
name='djangorestframework-expander',
version='0.2.3',
description=('A serializer mixin for Django REST Framework to expand object representations inline'),
author='Ryan Pineo',
author_email='[email protected]',
license='MIT',
url='https://github.com/si... |
EddyK69/domoticz | refs/heads/development | plugins/AwoxSMP/plugin.py | 23 | # Awox SmartPlug Plugin
#
# Author: zaraki673, 2017
#
"""
<plugin key="AwoxSMP" name="Awox SmartPlug" author="zaraki673" version="1.0.0">
<params>
<param field="Address" label="MAC Address" width="150px" required="true"/>
<param field="Mode6" label="Debug" width="75px">
<options>
<option label="Tru... |
koofr/thrift | refs/heads/master | lib/py/src/server/TProcessPoolServer.py | 50 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
natanielruiz/android-yolo | refs/heads/master | jni-build/jni/include/tensorflow/contrib/distributions/python/ops/operator_pd_identity.py | 3 | # 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... |
ghber/My-Django-Nonrel | refs/heads/master | django/utils/unittest/case.py | 151 | """Test case implementation"""
import sys
import difflib
import pprint
import re
import unittest
import warnings
from django.utils.unittest import result
from django.utils.unittest.util import\
safe_repr, safe_str, strclass,\
unorderable_list_difference
from django.utils.unittest.compatibility import wraps
... |
Tejal011089/huntercamp_erpnext | refs/heads/develop | erpnext/patches/v4_2/set_item_has_batch.py | 92 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("update tabItem set has_batch_no = 0 where ifnull(has_batch_no, '') = ''")
frappe.db.sql("update tabItem s... |
NullSoldier/django | refs/heads/master | tests/check_framework/test_model_field_deprecation.py | 322 | from django.core import checks
from django.db import models
from django.test import SimpleTestCase
from .tests import IsolateModelsMixin
class TestDeprecatedField(IsolateModelsMixin, SimpleTestCase):
def test_default_details(self):
class MyField(models.Field):
system_check_deprecated_details ... |
djangorussia/django-1.3-branch | refs/heads/master | tests/regressiontests/sites_framework/models.py | 133 | from django.contrib.sites.managers import CurrentSiteManager
from django.contrib.sites.models import Site
from django.db import models
class AbstractArticle(models.Model):
title = models.CharField(max_length=50)
objects = models.Manager()
on_site = CurrentSiteManager()
class Meta:
abstract = ... |
mkieszek/odoo | refs/heads/master | addons/marketing_campaign/__init__.py | 47 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import marketing_campaign
import report
|
hatwar/focal-erpnext | refs/heads/develop | erpnext/setup/page/setup_wizard/setup_wizard.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, json
from frappe.utils import cstr, flt, getdate
from frappe import _
from frappe.utils.file_manager import save_file
from frappe.tra... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.