repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
minlex/django-socialregistration
refs/heads/master
socialregistration/contrib/linkedin/templatetags/__init__.py
12133432
dynaryu/rmtk
refs/heads/master
rmtk/plotting/collapse_maps/__init__.py
67
# -*- coding: utf-8 -*- # # LICENSE # # Copyright © 2014-2015, GEM Foundation, Chiara Casotto, Anirudh Rao, # Vitor Silva. # # The Risk Modeller's Toolkit 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,...
alex/changes
refs/heads/master
changes/utils/agg.py
1
def safe_agg(func, sequence, default=None): m = None for item in sequence: if item is None: continue elif m is None: m = item else: m = func(m, item) if m is None: m = default return m
StackStorm/mistral
refs/heads/master
mistral/api/app.py
1
# Copyright 2013 - Mirantis, Inc. # Copyright 2016 - Brocade Communications Systems, 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/LI...
saurabh6790/omnisys-lib
refs/heads/master
webnotes/widgets/page_body.py
65
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals redirect_template = '''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>%s</title> <meta http-equiv="REFRESH" content="0; url=%s"></HEAD> <B...
janusnic/django-allauth
refs/heads/master
allauth/socialaccount/providers/xing/provider.py
68
from allauth.socialaccount import providers from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth.provider import OAuthProvider class XingAccount(ProviderAccount): def get_profile_url(self): return self.account.extra_data.get('permalink') def get_...
Jannes123/django-oscar
refs/heads/master
src/oscar/apps/basket/__init__.py
59
default_app_config = 'oscar.apps.basket.config.BasketConfig'
apixandru/intellij-community
refs/heads/master
python/testData/refactoring/move/function/before/src/lib1.py
166
def urlopen(x): return file(x)
divya-csekar/flask-microblog-server
refs/heads/master
flask/Lib/site-packages/werkzeug/debug/__init__.py
280
# -*- coding: utf-8 -*- """ werkzeug.debug ~~~~~~~~~~~~~~ WSGI application traceback debugger. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import json import mimetypes from os.path import join, dirname, basename, isfile ...
DazWorrall/ansible-modules-extras
refs/heads/devel
monitoring/logentries.py
153
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Ivan Vanderbyl <ivan@app.io> # # This module 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 la...
kho0810/flaskr
refs/heads/master
migrations/versions/16776b812c23_.py
1
"""empty message Revision ID: 16776b812c23 Revises: 3f055fdcbbd0 Create Date: 2014-08-08 02:16:23.559345 """ # revision identifiers, used by Alembic. revision = '16776b812c23' down_revision = '3f055fdcbbd0' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
rggibson/pb-tracker
refs/heads/master
pytz/__init__.py
52
''' datetime.tzinfo timezone definitions generated from the Olson timezone database: ftp://elsie.nci.nih.gov/pub/tz*.tar.gz See the datetime section of the Python Library Reference for information on how to use these modules. ''' # The Olson database is updated several times a year. OLSON_VERSION = '2010h' VERSI...
deejross/python3-pywbem
refs/heads/master
twisted_client.py
1
# # (C) Copyright 2005,2007 Hewlett-Packard Development Company, L.P. # # This program 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; version 2 of the License. # # This program is distributed in the ho...
QGuLL/samba
refs/heads/master
python/samba/netcmd/sites.py
40
# sites management # # Copyright Matthieu Patou <mat@matws.net> 2011 # # 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. #...
zinic/rpyle
refs/heads/master
src/rpyle/main.py
1
import os import sys import time import random import hashlib import rpyle.webservice import rpyle.http_server import rpyle.system_provider import chuckbox.log as log import multiprocessing as mp import chuckbox.project as project _LOG = log.get_logger(__name__) def init(): log.get_log_manager().configure({ ...
jasonwzhy/django
refs/heads/master
tests/migrations/test_migrations_squashed_complex/2_auto.py
770
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "1_auto")] operations = [ migrations.RunPython(migrations.RunPython.noop) ]
sysalexis/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/ctypes/test/test_incomplete.py
170
import unittest from ctypes import * ################################################################ # # The incomplete pointer example from the tutorial # class MyTestCase(unittest.TestCase): def test_incomplete_example(self): lpcell = POINTER("cell") class cell(Structure): _fields_...
dahlstrom-g/intellij-community
refs/heads/master
python/testData/refactoring/convertPackageToModule/simple/after/b.py
12133432
hdinsight/hue
refs/heads/master
apps/useradmin/src/useradmin/migrations/__init__.py
12133432
valfirst/selenium
refs/heads/master
py/selenium/webdriver/common/by.py
61
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
Yarrick13/hwasp
refs/heads/master
tests/wasp1/AllAnswerSets/grounding_backjump_14.test.py
3
input = """ """ output = """ {a(2), a(3), b(1,1), p(1), p(2), q(1), q(2), t(1,1,2), t(1,2,3)} """
Gaia3D/QGIS
refs/heads/master
python/console/console.py
5
# -*- coding:utf-8 -*- """ /*************************************************************************** Python Console for QGIS ------------------- begin : 2012-09-10 copyright : (C) 2012 by Salvatore Larosa email : lrssvtml (at) gmail (dot) com ***...
MJuddBooth/pandas
refs/heads/master
pandas/tests/util/test_hashing.py
1
import datetime import numpy as np import pytest import pandas as pd from pandas import DataFrame, Index, MultiIndex, Series from pandas.core.util.hashing import _hash_scalar, hash_tuple, hash_tuples from pandas.util import hash_array, hash_pandas_object import pandas.util.testing as tm @pytest.fixture(params=[ ...
OriHoch/Open-Knesset
refs/heads/master
links/migrations/0005_auto__add_field_link_active.py
4
# 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 'Link.active' db.add_column('links_link', 'active', self.gf('django.db.models.fields.Boolea...
openhealthcare/gloss
refs/heads/v0.1
alembic/versions/440bea99abd6_.py
1
"""empty message Revision ID: 440bea99abd6 Revises: 716909215049 Create Date: 2016-04-06 13:33:56.292972 """ # revision identifiers, used by Alembic. revision = '440bea99abd6' down_revision = '716909215049' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ##...
Hoikas/korman
refs/heads/master
korman/properties/modifiers/region.py
1
# This file is part of Korman. # # Korman 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. # # Korman is distributed i...
antoviaque/edx-platform
refs/heads/master
common/djangoapps/student/tests/test_admin_views.py
34
""" Tests student admin.py """ from django.core.urlresolvers import reverse from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from student.tests.factories import UserFactory class AdminCourseRolesPageTest(SharedModuleStoreTestCa...
run2/citytour
refs/heads/master
4symantec/Lib/site-packages/numpy-1.9.2-py2.7-win-amd64.egg/numpy/distutils/line_endings.py
256
""" Functions for converting from DOS to UNIX line endings """ from __future__ import division, absolute_import, print_function import sys, re, os def dos2unix(file): "Replace CRLF with LF in argument files. Print names of changed files." if os.path.isdir(file): print(file, "Directory!") ret...
vinutah/apps
refs/heads/master
tools/llvm/llvm_39/opt/utils/release/findRegressions-simple.py
123
#!/usr/bin/env python import re, string, sys, os, time, math DEBUG = 0 (tp, exp) = ('compile', 'exec') def parse(file): f = open(file, 'r') d = f.read() # Cleanup weird stuff d = re.sub(r',\d+:\d', '', d) r = re.findall(r'TEST-(PASS|FAIL|RESULT.*?):\s+(.*?)\s+(.*?)\r*\n', d) test = {} fname = '' ...
Yuudachimoe/HikariChun-RedBot
refs/heads/master
lib/pip/_vendor/html5lib/_inputstream.py
328
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type, binary_type from pip._vendor.six.moves import http_client, urllib import codecs import re from pip._vendor import webencodings from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .con...
WhileLoop/ansible-modules-extras
refs/heads/devel
cloud/amazon/iam_mfa_device_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...
ChuckM/micropython
refs/heads/master
tests/basics/builtin_hash.py
28
# test builtin hash function print(hash(False)) print(hash(True)) print({():1}) # hash tuple print({1 << 66:1}) # hash big int print({-(1 << 66):2}) # hash negative big int print(hash in {hash:1}) # hash function try: hash([]) except TypeError: print("TypeError") class A: def __hash__(self): retu...
MortimerGoro/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/html5lib/serializer/__init__.py
1731
from __future__ import absolute_import, division, unicode_literals from .. import treewalkers from .htmlserializer import HTMLSerializer def serialize(input, tree="etree", format="html", encoding=None, **serializer_opts): # XXX: Should we cache this? walker = treewalkers.getTreeWalker(tree) ...
kntem/webdeposit
refs/heads/webdeposit-final
modules/websearch/lib/websearch_admin_templates.py
3
# -*- coding: utf-8 -*- ## ## handles rendering of webmessage module ## ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 Fr...
raymondnijssen/QGIS
refs/heads/master
python/plugins/processing/algs/gdal/rgb2pct.py
6
# -*- coding: utf-8 -*- """ *************************************************************************** rgb2pct.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******************************...
gzavitz/pgmagick
refs/heads/master
test/test_pgmagick_image.py
2
import sys import unittest import pgmagick from pgmagick import Blob, Image, Geometry, Color, LineJoin, StorageType from pgmagick import ChannelType from pgmagick import gminfo if gminfo.library == 'ImageMagick': from pgmagick import DistortImageMethod, SparseColorMethod class TestImage(unittest.TestCase): d...
MaplePlan/djwp
refs/heads/master
django/middleware/__init__.py
12133432
CSC301H-Fall2013/JuakStore
refs/heads/master
site-packages/tests/regressiontests/http_utils/models.py
12133432
qnub/django-cms
refs/heads/develop
cms/tests/test_signals.py
23
# -*- coding: utf-8 -*- from __future__ import with_statement from contextlib import contextmanager from django.conf import settings from django.contrib.auth import get_user_model from django.test import TestCase from django.test.utils import override_settings from cms.api import create_page from cms.models import ...
CoolCloud/taiga-back
refs/heads/master
taiga/projects/history/mixins.py
8
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program 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 F...
flaing/gemrb
refs/heads/master
gemrb/GUIScripts/iwd2/Class.py
4
# GemRB - Infinity Engine Emulator # Copyright (C) 2003 The GemRB Project # # 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...
raycarnes/e-commerce
refs/heads/8.0
website_sale_product_brand/models/__init__.py
7
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-Today Serpent Consulting Services Pvt. Ltd. # (<http://www.serpentcs.com>) # # This program is free softwa...
ddipp/Euler_solutions
refs/heads/main
p021.py
1
#!/usr/bin/env python3 # =============================================================================== # Let d(n) be defined as the sum of proper divisors of n (numbers less than n # which divide evenly into n). # If d(a) = b and d(b) = a, where a ≠ b, then a and b are an amicable pair and # each of a and b are call...
kmonsoor/pyglet
refs/heads/master
contrib/spryte/rect.py
29
class Rect(object): '''Define a rectangular area. Many convenience handles and other properties are also defined - all of which may be assigned to which will result in altering the position and sometimes dimensions of the Rect. The Rect area includes the bottom and left borders but not the top an...
denlap007/devnullect
refs/heads/group-support
src/models/resource.py
1
from peewee import PrimaryKeyField, CharField, DateTimeField from theBaseModel import MyBaseModel class Resource(MyBaseModel): id = PrimaryKeyField(db_column="id") rs_content = CharField(2000) rs_date = DateTimeField() class Meta: order_by = ('id',) db_table = 'resource'
ArchAssault-Project/archassaultweb
refs/heads/master
main/migrations/0006_add_more_info_to_packages.py
5
from south.db import db from django.db import models from main.models import * class Migration: def forwards(self, orm): # Adding field 'Package.compressed_size' db.add_column('packages', 'compressed_size', orm['main.package:compressed_size']) # Adding field 'Package.installed_size' ...
mattclay/ansible
refs/heads/devel
test/units/module_utils/facts/system/distribution/test_distribution_sles4sap.py
29
# -*- coding: utf-8 -*- # Copyright: (c) 2020 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 import pytest from ansible.module_utils.facts.system.distribution import Dis...
BlueLens/bl-magi
refs/heads/master
tensorflow/object_detection/builders/box_predictor_builder_test.py
21
# 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...
mfherbst/spack
refs/heads/develop
var/spack/repos/builtin/packages/gurobi/package.py
2
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
ThePletch/ansible
refs/heads/devel
test/units/contrib/inventory/test_vmware_inventory.py
15
#!/usr/bin/env python import json import os import pickle import unittest import sys try: from vmware_inventory import VMWareInventory except ImportError: from nose.plugins.skip import SkipTest raise SkipTest("test_vmware_inventory.py requires the python module 'vmware_inventory'") # contrib's dirstruc...
olgabot/prettyplotlib
refs/heads/master
prettyplotlib/utils.py
1
__author__ = 'olga' import matplotlib as mpl import matplotlib.pyplot as plt def remove_chartjunk(ax, spines, grid=None, ticklabels=None, show_ticks=False, xkcd=False): ''' Removes "chartjunk", such as extra lines of axes and tick marks. If grid="y" or "x", will add a white grid at ...
Eric-Zhong/odoo
refs/heads/8.0
addons/account/edi/__init__.py
450
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
csirtgadgets/bearded-avenger
refs/heads/master
cif/httpd/views/indicators.py
1
from ..common import pull_token, jsonify_success, jsonify_unauth, jsonify_unknown, compress, response_compress, \ VALID_FILTERS, jsonify_busy from flask.views import MethodView from flask import request, current_app from cifsdk.client.zeromq import ZMQ as Client from cifsdk.client.dummy import Dummy as DummyClient ...
GunnerJnr/_CodeInstitute
refs/heads/master
Stream-3/Full-Stack-Development/17.Create-A-Django-Based-Forum/3.Showing-Our-Subjects/we_are_social/products/views.py
16
# -*- coding: utf-8 -*- from django.contrib.auth.decorators import login_required from django.shortcuts import render from .models import Product # Create your views here. @login_required(login_url='/login/') def all_products(request): products = Product.objects.all() return render(request, "products/products...
RanadeepPolavarapu/kuma
refs/heads/master
kuma/wiki/migrations/0003_auto_20150703_0419.py
7
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import kuma.core.fields class Migration(migrations.Migration): dependencies = [ ('wiki', '0002_auto_20150430_0805'), ] operations = [ migrations.AlterField( model_name='d...
DepthDeluxe/ansible
refs/heads/devel
lib/ansible/modules/remote_management/hpilo/hpilo_facts.py
33
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.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 Lice...
akhmadMizkat/odoo
refs/heads/master
addons/product_margin/__openerp__.py
27
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Margins by Products', 'version': '1.0', 'category': 'Sales Management', 'description': """ Adds a reporting menu in products that computes sales, purchases, margins and other interesting indic...
reminisce/mxnet
refs/heads/master
example/sparse/wide_deep/train.py
6
# 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...
jeffzheng1/tensorflow
refs/heads/master
tensorflow/python/framework/common_shapes_test.py
60
# 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...
legrosbuffle/or-tools
refs/heads/master
examples/python/set_covering_deployment.py
5
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com # # 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 ...
mezz64/home-assistant
refs/heads/dev
homeassistant/components/goalzero/binary_sensor.py
12
"""Support for Goal Zero Yeti Sensors.""" from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.const import CONF_NAME from . import YetiEntity from .const import BINARY_SENSOR_DICT, DATA_KEY_API, DATA_KEY_COORDINATOR, DOMAIN PARALLEL_UPDATES = 0 async def async_setup_entry(hass, ...
MatthewWilkes/django
refs/heads/master
tests/migrations/test_migrations_conflict/0002_conflicting_second.py
429
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("migrations", "0001_initial")] operations = [ migrations.CreateModel( "Something", [ ("id", model...
berth64/modded_modded_1257ad
refs/heads/master
source/module_music.py
1
from header_music import * #################################################################################################################### # Each track record contains the following fields: # 1) Track id: used for referencing tracks. # 2) Track file: filename of the track # 3) Track flags. See header_musi...
KenKundert/ec
refs/heads/master
tests/test_ec.py
1
#!/usr/bin/env python3 # encoding: utf8 # Test EC # Imports {{{1 from engineering_calculator.calculator import Calculator, Display, CalculatorError from engineering_calculator.actions import ( allActions, predefinedVariables, defaultFormat, defaultDigits, detailedHelp ) import pytest # Utility functions {{{1 mess...
bjackman/workload-automation
refs/heads/master
wlauto/utils/formatter.py
9
# Copyright 2013-2015 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
yashvesikar/robotax
refs/heads/master
classes/employee_calculations.py
1
import calculations_template class employee_calculations(calculations): def __init__(self, array_of_employees): self.employees = array_of_employees def sum(): employee_tax_sum = 0 for employee in self.employees: employee_tax_sum += employee.payrollTax return employe...
nocarryr/AV-Asset-Manager
refs/heads/master
avam/categories/tests.py
1
from django.test import TestCase from django.db import IntegrityError from categories.models import Category, CategoryItem class CategoriesTestCase(TestCase): def setUp(self): base_names = ['root', 'branch', 'leaf'] def build_children(base_name=None, parent=None): if base_name is None:...
svn2github/audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg01-amp.lv2/waflib/Tools/compiler_c.py
343
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,sys,imp,types from waflib.Tools import ccroot from waflib import Utils,Configure from waflib.Logs import debug c_compiler={'win32':['msvc','gcc'],'cygwin':['gcc'],'d...
cdqwertz/qaxiwa
refs/heads/master
src/main.py
1
import utils from parser import * from compiler import * from language import * if __name__ == "__main__": string = utils.load_file("code.txt") data = parse(string) s = [] for my_node in data: s.append(str(my_node)) print("[" + ", ".join(s) + "]") print() lang = input("language: ") my_language = language...
kidmaple/CoolWall
refs/heads/nios2
user/python/Demo/metaclasses/Eiffel.py
4
"""Support Eiffel-style preconditions and postconditions. For example, class C: def m1(self, arg): require arg > 0 return whatever ensure Result > arg can be written (clumsily, I agree) as: class C(Eiffel): def m1(self, arg): return whatever def m1_pre(self, arg): ...
ibmsoe/ImpalaPPC
refs/heads/Impala2.6-main
bin/run-workload.py
2
#!/usr/bin/env impala-python # Copyright (c) 2012 Cloudera, 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...
mecax/pyrobotlab
refs/heads/master
home/AdolphSmith/AdolphSmith.py
5
# script for AdolphSmith # http://myrobotlab.org/content/my-inmoov-parts-list-and-way-working from org.myrobotlab.framework import Service # mouth = Runtime.createAndStart("mouth","Speech") - we don't need 2 mouths Service.reserveRootAs("tracker.arduino","arduino") Service.reserveRootAs("mouthControl.arduino","arduin...
MartinHjelmare/home-assistant
refs/heads/dev
tests/components/time_date/__init__.py
36
"""Tests for the time_date component."""
linuxlewis/channels-api
refs/heads/master
channels_api/bindings.py
1
import json from channels.binding import websockets from channels.binding.base import CREATE, UPDATE, DELETE, BindingMetaclass from django.http import Http404 from django.utils import six from rest_framework.exceptions import APIException, NotFound from rest_framework.generics import get_object_or_404 from .mixins i...
ctasims/Dive-Into-Python-3
refs/heads/master
examples/roman8.py
2
'''Convert to and from Roman numerals This program is part of 'Dive Into Python 3', a free Python book for experienced programmers. Visit http://diveintopython3.org/ for the latest version. ''' import re class OutOfRangeError(ValueError): pass class NotIntegerError(ValueError): pass class InvalidRomanNumeralError(Va...
crcresearch/osf.io
refs/heads/develop
api_tests/applications/views/__init__.py
12133432
chrishas35/django-travis-ci
refs/heads/master
tests/modeltests/proxy_model_inheritance/__init__.py
12133432
rapilabs/sensible-text-test-runner
refs/heads/master
sensible_text_test_runner/management/__init__.py
12133432
LarryHillyer/PoolHost
refs/heads/master
PoolHost/env/Lib/site-packages/wheel/test/simple.dist/setup.py
565
from setuptools import setup try: unicode def u8(s): return s.decode('unicode-escape').encode('utf-8') except NameError: def u8(s): return s.encode('utf-8') setup(name='simple.dist', version='0.1', description=u8('A testing distribution \N{SNOWMAN}'), packages=['simpledis...
totolef/Sick-beard
refs/heads/master
lib/subliminal/services/subswiki.py
35
# -*- coding: utf-8 -*- # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 3 of...
salsita/flask-raml
refs/heads/master
flask_raml.py
2
"""Flask-RAML (REST API Markup Language) API server with parameter conversion, response encoding, and examples.""" __all__ = 'MimeEncoders API Loader Converter Content ApiError RequestError ParameterError AuthError'.split() __version__ = '0.2.2' from sys import exc_info from operator import itemgetter from functools...
enthought/etsproxy
refs/heads/master
enthought/persistence/versioned_unpickler.py
1
# proxy module from __future__ import absolute_import from apptools.persistence.versioned_unpickler import *
jmflinuxtx/kerneltest-harness
refs/heads/master
kerneltest/db/meta.py
1
""" This module sets up the basic database objects that all other database modules will rely on. This includes the declarative base class and global scoped session. This is in its own module to avoid circular imports from forming. Models and events need to be imported by ``__init__.py``, but they also need access to t...
ric2b/Vivaldi-browser
refs/heads/master
chromium/tools/perf/cli_tools/soundwave/commands.py
10
# Copyright 2018 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 __future__ import print_function import json import logging try: import sqlite3 except ImportError: pass from core import cli_utils from core.exte...
tobbad/micropython
refs/heads/master
tests/basics/builtin_chr.py
108
# test builtin chr (whether or not we support unicode) print(chr(65)) try: chr(0x110000) except ValueError: print("ValueError")
google/grr
refs/heads/master
grr/client/grr_response_client/unprivileged/filesystem/server_lib.py
1
#!/usr/bin/env python """Unprivileged filesystem RPC server.""" import abc import os import sys import traceback from typing import TypeVar, Generic, Optional, Tuple from grr_response_client.unprivileged import communication from grr_response_client.unprivileged.filesystem import filesystem from grr_response_client.un...
Lemma1/MAC-POSTS
refs/heads/master
doc_builder/sphinx-contrib/libreoffice/doc/conf.py
1
# -*- coding: utf-8 -*- # # Sphinx LibreOffice Plugin documentation build configuration file # import sys import os # -- General configuration ------------------------------------------------ # Extensions extensions = ['sphinxcontrib.libreoffice'] # The suffix of source filenames. source_suffix = '.rst' # The mas...
crazybiocomputing/align2seq
refs/heads/master
matrix/parser.py
1
"This program will parse matrix files to convert them into objects usable by JS files" # libraries' imports for create the parser ## librairy to create the json object import json ## library for using regular expressions import re # opening of all files, each containing a BLOSUM matrix blosum30=open("Blosum/EBLOSUM30...
bqbn/addons-server
refs/heads/master
src/olympia/addons/management/__init__.py
12133432
berkeley-stat159/project-alpha
refs/heads/master
code/utils/tests/__init__.py
12133432
lochiiconnectivity/libcloud
refs/heads/trunk
libcloud/common/nfsn.py
29
# 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 ...
mfherbst/spack
refs/heads/develop
var/spack/repos/builtin/packages/py-traceback2/package.py
5
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
sdague/home-assistant
refs/heads/dev
homeassistant/components/maxcube/__init__.py
16
"""Support for the MAX! Cube LAN Gateway.""" import logging from socket import timeout from threading import Lock import time from maxcube.connection import MaxCubeConnection from maxcube.cube import MaxCube import voluptuous as vol from homeassistant.const import CONF_HOST, CONF_PORT, CONF_SCAN_INTERVAL import homea...
mxOBS/deb-pkg_trusty_chromium-browser
refs/heads/master
third_party/pywebsocket/src/test/testdata/handlers/sub/plain_wsh.py
499
# 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 of conditions and the f...
leeseulstack/openstack
refs/heads/master
neutron/plugins/vmware/vshield/tasks/constants.py
36
# Copyright 2013 VMware, 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 a...
patrick-winter-knime/deep-learning-on-molecules
refs/heads/master
smiles-vhts/prepare_multitarget.py
1
import re import h5py import argparse from util import preprocess, partition_ref, oversample_ref, shuffle, actives_counter from data_structures import reference_data_set def get_arguments(): parser = argparse.ArgumentParser(description='Prepares the given data set for training') parser.add_argument('data', ty...
Workday/OpenFrame
refs/heads/master
third_party/tlslite/tlslite/integration/tlsasyncdispatchermixin.py
113
# Authors: # Trevor Perrin # Martin von Loewis - python 3 port # # See the LICENSE file for legal information regarding use of this file. """TLS Lite + asyncore.""" import asyncore from tlslite.tlsconnection import TLSConnection from .asyncstatemachine import AsyncStateMachine class TLSAsyncDispatcherMixIn(As...
NicoSantangelo/sublime-text-trello
refs/heads/master
lib/requests/packages/charade/charsetgroupprober.py
206
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All R...
lizzha/azure-linux-extensions
refs/heads/master
RDMAUpdate/main/Common.py
5
#!/usr/bin/env python # # VM Backup extension # # Copyright 2014 Microsoft Corporation # # 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 # # ...
AdamBSteele/yournewhomepage
refs/heads/master
fbone/modules/frontend/__init__.py
25
# -*- coding: utf-8 -*- from .views import frontend