src stringlengths 721 1.04M |
|---|
import AoRegistration.AoRecording as AoRecording
import timeit
import logging
import argparse
def main():
"""
"""
logging.info('Reading file:%s','data/sample.avi')
vid = AoRecording.AoRecording(filepath='data/sample.avi')
vid.load_video()
logging.info('Starting parallel processing')
tic=tim... |
from pygments.lexer import RegexLexer, bygroups, include
from pygments.token import *
class BlogLexer(RegexLexer):
name = 'BLOG'
aliases = ['blog']
filenames = ['*.blog', '*.dblog']
operators = ['\\-\\>', ':', '\\+', '\\-', '\\*', '/', '\\[', ']',
'\\{', '}', '!', '\\<', '\\>', '\\<=', '\\>=', '==', ... |
# FlowTech | NeurAlgae
## 2017 CWSF Science Fair | NeurAlgae: HAB Prediction Using Machine Learning Algorithms
#Describes and trains a neural network for the analysis and prediction of algal bloom data
#Copyright (C) 2017 Zachary Trefler and Atif Mahmud
#This program is free software: you can redistribute it and/or m... |
#!/usr/bin/env python3
"""Mininet multi-switch integration tests for Faucet"""
import json
import os
import networkx
from mininet.log import error
from clib.mininet_test_base import IPV4_ETH, IPV6_ETH
from clib.mininet_test_base_topo import FaucetTopoTestBase
class FaucetMultiDPTest(FaucetTopoTestBase):
"""Co... |
# Copyright 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.
"""Base classes to represent dependency rules, used by checkdeps.py"""
import os
import re
class Rule(object):
"""Specifies a single rule for an includ... |
##############################################################################################
# Copyright 2014-2015 Cloud Media Sdn. Bhd.
#
# This file is part of Xuan Automation Application.
#
# Xuan Automation Application is free software: you can redistribute it and/or modify
# it under the terms of the GNU G... |
#! /usr/bin/env python
#
# Simple(ish) python condor_g factory for panda pilots
#
# $Id$
#
#
# Copyright (C) 2007,2008,2009 Graeme Andrew Stewart
#
# 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 Founda... |
#-*- coding:utf-8 -*-
#
# Copyright © 2016–2017 Liang Feng <finalion@gmail.com>
#
# Support: Report an issue at https://github.com/finalion/WordQuery/issues
#
# 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... |
import django_tables2 as tables
from django_tables2.utils import A
from .models import *
from django_filters.views import FilterView
from django_tables2.views import SingleTableMixin
from tmv_app.models import *
from .filters import *
import django_filters
#from .urls import urlpatterns
class DocTable(tables.Table):
... |
"""Module for querying SymPy objects about assumptions."""
import inspect
import copy
from sympy.core import Symbol, sympify
from sympy.utilities.source import get_class
from sympy.assumptions import global_assumptions
from sympy.assumptions.assume import eliminate_assume
from sympy.logic.boolalg import to_cnf, conjunc... |
# Copyright 2019 John Hanley.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribut... |
#!/usr/bin/env python
# Skeleton for python-based regression tests using
# JSON-RPC
# Add python-SaveCoinrpc to module search path:
import os
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-SaveCoinrpc"))
import json
import shutil
import subprocess
import tempfile
import ... |
from flask import Flask, jsonify, abort, request, make_response, url_for
from tinydb import TinyDB, where, Query
import uuid, time
import consul
from docopt import docopt
from consuldb import ConsulDB
db = TinyDB('./db.json')
photos = db.table('photos')
albums = db.table('albums')
consulhost = "localhost"
consulport ... |
# -*- coding: utf-8 -*-
#
# Flask-DropIn documentation build configuration file, created by
# sphinx-quickstart on Fri Nov 13 12:26:05 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
... |
import socket
import struct
from time import time
# class TimeManager(object):
#
# time_deviation = 0
# ntp_server = None
#
# def __init__(self, ntp_server=None):
#
# if ntp_server is not None:
# self.ntp_server = ntp_server
#
# # self.update_time_deviation()
#
... |
import os
import sys
try:
from setuptools import setup
except ImportError:
from . import ez_setup
from setuptools import setup
parent_directory = os.path.abspath(os.path.dirname(__file__))
metafiles = {
'README.md': None,
'CHANGES.md': None,
'CLASSIFIERS.txt': None,
}
# The following bit w... |
# import os
# import sys
import json
import logging
from tweepy import OAuthHandler
from tweepy import Stream
from tweepy.streaming import StreamListener
import settings
# Variables that contains the user credentials to access Twitter API
from keys import ACCESS_TOKEN
from keys import ACCESS_TOKEN_SECRET
from keys i... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*- #
#
# Builds the Ardublockly Python portion of the app for Linux or OS X.
#
# Copyright (c) 2015 carlosperate https://github.com/carlosperate/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... |
import pandas as pd
import numpy as np
from tensorflow.python.ops.random_ops import random_shuffle
try:
profile
except NameError:
from qlknn.misc.tools import profile
class Dataset():
def __init__(self, features, target):
from IPython import embed
if not isinstance(features, np.ndarray):
... |
# I need to style this control file,
# so that one can just type "from core import *"
# and simply build a model then run a simulation
from core import *
from differentiator import runSimulation
# 1*101*101 gridblocks
# radius 2,500 ft
# Firstly, we can specify the dimension of the cartesian grid
nz, ny, nx = 1, 151... |
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def sortList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if not head or not head.next:
... |
import json
import tempfile
import os
import re
import shutil
import unittest
from xml.dom import minidom
import pkg_resources
from avocado.core import exit_codes
from avocado.core.output import TermSupport
from avocado.utils import process
from avocado.utils import script
from avocado.utils import path as utils_path... |
# Copyright 2018 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.
"""Quest for running a browser test in Swarming."""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_impo... |
# This method validates mobile phone
# using Django's built in RegexpValidator
# And raises serializers.ValidationError if some
# error occurs
from talos_rest import constants
from re import compile
email_regex = compile(r'^[^@]+@[^@]+\.[^@]+$')
def validate_phone(phone, validate_uniqueness=False):
from django.... |
try: from collections import OrderedDict
except ImportError: from ordereddict import OrderedDict
import inspect, itertools, six
from decorator import decorator
class ValidationFailure(object):
def __init__(self, func, args):
self.func = func
self.__dict__.update(args)
def __repr__(self):
... |
import os
import sys
from optparse import OptionParser
from urllib import urlopen
from ua_mapper.wurfl2python import WurflPythonWriter, DeviceSerializer
OUTPUT_PATH = os.path.abspath(os.path.dirname(__file__))
WURFL_ARCHIVE_PATH = os.path.join(OUTPUT_PATH, "wurfl.zip")
WURFL_XML_PATH = os.path.join(OUTPUT_PATH, "wurf... |
# -*- coding: utf-8 -*-
"""Minimal API documentation generation."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
from importlib import import_module
import inspect
import os.path as op
import r... |
import pgmapcss.eval
import pgmapcss
cache = {}
# returns a tuple:
# 1st return value:
# a set of all possible values; True for unpredictable values
# 2nd return value:
# mutability of the return value
def possible_values(value, prop, stat):
global eval_param
# if we find the value in our cache, we don't ... |
#!/usr/bin/env python3
import torch
from ..utils.broadcasting import _matmul_broadcast_shape
from ..utils.memoize import cached
from .lazy_tensor import LazyTensor
from .root_lazy_tensor import RootLazyTensor
class MulLazyTensor(LazyTensor):
def _check_args(self, left_lazy_tensor, right_lazy_tensor):
if... |
from functools import partial
from util import transitive_get as walk
from util import assoc
from variable import Var, var, isvar
import itertools as it
from ground import new, op, args, isleaf
################
# Reificiation #
################
def reify_generator(t, s):
return it.imap(partial(reify, s=s), t)
de... |
# Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... |
# @copyright
# @license
r"""
History
-------
- Apr 8, 2011 @lisa: Created
"""
import unittest
from pynet.events.sockets import *
#############################################################################
#############################################################################
class TestCaseSockets(unit... |
# coding=utf-8
"""InaSAFE Disaster risk tool by Australian Aid - Flood Raster Impact Function
on Population.
Contact : ole.moller.nielsen@gmail.com
.. note:: 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 Sof... |
#!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
# Copyright 2017 Xiaomi, 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 requ... |
"""
This file demonstrates how to read minute level data from the
Google finance api
"""
import datetime as dt
import numpy as np
import pandas as pd
import pandas_datareader as pdr
import requests as r
import sys
from io import StriongIO
def retrieve_single_timeseries(ticker, secs=60, ndays=5):
"""
Grabs da... |
from .base import FunctionalTest
class MyListsTest(FunctionalTest):
def test_logged_in_users_lists_are_saved_as_my_lists(self):
# Sally is a logged-in user
self.create_pre_authenticated_session('sally@gmail.com')
# Sally goes to the home page and starts a list
self.browser.get(sel... |
#Copyright (c) 2014, Alexander M. Burns
#All rights reserved.
#Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#1. Redistributions of source code must retain the above copyright notice, this list of conditions and the follo... |
# Fields
NAME = 'name'
SET = 'set'
USES_REFUGEES = 'uses-refugees'
TEXT = 'text'
# Set values
HQ_EXP = 'hq'
RECON_EXP = 'recon'
# Information not strictly contained on the card
COMMENT = 'comment'
class Leaders:
ALL_LEADERS = [
{
NAME: 'The Peacemaker',
SET: HQ_EXP,
U... |
# Copyright 2021 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... |
#!/opt/local/bin/python
# encoding: utf-8
'''
bulkvideosize -- shortdesc
bulkvideosize is a description
It defines classes_and_methods
@author: user_name
@copyright: 2017 organization_name. All rights reserved.
@license: license
@contact: user_email
@deffield updated: Updated
'''
import sys
import ... |
"""
List intersection: Finds intersections between various lists
"""
def check_intersection(first_list, second_list):
#We use set builtin function to find the intersection between lists
return set(first_list).intersection(second_list)
def create_lists(line):
#receive a line from the file containing asc... |
# -------------------------------------------------------------------------------
# Copyright IBM Corp. 2016
#
# 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/licens... |
#!/usr/bin/env python3
# Copyright 2018 Francisco Pina Martins <f.pinamartins@gmail.com>
# segregating_loci_finder.py 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 ... |
import os
import unittest
from lxml import etree
from io import StringIO
from latex2edx.main import latex2edx
from latex2edx.test.util import make_temp_directory
class MakeTeX(object):
def __init__(self, tex):
buf = """\\documentclass[12pt]{article}\n\\usepackage{edXpsl}\n\n\\begin{document}"""
b... |
import math
import six
import numpy as np
import tensorflow as tf
from neupy.utils import asfloat
from neupy.exceptions import (
LayerConnectionError,
WeightInitializationError,
)
from neupy import layers, algorithms, init
from base import BaseTestCase
from helpers import simple_classification
class Activa... |
import collections
from datetime import timedelta
from django.contrib.contenttypes.models import ContentType
from django.db.models.expressions import OuterRef, Subquery
from rest_framework import status, viewsets
from rest_framework.response import Response
from waldur_core.quotas.models import Quota
from waldur_core... |
from django.contrib import admin
from django.forms import ModelChoiceField, ModelForm, Textarea
from questionnaire.models import *
from django.core.exceptions import ValidationError
from django.forms.models import BaseInlineFormSet
from questionnaire import admin_helper
############################################### ... |
#!/usr/bin/env python
from collections import OrderedDict
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.db import models
from django.contrib.sites.models import Site
from django.contrib.contenttypes.models import ContentType
try:
from django.contrib.contenttyp... |
#!../../../../virtualenv/bin/python3
# -*- coding: utf-8 -*-
# NB: The shebang line above assumes you've installed a python virtual environment alongside your working copy of the
# <4most-4gp-scripts> git repository. It also only works if you invoke this python script from the directory where it
# is located. If these... |
# -*- coding: utf-8 -*-
# Copyright 2014-2016 The HyperSpyUI developers
#
# This file is part of HyperSpyUI.
#
# HyperSpyUI 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
#... |
from __future__ import print_function, absolute_import
from ctypes import byref, POINTER, c_char_p, c_bool, c_uint, c_void_p
from . import ffi, targets
# Just check these weren't optimized out of the DLL.
ffi.lib.LLVMPY_LinkInJIT
ffi.lib.LLVMPY_LinkInMCJIT
def create_jit_compiler(module, opt=2):
"""Create an Ex... |
from collections import Counter
from operator import attrgetter
from django.db import IntegrityError, connections, transaction
from django.db.models import signals, sql
class ProtectedError(IntegrityError):
def __init__(self, msg, protected_objects):
self.protected_objects = protected_objects
sup... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/Users/ckla/Documents/workspace/opus_trunk/opus_gui/results_manager/views/results_browser.ui'
#
# Created: Sun May 10 17:20:29 2009
# by: PyQt4 UI code generator 4.4.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4... |
#!/usr/bin/env python
#
# File Name: File Name
#
# Documentation: http://docs.fourthought.com/file/name.html
#
def Test(tester):
tester.startGroup('Node-set Expressions')
tester.startTest('Creating test environment')
from Ft.Xml.XPath import ParsedExpr
from Ft.Xml.XPath import ParsedPredi... |
from __future__ import division
import os
import warnings
import numpy
import six
import chainer
from chainer import backend
from chainer.backends import cuda
from chainer.training import extension
from chainer.training import trigger as trigger_module
_available = None
def _try_import_matplotlib():
global ma... |
'''
Created on 15/03/2011
@author: gerson
'''
from django.conf import settings
from django.contrib.auth.models import User, Group
from ..models.access_control import UserAuthentication
def get_or_create_user(auth_method, user_id, email=''):
try:
# check if the given username in combination with the
... |
# -*- coding: utf-8 -*-
#
# phpMyAdmin documentation build configuration file, created by
# sphinx-quickstart on Wed Sep 26 14:04:48 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... |
from math import *
import numpy as np
import healpy as hp
import astropy.io.fits as pyfits
import time
import matplotlib.pyplot as plt
from multiprocessing import Pool
from multiprocessing.dummy import Pool as ThreadPool
import numpy.random
import os, errno
import subprocess
twopi = 2.*pi
piover2 = .5*pi
verbose = Fals... |
# -*- coding: utf-8 -*-
import base64
import logging
import sys
import threading
import openerp
import openerp.report
from openerp import tools
from openerp.exceptions import UserError
import security
_logger = logging.getLogger(__name__)
# TODO: set a maximum report number per user to avoid DOS attacks
#
# Report... |
# tests are fairly 'live' (but safe to run)
# setup authorized_keys for logged in user such
# that the user can log in as themselves before running tests
import unittest
import getpass
import ansible.runner
import os
import shutil
import time
import tempfile
from nose.plugins.skip import SkipTest
def get_binary(na... |
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
SIMPLE_INPUT_TYPES = ('t... |
import mock
from django.conf import settings
from django.http import Http404
from django.test import TestCase
from cradmin_legacy import cradmin_testhelpers
from model_bakery import baker
from devilry.devilry_admin.views.subject_for_period_admin import subject_redirect
class TestSubjectRedirect(TestCase, cradmin_t... |
import math
import chainer
import chainer.functions as F
import chainer.links as L
class NIN(chainer.Chain):
"""Network-in-Network example model."""
insize = 227
def __init__(self):
w = math.sqrt(2) # MSRA scaling
super(NIN, self).__init__(
mlpconv1=L.MLPConvolution2D(
... |
# azurerm unit tests - insights
# To run tests: python -m unittest insights_test.py
# Note: The insights test unit creates a VM scale set in order to add autoscale rules.
# Therefore it is a fairly good way to exercise storage, network, compute AND insights functions.
import azurerm
from cryptography.hazmat.primitive... |
#############################################################################
##
## Copyright (C) 2015 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing
##
## This file is part of Qt Creator.
##
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance wit... |
"""
This module provides WSGI application to serve the Home Assistant API.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/http/
"""
from datetime import timedelta
from socketserver import ThreadingMixIn
import gzip
import io
import hmac
import json
impo... |
# Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... |
#!/usr/bin/env python
# -*- coding: ascii -*-
r"""
=========================
Write benchmark results
=========================
Write benchmark results.
:Copyright:
Copyright 2014 - 2015
Andr\xe9 Malo or his licensors, as applicable
:License:
Licensed under the Apache License, Version 2.0 (the "License");
you ... |
# coding=utf-8
from __future__ import print_function, division, absolute_import
"""
This module contains the bases classes needed for plotting.
"""
__author__ = "Pierre Barbier de Reuille <pierre@barbierdereuille.net>"
from PyQt4.QtGui import (QColor, QDialog, QFontDialog, QFont, QDoubleValidator, QPicture,
... |
import struct, time, array, os
from math import pi
from Sire.Maths import Vector
from Sire.Mol import *
from Sire.IO import *
#
# Adapted from Peter Eastman's code in OpenMM python API to write a DCD file
#
class DCDFile(object):
"""DCDFile provides methods for creating DCD files.
DCD is a file format for... |
from random import shuffle
from skimage.morphology import skeletonize, medial_axis
from tqdm import tqdm
from scipy import signal
import scipy.ndimage.filters as fi
import pickle
import glob
import bz2
import multiprocessing
from multiprocessing import Pool
from functools import partial
from IO import *
from Utilities... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of convertdate.
# http://github.com/fitnr/convertdate
# Licensed under the GPL-v3.0 license:
# http://opensource.org/licenses/MIT
# Copyright (c) 2016, fitnr <fitnr@fakeisthenewreal>
from datetime import datetime
from . import gregorian
from . import ... |
"""MNE software for MEG and EEG data analysis."""
# PEP0440 compatible formatted version, see:
# https://www.python.org/dev/peps/pep-0440/
#
# Generic release markers:
# X.Y
# X.Y.Z # For bugfix releases
#
# Admissible pre-release markers:
# X.YaN # Alpha release
# X.YbN # Beta release
# X.YrcN # Rele... |
"""Regression tests for urllib"""
import collections
import urllib
import httplib
import io
import unittest
import os
import sys
import mimetools
import tempfile
from test import test_support
from base64 import b64encode
def hexescape(char):
"""Escape char as RFC 2396 specifies"""
hex_repr = hex(ord(char))[... |
from fun_views.patterns.form.render import form_render_pattern
from fun_views.views.utils import (get_context_base, make_base_view,
not_set_get_form_class,
not_set_get_template_name, prefer_func,
prefer_literal, ren... |
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
#
# 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... |
# Copyright 2017 reinforce.io. 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... |
import pytest
import doctest
from insights.tests import context_wrap
from insights.parsers import SkipException
from insights.parsers import pmrep
from insights.parsers.pmrep import PMREPMetrics
PMREPMETRIC_DATA = """
Time,"network.interface.out.packets-lo","network.interface.out.packets-eth0","network.interface.colli... |
"""
Vishnu session.
"""
from __future__ import absolute_import
from http.cookies import Morsel
from http.cookies import SimpleCookie
from datetime import datetime, timedelta
import hashlib
import hmac
import logging
import sys
import uuid
from vishnu.cipher import AESCipher
from vishnu.backend.config import Base as... |
import pymel.core as pm
import grip
import metautil.miscutil as miscutil
import metautil.rigutil as rigutil
import metautil.shapeutil as shapeutil
def rig_cog_chain(start_joint, end_joint, scale):
start_joint = pm.PyNode(start_joint)
end_joint = pm.PyNode(end_joint)
chain = miscutil.get_nodes_between(start... |
# -*- coding: utf-8 -*-
import os
from google.appengine.api import app_identity
from google.appengine.ext import ndb
import modelx
import util
# The timestamp of the currently deployed version
TIMESTAMP = long(os.environ.get('CURRENT_VERSION_ID').split('.')[1]) >> 28
class Base(ndb.Model, modelx.BaseX):
create... |
"""
Precompute coefficients of Temme's asymptotic expansion for gammainc.
This takes about 8 hours to run on a 2.3 GHz Macbook Pro with 4GB ram.
Sources:
[1] NIST, "Digital Library of Mathematical Functions",
https://dlmf.nist.gov/
"""
from __future__ import division, print_function, absolute_import
import os
f... |
# Copyright (c) 2011 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.
ANDROID_WHITELISTED_LICENSES = [
'A(pple )?PSL 2(\.0)?',
'Android Software Development Kit License',
'Apache( Version)? 2(\.0)?',
'(New )?([23]-C... |
"""
This module contains a collection of commonly encountered HTTP exceptions.
This allows all these http exceptions to be treated in the same way and simplifies the return of errors to the user.
"""
from errors import ErrorMessage
__author__ = "Benjamin Schubert <ben.c.schubert@gmail.com>"
class BaseHTTPExceptio... |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <terry.yinzhe@gmail.com> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is w... |
# Seamless DVD Player
# Copyright (C) 2004 Martin Soto <martinsoto@users.sourceforge.net>
#
# 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)... |
#!/usr/bin/env python
# coding: utf8
from setuptools import setup, find_packages
# Get long_description from README
import os
here = os.path.dirname(os.path.abspath(__file__))
f = open(os.path.join(here, 'README.rst'))
long_description = f.read().strip()
f.close()
setup(
name='onkyo-eiscp',
version='1.2.8',
... |
# coding: utf-8
import os.path
from io import StringIO, BytesIO
from urllib.parse import urljoin
import requests
from django.contrib.auth import authenticate
from django.core.files.storage import get_storage_class
from django.core.files.uploadedfile import UploadedFile
from django.urls import reverse
from django.test ... |
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... |
from datetime import datetime
from freezegun import freeze_time
from unittest import mock
from tests.blindrtest import BlindrTest
from tests.factory_boy.user_factory import UserFactory
from blindr.models.user import User
class UserTests(BlindrTest):
@freeze_time('2015-01-01')
@mock.patch('blindr.models.user.... |
from selector_finder import find_selector
from dragnet import content_extractor
from collections import OrderedDict
from unidecode import unidecode
from bs4 import BeautifulSoup
from simurg.clients.fetcher import fetch
from simurg.util import is_valid
import logging
import os.path
import time
import re
def clean_soup... |
import unittest
from warnings import warn as avisar
import scipy.stats as estad
from pruebas.test_central.rcrs.modelo_calib import generar
from tikon.calibrador.spotpy_ import EMV, RS, BDD, CMEDZ, MC, MLH, CAACAA, CAA, ECBUA, ERP, CMMC, CalibSpotPy
from tikon.ecs.aprioris import APrioriDist
class PruebaSpotPy(unitte... |
import random
import json
from flask import Flask, render_template, url_for, request, redirect, session
from flask_oauthlib.client import OAuth
app = Flask(__name__)
app.secret_key = "Ayy lmao"
oauth_key="763519b5c8d1c478f44296c2b6c82dcb772dc4b0fbafa66b68d889cd41da4d71"
oauth_secret="6ecb90487aaf53377f8a0e536c7a4a4b... |
# Copyright 2009 - 2011 Burak Sezer <purak@hadronproject.org>
#
# This file is part of lpms
#
# lpms is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... |
from django.conf.urls import url
from django.views.generic import DetailView, ListView
from multigtfs.models import (
Agency, Block, Fare, FareRule, Feed, FeedInfo, Route, Service, ServiceDate,
Shape, ShapePoint, Stop, StopTime, Trip, Zone)
from exploreapp.views import (
ByFeedListView, FareRuleByFareListV... |
###############################################################################
##
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary forms, with or without
## modification, ... |
# Copyright (C) 2013-2015 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Fox Wilson
#
# 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 ve... |
#!/usr/bin/env python
import os.path
import fireplace
from setuptools import setup, find_packages
README = open(os.path.join(os.path.dirname(__file__), "README.md")).read()
CLASSIFIERS = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Pub... |
import re
import os
import spidermonkey
class Extractor:
__mixer_js_lib = open(os.path.dirname(__file__) + '/../javascript/mixer.js', 'r').read()
__js_block = re.compile(r"(<script.+?runat=\"proxy\".*?>)(.*?)(</script>)", re.S)
__script_start = re.compile(r"<script.+?runat=\"proxy\".*?>")
__script_src = re.compile... |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.