text stringlengths 0 27.1M | meta dict |
|---|---|
(*
Autor(s):
Andrej Dudenhefner (1)
Affiliation(s):
(1) Saarland University, Saarbrücken, Germany
*)
(*
Reduction from:
Diophantine Constraint Solvability (H10C_SAT)
to:
Square Diophantine Constraint Solvability (H10SQC_SAT)
*)
Require Import List Lia.
Require Cantor.
Import ListNotations.
... | {
"alphanum_fraction": null,
"author": "uds-psl",
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event_max_dat... |
#include <boost/log/utility/strictest_lock.hpp>
| {
"alphanum_fraction": 0.8125,
"author": null,
"avg_line_length": 24,
"converted": null,
"ext": "hpp",
"file": null,
"hexsha": "0cee71c14a011e5e6150ffccbd7c31e805dd0e9b",
"include": null,
"lang": "C++",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count": 4,
"ma... |
import numpy as np
import time
arr = np.random.randn(100, 100)
arr = arr * 1000000000000000000 ##########################
arr.dtype = 'float64' ##########################
print(arr.dtype)
time_start = time.time()
for i in range(500):
for j in range(500):
arr * arr
print(i)
time_end = time.time... | {
"alphanum_fraction": 0.6069057105,
"author": null,
"avg_line_length": 23.53125,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "3b87046b8d6bb71bb81cf86e824f9789c2e1955d",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_co... |
# Copyright 2019 The OpenRadar 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 applicable law... | {
"alphanum_fraction": 0.6002605863,
"author": null,
"avg_line_length": 36.7224880383,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "946a31bff87ddc7bb342aeb49f6db9f242a50178",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
from __future__ import print_function
import os
from argparse import ArgumentParser
import numpy as np
from sklearn.decomposition import PCA
from sklearn.preprocessing import StandardScaler
if __name__ == '__main__':
parser = ArgumentParser("")
parser.add_argument("feats", help="Path to the npy features.")
... | {
"alphanum_fraction": 0.7028483449,
"author": null,
"avg_line_length": 33.3076923077,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "b844e3f1daf05c31ab6d47c5b357a7c583f02cf8",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
// Copyright Vladimir Prus 2004.
// Copyright Hartmut Kaiser 2005.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_PP_IS_ITERATING
#ifndef BOOST_PLUGIN_FACTORY_IMPL_HK_2005_11_07
#define BOOST_PLU... | {
"alphanum_fraction": 0.5374784111,
"author": null,
"avg_line_length": 34.0588235294,
"converted": null,
"ext": "hpp",
"file": null,
"hexsha": "0b954cd897cef840521407acdb2cc4a8d4ff89fb",
"include": null,
"lang": "C++",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks... |
# Copyright (c) Microsoft Corporation and contributors.
# Licensed under the MIT License.
import logging
import math
import time
from typing import Any, List, Optional, Tuple, Union
import networkx as nx
import numpy as np
from ..utils import remap_node_ids
def node2vec_embed(
graph: Union[nx.Graph, nx.DiGraph... | {
"alphanum_fraction": 0.6270518013,
"author": null,
"avg_line_length": 35.5378787879,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "16386e8f49ac83e2f9c436adbc056266858401ad",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
@testset "ess.jl" begin
@testset "copy and split" begin
# check a matrix with even number of rows
x = rand(50, 20)
# check incompatible sizes
@test_throws DimensionMismatch MCMCDiagnosticTools.copyto_split!(
similar(x, 25, 20), x
)
@test_throws DimensionM... | {
"alphanum_fraction": 0.5882721856,
"author": null,
"avg_line_length": 35.043956044,
"converted": null,
"ext": "jl",
"file": null,
"hexsha": "4528c735d0445f6e90ae5879ff964f39384b882c",
"include": null,
"lang": "Julia",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks... |
#!/usr/bin/env python
# import
from __future__ import print_function
## batteries
import os
import sys
import uuid
import pytest
import subprocess
## 3rd party
import numpy as np
import pandas as pd
## package
from MGSIM import Utils
from MGSIM import SimHtReads
from MGSIM.Commands import HtReads as HtReads_CMD
# data... | {
"alphanum_fraction": 0.5725714286,
"author": null,
"avg_line_length": 39.4736842105,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "682dbbf6c1181e9b68cd73716d0576e6507b3bfb",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# cell_markers: region,endregion
# formats: ipynb,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.4.1
# kernelspec:
# display_name: Python 3
# language... | {
"alphanum_fraction": 0.6848394519,
"author": null,
"avg_line_length": 35.1507352941,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "046dd7cb1607b4f834c9f87ca88fa9cfa0ac983a",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
#' Complement codes the data for use with an ART network.
#'
#' This function complement codes the given data where the complement of x is 1-x.
#' @title ART_Complement_Code
#' @param data Matrix of size NumFeatures-by-NumSamples that holds the data to be complement coded.
#' @return Data that has been complement code... | {
"alphanum_fraction": 0.6919739696,
"author": null,
"avg_line_length": 30.7333333333,
"converted": null,
"ext": "r",
"file": null,
"hexsha": "2c38fe57bdecdce4d861537f240bcb9795737675",
"include": null,
"lang": "R",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_cou... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 20 16:16:14 2018
@author: landrieuloic
""""""
Large-scale Point Cloud Semantic Segmentation with Superpoint Graphs
http://arxiv.org/abs/1711.09869
2017 Loic Landrieu, Martin Simonovsky
Template file for processing custome dataset... | {
"alphanum_fraction": 0.5825293351,
"author": null,
"avg_line_length": 45.1176470588,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "96ce9e2cdcf6c8a2b22eb1c19fc91e1819f0b56a",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
#=
export IdentityOperation
export apply_operation
export domaintype
export isidentity, istranslation, ispoint
"""
IdentityOperation{S<:Real} <: AbstractSpaceSymmetryOperation{S}
Represents identity (space symmetry) operation
# Fields
* `dimension::Int`: dimension of the space on which the identity operation ac... | {
"alphanum_fraction": 0.7046163444,
"author": null,
"avg_line_length": 24.4732824427,
"converted": null,
"ext": "jl",
"file": null,
"hexsha": "a3d94015d09d07f44a3ce2eb6b66863da3168332",
"include": null,
"lang": "Julia",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
"""Everything needed for defining phases within an optimal control problem.
Classes:
Phase
"""
import copy
import itertools
from typing import (Optional, Tuple)
import sympy as sym
from .bounds import PhaseBounds
from .guess import PhaseGuess
from .mesh import PhaseMesh
from .scaling import PhaseScaling
from .typ... | {
"alphanum_fraction": 0.6108186604,
"author": null,
"avg_line_length": 42.9719188768,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "2514663eade4f1969524defc4b4a6a3d192b8d3d",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
module NFFT
using Base.Cartesian
using FFTW
using Distributed
using SparseArrays
using LinearAlgebra
export NFFTPlan, nfft, nfft_adjoint, ndft, ndft_adjoint
include("windowFunctions.jl")
include("precomputation.jl")
#=
Some internal documentation (especially for people familiar with the nfft)
- The window is preco... | {
"alphanum_fraction": 0.6199834506,
"author": null,
"avg_line_length": 30.4025157233,
"converted": null,
"ext": "jl",
"file": null,
"hexsha": "f8b9d2d0ab93c0a9645a7f50ed22cc5556a598a2",
"include": null,
"lang": "Julia",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
import numpy as np
import torch
from cnns.nnlib.utils.shift_DC_component import shift_DC
from cnns.nnlib.pytorch_layers.pytorch_utils import compress_2D_index_forward
torch.manual_seed(31)
# x = torch.randint(10, (6, 6))
x = torch.tensor([[6., 5., 0., 2., 4., 1.],
[4., 2., 8., 5., 6., 8.],
[0., 0., 4.,... | {
"alphanum_fraction": 0.5235256547,
"author": null,
"avg_line_length": 35.3157894737,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "f4e0282c9049d7696aa0d1718e760012ed3e5bf3",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
[STATEMENT]
lemma approx_add: "a \<approx> b \<Longrightarrow> c \<approx> d \<Longrightarrow> a + c \<approx> b + d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>a \<approx> b; c \<approx> d\<rbrakk> \<Longrightarrow> a + c \<approx> b + d
[PROOF STEP]
proof (unfold approx_def)
[PROOF STATE]
proof (state... | {
"alphanum_fraction": null,
"author": null,
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": 12,
"llama_tokens": 1060,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event_max_datetime":... |
# _*_ coding:utf-8 _*_
"""
Pytorch(笔记9)--读取自定义数据
https://blog.csdn.net/haiqiang1995/article/details/90348966
Pytorch源码(一)—— 简析torchvision的ImageFolder
https://www.jianshu.com/p/5bb684c4c9fc
Pytorch-ImageFolder/自定义类 读取图片数据
https://jianzhuwang.blog.csdn.net/article/details/103776245
"""
from torch.utils.data import D... | {
"alphanum_fraction": 0.5970812796,
"author": null,
"avg_line_length": 32.2336448598,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "2513c3a7356cfdc0d6f4ec38f7e2ef4af038dbaa",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
#!/usr/bin/env python
'''Trains a temporal difference (TD) agent in the tabular pegs on disks domain.'''
# python
import sys
from time import time
# scipy
from scipy.io import loadmat, savemat
from numpy.random import seed
# self
from rl_environment import RlEnvironment
from rl_agent_td import RlAgentTd
def Main():
... | {
"alphanum_fraction": 0.5840274375,
"author": null,
"avg_line_length": 27.2133333333,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "53c0a3bbd2b163bd8234b357569eee8a353cc100",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
from torch import nn
import numpy as np
def optional_repeat(value, times):
""" helper function, to repeat a parameter's value many times
:param value: an single basic python type (int, float, boolean, string), or a list with length equals to times
:param times: int, how many times to repeat
:return: a ... | {
"alphanum_fraction": 0.6352753392,
"author": null,
"avg_line_length": 37.4029850746,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "439c52f20b2ba9d013e5ccde8ebfcf7319dc97df",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
Produce is a book of short fiction and poetry by accomplished UC Davis Undergraduates undergraduate and graduate students. A reinvention of the UCD undergraduate literary magazine known as Seele (pronounced zayluh), Produce was grown in association with the UC Davis English Club.
To purchase, contact the above email ... | {
"alphanum_fraction": 0.7997076023,
"author": null,
"avg_line_length": 109.44,
"converted": null,
"ext": "f",
"file": null,
"hexsha": "b4ad1250f0d4d29c2dcf397b3b6261faaac9f455",
"include": null,
"lang": "FORTRAN",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_coun... |
import numpy as np
import yields
from scipy import integrate
class SNIa(object):
"""
Class holding the SNIa delay time distribution and yields.
"""
def __init__(self, dtd_name, yield_name, lifetimes_obj, imf_obj,
**kwargs):
"""
Initialize the SN Ia model.
:par... | {
"alphanum_fraction": 0.5940163191,
"author": null,
"avg_line_length": 39.9637681159,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "f82784fdcbcae9e4b7ab0348fbde5e82be285e98",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
### A Pluto.jl notebook ###
# v0.12.20
using Markdown
using InteractiveUtils
# ╔═╡ 88071c54-619d-11eb-3007-7db2c4a86215
begin
using MLJ
using LeastSquaresSVM
using MLJModels
using DataFrames
using StatsPlots
using BenchmarkTools
end
# ╔═╡ ae6803ac-619f-11eb-0d67-cb1be3400e9c
@load SVC pkg = LIBSVM;
# ╔═╡ b159... | {
"alphanum_fraction": 0.729468599,
"author": null,
"avg_line_length": 23.4831932773,
"converted": null,
"ext": "jl",
"file": null,
"hexsha": "62d7d92bb5d316eab0d669db9c3b83c969b9632b",
"include": null,
"lang": "Julia",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks... |
import cv2
import mxnet as mx
import numpy as np
import scipy as sc
from utils.math import Distances
from dataProcessor.tiffReader import GEOMAP
from validation.osmClasses import OSMClasses
from utils.labelProcessor import LabelProcessor
from validation.clcClasses import CLCClasses
from sklearn.neighbors import KNeigh... | {
"alphanum_fraction": 0.5867895545,
"author": null,
"avg_line_length": 38.9184782609,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "303de942c76947c2b07d7f5caa9f36b662f7f6a5",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
[STATEMENT]
lemma list_dtree_subset:
assumes "xs |\<subseteq>| ys" and "list_dtree (Node r ys)"
shows "list_dtree (Node r xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. list_dtree (Node r xs)
[PROOF STEP]
using wf_dlverts_sub[OF assms(1)] wf_darcs_sub[OF assms(1)] assms(2)
[PROOF STATE]
proof (prove)
using ... | {
"alphanum_fraction": null,
"author": null,
"avg_line_length": null,
"converted": null,
"ext": null,
"file": "Query_Optimization_List_Dtree",
"hexsha": null,
"include": null,
"lang": null,
"length": 2,
"llama_tokens": 277,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_f... |
import numpy as np
import fenics as fa
class PoissonRobot:
def __init__(self, args):
self.args = args
self.name = 'robot'
self._build_mesh()
self._build_function_space()
self._set_detailed_boundary_flags()
def _build_mesh(self):
self.width = 0.5
mesh = ... | {
"alphanum_fraction": 0.5153246753,
"author": null,
"avg_line_length": 33.1896551724,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "1ef00aa22d9b7249192d1fe0be8c160963bc972d",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
"""
Functions defined in the Pico Technology SDK v10.6.10.24
"""
from ctypes import (c_int8, c_int16, c_uint16, c_int32, c_uint32, c_int64,
c_uint64, c_float, c_double, c_void_p, POINTER)
from numpy.ctypeslib import ndpointer
from ...picotech import c_enum
from ..errors import PICO_STATUS, PICO_INF... | {
"alphanum_fraction": 0.6318985477,
"author": null,
"avg_line_length": 45.7677806341,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "74da2420650abf785e652717210d379f29d9d371",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
import numpy as np
from scipy.interpolate import interp1d
from skfmm import travel_time, distance
from scipy.signal import resample
def resample2d( x, shape=[] ):
if len(shape)==0:
raise ValueError('shape should not be empty.')
x1=resample(x,shape[0],axis=0)
x2=resample(x1,shape[1],axis=1)
... | {
"alphanum_fraction": 0.57733692,
"author": null,
"avg_line_length": 30.6597938144,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "30b170cea6ab132619890ee1e5056a10ea009bbf",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks... |
Require Export TopologicalSpaces.
Require Export Continuity.
Inductive homeomorphism {X Y:TopologicalSpace}
(f:point_set X -> point_set Y) : Prop :=
| intro_homeomorphism: forall g:point_set Y -> point_set X,
continuous f -> continuous g ->
(forall x:point_set X, g (f x) = x) ->
(forall y:point_set Y, f (g y) ... | {
"alphanum_fraction": null,
"author": "dschepler",
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event_max_d... |
'''Analyse invariance'''
import os
import sys
import numpy as np
from scipy.ndimage import rotate
from skimage.io import imread, imsave
from matplotlib import pyplot as plt
folder_name = 'nate_5_'
im0 = imread('./nate_experiments/activations/{:s}/{:04d}.jpg'.format(folder_name,0))/255.
error = []
errorm = []
for i... | {
"alphanum_fraction": 0.6786427146,
"author": null,
"avg_line_length": 23.3023255814,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "0c5916fb1b8c2bf672bcf19b22de3b4d7095a7cd",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
import numpy as np
import plotly.express as px
def dataset_Flower(m=10, noise=0.0):
# Inicializujeme matice
X = np.zeros((m, 2), dtype='float')
Y = np.zeros((m, 1), dtype='float')
a = 1.0
pi = 3.141592654
M = int(m/2)
for j in range(2):
ix = range(M*j, M*(j+1))
t = np.lins... | {
"alphanum_fraction": 0.5781584582,
"author": null,
"avg_line_length": 25.2432432432,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "ac3ac647a39f6f77adfe725f78f84af4487a6c79",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
"""Unit test on utility for sampling/generating data on planar surfaces.
Authors: Ayush Baid, John Lambert
"""
import numpy as np
import gtsfm.utils.sampling as sampling_utils
def test_sample_points_on_plane() -> None:
"""Assert generated points are on a single 3d plane."""
num_points = 10
# range of... | {
"alphanum_fraction": 0.6731207289,
"author": null,
"avg_line_length": 28.3225806452,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "6b462838223905019a73e6b20612716addfe81ed",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
# -*-coding:utf-8-*-
from tqdm import tqdm
import os
import numpy as np
from keras.preprocessing.image import img_to_array, load_img
class Fer2013(object):
def __init__(self):
"""
构造函数
"""
self.folder = '../data/fer2013'
def gen_train(self):
"""
产生训练数据
... | {
"alphanum_fraction": 0.5583655837,
"author": null,
"avg_line_length": 37.2852348993,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "21e649dbaad280d205377b061c0c56abab36afbb",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
[STATEMENT]
lemma has_integral_neg: "(f has_integral k) S \<Longrightarrow> ((\<lambda>x. -(f x)) has_integral -k) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (f has_integral k) S \<Longrightarrow> ((\<lambda>x. - f x) has_integral - k) S
[PROOF STEP]
by (drule_tac c="-1" in has_integral_cmul) auto | {
"alphanum_fraction": null,
"author": null,
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": 1,
"llama_tokens": 130,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event_max_datetime": n... |
# -*- coding: utf-8 -*-
import numpy as np
from evaluators.quadratic_weighted_kappa import quadratic_weighted_kappa as qwk
from evaluators.quadratic_weighted_kappa import linear_weighted_kappa as lwk
def assert_inputs(rater_a, rater_b):
assert np.issubdtype(rater_a.dtype, np.integer), 'Integer array expected, got ' ... | {
"alphanum_fraction": 0.8039473684,
"author": null,
"avg_line_length": 42.2222222222,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "d5a7cfdefd1538705023cd3d4dbddcf5192c65fa",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
import numpy as np
import pickle
def indexVBO(in_vertices,in_uvs,in_normals):
VertexToOutIndex = {}
out_vertices,out_uvs,out_normals,out_indices = [],[],[],[]
# For each input vertex
for i in range(len(in_vertices)):
packed = pickle.dumps([in_vertices[i], in_uvs[i], in_normals[i]])
... | {
"alphanum_fraction": 0.6275862069,
"author": null,
"avg_line_length": 33.8333333333,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "7f7348cd8e7e9650a11d975b50e465f4640cc4e7",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.gridspec as gridspec
import scipy.special as special
inch_fig = 3
f, axs = plt.subplots(nrows=1, ncols=7, figsize=(7*inch_fig, inch_fig), subplot_kw={'projection':'3d'})
plt.subplots_adjust(wspace=-0.7)
kappas ... | {
"alphanum_fraction": 0.6368159204,
"author": null,
"avg_line_length": 33.5,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "a5f841b7c22ad082270e65784fcc6db1f8d4dcee",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count"... |
from .dlm import dlm
from .lego import join
from .param import uni as param_uni
from scipy.linalg import block_diag
from scipy.stats import t as t_dist
from scipy.stats import norm
import numpy as np
from numpy.linalg import inv
def is_pos_def(x):
return np.all(np.linalg.eigvals(x) > 0)
class dlm_uni(dlm):
... | {
"alphanum_fraction": 0.4872082865,
"author": null,
"avg_line_length": 31.5472440945,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "520a5e674955db8c23d18ecead9e80ed482db53f",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | {
"alphanum_fraction": 0.6866002215,
"author": null,
"avg_line_length": 38.4255319149,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "918bcb0952bb6e80a9049d62c02ea6700f31b3a9",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
# Test osqp python module
import osqp
from osqp import constant, default_algebra
# import osqppurepy as osqp
import numpy as np
from scipy import sparse
# Unit Test
import unittest
import pytest
import numpy.testing as nptest
class non_convex_tests(unittest.TestCase):
def setUp(self):
# Simple QP probl... | {
"alphanum_fraction": 0.5755909841,
"author": null,
"avg_line_length": 31.9122807018,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "6f2dcc0895c468d608e01b4c75e972a0baf2bb86",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
from skimage import io
import numpy as np
import timeit
def Derivatives(order,F,begin_timer):
deriv_axis = []
dF = np.zeros(F.shape)
First_Derivative_Check = 0
for derivatives in range(3):
order_axis = np.zeros(3)
if derivatives == 0:
order_axis[1] = 1
... | {
"alphanum_fraction": 0.471360652,
"author": null,
"avg_line_length": 70.1111111111,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "8f66512e930a33fde4937d2cbc23f334f05d2eba",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
"""
Planar data classification using 1 hidden layer
Authors:
Nalin Das (nalindas9@gmail.com)
Graduate Student pursuing Masters in Robotics,
University of Maryland, College Park
"""
import numpy as np
import matplotlib.pyplot as plt
from sklearn import datasets
import utils
import time
from tensorboardX import Summary... | {
"alphanum_fraction": 0.5996684625,
"author": null,
"avg_line_length": 29.4268292683,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "e91ad6ff4d65227a88de758018f510eaef989680",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
"""
My Python startup file, carefully gathered from different sources (see below)
Get code from Github::
git clone https://github.com/jezdez/python-startup.git ~/.python
Put this in your shell profile::
export PYTHONSTARTUP=$HOME/.python/startup.py
In case you haven't saved these files in $HOME/.python make sur... | {
"alphanum_fraction": 0.5851312573,
"author": null,
"avg_line_length": 29.3572542902,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "be377a4efa528a2b196e0b173a111a60b9a58d99",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
import os
import sys
from setuptools import setup, PEP420PackageFinder, Extension
from setuptools.command.build_ext import build_ext
if 'EPICS_BASE' not in os.environ or 'EPICS_HOST_ARCH' not in os.environ:
print(sys.stderr, 'EPICS_BASE and EPICS_HOST_ARCH must be set')
sys.exit(-1)
if sys.platform == 'darw... | {
"alphanum_fraction": 0.6011739265,
"author": null,
"avg_line_length": 29.4272727273,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "0f8bddaba7763ec98ca41820af6f0c1f38b48c82",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
⊢ Category.{?u.2036, u₁} (Skeleton C)
[PROOFSTEP]
apply InducedCategory.category
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : C... | {
"alphanum_fraction": null,
"author": null,
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": null,
"llama_tokens": 2729,
"mathlib_filename": "Mathlib.CategoryTheory.Skeletal",
"max_forks_count": null,
"max_forks_... |
\documentclass[
fontsize = 12pt,
paper = a4
]
{scrartcl}%koma-klasse
\addtokomafont{disposition}{\rmfamily}
\usepackage[
backend=biber,
citestyle=numeric,
sortcites=true,
natbib=true,
url=false,
doi=true,
eprint=false
]{biblatex}
\addbibresource{bibliography.bib}
\usepackage[sub... | {
"alphanum_fraction": 0.7520830888,
"author": null,
"avg_line_length": 59.8665105386,
"converted": null,
"ext": "tex",
"file": null,
"hexsha": "a65afd7f2fb5eda872f0f7164eaff4c5a81e6413",
"include": null,
"lang": "TeX",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks... |
Denise Platt Lichtig practices acupuncture, Meditation, and traditional Chinese Medicine. She also offers classes in Tai Chi.
Acupuncture
Denise Lichtig has been practicing Acupuncture and Traditional Chinese Medicine in Davis for over 15 years and have helped hundreds of clients. She is a licensed and certified ... | {
"alphanum_fraction": 0.8078571429,
"author": null,
"avg_line_length": 73.6842105263,
"converted": null,
"ext": "f",
"file": null,
"hexsha": "2420b1c565077a04b400c7e2d7d5940077682f8b",
"include": null,
"lang": "FORTRAN",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
#!/usr/bin/python3
#Import packages and libraries
import datetime as dt
import json
import pandas as pd
import numpy as np
from sqlalchemy import Column, Integer, String, Float, DateTime, Boolean, func
import iotfunctions.bif as bif
from iotfunctions.metadata import EntityType, LocalEntityType
from iotfunctions.db imp... | {
"alphanum_fraction": 0.7871046229,
"author": null,
"avg_line_length": 26.5161290323,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "a61f891747d6ee1d9eee42e6fed218f9e459d354",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
[STATEMENT]
lemma R_choice_law: "X \<le> rel_R \<lceil>P\<rceil> \<lceil>Q\<rceil> \<Longrightarrow> Y \<le> rel_R \<lceil>P\<rceil> \<lceil>Q\<rceil> \<Longrightarrow> X \<union> Y \<le> rel_R \<lceil>P\<rceil> \<lceil>Q\<rceil>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>X \<subseteq> rel_R \<lceil>P\... | {
"alphanum_fraction": null,
"author": null,
"avg_line_length": null,
"converted": null,
"ext": null,
"file": "Hybrid_Systems_VCs_KleeneAlgebraTests_HS_VC_KAT_rel",
"hexsha": null,
"include": null,
"lang": null,
"length": 2,
"llama_tokens": 396,
"mathlib_filename": null,
"max_forks_count": nul... |
struct UniformPolicy <: Network
net::Network
end
initial_inference(n::UniformPolicy, game::MuZeroGame) = initial_inference(n, game.game)
# @todo just have initial_inference(x::UniformPolicy, args...)
initial_inference(x::UniformPolicy, game::AbstractEnv) = initial_inference(x.net, game)
initial_inference(x::Unifor... | {
"alphanum_fraction": 0.7898272553,
"author": null,
"avg_line_length": 47.3636363636,
"converted": null,
"ext": "jl",
"file": null,
"hexsha": "64cced09696c45e82dc6b0b18cebe65d4fae7ea2",
"include": null,
"lang": "Julia",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
""""
Configuration reader for LADiM version 2
with compability wrapper for LADiM version 1 configuration
"""
# -----------------------------------
# Bjørn Ådlandsvik <bjorn@hi.no>
# Institute of Marine Research
# December 2020
# -----------------------------------
import sys
from pathlib import Path
import logging
... | {
"alphanum_fraction": 0.5981123281,
"author": null,
"avg_line_length": 35.316872428,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "12334c6faeb585ccf3f76ed41e4f1ec90c0dd766",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE PulseTest
#include <boost/test/unit_test.hpp>
#include <exception>
#include <stdio.h>
#include <string>
#include <sstream>
#include <vector>
#include <iterator>
#include <iostream>
#include <algorithm>
#include "../src/network.hpp"
#include "../src/network.cpp"
... | {
"alphanum_fraction": 0.6410979047,
"author": null,
"avg_line_length": 22.3589041096,
"converted": null,
"ext": "cpp",
"file": null,
"hexsha": "c71d633e5868abe97b9207f9da78ae77c7dfd47b",
"include": null,
"lang": "C++",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks... |
[STATEMENT]
lemma list_decode_inverse [simp]: "list_encode (list_decode n) = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. list_encode (list_decode n) = n
[PROOF STEP]
proof (induct n rule: list_decode.induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
1. list_encode (list_decode 0) = 0
2. \<And>n. (\<And>... | {
"alphanum_fraction": null,
"author": null,
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": 6,
"llama_tokens": 572,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event_max_datetime": n... |
import logging
from typing import TYPE_CHECKING
import numpy as np
import copy
from typing import Union, Optional, Any
from art.attacks.inference.membership_inference.black_box import MembershipInferenceBlackBox
from art.estimators.estimator import BaseEstimator
from art.estimators.classification.classifier import Cl... | {
"alphanum_fraction": 0.6658873042,
"author": null,
"avg_line_length": 41.125,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "f5eb6630a9bcbb4fb1dcedd042eeae1648750289",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_coun... |
import copy
import os
import re
from typing import List
import numpy as np
import torch
from kornia import quaternion_to_rotation_matrix
from pose3d_utils.camera import CameraIntrinsics
from experimenting.utils import Skeleton
from ..utils import get_file_paths
from .base import BaseCore
from .h3m import h36m_camera... | {
"alphanum_fraction": 0.5851543236,
"author": null,
"avg_line_length": 32.0463215259,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "d3dd0517ebadd7750ce3a17958ee21ff212de265",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
import pyximport; pyximport.install(pyimport=True)
import numpy as np
from gensim.models.callbacks import CallbackAny2Vec
from gensim.models.doc2vec import Doc2Vec, TaggedDocument
from vectorize.template import Vectorizer
class EpochLogger(CallbackAny2Vec):
'''Callback to log information about training'''
... | {
"alphanum_fraction": 0.6924428822,
"author": null,
"avg_line_length": 34.8367346939,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "6ee99b142cad1c2e5018f053e946c8b889b7f6f2",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
from collections import defaultdict
import networkx as nx
for part in ['0', '1']:
partial_VP = set(open('chooseVP' + part + '.txt', 'r').read().split('\n'))
fullVP = set(open('fullVP.txt', 'r').read().split('\n'))
fullVP1 = partial_VP & fullVP
graph1 = nx.Graph()
graph2 = nx.Graph()
with open('a... | {
"alphanum_fraction": 0.4538192711,
"author": null,
"avg_line_length": 33.3833333333,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "a7d3c7f04486c27fde9256a7b6e2fe063a70125c",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
import topogenesis as tg
import numpy as np
import os
file_directory = os.path.dirname(os.path.abspath(__file__))
sample_data_path = os.path.join(os.path.dirname(file_directory), "data")
np.random.seed(0)
def test_cellular_automata():
"""
Testing the vectorized version of newell method for finding the normal... | {
"alphanum_fraction": 0.490781286,
"author": null,
"avg_line_length": 26.296969697,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "02538783149a05850747136b00d40981d99363c2",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks... |
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 4 14:10:15 2018
@author: ashreeta
"""
import os
import matplotlib.pyplot as plt
import pandas as pd
import datetime
import grimsel.auxiliary.timemap as timemap
from PROFILE_READER.profile_reader import ProfileReader
svg_file = "/mnt/data/Dropbox/SHARED_DATA... | {
"alphanum_fraction": 0.4782208185,
"author": null,
"avg_line_length": 41.0756756757,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "369ad70695c7c8b11e73ae032500b73c2c4d1407",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
# diagnosis-name-search-contains
# search diagnoses to find those that contain one of a number of text fragments
library(tidyverse) # for packages stringr & dplyr
# create a small example dataframe with just one column
df1 <- data_frame( diagnosis = c('hodgkins','other','Hodgkins','lymph','Lymphoma','other'))
# cre... | {
"alphanum_fraction": 0.7262532982,
"author": null,
"avg_line_length": 32.2553191489,
"converted": null,
"ext": "r",
"file": null,
"hexsha": "c509cf5a5430b185d0990902444eb0b7170820c6",
"include": null,
"lang": "R",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_cou... |
[STATEMENT]
lemma rbt_cases:
obtains (Empty) "t = Empty"
| (Red) l k v r where "t = Branch R l k v r"
| (Black) l k v r where "t = Branch B l k v r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>t = Empty \<Longrightarrow> thesis; \<And>l k v r. t = Branch R l k v r \<Longrightarrow> thesis; \<And>... | {
"alphanum_fraction": null,
"author": null,
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": 11,
"llama_tokens": 1497,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event_max_datetime":... |
theory SimpleVariantPG imports HOML MFilter BaseDefs
begin
(*Axiom's of simplified variant with A3 replaced*)
axiomatization where
A1': "\<lfloor>\<^bold>\<not>(\<P>(\<lambda>x.(x\<^bold>\<noteq>x)))\<rfloor>" and
A2': "\<lfloor>\<^bold>\<forall>X Y.(((\<P> X) \<^bold>\<and> ((X\<^bold>\<sqsubseteq>Y)\<^bold>\<or>(... | {
"alphanum_fraction": null,
"author": "cbenzmueller",
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event_ma... |
//==================================================================================================
/*
Copyright 2017 NumScale SAS
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
//======================================... | {
"alphanum_fraction": 0.4760112888,
"author": null,
"avg_line_length": 33.21875,
"converted": null,
"ext": "cpp",
"file": null,
"hexsha": "d9bcd05d5fa7d46373248731c7d8c8721634fa41",
"include": null,
"lang": "C++",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_coun... |
# -*- coding: utf-8 -*-
## Display an animated arrowhead following a curve.
## This example uses the CurveArrow class, which is a combination
## of ArrowItem and CurvePoint.
##
## To place a static arrow anywhere in a scene, use ArrowItem.
## To attach other types of item to a curve, use CurvePoint.
import initExamp... | {
"alphanum_fraction": 0.7172995781,
"author": null,
"avg_line_length": 26.3333333333,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "ae118507f84d7fd331016c484107b46758886fb4",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split, cross_val_score
from sklearn import preprocessing
from sklearn.metrics import mean_squared_error
from sklearn.linear_model import LinearRegression
from joblib import dump
import os
import catboost
def make_model(path, model_n... | {
"alphanum_fraction": 0.7027511962,
"author": null,
"avg_line_length": 34.8333333333,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "fc3cc7de5c65869a7bad48b6369bffc31400a6b5",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
(*
MacBook-Air:~ billw$ /Applications/CoqIDE_8.4pl5.app/Contents/Resources/bin/coqtop
Welcome to Coq 8.4pl5 (October 2014)
Coq < Section Distribution_A.
Coq < Goal forall p q r:Prop, (p /\ (q \/ r)) <-> ((p /\ q) \/ (p /\ r)).
1 subgoal
============================
forall p q r : Prop, p /\ (q \/ r) <-> p /\ q ... | {
"alphanum_fraction": null,
"author": "billwestfall",
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event_ma... |
import numpy as np
from sklearn.feature_selection import SelectKBest, f_classif
# loading data to tables
file = open("heart.dat")
all = np.loadtxt(file, delimiter=" ")
X = np.zeros((len(all), len(all[0]) - 1), dtype=np.uint8)
y = np.zeros((len(all)), dtype=np.uint8)
for i in range(len(all)):
for j in range(len(all... | {
"alphanum_fraction": 0.6406882591,
"author": null,
"avg_line_length": 29.9393939394,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "309e42be1527f360209aed747fa49dc98db4b591",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
import argparse
import contextlib
import json
import os
import sys
import time
from collections import namedtuple
from datetime import datetime
import numpy as np
import pytz
from pyarrow import Schema
import katana.local
from katana.local import Graph, analytics
# TODO(giorgi): This script needs to be tested in CI.... | {
"alphanum_fraction": 0.6040004495,
"author": null,
"avg_line_length": 35.4541832669,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "78f68a3b4ba2dc0c8ee5070ec1ff31580373ba5b",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
using CSV, DataFrames, StatsPlots, StanSample
using Distributions, Statistics, Random
ProjDir = @__DIR__
# Simulate the data
Random.seed!(123)
N = 15
obspairs = ((30.0, 53), (35.0, 45), (40.0, 28), (45.0, 26), (50.0, 25))
ppu = []; quantity = []
for i in 1:N in
obs = rand(obspairs, 1)
append!(ppu, [rand(Normal(... | {
"alphanum_fraction": 0.6129032258,
"author": null,
"avg_line_length": 25.4144144144,
"converted": null,
"ext": "jl",
"file": null,
"hexsha": "9bc923533c11cf713d57f96a5f98955685899a1c",
"include": null,
"lang": "Julia",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
"""Abrahamson and Silva (1996, :cite:`abrahamson96`) duration model."""
from __future__ import division
import numpy as np
from . import model
__author__ = 'Albert Kottke'
class AbrahamsonSilva1996(model.Model):
"""Abrahamson and Silva (1996, :cite:`abrahamson96`) duration model.
Parameters
---------... | {
"alphanum_fraction": 0.5540752351,
"author": null,
"avg_line_length": 29,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "0aaf72521e40e6e06227381f450db91ff0d3453b",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count": ... |
\section{Conclusions}
\glspl{MSR} feature significant multiphysics interactions which present
computational challenges for many existing multiphysics reactor analysis
software. This paper presents code-to-code verification of Moltres
capabilities in modeling such multiphysics phenomena in fast-spectrum
\glspl{MSR} bas... | {
"alphanum_fraction": 0.8348527349,
"author": null,
"avg_line_length": 59.4166666667,
"converted": null,
"ext": "tex",
"file": null,
"hexsha": "e40d629749bf03b6de814fa011367cec147c845f",
"include": null,
"lang": "TeX",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks... |
#! /usr/bin/julia
# Rosetta Code, Twelve statements
function showflaggedbits{T<:BitArray{1}}(a::T, f::T)
tf = map(x->x ? "T" : "F", a)
flg = map(x->x ? "*" : " ", f)
join(tf .* flg, " ")
end
const props = [s -> length(s) == 12,
s -> sum(s[7:12]) == 3,
s -> sum(s[2:2:end]) ==... | {
"alphanum_fraction": 0.4704711347,
"author": null,
"avg_line_length": 25.5423728814,
"converted": null,
"ext": "jl",
"file": null,
"hexsha": "9c722b3a2bbeeb5e69dd0af8c05f826fde4b6efc",
"include": null,
"lang": "Julia",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F #233
import torch.optim as optim
from torchvision import datasets,models,transforms
from PIL import Image
import sys
sys.path.append("..")
from attack import pgd
from netmodels.CNNmodel import Net
model = Net()
print("Load orignial ... | {
"alphanum_fraction": 0.7520355292,
"author": null,
"avg_line_length": 25.4905660377,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "b8524ff8445d93e331bf98cad209636e0c2727e9",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Simulate observations"""
import numpy as np
import astropy.units as u
from astropy.coordinates import SkyCoord, SkyOffsetFrame
from astropy.table import Table
import gammapy
from gammapy.data import EventList
from gammapy.maps import MapCoord
from gamma... | {
"alphanum_fraction": 0.5671559777,
"author": null,
"avg_line_length": 33.9706666667,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "621116eca743cf62e6581e32fc5380ece9da77f9",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
import cv2
import numpy as np
# Find best match
def find_best_match(patch, strip):
# TODO: Find patch in strip and return column index (x value) of topleft corner
# We will use SSD to find out the best match
best_id = 0
min_diff = np.infty
for i in range(int(strip.shape[1] - patch.shape[1])):
... | {
"alphanum_fraction": 0.6711473836,
"author": null,
"avg_line_length": 32.546875,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "6af5ed0ea9f499ed5e1ec08741e5489c7c6b26d1",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_c... |
# --- import --------------------------------------------------------------------------------------
import os
import numpy as np
import WrightTools as wt
from . import _pulse
from ._scan import Scan
# --- define --------------------------------------------------------------------------------------
here = os.pa... | {
"alphanum_fraction": 0.516088061,
"author": null,
"avg_line_length": 25.3978494624,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "b83b971270be8b99fd3d68f972b51da0d946b043",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
# Copyright (C) 2016 Nippon Telegraph and Telephone Corporation.
#
# 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 appli... | {
"alphanum_fraction": 0.6040309696,
"author": null,
"avg_line_length": 38.5639810427,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "c258ad602e6ade8648e046761058710852a4d54a",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
function ctranspose(x)
%CTRANSPOSE is not defined for tensors.
%
% See also TENSOR/PERMUTE.
%
%MATLAB Tensor Toolbox.
%Copyright 2015, Sandia Corporation.
% This is the MATLAB Tensor Toolbox by T. Kolda, B. Bader, and others.
% http://www.sandia.gov/~tgkolda/TensorToolbox.
% Copyright (2015) Sandia Corporation. Unde... | {
"alphanum_fraction": null,
"author": "zhangqianqianQQ",
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event... |
import torch
import torch.nn.utils.prune as prune
import numpy as np
from pruning_utils import prune_model_custom, pruning_model
# layer1.0.conv2.weight_mask
# layer3.1.conv1.weight_mask
torch.manual_seed(1)
from models.resnet import resnet50, resnet18
a = torch.load("resnet18_cifar10_lt_extreme_qrcode/model_SA_best.pt... | {
"alphanum_fraction": 0.6853333333,
"author": null,
"avg_line_length": 26.3157894737,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "b30ce5d6c9c4e0f46ce9b92856b865ef9aa0c0af",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
%!TEX root = ../template.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% chapter4.tex
%% NOVA thesis document file
%%
%% Chapter with lots of dummy text
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\typeout{NT FILE chapter4.tex}
\chapter{Data Preprocessing}
\label{c... | {
"alphanum_fraction": 0.7797952303,
"author": null,
"avg_line_length": 122.4583333333,
"converted": null,
"ext": "tex",
"file": null,
"hexsha": "6851ab48fc42b23090ba640e1f89962285cb7e83",
"include": null,
"lang": "TeX",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
from re import S
from numpy.core.numeric import False_
from external.API_interface import Robot
from external.API_interface.TLF_API.component.Class_Pose2D import Pose2D
from robot_package.data_robot_creator import data_robot_creator
from external.sensor_board import CarteDetecteurObstacle
import time
import numpy as... | {
"alphanum_fraction": 0.6028032226,
"author": null,
"avg_line_length": 35.5333333333,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "0b326d70923a43789f96ea176897e0594fb2829a",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
import unittest
from datetime import datetime
import numpy as np
from dateutil.tz import tzlocal
from nwbwidgets.utils.timeseries import (
get_timeseries_tt,
get_timeseries_maxt,
get_timeseries_mint,
get_timeseries_in_units,
timeseries_time_to_ind,
bisect_timeseries_by_times,
align_by_trial... | {
"alphanum_fraction": 0.6416666667,
"author": null,
"avg_line_length": 32,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "92fc4b8d892bb816c7d6d73a1b935d072a0011bd",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count": ... |
"""Test for io.parquet"""
import numpy as np
import pandas as pd
import pyarrow as pa
import deepr as dpr
def test_io_parquet_dataset_read(tmpdir):
"""Test ParquetDataset"""
path = str(tmpdir.join("df.parquet.snappy"))
df = pd.DataFrame(data={"x": [0, 1], "y": [0, 2]})
df.to_parquet(path)
with d... | {
"alphanum_fraction": 0.6642710472,
"author": null,
"avg_line_length": 32.4666666667,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "86ac826fd88cd0d4c25716915a0072a40fddf395",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
#ifndef FILE_ID_SUPPORT_HPP_INCLUDED
#define FILE_ID_SUPPORT_HPP_INCLUDED
#include <clang-c/Index.h>
#include <algorithm>
#include <functional>
#include <boost/functional/hash/hash.hpp>
namespace std {
template <>
struct hash<CXFileUniqueID> {
std::size_t operator() (CXFileUniqueID const& uid) const {... | {
"alphanum_fraction": 0.5802728227,
"author": null,
"avg_line_length": 28.0294117647,
"converted": null,
"ext": "hpp",
"file": null,
"hexsha": "a037b007f4e0fcc2c2c72a0ce0a4f8623428c73e",
"include": null,
"lang": "C++",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks... |
#pragma once
#include <fc/fixed_string.hpp>
#include <gamebank/protocol/authority.hpp>
#include <gamebank/protocol/gamebank_operations.hpp>
#include <gamebank/chain/gamebank_object_types.hpp>
#include <gamebank/chain/witness_objects.hpp>
#include <gamebank/chain/shared_authority.hpp>
#include <boost/multi_index/comp... | {
"alphanum_fraction": 0.6779101145,
"author": null,
"avg_line_length": 46.223655914,
"converted": null,
"ext": "hpp",
"file": null,
"hexsha": "704dac33a6cb734a39332d94a4b13f720239c63a",
"include": null,
"lang": "C++",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_... |
import astropy.units as u
import math
from astropy.coordinates import SkyCoord, EarthLocation, get_sun, get_moon, Galactic
from astropy.time import Time
from astropy_healpix import HEALPix
class obs():
def __init__(self,
observatory="LCO",
obs_date="2020-9-1",
max_sun_alt=-17.0*u... | {
"alphanum_fraction": 0.5962044344,
"author": null,
"avg_line_length": 38.2877697842,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "4a3eba6c047c0d067184460fb279707e2b3558dc",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
%!TEX root = ../../thesis.tex
\section{Browser support}
%% \section{Development of HTML Editing APIs}
With the release of Internet Explorer 5.5 and the introduction of editing capabilities, Microsoft released a short documentation\footnote{\url{https://msdn.microsoft.com/en-us/library/ms537837(VS.85).aspx}, last che... | {
"alphanum_fraction": 0.783954727,
"author": null,
"avg_line_length": 136.5454545455,
"converted": null,
"ext": "tex",
"file": null,
"hexsha": "6b735b5e08179a280d1494b9d4f994c44b67eedd",
"include": null,
"lang": "TeX",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks... |
import numpy as np
from collections import Counter
from gridifier import Gridifier
class Balancer():
@staticmethod
def hypercube_balance(snapshots, bins):
gridified_snapshots = gridify_list_entries(snapshots, bins)
tuple_gridified_snapshots = list(map(tuple, gridified_snapshots))
retur... | {
"alphanum_fraction": 0.753411306,
"author": null,
"avg_line_length": 34.7796610169,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "c14e0680f59804cfd414c285fe1f4eb3b75ee474",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
Not that I think youre wrong, but do you have a way of knowing that David Greenwald is responsible for CAROLE? Users/PhilipNeustrom
20080607 12:05:28 nbsp Is this Robin Souza? Users/JamesSchwab
20080608 21:14:53 nbsp No it is not. Users/StephenSouza
| {
"alphanum_fraction": 0.7913385827,
"author": null,
"avg_line_length": 36.2857142857,
"converted": null,
"ext": "f",
"file": null,
"hexsha": "c12fe5b786acb7da7d1afd29386f9319d3b4c8fb",
"include": null,
"lang": "FORTRAN",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
#=
[eegplotter.jl]
Version = 0.022
Author = "William Herrera"
Copyright = "Copyright 2018 William Herrera"
Created = "12 Jan 2018"
Purpose = "EEG file routines viewer example"
=#
using EDFPlus
using DSP
using Plots
import FileIO
pyplot()
using PyPlot
linspace(start, stop, len) = LinRange{Float64}(start, stop, len)... | {
"alphanum_fraction": 0.6066848037,
"author": null,
"avg_line_length": 33.8552631579,
"converted": null,
"ext": "jl",
"file": null,
"hexsha": "4b5360a92a6ab2c3cb51389f3c2158a1c3e77b1e",
"include": null,
"lang": "Julia",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
"""Data and Channel Location Equivalence Tests"""
from __future__ import print_function
# Author: Teon Brooks <teon.brooks@gmail.com>
#
# License: BSD (3-clause)
import os.path as op
import inspect
import numpy as np
from numpy.testing import assert_array_almost_equal, assert_array_equal
from nose.tools import assert... | {
"alphanum_fraction": 0.6778621024,
"author": null,
"avg_line_length": 37.762195122,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "72b3028dbcf208cde460fa47dff4fe626345a22a",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
[STATEMENT]
lemma (in infinite_coin_toss_space) bernoulli_stream_pref_prob_neq_zero:
fixes x
assumes "0 < p"
and "p < 1"
shows "emeasure M {w\<in> space M. (stake n w = stake n x)} \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. emeasure M {w \<in> space M. stake n w = stake n x} \<noteq> 0
[PROOF STE... | {
"alphanum_fraction": null,
"author": null,
"avg_line_length": null,
"converted": null,
"ext": null,
"file": "DiscretePricing_Infinite_Coin_Toss_Space",
"hexsha": null,
"include": null,
"lang": null,
"length": 17,
"llama_tokens": 2550,
"mathlib_filename": null,
"max_forks_count": null,
"max... |
from math import factorial
import numpy as np
import scipy.optimize
def get_airfoil_coord(wu, wl, yute, ylte, x=None):
# N1 and N2 parameters (N1 = 0.5 and N2 = 1 for airfoil shape)
N1 = 0.5
N2 = 1
# Create x coordinate
if x is None: # if x_arr is not provided
N = 161 #TODO: hard coded ... | {
"alphanum_fraction": 0.617553754,
"author": null,
"avg_line_length": 29.5520833333,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "84ed9d48bedb4a62e1ce275c3ac60fe5cd65f526",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
from functools import partial
from functools import update_wrapper
import numpy as np
import pandas as pd
from loguru import logger
from pandas.api.types import is_categorical_dtype
from tqdm import tqdm
from src.utils.exceptions import ModalityNotPresentError
from src.utils.loaders import dataset_importer
__all__ ... | {
"alphanum_fraction": 0.6214578507,
"author": null,
"avg_line_length": 31.1722222222,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "21cc9aae2e277f5f9d32f3f0063c4b59ba7094d8",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
function c = char(s,varargin)
% object -> string
if check_option(varargin,'verbose')
c = option2str([{s.pointGroup},s.alignment]);
if ~isempty(s.mineral), c = [s.mineral ' (' c ')']; end
elseif check_option(varargin,'latex')
c = ['$' regexprep(s.pointGroup,'-(\w)','\\bar{$1}') '$'];
elseif check_option(varar... | {
"alphanum_fraction": null,
"author": "mtex-toolbox",
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event_ma... |
# Define your item pipelines here
#
# Add pipelines to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
# useful for handling different item types with a single interface
# from itemadapter import ItemAdapter
from numpy import negative
from sqlalchemy.orm import sessionma... | {
"alphanum_fraction": 0.5783124674,
"author": null,
"avg_line_length": 38.8253164557,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "2ca0f8fef0c34a723322b75eb977bdfe28616855",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
/*------------------------------------------------ Included libraries -----------------------------------------------*/
#include <iostream>
#include <cmath>
#include <string>
#include <Eigen/Core>
#include "random_forest.h"
using std::cout;
using std::endl;
using std::string;
using namespace derfcnd;
using namespace Ei... | {
"alphanum_fraction": 0.6176470588,
"author": null,
"avg_line_length": 26.8584474886,
"converted": null,
"ext": "cpp",
"file": null,
"hexsha": "d08d47a21c5cba7cf00e2974d13f7508b236e2ab",
"include": null,
"lang": "C++",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks... |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! EVB-QMDFF - RPMD molecular dynamics and rate constant calculations on
! black-box generated potential energy surfaces
!
! Copyright (c) 2021 by Julien Steffen (steffen@pctc.uni-kiel.de)
! Stefa... | {
"alphanum_fraction": 0.6506802721,
"author": null,
"avg_line_length": 28.2692307692,
"converted": null,
"ext": "f90",
"file": null,
"hexsha": "be1f4bb0a5d971423df32dd323c5d2b626f3aa63",
"include": null,
"lang": "FORTRAN",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_f... |
[STATEMENT]
lemma init_fin_lift_state_mbisimI:
"s \<approx>m s' \<Longrightarrow>
FWbisimulation_base.mbisim init_fin_bisim init_fin_bisim_wait (init_fin_lift_state Running s) (init_fin_lift_state Running s')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. s \<approx>m s' \<Longrightarrow> FWbisimulation_base.mb... | {
"alphanum_fraction": null,
"author": null,
"avg_line_length": null,
"converted": null,
"ext": null,
"file": "JinjaThreads_Framework_FWBisimLift",
"hexsha": null,
"include": null,
"lang": null,
"length": 12,
"llama_tokens": 3602,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks... |
// Copyright (c) 2006, 2007 Julio M. Merino Vidal
// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
// Copyright (c) 2009 Boris Schaeling
// Copyright (c) 2010 Felipe Tanus, Boris Schaeling
// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
// Copyright (c) 2016 Klemens D. Morgenstern
//
// Distributed un... | {
"alphanum_fraction": 0.7278314311,
"author": null,
"avg_line_length": 30.7837837838,
"converted": null,
"ext": "hpp",
"file": null,
"hexsha": "d2a9e9394cd3ca8f8c5d99414650e89d14c34c3f",
"include": null,
"lang": "C++",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.