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 |
|---|---|---|---|---|---|
mhvk/astropy | astropy/stats/lombscargle/__init__.py | 12 | 1287 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# The LombScargle periodogram functionality has been moved to
# astropy.timeseries.periodograms.bls. The purpose of this file is to provide backward-
# compatibility during a transition phase. We can't emit a deprecation warning
# simply on import of this... | bsd-3-clause |
PolygonalTree/Led-control | led-control/src/model.py | 1 | 1755 | """
Copyright (C) 2014 Luis Garcia Rodriguez
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, or
(at your option) any later version.
This program is distribut... | agpl-3.0 |
AnhellO/DAS_Sistemas | Ago-Dic-2017/Enrique Castillo/Ordinario/test/Lib/site-packages/django/conf/locale/az/formats.py | 65 | 1189 | # 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 = 'j E Y'
TIME_FORMAT = 'G:i'
DATETIME_FORMAT = 'j E Y, G:i'
YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT... | mit |
third/Blink-LED | node_modules/johnny-five/junk/firmata-latest/node_modules/serialport/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/xcode.py | 42 | 53501 | # 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.
import filecmp
import gyp.common
import gyp.xcodeproj_file
import errno
import os
import posixpath
import re
import shutil
import subprocess
import tempfile
# Pr... | mit |
wummel/dosage | dosagelib/plugins/e.py | 2 | 9655 | # -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
from re import compile, escape, IGNORECASE
from ..helpers import indirectStarter
from ..scraper import _BasicScraper, _ParserScraper
from ..util import tagre
class EarthsongSaga(... | mit |
Zord13appdesa/python-for-android | python3-alpha/extra_modules/bs4/tests/test_lxml.py | 46 | 1772 | """Tests to ensure that the lxml tree builder generates good trees."""
import re
import warnings
try:
from bs4.builder import LXMLTreeBuilder, LXMLTreeBuilderForXML
LXML_PRESENT = True
except ImportError as e:
LXML_PRESENT = False
from bs4 import (
BeautifulSoup,
BeautifulStoneSoup,
)
from bs... | apache-2.0 |
Minjung/pysap | examples/ms_dump_info.py | 3 | 4278 | #!/usr/bin/env python
# ===========
# pysap - Python library for crafting SAP's network protocols packets
#
# Copyright (C) 2015 by Martin Gallo, Core Security
#
# The library was designed and developed by Martin Gallo from the Security
# Consulting Services team of Core Security.
#
# This program is free software; you... | gpl-2.0 |
ppwwyyxx/tensorflow | tensorflow/python/framework/func_graph.py | 3 | 53332 | # Copyright 2018 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 |
meteo-ubonn/meanie3D | gtest-1.7.0/scripts/gen_gtest_pred_impl.py | 2538 | 21986 | #!/usr/bin/env python
#
# Copyright 2006, 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... | mit |
GinnyN/Team-Fortress-RPG-Generators | django/conf/locale/ko/formats.py | 313 | 2016 | # -*- 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 = 'Y년 n월 j일'
TIME_FORMAT = 'A g:i:s'
DATETIME_FORMAT = 'Y년 n월 j일 g:i:s A'
YE... | bsd-3-clause |
gdujany/pyManet | manet.py | 1 | 22418 | #!/usr/bin/env python
'''
MANET (MANchester Energy Test)
python version based on numpy
To see example of usage try ./manet.py -h
'''
import numpy as np
import time
def gaussian(r2, sigma=10.0):
'''
N.B. the first argument is not the distance but already its square!
'''
tmp = np.exp(- 0.5 * r2 / sigm... | mit |
jougs/nest-simulator | pynest/nest/logic/hl_api_logic.py | 20 | 1815 | # -*- coding: utf-8 -*-
#
# hl_api_logic.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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, o... | gpl-2.0 |
hofschroeer/gnuradio | grc/core/Messages.py | 4 | 3689 | # Copyright 2007, 2015 Free Software Foundation, Inc.
# This file is part of GNU Radio
#
# GNU Radio Companion 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 opt... | gpl-3.0 |
annarev/tensorflow | tensorflow/python/keras/optimizer_v2/adagrad.py | 2 | 6458 | # Copyright 2018 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 |
joshuawilson/merrit | tools/js/download_bower.py | 3 | 3822 | #!/usr/bin/env python
# Copyright (C) 2015 The Android Open Source Project
#
# 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 b... | apache-2.0 |
zacps/zulip | zerver/lib/webhooks/git.py | 16 | 5527 | from typing import Optional, Any, Text
SUBJECT_WITH_BRANCH_TEMPLATE = u'{repo} / {branch}'
SUBJECT_WITH_PR_OR_ISSUE_INFO_TEMPLATE = u'{repo} / {type} #{id} {title}'
EMPTY_SHA = '0000000000000000000000000000000000000000'
COMMITS_LIMIT = 10
COMMIT_ROW_TEMPLATE = u'* [{commit_short_sha}]({commit_url}): {commit_msg}\n'
... | apache-2.0 |
ypid/series60-remote | pc/ui/ui_messageQueue.py | 1 | 3226 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/src/messageQueue.ui'
#
# Created: Wed Nov 17 12:05:52 2010
# by: PyQt4 UI code generator 4.7.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_MessageQueue(object):
def setupUi(... | gpl-2.0 |
junhuac/MQUIC | depot_tools/external_bin/gsutil/gsutil_4.15/gsutil/third_party/protorpc/protorpc/protojson.py | 24 | 10933 | #!/usr/bin/env python
#
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | mit |
gifford-lab/GERV | kmm/cpplint.py | 17 | 235105 | #!/usr/bin/python
#
# Copyright (c) 2009 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 ... | apache-2.0 |
alexryndin/ambari | ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py | 2 | 10606 | #!/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License");... | apache-2.0 |
AltSchool/django | django/contrib/sites/models.py | 33 | 3883 | from __future__ import unicode_literals
import string
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.db import models
from django.db.models.signals import pre_delete, pre_save
from django.http.request import split_domain_port
from django.utils.encoding import python_2_unicode_com... | bsd-3-clause |
mizhgun/HTResearch | HTResearch/Utilities/encoder.py | 1 | 2087 | #
# encoder.py
# A module with encoders to encode Python objects into various forms.
#
import json
from datetime import datetime
from mongoengine.fields import ObjectId
class MongoJSONEncoder(json.JSONEncoder):
"""An encoder to represent Mongo-backed Python objects as JSON."""
defined_types = (dict, list, tu... | gpl-3.0 |
CristianBB/SickRage | tests/xem_tests.py | 3 | 3508 | # coding=UTF-8
# Author: Dennis Lutter <lad1337@gmail.com>
# 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 Software Foundation, either vers... | gpl-3.0 |
vicky2135/lucious | oscar/lib/python2.7/site-packages/phonenumber_field/tests.py | 2 | 7428 | # -*- coding: utf-8 -*-
import phonenumbers
from django.conf import settings
from django.db import models
from django.test.testcases import TestCase
from phonenumbers import phonenumberutil
from phonenumber_field.modelfields import PhoneNumberField
from phonenumber_field.phonenumber import PhoneNumber, to_python
fro... | bsd-3-clause |
Project-EPIC/crowdrouter | example/without_cr_example.py | 1 | 16954 | import os, sys
from flask import Flask, render_template, request, Response, session, redirect, flash
from functools import wraps
from TwitterSearch import *
import ipdb, datetime, random, json
app = Flask(__name__)
app.secret_key = 'some_secret'
RESULTS_FILE = "results.json"
@app.route("/")
def home():
return ren... | mit |
pcm17/tensorflow | tensorflow/contrib/slim/python/slim/data/tfexample_decoder.py | 16 | 15000 | # 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 |
adamnovak/schemas | tests/test_protocol.py | 15 | 1812 | """
Runs tests that ensure protocol invariants
TODO add other tests including:
- some CI on postSignatures
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
import avro.schema
import compile_schemas
class TestValidateSchemas(unittest.... | apache-2.0 |
apache/ignite | modules/ducktests/tests/checks/utils/check_get_ssl_params_from_globals.py | 3 | 5355 | # 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 |
efajardo/osg-test | osgtest/tests/test_180_cvmfs.py | 1 | 2612 | import osgtest.library.core as core
import osgtest.library.files as files
import osgtest.library.osgunittest as osgunittest
class TestStartCvmfs(osgunittest.OSGTestCase):
def setup_fuse(self):
fuse_conf_path='/etc/fuse.conf'
files.preserve(fuse_conf_path, 'cvmfs')
try:
contents... | apache-2.0 |
stewartmiles/flatbuffers | tests/MyGame/Example/Stat.py | 6 | 1698 | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: Example
import flatbuffers
class Stat(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsStat(cls, buf, offset):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Stat()
x... | apache-2.0 |
eugene1g/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/prettypatch.py | 140 | 2966 | # Copyright (c) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause |
Coburn37/three.js | utils/exporters/blender/addons/io_three/exporter/material.py | 70 | 3806 | from .. import constants, logger
from . import base_classes, utilities, api
class Material(base_classes.BaseNode):
"""Class that wraps material nodes"""
def __init__(self, node, parent):
logger.debug("Material().__init__(%s)", node)
base_classes.BaseNode.__init__(self, node, parent,
... | mit |
ViennaRNA/forgi | forgi/threedee/utilities/modified_res_lookup.py | 1 | 98318 | # Created by `python forgi/threedee/utilities/modified_res.py 165D.pdb 1A9N.pdb 1AV6.pdb 1B23.pdb 1B2M.pdb 1B7F.pdb 1BMV.pdb 1BR3.pdb 1C9S.pdb 1CSL.pdb 1CVJ.pdb 1CWP.pdb 1D4R.pdb 1DDL.pdb 1DFU.pdb 1DI2.pdb 1DQF.pdb 1DQH.pdb 1DUH.pdb 1DUQ.pdb 1E7K.pdb 1E8O.pdb 1E8S.pdb 1EC6.pdb 1EFO.pdb 1EFW.pdb 1EGK.pdb 1ET4.pdb 1F1T.p... | gpl-3.0 |
niksolaz/GeoJS | venv/lib/python2.7/site-packages/setuptools/tests/test_egg_info.py | 148 | 2744 | import os
import stat
import pytest
from . import environment
from .textwrap import DALS
from . import contexts
class TestEggInfo:
setup_script = DALS("""
from setuptools import setup
setup(
name='foo',
py_modules=['hello'],
entry_points={'console_scripts': ... | mit |
daviddao/spatial-transformer-tensorflow | spatial_transformer.py | 1 | 7915 | # 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... | mit |
AladdinSonni/youtube-dl | youtube_dl/extractor/techtalks.py | 170 | 2432 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
get_element_by_attribute,
clean_html,
)
class TechTalksIE(InfoExtractor):
_VALID_URL = r'https?://techtalks\.tv/talks/[^/]*/(?P<id>\d+)/'
_TEST = {
'url': 'http://techtalks.tv/talks/lea... | unlicense |
eatbyte/depot_tools | third_party/coverage/backward.py | 211 | 5187 | """Add things to old Pythons so I can pretend they are newer."""
# This file does lots of tricky stuff, so disable a bunch of lintisms.
# pylint: disable=F0401,W0611,W0622
# F0401: Unable to import blah
# W0611: Unused import blah
# W0622: Redefining built-in blah
import os, re, sys
# Python 2.3 doesn't have `set`
t... | bsd-3-clause |
debian-live/live-magic | tests/test_folder_of_files.py | 1 | 6541 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# live-magic - GUI frontend to create Debian LiveCDs, etc.
# Copyright (C) 2007-2010 Chris Lamb <lamby@debian.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
# t... | gpl-3.0 |
arifsetiawan/edx-platform | lms/djangoapps/courseware/model_data.py | 16 | 35832 | """
Classes to provide the LMS runtime data storage to XBlocks.
:class:`DjangoKeyValueStore`: An XBlock :class:`~KeyValueStore` which
stores a subset of xblocks scopes as Django ORM objects. It wraps
:class:`~FieldDataCache` to provide an XBlock-friendly interface.
:class:`FieldDataCache`: A object which pro... | agpl-3.0 |
pmacosta/peng | tests/test_ptypes.py | 1 | 8223 | # test_ptypes.py
# Copyright (c) 2013-2019 Pablo Acosta-Serafini
# See LICENSE for details
# pylint: disable=C0103,C0111,W0108
# PyPI imports
import numpy as np
from pmisc import AE
# Intra-package imports
import peng.ptypes
###
# Global variables
###
emsg = lambda msg: (
"[START CONTRACT MSG: {0}]Argument `*[a... | mit |
bright-sparks/chromium-spacewalk | third_party/cython/src/Cython/Compiler/CodeGeneration.py | 99 | 1097 | from Cython.Compiler.Visitor import VisitorTransform
from Cython.Compiler.Nodes import StatListNode
class ExtractPxdCode(VisitorTransform):
"""
Finds nodes in a pxd file that should generate code, and
returns them in a StatListNode.
The result is a tuple (StatListNode, ModuleScope), i.e.
everythin... | bsd-3-clause |
orlov-vo/mtasa | vendor/google-breakpad/src/tools/python/tests/filter_syms_unittest.py | 100 | 4454 | #!/usr/bin/env python
# Copyright (c) 2012 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 lis... | gpl-3.0 |
Donkyhotay/MoonPy | twisted/python/win32.py | 2 | 5207 | # Copyright (c) 2001-2007 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Win32 utilities.
See also twisted.python.shortcut.
"""
import re
import exceptions
import os
try:
import win32api
import win32con
except ImportError:
pass
from twisted.python.runtime import platform
# http://msdn.mic... | gpl-3.0 |
adwiputra/LUMENS-repo | processing/core/Processing.py | 2 | 13336 | # -*- coding: utf-8 -*-
"""
***************************************************************************
Processing.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
****************************... | gpl-2.0 |
cgqyh/pyalgotrade-mod | pyalgotrade/marketsession.py | 2 | 2248 | # PyAlgoTrade
#
# Copyright 2011-2015 Gabriel Martin Becedillas Ruiz
#
# 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 ap... | apache-2.0 |
ujenmr/ansible | lib/ansible/plugins/doc_fragments/default_callback.py | 5 | 1642 | # -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
DOCUMENTATION = r'''
options:
display_skipped_hosts:
name: Show skipped hosts
description: "Toggl... | gpl-3.0 |
nhumrich/compose | tests/integration/project_test.py | 6 | 14721 | from __future__ import unicode_literals
from .testcases import DockerClientTestCase
from compose import config
from compose.const import LABEL_PROJECT
from compose.container import Container
from compose.project import Project
def build_service_dicts(service_config):
return config.load(config.ConfigDetails(servi... | apache-2.0 |
Jorge-Rodriguez/ansible | lib/ansible/plugins/action/net_static_route.py | 756 | 1058 | # (c) 2017, Ansible 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 di... | gpl-3.0 |
mathkid95/linux_samsung_ics | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
alanquillin/quark | quark/drivers/nvp_driver.py | 1 | 36558 | # Copyright 2013 Openstack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
John-Boik/Principled-Societies-Project | leddaApp/static/brython/src/Lib/test/sortperf.py | 32 | 4806 | """Sort performance test.
See main() for command line syntax.
See tabulate() for output format.
"""
import sys
import time
import random
import marshal
import tempfile
import os
td = tempfile.gettempdir()
def randfloats(n):
"""Return a list of n random floats in [0, 1)."""
# Generating floats is expensive,... | gpl-3.0 |
jbtule/keyczar-dev | cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Tool/dmd.py | 19 | 8603 | """SCons.Tool.dmd
Tool-specific initialization for the Digital Mars D compiler.
(http://digitalmars.com/d)
Coded by Andy Friesen (andy@ikagames.com)
15 November 2003
There are a number of problems with this script at this point in time.
The one that irritates me the most is the Windows linker setup. The D
linker do... | apache-2.0 |
numenta/htmresearch | projects/l2_pooling/plot_capacity_result.py | 7 | 5539 | import os
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import pandas as pd
from capacity_test import _prepareResultsDir, plotResults
from capacity_test import DEFAULT_RESULT_DIR_NAME, DEFAULT_PLOT_DIR_NAME
plt.ion()
if __name__ == "__main__":
numCorticalColumns = 1
confusionThreshold = 30
... | agpl-3.0 |
alejandrogallo/dotfiles | link_config/ranger/commands.py | 1 | 38023 | # -*- coding: utf-8 -*-
# Documentation {{{1 #
########################
# Copyright (C) 2009-2013 Roman Zimbelmann <hut@lavabit.com>
# This configuration file is licensed under the same terms as ranger.
# ===================================================================
# This file contains ranger's commands.
# ... | unlicense |
fahhem/mbed-os | tools/host_tests/host_tests_plugins/host_test_plugins.py | 92 | 4881 | """
mbed SDK
Copyright (c) 2011-2013 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 wr... | apache-2.0 |
leansoft/edx-platform | lms/djangoapps/courseware/features/conditional.py | 102 | 4723 | # pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
from lettuce import world, steps
from nose.tools import assert_in, assert_true # pylint: disable=no-name-in-module
from common import i_am_registered_for_the_course, visit_scenario_item
from problems_setup import add_problem_to_course, answer... | agpl-3.0 |
jobiols/odoomrp-wip | sale_order_line_view/__openerp__.py | 16 | 1623 | # -*- encoding: utf-8 -*-
##############################################################################
#
# 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... | agpl-3.0 |
kxliugang/edx-platform | cms/djangoapps/contentstore/course_info_model.py | 112 | 6790 | """
Views for viewing, adding, updating and deleting course updates.
Current db representation:
{
"_id" : locationjson,
"definition" : {
"data" : "<ol>[<li><h2>date</h2>content</li>]</ol>"},
"items" : [{"id": ID, "date": DATE, "content": CONTENT}]
"metadata" : ignored
}
}
"""
impor... | agpl-3.0 |
Rademade/taiga-back | tests/integration/test_watch_wikipages.py | 3 | 4327 | # Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# Copyright (C) 2014-2016 Anler Hernández <hello@anler.me>
# This ... | agpl-3.0 |
eeshangarg/oh-mainline | vendor/packages/gdata/tests/gdata_tests/health/service_test.py | 127 | 8108 | #!/usr/bin/python
#
# Copyright 2009 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 b... | agpl-3.0 |
joerg-lehmann/PyTone | src/pytonectl.py | 1 | 7282 | #!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
# Copyright (C) 2003, 2004, 2007, 2019 Jörg Lehmann <joerg@luga.de>
#
# This file is part of PyTone (http://www.luga.de/pytone/)
#
# PyTone is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# as pu... | gpl-2.0 |
ibethune/lammps | python/examples/pizza/pdbfile.py | 22 | 9627 | # Pizza.py toolkit, www.cs.sandia.gov/~sjplimp/pizza.html
# Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
#
# Copyright (2005) Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
# certain rights in this software. This software is... | gpl-2.0 |
p4datasystems/CarnotKE | jyhton/lib-python/2.7/plat-irix5/AL.py | 132 | 1593 | from warnings import warnpy3k
warnpy3k("the AL module has been removed in Python 3.0", stacklevel=2)
del warnpy3k
RATE_48000 = 48000
RATE_44100 = 44100
RATE_32000 = 32000
RATE_22050 = 22050
RATE_16000 = 16000
RATE_11025 = 11025
RATE_8000 = 8000
SAMPFMT_TWOSCOMP= 1
SAMPFMT_FLOAT =... | apache-2.0 |
sarchar/pyspv | examples/anyonecanpay-new.py | 1 | 1033 | import pyspv
import sys
import traceback
def main():
simple_wallet = __import__('simple-wallet')
# We need a wallet, but don't need a network. Set peer_goal to 0
spv = pyspv.pyspv('pyspv-simple-wallet', logging_level=pyspv.INFO, peer_goal=0, listen=None)
tx = pyspv.transaction.Transaction(spv.coin)
... | mit |
quru/rvsr | networkx/classes/graph.py | 9 | 53970 | """Base class for undirected graphs.
The Graph class allows any hashable object as a node
and can associate key/value attribute pairs with each undirected edge.
Self-loops are allowed but multiple edges are not (see MultiGraph).
For directed graphs see DiGraph and MultiDiGraph.
"""
# Copyright (C) 2004-2011 by
# ... | mpl-2.0 |
dushu1203/chromium.src | tools/telemetry/telemetry/image_processing/screen_finder.py | 15 | 34484 | #!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# This script attempts to detect the region of a camera's field of view that
# contains the screen of the device we are testing.
#
# U... | bsd-3-clause |
keo/bitcoin | qa/rpc-tests/txn_doublespend.py | 2 | 6583 | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test proper accounting with a double-spend conflict
#
from test_framework.test_framework import Bitc... | mit |
GoogleCloudPlatform/microservices-demo | src/emailservice/demo_pb2_grpc.py | 5 | 16735 | #!/usr/bin/python
#
# Copyright 2018 Google LLC
#
# 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 ag... | apache-2.0 |
devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/workbench/views.py | 7 | 5196 | """Django views implementing the XBlock workbench.
This code is in the Workbench layer.
"""
import json
import logging
import mimetypes
from StringIO import StringIO
from django.http import HttpResponse, Http404
from django.shortcuts import redirect, render_to_response
from django.views.decorators.csrf import csrf_... | agpl-3.0 |
pxzhang94/GAN | GAN/vanilla_gan/gan_tensorflow.py | 1 | 3411 | import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import os
def xavier_init(size):
in_dim = size[0]
xavier_stddev = 1. / tf.sqrt(in_dim / 2.)
return tf.random_normal(shape=size, stdde... | apache-2.0 |
PongPi/isl-odoo | addons/board/__init__.py | 439 | 1144 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you ca... | agpl-3.0 |
tbaigner/wb_contest_submission_server | services/web-dev/app/text_contents.py | 1 | 1776 | flash_categories = {'success': 'success',
'info': 'info',
'warning': 'warning',
'danger': 'danger'}
flash_texts_and_categories = {'BAD_USERNAME_OR_PWD': ('Bad username or password', flash_categories['danger']),
'WELCOME_BACK': ('... | gpl-3.0 |
maas/maas | src/provisioningserver/dns/commands/tests/test_edit_named_options.py | 1 | 5528 | # Copyright 2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for the edit_named_options command."""
from argparse import ArgumentParser
import io
import os
import shutil
import textwrap
from testtools.matchers import Contains, Fi... | agpl-3.0 |
mirnylab/cooler | tests/test_core.py | 1 | 9935 | from __future__ import division, print_function
from io import BytesIO
from scipy import sparse
import numpy as np
import pandas as pd
import h5py
import pytest
from cooler import core
def make_hdf5_table(mode):
s = BytesIO()
f = h5py.File(s, mode)
h5opts = dict(compression='gzip', compression_opts=6, ma... | bsd-3-clause |
jkankiewicz/kivy | kivy/effects/kinetic.py | 54 | 5520 | '''
Kinetic effect
==============
.. versionadded:: 1.7.0
The :class:`KineticEffect` is the base class that is used to compute the
velocity out of a movement. When the movement is finished, the effect will
compute the position of the movement according to the velocity, and reduce the
velocity with a friction. The mov... | mit |
fredhusser/scikit-learn | sklearn/datasets/tests/test_lfw.py | 230 | 7880 | """This test for the LFW require medium-size data dowloading and processing
If the data has not been already downloaded by running the examples,
the tests won't run (skipped).
If the test are run, the first execution will be long (typically a bit
more than a couple of minutes) but as the dataset loader is leveraging
... | bsd-3-clause |
shenyy/lily2-gem5 | configs/common/O3_ARM_v7a.py | 17 | 6450 | # Copyright (c) 2012 The Regents of The University of Michigan
# 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 ... | bsd-3-clause |
beni55/picochess | libs/requests/packages/chardet/big5prober.py | 2931 | 1684 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | gpl-3.0 |
igel-kun/pyload | module/plugins/crypter/DevhostStFolder.py | 8 | 2218 | # -*- coding: utf-8 -*-
#
# Test links:
# http://d-h.st/users/shine/?fld_id=37263#files
import re
import urlparse
from ..internal.SimpleCrypter import SimpleCrypter
class DevhostStFolder(SimpleCrypter):
__name__ = "DevhostStFolder"
__type__ = "crypter"
__version__ = "0.12"
__status__ = "testing"
... | gpl-3.0 |
haphaeu/yoshimi | neural_networks/mnist/mnist.py | 1 | 4523 | # -*- coding: utf-8 -*-
"""
Created on Sun Feb 26 16:15:51 2017
Read data from MNIST and converts it to be used with the neural network implementation in
network.py
[1] http://yann.lecun.com/exdb/mnist/
TRAINING SET LABEL FILE (train-labels-idx1-ubyte):
[offset] [type] [value] [description]
0000... | lgpl-3.0 |
ivanlmj/Android-DNSSL | Flask/lib/python2.7/site-packages/requests/packages/idna/core.py | 151 | 11352 | from . import idnadata
import bisect
import unicodedata
import re
import sys
from .intranges import intranges_contain
_virama_combining_class = 9
_alabel_prefix = b'xn--'
_unicode_dots_re = re.compile(u'[\u002e\u3002\uff0e\uff61]')
if sys.version_info[0] == 3:
unicode = str
unichr = chr
class IDNAError(Unico... | gpl-2.0 |
lidavidm/mathics-heroku | venv/lib/python2.7/site-packages/sympy/matrices/expressions/trace.py | 1 | 1504 | from sympy import Basic, Expr
from matexpr import ShapeError
class Trace(Expr):
"""Matrix Trace
Represents the trace of a matrix expression.
>>> from sympy import MatrixSymbol, Trace, eye
>>> A = MatrixSymbol('A', 3, 3)
>>> Trace(A)
Trace(A)
See Also:
trace
"""
is_Trace ... | gpl-3.0 |
sunweaver/ganetimgr | stats/tests.py | 3 | 2995 | from django.test import TestCase, Client
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from ganeti.models import Cluster
class LoginTestCase(TestCase):
# inject these two functions
def login_user(self):
return self.client.login(username=self.user_username, pa... | gpl-3.0 |
mdr78/Linux-x1000 | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
apache/stratos | components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/plugins/DefaultArtifactCheckout.py | 5 | 7366 | # 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 u... | apache-2.0 |
jayme-github/CouchPotatoServer | libs/html5lib/filters/whitespace.py | 133 | 1204 | try:
frozenset
except NameError:
# Import from the sets module for python 2.3
from sets import ImmutableSet as frozenset
import re
import _base
from html5lib.constants import rcdataElements, spaceCharacters
spaceCharacters = u"".join(spaceCharacters)
SPACES_REGEX = re.compile(u"[%s]+" % spaceCharacters)
... | gpl-3.0 |
brammittendorff/PF_RING | linux-3.16.7-ckt9/tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | lgpl-2.1 |
SaM-Solutions/samba | buildtools/wafsamba/samba_version.py | 19 | 9183 | import os
import Utils
import samba_utils
import sys
def bzr_version_summary(path):
try:
import bzrlib
except ImportError:
return ("BZR-UNKNOWN", {})
import bzrlib.ui
bzrlib.ui.ui_factory = bzrlib.ui.make_ui_for_terminal(
sys.stdin, sys.stdout, sys.stderr)
from bzrlib impor... | gpl-3.0 |
gdgellatly/OCB1 | addons/account_budget/wizard/account_budget_report.py | 53 | 2072 | # -*- 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 |
cancan101/tensorflow | tensorflow/contrib/distributions/python/ops/gamma.py | 6 | 10840 | # 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 |
amir343/ansible-modules-extras | system/puppet.py | 27 | 6730 | #!/usr/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# This module 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 late... | gpl-3.0 |
zahodi/ansible | contrib/inventory/windows_azure.py | 58 | 11116 | #!/usr/bin/env python
'''
Windows Azure external inventory script
=======================================
Generates inventory that Ansible can understand by making API request to
Windows Azure using the azure python library.
NOTE: This script assumes Ansible is being executed where azure is already
installed.
p... | gpl-3.0 |
andreparrish/python-for-android | python-build/python-libs/gdata/src/gdata/exif/__init__.py | 253 | 6981 | # -*-*- encoding: utf-8 -*-*-
#
# This is gdata.photos.exif, implementing the exif namespace in gdata
#
# $Id: __init__.py 81 2007-10-03 14:41:42Z havard.gulldahl $
#
# Copyright 2007 Håvard Gulldahl
# Portions copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not... | apache-2.0 |
tcxhxx/codecombat | scripts/devSetup/mongo.py | 67 | 4203 | from __future__ import print_function
__author__ = u'schmatz'
from downloader import Downloader
import tarfile
from errors import DownloadCorruptionError
import warnings
import os
from configuration import Configuration
from dependency import Dependency
import sys
import shutil
class MongoDB(Dependency):
def __ini... | mit |
chrismattmann/girder | girder/utility/gridfs_assetstore_adapter.py | 1 | 9922 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2013 Kitware 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 cop... | apache-2.0 |
Pluto-tv/chromium-crosswalk | build/landmines.py | 13 | 4387 | #!/usr/bin/env 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.
"""
This script runs every build as the first hook (See DEPS). If it detects that
the build should be clobbered, it will delete the... | bsd-3-clause |
boyuegame/kbengine | kbe/src/lib/python/Lib/idlelib/SearchEngine.py | 70 | 7483 | '''Define SearchEngine for search dialogs.'''
import re
from tkinter import StringVar, BooleanVar, TclError
import tkinter.messagebox as tkMessageBox
def get(root):
'''Return the singleton SearchEngine instance for the process.
The single SearchEngine saves settings between dialog instances.
If there is n... | lgpl-3.0 |
sodafree/backend | build/ipython/build/lib.linux-i686-2.7/IPython/frontend/qt/console/ipython_widget.py | 3 | 24582 | """ A FrontendWidget that emulates the interface of the console IPython and
supports the additional functionality provided by the IPython kernel.
"""
#-----------------------------------------------------------------------------
# Imports
#---------------------------------------------------------------------------... | bsd-3-clause |
thomasDOTde/ffbackbone | app/blueprints/asns.py | 1 | 2171 | from flask import Blueprint
from flask import render_template, flash, redirect, url_for, request, g # noqa
from flask.ext.login import current_user, login_required
from datetime import datetime
from app.forms import *
from app.models import *
asns = Blueprint('asns', __name__, template_folder='templates')
@asns.rout... | gpl-3.0 |
davidmueller13/custom_kernel_lt03lte_aosp_6.0 | tools/perf/scripts/python/net_dropmonitor.py | 4235 | 1554 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.