repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
kotfic/girder
refs/heads/master
plugins/ldap/girder_ldap/constants.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
dpgeorge/micropython
refs/heads/master
ports/esp32/makeimg.py
5
# Combine bootloader, partition table and application into a final binary. import os, sys sys.path.append(os.getenv("IDF_PATH") + "/components/partition_table") import gen_esp32part OFFSET_BOOTLOADER = 0x1000 OFFSET_PARTITIONS = 0x8000 def load_partition_table(filename): with open(filename, "rb") as f: ...
tchellomello/home-assistant
refs/heads/dev
tests/components/smart_meter_texas/test_config_flow.py
2
"""Test the Smart Meter Texas config flow.""" import asyncio from aiohttp import ClientError import pytest from smart_meter_texas.exceptions import ( SmartMeterTexasAPIError, SmartMeterTexasAuthError, ) from homeassistant import config_entries, setup from homeassistant.components.smart_meter_texas.const impor...
heran7/edx-platform
refs/heads/master
lms/djangoapps/courseware/features/openended.py
28
#pylint: disable=C0111 #pylint: disable=W0621 from lettuce import world, step from lettuce.django import django_url from nose.tools import assert_equals, assert_in # pylint: disable=E0611 from logging import getLogger logger = getLogger(__name__) @step('I navigate to an openended question$') def navigate_to_an_open...
grantsewell/nzbToMedia
refs/heads/master
libs/guessit/test/__init__.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
FCP-INDI/nipype
refs/heads/master
nipype/interfaces/semtools/filtering/tests/test_auto_GradientAnisotropicDiffusionImageFilter.py
12
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from .....testing import assert_equal from ..featuredetection import GradientAnisotropicDiffusionImageFilter def test_GradientAnisotropicDiffusionImageFilter_inputs(): input_map = dict(args=dict(argstr='%s', ), conductance=dict(argstr='--conductance %f...
JioCloud/neutron
refs/heads/master
neutron/db/migration/alembic_migrations/versions/27cc183af192_ml2_vnic_type.py
15
# Copyright 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
RetailMeNot/acky
refs/heads/master
acky/ec2.py
1
from acky.api import ( AwsCollection, AwsApiClient, make_filters, ) from itertools import chain class EC2ApiClient(AwsApiClient): service_name = "ec2" class EC2(EC2ApiClient): def regions(self, continent='us', include_gov=False): # returns (string, ...) # DescribeRegions ...
swiftstack/swift
refs/heads/master
swift/__init__.py
3
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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...
mitdbg/mdindex
refs/heads/master
scripts/fabfile/utils.py
2
from fabric.api import * from fabric.contrib.files import exists import fabric counter = 0 @roles('master') def start_spark(): run('/home/mdindex/scripts/startSystems.sh') @roles('master') def stop_spark(): run('/home/mdindex/scripts/stopSystems.sh') @roles('master') def start_zookeeper(): run('/home/md...
espadrine/opera
refs/heads/master
chromium/src/third_party/python_26/Lib/test/test_distutils.py
90
"""Tests for distutils. The tests for distutils are defined in the distutils.tests package; the test_suite() function there returns a test suite that's ready to be run. """ import distutils.tests import test.test_support def test_main(): test.test_support.run_unittest(distutils.tests.test_suite()) if __name__...
daeilkim/refinery
refs/heads/master
refinery/bnpy/bnpy-dev/bnpy/learnalg/BirthMoveTopicModel.py
1
import numpy as np import logging Log = logging.getLogger('bnpy') Log.setLevel(logging.DEBUG) import KMeansRex from BirthMove import BirthProposalError def create_expanded_suff_stats(Data, curModel, allSS, **kwargs): ''' Create new suff stats that have useful new topics Returns -------- ex...
ComputerNetworks-UFRGS/Aurora
refs/heads/master
cloud/views/pages.py
1
import logging from django.template.context import RequestContext from django.shortcuts import render_to_response, redirect from cloud.helpers import session_flash # @UnresolvedImport from django.http import HttpResponse from django.contrib.auth.decorators import login_required logger = logging.getLogger(__name__) v...
hrayatnia/SciPy
refs/heads/master
plotting-beginner-plotting-cookbook/plt2d3d.py
1
import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt x = np.linspace(-3, 3, 256) y = np.linspace(-3, 3, 256) X, Y = np.meshgrid(x, y) Z = np.exp(-(X ** 2 + Y ** 2)) u = np.exp(-(x ** 2)) fig = plt.figure() ax = fig.gca(projection = '3d') ax.set_zlim3d(0, 3) ax.plot(x, u, zs=3, zdir...
devnulltao/Xnt
refs/heads/master
xnt/tests/maketests.py
2
#!/usr/bin/env python """Make (make/ant/nant) Tests Module""" # Xnt -- A Wrapper Build Tool # Copyright (C) 2013 Kenny Ballou # 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 ...
2014c2g19/2014c2g19
refs/heads/master
wsgi/static/Brython2.1.0-20140419-113919/Lib/browser/ajax.py
735
from _ajax import *
rudhir-upretee/Sumo17_With_Netsim
refs/heads/master
tools/traci/multientryexit.py
3
# -*- coding: utf-8 -*- """ @file multientryexit.py @author Michael Behrisch @date 2011-03-16 @version $Id: multientryexit.py 12906 2012-10-30 11:02:27Z behrisch $ Python implementation of the TraCI interface. SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ Copyright (C) 2011 DLR (http://w...
JohnDenker/brython
refs/heads/master
www/src/Lib/this.py
948
s = """Gur Mra bs Clguba, ol Gvz Crgref Ornhgvshy vf orggre guna htyl. Rkcyvpvg vf orggre guna vzcyvpvg. Fvzcyr vf orggre guna pbzcyrk. Pbzcyrk vf orggre guna pbzcyvpngrq. Syng vf orggre guna arfgrq. Fcnefr vf orggre guna qrafr. Ernqnovyvgl pbhagf. Fcrpvny pnfrf nera'g fcrpvny rabhtu gb oernx gur ehyrf. Nygubhtu cenpg...
johnwallace123/dx-toolkit
refs/heads/master
src/python/dxpy/scripts/dx_spans_to_bed.py
2
#!/usr/bin/env python # # Copyright (C) 2013-2016 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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 a...
j-carl/boto
refs/heads/develop
tests/unit/manage/test_ssh.py
114
#!/usr/bin/env python # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without ...
wskplho/sl4a
refs/heads/master
python/src/Lib/lib2to3/fixes/fix_ws_comma.py
53
"""Fixer that changes 'a ,b' into 'a, b'. This also changes '{a :b}' into '{a: b}', but does not touch other uses of colons. It does not touch other uses of whitespace. """ from .. import pytree from ..pgen2 import token from .. import fixer_base class FixWsComma(fixer_base.BaseFix): explicit = True # The use...
chrislit/abydos
refs/heads/master
abydos/distance/_forbes_ii.py
1
# Copyright 2018-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
qedi-r/home-assistant
refs/heads/dev
tests/auth/providers/test_legacy_api_password.py
28
"""Tests for the legacy_api_password auth provider.""" import pytest from homeassistant import auth, data_entry_flow from homeassistant.auth import auth_store from homeassistant.auth.providers import legacy_api_password @pytest.fixture def store(hass): """Mock store.""" return auth_store.AuthStore(hass) @p...
antgonza/qiita
refs/heads/master
qiita_db/support_files/patches/python_patches/71.py
3
from qiita_db.sql_connection import TRN with TRN: sql = """SELECT DISTINCT table_name FROM information_schema.columns WHERE table_name LIKE '%_bk'""" TRN.add(sql) tables = ['qiita.%s' % t for t in TRN.execute_fetchflatten()] chunk_size = 200 for i in range(0, len(tables), chunk_s...
felliott/waterbutler
refs/heads/develop
waterbutler/server/api/v0/move.py
6
import time from waterbutler import tasks from waterbutler.server.api.v0 import core from waterbutler.core import remote_logging class MoveHandler(core.BaseCrossProviderHandler): JSON_REQUIRED = True ACTION_MAP = { 'POST': 'move' } async def post(self): if not self.source_provider.ca...
dgoedkoop/QGIS
refs/heads/master
python/plugins/db_manager/__init__.py
95
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
acsone/stock-logistics-warehouse
refs/heads/8.0
stock_location_area_management/models/__init__.py
14
# -*- coding: utf-8 -*- from . import ( res_company, stock_location, )
praekelt/vumi-go
refs/heads/develop
go/contacts/parsers/test_parsers.py
1
from os import path from go.vumitools.tests.helpers import djangotest_imports parser_classes = ['CSVFileParser', 'XLSFileParser'] with djangotest_imports(globals(), dummy_classes=parser_classes): from django.conf import settings from django.core.files.storage import default_storage from django.core.files....
fholiveira/tlpconfig
refs/heads/master
tlp/models/parameters/boolean.py
1
from . import Parameter class BooleanParameter(Parameter): def __init__(self, name, yes='1', no='0', reboot_needed=False): Parameter.__init__(self, name, reboot_needed=reboot_needed) self.yes = yes self.no = no self._value = no @property def value(self): return sel...
tximikel/kuma
refs/heads/master
vendor/packages/pygments/lexers/c_like.py
72
# -*- coding: utf-8 -*- """ pygments.lexers.c_like ~~~~~~~~~~~~~~~~~~~~~~ Lexers for other C-like languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, bygroups, inherit,...
opennode/nodeconductor-assembly-waldur
refs/heads/develop
src/waldur_aws/views.py
1
from django.utils.translation import gettext_lazy as _ from rest_framework import decorators, response from rest_framework import serializers as rf_serializers from rest_framework import status, viewsets from waldur_core.core import exceptions as core_exceptions from waldur_core.core import validators as core_validato...
indro/t2c
refs/heads/master
apps/local_apps/analytics/templatetags/analytics.py
6
from django import template from django.conf import settings register = template.Library() def urchin(): urchin_id = getattr(settings, 'URCHIN_ID', None) if urchin_id: return """ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script> <script type="text/javascr...
manazhao/tf_recsys
refs/heads/r1.0
tensorflow/python/kernel_tests/edit_distance_op_test.py
139
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/opencv/sources/samples/python2/fitline.py
5
#!/usr/bin/env python ''' Robust line fitting. ================== Example of using cv2.fitLine function for fitting line to points in presence of outliers. Usage ----- fitline.py Switch through different M-estimator functions and see, how well the robust functions fit the line even in case of ~50% of outliers. Key...
hunch/hunch-gift-app
refs/heads/master
django/contrib/admindocs/tests/__init__.py
12
from django.contrib.admindocs import views from django.db.models import fields as builtin_fields from django.utils import unittest import fields class TestFieldType(unittest.TestCase): def setUp(self): pass def test_field_name(self): self.assertRaises(AttributeError, ...
himmih/cluedo
refs/heads/master
venv/lib/python2.7/site-packages/pip/vendor/distlib/markers.py
80
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # """Parser for the environment markers micro-language defined in PEP 345.""" import ast import os import sys import platform from .compa...
teeple/pns_server
refs/heads/master
work/install/Python-2.7.4/Mac/Modules/list/listscan.py
34
# Scan an Apple header file, generating a Python file of generator calls. import sys from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner LONG = "Lists" SHORT = "list" OBJECT = "ListHandle" def main(): input = LONG + ".h" output = SHORT + "gen.py" defsoutpu...
tedsunnyday/SE-Server
refs/heads/master
server/lib/flask_security/forms.py
3
# -*- coding: utf-8 -*- """ flask.ext.security.forms ~~~~~~~~~~~~~~~~~~~~~~~~ Flask-Security forms module :copyright: (c) 2012 by Matt Wright. :license: MIT, see LICENSE for more details. """ import inspect try: from urlparse import urlsplit except ImportError: from urllib.parse import ur...
loveshell/volatility
refs/heads/master
volatility/plugins/overlays/windows/win8_sp1_x86_syscalls.py
13
syscalls = [ [ 'NtWorkerFactoryWorkerReady', # 0x0 'NtAcceptConnectPort', # 0x1 'NtYieldExecution', # 0x2 'NtWriteVirtualMemory', # 0x3 'NtWriteRequestData', # 0x4 'NtWriteFileGather', # 0x5 'NtWriteFile', # 0x6 'NtWaitLowEventPair', # 0x7 'NtWaitHighEventPair', # 0x8 'NtWait...
vmahuli/tempest
refs/heads/master
tempest/scenario/test_network_basic_ops.py
2
# Copyright 2012 OpenStack Foundation # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # ht...
markrages/py_test_interface
refs/heads/master
rsmeter.py
1
#!/usr/bin/python import serial, time modes=['DC V','AC V','DC uA','DC mA','DC A', 'AC uA','AC mA','AC A','OHM','CAP', 'Hz','Net Hz','Amp Hz','Duty','Net Duty', 'Amp Duty','Width','Net Width','Amp Width','Diode', 'Continuity','hFE','Logic','dBm','EF','Temperature'] segs={ 0x00: ' ', ...
lbouma/Cyclopath
refs/heads/release
pyserver/bin/rpy2/robjects/tests/testFormula.py
1
import unittest import rpy2.robjects as robjects rinterface = robjects.rinterface class FormulaTestCase(unittest.TestCase): def testNew(self): fml = robjects.Formula("y ~ x") self.assertEquals("formula", fml.rclass[0]) def testGetenvironment(self): fml = robjects.Formula("y ~ ...
haojunyu/numpy
refs/heads/master
benchmarks/benchmarks/__init__.py
90
from __future__ import absolute_import, division, print_function from . import common
timsnyder/bokeh
refs/heads/master
sphinx/source/docs/user_guide/examples/layout_grid.py
13
from bokeh.io import output_file, show from bokeh.layouts import gridplot from bokeh.palettes import Viridis3 from bokeh.plotting import figure output_file("layout_grid.html") x = list(range(11)) y0 = x y1 = [10 - i for i in x] y2 = [abs(i - 5) for i in x] # create three plots p1 = figure(plot_width=250, plot_height...
siosio/intellij-community
refs/heads/master
python/testData/refactoring/inlinelocal/py5832.before.py
83
def foo(arg): print arg vals = 'a', 'b' foo(v<caret>als)
genodeftest/exaile
refs/heads/master
plugins/amazoncovers/__init__.py
2
# Copyright (C) 2006 Adam Olsen # # 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 1, or (at your option) # any later version. # # This program is distributed in the hope that it w...
acabey/acabey.github.io
refs/heads/master
projects/demos/engineering.purdue.edu/scriptingwithobjects/swocode/chap10/ExceptionTypeError.py
1
#!/usr/bin/python # ExceptionTypeError.py try: #(A) # raise TypeError( "a TypeError instance thrown", "context code: 1" ) raise TypeError( "a TypeError instance thrown" ) #(B) # raise TypeError, "a TypeError instance thrown" ...
otsdc/SMS-Voice-PythonSDK
refs/heads/master
otsdc/rest/resources/verify.py
2
import requests from otsdc.url.url_creator import VerifyUrl from otsdc.rest.resources import resources_properties from otsdc.rest.model.response_model import ResponseStatus,GetCodeResponse class VerifyResource: __appSid = '' __verifyUrl = None payload = None def __init__(self, appSid = None, verif...
magicwang-cn/kubernetes
refs/heads/master
cluster/juju/charms/trusty/kubernetes/hooks/lib/registrator.py
96
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
Shapeways/coyote_framework
refs/heads/master
coyote_framework/webdriver/webdriverwrapper/exceptions/WebDriverJavascriptException.py
1
""" WebDriverJavascriptException module """ __author__ = 'justin' from selenium.common.exceptions import WebDriverException class WebDriverJavascriptException(WebDriverException): """ Exception for javascript executions """ def __init__(self, driver_wrapper, msg): try: if not isins...
frishberg/django
refs/heads/master
tests/timezones/forms.py
581
from django import forms from .models import Event class EventForm(forms.Form): dt = forms.DateTimeField() class EventSplitForm(forms.Form): dt = forms.SplitDateTimeField() class EventLocalizedForm(forms.Form): dt = forms.DateTimeField(localize=True) class EventModelForm(forms.ModelForm): class...
Lingling7/flower
refs/heads/master
flower/__main__.py
17
from __future__ import absolute_import from __future__ import print_function from flower.command import FlowerCommand from flower.utils import bugreport def main(): try: flower = FlowerCommand() flower.execute_from_commandline() except: import sys print(bugreport(app=flower.ap...
RevansChen/online-judge
refs/heads/master
LeetCode/Easy/7_reverse-integer/Python/solution1.py
1
class Solution(object): def reverse(self, x): MIN_INT32_VALUE = -(2 ** 31) MAX_INT32_VALUE = 2 ** 31 - 1 # 去除符號 x, sign = abs(x), x < 0 # 數字顛倒 revx = 0 while x: x, revx = x // 10, revx * 10 + x % 10 # 將符號補上 ...
dreardon/crits
refs/heads/master
crits/core/user.py
4
#------------- # Some sections of the code below have been copied from # MongoEngine. # # https://github.com/MongoEngine/mongoengine # # Copyright (c) 2009 See AUTHORS # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"...
homme/ansible
refs/heads/devel
contrib/inventory/landscape.py
405
#!/usr/bin/env python # (c) 2015, Marc Abramowitz <marca@surveymonkey.com> # # This file is part of Ansible. # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (...
apaleyes/mxnet
refs/heads/master
example/fcn-xs/init_fcnxs.py
14
# pylint: skip-file import mxnet as mx import numpy as np import sys import logging logger = logging.getLogger() logger.setLevel(logging.INFO) # make a bilinear interpolation kernel, return a numpy.ndarray def upsample_filt(size): factor = (size + 1) // 2 if size % 2 == 1: center = factor...
seanaedmiston/gensim
refs/heads/develop
gensim/test/test_parsing.py
84
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Automated tests for the parsing module. """ import logging import unittest import numpy as np from gensim.parsing.preprocessing import * # several documents doc1 = """C'est un trou de verdure où chante une rivière, Accrochant follement aux herbes des haillons D'arg...
MortimerGoro/servo
refs/heads/master
tests/wpt/css-tests/tools/pytest/_pytest/assertion/util.py
175
"""Utilities for assertion debugging""" import pprint import _pytest._code import py try: from collections import Sequence except ImportError: Sequence = list BuiltinAssertionError = py.builtin.builtins.AssertionError u = py.builtin._totext # The _reprcompare attribute on the util module is used by the new a...
plamut/ggrc-core
refs/heads/develop
src/docbuilder/__main__.py
7
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Main documentation builder script. Use the following command to get usage message:: $ python -m docbuilder --help """ import os import shutil from argparse import ArgumentParser from sphinx.appl...
jrleeman/MetPy
refs/heads/master
metpy/io/cdm.py
1
# Copyright (c) 2015,2016 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause r"""Tools for mimicing the API of the Common Data Model (CDM). The CDM is a data model for representing a wide array of data. The goal is to be a simple, universal interface to...
kaarl/pyload
refs/heads/stable
module/lib/simplejson/decoder.py
142
"""Implementation of JSONDecoder """ import re import sys import struct from simplejson.scanner import make_scanner def _import_c_scanstring(): try: from simplejson._speedups import scanstring return scanstring except ImportError: return None c_scanstring = _import_c_scanstring() __all...
hlin117/scikit-learn
refs/heads/master
examples/linear_model/plot_multi_task_lasso_support.py
102
#!/usr/bin/env python """ ============================================= Joint feature selection with multi-task Lasso ============================================= The multi-task lasso allows to fit multiple regression problems jointly enforcing the selected features to be the same across tasks. This example simulates...
jmiserez/sts
refs/heads/hb
tests/integration/sts/replayer_integration_test.py
2
#!/usr/bin/env python # # Copyright 2011-2013 Colin Scott # # 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...
gkc1000/pyscf
refs/heads/master
pyscf/nao/tddft_iter_x_zip.py
1
from __future__ import print_function, division from numpy import array, argmax from pyscf.nao import tddft_iter class tddft_iter_x_zip(tddft_iter): """ Iterative TDDFT with a high-energy part of the KS eigenvectors compressed """ def __init__(self, **kw): from pyscf.nao.m_fermi_dirac import fermi_dirac_occu...
a33g-dev/android_kernel_samsung_a33g
refs/heads/cm-12.1
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
graphite/TeX4Web-INVENIO
refs/heads/master
modules/webjournal/lib/elements/bfe_webjournal_articles.py
10
# -*- coding: utf-8 -*- ## $Id: bfe_webjournal_MainArticleOverview.py,v 1.28 2009/02/12 10:00:57 jerome Exp $ ## ## This file is part of Invenio. ## Copyright (C) 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 ## pu...
astaninger/speakout
refs/heads/master
venv/lib/python3.6/site-packages/engineio/socket.py
2
import six import sys import time from . import exceptions from . import packet from . import payload class Socket(object): """An Engine.IO socket.""" upgrade_protocols = ['websocket'] def __init__(self, server, sid): self.server = server self.sid = sid self.queue = self.create_q...
BartoszCichecki/onlinepython
refs/heads/master
onlinepython/pypy-2.4.0-win32/lib-python/2.7/xml/etree/ElementPath.py
273
# # ElementTree # $Id: ElementPath.py 3375 2008-02-13 08:05:08Z fredrik $ # # limited xpath support for element trees # # history: # 2003-05-23 fl created # 2003-05-28 fl added support for // etc # 2003-08-27 fl fixed parsing of periods in element names # 2007-09-10 fl new selection engine # 2007-09-12 fl fix...
nikitasingh981/scikit-learn
refs/heads/master
examples/bicluster/plot_spectral_biclustering.py
403
""" ============================================= A demo of the Spectral Biclustering algorithm ============================================= This example demonstrates how to generate a checkerboard dataset and bicluster it using the Spectral Biclustering algorithm. The data is generated with the ``make_checkerboard`...
tvotyakov/codeeval
refs/heads/master
moderate/cash-register/code.py
1
#!python3 from decimal import * bills_coins = (('ONE HUNDRED', Decimal('100.00')), ('FIFTY', Decimal('50.00')), ('TWENTY', Decimal('20.00')), ('TEN', Decimal('10.00')), ('FIVE', Decimal('5.00')), ('TWO', Decimal('2.00')), ...
russelmahmud/mess-account
refs/heads/master
djangoappengine/mail.py
50
from email.MIMEBase import MIMEBase from django.core.mail.backends.base import BaseEmailBackend from django.core.mail import EmailMultiAlternatives from django.core.exceptions import ImproperlyConfigured from google.appengine.api import mail as aeemail from google.appengine.runtime import apiproxy_errors def _send_def...
shuggiefisher/crowdstock
refs/heads/master
django/conf/app_template/models.py
10644
from django.db import models # Create your models here.
timlinux/QGIS
refs/heads/master
src/plugins/grass/scripts/db.connect-login.pg.py
45
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ *************************************************************************** db.connect-login.pg.py - Connect to PostgreSQL --------------------- Date : July 2009 Copyright : (C) 2009 by Radim Blazek Email :...
SystemsBioinformatics/stochpy
refs/heads/master
stochpy/implementations/TauLeaping.py
1
#! /usr/bin/env python """ Optimized Tau-Leaping ===================== This program performs Optimized Explicit Tau-leaping algorithm, which is an approximate version of the exact Stochastic Simulation Algorithm (SSA). Here, an efficient step size selection procedure for the tau-leaping method [1] is used. [1] Cao. Y,...
nextgis-extra/tests
refs/heads/master
lib_gdal/gcore/gcps2geotransform.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id: misc.py 26369 2013-08-25 19:48:28Z goatbar $ # # Project: GDAL/OGR Test Suite # Purpose: Test the GDALGCPsToGeoTransform() method. # Author: Frank Warmerdam <warmerdam@pobox.com> # ##...
Endika/sale-workflow
refs/heads/8.0
partner_prospect/tests/__init__.py
14
# -*- coding: utf-8 -*- # (c) 2015 Esther Martin - AvanzOSC # (c) 2015 Oihane Crucelaegui - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from . import test_partner_prospect
stshine/servo
refs/heads/master
components/script/dom/bindings/codegen/ply/ply/__init__.py
838
# PLY package # Author: David Beazley (dave@dabeaz.com) __all__ = ['lex','yacc']
pedrobaeza/odoo
refs/heads/master
addons/web_view_editor/__init__.py
14224
# -*- coding: utf-8 -*-
Grk0/python-libconf
refs/heads/master
test/test_e2e.py
1
import os import io import textwrap import pytest import libconf CURDIR = os.path.abspath(os.path.dirname(__file__)) # Tests for load() and loads() ############################## def test_loads_maintains_dict_order(): config = libconf.loads(u'''l: 1; i: 5; b: 3; c: 1; o: 9; n: 0; f: 7;''') assert ''.join(...
GdZ/scriptfile
refs/heads/master
software/googleAppEngine/google/appengine/_internal/django/utils/text.py
23
import re from google.appengine._internal.django.utils.encoding import force_unicode from google.appengine._internal.django.utils.functional import allow_lazy from google.appengine._internal.django.utils.translation import ugettext_lazy from htmlentitydefs import name2codepoint # Capitalizes the first letter of a stri...
fabioz/Pydev
refs/heads/master
plugins/org.python.pydev.jython/Lib/xdrlib.py
197
"""Implements (a subset of) Sun XDR -- eXternal Data Representation. See: RFC 1014 """ import struct try: from cStringIO import StringIO as _StringIO except ImportError: from StringIO import StringIO as _StringIO __all__ = ["Error", "Packer", "Unpacker", "ConversionError"] # exceptions class Error(Exceptio...
eeshangarg/oh-mainline
refs/heads/master
vendor/packages/gdata/samples/authsub/secure_authsub.py
128
#!/usr/bin/python # # Copyright 2008 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
zdary/intellij-community
refs/heads/master
python/testData/refactoring/rename/renameImportModuleAs/before/foo.py
336
def f(): pass
ftl-toolbox/lib_openshift
refs/heads/master
lib_openshift/models/v1beta1_job_spec.py
2
# coding: utf-8 """ OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git 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 ...
4doemaster/enigma2
refs/heads/master
lib/python/Plugins/Extensions/MediaPlayer/settings.py
2
from Screens.Screen import Screen from Screens.HelpMenu import HelpableScreen from Components.FileList import FileList from Components.Sources.StaticText import StaticText from Components.MediaPlayer import PlayList from Components.config import config, getConfigListEntry, ConfigSubsection, configfile, ConfigText, Conf...
DeltaEpsilon-HackFMI2/FMICalendar-REST
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/gis/tests/inspectapp/models.py
312
from django.contrib.gis.db import models class AllOGRFields(models.Model): f_decimal = models.FloatField() f_float = models.FloatField() f_int = models.IntegerField() f_char = models.CharField(max_length=10) f_date = models.DateField() f_datetime = models.DateTimeField() f_time = models.Tim...
fabric8-analytics/fabric8-analytics-jobs
refs/heads/master
f8a_jobs/handlers/error.py
1
#!/usr/bin/env python3 """Handler for storing information about failed jobs.""" from f8a_jobs.handlers.base import BaseHandler class ErrorHandler(BaseHandler): """Handler for storing information about failed jobs.""" def execute(self, _exc_str, _exc_traceback, _failed_job_handler, **_failed_handler_kwargs)...
ramitalat/odoo
refs/heads/8.0
openerp/report/report_sxw.py
91
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
whitehorse-io/encarnia
refs/heads/master
pyenv/lib/python2.7/site-packages/django/contrib/flatpages/__init__.py
808
default_app_config = 'django.contrib.flatpages.apps.FlatPagesConfig'
lindemann09/pytrak
refs/heads/master
pytrak/plotter.py
1
__version__ = "0.1" import threading import numpy as np import pygame from expyriment.stimuli import Canvas from expyriment.stimuli._visual import Visual lock_expyriment = threading.Lock() Numpy_array_type = type(np.array([])) def inherit_docs(cls): for name, func in vars(cls).items(): if not func.__doc...
vvv1559/intellij-community
refs/heads/master
python/lib/Lib/encodings/aliases.py
116
""" Encoding Aliases Support This module is used by the encodings package search function to map encodings names to module names. Note that the search function normalizes the encoding names before doing the lookup, so the mapping will have to map normalized encoding names to module names. Con...
vladryk/horizon
refs/heads/master
openstack_dashboard/dashboards/project/instances/forms.py
41
# 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
panagiks/reverse_shell
refs/heads/master
Server/rspet_server_api.py
2
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- """RSPET Server's RESTful API.""" import argparse from flask_cors import CORS, cross_origin from flask import Flask, jsonify, abort, make_response, request, url_for, redirect import rspet_server __author__ = "Kolokotronis Panagiotis" __copyright__ = "Copyright 2016, Kolok...
ChenglongChen/Kaggle_HomeDepot
refs/heads/master
Code/Chenglong/google_spelling_checker_dict.py
1
# -*- coding: utf-8 -*- """ @author: Chenglong Chen <c.chenglong@gmail.com> @brief: google spelling checker for search_term @ref: https://www.kaggle.com/steubk/home-depot-product-search-relevance/fixing-typos """ spelling_checker_dict = { 'steele stake': 'steel stake', 'gas mowe': 'gas mower', 'metal plate cover gcfi...
FHannes/intellij-community
refs/heads/master
python/testData/breadcrumbs/singleLineDictLiteralCaretAfterSecondKeyValueExpression.py
30
dct = {"a": 1, "b": 2<caret>}
jmachuca77/ardupilot
refs/heads/master
Tools/LogAnalyzer/tests/TestPitchRollCoupling.py
21
from LogAnalyzer import Test,TestResult import DataflashLog from VehicleType import VehicleType import collections class TestPitchRollCoupling(Test): '''test for divergence between input and output pitch/roll, i.e. mechanical failure or bad PID tuning''' # TODO: currently we're only checking for roll/pitch o...
mrquim/repository.mrquim
refs/heads/master
repo/plugin.program.super.favourites/chooser.py
7
# Copyright (C) 2013- # Sean Poyser (seanpoyser@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, or (at your option) # any later version. # # This...
mrquim/mrquimrepo
refs/heads/master
repo/plugin.video.mrpiracy/resources/lib/js2py/constructors/jsdate.py
64
from ..base import * from .time_helpers import * TZ_OFFSET = (time.altzone//3600) ABS_OFFSET = abs(TZ_OFFSET) TZ_NAME = time.tzname[1] ISO_FORMAT = '%s-%s-%sT%s:%s:%s.%sZ' @Js def Date(year, month, date, hours, minutes, seconds, ms): return now().to_string() Date.Class = 'Date' def now(): return PyJsDate(int...
cntnboys/410Lab6
refs/heads/master
v1/lib/python2.7/site-packages/django/db/backends/oracle/base.py
49
""" Oracle database backend for Django. Requires cx_Oracle: http://cx-oracle.sourceforge.net/ """ from __future__ import unicode_literals import datetime import decimal import re import platform import sys import warnings def _setup_environment(environ): # Cygwin requires some special voodoo to set the environm...
nolanliou/tensorflow
refs/heads/master
tensorflow/python/platform/stacktrace_handler_test.py
68
# Copyright 2018 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...