repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
madmax983/h2o-3
refs/heads/master
h2o-py/tests/testdir_algos/deeplearning/pyunit_DEPRECATED_anomaly_largeDeepLearning.py
2
import sys, os sys.path.insert(1, os.path.join("..","..","..")) import h2o from tests import pyunit_utils def anomaly(): print "Deep Learning Anomaly Detection MNIST" train = h2o.import_file(pyunit_utils.locate("bigdata/laptop/mnist/train.csv.gz")) test = h2o.import_file(pyunit_utils.locate("bigdat...
zephyrplugins/zephyr
refs/heads/master
zephyr.plugin.jython/jython2.5.2rc3/Lib/test/re_tests.py
5
#!/usr/bin/env python # -*- mode: python -*- # $Id: re_tests.py 4185 2008-02-28 16:55:33Z cgroves $ # Re test suite and benchmark suite v1.5 # The 3 possible outcomes for each pattern [SUCCEED, FAIL, SYNTAX_ERROR] = range(3) # Benchmark suite (needs expansion) # # The benchmark suite does not test correctness, just ...
abhidrona/gn-osc-custom
refs/heads/master
oscar/apps/order/migrations/0006_update_offer_name_field.py
16
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: ...
socek/Gadu-History
refs/heads/master
views/userlist.py
2
#-*- coding: utf-8 -*- # #copyright 2010 Dominik "Socek" Długajczyk # #This file is part of Gadu History. # #Gadu History 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 ...
michaelWagner/oppia
refs/heads/develop
extensions/value_generators/models/generators_test.py
23
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
insidenothing/3D-Printing-Software
refs/heads/master
skein_engines/skeinforge-35/fabmetheus_utilities/gcodec.py
6
""" Gcodec is a collection of utilities to decode and encode gcode. To run gcodec, install python 2.x on your machine, which is avaliable from http://www.python.org/download/ Then in the folder which gcodec is in, type 'python' in a shell to run the python interpreter. Finally type 'from gcodec import *' to import t...
killerstorm/ngcccbase
refs/heads/master
coloredcoinlib/blockchain.py
4
""" Data structures to model bitcoin blockchain objects. """ import bitcoin.core import bitcoin.core.serialize import bitcoin.rpc from toposort import toposorted def script_to_raw_address(script): # extract the destination address from the scriptPubkey if script[:3] == "\x76\xa9\x14": return script[...
IvantheDugtrio/Platypus
refs/heads/master
scripts/filterTR.py
2
import sys threshold = int(sys.argv[1]) for line in sys.stdin: if line[0] == "#": print line.strip() continue cols = line.strip().split("\t") info = cols[7] if "," in cols[4]: continue for infoVal in info.split(";"): name,value = infoVal.split("=")[0:2] ...
grahamBamber/coffie
refs/heads/master
lcd/lcd_perf.py
3
#!/usr/bin/env python import time from lcd import lcddriver from i2clibraries import i2c_lcd_smbus lcd1 = lcddriver.lcd() lcd2 = i2c_lcd_smbus.i2c_lcd(0x3f,1, 2, 1, 0, 4, 5, 6, 7, 3) lcd2.command(lcd2.CMD_Display_Control | lcd2.OPT_Enable_Display) lcd2.backLightOn() def writeLcd1(message): lcd1.lcd_display_...
getavalon/core
refs/heads/master
avalon/maya/lib.py
2
"""Standalone helper functions""" import contextlib from maya import cmds, mel from maya.api import OpenMaya as om def unique_name(name, format="%02d", namespace="", prefix="", suffix=""): """Return unique `name` The function takes into consideration an optional `namespace` and `suffix`. The suffix is ...
gef756/statsmodels
refs/heads/master
statsmodels/sandbox/regression/treewalkerclass.py
34
''' Formulas -------- This follows mostly Greene notation (in slides) partially ignoring factors tau or mu for now, ADDED (if all tau==1, then runmnl==clogit) leaf k probability : Prob(k|j) = exp(b_k * X_k / mu_j)/ sum_{i in L(j)} (exp(b_i * X_i / mu_j) branch j probabilities : Prob(j) = exp(b_j * X_j + mu*IV_j )...
patrickrolanddg/jaikuengine
refs/heads/master
middleware/strip_whitespace.py
34
# Copyright 2009 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 or agreed to in writing, ...
legalsylvain/OpenUpgrade
refs/heads/master
addons/l10n_si/account_wizard.py
124
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) conexus.at # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public...
hackerhelmut/trap-gen
refs/heads/master
processors/LEON3/LEONDefs.py
2
# -*- coding: iso-8859-1 -*- # Just a bunch of definitions which may turn out useful # Number of register windows, between 2 and 32, default is 8 for LEON3 numRegWindows = 8 # pipelined multiplication unit pipelinedMult = False # multiplier size (valid values 16/32) multiplier_size = 16
hujiajie/chromium-crosswalk
refs/heads/master
tools/telemetry/catapult_base/refactor/annotated_symbol/__init__.py
17
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=wildcard-import from catapult_base.refactor.annotated_symbol.class_definition import * from catapult_base.refactor.annotated_symbol.functio...
mdaniel/intellij-community
refs/heads/master
python/testData/intentions/convertTripleQuotedStringRawStrings.py
79
S = (<caret>r'''foo double-only" single-only' mix'ed" ''' """\r\n""" r'one line')
jchevin/MissionPlanner-master
refs/heads/master
packages/IronPython.StdLib.2.7.4/content/Lib/encodings/cp866.py
593
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP866.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
CottageLabs/OpenArticleGauge
refs/heads/dev
openarticlegauge/tests/test_buffer_integration.py
1
######################################################################################## # Before running these tests, you must start all of the infrastructure with the # storage buffering turned ON # # BUFFERING = True # BUFFER_FLUSH_PERIOD=6 # BUFFER_GRACE_PERIOD=5 # # FIXME: we need a better way of starting and re-c...
tillahoffmann/tensorflow
refs/heads/master
tensorflow/contrib/keras/api/keras/datasets/boston_housing/__init__.py
73
# 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...
ted-gould/nova
refs/heads/master
nova/tests/unit/virt/ironic/test_client_wrapper.py
26
# Copyright 2014 Red Hat, 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...
TomHeatwole/osf.io
refs/heads/develop
scripts/tests/test_retract_registrations.py
39
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from nose.tools import * # noqa from tests.base import OsfTestCase from tests.factories import RegistrationFactory from tests.factories import UserFactory from scripts.retract_registrations import main class TestRetractRegistrations(OsfTestCase): ...
supermanheng21/twilio-python
refs/heads/master
twilio/rest/resources/conferences.py
51
from .util import parse_date, normalize_dates from . import InstanceResource, ListResource class Participant(InstanceResource): id_key = "call_sid" def mute(self): """ Mute the participant """ self.update_instance(muted="true") def unmute(self): """ Unmut...
laudaa/bitcoin
refs/heads/master
test/functional/bip9-softforks.py
11
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test BIP 9 soft forks. Connect to a single node. regtest lock-in with 108/144 block signalling activat...
aurelijusb/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/pythonwin/pywin/Demos/guidemo.py
17
# GUI Demo - just a worker script to invoke all the other demo/test scripts. import win32ui import __main__ import sys import regutil import win32api demos = [ \ # ('Font', 'import fontdemo;fontdemo.FontDemo()'), ('Open GL Demo', 'import openGLDemo;openGLDemo.test()'), ('Threaded GUI', 'import threadedgui;threadedgu...
volab/piclockradio
refs/heads/master
subprocess_test.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # see: https://docs.python.org/3.3/library/subprocess.html#module-subprocess import os import sys import subprocess TIMEOUT=3 # seconds # If you launch a sub-process (even with shell=False), then the # subprocess.Popen.kill() function will only kill that sub-process (...
zmike/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/memorizingfile.py
680
#!/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...
sdague/home-assistant
refs/heads/dev
homeassistant/components/blebox/sensor.py
16
"""BleBox sensor entities.""" from homeassistant.helpers.entity import Entity from . import BleBoxEntity, create_blebox_entities from .const import BLEBOX_TO_HASS_DEVICE_CLASSES, BLEBOX_TO_UNIT_MAP async def async_setup_entry(hass, config_entry, async_add_entities): """Set up a BleBox entry.""" create_bleb...
josyb/myhdl
refs/heads/master
myhdl/test/conversion/toVerilog2/test_loops.py
4
import os path = os.path from random import randrange import myhdl from myhdl import * from myhdl.conversion import verify, analyze from myhdl import ConversionError from myhdl.conversion._misc import _error def ForLoopError1(a, out): @instance def logic(): while 1: yield a var...
bootphon/h5features
refs/heads/master
h5features/__init__.py
1
# Copyright 2014-2019 Thomas Schatz, Mathieu Bernard, Roland Thiolliere # # This file is part of h5features. # # h5features 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 #...
omni-digital/omni-blocks
refs/heads/master
tests/test_templatetags.py
1
from __future__ import unicode_literals from mock import Mock from django.test import TestCase from wagtail_factories import PageFactory from omni_blocks.blocks.text_blocks import JumpHBlock from omni_blocks.templatetags.omni_blocks_tags import has_jumplist, get_jumplist class TestHasJumplist(TestCase): def se...
RaspberryPiFi/PiCode
refs/heads/master
lib/eyed3/plugins/__init__.py
3
# -*- coding: utf-8 -*- ################################################################################ # Copyright (C) 2012 Travis Shirk <travis@pobox.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 So...
dhanunjaya/neutron
refs/heads/master
neutron/cmd/eventlet/server/__init__.py
10
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
xingyepei/edx-platform
refs/heads/release
lms/djangoapps/instructor/tests/test_offline_gradecalc.py
74
""" Tests for offline_gradecalc.py """ import json from mock import patch from courseware.models import OfflineComputedGrade from student.models import CourseEnrollment from student.tests.factories import UserFactory from xmodule.graders import Score from xmodule.modulestore import ModuleStoreEnum from xmodule.modules...
digitalocean/netbox
refs/heads/develop
netbox/dcim/migrations/0064_remove_platform_rpc_client.py
2
# Generated by Django 2.0.8 on 2018-08-22 16:09 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('dcim', '0063_device_local_context_data'), ] operations = [ migrations.RemoveField( model_name='platform', name='rpc_client',...
citizenline/citizenline
refs/heads/master
bettertexts/app_settings.py
2
from django.conf import settings STAR_RATINGS_RANGE = getattr(settings, "STAR_RATINGS_RANGE", 5)
MDPvis/rlpy
refs/heads/master
examples/hiv/kifdd.py
4
from rlpy.Domains.HIVTreatment import HIVTreatment from rlpy.Agents import Q_Learning from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp from rlpy.Representations import KernelizediFDD param_space = { 'kernel_resol...
ken-muturi/pombola
refs/heads/master
pombola/south_africa/management/commands/south_africa_restart_constituency_contacts.py
4
from datetime import date from optparse import make_option from django.core.management.base import NoArgsCommand, CommandError from django_date_extensions.fields import ApproximateDate from pombola.core.models import PositionTitle # A few days before the election: date_for_last_active_check = date(2014, 5, 1) # The ...
Technorip/Myntra
refs/heads/master
Django Backend/myntra/env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euctwfreq.py
3132
######################## 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 Rights R...
elit3ge/SickRage
refs/heads/master
lib/github/InputGitAuthor.py
25
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
2014c2g3/0623exam
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/_socket_1.py
742
"""Implementation module for socket operations. See the socket module for documentation.""" AF_APPLETALK = 16 AF_DECnet = 12 AF_INET = 2 AF_INET6 = 23 AF_IPX = 6 AF_IRDA = 26 AF_SNA = 11 AF_UNSPEC = 0 AI_ADDRCONFIG = 1024 AI_ALL = 256 AI_CANONNAME = 2 AI_NUMERICHOST = 4 AI_NUMERICSERV = 8 AI_PASSIVE = 1...
richard-fisher/repository
refs/heads/master
programming/cython/actions.py
4
#!/usr/bin/python from pisi.actionsapi import pythonmodules def install(): pythonmodules.install()
sgraham/nope
refs/heads/master
v8/test/intl/testcfg.py
75
# Copyright 2013 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...
dahlstrom-g/intellij-community
refs/heads/master
python/testData/inspections/AddCallSuper1_after.py
74
class A: def __init__(self, c, a = 5): pass class B(A): def __init__(self, r, c, b=6): """docstring""" A.__init__(self, c) print "Constructor B was called"
nikolas/raven-python
refs/heads/master
raven/contrib/django/views.py
25
""" raven.contrib.django.views ~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from functools import wraps from django.conf import settings from django.http import HttpRespon...
OpenUpgrade/OpenUpgrade
refs/heads/8.0
addons/purchase_requisition/purchase_requisition.py
200
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
robotlinker/robotlinker_core
refs/heads/master
src/rosbridge_suite/rosbridge_server/src/tornado/locale.py
160
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2009 Facebook # # 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 ...
terabit-software/dynamic-stream-server
refs/heads/master
dss/tools/ffmpeg.py
2
from __future__ import absolute_import import shlex from ..config import config bin_default = config.get('ffmpeg', 'bin') probe = config.get('ffmpeg', 'probe') def _input_cmd(cmd_input, input, add_probe=True, bin=None, add_bin=True): """ Base of FFmpeg command with a single input. """ if add_bin: ...
GSDan/CrumbsOfWisdom
refs/heads/master
biscuitBox/main.py
1
import os import random import errno import requests import picamera import sys import threading import subprocess from PIL import Image, ImageEnhance import RPi.GPIO as GPIO from time import sleep, time # GPIO pins gLight = 16 # Light sensor gCamBut = 15 # Take photo button gSkipBut = 22 # Skip question button gLED =...
jbest/brisc
refs/heads/master
manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "rapid_web.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
UOMx/edx-platform
refs/heads/master
lms/djangoapps/courseware/tests/test_password_history.py
128
""" This file will test through the LMS some of the PasswordHistory features """ import json from mock import patch from uuid import uuid4 from nose.plugins.attrib import attr from django.contrib.auth.models import User from django.utils import timezone from datetime import timedelta from django.test.utils import over...
guijomatos/SickRage
refs/heads/master
lib/hachoir_metadata/timezone.py
185
from datetime import tzinfo, timedelta class TimezoneUTC(tzinfo): """UTC timezone""" ZERO = timedelta(0) def utcoffset(self, dt): return TimezoneUTC.ZERO def tzname(self, dt): return u"UTC" def dst(self, dt): return TimezoneUTC.ZERO def __repr__(self): return...
V11/volcano
refs/heads/master
server/sqlmap/tamper/nonrecursivereplacement.py
10
#!/usr/bin/env python """ Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import random import re from lib.core.common import singleTimeWarnMessage from lib.core.enums import PRIORITY __priority__ = PRIORITY.NORMAL def tamper(payload, **kwargs): ...
jeremiahyan/odoo
refs/heads/master
addons/account/models/account_journal_dashboard.py
2
import json from datetime import datetime, timedelta from babel.dates import format_datetime, format_date from odoo import models, api, _, fields from odoo.osv import expression from odoo.release import version from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DF from odoo.tools.misc import formatLang, format_date ...
endticket/uwsgi
refs/heads/master
plugins/alarm_xmpp/uwsgiplugin.py
21
NAME = 'alarm_xmpp' CFLAGS = [] LDFLAGS = [] LIBS = ['-lgloox'] GCC_LIST = ['alarm_xmpp_plugin', 'gloox.cc']
jeremyclover/airflow
refs/heads/master
airflow/jobs.py
2
from builtins import str from past.builtins import basestring from collections import defaultdict from datetime import datetime import getpass import logging import signal import socket import subprocess import sys from time import sleep from sqlalchemy import Column, Integer, String, DateTime, func, Index from sqlalc...
qzio/compose
refs/heads/master
tests/unit/split_buffer_test.py
54
from __future__ import unicode_literals from __future__ import absolute_import from compose.cli.utils import split_buffer from .. import unittest class SplitBufferTest(unittest.TestCase): def test_single_line_chunks(self): def reader(): yield b'abc\n' yield b'def\n' yie...
macs03/demo-cms
refs/heads/master
cms/lib/python2.7/site-packages/cms/migrations/0014_sites_removed.py
525
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_label...
rananda/cfme_tests
refs/heads/master
cfme/tests/cloud_infra_common/test_events.py
1
# -*- coding: utf-8 -*- """This module tests events that are invoked by Cloud/Infra VMs.""" import fauxfactory import pytest from cfme.common.vm import VM from cfme.control.explorer.policy_profiles import PolicyProfile from cfme.control.explorer.policies import VMControlPolicy from cfme.control.explorer.actions import...
cosimoiaia/AlviBot
refs/heads/master
MailReader.py
2
#!/usr/bin/env python ########################### # # A.L.V.I. Bot # # MailReader.py: Handle Imap/POP connection, messages download and send vocal notification # # Author: Cosimo Iaia <cosimo.iaia@gmail.com> # Date: 12/02/2010 # # This file is distribuited under the terms of GNU General Public # Copyright 2010 Cosimo...
felipenaselva/felipe.repository
refs/heads/master
script.module.myconnpy/lib/examples/prepared_statements.py
14
#!/usr/bin/env python # -*- coding: utf-8 -*- # MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MyS...
jralls/gramps
refs/heads/master
gramps/cli/clidbman.py
1
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2009 Brian G. Matherly # Copyright (C) 2009 Gary Burton # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publis...
daonb/Open-Knesset
refs/heads/master
laws/migrations/0021_add_full_title.py
14
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): for b in orm['laws.bill'].objects.all(): b.full_title = "%s %s" % (b.law.title, b.title) b.save() ...
uw-it-cte/uw-restclients
refs/heads/ems-master
restclients/test/pws/err500/pws.py
5
from django.test import TestCase from django.conf import settings from restclients.pws import PWS from restclients.exceptions import DataFailureException class PWSTest500(TestCase): def test_pws_regid_500(self): with self.settings(RESTCLIENTS_PWS_DAO_CLASS='restclients.dao_implementation.errors.Always500')...
sushramesh/lwc
refs/heads/master
lib/python2.7/site-packages/setuptools/command/upload_docs.py
390
# -*- coding: utf-8 -*- """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). """ from base64 import standard_b64encode from distutils import log from distutils.errors import DistutilsOptionError from distutils.command.upload import upload import os import s...
daira/tahoe-lafs-debian
refs/heads/master
setuptools-0.6c16dev6.egg/setuptools/command/install.py
7
import setuptools, sys, glob from distutils.command.install import install as _install from distutils.errors import DistutilsArgError class install(_install): """Use easy_install to install the package, w/dependencies""" user_options = _install.user_options + [ ('old-and-unmanageable', None, "Try not ...
ReachingOut/unisubs
refs/heads/staging
apps/testhelpers/debug_toolbar_extra.py
5
from debug_toolbar.panels import DebugPanel from haystack.backends import queries import StringIO import hotshot import hotshot.stats import os import tempfile import traceback from django.conf import settings from django.template import Template, Context class ProfilingPanel(DebugPanel): """ Panel that runs t...
Dunkas12/BeepBoopBot
refs/heads/master
lib/youtube_dl/extractor/newstube.py
55
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, ) class NewstubeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?newstube\.ru/media/(?P<id>.+)' _TEST = { 'url': 'http://www.newstube.ru/...
ejona86/grpc
refs/heads/master
tools/release/verify_python_release.py
8
#!/usr/bin/env python3 #Copyright 2019 gRPC authors. # # 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 ...
allotria/intellij-community
refs/heads/master
python/testData/completion/parameterFromUsages.after.py
83
def foo(bar): bar.append() def baz(): foo(['hello', 'world'])
hassaanaliw/flaskbook
refs/heads/master
app/user/__init__.py
2
__author__ = 'hassaanali'
kerr-huang/SL4A
refs/heads/master
python/src/Lib/email/header.py
54
# Copyright (C) 2002-2006 Python Software Foundation # Author: Ben Gertzfield, Barry Warsaw # Contact: email-sig@python.org """Header encoding and decoding functionality.""" __all__ = [ 'Header', 'decode_header', 'make_header', ] import re import binascii import email.quoprimime import email.base64m...
SmingHub/Sming
refs/heads/develop
Sming/Libraries/RF24/tests/pingpair_test/runtest.py
9
#!/opt/local/bin/python import sys,serial def read_until(token): while 1: line = ser.readline(None,"\r") sys.stdout.write(line) if (line.startswith(token)): break return line ser = serial.Serial(sys.argv[1], 57600, timeout=5, dsrdtr=False, rtscts=False) read_until("+READY") ser.write(sys.argv[2]) line...
anetasie/sherpa
refs/heads/master
sherpa/optmethods/tests/test_ncoresopt.py
1
# # Copyright (C) 2019, 2020 Smithsonian Astrophysical Observatory # # # 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 vers...
hossamkhader/ns-3
refs/heads/master
examples/stats/examples-to-run.py
199
#! /usr/bin/env python ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # A list of C++ examples to run in order to ensure that they remain # buildable and runnable over time. Each tuple in the list contains # # (example_name, do_run, do_valgrind_run). # # See test.py for more i...
WmHHooper/aima-python
refs/heads/master
submissions/Zemgulys/myCSPs.py
1
import csp rgby = ['R', 'G', 'B', 'Y'] d2 = {'U': rgby, 'P': rgby, 'V': rgby, 'A': rgby, 'K': rgby, 'S': rgby, 'T': rgby, 'M': rgby, 'TG': rgby, 'KL': rgby} v2 = d2.keys() Lithuania = {'U': ['V', 'P'], 'P': ['U', 'V', 'K', 'S'], 'V': ['...
sunlianqiang/kbengine
refs/heads/master
kbe/src/lib/python/Lib/lib2to3/fixes/fix_itertools.py
136
""" Fixer for itertools.(imap|ifilter|izip) --> (map|filter|zip) and itertools.ifilterfalse --> itertools.filterfalse (bugs 2360-2363) imports from itertools are fixed in fix_itertools_import.py If itertools is imported as something else (ie: import itertools as it; it.izip(spam, eggs)) method calls w...
xiandiancloud/edx-platform
refs/heads/master
cms/djangoapps/contentstore/management/commands/empty_asset_trashcan.py
206
from django.core.management.base import BaseCommand, CommandError from xmodule.contentstore.utils import empty_asset_trashcan from xmodule.modulestore.django import modulestore from opaque_keys.edx.keys import CourseKey from .prompt import query_yes_no from opaque_keys import InvalidKeyError from opaque_keys.edx.locati...
gicking/STM8_templates
refs/heads/master
Projects/muBoard_Examples/LCD-display_I2C/build_upload.py
13
#!/usr/bin/python ''' Script for building and uploading a STM8 project with dependency auto-detection ''' # set general options UPLOAD = 'BSL' # select 'BSL' or 'SWIM' TERMINAL = False # set True to open terminal after upload RESET = 1 # STM8 reset: 0=skip, 1=manual, 2=DTR line (RS232),...
jaredpar/cli
refs/heads/rel/1.0.0
packaging/debian/package_tool/scripts/config_template_generator.py
1
#!/usr/bin/python # # Copyright (c) .NET Foundation and contributors. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # # Parses debian_config.json and generates appropriate templates # Where optional defaults exist, they are defined in the temp...
pombredanne/pyelftools
refs/heads/master
elftools/construct/lib/hex.py
24
from .py3compat import byte2int, int2byte, bytes2str # Map an integer in the inclusive range 0-255 to its string byte representation _printable = dict((i, ".") for i in range(256)) _printable.update((i, bytes2str(int2byte(i))) for i in range(32, 128)) def hexdump(data, linesize): """ data is a bytes object....
jimboatarm/workload-automation
refs/heads/master
wlauto/external/louie/__init__.py
10
__all__ = [ 'dispatcher', 'error', 'plugin', 'robustapply', 'saferef', 'sender', 'signal', 'version', 'connect', 'disconnect', 'get_all_receivers', 'reset', 'send', 'send_exact', 'send_minimal', 'send_robust', 'install_plugin', 'remove_plugin...
Averroes/raft
refs/heads/master
dialogs/AnalysisConfigDialog.py
11
# # Analysis Config dialog # # Authors: # Justin Engler # # Copyright (c) 2011 RAFT Team # # This file is part of RAFT. # # RAFT 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 th...
anand-c-goog/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/ops/bijector.py
3
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
madeso/prettygood
refs/heads/master
dotnet/Tagger/Song.py
1
using System; using System.Collections.Generic; using System.Linq; using System.Text; using PrettyGood.Util; namespace Tagger { public class Song { private string Resolve(Func<IdTag, string> get) { string s = get(tags); if( string.IsNullOrEmpty(s) ) return "<empty>"; ...
ludovicoloreti/LexicApp
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
896
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
llhe/tensorflow
refs/heads/master
tensorflow/contrib/rnn/python/kernel_tests/gru_ops_test.py
21
# 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...
chromium/chromium
refs/heads/master
third_party/android_deps/libs/org_apache_maven_wagon_wagon_provider_api/3pp/fetch.py
6
#!/usr/bin/env python # Copyright 2021 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. # This is generated, do not edit. Update BuildConfigGenerator.groovy and # 3ppFetch.template instead. from __future__ import print_fun...
frederick-masterton/django
refs/heads/master
django/contrib/webdesign/tests.py
42
# -*- coding: utf-8 -*- from __future__ import unicode_literals import unittest from django.contrib.webdesign.lorem_ipsum import paragraphs, words from django.template import loader, Context class WebdesignTest(unittest.TestCase): def test_words(self): self.assertEqual(words(7), 'lorem ipsum dolor sit ...
onceuponatimeforever/oh-mainline
refs/heads/master
vendor/packages/docutils/docutils/writers/manpage.py
113
# -*- coding: utf-8 -*- # $Id: manpage.py 7628 2013-03-09 10:19:35Z grubert $ # Author: Engelbert Gruber <grubert@users.sourceforge.net> # Copyright: This module is put into the public domain. """ Simple man page writer for reStructuredText. Man pages (short for "manual pages") contain system documentation on unix-li...
web30s/odoo-9.0c-20160402
refs/heads/master
hello/templates/openerp/addons/website_event/__init__.py
1023
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import controllers import models
lenovor/scikit-learn
refs/heads/master
sklearn/feature_extraction/dict_vectorizer.py
234
# Authors: Lars Buitinck # Dan Blanchard <dblanchard@ets.org> # License: BSD 3 clause from array import array from collections import Mapping from operator import itemgetter import numpy as np import scipy.sparse as sp from ..base import BaseEstimator, TransformerMixin from ..externals import six from ..ext...
xwolf12/django
refs/heads/master
tests/mutually_referential/models.py
414
""" Mutually referential many-to-one relationships Strings can be used instead of model literals to set up "lazy" relations. """ from django.db import models class Parent(models.Model): name = models.CharField(max_length=100) # Use a simple string for forward declarations. bestchild = models.ForeignKey...
burito/PyUI
refs/heads/master
tests/spread.py
1
import testopt import time import pyui def onChanged(x, y, value): print "Cell (%d,%d) Set to <%s>" % ( x, y, value) def onInserted(x, y, value): print "Cell inserted (%d,%d) Set to <%s>" % ( x, y, value) def run(): opts = testopt.parseCommandLine(800, 600) done = 1 frame = 0 t = time.tim...
adrienbrault/home-assistant
refs/heads/dev
tests/components/cloudflare/conftest.py
8
"""Define fixtures available for all tests.""" from unittest.mock import patch from pytest import fixture from . import _get_mock_cfupdate @fixture def cfupdate(hass): """Mock the CloudflareUpdater for easier testing.""" mock_cfupdate = _get_mock_cfupdate() with patch( "homeassistant.components....
destroy/SleekXMPP-gevent
refs/heads/master
tests/test_tostring.py
1
from sleekxmpp.test import * from sleekxmpp.stanza import Message from sleekxmpp.xmlstream.stanzabase import ET, ElementBase from sleekxmpp.xmlstream.tostring import tostring, xml_escape class TestToString(SleekTest): """ Test the implementation of sleekxmpp.xmlstream.tostring """ def tearDown(self)...
julianrees/scripts
refs/heads/master
python/geomenergymap.py
1
#!/usr/bin/env python """ -------------------------------------------------------------------------------- (c) 2017 Julian Rees License: GNU GPLv3 Description: Plot the energy trajectory of a geometry optimization in ORCA. Run: python geomenergymap.py filename Arguments: filename - file name with extension Depende...
unnikrishnankgs/va
refs/heads/master
venv/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/linear.py
33
# 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...
google-research/long-range-arena
refs/heads/main
lra_benchmarks/listops/configs/reformer_base.py
1
# Copyright 2021 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 # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, sof...
giserh/pysparkling
refs/heads/master
pysparkling/broadcast.py
1
class Broadcast(object): def __init__(self, value): self.value = value
sagemathinc/smc
refs/heads/master
src/scripts/kvm_addresses.py
4
#!/usr/bin/env python ############################################################################### # # CoCalc: Collaborative Calculation in the Cloud # # Copyright (C) 2016, Sagemath Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...