repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
alinbalutoiu/tempest
refs/heads/master
tempest/api/compute/servers/test_server_password.py
28
# Copyright 2013 IBM Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
hellhovnd/dentexchange
refs/heads/master
dentexchange/apps/employer/views.py
2
# -*- coding:utf-8 -*- from django.core.urlresolvers import reverse from django.views.generic.base import View, TemplateView from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView, UpdateView from django.views.generic.list import ListView from django.http.response import Htt...
2013Commons/hue
refs/heads/master
desktop/core/ext-py/tablib-develop/tablib/packages/xlwt/examples/hyperlinks.py
45
#!/usr/bin/env python # -*- coding: windows-1251 -*- # Copyright (C) 2005 Kiseliov Roman from xlwt import * f = Font() f.height = 20*72 f.name = 'Verdana' f.bold = True f.underline = Font.UNDERLINE_DOUBLE f.colour_index = 4 h_style = XFStyle() h_style.font = f w = Workbook() ws = w.add_sheet('F') ############## ##...
ari-neto/ansplay
refs/heads/master
inventory/vagrant.py
1
#!/usr/bin/env python #Adapted frm Mark Mandel's implementation #https://github.com/ansible/ansible/blobd/devel/plugins/inventory/vagrant.py #License: GNU General Public Licnese, Version 3 <http://www.gnu.org/licenses/> import argparse import json import paramiko import subprocess import sys def parse_args()...
BehavioralInsightsTeam/edx-platform
refs/heads/release-bit
cms/djangoapps/contentstore/views/tests/test_import_export.py
9
""" Unit tests for course import and export """ import copy import json import logging import os import shutil import tarfile import tempfile from uuid import uuid4 import ddt import lxml from django.conf import settings from django.core.files.storage import FileSystemStorage from django.test.utils import override_set...
abhitrip/Vehicle-Detection
refs/heads/master
notes/process_frames.py
1
import numpy as np from lesson_functions import * def process_frames(img): rectangles = [] colorspace = 'YUV' # It can be RGB, HSV, LUV, HLS, YUV, YCrCb orient = 11 pix_per_cell = 16 cell_per_block = 2 hog_channel = 'ALL' # It can be 0,1,2,'ALL' ystart,ystop,scale = 400,464,1.0 detecte...
bala4901/odoo
refs/heads/master
addons/web_tests/__openerp__.py
382
{ 'name': 'Tests', 'category': 'Hidden', 'description': """ OpenERP Web test suite. ======================= """, 'version': '2.0', 'depends': ['web', 'web_kanban'], 'data' : [ 'views/web_tests.xml', ], 'auto_install': True, }
jmartinc/video_visstrim
refs/heads/master
tools/perf/scripts/python/futex-contention.py
11261
# 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...
beni55/electron
refs/heads/master
script/pylint.py
178
#!/usr/bin/env python import glob import os import subprocess import sys SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def main(): os.chdir(SOURCE_ROOT) pylint = os.path.join(SOURCE_ROOT, 'vendor', 'depot_tools', 'pylint.py') settings = ['--rcfile=vendor/depot_tools/pylintrc'] p...
colllin/openlayers
refs/heads/master
tools/exampleparser.py
131
#!/usr/bin/env python import sys import os import re import time from xml.dom.minidom import Document try: import xml.etree.ElementTree as ElementTree except ImportError: try: import cElementTree as ElementTree except ImportError: try: import elementtree.ElementTree as Element...
aktech/sympy
refs/heads/master
sympy/tensor/array/tests/test_arrayop.py
10
import random import itertools from sympy.combinatorics import Permutation from sympy.combinatorics.permutations import _af_invert from sympy.utilities.pytest import raises from sympy import symbols, sin, exp, log, cos, transpose, adjoint, conjugate from sympy.tensor.array import Array, NDimArray from sympy.tensor....
QuLogic/vispy
refs/heads/master
examples/basics/gloo/gpuimage.py
18
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
mrcrgl/django_distributed_task
refs/heads/master
distributed_task/models.py
1
from django.db import models class Message(models.Model): queue = models.CharField(max_length=32, db_index=True) message = models.TextField() created = models.DateTimeField(auto_now_add=True)
ibmsoe/tensorflow
refs/heads/master
tensorflow/contrib/keras/api/keras/applications/__init__.py
46
# 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...
iulian787/spack
refs/heads/develop
lib/spack/spack/util/crypto.py
2
# 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) import sys import hashlib import llnl.util.tty as tty #: Set of hash algorithms that Spack can use, mapped to digest si...
webostin/django-btc
refs/heads/master
tests/m2m_multiple/tests.py
228
from __future__ import unicode_literals from datetime import datetime from django.test import TestCase from .models import Article, Category class M2MMultipleTests(TestCase): def test_multiple(self): c1, c2, c3, c4 = [ Category.objects.create(name=name) for name in ["Sports", "N...
liontoolkit/test
refs/heads/master
tests/test4.py
4
from nose.tools import with_setup from src.MyModule import MyModule count = 0 def setup_module(): print('<<<Setup Module>>>') def teardown_module(): print('<<<Teardown Module>>>') def setup_function(): print('<<<Setup Function>>>') global count count = 1 def teardown_function(): print('<<<...
jvkops/django
refs/heads/master
tests/ordering/tests.py
301
from __future__ import unicode_literals from datetime import datetime from operator import attrgetter from django.db.models import F from django.test import TestCase from .models import Article, Author, Reference class OrderingTests(TestCase): def setUp(self): self.a1 = Article.objects.create( ...
CloudHeads/lambda_utils
refs/heads/master
tests/test_lambda_processor.py
1
import logging from time import sleep import pytest from hamcrest import assert_that, equal_to from mock import MagicMock, patch from pytest import fixture from lambda_utils import BaseResponseHandler, LambdaProcessor from tests.conftest import Context @fixture def event(): return {"Some": "Event"} @fixture d...
plotly/plotly.py
refs/heads/master
packages/python/plotly/plotly/validators/choropleth/colorbar/_tickcolor.py
1
import _plotly_utils.basevalidators class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="choropleth.colorbar", **kwargs ): super(TickcolorValidator, self).__init__( plotly_name=plotly_name, pare...
lises/sheldon
refs/heads/master
plugins/hello.py
1
""" # Config (valid YAML document) must be at __doc__. name: hello # Name of plugin, lowercase, match with # file or package name. description: "Example plugin for testing bot." config: # Config variable that needed to set SHELDON_HELLO_REPLY: 'Hi' # in environment. ...
eyohansa/django
refs/heads/master
tests/forms_tests/widget_tests/test_textinput.py
175
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.forms import TextInput from django.utils.safestring import mark_safe from .base import WidgetTest class TextInputTest(WidgetTest): widget = TextInput() def test_render(self): self.check_html(self.widget, 'email', '', html='...
SuLab/scheduled-bots
refs/heads/master
scheduled_bots/talk_jenkins/run.py
1
""" Hit jenkins API to get the status of all jobs. Creates a table at: https://www.wikidata.org/w/index.php?title=User:ProteinBoxBot/Bot_Status api example: http://jenkins.sulab.org/job/Gene_Ontology/7/api/python?pretty=true """ import os import jenkins import pandas as pd import requests from datetime import dateti...
mnahm5/django-estore
refs/heads/master
Lib/site-packages/django/contrib/gis/geos/__init__.py
61
""" The GeoDjango GEOS module. Please consult the GeoDjango documentation for more details: https://docs.djangoproject.com/en/dev/ref/contrib/gis/geos/ """ __all__ = ['HAS_GEOS'] try: from .libgeos import geos_version, geos_version_info # NOQA: flake8 detects only the last __all__ HAS_GEOS = True __all__...
ssouffri/gitdot
refs/heads/master
contrib/fast-import/import-zips.py
2
#!/usr/bin/env python ## zip archive frontend for git-fast-import ## ## For example: ## ## mkdir project; cd project; git init ## python import-zips.py *.zip ## git log --stat import-zips from os import popen, path from sys import argv, exit, hexversion, stderr from time import mktime from zipfile import ZipFile ...
fragaria/BorIS
refs/heads/master
boris/clients/migrations/0017_auto_20170125_1224.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('clients', '0016_auto_20170123_1038'), ] operations = [ migrations.AlterField( model_name='drugusage', ...
CitoEngine/cito_plugin_server
refs/heads/master
cito_plugin_server/settings/production.py
1
"""Copyright 2014 Cyrus Dasadia 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 distr...
ng110/pyqtgraph
refs/heads/develop
pyqtgraph/graphicsItems/ROI.py
19
# -*- coding: utf-8 -*- """ ROI.py - Interactive graphics items for GraphicsView (ROI widgets) Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more infomation. Implements a series of graphics items which display movable/scalable/rotatable shapes for use as region-of-interest mar...
mikeljim/fb-mptcp
refs/heads/mptcp_facebook
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
xtiankisutsa/MARA_Framework
refs/heads/master
tools/androguard/androguard/gui/cemu.py
1
from PyQt5 import QtGui from androguard.core import androconf class Cursor(object): def __init__(self, x, y): self.x = x self.y = y def move(self, dx, dy): self.x += dx self.y += dy def moveAbsolute(self, x, y): self.x = x self.y = y def getPo...
JiYouMCC/python
refs/heads/master
Jaccorot/0018/0018.py
6
#!/usr/bin/python # coding=utf-8 """ 第 0018 题: 将 第 0015 题中的 city.xls 文件中的内容写到 city.xml 文件中,如下所示: <?xml version="1.0" encoding="UTF-8"?> <root> <citys> <!-- 城市信息 --> { "1" : "上海", "2" : "北京", "3" : "成都" } </citys> </root> """ import xlrd import json from lxml import etree def read_exl(file_name): ...
willprice/arduino-sphere-project
refs/heads/master
scripts/example_direction_finder/temboo/Library/LastFm/User/GetPersonalTags.py
5
# -*- coding: utf-8 -*- ############################################################################### # # GetPersonalTags # Retrieves a user's personal tags. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this fi...
arca1n/cocos2d-x_nextpeer_integration
refs/heads/master
tools/localvartoauto/LocalVarToAuto.py
17
#!/usr/bin/python # LocalVarToAuto.py # Change the class name in local variable assignment to auto # Copyright (c) 2013 cocos2d-x.org # Author: YuBo # This script is used for change the class name in local variable assignment to auto. # Right now there is some poblems you might want notice: # To start we will assume w...
rickyboy69/video-rickyboy
refs/heads/master
resources/lib/chardet/codingstatemachine.py
2930
######################## 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...
leereilly/django-1
refs/heads/master
django/utils/unittest/signals.py
571
import signal import weakref from django.utils.unittest.compatibility import wraps __unittest = True class _InterruptHandler(object): def __init__(self, default_handler): self.called = False self.default_handler = default_handler def __call__(self, signum, frame): installed_handler ...
sodo13/openpli-gls
refs/heads/master
lib/python/Plugins/Extensions/DVDBurn/TitleList.py
51
import DVDProject, TitleList, TitleCutter, TitleProperties, ProjectSettings, DVDToolbox, Process from Screens.Screen import Screen from Screens.ChoiceBox import ChoiceBox from Screens.InputBox import InputBox from Screens.MessageBox import MessageBox from Screens.HelpMenu import HelpableScreen from Screens.TaskView imp...
xodus7/tensorflow
refs/heads/master
tensorflow/contrib/boosted_trees/__init__.py
95
# 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...
mjmcconnell/sra
refs/heads/master
src-server/app/forms/pages/home.py
1
"""Form definitions, allow easy validation of input and rendering of forms """ # future imports from __future__ import absolute_import # third-party imports from wtforms import BooleanField from wtforms import FileField from wtforms import StringField from wtforms import TextAreaField from wtforms import validators #...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/draft_schematic/community_crafting/component/shield_housing.py
85615
import sys def setup(core, object): return
chundi/uwsgi
refs/heads/master
plugins/signal/uwsgiplugin.py
21
NAME = 'signal' CFLAGS = [] LDFLAGS = [] LIBS = [] GCC_LIST = ['signal_plugin']
maxiee/WritingYourFirstDjangoAppExercise
refs/heads/master
maxieesite/polls/admin.py
1
from django.contrib import admin from polls.models import Poll, Choice #admin.site.register(Poll) class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): list_display = ('question', 'pub_date', 'was_published_recently') fieldsets = [ (None, {'fi...
liu602348184/django
refs/heads/master
tests/model_forms/tests.py
85
from __future__ import unicode_literals import datetime import os from decimal import Decimal from unittest import skipUnless from django import forms from django.core.exceptions import ( NON_FIELD_ERRORS, FieldError, ImproperlyConfigured, ) from django.core.files.uploadedfile import SimpleUploadedFile from djang...
frederick623/wat
refs/heads/master
option_dl_python3.py
1
import sys import urllib.request, urllib.error, urllib.parse import zipfile import io import datetime output_path = "hkex_options" def main(argv): if len(argv) > 1: dt = datetime.datetime.strptime(argv[1], "%Y%m%d").date() else: dt = datetime.date.today() + datetime.timedelta(days=-3) while dt < datetime.dat...
openstack/cinder
refs/heads/master
cinder/tests/unit/volume/drivers/dell_emc/powerstore/test_volume_group_create_delete_update.py
2
# Copyright (c) 2021 Dell Inc. or its subsidiaries. # 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 requi...
heke123/chromium-crosswalk
refs/heads/master
third_party/pylint/pylint/pyreverse/utils.py
67
# Copyright (c) 2002-2013 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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, o...
mljar/mljar-api-python
refs/heads/master
mljar/model/dataset.py
1
from marshmallow import Schema, fields, post_load from .base import BaseModel class DatasetSchema(Schema): hid = fields.Str() title = fields.Str() scope = fields.Str() created_at = fields.DateTime(allow_none=True) created_by = fields.Number(allow_none=True) parent_project = fields.Number(allow...
varunkamra/kuma
refs/heads/master
kuma/search/paginator.py
23
from django.core.paginator import EmptyPage, Page, PageNotAnInteger, Paginator class SearchPaginator(Paginator): """ A better paginator for search results The normal Paginator does a .count() query and then a slice. Since ES results contain the total number of results, we can take an optimistic s...
wdv4758h/ZipPy
refs/heads/master
edu.uci.python.benchmark/src/benchmarks/sympy/sympy/core/compatibility.py
1
""" Reimplementations of constructs introduced in later versions of Python than we support. Also some functions that are needed SymPy-wide and are located here for easy import. """ from __future__ import print_function, division import operator from collections import defaultdict from sympy.external import import_modu...
JohnGriffiths/nipype
refs/heads/master
nipype/workflows/fmri/fsl/setup.py
42
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('fsl', parent_package, top_path) return config if __name__ == '_...
Saurabh7/shogun
refs/heads/master
examples/undocumented/python_modular/distance_sparseeuclidean_modular.py
26
#!/usr/bin/env python traindat = '../data/fm_train_real.dat' testdat = '../data/fm_test_real.dat' parameter_list = [[traindat,testdat],[traindat,testdat]] def distance_sparseeuclidean_modular (train_fname=traindat,test_fname=testdat): from modshogun import RealFeatures, SparseRealFeatures, SparseEuclideanDistance, C...
GalenMa/kolla
refs/heads/master
kolla/hacking/checks.py
5
# 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 # distributed under th...
googleapis/googleapis-gen
refs/heads/master
google/ads/googleads/v4/googleads-py/google/ads/googleads/v4/services/types/campaign_criterion_service.py
1
# -*- coding: utf-8 -*- # 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...
alsandeep/kernel-4.4
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
agaldona/odoo-addons
refs/heads/master
partner_event_follower/tests/__init__.py
4
# -*- coding: utf-8 -*- # (c) 2016 Alfredo de la Fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from . import test_partner_event_follower
LoHChina/nova
refs/heads/master
nova/api/openstack/compute/plugins/v3/evacuate.py
33
# Copyright 2013 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 a...
hgrecco/pyvisa
refs/heads/master
pyvisa/ctwrapper/types.py
2
# -*- coding: utf-8 -*- """ pyvisa.ctwrapper.types ~~~~~~~~~~~~~~~~~~~~~~ VISA VPP-4.3 data types (VPP-4.3.2 spec, section 3) using ctypes constants. This file is part of PyVISA. All data types that are defined by VPP-4.3.2. The module exports all data types including the pointer and array t...
etingof/pyasn1-modules
refs/heads/master
pyasn1_modules/rfc8696.py
2
# # This file is part of pyasn1-modules software. # # Created by Russ Housley with some assistance from asn1ate v.0.6.0. # # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # # Using Pre-Shared Key (PSK) in the Cryptographic Message Syntax (CMS) # # ASN.1 source from: # https:...
oroulet/freeopcua
refs/heads/master
tests/gmock/gtest/test/gtest_help_test.py
2968
#!/usr/bin/env python # # Copyright 2009, 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...
Adenilson/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/tests/test_typedef.py
106
def WebIDLTest(parser, harness): parser.parse(""" typedef long mylong; typedef long? mynullablelong; interface Foo { const mylong X = 5; const mynullablelong Y = 7; const mynullablelong Z = null; void foo(mylong arg); }; """) results = parser.finish()...
hakril/PythonForWindows
refs/heads/master
windows/winproxy/apis/cryptui.py
1
import ctypes import windows.generated_def as gdef from ..apiproxy import ApiProxy, NeededParameter from ..error import fail_on_zero class CryptUIProxy(ApiProxy): APIDLL = "cryptui" default_error_check = staticmethod(fail_on_zero) @CryptUIProxy() def CryptUIDlgViewContext(dwContextType, pvContext, hwnd, pws...
wpic/flask-appointment-calendar
refs/heads/master
fbone/frontend/forms.py
1
# -*- coding: utf-8 -*- from flask import Markup from flask.ext.wtf import Form from wtforms import (ValidationError, HiddenField, BooleanField, TextField, PasswordField, SubmitField) from wtforms.validators import Required, Length, EqualTo, Email from flask.ext.wtf.html5 import EmailField from ...
willingc/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/conch/insults/helper.py
29
# -*- test-case-name: twisted.conch.test.test_helper -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Partial in-memory terminal emulator @author: Jp Calderone """ import re, string from zope.interface import implements from twisted.internet import defer, protocol, reactor from twist...
michalliu/OpenWrt-Firefly-Libraries
refs/heads/master
staging_dir/host/lib/python2.7/lib2to3/tests/test_fixers.py
27
""" Test suite for the fixer modules """ # Python imports import os import unittest from itertools import chain from operator import itemgetter # Local imports from lib2to3 import pygram, pytree, refactor, fixer_util from lib2to3.tests import support class FixerTestCase(support.TestCase): # Other test cases ca...
GregorCH/ipet
refs/heads/master
doc/source/conf.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # IPET documentation build configuration file, created by # sphinx-quickstart on Mon May 29 12:59:01 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autog...
nishad-jobsglobal/odoo-marriot
refs/heads/master
addons/payment_transfer/controllers/__init__.py
4497
# -*- coding: utf-8 -*- import main
Valka7a/python-playground
refs/heads/master
sqlite3/tutorials/connceting-to-the-database.py
1
""" To connect to the database, we can use sqlite3.connect function by passing the name of a life to open or create it: ________________________________________________________________________________ >>> import sqlite3 >>> db = sqlite3.connect('data/test.db') ___________________________________________________________...
shawnsi/ansible-modules-core
refs/heads/devel
cloud/openstack/_quantum_floating_ip_associate.py
146
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # This module 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 ...
40223231/2015cd_midterm2
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/time.py
518
from browser import window import javascript # use Javascript Date constructor date = javascript.JSConstructor(window.Date) #daylight = 0 # fix me.. returns Non zero if DST timezone is defined ############################################## # Added to pass some tests # Are there timezone always in the browser? # I'm ...
bohlian/erpnext
refs/heads/develop
erpnext/patches/v6_19/comment_feed_communication.py
62
from __future__ import unicode_literals import frappe from frappe.patches.v6_19.comment_feed_communication import update_timeline_doc_for def execute(): for doctype in ("Customer", "Supplier", "Employee", "Project"): update_timeline_doc_for(doctype)
pombredanne/algos-urv
refs/heads/master
django/contrib/auth/tests/urls.py
12
from django.conf.urls.defaults import patterns from django.contrib.auth.urls import urlpatterns from django.contrib.auth.views import password_reset from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.template import Template, RequestContext def remote_user...
bop/rango
refs/heads/master
lib/python2.7/site-packages/django/conf/locale/sl/formats.py
106
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd. F Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j. F Y. H:i' YEAR_MONTH_...
bdero/edx-platform
refs/heads/master
common/djangoapps/track/tests/test_middleware.py
18
import re from mock import patch from mock import sentinel from django.contrib.auth.models import User from django.contrib.sessions.middleware import SessionMiddleware from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import override_settings from eventtracking imp...
SU-ECE-17-7/ibeis
refs/heads/next
ibeis/constants.py
1
# -*- coding: utf-8 -*- """ It is better to use constant variables instead of hoping you spell the same string correctly every time you use it. (Also it makes it much easier if a string name changes) """ from __future__ import absolute_import, division, print_function, unicode_literals # import utool import six import ...
v-iam/azure-sdk-for-python
refs/heads/master
azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py
2
# 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 ...
cavestruz/L500analysis
refs/heads/master
plotting/profiles/rho_evolution/rho_bulk/plot_rho_nu_binned_r500c.py
1
from L500analysis.data_io.get_cluster_data import GetClusterData from L500analysis.utils.utils import aexp2redshift from L500analysis.plotting.tools.figure_formatting import * from L500analysis.plotting.profiles.tools.profiles_percentile \ import * from L500analysis.plotting.profiles.tools.select_profiles \ imp...
jgdwyer/ML-convection
refs/heads/master
sknn_jgd/tests/__init__.py
3
from sknn.backend import lasagne
thekingofkings/focusread
refs/heads/master
libs/dns/e164.py
9
# Copyright (C) 2006, 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...
bubenkoff/pylama
refs/heads/develop
pylama/__init__.py
2
""" Code audit tool for python. :copyright: 2013 by Kirill Klenov. :license: BSD, see LICENSE for more details. """ __version__ = "6.3.1" __project__ = "pylama" __author__ = "Kirill Klenov <horneds@gmail.com>" __license__ = "GNU LGPL"
afrolov1/nova
refs/heads/master
nova/tests/api/openstack/compute/test_v3_auth.py
16
# Copyright 2013 IBM Corp. # Copyright 2010 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/LIC...
SOKP/external_chromium_org
refs/heads/sokp-l5.1
tools/crx_id/__init__.py
141
# Copyright (c) 2011 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. '''Module crx_id ''' pass
AndrewGrossman/django
refs/heads/master
tests/utils_tests/test_html.py
160
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from datetime import datetime from django.test import SimpleTestCase, ignore_warnings from django.utils import html, safestring, six from django.utils._os import upath from django.utils.deprecation import RemovedInDjango110Warning from django.u...
newrocknj/horizon
refs/heads/master
openstack_dashboard/dashboards/project/firewalls/tabs.py
48
# Copyright 2013, Big Switch Networks, 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 applic...
stscieisenhamer/pyqtgraph
refs/heads/develop
pyqtgraph/util/colorama/winterm.py
51
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from . import win32 # from wincon.h class WinColor(object): BLACK = 0 BLUE = 1 GREEN = 2 CYAN = 3 RED = 4 MAGENTA = 5 YELLOW = 6 GREY = 7 # from wincon.h class WinStyle(object): NORMAL = 0...
jart/tensorflow
refs/heads/master
tensorflow/contrib/model_pruning/examples/cifar10/cifar10_pruning.py
43
# 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...
M0ses/ansible
refs/heads/devel
v2/ansible/plugins/lookup/password.py
16
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2013, Javier Candeira <javier@candeira.com> # (c) 2013, Maykel Moya <mmoya@speedyrails.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...
ProgVal/Limnoria-test
refs/heads/debug-pypy-sqlite
plugins/Status/plugin.py
3
### # Copyright (c) 2002-2005, Jeremiah Fincher # Copyright (c) 2009, James McCoy # 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 copyr...
bryx-inc/boto
refs/heads/develop
tests/integration/cloudhsm/__init__.py
586
# Copyright (c) 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
xebialabs-community/xlr-servicenow-plugin
refs/heads/master
src/main/resources/servicenow/Server.py
1
# # Copyright 2019 XEBIALABS # # 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, publish, distribute, subli...
bhargav2408/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/pyclbr.py
47
"""Parse a Python module and describe its classes and methods. Parse enough of a Python file to recognize imports and class and method definitions, and to find out the superclasses of a class. The interface consists of a single function: readmodule_ex(module [, path]) where module is the name of a Python modu...
lilleswing/deepchem
refs/heads/master
examples/roitberg/app.py
6
import numpy as np from flask import request, abort, Flask import flask webapp = Flask(__name__) @webapp.route('/potential', methods=["POST"]) def potential(): content = request.get_json(force=True) if not content or not 'X' in content: abort(400) X = np.array(content['X']) x0 = X[:, 1:] a0 = X[:, :1]...
hbussell/pinax-tracker
refs/heads/master
apps/milestones/models.py
1
# -*- coding: utf-8 -*- from datetime import datetime from django.db import models from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.utils.html import escape from django.utils.translation import ugettext_lazy as _ from dja...
scottmcmaster/catapult
refs/heads/master
tracing/tracing_build/tracing_dev_server_config.py
4
# Copyright (c) 2015 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 argparse import json import os import sys import tracing_project from hooks import install from paste import httpserver from paste import fileap...
rdeheele/odoo
refs/heads/master
openerp/report/render/rml2txt/__init__.py
381
# -*- 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...
erkrishna9/odoo
refs/heads/master
openerp/tools/amount_to_text.py
393
# -*- 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...
hynnet/openwrt-mt7620
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/code.py
256
"""Utilities needed to emulate Python's interactive interpreter. """ # Inspired by similar code by Jeff Epler and Fredrik Lundh. import sys import traceback from codeop import CommandCompiler, compile_command __all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", "compile_command"] def ...
vansky/cocopro
refs/heads/master
scripts/find_pros.py
1
import sys options = [] for arg in sys.argv[1:]: with open(arg,'r') as f: options += f.readline().strip().split() options = list(set(options)) sys.stderr.write('Types of values for pro:\n'+str(len(options))+': '+str(options)+'\n')
jalavik/invenio
refs/heads/master
invenio/legacy/websubmit/scripts/websubmitadmin.py
13
#!@PYTHON@ # # This file is part of Invenio. # Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 the # Lic...
sposs/DIRAC
refs/heads/integration
Core/scripts/dirac-agent.py
9
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-agent # Author : Adria Casajus, Andrei Tsaregorodtsev, Stuart Paterson ######################################################################## __RCSID__ = "$Id$" """ This is a script to launch ...
wilkerwma/codeschool
refs/heads/master
src/cs_core/models/__init__.py
2
from codeschool.models import User from .sysmodels import * from .profile import * from .fileformat import * from .settings import * from .userforms import * from .activity import * from .course import *
HarveyHunt/linux
refs/heads/master
tools/perf/scripts/python/export-to-postgresql.py
132
# export-to-postgresql.py: export perf data to a postgresql database # Copyright (c) 2014, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # Thi...