repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
repotvsupertuga/repo | refs/heads/master | instal/script.module.stream.tvsupertuga.addon/resources/lib/sources/en/rlsmovies.py | 8 | # -*- coding: utf-8 -*-
'''
Exodus Add-on
Copyright (C) 2016 Exodus
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 l... |
Tithen-Firion/youtube-dl | refs/heads/master | youtube_dl/extractor/dispeak.py | 48 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
int_or_none,
parse_duration,
remove_end,
xpath_element,
xpath_text,
)
class DigitallySpeakingIE(InfoExtractor):
_VALID_URL = r'https?://(?:evt\.dispeak|events\.digitallyspeaking)\.com/(?... |
volatilityfoundation/volatility | refs/heads/master | volatility/plugins/mac/ip_filters.py | 9 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility 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 o... |
piyushroshan/xen-4.3.2 | refs/heads/master | tools/python/xen/util/ip.py | 51 | import os
import re
import socket
import struct
import errno
##### Networking-related functions
def get_defaultroute():
fd = os.popen('/sbin/ip route list 2>/dev/null')
for line in fd.readlines():
m = re.search('^default via ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+) dev ([^ ]*)',
line)
... |
gento/dionaea | refs/heads/master | modules/python/scripts/smb/include/helpers.py | 9 | #********************************************************************************
#* Dionaea
#* - catches bugs -
#*
#*
#*
#* Copyright (C) 2010 Markus Koetter
#* Copyright (C) 2009 Paul Baecher & Markus Koetter & Mark Schloesser
#*
#* This program is free softw... |
nkgilley/home-assistant | refs/heads/dev | tests/components/asuswrt/test_sensor.py | 11 | """The tests for the AsusWrt sensor platform."""
from datetime import timedelta
from aioasuswrt.asuswrt import Device
from homeassistant.components import sensor
from homeassistant.components.asuswrt import (
CONF_DNSMASQ,
CONF_INTERFACE,
CONF_MODE,
CONF_PORT,
CONF_PROTOCOL,
CONF_SENSORS,
... |
jbkkd/django-taggit | refs/heads/master | tests/tests.py | 1 | from __future__ import absolute_import, unicode_literals
from unittest import TestCase as UnitTestCase
import django
from django.contrib.contenttypes.models import ContentType
from django.core import serializers
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.db import connection
... |
cdht/GitPython | refs/heads/master | git/objects/blob.py | 20 | # blob.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
from mimetypes import guess_type
from . import base
__all__ = ('Blob', )
class Blob(base.IndexObject)... |
NL66278/odoo | refs/heads/8.0 | openerp/addons/base/workflow/workflow.py | 74 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2014 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
blindroot/django | refs/heads/master | tests/file_uploads/urls.py | 452 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^upload/$', views.file_upload_view),
url(r'^verify/$', views.file_upload_view_verify),
url(r'^unicode_name/$', views.file_upload_unicode_name),
url(r'^echo/$', views.file_upload_echo),
url(r'^echo_content_type_extra/$', vie... |
GNOME/kupfer | refs/heads/master | kupfer/obj/contacts.py | 4 | # -*- encoding: utf-8 -*-
"""
Kupfer's Contacts API
Main definition and *constructor* classes.
Constructor classes such as EmailContact are used to conveniently construct
contacts with common traits. To *use* contacts, always use ContactLeaf, asking
for specific slots to be filled.
"""
import re
from kupfer import i... |
IndonesiaX/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/course_metadata_utils.py | 22 | """
Simple utility functions that operate on course metadata.
This is a place to put simple functions that operate on course metadata. It
allows us to share code between the CourseDescriptor and CourseOverview
classes, which both need these type of functions.
"""
from base64 import b32encode
from datetime import datet... |
arcean/telepathy-python | refs/heads/master | debian/python-telepathy/usr/share/pyshared/telepathy/_generated/Account_Interface_Avatar.py | 4 | # -*- coding: utf-8 -*-
# Generated from the Telepathy spec
"""Copyright (C) 2008 Collabora Ltd.
Copyright (C) 2008 Nokia Corporation
This library 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
ver... |
tuxfux-hlp-notes/python-batches | refs/heads/master | archieves/batch-61/files/myenv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py | 2918 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org 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 Reserved.
#
# Con... |
YuriyIlyin/ansible-modules-core | refs/heads/devel | cloud/docker/__init__.py | 12133432 | |
franosincic/edx-platform | refs/heads/master | common/djangoapps/monitoring/__init__.py | 12133432 | |
uestcxl/OnlineJudge | refs/heads/master | judge/judger/__init__.py | 12133432 | |
mrunge/horizon | refs/heads/master | openstack_dashboard/test/test_plugins/__init__.py | 12133432 | |
teemulehtinen/a-plus | refs/heads/master | apps/templatetags/__init__.py | 12133432 | |
elkingtonmcb/django | refs/heads/master | tests/template_backends/apps/good/__init__.py | 12133432 | |
ineffablebob/script.trakt | refs/heads/master | tests/__init__.py | 12133432 | |
rsalmond/seabus | refs/heads/master | seabus/__init__.py | 12133432 | |
MartinHjelmare/home-assistant | refs/heads/dev | homeassistant/components/cloud/binary_sensor.py | 7 | """Support for Home Assistant Cloud binary sensors."""
import asyncio
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from .const import DISPATCHER_REMOTE_UPDATE, DOMAIN
WAIT_UNTIL_CHANGE = 3
async def async_setup_platform... |
mw46d/ardupilot | refs/heads/master | Tools/LogAnalyzer/DataflashLog.py | 19 | #
# Code to abstract the parsing of APM Dataflash log files, currently only used by the LogAnalyzer
#
# Initial code by Andrew Chapman (amchapman@gmail.com), 16th Jan 2014
#
from __future__ import print_function
import collections
import os
import numpy
import bisect
import sys
import ctypes
from VehicleType import V... |
SecHackLabs/WebHackSHL | refs/heads/master | modules/tplmap/tests/test_channel.py | 2 | import unittest
import requests
import os
import sys
import random
sys.path.insert(1, os.path.join(sys.path[0], '..'))
from plugins.engines.mako import Mako
from core.channel import Channel
from core.checks import detect_template_injection
import utils.loggers
import logging
utils.loggers.stream_handler.setLevel(logg... |
yasoob/youtube-dl-GUI | refs/heads/master | youtube_dl/extractor/vgtv.py | 3 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from .xstream import XstreamIE
from ..utils import (
ExtractorError,
float_or_none,
try_get,
)
class VGTVIE(XstreamIE):
IE_DESC = 'VGTV, BTTV, FTV, Aftenposten and Aftonbladet'
_GEO_BYPASS = False... |
marcocaccin/scikit-learn | refs/heads/master | sklearn/semi_supervised/__init__.py | 436 | """
The :mod:`sklearn.semi_supervised` module implements semi-supervised learning
algorithms. These algorithms utilized small amounts of labeled data and large
amounts of unlabeled data for classification tasks. This module includes Label
Propagation.
"""
from .label_propagation import LabelPropagation, LabelSpreading... |
sectubs/2016s-SEP | refs/heads/master | gr-orcatun/docs/doxygen/doxyxml/generated/compoundsuper.py | 348 | #!/usr/bin/env python
#
# Generated Thu Jun 11 18:44:25 2009 by generateDS.py.
#
import sys
import getopt
from string import lower as str_lower
from xml.dom import minidom
from xml.dom import Node
#
# User methods
#
# Calls to the methods in these classes are generated by generateDS.py.
# You can replace these metho... |
mollstam/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/test/profilee.py | 399 | """
Input for test_profile.py and test_cprofile.py.
IMPORTANT: This stuff is touchy. If you modify anything above the
test class you'll have to regenerate the stats by running the two
test files.
*ALL* NUMBERS in the expected output are relevant. If you change
the formatting of pstats, please don't just regenerate t... |
OpenTransportDataProject/ckanext-ontology | refs/heads/master | setup.py | 1 | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages # Always prefer setuptools over distutils
from codecs import open # To use a consistent encoding
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.md'... |
Ademan/NumPy-GSoC | refs/heads/master | numpy/distutils/tests/test_misc_util.py | 35 | #!/usr/bin/env python
from numpy.testing import *
from numpy.distutils.misc_util import appendpath, minrelpath, gpaths, rel_path
from os.path import join, sep, dirname
ajoin = lambda *paths: join(*((sep,)+paths))
class TestAppendpath(TestCase):
def test_1(self):
assert_equal(appendpath('prefix','name'),... |
coberger/DIRAC | refs/heads/integration | FrameworkSystem/test/testLogger.py | 7 | # __RCSID__ = "$Id$"
#
# # FIXME: should be rewritten as a real unitttest
#
# import DIRAC
# from DIRAC import gLogger
# gLogger.setLevel( 'DEBUG' )
#
# DIRAC.gLogger.initialize('test_gLogger','/testSectionDebug')
#
#
# try:
# for i in None:
# pass
# except:
# pass
#
# testList = [{ 'method' : DIRAC.gLogger.... |
iesugrace/kazam-custom | refs/heads/master | frontend/main_menu.py | 2 | # -*- coding: utf-8 -*-
#
# main_menu.py
#
# Copyright 2012 David Klasinc <bigwhale@lubica.net>
#
# 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 o... |
qenter/vlc-android | refs/heads/master | toolchains/arm/lib/python2.7/sqlite3/test/types.py | 70 | #-*- coding: ISO-8859-1 -*-
# pysqlite2/test/types.py: tests for type conversion and detection
#
# Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for... |
kirbyfan64/shedskin | refs/heads/master | shedskin/lib/builtin.py | 5 | # Copyright 2005-2011 Mark Dufour and contributors; License Expat (See LICENSE)
class class_:
def __repr__(self):
return self.__name__
class int_:
def __add__(self, b):
return b.__with_int__()
def __sub__(self, b):
return b.__with_int__()
def __mul__(self, b):
return b.... |
Salat-Cx65/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/ctypes/test/test_pep3118.py | 50 | import unittest
from ctypes import *
import re, struct, sys
if sys.byteorder == "little":
THIS_ENDIAN = "<"
OTHER_ENDIAN = ">"
else:
THIS_ENDIAN = ">"
OTHER_ENDIAN = "<"
def normalize(format):
# Remove current endian specifier and white space from a format
# string
if format is None:
... |
andgoldschmidt/iEBE | refs/heads/trento-dev | EBE-Node/EbeCollector/uhg_tester.py | 8 |
from uhg import *
import uhg
use("/home/qiu/Downloads/Pb_0_5_Glb_collected.db")
e("dN/dydpT(0.5)(pion_p_hydro)")
e(" v_2[2]( linspace(0,2,30) )(pion_p_hydro) ")
sqrt(mean(abs(uhg._storedEbeDBReader.get_diff_V_n(particleName="pion_p_hydro", order=2, pTs=linspace(0,2,30))**2,0)))
|
Quikling/gpdb | refs/heads/master | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/vacuum/__init__.py | 12133432 | |
IndonesiaX/edx-platform | refs/heads/master | lms/djangoapps/certificates/migrations/__init__.py | 12133432 | |
mrquim/repository.mrquim | refs/heads/master | repo/script.toolbox/resources/__init__.py | 12133432 | |
redhat-openstack/sahara | refs/heads/master-patches | sahara/tests/unit/utils/openstack/__init__.py | 12133432 | |
sivel/ansible-modules-extras | refs/heads/devel | network/__init__.py | 12133432 | |
destos/free-audio-books | refs/heads/master | free_audio_books/contrib/__init__.py | 12133432 | |
MXWXZ/DuiMini | refs/heads/master | thirdpart/googletest/googletest/test/gtest_help_test.py | 101 | #!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
taschik/ramcloud-load-manager | refs/heads/master | scripts/forking_test_runner.py | 20 | #!/usr/bin/env python
# Copyright (c) 2010 Stanford University
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND T... |
aykol/pymatgen | refs/heads/master | pymatgen/io/__init__.py | 21 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This package provides the packages and modules to perform IO from various
input file formats and pymatgen objects.
"""
|
aoyono/sicpy | refs/heads/master | Chapter2/exercises/exercise2_76.py | 1 | # -*- coding: utf-8 -*-
"""
https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-16.html#%_thm_2.76
"""
def run_the_magic():
print("""
In case we add new types to a system with generic operations:
1. in explicit design style, we would need to create a new predicate
for each type, ... |
cloudbrain/cloudbrain | refs/heads/master | setup.py | 2 | from setuptools import setup, find_packages
try:
from pip.req import parse_requirements
except ImportError:
from pip._internal.req import parse_requirements
try:
from pip.download import PipSession
except ImportError:
from pip._internal.download import PipSession
import os
# Get __version__ and set oth... |
stevenvolckaert/plugin.video.vrt.nu | refs/heads/master | resources/lib/__init__.py | 12133432 | |
MechCoder/sympy | refs/heads/master | sympy/concrete/summations.py | 4 | from __future__ import print_function, division
from sympy.concrete.expr_with_limits import AddWithLimits
from sympy.concrete.expr_with_intlimits import ExprWithIntLimits
from sympy.core.function import Derivative
from sympy.core.relational import Eq
from sympy.core.singleton import S
from sympy.core.symbol import Dum... |
minrk/nbgrader | refs/heads/master | nbgrader/tests/preprocessors/test_limitoutput.py | 2 | import pytest
from textwrap import dedent
from ...preprocessors import LimitOutput
from .base import BaseTestPreprocessor
from .. import create_code_cell, create_text_cell
@pytest.fixture
def preprocessor():
return LimitOutput()
class TestLimitOutput(BaseTestPreprocessor):
def test_long_output(self):
... |
jakesyl/fail2ban | refs/heads/master | fail2ban/tests/clientreadertestcase.py | 1 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-
# vi: set ft=python sts=4 ts=4 sw=4 noet :
# This file is part of Fail2Ban.
#
# Fail2Ban 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;... |
edcomstock/werkzeug | refs/heads/master | werkzeug/formparser.py | 162 | # -*- coding: utf-8 -*-
"""
werkzeug.formparser
~~~~~~~~~~~~~~~~~~~
This module implements the form parsing. It supports url-encoded forms
as well as non-nested multipart uploads.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more deta... |
ORGAN-IZE/fiftythree-client | refs/heads/master | setup.py | 1 | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import re
with open('fiftythree/__init__.py', 'r') as init_file:
version = re.search(
'^__version__ = [\'"]([^\'"]+)[\'"]',
init_file.read(),
re.MULTILINE,
).group(1)
try:
long_description = open("README.rst").re... |
arnaud-morvan/QGIS | refs/heads/master | python/plugins/processing/core/defaultproviders.py | 32 | # -*- coding: utf-8 -*-
"""
***************************************************************************
defaultproviders.py
---------------------
Date : May 2016
Copyright : (C) 2016 by Victor Olaya
Email : volayaf at gmail dot com
*************************... |
alon/servo | refs/heads/master | tests/wpt/css-tests/tools/pytest/testing/code/test_source.py | 171 | # flake8: noqa
# disable flake check on this file because some constructs are strange
# or redundant on purpose and can't be disable on a line-by-line basis
import sys
import _pytest._code
import py
import pytest
from _pytest._code import Source
from _pytest._code.source import _ast
if _ast is not None:
astonly =... |
eenchev/idea-note-taking-app | refs/heads/master | env/lib/python2.7/site-packages/pip/_vendor/progress/counter.py | 510 | # -*- coding: utf-8 -*-
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS P... |
JTCunning/sentry | refs/heads/master | src/sentry/migrations/0019_auto__del_field_projectmember_api_key__add_field_projectmember_public_.py | 36 | # 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):
# Deleting field 'ProjectMember.api_key'
db.delete_column('sentry_projectmember', 'api_key')
# Adding fie... |
dessHub/bc-14-online-store-application | refs/heads/master | flask/lib/python2.7/site-packages/wtforms/ext/django/fields.py | 175 | """
Useful form fields for use with the Django ORM.
"""
from __future__ import unicode_literals
import datetime
import operator
try:
from django.conf import settings
from django.utils import timezone
has_timezone = True
except ImportError:
has_timezone = False
from wtforms import fields, widgets
from... |
viewportvr/daysinvr | refs/heads/master | backend/migrations/versions/29c431c803bc_.py | 1 | """empty message
Revision ID: 29c431c803bc
Revises: 938d2342e478
Create Date: 2019-07-17 16:31:08.485954
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '29c431c803bc'
down_revision = '938d2342e478'
branch_labels = None
depends_on = None
def upgrade():
# ... |
valkjsaaa/sl4a | refs/heads/master | python/src/Mac/Tools/fixapplepython23.py | 29 | #!/usr/bin/python
"""fixapplepython23 - Fix Apple-installed Python 2.3 (on Mac OS X 10.3)
Python 2.3 (and 2.3.X for X<5) have the problem that building an extension
for a framework installation may accidentally pick up the framework
of a newer Python, in stead of the one that was used to build the extension.
This scr... |
noellak/ace-iphone | refs/heads/master | tools/python/linphone-daemon.py | 32 | import argparse
import logging
import sys
import threading
import time
import linphone
class Response:
Ok = 0
Error = 1
def __init__(self, status, msg = ''):
self.status = status
if status == Response.Ok:
self.body = msg
self.reason = None
else:
self.body = None
self.reason = msg
def __str__(s... |
CydarLtd/ansible | refs/heads/devel | lib/ansible/modules/remote_management/wakeonlan.py | 60 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Dag Wieers <dag@wieers.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, ... |
pgmillon/ansible | refs/heads/devel | lib/ansible/module_utils/common/process.py | 73 | # Copyright (c) 2018, Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
from ansible.module_utils.common.file import is_executable
def get_bin_p... |
xhqu1981/pymatgen | refs/heads/master | pymatgen/analysis/tests/test_ewald.py | 3 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals
import unittest
import os
import warnings
from pymatgen.analysis.ewald import EwaldSummation, EwaldMinimizer
from pymatgen.io.vasp.inputs import Poscar
import numpy as ... |
seem-sky/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/unittest/test/test_assertions.py | 82 | import datetime
import warnings
import weakref
import unittest
from itertools import product
class Test_Assertions(unittest.TestCase):
def test_AlmostEqual(self):
self.assertAlmostEqual(1.00000001, 1.0)
self.assertNotAlmostEqual(1.0000001, 1.0)
self.assertRaises(self.failureException,
... |
goliveirab/odoo | refs/heads/8.0 | openerp/addons/test_convert/tests/test_convert.py | 382 | import collections
import unittest2
from lxml import etree as ET
from lxml.builder import E
from openerp.tests import common
from openerp.tools.convert import _eval_xml
Field = E.field
Value = E.value
class TestEvalXML(common.TransactionCase):
def eval_xml(self, node, obj=None, idref=None):
return _eval_... |
maestrano/openerp | refs/heads/mno-master | openerp/addons/point_of_sale/report/pos_receipt.py | 53 | # -*- 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... |
ruuk/script.module.youtube.dl | refs/heads/master | lib/youtube_dl/extractor/wsj.py | 30 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
int_or_none,
float_or_none,
unified_strdate,
)
class WSJIE(InfoExtractor):
_VALID_URL = r'''(?x)
(?:
https?://video-api\.wsj\.com/api-vid... |
pfmoore/sandbox | refs/heads/master | basicproject/{{cookiecutter.repo_name}}/tests/test_{{cookiecutter.repo_name}}.py | 1 | import {{cookiecutter.repo_name}}
def test_({{cookiecutter.repo_name}}):
"""A dummy test"""
assert True
|
saurabh6790/omni-libs | refs/heads/master | core/doctype/customize_form/customize_form.py | 34 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
"""
Customize Form is a Single DocType used to mask the Property Setter
Thus providing a better UI from user perspective
"""
import webnotes
from webnotes.utils import cstr
... |
Stavitsky/neutron | refs/heads/master | neutron/plugins/ml2/drivers/cisco/ucsm/mech_cisco_ucsm.py | 25 | # Copyright 2015 Cisco Systems, 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 requi... |
pfhayes/boto | refs/heads/develop | boto/pyami/installers/ubuntu/mysql.py | 153 | # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/
#
# 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 limitation the rights to use, copy, modi... |
nkhuyu/data-science-from-scratch | refs/heads/master | code/neural_networks.py | 54 | from __future__ import division
from collections import Counter
from functools import partial
from linear_algebra import dot
import math, random
import matplotlib
import matplotlib.pyplot as plt
def step_function(x):
return 1 if x >= 0 else 0
def perceptron_output(weights, bias, x):
"""returns 1 if the percep... |
gregtampa/coreemu | refs/heads/master | daemon/setup.py | 7 | # Copyright (c)2010-2012 the Boeing Company.
# See the LICENSE file included in this distribution.
import os, glob
from distutils.core import setup
from core.constants import COREDPY_VERSION
setup(name = "core-python",
version = COREDPY_VERSION,
packages = [
"core",
"core.addons",
... |
toshywoshy/ansible | refs/heads/devel | lib/ansible/modules/network/aci/mso_schema_template_filter_entry.py | 13 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
# 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_ve... |
gangadhar-kadam/sms-erpnext | refs/heads/master | support/report/maintenance_schedules/__init__.py | 12133432 | |
agfor/chipy.org | refs/heads/master | chipy_org/apps/profiles/__init__.py | 12133432 | |
shikhardb/scikit-learn | refs/heads/master | sklearn/neighbors/tests/test_ball_tree.py | 10 | import numpy as np
from numpy.testing import assert_array_almost_equal
from sklearn.neighbors.ball_tree import (BallTree, NeighborsHeap,
simultaneous_sort, kernel_norm,
nodeheap_sort, DTYPE, ITYPE)
from sklearn.neighbors.dist_metrics impo... |
Widiot/simpleblog | refs/heads/master | venv/lib/python3.5/site-packages/bleach/utils.py | 6 | from collections import OrderedDict
import six
def _attr_key(attr):
"""Returns appropriate key for sorting attribute names
Attribute names are a tuple of ``(namespace, name)`` where namespace can be
``None`` or a string. These can't be compared in Python 3, so we conver the
``None`` to an empty stri... |
ekmartin/mal | refs/heads/master | rpython/mal_types.py | 23 | import sys, copy, types as pytypes
# General functions
def _equal_Q(a, b):
assert isinstance(a, MalType) and isinstance(b, MalType)
ota, otb = a.__class__, b.__class__
if not (ota is otb or (_sequential_Q(a) and _sequential_Q(b))):
return False
if isinstance(a, MalSym) and isinstance(b, MalSym... |
thnee/ansible | refs/heads/devel | lib/ansible/modules/cloud/vmware/vmware_host_ssl_info.py | 21 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# 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 = {
'metadat... |
bugobliterator/ardupilot | refs/heads/master | Tools/ardupilotwaf/gbenchmark.py | 20 | #!/usr/bin/env python
# encoding: utf-8
"""
gbenchmark is a Waf tool for benchmark builds in Ardupilot
"""
from waflib import Build, Context, Task
from waflib.Configure import conf
from waflib.TaskGen import feature, before_method, after_method
from waflib.Errors import WafError
def configure(cfg):
env = cfg.env... |
lastralab/Statistics | refs/heads/master | Specialization/Dr. Chuck-s Code/twitter2.py | 2 | import urllib
import twurl
import json
TWITTER_URL = 'https://api.twitter.com/1.1/friends/list.json'
while True:
print ''
acct = raw_input('Enter Twitter Account:')
if ( len(acct) < 1 ) : break
url = twurl.augment(TWITTER_URL,
{'screen_name': acct, 'count': '5'} )
print 'Retrieving', url
... |
ismailsunni/inasafe | refs/heads/develop | safe/definitions/peta_bencana.py | 11 | # coding=utf-8
"""Definitions relating to API that used in Peta Bencana downloader."""
from safe.utilities.i18n import tr
__copyright__ = "Copyright 2016, The InaSAFE Project"
__license__ = "GPL version 3"
__email__ = "info@inasafe.org"
__revision__ = '$Format:%H$'
development_api = {
'key': 'development_api',
... |
goddardl/gaffer | refs/heads/master | python/GafferRenderManUI/InteractiveRenderManRenderUI.py | 2 | ##########################################################################
#
# Copyright (c) 2015, Image Engine Design 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:
#
# * Redistrib... |
michaellaier/pymor | refs/heads/master | src/pymor/playground/functions/__init__.py | 34 | # This file is part of the pyMOR project (http://www.pymor.org).
# Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
|
libkml/libkml | refs/heads/master | tests/swig/kmlengine_test.py | 2 | #!/usr/bin/env python
# Copyright 2008, 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:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list ... |
janusnic/21v-python | refs/heads/master | unit_07/dron/7.py | 1 | # -*- coding:utf-8 -*-
class Y:
"""The vertical motion of a ball."""
def __init__(self, v0):
self.v0 = v0
self.g = 9.81
def value(self, t):
return self.v0*t - 0.5*self.g*t**2
def formula(self):
return 'v0*t - 0.5*g*t**2; v0=%g' % self.v0
def diff(f, x, h=1E-10):
... |
MyMusicTaste/django-oscar-uplus | refs/heads/master | uplus/admin.py | 1 | from django.contrib import admin
from . import models
class UplusTransactionAdmin(admin.ModelAdmin):
list_display = ['amount', 'basket_id', 'timestamp', 'status', 'pay_type',]
readonly_fields = ['amount', 'status', 'pay_type', 'basket_id']
admin.site.register(models.UplusTransaction, UplusTransactionAd... |
sadig/DC2 | refs/heads/master | components/dc2-lib/dc2/lib/auth/helpers/__init__.py | 1 | # -*- coding: utf-8 -*-
#
# (DC)² - DataCenter Deployment Control
# Copyright (C) 2010, 2011, 2012, 2013, 2014 Stephan Adig <sh@sourcecode.de>
# 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; eit... |
rsalmond/seab-us | refs/heads/master | seabus/api/config.py | 2 | import os
import seabus
class Config(object):
PORT = 6000
DEBUG = False
TESTING = False
SQLALCHEMY_DATABASE_URI = 'sqlite://'
class Test(Config):
TESTING = True
class Dev(Config):
DEBUG=True
seabus_project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.p... |
Freestila/dosage | refs/heads/master | dosagelib/plugins/arcamax.py | 3 | # -*- coding: iso-8859-1 -*-
# Copyright (C) 2013-2014 Bastian Kleineidam
"""
Arcamax comic strips
"""
from re import compile
from ..scraper import make_scraper
from ..util import tagre
_imageSearch = compile(tagre("img", "data-zoom-image", r'(/newspics/[^"]+)'))
_prevSearch = compile(tagre("a", "href", r'(/[^"]+)', ... |
dylanseago/CommunityFund | refs/heads/master | server/communityfund/apps/home/models.py | 1 | from django.db import models
from django.contrib.auth.models import User
from datetime import datetime
from django.core.urlresolvers import reverse
from django.db.models import Sum
from communityfund.apps.home.templatetags.custom_tags import currency_filter
class DatedModel(models.Model):
created_on = models.Date... |
pepetreshere/odoo | refs/heads/patch-2 | addons/sales_team/models/res_partner.py | 5 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
team_id = fields.Many2one(
'crm.team', 'Sales Team',
help='If set, this Sales Team will be used for sale... |
mgpyh/django-fluent-comments | refs/heads/master | example/article/admin.py | 3 | from django.contrib import admin
from django.forms import ModelForm
from article.models import Article
# The timezone support was introduced in Django 1.4, fallback to standard library for 1.3.
try:
from django.utils.timezone import now
except ImportError:
from datetime import datetime
now = datetime.now
... |
DigitalCampus/django-nurhi-oppia | refs/heads/master | oppia/utils/__init__.py | 12133432 | |
nirtiac/network_modularity | refs/heads/master | network_modularity/__init__.py | 12133432 | |
alistair-broomhead/robotframework-selenium2library | refs/heads/master | test/unit/keywords/__init__.py | 12133432 | |
erikr/django | refs/heads/master | tests/choices/__init__.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.