text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# Copyright 2019 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
{"hexsha": "94c91d23d5b08c014857c20781ba4b7abe59f204", "size": 3712, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_feature_selection.py", "max_stars_repo_name": "AlexanderNenninger/mutual-information-feature-selection", "max_stars_repo_head_hexsha": "7ed4fa9c2f7928fbeb07fa442f9d9413697a1fe1", "max_s...
Require Import Basics. Require Import Types. Require Import Diagrams.Diagram. Require Import Diagrams.Graph. Require Import Diagrams.Cocone. Require Import Colimits.Colimit. (** * Colimit of the dependent sum of a family of diagrams *) (** Given a family diagram [D(y)], and a colimit [Q(y)] of each diagram, one can c...
{"author": "HoTT", "repo": "Coq-HoTT", "sha": "ab70acd360367dbda13d537748f792384fb882a3", "save_path": "github-repos/coq/HoTT-Coq-HoTT", "path": "github-repos/coq/HoTT-Coq-HoTT/Coq-HoTT-ab70acd360367dbda13d537748f792384fb882a3/theories/Colimits/Colimit_Sigma.v"}
import torch import numpy as np import torch.optim as optim from lib.utils.util import check_path, empty_folder from lib.utils.meter import AverageMeter from torch.nn import DataParallel from torch.backends import cudnn __all__ = ['NetBase'] class NetBase(object): def __init__(self, nClass, nCam, model_client, u...
{"hexsha": "98ea667f8cfa6ccc7ccdef44a74cd7ca072caa82", "size": 5664, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/network/model_factory/netbase.py", "max_stars_repo_name": "chenyanghungry/person-reid-lib", "max_stars_repo_head_hexsha": "783e66c9bfedf582e2cf935b9f5be960b543ac3c", "max_stars_repo_licenses":...
\documentclass[a4paper, 12pt]{report} \usepackage[T1]{fontenc} % \usepackage[icelandic]{babel} \usepackage{latexsym,amssymb,amsmath,amsthm} \usepackage{graphicx} \usepackage[colorlinks=true,linkcolor=black,anchorcolor=black,citecolor=black,filecolor=black,menucolor=black,runcolor=black,urlcolor=black]{hyperref} \usepa...
{"hexsha": "c428006a865ab3029f8e359f69778c11b34896e1", "size": 32753, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "notes/devjournal/development.tex", "max_stars_repo_name": "lvthnn/SimEVO", "max_stars_repo_head_hexsha": "6e4245bf25533f3de8f4393f93e9d0d9430fc162", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
from numpy import array, cross, dot, float64 from pynurbs.config import Settings from pynurbs.geometry.geom import Geometry from pynurbs.geometry.methods.evaluate import check_param from pynurbs.geometry.methods.geom_utils import (global_to_local_param, local_to_global_...
{"hexsha": "f9a26c1a41b49c65af8149d553059ae3250e2457", "size": 13235, "ext": "py", "lang": "Python", "max_stars_repo_path": "pynurbs/geometry/icurve.py", "max_stars_repo_name": "trelau/pyNURBS", "max_stars_repo_head_hexsha": "5dfd082fe368c1140ce485dc64b049b32c267d1f", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
''' Using OpenCV takes a mp4 video and produces a number of images. Requirements ---- You require OpenCV 3.2 to be installed. Run ---- Place file in same directory as filenames. Open the mp4_to_jpg.py and edit student name and filenames. Then run: $ cd <file_location> $ python mp4_to_jpg.py Which will produce a folder ...
{"hexsha": "0a1773cb5a8bd64b2b81fe7d9b7118d1711c446c", "size": 1716, "ext": "py", "lang": "Python", "max_stars_repo_path": "limited_parse.py", "max_stars_repo_name": "PRAkTIKal24/DeepFake_Classification", "max_stars_repo_head_hexsha": "de2c8d191145fc938cedb9de412ff2d949347272", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma subst_bv1_beta: "subst_bv1 s (length (T#Ts)) x \<rightarrow>\<^sub>\<beta> subst_bv1 t (length (T#Ts)) x \<Longrightarrow> typ_of1 Ts s = Some ty \<Longrightarrow> typ_of1 Ts t = Some ty \<Longrightarrow> s \<rightarrow>\<^sub>\<beta> t" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbr...
{"llama_tokens": 9277, "file": "Metalogic_ProofChecker_BetaNorm", "length": 32}
#!/usr/bin/env python """ Created on Thu Jan 23 10:43:35 2014 Author: Oren Freifeld Email: freifeld@csail.mit.edu """ import numpy as np #from scipy.linalg import expm from scipy.sparse.linalg import expm # scipy.linalg.expm is just a wrapper around this one. #from expm_hacked import expm #from scipy.sparse.linalg...
{"hexsha": "4874ee6a5b04c01ecb0b86a849226b8e7572ab41", "size": 2518, "ext": "py", "lang": "Python", "max_stars_repo_path": "cpab/cpa2d/calcs/_CpaCalcs.py", "max_stars_repo_name": "freifeld/cpabDiffeo", "max_stars_repo_head_hexsha": "22df6cdbd7111b9ae3e7f1c0e31ff85e92d281a6", "max_stars_repo_licenses": ["MIT"], "max_sta...
theory Turan imports "Girth_Chromatic.Ugraphs" "Random_Graph_Subgraph_Threshold.Ugraph_Lemmas" begin section \<open>Basic facts on graphs\<close> lemma wellformed_uverts_0 : assumes "uwellformed G" and "uverts G = {}" shows "card (uedges G) = 0" using assms by (metis uwellformed_def card.empty ex_in_c...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/Turans_Graph_...
""" scipy.interpolate module - [Interpolation (scipy.interpolate) Reference Guide](https://docs.scipy.org/doc/scipy/reference/interpolate.html) # Examples You can interpolate 1D data: ```julia-repl julia> x = collect(0:10); julia> y = exp.(-x/3.0); julia> f = SciPy.interpolate.interp1d(x, y); julia> f(0.5) 0-dimen...
{"hexsha": "7086f29ff736260c963104d11613e98050941dd2", "size": 1927, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/interpolate.jl", "max_stars_repo_name": "AtsushiSakai/SciPy.jl", "max_stars_repo_head_hexsha": "073706533f68989ccd761d813cd35593ea7c2a50", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python # coding: utf-8 import numpy as np import os from astropy.table import Table, vstack from collections import OrderedDict ## Import some helper functions, you can see their definitions by uncomenting the bash shell command from desispec.workflow.exptable import default_obstypes_for_exptable fr...
{"hexsha": "c41d804a676cf7f90456f43eda57f3627ee0a10f", "size": 19179, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/desispec/workflow/proctable.py", "max_stars_repo_name": "Waelthus/desispec", "max_stars_repo_head_hexsha": "8be844ef3734cb831558caf794d7258a4b7017cc", "max_stars_repo_licenses": ["BSD-3-Clause...
HEROKU = False if HEROKU: import os from random import randint import flask dropd_color = 'black' dropd_back = 'gray' import dash import dash_core_components as dcc import dash_html_components as html import dash_daq as daq from dash.dependencies import Input, Output, State, ALL, MATCH import plotly.grap...
{"hexsha": "c5b0b5ca64e6f95a7c9b2f86f8e7da7c13c72d0a", "size": 26447, "ext": "py", "lang": "Python", "max_stars_repo_path": "score/revised_score_analyze.py", "max_stars_repo_name": "SuperShinyEyes/Score-Tool", "max_stars_repo_head_hexsha": "907dd9e695c9950c6f168480e591a239cdf6a826", "max_stars_repo_licenses": ["MIT"], ...
(******************************************************************************* Project: Refining Authenticated Key Agreement with Strong Adversaries Module: Channels.thy (Isabelle/HOL 2016-1) ID: $Id: Channels.thy 132885 2016-12-23 18:41:32Z csprenge $ Author: Joseph Lallemand, INRIA Nancy <joseph.la...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Key_Agreement_Strong_Adversaries/Channels.thy"}
class step_by_step_brian_sim(object): ''' Step-by-Step Brian Simulation (Nov/2014 - ricardo.deazambuja@plymouth.ac.uk) This class was created to make it easier to run a Brian simulation step-by-step, passing input spikes without running out of memory or having to create the input spikes beforehan...
{"hexsha": "c5ecd0c741f35ca419260a44ed3aace85a022ba5", "size": 5572, "ext": "py", "lang": "Python", "max_stars_repo_path": "step_by_step_brian.py", "max_stars_repo_name": "ricardodeazambuja/IJCNN2017", "max_stars_repo_head_hexsha": "817165185de6152041bbaf21cbad6d12fb58f064", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python # -*- coding:utf-8 -*- #学習した場所領域のサンプルをrviz上に可視化するプログラム #作成者 石伏智 #作成日 2015年12月 #サンプリング点プロット→ガウスの概形描画に変更(磯部、2016卒論) #編集、更新:谷口彰 更新日:2017/02/10 #mu 2次元、sig 2×2次元版 #自己位置も取得して描画するのは別プログラム """ 実行前に指定されているフォルダが正しいかをチェックする file_read.pyも同様に ! 実行方法 python place_draw.py (parameterフォルダの絶対パス) (表示する場所領域を指定したい場...
{"hexsha": "6abcb5edf0cebd034b39b8b5354d3c7961299e97", "size": 12178, "ext": "py", "lang": "Python", "max_stars_repo_path": "learning/new_place_draw_online.py", "max_stars_repo_name": "a-taniguchi/SpCoSLAM_evaluation", "max_stars_repo_head_hexsha": "d24cbcc12a437d831049228ad1b80b22574c9ec0", "max_stars_repo_licenses": ...
[STATEMENT] lemma lhd_inf_llist [simp]: "lhd (inf_llist f) = f 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lhd (inf_llist f) = f 0 [PROOF STEP] by(simp add: inf_llist_def)
{"llama_tokens": 89, "file": "Coinductive_Coinductive_List", "length": 1}
import pandas as pd import numpy as np import plotly.graph_objects as go import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import dash_bootstrap_components as dbc import microdf as mdf import os from numerize import numerize from components im...
{"hexsha": "fbbe871350b8d25bb1ac09c88f585c79d2365bd8", "size": 42681, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "fedderw/us-calc", "max_stars_repo_head_hexsha": "36a4935122ab7688656f2e5dfcd3fe2cb5d88c8c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_stars_r...
\chapter{Miscellaneous Transformations} \section{Fresnel Term - Schlick's approximation} The \emph{Fresnel equations} describes the reflection and transmission of a electromagnetic wave at an interface. The Fresnel equation provides a reflection and transmission coefficients for waves. In Computer Graphics we often u...
{"hexsha": "d4f5fe3e19e39e9ff82e7dcf6ac5adccd8206859", "size": 4280, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "document/Source/Chapters/appendix.tex", "max_stars_repo_name": "simplay/Bachelor-Thesis", "max_stars_repo_head_hexsha": "ef450c5420b768b2a1fd84c9ad768f34db12fc88", "max_stars_repo_licenses": ["MIT"]...
import numpy as np import ast def newtonInterpolation(x, y): x = ast.literal_eval(x) y = ast.literal_eval(y) n = len(y) table = np.zeros([n, n]) # Create a square matrix to hold table table[::, 0] = y # first column is y results = {"table": [], "coefficient": []} results["tabl...
{"hexsha": "14b7cc3639476ce7acd8b507dbf62e2164b1947f", "size": 1268, "ext": "py", "lang": "Python", "max_stars_repo_path": "methods/newtonInterpolation.py", "max_stars_repo_name": "eechava6/NumericalAnalysis", "max_stars_repo_head_hexsha": "1b44349fe4c5e24413c3d5faeca7d227272814ec", "max_stars_repo_licenses": ["MIT"], ...
# Copyright (c) xiaoxuan : https://github.com/shawnau/kaggle-HPA # modified by sailfish009 import sys sys.path.append('../') import os import math import operator from functools import reduce from collections import Counter import numpy as np import pandas as pd from .ml_stratifiers import MultilabelStratifiedShuffle...
{"hexsha": "a948edbf64c48251f59fc659a9447dd6892630c6", "size": 5930, "ext": "py", "lang": "Python", "max_stars_repo_path": "custom/protein/preprocess.py", "max_stars_repo_name": "sailfish009/mydl", "max_stars_repo_head_hexsha": "ca2dfd1ff1b609dbd76ef966bbe53b7854f6f78f", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import sys logging.basicConfig( stream=sys.stdout, level=logging.DEBUG, format='%(asctime)s %(name)s-%(levelname)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S') from os.path import...
{"hexsha": "df41555b18281e7b1b5ce196861c57f7bd6e3924", "size": 6471, "ext": "py", "lang": "Python", "max_stars_repo_path": "string-method/src/stringprocessor/processing_utils.py", "max_stars_repo_name": "delemottelab/gpcr-string-method-2019", "max_stars_repo_head_hexsha": "b50786a4a8747d56ad04ede525592eb31f1890fd", "ma...
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import ring_theory.integrally_closed import ring_theory.valuation.integers /-! # Integral elements over the ring of integers of a valution The ring of integers is integrally...
{"author": "jjaassoonn", "repo": "projective_space", "sha": "11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce", "save_path": "github-repos/lean/jjaassoonn-projective_space", "path": "github-repos/lean/jjaassoonn-projective_space/projective_space-11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce/src/ring_theory/valuation/integral.lean"}
# Copyright 2017 Softplan # # 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, softw...
{"hexsha": "3b6e1c7678354b11c31463fa6993eb5863c91a8e", "size": 12266, "ext": "py", "lang": "Python", "max_stars_repo_path": "service.py", "max_stars_repo_name": "vinigomes/intellead-classification", "max_stars_repo_head_hexsha": "8a5ed549606288f906f07dd30096a50675c1c71c", "max_stars_repo_licenses": ["Apache-2.0"], "max...
# -*- coding: utf-8 -*- """ Created on Fri Apr 6 20:16:27 2018 @author: Isaac """ import numpy def sort_minimum(numbers): """ This is the description of the function ~ Loves it1 Parameters ---------- numbers : array array to sort Returns ------- ...
{"hexsha": "fed9ef8f001856e2169688de9d6bfcf2d9e1d59e", "size": 1247, "ext": "py", "lang": "Python", "max_stars_repo_path": "week6.py", "max_stars_repo_name": "IsaacW4/Operational-Research", "max_stars_repo_head_hexsha": "2f172a14e9302ea56a4beb8b0e334b84df7b406b", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
// 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": "67a2d1a7f824b63f7807dc7114448ed8d99819fe", "size": 35331, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/kudu/tools/tool_action_local_replica.cc", "max_stars_repo_name": "toddlipcon/kudu", "max_stars_repo_head_hexsha": "e5ee5e08c68c9c661ce676ad629b4ad3abf57def", "max_stars_repo_licenses": ["Apache-...
from collections import namedtuple import os import re from astropy import units as u from astropy.cosmology import FlatLambdaCDM import h5py import pandas as pd import numpy as np import numpy.ma as ma from numpy.random import default_rng from desc.skycatalogs.utils.common_utils import print_dated_msg __all__ = ['L...
{"hexsha": "dd5a0fe247d15b10c8c84d49eea5f17d5ed99650", "size": 15243, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/desc/skycatalogs/utils/sed_utils.py", "max_stars_repo_name": "LSSTDESC/skyCatalogs", "max_stars_repo_head_hexsha": "39807b6fb510e45d7db79cf903e2eaa59befa81b", "max_stars_repo_licenses": ["...
# Takes one dimensional time series, performs delay embedding one_d <-function(data, embed_dim = 4) { edata <- embed(data, embed_dim) return(edata) } #Takes time series and scales, either using max values or taking log pre_process <- function(data, scaling_method) { tmp <- data if (scaling_method ==...
{"hexsha": "57ecd679c85292cef58a7d54ceae8d8321665b6b", "size": 5523, "ext": "r", "lang": "R", "max_stars_repo_path": "Minor Project/TDA_Finance.r", "max_stars_repo_name": "sakshi-vats/tda-for-crypto", "max_stars_repo_head_hexsha": "8ffb690587f985b829ed507d0251715cd86bd265", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
#define BOOST_TEST_DYN_LINK #include <canard/net/ofp/v13/common/oxm_match_field.hpp> #include <boost/test/unit_test.hpp> #include <boost/test/data/test_case.hpp> #include <boost/test/data/monomorphic.hpp> #include <stdexcept> #include <boost/optional/optional.hpp> #include <boost/optional/optional_io.hpp> namespace o...
{"hexsha": "3388f17e6aa719dc1bcad044ae9fa7ebe5152911", "size": 2443, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/v13/oxm_match/ipv6_flabel_test.cpp", "max_stars_repo_name": "amedama41/bulb", "max_stars_repo_head_hexsha": "2e9fd8a8c35cfc2be2ecf5f747f83cf36ffbbdbb", "max_stars_repo_licenses": ["BSL-1.0"], "...
macro symbol_func(cur_expr::Expr) @assert cur_expr.head == :function cur_call = cur_expr.args[1] cur_func_name = cur_call.args[1] cur_main_var = cur_call.args[2].args[1] cur_param = Expr( :kw, Expr( :(::), :is_direct_call, :Bool ), false ) push!(cur_call.args, cur_pa...
{"hexsha": "78f26342f45b09dfb6f9e84335392001c6527f4b", "size": 520, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utils/symbol_func.jl", "max_stars_repo_name": "djsegal/Fusion.jl", "max_stars_repo_head_hexsha": "a0540fbf3345a778965fa092e9e56907a44c6521", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
""" Global Land Cover Facility GLCF MCD12Q1 http://glcf.umd.edu/data/lc/ """ import numpy as np import numpy.ma as ma import matplotlib.patches as mpatches CLASSES_NAMES = { 0: 'Water', 1: 'Evergreen needleleaf forest', 2: 'Evergreen broadleaf forest', 3: 'Deciduous needleleaf forest', 4: 'Deciduou...
{"hexsha": "aadde694a60dc5a2db07731f445d41be3b046a43", "size": 2011, "ext": "py", "lang": "Python", "max_stars_repo_path": "rastercube/datasources/glcf.py", "max_stars_repo_name": "terrai/rastercube", "max_stars_repo_head_hexsha": "c8c6214fd682f72e94df4979f5d737cea4778617", "max_stars_repo_licenses": ["MIT"], "max_star...
\graphicspath{ {img/BR/} } \chapter[Bandwidth Reservation as a Coexistence Strategy in Opportunistic Spectrum Access Environments][Bandwidth Reservation in OSA]{Bandwidth Reservation as a Coexistence Strategy in Opportunistic Spectrum Access Environments}\label{BR_chap} \section{Introduction}\label{sec:Introduction} ...
{"hexsha": "c56fa48405903aa4816320d6c3a17332261f5560", "size": 63731, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/BR.tex", "max_stars_repo_name": "Mario-LopezTelecom/phdTesis", "max_stars_repo_head_hexsha": "f71367a04c6fccbd7b804ce8fe9e15ee873ae28b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
!!### MODULE: PRINTING subroutine Grid2 MODULE PRN_Grid2 !!#### PURPOSE !! This subroutine prints a block of discrete function values !! F(1:Nx,1:Ny) provided at points on a regular grid, or just with indices !! if the values of <x(1:Nx)> and <y(1:Ny)> are not provided. !!#### FORTRAN STANDARDS USE ISO_varying_string ...
{"hexsha": "80d46635292664526614a0d9d7828c6228233cda", "size": 2453, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/09-B-PRN_Grid2.f90", "max_stars_repo_name": "wawiesel/tapack", "max_stars_repo_head_hexsha": "ac3e492bc7203a0e4167b37ba0278daa5d40d6ef", "max_stars_repo_licenses": ["Unlicense"], "max_stars_...
import pandas as pd import numpy as np from tracking_grants import ( articles_f, references_f, wos_f, altmetric_f, trials_f, awards_f, ) def load_references(): return pd.read_csv(references_f) def load_awards(): def research_topic(s): if pd.notna(s): primary_topi...
{"hexsha": "95faefc61a99f004eb28e86bc62191bc4f454600", "size": 6157, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tracking_grants/utils/helpers.py", "max_stars_repo_name": "ScholCommLab/tracking-grants", "max_stars_repo_head_hexsha": "6590b877c3be8c057412c3fe6f3d0a1ea1b4119e", "max_stars_repo_licenses": [...
using StructIO using Test # First, exercise the `@io` macro a bit, to ensure it can handle different # kinds of type declarations @io struct TwoUInts x::UInt y::UInt end abstract type AbstractType end @io struct ConcreteType <: AbstractType A::UInt32 B::UInt16 C::UInt128 D::UInt8 end align_pac...
{"hexsha": "29b61a3de27dc753417b11f0e1453708c0ae22be", "size": 4997, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "UnofficialJuliaMirror/StructIO.jl-53d494c1-5632-5724-8f4c-31dff12d585f", "max_stars_repo_head_hexsha": "455543ce2f240402fca7fe65622734ff8a2eda8f", "max_st...
import unittest class NumpyTest(unittest.TestCase): def test_numpy_is_importable(self): import numpy self.assertIsNotNone(numpy.nan)
{"hexsha": "5c77c1b01006b584008cc98099b9cae968591f89", "size": 156, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/python_rules/numpy_test.py", "max_stars_repo_name": "samwestmoreland/please", "max_stars_repo_head_hexsha": "1616742eeefca3dd0b3194e4c1ec9a8542ec13c7", "max_stars_repo_licenses": ["Apache-2.0"...
SUBROUTINE RCOVSL (NAME,ITEM,IN,AMAT,SCR2,SCR3,OUT,Z,IZ,LCORE, 1 FIRST,RFNO) C C RCOVSL CALCULATES THE STATIC LOAD VECTORS FOR THE SUBSTRUCTURING C PHASE 2 AND PHASE 3 OPERATIONS FROM THE SUBSTRUCTURE SOLN ITEM C LOGICAL FIRST INTEGER NAME(2),AMAT,...
{"hexsha": "587f6983097030cbc6cd2c1caba00662b47ba4ad", "size": 4405, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "mis/rcovsl.f", "max_stars_repo_name": "ldallolio/NASTRAN-95", "max_stars_repo_head_hexsha": "6d2c175f5b53ebaec4ba2b5186f7926ef9d0ed47", "max_stars_repo_licenses": ["NASA-1.3"], "max_stars_count": ...
import pandas as pd import torch import torch.optim as optim from torch.utils.data import Subset, DataLoader, TensorDataset from torchvision.transforms import ToTensor from typing import Union import numpy as np from torchvision.datasets.mnist import MNIST from src.AutoMLpy.optimizers.optimizer import HpOptimizer fro...
{"hexsha": "a79d46700fb890f7f6eb23f737f73fec11374039", "size": 5910, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/pytorch_items/pytorch_hp_optimizers.py", "max_stars_repo_name": "JeremieGince/AutoMLpy", "max_stars_repo_head_hexsha": "59c2214da0eb6e767446cc2157395c348fddff4e", "max_stars_repo_licenses": ...
[STATEMENT] lemma ct_prefixE [elim?]: assumes "ct_prefix xs ys" obtains as zs where "ys = as @ zs" "ct_list_eq as xs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>as zs. \<lbrakk>ys = as @ zs; ct_list_eq as xs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis [PROOF STEP] using assms [PROOF ST...
{"llama_tokens": 336, "file": "WebAssembly_Wasm_Checker_Types", "length": 3}
""" # F-1 Score for Multi-Class Classification ## Exercise problems Exercise 1. Prediction robots' performance comparison (Minsuk Heo 허민석, 2017)) robot1 = [[100, 80, 10, 10], [0, 9, 0, 1], [0, 1, 8, 1], [0, 1, 0, 9]] robot2 = [[198, 2, 0, 0], [7, 1, 0, 2], [0, 8, 1,...
{"hexsha": "e35822edb2320ec2581aabde31949bcc7e9134ed", "size": 1869, "ext": "py", "lang": "Python", "max_stars_repo_path": "Accuracy, precision, recall & f1/f1_score_exercise.py", "max_stars_repo_name": "CodingWillow/MachineLearning", "max_stars_repo_head_hexsha": "340c9d91d4178a2ab56921502bdcee73864a1a59", "max_stars_...
[STATEMENT] lemma nsqn_quality_increases_dhops [elim]: assumes "i\<in>kD(rt \<xi>)" and "quality_increases \<xi> \<xi>'" and "nsqn (rt \<xi>) i = nsqn (rt \<xi>') i" shows "the (dhops (rt \<xi>) i) \<ge> the (dhops (rt \<xi>') i)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. the (dhops (rt \<xi>'...
{"llama_tokens": 504, "file": "AODV_variants_c_gtobcast_C_Quality_Increases", "length": 3}
\section{Introduction} \subsection{System Purpose} RAVEN is a flexible and multi-purpose uncertainty quantification (UQ), regression analysis, probabilistic risk assessment (PRA), data analysis and model optimization software. Depending on the tasks to be accomplished and on the probabilistic characterization of t...
{"hexsha": "0ede679642ba6c8de8841a283b6d4f376858e5c9", "size": 5504, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/sqa/sdd/ravenIntro.tex", "max_stars_repo_name": "rinelson456/raven", "max_stars_repo_head_hexsha": "1114246136a2f72969e75b5e99a11b35500d4eef", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import os import keras import numpy as np import tensorflow as tf from keras.models import load_model from keras.preprocessing import image from keras.preprocessing.image import ImageDataGenerator from keras.layers import Conv2D from keras.layers import MaxPooling2D from keras.layers import Flatten from keras.layer...
{"hexsha": "3d9372ff9785c26fc6184ce34d971ac573b90444", "size": 4971, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/train_model.py", "max_stars_repo_name": "Parakconcepts/mlclassification", "max_stars_repo_head_hexsha": "e364f3ce50d4e1199a5b6233c0b44b3d674b25d3", "max_stars_repo_licenses": ["MIT"], "max_s...
[STATEMENT] lemma ord_option_Some1_iff: "ord_option R (Some a) y \<longleftrightarrow> (\<exists>b. y = Some b \<and> R a b)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ord_option R (Some a) y = (\<exists>b. y = Some b \<and> R a b) [PROOF STEP] by (cases y; auto)
{"llama_tokens": 112, "file": "Markov_Models_ex_MDP_RP", "length": 1}
import itertools as it import os import tempfile import xml.etree.ElementTree as ET from typing import Any, List, Optional, Tuple, Type from collections import OrderedDict import gym from gym.spaces import Dict, Box import numpy as np from mujoco_maze import maze_env_utils, maze_task from mujoco_maze.agent_model impor...
{"hexsha": "dff853883d82dd33b74a60da2f0b0190a7f3825b", "size": 3956, "ext": "py", "lang": "Python", "max_stars_repo_path": "mujoco_maze/goal_maze_env.py", "max_stars_repo_name": "jypark0/mujoco-maze", "max_stars_repo_head_hexsha": "da477ecbf3451fd7cf907b83f03664a6e5358bcc", "max_stars_repo_licenses": ["Apache-2.0"], "m...
# This README was generated directly from # [this source file](https://github.com/fredrikekre/Literate.jl/blob/master/examples/README.jl) # running these commands from the package root of Literate.jl:
{"hexsha": "376faa4235df87347d9dd8a78067db9172667115", "size": 202, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/readme.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/FocusedBlindDecon.jl-3b47aaff-9524-5d9d-a292-eeb6a187c032", "max_stars_repo_head_hexsha": "071e0f915cb96768f34f359d448804faaef...
"""Mean covariance estimation.""" from copy import deepcopy import numpy as np from .base import sqrtm, invsqrtm, logm, expm from .ajd import ajd_pham from .distance import distance_riemann from .geodesic import geodesic_riemann def _get_sample_weight(sample_weight, data): """Get the sample weights. If none...
{"hexsha": "bbfba00ada95ca4b323dab1489addc7b7c3e9bf4", "size": 13774, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyriemann/utils/mean.py", "max_stars_repo_name": "qbarthelemy/pyRiemann", "max_stars_repo_head_hexsha": "b35873b0a6cf9d81a1db09bbedb72a2fefe7d0c3", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
[STATEMENT] lemma finfun_snd_comp_conv: "finfun_snd (f \<circ>$ g) = (snd \<circ> f) \<circ>$ g" [PROOF STATE] proof (prove) goal (1 subgoal): 1. finfun_snd (f \<circ>$ g) = (snd \<circ> f) \<circ>$ g [PROOF STEP] by(simp add: finfun_snd_def)
{"llama_tokens": 118, "file": "FinFun_FinFun", "length": 1}
/- Copyright (c) 2021 Eric Rodriguez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Rodriguez -/ import ring_theory.polynomial.cyclotomic.basic import tactic.by_contra import topology.algebra.polynomial import number_theory.padics.padic_norm /-! # Evaluating cy...
{"author": "Mel-TunaRoll", "repo": "Lean-Mordell-Weil-Mel-Branch", "sha": "4db36f86423976aacd2c2968c4e45787fcd86b97", "save_path": "github-repos/lean/Mel-TunaRoll-Lean-Mordell-Weil-Mel-Branch", "path": "github-repos/lean/Mel-TunaRoll-Lean-Mordell-Weil-Mel-Branch/Lean-Mordell-Weil-Mel-Branch-4db36f86423976aacd2c2968c4e4...
import numpy as np import jax import jax.numpy as jnp import jax.scipy as jsp import jaxtorch import math def alpha_sigma_to_t(alpha, sigma): return jnp.arctan2(sigma, alpha) * 2 / math.pi def get_cosine_alphas_sigmas(t): return jnp.cos(t * math.pi/2), jnp.sin(t * math.pi/2) def get_ddpm_alphas_sigmas(t, in...
{"hexsha": "5b704328fc842b579ff0350df5841f51cd3ef233", "size": 3040, "ext": "py", "lang": "Python", "max_stars_repo_path": "jax-diffusion/jax-guided-diffusion/diffusion_models/schedules.py", "max_stars_repo_name": "Baughn/nixgan", "max_stars_repo_head_hexsha": "20639e37f8263187ef3928fa91974e9d9d0848d8", "max_stars_repo...
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Created By : Francisco Miras García <francisco.mirasg@gmail.com> # version ='1.0' # --------------------------------------------------------------------------- """ # Codigo para el ejercicio ACTIVIDAD 1.- Construye...
{"hexsha": "3c7a8a22a65bafe8f876f646fe66ee15cc2de4fc", "size": 7593, "ext": "py", "lang": "Python", "max_stars_repo_path": "2021-2022/Entregas/ACTIVIDAD.py", "max_stars_repo_name": "franciscomirasg/umucv", "max_stars_repo_head_hexsha": "703629d5152d55d00821aee02d30fbb3cca1b73e", "max_stars_repo_licenses": ["BSD-3-Claus...
#include <iostream> #include <string> #include <vector> #include <boost/lockfree/queue.hpp> #include "test/timed-throughput-fixture.h" #include "test/timed-throughput.h" #include "util/parse-cmd-line.h" #include "util/util.h" using boost::lockfree::queue; using std::string; using std::vector; using test::timed_throu...
{"hexsha": "d0beac22f1299a3fdf9188207a8178dd399c61c1", "size": 1060, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/boost-lockfree-queue-timed-test.cc", "max_stars_repo_name": "cookyt/parallel-multi-queue", "max_stars_repo_head_hexsha": "1543cc66815c7fbb4cd8e896ce2a9ce56e6213db", "max_stars_repo_licenses": ["U...
# coding: utf-8 # # 卷积神经网络示例与各层可视化 # In[1]: import os import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data get_ipython().magic(u'matplotlib inline') print ("当前TensorFlow版本为 [%s]" % (tf.__version__)) print ("所有包载入完毕") # ## 载入 MNIST #...
{"hexsha": "49a609df234971809a85e6b79debab66bf53284e", "size": 6151, "ext": "py", "lang": "Python", "max_stars_repo_path": "04_CNN_advances/cnn_mnist_simple.py", "max_stars_repo_name": "jastarex/DL_Notes", "max_stars_repo_head_hexsha": "4da8c5c90283d25655abde95263e44432aad343a", "max_stars_repo_licenses": ["Apache-2.0"...
// Copyright (c) 2001-2011 Hartmut Kaiser // // 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) #if !defined(BOOST_SPIRIT_KARMA_REAL_POLICIES_MAR_02_2007_0936AM) #define BOOST_SPIRIT_KARMA_REAL_POLICIES_MAR...
{"hexsha": "139856dbdbad2412a729355a61fd3bcbd67c8a97", "size": 16610, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "master/core/third/boost/spirit/home/karma/numeric/real_policies.hpp", "max_stars_repo_name": "importlib/klib", "max_stars_repo_head_hexsha": "a59837857689d0e60d3df6d2ebd12c3160efa794", "max_stars_r...
function [newnode,newelem,newelem0]=surfboolean(node,elem,varargin) % % [newnode,newelem,newelem0]=surfboolean(node1,elem1,op2,node2,elem2,op3,node3,elem3,...) % % merge two or more triangular meshes and resolve intersecting elements % % author: Qianqian Fang <fangq at nmr.mgh.harvard.edu> % % input: % node: node...
{"author": "vigente", "repo": "gerardus", "sha": "4d7c5195b826967781f1bb967872410e66b7cd3d", "save_path": "github-repos/MATLAB/vigente-gerardus", "path": "github-repos/MATLAB/vigente-gerardus/gerardus-4d7c5195b826967781f1bb967872410e66b7cd3d/matlab/ThirdPartyToolbox/Iso2meshToolbox/surfboolean.m"}
[STATEMENT] lemma conjugate_char_1: "conjugate f g \<longleftrightarrow> (\<forall>x y . f(x \<sqinter> -(g y)) \<le> f x \<sqinter> -y \<and> g(y \<sqinter> -(f x)) \<le> g y \<sqinter> -x)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. conjugate f g = (\<forall>x y. f (x \<sqinter> - g y) \<le> f x \<sqinter> -...
{"llama_tokens": 187, "file": "Stone_Algebras_P_Algebras", "length": 1}
import numpy as np import pandas as pd import torch import torchvision from am_utils.utils import walk_dir from torch.utils.data import DataLoader from torchvision.models.detection.faster_rcnn import FastRCNNPredictor from tqdm import tqdm from ..dataset.dataset_object_inference import DatasetObjectInference, DatasetO...
{"hexsha": "29fee7debf540ea734dd7914a8a88c2d382b7fc6", "size": 9089, "ext": "py", "lang": "Python", "max_stars_repo_path": "ml_utils/predict/predict_bbox.py", "max_stars_repo_name": "amedyukhina/ml_utils", "max_stars_repo_head_hexsha": "00176a015ff3b38f28637e66d4c89ec111247806", "max_stars_repo_licenses": ["Apache-2.0"...
function [normalized_speed, actual_speed] = normalize_speed(speed, failures, skipping, tracker, sequence) % normalize_speed Normalizes tracker speed estimate % % This function normalizes speed estimates based on performance profile and some information about % the way the measurement was obtained (sequence, number of ...
{"author": "votchallenge", "repo": "toolkit-legacy", "sha": "2fb78d5301dadc102fb329b3a3f1bb02c670e8ee", "save_path": "github-repos/MATLAB/votchallenge-toolkit-legacy", "path": "github-repos/MATLAB/votchallenge-toolkit-legacy/toolkit-legacy-2fb78d5301dadc102fb329b3a3f1bb02c670e8ee/analysis/normalize_speed.m"}
"""Errand OpenAcc backend module """ import os import numpy from errand.backend import CppBackendBase, cpp_varclass_template from errand.compiler import Compilers from errand.system import select_system from errand.util import which struct_template = """ typedef struct arguments {{ {args} }} ARGSTYPE; typede...
{"hexsha": "5fe6dec109aa859da5f214f20499ae74367bcfd4", "size": 8986, "ext": "py", "lang": "Python", "max_stars_repo_path": "errand/openacc_cpp.py", "max_stars_repo_name": "grnydawn/errand", "max_stars_repo_head_hexsha": "19c4fa4bb8c6698d56f2d671c1cba3ee070529ce", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
""" A basic cost function, where the computed cost is the size (number of children) of the current expression. """ function astsize(n::ENode, g::EGraph, an::Type{<:AbstractAnalysis}) cost = 1 + arity(n) for id ∈ n.args eclass = geteclass(g, id) !hasdata(eclass, an) && (cost += Inf; break) ...
{"hexsha": "ef189e8d9b2fa96203b41f64285a3f639661adb2", "size": 3239, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/EGraphs/extraction.jl", "max_stars_repo_name": "gpeairs/Metatheory.jl", "max_stars_repo_head_hexsha": "782469676fb01db5eb3dc5f385539830b9116bea", "max_stars_repo_licenses": ["MIT"], "max_stars_...
/* Copyright (c) 2014-15 Ableton AG, Berlin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
{"hexsha": "7f83bb443cdbb05f69696e9902a8dc02f98ea7cb", "size": 16211, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Convert.cpp", "max_stars_repo_name": "FMeinicke/aqt-stylesheets", "max_stars_repo_head_hexsha": "83a26ea9acfef80b98f126f2b706ee7f6175b42a", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_co...
/* * Copyright (C) 2014-2016 Open Source Robotics Foundation * * 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...
{"hexsha": "a3fd8a7b5e8a649f11007f3301e45705644dcb98", "size": 2016, "ext": "cc", "lang": "C++", "max_stars_repo_path": "gazebo/gui/BuildingEditor_TEST.cc", "max_stars_repo_name": "otamachan/ros-indigo-gazebo7-deb", "max_stars_repo_head_hexsha": "abc6b40247cdce14d9912096a0ad5135d420ce04", "max_stars_repo_licenses": ["E...
# TODO struct GEFile <: MRIFile filename::String end function MRIBase.RawAcquisitionData(f::GEFile) error("Not yet implemented!") end
{"hexsha": "45eb5b312e1bc8556ac4478b2fec96c653dad72c", "size": 139, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "MRIFiles/src/GE/GE.jl", "max_stars_repo_name": "aTrotier/MRIReco.jl", "max_stars_repo_head_hexsha": "7437e5b41a5fdd0f4dff73a7d1913b78c0285493", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# # Copyright 2020 Logical Clocks AB # # 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 ag...
{"hexsha": "30f7fcc58cc1f7dcb3e216ef8069bcfed7a01029", "size": 28209, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/hsfs/engine/python.py", "max_stars_repo_name": "gibchikafa/feature-store-api", "max_stars_repo_head_hexsha": "314a4d9a390bc371f4495f58c317797302f828ba", "max_stars_repo_licenses": ["Apache...
""" This file defines a class MicrogridEnv that wraps the Simulator in this package, so that it follows the OpenAI gym (https://github.com/openai/gym) format. """ import gym import numpy as np from gym import spaces from gym.utils import seeding from microgridRLsimulator.simulate.simulator import Simulator from micr...
{"hexsha": "df38c6599db4a7c8ae41d56f62db2d6a9dcd0e04", "size": 2651, "ext": "py", "lang": "Python", "max_stars_repo_path": "microgridRLsimulator/gym_wrapper/microgrid_env.py", "max_stars_repo_name": "d3sm0/microgridRLsimulator", "max_stars_repo_head_hexsha": "2721dd56430ff81a5ebd86fef6a94ed4acd1f26d", "max_stars_repo_l...
from models.spacy_based_ir import SpacyIR from models.bert_sts import BertSTSIR from models.bert_nli import BertNLIIR from models.bert_cnn import BertCNNIR from tqdm import tqdm import argparse import pickle import numpy as np import os def choose_model(topk=50): irmodel = SpacyIR(topk=50) return irmodel de...
{"hexsha": "b0f8357f2dc6568d23f6223fd33eb1ab5b227d19", "size": 3979, "ext": "py", "lang": "Python", "max_stars_repo_path": "ir/run_ir.py", "max_stars_repo_name": "tbmihailov/OBQA", "max_stars_repo_head_hexsha": "653c5c64ae7eb164bde0b381813afe5f664dcf67", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nul...
# referring to https://zhuanlan.zhihu.com/p/387853124 import os.path import tensorrt as trt import pycuda.driver as cuda from util import GiB, HostDeviceMem class TensorrtBase: """ Parent Class """ trt_logger = trt.Logger(trt.Logger.ERROR) # make order consistency via onnx. input_...
{"hexsha": "377f34aa89f64a52d1aeccfab6757e9414eb00d0", "size": 6918, "ext": "py", "lang": "Python", "max_stars_repo_path": "libs/dynamic_base.py", "max_stars_repo_name": "MichaelWU0726/x2trt", "max_stars_repo_head_hexsha": "75f34a8574315178589502ab14f64289e5c49061", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
import numpy as np from natasy.neural_network import Initialization, initializations def test_initialization(): assert Initialization() def test__zeros_initialization(): W, b = initializations._zeros_initialization(4, 6) assert W.shape == (4, 6) assert b.shape == (4, 1) assert W.all() == 0 and...
{"hexsha": "9ec55123e6b5631bdeeea1af50318a6aa99c16d3", "size": 477, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_initializations.py", "max_stars_repo_name": "disooqi/DNN", "max_stars_repo_head_hexsha": "f87a10afba0810778ab3669f30e20128779f9da0", "max_stars_repo_licenses": ["AFL-3.0"], "max_stars_co...
#!/usr/bin/env python3 ##@package openzgy.impl.histogram import numpy as np class HistogramData: def __init__(self, range_hint=None, dtype=np.float32): self._hmin, self._hmax = self._suggestHistogramRange(range_hint, dtype) self._dtype = dtype self._size = 256 # Uncomment the next...
{"hexsha": "a4bf305269c174e2956fd9e48ae8a98d37e61c99", "size": 7926, "ext": "py", "lang": "Python", "max_stars_repo_path": "openzgy/impl/histogram.py", "max_stars_repo_name": "equinor/pyzgy", "max_stars_repo_head_hexsha": "94cd3d9050c3027d042a83b98779da9182041137", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
""" :Author(s) Adam Camer-Pesci, Ryan Forster: This file contains the methods used to perform calculations on scuba diving profiles. """ from rpy2.robjects.vectors import IntVector import rpy2.robjects as robjects import numpy as np import math import DiveConstants as dc class Calculations: def initialise_dive(...
{"hexsha": "8115a0309904eb3cc9f6f540095a7eb7c05409c0", "size": 19780, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/py/main/Calculations.py", "max_stars_repo_name": "AdamPesci/diveR", "max_stars_repo_head_hexsha": "ae7fe415bbdbb008fadd2b96a0a3a5092b04fdc7", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" This file tests the ability for serde.py to convert complex types into simple python types which are serializable by standard serialization tools. For more on how/why this works, see serde.py directly. """ from syft.serde import native_serde from syft.serde import serde from syft.serde import torch_serde import sy...
{"hexsha": "e8362f2c34f04f495f7df297b8f3c8d8f84bf5e5", "size": 24589, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_serde.py", "max_stars_repo_name": "1000ping/PySyft", "max_stars_repo_head_hexsha": "4d8cb0de436d7335bba6eb0a4a18402698ad3964", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
import numpy as np import statistics as stats #use numpy libraray to import csv file as an ndarray and assign variable for each vector data = np.genfromtxt('data/iris.csv', delimiter=',') sepl = data[:,0] sepw = data[:,1] petl = data[:,2] petw = data[:,3] #using numpy and stats libraries print and format results p...
{"hexsha": "c56c6ece91365331cd15a632e505506efe8426a0", "size": 2241, "ext": "py", "lang": "Python", "max_stars_repo_path": "06_iris_numpy_stats.py", "max_stars_repo_name": "tommirrington/52167-Programming-and-Scripting-Final-Project", "max_stars_repo_head_hexsha": "c78fa312eb9f8db4d43fa472b8ab536934a5d55c", "max_stars_...
import numpy as np import networkx as nx import math import matplotlib.pyplot as plt import matplotlib import seaborn as sns # load GraphRicciCuravture package from GraphRicciCurvature.OllivierRicci import OllivierRicci from GraphRicciCurvature.FormanRicci import FormanRicci from collections import default...
{"hexsha": "307fddc765b304f7557ca704a4adc91080600f73", "size": 20160, "ext": "py", "lang": "Python", "max_stars_repo_path": "Ion Aggregation/ollivier_HBN.py", "max_stars_repo_name": "ExpectozJJ/Persistent-Ollivier-Ricci-Curvature", "max_stars_repo_head_hexsha": "508f49e9aaa9f88552b49d01b6d585df9e75d220", "max_stars_rep...
import enum import logging import numpy as np import pytest import arim.helpers from arim.exceptions import InvalidShape, InvalidDimension, NotAnArray def test_get_name(): metadata = dict(long_name="Nicolas", short_name="Nic") assert arim.helpers.get_name(metadata) == "Nicolas" del metadata["long_name"...
{"hexsha": "dbcf55198c58c82af1da0a2a7eab2ae54e7b70fe", "size": 5906, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_helpers.py", "max_stars_repo_name": "will-jj/arim", "max_stars_repo_head_hexsha": "fc15efe171a41355090123fcea10406ee75efe31", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, ...
[STATEMENT] lemma ifex_ite_opt_eq: " ro_ifex i \<Longrightarrow> ro_ifex t \<Longrightarrow> ro_ifex e \<Longrightarrow> ifex_ite_opt i t e = ifex_ite i t e" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>ro_ifex i; ro_ifex t; ro_ifex e\<rbrakk> \<Longrightarrow> ifex_ite_opt i t e = ifex_ite i t e [PROOF...
{"llama_tokens": 20397, "file": "ROBDD_BDT", "length": 30}
import os import pickle import numpy as np import pandas as pd import yaml import pyclass #from online_reduction.pipeline import PandasClass from sicparse import OptionParser import logging from jinja2 import Environment, PackageLoader import subprocess def jinja_raise(msg): raise Exception(msg) def debug(text)...
{"hexsha": "fa5d01d1b1a9f03971510c018815e9b7fb56ae88", "size": 24919, "ext": "py", "lang": "Python", "max_stars_repo_path": "kosma_py_lib/build/lib/kosma_py_lib/pandas_index.py", "max_stars_repo_name": "KOSMAsubmm/kosma_gildas_dlc", "max_stars_repo_head_hexsha": "cfa61dff10713717858a90eea52af76ca95e9fb3", "max_stars_re...
import json import nltk import os import math import numpy as np from tqdm import tqdm import torch import argparse import random import ast import itertools import csv from Levenshtein import ratio def convert_l(l): if type(l) == list: return l else: return ast.literal_eval(l) def check_dist...
{"hexsha": "949f4d1b390862a42bec87246aca9f8a319a2106", "size": 4086, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/eval/eval_novelty.py", "max_stars_repo_name": "skgabriel/paracomet", "max_stars_repo_head_hexsha": "58dcc88c48f14103c3b890bbda5bb1346a0cdc26", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
# -*- coding: utf-8 -*- import numpy as np from .Qt import QtGui, QtCore from .functions import mkColor, eq, colorDistance, clip_scalar, clip_array from os import path, listdir from collections.abc import Callable, Sequence import warnings __all__ = ['ColorMap'] _mapCache = {} def listMaps(source=None): """ ...
{"hexsha": "5d985ad42f0f166797c16c014a1d9f044806641d", "size": 34031, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyqtgraph/colormap.py", "max_stars_repo_name": "leo603222/fix-displace-between-selection-area-and-mouse-pos", "max_stars_repo_head_hexsha": "1f9031884a980432795b69487bd659f5e4ef91aa", "max_stars_...
[STATEMENT] lemma less_eq_multiset_total: fixes M N :: "'a :: linorder multiset" shows "\<not> M \<le> N \<Longrightarrow> N \<le> M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> M \<le> N \<Longrightarrow> N \<le> M [PROOF STEP] by simp
{"llama_tokens": 102, "file": null, "length": 1}
#!/usr/bin/env python import numpy as np from scipy import stats from icecube.phys_services import I3MT19937 N=1000 def kstest(rs,i3name,i3var,spname,spvar): sample = [getattr(rs,i3name)(*i3var) for x in range(N)] return stats.kstest(sample, spname, args=spvar)[1] def chisqtest(rs,i3name,i3var,spname,spvar,...
{"hexsha": "a3f01ca498875719cac83bc26ae5e08417fc469f", "size": 1489, "ext": "py", "lang": "Python", "max_stars_repo_path": "phys-services/resources/test/test_MT19937_stats.py", "max_stars_repo_name": "hschwane/offline_production", "max_stars_repo_head_hexsha": "e14a6493782f613b8bbe64217559765d5213dc1e", "max_stars_repo...
import logging import json from onnxruntime import InferenceSession import numpy as np from pathlib import Path from transformers import AutoTokenizer import azure.functions as func dir = Path.cwd() model_path_list = [str(x) for x in dir.glob("*") if str(x).endswith("model")] print(model_path_list) if len...
{"hexsha": "2fb6daf511e332da2cbf36af7c13248a893f8425", "size": 2242, "ext": "py", "lang": "Python", "max_stars_repo_path": "GermanBert/predict/__init__.py", "max_stars_repo_name": "NeuroCode-io/model-deployments", "max_stars_repo_head_hexsha": "1641c766fbcc6c03647b31eb996fe57c09c173c3", "max_stars_repo_licenses": ["MIT...
from time import time import numpy as np from math import pi from .txtmark import lib def count_ns(vts, fs): dv1 = vts[fs[:,1]] - vts[fs[:,2]] dv2 = vts[fs[:,1]] - vts[fs[:,0]] ns = np.cross(dv1, dv2) ass = np.linalg.norm(ns, axis=1) ns /= np.linalg.norm(ns, axis=1).reshape((-1,1)) buf = np.zeros_like(vts) for ...
{"hexsha": "0c6409b8faccf8cde37b0c53f685c0529fd9de05", "size": 5377, "ext": "py", "lang": "Python", "max_stars_repo_path": "imagepy/core/myvi/util.py", "max_stars_repo_name": "siyemuxu888/imagepy", "max_stars_repo_head_hexsha": "a933526483a15da282bacac54608d44d2173beb4", "max_stars_repo_licenses": ["BSD-4-Clause"], "ma...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ This implements a simple routine for writing/reading tables of arrays/simarrays in a human readable ascii form in a way that preserves dtypes and units. See write_table() and read_table() Created on Thu Sep 14 11:45:35 2017 @author: ibackus """ import numpy as np i...
{"hexsha": "4ea80558f1036d2083cc686dad65bba4c4e3ca57", "size": 8440, "ext": "py", "lang": "Python", "max_stars_repo_path": "diskpy/utils/_simarraywriter.py", "max_stars_repo_name": "langfzac/diskpy", "max_stars_repo_head_hexsha": "3b0f4fdc7f1fea21efdd3ab55bbf362181c7a3c4", "max_stars_repo_licenses": ["MIT"], "max_stars...
from time import perf_counter import sys import numpy as np import pandas as pd from hurry.filesize import size from sklearn.datasets import make_classification from sklearn.metrics import accuracy_score from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestClassifier as RFC i...
{"hexsha": "fa4cd0db4ba884f238f9438ac705163d01aad996", "size": 3248, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmarks/scripts/weak_scaling/weak_scaling_gpu.py", "max_stars_repo_name": "upmem/scikit-dpu", "max_stars_repo_head_hexsha": "1ddeb5d195b9b119e379eb473b28c82a12a2b5fd", "max_stars_repo_licenses"...
# Copyright 2019 The TensorNetwork Authors # # 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 ...
{"hexsha": "be7d59a106c561c623d0f7726db7d056a9bce162", "size": 17148, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/MPS/matrixproductoperators.py", "max_stars_repo_name": "priyansh19/TensorNetwork", "max_stars_repo_head_hexsha": "f83406c3749ed900573b9f80987738feea098df8", "max_stars_repo_licenses":...
import os import random import numpy as np from utils import read_data import torch from torch.utils.data import Dataset, DataLoader import pdb class Federated_Dataset(Dataset): def __init__(self, X, Y, A): self.X = X self.Y = Y self.A = A def __getitem__(self, index): X = sel...
{"hexsha": "b5ed61ff90fd136a8d0cda4734453d953fece182", "size": 6740, "ext": "py", "lang": "Python", "max_stars_repo_path": "FUEL/dataload.py", "max_stars_repo_name": "cuis15/FCFL", "max_stars_repo_head_hexsha": "59302004f9cfc20e305222ebb512235c6679cca8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_st...
import unittest import ifm_contrib as ifm from ifm import Enum import numpy as np class TestPlot(unittest.TestCase): def test_fringes(self): ifm.forceLicense("Viewer") doc = ifm.loadDocument(r".\models\example_2D.dac") doc.loadTimeStep(doc.getNumberOfTimeSteps() - 1) gdf = doc.c.pl...
{"hexsha": "4e30775fbf859dfa9545a95f9166981209e19610", "size": 2475, "ext": "py", "lang": "Python", "max_stars_repo_path": "unittests/test_plot_geopandas.py", "max_stars_repo_name": "DHI/ifm_contrib", "max_stars_repo_head_hexsha": "443c3a86960990115887855a2f4adac07797fc35", "max_stars_repo_licenses": ["MIT"], "max_star...
import torch from torch import nn import numpy as np import earthnet as en def get_loss_from_name(loss_name): if loss_name == "l2": return Cube_loss(nn.MSELoss()) elif loss_name == "l1": return Cube_loss(nn.L1Loss()) elif loss_name == "Huber": return Cube_loss(nn.HuberLoss()) el...
{"hexsha": "90ae4b910923d16af719c4c61167ab96e124ddbe", "size": 5866, "ext": "py", "lang": "Python", "max_stars_repo_path": "drought_impact_forecasting/losses.py", "max_stars_repo_name": "rudolfwilliam/satellite_image_forecasting", "max_stars_repo_head_hexsha": "164ee7e533e1a8d730a0ee9c0062fd9b32e0bcdc", "max_stars_repo...
""" Copyright 2020 William Rochira at York Structural Biology Laboratory """ import os import gzip import pickle import zipfile import requests import numpy as np from common import setup from _defs import ROTAMER_OUTPUT_DIR REFERENCE_DATA_URL = 'https://github.com/rlabduke/reference_data/archive/master.zip' REFER...
{"hexsha": "5a9a34fb553bed0c0f7b50cc8499ef8b44c74ee6", "size": 6824, "ext": "py", "lang": "Python", "max_stars_repo_path": "iris_tools/rotamer_generate_library.py", "max_stars_repo_name": "FilomenoSanchez/iris-validation", "max_stars_repo_head_hexsha": "a7bbb28dfe239527c32914229e69e007a519e0dd", "max_stars_repo_license...
# Copyright (C) 2019 Harvard University. All Rights Reserved. Unauthorized # copying of this file, via any medium is strictly prohibited Proprietary and # confidential # Developed by Mohammad Haft-Javaherian <mhaft-javaherian@mgh.harvard.edu>, # <7javaherian@gmail.com>. # =========...
{"hexsha": "423c52985996366f7dcf4e6fe24aca4ba2496bb3", "size": 5956, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/plot_log_file.py", "max_stars_repo_name": "mvWellman/OCTseg", "max_stars_repo_head_hexsha": "c3fe1098d031f74422956e2335dd4bae16dde7b6", "max_stars_repo_licenses": ["FSFAP"], "max_stars_count"...
{-# LANGUAGE ForeignFunctionInterface #-} module Haskstat where import Data.List import Data.Maybe import Data.Complex foreign import ccall "erf" c_erf :: Double -> Double floatLength :: Fractional a => [b] -> a floatLength xs = fromIntegral $ length xs mean :: Fractional a => [a] -> a mean xs = (foldl' (+) 0 xs) ...
{"hexsha": "a727ff20f91704df805f2a3edaf194c9a667e3cf", "size": 7187, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "Haskstat.hs", "max_stars_repo_name": "kevintyloo/haskstat", "max_stars_repo_head_hexsha": "1df809220ff904161719e5ec5272bda239c352c9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
# -*- coding: utf-8 -*- import itertools import numpy as np import shapely.geometry MESH_LEVEL_ALIAS = { "80km": 1, "10km": 2, "1km": 3, "500m": 4, "1/2": 4, "half": 4, "250m": 5, "1/4": 5, "quarter": 5, "125m": 6, "1/8": 6, "oneeighth": 6 } # lat*120 = km, lon*80 = km # i.e. km/120 = lat, km/80 = l...
{"hexsha": "67c3b5061384ff40a420ee7e52e661a2e3d5c85b", "size": 7843, "ext": "py", "lang": "Python", "max_stars_repo_path": "meshjp/meshjp.py", "max_stars_repo_name": "kotamori4/meshjp", "max_stars_repo_head_hexsha": "598100298bd46d05ef6dd90a49c305db3118d721", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout from keras.optimizers import RMSprop import numpy as np BATCH_SIZE = 128 NUM_CLASSES = 10 EPOCHS = 20 def get_dataset(): (x_train, y_train), (x_test, y_test) = mnist.load_data() x_train...
{"hexsha": "865244eaeb21537c364a18e6e892b0dff7d307cd", "size": 1595, "ext": "py", "lang": "Python", "max_stars_repo_path": "deeplearning/keras/mnist/mnist_mlp.py", "max_stars_repo_name": "terasakisatoshi/pythonCodes", "max_stars_repo_head_hexsha": "baee095ecee96f6b5ec6431267cdc6c40512a542", "max_stars_repo_licenses": [...
# <Copyright 2019, Argo AI, LLC. Released under the MIT license.> from typing import List, Optional, Sequence import numpy as np class LaneSegment: def __init__( self, id: int, has_traffic_control: bool, turn_direction: str, is_intersection: bool, l_neighbor_id: Op...
{"hexsha": "07616f99062f8374c8e18c81de70e96bdacb138a", "size": 1515, "ext": "py", "lang": "Python", "max_stars_repo_path": "argoverse/map_representation/lane_segment.py", "max_stars_repo_name": "ajinkyakhoche/argoverse-api", "max_stars_repo_head_hexsha": "b1730f9e4377325436f3364abb4c1fe54ec71b0a", "max_stars_repo_licen...
import os # import tensorflow as tf import tensorrt as trt from tensorrt.parsers import uffparser import pycuda.driver as cuda # import uff import cv2 import numpy as np from tqdm import tqdm TEST_PATH = "/media/andy/Data/DevWorkSpace/Projects/imageClassifier/data/test/" # TEST_PATH = "/home/andy/caffe/examples/myda...
{"hexsha": "86ebee0ee11fc6591c5267c871d8c85eb398d558", "size": 5685, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tensorrt/tools/caffe_engine/call_engine_to_infer_all_print_predict_on_image_6classes.py", "max_stars_repo_name": "aimuch/AIEnvConfig", "max_stars_repo_head_hexsha": "4ccd54e9c601e8c91efebcec1a...
import sys sys.path.append('..') from common.core import * from common.gfxutil import * from common.audio import * from common.mixer import * from common.note import * from common.wavegen import * from common.wavesrc import * from common.writer import * from Enemy import * from Background import * from Foreground impo...
{"hexsha": "51f3223b910e62715e229f32a2aea19878e09cfc", "size": 12024, "ext": "py", "lang": "Python", "max_stars_repo_path": "project/Handler.py", "max_stars_repo_name": "osmidy/Dischord", "max_stars_repo_head_hexsha": "3c3802eb4917adb9384256d8a0c7ba4f123fd166", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
SUBROUTINE RU_PLVL ( field, above, level, pres, iret ) C************************************************************************ C* RU_PLVL * C* * C* This subroutine gets the level number and pressure from a group * C* which is in the form LLPPP. LL must be the same integer, repeated; * C* for example...
{"hexsha": "4675a9b128e136c42783e6f39f4a1656605aef36", "size": 1936, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/bridge/ru/ruplvl.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
# David R Thompson import argparse, sys, os import numpy as np import pylab as plt from copy import deepcopy from glob import glob from spectral.io import envi from scipy.stats import norm from scipy.linalg import solve, inv from astropy import modeling from sklearn.linear_model import RANSACRegressor from scipy.optimi...
{"hexsha": "6b8a84177bc57b204d6cb3209ed04b287754ed46", "size": 6859, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/optimizeghost.py", "max_stars_repo_name": "emit-sds/emit-sds-l1b", "max_stars_repo_head_hexsha": "be5307fe6821a043971becdd33609b4cf89b1974", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
c { dg-do run } c { dg-options "-std=legacy" } c c Produced a link error through not eliminating the unused statement c function after 1998-05-15 change to gcc/toplev.c. It's in c `execute' since it needs to link. c Fixed by 1998-05-23 change to f/com.c. values(i,j) = val((i-1)*n+j) end
{"hexsha": "855b9a442d70c1f826771565fffbcb9755063eb6", "size": 317, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/g77/980520-1.f", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_license...
# -*- coding: utf-8 -*- """ computeKey computes the musical key of an input audio file Args: afAudioData: array with floating point audio data. f_s: sample rate afWindow: FFT window of length iBlockLength (default: hann) iBlockLength: internal block length (default: 4096 samples) iHopLe...
{"hexsha": "230e161d8822436d9c22ff4a9faef18a5b6893b8", "size": 3311, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyACA/computeKey.py", "max_stars_repo_name": "ruohoruotsi/pyACA", "max_stars_repo_head_hexsha": "339e9395b65a217aa5965638af941b32d5c95454", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8...
import cv2 import numpy as np import sys from libs.real.get_map import rotateImage def write_files(lower, upper, color_name): np.save('color_values/' + 'lower_' + color_name, lower) np.save('color_values/' + 'upper_' + color_name, upper) def load_map_setup(): map_img = cv2.imread('map_setup/map.png') ...
{"hexsha": "ecdf522f2c78f7b2afd8ae84e9afbdba396e45db", "size": 2454, "ext": "py", "lang": "Python", "max_stars_repo_path": "real_setup_colors.py", "max_stars_repo_name": "skkywalker/tcc", "max_stars_repo_head_hexsha": "5c0faf6dd6c4a66fb7774aae7caf33c5af8f7721", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...