src
stringlengths
721
1.04M
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """fORP fibre optic (MR-compatible) response devices by CurrentDesigns: http://www.curdes....
# -*- coding: utf-8 -*- # Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe, erpnext, math, json from frappe import _ from six import string_types from frappe.utils import flt, add_months, cint, now...
''' Questions generation functions ''' import random def degree(note, scale, degree): ''' What is the <Number> of <Note> <Scale>? ''' try: answer = raw_input('What is the {} of {} {}: '.format(str(degree + 1), note, scale.capitalize())) return answer, degree except KeyboardInterru...
# Copyright 2008 Dan Smith <dsmith@danplanet.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is ...
""" Wrapper around the RUG Alpino Dependency parser The module expects ALPINO_HOME to point at the alpino installation dir The module needs the dependencies end_hook, which seems to be missing in the 'sicstus' builds. The download link below works as of 2014-05-07: http://www.let.rug.nl/vannoord/alp/Alpino/binary/ve...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
# 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# 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. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
import sys from optparse import OptionParser from config import * from rb import AMQP if __name__ == "__main__": opt_parse = OptionParser() opt_parse.add_option('-m', '--message', dest = 'message', help = "message to send to rabbit server") opt_parse.add_option('-b', '--host', dest = 'hostname', help = "messag...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # example_networks.py import numpy as np import pyphi from pyphi import utils from pyphi.macro import Blackbox, MacroSubsystem from pyphi.network import Network from pyphi.subsystem import Subsystem # TODO pass just the subsystem (contains a reference to the network) s...
# Copyright 2013-2014, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Parsing for `TorDNSEL <https://www.torproject.org/projects/tordnsel.html.en>`_ exit list files. :: TorDNSEL - Exit list provided by TorDNSEL """ import stem.util.connection import stem.util.str_tools import stem....
# # Copyright (C) 2001-2005 Ichiro Fujinaga, Michael Droettboom, and Karl MacMillan # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any l...
import gimpbbio.gpio as gpio pins = [gpio.pins.p9_21, gpio.pins.p9_22, gpio.pins.p9_23, gpio.pins.p9_24, gpio.pins.p9_25, gpio.pins.p9_26, gpio.pins.p9_27, gpio.pins.p9_28] segments = [[pins[0], pins[1], pins[2], pins[3], pins[4], pins[5]], # 0 [pins[1], pins[2]], ...
#-*- coding: utf-8 -*- from redis import ConnectionPool, StrictRedis from ws4redis import settings from ws4redis.redis_store import RedisStore from ws4redis._compat import is_authenticated from redis.connection import UnixDomainSocketConnection if 'unix_socket_path' in settings.WS4REDIS_CONNECTION: # rename 'unix_...
### ### ### ### ### ### ### IMPORTANT ### ### ### ### ### ### ### # # # This module is a work in progress. Comments, particularly the # # ones preceding a class or function definition, are intended # # to represent the desired end result of this code. Unt...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Ld-Lq-Identification with Femag """ import os import femagtools import femagtools.machine import logging import numpy as np feapars = { "num_move_steps": 25, "calculationMode": "ld_lq_fast", "magn_temp": 60.0, "i1_max": 150.0, "beta_max": 0.0, ...
import requests from anvil import Anvil def main(): requests.packages.urllib3.disable_warnings() in_file = open("./kiln_base_url.txt", "r") base_url = in_file.read().replace('\n', '') in_file.close() anvil = Anvil(base_url, False) anvil.create_session_by_prompting() repo_indices = set() ...
import prophy import pytest @pytest.fixture(scope = 'session') def GreedyScalarArray(): class GreedyScalarArray(prophy.with_metaclass(prophy.struct_generator, prophy.struct)): _descriptor = [("x", prophy.array(prophy.u32))] return GreedyScalarArray @pytest.fixture(scope = 'session') def Comp...
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Scientific Package. This package holds all simulators, and # analysers necessary to run brain-simulations. You can use it stand alone or # in conjunction with TheVirtualBrain-Framework Package. See content of the # documentation-folder for more details. See also http://ww...
#!/usr/bin/env python3 import unittest import pandas as pd import tacl from .tacl_test_case import TaclTestCase class NgramHighlightReportTestCase (TaclTestCase): def setUp(self): self._tokenizer = tacl.Tokenizer( tacl.constants.TOKENIZER_PATTERN_CBETA, tacl.constants.TOKENIZER...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import distutils.version import os import sys import textwrap import unittest ROOT_PATH = os.path.abspath(os.path.join( os.path.dirname(os.path.dirname(...
#!/usr/bin/python3 """ Given a string S, return the "reversed" string where all characters that are not a letter stay in the same place, and all letters reverse their positions. Example 1: Input: "ab-cd" Output: "dc-ba" Example 2: Input: "a-bC-dEf-ghIj" Output: "j-Ih-gfE-dCba" Example 3: Input: "Test1ng-Leet=code-Q...
#!/usr/bin/python # -*- coding: utf-8 -*- """ ============================================= Manifold Learning methods on a severed sphere ============================================= An application of the different :ref:`manifold` techniques on a spherical data-set. Here one can see the use of dimensionality reducti...
#!/usr/bin/env python3 # -*- coding: utf8 -*- # CRC16SICK MODULE # # Cristian NAVALICI cristian.navalici at gmail dot com # from ctypes import c_ushort class CRC16SICK(object): # The CRC's are computed using polynomials. Here is the most used coefficient for CRC16 SICK crc16SICK_constant = 0x8005 def __...
from __future__ import absolute_import import json import os import socket import threading import time import traceback import uuid from six.moves.urllib.parse import urljoin from .base import (CallbackHandler, CrashtestExecutor, RefTestExecutor, RefTestImpleme...
from db import db_connection from user import _user_name_exists, _authenticate_user import json import time import logging log = logging.getLogger(__name__) def get_spells(request): conn = db_connection(request) cursor = conn.cursor() cursor.execute("SELECT * FROM spells;") result = cursor.fetchall() ...
import unittest from ete_dev import * from datasets import * class Test_phylo_module(unittest.TestCase): # ALL TESTS USE THIS EXAMPLE TREE # # /-Dme_001 # /--------| # | \-Dme_002 # | # | /-Cfa_001 ...
import os from boxbranding import getImageVersion def enumFeeds(): for fn in os.listdir('/etc/opkg'): if fn.endswith('-feed.conf'): file = open(os.path.join('/etc/opkg', fn)) feedfile = file.readlines() file.close() try: for feed in feedfile: yield feed.split()[1] except IndexError: pass...
# -*- python -*- # -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2011-2012 Serge Noiraud # # 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; eithe...
# -*- coding: utf-8 -*- from distutils.core import setup f = open('README', 'r') long_desc = f.read() f.close() import sys import os import os.path import subprocess which = 'which' if sys.platform == 'win32': which = 'where' basedir = os.path.dirname(os.path.join(os.getcwd(), sys.argv[0])) def my_check_ou...
''' NL80211 module ================ TODO ''' from pyroute2.common import map_namespace from pyroute2.netlink import genlmsg from pyroute2.netlink.generic import GenericNetlinkSocket from pyroute2.netlink.nlsocket import Marshal from pyroute2.netlink import nla from pyroute2.netlink import nla_base # import pdb impor...
# -*- coding: UTF-8 -*- # Copyright 2016-2019 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) """The :xfile:`models.py` module for :mod:`lino_voga.lib.invoicing`. """ from __future__ import unicode_literals from lino_xl.lib.invoicing.models import * from lino.api import...
# Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from datetime import date, timedelta from odoo import tools from odoo.modules import get_module_resource from odoo.tests import common from ..exceptions import JournalLockDateError class TestJournalLockDate(common.Transac...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """API for indexing of records.""" from __future__ import absolute_import, print_fun...
import argparse import datetime import lib.constants as const import os import Queue import random import subprocess32 as subprocess import threading import time import yaml from collections import OrderedDict from lib.environment import Environment from lib.helper import Helper from lib.util import safe_print # queu...
#!/usr/bin/env python # # Copyright 2014 Michele Filannino # # gnTEAM, School of Computer Science, University of Manchester. # All rights reserved. This program and the accompanying materials # are made available under the terms of the GNU General Public License. # # author: Michele Filannino # email: fila...
"""A pre-trained implimentation of VGG16 with weights trained on ImageNet.""" ########################################################################## # Special thanks to # http://www.cs.toronto.edu/~frossard/post/vgg16/ # for converting the caffe VGG16 pre-trained weights to TensorFlow # this file is essentially ju...
from django.contrib.syndication.views import Feed from django.core.urlresolvers import reverse_lazy as reverse from radpress import settings as radpress_settings from radpress.models import Article, Tag class ArticleFeed(Feed): def __init__(self): self.title = radpress_settings.TITLE self.descript...
__author__ = 'thor' from sklearn.base import TransformerMixin, BaseEstimator from sklearn.neighbors import KNeighborsRegressor from pandas import DataFrame import numpy as np from nltk import word_tokenize from functools import reduce class HourOfDayTransformer(TransformerMixin): def __init__(self, date_field=...
#!/usr/bin/env python ''' FMjoin.py Copies all .ibw files contained in a folder and its subfolders into a single folder. Useful for force maps. Usage: python FMjoin.py origindir destdir Alberto Gomez-Casado (c) 2010, University of Twente (The Netherlands) This program is released under the GNU General Public Licen...
import re from navmazing import NavigateToSibling, NavigateToAttribute from selenium.common.exceptions import NoSuchElementException from wrapanapi.hawkular import CanonicalPath from cfme.common import Taggable, UtilizationMixin from cfme.exceptions import MiddlewareServerNotFound, \ MiddlewareServerGroupNotFound...
# MODULE: x86-components # CLASS: x86-system # CLASS: x86-apic-system # CLASS: x86-separate-mem-io-system # CLASS: x86-apic-bus-system # CLASS: x86-e7520-system # CLASS: i386-cpu # CLASS: i486sx-cpu # CLASS: i486dx2-cpu # CLASS: pentium-cpu # CLASS: pentium-mmx-cpu # CLASS: pentium-pro-cpu # CLASS: pentium-ii-cpu # CLA...
from datetime import datetime from typing import Hashable import numpy as np import pandas as pd import pytest from xarray.coding.cftimeindex import CFTimeIndex from xarray.core import duck_array_ops, utils from xarray.core.indexes import PandasIndex from xarray.core.utils import either_dict_or_kwargs, iterate_nested...
# This file is part of the GOsa framework. # # http://gosa-project.org # # Copyright: # (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de # # See the LICENSE file in the project's top-level directory for details. import time from gosa.backend.objects.types import AttributeType class SambaLogonHoursAttribute(At...
import time import os from mitmproxy import stateobject from mitmproxy import certs from mitmproxy.net import tcp from mitmproxy.utils import strutils class ClientConnection(tcp.BaseHandler, stateobject.StateObject): """ A client connection Attributes: address: Remote address ssl_estab...
from cmd import Cmd import re DIRECTIONS = 'N', 'E', 'S', 'W' NORTH, EAST, SOUTH, WEST = DIRECTIONS class Player(object): def __init__(self, location, name='Player'): assert isinstance(location, Location) self.location = location self.name = name class Location(object): ...
#!/usr/bin/env python # Copyright 2016 Vimal Manohar # 2016 Johns Hopkins University (author: Daniel Povey) # Apache 2.0 from __future__ import print_function import argparse import logging import operator import os import sys from collections import defaultdict logger = logging.getLogger(__name__) lo...
from . import addressing from . import instructions from . import pc_state class OpDecoder(object): def __init__(self, pc_state, memory, instruction_lookup): self.pc_state = pc_state self.memory = memory self.instruction_lookup = instruction_lookup pass def execute(self): ...
##!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import re import string from io import StringIO from lxml import etree try: from .util import * except Exception as e: from util import * class NetsparkerToMarkdown: def __init__(self, options): self.options=options self....
import sublime import sublime_plugin import threading from ..downloader import Downloader class FetchNewFileCommand(sublime_plugin.TextCommand): def run(self, edit, txt): for sel in self.view.sel(): self.view.replace(edit, sel, txt) class FetchGetCommand(sublime_plugin.TextCommand): resu...
# -*- coding: utf-8 -*- """ Utility functions folr colors """ def get_color(color): """ Can convert from integer to (r, g, b) """ if not color: return None if isinstance(color, int): temp = color blue = temp % 256 temp = int(temp / 256) green = temp % 256 ...
""" tests.test_helpers ~~~~~~~~~~~~~~~~~~~~ Tests component helpers. """ # pylint: disable=protected-access,too-many-public-methods import unittest from common import get_test_home_assistant import homeassistant as ha import homeassistant.loader as loader from homeassistant.const import STATE_ON, STATE_OFF, ATTR_ENT...
import boxm_batch; import os; import optparse; boxm_batch.register_processes(); boxm_batch.register_datatypes(); class dbvalue: def __init__(self, index, type): self.id = index # unsigned integer self.type = type # string print("Filling internal nodes"); #Parse inputs parser = optparse.OptionParser...
import pytest from unittest.mock import Mock, patch from pysync_redmine.repositories.redmine import RedmineRepo from pysync_redmine.domain import ( Project, Task, Phase, Member, ...
# original work: https://github.com/graphite-project/whisper/issues/22 # whisper-fill: unlike whisper-merge, don't overwrite data that's # already present in the target file, but instead, only add the missing # data (e.g. where the gaps in the target file are). Because no values # are overwritten, no data or precisio...
#!/usr/bin/env python3 # noinspection PyProtectedMember from Bio.Application import _Option, AbstractCommandline, _Switch from Bio.SeqRecord import SeqRecord from Bio.Seq import Seq from Bio import SeqIO from subprocess import Popen, PIPE, STDOUT from collections import defaultdict import subprocess import datetime imp...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2014 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. # pylint: disable=W0401,W0614 from telemetry.page.actions.all_page_actions import * from telemetry.page import page as page_module from telemetry.page import ...
#!/Users/takashi/.pyenv/shims/python import numpy as np import math def scaling(data): """ Scaling. Make x's average to 0, variance to 1 => CHANGED. Divide by normal deviation """ print("input:") print(data) scaled_data = np.zeros_like(data) """ average section """...
from decimal import Decimal from trailer.model.fix import Fix from trailer.model.fieldtools import nullable, make_list, make_time class Waypoint: def __init__(self, latitude, longitude, elevation=None, time=None, magvar=None, geoid_height=None, name=None, comment=None, descriptio...
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Linux platform implementation.""" from __future__ import division import os import errno import socket import struct import sys...
# import the necessary packages from keras.models import Sequential from keras.layers.normalization import BatchNormalization from keras.layers.convolutional import Conv2D from keras.layers.convolutional import MaxPooling2D from keras.layers.core import Activation from keras.layers.core import Flatten from keras.layers...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Item' db.create_table(u'pandora_item', ( (u'i...
#!/usr/bin/env python3 # callblocker - blocking unwanted calls from your home phone # Copyright (C) 2015-2020 Patrick Ammann <pammann@gmx.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; ...
from __future__ import division from sys import stdin def solve(n, m): if n % 2 == 0: if m % n == 0: return n // 2 + 1 elif m % n % 2 == 1: return (m % n + 1) // 2 else: return n + 1 - m % n // 2 else: idx = m % (2 * n) if idx == 0: ...
#!/usr/bin/env python3 ##################################################### # # # License: Apache License 2.0 # # Author: Dario Ostuni <another.code.996@gmail.com> # # # ##########################...
# -*- coding: UTF-8 -*- from meregistro.shortcuts import my_render from apps.seguridad.decorators import credential_required from apps.backend.forms import ConfiguracionSolapasEstablecimientoForm from apps.backend.models import ConfiguracionSolapasEstablecimiento from apps.backend.forms import ConfiguracionSolapasAnex...
# Copyright Least Authority Enterprises. # See LICENSE for details. """ A Kubernetes client which uses Twisted to interact with Kubernetes via HTTP. """ from os import pathsep from os.path import expanduser from json import loads from zope.interface import implementer import attr from attr import validators from p...
# coding=utf-8 # Copyright 2021 The Tensor2Tensor 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...
# The MIT License (MIT) # # Copyright (c) 2014 Richard Moore # # 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, mod...
# Copyright 2014 NEC Corporation. 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 re...
#! python3 # noqa: E265 # ---------------------------------------------------------------------------- # Name: Infos DXF # Purpose: Use GDAL/OGR and dxfgrabber to read AutoCAD exchanges file format. # # Author: Julien Moura (https://github.com/Guts/) # # -------------------------------------------...
#!/usr/bin/env python """ Retrieve operating parameters of connected USRP and loop through the operating spectrum trasmitting a constant wave signal """ from gnuradio import gr from gnuradio import analog from gnuradio import uhd from time import sleep MAX_RATE = 1000e6 class build_block(gr.top_block): def __init__...
# -*- coding: utf-8 -*- # This file is part of Cockpit. # # Copyright (C) 2013 Red Hat, Inc. # # Cockpit 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 2.1 of the License, or # (at your...
# -*- coding: utf-8 -*- from django.urls import reverse_lazy from djangosige.apps.cadastro.forms import TransportadoraForm, VeiculoFormSet from djangosige.apps.cadastro.models import Transportadora, Veiculo from .base import AdicionarPessoaView, PessoasListView, EditarPessoaView class AdicionarTransportadoraView(A...
# ##### BEGIN GPL LICENSE BLOCK ##### # # Booltron super add-on for super fast booleans. # Copyright (C) 2014-2021 Mikhail Rachinskiy # # 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, eith...
#!/usr/bin/env python # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
from setuptools import setup, find_packages import os import sys # Version BASE_DIR = os.path.dirname(os.path.realpath(__file__)) VERSION_FILE = os.path.join(BASE_DIR, 'pynetdicom', '_version.py') with open(VERSION_FILE) as fp: exec(fp.read()) with open("README.rst", "r") as fp: long_description = fp.read() ...
import unittest import random random.seed() class BSTDict(object): """" Implementation of a dictionary based on binary search trees. """ class BSTNode(object): def __init__(self, key, value): self.key = key self.value = value self.parent = None ...
import re import math from aprslib import base91 from aprslib.exceptions import ParseError from aprslib.parsing.common import parse_dao from aprslib.parsing.telemetry import parse_comment_telemetry __all__ = [ 'parse_mice', ] # Mic-e message type table MTYPE_TABLE_STD = { "111": "M0: Off Duty", ...
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 1.4.41 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class Director1(object): """ NOTE: This class is auto g...
""" Display date and time. This module allows one or more datetimes to be displayed. All datetimes share the same format_time but can set their own timezones. Timezones are defined in the `format` using the TZ name in squiggly brackets eg `{GMT}`, `{Portugal}`, `{Europe/Paris}`, `{America/Argentina/Buenos_Aires}`. IS...
from __future__ import with_statement # Copyright (C) Zed A. Shaw, licensed under the GPLv3 import idiopidae.parser from pygments import highlight from pygments.formatters import get_formatter_for_filename, get_formatter_by_name from pygments.lexers import guess_lexer_for_filename, get_lexer_by_name ### @export "Bu...
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
import sys import urllib.request from urllib.parse import urlparse class check(object): def __init__(self):pass def address(self): add=input("Enter URL Address With HTTP to Send Data: \n") if add: o = urlparse(add) if not o.scheme: self.address() ...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import multiprocessing import threading from builtins import next, object from multiproce...
#!/usr/bin/env python import argparse import logging import datetime from autoant import AutoAnt from .providers import providers from .version import VERSION_STRING log_level = {'INFO':logging.INFO, 'DEBUG':logging.DEBUG, 'CRITICAL':logging.CRITICAL, 'ERROR':logging.ERROR} def...
# Copyright (c) 2007-2012 by Enrique Pérez Arnaud <enriquepablo@gmail.com> # # This file is part of the terms project. # https://github.com/enriquepablo/terms # # The terms project 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 S...
from __future__ import print_function from google.transit import gtfs_realtime_pb2 import requests import pandas as pd from io import BytesIO import zipfile import os import os.path import datetime import math UTC_OFFSET = int(os.getenv('OFFSET', 7)) DEFAULT_LOCATION = {u'lat': 39.7433814, u'lng': -104.98910989999999}...
from django.http import HttpResponse from contamination.models import DVS from contamination.models import Substance from contamination.models import K7 from contamination.models import K4 from contamination.models import SpeedOfTransfer from contamination.models import DepthZone from contamination.models import Wind ...
""" Module for the Cache class for BlockStructure objects. """ # pylint: disable=protected-access from logging import getLogger from openedx.core.lib.cache_utils import zpickle, zunpickle from .block_structure import BlockStructureModulestoreData logger = getLogger(__name__) # pylint: disable=C0103 class BlockSt...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#!/usr/bin/env python import argparse import getnwisrelease import getnwversion import gzip import os import platform import shutil import sys import tarfile import zipfile from subprocess import call steps = ['nw', 'chromedriver', 'symbol', 'headers', 'others'] ################################ # Parse command line a...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. Original C++ source file: libsvm_ops.cc """ import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _context from t...
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
#!/usr/bin/env python # Copyright 2021 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. # This is generated, do not edit. Update BuildConfigGenerator.groovy and # 3ppFetch.template instead. from __future__ import print_fun...
from django.utils.decorators import method_decorator from django.core.cache import cache from django.http import HttpResponse def cache_view_func(func): def wrapper(request, *args, **kwargs): key = request.method + request.META['PATH_INFO'] + request.META['QUERY_STRING'] content = cache.get(key) ...
# This file is part of the Juju GUI, which lets users view and manage Juju # environments within a graphical interface (https://launchpad.net/juju-gui). # Copyright (C) 2013 Canonical Ltd. # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public Lice...