repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
mvaled/sentry
refs/heads/master
src/sentry/runner/commands/devservices.py
1
from __future__ import absolute_import, print_function import os import click from six import text_type from itertools import chain def get_docker_client(): import docker client = docker.from_env() try: client.ping() return client except Exception: raise click.ClickException(...
Ravenm/2143-OOP-NASH
refs/heads/master
python3env/Lib/site-packages/pip/_vendor/html5lib/inputstream.py
435
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from pip._vendor.six.moves import http_client import codecs import re from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .constants import encodings, ReparseException from . import util...
joshuajan/odoo
refs/heads/master
addons/board/board.py
65
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2013 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
slavapestov/swift
refs/heads/master
test/Driver/Dependencies/Inputs/fail.py
14
#!/usr/bin/env python # fail.py - Just exits with an error code -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.txt...
shubhamdhama/zulip
refs/heads/master
zerver/migrations/0187_userprofile_is_billing_admin.py
7
# Generated by Django 1.11.14 on 2018-08-22 05:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('zerver', '0186_userprofile_starred_message_counts'), ] operations = [ migrations.AddField( model_name='userprofile', ...
olemb/dbfread
refs/heads/master
dbfread/deprecated_dbf.py
1
from __future__ import print_function import warnings from .dbf import DBF class DeprecatedDBF(DBF, list): """This is the old version of the table which is a subclass of list. It is included for backwards compatability with 1.0 and older.""" @property def loaded(self): # Since records are loa...
a-tsvetkov/lucid-python-django-registration
refs/heads/master
registration/views.py
47
""" Views which allow users to create and activate accounts. """ from django.shortcuts import redirect from django.shortcuts import render_to_response from django.template import RequestContext from registration.backends import get_backend def activate(request, backend, template_name='registration/ac...
smallyear/linuxLearn
refs/heads/master
salt/salt/returners/slack_returner.py
1
# -*- coding: utf-8 -*- ''' Return salt data via slack .. versionadded:: 2015.5.0 The following fields can be set in the minion conf file:: slack.channel (required) slack.api_key (required) slack.username (required) slack.as_user (required to see the profile picture of your bot) slack.profile (op...
bohlian/erpnext
refs/heads/develop
erpnext/hr/doctype/department/test_department.py
107
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals test_ignore = ["Leave Block List"] import frappe test_records = frappe.get_test_records('Department')
zqzhang/crosswalk-test-suite
refs/heads/master
wrt/wrt-packagemgt-windows-tests/pmwindows/comm.py
14
#!/usr/bin/env python # coding=utf-8 # # Copyright (c) 2016 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of c...
anant-dev/django
refs/heads/master
django/core/management/commands/squashmigrations.py
162
from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS, connections, migrations from django.db.migrations.loader import AmbiguityError, MigrationLoader from django.db.migrations.migration import SwappableTuple from django.db.migrations.o...
LeslieW/or-tools2
refs/heads/master
src/ortools/constraint_solver/__init__.py
36
import os as _os __path__.append(_os.path.join(__path__[0], '..', '..', 'gen', 'ortools', 'constraint_solver')) __path__.append(_os.path.join(__path__[0], '..', '..', '..', 'lib'))
z-e-r-o/plugin.video.osn
refs/heads/master
resources/lib/dns/rrset.py
8
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
jdobes/spacewalk
refs/heads/master
backend/test/runtests-postgresql.py
8
#!/usr/bin/python # # Copyright (c) 2008--2016 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You shoul...
asterisk/ari-py
refs/heads/master
ari/client.py
1
# # Copyright (c) 2013, Digium, Inc. # """ARI client library. """ import json import logging import urlparse import swaggerpy.client from ari.model import * log = logging.getLogger(__name__) class Client(object): """ARI Client object. :param base_url: Base URL for accessing Asterisk. :param http_clie...
GenericStudent/home-assistant
refs/heads/dev
tests/components/alarm_control_panel/test_device_action.py
7
"""The tests for Alarm control panel device actions.""" import pytest from homeassistant.components.alarm_control_panel import DOMAIN import homeassistant.components.automation as automation from homeassistant.const import ( CONF_PLATFORM, STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARM...
walty8/trac
refs/heads/trunk
trac/web/chrome.py
1
# -*- coding: utf-8 -*- # # Copyright (C) 2005-2010 Edgewall Software # Copyright (C) 2005-2006 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://...
rgayon/plaso
refs/heads/master
plaso/parsers/trendmicroav.py
1
# -*- coding: utf-8 -*- """Parser for Trend Micro Antivirus logs. Trend Micro uses two log files to track the scans (both manual/scheduled and real-time) and the web reputation (network scan/filtering). Currently only the first log is supported. """ from __future__ import unicode_literals from dfdatetime import def...
malcolmwhite/DungeonsAndDragons
refs/heads/master
src/main/managers/game/manual_game_manager.py
1
from src.main.managers.game.base_game_manager import BaseGameManager from src.main.managers.conflict.manual_conflict_manager import ManualConflictManager from src.main.managers.players.manual_player_manager import ManualPlayerManager class ManualGameManager(BaseGameManager): def _build_player_manager(self): ...
NovaFusion/twrp_kernel
refs/heads/master
Documentation/networking/cxacru-cf.py
14668
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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. # # This program i...
LittleLama/Sick-Beard-BoxCar2
refs/heads/development
lib/hachoir_parser/file_system/fat.py
90
from lib.hachoir_core.compatibility import sorted from lib.hachoir_parser import Parser from lib.hachoir_core.field import (FieldSet, StaticFieldSet, RawBytes, PaddingBytes, createPaddingField, Link, Fragment, Bit, Bits, UInt8, UInt16, UInt32, String, Bytes, NullBytes) from lib.hachoir_core.field.integer im...
heracek/django-nonrel
refs/heads/master
django/contrib/gis/geos/linestring.py
411
from django.contrib.gis.geos.base import numpy from django.contrib.gis.geos.coordseq import GEOSCoordSeq from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.point import Point from django.contrib.gis.geos import prototypes as cap...
40223113/0623-w17
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/datetime.py
628
"""Concrete date/time and related types. See http://www.iana.org/time-zones/repository/tz-link.html for time zone and DST data sources. """ import time as _time import math as _math def _cmp(x, y): return 0 if x == y else 1 if x > y else -1 MINYEAR = 1 MAXYEAR = 9999 _MAXORDINAL = 3652059 # date.max.toordinal()...
elainenaomi/sciwonc-dataflow-examples
refs/heads/master
dissertation2017/Experiment 1A/instances/10_2_workflow_full_10files_secondary_wmj_3sh_3rs_with_annot_with_proj_3s_range/work/ubuntu/pegasus/example_workflow/20161109T004859+0000/ConfigDB_Task_StatsCPUMemory_0.py
95
HOST = "ip-172-31-29-102.us-west-2.compute.internal:27017,ip-172-31-29-103.us-west-2.compute.internal:27017,ip-172-31-29-104.us-west-2.compute.internal:27017,ip-172-31-29-105.us-west-2.compute.internal:27017,ip-172-31-29-101.us-west-2.compute.internal:27017,ip-172-31-29-106.us-west-2.compute.internal:27017,ip-172-31-29...
yelizariev/hr
refs/heads/8.0
__unported__/hr_transfer/hr_transfer.py
27
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # 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, eit...
Russell-IO/ansible
refs/heads/devel
lib/ansible/module_utils/ldap.py
17
# -*- coding: utf-8 -*- # Copyright: (c) 2016, Peter Sagerson <psagers@ignorare.net> # Copyright: (c) 2016, Jiri Tyr <jiri.tyr@gmail.com> # Copyright: (c) 2017-2018 Keller Fuchs (@kellerfuchs) <kellerfuchs@hashbang.sh> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from...
derDavidT/sympy
refs/heads/master
examples/beginner/series.py
78
#!/usr/bin/env python """Series example Demonstrates series. """ from sympy import Symbol, cos, sin, pprint def main(): x = Symbol('x') e = 1/cos(x) print() print("Series for sec(x):") print() pprint(e.series(x, 0, 10)) print("\n") e = 1/sin(x) print("Series for csc(x):") ...
Akagi201/learning-python
refs/heads/master
pyramid/SessionTest/sessiontest/scripts/initializedb.py
28
import os import sys import transaction from sqlalchemy import engine_from_config from pyramid.paster import ( get_appsettings, setup_logging, ) from pyramid.scripts.common import parse_vars from ..models import ( DBSession, MyModel, Base, ) def usage(argv): cmd = os.path.basename(...
foosel/OctoPrint
refs/heads/master
tests/util/test_pip.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2017 The OctoPrint Project - Released under terms of the AGPLv3 License" import unittest imp...
adfernandes/mbed
refs/heads/master
drivers/usb/tests/TESTS/host_tests/pyusb_msd.py
8
""" Copyright (c) 2019, Arm Limited and affiliates. SPDX-License-Identifier: Apache-2.0 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 requi...
iamkingmaker/cointrol
refs/heads/master
cointrol/server/api/views.py
6
""" API views """ import logging from rest_framework import viewsets from rest_framework import authentication from rest_framework import permissions from rest_framework import renderers import cointrol.utils from cointrol.core import models from cointrol.core import serializers from .pagination import CointrolPagin...
danielkyh/Park.ly
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
1835
#!/usr/bin/env python # Copyright (c) 2011 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. """These functions are executed via gyp-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
Celedhrim/persomov
refs/heads/master
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/allocine.py
144
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..compat import compat_str from ..utils import ( qualities, ) class AllocineIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?allocine\.fr/(?P<typ>article|video|film)/(fichearticle...
excelly/xpy-ml
refs/heads/master
sdss_iii/web_report/web_import_scores.py
1
# export the detection results into the web database from ex import * import sdss.utils as utils def usage(): print(''' import the object level detection results into the web database python web_import_scores.py --input=input_score_files [--portion=0.2] ''') sys.exit(1) def main(input_files, portion = 0.2):...
ddico/account-financial-tools
refs/heads/11.0
account_asset_management/models/date_range.py
1
# Copyright 2009-2017 Noviat # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import time from odoo import api, models from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT class DateRange(models.Model): _inherit = 'date.range' @api.model def create(self, vals): # TODO: #...
denex/snafucator
refs/heads/master
Python/main.py
1
import sys import time import logging from datetime import datetime from unittest.mock import MagicMock # brew install opencv3 --with-ffmpeg --with-opengl --with-qt5 --without-numpy --without-opencl import cv2 import numpy as np # noinspection PyPep8Naming from opencv import cv_image as Image, record_video as Camera...
prds21/repository-barrialTV
refs/heads/master
core/ClientCookie/__init__.py
17
import sys try: True except NameError: True = 1 False = 0 # If you hate the idea of turning bugs into warnings, do: # import ClientCookie; ClientCookie.USE_BARE_EXCEPT = False USE_BARE_EXCEPT = True WARNINGS_STREAM = sys.stdout # Import names so that they can be imported directly from the package, like # thi...
leiferikb/bitpop
refs/heads/master
src/third_party/webdriver/pylib/test/selenium/test_prompts.py
48
from selenium import selenium import unittest import time class TestPrompts(unittest.TestCase): def setUp(self): self.selenium = selenium("localhost", \ 4444, "*firefoxproxy", "http://www.w3schools.com") self.selenium.start() def test_alert(self): sel = self.seleniu...
BhupeshGupta/erpnext
refs/heads/develop
erpnext/utilities/doctype/sms_log/__init__.py
37694
from __future__ import unicode_literals
fxs007/linux
refs/heads/master
tools/perf/scripts/python/futex-contention.py
1997
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
jonasfoe/COPASI
refs/heads/develop
copasi/bindings/python/examples/print_model_parameterset.py
2
import COPASI import sys dm = COPASI.CRootContainer.addDatamodel() assert (isinstance(dm, COPASI.CDataModel)) def print_group(label, group): # type: (str, COPASI.CModelParameterGroup) -> None """ This function takes a parameter group and prints it""" print (label) for i in range(group.size()): ...
shakedel/tensorboard
refs/heads/master
tensorboard/backend/application.py
1
# Copyright 2017 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...
Forever-Young/pytils
refs/heads/master
doc/examples-django/pytilsex/tests.py
1
# -*- encoding: utf-8 -*- from django.core.urlresolvers import reverse from django.test import TestCase from django.test.client import Client from pytils import VERSION as pytils_version class ExamplesTestCase(TestCase): def setUp(self): self.c = Client() def testIndex(self): resp = self.c.g...
GenericSnake/interactive-tutorials
refs/heads/master
suds/umx/__init__.py
204
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
openmicroscopy/openmicroscopy
refs/heads/develop
examples/TreeList/AllProjects.py
18
#!/usr/bin/env python # -*- coding: utf-8 -*- from omero.rtypes import rstring from omero_sys_ParametersI import ParametersI def getProjects(query_prx, username): return query_prx.findAllByQuery( "select p from Project p" " join fetch p.datasetLinks dil" " join fetch dil.child" " ...
mlperf/training_results_v0.6
refs/heads/master
Fujitsu/benchmarks/resnet/implementations/mxnet/example/ctc/lstm_ocr_infer.py
18
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
klahnakoski/esReplicate
refs/heads/master
mo_hg/hg_mozilla_org.py
1
# encoding: utf-8 # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import division from __future__ ...
simmetria/sentry
refs/heads/master
src/sentry/migrations/0026_auto__add_field_project_status.py
7
# 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 'Project.status' db.add_column('sentry_project', 'status', self.gf('django.db.models.fields...
HeraclesHX/scikit-learn
refs/heads/master
sklearn/neighbors/tests/test_neighbors.py
103
from itertools import product import numpy as np from scipy.sparse import (bsr_matrix, coo_matrix, csc_matrix, csr_matrix, dok_matrix, lil_matrix) from sklearn.cross_validation import train_test_split from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing impo...
calebj/calebj-cogs
refs/heads/master
xorole/xorole.py
2
import asyncio from collections import defaultdict import discord from discord.ext import commands from .utils.dataIO import dataIO from .utils import checks from .utils.chat_formatting import box, error, info, pagify, warning """XORoles (exclusive-or roles) cog by GrumpiestVulcan Commissioned 2017-07-27 by QuietRe...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.7/Lib/plat-mac/argvemulator.py
73
"""argvemulator - create sys.argv from OSA events. Used by applets that want unix-style arguments. """ from warnings import warnpy3k warnpy3k("In 3.x, the argvemulator module is removed.", stacklevel=2) import sys import traceback from Carbon import AE from Carbon.AppleEvents import * from Carbon import Evt from Carb...
cgstudiomap/cgstudiomap
refs/heads/develop
main/local_modules/res_partner_location_validation_missing_details/models/res_partner.py
1
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) cgstudiomap <cgstudiomap@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
lmorchard/badg.us
refs/heads/master
vendor-local/lib/python/chardet/euctwprober.py
236
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
benschmaus/catapult
refs/heads/master
third_party/gsutil/third_party/boto/boto/emr/emrobject.py
136
# Copyright (c) 2010 Spotify AB # Copyright (c) 2010 Jeremy Thurgood <firxen+boto@gmail.com> # Copyright (c) 2010-2011 Yelp # # 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 restricti...
physycom/QGIS
refs/heads/master
src/plugins/grass/scripts/t.rast.what.qgis.py
62
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################ # # MODULE: t.rast.what # AUTHOR(S): Soeren Gebbert # # PURPOSE: Sample a space time raster dataset at specific vector point # coordinates and write the output to stdou...
ilathid/ilathidEngine
refs/heads/master
engine/menubar.py
1
""" .7a000BBBWBBBBB0B8Z;. :XZ80000Z7;,. .:rXZ8B08827 S0ZZ02r :ra0Z88X aZa82; 7aZZZS SZaZ7 .SZZZr iZ2a...
sinnwerkstatt/landmatrix
refs/heads/main
apps/grid/tests/views/base.py
1
from unittest import mock from django.contrib.auth.models import Group, Permission, User from django.db import transaction from django.test import TestCase, override_settings from django.utils.datastructures import MultiValueDict from apps.grid.templatetags.custom_tags import get_user_role from apps.landmatrix.models...
jdwang001/ycmd
refs/heads/master
cpp/ycm/tests/gmock/gtest/scripts/upload.py
2511
#!/usr/bin/env python # # Copyright 2007 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...
nmichaud/enable-mapping
refs/heads/master
mapping/enable/asynchttp.py
1
#!/usr/bin/env python """Asynchronous HTTP/1.1 client library This module is an attempt to combine the best features of httplib with the scalability of asynchat. I have pasted as much code as I could from httplib (Python 2.0) because it is a well written and widely used interface. This may be a mistake, because the b...
pombredanne/algos-urv
refs/heads/master
articles/views.py
1
from django.core.cache import cache from django import http from django.contrib.auth.forms import UserCreationForm from django.http import HttpResponseRedirect from django.views.generic.simple import direct_to_template from articles.Mendeley import Mendeley def get_articles_json(request): mendeley = Mendel...
vlinhd11/vlinhd11-android-scripting
refs/heads/master
python/src/Lib/idlelib/IOBinding.py
52
# changes by dscherer@cmu.edu # - IOBinding.open() replaces the current window with the opened file, # if the current window is both unmodified and unnamed # - IOBinding.loadfile() interprets Windows, UNIX, and Macintosh # end-of-line conventions, instead of relying on the standard library, # which will...
FreeCAD/FreeCAD-AppImage
refs/heads/master
conda/win/ssl-patch.py
1
# Wrapper module for _ssl, providing some additional facilities # implemented in Python. Written by Bill Janssen. """This module provides some more Pythonic support for SSL. Object types: SSLSocket -- subtype of socket.socket which does SSL over the socket Exceptions: SSLError -- exception raised for I/O erro...
lunafeng/django
refs/heads/master
tests/update_only_fields/models.py
282
from django.db import models from django.utils.encoding import python_2_unicode_compatible GENDER_CHOICES = ( ('M', 'Male'), ('F', 'Female'), ) class Account(models.Model): num = models.IntegerField() @python_2_unicode_compatible class Person(models.Model): name = models.CharField(max_length=20) ...
caseyrygt/osf.io
refs/heads/develop
scripts/consistency/find_bad_files.py
64
"""Check for consistency errors in file relationships. """ from website.app import init_app from website import models from framework import Q app = init_app() def find_missing_files(): with_files = models.Node.find( Q('files_current', 'exists', True) | Q('files_versions', 'exists', True) )...
zdary/intellij-community
refs/heads/master
python/testData/intentions/PyAnnotateTypesIntentionTest/importDict_after.py
37
from typing import Dict def get_dict() -> Dict[int, str]: return {1: '1'}
Eforcers/gae-flask-todo
refs/heads/master
lib/werkzeug/testsuite/debug.py
101
# -*- coding: utf-8 -*- """ werkzeug.testsuite.debug ~~~~~~~~~~~~~~~~~~~~~~~~ Tests some debug utilities. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest import sys import re from werkzeug.testsuite import WerkzeugTestCase from werkzeug.deb...
naparuba/kunai
refs/heads/master
opsbro/module.py
2
from .parameters import ParameterBasedType from .log import LoggerFactory from .packer import packer from .misc.six import add_metaclass TYPES_DESCRIPTIONS = {'generic' : 'Generic module', 'functions_export': 'Such modules give functions that are useful by evaluation rules', 'connector': 'Suchs ...
304471720/mongrel2
refs/heads/master
examples/python/mongrel2/config/rc.py
98
import os import ConfigParser def read_rc(): rcbasename = '.m2shrc' homedir = os.path.expanduser('~') rcfile = homedir + os.sep + rcbasename if not (os.path.isfile(rcfile) and os.access(rcfile, os.R_OK)): return {} config = ConfigParser.SafeConfigParser() config.read(rcfile) args ...
njharman/die
refs/heads/master
die/die.py
1
__copyright__ = '''Copyright (c) 2003-4,2012 Norman J. Harman Jr.''' __license__ = '''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 ver...
seanwestfall/django
refs/heads/master
tests/forms_tests/tests/test_utils.py
169
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy from django.core.exceptions import ValidationError from django.forms.utils import ErrorDict, ErrorList, flatatt from django.test import SimpleTestCase from django.utils import six from django.utils.encoding import force_text, python_2_unicode...
saurabh6790/pow-lib
refs/heads/master
core/doctype/workflow_state/__init__.py
1129
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt
manevant/django-oscar
refs/heads/master
src/oscar/apps/payment/abstract_models.py
32
from decimal import Decimal from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from oscar.core.utils import get_default_currency from oscar.core.compat import AUTH_USER_MODEL from oscar.templatetags.currency_filters import...
Edu-Glez/Bank_sentiment_analysis
refs/heads/master
env/lib/python3.6/site-packages/nltk/tag/perceptron.py
5
# -*- coding: utf-8 -*- # This module is a port of the Textblob Averaged Perceptron Tagger # Author: Matthew Honnibal <honnibal+gh@gmail.com>, # Long Duong <longdt219@gmail.com> (NLTK port) # URL: <https://github.com/sloria/textblob-aptagger> # <http://nltk.org/> # Copyright 2013 Matthew Honnibal # NLTK m...
oVirt/vdsm
refs/heads/master
tests/testrunner.py
2
# # Copyright 2012-2017 Red Hat, 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 2 of the License, or # (at your option) any later version. # # This program is distributed ...
tnadeau/pybvc
refs/heads/master
samples/samplenetconf/demos/vr_demo11.py
4
#!/usr/bin/python # Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, 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: # 1. Redistributions of source code must retain the above copyright n...
manaris/jythonMusic
refs/heads/master
library/jython2.5.3/Lib/test/test_pkgimport.py
9
import os, sys, string, random, tempfile, unittest from test.test_support import run_unittest, is_jython class TestImport(unittest.TestCase): def __init__(self, *args, **kw): self.package_name = 'PACKAGE_' while sys.modules.has_key(self.package_name): self.package_name += random.choos...
ytan-git/plugin.video.myclouds
refs/heads/master
lib/ImageShower.py
1
class ImageShower(xbmcgui.Window): def __init__(self): self.imgControl = xbmcgui.ControlImage(0,0,1280,720, filename = '', aspectRatio=2) self.addControl(self.imgControl) def showImage(self, image_list, cur_position): self.image_count = len(image_list) self.image_list = ima...
dagwieers/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigiq_application_fasthttp.py
38
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
uber/vertica-python
refs/heads/master
vertica_python/vertica/messages/backend_messages/unknown.py
1
# Copyright (c) 2018-2019 Micro Focus or one of its affiliates. # Copyright (c) 2018 Uber Technologies, 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/licen...
HeroicEric/ember-careers
refs/heads/master
ember/node_modules/ember-cli/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py
2485
# This file comes from # https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py # Do not edit! Edit the upstream one instead. """Python module for generating .ninja files. Note that this is emphatically not a required piece of Ninja; it's just a helpful utility for build-file-generation systems that alr...
e02d96ec16/CumulusCI
refs/heads/master
cumulusci/tasks/tests/test_sfdx.py
1
""" Tests for the SFDX Command Wrapper""" import unittest import logging from mock import MagicMock from mock import patch import cumulusci.core.tasks from cumulusci.core.config import BaseGlobalConfig from cumulusci.core.config import BaseProjectConfig from cumulusci.core.config import TaskConfig from cumulusci.co...
willdavidc/piel
refs/heads/master
catkin_ws/src/piel/scripts/venv/lib/python2.7/site-packages/pip/_vendor/requests/models.py
360
# -*- 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 ...
eventials/django-haystack
refs/heads/master
haystack/utils/loading.py
12
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import copy import inspect import warnings from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.module_loading import module_has_submodule from haystack.exceptio...
open-synergy/stock-logistics-transport
refs/heads/8.0
setup/sale_transport_multi_address/setup.py
7073
import setuptools setuptools.setup( setup_requires=['setuptools-odoo'], odoo_addon=True, )
huyphan/pyyawhois
refs/heads/master
test/record/parser/test_response_whois_centralnic_com_gb_net_status_registered.py
1
# This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # # spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered # # and regenerate the tests with the following script # # $ scripts/generate_tests.py # from nose.tools import * from dateutil.parse...
eltomello/qutebrowser
refs/heads/master
tests/unit/utils/overflow_test_cases.py
5
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
domob1812/bitcoin
refs/heads/master
test/functional/rpc_whitelist.py
40
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ A test for RPC users with restricted permissions """ from test_framework.test_framework import Bitcoin...
wy182000/gyp
refs/heads/master
test/msvs/shared_output/gyptest-shared_output.py
341
#!/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. """ Test checking that IntermediateDirectory can be defined in terms of OutputDirectory. We previously had emitted the definition of Interme...
ex1usive-m4d/TemplateDocx
refs/heads/master
controllers/phpdocx/lib/openoffice/openoffice.org/basis3.4/program/python-core-2.6.1/lib/difflib.py
57
#! /usr/bin/env python """ Module difflib -- helpers for computing deltas between objects. Function get_close_matches(word, possibilities, n=3, cutoff=0.6): Use SequenceMatcher to return list of the best "good enough" matches. Function context_diff(a, b): For two lists of strings, return a delta in context d...
frdb194/ubuntu-tweak
refs/heads/master
ubuntutweak/modules/__init__.py
4
import os import sys import glob import logging import inspect import traceback from new import classobj from gi.repository import GObject, Gtk, Gdk, GdkPixbuf from ubuntutweak import system from ubuntutweak.utils import icon from ubuntutweak.common.consts import DATA_DIR, CONFIG_ROOT, IS_INSTALLED from ubuntutweak....
PostCenter/botlang
refs/heads/master
tests/test_bot.py
1
# -*- coding: utf-8 -*- import unittest from botlang.examples.example_bots import ExampleBots from botlang.interpreter import BotlangSystem class TestBots(unittest.TestCase): def test_input_data(self): code = """ (bot-node (data) (node-result (put data 'b...
mahithmukundan/Granted
refs/heads/master
granted/managers/access_manager.py
1
"""Manager for all access related operation.""" from django.db import connection class AccessManager(object): """Access Manager Definition.""" def __init__(self): """Init method.""" super(AccessManager, self).__init__() def does_user_have_access_for_resource_and_type(self, user_id, resou...
debugger06/MiroX
refs/heads/master
osx/build/bdist.macosx-10.5-fat/lib.macosx-10.5-fat-2.7/miro/frontends/widgets/segmented.py
3
# Miro - an RSS based video player application # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Participatory Culture Foundation # # 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; eithe...
prathamtandon/g4gproblems
refs/heads/master
Math/jumping_numbers.py
1
import unittest """ Print all jumping numbers smaller than or equal to a given value. A number is called a jumping number if all adjacent digits in it differ by 1. All single digit numbers are considered jumping numbers. For example, 7, 8987 and 4343456 are jumping numbers but 796 and 89098 are not. """ """ Approach: ...
cee1/cerbero-mac
refs/heads/1.2
cerbero/errors.py
4
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
maryklayne/Funcao
refs/heads/master
matematica/urls.py
1
from django.conf.urls import include, url from .views import * urlpatterns = [ # Examples: # url(r'^$', 'funcao.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^home$', home , name='home'), url(r'^funcao1$', funcao1 , name='funcao1'), url(r'^cadastro$', registrar , na...
ganeshrn/ansible
refs/heads/devel
test/support/integration/plugins/modules/x509_crl.py
13
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Felix Fontein <felix@fontein.de> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': ...
rodsol/opencog
refs/heads/master
opencog/python/blending/src/chooser/choose_all.py
22
from opencog.type_constructors import types from blending.src.chooser.base_chooser import BaseChooser from blending.util.blending_config import BlendConfig from blending.util.blending_error import blending_status __author__ = 'DongMin Kim' class ChooseAll(BaseChooser): """Atoms chooser that choosing all atoms. ...
susahe/sis
refs/heads/master
sis/course/migrations/0008_auto_20160208_2102.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-02-08 21:02 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('course', '0007_auto_2016020...
jbradberry/django-postoffice
refs/heads/master
postoffice/forms.py
1
from django import forms from . import models class MessageForm(forms.ModelForm): class Meta: model = models.Message fields = ('addresses', 'subject', 'body')