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
asiersarasua/QGIS
.docker/qgis_resources/test_runner/qgis_testrunner.py
22
5880
#!/usr/bin/env python # -*- coding: utf-8 -*- """ *************************************************************************** Launches a unit test inside QGIS and exit the application. Arguments: accepts a single argument with the package name in python dotted notation, the program tries first to loa...
gpl-2.0
adw0rd/lettuce
tests/integration/lib/Django-1.2.5/django/contrib/formtools/tests.py
44
9574
import unittest from django import forms from django.conf import settings from django.contrib.formtools import preview, wizard, utils from django import http from django.test import TestCase success_string = "Done was called!" class TestFormPreview(preview.FormPreview): def done(self, request, cleaned_data): ...
gpl-3.0
anandpdoshi/frappe
frappe/commands/site.py
1
14212
from __future__ import unicode_literals, absolute_import import click import hashlib, os, sys import frappe from frappe.commands import pass_context, get_site from frappe.commands.scheduler import _is_scheduler_enabled from frappe.limits import update_limits, get_limits from frappe.installer import update_site_config f...
mit
Rodolfoarv/Mars-Explorer-AI-with-Python-
env/lib/python2.7/site-packages/pygame/__init__.py
2
11583
# coding: ascii # pygame - Python Game Library # Copyright (C) 2000-2001 Pete Shinners # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your o...
mit
Jorge-Rodriguez/ansible
lib/ansible/plugins/cache/mongodb.py
50
5534
# (c) 2018, Matt Martz <matt@sivel.net> # 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
thnee/ansible
lib/ansible/modules/storage/purestorage/purefa_smtp.py
19
4504
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Simon Dodsley (simon@purestorage.com) # 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
berth64/modded_modded_1257ad
source/header_common.py
1
23877
################################################### # header_common.py # This file contains common declarations. # DO NOT EDIT THIS FILE! ################################################### #client events multiplayer_event_set_item_selection = 0 multiplayer_event_set_bot_selection ...
agpl-3.0
telnik/jCnC
db_manip.py
1
4702
#!/usr/bin/python2 import sys, sqlite3, argparse class dbmanager: """ DataStore Class for Juniper Devices Stores hosts, thier usernames and passwords, and groups. Groupes are lists of hosts with names. Methods: create_host -- insert a new host modify_host_name -- modify a hosts host name modify_host_user --...
mit
yaolinz/rethinkdb
test/rql_test/connections/http_support/werkzeug/testsuite/contrib/cache.py
145
7212
# -*- coding: utf-8 -*- """ werkzeug.testsuite.cache ~~~~~~~~~~~~~~~~~~~~~~~~ Tests the cache system :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import time import unittest import tempfile import shutil from werkzeug.testsuite import Werkzeug...
agpl-3.0
Ninja-1/Circle2
circlelib/ui_gtk/circle_gtk.py
2
120362
# The Circle - Decentralized resource discovery software # # 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 version...
gpl-2.0
manipopopo/tensorflow
tensorflow/python/saved_model/signature_constants.py
20
3828
# 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
ramyfarid922/Quiz-Program
vendor/bundle/ruby/2.2.0/gems/libv8-3.16.14.7/vendor/v8/test/mjsunit/testcfg.py
7
8310
# Copyright 2008 the V8 project authors. 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 conditi...
cc0-1.0
pydo/vlc-gif-creator
gif_creator.py
1
4266
#!/usr/bin/env python import configparser import os import sys import xml.etree.ElementTree as ET from pathlib import Path from urllib.parse import unquote import requests from moviepy.editor import VideoFileClip from requests.exceptions import ConnectionError def generate_gif(media_path: str, time: int, size: floa...
mit
jmcarbo/openerp7
openerp/addons/mail/mail_alias.py
14
11553
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
wangyum/tensorflow
tensorflow/python/util/tf_decorator.py
45
5730
# 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
shrimpboyho/git.js
emscript/python/2.7.5.1_32bit/Lib/xml/sax/_exceptions.py
359
4785
"""Different kinds of SAX Exceptions""" import sys if sys.platform[:4] == "java": from java.lang import Exception del sys # ===== SAXEXCEPTION ===== class SAXException(Exception): """Encapsulate an XML error or warning. This class can contain basic error or warning information from either the XML parser o...
gpl-2.0
dialogflow/fulfillment-translate-python
translate_response.py
1
4345
#!/usr/bin/env python # Copyright 2017 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...
apache-2.0
tarzan0820/odoo
addons/marketing_campaign/__init__.py
380
1087
# -*- 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
alvaroaleman/ansible
lib/ansible/modules/cloud/ovirt/ovirt_nics_facts.py
15
3881
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (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 #...
gpl-3.0
x111ong/odoo
addons/account_analytic_plans/wizard/account_crossovered_analytic.py
341
2972
# -*- 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
BrendanBerkley/django-report-builder
report_builder_demo/demo_models/models.py
2
2937
from django.db import models from django.utils.functional import cached_property from custom_field.custom_field import CustomFieldModel from djmoney.models.fields import MoneyField class Foo(models.Model): char_field = models.CharField(max_length=50, blank=True) char_field2 = models.CharField(max_length=50, ...
bsd-3-clause
AutorestCI/azure-sdk-for-python
azure-servicemanagement-legacy/azure/servicemanagement/_http/winhttp.py
13
15190
#------------------------------------------------------------------------- # Copyright (c) Microsoft. 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.apac...
mit
MikeLing/shogun
applications/tapkee/words_embedding.py
5
1605
#!/usr/bin/env python # 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, or # (at your option) any later version. # # Written (W) 2011 Sergey Lisitsyn # Copyright ...
gpl-3.0
schaabs/sandbox
py/keyvault/crytpography/algorithms/rsa_oaep.py
1
1049
from ..algorithm import EncryptionAlgorithm from ..transform import CryptoTransform from abc import ABCMeta from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding def _default_encryption_padding(): return padding.OAEP(mgf=padding.MGF1(algorithm=hashes.SHA1(...
mit
shdowofdeath/rally
tests/unit/verification/test_tempest.py
2
18514
# Copyright 2014: Mirantis 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...
apache-2.0
QianBIG/odoo
addons/stock_account/wizard/stock_change_standard_price.py
315
3824
# -*- 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
DefyVentures/edx-platform
lms/djangoapps/instructor_task/tests/test_base.py
13
11903
""" Base test classes for LMS instructor-initiated background tasks """ import os import json from mock import Mock import shutil import unicodecsv from uuid import uuid4 from celery.states import SUCCESS, FAILURE from django.conf import settings from django.test.testcases import TestCase from django.contrib.auth.mod...
agpl-3.0
shsingh/ansible
test/support/integration/plugins/lookup/rabbitmq.py
68
7481
# (c) 2018, John Imison <john+github@imison.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ lookup: rabbitmq author: John Imison <@Im0> version_adde...
gpl-3.0
ChristosChristofidis/bokeh
bokeh/server/models/convenience.py
29
1566
def can_read_doc_api(doc, apikey): if can_write_doc_api(doc, apikey): return True return apikey == doc.readonlyapikey def can_write_doc_api(doc, apikey): return apikey == doc.apikey def can_read_doc(doc, bokehuser): return bokehuser.username in doc.r_users def can_write_doc(doc, bokehuser): ...
bsd-3-clause
monsteredp/nemesys-qos
nemesys/arp.py
9
13681
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2013 Fondazione Ugo Bordoni. # # 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, or # (at your option) a...
gpl-3.0
chronossc/openpyxl
openpyxl/worksheet.py
2
18176
# file openpyxl/worksheet.py # Copyright (c) 2010 openpyxl # # 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, modi...
mit
ktsaou/netdata
collectors/python.d.plugin/python_modules/urllib3/util/wait.py
4
1482
# SPDX-License-Identifier: MIT from .selectors import ( HAS_SELECT, DefaultSelector, EVENT_READ, EVENT_WRITE ) def _wait_for_io_events(socks, events, timeout=None): """ Waits for IO events to be available from a list of sockets or optionally a single socket if passed in. Returns a list of ...
gpl-3.0
yaroslavvb/tensorflow
tensorflow/contrib/tensorboard/plugins/trace/trace_test.py
124
2749
# 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
UncleRus/MultiConf
src/ui/dialogs.py
1
3974
# -*- coding: utf-8 -*- from PySide.QtCore import * from PySide.QtGui import * class AsyncProcess (QThread): progressUpdated = Signal (int) changed = Signal (str) errorOccured = Signal (str) bannerUpdated = Signal (str) def __init__ (self, target, parent, changeCursor = False): ...
gpl-3.0
taohungyang/cloud-custodian
tools/c7n_gcp/tests/test_mu_gcp.py
1
4369
# Copyright 2018 Capital One Services, 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 agreed to in...
apache-2.0
petewarden/tensorflow
tensorflow/python/data/util/options.py
7
5994
# 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
G33KS44n/mysql-5.6
xtrabackup/test/python/testtools/tests/test_runtest.py
42
10423
# Copyright (c) 2009-2010 testtools developers. See LICENSE for details. """Tests for the RunTest single test execution logic.""" from testtools import ( ExtendedToOriginalDecorator, run_test_with, RunTest, TestCase, TestResult, ) from testtools.matchers import MatchesException, Is, Raises fro...
gpl-2.0
sexcoin-project/p2pool-sexcoin
wstools/Utility.py
292
50865
# Copyright (c) 2003, The Regents of the University of California, # through Lawrence Berkeley National Laboratory (subject to receipt of # any required approvals from the U.S. Dept. of Energy). All rights # reserved. # # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved. # # This software is ...
gpl-3.0
shaunstanislaus/miller
python/sketch.py
11
17703
#!/usr/bin/python import os, sys import getopt import string, re import collections # ================================================================ # o inclflds a,x,b # o newflds '{$y:$x*$x, $z:$x/2, $n:-$z}' # o greprecs '$x <= 2 && $y eq "zebra"' # # o tabular pretty-print # o mean # o sort # absolute ess...
bsd-2-clause
payal97/portal
systers_portal/community/tests/test_permissions.py
2
4688
from django.test import TestCase from community.constants import (CONTENT_CONTRIBUTOR, CONTENT_MANAGER, USER_CONTENT_MANAGER, COMMUNITY_ADMIN) from community.permissions import (content_contributor_permissions, content_manager_permissions, ...
gpl-2.0
SHAYDER/i9300
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
efortuna/AndroidSDKClone
ndk/prebuilt/linux-x86_64/lib/python2.7/test/test_long.py
45
37275
import unittest import sys import random import math from test import test_int, test_support # Used for lazy formatting of failure messages class Frm(object): def __init__(self, format, *args): self.format = format self.args = args def __str__(self): return self.format % self.args #...
apache-2.0
todaychi/hue
desktop/core/ext-py/py4j-0.9/src/py4j/tests/multithreadtest.py
18
2676
""" Created on Sep 17, 2010 @author: barthelemy """ from __future__ import unicode_literals, absolute_import from threading import Thread import unittest from py4j.compat import range from py4j.java_gateway import JavaGateway from py4j.tests.java_gateway_test import ( start_example_app_process, sleep) class Te...
apache-2.0
tomka/CATMAID
django/applications/catmaid/control/textlabel.py
2
8253
# -*- coding: utf-8 -*- import json import sys from django.http import HttpRequest, HttpResponse, JsonResponse from django.db import connection from catmaid.models import UserRole, Textlabel, TextlabelLocation from catmaid.fields import Double3D from catmaid.control.authentication import requires_user_role from catm...
gpl-3.0
nikhilprathapani/python-for-android
python-modules/twisted/twisted/test/stdio_test_loseconn.py
59
1513
# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_loseConnection -*- # Copyright (c) 2006-2007 Twisted Matrix Laboratories. # See LICENSE for details. """ Main program for the child process run by L{twisted.test.test_stdio.StandardInputOutputTestCase.test_loseConnection} to test that ITran...
apache-2.0
joanneko/goodbooks
goodbooks/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/constants.py
3008
1335
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
bsd-3-clause
jbking/python-stdnet
stdnet/backends/redisb/client/extensions.py
1
16403
import os from hashlib import sha1 from collections import namedtuple from datetime import datetime from copy import copy from stdnet.utils.structures import OrderedDict from stdnet.utils import iteritems, format_int from stdnet import odm try: import redis except ImportError: # pragma nocover ...
bsd-3-clause
mavit/ansible
lib/ansible/modules/cloud/cloudstack/cs_loadbalancer_rule.py
50
10342
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Darren Worrall <darren@iweb.co.uk> # (c) 2015, René Moser <mail@renemoser.net> # # 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 So...
gpl-3.0
hdsheena/bottle-cork-edit
examples/simple_webapp_decorated.py
4
6527
#!/usr/bin/env python # # Copyright (C) 2013 Federico Ceratto and others, see AUTHORS file. # Released under LGPLv3+ license, see LICENSE.txt # # Cork example web application # # The following users are already available: # admin/admin, demo/demo import bottle from beaker.middleware import SessionMiddleware from cork...
lgpl-3.0
chemelnucfin/tensorflow
tensorflow/python/data/experimental/kernel_tests/serialization/optimize_dataset_serialization_test.py
9
2345
# 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
graziano-giuliani/pythoncode
pyuwphysret/common/pyfiles/atmos/mr2rho.py
1
1485
#!/usr/bin/env python # dp2e.py import numpy as num def mr2rho(w,t,p): """rho = mr2rho(w,t,p) w in g/kg t in K p in mb This was provide by Holger Linne' from Max Planck Institute. Dave Turner Pacific Northwest National Laboratory Currently at the University of Wisconsin-Madison dave.turner@pnl.gov """ rh...
mit
roadmapper/ansible
lib/ansible/modules/files/blockinfile.py
8
11774
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, 2015 YAEGASHI Takeshi <yaegashi@debian.org> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass_...
gpl-3.0
analyseuc3m/ANALYSE-v1
cms/lib/xblock/test/test_authoring_mixin.py
105
6282
""" Tests for the Studio authoring XBlock mixin. """ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.partitions.partitions import Group, UserPartition class AuthoringMixinTestCase(ModuleStoreTestCase): ...
agpl-3.0
xq262144/hue
desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/worksheet/pivot.py
13
4984
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl from openpyxl.descriptors import ( Bool, Integer, String, Set, NoneSet, ) from openpyxl.descriptors.serialisable import Serialisable class PivotSelection(Serialisable): pane = Set(values=("bottomRight", "topRight", "bo...
apache-2.0
felixwidmaier/bull
setup.py
1
1095
""" Copyright 2017 Felix Widmaier 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
mrry/tensorflow
tensorflow/python/kernel_tests/constant_op_test.py
7
23128
# 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
ajvpot/CTFd
tests/test_themes.py
2
8226
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import shutil import pytest from flask import render_template, render_template_string, request from jinja2.exceptions import TemplateNotFound from jinja2.sandbox import SecurityError from werkzeug.test import Client from CTFd.config import TestingConfig from CT...
apache-2.0
bestvibes/neo4j-social-network
env/lib/python2.7/encodings/cp858.py
416
34271
""" Python Character Mapping Codec for CP858, modified from cp850. """ import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): return codecs.charmap_decod...
mit
odoousers2014/LibrERP
partner_erp/partner_erp.py
3
3092
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2004-2013 Camptocamp Austria (<http://camptocamp.com>). # # This program is free softwar...
agpl-3.0
dannysellers/django_orders
load_accts.py
1
1434
import os import csv def fix_date(datestr): """ Dates in the account_list are MM/DD/YYYY, but Django's DateField requires YYYY-MM-DD format """ _createdate = datestr.split('/') if len(_createdate[2]) == 2: _createdate[2] = '20' + str(_createdate[2]) _createdate = [_createdate[2], _createdate[0], _createdate[...
gpl-2.0
seraphlnWu/creditor
observer/platform/creditor/user_client.py
2
3700
# coding=utf8 # # Insight Minr Active Spider Client Node # CopyRight BestMiner Inc. # ''' 从controller节点获取任务数据 ''' import os import json import time import socket import urllib from twisted.internet.defer import inlineCallbacks, returnValue from observer.utils.http import request, TimedAgentPool, InfiniteLoginEr...
apache-2.0
jordanmsn12/volatility
volatility/plugins/linux/mount_cache.py
45
2183
# Volatility # # This file is part of Volatility. # # Volatility 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 version. # # Volatility is dist...
gpl-2.0
Livit/Livit.Learn.EdX
lms/djangoapps/courseware/module_render.py
7
50636
""" Module rendering """ import hashlib import json import logging from collections import OrderedDict from functools import partial import dogstats_wrapper as dog_stats_api import newrelic.agent from capa.xqueue_interface import XQueueInterface from django.conf import settings from django.contrib.auth.models import ...
agpl-3.0
usc-isi-i2/dig-alignment
versions/1.0/karma/python/geohash.py
10
4021
""" Copyright (C) 2008 Leonard Norrgard <leonard.norrgard@gmail.com> Copyright (C) 2015 Leonard Norrgard <leonard.norrgard@gmail.com> This file is part of Geohash. Geohash 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 Softw...
apache-2.0
skidzo/sympy
sympy/vector/deloperator.py
20
5452
from sympy.core import Basic from sympy.core.function import Derivative from sympy.vector.vector import Vector from sympy.vector.functions import express from sympy.vector.coordsysrect import CoordSysCartesian from sympy.vector.scalar import BaseScalar from sympy.core import S class Del(Basic): """ Represents...
bsd-3-clause
axinging/chromium-crosswalk
tools/android/loading/page_track.py
15
2483
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import devtools_monitor class PageTrack(devtools_monitor.Track): """Records the events from the page track.""" _METHODS = ('Page.frameStartedLoading', ...
bsd-3-clause
silly-wacky-3-town-toon/SOURCE-COD
Panda3D-1.10.0/python/Lib/macurl2path.py
332
3275
"""Macintosh-specific module for conversion between pathnames and URLs. Do not import directly; use urllib instead.""" import urllib import os __all__ = ["url2pathname","pathname2url"] def url2pathname(pathname): """OS-specific conversion from a relative URL of the 'file' scheme to a file system path; not r...
apache-2.0
clarkhale/external-storage
iscsi/targetd/vendor/k8s.io/kubernetes/third_party/htpasswd/htpasswd.py
897
5219
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2008-2013 Edgewall Software # Copyright (C) 2008 Eli Carter # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edge...
apache-2.0
nicolasmoreau/NodeSoftware
nodes/IDEADB/urls.py
4
1028
from django.conf.urls import url, include #we need this to use djangos default views from django.views.generic import ListView, DetailView from node.views import * from node.models import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = [ ur...
gpl-3.0
atrick/swift
utils/update_checkout/tests/scheme_mock.py
13
5343
# ===--- SchemeMock.py ----------------------------------------------------===# # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https:#swift.org/LICENS...
apache-2.0
leonardowolf/bookfree
flask/lib/python2.7/site-packages/pip/compat/__init__.py
142
4669
"""Stuff that differs in different Python versions and platform distributions.""" from __future__ import absolute_import, division import os import sys from pip._vendor.six import text_type try: from logging.config import dictConfig as logging_dictConfig except ImportError: from pip.compat.dictconfig import ...
mit
suutari-ai/prequ
tests/test_utils.py
2
3763
import os import shutil from prequ._pip_compat import path_to_url from prequ.utils import ( as_tuple, dedup, flat_map, format_requirement, format_specifier, get_hashes_from_ireq, is_subdirectory) def test_is_subdirectory(): cwd = os.getcwd() test_dir = os.path.join(cwd, 'test') assert is_subdirec...
bsd-2-clause
r0balo/pelisalacarta
python/main-classic/lib/mechanize/_util.py
123
8992
"""Utility functions and date/time routines. Copyright 2002-2006 John J Lee <jjl@pobox.com> This code is free software; you can redistribute it and/or modify it under the terms of the BSD or ZPL 2.1 licenses (see the file COPYING.txt included with the distribution). """ import re import time import warnings class...
gpl-3.0
fedorpatlin/ansible
lib/ansible/modules/cloud/amazon/rds.py
22
45305
#!/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
brendank310/qemu-dm
QMP/qmp.py
65
5747
# QEMU Monitor Protocol Python class # # Copyright (C) 2009, 2010 Red Hat Inc. # # Authors: # Luiz Capitulino <lcapitulino@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. import json import errno import socket class QMPError(Except...
gpl-2.0
mitodl/xanalytics
gspread/urls.py
41
2820
# -*- coding: utf-8 -*- """ gspread.urls ~~~~~~~~~~~~ This module is Google API url patterns storage. """ import re from .exceptions import UnsupportedFeedTypeError, UrlParameterMissing SPREADSHEETS_SERVER = 'spreadsheets.google.com' SPREADSHEETS_FEED_URL = 'https://%s/%s/' % (SPREADSHEETS_SERVER, 'feeds') # G...
mit
malachiw7/OpenMDAO-Hyperloop
docs/xdsm/pod_xdsm.py
9
1067
from XDSM import XDSM opt = 'Optimization' dat = 'DataInter' mda = 'MDA' anl = 'Analysis' x = XDSM() name = 'assembly inputs' x.addComp(name, anl, name) name = 'capsule' x.addComp(name, anl, name) name = 'tube' x.addComp(name, anl, name) name = 'battery' x.addComp(name, anl, name) name = 'inlet' x.addComp(name, anl,...
apache-2.0
fevangelista/psi4
psi4/driver/ipi_broker.py
6
5022
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2019 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify # it u...
lgpl-3.0
with-git/tensorflow
tensorflow/contrib/layers/python/ops/sparse_feature_cross_op.py
127
5046
# 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
ivanhorvath/openshift-tools
openshift/installer/vendored/openshift-ansible-3.11.28-1/roles/lib_utils/src/test/unit/test_repoquery.py
63
2643
''' Unit tests for repoquery ''' import os import sys import unittest import mock # Removing invalid variable names for tests so that I can # keep them brief # pylint: disable=invalid-name,no-name-in-module # Disable import-error b/c our libraries aren't loaded in jenkins # pylint: disable=import-error,wrong-import-...
apache-2.0
VanirAOSP/external_chromium_org
chrome/test/pyautolib/pyauto_utils.py
67
9388
# 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. """Utilities for PyAuto.""" import httplib import logging import os import shutil import socket import sys import tempfile import unittest import urlpar...
bsd-3-clause
zhuwenping/python-for-android
python3-alpha/python3-src/Lib/turtledemo/colormixer.py
65
1432
# colormixer from turtle import Screen, Turtle, mainloop import sys sys.setrecursionlimit(20000) # overcomes, for now, an instability of Python 3.0 class ColorTurtle(Turtle): def __init__(self, x, y): Turtle.__init__(self) self.shape("turtle") self.resizemode("user") self.shapes...
apache-2.0
Universal-Model-Converter/UMC3.0a
data/Python/x86/Lib/distutils/command/build_ext.py
60
32282
"""distutils.command.build_ext Implements the Distutils 'build_ext' command, for building extension modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" import sys, os, string, re from types import * fr...
mit
idem2lyon/persomov
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/space.py
127
1528
from __future__ import unicode_literals import re from .common import InfoExtractor from .brightcove import BrightcoveIE from ..utils import RegexNotFoundError, ExtractorError class SpaceIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www|m)\.)?space\.com/\d+-(?P<title>[^/\.\?]*?)-video\.html' _TEST = { ...
gpl-3.0
online2311/MITMf
plugins/browserprofiler.py
26
1764
#!/usr/bin/env python2.7 # Copyright (c) 2014-2016 Marcello Salvati # # 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, or (at your option) any later version. #...
gpl-3.0
houssine78/addons
partner_wharehouse/__openerp__.py
1
1444
# -*- coding: utf-8 -*- ############################################################################## # # Business Open Source Solution # Copyright (C) 2018 Coop IT Easy SCRLfs. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Li...
agpl-3.0
pennersr/django-allauth
allauth/socialaccount/providers/linkedin_oauth2/views.py
2
1889
import requests from allauth.socialaccount import app_settings from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) from .provider import LinkedInOAuth2Provider class LinkedInOAuth2Adapter(OAuth2Adapter): provider_id = LinkedInOAuth2Provide...
mit
aimas/TuniErp-8.0
addons/point_of_sale/wizard/__init__.py
382
1200
# -*- 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...
agpl-3.0
40223210/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/xml/dom/expatbuilder.py
733
35733
"""Facility to use the Expat parser to load a minidom instance from a string or file. This avoids all the overhead of SAX and pulldom to gain performance. """ # Warning! # # This module is tightly bound to the implementation details of the # minidom DOM and can't be used with other DOM implementations. This # is due...
gpl-3.0
virtualopensystems/nova
nova/tests/compute/test_multiple_nodes.py
2
7344
# Copyright (c) 2012 NTT DOCOMO, 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 requ...
apache-2.0
ychen820/microblog
y/google-cloud-sdk/.install/.backup/platform/gsutil/third_party/boto/boto/cloudtrail/layer1.py
17
14685
# Copyright (c) 2013 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 ...
bsd-3-clause
Candreas/mapreduce
python/src/mapreduce/context.py
45
14669
#!/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...
apache-2.0
isandlaTech/cohorte-demos
led/dump/led-demo-raspberry/cohorte/dist/cohorte-1.0.0-20141209.234423-41-python-distribution/repo/pelix/remote/transport/mqtt_rpc.py
4
16078
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Pelix remote services: MQTT pseudo RPC An remote service protocol based on MQTT. This implementation tries to mimic the MQTT-RPC Javascript project: https://github.com/wolfeidau/mqtt-rpc This module depends on the paho-mqtt package (ex-mosquitto), provided by ...
apache-2.0
bringingheavendown/numpy
numpy/core/_methods.py
35
4704
""" Array methods which are called by both the C-code for the method and the Python code for the NumPy-namespace function """ from __future__ import division, absolute_import, print_function import warnings from numpy.core import multiarray as mu from numpy.core import umath as um from numpy.core.numeric import asan...
bsd-3-clause
zzzeek/sqlalchemy
lib/sqlalchemy/util/deprecations.py
3
11490
# util/deprecations.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php """Helpers related to deprecation of functions, methods, classes, other functi...
mit
googleapis/python-dialogflow-cx
tests/unit/gapic/dialogflowcx_v3beta1/test_sessions.py
1
65364
# -*- coding: utf-8 -*- # Copyright 2020 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...
apache-2.0
ethrbh/erwa
test/wamp_client.py
3
4068
############################################################################### ## ## Copyright (C) 2014 Tavendo GmbH ## ## 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:/...
mit
mantidproject/mantid
qt/python/mantidqt/gui_helper.py
3
5994
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from...
gpl-3.0
2014c2g2/2015cdag2_test
static/Brython3.1.1-20150328-091302/Lib/test/regrtest.py
718
65317
#! /usr/bin/python3.3 """ Usage: python -m test [options] [test_name1 [test_name2 ...]] python path/to/Lib/test/regrtest.py [options] [test_name1 [test_name2 ...]] If no arguments or options are provided, finds all files matching the pattern "test_*" in the Lib/test subdirectory and runs them in alphabetical order ...
gpl-3.0
neale/CS-program
434-MachineLearning/final_project/linearClassifier/sklearn/tree/setup.py
150
1412
import os import numpy from numpy.distutils.misc_util import Configuration def configuration(parent_package="", top_path=None): config = Configuration("tree", parent_package, top_path) libraries = [] if os.name == 'posix': libraries.append('m') config.add_extension("_tree", ...
unlicense