gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/python """ Usage: ./pdbqt.py <old.pdbqt> <old.mol2> <new.mol2> """ def randString(): from random import choice import string chars = string.letters + string.digits newstring = '' for i in range(8): newstring += choice(chars) return newstring class pdbqt2mol2: """ Loads values ...
"""An implementation of a neural network without classes (just a module) """ import numpy import scipy.optimize import itertools def create_training_dict(X, y): """Take a set of input features and their labels and package them along with some useful quantities into a dictionary. This could be a training,...
#!/usr/bin/env python # # 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 # "...
import humanize import pprint import contextlib import inspect import gevent import re from peewee import fn from datetime import datetime, timedelta from disco.api.http import Routes, APIException from disco.types.message import MessageTable, MessageEmbed, MessageEmbedField, MessageEmbedThumbnail from disco.types.us...
import logging import datetime import copy import os import aiohttp.web import ray.new_dashboard.modules.tune.tune_consts \ as tune_consts import ray.new_dashboard.utils as dashboard_utils from ray.new_dashboard.utils import async_loop_forever, rest_response logger = logging.getLogger(__name__) try: from ray...
# -*- coding: utf-8 -*- """ Tests for methods. """ from datetime import datetime from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.test import TestCase f...
"""This file implements a transformer-based model to detect intents and the corresponding slots for a given query. The model consists of the transformer encoder layer that comutes the contextual embedding of the input tokens. The slot corresponding to a token is predicted by passing the contextual embeddings into a li...
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. # See the LICENSE file in the project root for more information. import sys import os if __name__ == '__main__': #Dynamically append current script path to PYTHONPATH sys.path...
"""Test the module cluster centroids.""" from __future__ import print_function import numpy as np from numpy.testing import assert_raises from numpy.testing import assert_equal from numpy.testing import assert_array_equal from numpy.testing import assert_array_almost_equal from numpy.testing import assert_warns from ...
# Copyright 2008-2011 Nokia Networks # Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors # Copyright 2016- Robot Framework Foundation # # 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 Licens...
""" An extension of the TransportCoefficients module for two-phase flow in porous media .. inheritance-diagram:: proteus.TwophaseDarcyCoefficients :parts: 1 """ from __future__ import print_function from __future__ import absolute_import from __future__ import division from builtins import zip from builtins import ...
import functools import itertools from django.db import models from django.views.generic import base as views_base from django.template import loader from django import template as template_module from django import http from django.conf import settings _namespace_registry = {} class TemplatePrefixMeta(type): de...
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from test import run_only from mock import Mock from mock import patch from diamond.collector import Collector ...
import warnings from collections import deque from functools import total_ordering from django.db.migrations.state import ProjectState from django.utils.datastructures import OrderedSet from .exceptions import CircularDependencyError, NodeNotFoundError RECURSION_DEPTH_WARNING = ( "Maximum recursion depth exceede...
#!/usr/bin/env python from __future__ import print_function from setuptools import setup from setuptools import Distribution from setuptools.command.sdist import sdist from setuptools.extension import Extension import platform import re import sys import os SKIP_CYTHON_FILE = '__dont_use_cython__.txt' if os.path.ex...
# Copyright (c) 2014 Cisco Systems # 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...
## @file # classes represent data in FDF # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Gtacoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Base class for RPC testing import logging import optparse import os import sys import shutil import te...
#!/usr/bin/env python # Corey Brune - Sep 2016 # This script performs a rewind of a vdb # requirements # pip install --upgrade setuptools pip docopt delphixpy.v1_8_0 # The below doc follows the POSIX compliant standards and allows us to use # this doc to also define our arguments for the script. """Rewinds a vdb Usag...
from functools import partial class HiggsException(Exception): pass class HiggsScopeException(HiggsException): pass class HiggsSyntaxException(HiggsException): pass class HiggsDeclarationException(HiggsSyntaxException): pass def find_in_scope(name, kwargs): if name in kwargs: retur...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated by generateDS.py. # import sys import getopt import re as re_ etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLParser_import_lxml, XMLParser_import_elementtree ) = range(3) XMLParser_import_library = None try: # lxml fro...
#!/usr/bin/env python # vim: set sw=2 ts=2 softtabstop=2 expandtab tw=80 colorcolumn=80: """ This script takes sets of results and tries to infer correctness labels based on the results. The inferred results are written to a file describing the inferred mapping. """ import argparse import logging import os import pprin...
"""Tests for the dakotathon.experiment module.""" import os from nose.tools import ( raises, assert_true, assert_equal, assert_is_instance, assert_is_none, assert_is_not_none, ) from dakotathon.experiment import Experiment def setup_module(): """Fixture called before any tests are perform...
from __future__ import unicode_literals import json from django.conf import settings from django.db import transaction from django.shortcuts import get_object_or_404 from rest_framework.response import Response from rest_framework import status from onadata.apps.api.viewsets.xform_submission_api import XFormSubmission...
#!/usr/bin/env python """ @package mi.core.instrument.data_particle_generator Base data particle generator @file mi/core/instrument/data_particle_generator.py @author Steve Foley @brief Contains logic to generate data particles to be exchanged between the driver and agent. This involves a JSON interchange format """ ...
# 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 ...
# Copyright 2017 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...
from __future__ import division from django.shortcuts import * from django.conf import settings from django.db import transaction from django.db.models.expressions import RawSQL from django.contrib import messages from django.http import * from django.core.exceptions import * from django.views.generic import * from dja...
# Copyright 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 requ...
""" <Program> seattleclearinghouse_xmlrpc.py <Started> 6/28/2009 <Author> Jason Chen Justin Samuel <Purpose> A client library for communicating with the SeattleClearinghouse XMLRPC Server. Your Python scripts can import this library, create an instance of the SeattleClearinghouseClient class, then c...
""" Linear algebra -------------- Linear equations ................ Basic linear algebra is implemented; you can for example solve the linear equation system:: x + 2*y = -10 3*x + 4*y = 10 using ``lu_solve``:: >>> A = matrix([[1, 2], [3, 4]]) >>> b = matrix([-10, 10]) >>> x = lu_solve(A, b) ...
# Documented in http://zulip.readthedocs.io/en/latest/queuing.html from __future__ import absolute_import from typing import Any, Callable, Dict, List, Mapping, Optional from django.conf import settings from django.core.handlers.wsgi import WSGIRequest from django.core.handlers.base import BaseHandler from zerver.mode...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Run Regression Test Suite This module calls down into individual test cases via subprocess. It will ...
""" test the label propagation module """ import numpy as np import pytest from scipy.sparse import issparse from sklearn.semi_supervised import _label_propagation as label_propagation from sklearn.metrics.pairwise import rbf_kernel from sklearn.model_selection import train_test_split from sklearn.neighbors import Ne...
import os import sys import pytest from tests.lib.path import Path COMPLETION_FOR_SUPPORTED_SHELLS_TESTS = ( ('bash', """\ _pip_completion() { COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\ COMP_CWORD=$COMP_CWORD \\ PIP_AUTO_COMPLETE=1 $1 2>/dev/null ) ) } complete -o d...
""" CSCI-603: Lab 3(week 3) Section 03 Author: Pavan Prabahakar Bhat (pxb8715@rit.edu) Vinayak Marali (vkm7895@rit.edu) This is a program is to draw a tree using recursion. """ #IMPORTS CALLED HERE import turtle import random #validation for recursion depth #flag = True #while(flag): recursionDepth = input("...
from core.himesis import Himesis import uuid class HState2HProcDef(Himesis): def __init__(self): """ Creates the himesis graph representing the DSLTrans rule State2HProcDef. """ # Flag this instance as compiled now self.is_compiled = True super(HS...
# -*- coding: utf-8 -*- """ eve.methods.put ~~~~~~~~~~~~~~~ This module imlements the PUT method. :copyright: (c) 2015 by Nicola Iarocci. :license: BSD, see LICENSE for more details. """ from werkzeug import exceptions from datetime import datetime from eve.auth import requires_auth from eve.def...
#!/usr/bin/env vpython3 # Copyright 2020 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 json import os import shutil import sys import tempfile import unittest # The following non-std imports are fetched via vpyth...
# -*- coding: utf-8 -*- """ Testing using the Test Client The test client is a class that can act like a simple browser for testing purposes. It allows the user to compose GET and POST requests, and obtain the response that the server gave to those requests. The server Response objects are annotated with the details ...
# Copyright (c) 2007-8, Playful Invention Company. # Copyright (c) 2008-11, Walter Bender # Copyright (c) 2011 Collabora Ltd. <http://www.collabora.co.uk/> # 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...
from django.db import transaction from rest_framework import serializers from rest_auth.serializers import LoginSerializer, PasswordResetSerializer from rest_framework.validators import UniqueValidator from account.declaration import PartnerDeclarationPDFCreator from account.forms import CustomPasswordResetForm from ...
from core.himesis import Himesis, HimesisPreConditionPatternLHS import cPickle as pickle from uuid import UUID class HMoveOneInputRepeatedIndirectMatchDiffRulesLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HMoveOneInputRepeatedI...
from __future__ import (absolute_import, unicode_literals, division, print_function) import numpy as np import os from astropy.tests.helper import pytest from ..io import read, write, split_numbers from ..io import ref_mjd from ..io import high_precision_keyword_read from ..io import load_even...
from __future__ import print_function import random import consts import itertools import heapq class GenericWormBot: def __init__(self, bot_id, initial_position=(0,0)): self.bot_id = bot_id x,y = initial_position self.body_parts = [{'x':x, 'y':y}] self.FAILED = False self....
import datetime import logging from django.core.mail import EmailMultiAlternatives from django.conf import settings from django.db.models import Q from django.template.loader import render_to_string from django.utils import timezone from celery import shared_task import mandrill import pytz from .helpers import get_...
"""Library of Region objects I use in my research""" from aospy.region import Region china_west = Region( name='china_west', description='Western China', lat_bounds=(35, 45), lon_bounds=(75, 100), do_land_mask=False ) china_east = Region( name='china_east', description='Eastern China', ...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # Sandesh Session # import socket from vr_nldump.pysandesh.transport import TTransport from vr_nldump.pysandesh.protocol import TXMLProtocol from vr_nldump.pysandesh.work_queue import WorkQueue from vr_nldump.pysandesh.tcp_session import TcpSessio...
"""Module containing wrappers for multiprocessing""" __author__ = 'Robert Meyer', 'Mehmet Nevvaf Timur' from threading import ThreadError import queue import pickle try: import zmq except ImportError: zmq = None from collections import deque import copy as cp import gc import sys from threading import Threa...
#!/usr/bin/env python3 import functools import re import requests from . import error, types, utils class BaseAPIHandler(object): """Base API handler Example: >>> h = haiker.api.BaseAPIHandler( ... haiker.OAuth('MyConsumerKey', 'MyConsumerSecret', ... 'MyAccessToken...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from typin...
import datetime import logging from collections import OrderedDict from sqlalchemy.exc import IntegrityError from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.schema import Index, UniqueConstraint from sqlalchemy.dialects.postgresql import (ARRAY, JSON) from sqlalchemy import (Column, Integer, Te...
import argparse import os os.environ['THEANO_FLAGS'] = 'floatX=float32,device=gpu0,nvcc.fastmath=True,lib.cnmem=0.85' import sys import importlib from time import strftime import theano import theano.tensor as T import numpy as np import matplotlib import cPickle as pickle matplotlib.use('Agg') from sklearn.metrics i...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Integration tests for WithSimilarityScore logic.""" import json from ggrc import db from ggrc import models from ggrc.snapshotter.rules import Types from integration.ggrc import TestCase import integra...
import unittest import os from sqltxt.table import Table from sqltxt.query import Query, condition_applies, stage_columns, stage_conditions from sqltxt.column import Column, ColumnName, AmbiguousColumnNameError from sqltxt.expression import Expression, AndList, OrList import subprocess class QueryTest(unittest.TestCas...
# Copyright (c) 2013 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...
#!/usr/bin/python # TODO - python path - assuming condo here ## HEALTH WARNING - BETA CODE IN DEVELOPMENT ## ''' This standalone application will build a mesh from a nifti classification file. To keep the procedure as similar as possible to the way mrMesh used to do this, we will keep this as a standalon applicatio...
# -*- coding: utf-8 -*- # # 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 "L...
""" .. module:: mcmc :synopsis: Monte Carlo procedure .. moduleauthor:: Benjamin Audren <benjamin.audren@epfl.ch> This module defines one key function, :func:`chain`, that handles the Markov chain. So far, the code uses only one chain, as no parallelization is done. The following routine is also defined in this mo...
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = 'wesc+api@google.com (Wesley Chun)' from datetime import datetime import time i...
import sys class Node(object): def __init__(self, data=None, pred_node=None, succ_node=None): self.data = data self.succ_node = succ_node self.pred_node = pred_node def insert_as_pred(self, new_data): node = Node(new_data, self.pred_node, self) self.pred_node.succ_node...
# coding: utf-8 import urllib, json from django.conf import settings from django.shortcuts import get_object_or_404, redirect, render_to_response, render from django.utils.translation import ugettext, ugettext_lazy as _ from django.core.urlresolvers import resolve, reverse from django.db.models import Count from djang...
# Copyright 2020 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...
#!/usr/local/sci/bin/python #***************************** # # QC checks. # # #************************************************************************ # SVN Info #$Rev:: 55 $: Revision of last commit #$Author:: rdunn $:...
import json import logging import time from django.conf import settings from django.test import Client as DjangoClient from django.utils import timezone from ambulance.models import Ambulance, \ AmbulanceStatus from emstrack.tests.util import point2str from equipment.models import EquipmentItem from hospital.mode...
# -*- encoding: utf-8 -*- import os import re import requests from requests.auth import HTTPBasicAuth import xlrd import xml.etree.ElementTree as ET import json import urllib2 from ftplib import FTP from os.path import dirname from urlparse import urlparse from django.db import models from django.conf import setting...
# -*- coding: utf-8 -*- """ Created on Fri May 3 21:09:10 2013 @author: matt # based on MyPlayer3_Callback (which is newer than MyPlayer3.py) """ from __future__ import division import time, math, logging import numpy as np from threading import Lock, Thread import itertools # not sure I've added correct path in la...
import os from keen.client import KeenClient from keen.exceptions import InvalidEnvironmentError __author__ = 'dkador' _client = None project_id = None write_key = None read_key = None master_key = None base_url = None def _initialize_client_from_environment(): ''' Initialize a KeenCLient instance using environ...
"""Unit tests of cataloging managers.""" import pytest from ..utilities.general import is_never_authz, is_no_authz, uses_cataloging, uses_filesystem_only from dlkit.abstract_osid.osid import errors from dlkit.abstract_osid.type.objects import TypeList as abc_type_list from dlkit.primordium.id.primitives import Id f...
import datetime import itertools import unittest import tkp.db from tkp.db import associations as dbass from tkp.db import general as dbgen from tkp.db import nulldetections as dbnd from tkp.db.orm import DataSet from tkp.testutil import db_subs from tkp.testutil.decorators import requires_database @requires_databa...
# coding=utf-8 # This is a modified example originally from The Google AI Language Team # Authors and The HuggingFace Inc. team. # Modified by Richard Liaw. # Copyright 2018 The Google AI Language Team Authors, # The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed und...
# -*- coding: UTF-8 -*- from django import forms from django import http from django.conf import settings from django.conf.urls import url, patterns from django.contrib import admin from django.core import urlresolvers from assopy import admin as aadmin from assopy import models as amodels from conference import admin ...
# coding: utf-8 from __future__ import unicode_literals import unittest import responses from admitad.items import StatisticWebsites, StatisticCampaigns,\ StatisticDays, StatisticMonths, StatisticActions, StatisticSubIds,\ StatisticSources, StatisticKeywords from admitad.constants import DEFAULT_PAGINATION_LI...
import re from django.db.migrations import operations from django.db.migrations.migration import Migration from django.db.migrations.questioner import MigrationQuestioner class MigrationAutodetector(object): """ Takes a pair of ProjectStates, and compares them to see what the first would need doing to ma...
""" A Python script to convert excel files into JSON. """ import json import re import sys import codecs import os import constants from errors import PyXFormError from xls2json_backends import xls_to_dict, csv_to_dict # the following are the three sheet names that this program expects SURVEY_SHEET = u"survey" CHOI...
"""Support for Habitica sensors.""" from collections import namedtuple from datetime import timedelta import logging from aiohttp import ClientResponseError from homeassistant.const import CONF_NAME, HTTP_TOO_MANY_REQUESTS from homeassistant.helpers.entity import Entity from homeassistant.util import Throttle from ....
# -*- coding: utf-8 -*- # Copyright 2016 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...
# Copyright (C) 2010 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 of conditions and the f...
"""Support for Google Calendar event device sensors.""" from __future__ import annotations from datetime import timedelta from http import HTTPStatus import logging import re from typing import cast, final from aiohttp import web from homeassistant.components import http from homeassistant.config_entries import Conf...
# Copyright (c) 2003-2014 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # $Id: rrp.py 1105 2014-01-19 13:56:06Z bethus@gmail.com $ # # Author: Alberto Solino # # Description: ...
from __future__ import absolute_import from __future__ import with_statement import sys import types from contextlib import contextmanager from mock import Mock, patch from celery import states from celery.backends.cache import CacheBackend, DummyClient from celery.exceptions import ImproperlyConfigured from celery...
#!/usr/bin/python from bcc import BPF from ctypes import * import argparse import os from time import sleep,time,localtime,asctime import types # pre defines ------------------------------- ROOT_PATH = "/sys/class/net" IFNAMSIZ = 16 COL_WIDTH = 10 MAX_QUEUE_NUM = 1024 EBPF_FILE = "netqtop.c" # structure for network ...
# Copyright (c) 2014 Red Hat, 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Cloudscaling Group, 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/LI...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import uuid import logging from .. import helpers logger = logging.getLogger(__name__) # Module API def write_trial_and_record(conn, ...
# -*- coding: utf-8 -*- # Copyright 2022 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...
# Lint as: python3 # 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 agr...
#!/usr/bin/python # # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # """ Responsible for generating actual decoders based on parsed table representations. Note: We define a notion of "actual" an...
"""Handle network addresses and ranges Tools for validating, parsing, and comparing network addresses, ranges, and for querying whether a given address is within a set of ranges. Address is an abstract class, of which IPv4 and IPv6 are subclasses, which builds on top of the socket parsing of network addresses and rep...
#!/usr/bin/env python # Copyright (c) 2013, 2014 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Parse JSON-format manifest configuration file and provide the specific fields, which have to be integrated with packaging t...
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
""" Base classes for writing management commands (named commands which can be executed through ``django-admin.py`` or ``manage.py``). """ import os import sys from optparse import make_option, OptionParser import django from django.core.exceptions import ImproperlyConfigured from django.core.management.color import ...
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
from datetime import timedelta, datetime from django.shortcuts import render, get_object_or_404, redirect from django.core.urlresolvers import reverse from django.http import Http404 from django.contrib import auth from django.contrib import messages from django.utils.translation import ugettext_lazy as _ from django....
#!/usr/bin/env python from spider import * sys.path.append("..") from utils import Utils class ProjectPaperSpider(Spider): def __init__(self): Spider.__init__(self) self.utils = Utils() self.school = "project-papers" self.dirs = "eecs/papers/project-papers/" def doWork(self)...
""" Module for assessing impact of intervening galaxies (DLAs) on FRB measurements Based on calclations presented in Prochaska & Neeleman 2017 """ from __future__ import print_function, absolute_import, division, unicode_literals import numpy as np import pdb from scipy.interpolate import interp1d from astropy...
# CASpy - Python implementation of DVB Simulcrypt CAS # Currently, only implement EMM Generator (EMMG) # Implementing DVB-Simulcrypt message : import binascii import socket import ctypes from time import sleep import math # Utility functions, to allow for serialization of the ctypes.Structure classes def serialize(ct...
""" """ import sys import traceback from functools import wraps from PyQt4.QtGui import ( QWidget, QPlainTextEdit, QVBoxLayout, QTextCursor, QTextCharFormat, QFont, QSizePolicy ) from PyQt4.QtCore import Qt, QObject, QEvent, QCoreApplication, QThread, QSize from PyQt4.QtCore import pyqtSignal as Signal clas...
# Copyright (c) 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 ...
""" <Module Name> functions.py <Author> Santiago Torres-Arias <santiago@nyu.edu> <Started> Nov 15, 2017 <Copyright> See LICENSE for licensing information. <Purpose> publicly-usable functions for exporting public-keys, signing data and verifying signatures. """ import logging import time from securesyst...