text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
"""."""
from typing import Callable
import cupy as cp
import dask.array as da
def infer_gib_gpu(metric: Callable) -> bool:
"""Infer greater is better from metric for GPU.
Args:
metric: Score or loss function.
Returns:
```True``` if grater is better.
Raises:
AssertionError:... | {"hexsha": "1dcf820292c7efda9d3a9d6adbd30a1dfe12ab4e", "size": 1358, "ext": "py", "lang": "Python", "max_stars_repo_path": "lightautoml/tasks/gpu/utils_gpu.py", "max_stars_repo_name": "Rishat-skoltech/LightAutoML_GPU", "max_stars_repo_head_hexsha": "4a0a524dc097de94b90871e40f2e33159a0e19b5", "max_stars_repo_licenses": ... |
From iris.base_logic Require Export invariants.
From iris.program_logic Require Export weakestpre.
From iris.heap_lang Require Export lang proofmode notation.
From iris.heap_lang.lib Require Export nondet_bool.
From iris_examples.proph Require Import clairvoyant_coin_spec.
(* Clairvoyant coin using (untyped) sequence ... | {"author": "anemoneflower", "repo": "IRIS-study", "sha": "63cbfee3959659074047682faeed7190b5be53df", "save_path": "github-repos/coq/anemoneflower-IRIS-study", "path": "github-repos/coq/anemoneflower-IRIS-study/IRIS-study-63cbfee3959659074047682faeed7190b5be53df/examples-master/theories/proph/clairvoyant_coin.v"} |
import StaticArrays: SVector, MVector
import DelayEmbeddings: Dataset
include("induced_invariant_measure.jl")
export InducedRectangularInvariantMeasure, inducedrectangularinvariantmeasure
"""
struct InducedRectangularInvariantMeasure{T} <: AbstractRectangularInvariantMeasure where {T}
points::AbstractAr... | {"hexsha": "64d5bca7dbdf69186e4b0e11e8611ee8f1a45a19", "size": 5926, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/InvariantMeasures/composite_types/InducedRectangularInvariantMeasure/InducedRectangularInvariantMeasure.jl", "max_stars_repo_name": "JuliaTagBot/PerronFrobenius.jl", "max_stars_repo_head_hexsha... |
import os
import numpy as np
import torch
import torch.nn.functional as F
from torch.optim import Adam
from utils import soft_update, hard_update
from model import GaussianPolicy, QNetwork, DeterministicPolicy
class BEARQL(object):
def __init__(self, num_inputs, action_space, args):
self.gamma = args.gamm... | {"hexsha": "2eceacb798af304c5f3a9ae228c40a1dbd748162", "size": 8637, "ext": "py", "lang": "Python", "max_stars_repo_path": "bear.py", "max_stars_repo_name": "Yuibooo/BEAR", "max_stars_repo_head_hexsha": "d8cf22e3bf0017db0702a6b8b8eb00f22e760991", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_stars_repo... |
"""
Scripts to evaluate models.
@author: Ying Meng (y(dot)meng201011(at)gmail(dot)com)
"""
import numpy as np
import models
from utils.config import *
import os
from utils.csv_headers import IdealModelEvalHeaders as headers
from utils.file import *
from data import normalize
from transformation import transform
from ... | {"hexsha": "a49f561506f9ed61f76dde96038b82045c8673da", "size": 5747, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/evaluate_models.py", "max_stars_repo_name": "nybupt/athena", "max_stars_repo_head_hexsha": "2808f5060831382e603e5dc5ec6a9e9d8901a3b2", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
# this file contains the regularization options
# * these are just standard Tikhonov regularizations of either
# (1) the function ("L2"), or
# (2) gradients of the functions ("H1")
from params import k,x,y,dt
from scipy.fft import ifft2,fft2
import numpy as np
def lap(f):
# negative Laplacian computed via Fourie... | {"hexsha": "ad924d7d35776a715d0b93ce15b3327997e9134c", "size": 611, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/regularizations.py", "max_stars_repo_name": "agstub/subglacial-inversion", "max_stars_repo_head_hexsha": "0f96e59771773187bbe32e5184272fdff59dc3c1", "max_stars_repo_licenses": ["MIT"], "max_st... |
""" Membership inference attack on synthetic data that implements the risk of linkability. """
from pandas import DataFrame
from numpy import ndarray, concatenate, stack, array, round
from os import path
from sklearn.svm import SVC
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import Rando... | {"hexsha": "4b761409c5a1936f777996aaad93ba2fdffbf7e8", "size": 11983, "ext": "py", "lang": "Python", "max_stars_repo_path": "synthetic_data/privacy_attacks/membership_inference.py", "max_stars_repo_name": "kasra-hosseini/synthetic_data_release", "max_stars_repo_head_hexsha": "768fe15cae6a033a17390d8dc2152bb75a083ca2", ... |
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import os
import sys
import visvis as vv
import geovis_notebook_version
def get_view(
dir_voxels,
voxel_number_list = None
):
if not voxel_number_list:
fname_voxels_list = [
os.path.join(dir_voxels, f)
for f in os.lis... | {"hexsha": "c7dbb8b32d2f2e74dd7e0154b7cdac33c2236754", "size": 1422, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/get_mean_posterior.py", "max_stars_repo_name": "divad-nhok/obsidian_fork", "max_stars_repo_head_hexsha": "e5bee2b706f78249564f06c88a18be086b17c895", "max_stars_repo_licenses": ["MIT"], "ma... |
# encoding: utf-8
"""
placemap_viewer.py -- An interactive GUI interface for individual spatial maps
Created by Joe Monaco on 04-30-2008.
Copyright (c) 2008 Columbia University. All rights reserved.
"""
# Library imports
import numpy as N, scipy as S
from matplotlib import cm
# Package imports
from .ratemap import P... | {"hexsha": "18e97d6a14af7a440f9764db0ac61fdcfc2e75a4", "size": 13874, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/placemap_viewer.py", "max_stars_repo_name": "jdmonaco/grid-remapping-model", "max_stars_repo_head_hexsha": "5794b0666d51be4359fd8d74da93dca8e98402bf", "max_stars_repo_licenses": ["MIT"], "max... |
#################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021
# by the softwar... | {"hexsha": "7148f4e57d7deed7a6f78d01ae6c156060311c66", "size": 67634, "ext": "py", "lang": "Python", "max_stars_repo_path": "idaes/generic_models/unit_models/tests/test_heat_exchanger_1D.py", "max_stars_repo_name": "dangunter/idaes-pse", "max_stars_repo_head_hexsha": "8f63b4ad8000af8a3eb0316a5f61c32e206925d0", "max_sta... |
/**
* @author : Zhao Chonyyao (cyzhao@zju.edu.cn)
* @date : 2021-04-30
* @description: embedded elasticity mass spring method problem
* @version : 1.0
*/
#include <memory>
#include <string>
#include <boost/property_tree/ptree.hpp>
#include "Common/error.h"
// TODO: possible bad idea of having depend... | {"hexsha": "d3aa23c4652dee9b01df6e870c2b971ba798ab50", "size": 6680, "ext": "cc", "lang": "C++", "max_stars_repo_path": "Source/Dynamics/FiniteElementMethod/Source/Problem/integrated_problem/embedded_mass_spring_problem.cc", "max_stars_repo_name": "weikm/sandcarSimulation2", "max_stars_repo_head_hexsha": "fe499d0a3289c... |
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2011 Klaus Spanderen
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and... | {"hexsha": "730957cfc446217af7cf586b81b067c92d72d57a", "size": 3957, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "ql/methods/finitedifferences/meshers/exponentialjump1dmesher.cpp", "max_stars_repo_name": "quantosaurosProject/quantLib", "max_stars_repo_head_hexsha": "84b49913d3940cf80d6de8f70185867373f45e8d", "m... |
from logging import getLogger
from typing import List
import cv2
import numpy as np
from mtcnn import MTCNN
from mtcnn.exceptions.invalid_image import InvalidImage
from utils import set_gpu_memory_growth
set_gpu_memory_growth()
ARCFACE_LANDMARK = np.array(
[
[38.2946, 51.6963],
[73.5318, 51.5014... | {"hexsha": "f9b4f6c8781bb94f557f49503b573adad4fcaf18", "size": 2321, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/face_region_extractor.py", "max_stars_repo_name": "mamo3gr/batch_face_cropper", "max_stars_repo_head_hexsha": "c5b16cf4643f714911fab182c12675ed709b765a", "max_stars_repo_licenses": ["Apache-2.... |
# Python program for project
import os
import sys
import time
import torch
import argparse
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models as models
import matplotlib
matplotlib.use('Agg')
from torch.autograd import Va... | {"hexsha": "57640ba25e338a6e0b33ce75d8395d6fba586ecf", "size": 11924, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "hzh8311/project", "max_stars_repo_head_hexsha": "4af81f9156e10738cd1d45d495613575ad2308c6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta... |
import logging
import datetime
import time
import ray
import cupy
from alpa.collective.const import ENV
from alpa.collective.collective_group import nccl_util
from alpa.collective.collective_group.base_collective_group import BaseGroup
from alpa.collective.const import get_store_name
from alpa.collective.types import... | {"hexsha": "188789399a575b03352a8fe094b1b7e75174a1de", "size": 37302, "ext": "py", "lang": "Python", "max_stars_repo_path": "alpa/collective/collective_group/nccl_collective_group.py", "max_stars_repo_name": "alpa-projects/alpa", "max_stars_repo_head_hexsha": "2c54de2a8fa8a48c77069f4bad802f4e8fa6d126", "max_stars_repo_... |
import Std
namespace LeanSAT
/-- CNF variable
NOTE: Unlike DIMACS, 0 is a valid variable. See `Var.toDIMACS`.
-/
def Var := Nat
deriving Inhabited, DecidableEq, Hashable, Repr, ToString
namespace Var
/-- Allow nat literals `5392` as notation for variables -/
instance : OfNat Var n := ⟨n⟩
end Var
/-- CNF litera... | {"author": "JamesGallicchio", "repo": "LeanSAT", "sha": "719470ac796a9149e0f892ccb3dff80c0dd563d3", "save_path": "github-repos/lean/JamesGallicchio-LeanSAT", "path": "github-repos/lean/JamesGallicchio-LeanSAT/LeanSAT-719470ac796a9149e0f892ccb3dff80c0dd563d3/LeanSAT/CNF.lean"} |
# Use baremodule to shave off a few KB from the serialized `.ji` file
baremodule Qt5Tools_jll
using Base
using Base: UUID
import JLLWrappers
JLLWrappers.@generate_main_file_header("Qt5Tools")
JLLWrappers.@generate_main_file("Qt5Tools", UUID("a9c6e4b1-b2fb-56d5-96a9-25f276f13840"))
end # module Qt5Tools_jll
| {"hexsha": "1648c88852b45be0258df731b4cafba050ef8878", "size": 310, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Qt5Tools_jll.jl", "max_stars_repo_name": "JuliaBinaryWrappers/Qt5Tools_jll.jl", "max_stars_repo_head_hexsha": "781c7deec44ae70639bfff64f8207771369fa002", "max_stars_repo_licenses": ["MIT"], "max... |
module emodel
# Uses an eccentric disk
export write_grid, write_model, write_lambda, write_dust, Parameters, Grid
using ..constants
# Write the wavelength sampling file. Only run on setup
function write_lambda(lams::Array{Float64, 1}, basedir::AbstractString)
fcam = open(basedir * "camera_wavelength_micron.inp"... | {"hexsha": "c80fb6848192c89d5a1dba49bb4cd5bfd418f89f", "size": 13095, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "attic/emodel.jl", "max_stars_repo_name": "elnjensen/DiskJockey", "max_stars_repo_head_hexsha": "ef618d27c2aff9b0540b0e00035b9a4dbfea1968", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
import torch
import torch.nn as nn
from torch.nn import Linear, Conv2d, BatchNorm1d, BatchNorm2d, PReLU, ReLU, Sigmoid, Dropout, MaxPool2d, AdaptiveAvgPool2d, Sequential, Module
import copy
import numpy as np
from collections import namedtuple
from GraphConvolutionNetwork import GCN, GCNwithIntraAndInterMatrix
from M... | {"hexsha": "a43e38dd35d6c89c78fab6851824c3b455a2c30b", "size": 34817, "ext": "py", "lang": "Python", "max_stars_repo_path": "training/ResNet.py", "max_stars_repo_name": "meghbhalerao/da-fer", "max_stars_repo_head_hexsha": "058dfb3a99aea93af934de8d5f0ef23cd2a85c2e", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
#========== tuples ==========#
struct TupleVector{T,DT,L} <: AbstractVector{T}
data::DT
TupleVector(tup::DT) where {DT <: Tuple} =
new{mapreduce(typeof, Base.promote_typejoin, tup), DT, length(tup)}(tup)
end
Base.size(v::TupleVector{T,DT,L}) where {T,DT,L} = (L,)
Base.@propagate_inbounds Base.getindex... | {"hexsha": "d42146393e52b651f5802332880100d75597fe94", "size": 7155, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/base.jl", "max_stars_repo_name": "mcabbott/TransmuteDims.jl", "max_stars_repo_head_hexsha": "bcb0bf4dbed353a80562e016532620971662ba67", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4,... |
import numpy as np
import scipy.sparse
import pycuda.gpuarray as gpuarray
from . import cusparse as cs
class MatrixVectorProduct:
"""Perform GPU-based, sparse matrix-vector products."""
def __init__(self, matrix: scipy.sparse.csr_matrix) -> None:
self.m = matrix.shape[0]
self.n = matrix.sha... | {"hexsha": "74e33975ff8df1b3ed08da53b01061b70d5e1bba", "size": 1329, "ext": "py", "lang": "Python", "max_stars_repo_path": "diffusion_maps/matrix_vector_product.py", "max_stars_repo_name": "felix11/diffusion-maps", "max_stars_repo_head_hexsha": "7f909ac5bdfeafb8e5b69a93cfa7731a315538f5", "max_stars_repo_licenses": ["MI... |
# coding: utf-8
import os
import sys
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.decomposition import LatentDirichletAllocation
from sklearn.decomposition import PCA
from sklearn.decomposition import TruncatedSV... | {"hexsha": "3142f1c6340432098a6f50e4850cdf9a6dcaf701", "size": 13906, "ext": "py", "lang": "Python", "max_stars_repo_path": "textgo/embeddings.py", "max_stars_repo_name": "Lipairui/textgo", "max_stars_repo_head_hexsha": "e6156663e7e8040c40f6a2bfac393bdfa0bfdaba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3... |
#!/usr/bin/env python
from io import BytesIO
import datetime
import cgi
import numpy as np
import matplotlib
matplotlib.use("agg")
import matplotlib.pyplot as plt
from pyiem.util import get_dbconn, ssw
def make_plot(form):
"""Make the make_plot"""
year = int(form.getfirst("year", 2013))
varname = form.g... | {"hexsha": "5e1f6b667667d9a8a733067d2cbf201f85d68463", "size": 1898, "ext": "py", "lang": "Python", "max_stars_repo_path": "htdocs/admin/varprogress.py", "max_stars_repo_name": "isudatateam/datateam", "max_stars_repo_head_hexsha": "eb8e1dad6c05cb1b236689862fe87c56b25ea6fc", "max_stars_repo_licenses": ["MIT"], "max_star... |
# -*- coding: utf-8 -*-
"""
Created on Thu May 31 18:13:00 2018
@author: Nicholas Fong
"""
# import the necessary packages
from sklearn.model_selection import train_test_split
from pyimagesearch.nn.conv import FongNet
from pyimagesearch.preprocessing import ImageToArrayPreprocessor
from pyimagesearch.pre... | {"hexsha": "b7c71e0ddd5a2084f4ca530e0fb8577a6b5a6057", "size": 2000, "ext": "py", "lang": "Python", "max_stars_repo_path": "COEN 345 - Computer Vision II/COEN345Project/CNNTester.py", "max_stars_repo_name": "nicholasmfong/oldHomework", "max_stars_repo_head_hexsha": "82f10998a7f05c0db79647818e40924c38484484", "max_stars... |
###############################################################################
############################# IMPORTS ###############################
###############################################################################
import TSC as simul
import numpy as np
import math
import pandas as pd
import r... | {"hexsha": "d96b980b916e67e4ea532c1e8e2306bb15c71f1d", "size": 11599, "ext": "py", "lang": "Python", "max_stars_repo_path": "evolution.py", "max_stars_repo_name": "yvancluet/projet_sam_meyer", "max_stars_repo_head_hexsha": "803a97b3dacec588b870eb26779c919be783b5dc", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
#!/usr/bin/env python3
# coding: utf-8
import os
import sys
sys.append('../..')
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import cartopy.crs as ccrs
from deepsphere.data import LabeledDatasetWithNoise, LabeledDataset
datapath = "../../data/ghcn-daily/processed/" # "/mnt/nas/LTS2/datas... | {"hexsha": "4855c831f3698f718dbcbf5a009a88e20077f319", "size": 17839, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/ghcn/GHCN_preprocessing.py", "max_stars_repo_name": "deepsphere/deepsphere_v2_code", "max_stars_repo_head_hexsha": "83c42ad3ec89c8a45f81b2001392d51f7bd34716", "max_stars_repo_licenses... |
__id__ = "$Id: Geometry.py 51 2007-04-25 20:43:07Z jlconlin $"
__author__ = "$Author: jlconlin $"
__version__ = " $Revision: 51 $"
__date__ = "$Date: 2007-04-25 14:43:07 -0600 (Wed, 25 Apr 2007) $"
import scipy
import Errors
class Geometry(object):
"""
Geometry is a class to hold information ab... | {"hexsha": "9943a954b6c98669a7f2d794d8606fb4a934d9b6", "size": 1826, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code/branches/Pre-Prospectus/python/SourceFiles/Geometry.py", "max_stars_repo_name": "jlconlin/PhDThesis", "max_stars_repo_head_hexsha": "8e704613721a800ce1c59576e94f40fa6f7cd986", "max_stars_repo... |
import numpy as np
import datetime
from sklearn import preprocessing
from sklearn.externals import joblib
from sklearn.ensemble import RandomForestClassifier
from sklearn import linear_model
from sklearn.naive_bayes import GaussianNB
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.metrics import m... | {"hexsha": "ac14eca7a99d6a4767afc6b92f071df1d15ca2ba", "size": 8752, "ext": "py", "lang": "Python", "max_stars_repo_path": "searchEngine/recommand/model.py", "max_stars_repo_name": "Og192/homeWork", "max_stars_repo_head_hexsha": "b64b6a67699816f46fd0129a9cff31a27175d711", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# -*- coding: utf-8 -*-
"""Human 3D pose and 2D projection generators."""
import theano as th
import theano.tensor as tt
import theano.tensor.slinalg as sla
from bvh import theano_renderer
from dgm.utils import (
partition, generator_decorator, multi_output_generator_decorator)
@generator_decorator
def bone_leng... | {"hexsha": "a6ef024abb3b49efec40b2bd7ad1a36a369a84d0", "size": 15760, "ext": "py", "lang": "Python", "max_stars_repo_path": "dgm/pose.py", "max_stars_repo_name": "matt-graham/differentiable-generative-models", "max_stars_repo_head_hexsha": "6b450e7a846a416138cb5383a0c574f5cb945843", "max_stars_repo_licenses": ["MIT"], ... |
/*===========================================================================
This library is released under the MIT license. See FSBAllocator.html
for further information and documentation.
Copyright (c) 2008-2011 Juha Nieminen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this ... | {"hexsha": "5dd4c508b5230fe94d0295cd1d51890b7f308b82", "size": 16317, "ext": "hh", "lang": "C++", "max_stars_repo_path": "FSBAllocator/FSBAllocator.hh", "max_stars_repo_name": "r-lyeh/malloc-survey", "max_stars_repo_head_hexsha": "6da5aca6aa2720d64bff709c111a5d8a5fa7a1be", "max_stars_repo_licenses": ["Zlib"], "max_star... |
'''
Improved methods for finding nearest neighbours,
as well as some other tweaks to `.given` to better suit me.
'''
import pandas as pd
import numpy as np
from opt_nn.given import haversine, slow, make_data
def h_distance(p1, p2):
'''
Return haversine distance between two points.
(This wraps the given... | {"hexsha": "da1b4775ac3de8f6e17abd721cd288466a9130ac", "size": 4708, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/opt_nn/improved.py", "max_stars_repo_name": "peterprescott/optimize-nn", "max_stars_repo_head_hexsha": "643bbebef8c0846567a360f31172e50ae9a67186", "max_stars_repo_licenses": ["MIT"], "max_star... |
import numpy as np
import torch
def objective_function(
config,
model_objective,
model_cost,
task_feature_objective,
task_feature_cost,
x_mean_objective,
x_std_objective,
x_mean_cost,
x_std_cost,
y_mean_objective=None,
y_std_objective=None,
y_mean_cost=None,
y_std_c... | {"hexsha": "1b69410cf31f15ee48d4b75dd61c77ddd7db9296", "size": 1655, "ext": "py", "lang": "Python", "max_stars_repo_path": "emukit/examples/profet/meta_benchmarks/meta_surrogates.py", "max_stars_repo_name": "EmuKit/Emukit", "max_stars_repo_head_hexsha": "2df951e42c82400192220eb18af428f3eb764f6c", "max_stars_repo_licens... |
! https://github.com/JuliaLang/julia/blob/master/test/perf/micro/perf.f90
module perf
use, intrinsic :: iso_fortran_env, only : REAL64,INT64, stderr=>error_unit
implicit none
contains
real(real64) function sysclock2ms(t)
! Convert a number of clock ticks, as returned by system_clock called
! with integer(int64) ar... | {"hexsha": "7d9749a6e3109e586e4284ce092dd99049a1e2a5", "size": 949, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "perf.f90", "max_stars_repo_name": "scivision/zakharov", "max_stars_repo_head_hexsha": "3dadd53d29daf6ff8df6bf5d935557627e160448", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": 1... |
\documentclass[10pt]{article}
\usepackage{fullpage}
\usepackage{url}
\pagestyle{empty}
% Customize section headings
%\usepackage{sectsty}
%\sectionfont{\rmfamily\mdseries\Large}
%\subsectionfont{\rmfamily\bfseries\normalsize}
% Don't indent paragraphs.
\setlength\parindent{0em}
\setlength\parskip{0.5em}
% Make lis... | {"hexsha": "756bebe7f413c731f335c2edcb8d8ed57e6ccdd8", "size": 8716, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "cv.tex", "max_stars_repo_name": "brhillman/cv", "max_stars_repo_head_hexsha": "eab8dbe8b9c8c7bd5281ab27946939fb975149cd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo... |
#' Gets TVKs for a query
#'
#' Given a search term this function returns taxon information, including pTVKs,
#' for the first 25 taxa that match that search on the NBN.
#'
#' @export
#' @param query A query string. This can range from latin binomials to partial english names.
#' @param species_only Logical, if \code... | {"hexsha": "eb60a46357e4db349cd3f3a4eb1b499b442361b0", "size": 3287, "ext": "r", "lang": "R", "max_stars_repo_path": "R/getTVKQuery.r", "max_stars_repo_name": "AugustT/rnbn", "max_stars_repo_head_hexsha": "ab068f1a30071849e5813e22c090b3c70ae0f676", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars... |
Require Export GeoCoq.Tarski_dev.Definitions.
Require Export GeoCoq.Tactics.finish.
Ltac prolong A B x C D :=
assert (sg:= segment_construction A B C D);
ex_and sg x.
Section T1_1.
Context `{Tn:Tarski_neutral_dimensionless}.
Lemma cong_reflexivity : forall A B,
Cong A B A B.
Proof.
intros.
apply (cong_in... | {"author": "princeton-vl", "repo": "CoqGym", "sha": "0c03a6fba3a3ea7e2aecedc1c624ff3885f7267e", "save_path": "github-repos/coq/princeton-vl-CoqGym", "path": "github-repos/coq/princeton-vl-CoqGym/CoqGym-0c03a6fba3a3ea7e2aecedc1c624ff3885f7267e/coq_projects/GeoCoq/Tarski_dev/Ch02_cong.v"} |
'''
IKI Bangladesh (MIOASI): S1b Tidy netCDF metadata
In some instances, it's useful to run this script independent of other
data processing scripts.
Author: HS
Created: 19/7/19
'''
import argparse
import datetime as dt
import glob
import iris
import numpy as np
import os
import sys
import time
from cf_units import ... | {"hexsha": "d22ade478784cca76916f269f17591cdbc57f4be", "size": 2647, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/s2b_tidy_netcdf_fpens.py", "max_stars_repo_name": "MetOffice/IKI-Oasis-Bangladesh", "max_stars_repo_head_hexsha": "a280be8a151b395c0117e700a259b37948faa3f2", "max_stars_repo_licenses": ["CC... |
"""
Data types used for pysc2 environment
We don't use the data types provided in acme's file "types.py" because it is less expressive than customized classes below
"""
import numpy as np
from typing import List
from pysc2.lib import actions
import numpy as np
class Space:
"""
Holds information about any gene... | {"hexsha": "ef82f0c08b4460f1956c7ad9e6309485c1e29e96", "size": 3272, "ext": "py", "lang": "Python", "max_stars_repo_path": "acme/sc2_types.py", "max_stars_repo_name": "MEDCOMP/SC2_ACME", "max_stars_repo_head_hexsha": "511f5c4388ad4b8ef157e46678cc22bb0a199ad4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count... |
import numpy as np
class LaneEKF():
def __init__(self, Q_u, Q_z, R_lane_frame):
"""
EKF that is based upon tracking a lane.
Reference paper with original implementation:
Petrich et al, "Map-based long term motion prediction for vehicles in traffic environments", ITSC 2013.
... | {"hexsha": "d941c7d405dc9043a072e077b3c9d931f0479f79", "size": 6168, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/models/lane_utils/lane_ekf.py", "max_stars_repo_name": "govvijaycal/confidence_aware_predictions", "max_stars_repo_head_hexsha": "c5fea8aac271dc792eedc00a689c02fcd658edec", "max_stars_repo... |
BLOCK DATA DT_BLKD43
C***********************************************************************
C *
C Created on 10 december 1991 by Alfredo Ferrari & Paola Sala *
C Infn - Milan ... | {"hexsha": "e8753acdf3eb5fa2b5fdf8c7f68b00e215737f3f", "size": 43940, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/dpmjet/DT_BLKD43.f", "max_stars_repo_name": "pzhristov/DPMJET", "max_stars_repo_head_hexsha": "946e001290ca5ece608d7e5d1bfc7311cda7ebaa", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta... |
import warnings
import numpy as np
from matplotlib import pyplot as plt
from qupulse.pulses import SequencePT
from qupulse.pulses.plotting import (PlottingNotPossibleException, plot, render)
from qupulse.pulses.sequencing import Sequencer as Sequencing
from qupulse.serialization import Serializer, DictBackend
from qt... | {"hexsha": "777606bf0f81865fc01303965b351e63bd8b08fd", "size": 12229, "ext": "py", "lang": "Python", "max_stars_repo_path": "qtt/instrument_drivers/virtualAwg/sequencer.py", "max_stars_repo_name": "dpfranke/qtt", "max_stars_repo_head_hexsha": "f60e812fe8b329e67f7b38d02eef552daf08d7c9", "max_stars_repo_licenses": ["MIT"... |
"""
Authors: Bardiaux Benjamin
Institut Pasteur, Paris
IBPC, Paris
Copyright (C) 2005 Michael Habeck,
Wolfgang Rieping and Benjamin Bardiaux
No warranty implied or expressed.
All rights reserved.
$Author: bardiaux $
$Revision: 1.1.1.1 $
$Date: 2010/03/23 1... | {"hexsha": "2c55a44f1708355490f6623e534cfe988d374906", "size": 45032, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/mytools/ARIA/src/py/aria/Network.py", "max_stars_repo_name": "fmareuil/Galaxy_test_pasteur", "max_stars_repo_head_hexsha": "6f84fb0fc52e3e7dd358623b5da5354c66e16a5f", "max_stars_repo_licens... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from Bio import SeqIO
import os
from PIL import Image
import subprocess
import pandas as pd
import numpy as np
from torch import optim
from torchvision import models, transforms
from WK_NetArch import wk_tools as wkt
from WK_NetArch import alexnet_features, resnet101_fe... | {"hexsha": "0258f06be66c108cfb32145bd7a905cb9b2f1209", "size": 4839, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/image_preprocessing.py", "max_stars_repo_name": "oAzv/GCFM", "max_stars_repo_head_hexsha": "5dc584f0722b90b99614616c9b210d9e086f8ff3", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
[STATEMENT]
lemma distinct_member_remove1 [simp]:
"list_distinct xs \<Longrightarrow> list_member (list_remove1 x xs) = (list_member xs)(x := False)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. list_distinct xs \<Longrightarrow> list_member (list_remove1 x xs) = (list_member xs)(x := False)
[PROOF STEP]
by(auto... | {"llama_tokens": 136, "file": "Containers_DList_Set", "length": 1} |
[STATEMENT]
lemma not_is_Done_conv_Pause: "\<not> is_Done r \<longleftrightarrow> (\<exists>out c. r = Pause out c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<not> Resumption.resumption.is_Done r) = (\<exists>out c. r = Resumption.resumption.Pause out c)
[PROOF STEP]
by(cases r) auto | {"llama_tokens": 115, "file": "CryptHOL_Resumption", "length": 1} |
[STATEMENT]
lemma rank_1_proj_col_carrier:
assumes "i < dim_col A"
shows "rank_1_proj (Matrix.col A i) \<in> carrier_mat (dim_row A) (dim_row A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. rank_1_proj (Matrix.col A i) \<in> carrier_mat (dim_row A) (dim_row A)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)... | {"llama_tokens": 514, "file": "Commuting_Hermitian_Spectral_Theory_Complements", "length": 6} |
"""Concept analysis functionality.
For details on the workflow of a concept analysis see
:py:meth:`ConceptAnalysis.analysis`.
In short:
:Input: All of
- The *concept* (defined via concept data)
- The *main model*
- The *layers* to analyse and compare
:Output: All of
- The *layer* hosting the best e... | {"hexsha": "494fe9286103a4d7df55d0e6632641008027ad69", "size": 33980, "ext": "py", "lang": "Python", "max_stars_repo_path": "hybrid_learning/concepts/analysis.py", "max_stars_repo_name": "continental/hybrid_learning", "max_stars_repo_head_hexsha": "37b9fc83d7b14902dfe92e0c45071c150bcf3779", "max_stars_repo_licenses": [... |
%% POS conversion
posfile = dir('*pos');
pos = importdata(posfile.name);
% determine if timestamps are first or last column
[a b] = min(nanstd(diff(pos))); % find the column with smallest variability..
behav.timestamps = pos(:,b);
pos(:,b) = []; % remove timestamps from pos mat
if size(pos,2) > 5 % if optitrack
... | {"author": "buzsakilab", "repo": "buzcode", "sha": "2d700a38b3c2a860ad1333be90f14d7a37a72815", "save_path": "github-repos/MATLAB/buzsakilab-buzcode", "path": "github-repos/MATLAB/buzsakilab-buzcode/buzcode-2d700a38b3c2a860ad1333be90f14d7a37a72815/utilities/fileConversions/convertFMAT2Matlab.m"} |
import numpy as np
from numpy.random import seed
from keras.optimizers import Adam
from keras.models import Sequential
from keras.initializers import TruncatedNormal
from keras.layers import Conv1D, Dense, Flatten, Dropout, MaxPool1D
from keras.callbacks import ModelCheckpoint
from keras.utils import plot_model
import ... | {"hexsha": "fe52b87d46cb419909746f92bd4e9bb37496b071", "size": 4257, "ext": "py", "lang": "Python", "max_stars_repo_path": "opp/learn_lower_down.py", "max_stars_repo_name": "heeryoncho/sensors2018cnnhar", "max_stars_repo_head_hexsha": "2c0ae84b83a95bd5b5ab13df0fb3f5e8529df91f", "max_stars_repo_licenses": ["MIT"], "max_... |
import os
import time
from os.path import isfile, join
import cv2 as cv
import matplotlib.pyplot as plt
import numpy as np
from background_subtraction import bs_godec, get_godec_frame, postprocess_img
from file_utils import (create_folder_if_absent, get_all_files, get_frame,
get_frame_GREY, ge... | {"hexsha": "eba7442fab27cd73ac90219a992578e75bfad6cb", "size": 4860, "ext": "py", "lang": "Python", "max_stars_repo_path": "MLX90640/optical_flow.py", "max_stars_repo_name": "Nekostone/activity-levels-monitoring", "max_stars_repo_head_hexsha": "9197924586425f3f881846742d05c48a242169ac", "max_stars_repo_licenses": ["MIT... |
import random
sample_len = 1000
class GetDataset():
def __init__(self, sub_dirs, useful_train_dirs, useful_img_dirs_train, \
useful_val_dirs, useful_img_dirs_val):
self.sub_dirs = sub_dirs
self.useful_train_dirs = useful_train_dirs
self.useful_img_dirs_train = useful_img_di... | {"hexsha": "3f7ead9b38c5301d893f60ba12d73373aa4c6f75", "size": 11373, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/preprocess/gen_CMU_anno.py", "max_stars_repo_name": "ZXin0305/hri", "max_stars_repo_head_hexsha": "b91d89158fc2d05ca4d3ea3ba4a7b9f69b0221a2", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
# blackbox_function.py
"""Volume 2: Optimization Packages I (scipy.optimize). Auxiliary File."""
import numpy as np
from scipy import linalg as la
def blackbox(y_free):
"""
Finds the length of a curve approximated piece-wise by a set of points.
Accepts:
y_free (1xn ndarray): the non-endpoint y-val... | {"hexsha": "191396d79e679e2574f1a31a0429d9ace3a77865", "size": 1026, "ext": "py", "lang": "Python", "max_stars_repo_path": "Vol2B/scipyoptimize/blackbox_function.py", "max_stars_repo_name": "joshualy/numerical_computing", "max_stars_repo_head_hexsha": "9f474e36fe85ae663bd20e2f2d06265d1f095173", "max_stars_repo_licenses... |
# coding=utf-8
import uuid
import os
import cv2
import numpy as np
is_cut = False
class CutPlateNumber:
def __init__(self):
self.is_cut = False
def preprocess(self,gray, iterations):
# 高斯平滑
gaussian = cv2.GaussianBlur(gray, (3, 3), 0, 0, cv2.BORDER_DEFAULT)
# 中值滤波
media... | {"hexsha": "e625660b1f932bb6afe53a3c8b02d5c78b0b9778", "size": 3664, "ext": "py", "lang": "Python", "max_stars_repo_path": "note7/code/CutPlateNumber.py", "max_stars_repo_name": "fluffyrita/LearnPaddle", "max_stars_repo_head_hexsha": "45a2b56f12264616dd2903c8a7c822dbf3721133", "max_stars_repo_licenses": ["Apache-2.0"],... |
import os
import argparse
from os.path import join
import numpy
import json
import shutil
def main():
"""
Creating Test Split for evaluating the attack
"""
p = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
p.add_argument('--data_dir', '-data', type=str,
... | {"hexsha": "610e74c3444196cfb029d1ae0084b643e6e3bf81", "size": 1959, "ext": "py", "lang": "Python", "max_stars_repo_path": "create_test_data.py", "max_stars_repo_name": "paarthneekhara/AdversarialDeepFakes", "max_stars_repo_head_hexsha": "0454c6eb528beb8e5d6ca9ee378d7d6e6e085f96", "max_stars_repo_licenses": ["MIT"], "m... |
\filetitle{datcmp}{Compare two IRIS serial date numbers}{dates/datcmp}
\paragraph{Syntax}\label{syntax}
\begin{verbatim}
Flag = datcmp(Dat1,Dat2)
\end{verbatim}
\paragraph{Input arguments}\label{input-arguments}
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
\texttt{Dat1}, \texttt{Dat2} {[} numeric... | {"hexsha": "a2b79b9354efb94df6323685da07ec290bd4930c", "size": 1109, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "-help/dates/datcmp.tex", "max_stars_repo_name": "OGResearch/IRIS-Toolbox-For-Octave", "max_stars_repo_head_hexsha": "682ea1960229dc701e446137623b120688953cef", "max_stars_repo_licenses": ["BSD-3-Cla... |
module WrongHidingInLHS where
f : Set -> Set
f {x} = x
| {"hexsha": "d12e87376a5600992d99bd9e5c071cbd1b99cdd1", "size": 58, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Fail/WrongHidingInLHS.agda", "max_stars_repo_name": "shlevy/agda", "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st... |
using Test
using Logging
# using Revise
using LarSurf
# Logging.configure(level==Logging.Debug)
# include("../src/LarSurf.jl")
# include("../src/block.jl")
@testset "Block basic function Tests" begin
data3d = LarSurf.random_image([7, 7, 7], [1,2,2], [3, 4, 5], 2)
@test maximum(data3d) > 2
@test minimum(d... | {"hexsha": "f76c5f73ffe2766fcae1a29dafa004ee9b851bc9", "size": 942, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/datasets_test.jl", "max_stars_repo_name": "mjirik/LarSurf.jl", "max_stars_repo_head_hexsha": "de2eaec62dfe8c63e7d621bc973aa01d8de019c6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2... |
# Import pyVPLM packages
from pyvplm.core.definition import PositiveParameter, PositiveParameterSet
from pyvplm.addon import variablepowerlaw as vpl
from pyvplm.addon import pixdoe as doe
from pint import UnitRegistry
import save_load as sl
import pi_format as pif
import csv_export as csv
import constraint_form... | {"hexsha": "3e49f05c1a610a9ff53908fbc6a068c16b2ab4ba", "size": 170253, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyvplm/gui/pyVPLM_GUI.py", "max_stars_repo_name": "ArthurAmmeux/pyVPLM-GUI", "max_stars_repo_head_hexsha": "e7b0866137b0f83455aa7e839527a95b668e964b", "max_stars_repo_licenses": ["BSD-2-Clause"]... |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!
!! AUTHOR: Kenneth Leiter (kenneth.leiter@arl.army.mil)
!!
!! Use the Xdmf Fortran Bindings to write out a simple mesh consisting of
!! two hexahedrons. Link against the XdmfUtils library to compile.
!!
!!!!!!!!!!!!!!!!!!!!!!!!... | {"hexsha": "b54000126d5264478f334d556324c2a5af8135ac", "size": 7629, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "utils/tests/Fortran/FixedOutputTestXdmfFortran.f90", "max_stars_repo_name": "scottwedge/xdmf", "max_stars_repo_head_hexsha": "f41196c966997a20f60525a3d2083490a63626a3", "max_stars_repo_licenses"... |
#!/usr/bin/python3
# coding: utf-8
from optparse import OptionParser
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import matplotlib.patches as patches
import matplotlib.patheffects as patheffects
from matplotlib.ticker import FormatStrFormatter
from matplot... | {"hexsha": "1953420d8b141ef081883d1468e29e9794b69f31", "size": 25193, "ext": "py", "lang": "Python", "max_stars_repo_path": "aqliverpool.py", "max_stars_repo_name": "mdunschen/AirQualityTweeter", "max_stars_repo_head_hexsha": "8eab4b94d36d0e3ca15bdfcea44ee9ce9313b177", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
# So that this test can be run independently
using Cairo
if !isdefined(:ddots4)
include("shape_functions.jl")
end
# Test that writing images to a Julia IO object works
c = CairoRGBSurface(256,256);
cr = CairoContext(c);
ddots4(cr,256,246,1.0,3000)
buf = IOBuffer()
pipe = Base64EncodePipe(buf)
write_to_png(c,pipe)
... | {"hexsha": "b89870f50406a4a44498b0b96000f8548eb4a67b", "size": 394, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_stream.jl", "max_stars_repo_name": "JuliaPackageMirrors/Cairo.jl", "max_stars_repo_head_hexsha": "fdfcfdb24c29cb2e71b596d891f411f9479db3cf", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
from gym.spaces import Discrete, Box
import numpy as np
class MemoryGame:
'''Multi-agent wrapper for the memory game with noisy observations'''
def __init__(self, config, spec_only=False):
self._length = config.get("length", 5)
self._num_cues = config.get("num_cues", 2)
self._noise = c... | {"hexsha": "b78a7be4a07388e59795cd82a42ece94c6d3b338", "size": 1552, "ext": "py", "lang": "Python", "max_stars_repo_path": "interactive_agents/envs/memory_game.py", "max_stars_repo_name": "rtloftin/interactive_agents", "max_stars_repo_head_hexsha": "f7d57d1421000b2e8a79a9dff179b8fe7c8d3fc0", "max_stars_repo_licenses": ... |
import os
import numpy as np
import matplotlib.pyplot as plt
from torchvision.utils import save_image
import torch
SAVE_DIR = '../data/results'
def imsave(img,fname=None,prefix='test',fdir=None):
if fdir==None:
fdir = SAVE_DIR
if not os.path.exists(fdir):
os.mkdir(fdir)
if fname==None:... | {"hexsha": "e8e1efebe5e19ce607b82333e9ffbde712a35fa0", "size": 1068, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/custom_utils.py", "max_stars_repo_name": "RisingStockPrices/dressing-in-order", "max_stars_repo_head_hexsha": "77e1579311d2b94e650a5db500cc9773f64bd24a", "max_stars_repo_licenses": ["BSD-3-C... |
from PIL import Image,ImageDraw,ImageFilter
from numpy import *
from mod_dim import region_label as rg
from models import ImageDB,Legend,TopLegend,ImageInfo
import pandas as pd
import ast
from app import db
class Point(object):
def __init__(self,x,y):
self.x=x
self.y=y
def __str__(self):
... | {"hexsha": "45d893b8e6e923a4fb53c501532a8219b9632693", "size": 14758, "ext": "py", "lang": "Python", "max_stars_repo_path": "TOOL/mod_dim/database_connectivity_rdb.py", "max_stars_repo_name": "ayushi04/SPVAC", "max_stars_repo_head_hexsha": "7bb7742881ebc08842afe9056a3a1439c4d559c6", "max_stars_repo_licenses": ["MIT"], ... |
#!/usr/bin/env Rscript
cat("Making plots...\n")
tring <- read.table("trcurve.txt", head=TRUE)
gmoverr <- read.table("gmoverr.txt", head=TRUE)
data <- read.table("maxv.txt",head=FALSE)
vrange <- data[1,1]
dv <- 4
data <- read.table("rsize.txt", head=FALSE)
rsize <- data[1,1]
data <- as.matrix(read.table("observation... | {"hexsha": "eccd322b697ae1270cd3fdbcd0af27f1d11a53d7", "size": 3155, "ext": "r", "lang": "R", "max_stars_repo_path": "pvplot.r", "max_stars_repo_name": "petehague/galaxyview", "max_stars_repo_head_hexsha": "9202a09c97d66b23213356815f3c6eaeb8958d7f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "m... |
"""
Utilities for nifti data
"""
# Copyright 2019 Gabriele Valvano
#
# 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 requi... | {"hexsha": "3d5db2338bd7c6b354825d6195f53edd037d5c18", "size": 1230, "ext": "py", "lang": "Python", "max_stars_repo_path": "idas/data_utils/nifti_utils.py", "max_stars_repo_name": "GabrieleValvano/SDNet", "max_stars_repo_head_hexsha": "121b2ba78881bd7b9653da072a0e46efe5f4ba94", "max_stars_repo_licenses": ["Apache-2.0"]... |
import tensorflow as tf
from tensorflow.python.platform import gfile
import numpy as np
from struct import unpack
from tensorflow.python.framework import graph_util
# supported data types
_data_types_ = {
'float32':('f',4,tf.float32),
'float64':('d',8,tf.float64),
'float':('f',4,tf.float32),
'double':('d',8,tf.flo... | {"hexsha": "86539eead4f14c559fd825cc6e77f5c369c7cdfe", "size": 4568, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_loader/darknet/D2T_lib/static_lib/tf_functions.py", "max_stars_repo_name": "MistQue/kendryte-model-compiler", "max_stars_repo_head_hexsha": "36af917defb37880037fb84330ab995ed44311e1", "max_s... |
program bin2hdf5
! Created by Manuel A. Diaz, ENSMA 2020
use HDF5 ! This module contains all necessary modules
IMPLICIT NONE
!-------- initialize variables -------------
character(len=30) :: input_file0
character(len=30) :: input_file1='xp.dat'
character(len=30) :: input_file2='yp.... | {"hexsha": "167dcf1f396f4ca37d3f205eadd08596b53cb729", "size": 4512, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/bin2hdf5_fields_serial.f90", "max_stars_repo_name": "wme7/Fortran2Paraview_with_HDF5", "max_stars_repo_head_hexsha": "7afe4421fe72be316bd475e3b07e5e4f2a72b7af", "max_stars_repo_licenses": ["... |
import numpy as np
from skimage.io import imread, imsave
from skimage.color import rgb2lab, lab2rgb
from sklearn.metrics import euclidean_distances
import util
class PaletteQuery(object):
"""
Extract a L*a*b color array from a dict representation of a palette query.
The array can then be used to histogram... | {"hexsha": "6209d80c3776ed8567ca0624b9580bee4462df30", "size": 3550, "ext": "py", "lang": "Python", "max_stars_repo_path": "rayleigh/image.py", "max_stars_repo_name": "mgsh/rayleigh", "max_stars_repo_head_hexsha": "54835d20345f0fb05cc626ac627b56371ba9bd42", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 185, "m... |
# script: Data generator. Reads cropped objects pickles and background images and generates image datasets.
# author: Mihai Polceanu
import cv2
import numpy as np
import os
import sys
import pickle
import random
import imutils
import argparse
def rndint(l,h):
return np.random.randint(l, h)
def resize(img):
r... | {"hexsha": "eb9b0637f9e8caf3e22292e1f9dd7506fe863fad", "size": 11072, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/dataGen.py", "max_stars_repo_name": "polceanum/data.augmentation", "max_stars_repo_head_hexsha": "d47d93f20bca453bfda94e5cd714399fd35a6287", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# -*- coding: utf-8 -*-
"""
Flow based cut algorithms
"""
import itertools
import networkx as nx
# Define the default maximum flow function to use in all flow based
# cut algorithms.
from networkx.algorithms.flow import edmonds_karp, shortest_augmenting_path
from networkx.algorithms.flow import build_residual_network
... | {"hexsha": "0288f5e202c4f8790fa0281476c0fcae8cbdaccf", "size": 22960, "ext": "py", "lang": "Python", "max_stars_repo_path": "networkx/algorithms/connectivity/cuts.py", "max_stars_repo_name": "argriffing/networkx", "max_stars_repo_head_hexsha": "5a3d000e605be2ca567f69a4694afcba3b8acb54", "max_stars_repo_licenses": ["BSD... |
# Copyright 2016 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... | {"hexsha": "88e89434242a7d7334e025acb5da530675d3f054", "size": 11660, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/python/keras/engine/training_generator_test.py", "max_stars_repo_name": "wenming2014/tensorflow", "max_stars_repo_head_hexsha": "a102a6a71844e194f3946f6318768c5367f1f16b", "max_stars_r... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" rbc_ode.py
Test ODENet (OnsagerNet or plain multi-layer perception net) on RBC PCA data.
@author: Haijun Yu <hyu@lsec.cc.ac.cn>
"""
# %%
import config as cfgs
import ode_net as ode
import rbctools as rbc
import argparse
from scipy.special import bi... | {"hexsha": "ecca4cc6ceba96c21fd46320b1574ddc2d32a07d", "size": 6793, "ext": "py", "lang": "Python", "max_stars_repo_path": "RBC1r/rbc_ode.py", "max_stars_repo_name": "yuhj1998/OnsagerNet", "max_stars_repo_head_hexsha": "32cbb31116cf4244b340497d739a86eb7de9e7a2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou... |
using DataFrames
using CSV
# TODO REFACTOR
function load_tables()
cols = ["source", "target", "flags"]
df_icd9 = CSV.File("2018_I9gem.txt", delim = ' ',
header = false, type=String, ignorerepeated=true) |> DataFrame
rename!(df_icd9, cols)
df_icd10 = CSV.File("2018_I10gem.txt", delim = ' ... | {"hexsha": "a36442c6c56f988208075249b52ee3ae5ed7711e", "size": 3241, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/process_gems.jl", "max_stars_repo_name": "pkmklong/Gems", "max_stars_repo_head_hexsha": "3d3210792631ea9a188743a0df4d68369644b6ad", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
"""Tests relating to constants."""
import WrightTools as wt
import numpy as np
import re
def test_set_remove():
data = wt.Data()
data.create_variable("x", np.linspace(0, 10))
data.create_variable("y", np.linspace(0, 10))
data.create_variable("z", np.zeros(50))
data.set_constants("x-y", "z")
a... | {"hexsha": "f2c9369e857689a6f6cf1cfad08510044b34bddc", "size": 1231, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/data/constants.py", "max_stars_repo_name": "untzag/WrightTools", "max_stars_repo_head_hexsha": "05480d2f91ceeca422d9e5ac381fce1840207cb0", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
#!/usr/bin/env python3
# Copyright 2020 Yuri Khokhlov, Ivan Medennikov (STC-innovations Ltd)
# Apache 2.0.
"""This script transforms phone-indices in alignment to 0(silence phones), 1(speech phones), 2(spn phones)"""
import os
import argparse
import numpy as np
if __name__ == '__main__':
parser = argparse.Arg... | {"hexsha": "291ca3e8d6728dfdf5011a904e1c0c0b97a7a803", "size": 2453, "ext": "py", "lang": "Python", "max_stars_repo_path": "egs/chime6/s5c_track2/local/ts-vad/conv_ali_to_vad_012.py", "max_stars_repo_name": "LanceaKing/kaldi", "max_stars_repo_head_hexsha": "eb205a83f08fb8056ba1deb03c505ec8b722d4d9", "max_stars_repo_lic... |
"""
Tests for the C implementation of the sequence transducer.
From outside the package directory, run
`python -m transducer.test.`
"""
from __future__ import division
from __future__ import print_function
import argparse
import numpy as np
import time
import mxnet as mx
from rnnt_mx import RNNTLoss
from rnnt_np imp... | {"hexsha": "7ec7422b5e8606b737cd901dd444f29320872b6a", "size": 6934, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test.py", "max_stars_repo_name": "vlavla/mxnet-transducer", "max_stars_repo_head_hexsha": "50800904658c18914ac0c92adefbec29502882ea", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12... |
program tarefa6
! Definindo pi
pi = 4*atan(1e0)
! Recebe o valor inteiro de N
print *, 'Raízes da equação (Z - 2)**N = 3'
print *, 'Digite o valor inteiro de N:'
read (*,*) N
! loop k para solução geral z = |z|**(1/n) * ( cos( (theta+2*pi*k)/n ) + i*sin( (theta+2*pi*k)/n ) )
... | {"hexsha": "1cfc8229abdb284798405aa1646c5fa48083efa3", "size": 644, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "projeto-1/tarefa-6/tarefa-6-10407962.f90", "max_stars_repo_name": "ArexPrestes/introducao-fisica-computacional", "max_stars_repo_head_hexsha": "bf6e7a0134c11ddbaf9125c42eb0982250f970d9", "max_sta... |
import numpy as np
"""
Args:
epoch (int) - number of iterations to run through neural net
w1, w2, w3, w4, b1, b2, b3, b4 (numpy arrays) - starting weights
x_train (np array) - (n,d) numpy array where d=number of features
y_train (np array) - (n,) all the labels corresponding to x_tr... | {"hexsha": "568d96756cd8c8335a5a461f5f517834281885b5", "size": 4271, "ext": "py", "lang": "Python", "max_stars_repo_path": "neural_network.py", "max_stars_repo_name": "CoolyComrade/four-layer-nn", "max_stars_repo_head_hexsha": "11fa059939bb2e51ab8935d7d18d732ed6a22a64", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
using Documenter, Metida
#using DocumenterLaTeX
makedocs(
modules = [MetidaReports],
sitename = "MetidaReports.jl",
authors = "Vladimir Arnautov",
pages = [
"Home" => "index.md",
],
)
deploydocs(repo = "github.com/PharmCat/MetidaReports.jl.git", push_preview = true,
)
| {"hexsha": "218d5a0f75dc701b9f232f8ad5ceeb816f4b1da5", "size": 299, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "PharmCat/MetidaReports.jl", "max_stars_repo_head_hexsha": "08e906e2c653cf545435cd2205d96881e1d30142", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
(*
Benedikt Ahrens and Régis Spadotti
Terminal semantics for codata types in intensional Martin-Löf type theory
http://arxiv.org/abs/1401.1053
*)
(*
Content of this file:
definition of the category of coalgebras for the signature of infinite tri. matrices
*)
Require Import Category.Types.
Require ... | {"author": "rs-", "repo": "Triangles", "sha": "57f10cb6c627c331b2c6e7b344a34ae50838cc67", "save_path": "github-repos/coq/rs--Triangles", "path": "github-repos/coq/rs--Triangles/Triangles-57f10cb6c627c331b2c6e7b344a34ae50838cc67/Category/TriMat/Category.v"} |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Aug 27 13:40:25 2017
@author: knrai
"""
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('50_Startups.csv')
X = dataset.iloc[:, :-1].values
y = dataset.iloc[:, -1].values
#encoding c... | {"hexsha": "6e96c65feaf8bbe2686d271ca67dcb87077eeb66", "size": 1958, "ext": "py", "lang": "Python", "max_stars_repo_path": "Part 2 - Regression/Section 5 - Multiple Linear Regression/K_multipleregression_backwardelimination.py", "max_stars_repo_name": "KrishnanandRai/ML-Learning", "max_stars_repo_head_hexsha": "ad4dcd9... |
import os
import pickle
import h5py
from datetime import datetime
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.transforms as transforms
from tensorboardX import SummaryWriter
from models import basenet
from models import dataloader
from models.celeba_core impo... | {"hexsha": "cb324fd83f10fbc288b82acf66b27c6a810cf9ce", "size": 9786, "ext": "py", "lang": "Python", "max_stars_repo_path": "dlfairness/original_code/DomainBiasMitigation/models/celeba_domain_independent.py", "max_stars_repo_name": "lin-tan/fairness-variance", "max_stars_repo_head_hexsha": "7f6aee23160707ffe78f429e5d960... |
from copy import deepcopy
from enum import Enum
from astropy.io import registry
import pathlib
import os
import sys
import astropy.io.fits as fits
from astropy.nddata import (
VarianceUncertainty,
StdDevUncertainty,
InverseVariance,
)
import astropy.units as u
from astropy.wcs import WCS
from astropy.wcs.u... | {"hexsha": "63134daaa4574b7ddede319054130213e5a4214b", "size": 13908, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ssv/ssvloaders.py", "max_stars_repo_name": "ADACS-Australia/ssv-py", "max_stars_repo_head_hexsha": "d54e2ff0bcaf0197607125a2a5f39815e17d54e5", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import unittest
import math
import numpy
import pyglet
from pygly.input.digital import Digital
class test_digital( unittest.TestCase ):
def setUp( self ):
pass
def tearDown( self ):
pass
def test_digital( self ):
device = Digital( 'keyboard' )
def handle_event( device... | {"hexsha": "0f3fce238e3723280a98974f2d02b5d78937dfe4", "size": 1426, "ext": "py", "lang": "Python", "max_stars_repo_path": "razorback/test/test_digital.py", "max_stars_repo_name": "adamlwgriffiths/Razorback", "max_stars_repo_head_hexsha": "44158c0b2c8d842dce10c0b4c46570b876d42486", "max_stars_repo_licenses": ["BSD-2-Cl... |
"""
Fcn for doing the parameterisation
"""
import numpy as np
from . import util
def _verify_args(h1, h2, h3, h4):
# Check they're all arrays of 4 arrays
assert h1.shape[0] == 4, "h1_plus should be a shape (4, N) array"
assert h2.shape[0] == 4, "h2_minus should be a shape (4, N) array"
assert h3.sha... | {"hexsha": "d365c5fac7c7dc173f0fe1ca5fb0641e3ba68632", "size": 3076, "ext": "py", "lang": "Python", "max_stars_repo_path": "fourbody/param.py", "max_stars_repo_name": "richard-lane/fourbody", "max_stars_repo_head_hexsha": "9c029ad4d179e7ad7448522166e09c29c7096071", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
import asyncio
import pandas as pd
import numpy as np
from statsmodels.tsa.arima.model import ARIMA
class TradingSystem:
def __init__(self, logger, config, yahoo_repository, ai_repository):
self._config = config
self._logger = logger
self._yahoo_repository = yahoo_repository
sel... | {"hexsha": "45fc8aceda10bd29a13a6ea8116c3f28d557e59a", "size": 923, "ext": "py", "lang": "Python", "max_stars_repo_path": "ai-trading-system/src/application/actions/trading_system.py", "max_stars_repo_name": "yash5OG/RecommenderForDHim", "max_stars_repo_head_hexsha": "841d981ec97626ddbe718cf0a044f92ee139fccc", "max_sta... |
#Original file by Titu1994, changed for this project
import json
import numpy as np
import argparse
import sklearn.metrics as metrics
from sklearn.model_selection import train_test_split
from sklearn.decomposition import PCA
from scipy.optimize import minimize
from sklearn.metrics import log_loss
from models import wi... | {"hexsha": "ff69bba7a7e7571eb2a215b352c22ee544591a9b", "size": 8073, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict_cifar_10.py", "max_stars_repo_name": "ThomasWink/AML_project", "max_stars_repo_head_hexsha": "4f1a036b7ec3e7b22eee6c94525986a7655e8298", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
# Matplotlib packages to import
import matplotlib
matplotlib.use('Agg')
import matplotlib.pylab as plt
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.axes_grid1 import ImageGrid
# Used for plotting cases only
import seaborn as sns
# Obspy librabries
import obspy
from obspy import Stream
from obspy.core imp... | {"hexsha": "ccb29372ffbbd80fc6dcabe048ae0239b4b49e3f", "size": 49645, "ext": "py", "lang": "Python", "max_stars_repo_path": "HypoSVI/location.py", "max_stars_repo_name": "interseismic/HypoSVI", "max_stars_repo_head_hexsha": "240ee1d8edd05b7f42b50b93086d351ebe8a7450", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
[STATEMENT]
lemma (in valid_unMultigraph) longest_path:
assumes "finite E" "n \<in> V"
shows "\<exists>v. \<exists>max_path. is_trail v max_path n \<and>
(\<forall>v'. \<forall>e\<in>E. \<not>is_trail v' (e#max_path) n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<exists>v max_path. is_trail v max_... | {"llama_tokens": 4036, "file": "Koenigsberg_Friendship_MoreGraph", "length": 37} |
import numpy as np
import os
import heapq
from tqdm import tqdm
import argparse
import pickle
import json
def read_json(file):
f = open(file, "r", encoding="utf-8").read()
return json.loads(f)
def write_json(file, data):
f = open(file, "w", encoding="utf-8")
json.dump(data, f, indent... | {"hexsha": "8b99b115bd0bd662aa1181ad0e2caa2065673bfb", "size": 3785, "ext": "py", "lang": "Python", "max_stars_repo_path": "datatoolkit/eval/retrieval_unit_id_list.py", "max_stars_repo_name": "Xiaodongsuper/M5Product_toolkit", "max_stars_repo_head_hexsha": "8d972640586440f4a6c24baf67a77dc1efa62545", "max_stars_repo_lic... |
from random import *
from numpy import *
n = 10
print 10
for i in random.permutation(n):
print i+1,
print
for i in random.permutation(n):
print i+1,
| {"hexsha": "7f64fb3070f151898f611058878dd4e1c7632810", "size": 152, "ext": "py", "lang": "Python", "max_stars_repo_path": "CodeChef/SHORT/COOK61/Problem D/gen.py", "max_stars_repo_name": "VastoLorde95/Competitive-Programming", "max_stars_repo_head_hexsha": "6c990656178fb0cd33354cbe5508164207012f24", "max_stars_repo_lic... |
using NeuralVerification: compute_output
using LinearAlgebra
function sample_based_bounds(network, cell, coefficients, num_samples)
xs = sample(cell, num_samples)
min_obj = Inf
max_obj = -Inf
for x in xs
output = compute_output(network, x)
obj = dot(output, coefficients)
min_obj... | {"hexsha": "b53beafeecaae129b66bc8a6a43eeeb0285d134f", "size": 419, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "utils.jl", "max_stars_repo_name": "castrong/VNN21Benchmarks", "max_stars_repo_head_hexsha": "57e2b6992e33bc2112d2a747282bb91a0e3f87f4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
\section{Hyperchains}
\textbf{todo: reorganize, mention commitments earlier, images!}
The previous approaches had a lot to offer, but considering they cons it is hard
to scale them in a reasonable way. PoW seems to work well only with big
computational effort being burned and PoS suffers from huge amount of security
... | {"hexsha": "26e9c4decce78c09cf596d1e499147f2179624fc", "size": 3874, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "hyperchains.tex", "max_stars_repo_name": "gorbak25/hyperchains-whitepaper", "max_stars_repo_head_hexsha": "84a32f7451cf7536bd7049a6b0cfa3b9ff216143", "max_stars_repo_licenses": ["0BSD"], "max_stars_... |
import base_solver as base
import game
from lib import helpers
import numpy as np
import redis
r = redis.StrictRedis(host='localhost', port=6379, db=0)
STATE_MISS = 0
STATE_HIT = 1
STATE_UNKNOWN = 2
SHIP_SIZES = helpers.SHIP_SIZES
class OpenCLSolver(base.BaseSolver):
def __init__(self):
super(OpenCLSolver,self).... | {"hexsha": "3857d93c16994e18b3ab24cb6d284086c1210cf7", "size": 2439, "ext": "py", "lang": "Python", "max_stars_repo_path": "solvers/opencl_solver.py", "max_stars_repo_name": "nicofff/baas", "max_stars_repo_head_hexsha": "676819a4b1c5ae1a63f5779fe799fcd1006b79fb", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co... |
# Copyright 2021 The Cirq Developers
#
# 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 ... | {"hexsha": "914b85e4c76309c4529bad9335fde6f90d26497f", "size": 25403, "ext": "py", "lang": "Python", "max_stars_repo_path": "cirq-google/cirq_google/serialization/circuit_serializer.py", "max_stars_repo_name": "BearerPipelineTest/Cirq", "max_stars_repo_head_hexsha": "e00767a2ef1233e82e9089cf3801a77e4cc3aea3", "max_star... |
/-
Copyright (c) 2018 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel, Mario Carneiro, Yury Kudryashov, Heather Macbeth
-/
import analysis.normed.order.lattice
import analysis.normed_space.operator_norm
import analysis.normed_space.s... | {"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/src/topology/continuous_function/bounded.lean"} |
#!/usr/bin/env python
import argparse
import cartopy.crs
import datetime
import matplotlib.pyplot as plt
import metpy
import metpy.calc as mcalc
from metpy.units import units
import numpy as np
import os
import pdb
import pickle
import s3fs
import scipy.ndimage.filters
from scipy import spatial
import sys
import xarr... | {"hexsha": "c6362cda774fbfd33d318ba8e3929f96cb954732", "size": 14720, "ext": "py", "lang": "Python", "max_stars_repo_path": "upscale_HRRR-ZARR.py", "max_stars_repo_name": "ahijevyc/NSC_objects", "max_stars_repo_head_hexsha": "322728a71ec011b681b0038e9dcd86df1f73b2fd", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
function inspect_menu_viewpoint
% Some of the FT_PLOT_XXX functions that return a 3D object support a
% right-mouse-click context menu with which you can select
% top/bottom/left/right/front/back. This functionality requires that the object being
% plotted has a known coordinate system.
% note that the objects don't ... | {"author": "fieldtrip", "repo": "fieldtrip", "sha": "c2039be598a02d86b39aae76bfa7aaa720f9801c", "save_path": "github-repos/MATLAB/fieldtrip-fieldtrip", "path": "github-repos/MATLAB/fieldtrip-fieldtrip/fieldtrip-c2039be598a02d86b39aae76bfa7aaa720f9801c/test/inspect_menu_viewpoint.m"} |
C
C $Id: gxmdef.f,v 1.4 2008-07-27 00:21:03 haley Exp $
C
C Copyright (C) 2000
C University Corporation for Atmospheric Research
C All Rights Reserved
C
C The use of this Software is governed by a License Agreeme... | {"hexsha": "ae0f9aa89dbca9613c06b8a7d4dad6a51d75a980", "size": 1448, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ncarg2d/src/libncarg_gks/awi/gxmdef.f", "max_stars_repo_name": "tenomoto/ncl", "max_stars_repo_head_hexsha": "a87114a689a1566e9aa03d85bcf6dc7325b47633", "max_stars_repo_licenses": ["Apache-2.0"], ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.