repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
markslwong/tensorflow
tensorflow/python/kernel_tests/distributions/laplace_test.py
75
13406
# 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
rosmo/ansible
lib/ansible/module_utils/splitter.py
197
9433
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
yasoob/youtube-dl-GUI
youtube_dl/extractor/curiositystream.py
3
6726
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, urlencode_postdata, compat_str, ExtractorError, ) class CuriosityStreamBaseIE(InfoExtractor): _NETRC_MACHINE = 'curiositystream' _auth_token = None _API_...
mit
thomasgilgenast/spqr-nonrel
django/contrib/comments/feeds.py
310
1439
from django.conf import settings from django.contrib.syndication.views import Feed from django.contrib.sites.models import Site from django.contrib import comments from django.utils.translation import ugettext as _ class LatestCommentFeed(Feed): """Feed of latest comments on the current site.""" def title(sel...
bsd-3-clause
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/host/lib/python2.7/test/test_mhlib.py
126
11142
""" Tests for the mhlib module Nick Mathewson """ ### BUG: This suite doesn't currently test the mime functionality of ### mhlib. It should. import unittest from test.test_support import run_unittest, TESTFN, import_module import os, StringIO import sys mhlib = import_module('mhlib', deprecated=True) if ...
gpl-2.0
Bysmyyr/chromium-crosswalk
build/android/symbolize.py
7
2675
#!/usr/bin/env python # # 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. """Symbolizes stack traces generated by Chromium for Android. Sample usage: adb logcat chromium:V | symbolize.py """ import os im...
bsd-3-clause
kernc/pelican
pelican/signals.py
4
1607
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function from blinker import signal # Run-level signals: initialized = signal('pelican_initialized') get_generators = signal('get_generators') all_generators_finalized = signal('all_generators_finalized') get_writer = signal('get_writer') finalize...
agpl-3.0
michelts/lettuce
tests/integration/lib/Django-1.2.5/tests/regressiontests/queryset_pickle/tests.py
102
1210
import pickle import datetime from django.test import TestCase from models import Group, Event, Happening class PickleabilityTestCase(TestCase): def assert_pickles(self, qs): self.assertEqual(list(pickle.loads(pickle.dumps(qs))), list(qs)) def test_related_field(self): g = Group.objects.cre...
gpl-3.0
juanalfonsopr/odoo
addons/mrp/mrp.py
145
73675
# -*- 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
ToontownUprising/src
toontown/minigame/IceTreasure.py
5
3181
from pandac.PandaModules import Point3, CollisionSphere, CollisionNode, BitMask32 from direct.interval.IntervalGlobal import Sequence, LerpScaleInterval, Parallel, Func, SoundInterval from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject from toontown.toonbase import T...
mit
spurin/xmldataset
examples/example6.py
1
2665
import xmldataset import pprint # Setup Pretty Printing ppsetup = pprint.PrettyPrinter(indent=4) pp = ppsetup.pprint xml = """<?xml version="1.0"?> <catalog> <shop number="1"> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <...
bsd-3-clause
ofayans/freeipa
ipaclient/remote_plugins/2_156/permission.py
16
34289
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # # pylint: disable=unused-import import six from . import Command, Method, Object from ipalib import api, parameters, output from ipalib.parameters import DefaultFrom from ipalib.plugable import Registry from ipalib.text import _ from ipapython.dn ...
gpl-3.0
MPBA/pyHRV
pyphysio/tests/test_filters.py
2
2420
# coding=utf-8 from __future__ import division import unittest from . import ph, TestData, np __author__ = 'aleb' class FiltersTest(unittest.TestCase): def test_general(self): # %% FSAMP = 2048 TSTART = 0 # %% ecg = ph.EvenlySignal(TestData.ecg(), sampling_freq=FSAMP, si...
gpl-3.0
yeasy/lazyctrl
lcm/openvswitch-lc/python/ovs/db/error.py
56
1160
# Copyright (c) 2009, 2010, 2011 Nicira, 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 agre...
apache-2.0
wshallum/ansible
lib/ansible/modules/network/nxos/nxos_install_os.py
25
13716
#!/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...
gpl-3.0
linuxyan/opsmanage
app/auth/views.py
1
1754
#coding=utf-8 from flask import render_template, redirect, request, url_for, flash,abort from . import auth from ..models import users from .. import db from .forms import LoginForm,UserEditForm from flask.ext.login import login_user, logout_user,current_user from flask.ext.login import login_required @auth.r...
apache-2.0
sannecottaar/burnman
burnman/eos/hp.py
3
14207
from __future__ import absolute_import # This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences # Copyright (C) 2012 - 2017 by the BurnMan team, released under the GNU # GPL v2 or later. import numpy as np import warnings from . import modified_tait as mt from ....
gpl-2.0
aspidites/django
django/contrib/auth/models.py
263
14879
from __future__ import unicode_literals from django.contrib import auth from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager from django.contrib.auth.signals import user_logged_in from django.contrib.contenttypes.models import ContentType from django.core import validators from django.core.excep...
bsd-3-clause
webmasterraj/GaSiProMo
flask/lib/python2.7/site-packages/botocore/docs/paginator.py
22
6986
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
gpl-2.0
pjdelport/HTTPretty
tests/functional/test_urllib2.py
1
7926
# #!/usr/bin/env python # -*- coding: utf-8 -*- # <HTTPretty - HTTP client mock for Python> # Copyright (C) <2011> Gabriel Falcão <gabriel@nacaolivre.org> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal ...
mit
VielSoft/odoo
addons/document/test_cindex.py
444
1553
#!/usr/bin/python import sys import os import glob import time import logging from optparse import OptionParser logging.basicConfig(level=logging.DEBUG) parser = OptionParser() parser.add_option("-q", "--quiet", action="store_false", dest="verbose", default=True, help="don't prin...
agpl-3.0
ywang-bom/wismon
wismon/wismon.py
1
20145
""" WMO WIS monitoring tool for OpenWIS. All datetime values must conform to ISO 8601. date - YYYY-MM-DD datetime - YYYY-MM-DDThh:mm:ssZ """ import os import sys import time from datetime import datetime from ConfigParser import ConfigParser, NoSectionError, NoOptionError import urllib2 import json import log...
gpl-3.0
mtchetch/trello-rss
recent.py
2
3504
""" recent.py - Used for trello-rss to grab recent Trello updates on your account Written by Nate Collings TODO: - Currently just retrieves ALL it can given a specific token. Add support for just getting updates for certain boards, public or otherwise. The current process just filters it out later. """ import conf...
mit
FuzzyHobbit/block-explorer
contrib/ecdsa.py
47
45627
#!/usr/bin/env python # Retrieved from http://ecdsa.org/ecdsa.py on 2011-10-17. # Thanks to ThomasV. # 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
sonnyhu/scikit-learn
sklearn/externals/joblib/_memory_helpers.py
52
3606
try: # Available in Python 3 from tokenize import open as open_py_source except ImportError: # Copied from python3 tokenize from codecs import lookup, BOM_UTF8 import re from io import TextIOWrapper, open cookie_re = re.compile("coding[:=]\s*([-\w.]+)") def _get_normal_name(orig_enc): ...
bsd-3-clause
akaminsky/ghost_blog
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/style.py
270
3743
# -*- coding: utf-8 -*- """ pygments.style ~~~~~~~~~~~~~~ Basic style object. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.token import Token, STANDARD_TYPES class StyleMeta(type): def __new__(mcs, name, bases,...
mit
horczech/coala-bears
tests/coffee_script/CoffeeLintBearTest.py
21
9025
from bears.coffee_script.CoffeeLintBear import CoffeeLintBear from coalib.testing.LocalBearTestHelper import verify_local_bear good_file = """ # Lint your CoffeeScript! class Gangster wasItAGoodDay : () -> yes """ good_file_use_english_operator = """ 1 or 1 1 and 1 1 isnt 1 1 is 1 """ bad_file_use_english_...
agpl-3.0
tumbl3w33d/ansible
lib/ansible/modules/network/nxos/nxos_lldp_global.py
19
6889
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ############################################# # WARNING # ############################################# # # This file is au...
gpl-3.0
CivilHub/CivilHub
etherpad/models.py
3
5908
# -*- coding: utf-8 -*- from __future__ import unicode_literals from slugify import slugify from django.db import models from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.contrib...
gpl-3.0
MichaelAquilina/numpy
numpy/lib/npyio.py
42
71218
from __future__ import division, absolute_import, print_function import sys import os import re import itertools import warnings import weakref from operator import itemgetter import numpy as np from . import format from ._datasource import DataSource from numpy.core.multiarray import packbits, unpackbits from ._ioto...
bsd-3-clause
marcioweck/PSSLib
reference/deap/examples/ga/knapsack.py
12
3597
# This file is part of DEAP. # # DEAP 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 later version. # # DEAP is distributed ...
lgpl-3.0
mhugo/QGIS
python/plugins/processing/algs/grass7/ext/r_li_patchnum.py
45
1297
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_patchnum.py ---------------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr **************************...
gpl-2.0
danielreed/python-hpOneView
tests/unit/test_exception_handler.py
2
2381
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2016) Hewlett Packard Enterprise Development LP # # 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 limi...
mit
dagwieers/ansible
lib/ansible/modules/system/java_cert.py
19
13988
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, RSD Services S.A # 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
xxsergzzxx/python-for-android
python-modules/twisted/twisted/internet/_posixstdio.py
75
5599
# -*- test-case-name: twisted.test.test_stdio -*- """Standard input/out/err support. Future Plans:: support for stderr, perhaps Rewrite to use the reactor instead of an ad-hoc mechanism for connecting protocols to transport. Maintainer: James Y Knight """ import warnings, errno, os from zope.interf...
apache-2.0
mozilla/ichnaea
ichnaea/models/tests/test_observation.py
1
22477
import json from ichnaea.conftest import GB_LAT, GB_LON, GB_MCC from ichnaea.models import ( BlueObservation, BlueReport, CellObservation, CellReport, constants, Radio, Report, ReportSource, WifiObservation, WifiReport, ) from ichnaea.tests.factories import ( BlueObservation...
apache-2.0
MostafaGazar/tensorflow
tensorflow/models/embedding/word2vec_optimized.py
12
15453
# 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...
apache-2.0
itmoss/Libjingle
scons-local/scons-local-2.0.1/SCons/Scanner/Prog.py
61
3286
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # 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 li...
gpl-2.0
vovojh/gem5
ext/ply/test/yacc_nodoc.py
174
1506
# ----------------------------------------------------------------------------- # yacc_nodoc.py # # Rule with a missing doc-string # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex import tok...
bsd-3-clause
0x0all/kaggle-galaxies
predict_augmented_npy_maxout2048.py
8
9452
""" Load an analysis file and redo the predictions on the validation set / test set, this time with augmented data and averaging. Store them as numpy files. """ import numpy as np # import pandas as pd import theano import theano.tensor as T import layers import cc_layers import custom import load_data import realtime...
bsd-3-clause
tadgh/ArgoRevisit
third_party/nltk/tokenize/punkt.py
4
55796
# Natural Language Toolkit: Punkt sentence tokenizer # # Copyright (C) 2001-2011 NLTK Project # Algorithm: Kiss & Strunk (2006) # Author: Willy <willy@csse.unimelb.edu.au> (original Python port) # Steven Bird <sb@csse.unimelb.edu.au> (additions) # Edward Loper <edloper@gradient.cis.upenn.edu> (rewrite) ...
apache-2.0
DonLuc/Atajo-TD
provider/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
2736
6387
# 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. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml #-------------------------------------------------------------------...
apache-2.0
HHS/CoECI-CMS-Healthcare-Fraud-Prevention
study/mockserver/hfppnetwork/sms/tests.py
3
5637
from django.test import TestCase from hfppnetwork.sms.models import Partner from django.http.response import HttpResponseRedirect from django.contrib.auth.models import User # Create your tests here. def test_data_create(request): if not isinstance(request.user, User): return HttpResponseRedirect('/login/'...
apache-2.0
spektom/incubator-airflow
airflow/jobs/scheduler_job.py
2
68475
# # 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
fivejjs/AD3
python/example.py
3
2817
import matplotlib.pyplot as plt import numpy as np from ad3 import simple_grid, general_graph def example_binary(): # generate trivial data x = np.ones((10, 10)) x[:, 5:] = -1 x_noisy = x + np.random.normal(0, 0.8, size=x.shape) x_thresh = x_noisy > .0 # create unaries unaries = x_noisy ...
lgpl-3.0
kif/freesas
e2etest/e2etest_bift.py
1
10320
"""End to end tests for auto_gpa.py """ __authors__ = ["Martha Brennich"] __license__ = "MIT" __date__ = "27/12/2020" import unittest import pathlib import logging from platform import system from subprocess import run, PIPE, STDOUT from os import linesep from os.path import normpath import codecs import parse from n...
mit
SYSUNLP/DeepLearningTutorials
code/rnnslu.py
30
13374
from collections import OrderedDict import copy import cPickle import gzip import os import urllib import random import stat import subprocess import sys import timeit import numpy import theano from theano import tensor as T # Otherwise the deepcopy fails import sys sys.setrecursionlimit(1500) PREFIX = os.getenv( ...
bsd-3-clause
kutenai/django
django/core/management/commands/diffsettings.py
63
1573
from django.core.management.base import BaseCommand def module_to_dict(module, omittable=lambda k: k.startswith('_')): """Converts a module namespace to a Python dictionary.""" return {k: repr(v) for k, v in module.__dict__.items() if not omittable(k)} class Command(BaseCommand): help = """Displays diff...
bsd-3-clause
bregman-arie/ansible
lib/ansible/plugins/terminal/asa.py
52
2414
# # (c) 2016 Red Hat Inc. # # 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 d...
gpl-3.0
shakamunyi/sahara
sahara/tests/unit/plugins/spark/test_plugin.py
1
8592
# Copyright (c) 2013 Mirantis 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 writ...
apache-2.0
abacuspix/NFV_project
Mastering Flask_Code Bundle/Chapter_13/webapp/config.py
2
1720
import tempfile from celery.schedules import crontab class Config(object): SECRET_KEY = '736670cb10a600b695a55839ca3a5aa54a7d7356cdef815d2ad6e19a2031182b' RECAPTCHA_PUBLIC_KEY = "6LdKkQQTAAAAAEH0GFj7NLg5tGicaoOus7G9Q5Uw" RECAPTCHA_PRIVATE_KEY = '6LdKkQQTAAAAAMYroksPTJ7pWhobYb88fTAcxcYn' CELERYBEAT_SC...
mit
Frojd/Fabrik
fabrik/cli/scripts/init.py
2
1198
import click from fabrik.cli import generator from fabrik.utils import gitext @click.command() @click.option("--stages", default="stage,prod") @click.option("--path", default="./") @click.option("--copy_method", default="scp") @click.option("--recipe", default=False) def main(stages, path, copy_method, recipe): ...
mit
emawind84/readthedocs.org
readthedocs/search/lib.py
27
2982
from readthedocs.builds.constants import LATEST from .indexes import ProjectIndex, PageIndex from readthedocs.search.signals import before_project_search, before_file_search def search_project(request, query, language): body = { "query": { "bool": { "should": [ ...
mit
quinox/weblate
weblate/trans/models/subproject.py
1
51530
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.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 # the Free Software Foundation, eithe...
gpl-3.0
wesokes/django-manager-utils
manager_utils/tests/manager_utils_tests.py
2
97585
import datetime as dt from django.test import TestCase from django_dynamic_fixture import G import freezegun from manager_utils import post_bulk_operation from manager_utils.manager_utils import _get_prepped_model_field from mock import patch from parameterized import parameterized from pytz import timezone from mana...
mit
a-doumoulakis/tensorflow
tensorflow/contrib/text/python/ops/skip_gram_ops_test.py
50
23107
# 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
sniperyen/whenwillyoucallme
demo_bootstrap/forms.py
2
1636
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.forms.formsets import BaseFormSet, formset_factory from Lib.bootstrap3.tests import TestForm RADIO_CHOICES = ( ('1', 'Radio 1'), ('2', 'Radio 2'), ) MEDIA_CHOICES = ( ('Audio', ( ('vinyl', 'Viny...
apache-2.0
mbernasocchi/QGIS
python/plugins/processing/algs/qgis/PointsDisplacement.py
30
7999
# -*- coding: utf-8 -*- """ *************************************************************************** PointsDisplacement.py --------------------- Date : July 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com *********...
gpl-2.0
LuqueDaniel/ninja-ide
ninja_ide/tools/runner.py
11
1392
# -*- coding: utf-8 -*- # # This file is part of NINJA-IDE (http://ninja-ide.org). # # NINJA-IDE 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 # any later version. # # NIN...
gpl-3.0
zseder/hunmisc
hunmisc/utils/plotting/matplotlib_simple_xy.py
1
1535
""" Copyright 2011-13 Attila Zseder Email: zseder@gmail.com This file is part of hunmisc project url: https://github.com/zseder/hunmisc hunmisc 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 versi...
gpl-3.0
fritsvanveen/QGIS
python/plugins/processing/algs/qgis/Polygonize.py
5
4770
# -*- coding: utf-8 -*- """ *************************************************************************** Polygonize.py --------------------- Date : March 2013 Copyright : (C) 2013 by Piotr Pociask Email : ppociask at o2 dot pl *******************************...
gpl-2.0
liyongyue/dnsspider
build/lib/dns/rdtypes/IN/AAAA.py
2
2291
# Copyright (C) 2003-2005 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND ...
isc
bdrung/audacity
lib-src/lv2/sord/waflib/Tools/c_config.py
177
22817
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,re,shlex,sys from waflib import Build,Utils,Task,Options,Logs,Errors,ConfigSet,Runner from waflib.TaskGen import after_method,feature from waflib.Configure import co...
gpl-2.0
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/backup/custom_common.py
2
10039
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
brockwhittaker/zulip
analytics/management/commands/analyze_user_activity.py
2
2532
from typing import Any, Dict from zerver.lib.statistics import seconds_usage_between from django.core.management.base import BaseCommand, CommandParser from zerver.models import UserProfile import datetime from django.utils.timezone import utc def analyze_activity(options): # type: (Dict[str, Any]) -> None d...
apache-2.0
pepeportela/edx-platform
openedx/core/djangoapps/bookmarks/serializers.py
24
2093
""" Serializers for Bookmarks. """ from rest_framework import serializers from openedx.core.lib.api.serializers import CourseKeyField, UsageKeyField from . import DEFAULT_FIELDS from .models import Bookmark class BookmarkSerializer(serializers.ModelSerializer): """ Serializer for the Bookmark model. """...
agpl-3.0
revarbat/snappy-reprap
stl_normalize.py
1
15920
#!/usr/bin/env python import os import os.path import sys import math import time import struct import argparse import platform import itertools import subprocess guiscad_template = """\ module showlines(clr, lines) {{ for (line = lines) {{ delta = line[1]-line[0]; dist = norm(delta); the...
gpl-2.0
olivierdalang/stdm
ui/ui_survey.py
1
4260
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui_survey.ui' # # Created: Wed Apr 29 17:42:49 2015 # by: PyQt4 UI code generator 4.11.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8...
gpl-2.0
dgies/incubator-airflow
airflow/example_dags/example_short_circuit_operator.py
44
1400
# -*- coding: utf-8 -*- # # 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 ...
apache-2.0
elvishknight1/Terranova
venv/Lib/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py
2931
2318
######################## 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...
artistic-2.0
qedsoftware/commcare-hq
corehq/apps/users/tests/test_get_owner_ids.py
1
1346
from django.test import TestCase from corehq.apps.domain.models import Domain from corehq.apps.groups.models import Group from corehq.apps.users.models import CommCareUser class OwnerIDTestCase(TestCase): @staticmethod def _mock_user(id): class FakeUser(CommCareUser): @property ...
bsd-3-clause
sffjunkie/home-assistant
homeassistant/components/media_player/__init__.py
1
19925
""" Component to interface with various media players. For more details about this component, please refer to the documentation at https://home-assistant.io/components/media_player/ """ import logging import os import voluptuous as vol from homeassistant.components import discovery from homeassistant.config import l...
mit
cs591B1-Project/Social-Media-Impact-on-Stock-Market-and-Price
data/07 exxon/dataAnalysis.py
26
6163
import numpy from numpy import * from operator import truediv from ast import literal_eval import matplotlib.pyplot as plt import statsmodels.tsa.stattools as st import scipy.stats as scit def calCorrelation(s,v): # STEP 1: Read all data files p = [line.rstrip('\n') for line in open("positive.txt")] n = [line.rs...
mit
azumimuo/family-xbmc-addon
script.module.youtube.dl/lib/youtube_dl/extractor/byutv.py
35
3100
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class BYUtvIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?byutv\.org/watch/(?!event/)(?P<id>[0-9a-f-]+)(?:/(?P<display_id>[^/?#&]+))?' _TESTS = [{ 'url': 'http://www.byutv.org...
gpl-2.0
jtyuan/racetrack
src/dev/arm/RealView.py
2
21706
# Copyright (c) 2009-2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
bsd-3-clause
devurandom/portage
pym/_emerge/PollScheduler.py
1
7723
# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import gzip import errno try: import threading except ImportError: import dummy_threading as threading from portage import _encodings from portage import _unicode_encode from portage.util import writemsg_leve...
gpl-2.0
jeezybrick/django
tests/forms_tests/widget_tests/test_selectmultiple.py
145
4951
from django.forms import SelectMultiple from .base import WidgetTest class SelectMultipleTest(WidgetTest): widget = SelectMultiple() numeric_choices = (('0', '0'), ('1', '1'), ('2', '2'), ('3', '3'), ('0', 'extra')) def test_render_selected(self): self.check_html(self.widget, 'beatles', ['J'], c...
bsd-3-clause
typesupply/defcon
documentation/source/conf.py
1
6011
# -*- coding: utf-8 -*- # # defcon documentation build configuration file, created by # sphinx-quickstart on Sun Jan 11 12:32:49 2009. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleab...
mit
churchlab/millstone
genome_designer/pipeline/read_alignment_util.py
1
5281
""" Methods related to aligning reads. This module was created because of a circular import issue with celery. ... File "/home/glebk/Projects/churchlab/genome-designer-v2/genome_designer/pipeline/read_alignment.py", line 9, in <module> from main.models import clean_filesystem_location File "/home/glebk/Proje...
mit
jody-frankowski/ansible
lib/ansible/errors.py
46
1194
# (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...
gpl-3.0
Gulyuk/alcatel_move_kernel
tools/perf/scripts/python/syscall-counts-by-pid.py
944
1744
# 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 system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(...
gpl-2.0
xNovax/SickRage
sickbeard/providers/hdtorrents.py
2
11502
# Author: Idan Gutman # Modified by jkaberg, https://github.com/jkaberg for SceneAccess # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 Sof...
gpl-3.0
klahnakoski/MySQL-to-S3
vendor/jx_python/__init__.py
1
3013
# encoding: utf-8 # # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import unicode_literals from c...
mpl-2.0
SnappleCap/oh-mainline
vendor/packages/gdata/src/gdata/webmastertools/data.py
126
5504
#!/usr/bin/python # # Copyright (C) 2009 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 ...
agpl-3.0
fivejjs/crosscat
crosscat/cython_code/test_pred_prob_and_density.py
1
3579
# # Copyright (c) 2010-2014, MIT Probabilistic Computing Project # # Lead Developers: Dan Lovell and Jay Baxter # Authors: Dan Lovell, Baxter Eaves, Jay Baxter, Vikash Mansinghka # Research Leads: Vikash Mansinghka, Patrick Shafto # # Licensed under the Apache License, Version 2.0 (the "License"); # you may...
apache-2.0
yanheven/horizon
openstack_dashboard/test/integration_tests/tests/test_user_settings.py
37
2540
# 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
campbe13/openhatch
vendor/packages/Jinja2/jinja2/testsuite/ext.py
402
18086
# -*- coding: utf-8 -*- """ jinja2.testsuite.ext ~~~~~~~~~~~~~~~~~~~~ Tests for the extensions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Environment, DictLoader...
agpl-3.0
acercado/jd-ph-cms
jd-ph-cms/notifications/migrations/0001_initial.py
1
2228
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-02-04 05:22 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migration...
bsd-3-clause
printedheart/h2o-3
py2/h2o_methods.py
19
16873
# some methods should use 'put' instead of 'get' # some seem to require 'delete' now? # use the right (latest) version of this: # http://s3.amazonaws.com/h2o-release/h2o-dev/master/1019/docs-website/REST/endpoints/markdown/toc.md import os, sys, time, requests, zipfile, StringIO, re import h2o_args # from h2o_cmd imp...
apache-2.0
msiedlarek/grpc
src/python/grpcio/grpc/framework/interfaces/face/face.py
2
37610
# Copyright 2015-2016, 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 ...
bsd-3-clause
rversteegen/commandergenius
project/jni/python/src/Lib/plat-irix6/jpeg.py
66
3661
# Implement 'jpeg' interface using SGI's compression library # XXX Options 'smooth' and 'optimize' are ignored. # XXX It appears that compressing grayscale images doesn't work right; # XXX the resulting file causes weirdness. from warnings import warnpy3k warnpy3k("the jpeg module has been removed in Python 3.0", sta...
lgpl-2.1
noroutine/ansible
lib/ansible/executor/play_iterator.py
7
27119
# (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...
gpl-3.0
dippatel1994/oppia
core/controllers/home.py
16
7770
# 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 required by applicable ...
apache-2.0
cylc/cylc
cylc/flow/task_pool.py
1
59064
# THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # 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 3 of the License,...
gpl-3.0
tiborsimko/invenio-accounts
invenio_accounts/models.py
3
4744
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Database models for accounts.""" from __future__ import absolute_import, print_fu...
mit
swift-nav/peregrine
tests/test_iqgen_gen_main.py
2
3097
# Copyright (C) 2016 Swift Navigation Inc. # # Contact: Valeri Atamaniouk <valeri@swiftnav.com> # This source is subject to the license found in the file 'LICENSE' which must # be be distributed together with this source. All other rights reserved. # # THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF A...
gpl-3.0
SUSE/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/vpn_client_parameters.py
2
2569
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
pastewka/lammps
lib/gpu/Install.py
5
5125
#!/usr/bin/env python """ Install.py tool to build the GPU library used to automate the steps described in the README file in this dir """ from __future__ import print_function import sys, os, subprocess, shutil from argparse import ArgumentParser sys.path.append('..') from install_helpers import get_cpus parser = ...
gpl-2.0
sadmansk/servo
tests/wpt/web-platform-tests/tools/wpt/install.py
1
3192
import argparse import browser import sys latest_channels = { 'firefox': 'nightly', 'chrome': 'dev', 'safari': 'preview', 'safari_webdriver': 'preview', 'servo': 'nightly' } channel_by_name = { 'stable': 'stable', 'release': 'stable', 'beta': 'beta', 'nightly': latest_channels, ...
mpl-2.0
yavuzovski/playground
python/django/RESTTest/.venv/lib/python3.4/site-packages/django/contrib/redirects/migrations/0001_initial.py
308
1561
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.CreateModel( name='Redirect', fields=[ ...
gpl-3.0