repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
boompieman/iim_project
refs/heads/master
project_python2/lib/python2.7/site-packages/nbconvert/utils/tests/test_pandoc.py
11
"""Test Pandoc module""" #----------------------------------------------------------------------------- # Copyright (C) 2014 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #----------------------------...
Kalyzee/edx-platform
refs/heads/master
cms/djangoapps/contentstore/features/common.py
42
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name import os from lettuce import world, step from nose.tools import assert_true, assert_in # pylint: disable=no-name-in-module from django.conf import settings from student.roles import CourseStaffRole, CourseInstructorRole, GlobalStaff from stu...
takaaptech/sky_engine
refs/heads/master
build/android/pylib/gtest/test_options.py
33
# Copyright 2013 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. """Defines the GTestOptions named tuple.""" import collections GTestOptions = collections.namedtuple('GTestOptions', [ 'tool', 'gtest_filter', ...
home-assistant/home-assistant
refs/heads/dev
tests/components/flick_electric/test_config_flow.py
2
"""Test the Flick Electric config flow.""" import asyncio from unittest.mock import patch from pyflick.authentication import AuthException from homeassistant import config_entries, data_entry_flow, setup from homeassistant.components.flick_electric.const import DOMAIN from homeassistant.const import CONF_PASSWORD, CO...
ckuethe/gnuradio
refs/heads/master
gr-filter/python/filter/gui/banditems.py
47
# Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # # G...
TrapKingg/Tescha-books
refs/heads/master
comments/apps.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class CommentsConfig(AppConfig): name = 'comments'
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/tests/mail/custombackend.py
428
"""A custom backend for testing.""" from django.core.mail.backends.base import BaseEmailBackend class EmailBackend(BaseEmailBackend): def __init__(self, *args, **kwargs): super(EmailBackend, self).__init__(*args, **kwargs) self.test_outbox = [] def send_messages(self, email_messages): ...
flyfei/python-for-android
refs/heads/master
python-build/python-libs/gdata/samples/webmastertools/AddDeleteExampleDotCom.py
128
#!/usr/bin/python # # Copyright (C) 2008 Yu-Jie Lin # # 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 o...
AXAz0r/apex-sigma-core
refs/heads/master
sigma/modules/moderation/server_settings/custom_commands/addcommand.py
3
import discord async def addcommand(cmd, message, args): if message.author.permissions_in(message.channel).manage_guild: if args: if len(args) >= 2: trigger = args[0].lower() if trigger not in cmd.bot.modules.commands and trigger not in cmd.bot.modules.alts: ...
2014c2g4/2015cda_g7
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/importlib/abc.py
743
"""Abstract base classes related to import.""" from . import _bootstrap from . import machinery try: import _frozen_importlib except ImportError as exc: if exc.name != '_frozen_importlib': raise _frozen_importlib = None import abc import imp import marshal import sys import tokenize import warnings ...
vnl/doom3.gpl
refs/heads/master
neo/sys/gllog/logfunc.py
62
#!/usr/bin/env python # generate logging code # this requires an analysis of the parameters for verbose and do actual call import sys, string, re from read import read_gl def do_logfunc(f_in, f_out): (gl, wgl, glX) = read_gl(f_in) for l in (gl, glX): for t in l: # process ret type to strip trailing spaces ...
crocodoc/graphite
refs/heads/master
carbon/lib/carbon/rewrite.py
4
import re class RewriteRuleManager: def __init__(self): self.preRules = [] self.postRules = [] def read_from(self, path): pre = [] post = [] section = None for line in open(path): line = line.strip() if line.startswith('#') or not line: continue if line.startsw...
msebire/intellij-community
refs/heads/master
python/testData/inspections/PyDataclassInspection/defaultFieldValue.py
18
import dataclasses from typing import ClassVar, Dict, List, Set, Tuple, Type from collections import OrderedDict @dataclasses.dataclass class A: a: List[int] = <error descr="Mutable default '[]' is not allowed. Use 'default_factory'">[]</error> b: List[int] = <error descr="Mutable default 'list()' is not allo...
vpv11110000/pyss
refs/heads/master
pyss/assemble.py
1
# #!/usr/bin/python # -*- coding: utf-8 -*- """ Модуль блока объединения транзактов, принадлежащих одному семейству (или ансамблю) """ # pylint: disable=line-too-long from pyss import pyssobject from pyss.pyss_const import * from pyss.block import Block from pyss import options from pyss import logger class Assembl...
Pablo126/SSBW
refs/heads/master
Entrega1/lib/python3.5/site-packages/django/contrib/postgres/forms/ranges.py
132
from psycopg2.extras import DateRange, DateTimeTZRange, NumericRange from django import forms from django.core import exceptions from django.forms.widgets import MultiWidget from django.utils.translation import ugettext_lazy as _ __all__ = ['IntegerRangeField', 'FloatRangeField', 'DateTimeRangeField', 'DateRangeField...
watspidererik/testenv
refs/heads/master
flask/lib/python2.7/site-packages/sqlalchemy/sql/type_api.py
32
# sql/types_api.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Base types API. """ from .. import exc, util from . import operators from .vi...
soonho-tri/dreal4
refs/heads/master
dreal/test/python/util_test.py
2
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from dreal import * import unittest import math x = Variable("x") y = Variable("y") z = Variable("z") inf = float("inf") class IntervalTest(unittest.TestCase): def test_construct...
bongtrop/peach
refs/heads/master
peach/ga/__init__.py
6
################################################################################ # Peach - Computational Intelligence for Python # Jose Alexandre Nalon # # This file: ga/__init__.py # Makes the ga directory a python package and initializes it. ############################################################################...
sowbiba/ansible
refs/heads/devel
test/units/playbook/test_taggable.py
293
# (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...
darknighte/linux
refs/heads/master
tools/perf/scripts/python/event_analyzing_sample.py
4719
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
minhphung171093/OpenERP_V7
refs/heads/master
openerp/modules/loading.py
16
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2013 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
pyphrb/myweb
refs/heads/master
app/plugin/nmap/libnmap/objects/service.py
1
# -*- coding: utf-8 -*- from libnmap.diff import NmapDiff from libnmap.objects.os import CPE class NmapService(object): """ NmapService represents a nmap scanned service. Its id() is comprised of the protocol and the port. Depending on the scanning options, some additional details might b...
wanggang3333/scikit-learn
refs/heads/master
sklearn/metrics/cluster/tests/test_supervised.py
206
import numpy as np from sklearn.metrics.cluster import adjusted_rand_score from sklearn.metrics.cluster import homogeneity_score from sklearn.metrics.cluster import completeness_score from sklearn.metrics.cluster import v_measure_score from sklearn.metrics.cluster import homogeneity_completeness_v_measure from sklearn...
broferek/ansible
refs/heads/devel
test/units/modules/network/fortimanager/test_fmgr_fwobj_ippool.py
38
# Copyright 2018 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 License, or # (at your option) any later version. # # This program is distributed in the...
rajul/Pydev
refs/heads/development
plugins/org.python.pydev/tests/pysrc/extendable/invalid-module.py
22
#This is an invalid module!!! (the name is not valid)
smartfile/django-1.4
refs/heads/master
django/contrib/auth/tests/decorators.py
251
from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.auth.tests.views import AuthViewsTestCase class LoginRequiredTestCase(AuthViewsTestCase): """ Tests the login_required decorators """ urls = 'django.contrib.auth.tests.urls' def testCalla...
noironetworks/nova
refs/heads/master
nova/quota.py
49
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
koniiiik/django
refs/heads/master
tests/dates/tests.py
21
from __future__ import unicode_literals import datetime from unittest import skipUnless from django.core.exceptions import FieldError from django.db import connection from django.test import TestCase, override_settings from .models import Article, Category, Comment class DatesTests(TestCase): def test_related_...
waymao/SU-System
refs/heads/master
clubs/urls.py
1
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^(?P<club_hash>[a-zA-Z0-9_.+]+)/$', views.detailed, name='detail'), url(r'^(?P<club_hash>[a-zA-Z0-9_.+]+)/edit/$', views.edit, name='edit'), url(r'^new$', views.add_new, name='add') ]
meteorcloudy/tensorflow
refs/heads/master
tensorflow/contrib/framework/python/framework/__init__.py
61
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Healthedata1/Slides
refs/heads/gh-pages
node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
960
# 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. # Notes: # # This generates makefiles suitable for inclusion into the Android build system # via an Android.mk file. It is based on make.py, the standard makefile ...
nativecode-dev/nas-scripts
refs/heads/master
pyscripts/python_nas/networking/interfaces.py
1
import os import re import subprocess import urllib2 # Returns 3 groups: 1) Name 2) Link 3) Loopback or HWaddr REGEX_INTERFACE=re.compile('(.*)\s+Link encap:(.*)\s+(Loopback|HWaddr\s.*)') REGEX_ADDR_INET=re.compile('inet addr:((\d{1,3}\.?){4})') REGEX_ADDR_MASK=re.compile('Mask:((\d{1,3}\.?){4})') REGEX_ADDR_PTP=re.co...
izonder/intellij-community
refs/heads/master
python/testData/paramInfo/BoundMethodSimple.py
83
class A(object): def foo(self, a, b): pass f = A().foo f(<arg1>1, <arg2>2)
jskew/gnuradio
refs/heads/master
gr-blocks/python/blocks/qa_head.py
57
#!/usr/bin/env python # # Copyright 2004,2007,2010,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
alexmoratalla/yambo-py
refs/heads/master
scripts/realtime/drafts/rt-ypp.py
6
from __future__ import print_function from yambopy import * from schedulerpy import * import sys import glob import argparse """ Automation of ypp_rt calls. - Spectra : BSE spectra of real-time simulations (NOT on time t) - Occupation : Calculates occupation at different times """ parser = argparse.Argument...
dulems/hue
refs/heads/master
desktop/core/ext-py/pytidylib-0.2.1/tests/threadsafety.py
38
# Copyright 2009 Jason Stitt # # 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, modify, merge, publish, distribute...
devanshdalal/scikit-learn
refs/heads/master
sklearn/metrics/scorer.py
33
""" The :mod:`sklearn.metrics.scorer` submodule implements a flexible interface for model selection and evaluation using arbitrary score functions. A scorer object is a callable that can be passed to :class:`sklearn.model_selection.GridSearchCV` or :func:`sklearn.model_selection.cross_val_score` as the ``scoring`` par...
erichilarysmithsr/givinggraph
refs/heads/master
givinggraph/guidestar/extract.py
3
import requests import givinggraph.config from collections import namedtuple Nonprofit = namedtuple('Nonprofit', 'ein name impact financials people guidestar_org_id') Person = namedtuple('Person', 'firstname middlename lastname title compensation') Financials = namedtuple('Financials', 'total_revenue total_assets prog...
sposh-science/pycode-browser
refs/heads/master
Code/Maths/Calculus/euler.py
1
#Euler integration import math h = 0.01 # stepsize x = 0.0 # initail values y = 0.0 while x < math.pi: print( x, y, math.sin(x) ) y = y + h * math.cos(x) # Euler method x = x + h
menpo/menpo
refs/heads/master
menpo/math/test/test_decomposition_base.py
2
import numpy as np from numpy.testing import assert_almost_equal from menpo.math import eigenvalue_decomposition, pca, ipca # Positive semi-definite matrix cov_matrix = np.array([[3, 1], [1, 3]]) # Data values taken from: # http://www.cs.otago.ac.nz/cosc453/student_tutorials/principal_components.pdf # Tested values ar...
Ichimonji10/gurps-manager
refs/heads/master
apps/main/views.py
1
"""Business logic for all URLs in the ``main`` application. For details on what each function is responsible for, see module ``main.urls`` That module documents both URL-to-function mappings and the exact responsiblities of each function. """ from django.core import urlresolvers from django import http def index(req...
Sing-Li/go-buildpack
refs/heads/master
builds/runtimes/python-2.7.6/lib/python2.7/encodings/cp864.py
593
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP864.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
DazWorrall/ansible
refs/heads/devel
lib/ansible/executor/stats.py
38
# (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...
ciscochina/netseen
refs/heads/master
netseen/collector/bgp/handler.py
3
# Copyright 2015-2017 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 req...
xuweiliang/Codelibrary
refs/heads/master
openstack_dashboard/dashboards/project/images/images/tables.py
1
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
henningpohl/Arduino
refs/heads/master
arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/packages/__init__.py
2161
from __future__ import absolute_import from . import ssl_match_hostname
apixandru/intellij-community
refs/heads/master
python/testData/completion/classNameInDocstring.py
48
class MyClass: pass def f(x): """ @param x: @type x: MyC<caret> """
HyperBaton/ansible
refs/heads/devel
lib/ansible/modules/network/cloudengine/ce_evpn_global.py
13
#!/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...
rlc2/pygame_maker
refs/heads/master
pygame_maker/tests/test_code_block.py
1
#!/usr/bin/env python """ Author: Ron Lockwood-Childs Licensed under LGPL v2.1 (see file COPYING for details) Unit test the pygame_maker.logic.code_block module. """ import imp import logging import unittest from pyparsing import ParseException, ParseFatalException from pygame_maker.events.event import Event from py...
dreamsxin/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_format.py
84
from test.support import verbose, TestFailed import locale import sys import test.support as support import unittest maxsize = support.MAX_Py_ssize_t # test string formatting operator (I am not sure if this is being tested # elsewhere but, surely, some of the given cases are *not* tested because # they crash python) ...
ppapadeas/wprevents
refs/heads/master
wprevents/events/utils.py
2
def add_filter(dict, field, filter, value): '''Conditionally add a filter to a dict if value is set''' if value: dict['{0}__{1}'.format(field, filter)] = value
apnarm/cloudmetrics
refs/heads/master
cloudmetrics/backends/test_backend.py
2
from cloudmetrics.backends import MetricsBackend class TestMetricsBackend(MetricsBackend): """ A backend used for testing purposes. It puts everything onto a list which can be inspected. """ def __init__(self, *args, **kwargs): super(TestMetricsBackend, self).__init__(*args, **kwargs) ...
sorenh/tempest-lib
refs/heads/master
doc/source/conf.py
8
# -*- 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...
Avsecz/keras-hyperopt
refs/heads/master
kopt/eval_metrics.py
1
"""Global evaluation metrics. Simular to metrics.py but not restricted to keras backend (TensorFlow, Theano) implementation. Hence they allow for metrics that are not batch-limited as auc, f1 etc... See also https://github.com/fchollet/keras/issues/5794 """ from __future__ import absolute_import from __future__ import...
aavrug/askbot-devel
refs/heads/master
askbot/conf/vote_rules.py
1
""" Forum configuration settings detailing rules on votes and offensive flags. For example number of times a person can vote each day, etc. """ from askbot.conf.settings_wrapper import settings from askbot.deps.livesettings import ConfigurationGroup, IntegerValue from django.utils.translation import ugettext as _ VOT...
laanwj/deluge
refs/heads/wumpus
tests/test_core.py
1
from twisted.trial import unittest from twisted.python.failure import Failure try: from hashlib import sha1 as sha except ImportError: from sha import sha import common from deluge.core.rpcserver import RPCServer from deluge.core.core import Core import deluge.component as component import deluge.error clas...
loveshell/sleepy-puppy
refs/heads/master
setup.py
13
# Copyright 2015 Netflix, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
aaron-fz/neutron_full_sync
refs/heads/full-sync
neutron/tests/unit/services/loadbalancer/drivers/embrane/test_embrane_defaults.py
8
# Copyright 2013 Embrane, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
voyagersearch/voyager-py
refs/heads/master
processing/tasks/mosaic_to_workspace.py
1
# -*- coding: utf-8 -*- # (C) Copyright 2014 Voyager Search # # 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 l...
wong2/gunicorn
refs/heads/master
tests/requests/valid/008.py
40
request = { "method": "GET", "uri": uri("/unusual_content_length"), "version": (1, 0), "headers": [ ("CONTENT-LENGTH", "5") ], "body": b"HELLO" }
aaronzirbes/ansible
refs/heads/devel
v1/ansible/runner/action_plugins/patch.py
93
# (c) 2015, Brian Coca <briancoca+dev@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 later v...
noba3/KoTos
refs/heads/master
addons/script.module.pyamf/lib/pyamf/tests/gateway/test_django.py
26
# -*- coding: utf-8 -*- # # Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Django gateway tests. @since: 0.1.0 """ import unittest import sys import os try: from django import http from pyamf.remoting.gateway import django except ImportError: django = None import pyamf from pyamf i...
shahankhatch/scikit-learn
refs/heads/master
doc/tutorial/machine_learning_map/parse_path.py
275
#!/usr/local/bin/python """ Based on: http://wxpsvg.googlecode.com/svn/trunk/svg/pathdata.py According to that project, this file is licensed under the LGPL """ try: from pyparsing import (ParserElement, Literal, Word, CaselessLiteral, Optional, Combine, Forward, ZeroOrMore, nums, oneOf, Group, Pa...
svschannak/openslides-templates-pmv
refs/heads/master
openslides/participant/urls.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- """ openslides.participant.urls ~~~~~~~~~~~~~~~~~~~~~~~~~~~ URL list for the participant app. :copyright: 2011 by the OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ from django.conf.urls.defaults import * from djang...
JLJTECH/TutorialTesting
refs/heads/master
CodeWars/2016/MakeAcronym-7k.py
1
#Create an acronym from an imput sentance def to_acronym(input): return "".join(i[0].upper() for i in input.split()) #Alternate solution def to_acronym(input): return ''.join(word[0] for word in input.split()).upper()
pvanhoof/kernel
refs/heads/chromeos-3.4-option-gobi
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
# Core.py - Python extension for perf script, core functions # # 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. from collections import defaultdict def aut...
darjeeling/k-board
refs/heads/master
kboard/accounts/admin.py
4
from django import forms from django.contrib import admin from django.contrib.auth.models import Group from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.forms import ReadOnlyPasswordHashField from .models import Account class UserCreationForm(forms.ModelForm): password1 = ...
sirivan/piTempTelegramBot
refs/heads/master
server.py
1
# -*- coding: utf-8 -*- # This bot was made specifically for the pyTelegramAPI Telegram chat, # and goes by the name 'TeleBot (@pyTeleBot)'. Join our group to talk to him! # WARNING: Tested with Python 2.7 import telebot from random import randint import os import glob import time import re timesPattern = "^times (\d+...
nagyistoce/devide
refs/heads/master
modules/filters/contour.py
7
from module_base import ModuleBase from module_mixins import ScriptedConfigModuleMixin import module_utils import vtk class contour(ScriptedConfigModuleMixin, ModuleBase): def __init__(self, module_manager): # call parent constructor ModuleBase.__init__(self, module_manager) self._conto...
cosmicAsymmetry/zulip
refs/heads/master
zerver/lib/html_diff.py
9
from __future__ import absolute_import from typing import Callable, Tuple, Text from django.conf import settings from diff_match_patch import diff_match_patch import platform import logging # TODO: handle changes in link hrefs def highlight_with_class(klass, text): # type: (Text, Text) -> Text return '<spa...
indictranstech/trufil-erpnext
refs/heads/master
erpnext/setup/doctype/sales_partner/test_sales_partner.py
104
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe test_records = frappe.get_test_records('Sales Partner')
tpalsulich/AutoAck
refs/heads/master
autoack.py
1
''' Copyright 2014 Tyler Palsulich 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, softwar...
robotpilot/robomongo
refs/heads/master
tests/gtest-1.7.0/test/gtest_throw_on_failure_test.py
2917
#!/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...
instinct-vfx/rez
refs/heads/master
src/rez/package_help.py
2
from __future__ import print_function from rez.packages_ import iter_packages from rez.config import config from rez.rex_bindings import VersionBinding from rez.utils.system import popen from rez.utils.backcompat import convert_old_command_expansions from rez.utils.scope import scoped_formatter from rez.system import ...
admire93/youtube-dl
refs/heads/master
youtube_dl/extractor/onionstudios.py
109
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import determine_ext class OnionStudiosIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?onionstudios\.com/(?:videos/[^/]+-|embed\?.*\bid=)(?P<id>\d+)(?!-)' _TESTS = [{ 'url': 'http:/...
zhanghenry/stocks
refs/heads/master
django/contrib/messages/constants.py
837
DEBUG = 10 INFO = 20 SUCCESS = 25 WARNING = 30 ERROR = 40 DEFAULT_TAGS = { DEBUG: 'debug', INFO: 'info', SUCCESS: 'success', WARNING: 'warning', ERROR: 'error', } DEFAULT_LEVELS = { 'DEBUG': DEBUG, 'INFO': INFO, 'SUCCESS': SUCCESS, 'WARNING': WARNING, 'ERROR': ERROR, }
newyork167/volatility
refs/heads/master
volatility/plugins/overlays/windows/win7.py
54
# Volatility # Copyright (c) 2008-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...
dvliman/jaikuengine
refs/heads/master
.google_appengine/lib/django-1.4/django/core/management/commands/sqlclear.py
90
from optparse import make_option from django.core.management.base import AppCommand from django.core.management.sql import sql_delete from django.db import connections, DEFAULT_DB_ALIAS class Command(AppCommand): help = "Prints the DROP TABLE SQL statements for the given app name(s)." option_list = AppComman...
CloCkWeRX/rabbitvcs-svn-mirror
refs/heads/master
rabbitvcs/vcs/mercurial/util.py
3
# # This is an extension to the Nautilus file manager to allow better # integration with the Subversion source control system. # # Copyright (C) 2006-2008 by Jason Field <jason@jasonfield.com> # Copyright (C) 2007-2008 by Bruce van der Kooij <brucevdkooij@gmail.com> # Copyright (C) 2008-2010 by Adam Plumb <adamplumb@...
roverdotcom/suds
refs/heads/master
suds/cache.py
25
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
Pointedstick/ReplicatorG
refs/heads/master
skein_engines/skeinforge-31/fabmetheus_utilities/hidden_scrollbar.py
8
""" Hidden scrollbar is in its own file so that even if Tkinter is not installed, settings can still be imported. """ from __future__ import absolute_import #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module. imp...
dharmabumstead/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/svr4pkg.py
95
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Boyd Adamson <boyd () boydadamson.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_version': '1...
jeremybmerrill/hdaps_theftalarm
refs/heads/master
alarm.py
1
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright 2009-2012 Canonical Ltd. # # Authors: Neil Jagdish Patel <neil.patel@canonical.com> # Jono Bacon <jono@ubuntu.com> # David Planella <david.planella@ubuntu.com> # Janitha Karunaratne <janitha@janitha.com> (for alarm code) # J...
rackerlabs/instrumented-ceilometer
refs/heads/master
ceilometer/tests/dispatcher/test_file.py
1
# -*- encoding: utf-8 -*- # # Copyright © 2013 IBM Corp # # Author: Tong Li <litong01@us.ibm.com> # # 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/LICEN...
tjsavage/rototutor_djangononrel
refs/heads/master
django/views/generic/simple.py
245
from django.template import loader, RequestContext from django.http import HttpResponse, HttpResponseRedirect, HttpResponsePermanentRedirect, HttpResponseGone from django.utils.log import getLogger import warnings warnings.warn( 'Function-based generic views have been deprecated; use class-based views instead.', ...
mortada/tensorflow
refs/heads/master
tensorflow/examples/learn/iris_custom_decay_dnn.py
30
# 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 appl...
MichaelAquilina/numpy
refs/heads/master
numpy/lib/tests/test_arraysetops.py
114
"""Test functions for 1D array set operations. """ from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import ( run_module_suite, TestCase, assert_array_equal, assert_equal ) from numpy.lib.arraysetops import ( ediff1d, intersect1d, setxor1d, union1d, set...
ahnitz/pycbc-glue
refs/heads/master
glue/iterutils.py
3
# Copyright (C) 2007,2008,2010--2014 Kipp Cannon, Nickolas Fotopoulos # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version....
Pixyn25/blakecoin_p2pool
refs/heads/master
SOAPpy/SOAPBuilder.py
289
""" ################################################################################ # Copyright (c) 2003, Pfizer # Copyright (c) 2001, Cayce Ullman. # Copyright (c) 2001, Brian Matthews. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provid...
retomerz/intellij-community
refs/heads/master
python/testData/completion/completeBeforeSyntaxError.py
83
def foo(): if xy<caret> def xyzzy(): pass
wazo-pbx/xivo-auth
refs/heads/master
alembic/versions/c62c91eb4824_add_the_acl_to_manage_profiles.py
1
"""add the ACL to manage profiles Revision ID: c62c91eb4824 Revises: e2fb0a6b62a7 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'c62c91eb4824' down_revision = 'e2fb0a6b62a7' POLICY_NAME = 'wazo_default_admin_policy' ACL_TEMPLATES = ['dird.profiles.#'] polic...
dannyperry571/theapprentice
refs/heads/master
script.module.youtube.dl/lib/youtube_dl/extractor/rtlnl.py
14
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, parse_duration, ) class RtlNlIE(InfoExtractor): IE_NAME = 'rtl.nl' IE_DESC = 'rtl.nl and rtlxl.nl' _VALID_URL = r'''(?x) https?://(?:www\.)? (?: ...
rabarona/incubator-spot
refs/heads/master
spot-setup/migration/migrate_old_proxy_data.py
7
#!/bin/env 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 "Licens...
dencaval/swift
refs/heads/master
test/unit/account/test_reaper.py
11
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
andyzsf/edx
refs/heads/master
lms/envs/bok_choy.py
3
""" Settings for bok choy tests """ import os from path import path from tempfile import mkdtemp CONFIG_ROOT = path(__file__).abspath().dirname() # pylint: disable=no-value-for-parameter TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" ########################## Prod-like settings #########################...
Chilledheart/seahub
refs/heads/master
seahub/base/mixins.py
6
from django.utils.decorators import method_decorator from seahub.auth.decorators import login_required # from base.decorators import ctx_switch_required class LoginRequiredMixin(object): """ View mixin which verifies that the user has authenticated. NOTE: This should be the left-most mixin of a view...
h3llrais3r/SickRage
refs/heads/master
lib/requests/exceptions.py
155
# -*- coding: utf-8 -*- """ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. """ from .packages.urllib3.exceptions import HTTPError as BaseHTTPError class RequestException(IOError): """There was an ambiguous exception that occurred while handling your request. ...
Bismarrck/tensorflow
refs/heads/master
tensorflow/contrib/tensorboard/plugins/projector/projector_api_test.py
94
# 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...
roymuste/idapython
refs/heads/master
Scripts/CallStackWalk.py
18
""" A script that tries to determine the call stack Run the application with the debugger, suspend the debugger, select a thread and finally run the script. Copyright (c) 1990-2009 Hex-Rays ALL RIGHTS RESERVED. v1.0 - initial version v1.0.1 - added stack segment bitness detection, thus works with 64bit processes t...
drawks/ansible
refs/heads/devel
lib/ansible/modules/web_infrastructure/ansible_tower/tower_workflow_template.py
12
#!/usr/bin/python # coding: utf-8 -*- # Copyright: (c) 2018, Adrien Fleury <fleu42@gmail.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 = {'status': ['preview'], ...