repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
BruceDai/crosswalk-test-suite
refs/heads/master
webapi/tct-csp-w3c-tests/csp-py/csp_media-src_corss-origin_audio_blocked_int.py
30
def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0]) _CSP = "media-src http://www....
dylanlesko/youtube-dl
refs/heads/master
test/test_netrc.py
168
# coding: utf-8 from __future__ import unicode_literals import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from youtube_dl.extractor import ( gen_extractors, ) class TestNetRc(unittest.TestCase): def test_netrc_present(self): for ie ...
semonte/intellij-community
refs/heads/master
python/testData/quickFixes/PyAddCallSuperQuickFixTest/kwargs_after.py
80
class A(object): def __init__(self): pass class B(A): def __init__(self, **kwargs): super(B, self).__init__()
9and3r/RPi-InfoScreen-Kivy
refs/heads/master
screens/clock/screen.py
4
from datetime import datetime from kivy.properties import DictProperty from kivy.clock import Clock from kivy.uix.screenmanager import Screen class ClockScreen(Screen): """Simple plugin screen to show digital clock of current time.""" # String Property to hold time timedata = DictProperty(None) def ...
smartforceplus/SmartForceplus
refs/heads/master
.local/share/Odoo/addons/8.0/builder/models/demo/normal_distribution.py
1
import random from openerp import models, api, fields __author__ = 'one' class NormalDistributionGenerator(models.Model): _name = 'builder.ir.model.demo.generator.normal_distribution' _description = 'Normal Distribution Generator' _inherits = { 'builder.ir.model.demo.generator': 'base_id' } ...
dannyboi104/SickRage
refs/heads/master
sickbeard/name_parser/parser.py
3
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
yanheven/glance
refs/heads/master
glance/image_cache/__init__.py
7
# Copyright 2011 OpenStack Foundation # 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 requ...
y-asano/primecloud-controller
refs/heads/master
iaas-gw/src/DeleteSnapshot.py
5
# coding: UTF-8 # # Copyright 2014 by SCSK Corporation. # # This file is part of PrimeCloud Controller(TM). # # PrimeCloud Controller(TM) 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 versi...
alexschiller/osf.io
refs/heads/develop
addons/osfstorage/tests/test_models.py
4
from __future__ import unicode_literals import mock import unittest import pytest import pytz from django.core.exceptions import ObjectDoesNotExist from django.utils import timezone from nose.tools import * # noqa from addons.osfstorage.models import OsfStorageFile, OsfStorageFileNode, OsfStorageFolder from osf.exc...
anrl/gini3
refs/heads/master
backend/src/gloader/xml/parsers/xmlproc/namespace.py
15
""" A parser filter for namespace support. Placed externally to the parser for efficiency reasons. $Id: namespace.py,v 1.5 2001/12/30 12:09:14 loewis Exp $ """ import string import xmlapp # --- ParserFilter class ParserFilter(xmlapp.Application): "A generic parser filter class." def __init__(self): ...
arth-co/shoop
refs/heads/master
shoop_workbench/settings/utils.py
15
# -*- coding: utf-8 -*- class DisableMigrations(object): # See https://gist.github.com/NotSqrt/5f3c76cd15e40ef62d09 def __contains__(self, item): return True def __getitem__(self, item): return "notmigrations"
pwnieexpress/raspberry_pwn
refs/heads/master
src/pentest/voiper/sulley/sulley/pgraph/edge.py
25
# # pGRAPH # Copyright (C) 2006 Pedram Amini <pedram.amini@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 Software Foundation; either version 2 of the License, or (at your option) any later # version. # ...
mahak/ansible
refs/heads/devel
lib/ansible/galaxy/dependency_resolution/dataclasses.py
18
# -*- coding: utf-8 -*- # Copyright: (c) 2020-2021, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Dependency structs.""" # FIXME: add caching all over the place from __future__ import (absolute_import, division, print_function) __metaclass__ = type imp...
qiqian/shadowsocks
refs/heads/master
shadowsocks/server.py
8
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014 clowwindy # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # ...
seomoz/qless-py
refs/heads/master
qless/util.py
1
'''Some utility functions''' def import_class(klass): '''Import the named class and return that class''' mod = __import__(klass.rpartition('.')[0]) for segment in klass.split('.')[1:-1]: mod = getattr(mod, segment) return getattr(mod, klass.rpartition('.')[2])
pmaunz/pyqtgraph
refs/heads/develop
examples/Arrow.py
27
# -*- coding: utf-8 -*- """ Display an animated arrowhead following a curve. This example uses the CurveArrow class, which is a combination of ArrowItem and CurvePoint. To place a static arrow anywhere in a scene, use ArrowItem. To attach other types of item to a curve, use CurvePoint. """ import initExample ## Add p...
ahb0327/intellij-community
refs/heads/master
python/testData/inspections/RedundantParentheses_after.py
167
if True: pass
huang4fstudio/django
refs/heads/master
tests/forms_tests/tests/test_input_formats.py
313
from datetime import date, datetime, time from django import forms from django.test import SimpleTestCase, override_settings from django.utils.translation import activate, deactivate @override_settings(TIME_INPUT_FORMATS=["%I:%M:%S %p", "%I:%M %p"], USE_L10N=True) class LocalizedTimeTests(SimpleTestCase): def se...
xforce/diorama-native-modding
refs/heads/master
tools/gyp/test/escaping/gyptest-colon.py
58
#!/usr/bin/env python # 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. """ Tests that filenames that contain colons are handled correctly. (This is important for absolute paths on Windows.) """ import os import...
evamwangi/bc-7-Todo_List
refs/heads/master
venv/Lib/site-packages/wtforms/ext/i18n/utils.py
81
""" Module is just here for compatibility reasons, and will be removed in a future release. Importing this will cause a DeprecationWarning. """ from wtforms.i18n import (messages_path, get_builtin_gnu_translations, get_translations, DefaultTranslations) import warnings __all__ = ('messages_path', 'get_builtin_gnu_tra...
eeshangarg/oh-mainline
refs/heads/master
vendor/packages/python-social-auth/social/tests/backends/test_dribbble.py
76
import json from social.tests.backends.oauth import OAuth2Test class DribbbleOAuth2Test(OAuth2Test): backend_path = 'social.backends.dribbble.DribbbleOAuth2' user_data_url = 'https://api.dribbble.com/v1/user' expected_username = 'foobar' access_token_body = json.dumps({ 'access_token': 'foob...
FFMG/myoddweb.piger
refs/heads/master
monitor/api/python/Python-3.7.2/Lib/tkinter/__main__.py
169
"""Main entry point""" import sys if sys.argv[0].endswith("__main__.py"): sys.argv[0] = "python -m tkinter" from . import _test as main main()
MackZxh/OCA-Choice
refs/heads/8.0
partner-contact/partner_firstname/tests/test_empty.py
7
# -*- coding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # # 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 Foundation, either version 3...
cloudspace/mockups
refs/heads/master
test/sikuli/operatingsystem.sikuli/operatingsystem.py
1
from sikuli.Sikuli import * myOS = str(Env.getOS()) myOSVer = str(Env.getOSVersion()) print "OS: " + myOS + " (" + myOSVer + ")" def getBrowsers(): if myOS == "MAC": browsers = ["chrome-mac","firefox-mac","safari-mac"] return browsers else: exit("Operating System unknown")
beedesk/django-pipeline
refs/heads/master
tests/tests/test_collector.py
3
import os from django.contrib.staticfiles import finders from django.core.files.storage import FileSystemStorage from django.test import TestCase from pipeline.collector import default_collector from pipeline.finders import PipelineFinder def local_path(path): return os.path.abspath(os.path.join(os.path.dirname...
NervanaSystems/coach
refs/heads/master
rl_coach/tests/architectures/mxnet_components/test_utils.py
1
import pytest import mxnet as mx from mxnet import nd import numpy as np from rl_coach.architectures.mxnet_components.utils import * @pytest.mark.unit_test def test_to_mx_ndarray(): # scalar assert to_mx_ndarray(1.2) == nd.array([1.2]) # list of one scalar assert to_mx_ndarray([1.2]) == [nd.array([1...
mosbasik/buzhug
refs/heads/master
javasrc/lib/Jython/Lib/test/test_evalorder.py
23
from unittest import TestCase from test import test_support class Bucket(object): def __init__(self, value): self.__value = value def _get(self): return self.__value def _set(self, value): assert self.__value == value, "Value changed!" value = property(_get,_set) class PropBuck...
joshainglis/ansible
refs/heads/devel
samples/lookup_pipe.py
255
- hosts: localhost gather_facts: no tasks: - debug: msg="the date is {{ lookup('pipe', 'date') }}"
mkaluza/external_chromium_org
refs/heads/kk44
google_apis/build/check_internal.py
174
#!/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. """google_api's auto-internal gyp integration. Takes one argument, a path. Prints 1 if the path exists, 0 if not. """ import os...
smarkwell/asuswrt-merlin
refs/heads/master
release/src/router/samba36/lib/subunit/python/subunit/chunked.py
21
# # subunit: extensions to python unittest to get test results from subprocesses. # Copyright (C) 2005 Robert Collins <robertc@robertcollins.net> # # Licensed under either the Apache License, Version 2.0 or the BSD 3-clause # license at the users choice. A copy of both licenses are available in the # project sour...
Spindletop16/namebench
refs/heads/master
nb_third_party/jinja2/ext.py
199
# -*- coding: utf-8 -*- """ jinja2.ext ~~~~~~~~~~ Jinja extensions allow to add custom tags similar to the way django custom tags work. By default two example extensions exist: an i18n and a cache extension. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from collections impor...
louyihua/edx-platform
refs/heads/master
common/djangoapps/track/management/__init__.py
12133432
jamesyli/solum
refs/heads/master
solum/tests/builder/v1/__init__.py
12133432
keyurpatel076/MissionPlannerGit
refs/heads/master
packages/IronPython.StdLib.2.7.5-beta1/content/Lib/encodings/zlib_codec.py
533
""" Python 'zlib_codec' Codec - zlib compression encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs import zlib # this codec needs the optional zlib modu...
dexterx17/nodoSocket
refs/heads/master
clients/Python-2.7.6/Doc/includes/sqlite3/execute_3.py
44
import sqlite3 con = sqlite3.connect("mydb") cur = con.cursor() who = "Yeltsin" age = 72 cur.execute("select name_last, age from people where name_last=:who and age=:age", locals()) print cur.fetchone()
alex-march/micropython
refs/heads/master
tests/basics/fun_calldblstar2.py
40
# test passing a string object as the key for a keyword argument # they key in this dict is a string object and is not interned args = {'thisisaverylongargumentname': 123} # when this string is executed it will intern the keyword argument exec("def foo(*,thisisaverylongargumentname=1):\n print(thisisaverylongargument...
pombredanne/kunai-1
refs/heads/master
etc/packs/linux/collectors/collector_loadaverage.py
1
import os from kunai.log import logger from kunai.collector import Collector class LoadAverage(Collector): def launch(self): logger.debug('getLoadAvrgs: start') # Get the triplet from the python function try: loadAvrgs_1, loadAvrgs_5, loadAvrgs_15 = os.getloadavg() e...
Livit/Livit.Learn.EdX
refs/heads/labster/develop
common/lib/chem/chem/tests.py
44
import codecs from fractions import Fraction import unittest from .chemcalc import ( compare_chemical_expression, divide_chemical_expression, render_to_html, chemical_equations_equal, ) import chem.miller LOCAL_DEBUG = None def log(msg, output_type=None): """Logging function for tests""" if...
sanjeevtripurari/hue
refs/heads/master
desktop/core/ext-py/Paste-2.0.1/paste/request.py
33
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php # (c) 2005 Ian Bicking and contributors # This module is part of the Python Paste Project and is released under # the MIT License: http://www.opensourc...
MrP01/PyLatein
refs/heads/master
Trainer/templatetags/tools.py
1
from django import template import importlib register = template.Library() @register.filter def isinst(value, class_str): split = class_str.split(".") return isinstance(value, getattr(importlib.import_module(".".join(split[:-1])), split[-1]))
ryangallen/django
refs/heads/master
django/core/management/commands/loaddata.py
294
from __future__ import unicode_literals import glob import gzip import os import warnings import zipfile from itertools import product from django.apps import apps from django.conf import settings from django.core import serializers from django.core.exceptions import ImproperlyConfigured from django.core.management.b...
rooshilp/CMPUT410W15-project
refs/heads/master
testenv/lib/python2.7/site-packages/PIL/ImageEnhance.py
26
# # The Python Imaging Library. # $Id$ # # image enhancement classes # # For a background, see "Image Processing By Interpolation and # Extrapolation", Paul Haeberli and Douglas Voorhies. Available # at http://www.graficaobscura.com/interp/index.html # # History: # 1996-03-23 fl Created # 2009-06-16 fl Fixed mean ca...
redhat-openstack/swift
refs/heads/master-patches
swift/common/constraints.py
11
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
nicoboss/Floatmotion
refs/heads/master
OpenGL/GL/VERSION/GL_1_2.py
9
'''OpenGL extension VERSION.GL_1_2 This module customises the behaviour of the OpenGL.raw.GL.VERSION.GL_1_2 to provide a more Python-friendly API The official definition of this extension is available here: http://www.opengl.org/registry/specs/VERSION/GL_1_2.txt ''' from OpenGL import platform, constant, arrays fro...
chen0031/rekall
refs/heads/master
rekall-core/rekall/plugins/overlays/darwin/__init__.py
8
"""Profiles to support OSX specific data structures.""" from rekall.plugins.overlays.darwin import darwin from rekall.plugins.overlays.darwin import macho
repotvsupertuga/repo
refs/heads/master
script.module.dateutil/lib/dateutil/zoneinfo/__init__.py
97
# -*- coding: utf-8 -*- import logging import os import warnings import tempfile import shutil from subprocess import check_call from tarfile import TarFile from pkgutil import get_data from io import BytesIO from contextlib import closing from dateutil.tz import tzfile __all__ = ["gettz", "rebuild"] _ZONEFILENAME =...
campbe13/openhatch
refs/heads/master
vendor/packages/twill/twill/extensions/__init__.py
9480
#
mojones/Axelrod
refs/heads/master
axelrod/cooperation.py
2
from math import sqrt from . import eigen from axelrod import Actions C, D = Actions.C, Actions.D # As yet unused until RoundRobin returns interactions def cooperation_matrix(interactions): """ The cooperation matrix from a single round robin. Parameters ---------- interactions : dictionary ...
iEngage/python-sdk
refs/heads/master
test/test_verve_response_interaction_category.py
1
# coding: utf-8 """ Stakeholder engagement API This API enables Intelligent Engagement for your Business. iEngage is a platform that combines process, augmented intelligence and rewards to help you intelligently engage customers. OpenAPI spec version: 1.0 Generated by: https://github.com/swagger...
boberfly/gaffer
refs/heads/master
doc/source/WorkingWithTheNodeGraph/BoxNode/screengrab.py
4
# BuildTarget: images/interfaceUIEditor.png import os import Gaffer import GafferScene import GafferUI scriptWindow = GafferUI.ScriptWindow.acquire( script ) graphEditor = scriptWindow.getLayout().editors( GafferUI.GraphEditor )[0] # Illustration of the basics of a Box # script["fileName"].setValue( os.path.abspat...
safwanrahman/mozillians
refs/heads/master
vendor-local/lib/python/rest_framework/runtests/runcoverage.py
22
#!/usr/bin/env python """ Useful tool to run the test suite for rest_framework and generate a coverage report. """ # http://ericholscher.com/blog/2009/jun/29/enable-setuppy-test-your-django-apps/ # http://www.travisswicegood.com/2010/01/17/django-virtualenv-pip-and-fabric/ # http://code.djangoproject.com/svn/django/tr...
coderbone/SickRage-alt
refs/heads/master
lib/sqlalchemy/event/__init__.py
79
# event/__init__.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .api import CANCEL, NO_RETVAL, listen, listens_for, remove, contains from .base...
Piasy/proxy-searcher
refs/heads/master
site-packages/django/contrib/flatpages/tests/middleware.py
77
import os from django.conf import settings from django.contrib.auth.models import User from django.contrib.flatpages.models import FlatPage from django.test import TestCase class FlatpageMiddlewareTests(TestCase): fixtures = ['sample_flatpages'] urls = 'django.contrib.flatpages.tests.urls' def setUp(self)...
Phuehvk/gyp
refs/heads/master
test/win/gyptest-cl-enable-enhanced-instruction-set.py
34
#!/usr/bin/env python # Copyright (c) 2014 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. """ Test VCCLCompilerTool EnableEnhancedInstructionSet setting. """ import TestGyp import os import sys if sys.platform == 'win32': pri...
TathagataChakraborti/resource-conflicts
refs/heads/master
PLANROB-2015/py2.5/lib/python2.5/rfc822.py
89
"""RFC 2822 message manipulation. Note: This is only a very rough sketch of a full RFC-822 parser; in particular the tokenizing of addresses does not adhere to all the quoting rules. Note: RFC 2822 is a long awaited update to RFC 822. This module should conform to RFC 2822, and is thus mis-named (it's not worth rena...
shaistaansari/django
refs/heads/master
tests/i18n/other/locale/de/__init__.py
12133432
aitgon/wopmars
refs/heads/master
wopmars/tests/resource/__init__.py
12133432
saurabh6790/medsynaptic1-app
refs/heads/master
clinical/page/clinical_home/__init__.py
12133432
mick-d/nipype_source
refs/heads/master
nipype/fixes/numpy/testing/utils.py
29
# Allow numpy fixes noseclasses to do local import of utils from numpy.testing.utils import *
googleapis/java-notification
refs/heads/master
.github/readme/synth.py
128
# Copyright 2020 Google LLC # # 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, s...
metaml/nupic
refs/heads/master
tests/unit/nupic/algorithms/nab_detector_test.py
31
#! /usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
encukou/freeipa
refs/heads/master
ipaclient/remote_plugins/2_156/passwd.py
16
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # # pylint: disable=unused-import import six from . import Command, Method, Object from ipalib import api, parameters, output from ipalib.parameters import DefaultFrom from ipalib.plugable import Registry from ipalib.text import _ from ipapython.dn ...
AkizukiRyoko/mtasa-blue
refs/heads/master
vendor/google-breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/internal/type_checkers.py
527
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
koyuawsmbrtn/eclock
refs/heads/master
windows/Python27/Lib/site-packages/pip/_vendor/requests/packages/charade/euckrfreq.py
3120
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
commtrack/temp-aquatest
refs/heads/master
apps/hq/reporter/api_/resources.py
1
import operator from datetime import datetime, timedelta from django.http import HttpResponseBadRequest from transformers.xml import xmlify from transformers.http import responsify from xformmanager.models import FormDefModel, Metadata from hq.models import ReporterProfile from hq.reporter.api_.reports import Re...
codeinvain/object_detection
refs/heads/master
app/target.py
1
import cv2 import tracks from ostruct import OpenStruct class Target: def __init__(self,contour): self.contour = contour self._ratio = None self._rect = None def area(self): self._area = self._area or cv2.contourArea(self.contour) return self._area def rect(self):...
thePortus/generator-djangular-gift
refs/heads/master
django-viewset/templates/_.tests.__init__.py
51
# -*- coding: UTF-8 -*-
thisismedium/md
refs/heads/master
md/__init__.py
12133432
group-policy/rally
refs/heads/master
tests/unit/plugins/openstack/scenarios/ec2/__init__.py
12133432
bikong2/django
refs/heads/master
tests/i18n/other/locale/__init__.py
12133432
xapharius/HadoopML
refs/heads/master
Engine/src/ensemble/regression/__init__.py
12133432
bunnyitvn/webptn
refs/heads/master
django/conf/locale/mn/__init__.py
12133432
mknz/furiganasan
refs/heads/master
write2odt.py
1
# -*- coding: utf-8 -*- import re from odf.opendocument import OpenDocumentText from odf import teletype from odf.text import P from odf.text import Ruby from odf.text import RubyBase from odf.text import RubyText TOKENS_KANJI = re.compile(u'[一-龠]+') # kanji def add_str(paragraph_element, string): """Add strin...
JamesJGarner/cms
refs/heads/master
src/cms/apps/links/tests.py
1
from django.test import TestCase from django.contrib.contenttypes.models import ContentType from cms.apps.pages.models import Page from cms.apps.links.models import Link class TestLinks(TestCase): def setUp(self): page = Page.objects.create( title = "Homepage", content_type =...
KangHsi/youtube-8m
refs/heads/master
youtube-8m/readers.py
9
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
OnRampOrg/onramp
refs/heads/master
server/ui/admin/users/views.py
2
import json from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.http import HttpResponse from django.template import Context from django.template.loader import get_template from ui.admin.models import job, user_to_workspace @login_required def main(request...
gregdek/ansible
refs/heads/devel
lib/ansible/modules/cloud/oneandone/oneandone_monitoring_policy.py
93
#!/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...
schreiberx/sweet
refs/heads/master
benchmarks_sphere/galewsky/galewski_rk4_robert_nonlinear_T128/pp_plot_csv.py
1
#! /usr/bin/python3 import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sys first = True s = 2e-5 vort_contour_levels = np.append(np.arange(-1e-4, 0, s), np.arange(s, 1e-4, s)) zoom_lat = True zoom_lat = False zoom_lat = 'vort' in sys.argv[1] fontsize=8 figsize=(9, ...
archen/django
refs/heads/master
tests/template_tests/templatetags/subpackage/__init__.py
12133432
HyperBaton/ansible
refs/heads/devel
test/units/plugins/callback/__init__.py
12133432
mjumbewu/jokosher
refs/heads/master
extensions/eggs/ExtensionConsole/setup.py
2
from setuptools import setup import sys, os from shutil import copy version = "1.1" setup(name="ExtensionConsole", version=version, author='Laszlo Pandy', author_email='laszlok2@gmail.com', maintainer='Laszlo Pandy', maintainer_email='laszlok2@gmail.com', description='A powerful python console for Jo...
keisuke-umezawa/chainer
refs/heads/master
tests/chainer_tests/functions_tests/loss_tests/test_cross_covariance.py
11
import unittest import numpy import six import chainer from chainer.backends import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr def _cross_covariance(y, z, dtype): row = y.shape[1] col = z.shape[1] y, z = cuda.to_cpu(...
fedosov/django-generic-ratings
refs/heads/master
ratings/management/commands/__init__.py
12133432
e-gob/plataforma-kioscos-autoatencion
refs/heads/master
scripts/ansible-play/.venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py
3131
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
BjornW/autokey
refs/heads/master
src/lib/__init__.py
12133432
artschwagerb/axolotl
refs/heads/master
tv/urls.py
1
from django.conf.urls import patterns, url from django.views.generic import DetailView from tv import views urlpatterns = patterns('tv.views', url(r'^$', views.index, name='tv-index'), url(r'^admin/dashboard', views.admin_dashboard, name='tv-admin-dashboard'), url(r'^show/(?P<pk>\d+)/$', views.sho...
edx/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/regressiontests/admin_scripts/complex_app/models/foo.py
102
from django.db import models class Foo(models.Model): name = models.CharField(max_length=5) class Meta: app_label = 'complex_app'
alsandeep/kernel-4.4
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
abilian/abilian-sbe
refs/heads/master
conftest.py
1
"""Configuration and injectable fixtures for Pytest. Reuses fixtures defined in abilian-core. """ import logging import os from pytest import fixture from abilian.sbe.app import create_app from abilian.testing.fixtures import TestConfig pytest_plugins = [ "abilian.testing.fixtures", "abilian.sbe.apps.commun...
pinkflozd/android_kernel_motorola_falcon
refs/heads/lolipop
tools/perf/scripts/python/net_dropmonitor.py
4235
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
norayr/unisubs
refs/heads/staging
apps/caching/templatetags/__init__.py
12133432
RedMadRobot/rmr_django
refs/heads/master
rmr/middleware/__init__.py
12133432
divio/django
refs/heads/master
tests/admin_scripts/app_with_import/__init__.py
12133432
windyuuy/opera
refs/heads/master
chromium/src/third_party/scons-2.0.1/engine/SCons/Tool/intelc.py
61
"""SCons.Tool.icl Tool-specific initialization for the Intel C/C++ compiler. Supports Linux and Windows compilers, v7 and up. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 200...
meabsence/python-for-android
refs/heads/master
python-modules/zope/zope/interface/common/idatetime.py
50
############################################################################## # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFT...
centricular/meson
refs/heads/gst-msvc
test cases/python3/2 extmodule/blaster.py
17
#!/usr/bin/env python3 import tachyon import sys result = tachyon.phaserize('shoot') if not isinstance(result, int): print('Returned result not an integer.') sys.exit(1) if result != 1: print('Returned result {} is not 1.'.format(result)) sys.exit(1)
silveregg/moto
refs/heads/master
tests/test_rds/test_rds.py
2
from __future__ import unicode_literals import boto.rds import boto.vpc from boto.exception import BotoServerError import sure # noqa from moto import mock_ec2, mock_rds from tests.helpers import disable_on_py3 @disable_on_py3() @mock_rds def test_create_database(): conn = boto.rds.connect_to_region("us-west-2...
kaiweifan/horizon
refs/heads/vip2
openstack_dashboard/dashboards/settings/password/__init__.py
12133432
Sofokus/formtags
refs/heads/master
formtags/templatetags/__init__.py
12133432
xia2/xia2
refs/heads/main
src/xia2/Wrappers/__init__.py
12133432