repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
travelbird/xhtml2pdf
refs/heads/master
demo/tgpisa/tgpisa/config/__init__.py
12133432
damien-dg/horizon
refs/heads/master
openstack_dashboard/__init__.py
12133432
csparpa/robograph
refs/heads/master
robograph/datamodel/__init__.py
12133432
frishberg/django
refs/heads/master
tests/test_client_regress/views.py
6
import json from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.serializers.json import DjangoJSONEncoder from django.http import HttpResponse, HttpResponseRedirect, JsonResponse from django.shortcuts import render from django.template.loader import render_to_str...
SSJohns/osf.io
refs/heads/develop
website/mails/listeners.py
14
"""Functions that listen for event signals and queue up emails. All triggered emails live here. """ from datetime import datetime from modularodm import Q from website import mails, settings from framework.auth import signals as auth_signals from website.project import signals as project_signals from website.conferen...
michaelarnauts/home-assistant
refs/heads/master
homeassistant/components/sensor/demo.py
2
""" homeassistant.components.sensor.demo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Demo platform that has two fake sensors. """ from homeassistant.helpers.entity import Entity from homeassistant.const import TEMP_CELCIUS, ATTR_BATTERY_LEVEL # pylint: disable=unused-argument def setup_platform(hass, config, add_devices, ...
jpautom/scikit-learn
refs/heads/master
benchmarks/bench_plot_approximate_neighbors.py
244
""" Benchmark for approximate nearest neighbor search using locality sensitive hashing forest. There are two types of benchmarks. First, accuracy of LSHForest queries are measured for various hyper-parameters and index sizes. Second, speed up of LSHForest queries compared to brute force method in exact nearest neigh...
zhangyongfei/StudySkia
refs/heads/master
tools/fix_pythonpath.py
95
#!/usr/bin/env python # Copyright (c) 2014 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. """Add the checkout root to sys.path, provide mechanisms for adding others.""" import os import sys CHECKOUT_ROOT = os.path.re...
FlipperPA/wagtail
refs/heads/master
wagtail/tests/testapp/rich_text.py
24
import json from django.forms import Media, widgets from wagtail.admin.edit_handlers import RichTextFieldPanel from wagtail.utils.widgets import WidgetWithScript class CustomRichTextArea(WidgetWithScript, widgets.Textarea): def get_panel(self): return RichTextFieldPanel def render_js_init(self, id_...
open-homeautomation/home-assistant
refs/heads/dev
tests/test_core.py
5
"""Test to verify that Home Assistant core works.""" # pylint: disable=protected-access import asyncio import unittest from unittest.mock import patch, MagicMock, sentinel from datetime import datetime, timedelta import pytz import pytest import homeassistant.core as ha from homeassistant.exceptions import InvalidEnt...
Sing-Li/go-buildpack
refs/heads/master
builds/runtimes/python-2.7.6/lib/python2.7/lib-tk/test/test_ttk/test_widgets.py
10
import unittest import Tkinter import ttk from test.test_support import requires, run_unittest import sys import support from test_functions import MockTclObj, MockStateSpec requires('gui') class WidgetTest(unittest.TestCase): """Tests methods available in every ttk widget.""" def setUp(self): suppo...
Qalthos/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_log_syslogd2_setting.py
23
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 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 Lic...
aaronzirbes/ansible
refs/heads/devel
lib/ansible/playbook/helpers.py
11
# (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...
pedrobaeza/odoo
refs/heads/master
addons/resource/tests/test_resource.py
243
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
quoclieu/codebrew17-starving
refs/heads/master
env/lib/python3.5/site-packages/google/protobuf/internal/enum_type_wrapper.py
236
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
Fkawala/gcloud-python
refs/heads/master
datastore/google/cloud/datastore/query.py
2
# Copyright 2014 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 law or agreed to in writing, ...
rahulmr/vboxweb
refs/heads/master
cherrypy/lib/profiler.py
17
"""Profiler tools for CherryPy. CherryPy users ============== You can profile any of your pages as follows: from cherrypy.lib import profiler class Root: p = profile.Profiler("/path/to/profile/dir") def index(self): self.p.run(self._index) index.exposed = Tru...
zycdragonball/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/conv2d_backprop_filter_grad_test.py
101
# 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...
rtindru/django
refs/heads/master
tests/migration_test_data_persistence/tests.py
368
from django.test import TestCase, TransactionTestCase from .models import Book class MigrationDataPersistenceTestCase(TransactionTestCase): """ Tests that data loaded in migrations is available if we set serialized_rollback = True on TransactionTestCase """ available_apps = ["migration_test_data...
aam-at/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/reverse_sequence_op_test.py
13
# 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...
philsch/ansible
refs/heads/devel
test/units/modules/network/iosxr/__init__.py
12133432
a4tech/dvbapp2-gui
refs/heads/master
lib/python/Plugins/SystemPlugins/DiseqcTester/__init__.py
12133432
asser/django
refs/heads/master
tests/migrations/test_migrations_no_changes/__init__.py
12133432
HiroIshikawa/21playground
refs/heads/master
flask-sample/hello/venv/lib/python3.5/site-packages/flask/testsuite/test_apps/blueprintapp/apps/__init__.py
12133432
cwisecarver/osf.io
refs/heads/develop
addons/s3/settings/__init__.py
76
from .defaults import * # noqa
syci/OCB
refs/heads/9.0
addons/account/models/account_analytic_line.py
6
# -*- coding: utf-8 -*- from openerp import api, fields, models, _ class AccountAnalyticLine(models.Model): _inherit = 'account.analytic.line' _description = 'Analytic Line' _order = 'date desc' product_uom_id = fields.Many2one('product.uom', string='Unit of Measure') product_id = fields.Many2on...
hgl888/tizen-extensions-crosswalk
refs/heads/master
tools/gyp/pylib/gyp/xcode_emulation.py
14
# 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. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """ import gyp.common import os.p...
dhomeier/astropy
refs/heads/wcs-datfix-unwarn
astropy/io/misc/asdf/tags/fits/__init__.py
101
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*-
lhopps/grit-i18n
refs/heads/master
grit/tool/build_unittest.py
16
#!/usr/bin/env python # Copyright (c) 2012 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. '''Unit tests for the 'grit build' tool. ''' import codecs import os import sys import tempfile if __name__ == '__main__': sys.p...
adviti/melange
refs/heads/master
thirdparty/google_appengine/lib/protorpc/protorpc/wsgi/util.py
1
#!/usr/bin/env python # # Copyright 2011 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 law o...
Maccimo/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/mercurial/dicthelpers.py
94
# dicthelpers.py - helper routines for Python dicts # # Copyright 2013 Facebook # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. def diff(d1, d2, default=None): '''Return all key-value pairs that are different between d1 and d2...
Hadatko/googletest
refs/heads/master
xcode/Scripts/versiongenerate.py
3088
#!/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...
leppa/home-assistant
refs/heads/dev
homeassistant/components/dyson/vacuum.py
5
"""Support for the Dyson 360 eye vacuum cleaner robot.""" import logging from libpurecool.const import Dyson360EyeMode, PowerMode from libpurecool.dyson_360_eye import Dyson360Eye from homeassistant.components.vacuum import ( SUPPORT_BATTERY, SUPPORT_FAN_SPEED, SUPPORT_PAUSE, SUPPORT_RETURN_HOME, ...
beeftornado/sentry
refs/heads/master
src/sentry/incidents/endpoints/serializers.py
1
from __future__ import absolute_import import logging import operator from datetime import timedelta from rest_framework import serializers from django.db import transaction from django.utils import timezone from django.utils.encoding import force_text from sentry.api.event_search import InvalidSearchQuery from sen...
bspink/django
refs/heads/master
tests/model_forms/__init__.py
12133432
dvliman/jaikuengine
refs/heads/master
.google_appengine/lib/django_1_3/django/contrib/localflavor/pe/__init__.py
12133432
CivicTechTO/tor-councilmatic
refs/heads/master
toronto/admin.py
2
from django.contrib import admin from .models import TorontoBill # Register your models here. admin.site.register(TorontoBill)
xaviercobain88/framework-python
refs/heads/master
openerp/addons/claim_from_delivery/__openerp__.py
172
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
malayaleecoder/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/html5lib/treebuilders/__init__.py
1730
"""A collection of modules for building different kinds of tree from HTML documents. To create a treebuilder for a new type of tree, you need to do implement several things: 1) A set of classes for various types of elements: Document, Doctype, Comment, Element. These must implement the interface of _base.treebuilders...
gauravbose/digital-menu
refs/heads/master
digimenu2/django/db/backends/base/schema.py
15
import hashlib from django.db.backends.utils import truncate_name from django.db.transaction import atomic from django.utils import six from django.utils.encoding import force_bytes from django.utils.log import getLogger logger = getLogger('django.db.backends.schema') def _related_non_m2m_objects(old_field, new_fie...
krisztianfekete/lib
refs/heads/master
bead_cli/common.py
2
import os import sys from bead.exceptions import InvalidArchive from bead.workspace import Workspace from bead import spec as bead_spec from bead.archive import Archive from bead import box as bead_box from bead.tech.fs import Path from bead.tech.timestamp import time_from_user, parse_iso8601 from . import arg_help fr...
DmytroObertan/reports
refs/heads/master
reports/core.py
1
import couchdb import couchdb.design import os.path import csv import os import os.path import arrow import time import yaml import requests import argparse import requests_cache from requests.exceptions import RequestException from yaml.scanner import ScannerError from dateutil.parser import parse from config import C...
tanglei528/glance
refs/heads/master
glance/openstack/common/db/__init__.py
12133432
hip-odoo/odoo
refs/heads/10.0
addons/report/models/base_config_settings.py
20
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class BaseConfigSettings(models.TransientModel): _inherit = 'base.config.settings' paperformat_id = fields.Many2one(related="company_id.paperformat_id", string='Paper format *')...
daveinnyc/various
refs/heads/master
project_euler/014.longest_collatz_seq.py
1
''' Problem 014 The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) Using the rule above and starting with 13, we generate the following sequence: 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1 It can be seen that this sequence (starting at 13 and fin...
sohail-aspose/Aspose_Tasks_Cloud
refs/heads/master
SDKs/Aspose.Tasks_Cloud_SDK_for_Python/asposetaskscloud/models/Month.py
3
#!/usr/bin/env python class Month(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.""" def __init__(self): """ Attributes: swaggerTypes (dict): The key is attribute name and the value is attribute type. ...
masterkorp/obfsproxy
refs/heads/master
obfsproxy/transports/obfs3_dh.py
15
import binascii import obfsproxy.common.rand as rand import obfsproxy.common.modexp as modexp def int_to_bytes(lvalue, width): fmt = '%%.%dx' % (2*width) return binascii.unhexlify(fmt % (lvalue & ((1L<<8*width)-1))) class UniformDH: """ This is a class that implements a DH handshake that uses public ...
janusnic/youtube-dl-GUI
refs/heads/master
youtube_dl/extractor/dbtv.py
128
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( float_or_none, int_or_none, clean_html, ) class DBTVIE(InfoExtractor): _VALID_URL = r'http://dbtv\.no/(?P<id>[0-9]+)#(?P<display_id>.+)' _TEST...
rajalokan/glance
refs/heads/master
glance/__init__.py
12133432
GoatRockResearch/Algorithm
refs/heads/master
log_13_04_array_odd.py
12133432
betoesquivel/fil2014
refs/heads/master
filenv/lib/python2.7/site-packages/django/contrib/gis/db/models/__init__.py
314
# Want to get everything from the 'normal' models package. from django.db.models import * # Geographic aggregate functions from django.contrib.gis.db.models.aggregates import * # The GeoManager from django.contrib.gis.db.models.manager import GeoManager # The geographic-enabled fields. from django.contrib.gis.db.mod...
NexusIS/tempest
refs/heads/master
tempest/api/compute/admin/test_aggregates.py
8
# Copyright 2013 NEC Corporation. # 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...
mmatyas/servo
refs/heads/master
tests/wpt/css-tests/tools/pywebsocket/src/test/__init__.py
12133432
vprime/puuuu
refs/heads/master
env/lib/python2.7/site-packages/south/tests/brokenapp/__init__.py
12133432
clubcapra/Ibex
refs/heads/master
src/roboteq_motor/scripts/__init__.py
9
__author__ = 'capra'
permamodel/permamodel
refs/heads/master
permamodel/utils/outlets.py
1
# Copyright (c) 2014, Scott D. Peckham # September 2014 #------------------------------------------------------------------------ # Note: Wrote this on 9/19/14 to eliminate a cyclic dependency between # BMI_base.py and basins.py. basins.py inherits from BMI_base.py # and BMI_base.py has initialize_basin_...
rahushen/ansible
refs/heads/devel
lib/ansible/modules/network/a10/a10_virtual_server.py
16
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Mischa Peters <mpeters@a10networks.com>, # Eric Chou <ericc@a10networks.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__ = t...
user-none/calibre
refs/heads/master
src/calibre/ebooks/docx/writer/utils.py
3
#!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' from tinycss.color3 import parse_color_string def int_or_zero(raw): try:...
ncliam/serverpos
refs/heads/master
openerp/addons/crm_helpdesk/__openerp__.py
260
# -*- 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...
jlspyaozhongkai/Uter
refs/heads/master
third_party_build/Python-2.7.9/lib/python2.7/encodings/iso8859_10.py
593
""" Python Character Mapping Codec iso8859_10 generated from 'MAPPINGS/ISO8859/8859-10.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_table) def decode(self,input,errors...
ArtezGDA/Tool-Assignment
refs/heads/master
Kimberley/Code/NOSArticleScraper-ContentTryOut.py
1
from bs4 import BeautifulSoup import requests import os url = "http://nos.nl/artikel/2093082-steeds-meer-nekklachten-bij-kinderen-door-gebruik-tablets.html" r = requests.get(url) soup = BeautifulSoup(r.content.decode('utf-8', 'ignore')) data = soup.find_all("article", {"class": "article"}) with open("data1.txt", "w...
RefugeeMatchmaking/HackZurich
refs/heads/master
GAE_Playground/libs/networkx/algorithms/operators/binary.py
30
""" Operations on graphs including union, intersection, difference. """ # Copyright (C) 2004-2015 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import networkx as nx from networkx.utils import is_string_lik...
asm-products/movie-database-service
refs/heads/master
ani/lib/python2.7/site-packages/django/contrib/gis/gdal/driver.py
221
# prerequisites imports from ctypes import c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi from django.utils import six from django.utils.encoding import force_bytes # For more information, see ...
sonchang/python-agent
refs/heads/master
cattle/plugins/host_info/memory.py
8
import platform class MemoryCollector(object): def __init__(self): self.key_map = {'memtotal': 'memTotal', 'memfree': 'memFree', 'memavailable': 'memAvailable', 'buffers': 'buffers', 'cached': 'cached', ...
kobigurk/go-ethereum
refs/heads/master
vendor/github.com/nsf/termbox-go/collect_terminfo.py
184
#!/usr/bin/env python import sys, os, subprocess def escaped(s): return repr(s)[1:-1] def tput(term, name): try: return subprocess.check_output(['tput', '-T%s' % term, name]).decode() except subprocess.CalledProcessError as e: return e.output.decode() def w(s): if s == None: return sys.stdout.write(s) ...
ferabra/edx-platform
refs/heads/master
lms/djangoapps/courseware/migrations/0008_add_xmodule_storage.py
114
# -*- coding: 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 model 'XModuleStudentInfoField' db.create_table('courseware_xmodulestudentinfofield', ( ...
richardcs/ansible
refs/heads/devel
lib/ansible/playbook/playbook_include.py
76
# (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...
denverfoundation/storybase
refs/heads/develop
apps/storybase_story/migrations/0014_auto__del_field_story_contact.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): # Deleting field 'Story.contact' db.delete_column('storybase_story_story', 'contact_id') def backwar...
google-code-export/marinemap
refs/heads/master
lingcod/spacing/migrations/0002_auto__add_field_land_date_modified__add_field_pickledgraph_date_modifi.py
3
# 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 'Land.date_modified' db.add_column('spacing_land', 'date_modified', self.gf('django.db....
davidzchen/tensorflow
refs/heads/master
tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/shared_variable_v1.py
13
# Copyright 2019 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...
grimmjow8/ansible
refs/heads/devel
lib/ansible/plugins/callback/json.py
118
# (c) 2016, Matt Martz <matt@sivel.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
joewa/open-bldc-modelica
refs/heads/master
python/test.py
4
# file: test.py #!/usr/bin/python import OMPython cmds = ["loadModel(Modelica)", "model test end test;", "loadFile(\"../OpenBLDC/package.mo\")", "simulate(OpenBLDC.Tests.TestPWM, fileNamePrefix=\"Result\", stopTime=0.25)", "plotAll()"] _omc = OMPython.OMCSession() for cmd in cmds: ...
leafclick/intellij-community
refs/heads/master
python/helpers/pydev/_pydevd_bundle/pydevd_reload.py
49
""" Based on the python xreload. Changes ====================== 1. we don't recreate the old namespace from new classes. Rather, we keep the existing namespace, load a new version of it and update only some of the things we can inplace. That way, we don't break things such as singletons or end up with a second repres...
sander76/home-assistant
refs/heads/dev
homeassistant/components/moon/__init__.py
36
"""The moon component."""
ShashaQin/erpnext
refs/heads/develop
erpnext/patches/v4_4/__init__.py
12133432
takeyourmeds/takeyourmeds-web
refs/heads/master
takeyourmeds/reminders/reminders_create/__init__.py
12133432
openfun/edx-platform
refs/heads/master
common/djangoapps/xblock_django/migrations/__init__.py
12133432
talhajaved/nyuadmarket
refs/heads/master
flask/lib/python2.7/site-packages/pip/utils/appdirs.py
88
""" This code was taken from https://github.com/ActiveState/appdirs and modified to suite our purposes. """ from __future__ import absolute_import import os import sys from pip._vendor import six from pip.compat import WINDOWS def user_cache_dir(appname): r""" Return full path to the user-specific cache dir...
riseofthetigers/letsencrypt
refs/heads/master
acme/acme/jose/json_util_test.py
31
"""Tests for acme.jose.json_util.""" import itertools import unittest import mock import six from acme import test_util from acme.jose import errors from acme.jose import interfaces from acme.jose import util CERT = test_util.load_cert('cert.pem') CSR = test_util.load_csr('csr.pem') class FieldTest(unittest.Test...
SUSE-Cloud/nova
refs/heads/stable/havana
nova/tests/cells/test_cells_state_manager.py
8
# Copyright (c) 2013 Rackspace Hosting # 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...
Donkyhotay/MoonPy
refs/heads/master
twisted/python/deprecate.py
1
# -*- test-case-name: twisted.python.test.test_deprecate -*- # Copyright (c) 2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Deprecation framework for Twisted. To mark a method or function as being deprecated do this:: def badAPI(self, first, second): ''' Docstring for badAPI. ...
peterfpeterson/mantid
refs/heads/master
Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLAutoProcessTest.py
3
# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2020 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Ident...
ryandougherty/mwa-capstone
refs/heads/heroku
MWA_Tools/build/matplotlib/examples/api/date_demo.py
3
#!/usr/bin/env python """ Show how to make date plots in matplotlib using date tick locators and formatters. See major_minor_demo1.py for more information on controlling major and minor ticks All matplotlib date plotting is done by converting date instances into days since the 0001-01-01 UTC. The conversion, tick lo...
Instagram/django
refs/heads/master
django/contrib/localflavor/be/__init__.py
12133432
robovm/robovm-studio
refs/heads/master
python/lib/Lib/site-packages/django/db/backends/mysql/base.py
71
""" MySQL database backend for Django. Requires MySQLdb: http://sourceforge.net/projects/mysql-python """ import re import sys try: import MySQLdb as Database except ImportError, e: from django.core.exceptions import ImproperlyConfigured raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) ...
tdsimao/tt
refs/heads/master
django/conf/locale/km/__init__.py
12133432
javachengwc/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/conf/locale/is/__init__.py
12133432
lahoffm/aclu-bail-reform
refs/heads/master
src/webscraper/bibb/jailCrawler/__init__.py
12133432
jazkarta/edx-platform-for-isc
refs/heads/backport-auto-certification
lms/djangoapps/verify_student/__init__.py
12133432
signed/intellij-community
refs/heads/master
python/testData/qualifiedName/topLevelFunctionReference/a/b/c/__init__.py
12133432
marissazhou/django
refs/heads/master
tests/migrations/migrations_test_apps/unspecified_app_with_conflict/__init__.py
12133432
atizo/cmsplugin_vimeosecure
refs/heads/master
cmsplugin_vimeosecure/templatetags/__init__.py
12133432
renanalencar/hermes
refs/heads/master
trips/migrations/0005_auto_20150725_1629.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('trips', '0004_auto_20150725_1628'), ] operations = [ migrations.AlterField( model_name='calendardate', ...
andim27/magiccamp
refs/heads/master
build/lib/django/utils/decorators.py
64
"Functions that help with dynamically creating decorators for views." import types try: from functools import wraps, update_wrapper, WRAPPER_ASSIGNMENTS except ImportError: from django.utils.functional import wraps, update_wrapper, WRAPPER_ASSIGNMENTS # Python 2.4 fallback. def method_decorator(decorator): ...
tensorflow/tensorboard
refs/heads/master
tensorboard/default.py
1
# Copyright 2019 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...
inares/edx-platform
refs/heads/inares_sass
common/lib/capa/setup.py
117
from setuptools import setup, find_packages setup( name="capa", version="0.1", packages=find_packages(exclude=["tests"]), install_requires=["setuptools"], )
puzan/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/aws_kms.py
4
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
jamesacampbell/python-examples
refs/heads/master
flask-example.py
1
"""Flask example.""" import os from http import HTTPStatus from flask import Flask, request from flask import jsonify from werkzeug.utils import secure_filename """ Author: James Campbell Date: Mon May 23 16:26:36 2016 Date Updated: 2 July 2019 What is this code: An example Flask connection Why?: For me to remember l...
dschep/HELPeR
refs/heads/master
helper/agents/wmata/__init__.py
386048
nict-isp/uds-sdk
refs/heads/master
docs/_themes/__init__.py
386048