repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
dknez/libmesh
refs/heads/master
doc/statistics/libmesh_svn.py
7
#!/usr/bin/env python import matplotlib.pyplot as plt import numpy as np # Import stuff for working with dates from datetime import datetime from matplotlib.dates import date2num # After selecting the date range, scroll down to the bottom to see the sums... # At some point, the names of these data columns changed to:...
chrisseto/osf.io
refs/heads/feature/reviews
api/view_only_links/serializers.py
3
from rest_framework import serializers as ser from rest_framework.exceptions import PermissionDenied, NotFound from api.base.exceptions import RelationshipPostMakesNoChanges, NonDescendantNodeError from api.base.serializers import ( JSONAPISerializer, IDField, RelationshipField, JSONAPIRelationshipSerializer, ...
ropik/chromium
refs/heads/master
third_party/harfbuzz/contrib/tables/grapheme-break-parse.py
55
import sys from unicode_parse_common import * # http://www.unicode.org/Public/UNIDATA/auxiliary/GraphemeBreakProperty.txt property_to_harfbuzz = { 'CR': 'HB_Grapheme_CR', 'LF': 'HB_Grapheme_LF', 'Control': 'HB_Grapheme_Control', 'Extend': 'HB_Grapheme_Extend', 'Prepend': 'HB_Grapheme_Other', 'SpacingMark'...
XDTM/tgstation
refs/heads/master
tools/mapmerge2/frontend.py
86
# Common code for the frontend interface of map tools import sys import os import pathlib import shutil from collections import namedtuple Settings = namedtuple('Settings', ['map_folder', 'tgm']) MapsToRun = namedtuple('MapsToRun', ['files', 'indices']) def string_to_num(s): try: return int(s) except ...
Clyde-fare/scikit-learn
refs/heads/master
examples/cluster/plot_mini_batch_kmeans.py
265
""" ==================================================================== Comparison of the K-Means and MiniBatchKMeans clustering algorithms ==================================================================== We want to compare the performance of the MiniBatchKMeans and KMeans: the MiniBatchKMeans is faster, but give...
pwmarcz/django
refs/heads/master
django/conf/locale/ga/formats.py
619
# -*- 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 = 'H:i' # DATE...
kholidfu/django
refs/heads/master
tests/gis_tests/gdal_tests/test_ds.py
273
import os import unittest from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL from ..test_data import TEST_DATA, TestDS, get_ds_file if HAS_GDAL: from django.contrib.gis.gdal import DataSource, Envelope, OGRGeometry, GDALException, OGRIndexError, GDAL_VERSION from django.contrib.gis....
cuongnv23/curl2share
refs/heads/master
curl2share/storages/base.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import six import abc @six.add_metaclass(abc.ABCMeta) class StorageBase(object): """ Base class for storage. Any storage backend should follow methods defined in this class """ @abc.abstractmethod def upload(self, storage): """ ...
stonegithubs/odoo
refs/heads/8.0
openerp/addons/base/tests/test_acl.py
338
import unittest2 from lxml import etree import openerp from openerp.tools.misc import mute_logger from openerp.tests import common # test group that demo user should not have GROUP_TECHNICAL_FEATURES = 'base.group_no_one' class TestACL(common.TransactionCase): def setUp(self): super(TestACL, self).setU...
polimediaupv/edx-platform
refs/heads/master
common/djangoapps/util/testing.py
91
import sys from mock import patch from django.conf import settings from django.core.urlresolvers import clear_url_caches, resolve class UrlResetMixin(object): """Mixin to reset urls.py before and after a test Django memoizes the function that reads the urls module (whatever module urlconf names). The m...
brianlsharp/MissionPlanner
refs/heads/master
Lib/site-packages/scipy/linalg/blas.py
53
# # Author: Pearu Peterson, March 2002 # __all__ = ['get_blas_funcs'] # The following ensures that possibly missing flavor (C or Fortran) is # replaced with the available one. If none is available, exception # is raised at the first attempt to use the resources. from scipy.linalg import fblas try: from scipy.li...
krafczyk/spack
refs/heads/develop
lib/spack/external/jinja2/ext.py
89
# -*- coding: utf-8 -*- """ jinja2.ext ~~~~~~~~~~ Jinja extensions allow to add custom tags similar to the way django custom tags work. By default two example extensions exist: an i18n and a cache extension. :copyright: (c) 2017 by the Jinja Team. :license: BSD. """ import re from jinja2...
nbessi/oerpscenario
refs/heads/master
features/steps/demo_data.py
8
from support.tools import puts, set_trace, model @given(u'I do not want all demo data to be loaded on install') def impl(context): IrModuleModule = model('ir.module.module') ids = IrModuleModule.search([]) IrModuleModule.write(ids, {'demo': False}) @given(u'I want all demo data to be loaded on install') d...
hubsaysnuaa/odoo
refs/heads/8.0
addons/web/__openerp__.py
298
{ 'name': 'Web', 'category': 'Hidden', 'version': '1.0', 'description': """ OpenERP Web core module. ======================== This module provides the core of the OpenERP Web Client. """, 'depends': ['base'], 'auto_install': True, 'data': [ 'views/webclient_templates...
endlessm/chromium-browser
refs/heads/master
v8/tools/bigint-tester.py
14
#!/usr/bin/python # Copyright 2017 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # for py2/py3 compatibility from __future__ import print_function import argparse import math import multiprocessing import os import ra...
kohnle-lernmodule/exeLearningPlus1_04
refs/heads/master
twisted/python/formmethod.py
21
# -*- test-case-name: twisted.test.test_formmethod -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ Form-based method objects. This module contains support for descriptive method signatures that can be used to format methods. Currently this is only used by woven. """ import...
lumig242/Hue-Integration-with-CDAP
refs/heads/pull3
apps/sqoop/src/sqoop/client/exception.py
33
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
xiaokeng/robotframework
refs/heads/master
utest/variables/test_variablesplitter.py
23
import unittest from robot.variables import VariableSplitter, VariableIterator from robot.utils.asserts import assert_equals, assert_false, assert_true class TestVariableSplitter(unittest.TestCase): _identifiers = ['$', '@', '%', '&', '*'] def test_empty(self): self._test('') self._test(' ...
miteshvp/fabric8-analytics-worker
refs/heads/master
f8a_worker/dispatcher/selective.py
2
"""Determine whether we need to run a task or we can reuse already existing results.""" import logging _logger = logging.getLogger(__name__) def selective_run_function(flow_name, node_name, node_args, task_names, storage_pool): """Determine whether we need to run a task or we can reuse already existing results....
SlateScience/MozillaJS
refs/heads/master
js/src/python/simplejson-2.1.1/simplejson/tests/test_fail.py
136
from unittest import TestCase import simplejson as json # Fri Dec 30 18:57:26 2005 JSONDOCS = [ # http://json.org/JSON_checker/test/fail1.json '"A JSON payload should be an object or array, not a string."', # http://json.org/JSON_checker/test/fail2.json '["Unclosed array"', # http://json.org/JSON_...
matplotlib/freetypy
refs/heads/master
lib/freetypy/codecs/mac_symbol.py
2
""" Python Character Mapping Codec mac_symbol generated from 'MAPPINGS/VENDORS/APPLE/SYMBOL.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,err...
robovm/robovm-studio
refs/heads/master
python/helpers/docutils/parsers/rst/languages/cs.py
57
# $Id: cs.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Marek Blaha <mb@dat.cz> # 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 l...
AyolaJayamaha/helix
refs/heads/master
contributors/py-helix-admin/helix/zkfunctions.py
7
# # 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...
ScottWales/rose
refs/heads/master
lib/python/rose/date.py
1
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-5 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
cdjones32/vertx-web
refs/heads/master
src/test/sockjs-protocol/venv/lib/python2.7/site-packages/setuptools/command/install_egg_info.py
357
from setuptools import Command from setuptools.archive_util import unpack_archive from distutils import log, dir_util import os, shutil, pkg_resources class install_egg_info(Command): """Install an .egg-info directory for the package""" description = "Install an .egg-info directory for the package" user_...
dsyang/buck
refs/heads/master
scripts/stampede/find_undeclared_source_files.py
8
#!/usr/bin/python import argparse import datetime import os import os.path import re import shutil import subprocess import sys import tempfile import time ############################################################ # Classes ############################################################ class Log(object): '''Pre...
phnmnl/mantl
refs/heads/phnmnl-packaging-1.2.0
roles/collectd/files/zookeeper-collectd-plugin.py
36
#! /usr/bin/env python # 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 # "...
jakdept/pythonbook
refs/heads/master
book_materials/prettyCharacterCount.py
3
import pprint message = 'It was a bright cold day in April, and the clocks were striking thirteen.' count = {} for character in message: count.setdefault(character, 0) count[character] = count[character] + 1 pprint.pprint(count)
JamesClough/networkx
refs/heads/inverse_line_graph
tools/post_pr_test.py
39
#!/usr/bin/env python """Post the results of a pull request test to Github. """ from test_pr import TestRun testrun = TestRun.load_results() testrun.post_logs() testrun.print_results() testrun.post_results_comment() print() print("Posted test results to pull request") print(" " + testrun.pr['html_url'])
ecolitan/fatics
refs/heads/master
venv/lib/python2.7/site-packages/twisted/internet/endpoints.py
2
# -*- test-case-name: twisted.internet.test.test_endpoints -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementations of L{IStreamServerEndpoint} and L{IStreamClientEndpoint} that wrap the L{IReactorTCP}, L{IReactorSSL}, and L{IReactorUNIX} interfaces. This also implements an exte...
ilpianista/ansible
refs/heads/devel
test/support/integration/plugins/modules/ec2_group.py
49
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Ansible # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
JoKaWare/WTL-DUI
refs/heads/master
tools/grit/grit/test_suite_all.py
1
#!/usr/bin/env python # 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. '''Unit test suite that collects all test cases for GRIT.''' import os import sys if __name__ == '__main__': sys.path.append(os....
Merino/django-admin-tools
refs/heads/master
test_proj/test_app/models.py
18
from django.db import models class Foo(models.Model): pass class Bar(models.Model): pass
Tydus/deluge
refs/heads/master
deluge/ui/console/commands/rm.py
14
# # rm.py # # Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com> # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may redistribute it and/or modify it under the terms of the # GNU General Public License, as published by the Free Software # Foundation; either vers...
arush0311/scrapy
refs/heads/master
scrapy/downloadermiddlewares/chunked.py
13
import warnings from scrapy.exceptions import ScrapyDeprecationWarning from scrapy.utils.http import decode_chunked_transfer warnings.warn("Module `scrapy.downloadermiddlewares.chunked` is deprecated, " "chunked transfers are supported by default.", ScrapyDeprecationWarning, stacklevel=2)...
nthiep/global-ssh-server
refs/heads/master
lib/python2.7/site-packages/pymongo/common.py
2
# Copyright 2011-2014 MongoDB, 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 writi...
peterhil/leftrb
refs/heads/master
leftrb/__init__.py
1
#!/usr/bin/env python -u # encoding: utf-8 from leftrb.llrb import LeftRB __all__ = ['LeftRB']
dannyperry571/theapprentice
refs/heads/master
script.module.simplejson/lib/simplejson/__init__.py
80
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
rec/BiblioPixel
refs/heads/dev
bibliopixel/util/int_names.py
2
""" Fanciful names for integer indexes into lists - either a day of week, a month, a planet, or a chemical element. """ import calendar def to_index(name): if isinstance(name, float): raise KeyError('Indexes cannot be floating point') try: return int(name) except: pass try: ...
vnsofthe/odoo
refs/heads/8.0
openerp/addons/test_access_rights/models.py
82
from openerp import fields, models class SomeObj(models.Model): _name = 'test_access_right.some_obj' val = fields.Integer() class Container(models.Model): _name = 'test_access_right.container' some_ids = fields.Many2many('test_access_right.some_obj', 'test_access_right_rel', 'container_id', 'some_i...
Ecpy/ecpy
refs/heads/master
exopy/measurement/processor.py
1
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015-2018 by Exopy Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ---------------...
dcosentino/edx-platform
refs/heads/master
cms/djangoapps/contentstore/views/tests/test_helpers.py
171
""" Unit tests for helpers.py. """ from contentstore.tests.utils import CourseTestCase from contentstore.views.helpers import xblock_studio_url, xblock_type_display_name from xmodule.modulestore.tests.factories import ItemFactory, LibraryFactory from django.utils import http class HelpersTestCase(CourseTestCase): ...
openhdf/enigma2-wetek
refs/heads/master
lib/python/Screens/Ci.py
4
from Screen import Screen from Components.ActionMap import ActionMap from Components.ActionMap import NumberActionMap from Components.Label import Label from Components.Pixmap import Pixmap from Components.config import config, ConfigNumber, ConfigYesNo, ConfigSubsection, ConfigSelection, ConfigSubList, NoSave, getConf...
RitwikGupta/pattern
refs/heads/master
examples/04-search/01-search.py
21
import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..")) from pattern.search import search from pattern.en import parsetree # The pattern.search module contains a number of pattern matching tools # to search a string syntactically (word function) or semantically (word meaning). # If...
SwagColoredKitteh/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/example/bench_wsh.py
495
# Copyright 2011, 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...
FusionSP/android_external_chromium_org
refs/heads/lp5.1
build/android/buildbot/bb_run_bot.py
25
#!/usr/bin/env python # # Copyright (c) 2013 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 collections import copy import json import os import pipes import re import subprocess import sys import bb_utils sys.pa...
MostafaGazar/tensorflow
refs/heads/master
tensorflow/python/summary/impl/gcs_file_loader.py
12
# 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...
jongwonk/s5pv210_linux_kernel
refs/heads/master
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
ScottSnapperLab/cookiecutter-data-science
refs/heads/master
{{ cookiecutter.repo_name }}/src/{{ cookiecutter.repo_name }}/cli/config.py
1
#!/usr/bin/env python """Provide functions used in cli.config.""" # Imports from pathlib import Path import datetime as dt import shutil # Metadata __author__ = "{{ cookiecutter.author_name }}" __email__ = "{{ cookiecutter.email }}" def replace_config(name, factory_resets): """Replace existing config file or ge...
GenericStudent/home-assistant
refs/heads/dev
homeassistant/components/android_ip_webcam/sensor.py
22
"""Support for Android IP Webcam sensors.""" from homeassistant.helpers.icon import icon_for_battery_level from . import ( CONF_HOST, CONF_NAME, CONF_SENSORS, DATA_IP_WEBCAM, ICON_MAP, KEY_MAP, AndroidIPCamEntity, ) async def async_setup_platform(hass, config, async_add_entities, discover...
huangciyin/youtube-dl
refs/heads/master
youtube_dl/extractor/criterion.py
138
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .common import InfoExtractor class CriterionIE(InfoExtractor): _VALID_URL = r'https?://www\.criterion\.com/films/(?P<id>[0-9]+)-.+' _TEST = { 'url': 'http://www.criterion.com/films/184-le-samourai', 'md5': 'bc51be...
pratyushmittal/drf-extensions
refs/heads/master
tests_app/tests/unit/key_constructor/constructor/tests.py
2
# -*- coding: utf-8 -*- from copy import deepcopy import hashlib import json from mock import Mock, patch from django.test import TestCase from rest_framework import viewsets from rest_framework_extensions.key_constructor.constructors import ( KeyConstructor, ) from rest_framework_extensions.utils import get_uni...
aldwyn/effigia
refs/heads/main
apps/portfolios/__init__.py
1
default_app_config = 'apps.portfolios.apps.PortfoliosConfig'
kalahbrown/HueBigSQL
refs/heads/master
desktop/core/ext-py/requests-2.6.0/requests/packages/chardet/charsetgroupprober.py
2928
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights ...
raqqun/tweetcommander
refs/heads/master
packages/requests/packages/charade/charsetgroupprober.py
2928
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights ...
PopCap/GameIdea
refs/heads/master
Engine/Source/ThirdParty/HTML5/emsdk/Win64/python/2.7.5.3_64bit/Lib/idlelib/EditorWindow.py
35
import sys import os import re import imp from Tkinter import * import tkSimpleDialog import tkMessageBox import webbrowser from idlelib.MultiCall import MultiCallCreator from idlelib import idlever from idlelib import WindowList from idlelib import SearchDialog from idlelib import GrepDialog from idlelib import Repla...
andreyrobota/AndreyKosinskiy
refs/heads/master
IdeaSite/views.py
6445
from django.shortcuts import render # Create your views here.
michaelhowden/eden
refs/heads/master
modules/s3db/doc.py
9
# -*- coding: utf-8 -*- """ Sahana Eden Document Library @copyright: 2011-2015 (c) Sahana Software Foundation @license: MIT 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 wi...
uberamd/NGECore2
refs/heads/master
scripts/object/draft_schematic/structure/corellia_house_player_large_style_02.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/component/food/secrets/secret_imperial_biochem.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/draft_schematic/weapon/lightsaber_one_handed_gen3.py
85615
import sys def setup(core, object): return
TimothyVandenbrande/ansible-modules-extras
refs/heads/devel
database/influxdb/influxdb_retention_policy.py
41
#!/usr/bin/python # (c) 2016, Kamil Szczygiel <kamil.szczygiel () intel.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 # ...
FighterLYL/cgt
refs/heads/master
cgt/tests/test_conv.py
19
import numpy as np import cgt from cgt import nn from cgt.tests import across_configs from nose.plugins.skip import SkipTest @across_configs() def test_conv(): try: import scipy.signal except ImportError: raise SkipTest("skipping because we don't have ndimage") np.random.seed(0) x = np...
France-ioi/taskgrader
refs/heads/master
examples/taskRunner/tests/gen/sol-ok-py.py
1
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # Example solution for this task # Defines the function min3nombres which is then used by the runner def min3nombres(a, b, c): # Return the minimum of 3 numbers # (as would the Python function 'min' do!) if a < b: if a < c: return a ...
Workday/OpenFrame
refs/heads/master
tools/telemetry/third_party/gsutilz/third_party/httplib2/python2/httplib2test.py
70
#!/usr/bin/env python2.4 """ httplib2test A set of unit tests for httplib2.py. Requires Python 2.4 or later """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __license__ = "MIT" __history__ = """ """ __version__ = "0.1 ($Rev: 118 $)" import St...
romankagan/DDBWorkbench
refs/heads/master
python/testData/refactoring/introduceConstant/py4414.after.py
83
a = 1 def m(): a
spemaps/Backend
refs/heads/master
cairo/buildings.py
1
#load some buildings tho import os import sys import re import json class FloorGraph(object): def __init__(self, image, nodes, edges, scale): self.image = image self.nodes = nodes self.edges = edges self.scale = scale class Building(object): floors = {} main = None entrypoints = None directory = None ...
Titan-C/sympy
refs/heads/master
sympy/geometry/util.py
11
"""Utility functions for geometrical entities. Contains ======== intersection convex_hull closest_points farthest_points are_coplanar are_similar """ from __future__ import division, print_function from sympy import Function, Symbol, solve from sympy.core.compatibility import ( is_sequence, range, string_types) ...
MrLoick/python-for-android
refs/heads/master
python-modules/twisted/twisted/internet/test/test_iocp.py
61
from twisted.internet.protocol import ServerFactory, Protocol, ClientCreator from twisted.internet.defer import DeferredList, maybeDeferred, Deferred from twisted.trial import unittest from twisted.internet import reactor from twisted.python import log from zope.interface.verify import verifyClass class StopStartRead...
MichiMaestre/Lane-Detection-for-Autonomous-Cars
refs/heads/master
vendor/googletest/googletest/scripts/upload.py
2511
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
switchboardOp/ansible
refs/heads/devel
lib/ansible/module_utils/facts/system/caps.py
232
# Collect facts related to systems 'capabilities' via capsh # # 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) a...
BugScanTeam/GitHack
refs/heads/master
lib/attrdict.py
1
#!/usr/bin/env python # coding:utf-8 """ Copyright (c) 2017 BugScan (http://www.bugscan.net) See the file 'LICENCE' for copying permission """ import copy import types class AttribDict(dict): """ >>> foo = AttribDict() >>> foo.bar = 1 >>> foo.bar 1 """ def __init__(self, indict=None, a...
InfoSec-CSUSB/club-websystem
refs/heads/master
src/system/settings/base.py
1
""" Base settings module. Not meant to be used alone. Each website should have their own settings file under system/settings, which imports from base: from .base import * In development, set the appropriate settings file like this: export DJANGO_SETTINGS_MODULE='system.settings.yourfilehere' python manage.py ru...
uclouvain/OSIS-Louvain
refs/heads/master
base/tests/views/learning_units/pedagogy/__init__.py
7
# ############################################################################ # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core business i...
avedaee/DIRAC
refs/heads/integration
ResourceStatusSystem/Client/ResourceStatusClient.py
1
# $HeadURL: $ ''' ResourceStatusClient Client to interact with the ResourceStatusDB. ''' from DIRAC import gLogger, S_OK, S_ERROR from DIRAC.Core.DISET.RPCClient import RPCClient #from DIRAC.ResourceStatusSystem.DB.ResourceSta...
lsst/sphgeom
refs/heads/master
tests/test_Vector3d.py
1
# # LSST Data Management System # See COPYRIGHT file at the top of the source tree. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # 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 #...
a0c/odoo
refs/heads/master
addons/hr_applicant_document/models/__init__.py
390
# -*- coding: utf-8 -*- import hr_applicant
agiliq/django
refs/heads/master
django/utils/module_loading.py
21
from __future__ import absolute_import # Avoid importing `importlib` from this package. import copy from importlib import import_module import os import sys import warnings from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.utils.deprecation import RemovedInDjango19Warni...
bright-sparks/chromium-spacewalk
refs/heads/master
chrome/test/mini_installer/registry_verifier.py
44
# Copyright 2013 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 _winreg import verifier class RegistryVerifier(verifier.Verifier): """Verifies that the current registry matches the specified criteria.""" de...
MiltosD/CEF-ELRC
refs/heads/master
lib/python2.7/site-packages/analytical/templatetags/chartbeat.py
3
""" Chartbeat template tags and filters. """ from __future__ import absolute_import import re from django.conf import settings from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured from django.template import Library, Node, TemplateSyntaxError from django.utils import s...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/tangible/wearables/ithorian/shared_ith_hat_s03.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/wearables/ithorian/shared_ith_hat_s03.iff" result.attribute_templat...
jjhuff/fcc-comments
refs/heads/master
lib/nltk/app/collocations_app.py
5
# Natural Language Toolkit: Collocations Application # Much of the GUI code is imported from concordance.py; We intend to merge these tools together # Copyright (C) 2001-2012 NLTK Project # Author: Sumukh Ghodke <sghodke@csse.unimelb.edu.au> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT # fr...
PXke/invenio
refs/heads/dev-pu
invenio/legacy/bibrank/adminlib.py
1
## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 ## License, ...
gercordero/va_de_vuelta
refs/heads/master
src/casillero_naranja.py
1
# -*- encoding: utf-8 -*- trabalenguas = ["La sucesion sucesiva de sucesos sucede sucesivamente con la sucesion del tiempo.", "Si el caracol tuviera cara como tiene el caracol, fuera cara, fuera col, fuera caracol con cara.", "A Cuesta le cuesta subir la cuesta, y en medio de la cuesta, va y se acuesta", "Compre...
trosa/forca
refs/heads/master
reportlab/graphics/samples/scatter_lines_markers.py
4
#Autogenerated by ReportLab guiedit do not edit from reportlab.graphics.charts.legends import Legend from reportlab.graphics.charts.lineplots import ScatterPlot from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String from reportlab.graphics.charts.textlabels import Label from excelcolors import ...
glwu/python-for-android
refs/heads/master
python-build/python-libs/gdata/src/gdata/tlslite/utils/PyCrypto_AES.py
359
"""PyCrypto AES implementation.""" from cryptomath import * from AES import * if pycryptoLoaded: import Crypto.Cipher.AES def new(key, mode, IV): return PyCrypto_AES(key, mode, IV) class PyCrypto_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, ...
alexanderturner/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_resourcegroup_facts.py
38
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@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 Soft...
StrellaGroup/erpnext
refs/heads/develop
erpnext/patches/v8_5/remove_quotations_route_in_sidebar.py
34
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): frappe.reload_doctype("Portal Settings") frappe.db.sql(""" delete from `tabPortal Menu Item` where (route = '/quotations' and title ...
andrewpollock/grpc
refs/heads/master
src/python/grpcio_tests/tests/unit/framework/interfaces/face/_invocation.py
20
# Copyright 2015, 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...
gef756/scipy
refs/heads/master
scipy/io/harwell_boeing/tests/test_hb.py
126
from __future__ import division, print_function, absolute_import import os import sys if sys.version_info[0] >= 3: from io import StringIO else: from StringIO import StringIO import tempfile import numpy as np from numpy.testing import TestCase, assert_equal, \ assert_array_almost_equal_nulp from scipy....
JianyuWang/nova
refs/heads/master
nova/pci/devspec.py
69
# # 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 # ...
parksandwildlife/borgcollector
refs/heads/master
harvest/harvest_ds.py
2
import os import pytz import time import threading import logging import traceback from datetime import datetime from django.core.exceptions import ObjectDoesNotExist from django.utils import timezone from borg_utils.resource_status import ResourceStatus from tablemanager.models import Input logger = logging.getLo...
wblakecaldwell/Chess-Puzzles
refs/heads/master
Dependencies/gtest/test/gtest_catch_exceptions_test.py
2139
#!/usr/bin/env python # # Copyright 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 o...
MohammedWasim/scikit-learn
refs/heads/master
sklearn/metrics/tests/test_classification.py
53
from __future__ import division, print_function import numpy as np from scipy import linalg from functools import partial from itertools import product import warnings from sklearn import datasets from sklearn import svm from sklearn.datasets import make_multilabel_classification from sklearn.preprocessing import la...
ogenstad/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/aws_elasticbeanstalk_app.py
30
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTAT...
Lokesh-K-Haralakatta/iot-python
refs/heads/master
src/ibmiotf/codecs/jsonCodec.py
6
''' This is the default encoder used by clients for all messages sent with format defined as "json". This default can be changed by reconfiguring your client: deviceCli.setMessageEncoderModule("json", myCustomEncoderModule) ''' import json from datetime import datetime import pytz from ibmiotf import Message, I...
fluxcapacitor/pipeline
refs/heads/master
libs/pipeline_logger/test.py
1
from pipeline_logger import log import logging import json from pipeline_logger.kafka_handler import KafkaHandler from pipeline_logger.tensorboard_handler import TensorboardHandler _logger = logging.getLogger('test_logger') _logger.setLevel(logging.INFO) _logger_stream_handler = logging.StreamHandler() _logger_stream_...
lepri/odoo-brazil-banking
refs/heads/8.0
__unported__/account_statement_l10n_br_cnab240_import/statement.py
3
# -*- coding: utf-8 -*- ############################################################################## # # Author: Luis Felipe Mileo - mileo at kmee.com.br # Copyright 2014 KMEE - www.kmee.com.br # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero ...
go-bears/nupic
refs/heads/master
src/nupic/regions/extra/__init__.py
108
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
jiadaizhao/LeetCode
refs/heads/master
0101-0200/0112-Path Sum/0112-Path Sum.py
1
# Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def hasPathSum(self, root: TreeNode, sum: int) -> bool: if root is None: return False sum -= root.val if sum ==...