text stringlengths 475 200k |
|---|
#!/usr/bin/env python
__author__ = "Timothy Tickle"
__copyright__ = "Copyright 2014"
__credits__ = [ "Timothy Tickle" ]
__license__ = "MIT"
__maintainer__ = "Timothy Tickle"
__email__ = "[EMAIL]"
__status__ = "Development"
import matplotlib.pyplot as plt
from matplotlib_venn import venn2
import quickPlot as qp
cla... |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2013 Acysos S.L. (http://acysos.com)
# Ignacio Ibeas Izquierdo <[EMAIL]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
from django.conf import settings
from django.contrib.redirects.models import Redirect
from django.contrib.sites.shortcuts import get_current_site
from django.contrib.redirects.middleware import RedirectFallbackMiddleware
from froide.helper.utils import update_query_params
class PathRedirectFallbackMiddleware(Redirec... |
"""
Intent Views
"""
import logging
from rest_framework import viewsets
from ozpcenter import permissions
import ozpcenter.api.intent.model_access as model_access
import ozpcenter.api.intent.serializers as serializers
logger = logging.getLogger('ozp-center.' + str(__name__))
class IntentViewSet(viewsets.ModelView... |
import wx
_ = wx.GetTranslation
import wx.propgrid as grid
class FiltersAdds(grid.PyTextCtrlEditor):
def __init__(self):
grid.PyTextCtrlEditor.__init__(self)
def CreateControls(self, property_grid, property, pos, sz):
# Create and populate buttons-subwindow
buttons = grid.PGMultiButt... |
from panda3d.core import *
from panda3d.direct import *
from toontown.toonbase.ToontownGlobals import *
from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
import random
from otp.level import DistributedLevel
from direct.directnotify import DirectNotifyGlobal
import CountryClubRoomB... |
import sys
import subprocess
BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[94m', '\033[91m', \
'\33[97m', '\33[93m', \
'\033[1;35m', '\033[1;32m', \
'\033[0m'
def ge... |
#!/usr/bin/env python
################################################################################
# Copyright (C) 2011-2015 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
NAME = 'bayespy'
DESCRIPTION = 'V... |
import sys
import asyncio
import socket
import struct
import traceback
from concurrent.futures import FIRST_COMPLETED
from .misc import ensure_future
from .log import logger
class UDPRelayProtocol(asyncio.Protocol):
def __init__(self, stream_down):
super().__init__()
self._stream_down = stream_dow... |
"""
wmliterator.py -- Python routines for navigating a Battle For Wesnoth WML tree
Author: Sapient (Patrick Parker), 2007
Purpose:
The WmlIterator class can be used to analyze and search the structure of WML
files non-invasively (i.e. preserving existing line structure), and its main
use is to determine when a tran... |
# This component provides a tuple that represents the running period
#
# Ladybug: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari
#
# This file is part of Ladybug.
#
# Copyright (c) 2013-2015, Mostapha Sadeghipour Roudsari <[EMAIL]>
# Ladybug is free software; you can redist... |
from __future__ import print_function, unicode_literals
from datetime import datetime
from random import randint
import sys
from django.core.management.base import BaseCommand
from django.db import transaction
from candidates.models import PersonExtra
class Command(BaseCommand):
help = "Record the current ver... |
#!/usr/bin/env python3
"""Combine logs from multiple bitcoin nodes as well as the test_framework log.
This streams the combined log output to stdout. Use combine_logs.py > outputfile
to write to an outputfile."""
import argparse
from collections import defaultdict, namedtuple
import heapq
import itertools
import os
i... |
# -*- coding: utf-8 -*-
"""
***************************************************************************
slopearea_multi.py
---------------------
Date : March 2015
Copyright : (C) 2015 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
***********... |
#!/usr/bin/env python3
#
#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===-------------------------------------... |
import unittest
from androguard.misc import AnalyzeDex
import sys
import re
from androguard.misc import AnalyzeAPK
from androguard.decompiler.dad.decompile import DvMethod, DvClass
class DecompilerTest(unittest.TestCase):
def testSimplification(self):
h, d, dx = AnalyzeDex("examples/tests/Test.dex")
... |
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... |
# Copyright (C) 2013, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from __future__ import print_function
import os, subprocess
from os.path import dirname, abspath
from zeroinstall import SafeException
def ensure_no_uncommitted_changes(path):
child = subprocess.Popen(["git", "dif... |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
#
# 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 you... |
# -*- coding: utf-8 -*-
import io
from parser import *
import symbol
import sys
import token
import types
def print_bool(val):
sys.stdout.write('1' if val else '0')
def print_int(val):
sys.stdout.write(str(val))
sys.stdout.write(',')
def print_string(str):
print_int(len(str))
sys.stdout.write(str)
def print_s... |
# copyright 2016 twitter. 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 agree... |
from __future__ import print_function
from xml.etree.cElementTree import parse
from Tools.XMLTools import elementsWithTag, mergeText, stringToXML
from enigma import eDVBCIInterfaces, eDVBCI_UI, eEnv, eServiceCenter, eServiceReference
from timer import TimerEntry
import NavigationInstance
import os
class CIHelper:
... |
#!/usr/bin/env python
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
import inspect, time
from io import BytesIO
from repr import repr
from functo... |
import math
import warnings
import numpy
import chainer
from chainer.backends import cuda
from chainer import function_node
from chainer import utils
from chainer.utils import type_check
_erfc_cpu = None
class Erfc(function_node.FunctionNode):
@property
def label(self):
return 'erfc'
def che... |
"""
Takes user input.
"""
import sys
def query_yes_no(question, default="yes"):
"""Ask a yes/no question via raw_input() and return their answer.
"question" is a string that is presented to the user.
"default" is the presumed answer if the user just hits <Enter>.
It must be "yes" (the default),... |
#! /usr/bin/python
'''
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ \
2 2
/ \ / \
3 4 4 3
But the following is not:
1
/ \
2 2
\ \
3 3
'''
from node_struct import TreeNode
class Soluti... |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
BLAH BLAH GPL
https://github.com/pybliss/rhscheck/blob/master/rhscheck.py
https://github.com/ssato/sos-analyzer
"""
import argparse
import sys
import os
import re
from rpmUtils.miscutils import compareEVR
import ConfigParser
import rhndb
#TODO: detect kernel ... |
# Copyright 2008 (C) Nicira, Inc.
#
# This file is part of NOX.
#
# NOX 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.
#
# NOX is d... |
#!/usr/bin/env/python3
import os
import sys
from urllib.parse import urljoin
def upload_datasets_to_galaxy(args, galaxy_instance=None):
"""
Function to upload a folder into Galaxy Data Libraries
:param galaxy_instance:
:return:
"""
# Get all parameters
libraries_root = args.libraries_ro... |
from test_plus.test import TestCase
from django_private_chat.views import *
from django.test import RequestFactory
from django.urls import reverse
from django_private_chat.models import *
class TestDialogListView(TestCase):
def setUp(self):
self.factory = RequestFactory()
self.owner_user = self.ma... |
#
# Copyright (c) 2008--2013 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... |
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from mezzanine.core.views import direct_to_template
# my page_processors worked fine, then stopped. This magic
# was suggested. And appears to w... |
# BEGIN_COPYRIGHT
#
# Copyright 2009-2021 CRS4.
#
# 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 agree... |
import re
import cgi
import datetime
import json
import urllib
import os
from cStringIO import StringIO
from nose.tools import eq_, ok_
import mock
import pyquery
from django.conf import settings
from django.contrib.auth.models import User, Group, Permission
from django.core import mail
from django.utils import timez... |
class GpioException(BaseException):
pass
class Gpio(object):
# https://sourceforge.net/p/raspberry-gpio-python/code/ci/default/tree/source/common.h
# https://sourceforge.net/p/raspberry-gpio-python/code/ci/default/tree/source/c_gpio.h
MODE_UNKNOWN = -1
BOARD = 10
BCM = 11
OUT = 0
IN = ... |
# Copyright (c) 2018 PaddlePaddle 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 app... |
#!/usr/bin/env python
#
# stm32_mem.py: STM32 memory access using USB DFU class
# Copyright (C) 2011 Black Sphere Technologies
# Written by Gareth McMullin <[EMAIL]>
# Modified by Felix Ruess <[EMAIL]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publ... |
# ----------------------------------------------------------------------------
# Copyright 2015-2016 Nervana Systems 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.apa... |
'''
Copyright (C) 2021 Gitcoin Core
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This progra... |
import sys
import time
import random
def generatePoint(numDimensions):
return [ random.random() for d in range(numDimensions) ]
def pointToStr(point):
pointStr = ""
for i in range(len(point) - 1):
pointStr += "{} ".format(point[i])
pointStr += str(point[-1])
return pointStr
if __name__ == "__main__":
# Seed ... |
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... |
# ===============================================================================
# Copyright 2011 Jake Ross
#
# 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... |
from base64 import b64encode
from django.conf import settings
from mediagenerator.generators.bundles.base import Filter, FileFilter
from mediagenerator.utils import media_url, prepare_patterns, find_file
from mimetypes import guess_type
import logging
import os
import posixpath
import re
url_re = re.compile(... |
from pprint import pprint
from dateutil.parser import parse
from arrow import Arrow
import requests
runi = lambda s: s.encode('cp850', errors='replace').decode('cp850')
BASE = 'https://graph.facebook.com/v2.0/'
DAYS = [
'monday',
'tuesday',
'wednesday',
'thursday',
'friday',
'saturday',
... |
class OccurrenceReplacer(object):
"""
Replace missing occurrences in a date rage.
When getting a list of occurrences, the last thing that needs to be done
before passing it forward is to make sure all of the occurrences that
have been stored in the datebase replace, in the list you are returning,
... |
from datetime import date, datetime
from coapthon.resources.resource import Resource
import time
from lwm2mthon import defines
from lwm2mthon.defines import LWM2MResourceType
from lwm2mthon.utils import TreeVisit
__author__ = 'giacomo'
class Device(Resource):
def __init__(self, name="3"):
super(Device, s... |
#!/usr/bin/python
#
# (c) 2015, Steve Gargan <[EMAIL]>
# (c) 2018 Genome Research Ltd.
# 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',
... |
#! /usr/bin/python
# Python ctypes bindings for VLC
#
# Copyright (C) 2009-2010 the VideoLAN team
# $Id: $
#
# Authors: Olivier Aubert <olivier.aubert at liris.cnrs.fr>
# Jean Brouwers <MrJean1 at gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the G... |
#! python2
#designed with Pythonista 3 for iOS
import unicodedata
import binascii
import re
from bitcoin.main import *
from bitcoin.pyspecials import *
import pyscrypt
try:
from Crypto.Cipher import AES
except ImportError:
pass
# TODO: fix so it will import crypto/aes.py
try:
from strxor import strx... |
# Copyright (c) 2016 Google, Inc
#
# SPDX-License-Identifier: GPL-2.0+
#
# Base class for all entries
#
# importlib was introduced in Python 2.7 but there was a report of it not
# working in 2.7.12, so we work around this:
# http://lists.denx.de/pipermail/u-boot/2016-October/269729.html
try:
import importlib
... |
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that rec... |
'''OpenGL extension EXT.texture
This module customises the behaviour of the
OpenGL.raw.GL.EXT.texture to provide a more
Python-friendly API
Overview (from the spec)
The original intention of this extension was simply to support various
numeric resolutions of color components in texture images. While it
accomp... |
import sys
import os
import magic
import difflib
import yum # pylint: disable=import-error
import operator
def main(args):
try:
sourcedir, targetdir = args[1], args[2]
except IndexError:
print("invalid argument count")
print("usage: python {0} sourcetree targettree".format(arg... |
# -*- coding: utf-8 -*-
class Report:
def display_asset(assets_list):
if type(assets_list) is list:
if len(assets_list) > 0:
return True
def assets(page):
text = ''
for asset_type in sorted(page.keys()):
assets_list = page[asset_type]
... |
# coding: utf-8
from __future__ import unicode_literals
import re
import json
import itertools
from .common import InfoExtractor
from ..utils import (
determine_ext,
error_to_compat_str,
ExtractorError,
int_or_none,
parse_iso8601,
sanitized_Request,
str_to_int,
unescapeHTML,
)
class... |
# -*- coding: utf-8 -*-
import lxml.html
import traceback
from dateutil import parser
from django.utils import timezone
from django.template.loader import get_template
from scotuswebcites import settings
from discovery.Pdf import Url
from discovery.Logger import Logger
from opinions.models import Opinion
from justices... |
import json
def read_setup():
file = json.load(open("data/setup.json","r"))
return file
def main_switch(data):
"""returns 0 for testing and 1 for operational use."""
main_switch = int(data["main_switch"])
return main_switch
def temperatures(data):
Tfav = int(data["temperatures"]["Tfav"]) #F... |
#*********************************************************************************
#
# Inviwo - Interactive Visualization Workshop
#
# Copyright (c) 2013-2019 Inviwo Foundation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the f... |
#!/usr/bin/python
from Adafruit_PWM_Servo_Driver import PWM
import time
import argparse
frequencyFlicker = 240; # Set the output to pulse at 240hz
parser = argparse.ArgumentParser(description='Set light brightness')
parser.add_argument('-r', '--red', help='Red Channel Percentage', required=False)
parser.add_argumen... |
#coding:utf-8
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn import svm
from sklearn.neighbors import KNeighborsClassifier
from sklearn.linear_model impo... |
# Copyright (c) 2018 PaddlePaddle 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 appli... |
# Copyright 2007 Robin Gottfried <[EMAIL]>
#
# 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 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... |
from codecs import open
from os import path
from setuptools import setup, find_packages
# Get the long description from the README file
with open(path.join(path.abspath(path.dirname(__file__)), 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name="graphscraper",
version="0.5.0",
... |
from __future__ import absolute_import
from django import forms
from django.db.models import Q
from django.contrib.auth.models import Group
from osf.models import AdminProfile
class LoginForm(forms.Form):
email = forms.CharField(label=u'Email', required=True)
password = forms.CharField(
label=u'Pass... |
#!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2011, Kovid Goyal <[EMAIL]>'
__docformat__ = 'restructuredtext en'
import time
from datetime i... |
import shelve
import os
from file_op import make_sure_file_dir_exists
class KVStoreShelve(object):
def __init__(self, data_dir='', db_name=None, writeback=True):
self.db_name = db_name or 'kv_database'
self.file_path = os.path.join(data_dir, self.db_name)
self.inst = None
self.writ... |
##########################################################################
#
# Copyright (c) 2018, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... |
import re
import itertools
from lxml import html
from scrapy.http.request.form import _get_inputs
class GenericForm:
def __init__(self, **kwargs):
self.kwargs = kwargs
def _pick_node(self, doc, selector):
nodes = doc.xpath(selector['xpath'])
if nodes:
return nodes[0]
... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of Radar.
Radar is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.... |
#!/usr/bin/env python
"""
This script starts a process locally, using <client-id> <hostfile> as inputs.
An optional 4th argument "true"/"false" indicates to export hadoop libraries
or not (default is "true").
"""
import os
from os.path import dirname
from os.path import join
import time
import sys
if len(sys.argv) !... |
"""
Copyright 2017 Nicolas Ramirez
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 i... |
"""
chdir_tests
~~~~~~~~~~~
Unit tests for the chdir module.
:copyright: © 2014 by Petr Zemek <[EMAIL]>
:license: BSD, see LICENSE for more details
"""
import os
import unittest
from unittest import mock
from chdir import chdir
# Uncomment to test chdir2 instead of chdir:
# from chdir2 import ch... |
# Copyright (c) 2019 Rackspace US, 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... |
# -*- coding: utf-8 -*-
# slip.dbus.bus -- augmented dbus buses
#
# Copyright © 2009, 2011 Red Hat, Inc.
#
# 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
# ... |
#Chuong trinh Quan ly hoc sinh. Xay dung ham tim kiem, them moi
#haind
#python
import json
import os
#tao menu lua chon
def menu():
print '''
Chao mung ban den voi chuong trinh Quan ly hoc sinh!
Su dung:
1. Them moi hoc sinh
2. Tim kiem hoc sinh
3. Load du lieu hoc sinh
4. Luu du lieu hoc sinh
5. Thoat... |
from pybullet_utils import pd_controller_stable
from pybullet_envs.deep_mimic.env import humanoid_pose_interpolator
import math
import numpy as np
chest = 1
neck = 2
rightHip = 3
rightKnee = 4
rightAnkle = 5
rightShoulder = 6
rightElbow = 7
leftHip = 9
leftKnee = 10
leftAnkle = 11
leftShoulder = 12
leftElbow = 13
join... |
# Copyright 2014 Muchos authors (see 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... |
#
# paths.py
#
# Copyright (C) 2017 - 2018 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPL v2
#
# All the necessary paths used in this project.
#
from os.path import abspath, dirname, join
LOCAL_DIR = abspath(join(dirname(__file__), '..'))
BASE_DIR = '/usr/share/kano-settings'
# When ... |
""" This is the Bokeh charts testing interface.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with thi... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, unicode_literals
from logging import getLogger
from .common import ItemBase, process_path
from ..plex_api import API
from .. import plex_functions as PF, app, variables as v
LOG = getLogger('PLEX.tvshows')
class TvShowMi... |
import matplotlib.pyplot as plt
from sunpy import map
import numpy as np
import os
import copy
from skimage.feature import canny
from scipy import ndimage
def mask_sun(array,pxval):
#This function will apply a centered filled circular mask
#of radius rad and pxval values to the input array
r=172 #Empirical... |
#!/usr/bin/env python3
import shlex
import logging
import os
import re
import subprocess
from typing import List
from util import ARCHITECTURES, BASE, SYSROOT, env_vars, ndk_unified_toolchain, parse_args
logger = logging.getLogger(__name__)
class Package:
def __init__(self, target_arch_name: str, android_api_lev... |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
from frappe.utils.minify import JavascriptMinify
"""
Build the `public` folders and setup languages
"""
import os, frappe, json, shutil, re
# from cssmin import cssmin
app_pat... |
import os
import shutil
import sys
from threading import Lock
from tempfile import NamedTemporaryFile
from pyspark import accumulators
from pyspark.accumulators import Accumulator
from pyspark.broadcast import Broadcast
from pyspark.files import SparkFiles
from pyspark.java_gateway import launch_gateway
from pyspark.s... |
#!/usr/bin/env python3
import argparse, sys, os, glob, re, datetime, signal, logging
import dbc.generator, dbc.db, dbc.parser, dbc.file, dbc.config
logging.basicConfig(level = logging.INFO,
datefmt = '%H:%M:%S',
format = '[%(asctime)s] %(levelname)s: %(message)s')
parser = argparse.ArgumentParser(us... |
# -*- coding: utf-8 -*-
################################################################################
# _____ _ _____ _ #
# / ____(_) / ____| | | #
# | | _ ___ ___ ___ | (___ _ _ ___| |_... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import socket
import autonetkit.ank_json
import autonetkit.config as config
import autonetkit.log as log
from autonetkit.ank_utils import call_log
use_http_post = config.settings['Http Post']['active']
if use_http_post:
import urllib
@call_log
def format_http_url(host=N... |
# -*- coding: utf-8 -*-
import requests
import werkzeug
import datetime
import simplejson
import openerp
from openerp.addons.saas_utils import connector, database
from openerp.addons.web.http import request
from openerp.tools import config
from openerp import models, fields, api, SUPERUSER_ID
from openerp import http
... |
#code: utf-8 -*-
#author: hwang
#created on: May 6th, 2017
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon
import numpy as np
import csv
DATA_DIR = "../data_set/data_to_analyze.csv"
#attributes whose type should be numerical
PRE_DEFINE_SET = set([2, 7, 8, 9, 14, 15, 16, 18, 19, 20, 25, 29, 30])... |
#!/usr/bin/env python
# coding=utf-8
import sys
from lifxlan import BLUE, COLD_WHITE, CYAN, GOLD, GREEN, LifxLAN, \
ORANGE, PINK, PURPLE, RED, WARM_WHITE, WHITE, YELLOW
colors = {
"red": RED,
"orange": ORANGE,
"yellow": YELLOW,
"green": GREEN,
"cyan": CYAN,
"blue": BLUE,
"purple... |
# Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
# coding: utf-8
from __future__ import absolute_import
import logging
from flask.ext import restful
from google.appengine.ext import blobstore
from google.appengine.ext import deferred
from google.appengine.ext import ndb
import flask
from api import helpers
import auth
import model
import util
from main import ap... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
# TO... |
# This file is part of the MapProxy project.
# Copyright (C) 2010 Omniscale <http://omniscale.de>
#
# 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... |
# -*- coding: utf-8 -*-
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Zork configs."""
from __future__ import print_function
BUILD_WORKON_PACKAGES = ('coreboot-zork',)
BUILD_PACKAGES = BUILD_WOR... |
#-*- coding: utf-8 -*-
# portage.py
# Module to work with portage package manager class
#
# Copyright (C) 2016 Jakub Kadlcik
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at yo... |
"""
The MultiSpectral Imaging Toolkit (MSITK)
Copyright (c) German Cancer Research Center,
Computer Assisted Interventions.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE for details
"""... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.