text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# 2.4 plotting tmpexpr = :( xlabel("Year"); grid(true); xlim([ idx_year2plot[1] - 1, idx_year2plot[end] + 1 ]); ) figure(figsize = (13,8)) subplot(2,2,1) # gap / exp for tmpzeta in 1:length(reform_zeta_levs) plot( Dt[:Year][idx_plot], res_ContriRatRise["gap/exp"][tmpzet...
{"hexsha": "543c19e5909576260450d63e4dcb21fee72b0ddc", "size": 1611, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/subsections_PlotForPaper/sub_07_Plot4ContributionRateRise.jl", "max_stars_repo_name": "Clpr/OLG4UEBMI", "max_stars_repo_head_hexsha": "53b7e0afab1490e3eba34455c06cbc74277a5953", "max_stars_...
[STATEMENT] lemma fsi (*[simp]*):"f \<inter> s^-1 = {}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. f \<inter> s\<inverse> = {} [PROOF STEP] using sfi [PROOF STATE] proof (prove) using this: s \<inter> f\<inverse> = {} goal (1 subgoal): 1. f \<inter> s\<inverse> = {} [PROOF STEP] by auto
{"llama_tokens": 134, "file": "Allen_Calculus_disjoint_relations", "length": 2}
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2017, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
{"hexsha": "dc8fd39c9fb7f1520dfd6a1cd7ff685a3bffa670", "size": 13393, "ext": "py", "lang": "Python", "max_stars_repo_path": "q2_diversity/_beta/_visualizer.py", "max_stars_repo_name": "jairideout/diversity", "max_stars_repo_head_hexsha": "0024301a03134b2b05aeb83f6b01bd22da5b8cb2", "max_stars_repo_licenses": ["BSD-3-Cla...
// Copyright (c) 2005-2008 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) #include <iostream> #include <boost/lexical_cast.hpp> #include <saga/saga.hpp> int main (int argc, ...
{"hexsha": "a7376ff21baafb0233ddc9cd6c593a354a030835", "size": 1270, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "examples/packages/stream/stream_server.cpp", "max_stars_repo_name": "saga-project/saga-cpp", "max_stars_repo_head_hexsha": "7376c0de0529e7d7b80cf08b94ec484c2e56d38e", "max_stars_repo_licenses": ["BS...
@testset "Genetic Programming" begin Random.seed!(9874984737486); pop = 10 terms = Terminal[:x, :y, rand] funcs = Function[+,-,*,/] t = TreeGP(pop, terms, funcs, maxdepth=2) @test Evolutionary.population_size(t) == pop @test sort(Evolutionary.terminals(t)) == [:x, :y] @testset for (term...
{"hexsha": "3cf5cc18aa00a26d8f0856cd88d974823408c536", "size": 3856, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/gp.jl", "max_stars_repo_name": "dmolina/Evolutionary.jl", "max_stars_repo_head_hexsha": "928438c682f1c31a08b6f0bd503a2dab3842ecc8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import os import importlib import numpy as np from .helpers import util from .helpers.data import WSGenerator, WSRandGenerator from sim.helpers.util import get_path as get_network_path from sim.helpers.data import DataInfo def compute(args): network = args.NETWORK epoch = args.epoch anon = not args.inclu...
{"hexsha": "ad76c08a1b36dc09f1728b571c7c4ec237e13eee", "size": 2564, "ext": "py", "lang": "Python", "max_stars_repo_path": "ws/compute.py", "max_stars_repo_name": "StephanLorenzen/AuthorshipVerification", "max_stars_repo_head_hexsha": "1397f5967ad9f41bf57a9e9e91aaf138b0b5ae6f", "max_stars_repo_licenses": ["Apache-2.0"]...
""" This code is based on code found at: https://commons.wikimedia.org/wiki/File:Beta_distribution_pdf.svg by user Horas based on the work of user Krishnavedala """ from matplotlib.pyplot import * from numpy import linspace from scipy.stats import beta x = linspace(0,1,75) fig = figure() ax = fig.add_subplot(111) ax...
{"hexsha": "33b2855d3090c7ab9145dc9eb0f878c422aba600", "size": 1951, "ext": "py", "lang": "Python", "max_stars_repo_path": "Dirichlet_PDF.py", "max_stars_repo_name": "coli-saar/BayesianNLP2017", "max_stars_repo_head_hexsha": "116e7d8d2e88dea80bdacc20f15a57268adf1a32", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
from .query_graph import convert_to_networkx from .QueryPlan import QueryPlan, TerminalEvent import networkx as nx from collections import defaultdict def generate_plan(trapi_query_graph): nxgraph = convert_to_networkx(trapi_query_graph) double_pins, components = decompose(nxgraph) plan = double_pins #the...
{"hexsha": "3cbeec57f0a1732f49aab93e4df32d6aa081c18d", "size": 10194, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/generate_plan.py", "max_stars_repo_name": "ranking-agent/query_planner", "max_stars_repo_head_hexsha": "cbe6fd8b7f627658845851b06c73b239746a60f0", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma DSourcesA3_L0: "DSources level0 sA3 = { sA2 }" [PROOF STATE] proof (prove) goal (1 subgoal): 1. DSources level0 sA3 = {sA2} [PROOF STEP] by (simp add: DSources_def AbstrLevel0, auto)
{"llama_tokens": 94, "file": "ComponentDependencies_DataDependenciesCaseStudy", "length": 1}
/- Copyright (c) 2022 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov ! This file was ported from Lean 3 source module geometry.manifold.metrizable ! leanprover-community/mathlib commit d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1 ! Please ...
{"author": "leanprover-community", "repo": "mathlib3port", "sha": "62505aa236c58c8559783b16d33e30df3daa54f4", "save_path": "github-repos/lean/leanprover-community-mathlib3port", "path": "github-repos/lean/leanprover-community-mathlib3port/mathlib3port-62505aa236c58c8559783b16d33e30df3daa54f4/Mathbin/Geometry/Manifold/M...
(* Copyright 2014 Cornell University This file is part of VPrl (the Verified Nuprl project). VPrl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)...
{"author": "vrahli", "repo": "NuprlInCoq", "sha": "0c3d7723836d3f615ea47f56e58b2ea6173e7d98", "save_path": "github-repos/coq/vrahli-NuprlInCoq", "path": "github-repos/coq/vrahli-NuprlInCoq/NuprlInCoq-0c3d7723836d3f615ea47f56e58b2ea6173e7d98/close/close_type_sys_per_tunion.v"}
C************************************************************************ C This test routine is used to test CYLPATCH, a FORTRAN subroutine. C CLYPATCH computes the special line and sample point and special C latitude and longitude points for the normal cylindrical projection. C This test routine builds the neces...
{"hexsha": "928db527390d29de209d1de44619576bb009c0fe", "size": 3814, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "vos/p2/sub/cylpatch/test/tcylpatch.f", "max_stars_repo_name": "NASA-AMMOS/VICAR", "max_stars_repo_head_hexsha": "4504c1f558855d9c6eaef89f4460217aa4909f8e", "max_stars_repo_licenses": ["BSD-3-Claus...
[STATEMENT] lemma n_o_mono: "domo S1 \<subseteq> X \<Longrightarrow> domo S2 \<subseteq> X \<Longrightarrow> S1 \<sqsubseteq> S2 \<Longrightarrow> n_o (n_st n_ivl X) S1 \<le> n_o (n_st n_ivl X) S2" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>domo S1 \<subseteq> X; domo S2 \<subseteq> X; S1 \<sqsubseteq...
{"llama_tokens": 548, "file": "Abs_Int_ITP2012_Abs_Int3", "length": 3}
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 17 15:20:21 2019 @author: michaelwu """ import numpy as np import cv2 import os import pickle import torch as t import torch import h5py import pandas as pd from NNsegmentation.models import Segment from NNsegmentation.data import predict_whole_map ...
{"hexsha": "084d583568108f7bbd4f78ec33a405621244bbe0", "size": 45702, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_scripts/plottings.py", "max_stars_repo_name": "miaecle/dynamorph", "max_stars_repo_head_hexsha": "9bc04ae771e66938273eee102d404947546a69c5", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
# Copyright 2021 The Brax 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 to in wri...
{"hexsha": "53c6451c2611b9e0b63f2eea44d28b15e343a775", "size": 3504, "ext": "py", "lang": "Python", "max_stars_repo_path": "brax/io/torch.py", "max_stars_repo_name": "Egiob/brax", "max_stars_repo_head_hexsha": "1baf25d5a713bd5dbc8588a004a5754723626bd0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1162...
"""Functions for reading light curve data.""" import logging from astropy.io import fits from astropy.utils import deprecated from .detect import detect_filetype from ..lightcurve import KeplerLightCurve, TessLightCurve from ..utils import validate_method, LightkurveWarning, LightkurveDeprecationWarning log = loggin...
{"hexsha": "c1c62baf1e7ec40b4488f52f11b8b0dcf1bf43f9", "size": 3002, "ext": "py", "lang": "Python", "max_stars_repo_path": "lightkurve/io/read.py", "max_stars_repo_name": "KenMighell/lightkurve", "max_stars_repo_head_hexsha": "bb264899fd8d5fbaa95c13f3b90c75bd96c5a33e", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
\vfill \eject \section{{\tt allInOne.c} -- A Serial $QR$ Driver Program} \label{section:QR-serial-driver} \begin{verbatim} /* QRallInOne.c */ #include "../../misc.h" #include "../../FrontMtx.h" #include "../../SymbFac.h" /*--------------------------------------------------------------------*/ int main ( int argc, ...
{"hexsha": "f7962abab35545307efde9af6be3f269b22b258e", "size": 10403, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ccx_prool/SPOOLES.2.2/documentation/AllInOne/QR_serial_driver.tex", "max_stars_repo_name": "alleindrach/calculix-desktop", "max_stars_repo_head_hexsha": "2cb2c434b536eb668ff88bdf82538d22f4f0f711", ...
# -*- coding: utf-8 -*- # Copyright (c) 2020-2021 shmilee ''' Source fortran code: skip ''' import numpy from ..GTCv3 import gtc as gtcv3 _all_Converters = gtcv3._all_Converters _all_Diggers = gtcv3._all_Diggers __all__ = _all_Converters + _all_Diggers class GtcConverter(gtcv3.GtcConverter): __slots__ = [] ...
{"hexsha": "bf7f2418a77b36e930dcde336f2ed9ac95ed8764", "size": 2369, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/GTCv4/gtc.py", "max_stars_repo_name": "shmilee/gdpy3", "max_stars_repo_head_hexsha": "2e007851fc87793c0038f7b1dacba729271e17a3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_...
import torch, os, datetime import numpy as np from .dist_utils import dist_print, dist_tqdm, is_main_process, DistSummaryWriter from .factory import get_metric_dict, get_loss_dict, get_optimizer, get_scheduler from .metrics import MultiLabelAcc, AccTopk, Metric_mIoU, update_metrics, reset_metrics from .common import...
{"hexsha": "b266a1c9a8b4d5a8a36306d8b5d70cd7d57732bb", "size": 1687, "ext": "py", "lang": "Python", "max_stars_repo_path": "adet/modeling/ultra_fast/cal_loss.py", "max_stars_repo_name": "GuoHaoren/Unifed-Lane-and-Traffic-Sign-detection", "max_stars_repo_head_hexsha": "80ed2690a7bb90861ccfc85de9a2feb6bce324ff", "max_sta...
from typing import Union import numpy as np from sklearn.utils.class_weight import compute_class_weight def compute_class_weight_dict( labels: Union[list, np.ndarray], class_weight: Union[dict, str, None] = "balanced" ) -> dict: """Compute class weight. Wrapper for sklearn function that returns Keras co...
{"hexsha": "21e850979bf0f7e5eff0a056a0d24900e2de2dfa", "size": 905, "ext": "py", "lang": "Python", "max_stars_repo_path": "cellx/train.py", "max_stars_repo_name": "quantumjot/cellx", "max_stars_repo_head_hexsha": "2a3ef965af22f213c4c9e239f097d231040eafe1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_...
\documentclass[10pt,landscape]{article} % \pagestyle{headings} \usepackage{multicol} \usepackage[landscape]{geometry} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsmath} \usepackage{latexsym} \usepackage{enumerate} \usepackage{verbatim} \usepackage{multirow} \usepackage[lofdepth,lotdepth]{subfig} \usepacka...
{"hexsha": "8a9ac1dfa2da81665f2e8d807c1b2a847e90f2cb", "size": 24246, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "study-guide/study-guide.tex", "max_stars_repo_name": "feynmanliang/Organic-Synthesis-Study-Guide", "max_stars_repo_head_hexsha": "ee63f7e027ca675dfdf7993907101f9574d61e41", "max_stars_repo_licenses...
""" Tests for workspace module """ import os import shutil import tempfile from six import StringIO import numpy as np import pytest from fsl.data.image import Image from oxasl import Workspace, AslImage from oxasl.workspace import text_to_matrix def test_default_attr(): """ Check attributes are None by default...
{"hexsha": "2edaca371794f4302e7ff4f8d86edcbfb6009663", "size": 12803, "ext": "py", "lang": "Python", "max_stars_repo_path": "oxasl/test/test_workspace.py", "max_stars_repo_name": "ibme-qubic/oxasl", "max_stars_repo_head_hexsha": "8a0c055752d6e10cd932336ae6916f0c4fc0a2e9", "max_stars_repo_licenses": ["Apache-2.0"], "max...
""" Mask R-CNN Configurations and data loading code for MS COCO. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla ------------------------------------------------------------ Usage: import the module (see Jupyter notebooks for examples), or run fr...
{"hexsha": "d9ec13d7e408d5d972a4404531bdc9316aa06c70", "size": 21581, "ext": "py", "lang": "Python", "max_stars_repo_path": "samples/coco/coco.py", "max_stars_repo_name": "xman0810/Mask_RCNN", "max_stars_repo_head_hexsha": "06e51f44961d4803696bcb2eab27352fc83162c6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# Copyright 2021 qclib project. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, ...
{"hexsha": "04a5cd26a3efe97be96f3896f36afe3163dae671", "size": 3867, "ext": "py", "lang": "Python", "max_stars_repo_path": "qclib/state_preparation/apqm.py", "max_stars_repo_name": "adjs/qclib", "max_stars_repo_head_hexsha": "0c3f1eec68536df4d161297554059da06b7722f7", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
const TRY_BUT_ALLOW_FAILURES_URL_LIST = String[ ]
{"hexsha": "d3a922bf1ec50290f17d589186fb6a2cb416d433", "size": 55, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "config/repositories/try-but-allow-failures-url-list.jl", "max_stars_repo_name": "KristofferC/RepoSnapshots.jl", "max_stars_repo_head_hexsha": "357e12a814309b8b751a2927bf37440357e5cd76", "max_stars_re...
!isempty(ARGS) || error("No config supplied.") isfile(ARGS[1]) || error("Cannot read '$(ARGS[1])'") isabspath(ARGS[1]) || error("Please use an absolute path for the config.") println("Config supplied: '$(ARGS[1])'") config_file = ARGS[1] include(config_file) using MLDataUtils using Random using DelimitedFiles functio...
{"hexsha": "1b64911a5690ae52360b93015fd9730fe8196155", "size": 4693, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/preprocess_data.jl", "max_stars_repo_name": "kit-dbis/ocal-evaluation", "max_stars_repo_head_hexsha": "b6dc7c0896a65c56650dd428b43acf398ef198aa", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np import base64 from stega.injector import Injector from kombu import Connection, Exchange, Queue from kombu.mixins import ConsumerMixin rabbit_url = 'amqp://guest:guest@localhost:5672//' class Worker(ConsumerMixin): def __init__(self, connection, queues): self.connection = connection ...
{"hexsha": "a6170a5d4effdd518e5c28205200be178138b434", "size": 1223, "ext": "py", "lang": "Python", "max_stars_repo_path": "viewer.py", "max_stars_repo_name": "vnrdd/stega-live-video", "max_stars_repo_head_hexsha": "f1d7d93248ea7c7c4b484543e8b8494fcc252885", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
import matplotlib matplotlib.use('Agg') from hcipy import * import numpy as np import matplotlib.pyplot as plt import os import pytest def test_gif_writer(): grid = make_pupil_grid(256) mw = GifWriter('test.gif') for i in range(25): field = Field(np.random.randn(grid.size), grid) plt.clf() imshow_field(fi...
{"hexsha": "0d7190385dda85c0b6fa833c480d39be2f95cefe", "size": 1881, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_plotting.py", "max_stars_repo_name": "yinzi-xin/hcipy", "max_stars_repo_head_hexsha": "e9abb037ed0d6fe06581c1ce94e5c154fa5069a7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from __future__ import print_function, division, absolute_import import os os.environ['ODIN'] = 'float32,gpu' import pickle from collections import OrderedDict, defaultdict import numpy as np from scipy.io import savemat from scipy import stats import tensorflow as tf from sklearn.decomposition import PCA from skle...
{"hexsha": "688852f8865f841f04ab6627d3fee492e76f3575", "size": 20044, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/nist_sre/make_score.py", "max_stars_repo_name": "tirkarthi/odin-ai", "max_stars_repo_head_hexsha": "7900bef82ad8801d0c73880330d5b24d9ff7cd06", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np import os from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, DecimalField, RadioField, SelectField, SelectMultipleField, IntegerField, FloatField from wtforms.validators import InputRequired, Length, NumberRange, AnyOf, ValidationError from wtforms.widgets import ListWidge...
{"hexsha": "0b3f586857c48a4131856b9fee2acc4c5251d8e9", "size": 12499, "ext": "py", "lang": "Python", "max_stars_repo_path": "exoctk/exoctk_app/form_validation.py", "max_stars_repo_name": "bourque/exoctk", "max_stars_repo_head_hexsha": "1d2f8e7b9c00e74033626d81593b1f879b7df6ad", "max_stars_repo_licenses": ["BSD-3-Clause...
"""Mixture model for matrix completion""" from typing import Tuple import numpy as np from scipy.special import logsumexp from common import GaussianMixture def estep(X: np.ndarray, mixture: GaussianMixture) -> Tuple[np.ndarray, float]: """E-step: Softly assigns each datapoint to a gaussian component Args: ...
{"hexsha": "566e3dc2f25c28482aac8aa185b1456e9ef1d524", "size": 6777, "ext": "py", "lang": "Python", "max_stars_repo_path": "project4/netflix/em.py", "max_stars_repo_name": "davysnou/MIT-6.86x-Davy", "max_stars_repo_head_hexsha": "a0ef35692477512c7ac1ced8a0584c413781a401", "max_stars_repo_licenses": ["MIT"], "max_stars_...
""" Plotly-to-Matplotlib conversion functions. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government re...
{"hexsha": "67e998e5194642224bd293e37072eaa9b469022b", "size": 26063, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygsti/report/mpl_colormaps.py", "max_stars_repo_name": "colibri-coruscans/pyGSTi", "max_stars_repo_head_hexsha": "da54f4abf668a28476030528f81afa46a1fbba33", "max_stars_repo_licenses": ["Apache-2...
# ======================================================================== # # Imports # # ======================================================================== import numpy as np import pandas as pd import yaml import definitions as defs # ======================================================================== #...
{"hexsha": "d99c47f4388b4cdf79aeafe30e0efe926f315eb4", "size": 3609, "ext": "py", "lang": "Python", "max_stars_repo_path": "mcalister/utilities/utilities.py", "max_stars_repo_name": "Exawind/iddes", "max_stars_repo_head_hexsha": "200ddd4a20587c38f4103a32c0001ad5c8d33f22", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
x = [-1, 1, 3, 3, -1] y = [2, 0, -5, 2, -5] @test_throws MethodError scatterplot() @test_throws MethodError scatterplot(sin, x) @test_throws MethodError scatterplot([sin], x) @test_throws DimensionMismatch scatterplot([1, 2], [1, 2, 3]) @test_throws DimensionMismatch scatterplot([1, 2, 3], [1, 2]) @test_throws Dimensi...
{"hexsha": "839de9bdb3500dc0c851a4387872a1d3fc1ca8fd", "size": 4431, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/tst_scatterplot.jl", "max_stars_repo_name": "Cvikli/UnicodePlots.jl", "max_stars_repo_head_hexsha": "fecf19a90a4d22a6784a68ff0f402fcb93936a80", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np from tensorlib.decomposition import cp from tensorlib.decomposition.decomposition import _cp3 from tensorlib.decomposition import tucker from tensorlib.decomposition.decomposition import _tucker3 from tensorlib.datasets import load_bread from numpy.testing import assert_almost_equal from nose.tools i...
{"hexsha": "5f4ea093f64ffe184cdca19097900341e6958710", "size": 1591, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorlib/decomposition/tests/test_decomposition.py", "max_stars_repo_name": "tensorlib/tensorlib", "max_stars_repo_head_hexsha": "bd1bf02cbdcb4ea666b557238a4b32effab2943a", "max_stars_repo_licens...
import numpy as np def accuracy(preds, labels): return np.mean(labels == preds.round()) def error(preds, labels): return 1.0 - accuracy(preds,labels) def mean_square_error(preds, labels): return np.mean(np.square(preds - labels)) def mean_absolute_error(preds, labels): return np.mean(np.abs(pred...
{"hexsha": "07b9bd68a8459794e60e8ca85c8c132447cc156e", "size": 531, "ext": "py", "lang": "Python", "max_stars_repo_path": "tgboost/metric.py", "max_stars_repo_name": "BenJamesbabala/tgboost", "max_stars_repo_head_hexsha": "933e666c60c6e828a78a73637efab91345529d6d", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
using QuAlgorithmZoo, Yao,YaoExtensions using BitBasis: log2i using Test using Random, LinearAlgebra """ Quantum singular value decomposition algorithm. * `reg`, input register (A, B) as the target matrix to decompose, * `circuit_a`, U matrix applied on register A, * `circuit_b`, V matrix applied on regis...
{"hexsha": "3b2618031b020f45f5f7fb0d1b42d761416747cd", "size": 3200, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/QSVD/QSVD.jl", "max_stars_repo_name": "stanescuUW/QuAlgorithmZoo.jl", "max_stars_repo_head_hexsha": "7d5c2398840cad822a095295e6559c6bafca715e", "max_stars_repo_licenses": ["Apache-2.0"], "...
#! /usr/bin/env python3 # import roslib # roslib.load_manifest('motion_plan') import rospy from sensor_msgs.msg import LaserScan from geometry_msgs.msg import Twist, Point from nav_msgs.msg import Odometry from tf import transformations from std_srvs.srv import * import math import matplotlib.pyplot as plt import nump...
{"hexsha": "21aa4a659117d16edec435fdda6a73da38557ed6", "size": 3739, "ext": "py", "lang": "Python", "max_stars_repo_path": "ros_pkg/robot_function/scripts/go_to_point.py", "max_stars_repo_name": "Pallav1299/coppeliasim_ros", "max_stars_repo_head_hexsha": "3c4db53be7ea7d64c53c1d56066bb93dd212a476", "max_stars_repo_licen...
// (C) Copyright Gennadiy Rozental 2011-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. // // File : $RCSfile$ // // Version ...
{"hexsha": "6155289bc23c8651c97da9d343edf00dfc9eec0a", "size": 8159, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/test/data/test_case.hpp", "max_stars_repo_name": "ballisticwhisper/boost", "max_stars_repo_head_hexsha": "f72119ab640b564c4b983bd457457046b52af9ee", "max_stars_repo_licenses": ["BSL-1.0"], "ma...
import nltk import numpy as np import string import pickle from gsdmm import MovieGroupProcess from Chapter03.phrases import get_yelp_reviews from Chapter04.preprocess_bbc_dataset import get_stopwords tokenizer = nltk.data.load("tokenizers/punkt/english.pickle") yelp_reviews_file = "Chapter03/yelp-dataset/review.json"...
{"hexsha": "2107b9bc036f81e34f594e4ec8a367221c7195fb", "size": 1633, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter06/topic_short_texts.py", "max_stars_repo_name": "afloera/https-github.com-PacktPublishing-Python-Natural-Language-Processing-Cookbook", "max_stars_repo_head_hexsha": "ffd1bf1a8a6b74bac7e88...
[STATEMENT] lemma circ_sup_n: "(x\<^sup>\<Omega> * y)\<^sup>\<Omega> * x\<^sup>\<Omega> = n((x\<^sup>\<star> * y)\<^sup>\<omega>) * L \<squnion> ((x\<^sup>\<star> * y)\<^sup>\<star> * x\<^sup>\<star> \<squnion> (x\<^sup>\<star> * y)\<^sup>\<star> * n(x\<^sup>\<omega>) * L)" [PROOF STATE] proof (prove) goal (1 subgoal...
{"llama_tokens": 300, "file": "Correctness_Algebras_N_Semirings", "length": 1}
import numpy as np from adapt.strategy.strategy import Strategy class RandomStrategy(Strategy): '''A strategy that randomly selects neurons from all neurons. This strategy selects neurons from a set of all neurons in the network, except for the neurons that located in skippable layers. ''' def select(se...
{"hexsha": "9830d2c134131a72af4688d25e4f0dcbc72cccd8", "size": 811, "ext": "py", "lang": "Python", "max_stars_repo_path": "adapt/strategy/random.py", "max_stars_repo_name": "kupl/adapt", "max_stars_repo_head_hexsha": "8fc024456d21ea2b43fbb2b0b61199ce6324147d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 16, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.4' # jupytext_version: 1.1.4 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # # s_mi...
{"hexsha": "ebff2eaf768395dcee0f3048be569ef2108251f8", "size": 1449, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/sources/s_min_rel_ent_point_view.py", "max_stars_repo_name": "dpopadic/arpmRes", "max_stars_repo_head_hexsha": "ddcc4de713b46e3e9dcb77cc08c502ce4df54f76", "max_stars_repo_licenses": ["MIT"...
''' # This code is to perform detection and recognition analysis # Programmer: Muhammad Hafidz Misrudin, N8448141 # Method of implementation: Feature Matching using SIFT/Orb descriptors # It requires an OPENCV library and additional (image processing) packages in order to perform the tasks # OPENCV versions: 2.4.11 or ...
{"hexsha": "a146407a2e3ef818a5e5aef2a63cf0786e1f30d2", "size": 4885, "ext": "py", "lang": "Python", "max_stars_repo_path": "FeatureMatching_SIFT/featureMatching.py", "max_stars_repo_name": "MuhammadHafidzMisrudin/python-opencv-finalyearproject", "max_stars_repo_head_hexsha": "94f342554eba900f5d11245c9c689a9e76e0dec5", ...
#!/usr/bin/python3 import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), "astrolove")) sys.path.append("/usr/lib/astrolove") import ASI import time import scipy.misc print((ASI.list())) c = ASI.Camera(0) print((c.prop())) c.set({'width': 640, 'height': 480, 'start_x': 320, 'start_y': 240}) s ...
{"hexsha": "a11bc2c2eaea017516655cc8dbac8bd51d95538a", "size": 1134, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "chripell/yaaca", "max_stars_repo_head_hexsha": "9048ca5dc458f9a7dde9ca745f057f7499b19972", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1, "max_s...
import scipy as SP from . import parMixedForest as parUtils import random def checkMaf(X, maf=None): if maf==None: maf = 1.0/X.shape[0] Xmaf = (X>0).sum(axis=0) Iok = (Xmaf>=(maf*X.shape[0])) return SP.where(Iok)[0] def scale_K(K, verbose=False): """scale covariance K such that it explains...
{"hexsha": "486d4e7a485c30f9cb591177043fc739a2307854", "size": 5457, "ext": "py", "lang": "Python", "max_stars_repo_path": "svca_limix/limix/modules/mixedForestUtils.py", "max_stars_repo_name": "DenisSch/svca", "max_stars_repo_head_hexsha": "bd029c120ca8310f43311253e4d7ce19bc08350c", "max_stars_repo_licenses": ["Apache...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Sep 4 21:35:37 2020 @author: inderpreet this code plots the PDF of the predictions and errors of best estimate (median) ICI channels """ import matplotlib.pyplot as plt import numpy as np import stats as S from ici_mwi import iciData plt.rcParams.up...
{"hexsha": "0660d348b216fd9426ac41c803af4ce7879aeb47", "size": 4051, "ext": "py", "lang": "Python", "max_stars_repo_path": "ICI/plot_pdf_pred_ici.py", "max_stars_repo_name": "SEE-MOF/QRNN-CloudCorrection", "max_stars_repo_head_hexsha": "ba58f1f4f70ec0f7264d5e98d80552d2fba1bb4d", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np import struct def load_header(brick_data, double=False): offset = 4 if double: nbytes = 8 dtype_float="d" else: nbytes = 4 dtype_float="f" nbodies = struct.unpack("i", brick_data[4:8])[0] offset += 12 massp = struct.unpack(dtype_float, brick_d...
{"hexsha": "20605e5821481f371f58f1260baf237fd327d9b5", "size": 5619, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyram/etc/rd_hal_pure.py", "max_stars_repo_name": "Hoseung/pyRamAn", "max_stars_repo_head_hexsha": "f9386fa5a9f045f98590039988d3cd50bc488dc2", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy import scipy.optimize MAXIMUM_REPRESENTABLE_FINITE_FLOAT = numpy.finfo(numpy.float64).max class MultistartMaximizer(object): def __init__(self, optimizer, num_multistarts=1, log_sample=False): assert not isinstance(optimizer, MultistartMaximizer) self.optimizer = optimizer assert num_multi...
{"hexsha": "e2569a594423439898740792eaaecb2b148de8f1", "size": 3761, "ext": "py", "lang": "Python", "max_stars_repo_path": "lookahead/model/scalar_optimization.py", "max_stars_repo_name": "ericlee0803/lookahead_release", "max_stars_repo_head_hexsha": "373295f11be81d82b1c69eeadeec32ae96f26b1f", "max_stars_repo_licenses"...
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 20012 - 2012 LRI UMR 12623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
{"hexsha": "caeef2c89b16792f5dde8a2f2fe0a9f8065aa3a2", "size": 1915, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "modules/boost/simd/base/include/boost/simd/constant/constants/fact_12.hpp", "max_stars_repo_name": "feelpp/nt2", "max_stars_repo_head_hexsha": "4d121e2c7450f24b735d6cff03720f07b4b2146c", "max_stars_...
import torchvision.transforms as T import numpy as np import cv2 from PIL import Image def visualize_depth(depth, cmap=cv2.COLORMAP_JET): """ depth: (H, W) """ x = depth.cpu().numpy() x = np.nan_to_num(x) # change nan to 0 mi = np.min(x) # get minimum depth ma = np.max(x) x = (x-mi)/(ma...
{"hexsha": "d9c07f4ebac70ea25797e7d1119966ed2afc7033", "size": 1204, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/visualization.py", "max_stars_repo_name": "wx-b/nsff_pl", "max_stars_repo_head_hexsha": "b9640ca1d416438bf4dfefa5be0524ad2fd1b27e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 103...
# https://github.com/tensorflow/docs/blob/master/site/en/tutorials/keras/basic_classification.ipynb from __future__ import absolute_import, division, print_function # TensorFlow and tf.keras import tensorflow as tf from tensorflow import keras # Helper libraries import os import numpy as np import matplotlib.pyplot ...
{"hexsha": "dbe914a0c4db51b4f1523861d3c3bf92e3a4e29e", "size": 14669, "ext": "py", "lang": "Python", "max_stars_repo_path": "training/model-restore-mnist.py", "max_stars_repo_name": "wobkat/ellwood-glacier", "max_stars_repo_head_hexsha": "743112c8ece09f14e68af7fa4d0fd2a33501c4c8", "max_stars_repo_licenses": ["MIT"], "m...
import numpy as np from scipy import linalg def norm_of_columns(A, p=2): """Vector p-norm of each column of a matrix. Parameters ---------- A : array_like Input matrix. p : int, optional p-th norm. Returns ------- array_like p-norm of each column of A. """...
{"hexsha": "08eb60bb3291a815e642af0a8e18b0c0a27ea099", "size": 2631, "ext": "py", "lang": "Python", "max_stars_repo_path": "micarray/util.py", "max_stars_repo_name": "trojanjay/sfa-numpy", "max_stars_repo_head_hexsha": "bff5737ef429f31228d20a9e1d0ce7d46d3080d3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 39...
#pragma once #include <memory> #include <Eigen/Dense> #include "SdfObject.hpp" #include "../Ray.hpp" #include "../accelerate/Bound3.hpp" class SdfSphere : public SdfObject { public: SdfSphere(Eigen::Vector3f position, float radis) : SdfObject(position), radis(radis){}; float sdf(const Eigen::Vector3f &positio...
{"hexsha": "16ad3ab891fe9eb368e71f233a78fde9f194b7b5", "size": 683, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/render/object/SdfSphere.hpp", "max_stars_repo_name": "yzx9/NeuronSdfViewer", "max_stars_repo_head_hexsha": "454164dfccf80b806aac3cd7cca09e2cb8bd3c2a", "max_stars_repo_licenses": ["MIT"], "max_sta...
using GeometryTypes, ColorTypes using FactCheck import Base.Test.@inferred facts("GeometryTypes") do include("polygons.jl") include("hyperrectangles.jl") include("faces.jl") include("meshes.jl") include("distancefields.jl") include("primitives.jl") include("decompose.jl") include("simpl...
{"hexsha": "ce562f3e8c83623d9ec2cca5f609cd3ebbea6940", "size": 526, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "JuliaPackageMirrors/GeometryTypes.jl", "max_stars_repo_head_hexsha": "705e5a646dd2177bbb4b9f8c26b52bc832b38d65", "max_stars_repo_licenses": ["MIT"], "max_s...
[STATEMENT] lemma find_sort_least : assumes "find P (sort xs) = Some x" shows "\<forall> x' \<in> set xs . x \<le> x' \<or> \<not> P x'" and "x = (LEAST x' \<in> set xs . P x')" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>x'\<in>set xs. x \<le> x' \<or> \<not> P x' &&& x = (LEAST x'. x' \<in> set...
{"llama_tokens": 2055, "file": "FSM_Tests_Util", "length": 18}
[STATEMENT] lemma sq_mtx_vec_mult_sum_cols: "A *\<^sub>V x = sum (\<lambda>i. x $ i *\<^sub>R \<c>\<o>\<l> i A) UNIV" [PROOF STATE] proof (prove) goal (1 subgoal): 1. A *\<^sub>V x = (\<Sum>i\<in>UNIV. x $ i *\<^sub>R \<c>\<o>\<l> i A) [PROOF STEP] by(transfer) (simp add: matrix_mult_sum scalar_mult_eq_scaleR)
{"llama_tokens": 147, "file": "Matrices_for_ODEs_SQ_MTX", "length": 1}
import numpy as np import cv2 import cv2.aruco as aruco import math from math import sin, cos import time frame = np.array([]) aruco_dict = aruco.Dictionary_get(aruco.DICT_4X4_250) # Use 4x4 dictionary to find markers parameters = aruco.DetectorParameters_create() # Marker detection parameters def acc(arr, k = 1, ...
{"hexsha": "2aac3507e32efe06b011e09f4d3230e0f6bb24e9", "size": 5561, "ext": "py", "lang": "Python", "max_stars_repo_path": "aruco10hexes.py", "max_stars_repo_name": "IldanPetrov/EuroHex", "max_stars_repo_head_hexsha": "e15757b007e21dc5fd951185a578a64b2b9b5380", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
import numpy as np import pandas as pd from numpy.random import randn np.random.seed(101) #to get same random number df = pd.DataFrame(randn(5,4),['A','B', 'C','D','E'],['W','X','Y','Z']) print(df) #conditional selection print(df > 0) print(df[df > 0]) print(df['W']>0) print(df[df['W']>0]) print(df[df['W']>0][...
{"hexsha": "caee330d31680e653124951d4d6057d2efc4a7e5", "size": 694, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandas_df_example2.py", "max_stars_repo_name": "ingleashish/python-data-science-machine-learning", "max_stars_repo_head_hexsha": "46fb3daf8cccc4444cc92ab0d48f92604061d5c9", "max_stars_repo_licenses...
# Copyright (C) 2019 Project AGI # # 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 writi...
{"hexsha": "bf48bb761abe25034182fd82e2702c5cd6ae7181", "size": 27991, "ext": "py", "lang": "Python", "max_stars_repo_path": "aha/workflows/pattern_completion_workflow.py", "max_stars_repo_name": "ProjectAGI/aha", "max_stars_repo_head_hexsha": "53a98ea42526dca56517dc97fffad874772f10f2", "max_stars_repo_licenses": ["Apac...
#ifndef ATL_FFI_HPP #define ATL_FFI_HPP /** * @file /home/ryan/programming/atl/ffi_2.hpp * @author Ryan Domigan <ryan_domigan@sutdents@uml.edu> * Created on Dec 29, 2013 */ #include <array> // for tuple_element #include <boost/mpl/aux_/adl_barrier.hpp> // for mpl #include <cstddef> ...
{"hexsha": "166f4ce4cc45b3c8b0240865e5791f6aad825ab7", "size": 5495, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ffi.hpp", "max_stars_repo_name": "rcdomigan/atl", "max_stars_repo_head_hexsha": "6a6777a2f714480366551a4462c986a2f9d7612f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_s...
# import sys # sys.path.append('../lib') import geom, graph import model import model_utils import tileloader import infer import numpy import os import random import tensorflow as tf import time import argparse parser = argparse.ArgumentParser(description='Train a RoadTracer model.') tileloader.tile_dir = '/data/ima...
{"hexsha": "5d24d5b08eac5f0d080d2706de2802c6b42f0899", "size": 11718, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tracer/train.py", "max_stars_repo_name": "astro-ck/Road-Extraction", "max_stars_repo_head_hexsha": "e509ddce9ced558e2e97d3510eb1e4a053113c97", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" A program analyzing 3D protein structures from PDB to generate 2D binding motives. For Further information see https://github.com/Cardypro/StructureAnalyzer """ import math import os from typing import Dict, Tuple, List, Union, Optional from dataclasses import dataclass from collections import defaultd...
{"hexsha": "420fec84c195725d5aacd865db4f25b354f865ca", "size": 19987, "ext": "py", "lang": "Python", "max_stars_repo_path": "StructureAnalyzer.py", "max_stars_repo_name": "Cardypro/StructureAnalyzer", "max_stars_repo_head_hexsha": "7f077058db4ad98b116abb0cbc0d74babd0ec298", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import dgl from dgl.model_zoo.chem.gnn import GATLayer from dgl.nn.pytorch import NNConv, Set2Set from dgl.nn.pytorch.conv import GINConv from dgl.nn.pytorch.glob import AvgPooling, MaxPooling, SumPooling class SELayer(nn.Module): ...
{"hexsha": "71c9dde41660af803ee1554cafb9a127a451aa29", "size": 16200, "ext": "py", "lang": "Python", "max_stars_repo_path": "cogdl/layers/gcc_module.py", "max_stars_repo_name": "BruceW91/cogdl", "max_stars_repo_head_hexsha": "1ad524375f5ba062103698a0432fc857572a6933", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
#!/usr/bin/env python # coding: utf-8 import os import json import numpy as np import pandas as pd import connector.mysql_connector as mysql_c def drop_columns(df, columns): df = df.drop(axis=1, level=0, columns=[columns]) def download_raw_db(): #F_PATH = os.path.abspath('') with open('download/conne...
{"hexsha": "b8dcd62bad8e7f01edf1c4969ba78df83ca776bf", "size": 791, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/download/download_db.py", "max_stars_repo_name": "maikereis/consumption_data_analysis", "max_stars_repo_head_hexsha": "2ac8dcbc745c01211bdf22c4287f82225f7c21d6", "max_stars_repo_licenses": ["MI...
subroutine mcohc(yy,xx,xy,b,iq,ip,coh) c c computes multivariate covariance for the multivariate c complex linear model c Y = X B c n x q n x p p x q c c input: xx is x*x, yy is y*y (q times q and p times p c hermitian m...
{"hexsha": "9481e67e8981bdaa53f215a890d808a960b2b415", "size": 1420, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "iris_mt_scratch/egbert_codes-20210121T193218Z-001/egbert_codes/EMTF/T/mcohc.f", "max_stars_repo_name": "simpeg-research/iris-mt-scratch", "max_stars_repo_head_hexsha": "ea458f253071db513fd0731118a...
#!/usr/bin/venv python ############################################################################# # # # Copyright (c) 2020 Saeid Hosseinipoor <https://saeid-h.github.io/> # # All rights reserved. # # Licensed under the MIT License # # # ###################...
{"hexsha": "bfbc990ca891d6bfecf61feab47fe0784a7d0d4a", "size": 6108, "ext": "py", "lang": "Python", "max_stars_repo_path": "cv_io/collection.py", "max_stars_repo_name": "saeid-h/computer-vision-file-handler", "max_stars_repo_head_hexsha": "b7903a656727afcfc2e3ae112dbd9fdaba5337d0", "max_stars_repo_licenses": ["MIT"], "...
#! usr/bin/python3 #%% import config from src.model.stldesc_model import define_stl_encoder, EmbStyleNet from src.support.loss_functions import pairWiseRankingLoss, MarginalAcc, triplet_loss import os import logging import time import math from tqdm import tqdm from datetime import datetime import pathlib import pand...
{"hexsha": "0a4001503b805d3090716300a232bc1fa9b9fdbf", "size": 11028, "ext": "py", "lang": "Python", "max_stars_repo_path": "stldesc_train2.py", "max_stars_repo_name": "nipdep/STGAN", "max_stars_repo_head_hexsha": "c72ba6cb9d23d33accc0cfa1958a2005db3ed490", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
""" @author: Saikumar Dandla """ import numpy as np name_dict = {0:'Avinash R' , 1:'Durgendra Pandey', 2:'Rokkam Hari Sankar', 3:'Adurti Sai Mahesh', 4:'Manish Pratap Singh', 5:'RVNK Neeraj', 6:'Saikumar D', 7:'B...
{"hexsha": "08ada4d203c1a7160c974f804a00d80b23d9cef5", "size": 445, "ext": "py", "lang": "Python", "max_stars_repo_path": "Attendence system/dict.py", "max_stars_repo_name": "Saidsp19/Intelligent-attendance-system-using-face-recognition", "max_stars_repo_head_hexsha": "d8e588f592d4b7d92756a31f6570464ee1e1bea6", "max_st...
# -*- coding: utf-8 -*- """ This file contains the script for defining characteristic functions and using them as a way to embed distributional information in Euclidean space """ import time import numpy as np import matplotlib.pyplot as plt import pandas as pd def characteristic_function(sig,t,plot=False, taus=1, n...
{"hexsha": "3aa83b56784d961b7761a3888d944cc6de003532", "size": 3001, "ext": "py", "lang": "Python", "max_stars_repo_path": "graphWave/src/characteristic_functions.py", "max_stars_repo_name": "CEfanmin/DataMiningProjects", "max_stars_repo_head_hexsha": "b6375f542c68c0001ae2971dd7e8046a0b4afc7a", "max_stars_repo_licenses...
from numpy import zeros, exp, sqrt, pi, arange, allclose, array, polynomial from scipy import optimize from scipy.integrate import trapz, odeint from scipy.optimize import curve_fit from numba import jit class analytic_solution: def analytical_solution(self, NT, NX, TMAX, XMAX, NU): """ Returns t...
{"hexsha": "8492217750f452450feef14dd8be84b84cefac87", "size": 6668, "ext": "py", "lang": "Python", "max_stars_repo_path": "pySpectralPDE/deterministic/helpers.py", "max_stars_repo_name": "alanmatzumiya/Maestria", "max_stars_repo_head_hexsha": "c5e2a019312fb8f9bc193b04b07b7815e6ed4032", "max_stars_repo_licenses": ["MIT...
import tensorflow import keras import sklearn from sklearn import linear_model import pandas as pd import numpy as np from sklearn.utils import shuffle import matplotlib.pyplot as pyplot import pickle from matplotlib import style data = pd.read_csv("train.csv", sep=",") mass = data["mean_atomic_mass"] predict = "cri...
{"hexsha": "d756f1c6fdeb582734bfada4868221c60dad9370", "size": 1012, "ext": "py", "lang": "Python", "max_stars_repo_path": "algoritmos/linear.py", "max_stars_repo_name": "lucasrbk/Pibiti", "max_stars_repo_head_hexsha": "e60c02af7fe93e1ac65975a199ae1ae11fb88d42", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import csv from shutil import copyfile import click import numpy as np import pandas as pd from tqdm import tqdm from src.helpers import paths from src.helpers.flags import AttackModes, Verbose from src.multimodal import multimodal from src.multimodal.data import make_dataset from src.multimodal.features import build...
{"hexsha": "9cf0568bd1b0996f11d67f714010e1dd2854a333", "size": 4449, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/multimodal/models/predict_test.py", "max_stars_repo_name": "markrofail/multi-modal-deep-learning-for-vehicle-sensor-data-abstraction-and-attack-detection", "max_stars_repo_head_hexsha": "2f252...
import numpy as np from typing import Tuple import torch from torch.utils.data import DataLoader from transformers import BertTokenizer from enums.run_type import RunType from services.arguments.arguments_service_base import ArgumentsServiceBase from services.dataset_service import DatasetService from services.tok...
{"hexsha": "a23f66a0dd80f9099347e18c612a0d354ec189e5", "size": 2598, "ext": "py", "lang": "Python", "max_stars_repo_path": "services/dataloader_service.py", "max_stars_repo_name": "ktodorov/eval-historical-texts", "max_stars_repo_head_hexsha": "e2994d594525d1d92056a6398935376a96659abb", "max_stars_repo_licenses": ["MIT...
""" Plot class. """ import copy from math import sin, cos import numpy as np import param from dataviews.ndmapping import NdMapping from topo.base.sheetcoords import SheetCoordinateSystem,Slice from bitmap import HSVBitmap, RGBBitmap, Bitmap, DrawBitmap ### JCALERT! ### - Re-write the test file, taking the new cha...
{"hexsha": "7d2d694ce8358ffcc5100f05b72a4d996f331292", "size": 25161, "ext": "py", "lang": "Python", "max_stars_repo_path": "topo/plotting/plot.py", "max_stars_repo_name": "ceball/topographica", "max_stars_repo_head_hexsha": "ec0eea614409ceb7473e04bc2f6b6c888099160f", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
import colloidpy as cp import numpy as np from dataAnalysis import trace import matplotlib.pyplot as plt water = trace('trace_with_water.npy') water.modify(1, 4) water.modify(2, 4) no_water = trace('trace_without_water.npy') no_water.modify(1, 4) no_water.modify(2, 4) print(cp.__version__) water_data = water.data no...
{"hexsha": "f91ab47b0ec8e30db5d15de6677d7140b519f84b", "size": 2280, "ext": "py", "lang": "Python", "max_stars_repo_path": "example/msd.py", "max_stars_repo_name": "KyQiao/balltrack", "max_stars_repo_head_hexsha": "2e928ae9dcfd72f43514c978f3556723724b34a1", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
# -*- coding: utf-8 -*- # This work is part of the Core Imaging Library (CIL) developed by CCPi # (Collaborative Computational Project in Tomographic Imaging), with # substantial contributions by UKRI-STFC and University of Manchester. # Licensed under the Apache License, Version 2.0 (the "License"); # you...
{"hexsha": "40ff326485c9cb5cddfd0ea4843c7fac18301313", "size": 5282, "ext": "py", "lang": "Python", "max_stars_repo_path": "Wrappers/Python/cil/optimisation/algorithms/CGLS.py", "max_stars_repo_name": "Asharits/CIL", "max_stars_repo_head_hexsha": "66848b021fb2c6daca71e276890152f34a87ba36", "max_stars_repo_licenses": ["...
import os import sys import numpy as np from run_pid_optimized import PIDEvaluator from bayes_opt import BayesianOptimization from bayes_opt.observer import JSONLogger from bayes_opt.event import Events def func(rx, ry, px, py, yx, yy): rz, pz, yz = 0.0001, 0.0001, 0.0001 current_dir = os.path.dirname(__file...
{"hexsha": "5b51d7f3c544d8c9dec2091627eb89e2ca4e1d10", "size": 1394, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments_prokhn/controllers/bayesian_pid.py", "max_stars_repo_name": "prokhn/onti-2019-bigdata", "max_stars_repo_head_hexsha": "b9296141958f544177388be94072efce7bdc7814", "max_stars_repo_licens...
import tensorflow as tf import numpy as np from utils.data import convert_categorical from models.base_model import BaseModel class Discriminator: def __init__(self, discriminator_model, protected_variable): self.model = discriminator_model self.protected_variable = protected_variable class Fa...
{"hexsha": "08f9f1328178575c3bd8072cd427320de98a38fb", "size": 5411, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/adversarial_model.py", "max_stars_repo_name": "cryptexis/debias", "max_stars_repo_head_hexsha": "a9e0106dcb8668b95e4654ccb3e7373a70ea37a3", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#!/usr/bin/env python u""" hdf5_stokes.py Written by Tyler Sutterley (10/2021) Writes spherical harmonic coefficients to HDF5 files CALLING SEQUENCE: hdf5_stokes(clm1,slm1,linp,minp,tinp,month,FILENAME=output_HDF5_file) INPUTS: clm1: cosine spherical harmonic coefficients slm1: sine spherical harmonic co...
{"hexsha": "3f9b43c4eeb051c98ef4fb21c861fd28d4424252", "size": 8426, "ext": "py", "lang": "Python", "max_stars_repo_path": "gravity_toolkit/hdf5_stokes.py", "max_stars_repo_name": "tsutterley/read-GRACE-harmonics", "max_stars_repo_head_hexsha": "6feb1ef24402ec02d14cf852e655aa5367ef719e", "max_stars_repo_licenses": ["MI...
""" """ from pathlib import Path import argparse import random import shutil import logging import os, sys import torch import torch.optim as optim from torch.utils.tensorboard import SummaryWriter import torchvision # import keras # # import tensorflow as tf import matplotlib.pyplot as plt import numpy as np im...
{"hexsha": "71e50df0eaeded3af3acb07edc4d5cc5ce205dc5", "size": 9992, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate_main_results.py", "max_stars_repo_name": "divergent63/Ocean_Trajectory_Forecast", "max_stars_repo_head_hexsha": "cc1be57c519508b74d08e4595023a6b82dc50b78", "max_stars_repo_licenses": ["Ap...
abstract type AbstractAxis{T, BL, BR, I} <: AbstractVector{T} end abstract type AbstractDiscreteAxis{T, BL, BR, I} <: AbstractAxis{T, BL, BR, I} end """ DiscreteAxis{T, BL, BR} <: AbstractAxis{T, BL, BR} * T: Type of ticks * BL, BR ∈ {:periodic, :reflecting, :infinite, :r0, :fixed} * BL: left boundary co...
{"hexsha": "65e2a8e83ab8ca2d4d3d4bdd26126f44b4b4a6e3", "size": 15388, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Axes/DiscreteAxis.jl", "max_stars_repo_name": "UnofficialJuliaMirror/SolidStateDetectors.jl-71e43887-2bd9-5f77-aebd-47f656f0a3f0", "max_stars_repo_head_hexsha": "075fbaf67b6d1c2e229e93740847b9...
#!/usr/bin/env julia using Luxor, Colors using Test using Random Random.seed!(42) function spiral_logo_eps() gsave() scale(.3, .3) r = 200 setcolor("gray") for i in 0:pi/8:2pi gsave() translate(r * cos(i), r * sin(i)) rotate(i) julialogo() grestore() e...
{"hexsha": "ba481be5383655a8ea9534bacfeed004ce193076", "size": 1836, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/julia-logo-draw-eps.jl", "max_stars_repo_name": "guo-yong-zhi/Luxor.jl", "max_stars_repo_head_hexsha": "3b4fe34fe1e05c17bfcc9cc5b074fa527e5d1ebf", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/env python import numpy as np import cv2 from commonFunctions_v04 import get_info_from_logfile from commonFunctions_v04 import flip_horizontally # History # v01 : Start # v02 : add nb_images to read parameter # v03 : add normalization + mean centering data to 0 # v04 : data augmentation flip horizontally i...
{"hexsha": "0ebdcfe49ac8b4f5c29cc9f1169878dbd3df8c7c", "size": 1758, "ext": "py", "lang": "Python", "max_stars_repo_path": "archiveOldVersions/clone_v05.py", "max_stars_repo_name": "remichartier/014_selfDrivingCarND_BehavioralCloningProject", "max_stars_repo_head_hexsha": "1dcaa7c5a937929d4481e5efbf7ccc856c04c4ff", "ma...
from __future__ import annotations from typing import Any, Iterable, Literal, Sequence import attr import networkx as nx __all__ = ["PoSet", "Pair", "Chain", "CMP"] Pair = tuple[Any, Any] Chain = Sequence[Any] CMP = Literal["<", ">", "||", "="] @attr.frozen class PoSet: """Hasse diagram representation of par...
{"hexsha": "6075e546a256dd0ff140d7627a271ca08530449c", "size": 1280, "ext": "py", "lang": "Python", "max_stars_repo_path": "hasse/poset.py", "max_stars_repo_name": "mvcisback/hasse", "max_stars_repo_head_hexsha": "eefd6f4af217a4c44bd2751df6f39bd5b7d37d6c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
! RUN: %S/test_errors.sh %s %t %flang_fc1 ! REQUIRES: shell ! Simple check that if constructs are ok. if (a < b) then a = 1 end if if (a < b) then a = 2 else a = 3 endif if (a < b) then a = 4 else if(a == b) then a = 5 end if if (a < b) then a = 6 else if(a == b) then a = 7 elseif(a > b) then a = 8 ...
{"hexsha": "9fb1344ff259d0384fef0c284e536e01f6f49988", "size": 584, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "flang/test/Semantics/if_construct01.f90", "max_stars_repo_name": "acidburn0zzz/llvm-project", "max_stars_repo_head_hexsha": "7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9", "max_stars_repo_licenses": ...
using Test using StatsModelComparisons using StanSample, StatsFuns using Printf using JSON @testset "Arsenic" begin ProjDir = @__DIR__ #= if haskey(ENV, "JULIA_CMDSTAN_HOME") include(joinpath(ProjDir, "test_demo_wells.jl")) else println("\nJULIA_CMDSTAN_HOME not set. Skipping tests") ...
{"hexsha": "e1dd15a3810acf456c7406a915d08473b6923f74", "size": 2013, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_demo_wells.jl", "max_stars_repo_name": "itsdfish/StatsModelComparisons.jl", "max_stars_repo_head_hexsha": "e8683a97bc4cdc57b465fdec245300d691d59240", "max_stars_repo_licenses": ["MIT"], "...
import numpy as np def int_to_str(arr: np.ndarray) -> np.ndarray: """ Convert array of 64-bit integers to S9. We cannot use arr.byteswap().view("S8") because the trailing zeros are discarded \ in np.char.add. Thus we have to pad with ";". """ assert arr.dtype == int arena = np.full((len(a...
{"hexsha": "adeacfcec3841b8d38df15d060037e76affc86de", "size": 461, "ext": "py", "lang": "Python", "max_stars_repo_path": "server/athenian/api/int_to_str.py", "max_stars_repo_name": "athenianco/athenian-api", "max_stars_repo_head_hexsha": "dd5556101a8c49703d6b0516e4268b9e8d8eda5b", "max_stars_repo_licenses": ["RSA-MD"]...
# SPDX-License-Identifier: MIT # Copyright (c) 2020: Pablo Zubieta module ReactionCoordinates using LinearAlgebra using StaticArrays export Acylindricity, Angle, Asphericity, Barycenter, DihedralAngle, DistanceFrom, GyrationTensor, PairwiseKernel, PrincipalMoments, RadiusOfGyration, RouseMode, Separation, ...
{"hexsha": "bbd29ec6d432337eb4aebb74bb750572b3d11144", "size": 12018, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ReactionCoordinates.jl", "max_stars_repo_name": "pabloferz/ReactionCoordinates.jl", "max_stars_repo_head_hexsha": "e88ea117940480cb17f8525d6b2c1467bd108c5d", "max_stars_repo_licenses": ["MIT"]...
import pandas as pd import numpy as np import sys import click import os os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python" import mlflow from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import CountVectorizer from sklearn.linear_model import LogisticRegression fro...
{"hexsha": "b81487f948fe7bd1841243788aec568c20c9cb0b", "size": 6804, "ext": "py", "lang": "Python", "max_stars_repo_path": "classifier/2_build_train_model.py", "max_stars_repo_name": "justinkaseman/politicate-classifier", "max_stars_repo_head_hexsha": "706af6a604dc076ed6a1ca526159c14a7f0e16af", "max_stars_repo_licenses...
using Documenter, ModelingToolkitStandardLibrary using ModelingToolkitStandardLibrary.Blocks using ModelingToolkitStandardLibrary.Mechanical using ModelingToolkitStandardLibrary.Mechanical.Rotational using ModelingToolkitStandardLibrary.Magnetic using ModelingToolkitStandardLibrary.Magnetic.FluxTubes using ModelingTool...
{"hexsha": "4bf65ef9872e916e37cb1dd448475a05a4bb4d85", "size": 1723, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "baggepinnen/ModelingToolkitStandardLibrary.jl", "max_stars_repo_head_hexsha": "f8bdbb9f91eadcf274c54dfcd5df94f189ffbd15", "max_stars_repo_licenses": ["MIT"], ...
module LBNumber include("./../../constraints/geometric/constants.jl") include("./1_if.jl") include("./2_calc_number.jl") using JuMP using .Constants using .IfSimpleLoadBearing using .CalcNumberLoadBearing export cons_lb_number_load_bearing function cons_lb_number_load_bearing(m) m = if_simple_lb(m) m = calc...
{"hexsha": "da048cd1b4b40c5eb587892355fab439acb4bac8", "size": 356, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/constraints/load_bearing/simple/0_number_lb.jl", "max_stars_repo_name": "ToralfFrich/Master_Thesis", "max_stars_repo_head_hexsha": "5d4a51598f1677c2f5c219a88ca9ab4c9b6a5c6f", "max_stars_repo_lic...
#! /usr/bin/env python """ File: root_finder_examples.py Copyright (c) 2016 Chinmai Raman License: MIT Course: PHYS227 Assignment: A.11 Date: Feb 24, 2016 Email: raman105@mail.chapman.edu Name: Chinmai Raman Description: Tests different methods for finding roots of a nonlinear function. """ import numpy as np def Ne...
{"hexsha": "ff1253e0c4e3f8e7f6f23bc24e9fa0e6cd6fdb4c", "size": 3012, "ext": "py", "lang": "Python", "max_stars_repo_path": "root_finder_examples.py", "max_stars_repo_name": "chapman-phys227-2016s/hw-3-ChinmaiRaman", "max_stars_repo_head_hexsha": "3d3c2a688b656f518d9cef9a5d44ca9fd64a159e", "max_stars_repo_licenses": ["M...
program main use class_string implicit none integer :: i,n character, allocatable :: c(:) character(:), allocatable :: s type(string) :: str type(string), allocatable :: w(:) str = string('Foo') s = str%get() c = str%chars() print *, len(s) print *, size(c) print *,...
{"hexsha": "45851871860ef200ba495a121d5fa1f7ea0bc599", "size": 562, "ext": "f03", "lang": "FORTRAN", "max_stars_repo_path": "examples/example_string.f03", "max_stars_repo_name": "gemmarx/cbtrie_assoc", "max_stars_repo_head_hexsha": "7998718783ca42965fe8c4eaac6d292ce08bd87c", "max_stars_repo_licenses": ["BSD-2-Clause"],...
#Karan Vombatkere #German Enigma Machine #October 2017 from string import * import numpy as np Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" #function to create a dictionary with letters and their indices #Use this to return the index of a letter (a = 0, .., z = 25) def genDictionary(): letter_index_pairs = [] for...
{"hexsha": "055b16e0cd30f2da98612b1b9ada06dbb6b85b9f", "size": 3311, "ext": "py", "lang": "Python", "max_stars_repo_path": "Plugboard.py", "max_stars_repo_name": "kvombatkere/Enigma-Machine", "max_stars_repo_head_hexsha": "b7a6e199a8e5ec600771f4740943fa83446f7dcd", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy as n import cryoops as cops import geom class FixedPlanarDomain(): def __init__(self,pts,res): self.pts = pts self.resolution = res self.sqdist_mat = self.get_sqdist_mat(self) self.dim = self.pts.shape[1] if pts.shape[0] == 1: self.pt_resolution = r...
{"hexsha": "e768d917f8748d20022bfeb161f125243f57d695", "size": 5062, "ext": "py", "lang": "Python", "max_stars_repo_path": "quadrature/domain.py", "max_stars_repo_name": "mbrubake/cryoem-cvpr2015", "max_stars_repo_head_hexsha": "ea0eda3b663364b3b4c7d989bdecfc5263ef3102", "max_stars_repo_licenses": ["Python-2.0", "OLDAP...
#test import numpy as np import sympy as sm wo = sm.Symbol('wo',real=True) #magentic dipole frequency print(wo) def decode1(n,Nb_floquet_blocks, No_subspaces = 0): # n = alpha+ (n1+2)*3+(n2+Nb_floquet_blocks)*(15) Nb_atomic_states = 3 tot_size = Nb_atomic_states*(2*Nb_floquet_blocks+1)*(2*Nb_floquet_blocks+...
{"hexsha": "e155c75eca2eb1452a8fa2b918a2de7481a80cda", "size": 1339, "ext": "py", "lang": "Python", "max_stars_repo_path": "comparison_FL_QT/Scripts/test.py", "max_stars_repo_name": "Anthony-Gandon/Floquet_theory", "max_stars_repo_head_hexsha": "c25917986d83974850ecff60f388632087b8b52f", "max_stars_repo_licenses": ["MI...
[STATEMENT] lemma rank_of_eq_card_basis_in: assumes "basis_in \<E> B" shows "rank_of \<E> = card B" [PROOF STATE] proof (prove) goal (1 subgoal): 1. rank_of \<E> = card B [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. rank_of \<E> = card B [PROOF STEP] have "{card B | B. basis_in \<E> B} = ...
{"llama_tokens": 601, "file": "Matroids_Matroid", "length": 9}
# Copyright (c) Open-MMLab. All rights reserved. import os import os.path as osp import tempfile import mmcv import numpy as np import pytest import torch from mmdet.core import visualization as vis def test_color(): assert vis.color_val_matplotlib(mmcv.Color.blue) == (0., 0., 1.) assert vis.color_val_matpl...
{"hexsha": "9c7969b44ee5b4ee862c09b63f122db14a534b32", "size": 4431, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_utils/test_visualization.py", "max_stars_repo_name": "evgps/mmdetection_trashcan", "max_stars_repo_head_hexsha": "aaf4237c2c0d473425cdc7b741d3009177b79751", "max_stars_repo_licenses": [...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Friggeri Resume/CV % XeLaTeX Template % Version 1.2 (3/5/15) % % This template has been downloaded from: % http://www.LaTeXTemplates.com % % Original author: % Adrien Friggeri (adrien@friggeri.net) % https://github.com/afriggeri/CV % % License: % CC BY-NC-SA 3.0 (http://creat...
{"hexsha": "ecc5cd449ff5274da9b8807aa360117e7b1c5c70", "size": 10880, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/cv.tex", "max_stars_repo_name": "chrisRidgers/cv", "max_stars_repo_head_hexsha": "4155ad63273526b1a1c1945a17e05a259954c6fe", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": 1, "max...