text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
! { dg-do run } ! { dg-options "-fwhole-file -O3" } ! Check that the TYPE_CANONICAL is being correctly set ! for the derived types, when whole file compiling. ! (based on import.f90) ! subroutine test(x) type myType3 sequence integer :: i end type myType3 type(myType3) :: x if(x%i /= 7) STOP 1 x%i = 1...
{"hexsha": "d0a954f01dde493378b7fcafb023f2f2c28cfc54", "size": 504, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/whole_file_13.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_li...
"""Miscellaneous functions, mainly for testing.""" from __future__ import annotations import functools import warnings import numpy as np import rasterio as rio import geoutils from geoutils._typing import ArrayLike from geoutils.georaster import Raster, RasterType def array_equal( array1: RasterType | ArrayLi...
{"hexsha": "b0e46a90af345235275bf125d7191b762e1c076e", "size": 6530, "ext": "py", "lang": "Python", "max_stars_repo_path": "geoutils/misc.py", "max_stars_repo_name": "erikmannerfelt/GeoUtils", "max_stars_repo_head_hexsha": "96a044f7cca73f936e5b245a5e99e0d2102d279f", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
classdef DilationComputer < handle properties (Access = private) LHS RHS end properties (Access = private) mesh orientationVector dilation end methods (Access = public) function obj = DilationComputer(cParams) obj.init(c...
{"author": "SwanLab", "repo": "Swan", "sha": "f8355f3561bb1a1603f56b3676873147d22a511e", "save_path": "github-repos/MATLAB/SwanLab-Swan", "path": "github-repos/MATLAB/SwanLab-Swan/Swan-f8355f3561bb1a1603f56b3676873147d22a511e/Topology Optimization/Applications/Dehomogenizing/DilationComputer.m"}
import numpy as np import os import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import imageio from utils import KL_divergence plt.style.use("ggplot") import cv2 def find_coutour(mask): contour = np.zeros_like(mask) h, w = mask.shape for y in range(h): for x in range(w): ...
{"hexsha": "87528cd55caba83da18f308682f0920906d056be", "size": 6499, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyze.py", "max_stars_repo_name": "jinxu06/pixel-cnn", "max_stars_repo_head_hexsha": "9cad98f3f801bd772815dbb403fb6649ff704dfa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_st...
__precompile__(true) module ADCME export tf, tfp, AUTO_REUSE, GLOBAL_VARIABLES, TRAINABLE_VARIABLES, UPDATE_OPS using PyCall using Random using LinearAlgebra using SparseArrays using LibGit2 using Libdl tf = PyNULL() tfp = PyNULL() libadcme = missing ...
{"hexsha": "1e62836797a0fd813989e290b24b6b28ecd56155", "size": 2975, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ADCME.jl", "max_stars_repo_name": "banren456/ADCME.jl", "max_stars_repo_head_hexsha": "2ed7a0801b6ed90f2236c3cde7a1dca825cbe897", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_...
############################################################################### # general utilities for Sentinel-1 # Copyright (c) 2016-2020, the pyroSAR Developers. # This file is part of the pyroSAR Project. It is subject to the # license terms in the LICENSE.txt file found in the top-level # directory of this dist...
{"hexsha": "d3bfbdf5c7d4c6e7db0f8e4feb21c66363876000", "size": 25696, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyroSAR/S1/auxil.py", "max_stars_repo_name": "khanfarhan10/pyroSAR", "max_stars_repo_head_hexsha": "8af46f03aa29479bc8a82f25f5776173ab15b6f7", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
from Clean_Json import clean_json from Find_Best_Hyperparameters import get_best_lr import numpy as np from Pycox import evaluate_model from Train_models import train_MTL_model from Make_h5_trained_models.py import Extract_Image_Features import warnings import pandas import os from extract_variables import extract_vari...
{"hexsha": "c8e77082edc40ddc9085cfaa880a810867792ff0", "size": 2477, "ext": "py", "lang": "Python", "max_stars_repo_path": "areds/main.py", "max_stars_repo_name": "bionlplab/AMD_prognosis_amia2021", "max_stars_repo_head_hexsha": "20df5b9bca1fcd5a41c0abd53deaf78954c72b1b", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
import numpy as np import cv2 as cv img = cv.imread("Emilia-Clarke.jpeg", -1) img1 = np.zeros([500,500,3], dtype=np.uint8) img = cv.line(img, (300,100),(600,600), (255,0,0) , 10) img = cv.line(img, (600,600), (900,100), (255,0,0), 10) img = cv.circle(img , (600,250) , 200 , (0,255,0) , 10) img = cv.arrowedLine(img , ...
{"hexsha": "69e985e1e0fea8add0305c0458170e68f6ab42fb", "size": 624, "ext": "py", "lang": "Python", "max_stars_repo_path": "opencv/shapes.py", "max_stars_repo_name": "hackerman-101/Hacktoberfest-2022", "max_stars_repo_head_hexsha": "839f28293930987da55f8a2414efaa1cf9676cc9", "max_stars_repo_licenses": ["MIT"], "max_star...
from numpy import * import numpy as np import pandas as pd def init_center(df, k): """ https://blog.csdn.net/zouxy09/article/details/17589329 初始化k个点 :param df: pandas数据集 :param k: 需要k个点 :return: """ x, y = df.shape center_point = zeros(k, y) for i in range(x): pass ...
{"hexsha": "f3dbd1f8b9aea7c580aa253c69c95f0421385d58", "size": 685, "ext": "py", "lang": "Python", "max_stars_repo_path": "kmeans.py", "max_stars_repo_name": "dyfire/point", "max_stars_repo_head_hexsha": "2924aa6bee9e1d615fd8cff8bb66be4b54831a5e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max...
#ifndef DETECTNET_TRANSFORMATION_HPP #define DETECTNET_TRANSFORMATION_HPP #include <boost/array.hpp> #include <opencv2/core/core.hpp> #include <opencv2/opencv.hpp> #include <vector> #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/layer.hpp" #include "caffe/proto/caffe.pb.h" #ifndef CPU_ONLY #i...
{"hexsha": "043f56913182d8eca857b2c367511f13bdafa650", "size": 4675, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "worker/pslite_nvcaffe/include/caffe/layers/detectnet_transform_layer.hpp", "max_stars_repo_name": "XinYao1994/FluentPS-paper", "max_stars_repo_head_hexsha": "a83570c6c96cabd4f1dd5f47ce1bb06532a78e16...
from matplotlib.finance import quotes_historical_yahoo from matplotlib.dates import DateFormatter from matplotlib.dates import DayLocator from matplotlib.dates import MonthLocator import sys from datetime import date import matplotlib.pyplot as plt import numpy as np today = date.today() start = (today.year - 1, today...
{"hexsha": "daf8233138ed6a681ff4acf570a7deea8f47b76f", "size": 853, "ext": "py", "lang": "Python", "max_stars_repo_path": "np/reference/ch9code/logy.py", "max_stars_repo_name": "focusunsink/study_python", "max_stars_repo_head_hexsha": "322326642db54df8725793d70a95d21ac40b6507", "max_stars_repo_licenses": ["MIT"], "max_...
# Section 5.4 $\quad$ Gram-Schmidt Process In this section, we introduce a method to obtain an orthonormal basis for a finite dimensional inner product space, which is called **Gram-Schmidt Process**. **Question:** Why do we want an orthonormal basis? ### Example 1 Let $S = \{\mathbf{u}_1,\mathbf{u}_2, \mathbf{u}_3...
{"hexsha": "a99061298b1e82821261fd39baad527757350d6a", "size": 5377, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Jupyter_Notes/Lecture27_Sec5-4_GramSchmidtProcess.ipynb", "max_stars_repo_name": "xiuquan0418/MAT341", "max_stars_repo_head_hexsha": "2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59", "max_s...
import data.set.basic -- hide open set -- hide /- Tactic : ext ## Summary If `A` and `B` are sets and the goal is `A = B`, then using the `ext` tactic will change it to `x ∈ A ↔ x ∈ B`. Variant: `ext y` will change the goal to `y ∈ A ↔ y ∈ B`. ## Details This tactic applies the "extensionality" axiom of set theor...
{"author": "mmasdeu", "repo": "topologygame", "sha": "0a1b868031919a5555e7b99efca66ece2f546ec7", "save_path": "github-repos/lean/mmasdeu-topologygame", "path": "github-repos/lean/mmasdeu-topologygame/topologygame-0a1b868031919a5555e7b99efca66ece2f546ec7/src/set_theory_world/level10.lean"}
module SuperModels using MPI using ClimateMachine using ClimateMachine: Settings using ...BalanceLaws: parameter_set using ...DGMethods.NumericalFluxes using ..HydrostaticBoussinesq: HydrostaticBoussinesqModel, NonLinearAdvectionTerm, Forcing using ..OceanProblems: InitialValueProblem, InitialConditions using...
{"hexsha": "52c44fce3afaa76ed7c4c537c54e366c68971a35", "size": 6528, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Ocean/SuperModels.jl", "max_stars_repo_name": "ErikQQY/ClimateMachine.jl", "max_stars_repo_head_hexsha": "ad128d457dd877bf21b5bcd845d6c3fa42de3f8a", "max_stars_repo_licenses": ["Apache-2.0"], "...
{-# OPTIONS --safe --without-K #-} -- The category of group objects with a cartesian category open import Categories.Category open import Categories.Category.Cartesian module Categories.Category.Construction.Groups {o ℓ e} {𝒞 : Category o ℓ e} (C : Cartesian 𝒞) where open import Level open import Categories.Cate...
{"hexsha": "a58e281c7ab43ddfdb9d885984eebb79ff37e30a", "size": 1356, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/Categories/Category/Construction/Groups.agda", "max_stars_repo_name": "Trebor-Huang/agda-categories", "max_stars_repo_head_hexsha": "d9e4f578b126313058d105c61707d8c8ae987fa8", "max_stars_repo_...
[STATEMENT] lemma sless_less_2pl: "\<lbrakk> (b :: 'a :: len word) < 2 ^ (LENGTH('a) - 1); a < b \<rbrakk> \<Longrightarrow> a <s b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>b < 2 ^ (LENGTH('a) - 1); a < b\<rbrakk> \<Longrightarrow> a <s b [PROOF STEP] using not_msb_from_less word_sless_msb_less [PR...
{"llama_tokens": 295, "file": "Word_Lib_Word_Lemmas", "length": 2}
import os import sys import cv2 import os.path as osp from tqdm import tqdm from glob import glob import logging import time import argparse from collections import OrderedDict import numpy as np import torch import options.options as option from models import create_model sys.path.insert(0, "../../") import utils....
{"hexsha": "b3bd6bc255a3c938a97ea033d40becc8690f4f14", "size": 2102, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_single_image.py", "max_stars_repo_name": "sxpro/ImageEnhance_cGAN", "max_stars_repo_head_hexsha": "074627d8fd354f19a4380f65faa76afb55d3ec9f", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
[STATEMENT] lemma l2_inv3_trans [iff]: "{l2_inv3} trans l2 {> l2_inv3}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. {l2_inv3} TS.trans l2 {> l2_inv3} [PROOF STEP] apply (auto simp add: PO_hoare_defs l2_nostep_defs intro!: l2_inv3I) [PROOF STATE] proof (prove) goal (9 subgoals): 1. \<And>x Rb A B gnx xa xf xg x...
{"llama_tokens": 5394, "file": "Key_Agreement_Strong_Adversaries_dhlvl2", "length": 5}
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
{"hexsha": "b363da9d60edb77856a36cb411b44308f7971aee", "size": 5013, "ext": "py", "lang": "Python", "max_stars_repo_path": "training/experimental/calibrated_camera_experiment.py", "max_stars_repo_name": "isabella232/ftc-object-detection", "max_stars_repo_head_hexsha": "e8923e208c449dd457b60d84fc21eb715364f0de", "max_st...
import numpy as np import cv2 class ObjectDepthEstimator(object): """ """ def __init__(self, mode="center"): modes = ["center", "median", "mean"] self.mode = mode if self.mode not in modes: raise ValueError("Invalid mode provided should be one of: {}".format(modes)) ...
{"hexsha": "2fb13a34c1dab774c4e60b405b7d7d1f4b7e0901", "size": 1786, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pyuwds3/reasoning/estimation/object_depth_estimator.py", "max_stars_repo_name": "LAAS-HRI/uwds3", "max_stars_repo_head_hexsha": "42390f62ed5701a32710341b01faa10efc448078", "max_stars_repo_lice...
import random import numpy as np import os import torch from torch.autograd import Variable import utils class DataLoader(object): """ Handles all aspects of the data. Stores the dataset_params, vocabulary and tags with their mappings to indices. """ def __init__(self, data_dir, params): ""...
{"hexsha": "430d32f5b3ef9d7bd8c9df7620ff2faf3b5ffde2", "size": 6828, "ext": "py", "lang": "Python", "max_stars_repo_path": "sequence-labeling/sequence-labeling-pytorch/model/data_loader.py", "max_stars_repo_name": "Zeqiang-Lai/KE103", "max_stars_repo_head_hexsha": "b43249cba4928868a70f8406bbe75b0cd95a75cb", "max_stars_...
# Copyright 2020 JD.com, Inc. Galileo 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 a...
{"hexsha": "2ac0041d125cd7ab0dc082e9f63f2e3b5b005e6a", "size": 2499, "ext": "py", "lang": "Python", "max_stars_repo_path": "galileo/tests/test_unify.py", "max_stars_repo_name": "YaoPu2021/galileo", "max_stars_repo_head_hexsha": "0ebee2052bf78205f93f8cbbe0e2884095dd7af7", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
import glob import numpy as np import os from create_dummy_heatmap_for_wsi import * svs_dir = '../../wsi' #images_csv_path = './images.csv' images_csv_filepath = './images.csv' out_dir = '../../dummy_heatmaps_output' heatmap_txt_dir = os.path.join(out_dir, 'heatmap_txt') heatmap_json_dir = os.path.join(out...
{"hexsha": "f1889fc34503e9c17be80565c145a6b0c5e2e879", "size": 1688, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate_dummy_heatmap/call_generate_dummy_heatmaps.py", "max_stars_repo_name": "dmitry-ganyushin/quip_classification", "max_stars_repo_head_hexsha": "f30e52c1e07891880d006234e2cf0013240a4e8b", "m...
#ifndef CLIENT_TYPES_ROOWQCLE #define CLIENT_TYPES_ROOWQCLE // Copyright 2010 Dean Michael Berris. // 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) #include "tag_types.hpp" #include <boost/mpl/joint_view.hpp> #i...
{"hexsha": "3b547427090c67ca4ea04249fb5e4c5174b16f25", "size": 1404, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "original_sources/cpp-netlib-0.11.2-final/libs/network/test/http/client_types.hpp", "max_stars_repo_name": "TyRoXx/cdm", "max_stars_repo_head_hexsha": "758cb59106c6acdc987b6f859387db2398415127", "max...
import torch import torch.nn as nn import torch.optim as optim import torchvision from torchvision.datasets import VisionDataset from torchvision.datasets import MNIST, FashionMNIST, CIFAR100 from torchvision import transforms from torch.utils.data import Subset import numpy as np import matplotlib.pylab as plt from ...
{"hexsha": "99e8737440f98c0ff10258ecf222dff7be55eb56", "size": 4877, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/train_model.py", "max_stars_repo_name": "aicoe-kaggle/diabetic-retinopathy", "max_stars_repo_head_hexsha": "e39ceb67f32d25dbf17a0beaa7c92b2b6a0206a4", "max_stars_repo_licenses": ["FTL"]...
// (C) Copyright Seyedsepehr Madani, 2021. // Distributed under MIT license, available at // https://opensource.org/licenses/MIT. #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE Main #include <stdexcept> #include <boost/test/unit_test.hpp> #include "../src/FibLFSR.hpp" #define CHEATOFORME(X) std::cout << (X) ...
{"hexsha": "9bc1098ee58a1c4cb896b690d9094c42bcc287f1", "size": 1784, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "PS1b/test/test.cpp", "max_stars_repo_name": "1ssepehr/UML-Comp-IV", "max_stars_repo_head_hexsha": "b6ae1f9acbb12948ac4da17daa21dfbc353d6ac5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
from PySide6.QtWidgets import QFrame, QPushButton, QGridLayout, QLabel, QLineEdit, QWidget from PySide6.QtGui import QIcon from PySide6.QtCore import Signal import pyqtgraph as pg import numpy as np from utils import validators class Cropping(QFrame): """ A widget for cropping parameters selection in manual ...
{"hexsha": "7b8762e94a29e74f0c072981c089444e920fab06", "size": 5471, "ext": "py", "lang": "Python", "max_stars_repo_path": "widgets/cropping.py", "max_stars_repo_name": "peskaf/ramAIn", "max_stars_repo_head_hexsha": "8eb1418007c925ac618e3bddd7de2c0520f5977a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
from PauliInteraction import PauliInteraction from Ising import Ising import Callbacks as cb import qutip as qp import numpy as np N = 7 NUM_INTERACTIONS = int((N * (N - 1)) / 2) T = 1 R = True # Resonator Flag TIME_STEPS = 100 QME_NUM_STEPS = 1e9 T_CB = {'T' : T, 'R' : R} QME_OPTIONS = qp.Options(nsteps ...
{"hexsha": "9302c40c3c2cc7fea7f8bb3692e373575bc9d071", "size": 2463, "ext": "py", "lang": "Python", "max_stars_repo_path": "MasterEquation.py", "max_stars_repo_name": "nicksacco17/Dyson_Series_Solver", "max_stars_repo_head_hexsha": "764bd6e4475af6f1932185439170f2c790e355ec", "max_stars_repo_licenses": ["MIT"], "max_sta...
import torch import torch.nn import torch.nn.functional as nn import torch.autograd as autograd import torch.optim as optim import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import os from torch.autograd import Variable from tensorflow.examples.tutorials.mnist import in...
{"hexsha": "498d16303310edd6cfeef688ad662a86dc037f98", "size": 2871, "ext": "py", "lang": "Python", "max_stars_repo_path": "GAN/ali_bigan/ali_bigan_pytorch.py", "max_stars_repo_name": "vtabbott/generative-models", "max_stars_repo_head_hexsha": "c97ae1b396a32ef8908e27468aef78b758202d1c", "max_stars_repo_licenses": ["Unl...
############################################################################## # Copyright 2020 IBM Corp. 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 # # htt...
{"hexsha": "c92f30825e0e50fc18e2b46d48af6a79a317d742", "size": 1235, "ext": "py", "lang": "Python", "max_stars_repo_path": "dfpipeline/tests/test_le.py", "max_stars_repo_name": "IBM/dataframe-pipeline", "max_stars_repo_head_hexsha": "44bb4efc77ca36022ef2d54cba4d77825111841f", "max_stars_repo_licenses": ["Apache-2.0"], ...
import numpy dims = map(int, raw_input().split()) print numpy.zeros(dims, dtype=numpy.int) print numpy.ones(dims, dtype=numpy.int)
{"hexsha": "7694e1b7112ccee733f137774f531bcd76280269", "size": 136, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/numpy/np-zeros-and-ones.py", "max_stars_repo_name": "feliposz/hackerrank-solutions", "max_stars_repo_head_hexsha": "fb1d63ca12a0d289362c9b3fb4cb0b79ef73f72f", "max_stars_repo_licenses": ["MI...
/* Copyright (C) 2014 InfiniDB, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but W...
{"hexsha": "3a332be222e2d4fda8a3b50432cf3dcc61d44364", "size": 25587, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/vendor/mariadb-10.6.7/storage/columnstore/columnstore/tools/cleartablelock/cleartablelock.cpp", "max_stars_repo_name": "zettadb/zettalib", "max_stars_repo_head_hexsha": "3d5f96dc9e3e4aa255f4e61...
struct tSTE <: AbstractLoss α::Int constant::Float64 function tSTE(;α::Int = 3) α ≥ 1 || throw(ArgumentError("α in tSTE loss must be ≥ 1")) new(α, (α + 1) / α) end end function kernel(loss::tSTE, X::Embedding) K = pairwise(SqEuclidean(), X.X, dims=2) Q = zeros(Float64, nitems(...
{"hexsha": "41202337ae2afca60398c227feb9dbe1160fbd6f", "size": 2943, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/tSTE.jl", "max_stars_repo_name": "usc-sail/TripletEmbeddings.jl", "max_stars_repo_head_hexsha": "926a53d3e09ab857628aa6eb015051bea075f002", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_sta...
import os import csv import numpy as np from imutils import paths args = {} currentdir = os.getcwd() args["source"] = 'faces' args["destination2"] = "faces_without_copyright_close_cut\\" # Read csv file and create an array file_names = [] with open("metadata/List_of_images_without_copyright.csv", newline='', encoding...
{"hexsha": "09cf5c8feeebff71d7470d1595400b4c8463c90f", "size": 2132, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/python-experiments/copyImagesWithoutCopyrightAndCreateMetadataCSV.py", "max_stars_repo_name": "Det-Kongelige-Bibliotek/daner", "max_stars_repo_head_hexsha": "150d07e6a472c6cef5b5a39177...
import os import mala import numpy as np from mala.datahandling.data_repo import data_repo_path data_path = os.path.join(data_repo_path, "Al36") data_path_be = os.path.join(os.path.join(data_repo_path, "Be2"), "training_data") # Control how much the loss should be better after hyperopt co...
{"hexsha": "2fa66a745d0d12a80ddc2b2cb1dd96b35d733ce7", "size": 11173, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/hyperopt_test.py", "max_stars_repo_name": "htahmasbi/mala", "max_stars_repo_head_hexsha": "3fbd7f3225eae2864af7877b87e133eac735a68d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
#%% import os import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from IPython.core.interactiveshell import InteractiveShell # Setting styles InteractiveShell.ast_node_interactivity = "all" sns.set(style="whitegrid", color_codes=True, rc={"figure.figsize": (12.7, 9.27)}) #%%...
{"hexsha": "1e1b074e1af47f4c87f10e899b62460c08b1a3d9", "size": 7479, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/data_exploration.py", "max_stars_repo_name": "TuomoKareoja/phone-sentiment-analysis", "max_stars_repo_head_hexsha": "ed0739b6f25fd1b9bd813939b129f01902faa5c4", "max_stars_repo_licenses":...
# -*- 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 markets(path): """Markets Daily changes in two stock market indice...
{"hexsha": "a6fc7d2657848d348ad2385af36580ca3e27cdda", "size": 1676, "ext": "py", "lang": "Python", "max_stars_repo_path": "observations/r/markets.py", "max_stars_repo_name": "hajime9652/observations", "max_stars_repo_head_hexsha": "2c8b1ac31025938cb17762e540f2f592e302d5de", "max_stars_repo_licenses": ["Apache-2.0"], "...
import logging import os import coloredlogs import dask.array as da from dask.distributed import Client, LocalCluster, progress import imageio import napari import numpy as np from utoolbox.io.dataset import LatticeScopeTiledDataset def load_dataset(path): ds = LatticeScopeTiledDataset(path) ...
{"hexsha": "3096a81b26f03d4f11e5aa9f80357d24edba0931", "size": 2002, "ext": "py", "lang": "Python", "max_stars_repo_path": "workspace/test_tile_preview.py", "max_stars_repo_name": "thhsieh00/utoolbox-core", "max_stars_repo_head_hexsha": "e46704348d60985c205a16f41788d2c185e11fb6", "max_stars_repo_licenses": ["Apache-2.0...
// // $Id$ // // // Darren Kessner <darren@proteowizard.org> // // Copyright 2009 Spielberg Family Center for Applied Proteomics // Cedars Sinai Medical Center, Los Angeles, California 90048 // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compli...
{"hexsha": "61006a8edf553710df3bf5a8f9bc957723f7b558", "size": 6382, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "pwiz/analysis/calibration/LeastSquaresCalibrator.cpp", "max_stars_repo_name": "austinkeller/pwiz", "max_stars_repo_head_hexsha": "aa8e575cb40fd5e97cc7d922e4d8da44c9277cca", "max_stars_repo_licenses"...
import torch import numpy as np from nose.tools import * from torch.autograd import Variable from bhabana.models import Embedding class TestEmbedding(): vocab_size = 20 embedding_dims = 300 def setUp(self): self.emb = Embedding(vocab_size=self.vocab_size, embedding_dims=se...
{"hexsha": "7ba92e5b42598ffdc63c5114185942b8ecb2177c", "size": 2200, "ext": "py", "lang": "Python", "max_stars_repo_path": "bhabana/tests/models/test_embedding.py", "max_stars_repo_name": "dashayushman/bhabana", "max_stars_repo_head_hexsha": "7438505e20be53a4c524324abf9cf8985d0fc684", "max_stars_repo_licenses": ["Apach...
''' Document Localization using Recursive CNN Maintainer : Khurram Javed Email : kjaved@ualberta.ca ''' import numpy as np import torch from PIL import Image from torchvision import transforms import model class corner_finder(): def __init__(self, CHECKPOINT_DIR): self.model = model.ModelFactory.get_...
{"hexsha": "cf964ffbb99740acd1672d3df16a26f693ac6f09", "size": 2929, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluation/corner_refiner.py", "max_stars_repo_name": "Khurramjaved96/Dicta", "max_stars_repo_head_hexsha": "416638a3d1ad851b00394e55a7574ec978080d51", "max_stars_repo_licenses": ["Apache-2.0"], "...
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import pickle from openvino.runtime import PartialShape from openvino.frontend import FrontEndManager, InitializationFailure from openvino.runtime.utils.types import get_element_type import numpy as np import pytest mock_available = ...
{"hexsha": "6a5dee350d07db788b003c525f6f7c492facf74b", "size": 18414, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/bindings/python/tests/test_frontend/test_frontendmanager.py", "max_stars_repo_name": "terfendail/openvino", "max_stars_repo_head_hexsha": "186f6016993dd88ef6fc6f980dae39e2d159d48e", "max_star...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ lines_bars_and_markers/cross-and_auto-correlation_demo.py Matplotlib > Gallery > Lines, bars and markers > Cross- and Auto-Correlation Demo https://matplotlib.org/gallery/lines_bars_and_markers/xcorr_acorr_demo.html#sphx-glr-gallery-lines-bars-and-markers-xcorr-acorr-...
{"hexsha": "8b470ff8d406c07df6006bcfb35d81612511b326", "size": 2350, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/en/_matplotlib/gallery/lines_bars_and_markers/cross-and_auto-correlation_demo.py", "max_stars_repo_name": "aimldl/coding", "max_stars_repo_head_hexsha": "70ddbfaa454ab92fd072ee8dc614ecc330b...
#!/usr/bin/env python # coding: utf-8 #!/usr/bin/python # -*- coding: utf-8 -*- import torch import torch.nn as nn from torch import optim import numpy as np import argparse import math from utils import * from encoderRNN import EncoderRNN from attnDecoderRNN_II import AttnDecoderRNN_II # Main function if __name__...
{"hexsha": "75ea22886b3d680516c961d2ca61fc7774af1277", "size": 6334, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_training.py", "max_stars_repo_name": "zxyzz/Project", "max_stars_repo_head_hexsha": "0a432fb7e06a336fa7b769447e57566c6f818d9d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
#define BOOST_TEST_DYN_LINK #include <boost/test/unit_test.hpp> #include "../jngen.h" BOOST_AUTO_TEST_SUITE(geometry) BOOST_AUTO_TEST_CASE(comparators) { using namespace jngen; BOOST_CHECK(lt(0.0, 1e-5)); BOOST_CHECK(lt((long double)0.0, 1e-5)); BOOST_CHECK(lt(0, 1e-5)); BOOST_CHECK(!eq(0, 1e-5))...
{"hexsha": "617b925afa512dabe5f87e3714c5a14482b09e33", "size": 1450, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/geometry.cpp", "max_stars_repo_name": "landcold7/jngen", "max_stars_repo_head_hexsha": "c7cfb26cd21009efbb736a75147da550c699b545", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 197.0,...
\documentclass{article} \newsavebox{\oldepsilon} \savebox{\oldepsilon}{\ensuremath{\epsilon}} \usepackage[minionint,mathlf,textlf]{MinionPro} % To gussy up a bit \renewcommand*{\epsilon}{\usebox{\oldepsilon}} \usepackage[margin=1in]{geometry} \usepackage{graphicx} % For .eps inclusion %\usepackage{indentfirst} % Contro...
{"hexsha": "0014bc9aefc61cf6ad53a651c700678e409d3faa", "size": 15796, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "problem set keys/ps5/tex/ps5 answer key.tex", "max_stars_repo_name": "mewahl/intro-systems-biology", "max_stars_repo_head_hexsha": "95ad58ec50ef79d084e71f4380fbfbf5e1603836", "max_stars_repo_licens...
import os import unittest import warnings import numpy as np import pandas as pd from doublebook.sentence_mapper import SentenceMapper THIS_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT_DIR = os.path.dirname(THIS_DIR) def get_mock_text(path): with open(path) as file: return file.read() class ...
{"hexsha": "6aee0e690965486dfea002c99804ab759b957fb8", "size": 2726, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_sentence_mapper.py", "max_stars_repo_name": "plysytsya/doublebook", "max_stars_repo_head_hexsha": "09dcd5399288c9544df928136a9e2f2e54639cbd", "max_stars_repo_licenses": ["MIT"], "max_st...
""" Contents: get_merged_rot_CKS get_merged_gyroage_CKS _get_spec_vsini_phot_Prot_overlap _add_Christiansen12_CDPP _get_McQuillan13_data _get_Mazeh15_data _get_Santos21_data _get_cks_data _apply_cks_VII_filters _get_Curtis20_data PleiadesInterpModel PraesepeInterpMode...
{"hexsha": "9e8fbe1f1e20dca40a22546f19365813f3061d25", "size": 12430, "ext": "py", "lang": "Python", "max_stars_repo_path": "gilly/helpers.py", "max_stars_repo_name": "lgbouma/gilly", "max_stars_repo_head_hexsha": "b3bc7cf53c28eee6420cd85c3975062d4f46c611", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
from Camera import Camera from abc import ABC import numpy as np import cv2 from skimage import io from io import BytesIO from IPython.display import clear_output, Image, display, update_display import PIL try: from Cameras.PySpinCapture import PySpinCapture as psc prin...
{"hexsha": "8f6418733827be2be58c4028ee87ec8b1dfda65b", "size": 5662, "ext": "py", "lang": "Python", "max_stars_repo_path": "GhostScan/Cameras/Polarization.py", "max_stars_repo_name": "yyf20001230/GhostScan", "max_stars_repo_head_hexsha": "5694df4532132be5e916bd72a46dc907eb108bf9", "max_stars_repo_licenses": ["MIT"], "m...
import numpy as np import rospy from geometry_msgs.msg import PoseWithCovariance from visualization_msgs.msg import Marker, MarkerArray from rbpf_mtt.msg import GMMPoses def object_id_color(object_id): colors = {"vivid_yellow": (255, 179, 0), "strong_purple": (128, 62, 117), "vi...
{"hexsha": "4d3aefa9ca4e7c4e33033958ec1ca4a73c7019a5", "size": 7563, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/rbpf_mtt/rbpf_vis.py", "max_stars_repo_name": "nilsbore/rbpf_mtt", "max_stars_repo_head_hexsha": "fa522f69455647d87ff0dbd401cb6a9026748825", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
import numpy as np from matplotlib import pylab as plt import joblib from matplotlib import animation import json import sys filename_result="result/test.jbl" filename_obs="data/pack_data_emit_test.npy" filename_mask="data/pack_mask_emit_test.npy" filename_info="data/pack_info.json" pid_key="pid_list_test" out_dir="pl...
{"hexsha": "af3149e49a394a11386446dce31acc8f951707d0", "size": 2017, "ext": "py", "lang": "Python", "max_stars_repo_path": "adw_test/script/plot_orbit.py", "max_stars_repo_name": "clinfo/DeepKF", "max_stars_repo_head_hexsha": "ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# Options tire_model = "nonlinear"; # "none" || "linear" || "nonlinear" nonlinear_acceleration_constraints = "on" vertical_tire_force_constraints = "on" #integration_scheme = :backward_euler integration_scheme = :trapazoidal obstacle_exists = "true" plotting = "false" steps = 50; # size of t_solve execution_horizon =...
{"hexsha": "20ee9c05a6ea1230201e7be5063b595f2884c5dd", "size": 680, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/sharedControl/senarios/s1.jl", "max_stars_repo_name": "shreysud/MAVs.jl", "max_stars_repo_head_hexsha": "0cc63a6fe81f0d6bb674be269459f29e3c93c133", "max_stars_repo_licenses": ["MIT"], "max_...
import os import numpy as np import json import tensorflow as tf import keras.backend as k from keras.layers import Dense, Activation from keras.layers import InputLayer, Input from keras.models import Sequential, Model, load_model from keras.layers import concatenate from keras.optimizers import Adam from keras.callb...
{"hexsha": "ca32abcbaf63513867f60f7d10d9ef8336e78d23", "size": 4939, "ext": "py", "lang": "Python", "max_stars_repo_path": "Train_DisNet.py", "max_stars_repo_name": "volpepe/DisNet", "max_stars_repo_head_hexsha": "c6fe25d9640ac69380f21bd193cbfebd6643905b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 27, "max...
""" Drawing plots """ import logging from abc import ABCMeta, abstractmethod, abstractproperty import matplotlib.pyplot as plt import matplotlib.ticker as plticker import numpy as np from scipy.stats.mstats import gmean from core import prepare from core import styles from config import Config class FexPlot: __...
{"hexsha": "2ba724218729262ae308d56ea1803dc948f9ea06", "size": 13779, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/draw.py", "max_stars_repo_name": "tudinfse/intel_mpx_explained", "max_stars_repo_head_hexsha": "9a3d7b060742d8fe89c1b56898f2b2e3617b670b", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# export readmseed, readmseed! function seed_cleanup!(S::SeisData, BUF::SeisIOBuf) trunc_x!(S) fill!(getfield(BUF, :hdr_old), zero(UInt8)) setfield!(BUF, :r1_old, zero(Int16)) setfield!(BUF, :r2_old, zero(Int16)) return nothing end function parsemseed!(S::SeisData, sid::IO, v::Int64, nx_new::Int64, nx_add::...
{"hexsha": "b2954f571531f465d6e214ea2d767475ab2d304e", "size": 766, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Submodules/SEED/readmseed.jl", "max_stars_repo_name": "UnofficialJuliaMirror/SeisIO.jl-b372bb87-02dd-52bb-bcf6-c30dd83fd342", "max_stars_repo_head_hexsha": "ae4ddd969c4c42281f36e218d5d3039af6c31...
import os import numpy as np import torch import torch.nn as nn from torch.utils.data import DataLoader import torchvision.transforms as transforms from torch.autograd import Variable import torch.optim as optim from torch.optim import lr_scheduler from CDNet2014Dataset import CDNet2014Dataset, Rescale, ToTensor from m...
{"hexsha": "2af860ad1eb99811fb20312760259f985b46c24d", "size": 2371, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_vid_model1.py", "max_stars_repo_name": "jrterven/backsub_py", "max_stars_repo_head_hexsha": "51cdb7298e9d792da012898d5ce143ae731e3881", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
"""Author: Brandon Trabucco, Copyright 2019""" import tensorflow as tf import numpy as np import matplotlib.pyplot as plt from mineral.distributions.gaussians.tanh_gaussian import TanhGaussian from mineral.networks import DensePolicy if __name__ == "__main__": policy = DensePolicy( [4], ...
{"hexsha": "92471294c51348f076a3be732317c8be75fd834f", "size": 982, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_policy.py", "max_stars_repo_name": "brandontrabucco/jetpack", "max_stars_repo_head_hexsha": "aa60488788b2e6fe1d09727943be043158a7af09", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
program write_01 implicit none write(*,*) "a", 2 write(*,*) write(*) a write(out_str,'(" Found index ", i9," but item is not in list.")') index write(out_string,*) 'Scalar_in = ', scalar_in write(out_string, 10) int_src, int_given, int_expected write(string,fmt='(f6.2)') max_angle write(fmt,'("(i",i0,".",i0,")")') n, ...
{"hexsha": "d94914540c159cc2426d34c7e878f5a72e4b91f5", "size": 794, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/write1.f90", "max_stars_repo_name": "Thirumalai-Shaktivel/lfortran", "max_stars_repo_head_hexsha": "bb39faf1094b028351d5aefe27d64ee69302300a", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/11/30 14:24 # @Author : uyplayer # @Site : uyplayer.pw # @File : pytorch_with_examples.py # @Software: PyCharm # dependency library import numpy as np # N is batch size; D_in is input dimension # H is hidden dimension; D_out is output ...
{"hexsha": "c43bc58c8a69fe5331176671d8099b9e5da2e1c5", "size": 1530, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch/pytorch_with_examples.py", "max_stars_repo_name": "uyplayer/machine_learning_notice", "max_stars_repo_head_hexsha": "9f6c4a9a5e278321611d9be1e8fa46bf9a1bd416", "max_stars_repo_licenses": [...
import numpy as np import pickle import os import sys NUM_ATTR_REL = 200 def cout_w(prob, num=NUM_ATTR_REL,dim=1): prob_weight = prob[:, :num] sum_value = np.sum(prob_weight, keepdims=True, axis=dim) + 0.1 prob_weight = prob_weight / np.repeat(sum_value, prob_weight.shape[dim], axis=dim) return prob_we...
{"hexsha": "c59e4795b6d3b3ebf551c6a78e57705cb258388b", "size": 2778, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/datasets/tools/compute_prior.py", "max_stars_repo_name": "Anqw/meta_edge", "max_stars_repo_head_hexsha": "3c4b138f85d0c2c13c6cc1ee71e621737b40525c", "max_stars_repo_licenses": ["AFL-1.1"], "ma...
import numpy as np import pandas as pd import pandas.util.testing as tm from pandas import (Index, DatetimeIndex, datetime, offsets, Float64Index, date_range, Timestamp) class TestDateTimeIndexToJulianDate(tm.TestCase): def test_1700(self): r1 = Float64Index([2345897.5, 2345898.5, 23...
{"hexsha": "6b0191edbda5a50830ffd5a2515334e3c17f5dda", "size": 14083, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandas/tests/indexes/datetimes/test_misc.py", "max_stars_repo_name": "tacaswell/pandas", "max_stars_repo_head_hexsha": "81c57e20da278494dfebc2f1043f5ff361a234f3", "max_stars_repo_licenses": ["PSF...
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2009-2012, Willow Garage, Inc. * Copyright (c) 2012-, Open Perception, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification...
{"hexsha": "10a8c641d15e2ada64b9be543e8bb6e0820231e2", "size": 35904, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "geometry/include/pcl/geometry/impl/mesh_circulators.hpp", "max_stars_repo_name": "zhangxaochen/CuFusion", "max_stars_repo_head_hexsha": "e8bab7a366b1f2c85a80b95093d195d9f0774c11", "max_stars_repo_l...
# Carregar o dataset MNIST # Obs: Este script é baseado na versão do livro http://neuralnetworksanddeeplearning.com/, com a devida autorização do autor. # Imports import pickle import gzip import numpy as np def load_data(): f = gzip.open('../data/processed/mnist.pkl.gz', 'rb') training_data, validation_data...
{"hexsha": "0925323e6f6f7dc40ab0eaf5edb5394e49fc51e0", "size": 1062, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/mnist_loader.py", "max_stars_repo_name": "lucmertins/CapDeepLearningBook", "max_stars_repo_head_hexsha": "e5959b552c8716e7fc65a21ae9c13c58509544c1", "max_stars_repo_licenses": ["MIT"], "ma...
import os import openai from decouple import config, Csv from .models import * import json import requests import re from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity from nltk.stem import WordNe...
{"hexsha": "2c54b7a43133a5222409fbee224eedf2a23535a6", "size": 5966, "ext": "py", "lang": "Python", "max_stars_repo_path": "planit/get_openai.py", "max_stars_repo_name": "Class-Planit/class-planit", "max_stars_repo_head_hexsha": "76df43c9a8b4e69b420ab9ae1d1eeb723ae4cccd", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import networkx as nx # type: ignore import networkx.algorithms.connectivity as nxc # type: ignore from collections.abc import Hashable, Iterable, Mapping, Callable from typing import Optional from itertools import chain from ..topology.coords import Topology, ECoord, NCoord from ..topology.graphs import en_connecti...
{"hexsha": "bd43ca473c08e621539d752517343e3b438aa19c", "size": 2859, "ext": "py", "lang": "Python", "max_stars_repo_path": "api/networkx.py", "max_stars_repo_name": "kbvw/network_topology_optimization", "max_stars_repo_head_hexsha": "76755bf10ca7536e9b567601e3139b1237354217", "max_stars_repo_licenses": ["MIT"], "max_st...
import tensorflow as tf import numpy as np import model_utils as mu import rnn_utils as ru def naive_model(params, examples, labels, epsilon): serp_len = params['serp_len'] doc_emb_size = params['doc_emb'][-1] docs = mu._get_doc_tensors(examples, params, 'main') result = {} n_docs = tf.shape(docs)[0] ind_...
{"hexsha": "c6dc832da6f5c334af31489a8b60fe99caa45c6f", "size": 8018, "ext": "py", "lang": "Python", "max_stars_repo_path": "models.py", "max_stars_repo_name": "HarrieO/RankingComplexLayouts", "max_stars_repo_head_hexsha": "53e8fdca3b2d4efffc2506423997e257f01ba094", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
[STATEMENT] lemma \<F>_semantics: "\<F> \<phi> w = {\<psi>. \<psi> \<in> subformulas\<^sub>\<mu> \<phi> \<and> w \<Turnstile>\<^sub>n F\<^sub>n \<psi>}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<F> \<phi> w = {\<psi> \<in> subformulas\<^sub>\<mu> \<phi>. w \<Turnstile>\<^sub>n F\<^sub>n \<psi>} [PROOF STEP]...
{"llama_tokens": 151, "file": "LTL_Master_Theorem_Logical_Characterization_Syntactic_Fragments_and_Stability", "length": 1}
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
{"hexsha": "7f201026d62a490fef51763fa4b982ed313333c2", "size": 2610, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/ut/python/parallel/test_scatter_update.py", "max_stars_repo_name": "peixinhou/mindspore", "max_stars_repo_head_hexsha": "fcb2ec2779b753e95c762cf292b23bd81d1f561b", "max_stars_repo_licenses":...
#include <iostream> #include <fstream> #include <random> #include <string> #include <errno.h> //Boost includes #include "constants.hpp" #include <boost/filesystem.hpp> using namespace std; using namespace boost::filesystem; static const path DIR_PATH{KEY_NAME_PATH}; static const char hexValues[16] = {'0','1','2','...
{"hexsha": "e2565af5652de7c42bf6daf0e17407261c2c16db", "size": 2816, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/agfs-keygen.cpp", "max_stars_repo_name": "robojeb/AgFS", "max_stars_repo_head_hexsha": "a0c8c20522bb4859a8efccfd513a47ed5e705461", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0, "ma...
\documentclass{article} \include{stddefs} \include{imodefs} \newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}} \begin{document} \chapterno{7} \chapter{Several variables} A function of several variables usually refers to a function \begin{equation}\label{semidef} f: \RR^n \rightarrow \RR, \end{equation} where ...
{"hexsha": "4406f9ed72c0fe1ecc06d49cff1b1ac39f3edab6", "size": 53724, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Notes/IMO21/diffseveral.tex", "max_stars_repo_name": "FunByJohn/QaDiL", "max_stars_repo_head_hexsha": "9e22bb061c5a2c32473c7ab3aa9b9cce4e98c963", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import os import shutil import dlib import cv2 import numpy as np """ Script to generate the dataset with the cutted coins images """ DATASETS_PATH = "datasets" OUTPUT_FOLDER_PATH = DATASETS_PATH + "/generated_datasets" def get_image_region(image, x1, y1, x2, y2): """ Return image subregion defined by (x1,...
{"hexsha": "16b60333be4006d3baccbbd68dd97e724315fc49", "size": 3072, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate_dataset.py", "max_stars_repo_name": "deeplearningunb/deep-coin", "max_stars_repo_head_hexsha": "273d544c3dc54dbe4697c437d37d5cf88c5b040e", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
from src.play.model.Game import Game from src.play.model.Game import WHITE, BLACK, EMPTY from src.play.model.Move import Move import random import numpy as np import copy import time from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.optimizers import RMSprop def b...
{"hexsha": "d516dde0ac7de15fe6342c453c0f46a8968dcd45", "size": 6435, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/learn/RL_Atari/train_harder_atari.py", "max_stars_repo_name": "benjaminaaron/GO_DILab", "max_stars_repo_head_hexsha": "20630d1a1d513a25de20b2edaeeac097a1b53be4", "max_stars_repo_licenses": ["M...
import hypothesis.extra.numpy as hnp import hypothesis.strategies as st import numpy as np from hypothesis import given from numpy.testing import assert_allclose, assert_array_equal import mygrad as mg from mygrad import Tensor from mygrad.nnet.layers.batchnorm import batchnorm def simple_batchnorm(x, gamma, beta, e...
{"hexsha": "98c71ace26b9521279a5d1deb79e93a6fdc1249f", "size": 3419, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/nnet/layers/test_batchnorm.py", "max_stars_repo_name": "aslvrstn/MyGrad", "max_stars_repo_head_hexsha": "df3f95ba4dc859951044296271e9b4668b42606a", "max_stars_repo_licenses": ["MIT"], "max_s...
[STATEMENT] lemma robdd_invar_subrobdds_set : assumes bs_OK: "\<And>b. b \<in> bs \<Longrightarrow> robdd_invar b" and b_in: "b \<in> subrobdds_set bs" shows "robdd_invar b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. robdd_invar b [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. robdd...
{"llama_tokens": 1336, "file": "Collections_Lib_Robdd", "length": 15}
function AdaptiveStepsizeIntegrator(arg0::JString, arg1::jdouble, arg2::jdouble, arg3::Vector{jdouble}, arg4::Vector{jdouble}) return AdaptiveStepsizeIntegrator((JString, jdouble, jdouble, Vector{jdouble}, Vector{jdouble}), arg0, arg1, arg2, arg3, arg4) end function AdaptiveStepsizeIntegrator(arg0::JString, arg1::...
{"hexsha": "3694cb5f812ababc7df8b038cfc9e3211a7a00b6", "size": 702, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "gen/HipparchusWrapper/OdeWrapper/NonstiffWrapper/adaptive_stepsize_integrator.jl", "max_stars_repo_name": "JuliaAstrodynamics/Orekit.jl", "max_stars_repo_head_hexsha": "e2dd3d8b2085dcbb1d2c75471dab4...
from seaice import * from firedrake import * import numpy as np import matplotlib.pyplot as plt from pathlib import Path path = "./output/srt-error-conv" Path(path).mkdir(parents=True, exist_ok=True) timestep = 1 dumpfreq = 10 ** 6 timescale = 10 zero = Constant(0) zero_vector = Constant(as_vector([0, 0])) norm_typ...
{"hexsha": "6b38c8c191924a795a528fedcf039e9e5969462d", "size": 2514, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/srt-error-conv.py", "max_stars_repo_name": "elma16/floe", "max_stars_repo_head_hexsha": "840c78758035af541374607b2686df9ac5d11ee0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import os import random import torch import torch.nn as nn import torch.nn.functional as F from torch.optim import Adam from torchvision.utils import save_image from tensorboardX import SummaryWriter import numpy as np from dataloader import get_loader from models.image_encoder import ImageEncoder from models.image_dec...
{"hexsha": "484956c6b5add8eb89ffbfbf179852ab563db8e5", "size": 20422, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "yizhiwang96/deepvecfont", "max_stars_repo_head_hexsha": "3ba4adb0406f16a6f387c5e12dd12286c9c341e8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 68, "m...
[STATEMENT] lemma components_eq_sing_iff: "components s = {s} \<longleftrightarrow> connected s \<and> s \<noteq> {}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (components s = {s}) = (connected s \<and> s \<noteq> {}) [PROOF STEP] apply (rule iffI) [PROOF STATE] proof (prove) goal (2 subgoals): 1. components s...
{"llama_tokens": 1211, "file": null, "length": 10}
import numpy as np from finta import TA class Strategy_RVWMA: def get_strategy_name(self): return "rvwma" def rolling_vwma(self, df, rolling_period): cv = df["close"] * df["volume"] r_cv = cv.rolling(rolling_period).sum() r_v = df["volume"].rolling(rolling_period).sum() ...
{"hexsha": "7fb6429bcf1d1d5b805e9438918b600f3f86f86d", "size": 1972, "ext": "py", "lang": "Python", "max_stars_repo_path": "strategy/strategy_rvwma.py", "max_stars_repo_name": "anels/autbot", "max_stars_repo_head_hexsha": "2e1be8a7e39da6fb2e535e55e93d4c23ffbb4c10", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# Choose number of agents num_agents = 7 # Define the world polygon (counter-clockwise) polyOutersp = [ 0.0 0.0; 3.0 0.0; 3.5 1.2; 3.5 2.0; 1.5 3.0; -0.5 2.0; -0.5 1.2; ]' # Define the obstacle (clockwise) polyInnersp...
{"hexsha": "c804c8a0d3028e19b33d30d5d5291fe5412c1e46", "size": 874, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "julia-scripts/degree_2_cyclic/setup.jl", "max_stars_repo_name": "gbarsih/Representations-in-Robotics", "max_stars_repo_head_hexsha": "0c9b43c4317e2157483dc6b8133f0b7e93107d7d", "max_stars_repo_licen...
#!/usr/bin/env python3 import caffe2.python.hypothesis_test_util as hu import hypothesis.strategies as st import numpy as np from caffe2.python import core, utils from hypothesis import given class TestAliasWithNameOp(hu.HypothesisTestCase): @given( shape=st.lists(st.integers(0, 5), min_size=1...
{"hexsha": "17bd36a2ac0067d80786fb3e591d700a897e80b1", "size": 969, "ext": "py", "lang": "Python", "max_stars_repo_path": "venv/Lib/site-packages/caffe2/python/operator_test/alias_with_name_test.py", "max_stars_repo_name": "Westlanderz/AI-Plat1", "max_stars_repo_head_hexsha": "1187c22819e5135e8e8189c99b86a93a0d66b8d8",...
import category_theory.epi_mono import category_theory.limits.shapes.pullbacks import category_theory.limits.shapes.binary_products import category_theory.limits.shapes.finite_limits import category_theory.limits.shapes.finite_products -- import category.kernel_pair import power universes v u open category_theory cat...
{"author": "b-mehta", "repo": "topos", "sha": "c9032b11789e36038bc841a1e2b486972421b983", "save_path": "github-repos/lean/b-mehta-topos", "path": "github-repos/lean/b-mehta-topos/topos-c9032b11789e36038bc841a1e2b486972421b983/src/equiv.lean"}
__author__ = 'jparedes' import os import zipfile from autoFIS_one_cv import autofis_onecv from numpy import mean, std def cv_onezip(path_databases, zip_file_name, parameters, path_output=0): if path_output == 0: path_output = path_databases zipFilePath = os.path.join(path_databases, zip_file_name) ...
{"hexsha": "e566ae98927d864c8b9a9ab05fdd94aba45f96a9", "size": 5134, "ext": "py", "lang": "Python", "max_stars_repo_path": "deprecated/ensemble/senfis/autoFIS/autoFIS/autoFIS_one_zip.py", "max_stars_repo_name": "lucasthim/auto-fuzzy", "max_stars_repo_head_hexsha": "1aa8f246973ad95c326e785f41614db0cb99b71c", "max_stars_...
#= Find local bindings Downstreams: completions.jl, goto.jl, datatip.jl, refactor.jl =# struct LocalBinding name::String verbatim::String span::UnitRange{Int64} line::Int expr::EXPR end struct LocalScope name::String verbatim::String span::UnitRange{Int64} line::Int children:...
{"hexsha": "ffa405844a04ec9bb0b7d8a5a89bcea73484b168", "size": 4732, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/static/local.jl", "max_stars_repo_name": "aminya/Atom.jl", "max_stars_repo_head_hexsha": "e7e2d2e77c42e817143c6a5aa2927dc87035c0b9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
(** * How to Add Laziness to a Strict Languages Without Even Being Odd *) (** ** 1 Introduction *) (** ** 2 Odd and even, with ease and difficulty *) From CoqMTL Require Import Control.Monad.Lazy. (** *** 2.1 The odd style, with ease *) (** This kind of streams is called odd because it contains odd number of c...
{"author": "wkolowski", "repo": "PapersFormalizations", "sha": "7654846acb0be54279c8bb5aaecf444ec2a51eb0", "save_path": "github-repos/coq/wkolowski-PapersFormalizations", "path": "github-repos/coq/wkolowski-PapersFormalizations/PapersFormalizations-7654846acb0be54279c8bb5aaecf444ec2a51eb0/How_to_Add_Laziness_to_a_Stric...
import math import elegy import jax import jax.numpy as jnp import typing as tp import einops import optax class Embedding(elegy.Module): def __init__(self, vocab_size: int, output_size: int): super().__init__() self.vocab_size = vocab_size self.output_size = output_size def call(self...
{"hexsha": "efc151c2dbf735bfd32768d566060d75784d54d1", "size": 2714, "ext": "py", "lang": "Python", "max_stars_repo_path": "tabular/models/config/catnet.py", "max_stars_repo_name": "cgarciae/tabular", "max_stars_repo_head_hexsha": "7a6a7a2c0fd6c3039b93b68fd26f953789def208", "max_stars_repo_licenses": ["MIT"], "max_star...
# Julia wrapper for header: /usr/include/libavutil/pixdesc.h # Automatically generated using Clang.jl wrap_c, version 0.0.0 export av_get_bits_per_pixel, av_get_padded_bits_per_pixel, av_pix_fmt_desc_get, av_pix_fmt_desc_next, av_pix_fmt_desc_get_id, av_pix_fmt_get_chroma_sub_sample, av_pi...
{"hexsha": "1a260c0cdc10841b69c70b9e8bacd64ac4fb39f0", "size": 6131, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ffmpeg/AVUtil/v56/pixdesc.jl", "max_stars_repo_name": "jonathan-durbin/VideoIO.jl", "max_stars_repo_head_hexsha": "0cf8d7eca3dc5c9f04dd86f2ac5217e253da36c7", "max_stars_repo_licenses": ["MIT"],...
# -*- coding: utf-8 -*- """ @file @brief Datasets from :epkg:`Eurostat`. """ import os import gzip import numpy import pandas import pyensae.datasource from pyquickhelper.loghelper import noLOG def table_mortalite_euro_stat( url="http://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?file...
{"hexsha": "2f48db6650d6b17e2c6d04a29954debd887dbf44", "size": 5270, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sparkouille/datasets/eurostat.py", "max_stars_repo_name": "sdpython/sparkouille", "max_stars_repo_head_hexsha": "6377a6c0f25ee89996b2d64b16b8ae616be38348", "max_stars_repo_licenses": ["MIT"], ...
from __future__ import print_function, division from collections import OrderedDict from itertools import product import math import numpy as np import json import csv import matplotlib.pyplot as plt from ballot_comparison import ballot_comparison_pvalue from fishers_combination import maximize_fisher_combined_pvalu...
{"hexsha": "fbd8161871a539af3b8c668270da1c0fad473b6b", "size": 37600, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code/suite_tools.py", "max_stars_repo_name": "umbernhard/SHANGRLA", "max_stars_repo_head_hexsha": "4d7cccf2e1b2db42aeb8098342f723044aa6741f", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_...
""" Module with the serialization api function and supporting classes. The goal is to store a pyface's task-based project. The implementation relies on a recursive class which selects the serializer needed based on the type of the object and splits the object content into a dictionary of data and a dictionary of numpy...
{"hexsha": "6148d1f79e0c9efdcbf9deafccb6d4ae3e49be61", "size": 15533, "ext": "py", "lang": "Python", "max_stars_repo_path": "app_common/apptools/io/serializer.py", "max_stars_repo_name": "KBIbiopharma/app_common", "max_stars_repo_head_hexsha": "bd913e24741fb070aad058a0f90cbb2c64d8b106", "max_stars_repo_licenses": ["MIT...
! Variables that all files may need access too ! For instance the outfile unit for writing to the main file ! module global_parameters_M implicit none !---Define floats integer, parameter :: dp=kind(0.d0) !---double precision integer, parameter :: sp=kind(1.0) !--- single precision !---Non...
{"hexsha": "f65340fdd4f2240829a74b7adac1a0a1404a2ffc", "size": 930, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/global_parameters_M.f90", "max_stars_repo_name": "ZanderUF/ANL_ptkin", "max_stars_repo_head_hexsha": "cd094a51b8349879968cc4c395928643c6c51411", "max_stars_repo_licenses": ["MIT"], "max_stars...
# 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 ...
{"hexsha": "8b37b18db9c74eb3fc63eff9a637eb199b65c387", "size": 9201, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_ncf.py", "max_stars_repo_name": "YvetteGuo/ncf_mxnet", "max_stars_repo_head_hexsha": "5f86390ac884b78cc115e75b5608ed24357e3f46", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
import cv2 import sys import numpy as np from gibson2.core.render.mesh_renderer.mesh_renderer_cpu import MeshRenderer from gibson2.core.render.mesh_renderer.get_available_devices import get_cuda_device try: import torch class MeshRendererG2G(MeshRenderer): """ Similar to MeshRenderer, but allo...
{"hexsha": "1b34415aed40667deb1cf39c94f088d43b70bfb7", "size": 3888, "ext": "py", "lang": "Python", "max_stars_repo_path": "gibson2/core/render/mesh_renderer/mesh_renderer_tensor.py", "max_stars_repo_name": "initmaks/iGibson", "max_stars_repo_head_hexsha": "9206643f31bf541b7e0d8267ac29019981a9a8b4", "max_stars_repo_lic...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
{"hexsha": "1f48bedb5ccfd43349f0d14020a503e0287ddba0", "size": 2952, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_models.py", "max_stars_repo_name": "STulling/cryptanalytic-model-extraction", "max_stars_repo_head_hexsha": "01bd3e6f46643e8ae3f9763fd808e11a094e034d", "max_stars_repo_licenses": ["Apache-2....
Require Import SpecDeps. Require Import RData. Require Import EventReplay. Require Import MoverTypes. Require Import Constants. Require Import CommonLib. Require Import TableDataOpsIntro.Spec. Require Import TableDataOpsRef2.Spec. Local Open Scope Z_scope. Section SpecLow. Definition table_destroy3_spec0 (g_rd: Po...
{"author": "columbia", "repo": "osdi-paper196-ae", "sha": "6df8f9e5b7b1e508a22327fd4a8c0c9be6c56496", "save_path": "github-repos/coq/columbia-osdi-paper196-ae", "path": "github-repos/coq/columbia-osdi-paper196-ae/osdi-paper196-ae-6df8f9e5b7b1e508a22327fd4a8c0c9be6c56496/proof/TableDataOpsRef3/LowSpecs/table_destroy3.v"...
\subsection{Determinants of 2x2 and 3x3 matrices} \subsubsection{The determinant of a 2x2 matrix} \(M=\begin{bmatrix}a & b\\c & d\end{bmatrix}\) \(|M|=ad-bc\) \subsubsection{The determinant of a 3x3 matrix} \(M=\begin{bmatrix}a & b & c\\d & e & f\\g & h & i\end{bmatrix}\) \(|M|=aei+bfg+cdh-ceg-dbi-afh\)
{"hexsha": "9c7c0b8cf13ccacf7787d08c44a104e872a7154d", "size": 313, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/pug/theory/algebra/linearSystemsOperations/05-04-determinants23.tex", "max_stars_repo_name": "adamdboult/nodeHomePage", "max_stars_repo_head_hexsha": "266bfc6865bb8f6b1530499dde3aa6206bb09b93", "...
import numpy as np import warnings from sklearn.model_selection import KFold, RepeatedKFold class DoubleMLResampling: def __init__(self, n_folds, n_rep, n_obs, apply_cross_fitting): self.n_folds = n_folds self.n_rep = n_rep ...
{"hexsha": "6e9f147ad042489f59fd00df6ac64eb2e986f15e", "size": 4608, "ext": "py", "lang": "Python", "max_stars_repo_path": "doubleml/_utils_resampling.py", "max_stars_repo_name": "SvenKlaassen/doubleml-for-py", "max_stars_repo_head_hexsha": "b3cbdb572fce435c18ec67ca323645900fc901b5", "max_stars_repo_licenses": ["MIT"],...
\subsection{Graphs of Trigonometric Functions} The graph of the functions $\sin x$ and $\cos x$ can be visually represented as: $$\includegraphics[width=4.0in]{images/sine-cosine}$$ Both $\sin x$ and $\cos x$ have domain $(-\infty,\infty)$ and range $[-1,1]$. That is, $$-1\leq\sin x\leq 1\qquad -1\leq\cos x\leq 1.$$ ...
{"hexsha": "a17734798620fa6d525736f35a74da77f75917b3", "size": 917, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "1-review/1-3-4-graphs-trig-functions.tex", "max_stars_repo_name": "TimAlderson/OpenCalc", "max_stars_repo_head_hexsha": "7d0110b6bc4ba42a6b911729420e1406296d6964", "max_stars_repo_licenses": ["CC0-1....
[STATEMENT] lemma while_square: "(x * x) \<star> y \<le> x \<star> y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x * x \<star> y \<le> x \<star> y [PROOF STEP] by (metis while_left_isotone while_mult_increasing while_right_plus)
{"llama_tokens": 102, "file": "Correctness_Algebras_Binary_Iterings", "length": 1}
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ## Copyright (c) 2022 megvii-model. All Rights Reserved. ##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ## Created by: Donny You, RainbowSecret ## Microsoft Research ## yuyua@microsoft.com ## Copyright (c) 2019 ## #...
{"hexsha": "8a21370a5af7fa1fe960a5cb2e083d0ec589549c", "size": 14249, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/loss/loss_helper.py", "max_stars_repo_name": "megvii-model/TEL", "max_stars_repo_head_hexsha": "a4bf602cdeea9f9d11711f79282922bd9dfbedbf", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...