repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
wangjun/Bookie
refs/heads/develop
bookie/tests/test_lib/test_readable.py
8
"""Test the function of the readable library.""" from unittest import TestCase from bookie.lib import readable class TestReadUrl(TestCase): """Verify ReadUrl functions""" def setUp(self): """Setup Tests""" pass def tearDown(self): """Tear down each test""" pass def ...
chrisglass/django-shop-simplecategories
refs/heads/master
shop_simplecategories/migrations/0002_auto__add_field_category_order.py
1
# 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): # Adding field 'Category.order' db.add_column('shop_simplecategories_category', 'order', self.gf('django.d...
hashworks/CouchPotatoServer
refs/heads/forkDev
libs/enzyme/real.py
180
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # Copyright 2003-2006 Thomas Schueppel <stain@acm.org> # Copyright 2003-2006 Dirk Meyer <dischi@freevo.org> # # This file is part of enzyme. # # enzyme is free software; you can redistribute it and/or mod...
dsolimando/Hot
refs/heads/master
hot-jython-modules/src/main/resources/test/test_codecencodings_hk.py
19
#!/usr/bin/env python # # test_codecencodings_hk.py # Codec encoding tests for HongKong encodings. # from test import test_support from test import test_multibytecodec_support import unittest class Test_Big5HKSCS(test_multibytecodec_support.TestBase, unittest.TestCase): encoding = 'big5hkscs' tstring = test...
govro/ckanext-inventory
refs/heads/master
ckanext/inventory/controllers/user.py
1
import random from ckan.controllers.user import UserController from ckanext.inventory.lib.mailer import send_activate_user_notification import ckan.lib.base as base import ckan.lib.captcha as captcha import ckan.lib.helpers as h import ckan.lib.navl.dictization_functions as dictization_functions import ckan.logic as ...
Agana/MyBlogAgain
refs/heads/master
django/core/mail/__init__.py
229
""" Tools for sending email. """ from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module # Imported for backwards compatibility, and for the sake # of a cleaner namespace. These symbols used to be in # django/core/mail.py before the int...
manuelfelipe/openstack-ansible
refs/heads/master
doc/source/conf.py
7
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # openstack-ansible documentation build configuration file, created by # sphinx-quickstart on Mon Apr 13 20:42:26 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in...
PuzzleboxIO/brainstorms-python
refs/heads/master
Puzzlebox/Brainstorms/Server.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Puzzlebox - Brainstorms - Network - Server # # Copyright Puzzlebox Productions, LLC (2010-2012) # # This code is released under the GNU Pulic License (GPL) version 2 # For more information please refer to http://www.gnu.org/copyleft/gpl.html __changelog__ = """\ Last U...
da1z/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/db/models/loading.py
308
"Utilities for loading models and the modules that contain them." from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.datastructures import SortedDict from django.utils.importlib import import_module from django.utils.module_loading import module_has_submodule im...
tellapart/ubuntu-precise
refs/heads/master
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...
Atos-FiwareOps/fiware-maintenance-calendar-api
refs/heads/master
maintenance_calendar/validator/concrete_validators/json_validator.py
1
from jsonschema import Draft4Validator from maintenance_calendar.validator.validator import Validator import json from jsonschema.exceptions import ValidationError class JSONValidator(Validator): def validate(self, data): with open(self.schema_file) as json_data: schema = json.load(json_data) ...
ddv2005/intercom
refs/heads/master
3rdparty/pjproject/tests/pjsua/scripts-sendto/500_pres_subscribe_with_bad_event.py
59
# $Id: 500_pres_subscribe_with_bad_event.py 2273 2008-09-11 10:25:51Z bennylp $ import inc_sip as sip import inc_sdp as sdp # Ticket http://trac.pjsip.org/repos/ticket/623, based on # http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2008-September/004709.html: # # Assertion when receiving SUBSCRIBE with non-pres...
UT-CWE/Hyospy
refs/heads/master
Hyospy_ensemble/lib/SUNTANS/Utils/mypandas.py
1
""" Extensions to the wonderful Pandas module """ import pandas as pd from scipy import signal import numpy as np def godin(phi): """ Godin type filter of a time series """ dt = get_dt(phi) window24 = 24.*3600//dt window25 = 25.*3600//dt phi_f = pd.rolling_mean(phi,window24,center=True) ...
datapythonista/pandas
refs/heads/master
pandas/tests/frame/methods/test_tz_localize.py
4
import numpy as np import pytest from pandas import ( DataFrame, Series, date_range, ) import pandas._testing as tm class TestTZLocalize: # See also: # test_tz_convert_and_localize in test_tz_convert def test_tz_localize(self, frame_or_series): rng = date_range("1/1/2011", periods=10...
kmonsoor/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/plat-os2emx/grp.py
57
# this module is an OS/2 oriented replacement for the grp standard # extension module. # written by Andrew MacIntyre, April 2001. # updated July 2003, adding field accessor support # note that this implementation checks whether ":" or ";" as used as # the field separator character. """Replacement for grp standard ex...
simonwydooghe/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/_gcp_healthcheck.py
29
#!/usr/bin/python # Copyright 2017 Google Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['deprecated']...
liquidinstruments/pymoku
refs/heads/master
pymoku/_arbwavegen.py
1
import math import logging import struct from pymoku._instrument import ADC_SMP_RATE, needs_commit, deprecated from pymoku._instrument import to_reg_bool, from_reg_bool from pymoku._instrument import to_reg_signed, from_reg_signed from pymoku._instrument import to_reg_unsigned, from_reg_unsigned from pymoku._instrumen...
jason-zhangquan/bootstrap
refs/heads/master
test-infra/s3_cache.py
2166
#!/usr/bin/env python2.7 # pylint: disable=C0301 from __future__ import absolute_import, unicode_literals, print_function, division from sys import argv from os import environ, stat, chdir, remove as _delete_file from os.path import dirname, basename, abspath, realpath, expandvars from hashlib import sha256 from subpr...
BT-astauder/odoo
refs/heads/8.0
addons/portal/tests/test_portal.py
116
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
mistercrunch/airflow
refs/heads/master
tests/www/test_security.py
3
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
travisfcollins/gnuradio
refs/heads/master
gr-utils/python/utils/pyqt_filter.py
87
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pyqt_filter.ui' # # Created: Thu Mar 17 10:51:17 2011 # by: PyQt4 UI code generator 4.7.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_MainWindow(object): def setupUi(self, Main...
int-0/ssh-proxy
refs/heads/master
src/sshv2.py
1
#!/usr/bin/env python ''' SSHv2 Proxy classes ''' __version__ = '0.0.1' __author__ = 'Tobias Diaz' __email__ = 'tobias.deb@gmail.com' __license__ = 'GPLv3' import socket import logging import tempfile import threading import traceback import paramiko import paramiko.server # Logging _DEB = logging.debug _ERR = logg...
mmauroy/SickRage
refs/heads/master
lib/mako/compat.py
73
import sys import time py3k = sys.version_info >= (3, 0) py33 = sys.version_info >= (3, 3) py2k = sys.version_info < (3,) py26 = sys.version_info >= (2, 6) jython = sys.platform.startswith('java') win32 = sys.platform.startswith('win') pypy = hasattr(sys, 'pypy_version_info') if py3k: from io import StringIO ...
jmesteve/saas3
refs/heads/master
openerp/addons/account/wizard/account_report_aged_partner_balance.py
4
# -*- 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...
verifiedpixel/superdesk
refs/heads/master
server/apps/archive/archive_link.py
3
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from flask i...
reven86/dfg-amy-editor
refs/heads/master
src/scanxmlfile.py
1
"""Scans all XML files in a sub-directory and output all found values for a given node/attribute.""" from __future__ import with_statement import os.path import optparse import sys import xml.etree.ElementTree OCCURRENCE_TYPE_NODE = 'NODE' OCCURRENCE_TYPE_ATTRIBUTE = 'ATTRIBUTE' def find_xml_attribute_value( xml_data...
hgiemza/DIRAC
refs/heads/integration
Core/scripts/dirac-platform.py
5
#!/usr/bin/env python ######################################################################## # File : dirac-platform # Author : Adria Casajus ######################################################################## __RCSID__ = "$Id$" try: from DIRAC.Core.Utilities.Platform import getPlatformString except: imp...
mancoast/CPythonPyc_test
refs/heads/master
fail/341_test_reprlib.py
84
""" Test cases for the repr module Nick Mathewson """ import sys import os import shutil import importlib import importlib.util import unittest from test.support import run_unittest, create_empty_file, verbose from reprlib import repr as r # Don't shadow builtin repr from reprlib import Repr from reprlib import r...
suxinde2009/zulip
refs/heads/master
zilencer/management/commands/sync_api_key.py
114
from __future__ import absolute_import from django.core.management.base import BaseCommand from zerver.models import get_user_profile_by_email import os from ConfigParser import SafeConfigParser class Command(BaseCommand): help = """Reset all colors for a person to the default grey""" def handle(self, *args,...
thozza/sensor-net-proxy
refs/heads/master
sensor_net_proxy/exceptions.py
1
# -*- coding: utf-8 -*- # # Modular sensors network <-> controller proxy # Copyright (C) 2014-2015 Tomas Hozza <thozza@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # he Free Software Foundation; either version...
varunagrawal/azure-services
refs/heads/master
varunagrawal/VarunWeb/env/Lib/site-packages/django/contrib/gis/__init__.py
228
from django.utils import six if six.PY3: memoryview = memoryview else: memoryview = buffer
Titulacion-Sistemas/PythonTitulacion-EV
refs/heads/master
Lib/site-packages/pywin32-219-py2.7-win32.egg/win32com/test/testDictionary.py
17
# testDictionary.py # import sys import win32com.server.util import win32com.test.util import win32com.client import traceback import pythoncom import pywintypes import winerror import unittest error = "dictionary test error" def MakeTestDictionary(): return win32com.client.Dispatch("Python.Dictionary") def Tes...
samueljohn/pelican-plugins
refs/heads/master
github_activity/github_activity.py
75
# -*- coding: utf-8 -*- # NEEDS WORK """ Copyright (c) Marco Milanesi <kpanic@gnufunk.org> Github Activity --------------- A plugin to list your Github Activity """ from __future__ import unicode_literals, print_function import logging logger = logging.getLogger(__name__) from pelican import signals class GitHub...
zdary/intellij-community
refs/heads/master
python/testData/mover/sameLevelInIf_afterDown.py
83
if True: a = 1 else: #comment a = 2 a =<caret> 3
apanju/GMIO_Odoo
refs/heads/8.0
addons/mail/mail_thread.py
111
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
Coelhon/MasterRepo.repository
refs/heads/master
plugin.video.zen/resources/lib/modules/common.py
9
import HTMLParser import json import random import re import urllib2 import urlparse def clean_title(title): if title == None: return title = re.sub('&#(\d+);', '', title) title = re.sub('(&#[0-9]+)([^;^0-9]+)', '\\1;\\2', title) title = title.replace('&quot;', '\"').replace('&amp;', '&') title = ...
quantifiedcode-bot/checkmate
refs/heads/master
checkmate/contrib/plugins/git/commands/analyze.py
3
# -*- coding: utf-8 -*- """ This file is part of checkmate, a meta code checker written in Python. Copyright (C) 2015 Andreas Dewes, QuantifiedCode UG This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Fou...
mtagle/airflow
refs/heads/master
airflow/ti_deps/deps/runnable_exec_date_dep.py
4
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
andersonjonathan/Navitas
refs/heads/master
navitas/members/migrations/0007_auto_20170314_2301.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('members', '0006_auto_20161123_0239'), ] operations = [ migrations.AddField( model_name='areaofstudy', ...
lnielsen/flask-appexts
refs/heads/master
flask_appexts/security.py
1
# -*- coding: utf-8 -*- # # This file is part of Flask-AppExts # Copyright (C) 2015 CERN. # # Flask-AppExts is free software; you can redistribute it and/or # modify it under the terms of the Revised BSD License; see LICENSE # file for more details. """Flask-Security extension. You should set the following variables:...
iamkingmaker/cointrol
refs/heads/master
cointrol/core/fields.py
6
""" Custom model fields. """ from django.db import models class PriceField(models.DecimalField): def __init__(self, max_digits=30, decimal_places=2, default=0, **kwargs): super().__init__(max_digits=max_digits, decimal_places=decimal_places, default=defau...
adwiputra/LUMENS-repo
refs/heads/master
processing/algs/PolarPlot.py
6
# -*- coding: utf-8 -*- """ *************************************************************************** BarPlot.py --------------------- Date : January 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com ******************************...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-3.0/Lib/test/test_datetime.py
2
"""Test date/time type. See http://www.zope.org/Members/fdrake/DateTimeWiki/TestCases """ import os import pickle import unittest from test import support from datetime import MINYEAR, MAXYEAR from datetime import timedelta from datetime import tzinfo from datetime import time from datetime import date, datetime p...
ArcherSys/ArcherSys
refs/heads/master
Lib/site-packages/django/contrib/auth/urls.py
568
# The views used below are normally mapped in django.contrib.admin.urls.py # This URLs file is used to provide a reliable view deployment for test purposes. # It is also provided as a convenience to those who want to deploy these URLs # elsewhere. from django.conf.urls import url from django.contrib.auth import views ...
doublebits/osf.io
refs/heads/develop
website/project/forms.py
54
# -*- coding: utf-8 -*- from framework.forms import Form, TextField, BooleanField, validators ############################################################################### # Forms ############################################################################### class NewNodeForm(Form): title = TextField('Title',...
xbmcmegapack/plugin.video.megapack.dev
refs/heads/master
resources/lib/menus/home_languages_german.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@gmail.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Softwar...
bsipocz/bokeh
refs/heads/master
examples/glyphs/widgets_server.py
42
from __future__ import print_function from datetime import date from random import randint from bokeh.browserlib import view from bokeh.document import Document from bokeh.models.glyphs import Line, Circle from bokeh.models import ( Plot, ColumnDataSource, DataRange1d, LinearAxis, DatetimeAxis, Grid, HoverToo...
zielmicha/torrent-workshops
refs/heads/master
ioutil.py
1
def read_until(stream, char): ret = [] while True: ch = stream.read(1) if not ch: raise EOFError if ch == char: return b''.join(ret) ret.append(ch)
jeremiah-c-leary/vhdl-style-guide
refs/heads/master
vsg/tests/port_map/test_rule_007.py
1
import os import unittest from vsg.rules import port_map from vsg import vhdlFile from vsg.tests import utils sTestDir = os.path.dirname(__file__) lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_007_test_input.vhd')) lExpected = [] lExpected.append('') utils.read_file(os.path.join(sTestDir,...
mahak/neutron
refs/heads/master
neutron/db/migration/alembic_migrations/versions/rocky/expand/867d39095bf4_port_forwarding.py
2
# Copyright 2018 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 ...
davidhstocker/Graphyne
refs/heads/master
Config/Test/TestRepository/TestCaseAppendix.py
1
#!/usr/bin/env python3 """Angela RML Interpreter - RML Condition Handling Created by the project angela team http://sourceforge.net/projects/projectangela/ http://www.projectangela.org""" __license__ = "MIT" __version__ = "$Revision: 1.0.0 $" __author__ = 'David Stocker' # ***** BEGIN GPL LICENSE BLOCK *...
CloudBrewery/duplicity-swiftkeys
refs/heads/master
testing/unit/test_gpg.py
3
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright 2002 Ben Escoto <ben@emerose.org> # Copyright 2007 Kenneth Loafman <kenneth@loafman.com> # # This file is part of duplicity. # # Duplicity is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License...
ctruchi/deluge-webui2
refs/heads/master
deluge/plugins/Scheduler/deluge/plugins/scheduler/core.py
8
# # core.py # # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # Basic plugin template created by: # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> # Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may redistribute it and/or modify it under the terms...
frederick-masterton/django
refs/heads/master
django/db/models/constants.py
954
""" Constants used across the ORM in general. """ # Separator used to split filter strings apart. LOOKUP_SEP = '__'
shookari/cassandra
refs/heads/cassandra-1.0
test/system/__init__.py
14
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
mercycorps/tola-activity
refs/heads/master
htdocs/activitydb/migrations/0011_auto_20150630_0824.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('activitydb', '0010_auto_20150629_1832'), ] operations = [ ]
chidea/GoPythonDLLWrapper
refs/heads/master
bin/lib/test/test_readline.py
12
""" Very minimal unittests for parts of the readline module. """ import os import unittest from test.support import run_unittest, import_module from test.script_helper import assert_python_ok # Skip tests if there is no readline module readline = import_module('readline') class TestHistoryManipulation (unittest.TestC...
nitehawck/dem
refs/heads/master
test/TestPkgConfigProcessor.py
1
import os import unittest import mock import pyfakefs.fake_filesystem_unittest as fake_filesystem_unittest from dem.project import reader as reader from dem.project.cache import PackageCache from dem.project.pkgconfig import PkgConfigProcessor SAMPLE_YAML_CONTENT = ''' config: remote-locations: ['/opt', ...
vehar/sumatrapdf
refs/heads/master
scripts/metadata/gen_txt.py
16
import sys, os, codecs, random, metadata from metadata import Field sys.path.append("scripts") # assumes is being run as ./scrpts/metadata/gen_txt.py import util """ TODO: - test perf on a large document i.e. ~ 1 MB. Randomly generate a big file and see how fast is SerializeTxtParser.cpp on that file ...
andresgz/django
refs/heads/master
django/contrib/auth/management/__init__.py
348
""" Creates permissions for all installed apps that need permissions. """ from __future__ import unicode_literals import getpass import unicodedata from django.apps import apps from django.contrib.auth import get_permission_codename from django.core import exceptions from django.core.management.base import CommandErr...
joke2k/faker
refs/heads/master
faker/providers/job/pl_PL/__init__.py
2
from .. import Provider as BaseProvider class Provider(BaseProvider): jobs = [ "Agent celny", "Agent firmy inwestycyjnej", "Agent literacki", "Agent ubezpieczeniowy", "Agronom", "Aktor", "Aktor dziecięcy", "Aktor głosowy", "Aktuariusz", ...
soazig/project-epsilon-1
refs/heads/master
code/utils/tests/test_find_activated_voxel.py
3
import os import sys import numpy as np import nibabel as nib from nose.tools import assert_equal from numpy.testing import assert_almost_equal, assert_array_equal # Add path to functions to the system path. sys.path.append(os.path.join(os.path.dirname(__file__), "../functions/")) from find_activated_voxel_functions...
Juniper/contrail-horizon
refs/heads/master
openstack_dashboard/dashboards/project/networking/subnets/tabs.py
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 NEC Corporation # # 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 #...
nguyentu1602/statsmodels
refs/heads/master
statsmodels/base/model.py
25
from __future__ import print_function from statsmodels.compat.python import iterkeys, lzip, range, reduce import numpy as np from scipy import stats from statsmodels.base.data import handle_data from statsmodels.tools.tools import recipr, nan_dot from statsmodels.stats.contrast import ContrastResults, WaldTestResults f...
ThinkOpen-Solutions/odoo
refs/heads/stable
addons/portal_gamification/__openerp__.py
381
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
TheWylieStCoyote/gnuradio
refs/heads/master
gr-zeromq/python/zeromq/qa_zeromq_pubsub.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest from gnuradio import blocks, zeromq import pmt import time def make_tag(key, value, offset, srcid=N...
geekroot/erpnext
refs/heads/develop
erpnext/setup/doctype/sales_person/__init__.py
37694
from __future__ import unicode_literals
shulinye/dotfiles
refs/heads/master
scripts/pythonutils/testing.py
1
import datetime import logging import __main__ import errno from functools import wraps, update_wrapper, partial import inspect import os import signal import traceback import types from .autorepr import autorepr __all__ = ['testing_setup', 'sloppy_run', 'typecheck', 'type_validate', 'TheShowMustGoOn', 'limited_glob...
CourseTalk/edx-platform
refs/heads/master
lms/djangoapps/course_blocks/management/commands/generate_course_blocks.py
10
""" Command to load course blocks. """ import logging from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore from ...api import get_course_in_cache log = logging.getLogger...
gauravjns/taiga-back
refs/heads/master
taiga/base/apps.py
18
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
sysadminmatmoz/account-invoicing
refs/heads/10.0
setup/account_invoice_force_number/odoo/addons/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
swcloud/api-client-staging
refs/heads/master
generated/python/gapic-google-cloud-monitoring-v3/google/cloud/gapic/monitoring/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
40223250/40223250test
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/pwd.py
730
def getpwuid(): pass
Tarun12345/rat-notes
refs/heads/master
src/context_processors.py
3
from django.conf import settings from django.core.exceptions import ImproperlyConfigured class SettingsContextProcessor(object): """ Class for creating simple context processors that return one or more Django settings. """ def __init__(self, *setting_names): self.setting_names = setting_na...
ComfyLabs/beefeater
refs/heads/master
users/serializers/common.py
1
from django.contrib.auth import get_user_model from rest_framework import serializers class UserSerializer(serializers.ModelSerializer): class Meta: model = get_user_model() fields = ('pk', 'username', 'first_name', 'last_name', 'email', 'password',) extra_kwargs = { 'password'...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/draft_schematic/bio_engineer/bio_component/shared_bio_component_food_heavy_flavor.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/bio_engineer/bio_component/shared_bio_component_food_heavy_...
skykiny/shadowsocks
refs/heads/master
shadowsocks/lru_cache.py
983
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
williamfeng323/py-web
refs/heads/master
flask/lib/python3.6/site-packages/flask/helpers.py
47
# -*- coding: utf-8 -*- """ flask.helpers ~~~~~~~~~~~~~ Implements various helpers. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys import pkgutil import posixpath import mimetypes from time import time from zlib import adler32 from th...
ccccccccccc/mitmproxy
refs/heads/master
libmproxy/contrib/jsbeautifier/__init__.py
50
import sys import getopt import re import string # # Originally written by Einar Lielmanis et al., # Conversion to python by Einar Lielmanis, einar@jsbeautifier.org, # MIT licence, enjoy. # # Python is not my native language, feel free to push things around. # # Use either from command line (script displays its usage ...
combust/mleap
refs/heads/master
python/mleap/pyspark/spark_support.py
2
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
austinvernsonger/metagoofil
refs/heads/master
hachoir_parser/file_system/reiser_fs.py
74
""" ReiserFS file system version 3 parser (other version have not been tested). Author: Frederic Weisbecker Creation date: 8 december 2006 Sources: - http://p-nand-q.com/download/rfstool/reiserfs_docs.html - http://homes.cerias.purdue.edu/~florian/reiser/reiserfs.php - file://usr/src/linux-2.6.16.19/include/linux/...
ilblackdragon/django-misc
refs/heads/master
misc/parser.py
1
# -*- coding: utf-8 -*- import xlrd import re class Reader(object): def __init__(self, FileName): self.filename = FileName def readline(self): return '' class XlsReader(Reader): def __init__(self, fileName): super(XlsReader, self).__init__(self) self.__book__ = xlrd.open...
cce/kombu
refs/heads/master
kombu/tests/transport/test_sqlalchemy.py
9
from __future__ import absolute_import from kombu import Connection from kombu.tests.case import Case, SkipTest, patch, case_requires @case_requires('sqlalchemy') class test_sqlalchemy(Case): def test_url_parser(self): with patch('kombu.transport.sqlalchemy.Channel._open'): url = 'sqlalchemy...
turbulenz/gyp
refs/heads/master
test/copies/gyptest-attribs.py
239
#!/usr/bin/env python # Copyright (c) 2013 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. """ Verifies that copying files preserves file attributes. """ import TestGyp import os import stat import sys def check_attribs(path, e...
jayceyxc/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/tests/layermap/tests.py
47
# coding: utf-8 from __future__ import absolute_import, unicode_literals import os from copy import copy from decimal import Decimal from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql from django.db import router from django.conf import settings from django.t...
theshteves/tweet-the-wolf
refs/heads/master
pips/cryptography/hazmat/backends/commoncrypto/__init__.py
63
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from cryptography.hazmat.backends.commoncrypto.backend import backend _...
PatKayongo/patkayongo.github.io
refs/heads/master
node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/_robotframeworklexer.py
198
# -*- coding: utf-8 -*- """ pygments.lexers._robotframeworklexer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for Robot Framework. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # Copyright 2012 Nokia Siemens Networks Oyj # # License...
nan86150/ImageFusion
refs/heads/master
lib/python2.7/site-packages/matplotlib/tests/test_collections.py
9
""" Tests specific to the collections module. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six from nose.tools import assert_equal import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal import matplotlib.py...
talau/ns-3.18-wifi-queue-red
refs/heads/master
src/visualizer/bindings/callbacks_list.py
772
callback_classes = [ ['void', 'ns3::Ptr<ns3::Socket>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr<ns3::Socket>', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empt...
npuichigo/ttsflow
refs/heads/master
third_party/tensorflow/tensorflow/contrib/training/python/training/sequence_queueing_state_saver_test.py
122
# 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...
michellemorales/OpenMM
refs/heads/master
kaldi/egs/wsj/s5/utils/filt.py
11
#!/usr/bin/env python # Apache 2.0 import sys vocab=set() with open(sys.argv[1]) as vocabfile: for line in vocabfile: vocab.add(line.strip()) with open(sys.argv[2]) as textfile: for line in textfile: print " ".join(map(lambda word: word if word in vocab else '<UNK>', line.strip().split()))
gordon-/yolo
refs/heads/master
teacher/admin.py
13848
from django.contrib import admin # Register your models here.
Jaiz909/youtube-dl
refs/heads/master
youtube_dl/extractor/tube8.py
32
from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlparse, compat_urllib_request, ) from ..utils import ( int_or_none, str_to_int, ) from ..aes import aes_decrypt_text class Tube8IE(InfoExtractor): _VALID_U...
sexroute/commandergenius
refs/heads/sdl_android
project/jni/python/src/Lib/distutils/command/upload.py
52
"""distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).""" from distutils.errors import * from distutils.core import PyPIRCCommand from distutils.spawn import spawn from distutils import log from hashlib import md5 import os import socket import platform import httplib impor...
ct-23/home-assistant
refs/heads/dev
homeassistant/components/weather/bom.py
30
""" Support for Australian BOM (Bureau of Meteorology) weather service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/weather.bom/ """ import logging import voluptuous as vol from homeassistant.components.weather import WeatherEntity, PLATFORM_SCHEMA ...
azureplus/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/formtools/tests/wizard/wizardtests/tests.py
116
from __future__ import unicode_literals import os from django import forms from django.test import TestCase from django.test.client import RequestFactory from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.formto...
fuchsia-mirror/third_party-grpc
refs/heads/master
tools/buildgen/plugins/transitive_dependencies.py
5
# Copyright 2015 gRPC authors. # # 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...
angelicadly/prog-script
refs/heads/master
tekton-master/backend/appengine/routes/courses/admin/home.py
26
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from config.template_middleware import TemplateResponse from tekton import router from gaecookie.decorator import no_csrf from course_app import facade from routes.courses.admin import new, edit def delete(_handler, course_id): facad...
kybriainfotech/iSocioCRM
refs/heads/8.0
addons/product_margin/wizard/__init__.py
444
# -*- 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...
ayushagrawal288/zamboni
refs/heads/master
mkt/recommendations/tests/test_views.py
17
import json from django.core.urlresolvers import reverse from django.test.utils import override_settings import requests from mock import patch from nose.tools import eq_, ok_ from requests.exceptions import RequestException, Timeout import mkt from mkt.api.tests.test_oauth import RestOAuth from mkt.site.fixtures im...