repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
phiroict/spotify-longlist | refs/heads/master | APITest/MainTest.py | 1 | __author__ = 'phiro'
import http.client
import Constants
import json
class APITest:
keys = {}
def readKeys(self):
with open("../licensekeys.properties") as reader:
for line in reader:
line = line.rstrip() #removes trailing whitespace and '\n' chars
if "=" ... |
frifri/django-tastypie | refs/heads/master | tests/namespaced/api/resources.py | 44 | from django.contrib.auth.models import User
from tastypie import fields
from tastypie.resources import ModelResource, NamespacedModelResource
from tastypie.authorization import Authorization
from basic.models import Note
class NamespacedUserResource(NamespacedModelResource):
class Meta:
resource_name = 'u... |
cgre-aachen/gempy | refs/heads/master | gempy/plot/__init__.py | 1 |
if __name__ == '__main__':
pass
|
xamfoo/thumbor-docker | refs/heads/master | setup/thumbor/tests/fixtures/mongo_storage_conf.py | 14 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
STORAGE = 'thumbor.storages.mongo_storage'
MONGO_STORAGE_SERVER_HOS... |
htcondor/htcondor | refs/heads/master | src/condor_tests/test_htcondor_dags/__init__.py | 5 | # Copyright 2020 HTCondor Team, Computer Sciences Department,
# University of Wisconsin-Madison, WI.
#
# 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/LICE... |
ValentinPearce/The-Shades | refs/heads/master | The-Shades.py | 2 | #==============
#INITIALISATION
#==============
import Game
import termios, sys
description = ''
def init(): # Mets en place les elements du jeu.
global description
description = Game.init()
def display(): # Affiche certains elements du jeu et le texte relatif a la derniere action effectuee
global descri... |
stanmoore1/lammps | refs/heads/master | unittest/python/python-open.py | 5 |
import sys,os,unittest
from lammps import lammps
has_mpi=False
has_mpi4py=False
has_exceptions=False
try:
from mpi4py import __version__ as mpi4py_version
# tested to work with mpi4py versions 2 and 3
has_mpi4py = mpi4py_version.split('.')[0] in ['2','3']
except:
pass
try:
if 'LAMMPS_MACHINE_NAME... |
mayconvm/phonetooth | refs/heads/master | phonetooth/mergecontactsdialog.py | 3 | # Copyright (C) 2008 Dirk Vanden Boer <dirk.vdb@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later versi... |
cechrist/cardoon | refs/heads/master | cardoon/devices/mosExt.py | 1 | """
:mod:`mosExt` -- Extrinsic MOSFET model
---------------------------------------
.. module:: mosExt
.. moduleauthor:: Carlos Christoffersen
This module add the extrinsic part to an intrinsic mosfet model.
Requirements for intrinsic model classes:
1. Control voltages: VDB, VGB, VSB
2. Output currents: IDS, IDB,... |
glwu/python-for-android | refs/heads/master | python-modules/twisted/twisted/web/iweb.py | 53 | # -*- test-case-name: twisted.web.test -*-
# Copyright (c) 2008-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Interface definitions for L{twisted.web}.
@var UNKNOWN_LENGTH: An opaque object which may be used as the value of
L{IBodyProducer.length} to indicate that the length of the entity
b... |
neurodata/ndstore | refs/heads/master | scripts/convertRamon.py | 2 | # Copyright 2016 NeuroData (http://neurodata.io)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
basho/otp | refs/heads/basho | lib/asn1/test/asn1_SUITE_data/XSeq.py | 97 | XSeq DEFINITIONS ::=
BEGIN
-- F.2.10.2
-- Use a sequence type to model a collection of variables whose
-- types are the same,
-- whose number is known and modest, and whose order is significant,
-- provided that the
-- makeup of the collection is unlikely to change from one version
-- of the protocol to the next... |
azaghal/ansible | refs/heads/devel | test/support/integration/plugins/modules/x509_crl_info.py | 36 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2020, Felix Fontein <felix@fontein.de>
# 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': ... |
orablu/heroku-buildpack | refs/heads/master | vendor/setuptools-0.9.7/setuptools/command/easy_install.py | 63 | #!python
"""\
Easy Install
------------
A tool for doing automatic download/extract/build of distutils-based Python
packages. For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.
__ https://pythonhosted.org/setuptools/easy_install.html
"""
import sys
import ... |
Andrey-Pavlov/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/cpp.py | 113 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2009, 2010, 2012 Google Inc. All rights reserved.
# Copyright (C) 2009 Torch Mobile Inc.
# Copyright (C) 2009 Apple Inc. All rights reserved.
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# Redistribution and use in source and binary forms, with or without
# modi... |
HuimingCheng/AutoGrading | refs/heads/master | learning/web_Haotian/venv/Lib/site-packages/pip/_vendor/requests/sessions.py | 355 | # -*- coding: utf-8 -*-
"""
requests.session
~~~~~~~~~~~~~~~~
This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).
"""
import os
from collections import Mapping
from datetime import datetime
from .auth import _basic_auth_str
from .compat import cookielib, Ord... |
papouso/odoo | refs/heads/8.0 | addons/account_analytic_plans/__init__.py | 445 | # -*- 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... |
tsdmgz/ansible | refs/heads/devel | lib/ansible/plugins/lookup/dig.py | 87 | # (c) 2015, Jan-Piet Mens <jpmens(at)gmail.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup: dig
author: Jan-Piet Mens (... |
hj3938/zulip | refs/heads/master | zerver/management/commands/set_default_streams.py | 114 | from __future__ import absolute_import
from django.core.management.base import BaseCommand
from zerver.models import Realm
from zerver.lib.actions import set_default_streams
from optparse import make_option
import sys
class Command(BaseCommand):
help = """Set default streams for a realm
Users created under thi... |
sjsrey/pysal_core | refs/heads/master | pysal_core/io/util/wkt.py | 2 | from ... import cg
import re
__author__ = "Charles R Schmidt <schmidtc@gmail.com>"
__all__ = ['WKTParser']
class WKTParser:
""" Class to represent OGC WKT, supports reading and writing
Modified from...
# URL: http://dev.openlayers.org/releases/OpenLayers-2.7/lib/OpenLayers/Format/WKT.js
#R... |
benschmaus/catapult | refs/heads/master | third_party/google-endpoints/apitools/base/protorpclite/test_util.py | 21 | #!/usr/bin/env python
#
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
tmpgit/intellij-community | refs/heads/master | python/testData/joinLines/ListLBracket.py | 83 | a = <caret>[
111,
222
]
|
pombredanne/brisk-hadoop-common | refs/heads/brisk | src/contrib/hod/testing/testThreads.py | 182 | #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 use thi... |
cryptobanana/ansible | refs/heads/devel | lib/ansible/modules/net_tools/lldp.py | 47 | #!/usr/bin/python -tt
#
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['previe... |
Eigenlabs/EigenD | refs/heads/1.4 | tools/packages/SCons/Variables/BoolVariable.py | 2 | """engine.SCons.Variables.BoolVariable
This file defines the option type for SCons implementing true/false values.
Usage example:
opts = Variables()
opts.Add(BoolVariable('embedded', 'build for an embedded system', 0))
...
if env['embedded'] == 1:
...
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, ... |
andy928/xpenology | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... |
sputnick-dev/weboob | refs/heads/master | modules/cic/browser.py | 4 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Julien Veyssier
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at yo... |
DailyActie/Surrogate-Model | refs/heads/master | 01-codes/scikit-learn-master/sklearn/decomposition/online_lda.py | 1 | """
=============================================================
Online Latent Dirichlet Allocation with variational inference
=============================================================
This implementation is modified from Matthew D. Hoffman's onlineldavb code
Link: http://www.cs.princeton.edu/~mdhoffma/code/onli... |
luckasfb/android_kernel_iocean_x7 | refs/heads/master | mediatek/build/tools/config/merge-project.py | 38 | import re, os, sys
pattern = [
re.compile("^([^=\s]+)\s*=\s*(.+)$"),
re.compile("^([^=\s]+)\s*=$"),
re.compile("\s*#")
]
config = {}
project_file = sys.argv
project_file.remove(sys.argv[0])
for f in project_file:
ff = open(f)
for line in ff.readlines():
result = (filter(lambda x:x,[x.search(line) f... |
nvoron23/gensim | refs/heads/develop | gensim/test/test_big.py | 71 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
Automated tests for checking processing/storing large inputs.
"""
import logging
import unittest
import os
import itertools
import... |
unisport/thumblr | refs/heads/master | thumblr/caching.py | 1 | from django.core.cache import get_cache, cache, InvalidCacheBackendError
from django.db.models.signals import pre_save, pre_delete
from django.dispatch import receiver
from thumblr.models import Image
from thumblr.dto import ImageMetadata, ImageUrlSpec
from thumblr.services.query import get_image_by_id
try:
thumb... |
qiuzhong/xwalk-test-suite-build | refs/heads/master | iot/scripts/check_ostro_image_ver.py | 1 | #!/usr/bin/env python3
import json
import config
import requests
import mail
def get_latest_ostro_build_number(latest_image_url):
'''
Get the latest ostro image build number from latest_image_url.
'''
conn = requests.get(latest_image_url)
# print(conn.status_code)
version = conn.content
... |
leafclick/intellij-community | refs/heads/master | python/testData/intentions/PyConvertCollectionLiteralIntentionTest/convertOneElementTupleWithCommentToList.py | 37 | (
42 <caret> # foo
,
) |
cmelange/ansible | refs/heads/devel | lib/ansible/modules/cloud/cloudstack/cs_securitygroup.py | 78 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.net>
#
# 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... |
Distrotech/intellij-community | refs/heads/master | python/testData/psi/EqYieldEq.py | 83 | bb = yield dd = cc
|
paurosello/frappe | refs/heads/develop | frappe/core/doctype/page/test_page.py | 72 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
test_records = frappe.get_test_records('Page')
class TestPage(unittest.TestCase):
pass
|
RsrchBoy/dpkg-offlineimap | refs/heads/master | offlineimap/__init__.py | 5 | __all__ = ['OfflineImap']
__productname__ = 'OfflineIMAP'
__version__ = "6.5.7"
__revision__ = ""
__bigversion__ = __version__ + __revision__
__copyright__ = "Copyright 2002-2015 John Goerzen & contributors"
__author__ = "John Goerzen"
__author_email__= "offlineimap-project@lists.alioth.debian.org"
__de... |
socketubs/pyhn | refs/heads/master | pyhn/__init__.py | 1 | # -*- coding: utf-8 -*-
__title__ = 'pyhn'
__version__ = '0.3.9'
__author__ = 'Geoffrey Lehée'
__license__ = 'MIT'
__copyright__ = 'Copyright 2016 Geoffrey Lehée'
|
tillahoffmann/tensorflow | refs/heads/master | tensorflow/contrib/timeseries/python/timeseries/saved_model_utils.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... |
tethysplatform/tethys | refs/heads/master | tests/unit_tests/test_tethys_compute/test_models/test_dask/test_DaskJobResult.py | 2 | """
********************************************************************************
* Name: test_DaskJobResult
* Author: nswain
* Created On: November 14, 2018
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""
from tethys_sdk.testing import TethysTestCas... |
dhermes/google-cloud-python | refs/heads/master | iot/docs/conf.py | 2 | # -*- coding: utf-8 -*-
#
# google-cloud-iot documentation build configuration file
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that ... |
vntarasov/openpilot | refs/heads/eon-0710 | selfdrive/controls/lib/vehicle_model.py | 1 | #!/usr/bin/env python3
"""
Dynamic bycicle model from "The Science of Vehicle Dynamics (2014), M. Guiggiani"
The state is x = [v, r]^T
with v lateral speed [m/s], and r rotational speed [rad/s]
The input u is the steering angle [rad]
The system is defined by
x_dot = A*x + B*u
A depends on longitudinal speed, u [m/s... |
aliyun-beta/aliyun-oss-cpp-sdk | refs/heads/master | third_party/googletest/scripts/upload_gtest.py | 1963 | #!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
crdroid-devices/android_kernel_htc_msm8974 | refs/heads/6.0.0 | tools/perf/python/twatch.py | 7370 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... |
vitan/hue | refs/heads/master | desktop/core/ext-py/python-ldap-2.3.13/Demo/simple.py | 40 | import sys,getpass
import ldap
#l = ldap.open("localhost", 31001)
l = ldap.open("marta.it.uq.edu.au")
login_dn = "cn=root,ou=CSEE,o=UQ,c=AU"
login_pw = getpass.getpass("Password for %s: " % login_dn)
l.simple_bind_s(login_dn, login_pw)
#
# create a new sub organisation
#
try:
dn = "ou=CSEE,o=UQ,c=AU"
print ... |
Jgarcia-IAS/SITE | refs/heads/master | addons/purchase_double_validation/__openerp__.py | 52 | # -*- 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... |
matmutant/sl4a | refs/heads/master | python-build/python-libs/ase/scripts/notify_weather.py | 87 | """Display the weather report in a notification."""
__author__ = 'Damon Kohler <damonkohler@gmail.com>'
__copyright__ = 'Copyright (c) 2009, Google Inc.'
__license__ = 'Apache License, Version 2.0'
import android
import weather
def notify_weather(droid):
"""Display the weather at the current location in a notific... |
Vogtinator/micropython | refs/heads/nspire | tests/basics/types2.py | 117 | # Types are hashable
print(hash(type) != 0)
print(hash(int) != 0)
print(hash(list) != 0)
class Foo: pass
print(hash(Foo) != 0)
print(int == int)
print(int != list)
d = {}
d[int] = list
d[list] = int
print(len(d))
|
tonyseek/python-stdnum | refs/heads/master | getnumlist.py | 3 | #!/usr/bin/env python
# getnumlist.py - script to get a list of number formats in stdnum
#
# Copyright (C) 2012, 2013 Arthur de Jong
#
# 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; eit... |
gangadharkadam/saloon_erp | refs/heads/master | erpnext/stock/report/stock_balance/stock_balance.py | 17 | # 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
from frappe import _
from frappe.utils import flt, getdate
def execute(filters=None):
if not filters: filters = {}
columns = get_colum... |
jlmadurga/django-oscar | refs/heads/master | tests/_site/apps/customer/__init__.py | 55 | default_app_config = 'tests._site.apps.customer.config.CustomerConfig'
|
AmandaMoen/AmandaMoen | refs/heads/master | notes/resources/UW_IntroClass/class06/code/simple_classes.py | 1 | #!/usr/bin/env python
"""
simple_classes.py
demonstrating the basics of a class
"""
## create a point class
class Point(object):
def __init__(self, x, y):
self.x = x
self.y = y
## create an instance of that class
p = Point(3,4)
## access the attributes
print "p.x is:", p.x
print "p.y is:... |
serialx/spark-ec2 | refs/heads/branch-1.5 | deploy_templates.py | 35 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import with_statement
import os
import sys
# Deploy the configuration file templates in the spark-ec2/templates directory
# to the root filesystem, substituting variables such as the master hostname,
# ZooKeeper URL, etc as read from the environment.
# F... |
RouxRC/weboob | refs/heads/master | modules/allrecipes/module.py | 6 | # -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your op... |
towerjoo/DjangoNotes | refs/heads/master | Django-1.5.1/django/core/files/locks.py | 128 | """
Portable file locking utilities.
Based partially on example by Jonathan Feignberg <jdf@pobox.com> in the Python
Cookbook, licensed under the Python Software License.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203
Example Usage::
>>> from django.core.files import locks
>>> with open('.... |
pgmillon/ansible | refs/heads/devel | lib/ansible/plugins/callback/log_plays.py | 27 | # (C) 2012, Michael DeHaan, <michael.dehaan@gmail.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
callback: log_plays
type: n... |
cafecivet/django_girls_tutorial | refs/heads/master | Lib/site-packages/django/contrib/auth/models.py | 48 | from __future__ import unicode_literals
from django.core.mail import send_mail
from django.core import validators
from django.db import models
from django.db.models.manager import EmptyManager
from django.utils.crypto import get_random_string, salted_hmac
from django.utils import six
from django.utils.translation impo... |
harrieshc/autokey | refs/heads/master | src/lib/interface.py | 46 | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# 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 of the License, or
# (at your option) any later version.
#
# This pr... |
aniruddhkanojia/qtile | refs/heads/develop | libqtile/notify.py | 12 | # Copyright (c) 2010 dequis
# Copyright (c) 2011 Florian Mounier
# Copyright (c) 2011 Mounier Florian
# Copyright (c) 2013 Mickael FALCK
# Copyright (c) 2013 Tao Sauvage
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"... |
colemanja91/PyEloqua-Examples | refs/heads/master | venv/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/_base.py | 915 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type
from ..constants import scopingElements, tableInsertModeElements, namespaces
# The scope markers are inserted when entering object elements,
# marquees, table cells, and table captions, and are used to prevent for... |
wavesoft/robob | refs/heads/master | robob/component.py | 1 |
class ComponentBase(object):
"""
Global base class for all components with shared context and specs
"""
def __init__(self, context):
"""
Keep context
"""
self.context = context
|
pschmitt/home-assistant | refs/heads/dev | homeassistant/components/evohome/__init__.py | 1 | """Support for (EMEA/EU-based) Honeywell TCC climate systems.
Such systems include evohome, Round Thermostat, and others.
"""
from datetime import datetime as dt, timedelta
import logging
import re
from typing import Any, Dict, Optional, Tuple
import aiohttp.client_exceptions
import evohomeasync
import evohomeasync2
... |
MichaelNedzelsky/intellij-community | refs/heads/master | python/testData/mover/multiLineSelection_afterUp.py | 166 | class Test(object):
def q(self):
c = 3
<selection> a = 1
b = 2
<caret></selection> |
fharenheit/template-spark-app | refs/heads/master | src/main/python/streaming/kafka_wordcount.py | 83 | #
# 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... |
ZEROFAIL/goblin | refs/heads/master | goblin/provider.py | 2 | class Provider:
"""Superclass for provider plugins"""
DEFAULT_OP_ARGS = {}
@classmethod
def get_default_op_args(cls, processor):
return cls.DEFAULT_OP_ARGS.get(processor, dict())
class TinkerGraph(Provider): # TODO
"""Default provider"""
@staticmethod
def get_hashable_id(val):
... |
j00bar/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/ec2_asg_facts.py | 44 | #!/usr/bin/python
# 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 distributed... |
PankeshGupta/pynotes | refs/heads/master | use_of_super.py | 1 | #author : pankesh gupta
#email : post4pankesh@gmail.com
# this is an example of overiding and concept of super in python
class Contact():
all_contacts= list()
def __init__(self,name,email):
self.name = name
self.email = email
Contact.all_contacts.append(self)
def try0(self)... |
ZuluPro/namebench | refs/heads/master | nb_third_party/jinja2/tests.py | 285 | # -*- coding: utf-8 -*-
"""
jinja2.tests
~~~~~~~~~~~~
Jinja test functions. Used with the "is" operator.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import re
from jinja2.runtime import Undefined
# nose, nothing here to test
__test__ = False
number_r... |
ykaneko/quantum | refs/heads/master | quantum/plugins/services/agent_loadbalancer/plugin.py | 2 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apac... |
fabianvf/scrapi | refs/heads/develop | scrapi/harvesters/vtech.py | 9 | """
Harvests Virginia Tech VTechWorks metadata for ingestion into the SHARE service
Information about VTechWorks at https://github.com/CenterForOpenScience/SHARE/blob/master/providers/edu.vt.vtechworks.md
Example API call: http://vtechworks.lib.vt.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc&from=2014-09-29... |
kernelci/kernelci-backend | refs/heads/kernelci.org | app/utils/batch/tests/test_batch_common.py | 1 | # Copyright (C) Collabora Limited 2018
# Author: Guillaume Tucker <guillaume.tucker@collabora.com>
# Author: Ana Guerrero Lopez <ana.guerrero@collabora.com>
#
# Copyright (C) Linaro Limited 2014,2015
# Author: Milo Casagrande <milo.casagrande@linaro.org>
#
# This program is free software; you can redistribute it and/or... |
alfredoavanzosc/odoomrp-wip-1 | refs/heads/8.0 | quality_control/models/qc_test.py | 15 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api, exceptions, _
cl... |
davehensley/fanduel-nba-optimizer | refs/heads/master | nba-optimizer.py | 1 | # NBA Optimizer
#
# by Dave Hensley
#
# Picks an ideal fantasy NBA team using a modified knapsack algorithm
#
# Usage: python nba-optimizer.py players.csv
import csv, sys
from ortools.linear_solver import pywraplp
salaryCap = 60000
def getPositionNumber(name):
return {
'Center': 0,
'Point Guard':... |
rudidudi/Trusis | refs/heads/master | AdminLTE-master/bower_components/bootstrap-datepicker/docs/conf.py | 171 | # -*- coding: utf-8 -*-
#
# bootstrap-datepicker documentation build configuration file, created by
# sphinx-quickstart on Fri Aug 2 14:45:57 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated ... |
danielblazevski/mpi-python-wordcount-runningmedian | refs/heads/master | src/partitionMetaData.py | 2 |
"""
This gets the meta-data containing filenames, location in MB on where to start
and the filesize
This is embedded in an iterative loop over process rank to decide which files
and or chunks of files to send to each process
Initial plan was to include the MPI send/recv here.
Kept this part wrapped to make more modu... |
viveksh13/gymkhana | refs/heads/master | venv/bin/venv/lib/python2.7/site-packages/flask/testsuite/test_apps/config_module_app.py | 1257 | import os
import flask
here = os.path.abspath(os.path.dirname(__file__))
app = flask.Flask(__name__)
|
todaychi/hue | refs/heads/master | apps/oozie/src/oozie/migrations/0015_auto__add_field_dataset_advanced_start_instance__add_field_dataset_ins.py | 39 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Dataset.advanced_start_instance'
db.add_column('oozie_dataset', 'advanced_start_instance', self.gf... |
dpiers/coderang-meteor | refs/heads/master | public/jsrepl/extern/python/unclosured/lib/python2.7/Cookie.py | 65 | #!/usr/bin/env python
#
####
# Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu>
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software
# and its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in ... |
GustavoHennig/ansible | refs/heads/devel | lib/ansible/modules/cloud/vmware/vmware_maintenancemode.py | 27 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, VMware, 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 o... |
40223139/203739test | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/unittest/test/_test_warnings.py | 858 | # helper module for test_runner.Test_TextTestRunner.test_warnings
"""
This module has a number of tests that raise different kinds of warnings.
When the tests are run, the warnings are caught and their messages are printed
to stdout. This module also accepts an arg that is then passed to
unittest.main to affect the b... |
CamelBackNotation/CarnotKE | refs/heads/master | jyhton/lib-python/2.7/encodings/cp932.py | 817 | #
# cp932.py: Python Unicode Codec for CP932
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_jp, codecs
import _multibytecodec as mbc
codec = _codecs_jp.getcodec('cp932')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEncoder(mbc.MultibyteIncrement... |
gorjuce/odoo | refs/heads/8.0 | addons/product_extended/product_extended.py | 185 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2014 OpenERP S.A. (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero G... |
hvanderlaan/ikea-smartlight | refs/heads/master | tradfri-authenticate.py | 1 | #!/usr/bin/env python
# file : tradfri-authenticate.py
# purpose : authenticate api user and generate configuration file
#
# author : maltejur
# date : 2020/10/24
"""
tradfri-authenticate.py - authenticate api user and generate configuration file
This module requires libcoap with dTLS ... |
JFriel/honours_project | refs/heads/master | networkx/build/lib/networkx/testing/__init__.py | 103 | from networkx.testing.utils import *
|
Darkduke68/MatchMaker | refs/heads/master | profiles/views.py | 1 | from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.shortcuts import Http404
from profiles.forms import ProfileUpdateForm
from matches.models import Match
# Create your views here.
@login_required
def profile_... |
Jorge-Rodriguez/ansible | refs/heads/devel | lib/ansible/modules/cloud/digital_ocean/digital_ocean_block_storage.py | 8 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
mcbor/adventofcode | refs/heads/master | 2016/day01/day01-pt2.py | 1 | #!/usr/bin/env python3
# Advent of Code 2016 - Day 1, Part Two
# Using turtle graphics to find the location of Easter Bunny HQ.
# It's slow, but draws pretty maps.
import sys
import turtle
def distance():
return round(abs(turtle.xcor() + abs(turtle.ycor())))
def main(argv):
if len(argv) < 2:
print("... |
fredkingham/blog-of-fred | refs/heads/master | django/contrib/comments/signals.py | 425 | """
Signals relating to comments.
"""
from django.dispatch import Signal
# Sent just before a comment will be posted (after it's been approved and
# moderated; this can be used to modify the comment (in place) with posting
# details or other such actions. If any receiver returns False the comment will be
# discarded a... |
denys-duchier/django | refs/heads/master | tests/migrations/test_autodetector.py | 35 | import functools
import re
from unittest import mock
from django.apps import apps
from django.conf import settings
from django.contrib.auth.models import AbstractBaseUser
from django.core.validators import RegexValidator, validate_slug
from django.db import connection, models
from django.db.migrations.autodetector imp... |
leppa/home-assistant | refs/heads/dev | homeassistant/components/fan/device_trigger.py | 8 | """Provides device automations for Fan."""
from typing import List
import voluptuous as vol
from homeassistant.components.automation import AutomationActionType, state
from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA
from homeassistant.const import (
CONF_DEVICE_ID,
CONF_DOMAIN,
... |
HiroIshikawa/21playground | refs/heads/master | learning/venv/lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/compat.py | 2942 | ######################## BEGIN LICENSE BLOCK ########################
# Contributor(s):
# Ian Cordasco - port to Python
#
# 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; either
# versio... |
pselle/calibre | refs/heads/master | src/calibre/utils/shared_file.py | 9 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
import os, sys
from calibre.constants import iswindows, plugins
'''
This mo... |
siosio/intellij-community | refs/heads/master | python/testData/psi/FStringTerminatedByQuoteInsideFStringLiteral.py | 15 | s = f'foo{f"'"}baz' |
ryklith/pyltesim | refs/heads/master | raps/raps.py | 1 | #!/usr/bin/env python
''' Resource Allocation using Power control and Sleep as described in my academic papers, mostly in the JSAC one.
This is performed within a base station or sector. For all associated mobiles, allocate powers and sleep modes over the OFDMA frame.
File: RAPS.py
'''
__author__ = "Hauke Holtkamp"... |
WSDC-NITWarangal/django | refs/heads/master | tests/test_client/auth_backends.py | 315 | from django.contrib.auth.backends import ModelBackend
class TestClientBackend(ModelBackend):
pass
|
ClusterHQ/dvol | refs/heads/master | dvol_python/texttable.py | 1 | #!/usr/bin/env python
#
# texttable - module for creating simple ASCII tables
# Copyright (C) 2003-2011 Gerome Fournier <jef(at)foutaise.org>
#
# 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 Foundat... |
munnerz/CouchPotatoServer | refs/heads/master | libs/pyasn1/compat/binary.py | 172 | from sys import version_info
if version_info[0:2] < (2, 6):
def bin(x):
if x <= 1:
return '0b'+str(x)
else:
return bin(x>>1) + str(x&1)
else:
bin = bin
|
MadeiraCloud/salt | refs/heads/master | sources/salt/runners/thin.py | 1 | # -*- coding: utf-8 -*-
'''
The thin runner is used to manage the salt thin systems.
Salt Thin is a transport-less version of Salt that can be used to run rouitines
in a standalone way. This runner has tools which generate the standalone salt
system for easy consumption.
'''
# Import Salt libs
import salt.utils.thin
... |
alexsavio/scikit-learn | refs/heads/master | examples/svm/plot_svm_regression.py | 120 | """
===================================================================
Support Vector Regression (SVR) using linear and non-linear kernels
===================================================================
Toy example of 1D regression using linear, polynomial and RBF kernels.
"""
print(__doc__)
import numpy as np
... |
jwalgran/otm-core | refs/heads/develop | opentreemap/treemap/templatetags/comment_sequence.py | 3 | from django.template import Library
register = Library()
@register.filter
def in_thread_order(comments):
'''Convert a list of comments in chronological order into a list of
comments in tree order, where the children of a comment appear
directly after the comment in the list.'''
roots = []
childre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.