repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
henningpohl/Arduino
refs/heads/master
arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/packages/six.py
2374
"""Utilities for writing code that runs on Python 2 and 3""" #Copyright (c) 2010-2011 Benjamin Peterson #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 l...
tboyce021/home-assistant
refs/heads/dev
homeassistant/components/zha/device_trigger.py
15
"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.device_automation.exceptions import ( InvalidDeviceAutomationConfig, ) from homeassistant.components.homeassistant.tr...
antontsv/r2d2
refs/heads/master
sensor_showcase.py
1
#!/usr/bin/env python import argparse from motion_detector import * from led import * from distance_detector import * parser = argparse.ArgumentParser(description='Sensor showcase') parser.add_argument('-a','--all', action="store_true", help='Show all demos') parser.add_argument('-m','--motion', action="store_true",...
Intel-Corporation/tensorflow
refs/heads/master
tensorflow/python/debug/examples/debug_errors.py
13
# 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...
Acehaidrey/incubator-airflow
refs/heads/master
tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py
4
# # 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...
odoobgorg/odoo
refs/heads/9.0
openerp/report/render/rml2txt/utils.py
48
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import copy import re import reportlab import reportlab.lib.units from openerp.tools.safe_eval import safe_eval as eval _regex = re.compile('\[\[(.+?)\]\]') def _child_get(node, self=None, tagname=None): for n in n...
bubichain/blockchain
refs/heads/master
src/3rd/src/jsoncpp/scons-2.1.0/engine/SCons/Tool/m4.py
21
"""SCons.Tool.m4 Tool-specific initialization for m4. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation #...
anshulsharmanyu/twitter_plot
refs/heads/master
Twitter Map Cloud Assignment/googleMapsTweet/urls.py
1
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.Index, name='index'), url(r'^post/$', views.Post, name='post') ]
synergeticsedx/deployment-wipro
refs/heads/oxa/master.fic
lms/djangoapps/commerce/api/v0/urls.py
72
""" API v0 URLs. """ from django.conf.urls import patterns, url, include from commerce.api.v0 import views BASKET_URLS = patterns( '', url(r'^$', views.BasketsView.as_view(), name='create'), url(r'^(?P<basket_id>[\w]+)/order/$', views.BasketOrderView.as_view(), name='retrieve_order'), ) urlpatterns = pa...
nicpottier/pool
refs/heads/master
pool/public/views.py
1
from django.shortcuts import render from pool.league.models import Season, Player, Match, Team, AVG_GAMES def index(request): season = Season.objects.all().order_by('-start_date').first() # get all matches for this season, grouped by player players = list(Player.objects.filter(scores__match__season=seaso...
browseinfo/odoo_saas3_nicolas
refs/heads/master
openerp/osv/expression.py
6
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
chafique-delli/OpenUpgrade
refs/heads/master
addons/web_kanban_gauge/__openerp__.py
428
{ 'name': 'Gauge Widget for Kanban', 'category': 'Hidden', 'description': """ This widget allows to display gauges using justgage library. """, 'version': '1.0', 'depends': ['web_kanban'], 'data' : [ 'views/web_kanban_gauge.xml', ], 'qweb': [ ], 'auto_install': True, }
z-fork/scrapy
refs/heads/master
scrapy/xlib/tx/endpoints.py
164
# -*- 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...
jrumball/PyKoans
refs/heads/master
python 3/runner/mountain.py
15
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import sys from . import path_to_enlightenment from .sensei import Sensei from .writeln_decorator import WritelnDecorator class Mountain: def __init__(self): self.stream = WritelnDecorator(sys.stdout) self.tests = path_to_enlightenment...
JBARisk/QtStuff
refs/heads/master
build/lib/QtStuff/images.py
2
null
rafaeltomesouza/frontend-class1
refs/heads/master
aula2/a12/linkedin/client/.gradle/yarn/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
2779
# Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """gypsh output module gypsh is a GYP shell. It's not really a generator per se. All it does is fire up an interactive Python session with a few local variables...
cfg2015/EPT-2015-2
refs/heads/master
addons/mrp/product.py
131
# -*- 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...
zenoss/ZenPacks.community.PrinterToner
refs/heads/master
ZenPacks/community/PrinterToner/modeler/plugins/community/snmp/__init__.py
1165
# __init__.py
dkodnik/Ant
refs/heads/master
addons/mail/mail_message_subtype.py
60
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
tumbl3w33d/ansible
refs/heads/devel
test/units/modules/remote_management/oneview/test_oneview_fcoe_network_info.py
21
# Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from units.compat import unittest from oneview_module_loader import FcoeNetworkInfoModule from hpe_test_utils import FactsParamsTestCase ERROR_MSG = 'Fake ...
oasiswork/odoo
refs/heads/8.0
addons/analytic_user_function/__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...
closers-2015/Closers-2015_BOTS-_Final_Byte_Project
refs/heads/master
frontend/bots/urls.py
1
from django.conf.urls import url from .views import IndexView urlpatterns = [ url(r'^$', IndexView.as_view(), name='index'), # url(r'^create$', PostCreateView.as_view(), name='create'), # url(r'^read/(?P<slug>[\w-]+)$', PostDetailView.as_view(), name='detail'), # url(r'^update/(?P<slug>[\w-]+)$', PostUpdateVie...
betoesquivel/fil2014
refs/heads/master
filenv/lib/python2.7/site-packages/django/contrib/formtools/tests/wizard/namedwizardtests/urls.py
320
from django.conf.urls import patterns, url from django.contrib.formtools.tests.wizard.namedwizardtests.forms import ( SessionContactWizard, CookieContactWizard, Page1, Page2, Page3, Page4) def get_named_session_wizard(): return SessionContactWizard.as_view( [('form1', Page1), ('form2', Page2), ('form3'...
mffrench/fabric
refs/heads/v1.0.0-alpha2-elixir
bddtests/msp/msp_principal_pb2.py
5
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: msp/msp_principal.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection...
toastedcornflakes/scikit-learn
refs/heads/master
sklearn/manifold/tests/test_spectral_embedding.py
37
from nose.tools import assert_true from nose.tools import assert_equal from scipy.sparse import csr_matrix from scipy.sparse import csc_matrix from scipy.sparse import coo_matrix from scipy.linalg import eigh import numpy as np from numpy.testing import assert_array_almost_equal from numpy.testing import assert_array_...
ESS-LLP/frappe
refs/heads/develop
frappe/desk/report_dump.py
11
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals from six.moves import range import frappe import json import copy @frappe.whitelist() def get_data(doctypes, last_modified): data_map = {} for dump_report_map in frappe.get_hoo...
perezg/infoxchange
refs/heads/master
BASE/lib/python2.7/site-packages/django/contrib/gis/geometry/backend/__init__.py
128
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module geom_backend = getattr(settings, 'GEOMETRY_BACKEND', 'geos') try: module = import_module('.%s' % geom_backend, 'django.contrib.gis.geometry.backend') except ImportError: tr...
hojel/calibre
refs/heads/master
src/calibre/ebooks/conversion/plugins/docx_output.py
11
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' from calibre.customize.conversion import OutputFormatPlugin, OptionRecommend...
miptliot/edx-platform
refs/heads/ginkgo_openedu_docker
common/lib/dogstats/setup.py
210
from setuptools import setup setup( name="dogstats_wrapper", version="0.1", packages=["dogstats_wrapper"], install_requires=[ "dogapi", ], )
AmandaCMS/amanda-cms
refs/heads/master
amanda/faq/search_indexes.py
1
from haystack import indexes from haystack.exceptions import NotHandled from amanda.faq.models import Topic class TopicIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.EdgeNgramField(document=True, use_template=True) created_at = indexes.DateTimeField() def get_model(self): return T...
crepererum/invenio
refs/heads/master
invenio/utils/autodiscovery/helpers.py
17
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2009, 2010, 2011, 2013 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, or (at your...
alexanderad/pony-standup-bot
refs/heads/master
tests/test_jobs.py
1
from __future__ import absolute_import import collections import unittest from flexmock import flexmock from pony.jobs import WorldTick class WorldTickTest(unittest.TestCase): def setUp(self): queue = collections.deque() self.fake_bot = flexmock() self.job = WorldTick(self.fake_bot, queu...
gwpy/gwpy.github.io
refs/heads/master
docs/0.9.0/examples/signal/gw150914-1.py
9
from gwpy.timeseries import TimeSeries hdata = TimeSeries.fetch_open_data('H1', 1126259446, 1126259478)
dirkhusemann/rezzme
refs/heads/master
RezzMe/gridinfo.py
1
#!/usr/bin/python # -*- encoding: utf-8 -*- # Copyright (c) Contributors, http://opensimulator.org/ # See CONTRIBUTORS.TXT for a full list of copyright holders. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * ...
ubgarbage/gae-blog
refs/heads/master
django/contrib/admin/widgets.py
156
""" Form Widget classes specific to the Django admin site. """ import django.utils.copycompat as copy from django import forms from django.forms.widgets import RadioFieldRenderer from django.forms.util import flatatt from django.utils.html import escape from django.utils.text import truncate_words from django.utils.t...
Ensembles/ert
refs/heads/master
python/tests/core/util/test_work_area.py
2
#!/usr/bin/env python # Copyright (C) 2014 Statoil ASA, Norway. # # The file 'test_work_area.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 Found...
Dev4X/oppia
refs/heads/master
extensions/interactions/LogicProof/LogicProof.py
9
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
hyu754/hyu754.github.io
refs/heads/master
tutorials/examples/materials_and_texture/icons_rc.py
8
# -*- coding: utf-8 -*- # Resource object code # # Created: Wed Jan 9 11:04:13 2013 # by: The Resource Compiler for PyQt (Qt v4.8.4) # # WARNING! All changes made in this file will be lost! try: from PySide import QtCore except ImportError: from PyQt4 import QtCore qt_resource_data = b"\ \x00\x00\x96\x4...
balloob/home-assistant
refs/heads/dev
homeassistant/components/econet/water_heater.py
14
"""Support for Rheem EcoNet water heaters.""" import datetime import logging from pyeconet.api import PyEcoNet import voluptuous as vol from homeassistant.components.water_heater import ( PLATFORM_SCHEMA, STATE_ECO, STATE_ELECTRIC, STATE_GAS, STATE_HEAT_PUMP, STATE_HIGH_DEMAND, STATE_OFF, ...
Denisolt/IEEE-NYIT-MA
refs/heads/master
local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/compat.py
479
try: from urllib.parse import urljoin except ImportError: from urlparse import urljoin try: import cPickle as pickle except ImportError: import pickle from pip._vendor.requests.packages.urllib3.response import HTTPResponse from pip._vendor.requests.packages.urllib3.util import is_fp_closed # Replic...
uskudnik/amazon-glacier-cmd-interface
refs/heads/master
setup.py
8
# -*- coding: utf-8 -*- """Installer for this package.""" from setuptools import setup from setuptools import find_packages import os # shamlessly stolen from Hexagon IT guys def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() version = '0.2dev' setup(name='glacier', v...
chatelak/RMG-Py
refs/heads/master
rmgpy/molecule/parser.py
5
# global imports import cython import logging import itertools # local imports # Assume that OB is not installed by default INSTALLED_BACKENDS = { 'OB': False, } try: import openbabel INSTALLED_BACKENDS['OB'] = True except : pass from rdkit import Chem from rmgpy.molecule import element as element...
sgerhart/ansible
refs/heads/maintenance_policy_module
lib/ansible/plugins/lookup/vars.py
55
# (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 = """ lookup: vars author: Ansible Core version_added: "2.5" short_description: L...
churchlab/millstone
refs/heads/master
genome_designer/genome_finish/jbrowse_genome_finish.py
1
from collections import defaultdict import gzip import os import re import subprocess from django.conf import settings from settings import JBROWSE_DATA_URL_ROOT from settings import S3_BUCKET from main.model_utils import get_dataset_with_type from main.models import Dataset from utils.bam_utils import sort_bam_by_co...
sivel/ansible-modules-core
refs/heads/devel
network/nxos/nxos_snmp_location.py
25
#!/usr/bin/python # # 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 distribut...
CredoReference/edx-platform
refs/heads/integration-hawthorn-qa
openedx/core/djangoapps/ace_common/settings/aws.py
13
def plugin_settings(settings): settings.ACE_ENABLED_CHANNELS = settings.ENV_TOKENS.get('ACE_ENABLED_CHANNELS', settings.ACE_ENABLED_CHANNELS) settings.ACE_ENABLED_POLICIES = settings.ENV_TOKENS.get('ACE_ENABLED_POLICIES', settings.ACE_ENABLED_POLICIES) settings.ACE_CHANNEL_SAILTHRU_DEBUG = settings.ENV_TOKE...
espadrine/opera
refs/heads/master
chromium/src/build/android/pylib/host_driven/__init__.py
998
# 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.
sodexis/odoo
refs/heads/8.0
addons/lunch/tests/__init__.py
260
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
2014c2g4/2015cda0623
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/sre_compile.py
630
# # Secret Labs' Regular Expression Engine # # convert template to internal format # # Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" import sys import _sre import sre_parse from sre_constan...
bjackman/trappy
refs/heads/master
trappy/compare_runs.py
3
# Copyright 2015-2017 ARM Limited # # 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 w...
passiweinberger/passiweinberger.github.io
refs/heads/master
_site/presentations/IBM_Lab_Lecture/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
1284
# 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. import collections import copy import hashlib import json import multiprocessing import os.path import re import signal import subprocess import sys import gyp imp...
albertomurillo/ansible
refs/heads/devel
lib/ansible/modules/network/checkpoint/checkpoint_access_rule_facts.py
30
#!/usr/bin/python # # 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 distribut...
raspberrypi-tw/camera-python
refs/heads/master
07_face_detection/image_face_detect.py
1
#!/usr/bin/python #+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #|R|a|s|p|b|e|r|r|y|P|i|.|c|o|m|.|t|w| #+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ # # image_face_detect.py # Face detect from image # # Author : Shantnu # Date : 06/06/2017 # Origin : https://github.com/shantnu/FaceDetect/blob/master/face_detect.py # Usage : pytho...
grevutiu-gabriel/sympy
refs/heads/master
sympy/matrices/tests/test_densesolve.py
80
from sympy.matrices.densesolve import LU_solve, rref_solve, cholesky_solve from sympy import Dummy from sympy import QQ def test_LU_solve(): x, y, z = Dummy('x'), Dummy('y'), Dummy('z') assert LU_solve([[QQ(2), QQ(-1), QQ(-2)], [QQ(-4), QQ(6), QQ(3)], [QQ(-4), QQ(-2), QQ(8)]], [[x], [y], [z]], [[QQ(-1)], [QQ(...
wiltonlazary/arangodb
refs/heads/devel
3rdParty/V8/V8-5.0.71.39/buildtools/checkdeps/checkdeps.py
4
#!/usr/bin/env python # Copyright 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. """Makes sure that files include headers from allowed directories. Checks DEPS files in the source tree for rules, and applies those r...
daviddoria/PointGraphsPhase1
refs/heads/PointGraphsPhase1
Examples/VisualizationAlgorithms/Python/ExtractGeometry.py
15
#!/usr/bin/env python # This example shows how to extract a piece of a dataset using an # implicit function. In this case the implicit function is formed by # the boolean combination of two ellipsoids. import vtk # Here we create two ellipsoidal implicit functions and boolean them # together tto form a "cross" shape...
gnina/scripts
refs/heads/master
bootstrap.py
1
#!/usr/bin/env python3 import predict import sklearn.metrics import argparse, sys import os import numpy as np import glob import re import matplotlib.pyplot as plt def calc_auc(predictions): y_true =[] y_score=[] for line in predictions: values= line.split(" ") y_true.append(float(values[1])) y_score.append...
alvin319/CarnotKE
refs/heads/master
jyhton/bugtests/test342p/doimp.py
13
kind = __import__('test342m').kind
kyuridenamida/atcoder-tools
refs/heads/master
tests/resources/test_tester/test_run_single_test_decimal_mixed/test_decimal.py
2
#!/usr/bin/python3 x = float(input()) print(x + 0.001, "POSSIBLE")
pywkm/earthpic
refs/heads/master
earthpic/earth.py
1
#!/usr/bin/env python3 """ Main console script. Call with '-h' argument for help. """ import argparse import logging import sched import time from datetime import datetime, timedelta import pytz from pathlib import Path from earthpic.himawari8 import EarthPhoto from earthpic.utils import ( set_wallpaper, sch...
concerned3rdparty/jirafe-python
refs/heads/master
jirafe/models/BaseProduct.py
1
#!/usr/bin/env python """ Copyright 2014 Jirafe, 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 applicab...
tailorian/Sick-Beard
refs/heads/ThePirateBay
lib/unidecode/x0c9.py
253
data = ( 'jun', # 0x00 'junj', # 0x01 'junh', # 0x02 'jud', # 0x03 'jul', # 0x04 'julg', # 0x05 'julm', # 0x06 'julb', # 0x07 'juls', # 0x08 'jult', # 0x09 'julp', # 0x0a 'julh', # 0x0b 'jum', # 0x0c 'jub', # 0x0d 'jubs', # 0x0e 'jus', # 0x0f 'juss', # 0x10 'jung', ...
DBrianKimmel/PyHouse
refs/heads/develop
Project/src/Modules/Core/Utilities/_test/test_user_validation.py
1
""" @name: PyHouse/src/Modules.Core.Utilities._test/test_user_validation.py @author: D. Brian Kimmel @contact: D.BrianKimmel@gmail.com @copyright: (c) 2015-2017 by D. Brian Kimmel @license: MIT License @note: Created on Oct 30, 2015 @Summary: """ # Import system type stuff from twisted.trial import u...
floresconlimon/qutebrowser
refs/heads/master
tests/unit/utils/usertypes/test_timer.py
8
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Softwa...
craynot/django
refs/heads/master
tests/check_framework/models.py
396
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models class SimpleModel(models.Model): field = models.IntegerField() manager = models.manager.Manager()
grap/OpenUpgrade
refs/heads/8.0
addons/marketing_crm/__init__.py
378
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP SA (http://www.openerp.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
maykinmedia/django-mailer-2
refs/heads/master
django_mailer/testapp/tests/engine.py
28
from django.test import TestCase from django_mailer import engine, settings from django_mailer.lockfile import FileLock from StringIO import StringIO import logging import time class LockTest(TestCase): """ Tests for Django Mailer trying to send mail when the lock is already in place. """ def set...
aurelijusb/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/distutils/command/install_headers.py
53
"""distutils.command.install_headers Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id: install_headers.py 61000 2008-02-23 17:40:11Z christian.heimes $" from distutils.co...
mdanielwork/intellij-community
refs/heads/master
python/testData/completion/heavyStarPropagation/lib/_pkg1/__init__.py
30
from ._pkg1_0 import * from ._pkg1_1 import *
ataylor32/django
refs/heads/master
tests/template_tests/filter_tests/test_stringformat.py
345
from django.template.defaultfilters import stringformat from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class StringformatTests(SimpleTestCase): """ Notice that escaping is applied *after* any filters, so the string formatting here only needs...
FireWRT/OpenWrt-Firefly-Libraries
refs/heads/master
staging_dir/host/lib/python3.4/config-3.4/python-config.py
2
#!/home/wbj/project/mt7621/firewrt_build_all_app/FireWRT-OpenWrt-Firefly-FireWRT-SDK/staging_dir/host/bin/python3.4 # -*- python -*- # Keep this script in sync with python-config.sh.in import getopt import os import sys import sysconfig valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', ...
HousekeepLtd/django
refs/heads/master
tests/many_to_one/tests.py
88
import datetime from copy import deepcopy from django.core.exceptions import FieldError, MultipleObjectsReturned from django.db import models, transaction from django.test import TestCase from django.utils import six from django.utils.translation import ugettext_lazy from .models import ( Article, Category, Child...
mishravikas/geonode-permissions
refs/heads/master
geonode/api/api.py
1
from django.conf.urls import url from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.contrib.contenttypes.models import ContentType from django.conf import settings from avatar.templatetags.avatar_tags import avatar_url from guardian.shortcuts import get_objects_for_...
Sapphirine/Sapphirine-find_people_like_you
refs/heads/master
restapi/use_followings/mutal_friend_score.py
1
from pyspark.mllib.regression import LabeledPoint from pyspark.mllib.tree import DecisionTree from pyspark.mllib.linalg import SparseVector from pyspark import SparkContext from operator import add import time import numpy from pyspark.mllib.linalg import Vectors import pyspark.mllib.clustering as cl import os...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/communication/azure-communication-chat/samples/chat_client_sample.py
1
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ FILE...
pelikanchik/edx-platform
refs/heads/master
lms/djangoapps/dashboard/management/commands/git_add_course.py
9
""" Script for importing courseware from git/xml into a mongo modulestore """ import os import re import StringIO import subprocess import logging from django.core import management from django.core.management.base import BaseCommand, CommandError from django.utils.translation import ugettext as _ import dashboard.g...
josherick/bokeh
refs/heads/master
sphinx/source/docs/tutorials/solutions/image.py
23
from __future__ import division import numpy as np from bokeh.plotting import figure, output_file, show, VBox # NOTE: if you do have numba installed, uncomment out this import, # and the 'autojit' lines below (the example will run more quickly). #from numba import autojit # These functions generate the Mandelbrot s...
saurabh6790/medsynaptic-app
refs/heads/develop
stock/report/stock_ageing/stock_ageing.py
29
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import date_diff def execute(filters=None): columns = get_columns() item_details = get_fifo_queue(filters) ...
camilonova/django
refs/heads/master
django/contrib/messages/views.py
131
from django.contrib import messages class SuccessMessageMixin: """ Add a success message on successful form submission. """ success_message = '' def form_valid(self, form): response = super().form_valid(form) success_message = self.get_success_message(form.cleaned_data) if...
Foxfanmedium/python_training
refs/heads/master
OnlineCoursera/mail_ru/Python_1/env/Lib/site-packages/ipython_genutils/tests/test_tempdir.py
20
import os from ..tempdir import NamedFileInTemporaryDirectory from ..tempdir import TemporaryWorkingDirectory def test_named_file_in_temporary_directory(): with NamedFileInTemporaryDirectory('filename') as file: name = file.name assert not file.closed assert os.path.exists(name) ...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/pip-9.0.1-py2.7.egg/pip/_vendor/requests/packages/chardet/universaldetector.py
1775
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
FusionSP/android_external_skia
refs/heads/lp5.1
platform_tools/android/bin/adb_list_devices.py
153
#!/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. """ adb_list_devices: list information about attached Android devices. """ import os import re import shlex import subprocess impor...
John-Boik/Principled-Societies-Project
refs/heads/master
leddaApp/static/brython/src/Lib/encodings/cp1140.py
37
""" Python Character Mapping Codec cp1140 generated from 'python-mappings/CP1140.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_table) def decode(self,input...
geraldoandradee/pytest
refs/heads/master
doc/ja/example/multipython.py
3
""" module containing a parametrized tests testing cross-python serialization via the pickle module. """ import py, pytest pythonlist = ['python2.4', 'python2.5', 'python2.6', 'python2.7', 'python2.8'] def pytest_generate_tests(metafunc): # we parametrize all "python1" and "python2" arguments to iterate # ove...
ASCrookes/django
refs/heads/master
django/core/serializers/xml_serializer.py
124
""" XML serializer. """ from __future__ import unicode_literals from collections import OrderedDict from xml.dom import pulldom from xml.sax import handler from xml.sax.expatreader import ExpatParser as _ExpatParser from django.apps import apps from django.conf import settings from django.core.serializers import bas...
lcpt/xc
refs/heads/master
python_modules/postprocess/reports/report_material.py
1
# -*- coding: utf-8 -*- __author__= "Ana Ortega (AO_O) " __copyright__= "Copyright 2016, AO_O" __license__= "GPL" __version__= "3.0" __email__= "ana.ortega@ciccp.es " import matplotlib.pyplot as plt from postprocess.reports import graph_material class ConcreteReport(object): '''Constructs LaTex tables for depict...
indictranstech/biggift-erpnext
refs/heads/develop
erpnext/selling/doctype/customer/test_customer.py
12
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import unittest from frappe.test_runner import make_test_records from erpnext.exceptions import CustomerFrozen test_ignore = ["Price Li...
craigderington/studentloan5
refs/heads/master
studentloan5/Lib/site-packages/django/conf/locale/zh_TW/formats.py
634
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'Y年n月j日' # 2016年9月5...
m-kuhn/QGIS
refs/heads/master
python/plugins/processing/algs/gdal/PointsAlongLines.py
5
# -*- coding: utf-8 -*- """ *************************************************************************** PointsAlongLines.py --------------------- Date : Janaury 2015 Copyright : (C) 2015 by Giovanni Manghi Email : giovanni dot manghi at naturalgis dot pt **...
tuxfux-hlp-notes/python-batches
refs/heads/master
archieves/batch-56/modules/sheets/lib/python2.7/_weakrefset.py
4
/usr/lib/python2.7/_weakrefset.py
Anonymouslemming/ansible
refs/heads/devel
test/units/plugins/test_plugins.py
37
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
sanguinariojoe/FreeCAD
refs/heads/master
src/Mod/Path/PathScripts/PathVcarve.py
6
# -*- coding: utf-8 -*- # *************************************************************************** # * * # * Copyright (c) 2020 sliptonic <shopinthewoods@gmail.com> * # * ...
jacquerie/inspire-next
refs/heads/master
inspirehep/modules/search/api.py
2
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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 ...
endorphinl/horizon
refs/heads/master
openstack_dashboard/dashboards/project/networks/forms.py
41
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with ...
brownnrl/moneyguru
refs/heads/master
core/gui/graph.py
2
# Copyright 2019 Virgil Dupras # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-3.0.html from datetime import date from math import ceil, floor, log10 from .geomet...
nolouch/shadowsocks
refs/heads/master
setup.py
2
import codecs from setuptools import setup with codecs.open('README.rst', encoding='utf-8') as f: long_description = f.read() setup( name="shadowsocks", version="2.6.5", license='MIT', description="A fast tunnel proxy that help you get through firewalls", author='clowwindy', author_email=...
khkaminska/scikit-learn
refs/heads/master
sklearn/utils/testing.py
71
"""Testing utilities.""" # Copyright (c) 2011, 2012 # Authors: Pietro Berkes, # Andreas Muller # Mathieu Blondel # Olivier Grisel # Arnaud Joly # Denis Engemann # License: BSD 3 clause import os import inspect import pkgutil import warnings import sys import re import platf...
grgbr/linux-iio
refs/heads/iio-rpi-4.7
tools/perf/scripts/python/call-graph-from-postgresql.py
758
#!/usr/bin/python2 # call-graph-from-postgresql.py: create call-graph from 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 So...
RodolfoQuispeC/CPproblemsSolved
refs/heads/master
pizza.py
1
def gcd(n, m): if m==0 : return n return gcd(m, n%m) n=input() m=input() GCD= gcd(n, m) print ((n*m)/GCD)/n
jcpowermac/ansible
refs/heads/devel
test/integration/targets/aws_lambda/files/mini_lambda.py
139
from __future__ import print_function import json import os def handler(event, context): """ The handler function is the function which gets called each time the lambda is run. """ # printing goes to the cloudwatch log allowing us to simply debug the lambda if we can find # the log entry. ...