repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
CNR-Engineering/PyTelTools
refs/heads/master
pyteltools/arcpy_scripts/mxd_to_png.py
2
import sys try: import arcpy.mapping except ModuleNotFoundError: sys.exit(1) mxd_path, png_name, resolution = sys.argv[1], sys.argv[2], int(sys.argv[3]) try: mxd = arcpy.mapping.MapDocument(mxd_path) layers = arcpy.mapping.ListLayers(mxd) except Exception as e: sys.stderr.write(str(e)) sys.e...
joaoandrepsilva/burndown_for_what_standalone
refs/heads/master
burndown_for_what/migrations/0003_auto_20160331_0030.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-03-31 00:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('burndown_for_what', '0002_daily_score_unplanned'), ] operations = [ migrations...
ioanpocol/superdesk-core
refs/heads/master
superdesk/io/feeding_services/twitter.py
2
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import re im...
vrv/tensorflow
refs/heads/master
tensorflow/python/saved_model/tag_constants.py
70
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
neilLasrado/erpnext
refs/heads/develop
erpnext/accounts/doctype/loyalty_program_collection/loyalty_program_collection.py
17
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class LoyaltyProgramCollection(Document): pass
erazor83/python-dynamixel
refs/heads/master
examples/pose_sequence_play.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import time URI='tcp://10.254.2.2:5555' sys.path=[os.path.dirname(os.path.realpath(__file__))+'/../']+sys.path import python_dynamixel.zmq_bus as zmq_bus import python_dynamixel.common as common class myBusClass(zmq_bus.Bus,zmq_bus.PyPose_Commands):...
Infusion-OS/android_external_skia
refs/heads/lpop5.1
tools/test_all.py
84
#!/usr/bin/python """ Copyright 2014 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Run all unittests within this directory tree, recursing into subdirectories. """ import os import unittest from tests import skimage_self_test def main(): # First, ...
ricardogsilva/QGIS
refs/heads/master
python/plugins/processing/algs/qgis/Buffer.py
30
# -*- coding: utf-8 -*- """ *************************************************************************** Buffer.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ********************************...
hbrunn/OCB
refs/heads/8.0
openerp/addons/base/res/res_company.py
11
# -*- coding: utf-8 -*- ############################################################################## # # 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...
Ezka77/xen-orchestra-ce
refs/heads/master
scripts/xoa_versions.py
1
import os, json from urllib.request import urlopen urls = { "xoaserver": "https://raw.githubusercontent.com/vatesfr/xen-orchestra/master/packages/xo-server/package.json", "xoaweb": "https://raw.githubusercontent.com/vatesfr/xen-orchestra/master/packages/xo-web/package.json" } def env_push(k, url)...
yanggg1133/rma
refs/heads/master
crm_claim_rma/wizard/claim_make_repair.py
2
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Pexego Sistemas Informáticos All Rights Reserved # $Jesús Ventosinos Mayor <jesus@pexego.es>$ # # This program is free software: you can redistribute it and/or modify # it under the ...
jgoclawski/django
refs/heads/master
django/db/migrations/state.py
138
from __future__ import unicode_literals import copy from collections import OrderedDict from contextlib import contextmanager from django.apps import AppConfig from django.apps.registry import Apps, apps as global_apps from django.conf import settings from django.db import models from django.db.models.fields.proxy im...
ToonTownInfiniteRepo/ToontownInfinite
refs/heads/master
Panda3D-1.9.0/python/Tools/Scripts/logmerge.py
94
#! /usr/bin/env python """Consolidate a bunch of CVS or RCS logs read from stdin. Input should be the output of a CVS or RCS logging command, e.g. cvs log -rrelease14: which dumps all log messages from release1.4 upwards (assuming that release 1.4 was tagged with tag 'release14'). Note the trailing colon! Thi...
pratikmallya/heat
refs/heads/master
heat/tests/test_parameters.py
1
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
pmghalvorsen/gramps_branch
refs/heads/master
gramps/plugins/textreport/detdescendantreport.py
1
# -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2002 Bruce J. DeGrasse # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2007-2009 Brian G. Matherly # Copyright (C) 2007 Robert Cawley <rjc@cawley.id.au> # Copyright (C) 2008-2009 James Friedmann <jfriedm...
srene/ns-3-inrpp
refs/heads/master
src/point-to-point-layout/bindings/callbacks_list.py
772
callback_classes = [ ['void', 'ns3::Ptr<ns3::Socket>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr<ns3::Socket>', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empt...
caiuspb/home-assistant
refs/heads/dev
homeassistant/components/sensor/forecast.py
3
""" homeassistant.components.sensor.forecast ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Forecast.io weather service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.forecast/ """ import logging from datetime import timedelta from homeassistant.util ...
Communities-Communications/cc-odoo
refs/heads/master
addons/l10n_nl/__openerp__.py
260
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009 Veritos - Jan Verlaan - www.veritos.nl # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # con...
napjon/moocs_solution
refs/heads/master
DataWranglingMongoDB/Lesson4/dbinsert.py
1
#Insert data from JSON to MongoDB. JSON may python dictionary we have earlier import json def insert_data(data, db): # Your code here. Insert the data into a collection 'arachnid' db.arachnid.insert(data) if __name__ == "__main__": from pymongo import MongoClient client = MongoClient("m...
ASCrookes/django
refs/heads/master
django/conf/app_template/admin.py
13848
from django.contrib import admin # Register your models here.
wolfram74/numerical_methods_iserles_notes
refs/heads/master
venv/lib/python2.7/site-packages/IPython/parallel/apps/ipcontrollerapp.py
4
#!/usr/bin/env python # encoding: utf-8 """ The IPython controller application. Authors: * Brian Granger * MinRK """ #----------------------------------------------------------------------------- # Copyright (C) 2008 The IPython Development Team # # Distributed under the terms of the BSD License. The full licen...
veltri/DLV2
refs/heads/master
tests/parser/rewriting.2.test.py
1
input = """ reach(X,Y) :- arc(X,Y). reach(X,Y) :- arc(X,Z), reach(Z,Y). """ output = """ reach(X,Y) :- arc(X,Y). reach(X,Y) :- arc(X,Z), reach(Z,Y). """
bsa11b/mtasa-blue
refs/heads/1.4.1
vendor/google-breakpad/src/tools/gyp/test/win/win-tool/gyptest-win-tool-handles-readonly-files.py
164
#!/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. """ Make sure overwriting read-only files works as expected (via win-tool). """ import TestGyp import filecmp import os import stat import...
roselleebarle04/django
refs/heads/master
django/conf/locale/ko/formats.py
404
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'Y년 n월 j일' TIME_FORMAT = 'A g:i' D...
memmett/PyBLAW
refs/heads/master
pyblaw/grid.py
1
"""PyBLAW Grid class. """ import pyblaw.base import pyweno.grid class Grid(pyblaw.base.Base, pyweno.grid.Grid): """Unstructured spatial grid (discretisation). See pyweno.grid.Grid """ pass
kaltsimon/youtube-dl
refs/heads/master
youtube_dl/extractor/hornbunny.py
169
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, parse_duration, ) class HornBunnyIE(InfoExtractor): _VALID_URL = r'http?://(?:www\.)?hornbunny\.com/videos/(?P<title_dash>[a-z-]+)-(?P<id>\d+)\.html' _TEST = { ...
seandavi/SDST
refs/heads/master
SDST/fastq.py
2
from SDST.utils import fileOpen class FastqRecord(object): """Very simple fastq class containing header, sequence, line3, and quality as strings""" def __init__(self,header,sequence,line3,quality): """Initialize a FastqRecord :param header: header :param sequence: sequence :par...
bigdatauniversity/edx-platform
refs/heads/master
common/test/acceptance/pages/studio/index.py
16
""" Studio Home page """ from bok_choy.page_object import PageObject from . import BASE_URL class DashboardPage(PageObject): """ Studio Home page """ url = BASE_URL + "/course/" def is_browser_on_page(self): return self.q(css='body.view-dashboard').present @property def course_...
kwohlfahrt/pywt
refs/heads/master
pywt/tests/test_perfect_reconstruction.py
5
#!/usr/bin/env python """ Verify DWT perfect reconstruction. """ from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_, run_module_suite import pywt def test_perfect_reconstruction(): families = ('db', 'sym', 'coif', 'bior', 'rbio') wavelets ...
alizizohaker/congress-legislators
refs/heads/master
scripts/wikipedia_ids.py
10
# Scans Wikipedia for pages using the CongBio and CongLinks # templates, which have Bioguide IDs. Updates the 'wikipedia' # ID field for matching Members of Congress, and for pages # using the CongLinks template also updates a variety of # other ID as found in the template. import lxml.etree, re, urllib.request, urlli...
saiwing-yeung/scikit-learn
refs/heads/master
benchmarks/bench_random_projections.py
397
""" =========================== Random projection benchmark =========================== Benchmarks for random projections. """ from __future__ import division from __future__ import print_function import gc import sys import optparse from datetime import datetime import collections import numpy as np import scipy.s...
ahoyosid/scikit-learn
refs/heads/master
benchmarks/bench_random_projections.py
397
""" =========================== Random projection benchmark =========================== Benchmarks for random projections. """ from __future__ import division from __future__ import print_function import gc import sys import optparse from datetime import datetime import collections import numpy as np import scipy.s...
moijes12/oh-mainline
refs/heads/master
vendor/packages/Django/django/core/files/uploadedfile.py
223
""" Classes representing uploaded files. """ import os from io import BytesIO from django.conf import settings from django.core.files.base import File from django.core.files import temp as tempfile from django.utils.encoding import force_str __all__ = ('UploadedFile', 'TemporaryUploadedFile', 'InMemoryUploadedFile',...
ask/celery
refs/heads/master
celery/tests/worker/test_autoscale.py
2
from __future__ import absolute_import import sys from time import time from mock import Mock, patch from celery.concurrency.base import BasePool from celery.worker import state from celery.worker import autoscale from celery.tests.utils import Case, sleepdeprived class Object(object): pass class MockPool(B...
Fenixin/yogom
refs/heads/master
tryengine/renderer.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of TryEngine. # # 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 License, or # (at your o...
zeinsteinz/tacker
refs/heads/feyman
tacker/db/migration/alembic_migrations/versions/4c31092895b8_remove_service_instance.py
5
# Copyright 2014 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 ...
EagleShot/FarmData2
refs/heads/master
farmdb/models/__init__.py
1
# Need to change everything to explicit imports from .farm import Farm,FarmAdmin,Farmer,FarmerAdmin from .animalData import *
mwallraf/exscript
refs/heads/master
tests/templates/stdlib.connection/pseudodev.py
45
commands = ( )
peterfpeterson/mantid
refs/heads/master
Testing/SystemTests/tests/framework/ReduceOneSCD_Run.py
3
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 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 - Identifier: GPL - 3.0 + #pyl...
jeremiahmarks/sl4a
refs/heads/master
python/src/Tools/faqwiz/faqw.py
32
#! /usr/local/bin/python """FAQ wizard bootstrap.""" # This is a longer version of the bootstrap script given at the end of # faqwin.py; it prints timing statistics at the end of the regular CGI # script's output (so you can monitor how it is doing). # This script should be placed in your cgi-bin directory and made ...
a0c/odoo
refs/heads/master
openerp/tools/convert.py
19
# -*- coding: utf-8 -*- ############################################################################## # # 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...
shoyer/numpy
refs/heads/master
numpy/core/tests/test_errstate.py
8
from __future__ import division, absolute_import, print_function import platform import pytest import numpy as np from numpy.testing import assert_, assert_raises class TestErrstate(object): @pytest.mark.skipif(platform.machine() == "armv5tel", reason="See gh-413.") def test_invalid(self): with np.e...
crafty78/ansible
refs/heads/devel
test/units/template/test_safe_eval.py
205
# (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...
resec/superhero
refs/heads/master
controller/user.py
1
#coding=utf-8 __author__ = 'phithon' import tornado.web, os, base64, pymongo, time from controller.base import BaseHandler from tornado import gen from bson.objectid import ObjectId from util.function import time_span, hash, intval class UserHandler(BaseHandler): def initialize(self): super(UserHandler, se...
risicle/django
refs/heads/master
django/core/cache/backends/dummy.py
629
"Dummy cache backend" from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache class DummyCache(BaseCache): def __init__(self, host, *args, **kwargs): BaseCache.__init__(self, *args, **kwargs) def add(self, key, value, timeout=DEFAULT_TIMEOUT, version=None): key = self.make_key...
snowleung/pysms2email
refs/heads/master
pysms2email/pymail.py
1
# coding:utf-8 import smtplib import email from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText class Pymail(object): def __init__(self, _user, _passw, _tolist, _smtp_host='smtp-mail.outlook.com', _smtp_port=587): self._user = _user self._passw = _passw self....
sussexstudent/falmer
refs/heads/master
falmer/studentgroups/migrations/0002_auto_20170703_1626.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-03 16:26 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('studentgroups', '0001_initial'), ] operations = [ ...
lavish205/olympia
refs/heads/master
src/olympia/amo/tests/test_commands.py
2
# -*- coding: utf-8 -*- from importlib import import_module from django.conf import settings from django.core.management import call_command from django.core.management.base import CommandError from django.test.utils import override_settings import mock import pytest def sample_cron_job(*args): pass @override...
luokunrock/libyami
refs/heads/master
testscripts/yamilib.py
1
import os import sys import hashlib import string import shutil import time class libyami: decodepsnr = 40 encodepsnr = 33 decodefiltes = ['h264','264','26l','jsv','jvt','avc','ivf','jpeg','mjpg','jpg'] encodefiltes = ['I420','NV12','yuv'] valgringformat = 'valgrind --sim-hints=lax-ioctls --leak-che...
moonslider/jenkins-test
refs/heads/master
python101/7.controlStructures.for.py
1
#!/usr/bin/python collection = [111, 222, 333] for item in collection: print 'item:', item aDict = {'cat': 'furry and cute', 'dog': 'friendly and smart'} print aDict print aDict.keys() print aDict.values() for key in aDict.keys(): print 'A %s is %s.' % (key, aDict[key]) for key in aDict: print 'A %s is %s.' % (key...
Zlash65/erpnext
refs/heads/develop
erpnext/hr/doctype/driving_license_category/driving_license_category.py
24
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals from frappe.model.document import Document class DrivingLicenseCategory(Document): pass
PrincessTeruko/flying-pyg
refs/heads/master
rectangle.py
1
from entity import Entity import pyglet class Rectangle(Entity): def __init__(self, **kwargs): super(Rectangle, self).__init__(**kwargs) self.color = kwargs['color'] self.align() self.calc_verts() def draw(self): pyglet.gl.glColor3f(self.color[0], self.color[1], self.color[2]) pyglet.graphics.draw_ind...
SimonGreenhill/NexusMaker
refs/heads/master
nexusmaker/tests/test_NexusMaker.py
1
import sys import unittest from nexusmaker import Record from nexusmaker import NexusMaker, NexusMakerAscertained, NexusMakerAscertainedWords TESTDATA = [ Record(Language="A", Word="eye", Item="", Cognacy="1"), Record(Language="A", Word="leg", Item="", Cognacy="1"), Record(Language="A", Word="arm", Item="...
ElDeveloper/qiita
refs/heads/master
setup.py
2
#!/usr/bin/env python # ----------------------------------------------------------------------------- # Copyright (c) 2013, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ---------------------------...
teltek/edx-platform
refs/heads/master
openedx/core/__init__.py
209
""" This is the root package for all core Open edX functionality. In particular, the djangoapps subpackage is the location for all Django apps that are shared between LMS and CMS. Note: the majority of the core functionality currently lives in the root common directory. All new Django apps should be created here inste...
yvaucher/vertical-ngo
refs/heads/8.0
logistic_requisition/tests/test_mto_workflow.py
1
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
yaroslavvb/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/matrix_solve_op_test.py
56
# 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...
rasata/ansible
refs/heads/devel
lib/ansible/inventory/__init__.py
13
# (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...
barbuza/django
refs/heads/master
django/contrib/admin/templatetags/admin_list.py
18
from __future__ import unicode_literals import datetime from django.contrib.admin.templatetags.admin_static import static from django.contrib.admin.templatetags.admin_urls import add_preserved_filters from django.contrib.admin.utils import ( display_for_field, display_for_value, label_for_field, lookup_field, ) f...
kaplun/Invenio-OpenAIRE
refs/heads/OpenAIRE
modules/elmsubmit/lib/elmsubmit_field_validation.py
39
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 CERN. ## ## Invenio 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 t...
HuimingCheng/AutoGrading
refs/heads/master
learning/web_Haotian/venv/Lib/site-packages/werkzeug/debug/console.py
104
# -*- coding: utf-8 -*- """ werkzeug.debug.console ~~~~~~~~~~~~~~~~~~~~~~ Interactive console support. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD. """ import sys import code from types import CodeType from werkzeug.utils import escape from werkzeug.loca...
40223225/2015-cdb-g3-test2-
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/surface.py
603
from browser import document, html, window from javascript import console, JSConstructor from .rect import Rect #import pygame.rect canvas_ID=1 _canvas_id=None class Surface: def __init__(self, dim=[], depth=16, surf=None): if surf is None: self._depth=depth self._canvas=html.CANVAS(width=...
bruce3557/NTHUOJ_web
refs/heads/master
status/views.py
3
""" The MIT License (MIT) Copyright (c) 2014 NTHUOJ team 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 to use, copy, modify, merge, ...
cc1-cloud/cc1
refs/heads/master
src/wi/views/admin_cm/vm.py
1
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland # # 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.apac...
navodissa/python-flask
refs/heads/master
flask/lib/python2.7/site-packages/pip/commands/completion.py
538
import sys from pip.basecommand import Command BASE_COMPLETION = """ # pip %(shell)s completion start%(script)s# pip %(shell)s completion end """ COMPLETION_SCRIPTS = { 'bash': """ _pip_completion() { COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\ COMP_CWORD=$COMP_CWORD \\ ...
ak2703/edx-platform
refs/heads/master
common/djangoapps/lang_pref/api.py
116
# -*- coding: utf-8 -*- """ Python API for language and translation management. """ from collections import namedtuple from django.conf import settings from dark_lang.models import DarkLangConfig # Named tuples can be referenced using object-like variable # deferencing, making the use of tuples more readable by # e...
ehashman/oh-mainline
refs/heads/master
vendor/packages/webob/webob/request.py
30
import binascii import cgi import io import os import re import sys import tempfile import mimetypes try: import simplejson as json except ImportError: import json import warnings from webob.acceptparse import ( AcceptLanguage, AcceptCharset, MIMEAccept, MIMENilAccept, NoAccept, accept_...
vietpn/ghost-nodejs
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/shell.py
287
# -*- coding: utf-8 -*- """ pygments.lexers.shell ~~~~~~~~~~~~~~~~~~~~~ Lexers for various shells. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, do_insertions, bygroups, inclu...
HighSchoolHacking/GLS
refs/heads/master
test/integration/ConstructorStart/protected no parameters base one parameter.py
6
# def __init__(self): super().__init__(abc) #
mkim0818/my-concert
refs/heads/master
myconcert/artists/models.py
1
from django.db import models from django.core.urlresolvers import reverse # Create your models here. class Artist(models.Model): name = models.CharField(max_length=50) bio = models.TextField(max_length=3000) headshot = models.ImageField(upload_to='artist-headshots', blank=True) banner = models.ImageFie...
gdub/django
refs/heads/master
tests/migrate_signals/tests.py
324
from django.apps import apps from django.core import management from django.db.models import signals from django.test import TestCase, override_settings from django.utils import six APP_CONFIG = apps.get_app_config('migrate_signals') PRE_MIGRATE_ARGS = ['app_config', 'verbosity', 'interactive', 'using'] MIGRATE_DATABA...
robertnishihara/ray
refs/heads/master
python/ray/tests/aws/utils/stubs.py
2
import ray from ray.tests.aws.utils.mocks import mock_path_exists_key_pair from ray.tests.aws.utils.constants import DEFAULT_INSTANCE_PROFILE, \ DEFAULT_KEY_PAIR, DEFAULT_SUBNET from unittest import mock from botocore.stub import ANY def configure_iam_role_default(iam_client_stub): iam_client_stub.add_respo...
Brocade-OpenSource/OpenStack-DNRM-Neutron
refs/heads/master
neutron/plugins/brocade/db/models.py
24
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Brocade Communications System, 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 # # ...
adrienbrault/home-assistant
refs/heads/dev
tests/components/axis/test_camera.py
8
"""Axis camera platform tests.""" from unittest.mock import patch from homeassistant.components import camera from homeassistant.components.axis.const import ( CONF_STREAM_PROFILE, DOMAIN as AXIS_DOMAIN, ) from homeassistant.components.camera import DOMAIN as CAMERA_DOMAIN from homeassistant.const import STAT...
theSoloBrewer/Project_Management
refs/heads/master
apps/prints/views.py
6445
from django.shortcuts import render # Create your views here.
Geocent/geonode
refs/heads/master
geonode/upload/tests/integration.py
15
######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 License, or #...
alikins/ansible
refs/heads/devel
lib/ansible/modules/crypto/openssl_certificate.py
6
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016-2017, Yanis Guenane <yanis+ansible@guenane.org> # (c) 2017, Markus Teufelberger <mteufelberger+ansible@mgit.at> # 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_func...
williamsbdev/zookeeper
refs/heads/trunk
src/contrib/huebrowser/zkui/src/zkui/stats.py
114
# 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 ...
kutenai/django
refs/heads/master
tests/extra_regress/models.py
281
from __future__ import unicode_literals import copy import datetime from django.contrib.auth.models import User from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class RevisionableModel(models.Model): base = models.ForeignKey('self', models.S...
KaranToor/MA450
refs/heads/master
google-cloud-sdk/.install/.backup/lib/third_party/dns/rdtypes/ANY/SIG.py
13
# Copyright (C) 2003-2007, 2009, 2010 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 ...
touilleMan/marshmallow-mongoengine
refs/heads/master
tests/test_fields.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import import datetime as dt import decimal from datetime import datetime import mongoengine as me from marshmallow import validate, Schema import pytest from marshmallow_mongoengine import (fields, fields_for_model, ModelSchema, ...
SDX2000/python_snippets
refs/heads/master
install_package.py
1
import pip #Usage: #installPackage('html2textile') def installPackage(package): pip.main(['install', package])
cirrusone/phantom2
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/base_unittest.py
114
# Copyright (C) 2010 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 of conditions and the f...
harshaneelhg/scikit-learn
refs/heads/master
examples/linear_model/plot_ols_ridge_variance.py
387
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= Ordinary Least Squares and Ridge Regression Variance ========================================================= Due to the few points in each dimension and the straight line that linear regression uses to follow thes...
splunk/splunk-sdk-python
refs/heads/master
splunklib/modularinput/input_definition.py
8
# Copyright 2011-2015 Splunk, 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 wri...
gleicher27/Tardigrade
refs/heads/master
moose/framework/contrib/nsiqcppstyle/rules/RULE_4_1_E_align_conditions.py
43
""" Align condition list in 'if' and 'while' clause if they are splitted in multiple lines. All conditions should be aligned in the same column with the first condition. == Violation == if (a == b && a == c) <== Violation == Good == if (a == b && a == c) <== OK! """ from nsiqcppstyle_rulehe...
rllola/OpenBazaar
refs/heads/develop
db/migrations/migration3.py
13
#!/usr/bin/env python from sqlite3 import dbapi2 from db.migrations import migrations_util from node import constants def upgrade(db_path): with dbapi2.connect(db_path) as con: cur = con.cursor() # Use PRAGMA key to encrypt / decrypt database. cur.execute("PRAGMA key = '%s';" % constant...
TeachAtTUM/edx-platform
refs/heads/master
common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py
25
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('third_party_auth', '0008_auto_20170413_1455'), ] operations = [ migrations.AddField( model_name='ltiproviderconf...
evarilos/ECE-EVARILOS
refs/heads/master
message_evarilos_engine_type2_presentation_pb2.py
1
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: message_evarilos_engine_type2_presentation.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import descriptor_pb2 # ...
sarvex/depot-tools
refs/heads/master
recipes/v8.py
24
# Copyright 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. import sys import recipe_util # pylint: disable=F0401 # This class doesn't need an __init__ method, so we disable the warning # pylint: disable=W0232 cla...
LLNL/spack
refs/heads/develop
lib/spack/spack/test/__init__.py
71
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT)
richstoner/ol3
refs/heads/master
bin/pyglslunit.py
25
#!/usr/bin/python from optparse import OptionParser import re import sys import pystache ESCAPE_SEQUENCE = { '\\': '\\\\', '\n': '\\n', '\t': '\\t' } def js_escape(s): return ''.join(ESCAPE_SEQUENCE.get(c, c) for c in s) def glsl_compress(s, shortNames): # strip leading w...
brunogola/transitoagora-bot
refs/heads/master
src/transitoagora.py
1
#!/usr/bin/python # coding: utf-8 import urllib2, re, os from datetime import datetime from BeautifulSoup import BeautifulSoup as BS URL = "http://cetsp1.cetsp.com.br/monitransmapa/agora/" class TransitoAgora(object): """ Gets information about the traffic from transito agora >>> html = open("fake_ta.h...
gaddman/ansible
refs/heads/devel
lib/ansible/plugins/inventory/ini.py
5
# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' inventory: ini version_added: "2.4" short_description: Uses an Ansibl...
xiangshouding/nv
refs/heads/master
node/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/special.py
62
# -*- coding: utf-8 -*- """ pygments.lexers.special ~~~~~~~~~~~~~~~~~~~~~~~ Special lexers. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer from pygments.token import Token, Error, Text from...
ryfeus/lambda-packs
refs/heads/master
Lxml_requests/source/requests/packages/urllib3/util/url.py
149
from __future__ import absolute_import from collections import namedtuple from ..exceptions import LocationParseError url_attrs = ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment'] class Url(namedtuple('Url', url_attrs)): """ Datastructure for representing an HTTP URL. Used as a return value f...
Codlydodly/python-client
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/_base.py
1735
from __future__ import absolute_import, division, unicode_literals from collections import Mapping class Trie(Mapping): """Abstract base class for tries""" def keys(self, prefix=None): keys = super().keys() if prefix is None: return set(keys) # Python 2.6: no set compre...
insertnamehere1/maraschino
refs/heads/master
modules/nzbget.py
1
from flask import render_template, jsonify, request from jsonrpclib import jsonrpc import base64 import urllib from maraschino import app, logger from maraschino.tools import * def nzbget_http(): if get_setting_value('nzbget_https') == '1': return 'https://' else: return 'http://' def nzbge...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_azure_schema_registry.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
rnyang/RuNME
refs/heads/master
DP/stochdp.py
1
############################################################## ## NME 2013 FINAL - DYNAMIC PROGRAMMING ############################################################## ## Runnan Yang 2013 ## Solves Life-cycle dynamic programming problems ## by approximating each period's value function ## with a Chebyshev polynomial and...