text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
[STATEMENT]
lemma cosh_minus_sinh: "cosh x - sinh x = exp (-x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. cosh x - sinh x = exp (- x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. cosh x - sinh x = exp (- x)
[PROOF STEP]
have "cosh x - sinh x = (1 / 2) *\<^sub>R (exp (-x) + exp (-x))"
[... | {"llama_tokens": 697, "file": null, "length": 10} |
[STATEMENT]
lemma UNIV_ipv4addrset: "UNIV = {0 .. max_ipv4_addr}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. UNIV = {0..max_ipv4_addr}
[PROOF STEP]
(*not in the simp set, for a reason*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. UNIV = {0..max_ipv4_addr}
[PROOF STEP]
by(simp add: max_ipv4_addr_max_word) f... | {"llama_tokens": 154, "file": "IP_Addresses_IPv4", "length": 2} |
export triu, triu!
import LinearAlgebra: triu, triu!
function triu!(A::AbstractMPIArray{T}, k::Integer=0) where T
zero_ = zero(T)
forlocalpart!(A) do lA
gi, gj = localindices(A)
for (i, gi) in enumerate(gi)
for (j, gj) in enumerate(gj)
if gj < gi + k
... | {"hexsha": "fd1806b118af80b639432196048f59418dcf416b", "size": 525, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/linalg.jl", "max_stars_repo_name": "Soyukke/MPIArrays.jl", "max_stars_repo_head_hexsha": "2a309c8a81f05e14dcd1b555d830abf98121da0a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | {"hexsha": "c73e820c19ad695512cd09fced582a7bbdab9894", "size": 3369, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/extension/tests/test_ext.py", "max_stars_repo_name": "janifer112x/incubator-tvm", "max_stars_repo_head_hexsha": "98c2096f4944bdbdbbb2b7b20ccd35c6c11dfbf6", "max_stars_repo_licenses": ["Apache... |
from pathlib import Path
import numpy as np
from pyhdx import PeptideMasterTable, read_dynamx, KineticsSeries
current_dir = Path(__file__).parent
np.random.seed(43)
fpath = current_dir.parent / 'tests' / 'test_data' / 'ecSecB_apo.csv'
data = read_dynamx(fpath)
pmt = PeptideMasterTable(data, drop_first=1, ignore_prol... | {"hexsha": "c74753fd225325fe6a37af8656ae00fbdf4002ca", "size": 906, "ext": "py", "lang": "Python", "max_stars_repo_path": "templates/load_secb_data_template.py", "max_stars_repo_name": "sebaztiano/PyHDX", "max_stars_repo_head_hexsha": "12fc2b5f67200885706226823bd8e1f46e3b5db1", "max_stars_repo_licenses": ["MIT"], "max_... |
import sys
import os
from pathlib import Path
import logging
import time
from typing import List, Union, Dict, Tuple, Any
from collections import OrderedDict
import numpy as np
import pandas as pd
import mxnet as mx
from gluonts.model.n_beats import NBEATSEnsembleEstimator
from gluonts.trainer import Trainer
from d3m.... | {"hexsha": "e6ed4c92bc994249ea8a72234ddc1c2baaa95802", "size": 23577, "ext": "py", "lang": "Python", "max_stars_repo_path": "kf_d3m_primitives/ts_forecasting/nbeats/nbeats.py", "max_stars_repo_name": "cdbethune/d3m-primitives", "max_stars_repo_head_hexsha": "5530da1b8efba7de8cec6890401c5d4091acd45a", "max_stars_repo_li... |
import os
import numpy
from PIL import Image
import torch
from torch.utils.data.dataset import Dataset
class WheatDataset(Dataset):
def __init__(self, df, config, tile_mode: int = 0, rand: bool = False, resize_transform: callable = None,
transform: callable = None):
self.df = df.reset_in... | {"hexsha": "e73bff97702d08df806d1c5a9b8addcc965362d2", "size": 1608, "ext": "py", "lang": "Python", "max_stars_repo_path": "Image Classification/CGIAR Wheat Growth Stage Challenge/Nuno/competition_CGIAR_user_ngcferreira_3rd_place/wheat_dataset.py", "max_stars_repo_name": "ZindiAfrica/Computer-Vision", "max_stars_repo_h... |
! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! Copyright (c) 2016, Regents of the University of Colorado
! All rights reserved.
!
! Redistribution and use in source and binary forms, with or without modification, are
! permitted provided that the following conditions are m... | {"hexsha": "de2d8dad225d9a9793194a4cb1dfca806951bea9", "size": 24350, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "components/eam/src/physics/cosp2/external/driver/src/cosp1_test.f90", "max_stars_repo_name": "meng630/GMD_E3SM_SCM", "max_stars_repo_head_hexsha": "990f84598b79f9b4763c3a825a7d25f4e0f5a565", "m... |
function [view, mapvol, covol] = polarAngleMap(view, dt, scans, params, legend, W);
%
% [view, map, co] = polarAngleMap(view, <dt, scans, params>, <legend>, <W>);
%
% AUTHOR: rory
% PURPOSE:
% Given corAnal data for a polar angle ("meridian")-mapping experiment
% (single scan or set of scans), produce a parameter map o... | {"author": "vistalab", "repo": "vistasoft", "sha": "7f0102c696c091c858233340cc7e1ab02f064d4c", "save_path": "github-repos/MATLAB/vistalab-vistasoft", "path": "github-repos/MATLAB/vistalab-vistasoft/vistasoft-7f0102c696c091c858233340cc7e1ab02f064d4c/mrBOLD/Analysis/VisualField/polarAngleMap.m"} |
#include "TrICP.h"
#include <Eigen/LU>
#include <Eigen/SVD>
using namespace navtypes;
struct PointPair // NOLINT(cppcoreguidelines-pro-type-member-init)
{
point_t mapPoint;
point_t samplePoint;
double dist;
};
void heapify(PointPair arr[], int len, int i) {
int smallest = i;
int l = 2 * i + 1;
int r = 2 * i +... | {"hexsha": "04d046fef742144d36e251ddc1d23dbc6363d56e", "size": 4214, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/worldmap/TrICP.cpp", "max_stars_repo_name": "huskyroboticsteam/Resurgence", "max_stars_repo_head_hexsha": "649f78103b6d76709fdf55bb38d08c0ff50da140", "max_stars_repo_licenses": ["Apache-2.0"], "... |
module probdata_module
! make the model name enter through the probin file
use amrex_fort_module, only : rt => amrex_real
character (len=80), save :: model_name
! arrange storage for read_in model-- not worrying about efficiency,
! since this will only be called once
real(rt) , allocatable, save :... | {"hexsha": "1dbfa486074aa067d507fdddeaa5e9b23999c554", "size": 1019, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Exec/gravity_tests/hydrostatic_adjust/probdata.f90", "max_stars_repo_name": "taehoryu/Castro", "max_stars_repo_head_hexsha": "223c72c993343ba5df84613d058ffb0767c2a7c9", "max_stars_repo_licenses"... |
import numpy as np
import scipy.special
from .base_signal import BaseSignal
__all__ = ['GaussianProcess']
class GaussianProcess(BaseSignal):
"""Gaussian Process time series sampler
Samples time series from Gaussian Process with selected covariance function (kernel).
Parameters
----------
ke... | {"hexsha": "5b64a6a38a2ff7cad0ac88cfb47d8a234db8ebe3", "size": 4007, "ext": "py", "lang": "Python", "max_stars_repo_path": "timesynth/signals/gaussian_process.py", "max_stars_repo_name": "swight-prc/TimeSynth", "max_stars_repo_head_hexsha": "9b10a276e90fee145c9f69c15195d028c78214bf", "max_stars_repo_licenses": ["MIT"],... |
/* Copyright 2003-2008 Joaquin M Lopez Munoz.
* 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)
*
* See http://www.boost.org/libs/multi_index for library home page.
*/
#ifndef BOOST_MULTI_INDEX_DETAIL_UINTPTR_T... | {"hexsha": "4fbbeccc95c01220087f5d8d8f5c99471923c575", "size": 2432, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src-2007/public/python/boost/multi_index/detail/uintptr_type.hpp", "max_stars_repo_name": "KyleGospo/City-17-Episode-One-Source", "max_stars_repo_head_hexsha": "2bc0bb56a2e0a63d963755e2831c15f2970c3... |
import networkx as nx
untypedkami = nx.DiGraph()
untypedkami.add_nodes_from(
[
"agent",
"region",
"residue",
"locus",
"state",
"mod",
"syn",
"deg",
"bnd",
"brk",
"is_bnd",
"is_free",
]
)
untypedkami.add_edges_from(... | {"hexsha": "5e3cd8eb30e1971790b142fe244c4a9c644fd5ba", "size": 1477, "ext": "py", "lang": "Python", "max_stars_repo_path": "server/kami/metamodels.py", "max_stars_repo_name": "Xogiga/KAMIStudio", "max_stars_repo_head_hexsha": "bdaebc3def154d22292cd2753391a9523f8a42d2", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import os
from typing import List
import numpy as np
from pydrake.math import RollPitchYaw
from pydrake.all import (PiecewisePolynomial, RigidTransform)
from qsim.simulator import (
QuasistaticSimParameters)
from robotics_utilities.iiwa_controller.utils import (
create_iiwa_controller_plant)
from qsim.model_p... | {"hexsha": "97d036ee47d96ff90b1e41293d346e77f70ac338", "size": 3741, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/iiwa_block_stacking/simulation_parameters.py", "max_stars_repo_name": "pangtao22/quasistatic_simulator", "max_stars_repo_head_hexsha": "7c6f99cc7237dd922f6eb0b54c580303e86b5223", "max_sta... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2017 nicolas <nicolas@laptop>
#
# Distributed under terms of the MIT license.
"""
Support Vector Machine
======================
Cost function plots.
"""
import matplotlib.pyplot as plt
from math import log, exp
X = []
y = []
for z in range(-5, 6):
y.... | {"hexsha": "0acbd4cb6916df2003e8e826c56c9f829807985c", "size": 657, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/some_plots.py", "max_stars_repo_name": "ng-nicolas/ml-small-projects", "max_stars_repo_head_hexsha": "92775fbee220f1e83d9891749c158a93aafc19ee", "max_stars_repo_licenses": ["MIT"], "max_s... |
program autobk
c
c autobk version 2.92b 07-Dec-2000
c
c author Matthew Newville, The University of Chicago
c e-mail newville@cars.uchicago.edu
c post GSECARS, Bldg 434A
c APS, Argonne National Laboratory
c Argonne, IL 64309 USA
c voice (630) 252-0431
c fax (630) 252-... | {"hexsha": "f17c54da626eb23f24272453a07499929e5fff90", "size": 3301, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/autobk/autobk.f", "max_stars_repo_name": "keechul/ifeffit", "max_stars_repo_head_hexsha": "306444e500cb3ecb1795fcbde9219369b003f1fa", "max_stars_repo_licenses": ["Naumen", "Condor-1.1", "MS-PL... |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% == AIT CSIM Handout LaTeX Template ==
% == Credit ==
% Assoc. Prof. Matthew N. Dailey
% Computer Science and Information Management
% Asian Insitute of Technology
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{a4,url,upquot... | {"hexsha": "3de86baed48db5bcbb803da90c8296d51dc216ec", "size": 2598, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "handout.tex", "max_stars_repo_name": "aitcsim/ait-handout-latex-template", "max_stars_repo_head_hexsha": "8c0088644ac497114e4b8c8dd71db53891a15698", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import numpy as np
import tensorflow as tf
from tensorflow.keras.layers import Dense
from tf2rl.algos.gail import GAIL
from tf2rl.algos.policy_base import IRLPolicy
from tf2rl.networks.spectral_norm_dense import SNDense
class Discriminator(tf.keras.Model):
LOG_SIG_CAP_MAX = 2 # np.e**2 = 7.389
LOG_SIG_CAP_M... | {"hexsha": "18888b8db23ccb42d571dc875c3ca719e169cf4f", "size": 6766, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf2rl/algos/vail.py", "max_stars_repo_name": "yamada-github-account/tf2rl", "max_stars_repo_head_hexsha": "b380c9d7de8b07c3f263b4637b13c0787c42eeac", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# Split Monopole `GiRaFFEfood` Initial Data for `GiRaFFE`
## Author: Patrick Nelson
### NRPy+ Source Code for this module: [GiRaFFEfood_NRPy/GiRaFFEfood_NRPy_Split_Monopole.py](../../edit/in_progress/GiRaFFEfood_NRPy/GiRaFFEfood_NRPy_Split_Monopole.py)
**Notebook Status:** <font color='green'><b> In-Progress </b>... | {"hexsha": "dd0425576f21ff4cd711406b5cb51a22005af2be", "size": 23499, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "in_progress/Tutorial-GiRaFFEfood_NRPy-Split_Monopole.ipynb", "max_stars_repo_name": "fedelopezar/nrpytutorial", "max_stars_repo_head_hexsha": "753acd954be4a2f99639c9f9fd5e623689fc749... |
import sys
import os
from PIL import Image
import numpy as np
import tensorflow as tf
import rospy
from geometry_msgs.msg import Twist
from sensor_msgs.msg import Image as sensor_image
from sensor_msgs.msg import Joy
import logging
import logging.handlers
from time import sleep
from random import uniform
from thread... | {"hexsha": "db88942246f4c36c5d47b37cf7d5e51c18e785a5", "size": 13654, "ext": "py", "lang": "Python", "max_stars_repo_path": "reinvent-2019/lego-ev3-raspberry-pi-robot/robomaker/robot_ws/src/turtlebot_controller/robomaker/inference_worker.py", "max_stars_repo_name": "kienpham2000/aws-builders-fair-projects", "max_stars_... |
# Convert a prolongation matrix P to a tentative operator S.
# P is piecewise constant over some number of aggregates.
# S has a n x n for each aggregate where n is the size of the aggregate.
using PETScBinaryIO
P = readPETSc(ARGS[1])
rows = rowvals(P)
m, n = size(P)
is = Vector{Int}()
js = Vector{Int}()
ks = Vector... | {"hexsha": "895af5665a17df139cb0d2c5096caab4b46b921c", "size": 888, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/P_to_S.jl", "max_stars_repo_name": "ligmg/ligmg", "max_stars_repo_head_hexsha": "b0046cac6ee0aed044ef9b3e2ea091b3d44219ee", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": 8,... |
## DDPG model with actor-critic framework
import numpy as np
import random
import tensorflow as tf
from tensorflow.python.framework import ops
import keras.backend as K
from keras import Sequential
from keras.layers import Dense, Dropout
class Actor():
'''
Policy function approximator
'''
de... | {"hexsha": "89d6b41c41760de054e265607977e3e5dfdd9f2c", "size": 15835, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/model.py", "max_stars_repo_name": "paige-chang/Personalized-Music-Recommendation", "max_stars_repo_head_hexsha": "bfe8381b5a84e7bb0460cbbceb60b3f4514da226", "max_stars_repo_licenses": ["MIT"]... |
from __future__ import division
from __future__ import print_function
import time
import argparse
import numpy as np
import torch
import torch.nn.functional as F
import torch.optim as optim
from utils import load_data,accuracy
from model import GCN
# Training settings
np.random.seed(42)
torch.manual_seed(42)
torc... | {"hexsha": "172989e43fc78f5762d4c329673e0ce4142e0579", "size": 2382, "ext": "py", "lang": "Python", "max_stars_repo_path": "Pytorch_geo/main.py", "max_stars_repo_name": "dariush-salami/gcn-gesture-recognition", "max_stars_repo_head_hexsha": "c75c29da0327c43d8601da43a20e1044e2cff139", "max_stars_repo_licenses": ["MIT"],... |
theory OneThirdRuleDefs
imports "../HOModel"
begin
section {* Verification of the \emph{One-Third Rule} Consensus Algorithm *}
text {*
We now apply the framework introduced so far to the verification of
concrete algorithms, starting with algorithm \emph{One-Third Rule},
which is one of the simplest algorithms p... | {"author": "Josh-Tilles", "repo": "AFP", "sha": "f4bf1d502bde2a3469d482b62c531f1c3af3e881", "save_path": "github-repos/isabelle/Josh-Tilles-AFP", "path": "github-repos/isabelle/Josh-Tilles-AFP/AFP-f4bf1d502bde2a3469d482b62c531f1c3af3e881/thys/Heard_Of/otr/OneThirdRuleDefs.thy"} |
function [configure, obj] = Estimate_Weight(configure, Seqs)
% initialization
configure.weight = rand(length(configure.id),1);
tau = configure.tau;
obj = zeros(configure.epoch * length(Seqs), 1);
tic
for n = 1:configure.epoch
ind = randperm(length(Seqs));
lr = configure.lr * (0.9)^(n-1);
for m = 1:length... | {"author": "HongtengXu", "repo": "Hawkes-Process-Toolkit", "sha": "2548a41c7418b8edef3261ab4479cee4e8eaf071", "save_path": "github-repos/MATLAB/HongtengXu-Hawkes-Process-Toolkit", "path": "github-repos/MATLAB/HongtengXu-Hawkes-Process-Toolkit/Hawkes-Process-Toolkit-2548a41c7418b8edef3261ab4479cee4e8eaf071/Analysis/Esti... |
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 23 07:15:09 2018
@author: Madhur Kashyap 2016EEZ8350
"""
import os
import math
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from Utils import *
def init_sns_style(style='white'):
sns.set_style('white')
def new_figu... | {"hexsha": "8e628f5167e31c169ac4cc191a707dda8aa8e867", "size": 2070, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/PlotUtils.py", "max_stars_repo_name": "madhurkashyap/boundary_detection", "max_stars_repo_head_hexsha": "f7fb98c8bcbc204b1fcd0eb34a8699f16a8725a3", "max_stars_repo_licenses": ["MIT"], "max_st... |
[STATEMENT]
lemma lit_ord_dominating_term:
assumes "(s1,s2) \<in> trm_ord \<or> (s1,t2) \<in> trm_ord"
assumes "orient_lit x1 s1 t1 p1"
assumes "orient_lit x2 s2 t2 p2"
assumes "vars_of_lit x1 = {}"
assumes "vars_of_lit x2 = {}"
shows "(x1,x2) \<in> lit_ord"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1.... | {"llama_tokens": 18453, "file": "SuperCalc_superposition", "length": 166} |
import numpy as np
import pandas as pd
import networkx as nx
import scipy as cp
import sys; sys.path.insert(1,'../')
#import sys; sys.path.insert(1, 'C:/Users/hbass/Desktop/fca/FCA-ML/')
from firefly import *
from kuramoto import *
from scipy.sparse import csr_matrix
from math import floor
from scipy.sparse.csgraph i... | {"hexsha": "b222c094e9210c0f9dee3b844c3c8cc6f95eaa86", "size": 4622, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulation-data/LRCN-datagen/DeltaKM.py", "max_stars_repo_name": "richpaulyim/L2PSync", "max_stars_repo_head_hexsha": "81138245c1b50584476be83722ee1044ef023ce6", "max_stars_repo_licenses": ["MIT"]... |
(* Title: Sigma/Typed_Sigma.thy
Author: Florian Kammuller and Henry Sudhof, 2006
*)
header {* First Order Types for Sigma terms *}
theory TypedSigma imports "../preliminary/Environments" Sigma begin
subsubsection {* Types and typing rules *}
text{* The inductive definition of the typing relation.*}
de... | {"author": "Josh-Tilles", "repo": "AFP", "sha": "f4bf1d502bde2a3469d482b62c531f1c3af3e881", "save_path": "github-repos/isabelle/Josh-Tilles-AFP", "path": "github-repos/isabelle/Josh-Tilles-AFP/AFP-f4bf1d502bde2a3469d482b62c531f1c3af3e881/thys/Locally-Nameless-Sigma/Sigma/TypedSigma.thy"} |
import numpy as np
import pandas as pd
import torch
from torch.optim import Adam
from torch import nn
import pytorch_lightning as pl
import torch.nn.functional as F
import spacy
from torch.utils.data import Dataset
from torch.nn.utils.rnn import pad_sequence
from transformers import PretrainedConfig, PreTrainedModel
f... | {"hexsha": "f38f484ebb7e61c82206bbc009fdd3d28a113906", "size": 5340, "ext": "py", "lang": "Python", "max_stars_repo_path": "kogito/core/processors/models/swem.py", "max_stars_repo_name": "mismayil/kogito", "max_stars_repo_head_hexsha": "e62b010d6787ddae0035ed2bc596619ec31fd6b9", "max_stars_repo_licenses": ["Apache-2.0"... |
# get nse daily bhav
# https://www1.nseindia.com/content/historical/EQUITIES/2020/JUN/cm12JUN2020bhav.csv.zip
from datetime import datetime, timedelta
from time import sleep
from typing import Optional
import requests
import os
from pathlib import Path
from fake_useragent import UserAgent
from numpy import random
from ... | {"hexsha": "cf6f4c98cca347f1d1344ebcdea6cf7f98d46478", "size": 7609, "ext": "py", "lang": "Python", "max_stars_repo_path": "nse_daily/nse/__init__.py", "max_stars_repo_name": "v33rh0ra/get_nse_daily", "max_stars_repo_head_hexsha": "c20362c149766116e52d85987f27c3d988af4965", "max_stars_repo_licenses": ["MIT"], "max_star... |
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
# Copyright (c) 2013-2014, 2017 ARM Limited
# All rights reserved
# Authors: Matteo Andreozzi
# Riken Gohil
#
# This script is used to parse m3i ASCII traces containing AXI transactions
# and profile them by usi... | {"hexsha": "cc41c3469f86f168dfa8ed766bfb35020367ced3", "size": 17431, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/analyzer.py", "max_stars_repo_name": "wwmfdb/ATP-Engine", "max_stars_repo_head_hexsha": "00eaf0f551907c9d6e2db446d5e78364364531d4", "max_stars_repo_licenses": ["BSD-3-Clause-Clear"], "max_s... |
from unittest import TestCase
from pysight.nd_hist_generator.movie import *
from pysight.nd_hist_generator.volume_gen import *
import pandas as pd
import numpy as np
def gen_data_df(frame_num=10, line_num=1000, end=100_000):
"""
Mock data for tests.
Returns:
df - The full DataFrame
frames ... | {"hexsha": "968814f924f2220fd20710bd3140d4dd7eca60d9", "size": 3774, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_movie.py", "max_stars_repo_name": "liorgolgher/python-pysight", "max_stars_repo_head_hexsha": "029634d328c18fde4fc4ed666980b2e537e18814", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_... |
# define test kernel
function test_kernel!(
b :: Matrix{Float64},
x :: Float64,
dx :: Float64
) :: Nothing
for i in eachindex(b)
b[i] += dx * x^i * exp(-x^2) * sin(2.0 * pi * x)
end
return nothing
end
# define benchmark kernel
function bench_kernel!(
b :: Matrix{Float64},
... | {"hexsha": "eb17b1042d19c92c07c74f76772fca21366672a8", "size": 1475, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Flow/test.jl", "max_stars_repo_name": "dominikkiese/PFFRGSolver.jl", "max_stars_repo_head_hexsha": "13bafa3afb83cfc4305aa4cf3edb9fc5fb9849cd", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import cv2
import time
import numpy as np
import pandas as pd
import mediapipe as mp
import plotly.express as px
import plotly.graph_objects as go
class poseDetector:
def __init__(
self,
mode=False,
complex=1,
smooth_landmarks=True,
segmentation=True,
smooth_segmenta... | {"hexsha": "31a0da6326b13ebdbc5ff4fe03a661e0db84c628", "size": 7918, "ext": "py", "lang": "Python", "max_stars_repo_path": "track_2_openCV/pose_angle.py", "max_stars_repo_name": "Batlytics/Batlytics", "max_stars_repo_head_hexsha": "3766e9f847b58a533fc09ee196fb59c075b8842a", "max_stars_repo_licenses": ["MIT"], "max_star... |
module actual_burner_module
use eos_type_module
contains
subroutine actual_burner_init()
use amrex_fort_module, only : rt => amrex_real
implicit none
! Do nothing in this burner.
end subroutine actual_burner_init
subroutine actual_burner(state_in, state_out, dt, time)
use amrex_fort_mo... | {"hexsha": "7ea9cf2e038aa0e13d53b4b6abe289f75981d37a", "size": 608, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "networks/breakout/actual_burner.f90", "max_stars_repo_name": "doreenfan/Microphysics", "max_stars_repo_head_hexsha": "bbfabaae0a98af32dbf353a7747a8ca787710ac6", "max_stars_repo_licenses": ["BSD-3... |
import unittest
import nose.tools
import numpy as np
from scipy.spatial import distance_matrix
from tspsolver.tsp_generator import TSPGenerator
from ..population_generation import SimplePopulationGenerator
from ..mutation import (SwapCityMutation, DisplacementMutation,
InversionMutation, Insert... | {"hexsha": "9290bc4c51d4adfeb3e35f4fa6da7942ab6ab775", "size": 3723, "ext": "py", "lang": "Python", "max_stars_repo_path": "tspsolver/ga/test/mutation_test.py", "max_stars_repo_name": "samueljackson92/tsp-solver", "max_stars_repo_head_hexsha": "4f6403b40c7ba9062a9b7ffdde5e7d594163bc2f", "max_stars_repo_licenses": ["MIT... |
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import sys
from collections import defaultdict
import numpy as np
import pandas as pd
from sklearn import linear_model, preprocessing, cluster, metrics, svm, model_se... | {"hexsha": "723789477fe8937c259cfec264b25ad8a956bfcd", "size": 4743, "ext": "py", "lang": "Python", "max_stars_repo_path": "defense_testers.py", "max_stars_repo_name": "iamgroot42/data-poisoning-release", "max_stars_repo_head_hexsha": "fef371060878b7524af9b31225d3144d268b98b3", "max_stars_repo_licenses": ["MIT"], "max_... |
[STATEMENT]
lemma L_transform_Tree\<^sub>\<alpha>_preserves_hereditarily_fs:
assumes "hereditarily_fs t\<^sub>\<alpha>"
shows "Formula.hereditarily_fs (L_transform_Tree\<^sub>\<alpha> t\<^sub>\<alpha>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Formula.hereditarily_fs (L_transform_Tree\<^sub>\<alpha> t\<^su... | {"llama_tokens": 4510, "file": "Modal_Logics_for_NTS_L_Transform", "length": 22} |
# To view in browser start a server in the build dir:
# python -m http.server --bind localhost
using Documenter
using QuasinormalModes
makedocs(sitename = "QuasinormalModes.jl",
modules = [QuasinormalModes],
pages = [
"index.md",
"intro.md",
"org.md",
"schw.md",
"sho.md... | {"hexsha": "7603d2ccbb6bbcc1fd5735dc64b574008d9c7a8b", "size": 432, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "eschnett/QuasinormalModes.jl", "max_stars_repo_head_hexsha": "7ec50c3f565f6cda7501baa0bc589e445873a06e", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
from os import write
import numpy as np
import os.path as osp
import struct
from typing import List
from pandas.core.indexing import need_slice
from .block import Block
def __write_plot3D_block_binary(f,B:Block):
"""Write binary plot3D block which contains X,Y,Z
default format is Big-Endian
Args:
... | {"hexsha": "5dd06b12992488ef05925ce3026b6ce179212d3f", "size": 2604, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/plot3d/write.py", "max_stars_repo_name": "ckeokot/Plot3D_utilities", "max_stars_repo_head_hexsha": "7bba70aeb48d8577ff582e999e8ce186c68d0189", "max_stars_repo_licenses": ["MIT"], "max_stars... |
from pathlib import Path
import json
import re
import numpy as np
import os
from collections import OrderedDict
from .TxtMpiFile import TxtMpiFile
from .BaseSource import BaseSource
from tweezers.meta import MetaDict, UnitDict
class TxtMpiSource(BaseSource):
"""
Data source for \*.txt files from the MPI with... | {"hexsha": "d6ca0b78e18a4bf98def2fc3af39ef75294bf852", "size": 14129, "ext": "py", "lang": "Python", "max_stars_repo_path": "tweezers/io/TxtMpiSource.py", "max_stars_repo_name": "DollSimon/tweezers", "max_stars_repo_head_hexsha": "7c9b3d781c53f7728526a8242aa9e1d671f15688", "max_stars_repo_licenses": ["BSD-2-Clause"], "... |
!***********************************************************************
! *
SUBROUTINE ENGOUT1(EAV, E, JTOT, IPAR, ILEV, NN, MODE, K)
! *
! This subroutine prints energy l... | {"hexsha": "a4ea98b948c5f2be02e34d965b99dd63596af770", "size": 2940, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/appl/rtransition90_mpi/engout1.f90", "max_stars_repo_name": "sylas/grasp-continuum", "max_stars_repo_head_hexsha": "f5e2fb18bb2bca4f715072190bf455fba889320f", "max_stars_repo_licenses": ["MI... |
import numpy as np
import torch
# Parameters
_dt = 0.05
_max_a = 5.0
# Note: Because the system is relatively simple,
# we can manually compute the region of attraction
# (RoA) for the bicycle. In particular, the LQR
# brings the bicycle to a stop as quickly as possible,
# within the acceleration bounds. Thus, a poin... | {"hexsha": "0c2a08e0251755f2e28845f5cf13972ad18697a6", "size": 12179, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/spire/env/bicycle.py", "max_stars_repo_name": "obastani/model-predictive-shielding", "max_stars_repo_head_hexsha": "8d74b38f809ea39ea54dfa028d9498767a6f8650", "max_stars_repo_licenses": ["... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from argparse import ArgumentParser
from os.path import expandvars
usage = "usage: %prog [options] inputfile"
parser = ArgumentParser(usage)
parser.add_argument("-n", "--numevents", type=int, default=1,
dest="NUMEVE... | {"hexsha": "be75ad90fdac636917192147d86c96d07c6500d9", "size": 14888, "ext": "py", "lang": "Python", "max_stars_repo_path": "clsim/resources/scripts/benchmark.py", "max_stars_repo_name": "hschwane/offline_production", "max_stars_repo_head_hexsha": "e14a6493782f613b8bbe64217559765d5213dc1e", "max_stars_repo_licenses": [... |
Load LFindLoad.
From lfind Require Import LFind.
From QuickChick Require Import QuickChick.
From adtind Require Import goal33.
Derive Show for natural.
Derive Arbitrary for natural.
Instance Dec_Eq_natural : Dec_Eq natural.
Proof. dec_eq. Qed.
Lemma conj12eqsynthconj3 : fo... | {"author": "yalhessi", "repo": "lemmaranker", "sha": "53bc2ad63ad7faba0d7fc9af4e1e34216173574a", "save_path": "github-repos/coq/yalhessi-lemmaranker", "path": "github-repos/coq/yalhessi-lemmaranker/lemmaranker-53bc2ad63ad7faba0d7fc9af4e1e34216173574a/benchmark/clam/_lfind_clam_lf_goal33_distrib_100_plus_assoc/lfindconj... |
# -*- coding: utf-8 -*-
from __future__ import print_function
try:
import cPickle as pickle
except:
import pickle
# Python 3 support
try:
from Tkinter import *
import tkMessageBox
import tkFont
except ImportError:
from tkinter import *
from tkinter import font, messagebox
import healpy ... | {"hexsha": "5d0329c243fdfd6345e130d21ff3c1a905e88a30", "size": 3380, "ext": "py", "lang": "Python", "max_stars_repo_path": "load_skymap.py", "max_stars_repo_name": "ggreco77/test_3", "max_stars_repo_head_hexsha": "02f4ae877beb3b173454b6d97abe90e08747c042", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":... |
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# formats: py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.10.3
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# +
im... | {"hexsha": "d4fc32e56de40c6f2b91e24956a197232469771f", "size": 1557, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/db_emt_line_core.py", "max_stars_repo_name": "jmmauricio/e-dashboards", "max_stars_repo_head_hexsha": "c993a2aa7b665d68e2af6ce76cb4556ff8a85f52", "max_stars_repo_licenses": ["MIT"], "max_star... |
"""
High-level functions used across the CAP-Toolkit package.
"""
import h5py
import numpy as np
import pyproj
import xarray as xr
import pandas as pd
from scipy.spatial import cKDTree
from scipy.spatial.distance import cdist
from scipy import stats
from scipy.ndimage import map_coordinates
from gdalconst import *
fro... | {"hexsha": "45fa2084277b9231239d0e1ee11434dcc52f3e48", "size": 19235, "ext": "py", "lang": "Python", "max_stars_repo_path": "captoolkit/utils.py", "max_stars_repo_name": "tsutterley/captoolkit", "max_stars_repo_head_hexsha": "314c4d34f49012c25286478c943b0ab13c893c62", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
module Idris.IDEMode.Commands
import Core.Core
import Core.Context
import Core.Context.Log
import Core.Name
import public Idris.REPL.Opts
import Libraries.Utils.Hex
import System.File
%default total
public export
data SExp = SExpList (List SExp)
| StringAtom String
| BoolAtom Bool
| In... | {"hexsha": "93ff3926ef2f5741faabd0fd8103b13865725587", "size": 12053, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "src/Idris/IDEMode/Commands.idr", "max_stars_repo_name": "ska80/idris-jvm", "max_stars_repo_head_hexsha": "66223d026d034578876b325e9fcd95874faa6052", "max_stars_repo_licenses": ["BSD-3-Clause"], "... |
"""
Routines for astronomical related calculation.
"""
import datetime
import numpy as np
import astropy.units as u
def beam_area(*args):
"""
Calculate the Gaussian beam area.
Parameters
----------
args: float
Beam widths.
If args is a single argument, a symmetrical beam is ass... | {"hexsha": "e4eed16c02856c9d0a0f402075bac3c9145f75c0", "size": 3165, "ext": "py", "lang": "Python", "max_stars_repo_path": "astro.py", "max_stars_repo_name": "piyanatk/simcube_tools", "max_stars_repo_head_hexsha": "e56b1cb4bc6cc84d2c5933d7c8871d7e6799be46", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
\section{Group Communication}
\label{Sec::Group}
\ba supports publish/subscribe-based group communication.
Actors can join and leave groups and send messages to groups.
\begin{lstlisting}
std::string group_module = ...;
std::string group_id = ...;
auto grp = group::get(group_module, group_id);
self->join(grp);
self->... | {"hexsha": "5df24de7a59ad2f261e8ca3159ffccf82b7ec06a", "size": 1934, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "manual/GroupCommunication.tex", "max_stars_repo_name": "syoummer/boost.actor", "max_stars_repo_head_hexsha": "58f35499bac8871b8f5b0b024246a467b63c6fb0", "max_stars_repo_licenses": ["BSL-1.0"], "max_... |
import pylab as plt
from scrawl.imagine import ImageDisplay
import numpy as np
data = np.random.random((100, 100))
ImageDisplay(data)
# TESTS:
# all zero data
# fig, ax = plt.subplots(1,1, figsize=(2.5, 10), tight_layout=True)
# ax.set_ylim(0, 250)
# sliders = AxesSliders(ax, 0.2, 0.7, slide_axis='y')
# sliders.conn... | {"hexsha": "2fa75de69fe1053d5506a0bb2e99d270a68e0303", "size": 339, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_imaging.py", "max_stars_repo_name": "astromancer/graphical", "max_stars_repo_head_hexsha": "2d72407c53967714953485dd52ad72e34e549ef5", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import numpy as np
from sklearn.metrics import mean_squared_error, r2_score
def int_diff(a):
"""
Make a new array of the same size, where each element is the
difference between the preceding element and the current element.
For example:
[0,0,1,1,1,0,0,0,2,3,-2,-3] -> [0,0,1,0,0,-1,0,0,2,1,-5,1]
... | {"hexsha": "5316969bdab0b4a43ab9b232d17c59434ae9666e", "size": 3054, "ext": "py", "lang": "Python", "max_stars_repo_path": "scorers.py", "max_stars_repo_name": "forforf/boolean-series-scorers", "max_stars_repo_head_hexsha": "6dfa6e5da414739c3ef9531e7fd4ed1e0ce8552f", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import sys
import time
from abc import ABC, abstractmethod
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import cm
from profilehooks import profile
import basis_forms
import quadrature
from basis_forms import BasisForm
from function_space import FunctionSpace
from helpers import unblockshaped
fro... | {"hexsha": "a4d1ccd93e44ca46a1e54da53f852f4f56d81ba3", "size": 26134, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/forms.py", "max_stars_repo_name": "Idate96/Mimetic-Fem", "max_stars_repo_head_hexsha": "75ad3b982ef7ed7c6198f526d19dc460dec28f4d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
# implementation of MLJ measure interface for LossFunctions.jl
# Supervised Loss -- measure traits
is_measure_type(::Type{<:SupervisedLoss}) = true
orientation(::Type{<:SupervisedLoss}) = :loss
reports_each_observation(::Type{<:SupervisedLoss}) = true
is_feature_dependent(::Type{<:SupervisedLoss... | {"hexsha": "1f4e373528ae6df4d44183413bbabc6eebb1c056", "size": 1739, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/measures/loss_functions_interface.jl", "max_stars_repo_name": "juliohm/MLJBase.jl", "max_stars_repo_head_hexsha": "2b8739834c869903bf304039931c74e03a5d41ab", "max_stars_repo_licenses": ["MIT"],... |
import numpy as np
# No other imports allowed!
class LeastSquaresLinearRegressor(object):
'''
Class providing a linear regression model
Fit by solving the "least squares" optimization.
Attributes
----------
* self.w_F : 1D array, size n_features (= F)
vector of weights for each featu... | {"hexsha": "45cab7e05278d413bc90907b3d57b294403a4131", "size": 1978, "ext": "py", "lang": "Python", "max_stars_repo_path": "hw1/LeastSquaresLinearRegression.py", "max_stars_repo_name": "tufts-ml-courses/comp135-19s-assignments", "max_stars_repo_head_hexsha": "d54f4356e022150d85cfa58ebbf8ccdf66e0f1a9", "max_stars_repo_l... |
from ionotomo.utils.gaussian_process import *
import numpy as np
def test_level2_solve():
np.random.seed(1234)
K1 = SquaredExponential(2,l=0.29,sigma=3.7)
#K1.fixed = 'l'
#K1.fixed = 'sigma'
K2 = Diagonal(2,sigma=1e-5)
K2.fixed = 'sigma'
K3 = RationalQuadratic(2,sigma=1.)
K4 = MaternPIs... | {"hexsha": "bf0c3c8d146125ca94ea578d946f14250168cd2b", "size": 1976, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ionotomo/tests/test_gaussian_process.py", "max_stars_repo_name": "Joshuaalbert/IonoTomo", "max_stars_repo_head_hexsha": "9f50fbac698d43a824dd098d76dce93504c7b879", "max_stars_repo_licenses": [... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Astronomical and physics constants for Astropy v4.0.
See :mod:`astropy.constants` for a complete listing of constants defined
in Astropy.
"""
import warnings
from astropy.utils import find_current_module
from . import codata2018, iau2015
from . impor... | {"hexsha": "20b43259bbdc48320af8e84fd614a8148810e97c", "size": 1864, "ext": "py", "lang": "Python", "max_stars_repo_path": "astropy/constants/astropyconst40.py", "max_stars_repo_name": "MatiasRepetto/astropy", "max_stars_repo_head_hexsha": "689f9d3b063145150149e592a879ee40af1fac06", "max_stars_repo_licenses": ["BSD-3-C... |
#!/usr/bin/python
import numpy as np
h2 = 1.0/2048
u = np.random.rand(2048,2048)
u[0,:]=0.0
u[:,0]=0.0
u[2047,:]=0.0
u[:,2047]=0.0
f = np.ndarray(shape=(2048,2048), dtype=float)
v = np.ndarray(shape=(2048,2048), dtype=float)
print u
print f
for iter in range(1,10):
for i in range (1,2046):
for j in range... | {"hexsha": "462390cac14f504630ed0c3218fdfbbfe058bed7", "size": 436, "ext": "py", "lang": "Python", "max_stars_repo_path": "comparepythoncfortran/jacobiRelax/jacobiRelax.py", "max_stars_repo_name": "frasanz/MultigridMethods", "max_stars_repo_head_hexsha": "1e582f6945edcf46583f840fef4a8dc88f001baa", "max_stars_repo_licen... |
# 08.Songbird_OTUs.r
# Figure 4, Figure 7, Figure S7, Figure S8, Table S10, Table S11
# Ref for Songbird: Morton, J. T. et al. Establishing microbial composition measurement standards with reference frames. Nat. Commun. 10, 2719 (2019).
# Ref for Qurro: Fedarko, M. W. et al. Visualizing ’omic feature rankings and log-r... | {"hexsha": "9a02233c01245e752a0c65dfe925c42354f41cb5", "size": 18158, "ext": "r", "lang": "R", "max_stars_repo_path": "08.Songbird_OTUs.r", "max_stars_repo_name": "LLNL/2022_PondB_microbiome", "max_stars_repo_head_hexsha": "d9aaade01033eea9f220e96521099fd881971c82", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta... |
#### created by Alessandro Bigiotti ####
import numpy as np
import matplotlib.pyplot as plt
import pickle
import math
import os
import tensorflow as tf
import keras as Ker
import keras.backend as Kback
import keras.optimizers as opt
import time as tm
import sklearn.metrics as metr
from keras.models import Sequential
... | {"hexsha": "736de7a006ffabdc9ba83ea6ade9d91a808cb664", "size": 10169, "ext": "py", "lang": "Python", "max_stars_repo_path": "MLP_Model_Training/keras_MLP_model.py", "max_stars_repo_name": "cony89/TimeSeriesForecast", "max_stars_repo_head_hexsha": "7cad74b7171540e7347836a40e9f7e62a0ae34b9", "max_stars_repo_licenses": ["... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from MDAnalysis.analysis import align
def _adjust_frame_range_for_slicing(fstart, fend, nframes):
if fend != -1:
fend+=1
if fend == (nframes-1) and fstart == (nframes-1):
... | {"hexsha": "bad30e8a3fe7ff6466690384bc9830b89d1086ba", "size": 10565, "ext": "py", "lang": "Python", "max_stars_repo_path": "pybilt/mda_tools/mda_distance.py", "max_stars_repo_name": "blakeaw/ORBILT", "max_stars_repo_head_hexsha": "ed402dd496534dccd00f3e75b57007d944c58c1d", "max_stars_repo_licenses": ["MIT"], "max_star... |
import csv
import pandas as pd
df= pd.read_csv('C:\\Users\\Admin\\Desktop\\BE Proj\\HighFrequency.txt')
print(df)
array= df._values
X =array[:,0:3838]
Y =array[:,3839]
#print(X)
#print(Y)
print('Loaded Data File')
print()
import random
import numpy as np
from sklearn import svm
MyList = np.random.randint(1700, size=... | {"hexsha": "81126efae6be352ffefa807fe9b5d6f3dea80194", "size": 955, "ext": "py", "lang": "Python", "max_stars_repo_path": "Other Models/svmfile.py", "max_stars_repo_name": "agarwalansh/Stlyometry-based-Authorship-Identification", "max_stars_repo_head_hexsha": "6e41bc6503f28dd8889b292de195cee4ced555af", "max_stars_repo_... |
/*! ------------------------------------------------------------------------- *
* \author Joey Dumont <joey.dumont@gmail.com> *
* \since 2018-07-24 *
* *
... | {"hexsha": "6ed301226fa6d6d4fa1a1c70e658ca2267b7e8c9", "size": 749, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "assets/posts/read-c-format-complex-numbers-with-numpy/complex_arma_data.cpp", "max_stars_repo_name": "joeydumont/joeydumont.github.io", "max_stars_repo_head_hexsha": "f62672427b265d87f754ac95ba54708d... |
#include <boost/algorithm/string/replace.hpp>
#include <iostream>
#include <string>
#include <vector>
#include "fcs-genome/common.h"
#include "fcs-genome/config.h"
#include "fcs-genome/workers/Mutect2FilterWorker.h"
namespace fcsgenome {
Mutect2FilterWorker::Mutect2FilterWorker(
std::vector<std::string> intv_pa... | {"hexsha": "685f9c40d7c76e0960d07ff0f79947cc30a509fa", "size": 2414, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/workers/Mutect2FilterWorker.cpp", "max_stars_repo_name": "FCS-holding/falcon-genome", "max_stars_repo_head_hexsha": "bbba762ec54139392be843e9edff21766d5d7f5b", "max_stars_repo_licenses": ["Apach... |
c----------------------------------------------------------
c tapering both end of input seismogram
c----------------------------------------------------------
subroutine taper(nb,ne,n,seis,ntapb,ntape,ss,ncorr)
implicit none
integer*4 nb,ne,n,ntapb,ntape,ncorr
real*4 seis(32768)
real*8... | {"hexsha": "9e26d080a536a7424b5767996b82b93ad9cf8380", "size": 1841, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/taper.f", "max_stars_repo_name": "hfmark/aftan", "max_stars_repo_head_hexsha": "ab1da97a3b2e332af81ed808bab919c6bf98071f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "max_stars_... |
"""Adds random forces to the base of Minitaur during the simulation steps."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirna... | {"hexsha": "6f54fe9e75b5a41743909ed4acfd41d16e5e9163", "size": 6543, "ext": "py", "lang": "Python", "max_stars_repo_path": "motion_imitation/envs/utilities/minitaur_push_randomizer.py", "max_stars_repo_name": "ywkim0606/fine-tuning-locomotion", "max_stars_repo_head_hexsha": "96d7c81458511c0a7a11b59cf8c2c3fb8df8a64b", "... |
from __future__ import print_function
import theano
import theano.tensor as T
import numpy as np
import os
import lasagne
from lasagne.layers import InputLayer
from lasagne.layers import DenseLayer
from lasagne.layers import ConcatLayer
from lasagne.layers import NonlinearityLayer
from lasagne.layers import GlobalPool... | {"hexsha": "6185c985823cbe9170b305ec6af59152e01d7377", "size": 20514, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/googlenet.py", "max_stars_repo_name": "Ignotus/kaggle-dsg-qualification", "max_stars_repo_head_hexsha": "109155f164811b8a601481dbb5eacbc0f9f9983b", "max_stars_repo_licenses": ["MIT"], "max... |
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | {"hexsha": "0ef7a1e939e0220a69d1c46ef7a530d9ffa54adc", "size": 42819, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/fluid/tests/unittests/fft/test_fft.py", "max_stars_repo_name": "2742195759/Paddle", "max_stars_repo_head_hexsha": "ce034db1834af85539b22ab68492df9972ff3e69", "max_stars_repo_license... |
[STATEMENT]
lemma INV_rule_from_inv_rule:
"\<lbrakk> init T \<subseteq> I; {I \<inter> reach T} (trans T) {> I} \<rbrakk>
\<Longrightarrow> reach T \<subseteq> I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>init T \<subseteq> I; {I \<inter> reach T} TS.trans T {> I}\<rbrakk> \<Longrightarrow> reach T... | {"llama_tokens": 161, "file": "Consensus_Refined_Refinement", "length": 1} |
[STATEMENT]
lemma mset_le_add_iff2:
"i \<le> (j::nat) \<Longrightarrow> (repeat_mset i u + m \<le> repeat_mset j u + n) = (m \<le> repeat_mset (j-i) u + n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. i \<le> j \<Longrightarrow> (repeat_mset i u + m \<le> repeat_mset j u + n) = (m \<le> repeat_mset (j - i) u + ... | {"llama_tokens": 846, "file": null, "length": 10} |
import config
import copy
import cv2
import importlib
import lipiodol_methods as lm
import niftiutils.masks as masks
import niftiutils.helper_fxns as hf
import niftiutils.transforms as tr
import niftiutils.registration as reg
import niftiutils.visualization as vis
import numpy as np
import random
import math
from math ... | {"hexsha": "814fa66e0112bd1f5f72ed41f82571d6f49546b8", "size": 10949, "ext": "py", "lang": "Python", "max_stars_repo_path": "lipiodol_vis.py", "max_stars_repo_name": "clintonjwang/lipiodol", "max_stars_repo_head_hexsha": "4952f56e7bda44135615c19bb982556be3767f94", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# -*- coding: utf-8 -*-
__version__ = '0.1.10'
try:
# This variable is injected in the __builtins__ by the build
# process. It is used to enable importing subpackages of bear when
# the binaries are not built
__BEAR_SETUP__
except NameError:
__BEAR_SETUP__ = False
if __BEAR_SETUP__:
import sy... | {"hexsha": "00e023f689e7b1f6839a71e7d3cd1bfedbd757e1", "size": 889, "ext": "py", "lang": "Python", "max_stars_repo_path": "bear/__init__.py", "max_stars_repo_name": "tgsmith61591/bear", "max_stars_repo_head_hexsha": "153fc6e8cb01427958a949eab0a270110d8044e1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m... |
[STATEMENT]
lemma phi0: "Phi 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<Phi> 0 = 0
[PROOF STEP]
unfolding Phi_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. E (map_pmf (\<phi> 0) (config'_rand BIT (fst BIT init \<bind> (\<lambda>is. return_pmf (init, is))) (take 0 qs))) = 0
[PROOF STEP]
by (simp ... | {"llama_tokens": 180, "file": "List_Update_BIT", "length": 2} |
# Convolutional Neural Network
from scipy.io import loadmat
import numpy as np
from keras.utils import plot_model
from keras.models import Model
from keras.layers import Input
from keras.layers import Dense, Flatten,Dropout
from keras.layers.convolutional import Conv2D
from keras.layers.pooling import MaxPooling2D
from... | {"hexsha": "67e3987216236c27b0fde7328ab7665dfa3eef65", "size": 7731, "ext": "py", "lang": "Python", "max_stars_repo_path": "final_yr_proj/ker_fnc.py", "max_stars_repo_name": "kauku123/Undergraduate_Fin_Proj_2018", "max_stars_repo_head_hexsha": "e635d03c05785ca898c7a6bc48261de81318be26", "max_stars_repo_licenses": ["Apa... |
! { dg-do compile }
! { dg-options "-fcoarray=single" }
!
! PR fortran/18918
!
! Was failing before as the "x%a()[]" was
! regarded as coindexed
subroutine test2()
type t
integer, allocatable :: a(:)[:]
end type t
type(t), SAVE :: x
allocate(x%a(1)[*])
end subroutine test2
module m
integer, allocatable... | {"hexsha": "637750a6121ec502bce8a7a729cf75e36943c040", "size": 432, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/coarray_19.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_licen... |
r"""Self attention block of the Perceiver model."""
from typing import Any, Optional
from functools import partial
import jax.numpy as jnp
from flax import linen as nn
from flax_extra import combinator as cb
from flax_extra.layer._feedforward import FeedForward, FeedForwardCt
from flax_extra.layer._attention import Se... | {"hexsha": "207621d39de0d356ae2870d4d07f2403b709c707", "size": 2608, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/flax_extra/model/perceiver/_self_attention_block.py", "max_stars_repo_name": "manifest/flax-extra", "max_stars_repo_head_hexsha": "e19de992c7acefefca9ed4c9f7ce3e092943363a", "max_stars_repo_li... |
import math
import random
import numpy as np
# helper function
def rand_tuple(lower, higher):
y = random.randint(lower, higher)
x = random.randint(lower, higher)
return (y,x)
# I reused most of my MDP code on grildworld from previous homeworks
class Gridworld:
name = "gridworld"
state_size_y = 5
... | {"hexsha": "4ea8d11c4f184475e641b0149fe5e9296c318452", "size": 5108, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/mdp.py", "max_stars_repo_name": "samkovaly/PolicyGradientsNumpy", "max_stars_repo_head_hexsha": "8048c828804b3c96669b6c0aa06f705e2c6df974", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
SUBROUTINE UpdateGhostLayerNCurvilinear(var,Sx,Sy,NNx,NNy,NNz,CompGrid,alpha,beta,GhostGridX,GhostGridY)
USE Precision
USE DataTypes
IMPLICIT NONE
TYPE (Level_def) :: CompGrid
INTEGER :: NNx, NNy, NNz, rank, alpha, beta, i,j,k, GhostGridX, GhostGridY, diffb
REAL(KIND=long), DIMENSION(NNx,NNy) :: var, Sx, Sy
REAL(KIND=l... | {"hexsha": "917f34167570ef456969780c4102bf798f7198ee", "size": 2388, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/functions/UpdateGhostLayerNCurvilinear.f90", "max_stars_repo_name": "apengsigkarup/OceanWave3D", "max_stars_repo_head_hexsha": "91979da3ede3215b2ae65bffab89b695ff17f112", "max_stars_repo_lic... |
import tensorflow as tf
import numpy as np
import mycommon as mc
class BAGRNN_Model:
def __init__(self,
bag_num = 50,
enc_dim = 256,
embed_dim = 200,
rel_dim = None,
cat_n = 5,
sent_len = 120,
wor... | {"hexsha": "b45e0f9d4b0ba076b8802af61f49735e0329703e", "size": 14477, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/bag_model.py", "max_stars_repo_name": "jxwuyi/AtNRE", "max_stars_repo_head_hexsha": "2fe1d95bc361645e9f8105e56e64786cae4ab040", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"... |
import numpy as np
import cv2
class BackSub:
def __init__(self, firstFrame):
# by default, uses only the first 200 frames
# to compute a background
self.avg_frames = 1
self.alpha = 1 / self.avg_frames
self.backGroundModel = firstFrame
self.counter = 0
def getFo... | {"hexsha": "b8d06e45ba28abcc2453a2e5745d446320545b20", "size": 2689, "ext": "py", "lang": "Python", "max_stars_repo_path": "background_subtraction.py", "max_stars_repo_name": "cynic64/theremin", "max_stars_repo_head_hexsha": "3e67285ea6d571e255ba3c61e0a34eac95dddd1a", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s... |
# -*- coding: utf-8 -*-
from os import cpu_count
import pytest
from pyleecan.Classes.InputCurrent import InputCurrent
from pyleecan.Classes.MagFEMM import MagFEMM
from pyleecan.Classes.MeshMat import MeshMat
from pyleecan.Classes.NodeMat import NodeMat
from pyleecan.Classes.CellMat import CellMat
from pyleecan.Classes.... | {"hexsha": "e8c8f7810d260db1b46140a8b923b8b78c975d24", "size": 3391, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tests/Plot/Magnetics/test_plot_contour.py", "max_stars_repo_name": "EmileDvs/pyleecan", "max_stars_repo_head_hexsha": "ad2f5f25c089a981f373557a198da51c62407928", "max_stars_repo_licenses": ["Apach... |
# Import pyNeuroChem
from __future__ import print_function
# Neuro Chem
from ase_interface import ANI
import pyNeuroChem as pync
import hdnntools as gt
import numpy as np
import matplotlib.pyplot as plt
import time as tm
from scipy import stats as st
import time
import hdnntools as hdt
from rdkit import Chem
from r... | {"hexsha": "1fb36ecff62b458d83b7be1ec9cc60d3f362456c", "size": 8636, "ext": "py", "lang": "Python", "max_stars_repo_path": "activelearning/chemsearch/ani-cross-valid-gdb-set.py", "max_stars_repo_name": "plin1112/ANI-Tools", "max_stars_repo_head_hexsha": "76280c918fc79fee8c266b8bc9ab57f86104ec99", "max_stars_repo_licens... |
(**********************************************************************************
* KSSem.v *
* Formalizing Domains, Ultrametric Spaces and Semantics of Programming Languages *
* Nick Benton, Lars Birkedal, Andrew Kennedy and Carsten Varming ... | {"author": "nbenton", "repo": "coqdomains", "sha": "1ae7ec4af95e4fa44d35d7a5b2452ad123b3a75d", "save_path": "github-repos/coq/nbenton-coqdomains", "path": "github-repos/coq/nbenton-coqdomains/coqdomains-1ae7ec4af95e4fa44d35d7a5b2452ad123b3a75d/src/KSSem.v"} |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Circle, PathPatch
from matplotlib.text import TextPath
from matplotlib.transforms import Affine2D
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
import mpl_toolkits.mplot3d.art3d as art3d
fig = plt.figure()
ax = fig... | {"hexsha": "df981a786ca9580ff22c9c4280fd0a33b453fa6a", "size": 1139, "ext": "py", "lang": "Python", "max_stars_repo_path": "plots/circle.py", "max_stars_repo_name": "folkertsman/Fourier-Fingerprint-Search", "max_stars_repo_head_hexsha": "40db8f6b07556677732f73ac5160d083e9bff422", "max_stars_repo_licenses": ["MIT"], "ma... |
import tensorflow as tf
import numpy as np
import input_data
a = tf.placeholder("float")
b = tf.placeholder("float")
y = tf.mul(a, b)
sess = tf.Session()
print "%f should equal 2.0" % sess.run(y, feed_dict={a: 1, b: 2})
print "%f should equal 9.0" % sess.run(y, feed_dict={a: 3, b: 3})
a = tf.placeholder("int32")
b = ... | {"hexsha": "cf37b3f4fdebc00d28dacb81c2bea9590c34d405", "size": 5688, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_tut/tensorflow_tutorial.py", "max_stars_repo_name": "yantraman/musings", "max_stars_repo_head_hexsha": "d1b7069ee740729c23c4ee4acbc08f706b0308b8", "max_stars_repo_licenses": ["Apache-2.... |
"""Module that defines common errors for parameter values."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from parameters.classifier import constants
def check_valid_value(value, name, valid_list):
"""Raises a ValueError exceptio... | {"hexsha": "c7f060c35f6ddb886f012303d06b4d6971da7a73", "size": 688, "ext": "py", "lang": "Python", "max_stars_repo_path": "parameters/classifier/errors.py", "max_stars_repo_name": "ReyesDeJong/AnomalyDetectionTransformations", "max_stars_repo_head_hexsha": "c60b1adaf0065b684d76ecacabed1eae39a4e3a9", "max_stars_repo_lic... |
import os
import numpy as np
import csv
import argparse
def extract_experiment_setting(experiment_name):
print('Passed in experiment_name is {}'.format(experiment_name), flush = True)
hyper_parameter_dict = {}
#hyperparameter to extract
C = experiment_name.split('C')[-1]
#record... | {"hexsha": "5dbe2f26f96fcafb274aebf12c2f2659630267d2", "size": 4122, "ext": "py", "lang": "Python", "max_stars_repo_path": "synthesizing_results/domain_adaptation/synthesize_hypersearch_LR_for_a_subject.py", "max_stars_repo_name": "tufts-ml/fNIRS-mental-workload-classifiers", "max_stars_repo_head_hexsha": "b5199d6184e6... |
function makespecops(ecut,Ω,basis)
if basis=="Hermite"
dim=length(Ω)
if dim==1
ωx = Ω[1]
e0 = 0.5*ωx
ecut < e0 && error("ecut must exceed the zero point energy.")
Mx,nx,en = nenergy(ecut,e0,ωx,basis)
P = en .< ecut
en = P.*en
ax = sqrt(1/ωx) #in dimensionless units
X,Px = ladderops(... | {"hexsha": "9cf1b127d1f726cf603a854fc36214b1589c796e", "size": 1278, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/makespecops.jl", "max_stars_repo_name": "AshtonSBradley/ProjectedGPE.jl", "max_stars_repo_head_hexsha": "16623c1e00bbbae73e7448bd9b38f5b7e97979e9", "max_stars_repo_licenses": ["MIT"], "max_star... |
import numpy as np
import abc
from precodita import Backend, Dispatchable
class ArrayLike(abc.ABC):
"""
Simple ABC to show off that it is possible to provide generic
implementations
"""
@classmethod
def __subclasshook__(cls, other):
if hasattr(other, "__array_function__"):
... | {"hexsha": "98984f83b6469a77e3427838d2ef6897d09b50b3", "size": 4535, "ext": "py", "lang": "Python", "max_stars_repo_path": "example.py", "max_stars_repo_name": "seberg/precodita", "max_stars_repo_head_hexsha": "b02ea2d6f859d705fa26f3124b2244f777bead6b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": nu... |
/*
* Copyright (C) 2021 FISCO BCOS.
* SPDX-License-Identifier: Apache-2.0
* 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
*
* Unl... | {"hexsha": "f779c9dadb095f7af5a44b39b5f87b7616b84ac8", "size": 7085, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "bcos-executor/src/dag/Abi.cpp", "max_stars_repo_name": "contropist/FISCO-BCOS", "max_stars_repo_head_hexsha": "1605c371448b410674559bb1c9e98bab722f036b", "max_stars_repo_licenses": ["Apache-2.0"], "... |
from common.vec_env.vec_logger import VecLogger
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
GAMMA = 0.99
TAU = 1.00
N_STEPS = 5
CLIP_GRAD = 50
COEF_VALUE = 0.5
COEF_ENTROPY = 0.01
def train(args, venv, model, path, device):
N = args.num_pr... | {"hexsha": "0e670d751ab0559d5023f87c52f7debdeed88251", "size": 3478, "ext": "py", "lang": "Python", "max_stars_repo_path": "a2c/train.py", "max_stars_repo_name": "liuyuezhangadam/pyrl", "max_stars_repo_head_hexsha": "e6fe907b39315be80ccd7133e9bf3b18a71b01e0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"... |
import os
import tensorflow as tf
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from matplotlib import image as mpimg
import random
class DataGenerator:
def __init__(self, config):
self.config = config
path = self.config.test_data_path
self.y_... | {"hexsha": "6194411e5d9dfe9d965a543a1c4833023f2bbb36", "size": 4569, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_loader/faster_rcnn_test_loader.py", "max_stars_repo_name": "mmr12/DeepLearning18", "max_stars_repo_head_hexsha": "3e683c570ea8f5e224767a41a0e152267cfd08e7", "max_stars_repo_licenses": ["Apach... |
#include <boost/metaparse/transform_error_message.hpp>
| {"hexsha": "3cbc11d9ea211183e909e9cf0809a4baebd786bd", "size": 55, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_metaparse_transform_error_message.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses... |
import pytest
import numpy as np
from matplotlib import pyplot as plt
from pyrado.utils.functions import rosenbrock
from pyrado.plotting.surface import render_surface
@pytest.mark.visualization
@pytest.mark.parametrize(
'x, y, data_format', [
(np.linspace(-2, 2, 30, True), np.linspace(-1, 3, ... | {"hexsha": "07bfe09b111918be6ed37819275717693fb20931", "size": 581, "ext": "py", "lang": "Python", "max_stars_repo_path": "Pyrado/tests/test_plotting.py", "max_stars_repo_name": "jacarvalho/SimuRLacra", "max_stars_repo_head_hexsha": "a6c982862e2ab39a9f65d1c09aa59d9a8b7ac6c5", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
import numpy as np
from statsmodels.tsa.statespace.sarimax import SARIMAX
class SARIMA(object):
"""A Wrapper for the statsmodels.tsa.statespace.sarimax.SARIMAX class."""
def __init__(self, p, d, q, s, steps):
"""Initialize the SARIMA object.
Args:
p (int):
Integer ... | {"hexsha": "37c6eb1e4861f26eeb98abaae2fef6c83b4bd4a7", "size": 2007, "ext": "py", "lang": "Python", "max_stars_repo_path": "orion/primitives/sarima.py", "max_stars_repo_name": "ajayarora1235/Orion", "max_stars_repo_head_hexsha": "69e258ebcb2c19e63054453b3cb2cd74043ef433", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# %%
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
data = {
'bids_regdup': pd.read_csv('data/as_bids_REGUP.csv'),
'bids_regdown': pd.read_csv('data/as_bids_REGDOWN.csv'),
'plans': pd.read_csv('data/as_plan.csv'),
'energy_prices':pd.read_csv('data/energy_... | {"hexsha": "ad93b63f249eca219a68255b80d572fcf15e97d9", "size": 4253, "ext": "py", "lang": "Python", "max_stars_repo_path": "merge.py", "max_stars_repo_name": "nickolasclarke/anciML", "max_stars_repo_head_hexsha": "365e46a7042e358c9288ec67c2eb744b4fbdea1a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_... |
import Op
import numpy as np
from pxr import Usd, UsdGeom
class Stage(Op.Op):
def __init__(self, name='/UsdStage', locations='/root', filename=''):
self.fields = [
('name', 'name', 'name', 'string', name, {}),
('locations', 'locations', 'locations', 'string', locations, {}),
('filename', 'USD Filename', '... | {"hexsha": "dd0e7ad4550b5bceccaa3a816a05d82576ce8e74", "size": 2525, "ext": "py", "lang": "Python", "max_stars_repo_path": "Ops/USD.py", "max_stars_repo_name": "davidsoncolin/IMS", "max_stars_repo_head_hexsha": "7a9c44275b4ebf5b16c04338628425ec876e3a0f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.