text
stringlengths
475
200k
# # Copyright 2014 Quantopian, 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 wr...
# Utilities for the demos import sys, win32api, win32con, win32ui NotScriptMsg = """\ This demo program is not designed to be run as a Script, but is probably used by some other test program. Please try another demo. """ NeedGUIMsg = """\ This demo program can only be run from inside of Pythonwin You must start Py...
# # Copyright 2015 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
import functools import warnings from importlib import import_module from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.html import conditional_escape from django.utils.inspect import getargspec from django.utils.itercompat import is_iterable from .base import...
"""string helper module""" import re class __loader__(object): pass def formatter_field_name_split(fieldname): """split the argument as a field name""" _list=[] for _name in fieldname: _parts = _name.split('.') for _item in _parts: is_attr=False #fix me if re....
import requests from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) from .provider import PaypalProvider class PaypalOAuth2Adapter(OAuth2Adapter...
# -*- coding: utf-8 -*- # # (c) 2015, René Moser <[EMAIL]> # # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the ...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals from collections import OrderedDict from cms.models import Page, CMSPlugin from .base import SubcommandsCommand def get_descendant_ids(root_id): """ Returns the a generator of primary keys which represent d...
### # Copyright (c) 2005, Jeremiah Fincher # 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 notice, # this list of conditi...
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2016-2017 Alex Forencich 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...
# Copyright 2013 IBM Corp. # # 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...
"""Python part of the warnings subsystem.""" # Note: function level imports should *not* be used # in this module as it may cause import lock deadlock. # See bug 683658. import linecache import sys __all__ = ["warn", "showwarning", "formatwarning", "filterwarnings", "resetwarnings", "catch_warnings"] def...
"""Extensions to the 'distutils' for large or complex distributions""" import os import functools import distutils.core import distutils.filelist from distutils.util import convert_path from fnmatch import fnmatchcase from six.moves import filter, map import setuptools.version from setuptools.extension import Extens...
# Copyright 2013 IBM Corp. # # 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...
""" ================== GMM classification ================== Demonstration of Gaussian mixture models for classification. See :ref:`gmm` for more information on the estimator. Plots predicted labels on both training and held out test data using a variety of GMM classifiers on the iris dataset. Compares GMMs with sp...
# Copyright 2017 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
from django import db from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.contrib.contenttypes.views import shortcut from django.core.exceptions import ObjectDoesNotExist from django.http import HttpRequest from django.test...
"""Affinity Propagation clustering algorithm.""" # Author: Alexandre Gramfort [EMAIL] # Gael Varoquaux [EMAIL] # License: BSD 3 clause import numpy as np from ..base import BaseEstimator, ClusterMixin from ..utils import as_float_array, check_array from ..utils.validation import check_is_fitted from ..metric...
#! /usr/bin/env python # Copyright (c) 2009-2013, The Linux Foundation. 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 # ...
#// screen manager imported from http://kivy.org/docs/api-kivy.uix.screenmanager.html from kivy.app import App from kivy.uix.floatlayout import FloatLayout from kivy.uix.boxlayout import BoxLayout from kivy.lang import Builder from random import random from kivy.uix.widget import Widget from kivy.graphics import Color...
#!/usr/bin/env python # # cd_hit * (clusterassembled reads with database) # cd_hit_est used as this is the nt clustering tool # http://weizhongli-lab.org/lab-wiki/doku.php?id=cd-hit-user-guide # follow this link to get the download. # https://github.com/weizhongli/cdhit # cd_hit-0.9.10-bin-64.tar.gz # # (c) The James H...
import shutil import os from unittest import skipIf import boto from effect import Effect, sync_perform, ComposedDispatcher from twisted.python.filepath import FilePath from twisted.trial.unittest import SynchronousTestCase from ..aws import boto_dispatcher, UploadToS3 from flocker.provision._effect import dispatcher...
#!/usr/bin/python # # Copyright Hugh Perkins 2015 hughperkins at gmail # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/. # goal of this is to partition the data into ...
import unittest import transaction from pyramid import testing from .core.models import DBSession # class TestMyViewSuccessCondition(unittest.TestCase): # def setUp(self): # self.config = testing.setUp() # from sqlalchemy import create_engine # engine = create_engine('sqlite://') # from .models import ( # ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
import asposewordscloud from asposewordscloud.WordsApi import WordsApi from asposewordscloud.WordsApi import ApiException from asposewordscloud.models import RunResponse import asposestoragecloud from asposestoragecloud.StorageApi import StorageApi from asposestoragecloud.StorageApi import ResponseMessage apiKey = "...
#!/usr/bin/env python # # Copyright 2012, Google 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: # # * Redistributions of source code must retain the above copyright # notice, this list...
"""Implementation of sample attack.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np from scipy.misc import imread from scipy.misc import imsave from nets import inception_v3, inception_v4, inception_resnet_v2, resnet_v2 fro...
from Screens.Screen import Screen from Components.ActionMap import NumberActionMap from Components.Label import Label from Components.ChoiceList import ChoiceEntryComponent, ChoiceList from Components.Sources.StaticText import StaticText import enigma class ChoiceBox(Screen): def __init__(self, session, title = "", l...
## # Copyright 2009-2021 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
# -*- coding: utf-8 -*- """ .. _tut-eeg-fsaverage-source-modeling: EEG forward operator with a template MRI ======================================== This tutorial explains how to compute the forward operator from EEG data using the standard template MRI subject ``fsaverage``. .. caution:: Source reconstruction witho...
#pythran export dist(float [], float[], float[], int, bool, bool, bool) #runas import numpy as np ; N = 20 ; x = np.arange(0., N, 0.1) ; L = 4 ; periodic = True ; dist(x, x, x, L,periodic, periodic, periodic) #bench import numpy as np ; N = 300 ; x = np.arange(0., N, 0.1) ; L = 4 ; periodic = True ; dist(x, x, x, L,per...
# 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...
from typing import List, Optional, Tuple from django.db import connections from psqlextra.models import PostgresPartitionedModel from .config import PostgresPartitioningConfig from .constants import AUTO_PARTITIONED_COMMENT from .error import PostgresPartitioningError from .partition import PostgresPartition from .p...
""" Useful (non-periodic) GP Kernel Functions """ import numpy as np import scipy.spatial from scipy.special import gamma,kv ################################################################################################### #Exponential class def SqExponentialRad(X,Y,theta,white_noise=False): """ Standard square...
''' Progress class for modules. Represents where a student is in a module. Useful things to know: - Use Progress.to_js_status_str() to convert a progress into a simple status string to pass to js. - Use Progress.to_js_detail_str() to convert a progress into a more detailed string to pass to js. In particular...
# -*- coding: UTF8 -*- # -------------------------------------------------------------- # Copyright (c) 2015, Nicolas VERDIER ([EMAIL]) # 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. Redi...
""" This is a python interface to Adobe Font Metrics Files. Although a number of other python implementations exist (and may be more complete than mine) I decided not to go with them because either they were either 1) copyrighted or used a non-BSD compatible license 2) had too many dependencies and I wanted a fr...
import random from math import sin, pi from spiralgalaxygame.body import Body, BodyKind from spiralgalaxygame.geometry import Vector, Circle from spiralgalaxygame.discdist import DiscreteDistribution def generate_galaxy_bodies(randgen = random.random, parentmu = 1000, ...
import pysal import os.path import scipy.io as sio import pysal.core.FileIO as FileIO from pysal.weights import W from pysal.weights.util import full, full2W from warnings import warn __author__ = "Myunghwa Hwang <[EMAIL]>" __all__ = ["MatIO"] class MatIO(FileIO.FileIO): """ Opens, reads, and writes weights ...
""" Use Case 14 - jcy MulensModel will be written assuming the coordinate system (t0,u0,alpha) are defined relative to the center of mass. This is not always the most efficient choice for fitting. This use case covers the conversion from center of magnification coordinates to center of mass coordinates. Essentially, i...
""" Django module for Course Metadata class -- manages advanced settings and related parameters """ from django.conf import settings from django.utils.translation import ugettext as _ from six import text_type from xblock.fields import Scope from xblock_django.models import XBlockStudioConfigurationFlag from xmodule.m...
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
""" Differential and pseudo-differential operators. """ # Created by Pearu Peterson, September 2002 __all__ = ['diff', 'tilbert','itilbert','hilbert','ihilbert', 'cs_diff','cc_diff','sc_diff','ss_diff', 'shift'] from numpy import pi, asarray, sin, cos, sinh, cosh, tanh, iscomplexobj i...
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, determine_ext, int_or_none, ) class HotStarIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?hotstar\.com/(?:.+?[/-])?(?P<id>\d{10})' _TESTS = [{ 'url': 'http...
#!/usr/bin/python # Copyright (c) 2014-2017 Ansible Project # Copyright (c) 2017, 2018 Will Thames # Copyright (c) 2017, 2018 Michael De La Rue # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'co...
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-30 23:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='TblAca...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") else: access = Ser...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
# -*- coding: utf-8 -*- """ pygments.styles.bw ~~~~~~~~~~~~~~~~~~ Simple black/white only style. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Name, Comment, Strin...
#!/usr/bin/env python # # Copyright 2004,2010,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
# Copyright 2014 IBM Corp. # # 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 ...
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
# Copyright 2011-2015 MongoDB, 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 writi...
# -*- coding:utf-8 -*- ASCIItranslit = { 0x0022: "''", 0x002A: "_", 0x002F: "_", 0x003A: "_", 0x003C: "_", 0x003D: "_", 0x003E: "_", 0x003F: "_", 0x005C: "_", 0x007C: "_", 0x007F: "", 0x00A0: "_", 0x00A1: "!", 0x00A2: "c", 0x00A3: "lb", 0x00A4: "", 0x00A5: "yen", 0x00A6: "I", 0x00A7: "SS", 0x00A8: ...
""" Define common steps for instructor dashboard acceptance tests. """ # pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from __future__ import absolute_import from lettuce import world, step from mock import patch from nose.tools import assert_in # pylint: disable=no-name-in-module from c...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
# -*- encoding: utf-8 -*- # Python source code encoding : https://www.python.org/dev/peps/pep-0263/ ############################################################################## # # OpenERP, Odoo Source Management Solution # Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) # Anto...
# Copyright 2013 VMware, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
""" Django settings for event_subscribe project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR,...
########################################################### # # Copyright (c) 2005-2008, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written ...
import cherrypy import os import sys # 這個程式要計算正齒輪的齒面寬, 資料庫連結希望使用 pybean 與 SQLite # 導入 pybean 模組與所要使用的 Store 及 SQLiteWriter 方法 from pybean import Store, SQLiteWriter import math # 確定程式檔案所在目錄, 在 Windows 有最後的反斜線 _curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) # 將所在目錄設為系統搜尋目錄 sys.path.append(_curdir) if 'O...
"""A lexical analyzer class for simple shell-like syntaxes.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 # Input stacking and error message cleanup added by ESR, March 2000 # push_source() and pop_source() made explicit by ESR, January 2001. # Posix compliance, split(), string arguments, and # iterato...
"""Tool for exporting GLIFs from FontLab""" import FL import os from robofab.interface.all.dialogs import ProgressBar from robofab.glifLib import GlyphSet from robofab.tools.glifImport import GlyphPlaceholder from robofab.pens.flPen import drawFLGlyphOntoPointPen def exportGlyph(glyphName, flGlyph, glyphSet): """Ex...
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 import csv class CsvReader(object): """ Typical usage:: csv_reader = CsvReader(path) for d in csv_reader.iter_dicts(): Variable.objects.create(**d) """ def __init__(self, path): self.open(path) def open(self, path): ...
# failed system call counts, by pid # (c) 2010, Tom Zanussi <[EMAIL]> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(o...
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import os import re import time import math import subprocess import numpy as np from google.protobuf import text_format import caffe try: import caffe_pb2 except ImportError: # See issue #32 from caffe.proto import caffe_pb2 from train...
# -*- coding: utf-8 -*- ############################################################################### # # RetrieveCellFeed # Retrieves a list of cell names and values in a specified Google worksheet. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 ...
#! /usr/bin/python import sys,re,string sys.path.append("/home/pdendek/docsim-check/out/document-similarity-logic-1.6-SNAPSHOT-jar-with-dependencies.jar") from pl.edu.icm.coansys.commons.java import DiacriticsRemover def fillDict(inL,langs): innerD = {} for x in inL: t,l = x langs.add(l) innerD[l] = t return...
import logging import hashlib import os from base64 import urlsafe_b64encode as encode from base64 import urlsafe_b64decode as decode from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from pylons.decorators.rest import restrict from ocsmanager.mo...
import argparse import mongoengine import redis import sys import rmc.models as m import rmc.shared.constants as c import rmc.shared.facebook as facebook import rmc.shared.util as rmc_util import rmc.data.crawler as rmc_crawler import rmc.data.processor as rmc_processor # TODO(mack): remove duplication of fields thro...
# -*- coding: utf-8 -*- # # OLED-Info Renderer for Dreambox/Enigma-2 # Version: 1.0 # Coded by Vali (c)2011 # ####################################################################### from enigma import eLabel from Renderer import Renderer from os import popen from time import localtime, strftime from Component...
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but...
""" A simple menu system for pygame. Probably a little too simple, unfortunately.""" from __future__ import division import pygame # This silly Exception is used to return from a menu. class ReturnError(Exception): pass class Exit(Exception): pass class Menu(object): """ Class for bui...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
# -*- coding: utf-8 -*- ############################################################################### # # GetMonitoredTwitterHandle # Retrieves detailed information on a specified monitored Twitter account. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Ver...
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
#!/usr/bin/env python # # Copyright 2012 The Closure Linter Authors. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
import os from colorama import Fore from helpers import run_cmd outDirDefault = 'test-outs' testDirDefault = 'test-files' """ Run a single test @param tFile- required; the file to check against (uncompressed data) @param level- optional (default: all); the compression level [1-9] @return True if all tests passed; Fa...
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <[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/LICENS...
from __future__ import absolute_import import sys from datetime import timedelta from django.core.cache.backends.base import InvalidCacheBackendError from celery import result from celery import states from celery.utils import gen_unique_id from celery.datastructures import ExceptionInfo from djcelery.backends.cac...
import sys import os import pandas as pd import numpy as np import argparse def main(): parser=argparse.ArgumentParser(description='MusiteDeep custom training tool for general PTM prediction.') parser.add_argument('-input', dest='inputfile', type=str, help='training data in fasta format. Sites f...
"""The io module provides the Python interfaces to stream handling. The builtin open function is defined in this module. At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; impl...
import os import ycm_core # These are the compilation flags that will be used in case there's no # compilation database set (by default, one is not set). # CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. flags = [ '-Wall', '-Werror', '-pendantic-errors', '-std=c++0x', '-fno-strict-aliasing...
#!/usr/bin/env python # coding=utf-8 ################################################################################ # CosConfig 有关cos的配置 ################################################################################ class CosConfig(object): def __init__(self): self._end_point = 'http://web.file.myqc...
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: CPM test # Author: Achilleas Anastasopoulos # Description: gnuradio flow graph # Generated: Thu Feb 19 23:16:23 2009 ################################################## from gnuradio import gr from gnuradio im...
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: [EMAIL] Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 import sys # noqa: F401 ...
# # 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...
from typing import Optional from overrides import overrides import torch from torch import nn from allennlp.modules.seq2seq_encoders.seq2seq_encoder import Seq2SeqEncoder from allennlp.nn.util import add_positional_features @Seq2SeqEncoder.register("pytorch_transformer") class PytorchTransformer(Seq2SeqEncoder): ...
# Copyright 2015 IBM Corp. # # 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, sof...
from androguard.core import * from androguard.core.androgen import * from androguard.core.bytecode import * from androguard.core.bytecodes.dvm import * from androguard.core.bytecodes.apk import * from androguard.core.analysis.analysis import * from androguard.core.analysis.ganalysis import * from androguard.decompiler....
#!/usr/bin/env python # Copyright (c) 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. # This scripts generates a manifest file for the MountHttp file system. # Files and directory paths are specified on the command-li...
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
from __future__ import with_statement import base64 import optparse import os import pymongo import simplejson import sys import time import zlib from paste.deploy import converters from lolapps.util import processor from lolapps.util import db from lolapps.util.adapters import mongo, chunking from lolapps.common i...
from django.core.management.base import BaseCommand, CommandError from xmodule.modulestore.django import modulestore from xmodule.modulestore.xml_importer import check_module_metadata_editability from xmodule.course_module import CourseDescriptor from request_cache.middleware import RequestCache class Command(BaseCo...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013-2015 Marcos Organizador de Negocios SRL http://marcos.do # Write by Eneldo Serrata ([EMAIL]) # # This program is free software: you can redistribute it and/or modify # it under the t...
#!/usr/bin/python # this script unzips the brand catalog content export zip files # one at a time, and numbers each exported xml file import zipfile import shutil import os import glob def bool_str(s): s = s.lower() T = ('1', 'true', 'y', 'ye', 'yes', 'yea', 'ya', 'yah', 'yup') F = ('0', 'false', 'n', 'no', 'not',...