repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
xuxiao19910803/edx | refs/heads/master | common/test/acceptance/tests/video/__init__.py | 12133432 | |
ashhher3/invenio | refs/heads/master | modules/bibauthorid/lib/__init__.py | 12133432 | |
jasonwee/asus-rt-n14uhp-mrtg | refs/heads/master | tmp/ve_asus-rt-n14uhp-mrtg/lib/python3.4/site-packages/pip/models/index.py | 917 | from pip._vendor.six.moves.urllib import parse as urllib_parse
class Index(object):
def __init__(self, url):
self.url = url
self.netloc = urllib_parse.urlsplit(url).netloc
self.simple_url = self.url_to_path('simple')
self.pypi_url = self.url_to_path('pypi')
self.pip_json_ur... |
CreativeMachinesLab/aracna | refs/heads/master | RaspberryPypose/commander.py | 2 | #!/usr/bin/env python
"""
PyPose: Bioloid pose system for arbotiX robocontroller
Copyright (c) 2009,2010 Michael E. Ferguson. All right reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foun... |
alx-eu/django | refs/heads/stable/1.5.x | django/contrib/gis/feeds.py | 225 | from __future__ import unicode_literals
from django.contrib.syndication.views import Feed as BaseFeed
from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed
class GeoFeedMixin(object):
"""
This mixin provides the necessary routines for SyndicationFeed subclasses
to produce simple GeoRSS or W3C G... |
aganji/vdtp | refs/heads/master | client.py | 1 | import vdtp
LOCAL_IP = '127.0.0.1'
LOCAL_PORT = 5050
# contruct packet (key-value pairs)
data = {'a':1,'b':2,'c':'String'}
data['d'] = 'abcdefghijklmnopqrstuvwxyz'
vdtp.send(data,(LOCAL_IP,LOCAL_PORT),1)
|
anntzer/numpy | refs/heads/master | numpy/ma/tests/test_subclassing.py | 3 | # pylint: disable-msg=W0611, W0612, W0511,R0201
"""Tests suite for MaskedArray & subclassing.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: test_subclassing.py 3473 2007-10-29 15:18:13Z jarrod.millman $
"""
import numpy as np
from numpy.testing import assert_, assert_raises
from num... |
EvanK/ansible | refs/heads/devel | lib/ansible/modules/network/avi/avi_alertemailconfig.py | 31 | #!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
ANSIB... |
tquizzle/Sick-Beard | refs/heads/development | sickbeard/notifiers/synologynotifier.py | 48 | # Author: Nyaran <nyayukko@gmail.com>
#
# This file is part of Sick Beard.
#
# Sick Beard 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 versio... |
phretor/django-academic | refs/heads/master | academic/apps/projects/urls.py | 1 | from django.conf.urls.defaults import *
from django.views.decorators.cache import cache_page
from django.views.generic.list import ListView
from django.views.generic.list_detail import object_list, object_detail
from academic.projects.models import *
urlpatterns = patterns(
'',
url(r'^topics/(?P<slug>[-\w]+)... |
7kbird/chrome | refs/heads/master | third_party/closure_linter/closure_linter/fixjsstyle.py | 107 | #!/usr/bin/env python
#
# Copyright 2007 The Closure Linter 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
#... |
hammerlab/cohorts | refs/heads/master | cohorts/variant_stats.py | 1 | # Copyright (c) 2017. Mount Sinai School of Medicine
#
# 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 o... |
fyfcauc/android_external_chromium-org | refs/heads/du44 | tools/idl_parser/idl_lexer_test.py | 116 | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from idl_lexer import IDLLexer
from idl_ppapi_lexer import IDLPPAPILexer
#
# FileToTokens
#
# From a source file ... |
alexus37/AugmentedRealityChess | refs/heads/master | pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/sre_compile.py | 4 | /usr/lib/python2.7/sre_compile.py |
ryfeus/lambda-packs | refs/heads/master | Keras_tensorflow/source/google/protobuf/internal/more_extensions_pb2.py | 43 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/internal/more_extensions.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.pro... |
kriberg/stationspinner | refs/heads/master | stationspinner/corporation/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
avoinsystems/stock-logistics-warehouse | refs/heads/8.0 | stock_available_immediately/tests/test_stock_available_immediately.py | 5 | # -*- coding: utf-8 -*-
# © 2015 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.tests.common import TransactionCase
class TestStockLogisticsWarehouse(TransactionCase):
def test01_stock_levels(self):
"""checking that immediately_usable_qty act... |
django-nonrel/django-nonrel | refs/heads/develop | tests/regressiontests/forms/localflavor/fr.py | 89 | from django.contrib.localflavor.fr.forms import (FRZipCodeField,
FRPhoneNumberField, FRDepartmentSelect)
from utils import LocalFlavorTestCase
class FRLocalFlavorTests(LocalFlavorTestCase):
def test_FRZipCodeField(self):
error_format = [u'Enter a zip code in the format XXXXX.']
valid = {
... |
tmuelle2/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/createbug.py | 125 | # Copyright (C) 2010 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 ... |
stuartcampbell/gitinspector | refs/heads/master | gitinspector/filtering.py | 49 | # coding: utf-8
#
# Copyright © 2012-2014 Ejwa Software. All rights reserved.
#
# This file is part of gitinspector.
#
# gitinspector is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... |
hassanibi/erpnext | refs/heads/develop | erpnext/schools/doctype/student_admission/student_admission.py | 25 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.website.website_generator import WebsiteGenerator
from frappe import _
class StudentAdmission(WebsiteGenerato... |
T-B-F/pyBioUtils | refs/heads/master | scripts/jackhmmer_search_and_rescue.py | 1 | #!/usr/bin/env python
""" from initial sequence use jackhmmer to retrieve remote target
filter target based on the presence of the non degenerated walker A
"""
import os, sys, argparse
import shlex, subprocess
import re
from Bio import AlignIO
def get_cmd():
parser = argparse.ArgumentParser()
parser.add_argu... |
leeseuljeong/leeseulstack_neutron | refs/heads/master | neutron/tests/unit/metaplugin/test_metaplugin.py | 14 | # Copyright 2012, Nachi Ueno, NTT MCL, 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
#
# Unles... |
DueLaser/due_rasp | refs/heads/master | src/octoprint/gcodegenerator/simplepath.py | 9 | #!/usr/bin/env python
"""
simplepath.py
functions for digesting paths into a simple list structure
Copyright (C) 2005 Aaron Spike, aaron@ekips.org
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; eit... |
kalicodextu/djangoblog | refs/heads/master | blog/tests.py | 873 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
# Create your tests here.
|
noiselabs/box-linux-sync | refs/heads/master | setup.py | 1 | from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
NEWS = open(os.path.join(here, 'NEWS.txt')).read()
version = '0.1.0'
install_requires = [
# List your project dependencies here.
# For more detail... |
kthordarson/CouchPotatoServer | refs/heads/master | libs/dateutil/tzwin.py | 227 | # This code was originally contributed by Jeffrey Harris.
import datetime
import struct
import winreg
__all__ = ["tzwin", "tzwinlocal"]
ONEWEEK = datetime.timedelta(7)
TZKEYNAMENT = r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones"
TZKEYNAME9X = r"SOFTWARE\Microsoft\Windows\CurrentVersion\Time Zones"
TZLOC... |
gregdek/ansible | refs/heads/devel | lib/ansible/modules/remote_management/oneview/oneview_network_set_facts.py | 125 | #!/usr/bin/python
# Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP
# 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',
... |
kartikgupta0909/gaia | refs/heads/master | test/unittest/test_transfo.py | 3 | #!/usr/bin/env python
# Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Gaia
#
# Gaia 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 (FSF), either ve... |
irdumbs/Dumb-Cogs | refs/heads/master | welcome/welcome.py | 1 | import discord
from discord.ext import commands
from .utils.dataIO import dataIO
from .utils import checks
from .utils.chat_formatting import pagify
from __main__ import send_cmd_help
from copy import deepcopy
import os
import asyncio
from random import choice as rand_choice
default_greeting = "Welcome {0.name} to {1... |
Slezhuk/ansible | refs/heads/devel | lib/ansible/modules/notification/campfire.py | 70 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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.
... |
feist/pcs | refs/heads/master | pcs/lib/commands/test/cluster/__init__.py | 12133432 | |
jk1/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/contrib/markup/models.py | 12133432 | |
tjghs/ghstracker | refs/heads/master | ghswebsite/apps/announcements/models.py | 3 | from django.db import models
class Announcement(models.Model):
date = models.DateField(auto_now=True)
title = models.CharField(max_length=100)
content = models.TextField(max_length=500)
|
pbanaszkiewicz/website | refs/heads/gh-pages | _posts/2015/02/per-capita.py | 9 | import sys
import csv
import numpy as np
from matplotlib import pyplot as plt
countries = []
populations = []
attendees = []
instructors = []
with open(sys.argv[1], 'r') as raw:
cooked = csv.reader(raw)
for (c, p, a, i) in cooked:
countries.append(c)
populations.append(float(p))
attende... |
jcpowermac/ansible | refs/heads/devel | test/units/modules/network/f5/test_bigiq_regkey_pool.py | 28 | # -*- 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
import os
import json
import pytest
import sys
from nose.plugins.skip imp... |
mweb/python | refs/heads/master | exercises/house/example.py | 7 | parts = [('lay in', 'the house that Jack built'),
('ate', 'the malt'),
('killed', 'the rat'),
('worried', 'the cat'),
('tossed', 'the dog'),
('milked', 'the cow with the crumpled horn'),
('kissed', 'the maiden all forlorn'),
('married', 'the man all tattere... |
skyshe/oms | refs/heads/master | asset/form.py | 13 | # -*- coding: utf-8 -*-
from django import forms
from asset.models import *
class HostsListForm(forms.ModelForm):
class Meta:
model = HostList
widgets = {
'ip': forms.TextInput(attrs={'class': 'form-control'}),
'hostname': forms.TextInput(attrs={'class': 'form-control'}),
... |
markmsmith/LeapWebVisualizer | refs/heads/master | websocketserver.py | 1 | import os
import time
import Queue
import logging
import threading
import tornado.ioloop
import tornado.options
import tornado.web
import tornado.websocket
import Leap
import simplejson as json
logger = logging.getLogger(__name__)
class LeapJSONEncoder(json.JSONEncoder):
"""
JSONEncoder subclass that knows... |
FHannes/intellij-community | refs/heads/master | plugins/hg4idea/testData/bin/mercurial/scmposix.py | 94 | import sys, os
import osutil
def _rcfiles(path):
rcs = [os.path.join(path, 'hgrc')]
rcdir = os.path.join(path, 'hgrc.d')
try:
rcs.extend([os.path.join(rcdir, f)
for f, kind in osutil.listdir(rcdir)
if f.endswith(".rc")])
except OSError:
pass
r... |
pythonpackages/vanity_app | refs/heads/master | debug.py | 2 | import os
import sys
import redis
import readline
import rlcompleter
import urlparse
readline.parse_and_bind('tab: complete')
if 'REDISTOGO_URL' in os.environ:
urlparse.uses_netloc.append('redis')
url = urlparse.urlparse(os.environ['REDISTOGO_URL'])
db = redis.Redis(host=url.hostname, port=url.port, db=0,... |
ncultra/qemu | refs/heads/master | scripts/tracetool/backend/simple.py | 97 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Simple built-in backend.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnoczi"... |
github-account-because-they-want-it/django | refs/heads/master | django/dispatch/dispatcher.py | 171 | import sys
import threading
import warnings
import weakref
from django.utils import six
from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.inspect import func_accepts_kwargs
from django.utils.six.moves import range
if six.PY2:
from .weakref_backports import WeakMethod
else:
from w... |
leiferikb/bitpop | refs/heads/master | src/third_party/webpagereplay/third_party/dns/rdtypes/ANY/ISDN.py | 248 | # Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... |
bepitulaz/huntingdimana | refs/heads/master | env/Lib/encodings/utf_16.py | 404 | """ Python 'utf-16' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs, sys
### Codec APIs
encode = codecs.utf_16_encode
def decode(input, errors='strict'):
return codecs.utf_16_decode(input, errors, True)
class IncrementalEncoder(c... |
Unidata/MetPy | refs/heads/gh-pages | v0.8/_downloads/Four_Panel_Map.py | 6 | # Copyright (c) 2017 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
Four Panel Map
===============
By reading model output data from a netCDF file, we can create a four panel plot showing:
* 300 hPa heights and winds
* 500 hPa heights and absol... |
pitch-sands/i-MPI | refs/heads/master | flask/Lib/site-packages/lamson/bounce.py | 1 | """
Bounce analysis module for Lamson. It uses an algorithm that tries
to simply collect the headers that are most likely found in a bounce
message, and then determine a probability based on what it finds.
"""
import re
from functools import wraps
BOUNCE_MATCHERS = {
'Action': re.compile(r'(failed|delayed|deliv... |
MalloyPower/parsing-python | refs/heads/master | front-end/testsuite-python-lib/Python-3.2/Lib/test/json_tests/test_scanstring.py | 2 | import sys
import decimal
from unittest import TestCase
import json
import json.decoder
class TestScanString(TestCase):
def test_py_scanstring(self):
self._test_scanstring(json.decoder.py_scanstring)
def test_c_scanstring(self):
if json.decoder.c_scanstring is not None:
self._test... |
Serebriakov/python-llfuse | refs/heads/master | setup.py | 2 | #!/usr/bin/env python
'''
setup.py
Installation script for LLFUSE.
Copyright (C) Nikolaus Rath <Nikolaus@rath.org>
This file is part of LLFUSE (http://python-llfuse.googlecode.com).
LLFUSE can be distributed under the terms of the GNU LGPL.
'''
from __future__ import division, print_function, absolute_import
impor... |
rszalski/python-gae-spike | refs/heads/master | lib/flask/signals.py | 783 | # -*- coding: utf-8 -*-
"""
flask.signals
~~~~~~~~~~~~~
Implements signals based on blinker if available, otherwise
falls silently back to a noop
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
signals_available = False
try:
from blinker import Name... |
sjuxax/raggregate | refs/heads/master | raggregate/tests/test_epistle.py | 1 | from pyramid import testing
from raggregate.tests import BaseTest
from raggregate.queries import epistle as epistle_queries
from raggregate.queries import users
from raggregate.models.epistle import Epistle
from raggregate.views.epistle import _unwrap_list
class TestEpistles(BaseTest):
def create_epistle(self, re... |
mikegraham/dask | refs/heads/master | dask/tests/__init__.py | 12133432 | |
michailbrynard/django-skeleton | refs/heads/master | src/config/__init__.py | 12133432 | |
eregs/regulations-core | refs/heads/master | regcore/migrations/0009_auto_20160322_1646.py | 3 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('regcore', '0008_auto_20160314_1144'),
]
operations = [
migrations.RenameField(
model_name='layer',
o... |
luotao1/Paddle | refs/heads/develop | python/paddle/fluid/tests/unittests/dist_ctr.py | 2 | # Copyright (c) 2018 PaddlePaddle 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 app... |
ZhangXinNan/tensorflow | refs/heads/master | tensorflow/python/saved_model/saved_model_test.py | 4 | # 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... |
PeterWangIntel/chromium-crosswalk | refs/heads/master | third_party/markdown/util.py | 109 | # -*- coding: utf-8 -*-
# markdown is released under the BSD license
# Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later)
# Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
# Copyright 2004 Manfred Stienstra (the original version)
#
# All rights reserved.
#
# Redistribution and use in source a... |
alexandrucoman/vbox-nova-driver | refs/heads/master | nova/tests/unit/virt/test_images.py | 67 | # Copyright 2013 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 agree... |
petecummings/django-cms | refs/heads/develop | cms/tests/test_views.py | 16 | from __future__ import with_statement
from copy import deepcopy
import re
import sys
from django.core.cache import cache
from django.conf import settings
from django.contrib.auth.models import Permission
from django.core.urlresolvers import clear_url_caches
from django.http import Http404
from django.template import V... |
iskandr/fancyimpute | refs/heads/master | test/low_rank_data.py | 2 | import numpy as np
def create_rank_k_dataset(
n_rows=5,
n_cols=5,
k=3,
fraction_missing=0.1,
symmetric=False,
random_seed=0):
np.random.seed(random_seed)
x = np.random.randn(n_rows, k)
y = np.random.randn(k, n_cols)
XY = np.dot(x, y)
if symmetric:
... |
ebagdasa/tempest | refs/heads/master | tempest/api/data_processing/test_plugins.py | 2 | # Copyright (c) 2014 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
fe11x/pythondotorg | refs/heads/master | pages/search_indexes.py | 14 | from django.template.defaultfilters import truncatewords_html, striptags
from haystack import indexes
from .models import Page
class PageIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
title = indexes.CharField(model_attr='title')
description = i... |
caktus/rapidsms-appointments | refs/heads/master | appointments/tests/test_tasks.py | 1 | from __future__ import unicode_literals
import datetime
from .base import AppointmentDataTestCase, Appointment, Milestone, Notification, now
from ..tasks import generate_appointments, send_appointment_notifications, APPT_REMINDER
class GenerateAppointmentsTestCase(AppointmentDataTestCase):
"Task to generate fut... |
matsumoto-r/synciga | refs/heads/master | src/talk/site_scons/site_tools/talk_noops.py | 96 | # Copyright 2010 Google Inc.
# All Rights Reserved.
# Author: thaloun@google.com (Tim Haloun)
"""Noop tool that defines builder functions for non-default platforms to
avoid errors when scanning sconsscripts."""
import SCons.Builder
def generate(env):
"""SCons method."""
if not env.Bit('windows'):
builder... |
Zarthus/Reconcile | refs/heads/master | .travis/test_module.py | 1 | """
The MIT License (MIT)
Copyright (c) 2014 - 2015 Jos "Zarthus" Ahrens and contributors
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 rig... |
smolix/incubator-mxnet | refs/heads/master | tools/coreml/converter/utils.py | 46 | # 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... |
israeltobias/DownMedia | refs/heads/master | youtube-dl/youtube_dl/extractor/flickr.py | 37 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import compat_urllib_parse_urlencode
from ..utils import (
ExtractorError,
int_or_none,
qualities,
)
class FlickrIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.|secure\.)?flickr\.com/photos/[\w\-_@]+/(?P<id>\d... |
janusnic/21v-python | refs/heads/master | unit_12/pad/p1.py | 1 | import sys
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
class Main(QtGui.QMainWindow):
def __init__(self, parent = None):
QtGui.QMainWindow.__init__(self,parent)
self.initUI()
def initUI(self):
# x and y coordinates on the screen, width, height
self.setGeometr... |
171121130/SWI | refs/heads/master | venv/Lib/site-packages/pymysql/tests/test_converters.py | 19 | import datetime
from unittest import TestCase
from pymysql._compat import PY2
from pymysql import converters
__all__ = ["TestConverter"]
class TestConverter(TestCase):
def test_escape_string(self):
self.assertEqual(
converters.escape_string(u"foo\nbar"),
u"foo\\nbar"
)
... |
zuotingbing/spark | refs/heads/master | python/pyspark/sql/tests/test_dataframe.py | 2 | #
# 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... |
fdr/double-boiler | refs/heads/master | hellodjango/__init__.py | 12133432 | |
vvtam/virtualenv | refs/heads/develop | virtualenv_support/__init__.py | 12133432 | |
ctrlaltdel/neutrinator | refs/heads/master | vendor/dogpile/__init__.py | 3 | __version__ = '0.7.1'
from .lock import Lock # noqa
from .lock import NeedRegenerationException # noqa
|
xvedejas/limbo4 | refs/heads/master | Lib/unittest/test/testmock/testpatch.py | 4 | # Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
import os
import sys
import unittest
from unittest.test.testmock import support
from unittest.test.testmock.support import SomeClass, is_instance
from unittest.... |
avatar29A/adbook | refs/heads/master | adbook/addressbook.py | 1 | # coding=utf-8
from typing import NewType, Dict, List, Type
from adbook.drivers.json_store_driver import JsonStoreDriver
from adbook.orm.default_collections.groups import GroupCollection
from adbook.orm.default_collections.persons import PersonCollection
from adbook.abs_store_driver import AbsStoreDriver
from adbook... |
galaxyfreak/android_kernel_htc_z4u | refs/heads/master | scripts/rt-tester/rt-tester.py | 11005 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... |
smallyear/linuxLearn | refs/heads/master | salt/salt/cli/run.py | 1 | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import absolute_import
from salt.utils import parsers
from salt.utils import activate_profile
from salt.utils import output_profile
from salt.utils.verify import check_user, verify_log
from salt.exceptions import SaltClientError
import salt.... |
godstale/HomePy | refs/heads/master | src/tg/bot/MessageBox.py | 1 | #-*- coding: utf-8 -*-
import os
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
# Set language
# en: English, kr: Korean
msg_lang = 'en'
def set_msg_lang(lang_code):
global msg_lang
msg_lang = lang_code
def msg_welcome():
print msg_lang
if msg_lang == 'kr':
return '안녕하세요!!'
else:... |
lynxis/pyLogicSniffer | refs/heads/master | simple_test_frame.py | 2 | # -*- coding: UTF-8 -*-
'''Frame class to run a dialog for testing.
Copyright © 2011, Mel Wilson mwilson@melwilsonsoftware.ca
This file is part of pyLogicSniffer.
pyLogicSniffer is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the... |
sharad/calibre | refs/heads/master | src/calibre/gui2/preferences/keyboard.py | 1 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
from PyQt5.Qt ... |
TeamEOS/external_chromium_org | refs/heads/lp5.0 | chrome/test/chromedriver/client/webelement.py | 43 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from command_executor import Command
class WebElement(object):
"""Represents an HTML element."""
def __init__(self, chromedriver, id_):
self._chrom... |
mdj2/django | refs/heads/master | tests/admin_validation/models.py | 192 | """
Tests of ModelAdmin validation logic.
"""
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
class Album(models.Model):
title = models.CharField(max_length=150)
@python_2_unicode_compatible
class Song(models.Model):
title = models.CharField(max_length=150)
al... |
blaggacao/OpenUpgrade | refs/heads/8.0 | addons/crm_profiling/crm_profiling.py | 333 | # -*- 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... |
iulian787/spack | refs/heads/develop | var/spack/repos/builtin/packages/py-docopt/package.py | 5 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyDocopt(PythonPackage):
"""Command-line interface description language."""
homepage ... |
BT-ojossen/odoo | refs/heads/8.0 | addons/l10n_es/migrations/8.0.5.0/pre-migration.py | 52 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2015 Serv. Tecnol. Avanz. (<http://www.serviciosbaeza.com>)
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
# ... |
kitsunde/ansible | refs/heads/devel | lib/ansible/playbook/helpers.py | 11 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... |
githubmlai/numpy | refs/heads/master | numpy/fft/fftpack.py | 72 | """
Discrete Fourier Transforms
Routines in this module:
fft(a, n=None, axis=-1)
ifft(a, n=None, axis=-1)
rfft(a, n=None, axis=-1)
irfft(a, n=None, axis=-1)
hfft(a, n=None, axis=-1)
ihfft(a, n=None, axis=-1)
fftn(a, s=None, axes=None)
ifftn(a, s=None, axes=None)
rfftn(a, s=None, axes=None)
irfftn(a, s=None, axes=None... |
Bindupriya/nuxeo-drive | refs/heads/master | nuxeo-drive-client/nxdrive/engine/engine.py | 1 | from PyQt4.QtCore import QObject, QCoreApplication
from PyQt4.QtCore import pyqtSlot, pyqtSignal
from nxdrive.logging_config import get_logger
from nxdrive.commandline import DEFAULT_REMOTE_WATCHER_DELAY
from nxdrive.commandline import DEFAULT_UPDATE_SITE_URL
from nxdrive.client.common import DEFAULT_REPOSITORY_NAME
fr... |
tylertian/Openstack | refs/heads/master | openstack F/django_openstack_auth/openstack_auth/tests/__init__.py | 12133432 | |
juanshishido/info290-dds | refs/heads/master | assignments/assignment02/code/tests/__init__.py | 12133432 | |
laserjock/tittle | refs/heads/master | python_rtm/__init__.py | 12133432 | |
fangxingli/hue | refs/heads/master | desktop/core/ext-py/django-extensions-1.5.0/django_extensions/db/fields/json.py | 35 | """
JSONField automatically serializes most Python terms to JSON data.
Creates a TEXT field with a default value of "{}". See test_json.py for
more information.
from django.db import models
from django_extensions.db.fields import json
class LOL(models.Model):
extra = json.JSONField()
"""
from __future__ impo... |
zchking/odoo | refs/heads/8.0 | addons/website/__openerp__.py | 311 | {
'name': 'Website Builder',
'category': 'Website',
'summary': 'Build Your Enterprise Website',
'website': 'https://www.odoo.com/page/website-builder',
'version': '1.0',
'description': """
OpenERP Website CMS
===================
""",
'author': 'OpenERP SA',
'depends': ['web', 's... |
gregdek/ansible | refs/heads/devel | test/units/modules/network/f5/test_bigip_profile_udp.py | 21 | # -*- 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
import os
import json
import pytest
import sys
if sys.version_info < (2... |
lukas-hetzenecker/home-assistant | refs/heads/dev | homeassistant/components/climate/radiotherm.py | 5 | """
Support for Radio Thermostat wifi-enabled home thermostats.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/climate.radiotherm/
"""
import datetime
import logging
import voluptuous as vol
from homeassistant.components.climate import (
STATE_AUTO... |
Manabu-GT/DesignOverlay-Android | refs/heads/master | appium/android_sauce_labs.py | 4 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Author : Manabu Shimobe
"""
__author__ = "Manabu Shimobe"
from appium import webdriver
from appium import SauceTestCase, on_platforms
from time import sleep
from logging import getLogger, StreamHandler, Formatter, DEBUG
from os import environ
import json
# load de... |
Francis-Liu/animated-broccoli | refs/heads/master | nova/api/openstack/compute/schemas/user_data.py | 88 | # Copyright 2014 NEC Corporation. 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 ... |
biddisco/VTK | refs/heads/master | ThirdParty/Twisted/twisted/conch/manhole.py | 52 | # -*- test-case-name: twisted.conch.test.test_manhole -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Line-input oriented interactive interpreter loop.
Provides classes for handling Python source input and arbitrary output
interactively from a Twisted application. Also included is syn... |
dav1x/ansible | refs/heads/devel | lib/ansible/modules/messaging/rabbitmq_binding.py | 69 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Manuel Sousa <manuel.sousa@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the... |
eharney/nova | refs/heads/master | nova/api/openstack/compute/contrib/baremetal_ext_status.py | 13 | # Copyright 2013 OpenStack Foundation
#
# 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.