repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
efortuna/AndroidSDKClone | refs/heads/master | ndk_experimental/prebuilt/linux-x86_64/lib/python2.7/test/test_locale.py | 72 | from test.test_support import run_unittest, verbose
import unittest
import locale
import sys
import codecs
enUS_locale = None
def get_enUS_locale():
global enUS_locale
if sys.platform == 'darwin':
import os
tlocs = ("en_US.UTF-8", "en_US.ISO8859-1", "en_US")
if int(os.uname()[2].split... |
sudkannan/xen-hv | refs/heads/master | dist/install/usr/lib64/python2.6/site-packages/xen/web/connection.py | 44 | #============================================================================
# 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 version 2.1 of the License, or
# (at your option) any ... |
sebastic/QGIS | refs/heads/master | tests/src/python/test_qgsgeometry.py | 2 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsGeometry.
.. note:: 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.
"""
__aut... |
klnprj/testapp | refs/heads/master | django/utils/cache.py | 88 | """
This module contains helper functions for controlling caching. It does so by
managing the "Vary" header of responses. It includes functions to patch the
header of response objects directly and decorators that change functions to do
that header-patching themselves.
For information on the Vary header, see:
http... |
jordotech/satchmofork | refs/heads/master | satchmo/apps/satchmo_ext/productratings/models.py | 4 | from django.contrib.comments.models import Comment
from django.db import models
from django.utils.translation import ugettext, ugettext_lazy as _
from satchmo_utils.signals import collect_urls
import product
import satchmo_store
class ProductRating(models.Model):
"""A rating attached to a comment"""
comment = ... |
tangposmarvin/CodeIgniter | refs/heads/develop | user_guide_src/source/conf.py | 86 | # -*- coding: utf-8 -*-
#
# CodeIgniter documentation build configuration file, created by
# sphinx-quickstart on Sun Aug 28 07:24:38 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
#... |
ojii/sandlib | refs/heads/master | lib/lib-python/2.7/test/test_lib2to3.py | 137 | # Skipping test_parser and test_all_fixers
# because of running
from lib2to3.tests import (test_fixers, test_pytree, test_util, test_refactor,
test_parser, test_main as test_main_)
import unittest
from test.test_support import run_unittest
def suite():
tests = unittest.TestSuite()
lo... |
kgiusti/gofer | refs/heads/master | src/gofer/rmi/policy.py | 1 | #
# Copyright (c) 2011 Red Hat, Inc.
#
# This software is licensed to you under the GNU Lesser General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (LGPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or implied,
# includin... |
dayatz/taiga-back | refs/heads/stable | taiga/projects/tagging/services.py | 1 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# This program is free software: you can r... |
blink1073/imageio | refs/heads/master | imageio/core/__init__.py | 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, imageio contributors
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
""" This subpackage provides the core functionality of imageio
(everything but the plugins).
"""
from .util import Image, Dict, asarray, image_as_uint8, urlopen # noqa
from .ut... |
AndreyPopovNew/asuswrt-merlin-rt-n | refs/heads/master | release/src/router/samba3/source/stf/strings.py | 55 | #! /usr/bin/python
# Comfychair test cases for Samba string functions.
# Copyright (C) 2003 by Martin Pool <mbp@samba.org>
#
# 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 versio... |
MartinHjelmare/home-assistant | refs/heads/dev | homeassistant/components/onewire/sensor.py | 7 | """Support for 1-Wire environment sensors."""
import os
import time
import logging
from glob import glob
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.const import TEMP_CELSIUS
from homeassistant.components.sensor impor... |
kiran/bart-sign | refs/heads/master | venv/lib/python2.7/site-packages/numpy/distutils/__version__.py | 264 | from __future__ import division, absolute_import, print_function
major = 0
minor = 4
micro = 0
version = '%(major)d.%(minor)d.%(micro)d' % (locals())
|
rcatwood/Savu | refs/heads/master | savu/test/travis/framework_tests/plugins_util_test.py | 1 | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... |
Apoc2400/Reftag | refs/heads/master | atom/data.py | 18 | #!/usr/bin/env python
#
# Copyright (C) 2009 Google 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 ... |
broferek/ansible | refs/heads/devel | test/units/module_utils/conftest.py | 80 | # Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
import json
import sys
from io import BytesIO
import pytest
import ansible.module_utils.basic
from ansible.module_utils.six import PY3, string_types
from ansible.module_utils._text import... |
tangfeixiong/nova | refs/heads/stable/juno | nova/tests/functional/v3/test_extended_status.py | 28 | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... |
risicle/django | refs/heads/master | tests/cache/__init__.py | 12133432 | |
sestrella/ansible | refs/heads/devel | lib/ansible/modules/net_tools/ldap/__init__.py | 12133432 | |
thisispuneet/potato-blog | refs/heads/master | django/contrib/localflavor/pe/__init__.py | 12133432 | |
eyohansa/django | refs/heads/master | django/contrib/gis/db/backends/spatialite/__init__.py | 12133432 | |
submitconsulting/backenddj | refs/heads/master | apps/sad/tests/__init__.py | 12133432 | |
coll-gate/collgate | refs/heads/master | messenger/tcpserver/appsettings.py | 1 | # -*- coding: utf-8; -*-
#
# @file appsettings.py
# @brief coll-gate messenger tcp server application settings
# @author Frédéric SCHERMA (INRA UMR1095)
# @date 2017-10-09
# @copyright Copyright (c) 2017 INRA/CIRAD
# @license MIT (see LICENSE file)
# @details
# Default settings of the application
APP_DB_DEFAULT_SETTIN... |
aspose-email/Aspose.Email-for-Java | refs/heads/master | Plugins/Aspose-Email-Java-for-Jython/asposeemail/ProgrammingOutlook/CreateOutlookContact.py | 4 | from asposeemail import Settings
from com.aspose.email import MapiContact
from com.aspose.email import MapiContactNamePropertySet
from com.aspose.email import MapiContactProfessionalPropertySet
from com.aspose.email import MapiContactTelephonePropertySet
from com.aspose.email import MapiContactPhysicalAddress
fro... |
MrSurly/micropython-esp32 | refs/heads/esp32 | tests/unicode/unicode_str_format.py | 78 | # test handling of unicode chars in format strings
print('α'.format())
print('{α}'.format(α=1))
|
vmahuli/tempest | refs/heads/master | tempest/api/network/admin/test_external_network_extension.py | 3 | # 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
# d... |
salomon1184/bite-project | refs/heads/master | deps/mrtaskman/third_party/gflags/tests/flags_modules_for_testing/__init__.py | 12133432 | |
craynot/django | refs/heads/master | tests/test_discovery_sample/empty.py | 12133432 | |
freakboy3742/django | refs/heads/main | tests/staticfiles_tests/apps/no_label/__init__.py | 12133432 | |
tedder/ansible | refs/heads/devel | test/units/plugins/terminal/__init__.py | 12133432 | |
RuiNascimento/krepo | refs/heads/master | script.module.lambdascrapers/lib/lambdascrapers/sources_placenta/en_placenta-1.7.8/solarmovie.py | 1 | # -*- coding: UTF-8 -*-
#######################################################################
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# @Daddy_Blamo wrote this file. As long as you retain this notice you
# can do whatever you want wi... |
Kussie/HTPC-Manager | refs/heads/master2 | libs/pySMART/device_list.py | 2 | #Copyright (C) 2014 Marc Herndon
#
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License,
#version 2, as published by the Free Software Foundation.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without ... |
vsajip/django | refs/heads/django3 | django/conf/locale/sv/__init__.py | 12133432 | |
hkawasaki/kawasaki-aio8-1 | refs/heads/gacco2/master | lms/djangoapps/verify_student/management/commands/__init__.py | 12133432 | |
Batterfii/django | refs/heads/master | django/views/__init__.py | 12133432 | |
cetic/python-msp430-tools | refs/heads/master | msp430/shell/__init__.py | 12133432 | |
qtm2/qtm2 | refs/heads/master | contrib/bitrpc/bitrpc.py | 2348 | from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:8332")
else:
access = Ser... |
jmiserez/sts | refs/heads/hb | tools/nox_link_analyzer.py | 2 | #! /usr/bin/python
import re
import sys
path = re.compile("WARN:new link detected [(](00:)+?(?P<from_id>\w{2}) p:(?P<from_port>\w+) -> (00:)+?(?P<to_id>\w{2}) p:(?P<to_port>\w+)")
def make_id(switch_id, port):
'''make a string id for'''
return switch_id + ":" + port
argv = sys.argv
if len(argv) != 2:
print "P... |
gdi2290/django | refs/heads/master | tests/defer/models.py | 112 | """
Tests for defer() and only().
"""
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
class Secondary(models.Model):
first = models.CharField(max_length=50)
second = models.CharField(max_length=50)
@python_2_unicode_compatible
class Primary(models.Model):
name... |
chubbymaggie/remodel | refs/heads/master | testing/gtest-1.7.0/test/gtest_color_test.py | 3259 | #!/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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
mattnenterprise/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/attrs/src/attr/_config.py | 99 | from __future__ import absolute_import, division, print_function
__all__ = ["set_run_validators", "get_run_validators"]
_run_validators = True
def set_run_validators(run):
"""
Set whether or not validators are run. By default, they are run.
"""
if not isinstance(run, bool):
raise TypeError... |
Armored-Dragon/goldmine | refs/heads/master | default_cogs/discord_bots.py | 1 | """guild stats reporting."""
import util.json as json
import aiohttp
import asyncio
import async_timeout
from discord.ext import commands
from .cog import Cog
try:
from ex_props import discord_bots_token
except ImportError:
discord_bots_token = None
try:
from ex_props import discordlist_token
except Import... |
deKupini/erp | refs/heads/master | addons/membership/report/__init__.py | 8 | # -*- 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... |
trezorg/django | refs/heads/master | django/core/management/commands/dbshell.py | 313 | from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from django.db import connections, DEFAULT_DB_ALIAS
class Command(BaseCommand):
help = ("Runs the command-line client for specified database, or the "
"default database if none is provided.")
option_lis... |
chenjun0210/tensorflow | refs/heads/master | tensorflow/examples/tutorials/mnist/mnist.py | 65 | # 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... |
ChenJunor/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/one_to_one_regress/models.py | 53 | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Place(models.Model):
name = models.CharField(max_length=50)
address = models.CharField(max_length=80)
def __str__(self):
return "%... |
kamalx/edx-platform | refs/heads/release | common/djangoapps/reverification/migrations/0002_auto__del_midcoursereverificationwindow.py | 70 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'MidcourseReverificationWindow'
db.delete_table('reveri... |
odicraig/kodi2odi | refs/heads/master | addons/plugin.video.cartoons8/requests/models.py | 151 | # -*- coding: utf-8 -*-
"""
requests.models
~~~~~~~~~~~~~~~
This module contains the primary objects that power Requests.
"""
import collections
import datetime
from io import BytesIO, UnsupportedOperation
from .hooks import default_hooks
from .structures import CaseInsensitiveDict
from .auth import HTTPBasicAuth
... |
GauriGNaik/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/wptserve/wptserve/logger.py | 489 | class NoOpLogger(object):
def critical(self, msg):
pass
def error(self, msg):
pass
def info(self, msg):
pass
def warning(self, msg):
pass
def debug(self, msg):
pass
logger = NoOpLogger()
_set_logger = False
def set_logger(new_logger):
global _set_log... |
ccrook/Quantum-GIS | refs/heads/master | python/PyQt/PyQt5/QtTest.py | 17 | # -*- coding: utf-8 -*-
"""
***************************************************************************
QtTest.py
---------------------
Date : March 2016
Copyright : (C) 2016 by Juergen E. Fischer
Email : jef at norbit dot de
*******************************... |
moijes12/oh-mainline | refs/heads/master | vendor/packages/django-kombu/djkombu/__init__.py | 20 | """Kombu transport using the Django database as a message store."""
VERSION = (0, 9, 4)
__version__ = ".".join(map(str, VERSION))
__author__ = "Ask Solem"
__contact__ = "ask@celeryproject.org"
__homepage__ = "http://github.com/ask/django-kombu/"
__docformat__ = "restructuredtext"
__license__ = "BSD"
|
jaxkodex/odoo | refs/heads/8.0 | openerp/addons/test_exceptions/models.py | 336 | # -*- coding: utf-8 -*-
import openerp.exceptions
import openerp.osv.orm
import openerp.osv.osv
import openerp.tools.safe_eval
class m(openerp.osv.osv.Model):
""" This model exposes a few methods that will raise the different
exceptions that must be handled by the server (and its RPC layer)
and the... |
CCI-Tools/cate-core | refs/heads/master | cate/util/cache.py | 2 | # The MIT License (MIT)
# Copyright (c) 2016, 2017 by the ESA CCI Toolbox development team and contributors
#
# 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 wi... |
Firefly-Automation/Firefly | refs/heads/firefly3 | Firefly/core/core.py | 1 | import asyncio
import importlib
import json
import signal
import sys
from concurrent.futures import ThreadPoolExecutor
from os import path
from pathlib import Path
from typing import Any
from time import sleep
from aiohttp import web
from Firefly import aliases, logging, scheduler
from Firefly.const import COMPONENT_... |
shitolepriya/test-erp | refs/heads/develop | erpnext/selling/report/customers_not_buying_since_long_time/__init__.py | 12133432 | |
brett-patterson/pyface | refs/heads/master | pyface/ui/wx/dialog.py | 2 | #------------------------------------------------------------------------------
#
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions d... |
simonwydooghe/ansible | refs/heads/devel | test/integration/targets/win_unzip/files/create_zip.py | 7 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import sys
import tempfile
import zipfile
def mai... |
teeple/pns_server | refs/heads/master | work/install/Python-2.7.4/Lib/email/parser.py | 392 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw, Thomas Wouters, Anthony Baxter
# Contact: email-sig@python.org
"""A parser of RFC 2822 and MIME email messages."""
__all__ = ['Parser', 'HeaderParser']
import warnings
from cStringIO import StringIO
from email.feedparser import FeedParser
... |
opendroid-Team/enigma2-4.1 | refs/heads/master | lib/python/Tools/CList.py | 176 | class CList(list):
def __getattr__(self, attr):
return CList([getattr(a, attr) for a in self])
def __call__(self, *args, **kwargs):
for x in self:
x(*args, **kwargs)
|
Reivajar/jasanche-byte1 | refs/heads/master | lib/werkzeug/contrib/profiler.py | 315 | # -*- coding: utf-8 -*-
"""
werkzeug.contrib.profiler
~~~~~~~~~~~~~~~~~~~~~~~~~
This module provides a simple WSGI profiler middleware for finding
bottlenecks in web application. It uses the :mod:`profile` or
:mod:`cProfile` module to do the profiling and writes the stats to the
stream provide... |
gbaty/pyside2 | refs/heads/master | tests/QtCore/bug_PYSIDE-164.py | 3 | from __future__ import print_function
import unittest
from PySide2.QtCore import QCoreApplication, QEventLoop, QObject, Qt, QThread, QTimer, SIGNAL
class Emitter(QThread):
def __init__(self):
QThread.__init__(self)
def run(self):
print("Before emit.")
self.emit(SIGNAL("signal(int)"),... |
r39132/airflow | refs/heads/master | airflow/www/security.py | 1 | # -*- coding: utf-8 -*-
#
# 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
#... |
Kagee/youtube-dl | refs/heads/master | youtube_dl/extractor/cmt.py | 139 | from __future__ import unicode_literals
from .mtv import MTVIE
class CMTIE(MTVIE):
IE_NAME = 'cmt.com'
_VALID_URL = r'https?://www\.cmt\.com/videos/.+?/(?P<videoid>[^/]+)\.jhtml'
_FEED_URL = 'http://www.cmt.com/sitewide/apps/player/embed/rss/'
_TESTS = [{
'url': 'http://www.cmt.com/videos/gar... |
mdworks2016/work_development | refs/heads/master | Python/20_Third_Certification/venv/lib/python3.7/site-packages/django/dispatch/__init__.py | 77 | """Multi-consumer multi-producer dispatching mechanism
Originally based on pydispatch (BSD) https://pypi.org/project/PyDispatcher/2.0.1/
See license.txt for original license.
Heavily modified for Django's purposes.
"""
from django.dispatch.dispatcher import Signal, receiver # NOQA
|
orekyuu/intellij-community | refs/heads/master | python/testData/MockSdk3.4/python_stubs/builtins.py | 15 | # encoding: utf-8
# module builtins
# from (built-in)
# by generator 1.137
"""
Built-in functions, exceptions, and other objects.
Noteworthy: None is the `nil' object; Ellipsis represents `...' in slices.
"""
# no imports
# Variables with simple values
# definition of False omitted
# definition of None omitted
# defi... |
jelugbo/ddi | refs/heads/master | lms/lib/comment_client/models.py | 63 | import logging
from .utils import extract, perform_request, CommentClientRequestError
log = logging.getLogger(__name__)
class Model(object):
accessible_fields = ['id']
updatable_fields = ['id']
initializable_fields = ['id']
base_url = None
default_retrieve_params = {}
metric_tag_fields = [... |
nirmalvp/python-social-auth | refs/heads/master | social/backends/weibo.py | 67 | # coding:utf8
# author:hepochen@gmail.com https://github.com/hepochen
"""
Weibo OAuth2 backend, docs at:
http://psa.matiasaguirre.net/docs/backends/weibo.html
"""
from social.backends.oauth import BaseOAuth2
class WeiboOAuth2(BaseOAuth2):
"""Weibo (of sina) OAuth authentication backend"""
name = 'weibo'
... |
thefinn93/CouchPotatoServer | refs/heads/master | libs/pyutil/xor/__init__.py | 12133432 | |
Vixionar/django | refs/heads/master | tests/fixtures/__init__.py | 12133432 | |
openNSS/enigma2 | refs/heads/master | lib/python/Plugins/SystemPlugins/CableScan/__init__.py | 12133432 | |
skg-net/ansible | refs/heads/devel | lib/ansible/module_utils/network/cloudengine/__init__.py | 12133432 | |
katrid/django | refs/heads/master | django/core/management/commands/sqlsequencereset.py | 467 | from __future__ import unicode_literals
from django.core.management.base import AppCommand
from django.db import DEFAULT_DB_ALIAS, connections
class Command(AppCommand):
help = 'Prints the SQL statements for resetting sequences for the given app name(s).'
output_transaction = True
def add_arguments(sel... |
mikelambert/flask-admin | refs/heads/master | examples/auth/config.py | 33 | # Create dummy secrey key so we can use sessions
SECRET_KEY = '123456790'
# Create in-memory database
DATABASE_FILE = 'sample_db.sqlite'
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + DATABASE_FILE
SQLALCHEMY_ECHO = True
# Flask-Security config
SECURITY_URL_PREFIX = "/admin"
SECURITY_PASSWORD_HASH = "pbkdf2_sha512"
SECURIT... |
elba7r/lite-system | refs/heads/master | erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py | 10 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# ERPNext - web based ERP (http://erpnext.com)
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, unittest
from frappe.utils import flt, ... |
Cenorius/practica-final-verificacion | refs/heads/master | app/forms.py | 1 | from flask import Flask, render_template, request, flash
from wtforms import Form, TextField, TextAreaField, validators, StringField, SubmitField, DateField, RadioField
class TextProcessorForm(Form):
date = DateField('Date: ',format='%m/%d/%Y', validators=[validators.required()])
source = RadioField('Source', ... |
a-parhom/edx-platform | refs/heads/master | common/djangoapps/student/management/commands/anonymized_id_mapping.py | 18 | # -*- coding: utf-8 -*-
"""Dump username, per-student anonymous id, and per-course anonymous id triples as CSV.
Give instructors easy access to the mapping from anonymized IDs to user IDs
with a simple Django management command to generate a CSV mapping. To run, use
the following:
./manage.py lms anonymized_id_mappin... |
hectord/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/django/contrib/localflavor/at/at_states.py | 537 | # -*- coding: utf-8 -*
from django.utils.translation import ugettext_lazy as _
STATE_CHOICES = (
('BL', _('Burgenland')),
('KA', _('Carinthia')),
('NO', _('Lower Austria')),
('OO', _('Upper Austria')),
('SA', _('Salzburg')),
('ST', _('Styria')),
('TI', _('Tyrol')),
('VO', _('Vorarlberg'... |
SciTools/iris | refs/heads/main | lib/iris/tests/unit/fileformats/pyke_rules/compiled_krb/fc_rules_cf_fc/test_build_lambert_azimuthal_equal_area_coordinate_system.py | 1 | # Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""
Test function :func:`iris.fileformats._pyke_rules.compiled_krb.\
fc_rules_cf_fc.build_lambert_azimuthal_equal_area_coordina... |
plotly/python-api | refs/heads/master | packages/python/plotly/plotly/validators/scatterpolar/marker/_line.py | 2 | import _plotly_utils.basevalidators
class LineValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="line", parent_name="scatterpolar.marker", **kwargs):
super(LineValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... |
0k/OpenUpgrade | refs/heads/8.0 | addons/share/res_users.py | 269 | # -*- 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... |
bvernoux/micropython | refs/heads/master | tests/basics/class_super.py | 21 | class Base:
def __init__(self):
self.a = 1
def meth(self):
print("in Base meth", self.a)
class Sub(Base):
def meth(self):
print("in Sub meth")
return super().meth()
a = Sub()
a.meth()
|
ucsb-seclab/ictf-framework | refs/heads/master | database/support/mysql-connector-python-2.1.3/lib/mysql/connector/locales/eng/__init__.py | 39 | # MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. There are special exceptio... |
sirk390/coinpy | refs/heads/master | coinpy-lib/src/coinpy/model/__init__.py | 12133432 | |
Kamik423/uni_plan | refs/heads/master | plan/plan/lib/python3.4/encodings/shift_jis_2004.py | 816 | #
# shift_jis_2004.py: Python Unicode Codec for SHIFT_JIS_2004
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_jp, codecs
import _multibytecodec as mbc
codec = _codecs_jp.getcodec('shift_jis_2004')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEnc... |
JetBrains/intellij-community | refs/heads/master | python/testData/inspections/PyCallingNonCallableInspection/getattrCallable.py | 83 | class value():
pass
class MyClass(object):
def bar(self):
foo = getattr(self, 'foo')
foo()
|
darionyaphet/flink | refs/heads/master | flink-python/pyflink/datastream/tests/__init__.py | 406 | ################################################################################
# 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... |
coderbone/SickRage-alt | refs/heads/master | lib/unidecode/x0fe.py | 252 | data = (
'[?]', # 0x00
'[?]', # 0x01
'[?]', # 0x02
'[?]', # 0x03
'[?]', # 0x04
'[?]', # 0x05
'[?]', # 0x06
'[?]', # 0x07
'[?]', # 0x08
'[?]', # 0x09
'[?]', # 0x0a
'[?]', # 0x0b
'[?]', # 0x0c
'[?]', # 0x0d
'[?]', # 0x0e
'[?]', # 0x0f
'[?]', # 0x10
'[?]', # 0x11
'[?]'... |
KurtDeGreeff/infernal-twin | refs/heads/master | build/pillow/build/lib.linux-i686-2.7/PIL/ImageFile.py | 26 | #
# The Python Imaging Library.
# $Id$
#
# base class for image file handlers
#
# history:
# 1995-09-09 fl Created
# 1996-03-11 fl Fixed load mechanism.
# 1996-04-15 fl Added pcx/xbm decoders.
# 1996-04-30 fl Added encoders.
# 1996-12-14 fl Added load helpers
# 1997-01-11 fl Use encode_to_file where possibl... |
dudw/gfwlist2pac | refs/heads/master | gfwlist2pac/resources/__init__.py | 186 | #!/usr/bin/python
# -*- coding: utf-8 -*-
|
rosenbrockc/dft | refs/heads/master | pydft/solvers/__init__.py | 12133432 | |
rebeling/pattern | refs/heads/master | pattern/web/docx/__init__.py | 12133432 | |
MDI2017/hide_and_seek | refs/heads/master | jugadores/__init__.py | 12133432 | |
octopus-platform/octopus | refs/heads/master | python/octopus-tools/octopus/importer/__init__.py | 12133432 | |
EricCline/CEM_inc | refs/heads/master | env/lib/python2.7/site-packages/django/contrib/localflavor/pt/__init__.py | 12133432 | |
b-me/django | refs/heads/master | django/contrib/staticfiles/templatetags/__init__.py | 12133432 | |
duedil-ltd/pyfilesystem | refs/heads/master | fs/expose/__init__.py | 12133432 | |
bratsche/Neutron-Drive | refs/heads/master | google_appengine/lib/django_1_2/tests/regressiontests/model_inheritance_regress/__init__.py | 12133432 | |
yeming233/horizon | refs/heads/master | openstack_dashboard/dashboards/admin/flavors/__init__.py | 12133432 | |
MySideEffect-Team/MySideEffect | refs/heads/master | MySideEffectMain/MySideEffectApp/__init__.py | 12133432 | |
jyt109/termite-data-server | refs/heads/master | web2py/gluon/contrib/login_methods/oauth10a_account.py | 16 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Written by Michele Comitini <mcm@glisco.it>
License: GPL v3
Adds support for OAuth1.0a authentication to web2py.
Dependencies:
- python-oauth2 (http://github.com/simplegeo/python-oauth2)
"""
import oauth2 as oauth
import cgi
from urllib import urlencode
from gl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.