repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
laiqiqi886/kbengine | refs/heads/master | kbe/src/lib/python/Lib/tkinter/colorchooser.py | 128 | # tk common colour chooser dialogue
#
# this module provides an interface to the native color dialogue
# available in Tk 4.2 and newer.
#
# written by Fredrik Lundh, May 1997
#
# fixed initialcolor handling in August 1998
#
#
# options (all have default values):
#
# - initialcolor: colour to mark as selected when dial... |
fpytloun/waliki | refs/heads/master | waliki/views.py | 1 | import json
from django.http import HttpResponse, Http404, HttpResponseRedirect, HttpResponsePermanentRedirect
from django.shortcuts import render, redirect, get_object_or_404
from django.template import RequestContext
from django.template.loader import render_to_string
from django.utils.translation import ugettext_laz... |
south-coast-science/scs_core | refs/heads/develop | src/scs_core/osio/client/__init__.py | 12133432 | |
akokai/chemex | refs/heads/master | chemex/tests/__init__.py | 12133432 | |
JianyuWang/neutron | refs/heads/master | neutron/cmd/__init__.py | 12133432 | |
fabeschan/midiutil | refs/heads/master | build/lib/midiutil/MidiFile3.py | 2 | #-----------------------------------------------------------------------------
# Name: MidiFile.py
# Purpose: MIDI file manipulation utilities
#
# Author: Mark Conway Wirt <emergentmusics) at (gmail . com>
#
# Created: 2008/04/17
# Copyright: (c) 2009 Mark Conway Wirt
# License: Please see Lic... |
bmac/evilsheep | refs/heads/master | registration/backends/default/__init__.py | 71 | from django.conf import settings
from django.contrib.sites.models import RequestSite
from django.contrib.sites.models import Site
from registration import signals
from registration.forms import RegistrationForm
from registration.models import RegistrationProfile
class DefaultBackend(object):
"""
A registrati... |
esthermm/odoo-addons | refs/heads/8.0 | procurement_service_project/models/procurement_order.py | 1 | # -*- coding: utf-8 -*-
# (c) 2016 Alfredo de la Fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields, api
class ProcurementOrder(models.Model):
_inherit = 'procurement.order'
service_project_task = fields.Many2one(
comodel_name='projec... |
TunedMystic/monq-app | refs/heads/master | nil/views.py | 1 | from django.shortcuts import render
def error404(request):
"""
Render 404 Not Found page.
"""
return render(request, "nil/http404.html")
def error500(request):
"""
Render 500 Internal Server Error page.
"""
return render(request, "nil/http500.html")
|
Emercoin/emercoin | refs/heads/master | qa/rpc-tests/bip68-sequence.py | 101 | #!/usr/bin/env python3
# Copyright (c) 2014-2016 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 BIP68 implementation
#
from test_framework.test_framework import BitcoinTestFramework
from test... |
teamfx/openjfx-10-dev-rt | refs/heads/master | modules/javafx.web/src/main/native/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py | 2 | # Copyright (c) 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... |
gatgui/lwc | refs/heads/master | src/modules/objlist.py | 1 | # Copyright (C) 2009, 2010 Gaetan Guidet
#
# This file is part of lwc.
#
# lwc 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 2.1 of the License, or (at
# your option) any later version... |
osrf/osrf_pycommon | refs/heads/master | tests/unit/test_process_utils/impl_aep_asyncio.py | 2 | from osrf_pycommon.process_utils import asyncio
from osrf_pycommon.process_utils.async_execute_process import async_execute_process
from osrf_pycommon.process_utils import get_loop
from .impl_aep_protocol import create_protocol
loop = get_loop()
@asyncio.coroutine
def run(cmd, **kwargs):
transport, protocol = y... |
spthaolt/VTK | refs/heads/5.10.1_vs2013 | Utilities/vtkTclTest2Py/info.py | 10 | """Selective implementation of tcl info command.
This script is used while running python tests translated from Tcl."""
import re
def command (caller_globals, caller_locals, pattern):
return commands(caller_globals, caller_locals, pattern)
def commands (caller_globals, caller_locals, pattern):
print "pattern... |
pbrady/sympy | refs/heads/master | sympy/core/tests/test_subs.py | 24 | from __future__ import division
from sympy import (Symbol, Wild, sin, cos, exp, sqrt, pi, Function, Derivative,
abc, Integer, Eq, symbols, Add, I, Float, log, Rational, Lambda, atan2,
cse, cot, tan, S, Tuple, Basic, Dict, Piecewise, oo, Mul,
factor, nsimplify, zoo, Subs)
from sympy.core.basic im... |
peletiah/nal_to_gpx | refs/heads/master | geopy/geocoders/__init__.py | 14 | from geopy.geocoders.bing import Bing
from geopy.geocoders.google import Google
from geopy.geocoders.googlev3 import GoogleV3
from geopy.geocoders.dot_us import GeocoderDotUS
from geopy.geocoders.geonames import GeoNames
from geopy.geocoders.wiki_gis import MediaWiki
from geopy.geocoders.wiki_semantic import SemanticMe... |
zpzgone/paramiko | refs/heads/master | paramiko/pkey.py | 33 | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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 2.1 of the License, or (a... |
orgito/ansible | refs/heads/devel | lib/ansible/modules/network/nxos/nxos_udld.py | 34 | #!/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 distribut... |
diorcety/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/contrib/gis/geos/factory.py | 400 | from django.contrib.gis.geos.geometry import GEOSGeometry, wkt_regex, hex_regex
def fromfile(file_h):
"""
Given a string file name, returns a GEOSGeometry. The file may contain WKB,
WKT, or HEX.
"""
# If given a file name, get a real handle.
if isinstance(file_h, basestring):
file_h = ... |
sve-odoo/odoo | refs/heads/master | addons/product/product.py | 12 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
chenke91/flask | refs/heads/master | docs/flaskext.py | 2228 | # flasky extensions. flasky pygments style based on tango style
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
class FlaskyStyle(Style):
background_color = "#f8f8f8"
default_style = "... |
hiway/micropython | refs/heads/master | examples/hwapi/hwconfig_esp8266_esp12.py | 41 | from machine import Pin, Signal
# ESP12 module as used by many boards
# Blue LED on pin 2, active low (inverted)
LED = Signal(2, Pin.OUT, invert=True)
|
samkreter/MarketDepthCalculator | refs/heads/master | bottle.py | 13 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Bottle is a fast and simple micro-framework for small web applications. It
offers request dispatching (Routes) with url parameter support, templates,
a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and
template engines - all in a single file an... |
ISIFoundation/influenzanet-website | refs/heads/master | apps/survey/migrations/0008_auto.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):
# Removing M2M table for field user on 'SurveyUser'
db.delete_table('survey_surveyuser_user')
def ba... |
duyetdev/islab-portfolio-by-ghost | refs/heads/master | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/jvm.py | 94 | # -*- coding: utf-8 -*-
"""
pygments.lexers.jvm
~~~~~~~~~~~~~~~~~~~
Pygments lexers for JVM languages.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, ... |
GunoH/intellij-community | refs/heads/master | python/testData/copyPaste/EmptyLineInList.dst.py | 166 | # original function # this is line 1 of the code.
def foo():
print 'f00'
def bar(num):
for _ in range(num):
print 'bar'
bar(7)
<caret> <selection></selection>
|
tkaitchuck/nupic | refs/heads/master | examples/opf/experiments/spatial_classification/auto_generated/searchDef.py | 1 | #! /usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditi... |
takeshineshiro/django | refs/heads/master | django/conf/locale/ro/formats.py | 619 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'H:i'
DATETI... |
nadavge/notejam | refs/heads/master | django/notejam/notes/forms.py | 6 | from django import forms
from notes.models import Note
class NoteForm(forms.ModelForm):
class Meta:
model = Note
exclude = ('created_at', 'updated_at', 'user')
|
xen0l/ansible | refs/heads/devel | lib/ansible/modules/cloud/heroku/heroku_collaborator.py | 74 | #!/usr/bin/python
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['pr... |
pre-commit/pre-commit | refs/heads/master | pre_commit/logging_handler.py | 1 | import contextlib
import logging
from typing import Generator
from pre_commit import color
from pre_commit import output
logger = logging.getLogger('pre_commit')
LOG_LEVEL_COLORS = {
'DEBUG': '',
'INFO': '',
'WARNING': color.YELLOW,
'ERROR': color.RED,
}
class LoggingHandler(logging.Handler):
d... |
ManageIQ/integration_tests | refs/heads/master | cfme/utils/__init__.py | 2 | import atexit
import os
import re
import subprocess
import threading
from contextlib import contextmanager
from functools import partial
import diaper
from cached_property import cached_property
from werkzeug.local import LocalProxy
# import diaper for backward compatibility
on_rtd = os.environ.get('READTHEDOCS') == ... |
jendap/tensorflow | refs/heads/master | tensorflow/contrib/distributions/python/kernel_tests/estimator_test.py | 81 | # 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... |
CydarLtd/ansible | refs/heads/devel | lib/ansible/modules/storage/infinidat/infini_export.py | 69 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Gregory Shulov (gregory.shulov@gmail.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... |
alexsmx/djangoAppengineSrcTemplate | refs/heads/master | django/contrib/webdesign/lorem_ipsum.py | 439 | """
Utility functions for generating "lorem ipsum" Latin text.
"""
import random
COMMON_P = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo con... |
zhjunlang/kbengine | refs/heads/master | kbe/src/lib/python/Lib/test/test_dummy_threading.py | 182 | from test import support
import unittest
import dummy_threading as _threading
import time
class DummyThreadingTestCase(unittest.TestCase):
class TestThread(_threading.Thread):
def run(self):
global running
global sema
global mutex
# Uncomment if testing ano... |
siggame/discuss | refs/heads/develop | discuss/converse/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
jonathanmz34/ztransfert | refs/heads/master | node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py | 1446 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for the MSVSSettings.py file."""
import StringIO
import unittest
import gyp.MSVSSettings as MSVSSettings
class TestSequence... |
coderbone/SickRage-alt | refs/heads/master | lib/imdb/__init__.py | 11 | """
imdb package.
This package can be used to retrieve information about a movie or
a person from the IMDb database.
It can fetch data through different media (e.g.: the IMDb web pages,
a SQL database, etc.)
Copyright 2004-2016 Davide Alberani <da@erlug.linux.it>
This program is free software; you can redistribute i... |
mtp1376/youtube-dl | refs/heads/master | youtube_dl/extractor/howcast.py | 38 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
class HowcastIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?howcast\.com/videos/(?P<id>\d+)'
_TEST = {
'url': 'http://www.howcast.com/videos/390161-How-to-Tie-a-Square-Knot-Properly',
'md5': '8b743df908... |
chachan/nodeshot | refs/heads/master | nodeshot/community/notifications/urls.py | 5 | from django.conf.urls import patterns, url
urlpatterns = patterns('nodeshot.community.notifications.views', # noqa
url(r'^account/notifications/$', 'notification_list', name='api_notification_list'),
url(r'^account/notifications/(?P<pk>[0-9]+)/$', 'notification_detail', name='api_notification_detail'),
#... |
mitchrule/Miscellaneous | refs/heads/master | Django_Project/django/Lib/site-packages/django/conf/urls/i18n.py | 113 | import warnings
from django.conf import settings
from django.conf.urls import patterns, url
from django.core.urlresolvers import LocaleRegexURLResolver
from django.utils import six
from django.utils.deprecation import RemovedInDjango20Warning
from django.views.i18n import set_language
def i18n_patterns(prefix, *args... |
andir/ipv6.watch | refs/heads/master | generate.py | 1 | #!/usr/bin/env python3
from typing import Dict, Any
import argparse
import asyncio
import datetime
import logging
import os
import time
from pprint import pformat
import aiodns
import jsonschema
import yaml
from jinja2 import Environment, FileSystemLoader, Template
from prometheus_client import Gauge, CollectorRegist... |
donghwicha/playgroundPython | refs/heads/master | designPattern/decorator/1.with-abc1.py | 3 | import abc
class Shape(object):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def draw(self):
"""need to be implemented"""
return
class Rectangle(Shape):
def draw(self):
print "this is rectangluar"
class Circle(Shape):
def draw(self):
print "this is circular"
c... |
claws/AutobahnPython | refs/heads/master | examples/asyncio/wamp/basic/rpc/decorators/frontend.py | 5 | ###############################################################################
##
## Copyright (C) 2014 Tavendo GmbH
##
## 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:/... |
mrj1018/cyaron | refs/heads/master | cyaron/consts.py | 2 | from __future__ import absolute_import
import math
import string
"""Constants Package.
Constants:
ALPHABET_SMALL -> All the lower ascii letters
ALPHABET_CAPITAL -> All the upper ascii letters
ALPHABET -> All the ascii letters
NUMBERS -> All the numbers(0-9)
SENTENCE_SEPARATORS -> Includes 70% ",", 20% ";" and 10% ":"
... |
memo/tensorflow | refs/heads/master | tensorflow/python/ops/check_ops.py | 15 | # 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... |
jordigh/mercurial-crew | refs/heads/master | mercurial/repoview.py | 92 | # repoview.py - Filtered view of a localrepo object
#
# Copyright 2012 Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Logilab SA <contact@logilab.fr>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
impo... |
qedi-r/home-assistant | refs/heads/dev | homeassistant/components/luftdaten/config_flow.py | 5 | """Config flow to configure the Luftdaten component."""
from collections import OrderedDict
from luftdaten import Luftdaten
from luftdaten.exceptions import LuftdatenConnectionError
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import (
CONF_MONITORED_CONDITIONS,
C... |
horizontracy/rpi_tool | refs/heads/master | api/venv/lib/python2.7/site-packages/setuptools/site-patch.py | 720 | def __boot():
import sys
import os
PYTHONPATH = os.environ.get('PYTHONPATH')
if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH):
PYTHONPATH = []
else:
PYTHONPATH = PYTHONPATH.split(os.pathsep)
pic = getattr(sys,'path_importer_cache',{})
stdpath = sys.path[le... |
lmazuel/azure-sdk-for-python | refs/heads/master | azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/local_network_gateway.py | 1 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
AsteroidOS/android_external_skia | refs/heads/master | gm/rebaseline_server/fix_pythonpath.py | 66 | #!/usr/bin/python
"""
Copyright 2014 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
Adds [trunk]/gm and [trunk]/tools to PYTHONPATH, if they aren't already there.
"""
import os
import sys
TRUNK_DIRECTORY = os.path.dirname(os.path.dirname(os.path.dirnam... |
Lujeni/ansible | refs/heads/devel | lib/ansible/modules/network/fortios/fortios_ips_global.py | 14 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# 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 Lic... |
crs4/blast-python | refs/heads/master | BlastPython/IO_SRB.py | 1 | # BEGIN_COPYRIGHT
#
# Copyright (C) 2014 CRS4.
#
# This file is part of blast-python.
#
# blast-python 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)
# ... |
reddraggone9/youtube-dl | refs/heads/master | youtube_dl/extractor/srf.py | 102 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
determine_ext,
parse_iso8601,
xpath_text,
)
class SrfIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.srf\.ch/play(?:er)?/tv/[^/]+/video/(?P<display_id>[^?]+)\?id=|tp\.srgssr\.c... |
Krylon360/vimeo-graphite-web | refs/heads/master | webapp/graphite/events/views.py | 2 | import datetime
import time
from django.http import HttpResponse
from django.shortcuts import render_to_response, get_object_or_404
from django.utils.timezone import localtime, now
from graphite.util import json
from graphite.events import models
from graphite.render.attime import parseATTime
from django.core.urlresol... |
isandlaTech/cohorte-demos | refs/heads/dev | led/dump/led-demo-raspberry/cohorte/dist/cohorte-1.0.0-20141209.234423-41-python-distribution/repo/cohorte/composer/node/distributor_csp.py | 4 | #!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Node Composer: Isolate Distributor based on ``ortools``
Clusters the components of a composition into groups according to several
criteria.
:author: Thomas Calmant
:license: Apache Software License 2.0
:version: 1.0.0
..
Copyright 2014 isandlaTech
L... |
yannickcr/Sick-Beard | refs/heads/development | lib/requests/packages/chardet2/euctwfreq.py | 323 | ######################## 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... |
nocarryr/AV-Asset-Manager | refs/heads/master | avam/assets/migrations/0005_auto_20160130_1426.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-01-30 20:26
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('assets', '0004_auto_20160130_1419'),
]
operations = [
migrations.RenameField(
... |
vinodkc/spark | refs/heads/master | python/pyspark/pandas/tests/test_reshape.py | 15 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
h4ck3rm1k3/github3.py | refs/heads/develop | tests/test_users.py | 9 | import github3
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from tests.utils import (BaseCase, load)
from datetime import datetime
class TestKey(BaseCase):
def __init__(self, methodName='runTest'):
super(TestKey, self).__init__(methodName)
self.key = github... |
Alwnikrotikz/autokey | refs/heads/master | src/lib/gtkui/dialogs.py | 47 | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This pr... |
wateraccounting/wa | refs/heads/master | Functions/Start/__init__.py | 1 | # -*- coding: utf-8 -*-
"""
Authors: Tim Hessels and Gonzalo Espinoza
UNESCO-IHE 2017
Contact: t.hessels@unesco-ihe.org
g.espinoza@unesco-ihe.org
Repository: https://github.com/wateraccounting/wa
Module: wa/Functions/Start
Description:
This module contains a compilation of scripts and functions used... |
harshitamistry/calligraRepository | refs/heads/master | 3rdparty/google-breakpad/src/tools/gyp/test/mac/gyptest-archs.py | 96 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Tests things related to ARCHS.
"""
import TestGyp
import subprocess
import sys
if sys.platform == 'darwin':
test = TestGyp.TestGyp(... |
marckuz/django | refs/heads/master | tests/test_runner_deprecation_app/__init__.py | 12133432 | |
piperck/redis-py | refs/heads/master | tests/__init__.py | 12133432 | |
LamCiuLoeng/luigi | refs/heads/master | test/contrib/__init__.py | 12133432 | |
benh/twesos | refs/heads/master | third_party/zookeeper-3.3.1/src/contrib/zkpython/src/test/connection_test.py | 26 | #!/usr/bin/python
#
# 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
# "Lic... |
aronsky/home-assistant | refs/heads/dev | tests/components/fan/test_zwave.py | 21 | """Test Z-Wave fans."""
from homeassistant.components.fan import (
zwave, SPEED_OFF, SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH, SUPPORT_SET_SPEED)
from tests.mock.zwave import (
MockNode, MockValue, MockEntityValues, value_changed)
def test_get_device_detects_fan(mock_openzwave):
"""Test get_device returns a z... |
mezz64/home-assistant | refs/heads/dev | tests/components/nightscout/__init__.py | 6 | """Tests for the Nightscout integration."""
import json
from aiohttp import ClientConnectionError
from py_nightscout.models import SGV, ServerStatus
from homeassistant.components.nightscout.const import DOMAIN
from homeassistant.const import CONF_URL
from tests.async_mock import patch
from tests.common import MockCo... |
amgowano/oppia | refs/heads/develop | scripts/pre_commit_linter.py | 1 | # 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... |
Matt-Deacalion/django | refs/heads/master | tests/resolve_url/urls.py | 357 | from django.conf.urls import url
from django.contrib.auth import views
urlpatterns = [
url(r'^accounts/logout/$', views.logout, name='logout'),
]
|
imranyousuf/project-kappa | refs/heads/master | code/utils/list_cond.py | 5 | import os
def list_every_cond(subject, task_num):
"""
This function returns condition list.
Parameter
---------
subject: str
Please specify the number of the subject. For example, you should input 'sub001' if choose the first subject.
task_num: task_num
Please specify the number of the task. For example, ... |
bigdig/vnpy | refs/heads/master | vnpy/trader/event.py | 2 | """
Event type string used in VN Trader.
"""
from vnpy.event import EVENT_TIMER # noqa
EVENT_TICK = "eTick."
EVENT_TRADE = "eTrade."
EVENT_ORDER = "eOrder."
EVENT_POSITION = "ePosition."
EVENT_ACCOUNT = "eAccount."
EVENT_CONTRACT = "eContract."
EVENT_LOG = "eLog"
|
agry/NGECore2 | refs/heads/master | scripts/loot/lootPools/yavin_iv/re_junk_imperial_observer.py | 2 |
def itemNames():
return ['armor_repair_device']
def itemChances():
return [100] |
waidyanatha/sambro-eden | refs/heads/master | private/templates/OCHA/controllers.py | 2 | # -*- coding: utf-8 -*-
from os import path
from gluon import *
from gluon.storage import Storage
from s3 import *
# =============================================================================
class index():
""" Custom Home Page """
def __call__(self):
request = current.request
response =... |
tafaRU/odoo | refs/heads/8.0 | addons/website_mail/tests/__init__.py | 121 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 20123TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... |
hannes/linux | refs/heads/master | Documentation/admin-guide/conf.py | 361 | # -*- coding: utf-8; mode: python -*-
project = 'Linux Kernel User Documentation'
tags.add("subproject")
latex_documents = [
('index', 'linux-user.tex', 'Linux Kernel User Documentation',
'The kernel development community', 'manual'),
]
|
ajaali/django | refs/heads/master | django/db/models/sql/where.py | 439 | """
Code to manage the creation and SQL rendering of 'where' constraints.
"""
from django.db.models.sql.datastructures import EmptyResultSet
from django.utils import tree
from django.utils.functional import cached_property
# Connection types
AND = 'AND'
OR = 'OR'
class WhereNode(tree.Node):
"""
Used to repr... |
pymedusa/Medusa | refs/heads/master | ext/subliminal/refiners/tvdb.py | 5 | # -*- coding: utf-8 -*-
from datetime import datetime, timedelta
from functools import wraps
import logging
import re
from babelfish import Country
import guessit
import requests
from .. import __short_version__
from ..cache import REFINER_EXPIRATION_TIME, region
from ..utils import sanitize
from ..video import Episo... |
papouso/odoo | refs/heads/8.0 | addons/account_anglo_saxon/stock.py | 208 | # -*- encoding: 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 t... |
google/clusterfuzz | refs/heads/master | src/python/tests/appengine/handlers/reproduce_tool/testcase_info_test.py | 1 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
rtucker/sycamore | refs/heads/master | Sycamore/support/pytz/zoneinfo/Africa/Niamey.py | 9 | '''tzinfo timezone information for Africa/Niamey.'''
from pytz.tzinfo import DstTzInfo
from pytz.tzinfo import memorized_datetime as d
from pytz.tzinfo import memorized_ttinfo as i
class Niamey(DstTzInfo):
'''Africa/Niamey timezone definition. See datetime.tzinfo for details'''
zone = 'Africa/Niamey'
_ut... |
Kazade/NeHe-Website | refs/heads/master | google_appengine/lib/django-1.5/django/contrib/webdesign/lorem_ipsum.py | 230 | """
Utility functions for generating "lorem ipsum" Latin text.
"""
from __future__ import unicode_literals
import random
COMMON_P = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco ... |
danakj/chromium | refs/heads/master | ppapi/generators/idl_ast.py | 104 | # Copyright (c) 2012 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.
"""Nodes for PPAPI IDL AST."""
from idl_namespace import IDLNamespace
from idl_node import IDLNode
from idl_option import GetOption
from idl_visitor imp... |
MillerCMBLabUSC/lab_analysis | refs/heads/master | apps/4f_model/OldCode/polEmission.py | 1 | import numpy as np
import thermo as th
import scipy.integrate as intg
chi = np.deg2rad(32.5)
e0 = 8.81e-12
rho = 2.417e-8
nu = 145e9
Dnu = 10e9
e = lambda x : np.sqrt(4 * np.pi * e0 * x * rho)
e2 = (1 / np.cos(chi) - np.cos(chi))
fact = 1e12 * (1 / .18)
emisAtm = 3.34e-2
p1 = intg.quad(lambda x: e2 * e(x) * th.weig... |
cbrewster/servo | refs/heads/master | tests/wpt/web-platform-tests/webdriver/tests/new_session/merge.py | 3 | # META: timeout=long
import pytest
from tests.support.asserts import assert_error, assert_success
from conftest import platform_name
@pytest.mark.skipif(platform_name() is None, reason="Unsupported platform")
@pytest.mark.parametrize("body", [lambda key, value: {"alwaysMatch": {key: value}},
... |
Brocade-OpenSource/OpenStack-DNRM-Nova | refs/heads/master | nova/db/sqlalchemy/migrate_repo/versions/140_drop_unused_postgresql_volume_sequences.py | 28 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2012 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.o... |
tiangolo/ansible | refs/heads/devel | v1/ansible/runner/lookup_plugins/__init__.py | 12133432 | |
Russell-IO/ansible | refs/heads/devel | lib/ansible/module_utils/network/junos/__init__.py | 12133432 | |
osneven/usbauth | refs/heads/master | src/utils/paths.py | 1 | '''
USBAuth, a USB device authentication tool.
Copyright (C) 2016 Oliver Stochholm Neven
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 late... |
AccelAI/accel.ai | refs/heads/master | flask-aws/lib/python2.7/site-packages/docutils/parsers/rst/languages/sv.py | 121 | # $Id: sv.py 7119 2011-09-02 13:00:23Z milde $
# Author: Adam Chodorowski <chodorowski@users.sourceforge.net>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must... |
projectatomic/anaconda | refs/heads/rhel7-atomic | utils/log_picker/__init__.py | 5 | #!/usr/bin/python
import os
import sys
import tempfile
import log_picker.archiving as archiving
from log_picker.archiving import ArchivationError
from log_picker.archiving import NoFilesArchivationError
import log_picker.sending as sending
from log_picker.sending import SenderError
import log_picker.logmining as logm... |
nirmeshk/oh-mainline | refs/heads/master | mysite/search/migrations/0044_answer_can_have_non_logged_in_author.py | 17 | # This file is part of OpenHatch.
# Copyright (C) 2010 Parker Phinney
# Copyright (C) 2010 OpenHatch, Inc.
#
# 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 Free Software Foundation, either version 3 of the Licens... |
JuliBakagianni/META-SHARE | refs/heads/master | misc/tools/generateDS-2.7a/Demos/Xmlbehavior/xmlbehavior_sub.py | 33 | #!/usr/bin/env python
#
# Generated Tue Jun 29 16:14:16 2004 by generateDS.py.
#
import sys
from xml.dom import minidom
from xml.sax import handler, make_parser
import xmlbehavior as supermod
class xml_behaviorSub(supermod.xml_behavior):
def __init__(self, base_impl_url='', behaviors=None):
supermod.xml... |
shaunstanislaus/magic-wormhole | refs/heads/master | src/wormhole/__init__.py | 73 |
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
|
benpatterson/edx-platform | refs/heads/master | lms/djangoapps/shoppingcart/migrations/0006_auto__add_field_order_refunded_time__add_field_orderitem_refund_reques.py | 114 | # -*- coding: 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 'Order.refunded_time'
db.add_column('shoppingcart_order', 'refunded_time',
... |
magopian/amo-validator | refs/heads/master | tests/test_bug_626878.py | 8 | from js_helper import _do_test
def test_double_escaped():
"""Test that escaped characters don't result in errors."""
err = _do_test('tests/resources/bug_626878.js')
assert not err.message_count
|
izonder/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/conf/locale/ka/__init__.py | 12133432 | |
alexlo03/ansible | refs/heads/devel | test/units/modules/network/ios/__init__.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.