text stringlengths 12 6.59M |
|---|
'''
Project: Farnsworth
Author: Karandeep Singh Nagra
'''
from django.db import models
from django.contrib.auth.models import User
from farnsworth.settings import DEFAULT_SEMESTER_HOURS, DEFAULT_CUTOFF, \
DEFAULT_WORKSHIFT_HOURS
from base.models import UserProfile
from managers.models import Manager
from workshift.... |
# -*- coding: utf-8 -*-
"""
pygments.lexers.web
~~~~~~~~~~~~~~~~~~~
Lexers for web-related languages and markup.
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import copy
from pygments.lexer import RegexLexer, ExtendedReg... |
#!/usr/bin/env python
'''
Kick off the napalm-logs engine.
'''
# Import python stdlib
import os
import sys
import time
import signal
import logging
import optparse
# Import third party libs
import yaml
# Import napalm-logs
import napalm_logs
import napalm_logs.config as defaults
log = logging.getLogger(__name__)
... |
# -*- coding: utf-8 -*-
"""
pygments.lexers.web
~~~~~~~~~~~~~~~~~~~
Lexers for web-related languages and markup.
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import copy
from pygments.lexer import RegexLexer, ExtendedReg... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Sam McCaffrey"
__copyright__ = "Copyright 2017, Sam McCaffrey"
__license__ = "Apache-2.0"
__maintainer__ = "Sam McCaffrey"
__email__ = "samccaff@asu.edu"
__status__ = "Production"
from . import authorization
from . import version
from .editor import Editor
... |
# -*- coding: utf-8 -*-
"""
pygments.lexers.web
~~~~~~~~~~~~~~~~~~~
Lexers for web-related languages and markup.
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import copy
from pygments.lexer import RegexLexer, ExtendedReg... |
# -*- coding: utf-8 -*-
"""
pygments.lexers.web
~~~~~~~~~~~~~~~~~~~
Lexers for web-related languages and markup.
:copyright: 2006-2007 by Georg Brandl, Armin Ronacher,
Tim Hatch <tim@timhatch.com>.
:license: BSD, see LICENSE for more details.
"""
import re
try:
set
except Name... |
# -*- coding: utf-8 -*-
"""
pygments.lexers.web
~~~~~~~~~~~~~~~~~~~
Lexers for web-related languages and markup.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import copy
from pygments.lexer import RegexLexer, ExtendedReg... |
#
# __COPYRIGHT__
#
# 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,
# distribute, sublicen... |
# -*- coding: utf-8 -*-
"""
pygments.lexers.web
~~~~~~~~~~~~~~~~~~~
Lexers for web-related languages and markup.
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import copy
from pygments.lexer import RegexLexer, ExtendedReg... |
# -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
import os
import sys
from gunicorn.errors import ConfigError
from gunicorn.app.base import Application
from gunicorn import util
class WSGIApplication(Application):
def init(self, parse... |
# Copyright 2008 Nokia Siemens Networks Oyj
#
# 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... |
# -*- coding: utf-8 -*-
"""
pygments.styles.vim
~~~~~~~~~~~~~~~~~~~
A highlighting style for Pygments, inspired by vim.
:copyright: 2006-2007 by Tim Hatch.
:license: BSD, see LICENSE for more details.
"""
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, ... |
#from gevent.monkey import patch_all
#patch_all()
user = 'www-data'
group = 'www-data'
logfile = '/var/www/twweb/logs/gunicorn-status.log'
workers = 5
loglevel = 'debug'
bind = '127.0.0.1:8041'
timeout = 300
worker_connections = 1000
|
import sys, os
sys.path = [os.path.dirname(os.path.abspath(__file__)) + "/.."] + sys.path
from graphserver.core import *
from graphserver.engine import Engine
from graphserver import util
import time
import unittest
import pickle
import os
RESOURCE_DIR=os.path.dirname(os.path.abspath(__file__))
def find_resource(s):... |
# Copyright (c) 2010 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.
{
'targets': [
{
'target_name': 'All',
'type': 'none',
'xcode_create_dependents_test_runner': 1,
'dependencies': [
... |
from firedrake import (split, LinearVariationalProblem, Constant,
LinearVariationalSolver, TestFunctions, TrialFunctions,
TestFunction, TrialFunction, lhs, rhs, DirichletBC, FacetNormal,
div, dx, jump, avg, dS_v, dS_h, ds_v, ds_t, ds_b, inner, dot, gr... |
import sys
sys.path.append('../')
from pyhparser.grammar import Grammar
from pyhparser.classParser import ClassParser
from pyhparser.utils import *
class Pyhparser:
def __init__(self, inputText, parseText, classes = [], stringConnector = " "): #constructor
self.inputText = inputText #the inp... |
#
# Copyright (c) 2004-2005 Specifix, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.opensource.o... |
# -*- coding: utf-8 -*-
"""
:mod:`gygax.modules.gatherer` --- Module to track live channels on twitch.tv
============================================================================
"""
import codecs
import collections
import json
from urllib import parse, request
from gygax import irc
def check_channels(*channels)... |
import os
import numpy as np
import uuid
import hashlib
import sys, getopt
from collections import namedtuple, OrderedDict, defaultdict
import zlib
from wheezy.template.engine import Engine
from wheezy.template.ext.core import CoreExtension
from wheezy.template.loader import DictLoader
IMZML_TEMPLATE = """\
@require(... |
#
# Copyright (c) 2004 Specifix, Inc.
# All rights reserved
#
"""
Contains the functions which builds a recipe and commits the
resulting packages to the repository.
"""
from build import *
from repository import changeset
from repository import filecontents
import files
from repository import fsrepos
import helper
i... |
from wurstminebot import commands
from wurstminebot import core
from wurstminebot import loops
import minecraft
from wurstminebot import nicksub
import re
import threading
import traceback
def endMOTD(sender, headers, message):
irc_config = core.config('irc')
chans = set(irc_config.get('channels', []))
if ... |
# vim: set fileencoding=UTF-8
import re
from datetime import timedelta
from django.forms import Field
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from django.utils.dateparse import parse_duration
from django.utils.duration import duration_string
MICRO = t... |
# Lots Of Sprites
'''
Results for 2000 sprites:
platform us per sprite per frame
---------------------------------------------------------------------
Intel C2Quad Q6600 (2.4GHz), GeForce 7800 18.2478245656
Intel C2Duo T7500 (2.2GHz), GeForce 8400M GS 19.115903827
AMD 64 3500... |
"""Logistic regression.
Logistic regression is a probabilistic, linear classifier. It is parametrized
by a weight matrix :math:`W` and a bias vector :math:`b`. Classification is
done by projecting data points onto a set of hyperplanes, the distance to
which is used to determine a class membership probability.
Mathema... |
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2011, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "Ian Goodfellow"
import time
from pylearn2.models.model import Model
from theano import config, function
import theano.tensor as T
import numpy as np
i... |
import collections
import numpy as np
import theano
import theano.tensor as TT
class Filter:
"""Filter an arbitrary theano.shared"""
def __init__(self, pstc, name=None, source=None, shape=None):
"""
:param float pstc:
:param string name:
:param source:
:type source:
... |
#------------------------------------------------------------------------------
# Copyright (c) 2008 Richard W. Lincoln
#
# 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 restricti... |
# ----------------------------------------------------------------------------
# Copyright 2014-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... |
#!/usr/bin/env python
# coding=utf-8
"""
This module implements input and output processing from QChem.
"""
import copy
import re
import numpy as np
from string import Template
from pymatgen import zopen, SymmOp
from pymatgen.core.structure import Molecule
from pymatgen.core.units import Energy
from pymatgen.serialize... |
import sys
import time
from data_util.calcthread import CalcThread
def map_getattr(classInstance, classFunc, *args):
"""
Take an instance of a class and a function name as a string.
Execute class.function and return result
"""
return getattr(classInstance,classFunc)(*args)
def map_ap... |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
# (C) 2011 - 2013 Therp BV (<http://therp.nl>).
# (C) 2013 - 2014 ACSONE SA (<http://acsone.eu>).
#
# All other contributi... |
from __future__ import absolute_import, print_function, unicode_literals
import pickle
from builtins import dict, str
import os
import re
import boto3
import logging
import botocore.session
from time import sleep
import matplotlib as mpl
from numpy import median, arange, array
from indra.tools.reading.util.reporter ... |
from functools import wraps
import os
import click
from .context import pass_context
STAGES = [
'development',
'preview',
'staging',
'production',
]
@click.group()
@click.argument('stage', nargs=1, type=click.Choice(STAGES))
@click.argument('environment', nargs=1)
@pass_context
def main(ctx, stage... |
"""
Functions and classes related to scripting, including `MelGlobals` and `Mel`
"""
import sys, os, inspect
from getpass import getuser as _getuser
import system
import pymel.util as util
import maya.mel as _mm
import maya.cmds as _mc
import pymel.internal.pmcmds as cmds
import pymel.internal.factories as _factories
i... |
from __future__ import unicode_literals, division, absolute_import
import logging
import re
from datetime import datetime
from flexget import plugin
from flexget.event import event
try:
# TODO implement TVMaze API internally
from pytvmaze import get_show, lookup_tvrage, lookup_tvdb
from pytvmaze.exceptio... |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2011 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2011 Camptocamp Austria (<http://www.camptocamp.com>).
#
# This program is free software... |
import json
import logging
from threading import RLock
from addict import Dict
from six.moves.http_client import HTTPConnection
from six.moves.urllib.parse import urlparse
from .interface import OperatorDaemonDriver
from .process import Process
from .utils import DAY
logger = logging.getLogger(__name__)
class Meso... |
# Copyright 2012-2020 Akretion France (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from datetime import datetime, date as datelib
import u... |
__version__ = '0.1.1'
|
'''
Collection of generic testing utils and mock objs for PyRate
Author: Ben Davies
'''
import glob
from os.path import join
from shared import Ifg
from numpy import ndarray, float32, isnan, sum as nsum
SYD_TEST_DIR = "../tests/sydney_test"
SYD_TEST_OBS = join(SYD_TEST_DIR, 'obs')
SYD_TEST_DEM = join(SYD_TEST_DIR, ... |
import sys
import array
from .types_declarations import *
def load(fp):
buff = fp.read()
return BitMap.deserialize(buff)
def dump(fp, bitmap):
buff = bitmap.serialize()
fp.write(buff)
if is_python2:
range = xrange
class BitMap:
def __init__(self, values=None, obj=None):
""" Construc... |
import sys
import logging
import os
from datetime import datetime
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
import numpy as NP
import pandas as PD
logger = logging.getLogger('pyrsss.mag.fm2iaga')
HEADER_TEMPLATE = """\
Format IAGA-2002 |
... |
# Copyright (c) 2007-2015, National Documentation Centre (EKT, www.ekt.gr)
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# Redistributions of source code must retain the above copyright
# ... |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
from odoo import tools, _
from odoo.exceptions import ValidationError
import requests
import json
import time
import odoo
import logging
_logger = logging.getLogger(__name__)
from... |
"""
:mod:`esda` --- Exploratory Spatial Data Analysis
=================================================
"""
import mapclassify
import moran
import smoothing
import getisord
import geary
import join_counts
import gamma
|
import datetime as dt
import numpy as np
import os
from nose.tools import assert_raises
from nose.plugins import skip
import pandas as pds
import pysat
from pysat.instruments import sw_kp, sw_f107
from pysat.instruments.methods import sw as sw_meth
class TestSWKp():
def setup(self):
"""Runs before every... |
from pysb.core import MonomerPattern, ComplexPattern, RuleExpression, \
ReactionPattern, ANY, WILD
from pysb.builder import Builder
from pysb.bng import BngFileInterface
import xml.etree.ElementTree
import re
from sympy.parsing.sympy_parser import parse_expr
import warnings
import pysb.logging
import collections
im... |
from angular_flask.classtime.remote_db.remotedb_factory import RemoteDatabaseFactory
from angular_flask.classtime.local_db.localdb_factory import LocalDatabaseFactory
from angular_flask.classtime.local_db import Term, Course, Section
from angular_flask.logging import logging
class AcademicCalendar(object):
"""
... |
import six
import json
"""Service layers expects the request/response context to be one
dictionary - the pyservice framework makes extensive use of this format,
and the layer interface is exclusively context-based. This is great
for JSON-like wire formats, but more work for others.
For other formats, an adapter can ... |
import itertools
from collections import Mapping, Sequence
from copy import deepcopy
from .utils import get_shortish_repr, ensure_tuple
class BaseVariable(object):
def __init__(self, source, exclude=()):
self.source = source
self.exclude = ensure_tuple(exclude)
self.code = compile(source,... |
import dnslib.server
import dnslib
import time
import binascii
import struct
NAME_LIMIT_HARD = 63
A = ord("A")
Z = ord("Z")
a = ord("a")
z = ord("z")
ZERO = ord("0")
FIVE = ord("5")
ir1 = lambda c: c <= Z and c >= A
ir2 = lambda c: c <= z and c >= a
ir3 = lambda c: c <= FIVE and c >= ZERO
BASE32_SRC = b"abcdefghijk... |
# -*- coding: utf-8 -*-
from datetime import datetime
from dateutil.relativedelta import relativedelta
from openerp import api, fields, models
from openerp.exceptions import Warning
from openerp.tools.translate import _
import openerp.addons.decimal_precision as dp
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT ... |
from .interface import get_method
from .archive import *
from .exporters import *
from .importers import *
from .readers import *
|
from SPARQLWrapper import SPARQLWrapper, JSON
from KnowledgeBaseInterface.IKbInterface import IKbInterface
class FreebaseInterface(IKbInterface):
endpoint = None
prefix = None
def __init__(self):
self.endpoint = "http://localhost:8890/sparql"
self.prefix = "http://rdf.freebase.com/ns/"
... |
#!/usr/bin/env python
# Copyright (C) 2011 by Benedict Paten (benedictpaten@gmail.com)
#
# 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... |
# -*- coding: utf-8 -*-
from odoo import api, models, fields, tools, _
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, float_repr
from odoo.tests.common import Form
from odoo.exceptions import UserError, except_orm
from datetime import datetime
from lxml import etree
from PyPDF2 import PdfFileReader
import io
imp... |
import configparser
import abc
from pystratum.Util import Util
# ----------------------------------------------------------------------------------------------------------------------
class Constants:
"""
Abstract parent class for RDBMS specific classes for creating constants based on column widths, a... |
# Copyright (c) 2014 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this list
# of conditions and the following disclaimer.... |
#!/usr/bin/env python
"""
Script to update Ska file archive aspect L1 products. Module
also provides methods to retrieve the directory (or directories)
for an obsid.
This uses the obsid_archive module with a configuration specific
to the aspect L1 products.
"""
import os
import logging
import numpy as np
from astrop... |
#!/usr/bin/env python
import sys, os
from networkx import DiGraph, Graph
import json
import re
import word2vec
from collections import defaultdict
from Levenshtein import distance
from queue import Queue
from SteinerTree import make_steiner_tree
from collections import namedtuple
LEAF_VOCAB_CACHE = "/Users/philpot/Do... |
# -*- encoding: 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 G... |
# Copyright (c) 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... |
# -*- coding: utf-8 -*- #
# pylint: disable=superfluous-parens
#
"""
haproxyadmin.haproxy
~~~~~~~~~~~~~~~~~~~~
This module implements the main haproxyadmin API.
"""
import os
import glob
from haproxyadmin.frontend import Frontend
from haproxyadmin.backend import Backend
from haproxyadmin.utils import (is_unix_socke... |
# Widget to display a man page
import regex
from Tkinter import *
from ScrolledText import ScrolledText
# XXX These fonts may have to be changed to match your system
BOLDFONT = '*-Courier-Bold-R-Normal-*-120-*'
ITALICFONT = '*-Courier-Medium-O-Normal-*-120-*'
# XXX Recognizing footers is system dependent
# (This one... |
# Widget to display a man page
import regex
from Tkinter import *
from ScrolledText import ScrolledText
# XXX These fonts may have to be changed to match your system
BOLDFONT = '*-Courier-Bold-R-Normal-*-120-*'
ITALICFONT = '*-Courier-Medium-O-Normal-*-120-*'
# XXX Recognizing footers is system dependent
# (This one... |
# file __init__.py
#
# Copyright 2010 Emory University General Library
#
# 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
#... |
#!/usr/bin/env python
import datetime
import os
import time
import memcache
import logging
import json
import dateutil.parser
import django
django.setup()
from xgds_status_board.models import Subsystem, SubsystemStatus
def setReplicatorStatus(opts):
"""
Pings each subsystem for a response at every "interval... |
from __future__ import print_function # Python 2 and 3 print compatibility
import warnings
from decorator import decorator
from hail.expr import Type, TGenotype, TString, TVariant, TArray
from hail.typecheck import *
from hail.java import *
from hail.keytable import KeyTable
from hail.representation import Interval... |
#!/usr/bin/python
import ConfigParser
import getopt
import sys
import ipaddress
import random
import tor
import nmap
import time
import pycurl
import io
import os.path
__author__ = 'jbollin'
hostlist = []
num_targets = 0
num_hosts = 0
total_targets_and_hosts = 0
targets_scanned = 0
first_run = True
sleep_time = 10
co... |
#!/usr/bin/env python3
#
# DAPLink Interface Firmware
# Copyright (c) 2011-2021 Arm Limited
# Copyright (c) 2021 Chris Reed
# Copyright (c) 2021 Mathias Brossard
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance wit... |
import logging
import time
import torch
from torch.optim import Adam, lr_scheduler
import torch.nn.functional as F
import numpy as np
from ..data_ops.load_dataset import load_train_dataset
from ..data_ops.wrapping import unwrap
from ..data_ops.data_loaders import LeafJetLoader
from ..data_ops.data_loaders import Tree... |
# -*- coding: UTF-8 -*-
# Copyright 2009-2016 Luc Saffre
# License: BSD (see file COPYING for details)
#~ Note that this module may not have a docstring because any
#~ global variable defined here will override the global
#~ namespace of lino/__init__.py who includes it with execfile.
# This module is part of the Lin... |
# coding: utf-8
# pylint: disable=no-member
"""Online evaluation metric module."""
from __future__ import absolute_import
import numpy
from . import ndarray
def check_label_shapes(labels, preds, shape=0):
"""Check to see if the two arrays are the same size."""
if shape == 0:
label_shape, pred_shape ... |
"""
Spectral energy distributions
===============================
Methods and classes for dealing with spectral energy distributions (SEDs).
"""
import numpy, pylab, os, scipy
from . import lsd # intrapackage reference
import astropy.io.ascii as ascii
class SED:
"""
Class that defines objects storing Spectral en... |
#-*- coding:utf-8 -*-
__author__ = 'Jean-Francis Roy'
import numpy as np
class MajorityVote(object):
""" A Majority Vote of real-valued functions.
Parameters
----------
voters : ndarray of Voter instances
The voters of the majority vote. Each voter must take an example as an input, and outpu... |
# Copyright (c) 2013-2021, Freja Nordsiek
# 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 ... |
# -*- coding: UTF-8 -*-
# Copyright 2009-2016 Luc Saffre
# License: BSD (see file COPYING for details)
#~ Note that this module may not have a docstring because any
#~ global variable defined here will override the global
#~ namespace of lino/__init__.py who includes it with execfile.
# This module is part of the Lin... |
"""
This module contains classes which operate on version strings. Example version strings include:
'', '1', '1.2.3', '3.5+', '3.5+<4', '10.5|11.2', '10.5|11+', '1.2.a'.
Character components are allowed, and are ordered alphabetically, ie '1.b' > '1.a', however if
a component is a valid number then it is treated numeri... |
"""
Construct a neural network model from a data frame
"""
import pickle
import numpy as np
import pandas as pd
from lasagne import nonlinearities
from lasagne.layers import DenseLayer
from lasagne.layers import InputLayer
from nolearn.lasagne import NeuralNet
from sklearn.cross_validation import train_test_split
fro... |
import argparse
import os
from os import path
import subprocess
import sys
import socket
import time
import warnings
from math import floor
import gc # garbage collector
import smtplib
import numpy as np
from scipy import signal, linalg
from matplotlib import pyplot as plt
import GPy
import classes as cls
import util... |
# Copyright (c) 2021, Manfred Moitzi
# License: MIT License
# All tools in this module have to be independent from DXF entities!
import enum
from typing import (
List,
Iterable,
Tuple,
TYPE_CHECKING,
Union,
Optional,
Callable,
NamedTuple,
)
import re
import math
from ezdxf.lldxf impo... |
"""Parses RSS/Atom feeds and sends them in an email.
The MIT License (MIT)
Copyright (c) 2014 Joshua S. Ziegler
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 w... |
# NOT_RPYTHON
"""
A pure Python reimplementation of the _sre module from CPython 2.4
Copyright 2005 Nik Haldimann, licensed under the MIT license
This code is based on material licensed under CNRI's Python 1.6 license and
copyrighted by: Copyright (c) 1997-2001 by Secret Labs AB
"""
MAXREPEAT = 2147483648
MAXGROUPS =... |
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2018, Arm Limited and contributors.
#
# 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
#
# ... |
# 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... |
#
# 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
# ... |
#
# Copyright (c) 2005-2008 rPath, Inc.
#
# All rights reserved
#
import os, sys
import time
import textwrap
import urlparse
import socket
from mint import buildtemplates
from mint import buildtypes
from mint import jobstatus
from mint import urltypes
from mint import data
from mint.cmdline import commands
from conar... |
import logging
import collections
import datetime
import json
import re
import urllib
from google.appengine.api import urlfetch
from google.appengine.ext import ndb
from consts.district_type import DistrictType
from consts.event_type import EventType
from models.event import Event
from models.match import Match
from... |
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2018, Arm Limited and contributors.
#
# 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
#
# ... |
#!/usr/bin/python
#
# Copyright (c) 2005 rPath, Inc.
#
# All rights reserved.
#
import os, sys, time
import xmlrpclib
import conary
from lib import options
import versions
def usage(exitcode=1):
sys.stderr.write("\n".join((
"Usage: commitaction [commitaction args] ",
" --module '/path/to/statsa... |
# -*- coding: utf-8 -*-
from apps.webdriver_testing.webdriver_base import WebdriverTestCase
from apps.webdriver_testing.pages.site_pages.teams_dir_page import TeamsDirPage
from apps.webdriver_testing.pages.site_pages.teams import tasks_tab
from apps.webdriver_testing.pages.site_pages.teams import videos_tab
from apps.w... |
from __future__ import division
import stat
import logging
import os
import datetime
try:
import zerorpc
except ImportError:
pass # zerorpc not needed for most views
from django.shortcuts import render_to_response
from django.http import HttpResponse
from django.template import RequestContext
# from django.v... |
# Using the following encoding: utf-8
# Python 2
from ConfigParser import ConfigParser, NoOptionError
# End Python 2
# Python 3
# from configparser import ConfigParser, NoOptionError
# End Python 3
import requests
import os
import shutil
import fnmatch
import time
import getpass
import itertools
from ltk import excepti... |
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""M&C logging of the parts and the connections between them.
"""
from __future__ import absolute_import, division, print_function
import six
from tabulate import tabulate
from astropy.time impor... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2010 Anso Labs, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# ... |
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2018, Arm Limited and contributors.
#
# 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
#
# ... |
#!/usr/bin/python
#
# Copyright (c) 2005-2006 rPath, Inc.
#
# All rights reserved.
#
import os, sys, time
import traceback
import xmlrpclib
from conary import versions
from conary.lib import options
from conary.lib import coveragehook
class UnknownException(Exception):
def __str__(self):
return "%s %s" %... |
#!/usr/bin/env python-sirius
"""."""
import time as _time
import numpy as np
from epics import PV
import pyaccel
from pymodels.middlelayer.devices import SOFB, RF
from apsuite.commissioning_scripts.base import BaseClass
class ParamsDisp:
"""."""
def __init__(self):
"""."""
self.energy_delt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.