text stringlengths 8.04k 46.5k |
|---|
__author__ = '<NAME> (<EMAIL>)'
import os
import statistics
import numpy as np
import pandas as pd
from news_popularity_prediction.datautil.feature_rw import h5load_from, h5store_at, h5_open, h5_close, get_target_value,\
get_kth_row
from news_popularity_prediction.discussion.features import get_branching_feature... |
import torch
import matplotlib.pyplot as plt
import numpy as np
import time
import floris.tools as wfct
from superposition import super_position
from optimisation import FLORIS_wake_steering, CNNwake_wake_steering
from superposition import FLORIS_farm_power, CNNWake_farm_power
__author__ = "<NAME>"
__copyr... |
# -*- coding: utf-8 -*-
#20210827
"""
Fine-tuning the library models for language modeling on a text file (GPT-2,).
GPT-2 is fine-tuned using a causal language modeling (CLM) loss
"""
import argparse
import glob
import logging
import os
import random
import gc
import h5py
import boto3
import shutil
i... |
# ===============LICENSE_START=======================================================
# Acumos CC-BY-4.0
# ===================================================================================
# Copyright (C) 2020 Orange Intellectual Property. All rights reserved.
# =======================================================... |
# Copyright 2013 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 required by applicable law or ... |
import os
import socket
import time
import contextlib
from threading import Thread
from threading import Event
from threading import Lock
import json
import subprocess
from contextlib import contextmanager
import pytest
import mock
import requests
from urllib3.util.retry import Retry
from requests.adapters import HTTP... |
"""Module to create the environment and apply wrappers."""
from collections import deque
import os
import random
import time
import gym
from gym import spaces
import numpy as np
import pommerman
import networks
from subproc_vec_env import SubprocVecEnv
from pommerman.constants import GameType
def _make_train_env(c... |
#!/usr/bin/env python
import os
import numpy as np
from astropy.io import fits
import sextractor_engine as seng
import pixel_rejector as pr
import glob
def quad_correct(pixel_series=None, bias=None, flat=None, ivar_series=None, time_series=None, nl_coeff=None):
# Compute the polynomial coefficients for this pixel... |
#!/usr/bin/python3
# Polyglot Node Server for EnvisaLink EVL 3/4 Device (DSC)
import sys
import envisalinktpi as EVL
import polyinterface
# TODO: Test Fire zone and reporitng functionality
# TODO: Add heartbeat from nodeserver
# TODO: Add shortcut arming (with #)
# TODO: Process CID events for more information
# con... |
import machine as m # for uart use
import utime # for time control
# --------- INSTRUCTIONS -----
PING = 0x01
READ = 0x02
WRITE = 0x03
REG_WRITE = 0x04
ACTION = 0x05
RESET = 0x06
REBOOT = 0x08
STATUS = 0x55
SYNC_READ = 0x82
SYNC_WRITE = 0x83
BULK_READ = 0x92
BULK_WRITE = 0x93
# -------- EEPROM -------------
XL320_M... |
#!/usr/bin/env python
import argparse
import itertools
import math
import subprocess
import tqdm
from pathlib import Path
import numpy as np
def make_numerical_tex_string(step, input_size, output_size, padding, kernel_size, stride, dilation, mode):
"""Creates a LaTeX string for a numerical convolution animation.... |
# Copyright (c) OpenMMLab. All rights reserved.
import math
import warnings
import torch
import torch.nn as nn
import numpy as np
import torch.nn.functional as F
from collections import OrderedDict
from mmcv.cnn import (build_norm_layer, constant_init, kaiming_init,
normal_init, trunc_normal_init... |
# -*- coding: utf-8 -*-
import datetime
import math
import os.path
import re
import time
import urllib
import urlparse
import uuid as uuid_
import bleach
from django.contrib.humanize.templatetags import humanize
from django.template import defaultfilters
from django.utils.html import escape, strip_tags
from django.ut... |
import sys
sys.path.append('core')
from PIL import Image
import argparse
import os
import time
import numpy as np
import torch
import torch.nn.functional as F
import matplotlib.pyplot as plt
import datasets
from utils import flow_viz
from utils import frame_utils
from raft import RAFT
from utils.utils import InputPa... |
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2021 by University of Kassel and Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. All rights reserved.
import pandapower as pp
import pandapower.shortcircuit as sc
import pandapower.test
import numpy as np
import os
import p... |
import numpy as np
import matplotlib.pyplot as plt
import os
import warnings
from datetime import date
from math import e
def calc_rate(data1, data2):
if(data2 == 0):
return data1
else:
if(data1 < data2):
return (data2 / data1) * -1
else:
return data1 / data2
de... |
#
# Copyright (c) 2020 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 writi... |
import sys, os, types
thisPath = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(thisPath,"../..")))
from STTools import *
import xml.etree.cElementTree as ET
import Utils.ElementTreeUtils as ETUtils
import Utils.Range as Range
from collections import defaultdict
def makeEntityE... |
"""Functionality for converting a Format 2 workflow into a standard Galaxy workflow."""
import argparse
import copy
import json
import logging
import os
import sys
import uuid
from collections import OrderedDict
from typing import Dict, Optional
from ._labels import Labels
from .model import (
convert_dict_to_id_... |
#
# Copyright (c) 2018 ISP RAS (http://www.ispras.ru)
# Ivannikov Institute for System Programming of the Russian Academy of Sciences
#
# 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
#
# h... |
import random
import math
import matplotlib
from matplotlib.backends.backend_qt5agg import FigureCanvas
import matplotlib as mpl
import matplotlib.figure as mpl_fig
import matplotlib.animation as anim
import PyQt5.QtCore
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import \
QLabel, \
QGridLay... |
# %%
from pymaid_creds import url, name, password, token
from data_settings import pairs_path, data_date
import pymaid
rm = pymaid.CatmaidInstance(url, token, name, password)
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import pandas as pd
import cmasher as cmr
# allows text to be editabl... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
##########################################################################
#
# AutoTST - Automated Transition State Theory
#
# Copyright (c) 2015-2020 <NAME> (<EMAIL>)
# and the AutoTST Team
#
# Permission is hereby granted, free of charge, to any person obtaining a
# ... |
import os, random, pygame, thorpy
from FantasyStrategia.effects import effects
from PyWorld2D.mapobjects.objects import MapObject
INCOME_PER_VILLAGE = 100
INCOME_PER_WINDMILL = 500
def sgn(x):
if x > 0:
return 1
elif x < 0:
return -1
return 0
def get_sprite_frames(fn, deltas=None, s=32, c... |
import sys
from builtins import reversed
import ast
import astor
from argparse import ArgumentParser
from enum import Enum
from typing import List
from typing import Set
class Types(Enum):
INTS = 1
BYTES = 2
INT = 3
class Var:
num_s_regs = 8
num_t_regs = 8
optimize = True
def __init__(... |
import asyncio
import asyncio.sslproto
import logging
import ssl
from async_timeout import timeout as async_timeout
from copy import deepcopy
from ldap3.operation.add import add_operation
# LDAP3 includes
from ldap3.operation.bind import bind_response_to_dict_fast
from ldap3.operation.delete import delete_operation
fro... |
from tkinter import *
from tkinter import filedialog, messagebox
import os, shutil, subprocess
from os import listdir
from os import path
from os.path import isfile, join, splitext
import platform
root = Tk()
root.minsize(640, 640)
root.resizable(0, 0)
root.title("MXSkinNamer")
root.directory = None
dynosList = {"Hon... |
#!/usr/bin/python3
# Description
###############################################################################
'''
runprank.py is a script to run the software p2rank and then convert its output
to box coordinates to be used as input to docking software like Vina
Created by: <NAME>
Version: 0.4
'''
import os
import... |
# Copyright 2014 Nervana Systems Inc., 2016 <NAME> 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 b... |
#!/usr/bin/env python
from __future__ import print_function
from __future__ import unicode_literals
from array import array
try:
import certifi
except ImportError:
# on py27 on windows, it tries to import pseudo "certifi" module instead of original one.
# to avoid the weird behavior, the pseudo "certifi" ... |
import numpy as np
from sklearn.model_selection import RepeatedStratifiedKFold, StratifiedShuffleSplit
from sklearn.linear_model import LogisticRegression
from sklearn.isotonic import IsotonicRegression
from scipy.special import expit
import matplotlib.pyplot as plt
from sklearn.metrics import f1_score
import ti... |
import numpy as np
import eqdes.nonlinear_foundation
from tests import models_for_testing as ml
from eqdes import dbd
from eqdes import models as dm
from eqdes import design_spectra
import sfsimodels as sm
import geofound as gf
from tests.checking_tools import isclose
def test_ddbd_frame_fixed_small():
hz = d... |
# Author: <NAME>
# email: <EMAIL>
# this file includes functions about transforming the bounding box
import numpy as np, math, time, copy
from math import radians as rad
from .private import safe_bbox, safe_center_bbox, bboxcheck_TLBR, bboxcheck_TLWH
from .math_geometry import get_2dline_from_pts_slope, get_2dpts_fro... |
"""Test objects in module."""
import sys
from functools import partial
import pytest
from colorclass.core import apply_text, ColorStr
from tests.conftest import assert_both_values, get_instance
def test_apply_text():
"""Test apply_text()."""
assert apply_text('', lambda _: 0 / 0) == ''
assert apply_tex... |
"""
Misc tools for implementing data structures
"""
import cPickle
try:
from io import BytesIO
except ImportError: # pragma: no cover
# Python < 2.6
from cStringIO import StringIO as BytesIO
import itertools
from numpy.lib.format import read_array, write_array
import numpy as np
import decimal
import mat... |
import csv
import json
import logging
import multiprocessing as mp
import os
import sys
import scipy
import pandas as pd
import daisy
import numpy as np
from lsd import local_segmentation
from pymongo import MongoClient
from scipy.spatial import KDTree
import pymaid
from . import database, synapse, evaluation
logger... |
from numpy import (abs, array, eye, rint)
# from scipy.linalg import lu, svd
from sympy import acos, cos, pi, sin, sqrt, Rational
def round_if_safe(val, atol):
ival = rint(val)
if abs(ival - val) < atol:
return int(ival)
else:
return val
def rotx(theta):
c = cos(theta)
s = sin(t... |
import os
import csv
from functools import partial
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import matplotlib.lines as mlines
import matplotlib.ticker as mticker
import matplotlib.gridspec as gridspec
import pandas
import seaborn.apionly as seaborn
import wqio
from wqio imp... |
from __future__ import division
import os.path as op
from itertools import product
import numpy as np
import pandas as pd
import nibabel as nib
from scipy.signal import periodogram
import pytest
from pytest import approx
from .. import glm
def assert_highly_correlated(a, b, thresh=.999):
corr = np.corrcoef(a.f... |
import pandas as pd
import numpy as np
import sys
import copy
import subprocess
import os
CUR_PATH = os.path.abspath(os.path.dirname(__file__))
def main():
# Import CPS data file
data = pd.read_csv(os.path.join(CUR_PATH, 'cps_raw.csv.gz'),
compression='gzip')
adj_targets = pd.read... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# metadata
"""Python Freezer"""
__version__ = ' 0.1.0 '
__author__ = ' <NAME> '
__email__ = ' <EMAIL> '
import logging as log
import os
import re
import signal
import sys
import time
from copy import copy
from ctypes import byref, cdll, create_string_buffer
from datetim... |
# generated by datamodel-codegen:
# filename: biomedical.json
# timestamp: 2022-05-24T09:26:50+00:00
from __future__ import annotations
from enum import Enum
from typing import List, Optional, Union
from easyDataverse.core import DataverseBase
from pydantic import Field
class DesignType(Enum):
"""
Des... |
import re
import os
import time
import threading
import ssl
import json
import random
import string
try:
import urllib.request as urllib_request # for Python 3
except ImportError:
import urllib2 as urllib_request # for Python 2 and Jython
try:
from urllib.parse import urlparse # for Python 3
except Import... |
#!/usr/bin/env python3
import os
import sys
import time
from functools import partial
from types import SimpleNamespace
from string import ascii_lowercase
import jax
import jax.numpy as jnp
from comet_ml import Experiment
import torch
sys.path.append('..')
from train_tools import init_strset, shuffle, minibatches, to... |
# Copyright 2006-2012 <NAME>
"""
Pairwise alignment. All coordinates are strand-specific
"""
import copy
import re
from pycbio.hgdata.psl import PslReader
from pycbio.sys.fileOps import prLine, iterLines
from pycbio.sys import PycbioException
# FIXME: need range/overlap operators
otherStrand = {"+": "-", "-": "+"}
... |
#List of functions :
# colorsGraphs(df, feature, genderConfidence = 1, nbToRemove = 1)
# text_normalizer(s)
# compute_bag_of_words(text)
# print_most_frequent(bow, vocab, gender, n=20)
# model_test(model,X_train,y_train,X_test,y_test, full_voc, displayResults = True, displayColors = False)
# predictors(df,... |
"""
Test the quality of inference, measured by num edges + num mutations, and (if
using simulated data) the KC distance
"""
import os.path
import argparse
import collections
import itertools
import multiprocessing
import re
import time
import logging
import json
import msprime
import tskit
import numpy as np
import st... |
import torch
import os
import datetime
import pickle
import dill
import random
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import pandas as pd
from torch.optim.lr_scheduler import ReduceLROnPlateau
from torch import optim
from Networks import EncoderLinearQuery, DecoderKeyValueGCNMultiEmb... |
# import linear algebra and data manipulation libraries
import numpy as np
import pandas as pd
# import matplotlib for plotting
from matplotlib.pyplot import imshow
import matplotlib.pyplot as plt
# import helper libraries
import requests
from io import BytesIO # Use When expecting bytes-like objects
import pickle
fr... |
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
# General
import os, sys, pickle, json
import pandas as pd
import numpy as np
# Dash and plotly
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
import plotly.graph_objs as go
# colors
import matplotlib
from matplotlib import cm
# Mat... |
from turtle import color
import matplotlib.pyplot as plt
import numpy as np
import os
import glob
from process_data.uniformization import uniformization, reducePoint , Reduce
from process_data.B_Spline_Approximation import BS_curve
import math
def plotMap(juncDir, traDir=None, segBegin=0, segEnd=0, tra_begin=0, tra_le... |
from typing import List
from tabulate import tabulate
class Solution:
def isUnique(self, s):
if s == "":
return True
kv = {}
for c in s:
if kv.get(ord(c)) is None:
kv[ord(c)] = 1
else:
kv[ord(c)] += 1
if kv... |
from __future__ import print_function
import os
import json
import shutil
import textwrap
import jinja2
from lxml import etree as ET
from collections import defaultdict
from iatirulesets.text import rules_text
languages = ['en']
# Define the namespaces necessary for opening schema files
namespaces = {
'xsd': 'htt... |
from typing import Final, Iterable, NamedTuple, Union
from functools import reduce
import math
from itertools import permutations, repeat
import ptg.dual_quad as dual_quad
class Coordinate(NamedTuple):
"""Creates a coordinate as a (x, y) pair of floats."""
x: float # x-coordinate
y: float # y-coordina... |
import numpy as np
from numba import cuda
from numba.core import types
from numba.cuda.testing import skip_on_cudasim, CUDATestCase
import unittest
from numba.np import numpy_support
def set_a(ary, i, v):
ary[i].a = v
def set_b(ary, i, v):
ary[i].b = v
def set_c(ary, i, v):
ary[i].c = v
def set_reco... |
import os
import sys
from astropy.io import fits
import fnmatch
import numpy as np
from scipy.ndimage import label, center_of_mass, fourier_ellipsoid, \
fourier_gaussian, gaussian_filter
from io_functions import *
from image_functions import *
from photometry_functions import *
import c_interface_functions as ci
fr... |
import hashlib
import socket
import os
import time
import json
import _thread
from datetime import datetime
ADMINISTRATOR_PASSWORD = "<PASSWORD>"
SERVER_CONFIG = {}
PASUE_SERVICE = False
def update_config():
global SERVER_CONFIG
with open('config.json', 'w') as f:
f.write(json.dumps(S... |
# A simple parser that builds a fully-qualified Demes Graph from an input JSON
# string.
#
# Requires Python 3.7+.
#
# This implementation is NOT recommended for use in any downstream software and
# is provided purely as reference material for parser writers (i.e., in other
# programming languages). Python users should... |
import torch
import json
from transformers import RobertaTokenizer, RobertaModel, BertTokenizer, BertModel
import numpy as np
import argparse
import os
from tqdm import tqdm
import spacy
from multiprocessing import Pool
from torch.nn.modules.distance import PairwiseDistance
from gurobi import *
from scipy.special impor... |
#!/usr/bin/env python3
"""
Transcrypt CI testserver.
Hit /index with a browser and you'll see what it does.
In travis we hit it via `xvfb-run firefox \
http://127.0.0.1:8080/do/hello,time,transcrypt/dictionaries,...`
This is to speed up CI testing:
- phantomjs was no option, too much incompat with real brows... |
import os
import yaml
import re
from collections import OrderedDict
from .. import version
model_dir = '/mnt/lustre/share/DSK/model_zoo/pytorch/imagenet'
model_zoo = {
'resnet18': 'resnet18-5c106cde.pth',
'resnet34': 'resnet34-333f7ec4.pth',
'resnet50': 'resnet50-19c8e357.pth',
'resnet101': 'resnet101-... |
import os
import glob
import click
import pandas
import nibabel as nib
from .batch_manager import BatchManager, Job
from .config_json_parser import ClpipeConfigParser
import json
from pkg_resources import resource_stream, resource_filename
import clpipe.postprocutils
import numpy
import logging
import gc
import psutil
... |
# Standard Library
import datetime
import random
from typing import Dict, List, Optional
# Third Party Code
from bitstring import BitStream
from dateutil.tz import tzlocal
# Supercell Code
from supercell.weatherlink.exceptions import BadCRC
from supercell.weatherlink.utils import crc16, CRC16_TABLE, make_time
FORECA... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pandas as pd
from datetime import datetime, timedelta
import numpy as np
from mpl_toolkits.axes_grid1 import host_subplot
import mpl_toolkits.axisartist as AA
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.ticker as tck
import matplotlib.font_man... |
"""code from https://github.com/tstandley/taskgrouping/blob/master/model_definitions/resnet_taskonomy.py"""
import torch.nn as nn
import math
import torch.nn.functional as F
import torch.utils.model_zoo as model_zoo
from torch.nn import init
import torch
# from .ozan_rep_fun import ozan_rep_function, trevor_rep_functio... |
import dataclasses
from datetime import datetime
import json
import logging
import os
import re
from dataclasses import dataclass
from typing import List, Any, Optional, Tuple, Mapping, Dict
from github import Github, GithubException
from github.CheckRun import CheckRun
from github.CheckRunAnnotation import CheckRunAn... |
import json
import os
import re
from io import BufferedReader, TextIOWrapper
from tempfile import TemporaryDirectory
import pytest
from cognite.client import CogniteClient
from cognite.client._api.files import FileMetadata, FileMetadataList, FileMetadataUpdate
from cognite.client.data_classes import (
FileMetadat... |
import re
import sys
import itertools
import collections
from cldfbench.catalogs import Glottolog
import cldfcatalog
from clldutils.misc import slug
from ditrans2cldf import bibliography as bib
def extract_table(original_table, primary_key, columns):
"""Return a table extracted from another table.
This wil... |
from sympy import (Symbol, Rational, Order, exp, ln, log, nan, oo, O, pi, I,
S, Integral, sin, cos, sqrt, conjugate, expand, transpose, symbols,
Function, Add)
from sympy.core.expr import unchanged
from sympy.testing.pytest import raises
from sympy.abc import w, x, y, z
def test_caching_bug():
#needs to b... |
from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
import base64
import re
import sys
import logging
import os
import time
from flexget import plugin
from flexget.entry import Entry
from flexget.event import event
from f... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import random
import numpy as np
import gym
import logging
import pickle
import ray
from ray.rllib.env.atari_wrappers import wrap_deepmind, is_atari
from ray.rllib.env.base_env import BaseEnv
from ray.rllib.en... |
import random
from abc import ABC, abstractmethod
from copy import deepcopy
from functools import partial
from typing import Tuple, Iterable, List
import numpy as np
import torch
from nltk import Tree
from torch.utils.data import DataLoader
import qelos as q
from parseq.datasets import OvernightDatasetLoader, autocol... |
# Copyright: (c) 2019, <NAME> <<EMAIL>>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import traceback
from os import urandom
import os.path
from platform import system
from base64 imp... |
from __future__ import absolute_import, print_function, division
import os
import logging
from six import integer_types
import theano
from theano import Apply
from theano import gof
from theano.tensor import as_tensor_variable, TensorType
from theano.tensor.nnet.abstract_conv import get_conv_output_shape
from theano.... |
# art3d.py, original mplot3d version by <NAME>
# Parts rewritten by <NAME> <<EMAIL>>
# Minor additions by <NAME> <<EMAIL>>
"""
Module containing 3D artist code and functions to convert 2D
artists into 3D versions which can be added to an Axes3D.
"""
import math
import numpy as np
from matplotlib import (
artist... |
import sys
sys.path += ['../']
import os
import torch
from data.msmarco_data import GetTrainingDataProcessingFn, GetTripletTrainingDataProcessingFn, \
GetQuadrapuletTrainingDataProcessingFn, GetGroupedTrainingDataProcessingFn_polling,GetGroupedTrainingDataProcessingFn_origin
from utils.util import (
getattr_rec... |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... |
"""YOLO_v3 Model Defined in Keras."""
from functools import wraps
import numpy as np
import tensorflow as tf
from typing import List, Tuple
from yolo3.utils import compose
from yolo3.utils import letterbox_image
@wraps(tf.keras.layers.Conv2D)
def DarknetConv2D(*args, **kwargs):
"""Wrapper to set Darknet paramete... |
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 14 10:27:41 2016
@author: kbefus
"""
import pandas as pd
from urllib.request import urlopen
import numpy as np
import time,os
from cgw_model.cgw_utils import cgw_feature_utils as cfu
#%%
# -------------- Variables --------------
wq_dict = {'MonitoringLo... |
"""biplist -- a library for reading and writing binary property list files.
Binary Property List (plist) files provide a faster and smaller serialization
format for property lists on OS X. This is a library for generating binary
plists which can be read by OS X, iOS, or other clients.
The API models the plistlib API,... |
import json
import os
import traceback
import time
from pwd import getpwnam
from timeit import default_timer as timer
import shutil
import docker
from submitty_utils import dateutils
from . import secure_execution_environment, rlimit_utils
from .. import autograding_utils
class Container():
"""
Containers ar... |
#!/usr/bin/env pypy
# -*- coding: utf-8 -*-
from __future__ import print_function
import re
import sys
import time
from itertools import count
from collections import namedtuple
###############################################################################
# Piece-Square tables. Tune these to change sunfish's behavi... |
"""
Models and fitting for 2x2 methods
TODO: Checks for wakefield model
TODO: Wakefield model with normal prior
TODO: Truncated normal model
"""
import warnings
import pymc3 as pm
import numpy as np
import theano.tensor as tt
import theano
from .plot_utils import (
plot_conf_or_credible_interval,
plot_boxplot... |
"""This tool creates a window that allows the user to create a thank tread
"""
from maya import cmds
import dataNodeManager
reload(dataNodeManager)
class TreadData(dataNodeManager.NodeData):
"""A class to save information for this rigging process.
This class inherits from NodeData in dataNodeMana... |
import argparse
import ast
import difflib
import json
import re
import sys
from configparser import ConfigParser
from pathlib import Path
from textwrap import indent
import numpydoc.docscrape as nds
from numpydoc.docscrape import Parameter
from .examples_section_utils import reformat_example_lines
def f(a, b, *args... |
from .pandas_vb_common import *
from string import ascii_letters, digits
from itertools import product
class groupby_agg_builtins(object):
goal_time = 0.2
def setup(self):
np.random.seed(27182)
self.n = 100000
self.df = DataFrame(np.random.randint(1, (self.n / 100), (self.n, 3)), colu... |
import os
import io
import random
import numpy
import fnmatch
import csv
import array
from csv import DictWriter
from json import load, dump
from deap import base, creator, tools, algorithms, benchmarks
from deap.benchmarks.tools import diversity, convergence, hypervolume
BASE_DIR = os.path.abspath(os.path.dirname(... |
import abc
import inspect
import itertools
import functools
import os
import uuid
import warnings
from abc import abstractmethod
from contextlib import contextmanager
import mlflow
from mlflow.entities.run_status import RunStatus
from mlflow.tracking.client import MlflowClient
from mlflow.utils import gorilla
from mlf... |
#-
# Copyright (c) 2011 <NAME>
# Copyright (c) 2013-2016 <NAME>
# Copyright (c) 2014 <NAME>
# All rights reserved.
#
# This software was developed by SRI International and the University of
# Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
# ("CTSRD"), as part of the DARPA CRASH research progra... |
"""
Harness for calling experiments including Multi-fidelity.
-- <EMAIL>
"""
# Keep in mind: fidel always comes before point --KK
# pylint: disable=abstract-class-little-used
# pylint: disable=abstract-method
# pylint: disable=attribute-defined-outside-init
# pylint: disable=invalid-name
from argparse import Name... |
################################
########### Imports ############
################################
import sys
import traceback
import numpy as np
import scipy.special as ss
import scipy.optimize as so
import scipy.integrate as si
import scipy.interpolate as inter
try:
import h5py as h5
h5py = 1
except ModuleNot... |
from typing import List, Dict, TYPE_CHECKING
from string import digits as ascii_digits
import logging
import math
import claripy
from ... import sim_type
from ...sim_procedure import SimProcedure
from ...storage.file import SimPackets
if TYPE_CHECKING:
from angr.sim_type import SimType
l = logging.getLogger(nam... |
from firedrake import op2, assemble, dot, dx, FunctionSpace, Function, sqrt, \
TestFunction, TrialFunction, Constant, grad, inner, \
LinearVariationalProblem, LinearVariationalSolver, FacetNormal, \
ds, ds_b, ds_v, ds_t, dS_v, div, avg, jump, DirichletBC, BrokenElement, \
TensorFunctionSpace, SpatialCoo... |
from math import sin, cos, pi
import os
import numpy as np
from math import cos, sin, sqrt, pi
import random
import matplotlib.pyplot as plt
import matplotlib
matplotlib.use("TkAgg")
from numpy import arange, sin, pi
from matplotlib import cm, colors
import matplotlib.animation as animation
import sys
import matplotlib... |
#!/usr/bin/env python
# Copyright 2017 Calico 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
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agr... |
import pytest
import numpy as np
import numpy.linalg
import theano
from numpy import inf
from numpy.testing import assert_array_almost_equal
from theano import tensor, function
from theano.tensor.basic import _allclose
from theano import config
from theano.tensor.nlinalg import (
MatrixInverse,
matrix_invers... |
# Copyright 2021 QuantumBlack Visual Analytics Limited
#
# 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
#
# THE SOFTWARE IS PROVIDED "AS IS",... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Format summary file for pheweb.
Tool for formatting a summary file for Pheweb. Pheweb expects summary file
to be a tsv with the following required columns with their name and header:
* chromosome : #chrom : where chromosome is a number between 1-25
* position : pos... |
from django.http import HttpResponse, Http404
from django.shortcuts import get_object_or_404
from django.template.defaultfilters import slugify
from django.views.decorators.cache import cache_page
from madrona.features.models import Feature
from madrona.features import get_feature_by_uid
from general.utils import meter... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.