repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
ikaee/bfr-attendant
facerecognitionlibrary/jni-build/jni/include/tensorflow/python/tools/inspect_checkpoint.py
9
5040
# 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...
apache-2.0
CognitiveScale/ansible-modules-extras
clustering/consul_session.py
76
9109
#!/usr/bin/python # # (c) 2015, Steve Gargan <steve.gargan@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...
gpl-3.0
rajiteh/taiga-back
taiga/base/api/reverse.py
18
1626
# Copyright (C) 2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2015 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
agpl-3.0
Alexey-T/CudaText
app/py/cudatext_cmd.py
2
17801
#prefix cCommand: commands of editor core ATSynEdit #prefix cmd: high-level commands of CudaText _CmdFlag_SelKeep = 0x10000 #cmd continues selection (new caret pos makes bigger selection) _CmdFlag_SelReset = 0x20000 #before command, reset selection _CmdFlag_MovesCaret = 0x80000 #cmd moves caret and makes new undo...
mpl-2.0
hyuh/kernel-k2
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
j-carl/boto
boto/cognito/identity/__init__.py
128
1718
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights...
mit
Greymerk/python-rpg
src/abilities/projectiles/rainbolt.py
1
2266
import pygame import random from src.util import Vector2 from math import hypot from collections import deque from src.util import Color from time import time class Rainbolt: ballSize = 3 scatter = 4 maxParticals = 50 granularity = 15 def __init__(self, start, end, fire=None, impact=None): self.start = star...
gpl-3.0
schets/scikit-learn
sklearn/covariance/outlier_detection.py
22
6856
""" Class for outlier detection. This class provides a framework for outlier detection. It consists in several methods that can be added to a covariance estimator in order to assess the outlying-ness of the observations of a data set. Such a "outlier detector" object is proposed constructed from a robust covariance es...
bsd-3-clause
cloudControl/libcloud
libcloud/test/compute/test_brightbox.py
46
15300
# 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 use ...
apache-2.0
aitoralmeida/networkx
networkx/readwrite/tests/test_yaml.py
40
1350
""" Unit tests for yaml. """ import os,tempfile from nose import SkipTest from nose.tools import assert_equal import networkx as nx from networkx.testing import assert_edges_equal, assert_nodes_equal class TestYaml(object): @classmethod def setupClass(cls): global yaml try: im...
bsd-3-clause
uchile-robotics-forks/nao_robot
nao_apps/nodes/nao_leds.py
5
5933
#!/usr/bin/env python # # ROS node to control NAO's LEDs using NaoQI # Tested with NaoQI: 1.12 # # Copyright (c) 2012, 2013 Miguel Sarabia # Imperial College London # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # ...
bsd-3-clause
aguestuser/social-network-analysis-sandbox
lib/python3.5/site-packages/pip/locations.py
340
5626
"""Locations where we look for configs, install stuff, etc""" from __future__ import absolute_import import os import os.path import site import sys from distutils import sysconfig from distutils.command.install import install, SCHEME_KEYS # noqa from pip.compat import WINDOWS, expanduser from pip.utils import appd...
gpl-3.0
nnethercote/servo
tests/wpt/web-platform-tests/tools/third_party/html5lib/setup.py
25
4533
from __future__ import print_function import ast import codecs import sys from os.path import join, dirname from setuptools import setup, find_packages, __version__ as setuptools_version from pkg_resources import parse_version import pkg_resources try: import _markerlib.markers except ImportError: _markerli...
mpl-2.0
mikalstill/nova
nova/tests/unit/virt/libvirt/storage/test_rbd.py
2
23381
# 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...
apache-2.0
HyperBaton/ansible
test/lib/ansible_test/_internal/executor.py
4
72257
"""Execute Ansible tests.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import os import datetime import re import time import textwrap import functools import hashlib import difflib import filecmp import random import string import shutil from . import types a...
gpl-3.0
thresholdsoftware/asylum
openerp/tests/test_view_validation.py
63
3188
# This test can be run stand-alone with something like: # > PYTHONPATH=. python2 openerp/tests/test_view_validation.py from lxml import etree from StringIO import StringIO import unittest2 from openerp.tools.view_validation import * invalid_form = etree.parse(StringIO('''\ <form> <label></label> <group> ...
agpl-3.0
azverkan/scons
test/Builder/multi/different-environments.py
4
2392
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
mit
stroykova/luigi
test/contrib/mongo_test.py
10
9942
# -*- coding: utf-8 -*- # # Copyright 2017 Big Datext 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 ...
apache-2.0
felixboes/hosd
experimental/cplx_to_vidit.py
1
3981
#!/usr/bin/env python # The software pyradbar is a bunch of programs to compute the homology of # Sullivan diagrams. # Copyright (C) 2015 - 2017 Felix Boes # # This file is part of pyradbar. # # pyradbar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as ...
gpl-3.0
slremy/cloudroboticsreferences
processarxiv.py
1
2518
from sys import exc_info, argv import pandas as pd import urllib import xml.etree.ElementTree import textwrap from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer from sklearn.decomposition import PCA,TruncatedSVD from sklearn.manifold import TSNE from sklearn.preprocessing import Normalizer, n...
apache-2.0
ad-m/python-anticaptcha
tests/test_tasks.py
1
3119
import os from collections import OrderedDict from unittest import TestCase, skipIf import six from python_anticaptcha import TextInput, Select, AnticaptchaClient from python_anticaptcha.tasks import CustomCaptchaTask, NoCaptchaTaskProxylessTask class CustomCaptchaTaskTestCase(TestCase): def test_serialize(self...
mit
row3/commune3
node_modules/meanio/node_modules/npm/node_modules/node-gyp/gyp/PRESUBMIT.py
496
3373
# Copyright (c) 2012 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. """Top-level presubmit script for GYP. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
mit
dongjoon-hyun/tensorflow
tensorflow/python/kernel_tests/decode_image_op_test.py
3
4321
# 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...
apache-2.0
diorcety/intellij-community
plugins/hg4idea/testData/bin/hgext/convert/convcmd.py
90
17238
# convcmd - convert extension commands definition # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from common import NoRepo, MissingTool, SKIPREV, mapfile from cvs import conv...
apache-2.0
Ivacker/swift
stdlib/public/common/MirrorCommon.py
10
2129
#//===--- MirrorCommon.py -------------------------------------*- python -*-===// #// #// This source file is part of the Swift.org open source project #// #// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors #// Licensed under Apache License v2.0 with Runtime Library Exception #// #// See http://swif...
apache-2.0
takuya1981/sms-tools
lectures/08-Sound-transformations/plots-code/hps-transformation.py
24
3018
# function call to the transformation functions of relevance for the hpsModel import numpy as np import matplotlib.pyplot as plt from scipy.signal import get_window import sys, os sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) sys.path.append(os.path.join(os.pat...
agpl-3.0
dednal/chromium.src
android_webview/buildbot/deps_whitelist.py
13
9068
#!/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. # """Logic to generate lists of DEPS used by various parts of the android_webview continuous integration (buildbot) infrastructure. ...
bsd-3-clause
Knotis/djangocassandra
tests/test_insertion.py
1
3619
import datetime from unittest import TestCase from djangocassandra.db.meta import get_column_family from .models import ( SimpleTestModel, DateTimeTestModel, ComplicatedTestModel, PartitionPrimaryKeyModel, ClusterPrimaryKeyModel ) from .util import ( connect_db, create_model, destroy...
bsd-3-clause
mhbu50/erpnext
erpnext/agriculture/setup.py
22
11001
from __future__ import unicode_literals import frappe from frappe import _ from erpnext.setup.utils import insert_record def setup_agriculture(): if frappe.get_all('Agriculture Analysis Criteria'): # already setup return create_agriculture_data() def create_agriculture_data(): records = [ dict( doctype='I...
gpl-3.0
petewarden/tensorflow
tensorflow/python/keras/layers/recurrent_test.py
7
68303
# 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...
apache-2.0
user-none/calibre
src/calibre/gui2/actions/annotate.py
14
6169
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from PyQt5.Qt import pyqtSignal, QModelIndex, QThread, Qt from calibre.gui2 import error_dialog from calibre.gui2.action...
gpl-3.0
LaoZhongGu/kbengine
kbe/src/lib/python/Lib/lib2to3/pgen2/driver.py
21
5153
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. # Modifications: # Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Parser driver. This provides a high-level interface to parse a file into a synta...
lgpl-3.0
kennedyshead/home-assistant
tests/components/smartthings/test_fan.py
1
6247
""" Test for the SmartThings fan platform. The only mocking required is of the underlying SmartThings API object so real HTTP calls are not initiated during testing. """ from pysmartthings import Attribute, Capability from homeassistant.components.fan import ( ATTR_SPEED, ATTR_SPEED_LIST, DOMAIN as FAN_DO...
apache-2.0
ankur-gupta91/horizon-net-ip
openstack_dashboard/test/api_tests/network_rest_tests.py
14
4293
# Copyright 2015, Hewlett-Packard Development Company, L.P. # Copyright 2016 IBM Corp. # # 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 # # Un...
apache-2.0
rh-s/heat
heat_integrationtests/functional/test_aws_stack.py
3
7905
# 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...
apache-2.0
cougar-enigma/Enigma2PC
lib/python/Screens/MinuteInput.py
33
1582
from Screen import Screen from Components.ActionMap import NumberActionMap from Components.Input import Input class MinuteInput(Screen): def __init__(self, session, basemins = 5): Screen.__init__(self, session) self["minutes"] = Input(str(basemins), type=Input.NUMBER) self["actions"] = NumberActi...
gpl-2.0
miguelgrinberg/Flask-HTTPAuth
tests/test_multi.py
1
6107
import base64 import unittest from flask import Flask from flask_httpauth import HTTPBasicAuth, HTTPTokenAuth, MultiAuth class HTTPAuthTestCase(unittest.TestCase): def setUp(self): app = Flask(__name__) app.config['SECRET_KEY'] = 'my secret' basic_auth = HTTPBasicAuth() token_auth...
mit
nathanielvarona/airflow
tests/models/test_sensorinstance.py
3
1784
# # 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...
apache-2.0
pchauncey/ansible
lib/ansible/modules/cloud/centurylink/clc_group.py
26
16745
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # 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', 'status': ['previ...
gpl-3.0
alexgonzl/tacs_vmw_alpha
orientationCDtask/dataMethods.py
1
7760
from __future__ import division import pandas as pd from collections import OrderedDict from scipy.stats import norm Z = norm.ppf import os from os.path import expanduser import re # contanst number of trials per change cond nTrialsPerChangeCond = 16 # counts number of trials corresponding to inputted conditions def ...
mit
KokareIITP/django
tests/view_tests/tests/test_csrf.py
253
3203
from django.test import Client, SimpleTestCase, override_settings from django.utils.translation import override @override_settings(ROOT_URLCONF="view_tests.urls") class CsrfViewTests(SimpleTestCase): def setUp(self): super(CsrfViewTests, self).setUp() self.client = Client(enforce_csrf_checks=True...
bsd-3-clause
mitodl/open-discussions
channels/serializers/reports_test.py
1
2264
""" Tests for serializers for channel REST APIS """ from unittest.mock import Mock import pytest from rest_framework.exceptions import ValidationError from channels.serializers.reports import ReportSerializer, ReportedContentSerializer pytestmark = pytest.mark.django_db def test_report_validate_no_ids(): """v...
bsd-3-clause
zaycev/mokujin
mokujin/patternsearch.py
1
8836
#!/usr/bin/env python # coding: utf-8 # Copyright (C) USC Information Sciences Institute # Author: Vladimir M. Zaytsev <zaytsev@usc.edu> # URL: <http://nlg.isi.edu/> # For more information, see README.md # For license information, see LICENSE """ Definitions: TS - triples set (store) {τ} TD - terms di...
apache-2.0
johnkit/vtk-dev
Examples/Infovis/Python/labels.py
9
1411
import random from vtk import * n = 10000 qinit = vtkQtInitialization() pd = vtkPolyData() pts = vtkPoints() verts = vtkCellArray() orient = vtkDoubleArray() orient.SetName('orientation') label = vtkStringArray() label.SetName('label') for i in range(n): pts.InsertNextPoint(random.random(), random.random(), rando...
bsd-3-clause
nealtodd/django
django/contrib/auth/admin.py
88
8740
from django.conf import settings from django.conf.urls import url from django.contrib import admin, messages from django.contrib.admin.options import IS_POPUP_VAR from django.contrib.admin.utils import unquote from django.contrib.auth import update_session_auth_hash from django.contrib.auth.forms import ( AdminPass...
bsd-3-clause
Robinson10240/simple-rtmp-server
trunk/research/python-subprocess/main.py
39
1833
#!/usr/bin/python # -*- coding: utf-8 -*- import sys, shlex, time, subprocess cmd = "./python.subprocess 0 80000" args = shlex.split(str(cmd)) print "cmd: %s, args: %s"%(cmd, args) # the communicate will read all data and wait for sub process to quit. def use_communicate(args, fout, ferr): process = subprocess.P...
mit
nycholas/ask-undrgz
src/ask-undrgz/django/core/urlresolvers.py
11
15549
""" This module converts requested URLs to callback view functions. RegexURLResolver is the main class here. Its resolve() method takes a URL (as a string) and returns a tuple in this format: (view_function, function_args, function_kwargs) """ import re from django.http import Http404 from django.conf import se...
bsd-3-clause
arnoutpierre/rtv
rtv/helpers.py
5
7266
import sys import os import curses import webbrowser import subprocess from datetime import datetime from tempfile import NamedTemporaryFile # kitchen solves deficiencies in textwrap's handling of unicode characters from kitchen.text.display import wrap, textual_width_chop import six from . import config from .except...
mit
aclements/go-misc
stackmapcompress.py
1
11651
# -*- indent-tabs-mode: nil -*- # Parse output of "go build -gcflags=all=-S -a cmd/go >& /tmp/go.s" and # compress register liveness maps in various ways. import re import sys import collections if True: # Register maps FUNCDATA = "3" PCDATA = "2" else: # Stack maps FUNCDATA = "1" # Locals (not a...
bsd-3-clause
michael-dev2rights/ansible
lib/ansible/modules/cloud/digital_ocean/digital_ocean.py
26
15224
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
ultracoindev/ultracoin-abe
test/test_btc200.py
26
6062
# Copyright(C) 2014 by Abe developers. # test_btc200.py: test Abe loading through Bitcoin Block 200. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, o...
agpl-3.0
skibyte/gdblib
gdblib/gdbremotetestserver.py
1
1327
# # GdbLib - A Gdb python library. # Copyright (C) 2012 Fernando Castillo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any la...
lgpl-3.0
krafczyk/spack
var/spack/repos/builtin/packages/hybpiper/package.py
5
2427
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Mac/Modules/evt/evtscan.py
34
2527
# Scan an Apple header file, generating a Python file of generator calls. import sys from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner LONG = "Events" SHORT = "evt" OBJECT = "NOTUSED" def main(): input = LONG + ".h" output = SHORT + "gen.py" defsoutput =...
mit
aio-libs/aiohttp
tests/test_tracing.py
1
4763
# type: ignore from types import SimpleNamespace from typing import Any from unittest.mock import Mock import pytest from aiohttp.test_utils import make_mocked_coro from aiohttp.tracing import ( Trace, TraceConfig, TraceConnectionCreateEndParams, TraceConnectionCreateStartParams, TraceConnectionQu...
apache-2.0
devoid/nova
nova/scheduler/filters/trusted_filter.py
3
10508
# Copyright (c) 2012 Intel, Inc. # Copyright (c) 2011-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.o...
apache-2.0
tzaffi/git-in-practice-repo
book/lib/python2.7/site-packages/ecdsa/der.py
26
7023
from __future__ import division import binascii import base64 from .six import int2byte, b, PY3, integer_types, text_type class UnexpectedDER(Exception): pass def encode_constructed(tag, value): return int2byte(0xa0+tag) + encode_length(len(value)) + value def encode_integer(r): assert r >= 0 # can't sup...
mit
llvm-mirror/llvm
tools/llvm-shlib/gen-msvc-exports.py
35
3649
#===- gen-msvc-exports.py - Generate C API export file -------*- python -*--===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===---------------------------------...
apache-2.0
benschmaus/catapult
third_party/mapreduce/mapreduce/tools/gcs_file_seg_reader.py
41
3152
#!/usr/bin/env python """A simple reader for file segs produced by GCS output writer.""" from mapreduce import output_writers # pylint: disable=protected-access # pylint: disable=invalid-name # pylint: disable=g-import-not-at-top # TODO(user): Cleanup imports if/when cloudstorage becomes part of runtime. try: # Ch...
bsd-3-clause
sho-h/ruby_env
devkit/mingw/bin/lib/distutils/core.py
54
9335
"""distutils.core The only module that needs to be imported to use the Distutils; provides the 'setup' function (which is to be called from the setup script). Also indirectly provides the Distribution and Command classes, although they are really defined in distutils.dist and distutils.cmd. """ __revision__ ...
mit
akshatharaj/django
tests/model_fields/test_imagefield.py
181
16062
from __future__ import unicode_literals import os import shutil from unittest import skipIf from django.core.exceptions import ImproperlyConfigured from django.core.files import File from django.core.files.images import ImageFile from django.test import TestCase from django.utils._os import upath try: from .mode...
bsd-3-clause
KjellSchubert/bru
tests/test_brulib_library.py
3
2319
import unittest import brulib.library import os import shutil temp_root = './temp_library' class LibraryTestCase(unittest.TestCase): @classmethod def setUpClass(cls): # create a temp library root: if os.path.exists(temp_root): shutil.rmtree(temp_root) @classmethod def te...
mit
memespring/bicycle-barometer
web/app.py
1
3271
import os from flask import Flask from flask import render_template from flask import request from helpers.tube import line_status, station_open from helpers.metoffice import get_forcast app = Flask(__name__) app.debug = True def get_value(station, line): result = 100 forcast = get_forcast() print "Feel...
agpl-3.0
rosmo/ansible
lib/ansible/modules/network/f5/bigip_snmp_community.py
38
29233
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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', ...
gpl-3.0
rlpy/rlpy
tests/test_representations/test_LocalBases.py
1
6126
from __future__ import division from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from past.utils import old_div from rlpy.Representations.LocalBases import NonparametricLocalBases, ...
bsd-3-clause
totolef/Sick-beard
lib/guessit/transfo/__init__.py
50
3817
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
gpl-3.0
CodeBradley/python-uptimerobot
uptimerobot/uptimerobot.py
1
9659
#!/usr/bin/env python from __future__ import print_function try: import urllib.request as urllib_request except ImportError: import urllib2 as urllib_request import json import sys import os try: import configparser as ConfigParser except ImportError: import ConfigParser monitorFriendlyName = None mo...
mit
arpitn30/open-event-orga-server
migrations/versions/20f17a744206_.py
10
1569
"""empty message Revision ID: 20f17a744206 Revises: e702a5a988c2 Create Date: 2016-06-21 17:43:31.098158 """ # revision identifiers, used by Alembic. revision = '20f17a744206' down_revision = 'e702a5a988c2' from alembic import op import sqlalchemy as sa import sqlalchemy_utils def upgrade(): ### commands auto...
gpl-3.0
Jortolsa/l10n-spain
l10n_es_aeat_mod340/__init__.py
14
1171
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 20011 Ting (http://www.ting.es) # Copyright (c) 2011-2013 Acysos S.L. (http://acysos.com) # Ignacio Ibeas Izquierdo <ignacio@...
agpl-3.0
myselfHimanshu/UdacityDSWork
Intro-To-Data-Science/Lesson2/PS2_2.py
2
1343
import pandas import pandasql def max_temp_aggregate_by_fog(filename): ''' This function should run a SQL query on a dataframe of weather data. The SQL query should return two columns and two rows - whether it was foggy or not (0 or 1) and the max maxtempi for that fog value (i.e., the maximum ma...
gpl-2.0
anryko/ansible
lib/ansible/modules/network/icx/icx_user.py
19
13367
#!/usr/bin/python # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
CiuffysHub/MITMf
mitmflib-0.18.4/build/lib.linux-i686-2.7/mitmflib/watchdog/observers/fsevents2.py
2
9091
# -*- coding: utf-8 -*- # # Copyright 2014 Thomas Amland <thomas.amland@gmail.com> # # 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 # # Unles...
gpl-3.0
manipopopo/tensorflow
tensorflow/contrib/learn/python/learn/estimators/run_config.py
22
18031
# 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...
apache-2.0
1nc1n3rat0r/scapy
scapy/contrib/isis.py
6
26121
# scapy.contrib.description = ISIS # scapy.contrib.status = loads """ IS-IS Scapy Extension ~~~~~~~~~~~~~~~~~~~~~ :copyright: 2014, 2015 BENOCS GmbH, Berlin (Germany) :author: Marcel Patzlaff, mpatzlaff@benocs.com :license: GPLv2 This module is free software; you can redistribute it ...
gpl-2.0
jokey2k/sentry
tests/sentry/web/frontend/test_organization_home.py
1
2196
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.models import AuthProvider from sentry.testutils import TestCase, PermissionTestCase class OrganizationHomePermissionTest(PermissionTestCase): def setUp(self): super(OrganizationHomePermissionTest, self).setU...
bsd-3-clause
Arafatk/sympy
sympy/geometry/tests/test_util.py
5
1556
from __future__ import division from sympy import Symbol, sqrt, Derivative from sympy.geometry import Point, Polygon, Segment, convex_hull, intersection, centroid from sympy.geometry.util import idiff from sympy.solvers.solvers import solve from sympy.utilities.pytest import raises def test_idiff(): x = Symbol('...
bsd-3-clause
mdowds/python-mock-firestore
mockfirestore/client.py
1
1836
from typing import Iterable from mockfirestore.collection import CollectionReference from mockfirestore.document import DocumentReference, DocumentSnapshot from mockfirestore.transaction import Transaction class MockFirestore: def __init__(self) -> None: self._data = {} def _ensure_path(self, path):...
mit
ekalosak/boto
tests/unit/ec2/test_spotinstance.py
114
5101
from tests.unit import AWSMockServiceTestCase from boto.ec2.connection import EC2Connection class TestCancelSpotInstanceRequests(AWSMockServiceTestCase): connection_class = EC2Connection def default_body(self): return b""" <CancelSpotInstanceRequestsResponse xmlns="http://ec2.amazonaws....
mit
legalsylvain/OpenUpgrade
addons/l10n_be_coda/__init__.py
430
1105
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it u...
agpl-3.0
ignacio28/kernel_lge_u2
Documentation/target/tcm_mod_builder.py
3119
42754
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
gpl-2.0
laurentb/weboob
weboob/applications/videoob/videoob.py
1
12328
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Christophe Benz, Romain Bignon, John Obbele, Nicolas Duhamel # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation,...
lgpl-3.0
rastaman/ansible-modules-core
cloud/amazon/rds_param_group.py
104
10673
#!/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 distributed...
gpl-3.0
NeCTAR-RC/horizon
openstack_dashboard/utils/filters.py
6
1506
# Copyright 2012 NEC Corporation All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
apache-2.0
WALR/djangomx
djangomx/blog/models.py
3
3687
# coding: utf-8 import os from django.db import models from django.utils.translation import ugettext as _ from django.core import urlresolvers from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from utilities.utils import get_filename from django.contrib.auth.models...
mit
Zoraze/Test-Pscr
src/olsr/bindings/callbacks_list.py
12
1548
callback_classes = [ ['ns3::ObjectBase *', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<const ns3::Packet>', 'unsigned short', 'const ns3::Address &', 'const ns3::Address &', 'ns3::Ne...
gpl-2.0
rachwong00/mobiledata
lib/oauth2client/client.py
33
84421
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
mogoweb/chromium-crosswalk
chrome/test/chromedriver/third_party/googlecode/googlecode_upload.py
160
8608
#!/usr/bin/env python # # Copyright 2006, 2007 Google Inc. All Rights Reserved. # Author: danderson@google.com (David Anderson) # # Script for uploading files to a Google Code project. # # This is intended to be both a useful script for people who want to # streamline project uploads and a reference implementation for ...
bsd-3-clause
cbmoore/statsmodels
statsmodels/tools/parallel.py
32
2180
"""Parallel utility function using joblib copied from https://github.com/mne-tools/mne-python Author: Alexandre Gramfort <gramfort@nmr.mgh.harvard.edu> License: Simplified BSD changes for statsmodels (Josef Perktold) - try import from joblib directly, (doesn't import all of sklearn) """ from __future__ import print...
bsd-3-clause
pselle/calibre
src/calibre/ebooks/oeb/transforms/rasterize.py
14
9091
''' SVG rasterization transform. ''' from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.com>' import os, re from urlparse import urldefrag from lxml import etree from PyQt5.Qt import ( Qt, QByteArray, QBuffer, QIODevice, QColor, QImage, QPa...
gpl-3.0
unixhot/opencmdb
django_mongoengine/views/edit.py
1
1995
from django.utils import six from django.core.exceptions import ImproperlyConfigured from django_mongoengine.utils.wrappers import WrapDocument, copy_class from django_mongoengine.utils.monkey import get_patched_django_module from django_mongoengine.forms.documents import documentform_factory from .detail import Sing...
apache-2.0
mbauskar/tele-erpnext
erpnext/config/hr.py
2
4677
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Documents"), "icon": "icon-star", "items": [ { "type": "doctype", "name": "Employee", "description": _("Employee records."), }, { "type": "doctype", "name": "Leave Applic...
agpl-3.0
colour-science/colour
colour/models/tests/test_cam02_ucs.py
1
18844
# -*- coding: utf-8 -*- """ Defines the unit tests for the :mod:`colour.models.cam02_ucs` module. """ import numpy as np import unittest from itertools import permutations from colour.appearance import (CAM_KWARGS_CIECAM02_sRGB, VIEWING_CONDITIONS_CIECAM02, XYZ_to_CIECAM02) from colour....
bsd-3-clause
colour-science/colour
colour/__init__.py
1
19550
# -*- coding: utf-8 -*- """ Colour ====== `Colour <https://github.com/colour-science/colour>`__ is an open-source `Python <https://www.python.org/>`__ package providing a comprehensive number of algorithms and datasets for colour science. It is freely available under the `New BSD License <https://opensource.org/licen...
bsd-3-clause
dgzurita/odoo
addons/crm_claim/report/crm_claim_report.py
180
4664
# -*- 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...
agpl-3.0
damiencalloway/djtut
mysite/env/lib/python2.7/site-packages/django/conf/locale/tr/formats.py
106
1043
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'd F Y H:i:s' YEAR_MONTH_F...
mit
chetan51/nupic
examples/opf/experiments/anomaly/temporal/saw_big/description.py
3
14492
# ---------------------------------------------------------------------- # 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 apply: # # This progra...
gpl-3.0
joelpinheiro/safebox-smartcard-auth
Client/veclient/lib/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.py
2994
1676
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
gpl-2.0
jumpstarter-io/neutron
neutron/plugins/nuage/extensions/nuage_router.py
3
2244
# Copyright 2014 Alcatel-Lucent USA 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 l...
apache-2.0
intellimath/pyaxon
lib/axon/errors.py
1
4920
# coding: utf-8 # The MIT License (MIT) # # Copyright (c) <2011-2015> <Shibzukhov Zaur, szport at gmail dot com> # # 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, incl...
mit
heihei1252/phonetooth
phonetooth/transferinfo.py
3
3407
# Copyright (C) 2008 Dirk Vanden Boer <dirk.vdb@gmail.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; either version 2 of the License, or # (at your option) any later versi...
gpl-2.0