repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
zhjunlang/kbengine | refs/heads/master | kbe/src/lib/python/Lib/multiprocessing/managers.py | 85 | #
# Module providing the `SyncManager` class for dealing
# with shared objects
#
# multiprocessing/managers.py
#
# Copyright (c) 2006-2008, R Oudkerk
# Licensed to PSF under a Contributor Agreement.
#
__all__ = [ 'BaseManager', 'SyncManager', 'BaseProxy', 'Token' ]
#
# Imports
#
import sys
import threading
import ar... |
fxtentacle/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/QueueStatusServer/model/queuepropertymixin_unittest.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 ... |
kcolford/txt2boil | refs/heads/develop | txt2boil/cmi.py | 1 | # Copyright (C) 2014 Kieran Colford
#
# This file is part of txt2boil.
#
# txt2boil 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.
#
#... |
theoryno3/scikit-learn | refs/heads/master | sklearn/feature_extraction/setup.py | 314 | import os
def configuration(parent_package='', top_path=None):
import numpy
from numpy.distutils.misc_util import Configuration
config = Configuration('feature_extraction', parent_package, top_path)
libraries = []
if os.name == 'posix':
libraries.append('m')
config.add_extension('_ha... |
googledatalab/pydatalab | refs/heads/master | tests/mlworkbench_magic/explainer_tests.py | 2 | # Copyright 2017 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
cyrusin/tornado | refs/heads/master | tornado/test/windows_test.py | 16 | import functools
import os
import socket
import unittest
from tornado.platform.auto import set_close_exec
skipIfNonWindows = unittest.skipIf(os.name != 'nt', 'non-windows platform')
@skipIfNonWindows
class WindowsTest(unittest.TestCase):
def test_set_close_exec(self):
# set_close_exec works with sockets.... |
AEDA-Solutions/matweb | refs/heads/master | backend/Models/Predio/RespostaListar.py | 1 | from Framework.Resposta import Resposta
from Models.Predio.Predio import Predio as ModelPredio
class RespostaListar(Resposta):
def __init__(self,predios):
self.corpo = []
for predio in predios:
self.corpo.append(ModelPredio(predio))
|
nhicher/ansible | refs/heads/devel | lib/ansible/modules/storage/infinidat/infini_fs.py | 70 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Gregory Shulov ([email protected])
# 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': '... |
tellapart/Diamond | refs/heads/master | src/collectors/openstackswift/openstackswift.py | 6 | # coding=utf-8
"""
Openstack swift collector.
#### Dependencies
* swift-dispersion-report commandline tool (for dispersion report)
if using this, make sure swift.conf and dispersion.conf are reable by diamond
also get an idea of the runtime of a swift-dispersion-report call and make
sure the collect interv... |
solring/TWCompanyTree | refs/heads/master | TWCTenv/lib/python2.7/site-packages/setuptools/tests/test_packageindex.py | 66 | """Package Index Tests
"""
import sys
import unittest
import pkg_resources
from setuptools.compat import urllib2, httplib, HTTPError, unicode
import distutils.errors
import setuptools.package_index
from setuptools.tests.server import IndexServer
class TestPackageIndex(unittest.TestCase):
def test_bad_url_bad_port... |
zenodo/invenio | refs/heads/zenodo-master | invenio/legacy/bibupload/scripts/batchuploader.py | 13 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2010, 2011, 2013 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your optio... |
Volvagia356/mobile-gst | refs/heads/master | gst.py | 1 | import requests
from time import time
from bs4 import BeautifulSoup
class FWDC(requests.Session):
def __init__(self, *args, **kwargs):
self.fwdc_data = {}
self.fwdc_data['FAST_CLIENT_WINDOW__'] = "FWDC.WND-0000-0000-0000"
self.fwdc_data['FAST_CLIENT_AJAX_ID__'] = 0
super(FWDC, self)... |
pepeportela/edx-platform | refs/heads/master | cms/djangoapps/contentstore/tests/test_import.py | 20 | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
"""
Tests for import_course_from_xml using the mongo modulestore.
"""
import copy
from uuid import uuid4
import ddt
from django.conf import settings
from django.test.client import Client
from django.test.utils import override_settings
from mock import patch
... |
charles-g-young/Table2NetCDF | refs/heads/master | gov/noaa/gmd/table_2_netcdf/Properties.py | 1 | '''
Global properties.
Created on Mar 5, 2017
@author: greg
'''
PROJECT_DIR="../../../.."
TEST_DATA_DIR=PROJECT_DIR+"/test-data"
|
TRESCLOUD/odoo | refs/heads/Integracion&ControlDeCalidad | addons/web/doc/_themes/flask_theme_support.py | 2228 | # flasky extensions. flasky pygments style based on tango style
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
class FlaskyStyle(Style):
background_color = "#f8f8f8"
default_style = "... |
zhenzhenyang-psu/bootcamp-central | refs/heads/master | web/2016/context.py | 9 | # Pyblue specific context
# Name, URL tuples
navbar = [
("Day 1", "/day1/day1_index.html"),
("Day 2", "/day2/day2_index.html"),
("Day 3", "/day3/day3_index.html"),
("Day 4", "/day4/day4_index.html"),
("Day 5", "/day5/day5_index.html"),
]
|
iRGBit/QGIS | refs/heads/master | python/plugins/processing/algs/qgis/Grid.py | 5 | # -*- coding: utf-8 -*-
"""
***************************************************************************
Grid.py
---------------------
Date : May 2010
Copyright : (C) 2010 by Michael Minn
Email : pyqgis at michaelminn dot com
********************************... |
ad-m/django-atom | refs/heads/master | atom/ext/guardian/tests.py | 1 | from guardian.shortcuts import assign_perm
from django.core.exceptions import ImproperlyConfigured
class PermissionStatusMixin(object):
"""Mixin to verify object permission status codes for different users
Require user with username='john' and password='pass'
Attributes:
permission (list): Descr... |
tgerla/ansible | refs/heads/devel | test/units/playbook/test_playbook.py | 290 | # (c) 2012-2014, Michael DeHaan <[email protected]>
#
# 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... |
aozima/rt-thread | refs/heads/master | bsp/x1000/rtconfig.py | 9 | import os
# toolchains options
ARCH ='mips'
CPU ='x1000'
CROSS_TOOL ='gcc'
if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_PATH = r'E:\work\env\tools\gnu_gcc\mips_gcc\mips-2016.05\bin'
else:
print('Please make sure your tool... |
MShel/ttw | refs/heads/master | stats/adapters/sqliteAdapter.py | 1 | from listener.packets.abstractPacket import AbstractPacket
from pprint import pprint
import sqlite3
from stats.adapters.abstractAdapter import AbstractAdapter
class SqliteAdapter(AbstractAdapter):
sqliteConnection = None
def __init__(self, credentials: dict):
self.sqliteCo... |
dvliman/jaikuengine | refs/heads/master | .google_appengine/lib/django-1.2/tests/regressiontests/reverse_single_related/tests.py | 43 | from django.test import TestCase
from regressiontests.reverse_single_related.models import *
class ReverseSingleRelatedTests(TestCase):
"""
Regression tests for an object that cannot access a single related
object due to a restrictive default manager.
"""
def test_reverse_single_related(self):
... |
enigmagroup/enigmasuite | refs/heads/master | files/webinterface/app/views.py | 1 | from django.shortcuts import render_to_response, redirect
from django.template import RequestContext
from subprocess import Popen, PIPE
from app.models import *
from app.forms import *
import random
import string
import json
from datetime import datetime, timedelta
from django.views.decorators.csrf import csrf_exempt
f... |
Akylas/CouchPotatoServer | refs/heads/master | couchpotato/core/plugins/trailer/__init__.py | 4 | from .main import Trailer
def start():
return Trailer()
config = [{
'name': 'trailer',
'groups': [
{
'tab': 'renamer',
'subtab': 'trailer',
'name': 'trailer',
'label': 'Download trailer after rename',
'options': [
{
... |
Tatsh-ansible/ansible | refs/heads/devel | lib/ansible/modules/cloud/cloudstack/cs_role.py | 18 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <[email protected]>
#
# 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 Lice... |
Xilinx/BNN-PYNQ | refs/heads/master | bnn/src/training/mnist-gen-weights-W1A2.py | 1 | # BSD 3-Clause License
# =======
# Copyright (c) 2020, Xilinx
# 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
# li... |
tdyas/pants | refs/heads/master | src/python/pants/build_graph/address_lookup_error.py | 2 | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
class AddressLookupError(Exception):
"""Raised by various modules when an address can't be resolved. Use this common base class so
other modules can trap the error at each node a... |
nvoron23/hue | refs/heads/master | apps/sqoop/src/sqoop/api/submission.py | 32 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
bala4901/odoo | refs/heads/master | addons/hr_contract/__init__.py | 381 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-Today OpenERP SA (<http://www.openerp.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the term... |
hsoft/pdfmasher | refs/heads/master | core/gui/build_pane.py | 1 | # Created By: Virgil Dupras
# Created On: 2011-07-09
# Copyright 2013 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "GPL v3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/lic... |
TalkingCactus/Citadel-Station-13-5th-Port | refs/heads/master | bot/Namecheck.py | 55 |
def Namecheck_allinone(name, against, sender=None):
__doc__ = "False = No match, True = Match"
if not isinstance(against, iterable):
return False
if isinstance(against, dict):
for key, value in against.iteritems():
if value.lower() in name.lower() and (sender and sender.lower(... |
obi-two/Rebelion | refs/heads/master | data/scripts/templates/object/tangible/wearables/necklace/shared_necklace_adorned_beads.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/wearables/necklace/shared_necklace_adorned_beads.iff"
result.attrib... |
poppogbr/genropy | refs/heads/master | gnrpy/gnr/web/gnrwebpage_proxy/apphandler.py | 1 | # -*- coding: UTF-8 -*-
#--------------------------------------------------------------------------
# package : GenroPy web - see LICENSE for details
# module gnrwebcore : core module for genropy web framework
# Copyright (c) : 2004 - 2007 Softwell sas - Milano
# Written by : Giovanni Porcari, Michele... |
vuteam/BlackHole-New | refs/heads/master | lib/python/Components/Converter/RdsInfo.py | 163 | from enigma import iRdsDecoder, iPlayableService
from Components.Converter.Converter import Converter
from Components.Element import cached
class RdsInfo(Converter, object):
RASS_INTERACTIVE_AVAILABLE = 0
RTP_TEXT_CHANGED = 1
RADIO_TEXT_CHANGED = 2
def __init__(self, type):
Converter.__init__(self, type)
self... |
colinnewell/odoo | refs/heads/8.0 | addons/document/__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... |
Juanlu001/CBC.Solve | refs/heads/master | cbc/swing/utils.py | 3 | "This module provides various utility functions"
__author__ = "Kristoffer Selim and Anders Logg"
__copyright__ = "Copyright (C) 2010 Simula Research Laboratory and %s" % __author__
__license__ = "GNU GPL Version 3 or any later version"
# Last changed: 2011-02-04
from os import mkdir
from time import strftime
from d... |
doheekim/chuizonetest | refs/heads/master | lib/sqlalchemy/engine/__init__.py | 10 | # engine/__init__.py
# Copyright (C) 2005-2014 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
"""SQL connections, SQL execution and high-level DB-API interface.
The engine pa... |
Diaoul/subliminal | refs/heads/master | tests/test_podnapisi.py | 2 | # -*- coding: utf-8 -*-
import os
from babelfish import Language
import pytest
from vcr import VCR
from subliminal.providers.podnapisi import PodnapisiProvider, PodnapisiSubtitle
vcr = VCR(path_transformer=lambda path: path + '.yaml',
record_mode=os.environ.get('VCR_RECORD_MODE', 'once'),
casset... |
barbarubra/Don-t-know-What-i-m-doing. | refs/heads/master | python-build/python-libs/gdata/tests/gdata_tests/spreadsheet_test.py | 92 | #!/usr/bin/python
#
# Copyright (C) 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
ian-ross/fp-legacy | refs/heads/modernize | decoder/matchup.py | 4 | import sys
import math
import numpy
import os.path
import PIL.Image
import PIL.ImageDraw
class Feature:
def __init__(self, x, y, scale, rotation, descriptors):
self.x = x
self.y = y
self.s = scale
self.r = rotation
self.d = descriptors
def __repr__(self):
... |
googleapis/googleapis-gen | refs/heads/master | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/keyword_view_service/transports/grpc.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
adrianholovaty/django | refs/heads/master | django/contrib/sessions/tests.py | 10 | from datetime import datetime, timedelta
import shutil
import string
import tempfile
import warnings
from django.conf import settings
from django.contrib.sessions.backends.db import SessionStore as DatabaseSession
from django.contrib.sessions.backends.cache import SessionStore as CacheSession
from django.contrib.sessi... |
JohnOmernik/pimeup | refs/heads/master | dotstar/JO_fire.py | 1 | #!/usr/bin/python
from collections import OrderedDict
import time
import random
from dotstar import Adafruit_DotStar
COOLING = 60
SPARKING = 60
numpixels = 60 # Number of LEDs in strip
# Here's how to control the strip from any two GPIO pins:
datapin = 23
clockpin = 24
strip = Adafruit_DotStar(numpixels, datap... |
Zlash65/erpnext | refs/heads/develop | erpnext/education/doctype/article/article.py | 6 | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class Article(Document):
def get_article(self):
pass
|
marhar/mavlink | refs/heads/master | pymavlink/DFReader.py | 14 | #!/usr/bin/env python
'''
APM DataFlash log file reader
Copyright Andrew Tridgell 2011
Released under GNU GPL version 3 or later
Partly based on SDLog2Parser by Anton Babushkin
'''
import struct, time, os
from . import mavutil
FORMAT_TO_STRUCT = {
"b": ("b", None, int),
"B": ("B", None, int),
"h": ("h",... |
GyrosOfWar/servo | refs/heads/master | tests/wpt/css-tests/tools/pywebsocket/src/test/test_stream.py | 496 | #!/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... |
mo-norant/FinHeartBel | refs/heads/master | website/node_modules/node-gyp/gyp/tools/graphviz.py | 2679 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Using the JSON dumped by the dump-dependency-json generator,
generate input suitable for graphviz to render a dependency graph of
targets... |
cypreess/PyrateDice | refs/heads/master | game_server/game_server/game_server/celery.py | 1 | from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'game_server.settings')
app = Celery('game_server')
# Using a string here means the worker ... |
diorcety/intellij-community | refs/heads/master | python/testData/optimizeImports/importStar.py | 83 | from sys import *
from re import *
compile
|
jawilson/home-assistant | refs/heads/master | homeassistant/components/automation/sun.py | 1 | """
Offer sun based automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#sun-trigger
"""
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant.const import (
CONF_EVENT, CONF_OFFSET... |
tkaitchuck/nupic | refs/heads/master | examples/opf/experiments/anomaly/spatial/2field_few_6040/description.py | 10 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditions apply:
#
# This pro... |
waseem18/oh-mainline | refs/heads/master | vendor/packages/beautifulsoup4/bs4/__init__.py | 417 | """Beautiful Soup
Elixir and Tonic
"The Screen-Scraper's Friend"
http://www.crummy.com/software/BeautifulSoup/
Beautiful Soup uses a pluggable XML or HTML parser to parse a
(possibly invalid) document into a tree representation. Beautiful Soup
provides provides methods and Pythonic idioms that make it easy to
navigate... |
Netuitive/Diamond | refs/heads/master | src/collectors/jbossapi/test/testjbossapi.py | 31 | #!/usr/bin/python
# coding=utf-8
###############################################################################
from test import CollectorTestCase
from test import get_collector_config
from test import unittest
from jbossapi import JbossApiCollector
#################################################################... |
attilahorvath/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/gdb/webkit.py | 115 | # 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... |
rsennrich/nematus | refs/heads/master | nematus/learning_schedule.py | 1 | import tensorflow as tf
"""Implements a trivial learning schedule with a fixed learning rate."""
class ConstantSchedule(object):
def __init__(self, learning_rate):
self._learning_rate = tf.constant(learning_rate)
@property
def learning_rate(self):
return self._learning_rate
"""Implement... |
xushuwei202/Vintageous | refs/heads/master | ex/parser/scanner_command_tab_only_command.py | 9 | from .state import EOF
from .tokens import TokenEof
from .tokens_base import TOKEN_COMMAND_TAB_ONLY_COMMAND
from .tokens_base import TokenOfCommand
from Vintageous import ex
@ex.command('tabonly', 'tabo')
class TokenTabOnlyCommand(TokenOfCommand):
def __init__(self, *args, **kwargs):
super().__init__([],
... |
hurricup/intellij-community | refs/heads/master | python/testData/override/dunderNew.py | 79 | class BaseMeta(type):
def __new__(cls, name, bases, namespace):
return super(BaseMeta, cls).__new__(cls, name, bases, namespace)
class MyMeta(BaseMeta):
<caret>pass |
heli522/scikit-learn | refs/heads/master | doc/tutorial/text_analytics/data/movie_reviews/fetch_data.py | 278 | """Script to download the movie review dataset"""
import os
import tarfile
try:
from urllib import urlopen
except ImportError:
from urllib.request import urlopen
URL = ("http://www.cs.cornell.edu/people/pabo/"
"movie-review-data/review_polarity.tar.gz")
ARCHIVE_NAME = URL.rsplit('/', 1)[1]
DATA_FOLDE... |
helenst/django | refs/heads/master | django/utils/html_parser.py | 18 | from django.utils.six.moves import html_parser as _html_parser
import re
import sys
current_version = sys.version_info
use_workaround = (
(current_version < (2, 7, 3)) or
(current_version >= (3, 0) and current_version < (3, 2, 3))
)
try:
HTMLParseError = _html_parser.HTMLParseError
except AttributeError:... |
petrjasek/superdesk-ntb | refs/heads/master | server/ntb/io/feed_parsers/ritzau.py | 2 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013 - 2018 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
from superd... |
nhomar/odoo | refs/heads/8.0 | addons/mass_mailing/wizard/test_mailing.py | 148 | # -*- coding: utf-8 -*-
from openerp import tools
from openerp.osv import osv, fields
class TestMassMailing(osv.TransientModel):
_name = 'mail.mass_mailing.test'
_description = 'Sample Mail Wizard'
_columns = {
'email_to': fields.char('Recipients', required=True,
help='Comma-separate... |
manazhao/tf_recsys | refs/heads/r1.0 | tensorflow/contrib/layers/python/layers/utils_test.py | 65 | # 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... |
Wuteyan/VTK | refs/heads/master | Examples/Infovis/Python/geoview.py | 8 | from vtk import *
import os.path
data_dir = "../../../../VTKData/Data/Infovis/Images/"
if not os.path.exists(data_dir):
data_dir = "../../../../../VTKData/Data/Infovis/Images/"
source = vtkGeoRandomGraphSource()
source.DirectedOff()
source.SetNumberOfVertices(100)
source.SetEdgeProbability(0.00) # produces a tree
s... |
levkar/odoo | refs/heads/10.0 | addons/board/models/__init__.py | 23 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import board
|
liberatorqjw/scikit-learn | refs/heads/master | benchmarks/bench_plot_fastkmeans.py | 294 | from __future__ import print_function
from collections import defaultdict
from time import time
import numpy as np
from numpy import random as nr
from sklearn.cluster.k_means_ import KMeans, MiniBatchKMeans
def compute_bench(samples_range, features_range):
it = 0
results = defaultdict(lambda: [])
chun... |
knowsis/django | refs/heads/nonrel-1.6 | django/contrib/gis/gdal/geomtype.py | 219 | from django.contrib.gis.gdal.error import OGRException
from django.utils import six
#### OGRGeomType ####
class OGRGeomType(object):
"Encapulates OGR Geometry Types."
wkb25bit = -2147483648
# Dictionary of acceptable OGRwkbGeometryType s and their string names.
_types = {0 : 'Unknown',
... |
DavidLP/home-assistant | refs/heads/dev | homeassistant/components/rocketchat/notify.py | 7 | """Rocket.Chat notification service."""
import logging
import voluptuous as vol
from homeassistant.const import (
CONF_PASSWORD, CONF_ROOM, CONF_URL, CONF_USERNAME)
import homeassistant.helpers.config_validation as cv
from homeassistant.components.notify import (ATTR_DATA, PLATFORM_SCHEMA,
... |
tntnatbry/tensorflow | refs/heads/master | tensorflow/python/debug/cli/curses_ui.py | 6 | # 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... |
majora2007/plexpy | refs/heads/master | lib/mako/ext/turbogears.py | 60 | # ext/turbogears.py
# Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import inspect
from mako import compat
from mako.lookup import TemplateLookup
from mako.template... |
plasma-disassembler/plasma | refs/heads/master | plasma/lib/ui/widget.py | 4 | #!/usr/bin/env python3
#
# PLASMA : Generate an indented asm code (pseudo-C) with colored syntax.
# Copyright (C) 2015 Joel
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 ... |
twinpa/virtualeco | refs/heads/master | script/loginevent.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from lib import env
from lib import script
ID = 30
def main(pc):
script.msg(pc, "-"*30)
script.msg(pc, "%s %s"%(env.NAME, env.LAST_UPDATE))
script.msg(pc, "%s"%env.RUNTIME_VERSION_ALL)
script.msg(pc, "-"*30) |
squisher/stella | refs/heads/master | stella/test/conftest.py | 1 | # Copyright 2013-2015 David Mohr
#
# 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 writi... |
kurli/blink-crosswalk | refs/heads/master | Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py | 26 | # Copyright (c) 2012 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 ... |
iSECPartners/opinel | refs/heads/master | opinel/__init__.py | 3 | __author__ = 'l01cd3v'
__version__ = '3.3.4'
|
whuaegeanse/mapnik | refs/heads/master | scons/scons-local-2.3.6/SCons/Tool/rpm.py | 4 | """SCons.Tool.rpm
Tool-specific initialization for rpm.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
The rpm tool calls the rpmbuild command. The first and only argument should a
tar.gz consisting of the sourc... |
bittner/django-allauth | refs/heads/master | allauth/socialaccount/providers/jupyterhub/urls.py | 5 | from allauth.socialaccount.providers.jupyterhub.provider import (
JupyterHubProvider,
)
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns
urlpatterns = default_urlpatterns(JupyterHubProvider)
|
mcdaniel67/sympy | refs/heads/master | sympy/printing/tests/test_ccode.py | 13 | from sympy.core import (pi, oo, symbols, Rational, Integer,
GoldenRatio, EulerGamma, Catalan, Lambda, Dummy, Eq)
from sympy.functions import (Piecewise, sin, cos, Abs, exp, ceiling, sqrt,
gamma, sign)
from sympy.logic import ITE
from sympy.utilities.pytest import rai... |
ybellavance/python-for-android | refs/heads/master | python-build/python-libs/gdata/src/gdata/tlslite/utils/cryptomath.py | 172 | """cryptomath module
This module has basic math/crypto code."""
import os
import math
import base64
import binascii
import sha
from compat import *
# **************************************************************************
# Load Optional Modules
# ****************************************************************... |
andnovar/kivy | refs/heads/master | kivy/tests/test_issue_1084.py | 54 | #
# Bug fixed:
# - put utf-8 in string, and validate -> no more crash due to str() encoding
# - put utf-8 in string, validate, close, open the app and edit the value -> no
# more weird space due to ascii->utf8 encoding.
# - create an unicode directory, and select it with Path. -> no more crash at
# validation.
# - crea... |
chokribr/invenioold | refs/heads/master | modules/bibformat/lib/elements/bfe_plots.py | 18 | # -*- coding: utf-8 -*-
##
## $Id: bfe_CERN_plots.py,v 1.3 2009/03/17 10:55:15 jerome Exp $
##
## This file is part of Invenio.
## Copyright (C) 2010, 2011, 2013 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Fre... |
endlessm/chromium-browser | refs/heads/master | third_party/catapult/third_party/gsutil/gslib/vendored/boto/boto/rds2/__init__.py | 22 | # Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights ... |
CurryBoy/ProtoML-Deprecated | refs/heads/master | protoml/experimental/__init__.py | 1 | from .dialup import DialupRandomForestRegressor, DialupExtraTreesRegressor
from .proto_col import proto_col
from .utils import get_date_dataframe
__all__ = ["DialupRandomForestRegressor",
"DialupExtraTreesRegressor",
"proto_col",
"get_date_dataframe"
]
|
danilito19/django | refs/heads/master | django/conf/locale/de/formats.py | 504 | # -*- 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... |
mxOBS/deb-pkg_trusty_chromium-browser | refs/heads/master | v8/tools/testrunner/network/endpoint.py | 84 | # Copyright 2012 the V8 project authors. 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 conditi... |
kenwang815/KodiPlugins | refs/heads/master | script.module.oceanktv/lib/youtube_dl/extractor/fivemin.py | 11 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_parse_qs,
compat_urllib_parse_urlencode,
compat_urllib_parse_urlparse,
compat_urlparse,
)
from ..utils import (
ExtractorError,
parse_duration,
replace_extension,
)
class Fiv... |
elainenaomi/sciwonc-dataflow-examples | refs/heads/master | dissertation2017/Experiment 2/instances/3_wikiflow_1sh_1s_annot/work/ubuntu/pegasus/example_workflow/20170117T184445+0000/ConfigDB_SessionCompute_0.py | 1 | HOST = "172.31.21.247"
PORT = "5432"
USER = "postgres"
PASSWORD = "enw1989"
DATABASE = "wiki"
READ_PREFERENCE = "primary"
COLLECTION_INPUT = "sessions"
COLLECTION_OUTPUT = "user_sessions"
PREFIX_COLUMN = "w_"
ATTRIBUTES = ["timestamp", "contributor_username"]
SORT = ["timestamp"]
OPERATION_TYPE = "GROUP_BY_COLUMN"
CO... |
airbnb/airflow | refs/heads/master | airflow/providers/amazon/aws/sensors/cloud_formation.py | 5 | #
# 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... |
ULHPC/modules | refs/heads/devel | easybuild/easybuild-framework/easybuild/tools/repository/gitrepo.py | 2 | # #
# Copyright 2009-2015 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (ht... |
brianjgeiger/osf.io | refs/heads/develop | api/chronos/serializers.py | 4 | from rest_framework import serializers as ser
from rest_framework.exceptions import NotFound
from api.base.exceptions import Conflict
from api.base.serializers import JSONAPISerializer, RelationshipField, LinksField, ConditionalField
from api.base.utils import absolute_reverse, get_user_auth
from osf.external.chronos ... |
henridwyer/scikit-learn | refs/heads/master | sklearn/neighbors/__init__.py | 306 | """
The :mod:`sklearn.neighbors` module implements the k-nearest neighbors
algorithm.
"""
from .ball_tree import BallTree
from .kd_tree import KDTree
from .dist_metrics import DistanceMetric
from .graph import kneighbors_graph, radius_neighbors_graph
from .unsupervised import NearestNeighbors
from .classification impo... |
pythonprobr/pythonpro-website | refs/heads/master | pythonpro/dashboard/forms.py | 1 | from django.forms import ModelForm
from pythonpro.dashboard.models import TopicInteraction
class TopicInteractionForm(ModelForm):
class Meta:
model = TopicInteraction
fields = ('topic', 'user', 'topic_duration', 'total_watched_time', 'max_watched_time')
|
coolxll/PyAutoRegBot | refs/heads/master | test/me/coolxll/sms/shenhua.py | 1 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
'''
Created on 2015年10月24日
@author: Conan
'''
import unittest
from me.coolxll.sms.f02.aima import Aima
from me.coolxll.sms.shjmpt.shenhua import Shenhua
class Test(unittest.TestCase):
def test_shenhua(self):
sh = Shenhua(1731)
mobile = sh.getMobileNum... |
csomerlot/WIPTools | refs/heads/master | addin/Install/ProtLeng.py | 1 |
# Import system modules
import sys, os
import Helper
import regression
import arcpy
from arcpy import env
arcpy.env.extent = "MAXOF"
from arcpy.sa import *
hp = Helper.Helper(sys.argv)
try:
# Local variables
bmp_noclip = sys.argv[1]
# Vectors
vecMask = os.path.join(hp.SWorkspace, "vectMask.... |
iphoting/healthchecks | refs/heads/heroku | hc/front/tests/test_update_channel_name.py | 2 | from hc.api.models import Channel
from hc.test import BaseTestCase
class UpdateChannelNameTestCase(BaseTestCase):
def setUp(self):
super().setUp()
self.channel = Channel(kind="email", project=self.project)
self.channel.save()
self.url = "/integrations/%s/name/" % self.channel.code... |
leafclick/intellij-community | refs/heads/master | python/testData/intentions/transformConditionalExpression.py | 83 | x = a if <caret>cond else b |
eLBati/odoo | refs/heads/master | addons/website_forum_doc/models/documentation.py | 52 | # -*- coding: utf-8 -*-
import openerp
from openerp.osv import osv, fields
class Documentation(osv.Model):
_name = 'forum.documentation.toc'
_description = 'Documentation ToC'
_inherit = ['website.seo.metadata']
_order = "parent_left"
_parent_order = "sequence, name"
_parent_store = True
d... |
ClearCorp-dev/odoo | refs/heads/8.0 | addons/event/wizard/__init__.py | 435 | # -*- 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... |
kevin-vb/drupdevelop | refs/heads/master | sites/all/themes/drupdevelop/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/MSVSToolFile.py | 2736 | # Copyright (c) 2012 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.
"""Visual Studio project reader/writer."""
import gyp.common
import gyp.easy_xml as easy_xml
class Writer(object):
"""Visual Studio XML tool file writer."""
... |
Sonicbids/django | refs/heads/master | tests/view_tests/tests/test_debug.py | 4 | # -*- coding: utf-8 -*-
# This coding header is significant for tests, as the debug view is parsing
# files to search for such a header to decode the source file content
from __future__ import unicode_literals
import importlib
import inspect
import os
import re
import shutil
import sys
from tempfile import NamedTempor... |
RAtechntukan/Sick-Beard | refs/heads/development | lib/guessit/__init__.py | 37 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2011 Nicolas Wack <[email protected]>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.