repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
albertomurillo/ansible
refs/heads/devel
lib/ansible/playbook/role_include.py
37
# # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope tha...
MaxVanDeursen/tribler
refs/heads/devel
TriblerGUI/widgets/editchannelpage.py
2
import base64 import urllib from PyQt5.QtCore import Qt, pyqtSignal from PyQt5.QtGui import QIcon, QCursor from PyQt5.QtWidgets import QWidget, QAction, QTreeWidgetItem, QFileDialog from TriblerGUI.tribler_action_menu import TriblerActionMenu from TriblerGUI.widgets.channel_torrent_list_item import ChannelTorrentLis...
SCECcode/BBP
refs/heads/master
bbp/comps/match_cfg.py
1
#!/usr/bin/env python """ Copyright 2010-2019 University Of Southern California 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 appli...
michaelpacer/scikit-image
refs/heads/master
skimage/transform/integral.py
22
import numpy as np def integral_image(x): """Integral image / summed area table. The integral image contains the sum of all elements above and to the left of it, i.e.: .. math:: S[m, n] = \sum_{i \leq m} \sum_{j \leq n} X[i, j] Parameters ---------- x : ndarray Input ima...
nkgilley/home-assistant
refs/heads/dev
homeassistant/components/wemo/__init__.py
8
"""Support for WeMo device discovery.""" import asyncio import logging import pywemo import requests import voluptuous as vol from homeassistant import config_entries from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.helpers import config_validation as cv from homeassistant.helpers.dispatche...
wfxiang08/django185
refs/heads/master
tests/template_tests/syntax_tests/test_if_equal.py
368
from django.test import SimpleTestCase from ..utils import setup class IfEqualTagTests(SimpleTestCase): @setup({'ifequal01': '{% ifequal a b %}yes{% endifequal %}'}) def test_ifequal01(self): output = self.engine.render_to_string('ifequal01', {'a': 1, 'b': 2}) self.assertEqual(output, '') ...
vitaly4uk/django
refs/heads/master
django/db/models/query.py
90
""" The main QuerySet implementation. This provides the public API for the ORM. """ import copy import sys import warnings from collections import OrderedDict, deque from django.conf import settings from django.core import exceptions from django.db import ( DJANGO_VERSION_PICKLE_KEY, IntegrityError, connections, ...
ikcalB/linuxcnc-mirror
refs/heads/master
share/gscreen/skins/9_axis/9_axis_handler.py
7
# This is a component of LinuxCNC # Copyright 2013, 2014 Chris Morley <chrisinnanaimo@hotmail.com>, # Chris Radek <chris@timeguy.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation...
dwillmer/numpy
refs/heads/master
numpy/f2py/cb_rules.py
153
#!/usr/bin/env python """ Build call-back mechanism for f2py2e. Copyright 2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 20...
394954369/horizon
refs/heads/master
horizon/test/test_dashboards/dogs/puppies/tabs.py
89
# 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 # d...
grilo/ansible-1
refs/heads/devel
test/units/cli/test_cli.py
10
# (c) 2017, Adrian Likins <alikins@redhat.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) any later vers...
ParticulateFlow/LIGGGHTS-PUBLIC
refs/heads/develop
tools/moltemplate/src/nbody_by_type_lib.py
5
#!/usr/bin/env python # Author: Andrew Jewett (jewett.aij at g mail) # http://www.chem.ucsb.edu/~sheagroup # License: 3-clause BSD License (See LICENSE.TXT) # Copyright (c) 2012, Regents of the University of California # All rights reserved. import sys from nbody_graph_search import * #from collections impo...
adykstra/mne-python
refs/heads/master
mne/forward/_compute_forward.py
2
# -*- coding: utf-8 -*- # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larsoner@uw.edu> # Mark Wronkiewicz <wronk@uw.edu> # # License: BSD (3-clause) # #...
mgedmin/scrapy
refs/heads/master
scrapy/extensions/throttle.py
142
import logging from scrapy.exceptions import NotConfigured from scrapy import signals logger = logging.getLogger(__name__) class AutoThrottle(object): def __init__(self, crawler): self.crawler = crawler if not crawler.settings.getbool('AUTOTHROTTLE_ENABLED'): raise NotConfigured ...
her0e1c1/click
refs/heads/master
tests/test_options.py
17
# -*- coding: utf-8 -*- import re import os import click import pytest def test_prefixes(runner): @click.command() @click.option('++foo', is_flag=True, help='das foo') @click.option('--bar', is_flag=True, help='das bar') def cli(foo, bar): click.echo('foo=%s bar=%s' % (foo, bar)) result =...
edmoody/mp32youtube
refs/heads/master
mp32youtube/__init__.py
1
from mp32youtube import *
amyvmiwei/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/encodings/cp65001.py
112
""" Code page 65001: Windows UTF-8 (CP_UTF8). """ import codecs import functools if not hasattr(codecs, 'code_page_encode'): raise LookupError("cp65001 encoding is only available on Windows") ### Codec APIs encode = functools.partial(codecs.code_page_encode, 65001) decode = functools.partial(codecs.code_page_de...
dakcarto/QGIS
refs/heads/master
python/plugins/db_manager/dlg_field_properties.py
12
# -*- coding: utf-8 -*- """ *************************************************************************** dlg_field_properties.py --------------------- Date : April 2012 Copyright : (C) 2012 by Giuseppe Sucameli Email : brush dot tyler at gmail dot com ******...
JessMcintosh/SonoGestures
refs/heads/master
NNRegCross.py
1
#!/usr/bin/python import sys import os import pylab import numpy as np import math from sklearn.preprocessing import StandardScaler from sklearn.neural_network import MLPRegressor #GESTURES = ["call","fist","gun","index","middle","point","ring","thumb","adduct","flex"] GESTURES = ["index","middle","ring","thumb","...
petrutlucian94/nova
refs/heads/master
nova/scheduler/filters/__init__.py
120
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
nihlaeth/lilyflower
refs/heads/master
lilyflower/dynamics.py
1
"""Dynamic commands.""" from lilyflower.notecommands import NoteCommand from lilyflower.errors import InvalidArgument class Dynamic(NoteCommand): """Dynamic mark.""" _inline = True class Crescendo(Dynamic): r""" A crescendo. First format(), it displays \\>, the second time it displays the ...
c0fec0de/anytree
refs/heads/master
anytree/node/node.py
1
# -*- coding: utf-8 -*- from .nodemixin import NodeMixin from .util import _repr class Node(NodeMixin, object): def __init__(self, name, parent=None, children=None, **kwargs): u""" A simple tree node with a `name` and any `kwargs`. Args: name: A name or any other object this...
karthik339/Agni
refs/heads/master
MainDemo/flask/lib/python2.7/site-packages/tempita/_looper.py
140
""" Helper for looping over sequences, particular in templates. Often in a loop in a template it's handy to know what's next up, previously up, if this is the first or last item in the sequence, etc. These can be awkward to manage in a normal Python loop, but using the looper you can get a better sense of the context....
mhils/mitmproxy
refs/heads/master
examples/contrib/webscanner_helper/proxyauth_selenium.py
3
import abc import logging import random import string import time from typing import Dict, List, cast, Any import mitmproxy.http from mitmproxy import flowfilter from mitmproxy import master from mitmproxy.script import concurrent from selenium import webdriver logger = logging.getLogger(__name__) cookie_key_name = ...
astrofrog/numpy
refs/heads/master
numpy/core/code_generators/generate_ufunc_api.py
8
import os import genapi import numpy_api from genapi import \ TypeApi, GlobalVarApi, FunctionApi, BoolValuesApi h_template = r""" #ifdef _UMATHMODULE #ifdef NPY_ENABLE_SEPARATE_COMPILATION extern NPY_NO_EXPORT PyTypeObject PyUFunc_Type; #else NPY_NO_EXPORT PyTypeObject PyUFunc_Type; #endif %s #else #if d...
unreal666/outwiker
refs/heads/master
src/test/gui/textpage/test_dropfiles.py
2
# -*- coding: utf-8 -*- import os.path import unittest from outwiker.core.attachment import Attachment from outwiker.pages.text.textpage import TextPageFactory from test.basetestcases import BaseOutWikerGUIMixin class TextEditorDropTargetTest(unittest.TestCase, BaseOutWikerGUIMixin): """ Test for drop files...
ttm/oscEmRede
refs/heads/master
venv/lib/python2.7/genericpath.py
4
/usr/lib/python2.7/genericpath.py
edenzik/elastiCity
refs/heads/master
wp_article.py
1
#!/usr/bin/env python """ dump Wikipedia article(s) via Mediawiki API """ __author__ = "siznax" __date__ = 2014 import argparse import requests import urllib from string import Template API_EN = "http://en.wikipedia.org/w/api.php" DEFAULT = "txt" # TODO: txt is deprecated in favor of json FORMATS = ['json', 'php',...
nikesh-mahalka/nova
refs/heads/master
nova/consoleauth/manager.py
58
#!/usr/bin/env python # Copyright (c) 2012 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/LICEN...
zachary-williamson/ITK
refs/heads/master
Examples/RegistrationITKv4/ImageRegistration3.py
8
#========================================================================== # # Copyright Insight Software Consortium # # 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...
iwiwi/darkopt
refs/heads/master
docs/source/conf.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # darkopt documentation build configuration file, created by # sphinx-quickstart on Sun Apr 30 22:06:51 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 # au...
dcramer/taskmaster
refs/heads/master
src/taskmaster/server.py
1
""" taskmaster.controller ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 DISQUS. :license: Apache License 2.0, see LICENSE for more details. """ import cPickle as pickle import gevent import hashlib import sys from gevent_zeromq import zmq from gevent.queue import Queue, Empty from os import path, unlink, rename from tas...
yanheven/nova
refs/heads/master
nova/db/migration.py
29
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
amaozhao/basecms
refs/heads/master
easy_thumbnails/south_migrations/0004_auto__add_field_source_storage_new__add_field_thumbnail_storage_new.py
20
# 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 'Source.storage_new' db.add_column('easy_thumbnails_source', 'storage_new', self.gf('django...
psi-rking/psi4
refs/heads/master
psi4/driver/qmmm.py
7
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2021 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
faun/django_test
refs/heads/master
django/contrib/localflavor/it/forms.py
36
""" IT-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_unicode from django.contrib.localflavor.it....
bnorthan/projects
refs/heads/master
Scripts/Jython/Deconvolve/Deconvolve_noncirculant.py
1
# @StatusService status # @DatasetService data # @CommandService command # @DisplayService display # @IOService io # this script extends and deconvolves an image using the model from the second deconvolution grand challenge # described here: http://bigwww.epfl.ch/deconvolution/challenge/index.html?p=documentation/over...
cellabus/chromebook
refs/heads/master
oauth2client/__init__.py
78
__version__ = "1.0"
postlund/home-assistant
refs/heads/dev
homeassistant/components/mold_indicator/__init__.py
36
"""Calculates mold growth indication from temperature and humidity."""
Workday/OpenFrame
refs/heads/master
third_party/cython/src/Cython/Debugger/Tests/test_libpython_in_gdb.py
110
# -*- coding: UTF-8 -*- """ Test libpython.py. This is already partly tested by test_libcython_in_gdb and Lib/test/test_gdb.py in the Python source. These tests are run in gdb and called from test_libcython_in_gdb.main() """ import os import sys import gdb from Cython.Debugger import libcython from Cython.Debugger ...
marcoarruda/MissionPlanner
refs/heads/master
Lib/site-packages/scipy/odr/tests/test_odr.py
61
# Scipy imports. import numpy as np from numpy import pi from numpy.testing import assert_array_almost_equal, TestCase, \ run_module_suite, assert_equal from scipy.odr import Data, Model, ODR, RealData, odr_stop class TestODR(TestCase): # Explicit Example def explicit_fcn(self, B, x): ret = B[0...
ArcherSys/ArcherSys
refs/heads/master
entertainment/gheddobox/Lib/sre_constants.py
185
# # Secret Labs' Regular Expression Engine # # various symbols used by the regular expression engine. # run this script to update the _sre include files! # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support modul...
pombreda/pyamg
refs/heads/master
Examples/SWIG/setup.py
1
#!/usr/bin/env python """ usage: python setup.py build_ext --inplace """ import commands flag = commands.getstatusoutput('swig -c++ -python splinalg.i') if flag[0]!=0: print flag exit() from numpy.distutils.core import setup, Extension splinalg_module = Extension('_splinalg', sources=['splinalg_wrap.cxx'], def...
thiriel/maps
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/gis/maps/google/gmap.py
90
from django.conf import settings from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.contrib.gis.maps.google.overlays import GPolygon, GPolyline, GMarker class GoogleMapException(Exception): pass # The default Google Maps URL (for the API javascript) # T...
nikolas/edx-platform
refs/heads/master
common/djangoapps/student/tests/test_certificates.py
39
"""Tests for display of certificates on the student dashboard. """ import unittest import ddt from django.conf import settings from django.core.urlresolvers import reverse from mock import patch from django.test.utils import override_settings from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase fro...
piantado/LOTlib
refs/heads/master
LOTlib/Legacy/GrammarInferenceVectorized/Numba/NumbaUtils.py
3
from numba import jit, float64 import numpy as np from math import log, exp, expm1, log1p @jit(float64(float64[:], float64[:]), nopython=True, nogil=True) def calc_prob(w, r): exp_w = np.exp(w) w_times_R = exp_w * r exp_p = w_times_R.sum() p = log(exp_p) return p @jit(float64(float64), nopython=T...
kennethlove/django
refs/heads/master
tests/regressiontests/multiple_database/tests.py
8
from __future__ import absolute_import, unicode_literals import datetime import pickle from StringIO import StringIO from django.conf import settings from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core import management from django.db import connecti...
alexbruy/QGIS
refs/heads/master
tests/src/python/test_qgsgeometry_avoid_intersections.py
8
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsGeometry avoid intersections functionality. .. note:: 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 op...
sguazt/prometheus
refs/heads/master
tools/giws/datatypes/voidDataGiws.py
1
#!/usr/bin/python -u # Copyright or Copr. INRIA/Scilab - Sylvestre LEDRU # # Sylvestre LEDRU - <sylvestre.ledru@inria.fr> <sylvestre@ledru.info> # # This software is a computer program whose purpose is to generate C++ wrapper # for Java objects/methods. # # This software is governed by the CeCILL license under French ...
SurfasJones/icecream-info
refs/heads/master
icecream/lib/python2.7/site-packages/jinja2/__init__.py
130
# -*- coding: utf-8 -*- """ jinja2 ~~~~~~ Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment. Nutshell -------- Here a small example of a Jinja2 template:: {% ...
heisencoder/route-finder
refs/heads/master
third_party/lib/python/django/conf/locale/th/formats.py
118
# -*- 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 = 'j F Y' TIME_FORMAT = 'G:i:s' DATE...
netico-solutions/linux-amxx
refs/heads/master
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
nagyistoce/netzob
refs/heads/master
src/netzob/Common/Plugins/PluginChecker.py
1
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
bclau/nova
refs/heads/master
nova/api/openstack/compute/contrib/createserverext.py
15
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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-...
iti-luebeck/HANSE2012
refs/heads/release
hanse_ros/automatic_color_equalization/src/automatic_color_equalization/cfg/aceConfig.py
1
## ********************************************************* ## ## File autogenerated for the automatic_color_equalization package ## by the dynamic_reconfigure package. ## Please do not edit. ## ## ********************************************************/ ##*********************************************************...
beck/testtube
refs/heads/master
testtube/tests/test_runner.py
2
from . import ANY, Mock, patch, unittest from testtube.helpers import HardTestFailure from testtube.runner import ResultCollection, TestCollection, SuiteRunner class ResultCollections(unittest.TestCase): """ResultCollections""" def setUp(self): self.passed_tests = ResultCollection([(Mock(), True), (M...
yingcuhk/LeetCode
refs/heads/master
Algorithms/#60 Permutation Sequence/PythonCode.py
1
""" The set [1,2,3,¡­,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, We get the following sequence (ie, for n = 3): "123" "132" "213" "231" "312" "321" Given n and k, return the kth permutation sequence. Note: Given n will be between 1 and 9 inclusive. """ ...
CubicERP/odoo
refs/heads/8.1
addons/stock_invoice_directly/__openerp__.py
260
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
attilahorvath/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py
115
# 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...
miguelsousa/vanilla
refs/heads/master
Lib/vanilla/vanillaScrollView.py
3
from AppKit import * from vanillaBase import VanillaBaseObject class ScrollView(VanillaBaseObject): """ A view with scrollers for containing another view.:: from AppKit import NSView, NSColor, NSRectFill from vanilla import * class DemoView(NSView): def drawRect_(self, ...
SlimRoms/android_external_chromium_org
refs/heads/lp5.0
tools/ipc_messages_log.py
170
#!/usr/bin/python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """"Processes a log file and resolves IPC message identifiers. Resolves IPC messages of the form [unknown type NNNNNN] to named IPC me...
SUSE/azure-sdk-for-python
refs/heads/master
azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/account_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 ...
neharejanjeva/techstitution
refs/heads/master
venv/lib/python2.7/site-packages/jinja2/parser.py
336
# -*- coding: utf-8 -*- """ jinja2.parser ~~~~~~~~~~~~~ Implements the template parser. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2 import nodes from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError from jinja2.lexer impo...
tastynoodle/django
refs/heads/master
tests/utils_tests/test_crypto.py
7
from __future__ import unicode_literals import binascii import hashlib import math import timeit import unittest from django.utils.crypto import constant_time_compare, pbkdf2 class TestUtilsCryptoMisc(unittest.TestCase): def test_constant_time_compare(self): # It's hard to test for constant time, just ...
was4444/chromium.src
refs/heads/nw15
build/android/gyp/create_java_binary_script.py
16
#!/usr/bin/env python # # 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. """Creates a simple script to run a java "binary". This creates a script that sets up the java command line for running a java jar. ...
MinimalOS-AOSP/kernel_lge_hammerhead
refs/heads/mm-6.0
tools/perf/python/twatch.py
7370
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
Pablomoto1000/Pablosity
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
896
# Copyright (c) 2013 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. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
brownharryb/erpnext
refs/heads/develop
erpnext/education/doctype/student_group/student_group.py
9
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe import _ from erpnext.education.utils import validate_duplicate_student from ...
evensonbryan/yocto-autobuilder
refs/heads/master
lib/python2.7/site-packages/SQLAlchemy-0.8.0b2-py2.7-linux-x86_64.egg/sqlalchemy/dialects/mysql/pyodbc.py
6
# mysql/pyodbc.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+pyodbc :name: PyODBC :dbapi: pyodbc :connectstrin...
masschallenge/django-accelerator
refs/heads/development
accelerator/tests/factories/application_answer_factory.py
1
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from factory import ( Sequence, SubFactory, ) from factory.django import DjangoModelFactory from accelerator.tests.factories.application_factory import ApplicationFactory from accelerator.tests.facto...
openstack/monasca-api
refs/heads/master
monasca_api/common/repositories/alarms_repository.py
3
# Copyright 2014-2016 Hewlett Packard Enterprise Development Company LP # # 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 a...
cchurch/ansible
refs/heads/devel
lib/ansible/modules/cloud/vmware/vmware_vspan_session.py
23
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, CrySyS Lab <www.crysys.hu> # Copyright: (c) 2018, Peter Gyorgy <gyorgy.peter@edu.bme.hu> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_i...
nopjmp/SickRage
refs/heads/master
lib/unidecode/x054.py
251
data = ( 'Mie ', # 0x00 'Xu ', # 0x01 'Mang ', # 0x02 'Chi ', # 0x03 'Ge ', # 0x04 'Xuan ', # 0x05 'Yao ', # 0x06 'Zi ', # 0x07 'He ', # 0x08 'Ji ', # 0x09 'Diao ', # 0x0a 'Cun ', # 0x0b 'Tong ', # 0x0c 'Ming ', # 0x0d 'Hou ', # 0x0e 'Li ', # 0x0f 'Tu ', # 0x10 'Xiang ...
willemneal/Docky
refs/heads/master
lib/pylint/test/data/clientmodule_test.py
22
""" docstring for file clientmodule.py """ from data.suppliermodule_test import Interface, DoNothing class Ancestor(object): """ Ancestor method """ __implements__ = (Interface,) cls_member = DoNothing() def __init__(self, value): local_variable = 0 self.attr = 'this method shouldn\'t ...
aprefontaine/TMScheduler
refs/heads/master
tests/regressiontests/localflavor/tests.py
6
from django.test import TestCase from models import Place from forms import PlaceForm class USLocalflavorTests(TestCase): def setUp(self): self.form = PlaceForm({'state':'GA', 'state_req':'NC', 'name':'impossible'}) def test_get_display_methods(self): """Test that the get_*_display() m...
aesaae/ardupilot_str
refs/heads/master
mk/PX4/Tools/genmsg/src/genmsg/deps.py
216
# Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, 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 ...
himanshuo/osf.io
refs/heads/develop
scripts/osfstorage/migrate_files.py
54
#!/usr/bin/env python # encoding: utf-8 """Copy files from previous OSF storage to new OSF storage. Important: settings must be *exactly* the same as in the production upload service, else files could be uploaded to the wrong place. """ import os import hashlib import logging import subprocess from cStringIO import St...
slightstone/SickRage
refs/heads/master
lib/cachecontrol/compat.py
9
try: from urllib.parse import urljoin except ImportError: from urlparse import urljoin try: import email.utils parsedate_tz = email.utils.parsedate_tz except ImportError: import email.Utils parsedate_tz = email.Utils.parsedate_tz try: import cPickle as pickle except ImportError: impo...
ramaganapathy1/AMuDA-Ir-back-end
refs/heads/master
vEnv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py
501
'''SSL with SNI_-support for Python 2. Follow these instructions if you would like to verify SSL certificates in Python 2. Note, the default libraries do *not* do certificate checking; you need to do additional work to validate certificates yourself. This needs the following packages installed: * pyOpenSSL (tested wi...
drpngx/tensorflow
refs/heads/master
tensorflow/compiler/tests/spacetobatch_op_test.py
7
# 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...
aswadrangnekar/khandelwal
refs/heads/master
app/lib/docutils/languages/ru.py
20
# $Id: ru.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Roman Suzi <rnd@onego.ru> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for each...
3dfxmadscientist/cbss-server
refs/heads/master
addons/portal_project/project.py
50
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-TODAY OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms...
dmsimard/ansible
refs/heads/devel
lib/ansible/plugins/lookup/items.py
29
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (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 = """ name: items author: Michael D...
nikolas/edx-platform
refs/heads/master
common/test/acceptance/tests/lms/test_lms_dashboard.py
64
# -*- coding: utf-8 -*- """ End-to-end tests for the main LMS Dashboard (aka, Student Dashboard). """ from ..helpers import UniqueCourseTest from ...fixtures.course import CourseFixture from ...pages.lms.auto_auth import AutoAuthPage from ...pages.lms.dashboard import DashboardPage class BaseLmsDashboardTest(UniqueCo...
ferjavrec/company_logo
refs/heads/master
__init__.py
1
# This file is part company_logo module for Tryton. # The COPYRIGHT file at the top level of this repository contains # the full copyright notices and license terms. from trytond.pool import Pool from .company import * def register(): Pool.register( Company, module='company_logo', type_='model')
MichaelNedzelsky/intellij-community
refs/heads/master
python/helpers/pydev/pydevd_attach_to_process/attach_pydevd.py
86
import sys import os def process_command_line(argv): setup = {} setup['port'] = 5678 # Default port for PyDev remote debugger setup['pid'] = 0 setup['host'] = '127.0.0.1' i = 0 while i < len(argv): if argv[i] == '--port': del argv[i] setup['port'] = int(argv[i]...
funkshelper/woodcore
refs/heads/master
qa/rpc-tests/signmessages.py
102
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class SignM...
drunknbass/plexpy
refs/heads/master
lib/unidecode/x001.py
247
data = ( 'A', # 0x00 'a', # 0x01 'A', # 0x02 'a', # 0x03 'A', # 0x04 'a', # 0x05 'C', # 0x06 'c', # 0x07 'C', # 0x08 'c', # 0x09 'C', # 0x0a 'c', # 0x0b 'C', # 0x0c 'c', # 0x0d 'D', # 0x0e 'd', # 0x0f 'D', # 0x10 'd', # 0x11 'E', # 0x12 'e', # 0x13 'E', # 0...
sqlalchemy/sqlalchemy
refs/heads/master
test/orm/test_inspect.py
3
"""test the inspection registry system.""" from sqlalchemy import exc from sqlalchemy import ForeignKey from sqlalchemy import inspect from sqlalchemy import testing from sqlalchemy.orm import aliased from sqlalchemy.orm import class_mapper from sqlalchemy.orm import relationship from sqlalchemy.orm import Session fro...
wilebeast/FireFox-OS
refs/heads/master
B2G/bionic/libc/tools/bionic_utils.py
2
# common python utility routines for the Bionic tool scripts import sys, os, commands, string # support Bionic architectures, add new ones as appropriate # bionic_archs = [ "arm", "x86" ] # basic debugging trace support # call D_setlevel to set the verbosity level # and D(), D2(), D3(), D4() to add traces # verbose ...
x86Labs/amoco
refs/heads/release
amoco/arch/sparc/formats.py
5
# -*- coding: utf-8 -*- from .env import * from .utils import * from amoco.arch.core import Formatter whitespace = ' ' def regs(i): return ['%{0}'.format(r) for r in i.operands] def address(a): if not a._is_eqn: return '%'+str(a) l = reg_or_imm(a.l) op = a.op.symbol r = reg_or_imm(a.r) ...
akretion/openerp-sale-suggest
refs/heads/master
sale_suggest/__openerp__.py
1
# -*- coding: utf-8 -*- ############################################################################### # # sale_suggest for OpenERP # Copyright (C) 2014-TODAY Akretion <http://www.akretion.com>. # @author Arthur Vuillard <arthur.vuillard@akretion.com> # # This program is free software: you can redistribute it ...
dfunckt/django
refs/heads/master
django/utils/dates.py
590
"Commonly-used date structures" from django.utils.translation import pgettext_lazy, ugettext_lazy as _ WEEKDAYS = { 0: _('Monday'), 1: _('Tuesday'), 2: _('Wednesday'), 3: _('Thursday'), 4: _('Friday'), 5: _('Saturday'), 6: _('Sunday') } WEEKDAYS_ABBR = { 0: _('Mon'), 1: _('Tue'), 2: _('Wed'), 3: _('Thu'),...
chbatey/kubernetes
refs/heads/master
cluster/juju/charms/trusty/kubernetes-master/unit_tests/test_install.py
97
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
DaveRichmond-/vigra
refs/heads/master
vigranumpy/lib/axistags.py
13
import numpy as np class TaggedArray(np.ndarray): def __new__(subtype, shape, dtype=float, buffer=None, offset=0, strides=None, order=None, axistags=None): obj = np.ndarray.__new__(subtype, shape, dtype, buffer, offset, strides, order) if axistags is None: defaulttags = [['x'...
openhatch/oh-mainline
refs/heads/master
vendor/packages/scrapy/scrapy/core/downloader/handlers/file.py
19
from w3lib.url import file_uri_to_path from scrapy.responsetypes import responsetypes from scrapy.utils.decorator import defers class FileDownloadHandler(object): @defers def download_request(self, request, spider): filepath = file_uri_to_path(request.url) body = open(filepath, 'rb').read() ...
sergelhomme/Network_Analysis
refs/heads/master
Network_Analysis_1_3/network_analysis/tools/ui_test4.py
2
# -*- coding: utf-8 -*- from PyQt4 import QtCore, QtGui class Ui_Dialog4(object): def setupUi(self, Dialog4): Dialog4.setObjectName("Dialog4") Dialog4.resize(1000, 700) self.textBrowser = QtGui.QTextBrowser(Dialog4) self.textBrowser.setGeometry(QtCore.QRect(15, 11, 961, 67...
mbertrand/cga-worldmap
refs/heads/legacy
geonode/maps/migrations/0006_auto__add_field_layerattribute_date_format.py
2
# 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 'LayerAttribute.date_format' db.add_column('maps_layerattribute', 'date_format', self.gf('d...
swarna-k/MyDiary
refs/heads/master
flask/lib/python2.7/site-packages/flask_wtf/csrf.py
50
# coding: utf-8 """ flask_wtf.csrf ~~~~~~~~~~~~~~ CSRF protection for Flask. :copyright: (c) 2013 by Hsiaoming Yang. """ import os import hmac import hashlib import time from flask import Blueprint from flask import current_app, session, request, abort from werkzeug.security import safe_str_cmp from ...
kamyu104/django
refs/heads/master
django/db/backends/oracle/schema.py
404
import binascii import copy import datetime import re from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.utils import DatabaseError from django.utils import six from django.utils.text import force_text class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_create_column = "ALT...