repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
sternshus/arelle2.7 | refs/heads/master | svr-2.7/arelle/plugin/cdrFormula/cdrEvaluator.py | 1 | '''
cdrValidator validates CDR Formula select expressions in the context of an XBRL DTS and instance.
(c) Copyright 2014 Mark V Systems Limited, California US, All rights reserved.
'''
import operator
from arelle.ModelFormulaObject import Aspect
from arelle.ModelValue import QName
from arelle.ModelInstanceObject imp... |
KL-WLCR/incubator-airflow | refs/heads/master | airflow/migrations/versions/211e584da130_add_ti_state_index.py | 60 | # -*- coding: utf-8 -*-
#
# 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
... |
Loodoor/UrWorld-Alpha-3.x | refs/heads/master | tools/colorama/win32.py | 32 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
# from winbase.h
STDOUT = -11
STDERR = -12
try:
import ctypes
from ctypes import LibraryLoader
windll = LibraryLoader(ctypes.WinDLL)
from ctypes import wintypes
except (AttributeError, ImportError):
windll = None
SetCon... |
gfonk/ansible | refs/heads/devel | contrib/inventory/rax.py | 10 | #!/usr/bin/env python
# (c) 2013, Jesse Keating <jesse.keating@rackspace.com,
# Paul Durivage <paul.durivage@rackspace.com>,
# Matt Martz <matt@sivel.net>
#
# This file is part of Ansible.
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Pu... |
lnielsen/invenio | refs/heads/pu | invenio/modules/jsonalchemy/validator.py | 3 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2013, 2014 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your opt... |
samgeen/Hamu | refs/heads/master | HamuLite.py | 1 | '''
MODIFIED FROM Algorithm.py IN HAMU TO WORK INDEPENDENTLY OF THE HAMU FRAMEWORK
Created on 18 Feb 2013
@author: samgeen
'''
# Cache file imports
import pymses
import hashlib
import cPickle as pik
import os, glob
class CacheFile(object):
def __init__(self, snapshot, algorithm):
self._snapshot = snapsho... |
lopezloo/mtasa-blue | refs/heads/master | utils/src/pull_pootle_catalogs.py | 9 | ##############################################################################
#
# PROJECT: Multi Theft Auto v1.0
# LICENSE: See LICENSE in the top level directory
# FILE: utils/pull_pootle_catalogs.py
# PURPOSE: Pull translation files from a Pootle web server into a directory
# DEVELOPERS: Dan... |
ioos/wicken | refs/heads/master | setup.py | 2 | from setuptools import setup
setup(
name='Wicken',
version='0.2.0',
description='Maps metadata concepts to concrete specifications and file formats',
author='David Stuebe',
author_email='DStuebe@ASAScience.com',
url='https://github.com/ioos/wicken',
classifiers=[
'Development Status... |
OSSESAC/odoopubarquiluz | refs/heads/7.0 | addons/document_ftp/__openerp__.py | 60 | # -*- 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... |
stopstalk/stopstalk-deployment | refs/heads/master | languages/nl.py | 159 | # coding: utf8
{
'!langcode!': 'nl',
'!langname!': 'Nederlands',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%(nrows)s records foun... |
pnprog/goreviewpartner | refs/heads/master | gomill/game_jobs.py | 3 | """Connection between GTP games and the job manager."""
import datetime
import os
from gomill import gtp_controller
from gomill import gtp_games
from gomill import job_manager
from gomill import sgf
from gomill.gtp_controller import BadGtpResponse, GtpChannelError
class Player(object):
"""Player description for ... |
nikpap/inspire-next | refs/heads/master | tests/unit/dojson/test_dojson_bibfield.py | 1 | # -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2015, 2016 CERN.
#
# INSPIRE is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any... |
calancha/DIRAC | refs/heads/rel-v6r12 | FrameworkSystem/private/logging/backends/StdErrBackend.py | 14 | import sys
from DIRAC.FrameworkSystem.private.logging.backends.BaseBackend import BaseBackend
class StdErrBackend( BaseBackend ):
def doMessage( self, messageObject ):
sys.stderr.write( "%s\n" % self.composeString( messageObject ) )
sys.stderr.flush() |
rotofly/odoo | refs/heads/master | addons/payment_ogone/tests/__init__.py | 14224 | # -*- coding: utf-8 -*-
|
topic2k/EventGhost | refs/heads/master | eg/Classes/Version.py | 1 | # -*- coding: utf-8 -*-
#
# This file is part of EventGhost.
# Copyright © 2005-2019 EventGhost Project <http://www.eventghost.org/>
#
# EventGhost 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 versio... |
trankmichael/scikit-learn | refs/heads/master | examples/applications/plot_model_complexity_influence.py | 323 | """
==========================
Model Complexity Influence
==========================
Demonstrate how model complexity influences both prediction accuracy and
computational performance.
The dataset is the Boston Housing dataset (resp. 20 Newsgroups) for
regression (resp. classification).
For each class of models we m... |
qrqiuren/sms-tools | refs/heads/master | lectures/05-Sinusoidal-model/plots-code/peaks-on-spectrogram.py | 21 | import numpy as np
import matplotlib.pyplot as plt
import sys, os, time
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/'))
import stft as STFT
import sineModel as SM
import utilFunctions as UF
(fs, x) = UF.wavread(os.path.join(os.path.dirname(os.path.realpath(__fi... |
treeio/treeio | refs/heads/2.0 | treeio/reports/helpers.py | 6 | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
import re
import pickle
import base64
def loads(value):
"Unpickle a value"
result = None
try:
result = pickle.loads(base64.b64decode((value)))
except pickle.PickleError:
pas... |
Datera/cinder | refs/heads/datera_queens_backport | cinder/volume/drivers/dell_emc/vmax/common.py | 1 | # Copyright (c) 2017 Dell Inc. or its subsidiaries.
# 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
#
# ... |
juanprietob/ExtractMSLesion | refs/heads/master | py/readImagesAutoEncoder.py | 1 | import glob, os
import numpy as np
import nrrd
import argparse
import fnmatch
import random
from six.moves import cPickle as pickle
parser = argparse.ArgumentParser(description='Finds images in directory <dir> named like <pattern>.nrrd and the corresponding <prefix><pattern>.nrrd in order to create the input and out... |
Public-Health-Bioinformatics/blast_comparison | refs/heads/master | BlastHit.py | 1 | from Bio import Entrez # to access NCBIs Genebank database
class BlastHit(object):
'''
Object that contains all data about a particular Hit
'''
def __init__(self, hit):
'''
Notice: some of the properties included here do not appear in the short tabular BLAST representation. If one ... |
leighpauls/k2cro4 | refs/heads/master | third_party/python_26/Lib/site-packages/win32/test/test_win32pipe.py | 18 | import unittest
import time
import threading
import win32pipe
import win32file
import win32event
import pywintypes
import winerror
import win32con
class PipeTests(unittest.TestCase):
pipename = "\\\\.\\pipe\\python_test_pipe"
def _serverThread(self, pipe_handle, event, wait_time):
# just do one conn... |
FoxLisk/Leafline | refs/heads/master | furniture/tablemaker.py | 2 | #!/usr/bin/env python3
import itertools
from functools import reduce
import operator
import os
def rank_and_file_to_u64(position):
rank, file = position
pindex = (8 * rank) + file
return 2**pindex
def displace(position, offset):
return tuple(map(operator.add, position, offset))
def is_legal(posit... |
waddedMeat/asteroids-ish | refs/heads/master | Asteroids/Colors.py | 1 | __author__ = 'jmoran'
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
|
goodwinnk/intellij-community | refs/heads/master | plugins/hg4idea/testData/bin/mercurial/store.py | 90 | # store.py - repository store handling for Mercurial
#
# Copyright 2008 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from i18n import _
import scmutil, util, parsers
import os, stat, errno
_sha =... |
stackforge/networking-hyperv | refs/heads/master | networking_hyperv/neutron/constants.py | 2 | # Copyright 2013 Cloudbase Solutions SRL
# 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 r... |
Liamraystanley/dropb.in | refs/heads/master | lib/jinja2/testsuite/lexnparse.py | 402 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.lexnparse
~~~~~~~~~~~~~~~~~~~~~~~~~~
All the unittests regarding lexing, parsing and syntax.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import unittest
from jinja2.testsuite import JinjaTestCase
from jinja... |
rotofly/odoo | refs/heads/master | addons/website_google_map/__openerp__.py | 354 | {
'name': 'Website Google Map',
'category': 'Hidden',
'summary': '',
'version': '1.0',
'description': """
OpenERP Website Google Map
==========================
""",
'author': 'OpenERP SA',
'depends': ['base_geolocalize', 'website_partner', 'crm_partner_assign'],
'data': [
... |
gauravbose/digital-menu | refs/heads/master | django/db/models/fields/__init__.py | 77 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import collections
import copy
import datetime
import decimal
import math
import uuid
import warnings
from base64 import b64decode, b64encode
from itertools import tee
from django.apps import apps
from django.db import connection
from django.db.models.lo... |
postmarketOS/pmbootstrap | refs/heads/master | pmb/config/save.py | 1 | """
Copyright 2018 Oliver Smith
This file is part of pmbootstrap.
pmbootstrap 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.
pmbootstrap ... |
ClearCorp-dev/odoo | refs/heads/8.0 | addons/account/project/report/__init__.py | 427 | # -*- 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... |
zhjunlang/kbengine | refs/heads/master | kbe/src/lib/python/Lib/importlib/_bootstrap.py | 76 | """Core implementation of import.
This module is NOT meant to be directly imported! It has been designed such
that it can be bootstrapped into Python as the implementation of import. As
such it requires the injection of specific modules and attributes in order to
work. One should use importlib as the public-facing ver... |
raviflipsyde/servo | refs/heads/master | tests/wpt/harness/wptrunner/update/base.py | 196 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
exit_unclean = object()
exit_clean = object()
class Step(object):
provides = []
def __init__(self, logger):
... |
camilonova/django | refs/heads/master | tests/auth_tests/test_signals.py | 38 | from django.contrib.auth import authenticate, signals
from django.contrib.auth.models import User
from django.test import TestCase, override_settings
from django.test.client import RequestFactory
@override_settings(ROOT_URLCONF='auth_tests.urls')
class SignalTestCase(TestCase):
@classmethod
def setUpTestData... |
johankaito/fufuka | refs/heads/master | microblog/flask/venv/lib/python2.7/site-packages/kazoo/tests/test_exceptions.py | 50 | from unittest import TestCase
class ExceptionsTestCase(TestCase):
def _get(self):
from kazoo import exceptions
return exceptions
def test_backwards_alias(self):
module = self._get()
self.assertTrue(getattr(module, 'NoNodeException'))
self.assertTrue(module.NoNodeExcep... |
sw25sw25/Docker | refs/heads/master | pip/_vendor/cachecontrol/wrapper.py | 953 | from .adapter import CacheControlAdapter
from .cache import DictCache
def CacheControl(sess,
cache=None,
cache_etags=True,
serializer=None,
heuristic=None):
cache = cache or DictCache()
adapter = CacheControlAdapter(
cache,
c... |
Kalimaha/pact-test | refs/heads/master | tests/acceptance/version_1/testcases/response/body/objects_in_array_no_matches.py | 2 | from pact_test.either import Left
from pact_test.models.response import PactResponse
from pact_test.matchers.response_matcher import match
from tests.acceptance.acceptance_test_loader import load_acceptance_test
def test_different_values():
data = load_acceptance_test(__file__)
response = PactResponse(body=[... |
sylvanelite/universalSmashSystem | refs/heads/master | engine/subaction.py | 1 | import engine.hitbox
import baseActions
import pygame.color
import builder.subactionSelector as subactionSelector
import xml.etree.ElementTree as ElementTree
from ast import literal_eval as make_tuple
import settingsManager
########################################################
# ABSTRACT ACTIONS ... |
wangli1426/heron | refs/heads/master | heron/tools/ui/src/python/handlers/__init__.py | 12 | ''' handler module '''
__all__ = ['handlers']
from heron.tools.ui.src.python.handlers import api
from heron.tools.ui.src.python.handlers.base import BaseHandler
from heron.tools.ui.src.python.handlers.mainhandler import MainHandler
from heron.tools.ui.src.python.handlers.notfound import NotFoundHandler
#############... |
LiquidSmooth-Devices/android_kernel_htc_flounder | refs/heads/5.1 | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... |
roadmapper/ansible | refs/heads/devel | lib/ansible/modules/cloud/vmware/vmware_host_active_directory.py | 21 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
'met... |
chitr/neutron | refs/heads/master | neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/native/test_br_tun.py | 18 | # Copyright (C) 2014,2015 VA Linux Systems Japan K.K.
# Copyright (C) 2014,2015 YAMAMOTO Takashi <yamamoto at valinux co jp>
# 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 t... |
tensorflow/tensorflow | refs/heads/master | tensorflow/python/framework/experimental/def_function.py | 13 | # Copyright 2020 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... |
mrkulk/text-world | refs/heads/master | evennia/players/migrations/0004_auto_20150403_2339.py | 12 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import evennia.players.manager
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('players', '0003_auto_20150209_2234'),
]
operations = [
migratio... |
quamilek/django | refs/heads/master | django/contrib/staticfiles/__init__.py | 802 | default_app_config = 'django.contrib.staticfiles.apps.StaticFilesConfig'
|
johngian/remo | refs/heads/master | vendor-local/lib/python/django_filters/widgets.py | 47 | from __future__ import absolute_import
from __future__ import unicode_literals
from itertools import chain
try:
from urllib.parse import urlencode
except:
from urllib import urlencode # noqa
from django import forms
from django.db.models.fields import BLANK_CHOICE_DASH
from django.forms.widgets import flatat... |
jigarkb/Programming | refs/heads/master | CTCI/chapter_2/2.2.py | 2 | # Return Kth to Last: Implement an algorithm to find kth to last element of a
# singly linked list.
from LinkedList import Node, LinkedList
def kth_to_last(ll, K):
fast_pointer = ll.head
slow_pointer = ll.head
while fast_pointer.next is not None:
fast_pointer = fast_pointer.next
if K > 1:
... |
b-me/django | refs/heads/master | django/template/backends/dummy.py | 480 | # Since this package contains a "django" module, this is required on Python 2.
from __future__ import absolute_import
import errno
import io
import string
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.template import Origin, TemplateDoesNotExist
from django.utils... |
aaku2101/python | refs/heads/master | Battleship.py | 1 | from random import randint
board = []
for x in range(5):
board.append(["O"] * 5)
def print_board(board):
for row in board:
print " ".join(row)
print "Let's play Battleship!"
print_board(board)
def random_row(board):
return randint(0, len(board) - 1)
def random_col(board):
return randint(0,... |
shahankhatch/scikit-learn | refs/heads/master | sklearn/decomposition/tests/test_pca.py | 199 | import numpy as np
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_greater
from sklearn.utils.testing import assert_rai... |
hiroakis/ansible | refs/heads/devel | lib/ansible/plugins/shell/fish.py | 182 | # (c) 2014, Chris Church <chris@ninemoreminutes.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
# (at your option) any lat... |
yukim/cassandra-dtest | refs/heads/master | thrift_bindings/v30/constants.py | 2 | #
# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType, TMessageType, TException, TApplicationException
from ttypes import *
VERSION = "20.1.0"
|
stormi/tsunami | refs/heads/master | src/primaires/salle/commandes/redit/__init__.py | 1 | # -*-coding:Utf-8 -*
# Copyright (c) 2010 LE GOFF Vincent
# 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
# l... |
maljac/connector | refs/heads/8.0 | connector/unit/backend_adapter.py | 30 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2013 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... |
sumedhasingla/VTK | refs/heads/master | ThirdParty/Twisted/twisted/words/xish/__init__.py | 80 | # -*- test-case-name: twisted.words.test -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Twisted X-ish: XML-ish DOM and XPath-ish engine
"""
|
volpino/Yeps-EURAC | refs/heads/master | scripts/microbes/ncbi_to_ucsc.py | 3 | #!/usr/bin/env python
"""
Walk downloaded Genome Projects and Convert, in place, IDs to match the UCSC Archaea browser, where applicable.
Uses UCSC Archaea DSN.
"""
import sys, os
import urllib
from elementtree import ElementTree
from BeautifulSoup import BeautifulSoup
from shutil import move
def __main__():
bas... |
kustodian/ansible | refs/heads/devel | lib/ansible/modules/cloud/cloudstack/cs_vpc.py | 21 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016, René Moser <mail@renemoser.net>
# 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': '... |
kawamon/hue | refs/heads/master | desktop/core/ext-py/kombu-4.3.0/t/unit/transport/test_mongodb.py | 3 | from __future__ import absolute_import, unicode_literals
import datetime
import pytest
from case import MagicMock, call, patch, skip
from kombu import Connection
from kombu.five import Empty
def _create_mock_connection(url='', **kwargs):
from kombu.transport import mongodb # noqa
class _Channel(mongodb.C... |
shanemcd/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/ec2_lc.py | 10 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... |
ColOfAbRiX/ansible | refs/heads/devel | lib/ansible/plugins/action/copy.py | 14 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@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 the License, or
# (at your option) an... |
dturner-tw/pants | refs/heads/master | src/python/pants/backend/jvm/targets/scala_library.py | 1 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.backend.j... |
caveman-dick/ansible | refs/heads/devel | lib/ansible/plugins/action/template.py | 35 | # (c) 2015, Michael DeHaan <michael.dehaan@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 the License, or
# (at your option) any lat... |
VeNoMouS/Sick-Beard | refs/heads/torrentProviders | sickbeard/notifiers/tweet.py | 16 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... |
bubenkoff/bubenkoff-gae2django | refs/heads/master | gae2django/tests/test_utils.py | 2 | # -*- coding: utf-8 -*-
import unittest
from gae2django.models import RegressionTestModel
from gae2django.utils import CallableString
class TestCallableString(unittest.TestCase):
def test_unicode(self):
x = CallableString(u"möhrenbrei")
self.assertTrue(x == u"möhrenbrei")
def test_callable... |
sstebbins/pppcpro | refs/heads/master | pppcemr/migrations/0146_room_type.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-06-30 15:12
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pppcemr', '0145_auto_20160630_1106'),
]
operations = [
migrations.AddField(
... |
daonb/Open-Knesset | refs/heads/master | presence/admin.py | 13848 | from django.contrib import admin
# Register your models here.
|
shingonoide/odoo | refs/heads/deverp_8.0 | addons/l10n_uk/__init__.py | 440 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2011 Smartmode LTD (<http://www.smartmode.co.uk>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as... |
thedrow/houston | refs/heads/master | tests/utils_tests.py | 2 | """
Tests for houston.utils
"""
try:
import unittest2 as unittest
except ImportError:
import unittest
from houston import utils
class ParseEndpointTests(unittest.TestCase):
def test_http_with_default_port(self):
value = 'http://consul.ec2.local'
expectation = {'scheme': 'http',
... |
neilLasrado/erpnext | refs/heads/develop | erpnext/buying/doctype/buying_settings/test_buying_settings.py | 7 | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestBuyingSettings(unittest.TestCase):
pass
|
MissCatLady/AlarmEZ | refs/heads/master | venv/lib/python2.7/site-packages/jinja2/environment.py | 614 | # -*- coding: utf-8 -*-
"""
jinja2.environment
~~~~~~~~~~~~~~~~~~
Provides a class that holds runtime and parsing time options.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
from jinja2 import nodes
from jinja2.defaults import BLOCK_S... |
matiasb/django | refs/heads/master | django/conf/locale/da/formats.py | 504 | # -*- 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'
DATET... |
icereval/osf.io | refs/heads/develop | osf/migrations/0077_add_noderequest_model.py | 18 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-16 20:26
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
import osf.models.base
import osf.utils.fields
class Migration... |
joeythesaint/yocto-autobuilder | refs/heads/master | lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/test/test_protocols.py | 5 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for twisted.protocols package.
"""
import struct
from zope.interface.verify import verifyObject
from twisted.trial import unittest
from twisted.protocols import basic, wire, portforward
from twisted.internet import reactor, proto... |
nongxiaoming/rt-thread | refs/heads/master | bsp/nuvoton_m05x/rtconfig.py | 12 | import os
# toolchains options
ARCH='arm'
CPU='cortex-m0'
CROSS_TOOL='keil'
if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
# cross_tool provides the cross compiler
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
if CROSS_TOOL == 'iar': # not support gcc
PLATFORM = 'ia... |
SpiderNight/Aeos | refs/heads/master | Aeos.py | 1 | import socket
import time
import re
def irc_connect():
server = raw_input("Server: ") #find the server
if server.lower() == "twitch":
server = "irc.twitch.tv"
elif server.lower() == "esper":
server = "irc.esper.net"
if server == "irc.twitch.tv" or "irc.esper.net":... |
cactusbin/nyt | refs/heads/master | matplotlib/lib/matplotlib/backends/backend_tkagg.py | 4 | # Todd Miller jmiller@stsci.edu
from __future__ import division, print_function
import os, sys, math
import os.path
import Tkinter as Tk, FileDialog
# Paint image to Tk photo blitter extension
import matplotlib.backends.tkagg as tkagg
from matplotlib.backends.backend_agg import FigureCanvasAgg
import matplotlib.... |
mgottschlag/qemu-kvm | refs/heads/master | scripts/tracetool/backend/ust.py | 114 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
LTTng User Space Tracing backend.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajno... |
partofthething/home-assistant | refs/heads/dev | homeassistant/components/iperf3/__init__.py | 22 | """Support for Iperf3 network measurement tool."""
from datetime import timedelta
import logging
import iperf3
import voluptuous as vol
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from homeassistant.const import (
CONF_HOST,
CONF_HOSTS,
CONF_MONITORED_CONDITIONS,
CONF_PORT,
... |
pigeonflight/strider-plone | refs/heads/master | docker/appengine/lib/django-1.3/tests/modeltests/many_to_one_null/models.py | 92 | """
16. Many-to-one relationships that can be null
To define a many-to-one relationship that can have a null foreign key, use
``ForeignKey()`` with ``null=True`` .
"""
from django.db import models
class Reporter(models.Model):
name = models.CharField(max_length=30)
def __unicode__(self):
return self... |
crundberg/CR-Smart-Home | refs/heads/master | tests/UnitTest.py | 1 | import unittest
import datetime
import Adafruit_DHT
import json
import hashlib
from base64 import b64encode
import sys
sys.path.append("..")
from API import app
from Log import Log
from Sun import Sun
from Lamp import Lamp
from Sensor import Sensor
from Upgrade import Upgrade
from Weather import Weather
from w1thermsen... |
sunlianqiang/kbengine | refs/heads/master | kbe/src/lib/python/Doc/includes/sqlite3/executemany_2.py | 51 | import sqlite3
import string
def char_generator():
for c in string.ascii_lowercase:
yield (c,)
con = sqlite3.connect(":memory:")
cur = con.cursor()
cur.execute("create table characters(c)")
cur.executemany("insert into characters(c) values (?)", char_generator())
cur.execute("select c from characters")
... |
bcoca/ansible-modules-extras | refs/heads/devel | source_control/gitlab_user.py | 22 | #!/usr/bin/python
# (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl)
#
# 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... |
laurent-george/weboob | refs/heads/master | modules/happn/module.py | 1 | # -*- coding: utf-8 -*-
# Copyright(C) 2014 Roger Philibert
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at yo... |
xyuanmu/XX-Net | refs/heads/master | python3.8.2/Lib/distutils/msvccompiler.py | 21 | """distutils.msvccompiler
Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
"""
# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
# finding DevStudio (through the registry)
import sys, os
from distutils.errors import \
... |
htwenhe/DJOA | refs/heads/master | manage.py | 1 | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "whoa.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
... |
Barrog/C4-Datapack | refs/heads/master | data/jscript/quests/622_DeliveryOfSpecialLiquor/__init__.py | 1 | # Made by disKret
import sys
from net.sf.l2j.gameserver.model.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
#NPC
JEREMY = 8521
PULIN = 8543
NAFF = 8544
CROCUS = 8545
KUBER = 8546
BEORIN = 8547
#QUEST ITEMS
SPECIAL... |
KellyChan/Python | refs/heads/master | python/django/artdepot/artdepot/depot/migrations/0007_userprofile.py | 3 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('depot', '0006_auto_20140930_2143'),
]... |
dimagi/django-crispy-forms | refs/heads/dev | crispy_forms/tests/test_tags.py | 25 | # -*- coding: utf-8 -*-
from django.conf import settings
from django.forms.forms import BoundField
from django.forms.models import formset_factory
from django.template import loader, Context
from .base import CrispyTestCase
from .forms import TestForm
from crispy_forms.templatetags.crispy_forms_field import crispy_add... |
ubic135/odoo-design | refs/heads/master | addons/google_calendar/controllers/main.py | 420 | import openerp.addons.web.http as http
from openerp.addons.web.http import request
class google_calendar_controller(http.Controller):
@http.route('/google_calendar/sync_data', type='json', auth='user')
def sync_data(self, arch, fields, model, **kw):
"""
This route/function is called when ... |
spaghetti-/rosdep | refs/heads/master | src/rosdep2/sources_list.py | 1 | # Copyright (c) 2012, Willow Garage, 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 cond... |
kalebdavis/calenbro | refs/heads/master | myapp/migrations/0003_auto_20160306_0604.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-03-06 06:04
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('myapp', '0002_event_uuid'),
]
operations = [
migrations.AddField(
... |
mdsol/flask-mauth | refs/heads/develop | flask_mauth/auth.py | 1 | # -*- coding: utf-8 -*-
import json
import logging
from functools import wraps
from flask import Response, current_app, request
from requests_mauth import MAuth
from flask_mauth.mauth import LocalAuthenticator, RemoteAuthenticator
logger = logging.getLogger("flask_mauth")
class MAuthAuthenticator(object):
"""
... |
joshowen/django-allauth | refs/heads/master | allauth/socialaccount/providers/github/models.py | 4209 | # Create your models here.
|
Renzo-Olivares/vigor-ics-kernel | refs/heads/master | tools/perf/scripts/python/check-perf-trace.py | 11214 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... |
livibetter-backup/letsecretsout | refs/heads/master | src/browse.py | 1 | import logging
import os
from urllib import unquote
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.ext.webapp.util import run_wsgi_app
os.environ['DJANGO_SETTINGS_MODULE'] = 'conf.settings'
from django.conf import settings
# Force Django to reload settin... |
bitprophet/contribution-guide.org | refs/heads/master | tasks.py | 1 | from invoke import Collection
from invocations import docs
ns = Collection(docs)
ns.configure({
'sphinx': {
'source': '.',
'target': '_build',
'target_file': 'index.html',
},
})
|
pandeyadarsh/sympy | refs/heads/master | release/fabfile.py | 60 | # -*- coding: utf-8 -*-
"""
Fab file for releasing
Please read the README in this directory.
Guide for this file
===================
Vagrant is a tool that gives us a reproducible VM, and fabric is a tool that
we use to run commands on that VM.
Each function in this file should be run as
fab vagrant func
Even tho... |
troyleak/youtube-dl | refs/heads/master | youtube_dl/extractor/xuite.py | 60 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import base64
from .common import InfoExtractor
from ..compat import compat_urllib_parse_unquote
from ..utils import (
ExtractorError,
parse_iso8601,
parse_duration,
)
class XuiteIE(InfoExtractor):
IE_DESC = '隨意窩Xuite影音'
_REGEX_BASE... |
HellerCommaA/flask-angular | refs/heads/master | lib/python2.7/site-packages/flask/testsuite/signals.py | 554 | # -*- coding: utf-8 -*-
"""
flask.testsuite.signals
~~~~~~~~~~~~~~~~~~~~~~~
Signalling.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import unittest
from flask.testsuite import FlaskTestCase
class SignalsTestCase(FlaskTestCase):
def ... |
ppyordanov/HCI_4_Future_Cities | refs/heads/master | Server/src/virtualenv/Lib/encodings/utf_32_be.py | 1 | """
Python 'utf-32-be' Codec
"""
import codecs
# ## Codec APIs
encode = codecs.utf_32_be_encode
def decode(input, errors='strict'):
return codecs.utf_32_be_decode(input, errors, True)
class IncrementalEncoder(codecs.IncrementalEncoder):
def encode(self, input, final=False):
return codecs.utf_32_be... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.