text stringlengths 8.04k 46.5k |
|---|
"""Artifact Subspace Reconstruction."""
import logging
import numpy as np
from scipy import linalg, signal
from statsmodels.robust.scale import mad
from .utils import block_covariance, nonlinear_eigenspace
from .utils.asr import (geometric_median, fit_eeg_distribution, yulewalk,
yulewalk_filte... |
import abc
import binascii
import copy
import logging
import random
import time
from typing import cast, Any, Dict, List, NamedTuple, Optional, Sequence, Set, Union
import can
import cantools
import numpy as np
from scipy.interpolate import PchipInterpolator
from scipy.stats import truncnorm
from .maybe_open import O... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Combined scheduling and planning models (deterministic and robust).
'''
import pyomo.environ as pyomo
from pyomo.opt import SolverStatus, TerminationCondition
import numpy as np
import time
import pandas as pd
import dill
import collections
from stn.deg import degradat... |
"""
???+ note "Dataset classes which extend beyond DataFrames."
When we supervise a collection of data, these operations need to be simple:
- managing `raw`/`train`/`dev`/`test` subsets
- transferring data points between subsets
- pulling updates from annotation interfaces
- pushing update... |
# -*- coding: UTF-8 -*-
"""
..
---------------------------------------------------------------------
___ __ __ __ ___
/ | \ | \ | \ / the automatic
\__ |__/ |__/ |___| \__ annotation and
\ | | | | \ ... |
from manimlib.imports import *
# from jeremy.ref.debugTex import debugTeX
# 函数的上下极限
class fun(GraphScene):
CONFIG = {"upper": BLUE, "middle": RED, "lower": GREEN,"color_map": {r"\sup": BLUE, r"k\geq": BLUE, "a_k": BLUE},
"color_map_down": {r"\inf": GREEN, r"k\geq": GREEN, "a_k": GREEN},
... |
""" Multicast DNS Service Discovery for Python, v0.14-wmcbrine
Copyright 2003 <NAME>, 2014 <NAME>
This module provides a framework for the use of DNS Service Discovery
using IP multicast.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Less... |
'''
- This script finds the best lightgbm parameter combinations for an arbitrary list of models, so it's fully scalable.
- It uses a cross validated grid search, with values to be specified at execution, to widen or narrow search space.
- In a variety of different ways, you can specify features to match and exclude... |
import socket
import select
import copy
import threading
import logging
import os
import json
from time import time
import datetime
# List of valid commands/messages and number of fields
# First key is rover version name
vtypes = {}
vtypes['0'] = {}
vtypes['0']['cmd'] = [['ID', 0],
['POS', 0],
... |
#!/usr/bin/python2
#
# Copyright (c) 2014 <NAME> and <NAME>
# 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 ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# filtering and preprocessing
import os
from matplotlib import pyplot as plt
import numpy as np
import subprocess
def get_map_scores_for_probfuse(folder_with_res_to_evaluate, trec_eval_command, qrels_file):
files_to_evaluate = [f for f in os.listdir(folder_with_res_to_... |
from __future__ import print_function, division
import numpy
from numpy import pi, abs, sqrt, cos, sin, arccos, arctan, tan
from PyAstronomy.pyaC import pyaErrors as PE
import six.moves as smo
class MarkleyKESolver:
"""
Solve Kepler's Equation.
This class implements a solver for Kepler's Equation:
..... |
#!/usr/bin/env python3
#
# Copyright (c) 2016 <NAME>
# MIT License
#
"""
Build and maintain the BibTeX database for a literature of PDF files.
This tool try to extract the metadata from the PDF file, then query
the SAO/NASA Astrophysics Data System (ADS) for details, and finally
build the BibTeX entries.
References... |
##############################################################################
# Author: <NAME>, contact email: <EMAIL>
#
# This code implements the model presented in the article "Red Blood Cells in
# low Reynolds number flow: a vorticity-based characterization of shapes in two
# dimensions" in the Soft Matter Journ... |
# ---------------------------------------------------------------------------------------------
# Copyright (c) <NAME>. All rights reserved.
# Licensed under the MIT License. See LICENSE.md in the project root for license information.
# ---------------------------------------------------------------------------------... |
import subprocess
import os
import sys
import argparse
import numpy as np
import matplotlib.pyplot as plt
import simplekml
from wmpl.Utils.PlotMap import GroundMap
try:
# Python 2
import ConfigParser as configparser
except:
# Python 3
import configparser
def halfMags(low, high, div):
""" Retu... |
from typing import List, TYPE_CHECKING
if TYPE_CHECKING:
from . import ScheduleEdge, ScheduleNode
from . import TablaTemplate
from . import Component
from . import Instruction
from . import CYCLE_DELAYS
from .instruction import Instruction
from .tabla_utils import get_instr_cat_pe
from pytools import me... |
#!/usr/bin/env python3
"""
jobsub: a tool for Corryvreckan job submission
Steering files are generated based on steering templates by substituting
job and run specific variables. The variable information can be
provided to jobsub by command line argument, by a config file or by a
text file with run parameters (in comm... |
"""Generic functions."""
import collections
import contextlib
import errno
import itertools
import logging
import os
import re
import shutil
import StringIO
import tempfile
import textwrap
import threading
import types
# Limit on how many argument combinations we allow before aborting.
# For a sample of 16664 (sane)... |
import os
import numpy as np
class KeyError(Exception):
def __init__(self, msg):
Exception.__init__(self, msg)
class ProfileError(Exception):
def __init__(self, msg):
Exception.__init__(self, msg)
class HistoryError(Exception):
def __init__(self, msg):
Exception.__init__(self,... |
import datetime
import logging
from functools import partial
from typing import Any, Hashable, List, Union
import numpy as np
import pandas as pd
import pytz
import simplejson
import sqlalchemy
from sqlalchemy import select
def get_unused_col_name(col_name: str, df: pd.DataFrame) -> str:
"""
If `col_name` is... |
"""
visuals
-------
Functions for keyword and topic visualization.
Contents:
save_vis,
graph_topic_num_evals,
gen_word_cloud,
pyLDAvis_topics,
t_sne
"""
import inspect
import io
import math
import os
import time
import warnings
import zipfile
import matplotlib.pyplot as plt
import numpy as np
im... |
import numpy as np
import pandas as pd
import scipy as sp
from sklearn import metrics
import matplotlib.pyplot as plt
import itertools
from datetime import datetime
import warnings
from collections import Counter
from IPython.display import HTML
import auto_evaluation.templates as templates
from .reports import to_htm... |
#!/usr/bin/env python
"""
Copyright 2015 Brocade Communications Systems, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by appl... |
"""
This file exists to provide one common place for all serialisation and simplify_ and _detail
for all tensors (Torch) and collections.
"""
from tempfile import TemporaryFile
from typing import Collection
from typing import Dict
from typing import Tuple
import torch
import io
import numpy
import warnings
import syf... |
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor, nn
from torch.nn import Parameter
import math
from typing import Dict, Optional, Tuple
import torch
from onmt.modules.performer import Performer, ProjectionUpdater
from onmt.modules.optimized.self_attention_func import self_attn_func
cla... |
########################################################################
# Copyright 2020 Battelle Energy Alliance, LLC ALL RIGHTS RESERVED #
# Mobility Systems & Analytics Group, Idaho National Laboratory #
########################################################################
import pyodbc
import ... |
import yaml, xml.etree.ElementTree as ET, sys, subprocess, tempfile
import os.path
import servlet_def
import re
import urlparse
import hashlib
NS = {
"f": "http://java.sun.com/xml/ns/j2ee"
}
class NameAllocator(object):
def __init__(self, prefix):
self.prefix = prefix + "_%d"
self.counter = 0
... |
# Orçamentos de perfil multi-click (multi telha)
from math import sqrt
from decimal import *
from main.models import a11Insumos
from numpy import arange
from .utils.funcoes_calculos import (arrend_cima, escrever_linha_eap,
tot_peca_juncao)
from .utils.materiais_orcamento import (
... |
"""
This file only contains test for the different milestones during the project during development and potentially
contains errors in the implementation
"""
import numpy as np
from scipy.optimize import curve_fit
import matplotlib.pyplot as plt
from tqdm import tqdm, trange
from mpi4py import MPI
import os
from la... |
import warnings
import sys
import codecs
import numpy as np
import argparse
import json
import pickle
from rep_reader import RepReader
from util import read_passages_original as read_passages
from util import evaluate, make_folds, clean_words, test_f1, to_BIO, from_BIO, from_BIO_ind
import tensorflow as tf
sess = tf... |
import os
import json
import random
import urllib2
import uuid
import cgi
from datetime import datetime
from urlparse import urlparse
import mimetypes
import logging
import logging.handlers
from twilio.rest import TwilioRestClient
from flask import Flask, request, make_response, redirect
import dateutil.parser
import ... |
# -*- coding: utf-8 -*-
#
import sys
from tkinter import *
from tkinter import ttk
import CoolProp
from CoolProp.CoolProp import PropsSI
from cpgui_all import *
import gettext
import numpy as np
from PIL import ImageTk, Image
from scipy.optimize import bisect
class cpg_cycle3(myDialog):
... |
# -*- coding: utf-8 -*-
# --------------------------------------
# @Time : 2020/11/01
# @Author : <NAME>
# @Email : <EMAIL>
# @File : augmentation.py
# Description : data augmentation
# --------------------------------------
import cv2
import math
import random
import numpy as np
from PIL import Image
def ran... |
"""
Classes for specific source models
"""
import numpy as np
from yt.funcs import ensure_numpy_array
from tqdm.auto import tqdm
from pyxsim.utils import mylog
from yt.units.yt_array import YTQuantity
from yt.utilities.physical_constants import clight
from pyxsim.spectral_models import thermal_models
from pyxsim.utils ... |
# attributes.py - manages object attributes
# Copyright (C) 2005, 2006, 2007 <NAME> <EMAIL>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from sqlalchemy import util
from sqlalchemy.orm import util as orm_util
from sqlalchemy import lo... |
"""Test cases for the oracle approach class."""
from typing import Any, Dict, List, Set
import numpy as np
import pytest
from predicators.src import utils
from predicators.src.approaches.oracle_approach import OracleApproach
from predicators.src.envs.blocks import BlocksEnv
from predicators.src.envs.cluttered_table ... |
#!/usr/bin/env python
# coding: utf-8
import sys
import math
import time
import random
import pickle
import logging
import argparse
import importlib
import statistics
import numpy as np
import pandas as pd
import multiprocessing
import tensorflow as tf
import matplotlib.pyplot as plt
from typing import List
from ast ... |
import os
import pandas as pd
import numpy as np
import csv
import scipy as sp
import scipy.stats
from collections import Counter
import pickle
import math
import sys
import matplotlib.pyplot as plt
def format_iucn_df(statuses_through_time_file,start_year,current_year):
new_df = pd.DataFrame()
new_df['specie... |
"""Network representation and utilities
"""
import os
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
import geopandas
import numpy as np
import pandas
import shapely.errors
try:
import networkx as nx
USE_NX = True
except ImportError:
... |
from bokeh.models.formatters import DatetimeTickFormatter
import requests
import time
import datetime
import json
from collections import defaultdict
from typing import List, Dict, TextIO, Optional, Union, Any
import elasticsearch
import pandas as pd
import holoviews as hv
hv.extension('bokeh')
# Some Jaeger backend... |
import datetime
import json
import urllib.request
import datanews
import datetimerange
import ephem
import pytz
from flask import Flask, render_template, request, jsonify
from flask_compress import Compress
from googletrans import Translator
import send_email
from run_sql import MySQL
hourly_images = []
daily_images... |
import os
import time
import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.python.client import timeline
from matplotlib import pyplot as plt
from matplotlib.patches import Patch
import pandas as pd
import json
import optparse
import csv
import itertools
import sys
#################... |
"""InVEST Habitat Quality model"""
import os.path
import logging
import numpy
import csv
from osgeo import gdal
from osgeo import osr
import numpy as np
import pygeoprocessing.geoprocessing
logging.basicConfig(format='%(asctime)s %(name)-18s %(levelname)-8s \
%(message)s', level=logging.DEBUG, datefmt='%m/%d/%... |
import gzip
import math
import multiprocessing as mp
import os
import pickle
import re
import shutil
from typing import Optional
from xml.dom.minidom import getDOMImplementation, parseString
from xml.parsers.expat import ExpatError
from interpro7dw.interpro.oracle.matches import DC_STATUSES
from interpro7dw.utils impo... |
import os
import sys
import json
from threading import Lock
from abe_sim.brain.geom import angle_diff, euler_to_quaternion, euler_diff_to_angvel, invert_quaternion, quaternion_product, quaternion_to_euler
import math
import time
import numpy as np
import _thread
class TaskList:
def __init__(self):
sel... |
# -*- coding: utf-8 -*-
"""
Created on Fri Jul 17 10:23:20 2020
@author: dave
Take octave code from deg25.m and put this into python syntax
"""
from scipy.optimize import curve_fit
from scipy import asarray as ar,exp
#import argparse # Parsing command line arguments
import numpy as np ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 31 15:19:28 2017
@author: mousse
"""
import numpy as np
import os
import inspect
'''
Utils.py is implemented to generate results for AlphaDOGS and DeltaDOGS containing the following functions:
bounds : Generate vertices unde... |
# python imports
import re, random
from io import StringIO
# networkx imports
import networkx as nx
# code imports
from code.utilities import *
from code.node_classes import *
apply_node_label = '_EVAL_'
quantifiers = { '\\', '?!', '?', '!', '@' }
ord_operators = { 'IN', 'SUBSET', '>', '<', '..', '<=', '==>', '>=', 'M... |
# Copyright 2022 <NAME>.
# Licensed under the BSD 2-Clause License (https://opensource.org/licenses/BSD-2-Clause)
# This file may not be copied, modified, or distributed except according to those terms.
import argparse
import logging
import logging.config
import subprocess
from time import perf_counter
import random
... |
import gzip
import re
import nglview
import gzip
import bqplot as bq
import numpy as np
import io
from base64 import b64encode
from xml.etree import ElementTree
import matplotlib.pyplot as plt
from collections import OrderedDict
import scipy.constants as const
import ase
from ase.data import covalent_radii, atomic_num... |
"""
The module tellurium provides support routines.
As part of this module an ExendedRoadRunner class is defined which provides helper methods for
model export, plotting or the Jarnac compatibility layer.
"""
from __future__ import print_function, division, absolute_import
import random
import os
import sys
import war... |
import json
from math import ceil
from pathlib import Path
import dataclasses
import numpy as np
import samplerate
import soundfile
from paderbox.transform.module_fbank import MelTransform as BaseMelTransform
from paderbox.transform.module_stft import STFT as BaseSTFT
from paderbox.utils.nested import nested_op
from p... |
#!/usr/bin/env python
"""
stitch_spe.py
Purpose: Compare energies from different methods of single point energy
calculations on the same molecule set. If a reference file is
provided, then the RMSD in relative energies is computed for each
comparison file. If a reference file is ... |
#! /usr/bin/env python
import rospy
import numpy as np
import scipy.optimize
import ur_control.transformations as tr
from pyquaternion import Quaternion
X_AXIS = np.array([1., 0., 0.])
Y_AXIS = np.array([0., 1., 0.])
Z_AXIS = np.array([0., 0., 1.])
class Plane(object):
"""Represents a plane defined by a normal v... |
"""
CRSD pulse explorer
"""
__classification__ = "UNCLASSIFIED"
__author__ = ("<NAME>", "<NAME>")
import logging
import os
import numpy
from scipy.signal import spectrogram, resample
import tkinter
from tkinter import ttk
from tkinter.messagebox import showinfo
from tkinter.filedialog import askopenfilename
from ... |
# encoding: utf-8
# Distributed under the terms of the MIT License.
import unittest
import numpy as np
import ruamel.yaml as yaml
#import yaml
from spglib import get_symmetry
import ababe.stru.sogen as sogen
from ababe.stru.sogen import OccupyGenerator
from ababe.stru.element import GhostSpecie, Specie
from ababe.str... |
# -*- coding: utf-8 -*-
from calendar import monthrange
import datetime
import re
import sys
from ssguan.ignitor import IGNITOR_DOMAIN
from ssguan.ignitor.base.error import ExceptionWrap, NoFoundError, \
ClassCastError
from ssguan.ignitor.orm import properti
from ssguan.ignitor.orm.model import Model
fr... |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import re
import warnings
from operator import itemgetter
from six import string_types
from tabulate import tabulate
from monty.io import zopen
from monty.jso... |
import os
import json
import copy
import shutil
import ast
import numpy as np
import xml.etree.ElementTree as ET
from configobj import ConfigObj
from shapely.geometry import Polygon
from shapely.geometry import Point
import openquake.hazardlib.geo as geo
from openquake.hazardlib.geo.utils import get_orthographic_pr... |
# -*- coding: utf-8 -*-
"""
dicom2nifti
@author: abrys
"""
import os
import traceback
import logging
import nibabel
import numpy
import pydicom.config as pydicom_config
from pydicom.tag import Tag
import dicom2nifti.common as common
import dicom2nifti.settings as settings
import dicom2nifti.convert_generic as conve... |
"""
The data preparation recipe for the AMI Meeting Corpus.
NOTE on data splits and references:
- The official AMI documentation (http://groups.inf.ed.ac.uk/ami/corpus/datasets.shtml) recommends
three different data partitions: scenario-only, full-corpus, and full-corpus-asr, based on the
task that the data is used f... |
"""File import/export functions.
"""
import copy
import datetime
import math
import re
from typing import Iterator, List, Optional, TextIO, Tuple, Union
from xml.etree import ElementTree
import click
import numpy as np
import svgelements
import svgwrite
from multiprocess import Pool
from shapely.geometry import LineSt... |
import copy
from ..errors import (ContainerError, ImageNotFound,
create_unexpected_kwargs_error)
from ..types import HostConfig
from .images import Image
from .resource import Collection, Model
class Container(Model):
@property
def name(self):
"""
The name of the contai... |
import math
import random
from typing import Dict, Any, Tuple, Optional, List
import cv2
import numpy as np
from opensfm import pygeometry, pyrobust, transformations as tf, pymap
def nullspace(A: np.ndarray) -> Tuple[np.ndarray, np.ndarray]:
"""Compute the null space of A.
Return the smallest singular value... |
########################################################################
# Project Name: Decentralised Deep Learning without Forgetting
# Creators: <NAME> (<EMAIL>)
# <NAME> (<EMAIL>)
# <NAME> (<EMAIL>)
# <NAME> (<EMAIL>)
# Project Owners: <NAME> (<EMAIL>),
# <NAME> (<EMAIL... |
# Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD
#
# 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 ... |
"""
A set of utilities for setting up property estimation workflows.
"""
import copy
from collections import namedtuple
from propertyestimator import unit
from propertyestimator.protocols import analysis, forcefield, gradients, groups, reweighting, coordinates, simulation, \
storage
from propertyestimator.thermody... |
# -*- coding: utf-8 -*-
"""
Created on 2017/10/9
@author: MG
"""
from datetime import datetime, timedelta
from sqlalchemy import MetaData, Table, Column, Integer, String, DateTime, Float, Boolean, SmallInteger, Date, Time
from sqlalchemy.dialects.mysql import DOUBLE
from sqlalchemy.orm import mapper
from sqlalchemy.ext... |
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2010-2021 NV Access Limited, World Light Information Limited,
# Hong Kong Blind Union, Babbage B.V., <NAME>
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
from enum import IntEnum
import os
import codecs
imp... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017-2020 The Project X-Ray Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
""" Generate grid from database dump ... |
import os
import numpy as np
from astropy.io import fits
from astropy.table import Table
class DirectoryManager:
def __init__(self,conf, startstep='bias'):
self.dirnames = dict(conf['DIRS'])
PATHS = dict(conf['PATHS'])
self.raw_data_loc = os.path.abspath(PATHS['raw_data_loc'])
sel... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 19 14:41:10 2021
@author: <NAME>, Rainfall.NZ
"""
#Load modules
import numpy as np
import pandas as pd
import itertools
import numbers
import math
from scipy.signal import find_peaks
import pytz
import random
import scipy.stats as st
def rain_outliers( rain_data: pd.Dat... |
"""
RPN:
data =
{'data': [num_images, c, h, w],
'im_info': [num_images, 4] (optional)}
label =
{'gt_boxes': [num_boxes, 5] (optional),
'label': [batch_size, 1] <- [batch_size, num_anchors, feat_height, feat_width],
'bbox_target': [batch_size, num_anchors, feat_height, feat_width],
'bbox_weig... |
import random
from random import randrange
from datetime import datetime
import numpy as np
import math
from math import sin, cos, sqrt, atan2, radians
# import matplotlib.pyplot as plt # <MATPLOTLIB>
import scipy.spatial as spatial
import numpy
import requests
import string
from cryptography.h... |
import warnings
from typing import Union, Tuple, Dict
import pygame
from pygame_gui._constants import UI_BUTTON_PRESSED, UI_HORIZONTAL_SLIDER_MOVED
from pygame_gui._constants import UI_COLOUR_PICKER_COLOUR_PICKED, UI_TEXT_ENTRY_FINISHED
from pygame_gui._constants import UI_COLOUR_PICKER_COLOUR_CHANNEL_CHANGED
... |
import os
import signal
from PySide2.QtCore import QThreadPool
from qtpy import QtGui
from regional import many
from cidan.GUI.Data_Interaction.CalculateSingleTrialThread import \
CalculateSingleTrialThread
from cidan.GUI.Data_Interaction.DemoDownloadThread import DemoDownloadThread
from cidan.GUI.Data_Interactio... |
from abc import ABC
from itertools import permutations
import numpy as np
from .exceptions import TensorComputationError
from .utils import is_multiple, normalize_index, posify_index, sanitize_index
EQ_TOL_REL = 1e-15
EQ_TOL_ABS = 1e-8
class Tensor:
"""Wrapper class around a numpy array that keeps track of cov... |
# -*- coding: utf-8 -*-
import difflib
import logging
import pprint
from copy import copy, deepcopy
from functools import reduce
from typing import Set, Union
import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq
import simplejson
from kartothek.core import naming
from kartothek.core._compat import ... |
import json
import os
import jittor as jt
import xml.etree.ElementTree as ET
import numpy as np
import random
import cv2
# Label map
voc_labels = ('aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa',... |
# -*- coding: utf-8 -*-
"""
parser
~~~~~~
Implements Code Parser
:author: BlBana <<EMAIL>>
:homepage: https://github.com/WhaleShark-Team/cobra
:license: MIT, see LICENSE for more details.
:copyright: Copyright (c) 2018 Feei. All rights reserved
"""
from phply.phplex import lexer # ... |
"""
*AllenNLP Tango is an experimental API and parts of it might change or disappear
every time we release a new version.*
"""
import collections
import copy
import itertools
import json
import logging
import random
import re
import weakref
from abc import abstractmethod
from os import PathLike
from pathlib import Path... |
import os
import subprocess
import sys
import threading
import functools
import contextlib
import logging
import re
import time
import gc
import traceback
from StringIO import StringIO
from test import test_support
from concurrent import futures
from concurrent.futures._base import (
PENDING, RUNNING, CANCELLED, C... |
#
# Copyright (c), 2016-2020, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author <NAME> <<EMAIL>>
#
"""
T... |
# encoding: utf-8
# Copyright 1999-2017 Alibaba Group Holding Ltd.
#
# 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 b... |
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# 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... |
import operator
from pathlib import Path
import subprocess
import json
import dsnparse
from .utils import classify, dataclass
from .loggers import sql_log
from .context import context
from .core.sql import Sql, QueryBuilder, sqlite, postgres, mysql, duck, bigquery, quote_id
from .core.sql_import_result import sql_re... |
# Clear Linux Dissector - view definitions
#
# Copyright (C) 2018-2019 Intel Corporation
#
# Licensed under the MIT license, see COPYING.MIT for details
import os
import sys
from datetime import datetime
from itertools import islice
import reversion
from django import forms
from django.contrib import messages
from dj... |
"""
Copyright 2015 <NAME>, 2017 <NAME>, 2018 <NAME>
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... |
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from dromosense.tools import *
from dromosense.constantes import rho_eau,Cpf,kelvin
from dromosense.sencity import *
import math
from datetime import datetime
from dateutil import tz
CET=tz.gettz('Europe/Paris')
import sys
from matplotlib.sankey impor... |
"""
A collection of functions for modifying source code that is embeded into the Sphinx documentation.
"""
import sys
import os
import re
import tokenize
import importlib
import inspect
import subprocess
import tempfile
import unittest
import traceback
import ast
from docutils import nodes
from collections import na... |
#!/usr/bin/env python
"""
Static Analyzer qualification infrastructure.
The goal is to test the analyzer against different projects,
check for failures, compare results, and measure performance.
Repository Directory will contain sources of the projects as well as the
information on how to build them and the expected... |
#!/usr/bin/env python3
# Script to convert CSV files into FXT/HST formats.
import argparse
import sys
import os
import csv
import re
from struct import pack, pack_into, calcsize
import time
import datetime
import mmap
class Spinner:
def __init__(self, step):
self._n = self._x = 0
self._chars = '\\... |
# coding: utf-8
from __future__ import unicode_literals
import codecs
import re
from collections import OrderedDict
from os import SEEK_CUR
from sys import platform
from serial import Serial, SerialBase, serial_for_url
from serial.rs485 import RS485Settings
from serial.serialutil import LF
from serial.tools.list_ports... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import configparser
import datetime as dt
import logging
import sys
import time
from enum import Enum
from pathlib import Path
from threading import Lock, Thread
from typing import List, Optional, Tuple
import imageio
import numpy as np
import torch
import typer
from hum... |
#
# run with 'nosetests' utility
import tempfile
import re
from basetest import *
RE_MAC = "^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$"
ether_chksum_sz = 4 # this chksum will be added automatically(outside of scapy/packet editor)
TEST_MAC_1 = "10:10:10:10:10:10"
# Test scapy structure
TEST_PKT = Ether(dst=TEST_MAC_1)/IP... |
#!/usr/bin/env python
'''
What is a FASTA format file/string?
This module follows the NCBI conventions: http://blast.ncbi.nlm.nih.gov/blastcgihelp.shtml
'''
import cStringIO
import math
def idFromName(line):
'''
line: a fasta nameline
returns: an id parsed from the fasta nameline. The id is the first
... |
def get_spectrum(T,logg,Z,a):
"""Querying a PHOENIX photosphere model, either from disk or from the
PHOENIX website if the spectrum hasn't been downloaded before, and
returning the names of the files in the data subfolder. These may then
be read by the wrapper function read_spectrum() below.... |
from __future__ import absolute_import, division
import json
import logging
import re
import requests
import time
from cStringIO import StringIO
from contextlib import closing
from datetime import datetime
from flask import current_app
from lxml import etree, objectify
from changes.artifacts.coverage import Coverage... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.