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 |
|---|---|---|---|---|---|
nicholedwight/nichole-theme | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/_robotframeworklexer.py | 94 | 18587 | # -*- coding: utf-8 -*-
"""
pygments.lexers._robotframeworklexer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lexer for Robot Framework.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
# Copyright 2012 Nokia Siemens Networks Oyj
#
# License... | mit |
Tetpay/cjdns | contrib/python/cjdnsadmin/cli.py | 8 | 2003 | #!/usr/bin/env python
# You may redistribute this program 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.
#
# This program is distributed in the hope that it will be useful,
# but... | gpl-3.0 |
kingvuplus/boom | lib/python/Screens/RdsDisplay.py | 2 | 10176 | from enigma import iPlayableService, iRdsDecoder
from Screens.Screen import Screen
from Components.ActionMap import NumberActionMap
from Components.ServiceEventTracker import ServiceEventTracker
from Components.Pixmap import Pixmap
from Components.Label import Label
from Components.Sources.StaticText import Stati... | gpl-2.0 |
rue89-tech/edx-platform | common/lib/capa/capa/safe_exec/lazymod.py | 193 | 1200 | """A module proxy for delayed importing of modules.
From http://barnesc.blogspot.com/2006/06/automatic-python-imports-with-autoimp.html,
in the public domain.
"""
import sys
class LazyModule(object):
"""A lazy module proxy."""
def __init__(self, modname):
self.__dict__['__name__'] = modname
... | agpl-3.0 |
steedos/odoo | addons/website_customer/controllers/main.py | 251 | 4306 | # -*- coding: utf-8 -*-
import openerp
from openerp import SUPERUSER_ID
from openerp.addons.web import http
from openerp.addons.website.models.website import unslug
from openerp.tools.translate import _
from openerp.addons.web.http import request
import werkzeug.urls
class WebsiteCustomer(http.Controller):
_refere... | agpl-3.0 |
varunkumta/azure-linux-extensions | TestHandlerLinux/bin/update.py | 16 | 1941 | #!/usr/bin/env python
"""
Example Azure Handler script for Linux IaaS
Update example
Reads port from Public Config if present.
Creates service_port.txt in resources dir.
Copies the service to /usr/bin and updates it
with the resource path.
"""
import os
import sys
import imp
import time
waagent=imp.load_source('waage... | apache-2.0 |
hopeall/odoo | addons/hr_timesheet_sheet/report/__init__.py | 342 | 1074 | # -*- 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 |
pxkumar2/ardupilot_3.0_HIL | Tools/autotest/pysim/rotmat.py | 80 | 8720 | #!/usr/bin/env python
#
# vector3 and rotation matrix classes
# This follows the conventions in the ArduPilot code,
# and is essentially a python version of the AP_Math library
#
# Andrew Tridgell, March 2012
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser... | gpl-3.0 |
ojcastillo/emacs_config | extensions/pymacs/contrib/rebox/Pymacs/rebox.py | 10 | 40164 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright © 1991-1998, 2000, 2002, 2003 Progiciels Bourbeau-Pinard inc.
# François Pinard <pinard@iro.umontreal.ca>, 1991-04.
# 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... | mit |
home-assistant/home-assistant | homeassistant/components/homekit/util.py | 2 | 15370 | """Collection of useful functions for the HomeKit component."""
import io
import ipaddress
import logging
import os
import re
import secrets
import socket
import pyqrcode
import voluptuous as vol
from homeassistant.components import binary_sensor, media_player, sensor
from homeassistant.components.camera import DOMAI... | apache-2.0 |
rwarren14/robotframework | src/robot/result/testcase.py | 4 | 2068 | # Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 |
druuu/django | django/contrib/admin/__init__.py | 562 | 1243 | # ACTION_CHECKBOX_NAME is unused, but should stay since its import from here
# has been referenced in documentation.
from django.contrib.admin.decorators import register
from django.contrib.admin.filters import (
AllValuesFieldListFilter, BooleanFieldListFilter, ChoicesFieldListFilter,
DateFieldListFilter, Fiel... | bsd-3-clause |
brian-l/django-1.4.10 | django/utils/translation/__init__.py | 78 | 5575 | """
Internationalization support.
"""
import warnings
from os import path
from django.utils.encoding import force_unicode
from django.utils.functional import lazy
from django.utils.importlib import import_module
__all__ = [
'activate', 'deactivate', 'override', 'deactivate_all',
'get_language', 'get_languag... | bsd-3-clause |
jpelias/StorerBot | tgbot/methods.py | 2 | 6528 | #! /usr/bin/python
# -*- coding: utf-8 -*-
__author__ = 'Raúl Jornet Calomarde'
__contact__ = 'rjornetc@openmailbox.org'
__copyright__ = 'Copyright © 2015, Raúl Jornet Calomarde'
__license__ = '''License GPLv3+: GNU GPL version 3 or any later
This program is free software: you can redistribute it and/or modify it unde... | gpl-3.0 |
Dandandan/wikiprogramming | jsrepl/extern/python/reloop-closured/lib/python2.7/mailbox.py | 74 | 78102 | #! /usr/bin/env python
"""Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes."""
# Notes for authors of new mailbox subclasses:
#
# Remember to fsync() changes to disk before closing a modified file
# or returning from a flush() method. See functions _sync_flush() and
# _sync_close().
import sys
im... | mit |
laurenrevere/osf.io | website/notifications/events/base.py | 22 | 1788 | # -*- coding: utf-8 -*-
"""Basic Event handling for events that need subscriptions"""
from django.utils import timezone
from website.notifications import emails
event_registry = {}
def register(event_type):
"""Register classes into event_registry"""
def decorator(cls):
event_registry[event_type] =... | apache-2.0 |
Jgarcia-IAS/Fidelizacion_odoo | openerp/addons/account/report/account_general_journal.py | 381 | 7669 | # -*- 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 |
virajs/apprtc | src/third_party/oauth2client/appengine.py | 154 | 32524 | # Copyright (C) 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 or agreed to in writ... | bsd-3-clause |
IceflowRE/MR-eBook-Downloader | unidown/core/settings.py | 1 | 3215 | import multiprocessing
from pathlib import Path
class Settings:
"""
:ivar _root_dir: root path
:ivar temp_dir: temporary main path, here are the sub folders for every plugin
:ivar download_dir: download main path, here are the sub folders for every plugin
:ivar savestate_dir: savestates main path,... | gpl-3.0 |
SAR85/closure-linter | closure_linter/scopeutil.py | 18 | 6140 | #!/usr/bin/env python
#
# Copyright 2012 The Closure Linter 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
#
#... | apache-2.0 |
pinusm/Lilach-STIAT | plugins/advanced_delay/advanced_delay.py | 3 | 2940 | #-*- coding:utf-8 -*-
"""
This file is part of OpenSesame.
OpenSesame 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.
OpenSesame is distri... | gpl-3.0 |
citrix-openstack-build/neutron-lbaas | setup.py | 608 | 1045 | #!/usr/bin/env python
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# 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
#
# Unle... | apache-2.0 |
intel-analytics/analytics-zoo | pyzoo/zoo/orca/learn/mxnet/estimator.py | 1 | 14429 | #
# Copyright 2018 Analytics Zoo Authors.
#
# 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... | apache-2.0 |
illicitonion/buck | src/com/facebook/buck/json/buck_test.py | 1 | 24028 | from buck import (
BuildFileContext,
LazyBuildEnvPartial,
_load_manifest_trie,
flatten_dicts,
format_watchman_query_params,
glob_internal,
glob_mercurial_manifest,
path_component_contains_dot,
subdir_glob,
)
from pathlib import Path, PurePosixPath, PureWindowsPath
import itertools
im... | apache-2.0 |
gengliangwang/spark | python/pyspark/pandas/tests/test_sql.py | 15 | 1979 | #
# 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 us... | apache-2.0 |
Jgarcia-IAS/SAT | openerp/addons/mrp_operations/__openerp__.py | 260 | 2897 | # -*- 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 |
MiLk/ansible | lib/ansible/modules/packaging/os/layman.py | 71 | 8076 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Jakub Jirutka <jakub@jirutka.cz>
#
# 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 Lice... | gpl-3.0 |
sillydan1/WhatEverEngine | openglcsharp/Lib/lib2to3/pytree.py | 325 | 29039 | # Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""
Python parse tree definitions.
This is a very concrete parse tree; we need to keep every token and
even the comments and whitespace between tokens.
There's also a pattern matching implementation here.
"""
__autho... | apache-2.0 |
Rusk85/pyload | module/plugins/accounts/BitshareCom.py | 2 | 1728 | # -*- coding: utf-8 -*-
"""
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.
This program is distributed in... | gpl-3.0 |
jjhuff/fcc-comments | lib/nltk/cluster/api.py | 17 | 2056 | # Natural Language Toolkit: Clusterer Interfaces
#
# Copyright (C) 2001-2012 NLTK Project
# Author: Trevor Cohn <tacohn@cs.mu.oz.au>
# Porting: Steven Bird <sb@csse.unimelb.edu.au>
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
from nltk.probability import DictionaryProbDist
class ClusterI(o... | apache-2.0 |
jiwanlimbu/aura | keystone/common/sql/migrate_repo/versions/094_add_federated_user_table.py | 6 | 1903 | # 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
# distributed under t... | apache-2.0 |
maurofaccenda/ansible | lib/ansible/plugins/terminal/junos.py | 16 | 1809 | #
# (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 |
mrquim/mrquimrepo | script.module.unidecode/lib/unidecode/x0bb.py | 253 | 4730 | data = (
'moen', # 0x00
'moenj', # 0x01
'moenh', # 0x02
'moed', # 0x03
'moel', # 0x04
'moelg', # 0x05
'moelm', # 0x06
'moelb', # 0x07
'moels', # 0x08
'moelt', # 0x09
'moelp', # 0x0a
'moelh', # 0x0b
'moem', # 0x0c
'moeb', # 0x0d
'moebs', # 0x0e
'moes', # 0x0f
'moess', #... | gpl-2.0 |
andrewchambers/8cc | test/negative.py | 11 | 7975 | #!/usr/bin/python2
# Copyright 2015 Rui Ueyama. Released under the MIT license.
# This file contains negative tests.
# All tests in this file are not valid C code and thus cause
# the compiler to print out error messages.
# We verify that the compiler actually detects these errors and
# prints out correct error messag... | mit |
mathspace/django | tests/defer/tests.py | 25 | 11390 | from __future__ import unicode_literals
from django.db.models.query_utils import InvalidQuery
from django.test import TestCase
from .models import (
BigChild, Child, ChildProxy, Primary, RefreshPrimaryProxy, Secondary,
)
class AssertionMixin(object):
def assert_delayed(self, obj, num):
"""
I... | bsd-3-clause |
yarikoptic/NiPy-OLD | nipy/utils/perlpie.py | 1 | 3866 | """Perform a global search and replace on the current directory *recursively*.
This a small python wrapper around the `perl -p -i -e` functionality.
I **strongly recommend** running `perlpie` on files under source
control. In this way it's easy to track your changes and if you
discover your regular expression was wro... | bsd-3-clause |
mlperf/training_results_v0.5 | v0.5.0/google/cloud_v2.8/resnet-tpuv2-8/code/resnet/model/staging/models/rough/mask_rcnn/mask_rcnn_model.py | 2 | 32647 | # 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 |
srvg/ansible | test/support/integration/plugins/modules/deploy_helper.py | 149 | 19571 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Jasper N. Brouwer <jasper@nerdsweide.nl>
# (c) 2014, Ramon de la Fuente <ramon@delafuente.nl>
#
# 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
__metaclas... | gpl-3.0 |
strayge/CloudPlayer | controller.py | 1 | 12055 | from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtMultimedia import QMediaPlayer, QMediaContent
from cloud_api import *
class Controller:
def __init__(self, view, log):
self.log = log
self.view = view
self._player = QMediaPlayer()
self._player.mediaStatusChanged.co... | mit |
lancezlin/ml_template_py | lib/python2.7/site-packages/sklearn/utils/setup.py | 77 | 2993 | import os
from os.path import join
from sklearn._build_utils import get_blas_info
def configuration(parent_package='', top_path=None):
import numpy
from numpy.distutils.misc_util import Configuration
config = Configuration('utils', parent_package, top_path)
config.add_subpackage('sparsetools')
... | mit |
phil-lopreiato/the-blue-alliance | controllers/suggestions/suggest_event_webcast_controller.py | 8 | 1995 | import os
from controllers.base_controller import LoggedInHandler
from helpers.suggestions.suggestion_creator import SuggestionCreator
from models.event import Event
from models.suggestion import Suggestion
from template_engine import jinja2_engine
class SuggestEventWebcastController(LoggedInHandler):
"""
Al... | mit |
pyannote/pyannote-audio | pyannote/audio/tasks/segmentation/segmentation.py | 1 | 17573 | # MIT License
#
# Copyright (c) 2020-2021 CNRS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, pu... | mit |
philjjoon/Big-Data-Benchmark-for-Big-Bench | engines/flink/queries/q28/q28.py | 3 | 2171 | #"INTEL CONFIDENTIAL"
#Copyright 2015 Intel Corporation All Rights Reserved.
#
#The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers... | apache-2.0 |
anish/buildbot | master/buildbot/www/authz/roles.py | 6 | 3059 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 |
fhaoquan/kbengine | kbe/res/scripts/common/Lib/distutils/util.py | 81 | 20665 | """distutils.util
Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
"""
import os
import re
import importlib.util
import sys
import string
from distutils.errors import DistutilsPlatformError
from distutils.dep_util import newer
from distutils.spawn import spawn
from ... | lgpl-3.0 |
dud225/incubator-airflow | airflow/contrib/hooks/gcp_api_base_hook.py | 48 | 4184 | # -*- 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 |
CloverHealth/airflow | tests/contrib/operators/test_gcs_to_s3_operator.py | 15 | 2793 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 |
BRAINSia/tract_querier | tract_querier/tests/tests_query_rewrite.py | 2 | 1450 | from .. import query_processor
from nose.tools import assert_equal, assert_not_equal
from unittest import expectedFailure
import ast
import parser
import token
import symbol
from types import ListType, TupleType
def match(pattern, data, vars=None):
if vars is None:
vars = {}
if type(pattern) is Lis... | bsd-3-clause |
ccxt/ccxt | python/ccxt/static_dependencies/ecdsa/curves.py | 2 | 1886 | from __future__ import division
from . import der, ecdsa
class UnknownCurveError(Exception):
pass
def orderlen(order):
return (1+len("%x" % order))//2 # bytes
# the NIST curves
class Curve:
def __init__(self, name, curve, generator, oid, openssl_name=None):
self.name = name
self.open... | mit |
twobraids/socorro | socorro/unittest/external/rabbitmq/test_rmq_new_crash_source.py | 10 | 1875 | # 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/.
from nose.tools import eq_, ok_
from socorro.external.rabbitmq.rmq_new_crash_source import (
RMQNewCrashSource
)
fr... | mpl-2.0 |
hschovanec-usgs/magpy | magpy/opt/mails.py | 2 | 1988 | # Utilities
#!/usr/bin/env python
# ---------
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText import MIMEText
from email.Utils import COMMASPACE, formatdate
from email import Encoders
#import smtplib
from email.mime.text import MIMEText
#from smtplib... | gpl-3.0 |
dimtion/jml | inputFiles/ourIA/lib/structs.py | 1 | 1354 | class StackQueue(list):
"""A class that is either a Stack or a Queue"""
def __init__(self, isStack=True):
self.isStack = isStack
def pop(self):
if self.isStack:
return super().pop()
else:
return super().pop(0)
class Stack(StackQueue):
""" A stack"""
... | mit |
persia/freeciv | common/generate_packets.py | 1 | 68400 | #!/usr/bin/env python
#
# Freeciv - Copyright (C) 2003 - Raimar Falke
# 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, or (at your option)
# any later version.
#
# Th... | gpl-2.0 |
WhireCrow/openwrt-mt7620 | staging_dir/host/lib/scons-2.1.0/SCons/Tool/packaging/tarbz2.py | 21 | 1809 | """SCons.Tool.Packaging.tarbz2
The tarbz2 SRC packager.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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")... | gpl-2.0 |
filipenf/ansible | lib/ansible/utils/module_docs_fragments/asa.py | 10 | 4652 | #
# (c) 2016, Peter Sprygada <psprygada@ansible.com>
# (c) 2016, Patrick Ogenstad <@ogenstad>
#
# 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 th... | gpl-3.0 |
google/rekall | rekall-core/rekall/plugins/common/efilter_plugins/collection.py | 1 | 5294 | # Rekall Memory Forensics
# Copyright 2017 Google Inc. All Rights Reserved.
#
# 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 ver... | gpl-2.0 |
mdscruggs/ga | ga/examples/travelling_salesman.py | 1 | 6091 | import math
import random
try:
import matplotlib.pyplot as plt
import matplotlib.animation as animation
plt.style.use('ggplot')
except ImportError:
plt = None
from ..algorithms import BaseGeneticAlgorithm
from ..chromosomes import ReorderingSetChromosome
from ..genes import BinaryGene
from ..translat... | gpl-2.0 |
hojel/youtube-dl | youtube_dl/downloader/rtmp.py | 17 | 8354 | from __future__ import unicode_literals
import os
import re
import subprocess
import time
from .common import FileDownloader
from ..compat import compat_str
from ..utils import (
check_executable,
encodeFilename,
encodeArgument,
get_exe_version,
)
def rtmpdump_version():
return get_exe_version(
... | unlicense |
M32Media/redash | tests/test_models.py | 1 | 31447 | #encoding: utf8
import datetime
import json
from unittest import TestCase
import mock
from dateutil.parser import parse as date_parse
from tests import BaseTestCase
from redash import models
from redash.models import db
from redash.utils import gen_query_hash, utcnow
class DashboardTest(BaseTestCase):
def test_ap... | bsd-2-clause |
GekoCH/ArduPlaneHighAltitude | Tools/autotest/pysim/multicopter.py | 67 | 6374 | #!/usr/bin/env python
from aircraft import Aircraft
import util, time, math
from math import degrees, radians
from rotmat import Vector3, Matrix3
class Motor(object):
def __init__(self, angle, clockwise, servo):
self.angle = angle # angle in degrees from front
self.clockwise = clockwise # clockwis... | gpl-3.0 |
cschenck/blender_sim | fluid_sim_deps/blender-2.69/2.69/python/lib/python3.3/functools.py | 15 | 12285 | """functools.py - Tools for working with functions and callable objects
"""
# Python module wrapper for _functools C module
# to allow utilities written in Python to be added
# to the functools module.
# Written by Nick Coghlan <ncoghlan at gmail.com>
# and Raymond Hettinger <python at rcn.com>
# Copyright (C) 2006-2... | gpl-3.0 |
varunarya10/contrail-controller | src/config/test/config_systest.py | 16 | 1779 | #!/usr/bin/env python
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
#
# analytics_systest.py
#
# System tests for analytics
#
import sys
builddir = sys.path[0] + '/../..'
from gevent import monkey
monkey.patch_all()
import os
import unittest
import testtools
import fixtures
import socket
from... | apache-2.0 |
jstoxrocky/statsmodels | statsmodels/examples/ex_multivar_kde.py | 34 | 1504 |
from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
from mpl_toolkits.mplot3d import axes3d
import statsmodels.api as sm
"""
This example illustrates the nonparametric estimation of a
bivariate bi-modal distribution that is a mixture of two normal
distri... | bsd-3-clause |
DavidMikeSimon/ansible | contrib/inventory/consul_io.py | 86 | 15546 | #!/usr/bin/env python
#
# (c) 2015, Steve Gargan <steve.gargan@gmail.com>
#
# This file is part of Ansible,
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (a... | gpl-3.0 |
pjliddy/bwarealty | node_modules/node-gyp/gyp/pylib/gyp/common.py | 1292 | 20063 | # 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.
from __future__ import with_statement
import collections
import errno
import filecmp
import os.path
import re
import tempfile
import sys
# A minimal memoizing d... | mit |
gonzafirewall/kivy | kivy/tests/test_selection.py | 27 | 21562 | '''
Selection tests
===============
'''
import unittest
from kivy.uix.widget import Widget
from kivy.uix.listview import ListView, ListItemButton
from kivy.properties import NumericProperty, StringProperty
from kivy.adapters.listadapter import ListAdapter
from kivy.adapters.dictadapter import DictAdapter
from kivy.a... | mit |
rgommers/statsmodels | docs/sphinxext/numpy_ext/plot_directive.py | 65 | 20399 | """
A special directive for generating a matplotlib plot.
.. warning::
This is a hacked version of plot_directive.py from Matplotlib.
It's very much subject to change!
Usage
-----
Can be used like this::
.. plot:: examples/example.py
.. plot::
import matplotlib.pyplot as plt
plt.plot... | bsd-3-clause |
nerzhul/ansible | lib/ansible/modules/cloud/amazon/ec2_elb_facts.py | 23 | 8307 | #!/usr/bin/python
#
# This is a 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.
#
# This Ansible library is distributed in the hope that i... | gpl-3.0 |
tiqiheng/pyspider | pyspider/database/local/projectdb.py | 63 | 2377 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<roy@binux.me>
# http://binux.me
# Created on 2015-01-17 12:32:17
import os
import re
import six
import logging
from pyspider.database.base.projectdb import ProjectDB as BaseProjectDB
class Projec... | apache-2.0 |
duyuan11/glumpy | glumpy/app/window/key.py | 4 | 10537 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | bsd-3-clause |
dharmabumstead/ansible | lib/ansible/modules/cloud/vmware/vmware_host_acceptance.py | 15 | 6572 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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 = {
'metadat... | gpl-3.0 |
andyfaff/scipy | scipy/signal/tests/test_peak_finding.py | 12 | 32865 | import copy
import numpy as np
from numpy.testing import (
assert_,
assert_equal,
assert_allclose,
assert_array_equal
)
import pytest
from pytest import raises, warns
from scipy.signal._peak_finding import (
argrelmax,
argrelmin,
peak_prominences,
peak_widths,
_unpack_condition_arg... | bsd-3-clause |
dbbhattacharya/kitsune | vendor/packages/sqlalchemy/test/orm/inheritance/test_abc_inheritance.py | 7 | 7685 | from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.orm.interfaces import ONETOMANY, MANYTOONE
from sqlalchemy.test import testing
from sqlalchemy.test.schema import Table, Column
from test.orm import _base
def produce_test(parent, child, direction):
"""produce a testcase for A->B->C inheritanc... | bsd-3-clause |
Homebrain/Homebrain | homebrain/agents/devicemanager/devicemanager.py | 1 | 1608 | from homebrain import Agent, Dispatcher, AgentManager
from homebrain.core.decorators import stop_on_shutdown_event
from lamphandler import LampHandler
from ttshandler import TTSHandler
from idfilter import IDFilter
import logging
class DeviceManager(Agent):
autostart = True
def __init__(self, target=None):... | mit |
dpranke/pyn | printer_test.py | 1 | 1544 | # Copyright 2014 Dirk Pranke. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
brunosr1985/PHPLogin | node_modules/node-gyp/gyp/pylib/gyp/__init__.py | 1524 | 22178 | #!/usr/bin/env python
# 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.
import copy
import gyp.input
import optparse
import os.path
import re
import shlex
import sys
import traceback
from gyp.common import GypErr... | gpl-3.0 |
pymelibre/ecolepo | agrostore/agrostore/settings.py | 1 | 3296 | """
Django settings for agrostore project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import ... | gpl-3.0 |
rouault/Quantum-GIS | python/plugins/processing/algs/qgis/SpatialJoinSummary.py | 2 | 16705 | # -*- coding: utf-8 -*-
"""
***************************************************************************
SpatialJoinSummary.py
---------------------
Date : September 2017
Copyright : (C) 2017 by Nyall Dawson
Email : nyall dot dawson at gmail dot com
********... | gpl-2.0 |
jbedorf/tensorflow | tensorflow/contrib/slim/python/slim/nets/inception_v2_test.py | 25 | 11167 | # 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 |
colinligertwood/odoo | addons/resource/faces/__init__.py | 448 | 1325 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 |
JakeBrand/CMPUT410-E6 | v1/lib/python2.7/site-packages/django/contrib/gis/geos/coordseq.py | 105 | 5495 | """
This module houses the GEOSCoordSeq object, which is used internally
by GEOSGeometry to house the actual coordinates of the Point,
LineString, and LinearRing geometries.
"""
from ctypes import c_double, c_uint, byref
from django.contrib.gis.geos.base import GEOSBase, numpy
from django.contrib.gis.geos.error impo... | apache-2.0 |
andfoy/margffoy-tuay-server | env/lib/python2.7/site-packages/Mezzanine-3.1.10-py2.7.egg/mezzanine/generic/templatetags/disqus_tags.py | 30 | 1947 | from __future__ import unicode_literals
from future.builtins import bytes, int
import base64
import hashlib
import hmac
import json
import time
from mezzanine import template
register = template.Library()
@register.simple_tag
def disqus_id_for(obj):
"""
Returns a unique identifier for the object to be use... | gpl-2.0 |
gonboy/sl4a | python/src/Lib/ctypes/test/test_python_api.py | 51 | 3101 | from ctypes import *
import unittest, sys
from ctypes.test import is_resource_enabled
################################################################
# This section should be moved into ctypes\__init__.py, when it's ready.
from _ctypes import PyObj_FromPtr
###########################################################... | apache-2.0 |
cm-a7lte/kernel_samsung_a7lte | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | 1927 | # 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, sys
sys.path.append(os.env... | gpl-2.0 |
winks/mongrel2 | examples/python/tests/two_servers.py | 97 | 1320 | from mongrel2.config import *
main = Server(
uuid="2f62bd5-9e59-49cd-993c-3b6013c28f05",
access_log="/logs/access.log",
error_log="/logs/error.log",
chroot="./",
pid_file="/run/mongrel2.pid",
default_host="mongrel2.org",
name="main",
port=6767
)
handler_test1 = Handler(send_spec='tcp:/... | bsd-3-clause |
franky88/emperioanimesta | env/Lib/site-packages/django/conf/locale/sv/formats.py | 504 | 1569 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'H:i'
DATETI... | gpl-3.0 |
sourcepole/kadas-albireo | python/plugins/processing/algs/qgis/PointsFromLines.py | 6 | 6459 | # -*- coding: utf-8 -*-
"""
***************************************************************************
PointsFromLines.py
---------------------
Date : August 2013
Copyright : (C) 2013 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
**********... | gpl-2.0 |
devGregA/code | scrapy/utils/serialize.py | 15 | 4295 | import re
import datetime
import decimal
import json
from twisted.internet import defer
from scrapy.spider import Spider
from scrapy.http import Request, Response
from scrapy.item import BaseItem
class SpiderReferencer(object):
"""Class to serialize (and deserialize) objects (typically dicts)
containing ref... | bsd-3-clause |
aisipos/django | django/contrib/gis/gdal/error.py | 535 | 1996 | """
This module houses the GDAL & SRS Exception objects, and the
check_err() routine which checks the status code returned by
GDAL/OGR methods.
"""
# #### GDAL & SRS Exceptions ####
class GDALException(Exception):
pass
# Legacy name
OGRException = GDALException
class SRSException(Exception):
pass
cla... | bsd-3-clause |
pabloborrego93/edx-platform | common/test/acceptance/fixtures/library.py | 23 | 3055 | """
Fixture to create a Content Library
"""
from opaque_keys.edx.keys import CourseKey
from common.test.acceptance.fixtures import STUDIO_BASE_URL
from common.test.acceptance.fixtures.base import XBlockContainerFixture, FixtureError
class LibraryFixture(XBlockContainerFixture):
"""
Fixture for ensuring that... | agpl-3.0 |
ga7g08/sympy | sympy/core/power.py | 4 | 53322 | from __future__ import print_function, division
from math import log as _log
from .sympify import _sympify
from .cache import cacheit
from .singleton import S
from .expr import Expr
from .evalf import PrecisionExhausted
from .function import (_coeff_isneg, expand_complex, expand_multinomial,
expand_mul)
from .log... | bsd-3-clause |
ojkastl/lxc_Patches | src/python-lxc/examples/api_test.py | 27 | 6149 | #!/usr/bin/python3
#
# api_test.py: Test/demo of the python3-lxc API
#
# (C) Copyright Canonical Ltd. 2012
#
# Authors:
# Stéphane Graber <stgraber@ubuntu.com>
#
# This library 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 Fre... | lgpl-2.1 |
fmaguire/dendrogenous | dendrogenous/test/test_core.py | 1 | 29132 | #!/usr/bin/env python
from __future__ import unicode_literals
from __future__ import print_function
import dendrogenous as dg
import dendrogenous.core
import numpy as np
import unittest
try:
import unittest.mock as mock
except:
import mock
import os
import shutil
import sys
import pytest
import pickle
impo... | bsd-3-clause |
duncanwp/iris | lib/iris/fileformats/um/_ff_replacement.py | 5 | 3220 | # (C) British Crown Copyright 2014 - 2017, Met Office
#
# This file is part of Iris.
#
# Iris 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 l... | lgpl-3.0 |
ctrlaltdel/neutrinator | vendor/openstack/tests/functional/cloud/test_floating_ip.py | 2 | 11712 | # Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# 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... | gpl-3.0 |
dhamaniasad/readitbetter | readitbetter/readitbetter.py | 1 | 2333 | # -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import bleach
def clean_up_html(html):
"""
Cleans up the HTML and strips away unwanted attributes
:param html:
:return:
"""
# Tags list from http://html5doctor.com/element-index/
"""
Why a specific tag is allowed
a: We do not wa... | mit |
TidalPaladin/Superliminal-resin | app/plugin.dbmc/browse_account.py | 2 | 14690 | #/*
# * Copyright (C) 2013 Joost Kop
# *
# *
# * 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, or (at your option)
# * any later version.
# *
# * This Program is ... | apache-2.0 |
emonty/ansible-modules-core | cloud/openstack/_quantum_router_gateway.py | 6 | 7565 | #!/usr/bin/python
#coding: utf-8 -*-
# (c) 2013, Benno Joy <benno@ansible.com>
#
# 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 later ... | gpl-3.0 |
ghchinoy/tensorflow | tensorflow/python/profiler/profiler_test.py | 18 | 8564 | # 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 |
FedericoCeratto/firelet | firelet/cli.py | 1 | 9537 | #!/usr/bin/env python
# Firelet - Distributed firewall management.
# Copyright (C) 2010 Federico Ceratto
#
# 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
# ... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.