text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
module Structure.Operator.Field where
import Lvl
open import Logic
open import Logic.Propositional
open import Structure.Setoid
open import Structure.Operator.Properties
open import Structure.Operator.Ring
open import Type
record Field {ℓ ℓₑ} {T : Type{ℓ}} ⦃ _ : Equiv{ℓₑ}(T) ⦄ (_+_ : T → T → T) (_⋅_ : T → T → ... | {"hexsha": "af0bd9c62da276a5ad43e84450f0e46ee14723f1", "size": 955, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Structure/Operator/Field.agda", "max_stars_repo_name": "Lolirofle/stuff-in-agda", "max_stars_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_stars_repo_licenses": ["MIT"], "max_... |
import json
import os.path
import numpy as np
from common import time
from common.data import CachedDataLoader, makedirs
from common.pipeline import Pipeline
from seizure.transforms import GetFeature
from seizure.tasks import TaskCore, MakePredictionsTask
from sklearn.linear_model import LogisticRegression
def run_sei... | {"hexsha": "66da9b38ac544f5cb127f184b2fe67aa1a553f7d", "size": 3940, "ext": "py", "lang": "Python", "max_stars_repo_path": "seizure_detection.py", "max_stars_repo_name": "GainaTang/Melbourne-University-AES-MathWorks-NIH-Seizure-Prediction-4th-solution-", "max_stars_repo_head_hexsha": "8709cd1f8204663ab62047dc05ca2e7513... |
Require Import Crypto.Specific.Framework.RawCurveParameters.
Require Import Crypto.Util.LetIn.
(***
Modulus : 2^379 - 19
Base: 23 + 11/16
***)
Definition curve : CurveParameters :=
{|
sz := 16%nat;
base := 23 + 11/16;
bitwidth := 32;
s := 2^379;
c := [(1, 19)];
carry_chains := Some [seq 0 (p... | {"author": "anonymous-code-submission-01", "repo": "sp2019-54-code", "sha": "8867f5bed0821415ec99f593b1d61f715ed4f789", "save_path": "github-repos/coq/anonymous-code-submission-01-sp2019-54-code", "path": "github-repos/coq/anonymous-code-submission-01-sp2019-54-code/sp2019-54-code-8867f5bed0821415ec99f593b1d61f715ed4f7... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def immi3(path):
"""Individual Preferences Over Immigration Policy
The... | {"hexsha": "4a9390ed20e2439e48ad0c7a2dedec98a5e6dc94", "size": 1595, "ext": "py", "lang": "Python", "max_stars_repo_path": "observations/r/immi3.py", "max_stars_repo_name": "hajime9652/observations", "max_stars_repo_head_hexsha": "2c8b1ac31025938cb17762e540f2f592e302d5de", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
#### For plotting from reawrd values stored in files
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import sys
plt.ion()
num_runs=int(sys.argv[1])
while(True):
for run in range(num_runs):
try:
y = np.loadtxt('episode_reward_run_'+str(run)+'.txt', unpack=True)
... | {"hexsha": "c5f241503105b587474a6c01db32e1afd12ec5c2", "size": 601, "ext": "py", "lang": "Python", "max_stars_repo_path": "S2l/Thesis_Ch3/Exp1_reach3dof/Scripts/realtime_plotter_allruns_episode_reward.py", "max_stars_repo_name": "leopauly/Observation-Learning-Simulations", "max_stars_repo_head_hexsha": "462c04a87c45aae... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Description
"""
import numpy as np
import torch
import torch.nn as nn
import torch.utils.data
from torch.autograd import Function
""" The following functions builds upon the work 'https://github.com/t-vi/pytorch-tvmisc' by Thomas Viehmann (cf. https://lernapparat.de... | {"hexsha": "a27a1af38191519d4c59450f33ef09a8a1baf42a", "size": 16068, "ext": "py", "lang": "Python", "max_stars_repo_path": "ptranking/ltr_adhoc/listwise/wassrank/wasserstein_loss_layer.py", "max_stars_repo_name": "ryo59/ptranking", "max_stars_repo_head_hexsha": "f06fd768de6dd5eaa3c931f191d907f56c147d09", "max_stars_re... |
import numpy as np
import csv
import cv2
import sklearn
from sklearn.model_selection import train_test_split
from keras.models import Sequential
from keras.layers import Flatten, Dense, Lambda, MaxPooling2D, Dropout
from keras.layers.convolutional import Convolution2D
# Constants
data_path = "data/"
image... | {"hexsha": "28ae19222a71a4dcd5e2832c75791a1066d7a7a1", "size": 4882, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_LeNet.py", "max_stars_repo_name": "baikeshen/CarND-Behavioral-Cloning-P3", "max_stars_repo_head_hexsha": "557904de90c3965fd480eb19eb01809c474d625a", "max_stars_repo_licenses": ["MIT"], "max_... |
#!! Whenever the documentation below is updated, setup.py should be
# checked for consistency.
'''
Calculations with full error propagation for quantities with uncertainties.
Derivatives can also be calculated.
Web user guide: http://packages.python.org/uncertainties/.
Example of possible calculation: (0.2 +/- 0.01)... | {"hexsha": "0e3b492b41cd82d5aa6364f364d38a2754ff5243", "size": 62570, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/fitting/uncertainties/__init__.py", "max_stars_repo_name": "bruceravel/xraylarch", "max_stars_repo_head_hexsha": "a8179208872d43bd23453fa0c64680e11bc2b5ed", "max_stars_repo_licenses": ["BSD-3... |
\documentclass[10pt,a4paper,twocolumn]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[usenames]{color}
% For references layout
\usepackage{natbib}
% To make index at the end
\usepackage{makeidx}
\makeindex
% side margin
\oddsidemargin 0mm
\evensidemargin 0mm
% vertical dimen... | {"hexsha": "636d7533ce639e5dc62537e02f36790f39a1f1af", "size": 13092, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "maybe_later/svn_info.tex", "max_stars_repo_name": "NordicESMhub/OsloCTM3-docs", "max_stars_repo_head_hexsha": "8e76cd9561a94eff4d96818c3518a112111aef72", "max_stars_repo_licenses": ["CC-BY-4.0"], "... |
#!/usr/bin/env python
#
# Distributed under the OSI-approved Apache License, Version 2.0. See
# accompanying file Copyright.txt for details.
#
# TestBPZfpHighLevelAPI.py
#
# Created on: April 2nd, 2019
# Author: William F Godoy
import numpy as np
from mpi4py import MPI
import adios2
def CompressZfp2D(rate):
... | {"hexsha": "b97d8c18c1ec642d693914c5c1c5796a18324fd8", "size": 1759, "ext": "py", "lang": "Python", "max_stars_repo_path": "testing/adios2/bindings/python/TestBPZfpHighLevelAPI.py", "max_stars_repo_name": "yunai2384/ADIOS2", "max_stars_repo_head_hexsha": "c88fd748720dfdfb0d7f8a529d7838ea86ecfa65", "max_stars_repo_licen... |
# ~~~
# This file is part of the paper:
#
# "A NON-CONFORMING DUAL APPROACH FOR ADAPTIVE TRUST-REGION REDUCED BASIS
# APPROXIMATION OF PDE-CONSTRAINED OPTIMIZATION"
#
# https://github.com/TiKeil/NCD-corrected-TR-RB-approach-for-pde-opt
#
# Copyright 2019-2020 all developers. All rights reserved.
# License:... | {"hexsha": "c0afef25960040bd2d1e7565c52b7c9d7b016ba6", "size": 25319, "ext": "py", "lang": "Python", "max_stars_repo_path": "pdeopt/pdeopt/TR.py", "max_stars_repo_name": "TiKeil/NCD-corrected-TR-RB-approach-for-pde-opt", "max_stars_repo_head_hexsha": "5ec575805596d06661f8fc2adc34223c7e384daf", "max_stars_repo_licenses"... |
import theano
import numpy as np
import scipy as sp
import pickle
import sys,os
import glob
import optparse
file_path = os.path.dirname(os.path.realpath(__file__))
lib_path = os.path.abspath(os.path.join(file_path, '..','..', 'common'))
sys.path.append(lib_path)
from data_utils import get_file
HOME=os.environ['HOME']
d... | {"hexsha": "e2e43b96c91425a7fa4752fb903b1480c2fa6cd0", "size": 4647, "ext": "py", "lang": "Python", "max_stars_repo_path": "Pilot2/P2B1/p2b1_baseline_keras2.py", "max_stars_repo_name": "pkarande/Benchmarks-1", "max_stars_repo_head_hexsha": "ea14ed86d3e612f56383c56a6cff6f77210f7412", "max_stars_repo_licenses": ["MIT"], ... |
## rosebud ##
"""
rosebud is a tool for pulling CSVs into python, and immediately extracting basic statistics (mean, median, mode, quartile
data, etc.) into variables, and has the capability of plotting these preliminary statistics via seaborn pairplots.
""";
#INIT BLOCK - place imports, initializations, functions an... | {"hexsha": "85f4f54cfa29d54a63eba06595155c86589b8242", "size": 17225, "ext": "py", "lang": "Python", "max_stars_repo_path": "rosebud.py", "max_stars_repo_name": "RalphPuzon/rosebud", "max_stars_repo_head_hexsha": "cc5edb9d6cc6391a1fe836e703edd04c23ea98cf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_... |
#!/usr/bin/env python
import pkg_resources
import yaml
import pprint
import random
import time
import pickle
random.seed(1234)
import numpy as np
import pandas as pd
import itertools
import matplotlib.pyplot as plt
import tqdm
from tqdm import tqdm
import tqdm.notebook as tq
from pathlib import Path
from os import lis... | {"hexsha": "f67acd1a5a39d6c9bc8293cedcd4cd5577481767", "size": 14103, "ext": "py", "lang": "Python", "max_stars_repo_path": "exatrkx/src/utils_current.py", "max_stars_repo_name": "caditi97/exatrkx-iml2020", "max_stars_repo_head_hexsha": "f4b1e4438cda7db2d40c8e572b1b682c12781e6c", "max_stars_repo_licenses": ["Apache-2.0... |
function [out] = rainfall_2(In,T,p1,p2)
%rainfall_2
% Copyright (C) 2019, 2021 Wouter J.M. Knoben, Luca Trotter
% This file is part of the Modular Assessment of Rainfall-Runoff Models
% Toolbox (MARRMoT).
% MARRMoT is a free software (GNU GPL v3) and distributed WITHOUT ANY
% WARRANTY. See <https://www.gnu.org/licens... | {"author": "wknoben", "repo": "MARRMoT", "sha": "442622b3fd89bdd88420e96cfc6605770202dae9", "save_path": "github-repos/MATLAB/wknoben-MARRMoT", "path": "github-repos/MATLAB/wknoben-MARRMoT/MARRMoT-442622b3fd89bdd88420e96cfc6605770202dae9/MARRMoT/Models/Flux files/rainfall_2.m"} |
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
%\title{Extremely Precise Radial Velocities III Evidence Challenge: The Physical \& Statistical Model}
\section{Purpose}
The primary objective of the EPRV3 Evidence Challenge is to compare different algorithms and implementations for performing mod... | {"hexsha": "02da278bec7b63155ce31b04773d74452d26e4cd", "size": 9422, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "model/model.tex", "max_stars_repo_name": "r-cloutier/Inputs", "max_stars_repo_head_hexsha": "e59992d109e2e253fdb23b2f7beae3d452d55058", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
[STATEMENT]
lemma eeqButPID_F_postSelectors:
"eeqButPID_F sw sw1 \<Longrightarrow> map fst (sw pid) = map fst (sw1 pid)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. eeqButPID_F sw sw1 \<Longrightarrow> map fst (sw pid) = map fst (sw1 pid)
[PROOF STEP]
unfolding eeqButPID_F_def
[PROOF STATE]
proof (prove)
goal (1 ... | {"llama_tokens": 218, "file": "CoSMeDis_Post_Confidentiality_Post_Unwinding_Helper_ISSUER", "length": 2} |
"""
Expected error reduction framework for active learning.
"""
from typing import Tuple
import numpy as np
from sklearn.base import clone
from sklearn.exceptions import NotFittedError
from modAL.models import ActiveLearner
from modAL.utils.data import modALinput, data_vstack
from modAL.utils.selection import multi... | {"hexsha": "31296d12c0979165d5ae8791596a8bc87ad421fe", "size": 3171, "ext": "py", "lang": "Python", "max_stars_repo_path": "modAL/expected_error.py", "max_stars_repo_name": "sahithyaravi1493/modAL", "max_stars_repo_head_hexsha": "39336f21cd872974cf2f34c1c79012ca30a96819", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import os
import pickle
import xml.etree.ElementTree as ET
from abc import abstractmethod
from logging import getLogger
import luigi
import luigi.contrib.s3
import luigi.format
import numpy as np
import pandas as pd
import pandas.errors
from gokart.object_storage import ObjectStorage
logger = getLogger(__name__)
... | {"hexsha": "e167d583a02c0bcbd3ba5fe2aaad2922c8b070d0", "size": 6060, "ext": "py", "lang": "Python", "max_stars_repo_path": "gokart/file_processor.py", "max_stars_repo_name": "skmatz/gokart", "max_stars_repo_head_hexsha": "ba1dc497dca1c7901bc861f49b1f081adc2a1888", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
function newCell=reformatElements(inputCell,type,delimiter)
%reformatElements reformat elements of cell array to desired format
% reformatElements
% convert cell array element format between string and nested cell
%
% Input:
% inputCell the input cell array
% type two conversion approaches: cell2str a... | {"author": "SysBioChalmers", "repo": "Human-GEM", "sha": "0b1bd42adaa2e1d7ac52ee83b989fad8a695759d", "save_path": "github-repos/MATLAB/SysBioChalmers-Human-GEM", "path": "github-repos/MATLAB/SysBioChalmers-Human-GEM/Human-GEM-0b1bd42adaa2e1d7ac52ee83b989fad8a695759d/code/misc/reformatElements.m"} |
#include "ModuleSetList.h"
#include <iostream>
#include <algorithm>
#include <boost/lambda/lambda.hpp>
using namespace boost::lambda;
namespace hydla {
namespace hierarchy {
ModuleSetList::ModuleSetList()
{}
ModuleSetList::ModuleSetList(ModuleSet m) :
ModuleSetContainer(m)
{}
ModuleSetList::~ModuleSetList()
{}
... | {"hexsha": "03648c82321e6bbeda4dfe8fa5cc5bbec20470b8", "size": 2823, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/hierarchy/ModuleSetList.cpp", "max_stars_repo_name": "takafumihoriuchi/HyLaGI", "max_stars_repo_head_hexsha": "26b9f32a84611ee62d9cbbd903773d224088c959", "max_stars_repo_licenses": ["BSL-1.0"], ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
from numpy.ma.mrecords import MaskedRecords
from nptypes import _flatten_dtype
class NestedMaskedRecords(MaskedRecords):
def __new__(cls, shape, dtype=None, buf=None, offset=0, strides=None,
formats=None, names=None, titles=None, byt... | {"hexsha": "40e6c377da93148ac23671331af0e3f2af3dfa6b", "size": 3091, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/nmrecords.py", "max_stars_repo_name": "oliverlee/biketest", "max_stars_repo_head_hexsha": "074b0b03455021c52a13efe583b1816bc5daad4e", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars... |
import numpy as np
from util import *
class Index():
def __init__(self, index):
self.index=index
self.history()
@property
def price(self):
return round(self.history()['chart']['result'][0]['indicators']['quote'][0]['close'][-1], 2)
@lru_cache(maxsize=128)
def history(self):
return get_ticker_history... | {"hexsha": "ce05629bc6648527ecced6d2a7f514c5d4d46a9f", "size": 711, "ext": "py", "lang": "Python", "max_stars_repo_path": "financial/index.py", "max_stars_repo_name": "vitorliston/pyInvest", "max_stars_repo_head_hexsha": "6e6343b2bc46f2515dbc80449f5a3e160f151306", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import collections
import os
import scipy.io
import pelops.datasets.chip as chip
import pelops.utils as utils
class CompcarDataset(chip.ChipDataset):
filenames = collections.namedtuple(
"filenames",
[
"image_dir",
"name_train",
"name_test",
"model_m... | {"hexsha": "dabb15bd140835ed5f78c737cd6640708a6902ca", "size": 4496, "ext": "py", "lang": "Python", "max_stars_repo_path": "pelops/datasets/compcar.py", "max_stars_repo_name": "dave-lab41/pelops", "max_stars_repo_head_hexsha": "292af80dba190f9506519c8e13432fef648a2291", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
[STATEMENT]
lemma pair_list_split: "\<lbrakk> !!l1 l2. \<lbrakk> l = zip l1 l2; length l1=length l2; length l=length l2 \<rbrakk> \<Longrightarrow> P \<rbrakk> \<Longrightarrow> P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<And>l1 l2. \<lbrakk>l = zip l1 l2; length l1 = length l2; length l = length l2\<rbrakk... | {"llama_tokens": 2846, "file": "Automatic_Refinement_Lib_Misc", "length": 18} |
C
C Copyright (C) 2000
C University Corporation for Atmospheric Research
C All Rights Reserved
C
C The use of this Software is governed by a License Agreement.
C
SUBROUTINE CSA1XD(NI,XI,YI,WTS,KNOTS,SSMTH,NDERIV,NO,XO,YO,NWRK,
+ WORK,IER)
DOUBLE PR... | {"hexsha": "6aa05f9572e513bd74a9f4e5fe32a924c726a595", "size": 1739, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ngmath/src/lib/gridpack/csagrid/csa1xd.f", "max_stars_repo_name": "tenomoto/ncl", "max_stars_repo_head_hexsha": "a87114a689a1566e9aa03d85bcf6dc7325b47633", "max_stars_repo_licenses": ["Apache-2.0"... |
from numpy.random import choice
from src.environment.disease.parameter import DiseaseParameter
from src.environment.status import Status
from src.configuration import (
ImmunityParams,
InfectionParams
)
class Infection(DiseaseParameter):
def __init__(self,
mean_duration: float = Infecti... | {"hexsha": "ff8d54faff9a7f5979e178b2845d8959211fb446", "size": 931, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/environment/disease/infection.py", "max_stars_repo_name": "Qnubo-Tech/epydemic", "max_stars_repo_head_hexsha": "635f211f3621a5e52acd4dc82f3dd74b5049c36f", "max_stars_repo_licenses": ["AFL-3.0"]... |
#
# Copyright © 2021 Uncharted Software Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | {"hexsha": "b96d9c846262d1dcd65b7cdb7edc5c91b6d0dab4", "size": 8452, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_vector_filter.py", "max_stars_repo_name": "uncharted-distil/distil-extra-primitves", "max_stars_repo_head_hexsha": "edc3b0538e12c4e61e946969af2badc90bda1b0b", "max_stars_repo_licenses": ... |
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
#X轴,Y轴数据
x = [0,1,2,3,4,5,6]
y = [0.3,0.4,2,5,3,4.5,4]
x1 = [0,2,2,3,4,5,6]
y1 = [0.3,1.6,2,5,33,4.5,14]
plt.figure(figsize=(8,4)) #创建绘图对象
plt.plot(x,y,"b--",linewidth=1) #在当前绘图对象绘图(X轴,Y轴,蓝色虚线,线宽度)
plt.plot(x1,y1,"b--",linewidth=2) #在当前绘图对象绘... | {"hexsha": "e990308299635d804a63d71d3d26b469b27e6225", "size": 466, "ext": "py", "lang": "Python", "max_stars_repo_path": "drawline/drawing4.py", "max_stars_repo_name": "MisterZhouZhou/python3demo", "max_stars_repo_head_hexsha": "da0b6771cc12e8e1066a115c3f72a90c100108ac", "max_stars_repo_licenses": ["Apache-2.0"], "max... |
"""
Mask R-CNN
Configurations and data loading code for MS COCO.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
------------------------------------------------------------
Usage: import the module (see Jupyter notebooks for examples), or run from
... | {"hexsha": "4a765a8a8146303511c5dd0f904436555ea0bc4d", "size": 15410, "ext": "py", "lang": "Python", "max_stars_repo_path": "samples/cell/cell.py", "max_stars_repo_name": "MarziehHaghighi/Mask_RCNN", "max_stars_repo_head_hexsha": "54d23a28c7bd37c4364b41dbc825adcd104392ab", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import sys
import time
import argparse
from tqdm import tqdm
import torch
import numpy as np
import torch.nn as nn
from torch.optim import AdamW
from db.mysql_engine import loadEngine
from model.recommendation_model import FFNN
from model.utils import load_checkpoint, save_checkpoint, setup_model, TrackDataset
def c... | {"hexsha": "db2db3a4c1a1c7741d5624abc4ecb83f63734063", "size": 7431, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/train.py", "max_stars_repo_name": "nikwalia/schedule-generator", "max_stars_repo_head_hexsha": "2393236a39a8790fefd52695eeb8ca470d06d98a", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import torch
import torch.nn as nn
import numpy as np
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
import models.models_swin
from models.models_mae import AugmentMelSTFT
class SwinTransformer(models.models_swin.SwinTransformer):
def __init__(self, n_mels=64, sr... | {"hexsha": "0c79f7e2b2be52f3e7ba81c2e031e8c41fcb1a9e", "size": 3434, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/models_swinTrans.py", "max_stars_repo_name": "WangHelin1997/MaskSpec", "max_stars_repo_head_hexsha": "d4acf1343c780ba481abecbfe426ff657857b8f1", "max_stars_repo_licenses": ["Apache-2.0"], "... |
SUBROUTINE MA02EZ( UPLO, TRANS, SKEW, N, A, LDA )
C
C SLICOT RELEASE 5.7.
C
C Copyright (c) 2002-2020 NICONET e.V.
C
C PURPOSE
C
C To store by (skew-)symmetry the upper or lower triangle of a
C (skew-)symmetric/Hermitian complex matrix, given the other
C triangle.
C
C ARGUMENTS
C
C ... | {"hexsha": "6b8fe167973f8d2a2ec0c51612f81db0f80fd835", "size": 5003, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/MA02EZ.f", "max_stars_repo_name": "bnavigator/SLICOT-Reference", "max_stars_repo_head_hexsha": "7b96b6470ee0eaf75519a612d15d5e3e2857407d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta... |
function spline2d(xr, yr, mx, my)
out = zeros(Float64, mx*my)
for i=1:mx
for j=1:my
k = i + (j-1)*mx
a = xr^(i-1) / factorial(i-1)
b = yr^(j-1) / factorial(j-1)
out[k] = a * b
end
end
return out
end
function stencil2d(mx, my)
# (i... | {"hexsha": "be3b6a5092b01ab6310d8822dbe0add58ad9c2d6", "size": 4879, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "experimental/alfven.jl", "max_stars_repo_name": "JakeWillard/GDB.jl", "max_stars_repo_head_hexsha": "9d025feeb47995ac4a880919d801fd2256b826d0", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
# -*- coding: utf-8 -*-
"""Generate a color plot of the weight of a shapiro steps.
The plot is done as a function of power and frequency and the power is
normalized by the power at which the step 0 disappear.
The plot use the folling axes:
- x axis: Normalized power
- y axis: Frequency
- color axis: bin count in curr... | {"hexsha": "8622e549922761cb9b38aa04b503c240b78c68db", "size": 7553, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/jj/shapiro/shapiro_step_weight.py", "max_stars_repo_name": "ShabaniLab/DataAnalysis", "max_stars_repo_head_hexsha": "e234b7d0e4ff8ecc11e58134e6309a095abcd2c0", "max_stars_repo_licenses": [... |
#!/usr/bin/env python
# coding: utf-8
# # ETHZ: 227-0966-00L
# # Quantitative Big Imaging
#
# # March 21, 2019
#
# ## Supervised Approaches
# # Reading Material
#
# - [Introduction to Machine Learning: ETH Course](https://las.inf.ethz.ch/teaching/introml-s18)
# - [Decision Forests for Computer Vision and Medical Imag... | {"hexsha": "61755b318ff4464b55e5669cb8feceb1da2e6dff", "size": 37916, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lectures/05-SupervisedSegmentation.py", "max_stars_repo_name": "kmader/qbi-2019-py", "max_stars_repo_head_hexsha": "25ca789cc35e02ac02eaa5e1943093ef55c096a5", "max_stars_repo_licenses": ["Apache-... |
program mpiModTest
use mpi
integer,parameter:: a = MPI_ROOT
end program mpiModTest
| {"hexsha": "23612dda29e561021655a33df88c81b90bf331c7", "size": 88, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "components/homme/cmake/compilerTests/mpiModTest.f90", "max_stars_repo_name": "Fa-Li/E3SM", "max_stars_repo_head_hexsha": "a91995093ec6fc0dd6e50114f3c70b5fb64de0f0", "max_stars_repo_licenses": ["zl... |
import matplotlib.pyplot as plt
import numpy as np
import vorpy
class Results:
def __init__ (self):
self.result_name_v = []
self.result_d = {}
def add_result (self, result_name, dt, t_v, qp_v, H_v, norm_deviation_form_v, norm_error_v):
N = qp_v.shape[-1]
self.result_name_v.appe... | {"hexsha": "6c749145ce3524aa3c884091bce5b799f1dbd8e0", "size": 4666, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/symplectic_integration/results.py", "max_stars_repo_name": "vdods/vorpy", "max_stars_repo_head_hexsha": "68b6525ae43d99f451cf85ce254ffb0311521320", "max_stars_repo_licenses": ["MIT"], "max_s... |
# Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/lice... | {"hexsha": "d45c49b429f393fbac074b0e693428b43918040b", "size": 2072, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_npu/test_mean.py", "max_stars_repo_name": "Ascend/pytorch", "max_stars_repo_head_hexsha": "39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st... |
# coding: utf-8
import numpy as np
import pandas as pd
##################################################
# メイン
##################################################
if __name__ == '__main__':
dates = pd.date_range('20130101', periods=6)
df = pd.DataFrame(np.random.randn(6, 4), index=dates, columns=list('AB... | {"hexsha": "266e5a5b2fc35d6c7020f39e571ddc5376fb794f", "size": 2218, "ext": "py", "lang": "Python", "max_stars_repo_path": "01.10minutes_to_pandas/selection_by_position.py", "max_stars_repo_name": "predora005/pandas-practice", "max_stars_repo_head_hexsha": "f7f954cfba6c4cc5ccb58695cc2a32cdeb5fdb3d", "max_stars_repo_lic... |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from collections import defaultdict
from ignite.metrics import Metric
import torch
import numpy as np
def _torch_hist(label_true, label_pred, n_class):
"""Calculates the confusion matrix for the labels
Args:
label_true ([ty... | {"hexsha": "3411e145c26da942257b3b6d62492322d48b1a93", "size": 5828, "ext": "py", "lang": "Python", "max_stars_repo_path": "interpretation/deepseismic_interpretation/penobscot/metrics.py", "max_stars_repo_name": "fazamani/seismic-deeplearning", "max_stars_repo_head_hexsha": "e1365339b712666b3ca7a0c706f33ce22a2d2bbf", "... |
Require Export P02.
Theorem nil_app : forall X:Type, forall l:list X,
app [] l = l.
Proof.
intros X l. reflexivity.
Qed.
| {"author": "tinkerrobot", "repo": "Software_Foundations_Solutions2", "sha": "c88b2445a3c06bba27fb97f939a8070b0d2713e6", "save_path": "github-repos/coq/tinkerrobot-Software_Foundations_Solutions2", "path": "github-repos/coq/tinkerrobot-Software_Foundations_Solutions2/Software_Foundations_Solutions2-c88b2445a3c06bba27fb9... |
import os
import re
import subprocess
import time
import matplotlib.pyplot as plt
import numpy as np
from astropy import constants as const
from astropy import units as u
from astropy.cosmology import Planck15 as cosmo
from astropy.io import fits
from astropy.table import Table
import util_dm
import util_mge
from mul... | {"hexsha": "c371575ffc63d776b6f0f3fdccf153063145cfd1", "size": 8162, "ext": "py", "lang": "Python", "max_stars_repo_path": "manga_mass_0/mge_kappa/SurfDensMap_parall.py", "max_stars_repo_name": "caoxiaoyue/Sim_MaNGA_lens", "max_stars_repo_head_hexsha": "da341b3c87f4a87d3897e96f07579b7b295cafa0", "max_stars_repo_license... |
! MIT License
!
! Copyright (c) 2020 SHEMAT-Suite
!
! Permission is hereby granted, free of charge, to any person obtaining a copy
! of this software and associated documentation files (the "Software"), to deal
! in the Software without restriction, including without limitation the rights
! to use, copy, modify, merge,... | {"hexsha": "2dd3ac768699fdbef401d1705efa8dece9528b2d", "size": 16832, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "shem_parameter.f90", "max_stars_repo_name": "arielthomas1/SHEMAT-Suite-Open", "max_stars_repo_head_hexsha": "f46bd3f8a9a24faea9fc7e48ea9ea88438e20d78", "max_stars_repo_licenses": ["MIT"], "max_... |
#!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
# Copyright (c) 2020 CNRS
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation ... | {"hexsha": "e1deb28edc7af5f0ed85be50f4a28acb7f540b9d", "size": 10418, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyannote/audio/features/wrapper.py", "max_stars_repo_name": "emmaducos/pyannote-audio", "max_stars_repo_head_hexsha": "52cd867b5ed6a19fafd79a8dfa365d067234c2d0", "max_stars_repo_licenses": ["MIT"... |
import numpy as np
import pyspawn
pyspawn.import_methods.into_simulation(pyspawn.qm_integrator.rk2)
pyspawn.import_methods.into_simulation(pyspawn.qm_hamiltonian.adiabatic)
pyspawn.import_methods.into_traj(pyspawn.potential.terachem_cas)
pyspawn.import_methods.into_traj(pyspawn.classical_integrator.vv)
... | {"hexsha": "d449029601be8b25c80049c7873cc14683986b17", "size": 448, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_tc_restart.py", "max_stars_repo_name": "blevine37/pySpawn17", "max_stars_repo_head_hexsha": "4fa65cfc3b4d399bcb586506782d00f86b453139", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os.path as osp
import statistics
import random
import torch
from torch_geometric.datasets import TUDataset
import torch_geometric.transforms as T
import torch.nn.functional as F
from torch_geometric.data import DataLoader, Dataset
from opt... | {"hexsha": "b5c6148a9fd5a17ed806f2bf095eac7c52a4882e", "size": 10789, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tu_realworld.py", "max_stars_repo_name": "JIAQING-XIE/Fea2Fea", "max_stars_repo_head_hexsha": "10ca1dabecff121fdcfccd5c043c8b2984970d35", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
# MIT License
#
# Copyright (c) 2018-2019 Tskit Developers
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modif... | {"hexsha": "f2132f7ce3882ffa4d4a7804ab3ced7c81c896fc", "size": 9356, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/tskit/util.py", "max_stars_repo_name": "brianzhang01/tskit", "max_stars_repo_head_hexsha": "e4d80810e19034cffa77bb14bc0b8d77537103ad", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
# -*- coding: utf-8 -*-
"""
Copyright 2018 NAVER Corp.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, pu... | {"hexsha": "677c3fea0388acd463dcd77877bd603f0ab0096d", "size": 3674, "ext": "py", "lang": "Python", "max_stars_repo_path": "movie/dataset.py", "max_stars_repo_name": "moonbings/naver-ai-hackathon-2018", "max_stars_repo_head_hexsha": "fded7619ca361620ffd61ab94bdf561b0ba8d19b", "max_stars_repo_licenses": ["MIT"], "max_st... |
import unittest
import javabridge
import numpy as np
from TASSELpy.TASSELbridge import TASSELbridge
try:
try:
javabridge.get_env()
except AttributeError:
TASSELbridge.start()
except AssertionError:
TASSELbridge.start()
except:
raise RuntimeError("Could not start JVM")
from TASSEL... | {"hexsha": "4f6f8a3a666afc854fc4756ddc733be34962bbe8", "size": 1681, "ext": "py", "lang": "Python", "max_stars_repo_path": "TASSELpy/test/net/maizegenetics/stats/statistics/FisherExactTest.py", "max_stars_repo_name": "er432/TASSELpy", "max_stars_repo_head_hexsha": "2273d2252786679e023d1279f0c717a29ddd6d35", "max_stars_... |
using MultivariatePolynomials
using JuMP
using RecipesBase
export Ellipsoid
struct Ellipsoid{T}
Q::Matrix{T}
c::Vector{T}
end
@recipe function f(ell::Ellipsoid)
@assert LinearAlgebra.checksquare(ell.Q) == 2
αs = range(0, stop=2π, length=1024)
ps = [[cos(α), sin(α)] for α in αs]
r = [sqrt(dot... | {"hexsha": "f9c7bd8e27787b3d382b3ab91950cf2ad9ef7a55", "size": 4170, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/set.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/SwitchOnSafety.jl-ceb7f16a-07bf-5f4a-9354-b68f01b1610f", "max_stars_repo_head_hexsha": "e9fefe2cb8f45f27ed9ea95d3edee725e8b85122"... |
#-*- coding: utf-8 -*-
from __future__ import division
import os
import time
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
from glob import glob
from ops import *
from utils import *
class RFGAN(object):
def __init__(self, sess, epoch, batch_size, z_dim, dataset_name, patch_depth, patc... | {"hexsha": "256773e54af1227b505eff4b6fc2c025c228c9e2", "size": 16777, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/RFGAN.py", "max_stars_repo_name": "duhyeonbang/Tensorflow-MyGANs", "max_stars_repo_head_hexsha": "1f056650ecfc3a81fd2b9ec2e997fa025ef28db4", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# Copyright (c) 2019-2020 by the parties listed in the AUTHORS file.
# All rights reserved. Use of this source code is governed by
# a BSD-style license that can be found in the LICENSE file.
import argparse
import copy
import os
import re
import numpy as np
from ..timing import function_timer, Timer
from ..utils i... | {"hexsha": "d9b4e58deb05f4cbaeb381e53bdf60e610398b7e", "size": 16536, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/toast/pipeline_tools/madam.py", "max_stars_repo_name": "doicbek/toast", "max_stars_repo_head_hexsha": "1d06a471c86a87845050ae2795fc053986d03159", "max_stars_repo_licenses": ["BSD-2-Clause"], ... |
import random
from random import shuffle
import numpy as np
import tensorflow as tf
from tensorflow.python.tools import freeze_graph
import datetime
import time
import queue
import threading
import logging
from PIL import Image
import itertools
import yaml
import re
import os
import glob
import shutil
import sys
import... | {"hexsha": "c23a870064fefb4e740984ad848e886ea4aa0cd9", "size": 9372, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "ZJianjin/Traffic4cast2020_lds", "max_stars_repo_head_hexsha": "6cb76e885a9539e485c055222be77f41a559c507", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co... |
"""
Mother class for VideoStream classes
"""
import time
from threading import Lock
from threading import Thread
from numpy import mean
from settings import logger
from src.useful_functions import add_annotation_to_image
class VideoStream:
# calibration_obj: CalibrationObject
def __init__(self, name, disp... | {"hexsha": "913eba11c4f65aff66d2451ffed4020cc8499b7f", "size": 2118, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/video_objects/VideoStream.py", "max_stars_repo_name": "shubhk97/sudoku-solver", "max_stars_repo_head_hexsha": "4716933f70a3dc571ee7b3cd754c5026d9c9e789", "max_stars_repo_licenses": ["MIT"], "m... |
[STATEMENT]
lemma AIL1[rule_format,simp]: "all_in_list p l \<longrightarrow>
all_in_list (removeShadowRules1 p) l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. all_in_list p l \<longrightarrow> all_in_list (removeShadowRules1 p) l
[PROOF STEP]
by (induct_tac p, simp_all) | {"llama_tokens": 116, "file": "UPF_Firewall_FWNormalisation_NormalisationGenericProofs", "length": 1} |
import librosa
from sklearn.utils import shuffle
import json
import tensorflow as tf
import numpy as np
import keras
import time
from keras import models
from keras.models import *
from keras.layers import *
from keras.optimizers import *
from tensorflow.python.keras.preprocessing import sequence
from keras.backend.te... | {"hexsha": "b67c85834a69d06fa04d94d83d862cb189b141f6", "size": 6053, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "alcatraz47/Auto_Speech_Contest_ms3", "max_stars_repo_head_hexsha": "8c1216236652ffad7735d44ad32c1c107e3ce7d2", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
include("fields.jl")
function computeGradientGauss(field)
interpolateCellsToFaces(field, "linear")
gradPhi = setupVectorField("grad$(field.name)")
for iFace in 1:mesh.nInternalFaces
iOwner = mesh.faces[iFace].iOwner
iNeighbour = mesh.faces[iFace].iNeighbour
gradPhi.cellValues... | {"hexsha": "11276d265edb4c8503b8a8ac27c260ec6b8ee75b", "size": 819, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/gradient.jl", "max_stars_repo_name": "andiraarif/Cfdsof.jl", "max_stars_repo_head_hexsha": "1bfbe584b84db7bb995dbd6d258e09d4baff1c8a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created in 24-03-2022 at 13:19
@author: J. Sha
"""
import sys
from os.path import dirname
import config
sys.path.append(dirname(__file__))
import time
import torch
import numpy as np
from help_funs import mu
from workspace.svd import eval as svd
from torch.utils.da... | {"hexsha": "0232637d90cc598cb827a417b8286a14e2a42895", "size": 3717, "ext": "py", "lang": "Python", "max_stars_repo_path": "workspace/eval.py", "max_stars_repo_name": "akweury/improved_normal_inference", "max_stars_repo_head_hexsha": "a10ed16f43362c15f2220345275be5c029f31198", "max_stars_repo_licenses": ["MIT"], "max_s... |
# ------------------
# this module, grid.py, deals with calculations of all microbe-related activites on a spatial grid with a class, Grid().
# by Bin Wang
# ------------------
import numpy as np
import pandas as pd
from microbe import microbe_osmo_psi
from microbe import microbe_mortality_prob as MMP
from enzyme i... | {"hexsha": "2985915c9fc265c585ae2b512eacdcebe81edbef", "size": 42857, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/grid.py", "max_stars_repo_name": "bioatmosphere/DEMENTpy", "max_stars_repo_head_hexsha": "658b2b2bb7394cca2a768c610aa8a7573d6fc67c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10,... |
C Copyright(C) 1999-2020 National Technology & Engineering Solutions
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
C NTESS, the U.S. Government retains certain rights in this software.
C
C See packages/seacas/LICENSE for details
SUBROUTINE MAK2EL (MP, MXNPER, MXND, NNN0, NN... | {"hexsha": "c9fcc1ece369a0b9cf21ece10d6b63d93c7b0667", "size": 1810, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/seacas/applications/fastq/mak2el.f", "max_stars_repo_name": "jschueller/seacas", "max_stars_repo_head_hexsha": "14c34ae08b757cba43a3a03ec0f129c8a168a9d3", "max_stars_repo_licenses": ["Pyt... |
#
# Use the VTKFrame3DTracker to create a snapshot folder with vtk files suitable for building animation.
# Load the snapshot dir in paraview as series (it's possible to create animation with series).
#
import math
import numpy as np
import matplotlib.pyplot as plt
from finitewave.cpuwave3D.tissue import CardiacTissu... | {"hexsha": "f437121af1fbdc0af5a35f9111316ff283eda8d5", "size": 1966, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/trackers/3D/vtk_frame_3d_tracker.py", "max_stars_repo_name": "ArsOkenov/Finitewave", "max_stars_repo_head_hexsha": "14274d74be824a395b47a5c53ba18188798ab70d", "max_stars_repo_licenses": [... |
[STATEMENT]
lemma dvd_Gcd_iff: "x dvd Gcd A \<longleftrightarrow> (\<forall>y\<in>A. x dvd y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (x dvd Gcd A) = (\<forall>y\<in>A. x dvd y)
[PROOF STEP]
by (blast dest: dvd_GcdD intro: Gcd_greatest) | {"llama_tokens": 116, "file": null, "length": 1} |
# Test implementation for builtin types
using AbstractTrees
using AbstractTrees: repr_tree
using Test
@testset "Array" begin
tree = Any[1,Any[2,3]]
T = Vector{Any} # This is printed as "Array{Any,1}" in older versions of Julia
@test repr_tree(tree) == """
$T
├─ 1
└─ $T
... | {"hexsha": "ec524eb39f46ac4e692151629f90a6c24d7d0382", "size": 4766, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/builtins.jl", "max_stars_repo_name": "BdrunetteBailey/AbstractTrees.jl", "max_stars_repo_head_hexsha": "087ce858ccae5348f31680fd171b556a3eb11a1b", "max_stars_repo_licenses": ["MIT"], "max_star... |
import tensorflw as tf
import numpy as np
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# import matplotlib
# matplotlib.use('PyQt4')
# matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
sess = tf.Session()
x_vals = tf.linspace(-1., 1., 500)
tagert = tf.constant(0.)
# L2正则损失函数(即欧拉损失函数,目标值附近较平滑,收敛性好,距离目标值收敛... | {"hexsha": "1d0259c0a681d963be96acaa15e7299fd40f6ef7", "size": 2756, "ext": "py", "lang": "Python", "max_stars_repo_path": "tftest.py", "max_stars_repo_name": "feidaoGavin/imageCrop", "max_stars_repo_head_hexsha": "452f37d79980c7c16a7b50194d35d9623a9df16a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
import numpy as np
import math
import pygame
from environments.general_environment import GeneralEnvironment
from environments.env_generation import GeneralEnvironmentGenerator
from environments.env_representation import GeneralEnvironmentRepresentation
def state_to_surface(maps, info, nb_repeats):
dim_x, dim_y ... | {"hexsha": "d4ac0c135ee104471e9a6005cbb91666aea512e9", "size": 7616, "ext": "py", "lang": "Python", "max_stars_repo_path": "env_test.py", "max_stars_repo_name": "JonasVervloet/RL-Coverage-Planner", "max_stars_repo_head_hexsha": "31c0cd704bf11e13354a8b744569241086e10916", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import sqlite3
import numpy as np
import torch
from sklearn.preprocessing import LabelBinarizer
def load_data(db, reactions,topologies=["FourPlusSix"], cage_property=None):
if cage_property:
query = '''
SELECT fingerprint, topology, {}
FROM cages
WHERE
... | {"hexsha": "663ef454308a017223f4759a4b3d3177d65205a6", "size": 2623, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/gcn_utils.py", "max_stars_repo_name": "qyuan7/Graph_Convolutional_Network_for_cages", "max_stars_repo_head_hexsha": "cf5327a20589dec4db3366f6477fdb7d8f01a3d6", "max_stars_repo_licenses": ["M... |
[STATEMENT]
lemma T_mndet: "A\<noteq>{} \<Longrightarrow> T(mndet A P) = (\<Union> x\<in>A. T (x \<rightarrow> P x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. A \<noteq> {} \<Longrightarrow> T (mndet A P) = (\<Union>x\<in>A. T (x \<rightarrow> P x))
[PROOF STEP]
unfolding mndet_def
[PROOF STATE]
proof (prove)
... | {"llama_tokens": 1367, "file": "HOL-CSP_Mndet", "length": 8} |
# from numpy.linalg import LinAlgError
import numpy as np
import pandas as pd
import statsmodels.api as sm
import scipy as sp
import os
import errno
def sample_corr(x1, x2, alpha=0.05, verbose=True, return_result=False):
w, normal_1 = sp.stats.shapiro(x1)
w, normal_2 = sp.stats.shapiro(x2)
if (norma... | {"hexsha": "dfede475a489dc85622d43bdc7bb5ec355860507", "size": 11108, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis_functions.py", "max_stars_repo_name": "athms/gaze-bias-differences", "max_stars_repo_head_hexsha": "4a4f230fb5aa2500d81bfc16b44da3478519ca4f", "max_stars_repo_licenses": ["MIT"], "max_st... |
[STATEMENT]
lemma alist_pqueue:
"distinct (vals xs) \<Longrightarrow> set (dfs alist xs) = set (PQ.alist_of (pqueue xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. distinct (vals xs) \<Longrightarrow> set (elements xs) = set (pq.alist_of (pqueue xs))
[PROOF STEP]
by (induct xs) (simp_all add: vals_pqueue bt_a... | {"llama_tokens": 136, "file": "Binomial-Queues_PQ_Implementation", "length": 1} |
#pragma once
#include <vector>
#include <regex>
#include <string>
#include <utility>
#include <boost/optional.hpp>
enum class RequestType
{
login,
register_req, // register is a reserved keyword
logout,
class_create,
class_view,
class_search,
heartbeat,
enroll,
drop,
class_list,
enroll_list,
... | {"hexsha": "772f88270dea30781cd55c7e9aea084d18897d30", "size": 817, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/RequestMessage.hpp", "max_stars_repo_name": "RaVenHelm/STAC-Server", "max_stars_repo_head_hexsha": "267b6f90f3908815856601d1dd63280640bd6eb5", "max_stars_repo_licenses": ["Apache-2.0"], "max_... |
abstract type QueryStruct end
abstract type QWidget end
abstract type DataAttribute <: QueryStruct end
############ Providers
struct DataAttributeContext
ctx::Set{Tuple{String,String,String}}
end
struct Sysstat <: DataAttribute
property::String
#context::DataAttributeContext
end
#Sysstat(name::String) ... | {"hexsha": "43a25f54950e8e9ab5f26598e07d54c05f3d5f9f", "size": 2993, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/structures.jl", "max_stars_repo_name": "Agapanthus/server-diary", "max_stars_repo_head_hexsha": "363b548471f2a692314ae704be55c5348b4d863a", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_sta... |
import rospy
import PyKDL
from geometry_msgs.msg import Twist, Point, PoseStamped, TwistStamped
from std_msgs.msg import String
import numpy
import math
import sys
import copy
from gazebo_msgs.srv import GetModelState
class ReturnHome:
def __init__(self,uav_id):
self.uav_type = 'typhoon_h480'
self.... | {"hexsha": "54bafcb47f080edcb7be4e58489a9d068c947665", "size": 12832, "ext": "py", "lang": "Python", "max_stars_repo_path": "control/gcs/return.py", "max_stars_repo_name": "CNRoboComp2020/XTDrone", "max_stars_repo_head_hexsha": "d2d43b031df3a304c912c7d036f4e58c81ab9e54", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
Tau Kappa Epsilon (often shortened to TKE, pronounced like Teke) is a fraternity at UC Davis. http://www.tke.org Tau Kappa Epsilon is the largest college social fraternity by number of chapters worldwide, with chapters across the US and Canada. The Davis chapter of TKE was founded in 1989 and reaches around 60 activ... | {"hexsha": "dd0260e2f86ff8cb2ee133c3e7da5f21488184d8", "size": 2940, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Tau_Kappa_Epsilon.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import math
import pandas as pd
import numpy as np
if __name__ == '__main__':
# 原始数据
# X1 = pd.Series([1, 2, 3, 4, 5, 6])
# Y1 = pd.Series([0.3, 0.9, 2.7, 2, 3.5, 5])
# X1 = pd.Series([0.935,0.902,0.859,0.707])
# Y1 = pd.Series([0.978,0.973,0.973,0.972])
X1 = pd.Series([0.845,0.786,0.7,0.4... | {"hexsha": "6d18a0f19280cd9054bdf4f3514f93664ed949fc", "size": 937, "ext": "py", "lang": "Python", "max_stars_repo_path": "personall.py", "max_stars_repo_name": "blackcow/Fair-AT", "max_stars_repo_head_hexsha": "62fc269fedd4b63c4b48ae390d494b3832e65fa8", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nul... |
import numpy as np
from constants import *
from animation.animation import Animation
from animation.creation import ShowCreation
from animation.creation import Write
from animation.transform import ApplyFunction
from animation.transform import ApplyPointwiseFunction
from animation.creation import FadeOut
from anima... | {"hexsha": "6b210e396d2a01a88c60c54eb2f729f4e6b7eca5", "size": 18086, "ext": "py", "lang": "Python", "max_stars_repo_path": "scene/vector_space_scene.py", "max_stars_repo_name": "mertyildiran/manim", "max_stars_repo_head_hexsha": "db7f8320bd84e9ebbf75adfcd6dfc480881e5849", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import tactic data.nat.basic data.nat.prime
open nat
open function
-- 3. Infinitely Many Primes
-- Today we will prove that there are infinitely many primes using mathlib library.
-- Our focus will be on how to use the library to prove more complicated theorems.
-- 3.1. Equality
/-----------------------------------... | {"author": "andrewparr", "repo": "my_lean_project", "sha": "6c42f8a5d8b6548b5871d589054820b4bd8eedcc", "save_path": "github-repos/lean/andrewparr-my_lean_project", "path": "github-repos/lean/andrewparr-my_lean_project/my_lean_project-6c42f8a5d8b6548b5871d589054820b4bd8eedcc/src/exercises/lean_at_mc2020/chapter_3.lean"} |
import numpy as np
from typing import Dict
from yacs.config import CfgNode
from .dataset import Dataset
class SkeletonDataset(Dataset):
def __init__(self, cfg: CfgNode, dataset_file: str, mean_params: str, train: bool = True, **kwargs):
"""
Dataset class used for loading 2D keypoints and annotat... | {"hexsha": "f9dc37c8ba325531e4ef9fcc87fea22bc5daa957", "size": 1870, "ext": "py", "lang": "Python", "max_stars_repo_path": "prohmr/datasets/skeleton_dataset.py", "max_stars_repo_name": "akashsengupta1997/ProHMR", "max_stars_repo_head_hexsha": "7015a3d070c79b4571d43abdf5e522468091a94d", "max_stars_repo_licenses": ["BSD-... |
# Indexing and dimensions (B.4)
export
threadIdx, blockDim, blockIdx, gridDim,
warpsize
@generated function _index(::Val{name}, ::Val{range}) where {name, range}
JuliaContext() do ctx
T_int32 = LLVM.Int32Type(ctx)
# create function
llvm_f, _ = create_function(T_int32)
mod ... | {"hexsha": "627bbf0df5ca9104d042590e84d7798bceb2e7f9", "size": 2801, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/device/intrinsics/indexing.jl", "max_stars_repo_name": "Satvik/CUDA.jl", "max_stars_repo_head_hexsha": "0b3537097f7bd58a58d6bde25eca35d7164a9411", "max_stars_repo_licenses": ["MIT"], "max_stars... |
[STATEMENT]
lemma (in Square_impl)
shows "\<Gamma>\<turnstile>\<lbrace>\<acute>I = 2\<rbrace> \<acute>R :== CALL Square(\<acute>I) \<lbrace>\<acute>R = 4\<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<Gamma>\<turnstile> \<lbrace>\<acute>I = 2\<rbrace> \<acute>R :== CALL Square(\<acute>I) \<lbrace>\<acu... | {"llama_tokens": 1873, "file": "Simpl_UserGuide", "length": 10} |
PROGRAM RUN_LANCELOT_simple
!-----------------------------------------------------------------------------
! !
! This programs provides a simple (naive) way to run LANCELOT B on an !
! optimization problem without interaction with CUT... | {"hexsha": "54dbc9daa4a4c5124fc716cf6aba6521618edf73", "size": 8970, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "legacy_fortran/galahad-2.3/src/lanb_simple/bin/run_lancelot_simple.f90", "max_stars_repo_name": "dynamics-of-stellar-systems/dynamite_release", "max_stars_repo_head_hexsha": "a921d8a1bde98f48dae... |
#Author: Nawal Ahmed
import networkx as nx
import pylab # Matplotlib
import matplotlib.pyplot as plt
# This displays a graph and uses Dijkstra's algorithm to determine the shortest path from A to G
G = nx.DiGraph() # Directed Graph
# Add edges and weights to the graph
G.add_edges_from([('A','B')], weight=8) , G.add_... | {"hexsha": "aa0e929c0cee67d0dc8f98980643602b9512d56c", "size": 1407, "ext": "py", "lang": "Python", "max_stars_repo_path": "ShortestPathGraphProject/ShortestPathGraph.py", "max_stars_repo_name": "NathanAllerton/ShortestPathGraph", "max_stars_repo_head_hexsha": "dc9f5d7acb4bd86ad0d4c72c8a8ca9a66af18c33", "max_stars_repo... |
#' mantaRSDK
#'
#' Joyent Manta Storage Service R Software Development Kit
#'
#' @description
#'
#' R functions to transmit/receive native R data and
#' files to the Manta Storage Service for object storage.
#'
#' Manta jobs can compute on stored objects with Map/Reduce and
#' UNIX shell commands in the cloud.... | {"hexsha": "7c4216e52bff0f9181bf0af9c0cf76f23aa55300", "size": 9417, "ext": "r", "lang": "R", "max_stars_repo_path": "R/mantaRSDK-package.r", "max_stars_repo_name": "joyent/mantaRSDK", "max_stars_repo_head_hexsha": "4c0311b9de4e87ecbbd08f79de8fc2196379661e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "ma... |
#!/usr/bin/env python
# coding: utf-8
import numpy as np
import sys, os, glob, json, pickle, copy
from collections import OrderedDict
import libstempo as T2
import libstempo.toasim as LT
import libstempo.plot as LP
from shutil import copyfile, copy2
import enterprise
from enterprise.pulsar import Pulsar
import enter... | {"hexsha": "1ddd1f4bc3e9700b263c42028ae47f4f1285e900", "size": 4994, "ext": "py", "lang": "Python", "max_stars_repo_path": "pta_sim/scripts/m3vm3_psr_free_spec_noise.py", "max_stars_repo_name": "Hazboun6/pta_sim", "max_stars_repo_head_hexsha": "cf8676e23056586ecb35a030dbaad45a1f985764", "max_stars_repo_licenses": ["MIT... |
# %% Prepare
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
import xarray as xr
from utils import show_fig
# %% Read file
df1 = pd.read_csv('validate/code.csv')
df2 = pd.read_csv('validate/hydra8.csv')
df = pd.concat([df1, df2], axis=0, ignore_index=True, sort=False)
# G... | {"hexsha": "032a5381952c864c275da8d887d8a79aee4898c4", "size": 8733, "ext": "py", "lang": "Python", "max_stars_repo_path": "python-scripts/validate/chen.py", "max_stars_repo_name": "antonior92/sysid-neuralnet", "max_stars_repo_head_hexsha": "4ab4be97d37345e858807d9ff37c94a148530ba6", "max_stars_repo_licenses": ["MIT"],... |
"""Functions that alter the matplotlib rc dictionary on the fly."""
from distutils.version import LooseVersion
import functools
import numpy as np
import matplotlib as mpl
from . import palettes, _orig_rc_params
mpl_ge_150 = LooseVersion(mpl.__version__) >= '1.5.0'
__all__ = ["set", "reset_defaults", "reset_orig"... | {"hexsha": "7c9bf2f0c6e96c15c7b83ef6de4fce29f9bdb5b8", "size": 16173, "ext": "py", "lang": "Python", "max_stars_repo_path": "seaborn/rcmod.py", "max_stars_repo_name": "darothen/seaborn", "max_stars_repo_head_hexsha": "0f43f2f9c84a6c677b7938a3e6edb66bbe9f8f88", "max_stars_repo_licenses": ["MIT", "BSD-3-Clause"], "max_st... |
# Trained net for region specific Classification
# 1. If not already set, download and set coco API and data set (See instruction)
# 1. Set Train image folder path in: TrainImageDir
# 2. Set the path to the coco Train annotation json file in: TrainAnnotationFile
# 3. Run the script
# 4. The trained net weight will app... | {"hexsha": "8ac9b484e87a4f963ac0172096f47a1fa481ded0", "size": 6022, "ext": "py", "lang": "Python", "max_stars_repo_path": "Unused_Alternative_Attention_Nets/Train.py", "max_stars_repo_name": "sagieppel/Classification-of-the-material-given-region-of-an-image-using-a-convolutional-neural-net-with-attent", "max_stars_rep... |
#include <muduo/net/EventLoop.h>
#include <iostream>
#include <boost/bind.hpp>
#include <boost/noncopyable.hpp>
class Printer : boost::noncopyable
{
public:
Printer(muduo::net::EventLoop* loop)
: loop_(loop),
count_(0)
{
// Note: loop.runEvery() is better for this use case.
loop_-... | {"hexsha": "a397f777e0f751d28454f02c1f345d86b069b111", "size": 844, "ext": "cc", "lang": "C++", "max_stars_repo_path": "examples/asio/tutorial/timer4/timer.cc", "max_stars_repo_name": "ll8814081/muduo_game", "max_stars_repo_head_hexsha": "a5411acde6d1dab9e24271dede4d2c7f9c807e15", "max_stars_repo_licenses": ["BSD-3-Cla... |
\section{Discussion}
\label{ch:discussion}
With the development of communication technology and data science, the relationship between people and information has evolved from one-way, people looking for information, to the current two-way relationship.
\par We compare the different ways in 5 recommendation styles in ... | {"hexsha": "726ffa15b8b111eae8519ae218e97f0f713836dd", "size": 3742, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/ch06-discussion.tex", "max_stars_repo_name": "lizhedm/MAThesis", "max_stars_repo_head_hexsha": "473db27c53c69abd7f9a9efd14e709c4e13b32b1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import numpy as np
import librosa
import os
import scipy
import json
from scipy.special import expit
def sox_reverb(
y, reverberance=1, hf_damping=1, room_scale=1, stereo_depth=1
):
from pysndfx import AudioEffectsChain
apply_audio_effects = AudioEffectsChain().reverb(
reverberance=reverberance,
... | {"hexsha": "a1d94aad02908b48e525ec62e79c234c41a19085", "size": 6759, "ext": "py", "lang": "Python", "max_stars_repo_path": "malaya_speech/augmentation/waveform.py", "max_stars_repo_name": "ishine/malaya-speech", "max_stars_repo_head_hexsha": "fd34afc7107af1656dff4b3201fa51dda54fde18", "max_stars_repo_licenses": ["MIT"]... |
import os
import numpy as np
import shutil
from PIL import Image
import torch
import torchvision.transforms as transforms
def process_viewpoint_label(label, offset=0):
label[0] = (360. - label[0] + offset) % 360.
label[1] = label[1] + 90.
label[2] = (label[2] + 180.) % 360.
label = label.astype('int')... | {"hexsha": "24630084db23b9320a3ae70d2d16f9e8c0eae6de", "size": 5450, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dataset/data_utils.py", "max_stars_repo_name": "henlein/PoseContrast", "max_stars_repo_head_hexsha": "6efff4fae2229d6dfdc85e38d761534c04bb8a2c", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import numpy as np
from ray.rllib.policy.policy import Policy, LEARNER_STATS_KEY
from ray.rllib.policy.torch_policy import TorchPolicy
from ray.rllib.utils.annotations import override
from ray.rllib.contrib.alpha_zero.core.mcts import Node, RootParentNode
from ray.rllib.utils import try_import_torch
torch, _ = try_im... | {"hexsha": "e002f95c84d605a50cfd49a0a48a1953098b8b27", "size": 5317, "ext": "py", "lang": "Python", "max_stars_repo_path": "rllib/contrib/alpha_zero/core/alpha_zero_policy.py", "max_stars_repo_name": "brechtmann/ray", "max_stars_repo_head_hexsha": "0c76ebd676f794847ea990aecced22b88717d09e", "max_stars_repo_licenses": [... |
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing dataset
dataset = pd.read_csv('Position_Salaries.csv')
X = dataset.iloc[:, 1:2].values
y = dataset.iloc[:, 2].values
# Splitting the dataset into the Training set and test set
from sklearn.model_selection import train_test_split
X_tra... | {"hexsha": "ce1442a7732eed972e2171a77b9c29d33593285d", "size": 1539, "ext": "py", "lang": "Python", "max_stars_repo_path": "polynomial_regression.py", "max_stars_repo_name": "GBardis/Machine-Learning-Algorithms", "max_stars_repo_head_hexsha": "8fa08aae080027d315457b718a415fdaba78de47", "max_stars_repo_licenses": ["MIT"... |
"""
This module provides the different ``view`` classes pertaining to the ``accounts`` app.
"""
from smtplib import SMTPException
from django.conf import settings
from django.core.mail import send_mail
from django.template.loader import render_to_string
from django.utils import timezone
from django.contrib.auth impo... | {"hexsha": "b75b785bd807fa8b0cc99c834fd507f180fb7352", "size": 13466, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/accounts/views.py", "max_stars_repo_name": "alfarhanzahedi/fables-backend", "max_stars_repo_head_hexsha": "3c43709c1dff2ef30bbb9547120ea9954f8015c5", "max_stars_repo_licenses": ["Apache-2.0"... |
\documentclass{beamer}
\usepackage[utf8]{inputenc} % allow utf-8 input
\usepackage[T1]{fontenc} % use 8-bit T1 fonts
\usepackage{hyperref} % hyperlinks
\usepackage{url} % simple URL typesetting
\usepackage{booktabs} % professional-quality tables
\usepackage{amsfonts} % blackboard math sy... | {"hexsha": "acf812b1af7be054051af044d9af22184cfd0458", "size": 25183, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Presentations/sampling/presentation.tex", "max_stars_repo_name": "nextBillyonair/DPM", "max_stars_repo_head_hexsha": "840ffaafe15c208b200b74094ffa8fe493b4c975", "max_stars_repo_licenses": ["MIT"], ... |
#include <cstdio>
#include <iterator>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <boost/timer.hpp>
#include <boost/lexical_cast.hpp>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/point_generators_2.h>
#include <CGAL/compiler_config.h>
int format_output(const char* li... | {"hexsha": "7c6a298ee2a4c43bd9bf316764d7662e8ee99286", "size": 1666, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "graphics/cgal/STL_Extension/benchmark/copy_n_benchmark/copy_n_use_case_benchmark.cpp", "max_stars_repo_name": "hlzz/dotfiles", "max_stars_repo_head_hexsha": "0591f71230c919c827ba569099eb3b75897e163e... |
#include "mapwidget.h"
#include "mapviewer.h"
#include <QStatusBar>
#include <boost/utility.hpp>
using namespace std;
MapWidget::MapWidget (MapViewer *mapviewer,QWidget *parent) : QGLWidget(parent), mv(mapviewer) {
// get map range in cartesian coordinates
Objects::tRange map_range = mv->objects->getMapRange()... | {"hexsha": "beb996ddfe0533e948389e16d4f86a545684498e", "size": 9526, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "GMM/mapwidget.cpp", "max_stars_repo_name": "ashish-code/gps-denied-geospatial-positioning", "max_stars_repo_head_hexsha": "5006b963e0b8fe50b0cabd5e3a9deb6aeb2416f2", "max_stars_repo_licenses": ["MIT... |
#!/usr/bin/env python
# coding: utf-8
# # Predicting Churn:
# In[ ]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import seaborn as sns
print()
from matplotlib import rcParams
sns.set_style("whitegrid")
sns.set_context("poster")
# In[ ]:
rcParams['figure.figsize'] = ... | {"hexsha": "17723bda07dfb70e833ecf55383db885a1dc613d", "size": 11758, "ext": "py", "lang": "Python", "max_stars_repo_path": "relancer-exp/original_notebooks/adammaus_predicting-churn-for-bank-customers/bank-churn-analysis-with-roc-auc-score-of-0-95.py", "max_stars_repo_name": "Chenguang-Zhu/relancer", "max_stars_repo_h... |
# ------------------------------------------------------------------
# Licensed under the ISC License. See LICENSE in the project root.
# ------------------------------------------------------------------
# connected component of adjacency matrix containing vertex
function component(adjacency::AbstractMatrix{Int}, ver... | {"hexsha": "68d81cbb81cb5b6bfcff5556330e1d40b8ed0226", "size": 6660, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/macros.jl", "max_stars_repo_name": "ElOceanografo/GeoStatsBase.jl", "max_stars_repo_head_hexsha": "a0617660ad3eb901c806afb38c5d0269d4a95c89", "max_stars_repo_licenses": ["ISC"], "max_stars_coun... |
import click
import mlflow
import logging
import os.path
import shutil
import tensorflow as tf
import tensorflow_probability as tfp
import numpy as np
import matplotlib.pyplot as plt
import climdex.temperature as tdex
import climdex.precipitation as pdex
import experiments.maxt_experiment_base as maxt
import experiment... | {"hexsha": "f02777066df41bdb1046748ec5c27193b93fddae", "size": 16143, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/glow_jflvm.py", "max_stars_repo_name": "bgroenks96/generative-downscaling", "max_stars_repo_head_hexsha": "745ce45a3e62abe4c09cfdb66ed07e6f494a8e82", "max_stars_repo_licenses": ["MIT"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.