text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
"""multimodel statistics. Functions for multi-model operations supports a multitude of multimodel statistics computations; the only requisite is the ingested cubes have (TIME-LAT-LON) or (TIME-PLEV-LAT-LON) dimensions; and obviously consistent units. It operates on different (time) spans: - full: computes stats on fu...
{"hexsha": "f76425e4715744fef656ac497beed6ed0e9f5dd7", "size": 12433, "ext": "py", "lang": "Python", "max_stars_repo_path": "esmvalcore/preprocessor/_multimodel.py", "max_stars_repo_name": "Peter9192/ESMValCore", "max_stars_repo_head_hexsha": "febd96a39480cc837afbf4e1f5b0ef61571af76a", "max_stars_repo_licenses": ["Apac...
#! python3 # -*- coding: utf-8 -*- """ ################################################################################################ Implementation of 'PROGRESSIVE GROWING OF GANS FOR IMPROVED QUALITY, STABILITY, AND VARIATION'## https://arxiv.org/pdf/1710.10196.pdf ...
{"hexsha": "7c5ba6b92ccb9bae556868e8b6c71ea1bf2a8d26", "size": 17816, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "shanexn/pytorch-pggan", "max_stars_repo_head_hexsha": "8cb7dd97b0f0fb6b147b0ef83e9121b8f5fb5fff", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "max...
import time import glob from common import gym_interface import pybullet as p import os import pybullet_data import gym import pybullet_envs import shutil import re import numpy as np import random env = gym_interface.make_env(robot_body=900, render=True)() obs = env.reset() env.env._p.setGravity(0,0,-1) a = env.actio...
{"hexsha": "4f9e55a47801e407d2cb2b2eb6f5055c87dcc8ca", "size": 570, "ext": "py", "lang": "Python", "max_stars_repo_path": "project/experiments/exp_016_arms/src/show_body_env.py", "max_stars_repo_name": "liusida/thesis-bodies", "max_stars_repo_head_hexsha": "dceb8a36efd2cefc611f6749a52b56b9d3572f7a", "max_stars_repo_lic...
# Copyright (c) 2018-2020, NVIDIA CORPORATION. from contextlib import ExitStack as does_not_raise from sys import getsizeof import cupy import numpy as np import pandas as pd import pyarrow as pa import pytest from cudf import concat from cudf.core import DataFrame, Series from cudf.core.column.string import StringCo...
{"hexsha": "b9d0f4279340470cce8d4456111058f3e3b2d2ce", "size": 67231, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/cudf/cudf/tests/test_string.py", "max_stars_repo_name": "eyal0/cudf", "max_stars_repo_head_hexsha": "b696d6064ba2b41be2a35fcdfa6fb4eebb4d3a9c", "max_stars_repo_licenses": ["Apache-2.0"], "...
section \<open>Less-Equal or Fail\<close> (* TODO: Move to Refinement Framework *) theory Refine_Leof imports Refine_Basic begin text \<open>A predicate that states refinement or that the LHS fails.\<close> definition le_or_fail :: "'a nres \<Rightarrow> 'a nres \<Rightarrow> bool" (infix "\<le>\<^sub>n" 50) wher...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Evaluation/Refine_Monadic/Refine_Leof.thy"}
using Documenter using Jedis makedocs( sitename="Jedis.jl Documentation", # format = Documenter.HTML(prettyurls = false), pages=[ "Home" => "index.md", "Client" => "client.md", "Commands" => "commands.md", "Pipelining" => "pipeline.md", "Pub/Sub" => "pubsub.md", ...
{"hexsha": "c59647fae30d2d5772a48d4501e41f659f9e67af", "size": 477, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "jacksoncalvert/Jedis.jl", "max_stars_repo_head_hexsha": "6df4c8f5da2d5841e8f0b7927894a5568cd6fc7e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "...
"""Module for saving data in a AssetStore friendly way""" ############################################################################## # # redsky by Billinge Group # Simon J. L. Billinge sb2896@columbia.edu # (c) 2016 trustees of Columbia University in the City of # ...
{"hexsha": "139a5479db1241d2fb8bdf98b39d7b572ba6c909", "size": 1817, "ext": "py", "lang": "Python", "max_stars_repo_path": "shed/savers.py", "max_stars_repo_name": "st3107/shed-streaming", "max_stars_repo_head_hexsha": "c632fc465d7e11fe0155fbc3e8add1965615dd51", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
import torch from torch.utils.data import Dataset import h5py import numpy as np from PIL import Image import heatmap_generator class Dataset(Dataset): def __init__(self, h5file,std_filename,mean_filename): with h5py.File(h5file, 'r') as hdf: # Get the data self.input_size = 3 ...
{"hexsha": "8aea7e5dd88f78026042823d2df84602103dd8e2", "size": 1075, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/model_source/v5.0.5/dataset.py", "max_stars_repo_name": "NicolasISEN/Facial_landmark_emotion_detection", "max_stars_repo_head_hexsha": "c7b8d7b0ea91a3496e3611bc1aab221709added4", "max_stars...
import os import sys sys.path.append(os.getcwd()) import h5py import common.vis_gui import torch import numpy as np import skimage.transform import time import enum import re from PyQt5.QtCore import * from PyQt5.QtWidgets import * import common.utils as utils import pyrenderer from volnet.netw...
{"hexsha": "6a839f3abe5abb7f05bdeb6f72763cb208c41325", "size": 14675, "ext": "py", "lang": "Python", "max_stars_repo_path": "applications/volnet/vis_volnet.py", "max_stars_repo_name": "khoehlein/fV-SRN", "max_stars_repo_head_hexsha": "601f3e952b090df92e875c233c2c9ca646523948", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import LinearSegmentedColormap def create_matrix(dots): max_x = get_maximum_list_tuples(dots, 0) max_y = get_maximum_list_tuples(dots, 1) matrix = np.zeros((max_y+1, max_x+1)) for (x,y) in dots: matrix[y][x] += 1 re...
{"hexsha": "35b829f31129b170bca9b808baf807c9aae0cb17", "size": 2596, "ext": "py", "lang": "Python", "max_stars_repo_path": "day 13/Martijn - Python/transparent_origami.py", "max_stars_repo_name": "AE-nv/aedvent-code-2021", "max_stars_repo_head_hexsha": "7ce199d6be5f6cce2e61a9c0d26afd6d064a86a7", "max_stars_repo_license...
import tweepy import os.path import sys import jsonpickle import tweets_analyser import pandas as pd import numpy as np import matplotlib.pyplot as plt import twitter_credentials import calendar import time # Replace the API_KEY and API_SECRET with your application's key and secret. API_KEY = twitter_credentials.CON...
{"hexsha": "43905b612f00592b1c36cbf15b67e4c0da7b60cf", "size": 3678, "ext": "py", "lang": "Python", "max_stars_repo_path": "NPP_tweets.py", "max_stars_repo_name": "Carlvinchi/MIA-GH-AI--Election_Prediction--2020", "max_stars_repo_head_hexsha": "36a9b9c573cc33c7126df924b01feb505216c4b3", "max_stars_repo_licenses": ["MIT...
#!/usr/bin/python import numpy as np from scipy.ndimage import correlate class CSC: 'Color Space Conversion' def __init__(self, img, csc): self.img = img self.csc = csc def execute(self): img_h = self.img.shape[0] img_w = self.img.shape[1] img_c = self.img.shape[2]...
{"hexsha": "96a2e072e1e1409302a94ae0e1b29e0764fa3ced", "size": 1339, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/csc.py", "max_stars_repo_name": "hdliu21/openISP", "max_stars_repo_head_hexsha": "30b0f20f689ef81df5a34639ccae5adbaa4bfa94", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
import numpy as np import matplotlib.pyplot as plt """ 1 Topic Introduction -------------------------- Given simultaneous nonlinear equations, find the roots using Newton-Rhapson. 2 Topic Theory/Approach -------------------------- Algebrically manipulate the given functions to find a function of: x...
{"hexsha": "c80cd83c41828f9bd0588e30ff4cd790989d374b", "size": 2406, "ext": "py", "lang": "Python", "max_stars_repo_path": "Examples/Simultaneous_nonlinear_equationsp2.py", "max_stars_repo_name": "atv32/Scientific-Computations", "max_stars_repo_head_hexsha": "d2796ccf05685d0da8e04fb8d4a34937a97177d9", "max_stars_repo_l...
from typing import Tuple import numpy as np from genrl.core.bandit import MultiArmedBandit class GaussianMAB(MultiArmedBandit): """ Contextual Bandit with categorial context and gaussian reward distribution :param bandits: Number of bandits :param arms: Number of arms in each bandit :param rewa...
{"hexsha": "116be04e92a33b4980b16d9c9dc54eadfeb6fdbf", "size": 1442, "ext": "py", "lang": "Python", "max_stars_repo_path": "genrl/agents/bandits/multiarmed/gaussian_mab.py", "max_stars_repo_name": "matrig/genrl", "max_stars_repo_head_hexsha": "25eb018f18a9a1d0865c16e5233a2a7ccddbfd78", "max_stars_repo_licenses": ["MIT"...
'`matflow_abaqus.main.py`' import numpy as np from abaqus_parse import materials from abaqus_parse.parts import generate_compact_tension_specimen_parts from abaqus_parse.steps import generate_compact_tension_specimen_steps from abaqus_parse.writers import write_inp from abaqus_parse.generate_MK_mesh import generate_MK...
{"hexsha": "ebaff0bb2d543a4dcdb7292a57a5738766b68712", "size": 6771, "ext": "py", "lang": "Python", "max_stars_repo_path": "matflow_abaqus/main.py", "max_stars_repo_name": "maria-yankova/matflow-abaqus", "max_stars_repo_head_hexsha": "387dd5654b586c014f7cdff26e844698192dd13b", "max_stars_repo_licenses": ["MIT"], "max_s...
# # Copyright (c) 2021, NVIDIA CORPORATION. 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 appl...
{"hexsha": "292e03f51b2cd42426969b94e8c6c06f9a73e649", "size": 4060, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/pytorch-quantization/tests/optim_helper_test.py", "max_stars_repo_name": "martellz/TensorRT", "max_stars_repo_head_hexsha": "f182e83b30b5d45aaa3f9a041ff8b3ce83e366f4", "max_stars_repo_licens...
# This is python script for Metashape Pro. Scripts repository: https://github.com/agisoft-llc/metashape-scripts # # Based on https://colab.research.google.com/github/tensorflow/lucid/blob/master/notebooks/differentiable-parameterizations/style_transfer_3d.ipynb # Modifications: # 1. Taking into account cameras position...
{"hexsha": "f224da8ff9a5ef200899d21524789844cef41a32", "size": 22320, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/model_style_transfer.py", "max_stars_repo_name": "rafulweber/metashape-scripts", "max_stars_repo_head_hexsha": "d38ff73e4a7879de5710c27f24149ad6554d4bab", "max_stars_repo_licenses": ["MIT"], ...
module comm use,intrinsic:: iso_fortran_env, only: stdout=>output_unit, stderr=>error_unit, wp=>real32, dp=>real64 implicit none public real(dp),parameter :: pi = 4._dp*atan(1._dp) real(dp),parameter :: deg2rad = pi/180._dp real(dp),parameter :: rad2deg = 180/pi integer, parameter :: npt=500 logical :: debug=.false...
{"hexsha": "2abef8e971691764e899c6ca140760b81c2b9191", "size": 415, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "dir.source/dir.include/comm.f90", "max_stars_repo_name": "space-physics/transcar", "max_stars_repo_head_hexsha": "a9305bd29723beb45004a8882627fa518d8a1bb6", "max_stars_repo_licenses": ["Apache-2....
(** Generated by coq-of-ocaml *) Require Import OCaml.OCaml. Local Set Primitive Projections. Local Open Scope string_scope. Local Open Scope Z_scope. Local Open Scope type_scope. Import ListNotations. Unset Positivity Checking. Unset Guard Checking. Inductive nat : Set := | O : nat | S : nat -> nat. Inductive natu...
{"author": "yalhessi", "repo": "lemmaranker", "sha": "53bc2ad63ad7faba0d7fc9af4e1e34216173574a", "save_path": "github-repos/coq/yalhessi-lemmaranker", "path": "github-repos/coq/yalhessi-lemmaranker/lemmaranker-53bc2ad63ad7faba0d7fc9af4e1e34216173574a/benchmark/clam/_lfind_clam_lf_goal33_distrib_100_plus_assoc/goal33con...
#include "mod_passauth/provider.hpp" #include <algorithm> #include <iterator> #include <iostream> #include <sstream> #include <boost/foreach.hpp> #include <boost/scope_exit.hpp> #include <boost/make_shared.hpp> #include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string.hpp> #include <boost/lexic...
{"hexsha": "29c7dd7de8b77741db8a8199a13aa840083bf66e", "size": 6283, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "provider.cpp", "max_stars_repo_name": "Trree/Apache_C-", "max_stars_repo_head_hexsha": "7c308b306bb4153f9d99a4e5a5cc33a208e91831", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null,...
import cv2 import mediapipe as mp import numpy as np from game.game import * import argparse import pygame import random import time from utils import * from body_part_angle import BodyPartAngle ## setup agrparse ap = argparse.ArgumentParser() ap.add_argument("-t", "--game_type", ...
{"hexsha": "aabfeb1d5375d4eede82a1610403b6682598a937", "size": 8793, "ext": "py", "lang": "Python", "max_stars_repo_path": "modelSelection.py", "max_stars_repo_name": "liuzihau/OutdoorAtHome", "max_stars_repo_head_hexsha": "aaf928c8e8e347b5ed9809e20b4536250236eca5", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
import nltk import numpy as np from flask import Flask, render_template, request from tensorflow.keras.models import load_model from src.api.Postprocessing import Postprocessing from src.api.PredictionPipeline import PredictionPipeline from src.api.Preprocessing import Preprocessing app = Flask(__name__, template_fol...
{"hexsha": "a5a4f7d31cb611f311825325ac9f83db485e1323", "size": 1869, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "ikrizanic/Twitter-Sentiment-Analysis", "max_stars_repo_head_hexsha": "08fda7f61f5f3e548cb1e65ec06aa35dc0489af3", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
################################################################################################# # Functions ################################################################################################# function get_ϕs_eff_rng(eff_type, config) # Pick max values if eff_type == "mml" ϕ1_max = [...
{"hexsha": "1a0f966025338fef15c856ee0f2ae99d000fd6aa", "size": 18273, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "calls/PaperSimulations/Aim-5/Aim-5-Source.jl", "max_stars_repo_name": "jordiabante/CpelNano.jl", "max_stars_repo_head_hexsha": "a5cd558b30113f05f93305a515ab24db8633e9a5", "max_stars_repo_licenses"...
/- Runs theorem naming evaluation. -/ import all import backends.bfs.openai import utils.util import evaluation section main meta structure TheoremNamingEvalResult : Type := (decl_nm : name) -- name of top-level theorem (i.e. ground truth) (decl_tp : expr) -- goal of top-level theorem (predictions : list (string ×...
{"author": "jesse-michael-han", "repo": "lean-tpe-public", "sha": "87c7bb8dfb8271d8fcf917aae0e731600c4f4c6c", "save_path": "github-repos/lean/jesse-michael-han-lean-tpe-public", "path": "github-repos/lean/jesse-michael-han-lean-tpe-public/lean-tpe-public-87c7bb8dfb8271d8fcf917aae0e731600c4f4c6c/src/tools/theorem_naming...
#!/usr/bin/env python # # Copyright 2019 DFKI GmbH. # # 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, merg...
{"hexsha": "ee6fa9127c704cb69a7b990879c76b5ebaf9086d", "size": 4682, "ext": "py", "lang": "Python", "max_stars_repo_path": "vis_utils/graphics/plot_manager.py", "max_stars_repo_name": "eherr/vis_utils", "max_stars_repo_head_hexsha": "b757b01f42e6da02ad62130c3b0e61e9eaa3886f", "max_stars_repo_licenses": ["MIT"], "max_st...
module RcSetup using Parameters import DataStructures: OrderedDict export Setup, Port, all_ports, OrderedDict module Port export PressPorts, all_ports @enum PressPorts in1 in2 in3 in4 out1 out2 out3 out4 ice1 ice2 ice3 ice4 const all_ports = [in1, in2, in3, in4, ice1, ice2, ice3, ice4, out1, out2, out3, out4] end "Dis...
{"hexsha": "b536cb8bb8e1690d5dad5404f2a575ecf094784f", "size": 1253, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/setup/RcSetup.jl", "max_stars_repo_name": "mauro3/RchannelImages.jl", "max_stars_repo_head_hexsha": "738ad3d318cebf1e2d3afebf16ad60f70b08a6cf", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
from data import Data import argparse import numpy as np import os import sys import matplotlib.pyplot as plt from power_law import y_function def main(args, imbalanced=False): print(args) dataObj = Data(dataset=args.dataset, args=args) if args.dataset == "IMAGENET": # Imagenet is loaded from args...
{"hexsha": "c4b1a6ee371d6914ef225765738803e25762a53f", "size": 7035, "ext": "py", "lang": "Python", "max_stars_repo_path": "al_utils/partition_data.py", "max_stars_repo_name": "PrateekMunjal/TorchAL", "max_stars_repo_head_hexsha": "ec60b093333c66e4c8862d128d81680060fddf36", "max_stars_repo_licenses": ["MIT"], "max_star...
# @package hubzero-simtool # @file params.py # @copyright Copyright (c) 2019-2021 The Regents of the University of California. # @license http://opensource.org/licenses/MIT MIT # @trademark HUBzero is a registered trademark of The Regents of the University of California. # import os import sys i...
{"hexsha": "8b5a02dcfd02499918134484933a60e627d9b129", "size": 24710, "ext": "py", "lang": "Python", "max_stars_repo_path": "simtool/params.py", "max_stars_repo_name": "hubzero/simtool", "max_stars_repo_head_hexsha": "8763a0cafbd608f36f156051d3cf44c679a23c5f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import re as re from typing import Union, Callable import numpy as np __author__ = "piveloper" __copyright__ = "26.03.2020, piveloper" __version__ = "1.0" __email__ = "piveloper@gmail.com" __doc__ = """This script includes helpful functions to extended PyOpenCl functionality.""" from pyopencl_extension.types.auto_ge...
{"hexsha": "45cfc287c00ebcfa8424b38b2c03e795b4545b83", "size": 7185, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyopencl_extension/types/utilities_np_cl.py", "max_stars_repo_name": "piveloper/pyopencl-extension", "max_stars_repo_head_hexsha": "0f9fede4cfbb1c3f6d99c5e0aa94feddb23a5d4c", "max_stars_repo_licen...
Traditionally a drinking establishment of AngloIrish background, but can mean any gentrified bar that also serves food and features live entertainment. In Davis de Veres Irish Pub In Sacramento Fox & Goose Pub Streets of London Pub Shady Lady Saloon
{"hexsha": "cf687f76dc69a49f061101f74c714dea8ffa97e1", "size": 271, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Pubs.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
import numpy as np def rand_uniform_bool(loc=0.5) -> bool: """ Generates a boolean derived from a uniform distribution biased towards the value of loc Args: loc: The bias, if higher tends towards producing false more and vice versa Returns: bool """ return np.random.uniform() > l...
{"hexsha": "fcf21d2b835b96b923105605c905d8977f865586", "size": 325, "ext": "py", "lang": "Python", "max_stars_repo_path": "opticverge/core/generator/bool_generator.py", "max_stars_repo_name": "opticverge/scikit-evolution", "max_stars_repo_head_hexsha": "fdd69468c0aacfba4c1ff82a6619f20abfd5f77b", "max_stars_repo_license...
import unittest import numpy as np try: import nifty except ImportError: nifty = None # TODO try importing from dsb # try: # from cremi_tools.metrics import adapted_rand, voi # except ImportError: # adapted_rand, voi = None, None class TestMatching(unittest.TestCase): # TODO implement download o...
{"hexsha": "f2286c0f8706525b04e65a5b57d31b23af996b02", "size": 1139, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/evaluation/test_matching.py", "max_stars_repo_name": "boykovdn/elf", "max_stars_repo_head_hexsha": "93e35509da82213e227f7abdbf88c8b5648e7674", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import pandas as pd import csv import numpy as np geiger = pd.DataFrame.from_csv('data/geiger_proteomics.csv') names = list({l.split(' ')[1][:-2]+'_geiger' for l in geiger.columns}) genes = pd.DataFrame.from_csv('data/human_length.csv').index geiger_out = pd.DataFrame(index=genes, columns=names) for i in np.arange(0,...
{"hexsha": "00bb95f92c5640482dd602ff74c4350d0ce6817e", "size": 890, "ext": "py", "lang": "Python", "max_stars_repo_path": "protein_length/split_geiger.py", "max_stars_repo_name": "dandanvidi/weighted-proteins", "max_stars_repo_head_hexsha": "1c3b8dc2b1a53404c59f5a443d3c14dbfcffac26", "max_stars_repo_licenses": ["MIT"],...
import numpy as np import salem import torch from combine2d.core.dynamics import run_forward_core def create_cost_func(gdir, data_logger=None, surface_noise=None, bed_measurements=None): """ Creates a cost function based on the glacier directory. Parameters ---------- gdir: ...
{"hexsha": "1cefe259308c51f62fa1bfe201cbcf46a8aaeaf3", "size": 18642, "ext": "py", "lang": "Python", "max_stars_repo_path": "combine2d/core/cost_function.py", "max_stars_repo_name": "phigre/cobi", "max_stars_repo_head_hexsha": "bb6cd9a49eb22862be6d87f0a2b0c8baf65cadb5", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
"""Object Detection task""" import copy import pickle import platform import logging import warnings import os import pandas as pd import numpy as np from autogluon.common.utils.log_utils import set_logger_verbosity, verbosity2loglevel from autogluon.core.utils import get_gpu_count_all from .._gluoncv import ObjectDet...
{"hexsha": "5b00e88d53ffbd876610b500d18c5ba2498bd38f", "size": 27452, "ext": "py", "lang": "Python", "max_stars_repo_path": "vision/src/autogluon/vision/detector/detector.py", "max_stars_repo_name": "huibinshen/autogluon", "max_stars_repo_head_hexsha": "18c182c90df89762a916128327a6792b8887c5c6", "max_stars_repo_license...
"""Landlab component that simulates potential evapotranspiration rate. Potential Evapotranspiration Component calculates spatially distributed potential evapotranspiration based on input radiation factor (spatial distribution of incoming radiation) using chosen method such as constant or Priestley Taylor. Ref: ASCE-EW...
{"hexsha": "4b967bc41018863990a01d5307ad003aca80caa4", "size": 2891, "ext": "py", "lang": "Python", "max_stars_repo_path": "landlab/components/pet/__init__.py", "max_stars_repo_name": "SiccarPoint/landlab", "max_stars_repo_head_hexsha": "4150db083a0426b3647e31ffa80dfefb5faa5a60", "max_stars_repo_licenses": ["MIT"], "ma...
import torch import torch.nn as nn import torch.nn.function as F from torch.autograd import Variable from torch import autograd from numpy import pi from numpy import log as np_log from base_neural_process import BaseNeuralProcess from distributions import sample_diag_gaussians, local_repeat log_2pi = np_log(2*pi) ...
{"hexsha": "f2d629eb61c01a0129ec8d5d8b4904f0cc632752", "size": 5495, "ext": "py", "lang": "Python", "max_stars_repo_path": "neural_processes/enc_free_neural_process.py", "max_stars_repo_name": "yifan-you-37/rl_swiss", "max_stars_repo_head_hexsha": "8b0ee7caa5c1fa93860916004cf4fd970667764f", "max_stars_repo_licenses": [...
"""Contains transition functions and corresponding helper functions. Below the signature and purpose of a transition function and its helper functions is explained with a transition function called example_func: > **example_func(** *states, params**)**: The actual transition function. Args: * states...
{"hexsha": "a1c0b95bbed7765f7475e593bb05df450e7d75c6", "size": 4570, "ext": "py", "lang": "Python", "max_stars_repo_path": "skillmodels/transition_functions.py", "max_stars_repo_name": "suri5471/skillmodels", "max_stars_repo_head_hexsha": "8ceeeae7892cbec859c5725e4e169f2b6d025be4", "max_stars_repo_licenses": ["BSD-2-Cl...
import numpy as np x = [] y = [] nrOfDegs = 15 wielomiany = [] with open("C:\\Users\\User\\Desktop\\Studia\\Jezyk C\\Zadania\\python\\w.txt", "r") as file1: for line in file1.readlines(): f_list = [float(i) for i in line.split("\t")] x.append(f_list[0]) y.append(f_list[1]) nr...
{"hexsha": "967c4edd8a3d74b56281dc7c5a21483a94ea69f4", "size": 1438, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/numerki_zad_20.py", "max_stars_repo_name": "Armillion/Exercises", "max_stars_repo_head_hexsha": "d20c1949a8b185305eb388e2b21bf52de5f438cb", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
""" Generate content wise reports for an aggregated, and status wise views """ import re import sys, time import os import requests import numpy as np import pandas as pd from datetime import date, datetime from pathlib import Path from string import Template from dataproducts.util.utils import get_tenant_info, creat...
{"hexsha": "5b8bac0ab6f6388496fdffcf20fb2e9cc798edbd", "size": 19408, "ext": "py", "lang": "Python", "max_stars_repo_path": "python-scripts/src/main/python/dataproducts/services/etb/content_progress.py", "max_stars_repo_name": "keshavprasadms/sunbird-data-products", "max_stars_repo_head_hexsha": "3e154484a5543976df537d...
import numpy as np import pandas as pd ENSEMBL_2_GENE_SYMBOLS = '/local/scratch/rv340/hugo/genes_ENSEMBL_to_official_gene.csv' def ENSEMBL_to_gene_symbols(ENSEMBL_symbols, file=ENSEMBL_2_GENE_SYMBOLS): def _ENSEMBL_to_gene_symbols(file): df = pd.read_csv(file, header=None) df.columns = ['ensemble...
{"hexsha": "1afd7e28168c7735958a6e0e0c23ae22c8f37fa1", "size": 2571, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/data_utils.py", "max_stars_repo_name": "899la/GTEx-imputation", "max_stars_repo_head_hexsha": "6272548f606877a030ac42138aa11cce079f1b13", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# -*- coding: utf-8 -*- """ Wrapper for evaluating different kernels """ import numpy as np from ..utils.log_util import LogInfo class Evaluator: def __init__(self, model, sess, ob_batch_num=100, show_detail=True): self.model = model self.sess = sess self.ob_batch_num = ob_batch_num ...
{"hexsha": "f84030aa59542da733aa6eb7077ef7d7ece1aeec", "size": 5955, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/kbqa/learner/evaluator.py", "max_stars_repo_name": "xuehuiping/TransDG", "max_stars_repo_head_hexsha": "ca55744594c5c8d6fe045bed499df72110880366", "max_stars_repo_licenses": ["MIT"], "max_star...
data Nat : Set where zero : Nat suc : Nat → Nat interleaved mutual data Even : Nat → Set data Odd : Nat → Set -- base cases: 0 is Even, 1 is Odd constructor even-zero : Even zero odd-one : Odd (suc zero) -- step case: suc switches the even/odd-ness constructor even-suc : ∀ {n} → Odd n...
{"hexsha": "9a2b124bed86aa312bef0696f2fd8ec2629d76fc", "size": 380, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Succeed/Issue2858-EvenOdd.agda", "max_stars_repo_name": "shlevy/agda", "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
# plots.py import pandas as pd import matplotlib.pyplot as plt from sklearn.manifold import TSNE import ast from util import Util import glob_conf import seaborn as sns import numpy as np class Plots(): def __init__(self): """Initializing the util system""" self.util = Util() def describe...
{"hexsha": "87458713afe4e4072d7764ef3c006d7a8f69a183", "size": 2432, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plots.py", "max_stars_repo_name": "bagustris/nkululeko", "max_stars_repo_head_hexsha": "87a4918b37e2a8599b81c4752c6750fc8adaa079", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
[STATEMENT] lemma invh_baldL_invc: "\<lbrakk> invh l; invh r; bheight l + 1 = bheight r; invc r \<rbrakk> \<Longrightarrow> invh (baldL l a r) \<and> bheight (baldL l a r) = bheight l + 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>invh l; invh r; bheight l + 1 = bheight r; invc r\<rbrakk> \<Lon...
{"llama_tokens": 233, "file": "Priority_Search_Trees_PST_RBT", "length": 1}
''' root/code/individual_definitions/individual_mutate.py Overview: overview of what will/should be in this file and how it interacts with the rest of the code Rules: mention any assumptions made in the code or rules about code structure should go here ''' ### packages from abc import ABC, abstractmethod from numpy ...
{"hexsha": "b5703a380f40f4fbbd8788e28f32046e2280a70f", "size": 4252, "ext": "py", "lang": "Python", "max_stars_repo_path": "codes/individual_definitions/individual_mutate.py", "max_stars_repo_name": "roddtalebi/ezCGP", "max_stars_repo_head_hexsha": "a93df7ae91fd5905df368661b86ae653c3d08869", "max_stars_repo_licenses": ...
include("./qol.jl") include("./timer.jl")
{"hexsha": "91c5c69fd2a7abb2a5ad58bda0eac7187f90068e", "size": 41, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utilities/utilitiesMain.jl", "max_stars_repo_name": "IsaacRudich/PnB_SOP", "max_stars_repo_head_hexsha": "4d28dc183bcb1427e68ed8d9d8f0030d195c10c1", "max_stars_repo_licenses": ["MIT"], "max_stars...
"""Observation Classes for BDGym Highway Env """ from typing import TYPE_CHECKING, List, Optional, Tuple import numpy as np from gym import spaces from highway_env.road.lane import AbstractLane from highway_env.envs.common.observation import \ KinematicObservation, ObservationType import bdgym.envs.utils as util...
{"hexsha": "62c96b1d0fc6e7967fd7bc1a262604049920ee2c", "size": 14964, "ext": "py", "lang": "Python", "max_stars_repo_path": "bdgym/envs/driver_assistant/observation.py", "max_stars_repo_name": "RDLLab/benevolent-deception-gym", "max_stars_repo_head_hexsha": "4d04e097609097e0f07c661aac221184ebdec2fe", "max_stars_repo_li...
SUBROUTINE DQDEV ( device, iunit, iatyp, iret ) C************************************************************************ C* DQDEV * C* * C* This subroutine returns the current plot device identifier, unit * C* number and access type. If no device is set, a blank is returned. * C* DEVICE has traditio...
{"hexsha": "828fea0bcfa7a69a7772631434033fdb31db700e", "size": 1561, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/gpltdev/control/dqdev.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause...
from distutils.core import Extension,setup from Cython.Build import cythonize import numpy ext_modules = [ Extension( "julia", ["julia.pyx"], include_dirs=[numpy.get_include()], ) ] setup( ext_modules=cythonize(ext_modules) )
{"hexsha": "13cc692892caf13e92961732515183160313ff4c", "size": 262, "ext": "py", "lang": "Python", "max_stars_repo_path": "Cython/vs_numba/setup.py", "max_stars_repo_name": "royqh1979/python_libs_usage", "max_stars_repo_head_hexsha": "57546d5648d8a6b7aca7d7ff9481aa7cd4d8f511", "max_stars_repo_licenses": ["MIT"], "max_s...
#! /usr/bin/env python # embedding_in_qt.py --- Simple Qt application embedding matplotlib canvases # # Copyright (C) 2005 Florent Rougon # # This file is an example program for matplotlib. It may be used and # modified with no restriction; raw copies as well as modified versions # may be distributed without limitatio...
{"hexsha": "311fd9e961f783827188cdd747fc7b195331e250", "size": 4389, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/user_interfaces/embedding_in_qt.py", "max_stars_repo_name": "pierre-haessig/matplotlib", "max_stars_repo_head_hexsha": "0d945044ca3fbf98cad55912584ef80911f330c6", "max_stars_repo_licenses...
function adjacency_structure = gr_adjacency_structure ( node_num, ... node_coordinates, edge_num, edge_nodes ) %*****************************************************************************80 % %% GR_ADJACENCY_STRUCTURE returns the adjacency structure of a graph. % % Discussion: % % Since we are using MATLAB, we...
{"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/graph_representation/gr_adjacency_structure.m"}
#!/usr/bin/python import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.colors as mcolors import tensorflow as tf from segnet import segnet from tensorflow.contrib.keras import backend as K from PIL import Image import numpy as np import pdb import cv2 from vis.visualization import v...
{"hexsha": "fbaee9d4c6815d0b08800fb8fe1ad4b381c03bfd", "size": 3692, "ext": "py", "lang": "Python", "max_stars_repo_path": "over_lay_filter_heatmap_nnpreimage.py", "max_stars_repo_name": "yukikawana/git_analyze", "max_stars_repo_head_hexsha": "9c143a954b09551dc48da35f6a0ef60cb1229e94", "max_stars_repo_licenses": ["MIT"...
from ase import * from gpaw import * from ase.io import * import numpy as npy xc='LDA' slab, calc = restart('out_LCAO_'+xc+'.gpw')#,txt = 'dos_out.txt') #e_fermi = calc.get_fermi_level() #num_at = slab.get_number_of_atoms() b=53 wf = calc.get_pseudo_wave_function(band=b) fname= 'wf_'+str(b)+'-HOMO.cube' print 'wri...
{"hexsha": "151c0bdaa2c2e64ec499728e625e65b115348ace", "size": 558, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/4N-coronene/plot_frontiers.py", "max_stars_repo_name": "Probe-Particle/PPSTM", "max_stars_repo_head_hexsha": "4434739bd737e58a2fc556dff24e8e7d6eab084e", "max_stars_repo_licenses": ["MIT"], "m...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import numpy as np import random import matplotlib.pyplot as plt n = int(input("Ile ruchów? ")) x = y = 0 lx = [0] ly = [0] for i in range(0, n): # wylosuj kąt i zamień go na radiany rad = float(random.randint(0, 360)) * np.pi / 180 x = x + np.cos(rad) # w...
{"hexsha": "8380d81065642e4a4c188256ec6c74ce39f77078", "size": 783, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/pylab/rbrowna03.py", "max_stars_repo_name": "damiankarol7/python101", "max_stars_repo_head_hexsha": "1978a9402a8fb0f20c4ca7bd542cb8d7d4501b9b", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# coding: utf-8 import numpy as np import matplotlib.pyplot as plt import matplotlib.pylab as pylab import matplotlib.cm as cm import scipy.misc from PIL import Image import scipy.io as sio import os import cv2 import time import pdb import numpy as np # Make sure that caffe is on the python path: caffe_root = '../../...
{"hexsha": "6a3c2c2f6f88f2137f19a6428d64f0975369e90d", "size": 2097, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ofnet/PIOD/deploy_ofnet_piod.py", "max_stars_repo_name": "buptlr/LuRui-OFNet", "max_stars_repo_head_hexsha": "e76937c8c24c6012cdf7edbbf09431d9ef7aa163", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python __author__ = 'Simon_2' # ====================================================================================================================== # Extract results from .txt files generated by " " and draw a plot comparing the automatic metric extraction method # (called "binary") to manua...
{"hexsha": "0c26250e3d1b12b6e9a98531288aa72f72cd1a5c", "size": 16394, "ext": "py", "lang": "Python", "max_stars_repo_path": "dev/atlas/validate_atlas/plot_auto_vs_manual.py", "max_stars_repo_name": "valosekj/spinalcordtoolbox", "max_stars_repo_head_hexsha": "266bfc88d6eb6e96a2c2f1ec88c2e185c6f88e09", "max_stars_repo_li...
import numpy from btypes.big_endian import * import gx import logging logger = logging.getLogger(__name__) class Header(Struct): magic = ByteString(4) section_size = uint32 shape_count = uint16 __padding__ = Padding(2) shape_offset = uint32 index_offset = uint32 unknown0_offset = uint32 ...
{"hexsha": "24e4ffc05a779618663a446a2d66005c4cf8a50f", "size": 9815, "ext": "py", "lang": "Python", "max_stars_repo_path": "j3d/shp1.py", "max_stars_repo_name": "blank63/j3dview", "max_stars_repo_head_hexsha": "498225e12119a9a2b4af9beed1be95f28d8410e2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 13, "max_st...
import json import os import numpy as np from tqdm import tqdm from mmhuman3d.core.conventions.keypoints_mapping import convert_kps from mmhuman3d.data.data_converters.base_converter import BaseConverter from mmhuman3d.data.data_converters.builder import DATA_CONVERTERS from mmhuman3d.data.data_structures.human_data ...
{"hexsha": "cb1f9108c341cf7ad9efffde1ec896bbc704ddbd", "size": 8908, "ext": "py", "lang": "Python", "max_stars_repo_path": "mmhuman3d/data/data_converters/pw3d_hybrik.py", "max_stars_repo_name": "ykk648/mmhuman3d", "max_stars_repo_head_hexsha": "26af92bcf6abbe1855e1a8a48308621410f9c047", "max_stars_repo_licenses": ["Ap...
# -*- coding: utf-8 -*- """ Created on Tue Aug 4 11:01:16 2015 @author: hehu """ import matplotlib.pyplot as plt import numpy as np from sklearn.neighbors import KNeighborsClassifier from sklearn.lda import LDA from sklearn.svm import SVC, LinearSVC from sklearn.linear_model import LogisticRegression from sklearn.na...
{"hexsha": "732eaf7f9aabea9b85ea5b8f89c8f70d75d596d9", "size": 5901, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/LRExample.py", "max_stars_repo_name": "mahehu/SGN-41007", "max_stars_repo_head_hexsha": "c8ed169a0a5f70fb87b99448e39a573c0df584b2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 61, ...
(* NIZK Proof System - Useful functions by Remi Bazin *) (* Imports *) Require Import Arith. Require Import NPeano. Require Import Le. Require Import List. (* Various utils *) Fixpoint repeat_fn (n:nat) (A:Type) (f:A -> A) (s:A) : A := match n with | O => s | S m => repeat_fn m A f (f s) end . Lemm...
{"author": "baz1", "repo": "GS-NIZK-Proofs", "sha": "4808405aedabcfa97cd3603f3a794c4015bfc455", "save_path": "github-repos/coq/baz1-GS-NIZK-Proofs", "path": "github-repos/coq/baz1-GS-NIZK-Proofs/GS-NIZK-Proofs-4808405aedabcfa97cd3603f3a794c4015bfc455/proofs/utils.v"}
import inspect import numpy as np def assert_shape(test, reference): assert test.shape == reference.shape, "Shape mismatch: {} and {}".format( test.shape, reference.shape) class ConfusionMatrix: """Helper class to hold confusion matrix values, so we don't have to recompute when evaluating multiple...
{"hexsha": "457a5c14368d603a502e76ec2c6cded7815df23f", "size": 16706, "ext": "py", "lang": "Python", "max_stars_repo_path": "probunet/eval.py", "max_stars_repo_name": "jenspetersen/probabilistic-unet", "max_stars_repo_head_hexsha": "ce4708045a3fa3c9d23d44300920e2177fea7140", "max_stars_repo_licenses": ["MIT"], "max_sta...
\section{Author contribution statement} TG proposed the research. JCHL developed the method of analysis. The idea to analyze the bid-ask spread impact was due to JCHL. JCHL carried out the analysis. Both authors contributed equally to analyzing the results and writing the paper. One of us (JCHL) acknowledges financia...
{"hexsha": "d426ec2759323ad93d06fef2e6e95b4b6454dcca", "size": 592, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "paper/forex_response_spread_paper/sections/10_paper_contributions.tex", "max_stars_repo_name": "juanhenao21/forex_response_spread_year", "max_stars_repo_head_hexsha": "251ccccfc9a49f546db5e325ea6b594...
using EndpointRanges using Test @testset "One dimensional" begin r1 = -3:7 r2 = 2:5 @test ibegin(r1) == -3 @test ibegin(r2) == 2 @test iend(r1) == 7 @test iend(r2) == 5 @test (ibegin+3)(r1) == 0 @test (ibegin+2)(r2) == 4 @test (iend+3)(r1) == 10 @test (iend-2)(r2) == 3 for...
{"hexsha": "ca1180dfc186196c330405e8c673feabd96d0dfb", "size": 1523, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/EndpointRanges.jl-340492b5-2a47-5f55-813d-aca7ddf97656", "max_stars_repo_head_hexsha": "95e0f790f11460cac4699e6e59fa1487289...
[STATEMENT] lemma polyadd_normh: "isnpolyh p n0 \<Longrightarrow> isnpolyh q n1 \<Longrightarrow> isnpolyh (polyadd p q) (min n0 n1)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>isnpolyh p n0; isnpolyh q n1\<rbrakk> \<Longrightarrow> isnpolyh (p +\<^sub>p q) (min n0 n1) [PROOF STEP] proof (induct p q arb...
{"llama_tokens": 43852, "file": "Taylor_Models_Polynomial_Expression", "length": 130}
""" Parse the incoming model into a standardized representation. """ import numpy as np from .parser_cb import parse_cb_ensemble from .parser_lgb import parse_lgb_ensemble from .parser_sk import parse_skhgbm_ensemble from .parser_sk import parse_skgbm_ensemble from .parser_sk import parse_skrf_ensemble from .parser_xg...
{"hexsha": "0062f2defcce873fd75c8a0b399d2d59e8afda01", "size": 2430, "ext": "py", "lang": "Python", "max_stars_repo_path": "tree_influence/explainers/parsers/__init__.py", "max_stars_repo_name": "jjbrophy47/tree_influence", "max_stars_repo_head_hexsha": "245ff369ed3f4df3ddba243c7e3172423f385505", "max_stars_repo_licens...
[STATEMENT] lemma infinite_psubset_coinduct[case_names infinite, consumes 1]: assumes "R A" assumes "\<And> A. R A \<Longrightarrow> \<exists> B \<subset> A. R B" shows "infinite A" [PROOF STATE] proof (prove) goal (1 subgoal): 1. infinite A [PROOF STEP] proof [PROOF STATE] proof (state) goal (1 subgoal): ...
{"llama_tokens": 390, "file": "Probabilistic_Timed_Automata_library_Basic", "length": 7}
import os import json import numpy as np import matplotlib.pyplot as plt def compute_iou(box_1, box_2): ''' This function takes a pair of bounding boxes and returns intersection-over- union (IoU) of two bounding boxes. ''' ''' BEGIN YOUR CODE ''' # print(box_1) tl_row_1,tl_col_1,br_r...
{"hexsha": "7a85d09bb45124bee7ec676265a8ecd665a3c74e", "size": 6474, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval_detector.py", "max_stars_repo_name": "ruillercoaster/caltech-ee148-spring2020-hw02", "max_stars_repo_head_hexsha": "606382394e9d2037e5989794d896b1d80f128987", "max_stars_repo_licenses": ["MIT...
# Parameterize by T so that way it can be Vector{Expression} which is defined after struct Operation <: AbstractOperation op::Function args::Vector{Expression} end # Recursive == function Base.:(==)(x::Operation,y::Operation) x.op == y.op && length(x.args) == length(y.args) && all(isequal.(x.args,y.args)) ...
{"hexsha": "6e5c53d4a1dc6a33f6364b5a917e9048173e41f2", "size": 2052, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/operations.jl", "max_stars_repo_name": "Vaibhavdixit02/ModelingToolkit.jl", "max_stars_repo_head_hexsha": "774217709e377733b10fb3ffe0671bd9a95ad24d", "max_stars_repo_licenses": ["MIT"], "max_st...
import torch import numpy as np from torch.utils.data import Dataset, DataLoader class MetaQADataSet(Dataset): def __init__(self, entity_embed_path, entity_dict_path, relation_embed_path, relation_dict_path, qa_dataset_path, split): """ create MetaQADataSet :param enti...
{"hexsha": "770008373683d2bbdf4251923e30de5931933c7a", "size": 9693, "ext": "py", "lang": "Python", "max_stars_repo_path": "relational_chain_reasoning_module/dataloader.py", "max_stars_repo_name": "albert-jin/Rec-KGQA", "max_stars_repo_head_hexsha": "38c6ca0980ce78a5b67b1cec75a0c40425de5440", "max_stars_repo_licenses":...
using LinearAlgebra X = randn(40_000,40_000); XX = X'X; XX1 = copy(XX) @time F1 = eigen(XX1) @show F1.values[end] XX2 = copy(XX) @time F2 = eigvals(XX2) @show F2[end] XX3 = copy(XX) @time F3 = LAPACK.syev!('N', 'U', XX3) #!! will change XX3 inplace @show F3[end] XX4 = copy(XX) using Arpack eigs(XX4,nev=1)[1][1]...
{"hexsha": "4dc9d95128bb2b1d73eb65d9703ab3abfcee0284", "size": 940, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "eigen.jl", "max_stars_repo_name": "zhaotianjing/JuliaTips", "max_stars_repo_head_hexsha": "29b1095563c28380924a6a436db55bee63a35e9c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_s...
import json import librosa import lws import numpy as np class LwsAudioProcessor: def __init__(self, audio_config): params = self._load_params(audio_config) self._params = params self._mel_basis = self._compute_mel_basis() self._lws_processor = self._build_lws_processor() @sta...
{"hexsha": "bdd043b7fca9ad132ec527c8d0aa27aa22ca262c", "size": 1856, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch/audio_lws.py", "max_stars_repo_name": "vladbataev/nv-wavenet", "max_stars_repo_head_hexsha": "2e16155cef2a460bb7862df674a1b8fa074a5cab", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
import numpy as np import torch from torch.autograd import Variable from receptor.core.rollout import Rollout, RolloutParallel from receptor.utils import discount_rewards def test_rollouts(): rollout = Rollout() obs = np.ones((2, 4, 3)) for i in range(10): rollout.add(obs * i, action=5, reward=1,...
{"hexsha": "f64495b904c59c09abeefe8ebabbed809fe2b81e", "size": 4582, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/core/test_rollout.py", "max_stars_repo_name": "dbobrenko/receptor", "max_stars_repo_head_hexsha": "b6447491250c1d41da704b989c751ff2c8a045e6", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# Simple model using double exponentials ```python from sympy import * ``` ```python from IPython.display import display, Markdown ``` ```python init_printing() ``` ```python t, P, e_r, e_d, delta_e, rho_e, g_e, i_r, i_d, delta_i, rho_i, g_i, b = symbols('t P \\tau_{er} \\tau_{ed} \\delta_e \\rho_e \\bar{g}_e \...
{"hexsha": "15a2914ebdf961755bf6d7b223dad29bd192fc41", "size": 356820, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "model/Model_double_exps.ipynb", "max_stars_repo_name": "elifesciences-publications/linearity", "max_stars_repo_head_hexsha": "777769212ac43d854d23d5b967c6323747c56c09", "max_stars_r...
from typing import Tuple, List, Any, Union import numpy as np import torch.nn as nn from iatransfer.toolkit.base_matching import Matching class DPMatching(Matching): """Dynamic programming matching algorithm for IAT. """ def match(self, from_module: List[Union[nn.Module, List[nn.Module]]], ...
{"hexsha": "4e23e96eaa8d1f0906e9f1c69c66eb1a31e1180e", "size": 5173, "ext": "py", "lang": "Python", "max_stars_repo_path": "iatransfer/toolkit/matching/dp_matching.py", "max_stars_repo_name": "KamilPiechowiak/iatransfer", "max_stars_repo_head_hexsha": "d7607662a2d2f7d1a16164c813e8721a0563552b", "max_stars_repo_licenses...
from datetime import datetime from io import BytesIO import numpy as np import streamlit as st from PIL import Image from pydicom import dcmread import constants as const import functions as fun st.set_page_config( page_title="CT Simulator", page_icon=":computer:", layout="wide", init...
{"hexsha": "d6c9c7cac1d46786259cb64b8127e6a043bcf48a", "size": 6776, "ext": "py", "lang": "Python", "max_stars_repo_path": "ct_simulator.py", "max_stars_repo_name": "xfredeq/CT-simulator", "max_stars_repo_head_hexsha": "b7cde915ed56fc6170c25f534d5cc4fd80217ba2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import argparse import numpy as np import models.ensemble as e import utils.load as l import utils.metrics as m import utils.wrapper as w def get_arguments(): """Gets arguments from the command line. Returns: A parser with the input arguments. """ # Creates the ArgumentParser parser =...
{"hexsha": "bae17f83cfa22d7f27fe4b757cd88fd629bd9dd6", "size": 2591, "ext": "py", "lang": "Python", "max_stars_repo_path": "ensemble_learning_with_umda.py", "max_stars_repo_name": "gugarosa/evolutionary_ensembles", "max_stars_repo_head_hexsha": "4f73f26bbdfd58bc06ba96fb4d22624dd5a65b5a", "max_stars_repo_licenses": ["MI...
theory Assertions imports "../Algebra/BBI" Heap "$ISABELLE_HOME/src/HOL/Eisbach/Eisbach" begin no_notation times (infixl "*" 70) and sup (infixl "+" 65) and bot ("\<bottom>") notation plus (infixl "+" 65) type_synonym 'a pred = "('a \<times> heap) set" (*****************************************************...
{"author": "victorgomes", "repo": "veritas", "sha": "d0b50770f9146f18713a690b87dc8fafa6a87580", "save_path": "github-repos/isabelle/victorgomes-veritas", "path": "github-repos/isabelle/victorgomes-veritas/veritas-d0b50770f9146f18713a690b87dc8fafa6a87580/SL/Assertions.thy"}
#!/opt/conda/envs/ih8life/bin/python # coding: utf-8 import sys import os import json import time from copy import deepcopy import matplotlib.pyplot as plt import numpy as np import cv2 import torch import torch.nn as nn from torch.utils.data import Dataset, DataLoader from torchvision import transforms, models gpu...
{"hexsha": "8d7c044b7d1f980a4d3708710c1d85df59b37d89", "size": 10500, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_model.py", "max_stars_repo_name": "rebeccaayu/masked-emotions", "max_stars_repo_head_hexsha": "dc3ebb935a245484d8a9ad1580ab1c44a7bfa322", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
#include <k52/optimization/params/continuous_parameters_array.h> #ifdef BUILD_WITH_MPI #include <boost/mpi.hpp> #include <boost/serialization/vector.hpp> #include <k52/parallel/mpi/constants.h> #endif #include <stdexcept> namespace k52 { namespace optimization { ContinuousParametersArray::ContinuousParametersArra...
{"hexsha": "ae1c2b2dd20e74075a67d4c9007ffc2208de2f7b", "size": 1649, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/optimization/params/continuous_parameters_array.cpp", "max_stars_repo_name": "wfoperihnofiksnfvopjdf/k52", "max_stars_repo_head_hexsha": "2bbbfe018db6d73ec9773f29e571269f898a9bc0", "max_stars_re...
import os import numpy as np import pytest from jina.flow import Flow from jina.proto import jina_pb2 from jina.types.ndarray.generic import NdArray from tests import validate_callback NUM_DOCS = 100 cur_dir = os.path.dirname(os.path.abspath(__file__)) @pytest.fixture def multimodal_documents(): docs = [] ...
{"hexsha": "9c52aa34263b31634800d65613184a194c50a4db", "size": 4090, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/integration/multimodal/test_multimodal_parallel.py", "max_stars_repo_name": "yuanl/jina", "max_stars_repo_head_hexsha": "989d0689353bbbcd2c7bf11928b652224c3d4bf7", "max_stars_repo_licenses":...
""" sum_gp(first_term, ratio, num_terms) Finds sum of n terms in a geometric progression # Input parameters - first_term : first term of the series - raio : common ratio between consecutive terms -> a2/a1 or a3/a2 or a4/a3 - num_terms : number of terms in the series till which we count sum # Example ```j...
{"hexsha": "8ed5455a8c3ce633840373e3e54670e0b39e0353", "size": 871, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/math/sum_of_geometric_progression.jl", "max_stars_repo_name": "Whiteshark-314/Julia", "max_stars_repo_head_hexsha": "3285d8d6b7585cc1075831c2c210b891151da0c2", "max_stars_repo_licenses": ["MIT"]...
# Standard Library import argparse import random # Third Party import mxnet as mx import numpy as np from mxnet import autograd, gluon from mxnet.gluon import nn import os def parse_args(): parser = argparse.ArgumentParser( description="Train a mxnet gluon model for FashonMNIST dataset" ) parser....
{"hexsha": "6a840a313ad44edb587209bc812639bcf2c41e5e", "size": 4778, "ext": "py", "lang": "Python", "max_stars_repo_path": "sagemaker-debugger/mxnet_spot_training/mxnet_gluon_spot_training.py", "max_stars_repo_name": "jpmarques19/tensorflwo-test", "max_stars_repo_head_hexsha": "0ff8b06e0415075c7269820d080284a42595bb2e"...
[STATEMENT] lemma Form_imp_wf_dbfm: assumes "Form x" obtains A where "wf_dbfm A" "x = \<lbrakk>quot_dbfm A\<rbrakk>e" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>A. \<lbrakk>wf_dbfm A; x = \<lbrakk>quot_dbfm A\<rbrakk>e\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis [PROOF STEP] by (metis as...
{"llama_tokens": 165, "file": "Incompleteness_Coding_Predicates", "length": 1}
using Test, LinearAlgebra using DiffEqSensitivity, StochasticDiffEq using ForwardDiff, Zygote using Random @info "SDE Non-Diagonal Noise Adjoints" seed = 100 Random.seed!(seed) tstart = 0.0 tend = 0.1 dt = 0.005 trange = (tstart, tend) t = tstart:dt:tend tarray = collect(t) function g(u,p,t) sum(u.^2.0/2.0) end ...
{"hexsha": "ba5dbe9656128d36e281b591d3a3c0530ece73cb", "size": 17948, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/sde_nondiag_stratonovich.jl", "max_stars_repo_name": "JuliaDiffEq/DiffEqSensitivity.jl", "max_stars_repo_head_hexsha": "4ca100b4c6dd87fb5a6c43abde500b61f04928d7", "max_stars_repo_licenses": [...
import pandas as pd import geopandas as gp import numpy as np from shapely.geometry import Point, LineString, MultiLineString def to2D(geometry): """Flatten a 3D line to 2D. Parameters ---------- geometry : LineString Input 3D geometry Returns ------- LineString Output 2D...
{"hexsha": "5e792f7ba106ee935edcf181cc684805f281be86", "size": 8102, "ext": "py", "lang": "Python", "max_stars_repo_path": "nhdnet/geometry/lines.py", "max_stars_repo_name": "brendan-ward/nhd-barriers", "max_stars_repo_head_hexsha": "4a469149456a15001db1ccd852924da08a71272c", "max_stars_repo_licenses": ["MIT"], "max_st...
import os import time from collections import OrderedDict import numpy as np from env.jaco.two_jaco import TwoJacoEnv from env.transform_utils import quat_dist, up_vector_from_quat, forward_vector_from_quat def cos_dist(a, b): return np.dot(a, b) / np.linalg.norm(a) / np.linalg.norm(b) class TwoJacoPickEnv(Tw...
{"hexsha": "43008f84ef3150c1cf235ac71d4f0d467b5a187b", "size": 15615, "ext": "py", "lang": "Python", "max_stars_repo_path": "env/jaco/primitives/two_jaco_pick.py", "max_stars_repo_name": "clvrai/coordination", "max_stars_repo_head_hexsha": "2b1bc8a6817b477f49c0cf6bdacd9c2f2e56f692", "max_stars_repo_licenses": ["MIT"], ...
import utils import data.vector data.list data.int.basic tactic.omega data.fin tactic.linarith tactic.apply open utils section grids open list class relative_grid (α : Type*) := (carrier : Type) (rows : α → ℕ) (cols : α → ℕ) (nonempty : Πg, rows g * cols g > 0) (data : Πg, fin (rows g)...
{"author": "frankSil", "repo": "CAExtensions", "sha": "f5c74fd9a806696c73497d9abd45b7315f45379f", "save_path": "github-repos/lean/frankSil-CAExtensions", "path": "github-repos/lean/frankSil-CAExtensions/CAExtensions-f5c74fd9a806696c73497d9abd45b7315f45379f/src/grid.lean"}
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 Takuma Yagi <tyagi@iis.u-tokyo.ac.jp> # # Distributed under terms of the MIT license. from __future__ import print_function from __future__ import division from six.moves import range import os import numpy as np import cv2 import m...
{"hexsha": "2fae8617056b27a3f302f817f1687323dc763fd1", "size": 19147, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/plot.py", "max_stars_repo_name": "takumayagi/fpl", "max_stars_repo_head_hexsha": "c357ee74c6ec9ef446f5e8a26b31215199a78602", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 51, "max_...
// Boost.Geometry // QuickBook Example // Copyright (c) 2020, Aditya Mohan // Use, modification and distribution is subject to 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) //[cross_product //` Calculate the cross product of two...
{"hexsha": "ca2906be120da7b8f052443f9dc63fe5328dfef8", "size": 1476, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "doc/src/examples/arithmetic/cross_product.cpp", "max_stars_repo_name": "jkerkela/geometry", "max_stars_repo_head_hexsha": "4034ac88b214da0eab8943172eff0f1200b0a6cc", "max_stars_repo_licenses": ["BSL...
#include <cradle/io/generic_io.hpp> #include <boost/numeric/conversion/cast.hpp> #include <boost/filesystem/operations.hpp> #include <boost/shared_array.hpp> #include <json/json.h> #include <cradle/date_time.hpp> #include <cradle/encoding.hpp> #include <cradle/io/compression.hpp> #include <cradle/io/crc.hpp> #includ...
{"hexsha": "380ab6ed8c502075824575643e6a555e572934fd", "size": 24353, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cradle/src/cradle/io/generic_io.cpp", "max_stars_repo_name": "dotdecimal/open-cradle", "max_stars_repo_head_hexsha": "f8b06f8d40b0f17ac8d2bf845a32fcd57bf5ce1d", "max_stars_repo_licenses": ["MIT"], ...
#! /usr/bin/env python # -*- encoding: utf-8 -*- import numpy as np import matplotlib import matplotlib.pyplot as plt # import matplotlib.mlab as mlab 已弃用 import scipy.stats import random np.random.seed(0) # 6.2 深入理解伯努利分布 def pro_test1(): # 二项分布实现例程 # 同时抛掷5枚硬币,出现正面朝上的次数——试验10次 print(np.random.binomial(5...
{"hexsha": "eb3297154d3661d49edcb8525c270ce628db94a4", "size": 15783, "ext": "py", "lang": "Python", "max_stars_repo_path": "six_probability.py", "max_stars_repo_name": "hollo08/stockstrategy", "max_stars_repo_head_hexsha": "09ece2457d653439a8ace80a6ac7dd4da9813846", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
function OneWayAnova() return OneWayAnova(()) end function anova_f_value(obj::OneWayAnova, arg0::Collection) return jcall(obj, "anovaFValue", jdouble, (Collection,), arg0) end function anova_p_value(obj::OneWayAnova, arg0::Collection) return jcall(obj, "anovaPValue", jdouble, (Collection,), arg0) end fun...
{"hexsha": "f873a05a9905d136539343ce9231c96a9ee56216", "size": 635, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "gen/HipparchusWrapper/StatWrapper/InferenceWrapper/one_way_anova.jl", "max_stars_repo_name": "JuliaAstrodynamics/Orekit.jl", "max_stars_repo_head_hexsha": "e2dd3d8b2085dcbb1d2c75471dab42d6ddf52c99",...
import pandas as pd import numpy as np from sklearn.preprocessing import LabelEncoder, OneHotEncoder from sklearn.metrics import confusion_matrix import matplotlib.pyplot as plt import tensorflow as tf from keras.models import Sequential from keras.optimizers import Adam from keras.layers import Conv2D, ZeroPadding2D, ...
{"hexsha": "a45d16c8b5744da268608df06450d19b3ad04583", "size": 4581, "ext": "py", "lang": "Python", "max_stars_repo_path": "Training CancerSiamese/MET500/MET_siam.py", "max_stars_repo_name": "MMostavi/CancerSiamese", "max_stars_repo_head_hexsha": "9538eafac489bd4d2fe8fc06b6a72b852ca0bb29", "max_stars_repo_licenses": ["...
!! Copyright (C) Stichting Deltares, 2012-2016. !! !! This program is free software: you can redistribute it and/or modify !! it under the terms of the GNU General Public License version 3, !! as published by the Free Software Foundation. !! !! This program is distributed in the hope that it will be useful, !! b...
{"hexsha": "e23f7c141ced88ab15afd20c024e826968280f3d", "size": 5019, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "docker/water/delft3d/tags/v6686/src/engines_gpl/waq/packages/waq_io/src/waq_io/check.f", "max_stars_repo_name": "liujiamingustc/phd", "max_stars_repo_head_hexsha": "4f815a738abad43531d02ac66f5bd0d...
# This Class utilizes the functions # from ds_utilites.py as methods of the class import pandas as pd class DsHelper(): # Classes usually use CamelCase DsUtilitesClass def __init__(self): # __init__ is defined but is empty. Use 'pass' if nothing is needed pass def enlarge(self, n): ...
{"hexsha": "89adcaa90210bf42fb50ba7236aed6b19aa2a055", "size": 8836, "ext": "py", "lang": "Python", "max_stars_repo_path": "my_lambdata/ds_utilities_class.py", "max_stars_repo_name": "JeffreyAsuncion/Lambdata-JeffreyAsuncion", "max_stars_repo_head_hexsha": "b325178e5e2580090e53b1f81074c7e0886dfccc", "max_stars_repo_lic...
# -*- coding: utf-8 -*- """ Created on Fri Jan 21 16:54:16 2022 @author: amasilva """ import duneevolution as devo import numpy as np # import matplotlib.pyplot as plt # ============================================================================= # Read the model results based on the information of th...
{"hexsha": "0d23e8c1cb7c1cdfc1146b2965212091ab8f0b22", "size": 3239, "ext": "py", "lang": "Python", "max_stars_repo_path": "Example.py", "max_stars_repo_name": "AnaNobre/Dune-Evolution", "max_stars_repo_head_hexsha": "e8bf33a2fb624ad2c15acad5fd586bf00113c257", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
from unittest import TestCase from pyksburden.genereader import GeneReader import os import logging import numpy as np logging.basicConfig(level=logging.DEBUG) class TestGeneReader(TestCase): def setUp(self): assert os.path.isdir('data') self.plink_file = 'data/chr22_rare_test_data' self...
{"hexsha": "35b6c006f6a0d8764855338bbe246eb2d0636952", "size": 769, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyksburden/tests/test_geneReader.py", "max_stars_repo_name": "rmporsch/pyksburden", "max_stars_repo_head_hexsha": "e9bdca6ffc472fca67b2c37acc940710d96cfd7b", "max_stars_repo_licenses": ["MIT"], "ma...
#include <glog/logging.h> #include <pcl/common/io.h> #include <pcl/common/time.h> #include <pcl/registration/correspondence_rejection_sample_consensus.h> #include <v4r/common/graph_geometric_consistency.h> #include <v4r/common/miscellaneous.h> #include <boost/graph/biconnected_components.hpp> #include <boost/gra...
{"hexsha": "8b1f45c041c3385bc5212952440fb1874d187979", "size": 35647, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "modules/common/src/graph_geometric_consistency.cpp", "max_stars_repo_name": "v4r-tuwien/v4r", "max_stars_repo_head_hexsha": "ff3fbd6d2b298b83268ba4737868bab258262a40", "max_stars_repo_licenses": ["...
[STATEMENT] lemma CARD_eq: "CARD('a) = nat n" [PROOF STATE] proof (prove) goal (1 subgoal): 1. CARD('a) = nat n [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. CARD('a) = nat n [PROOF STEP] have "CARD('a) = card (Abs ` {0..<n})" [PROOF STATE] proof (prove) goal (1 subgoal): 1. CARD('a) = card (...
{"llama_tokens": 795, "file": null, "length": 13}