text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import os from glob import glob import h5py import numpy as np import torch from skimage import draw from scipy.ndimage import gaussian_filter import elf import nifty from threading import Thread from affogato.segmentation import compute_mws_segmentation from utils.affinities import get_naive_affinities, get_edge_fe...
{"hexsha": "91c025503c2ffb0c8fc768dee03e9547856123fb", "size": 20150, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/leptin_data.py", "max_stars_repo_name": "edosedgar/RLForSeg", "max_stars_repo_head_hexsha": "fc748d8e7d2f2a1e7ac0dddb3f268ec3025d40ca", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# -*- coding: utf-8 -*- """ Created on Sat Jul 6 01:36:12 2019 Last updated on Aug 7 2019 @author: Shengjie Liu @Email: liushengjie0756@gmail.com """ import numpy as np from scipy import stats import rscls import matplotlib.pyplot as plt import time import networks as nw from keras.utils import to_cat...
{"hexsha": "4727dba02ba74e1f7034d937c324e3d58f287445", "size": 5776, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo_keras.py", "max_stars_repo_name": "chemaMR/Remote-Sensing-Image-Classification", "max_stars_repo_head_hexsha": "ddc5d7e17c1bb8ecf6f0c8982115327be3f0dbbe", "max_stars_repo_licenses": ["MIT"], ...
import abc import numpy as np import pandas as pd from reinvent_chemistry.conversions import Conversions from reinvent_scoring.scoring.diversity_filters.curriculum_learning import DiversityFilterParameters, \ DiversityFilterMemory from reinvent_scoring.scoring.diversity_filters.curriculum_learning.loggable_data_d...
{"hexsha": "91942532b0eaeb87ed80dcfeb1849e5a69722131", "size": 2614, "ext": "py", "lang": "Python", "max_stars_repo_path": "reinvent_scoring/scoring/diversity_filters/curriculum_learning/base_diversity_filter.py", "max_stars_repo_name": "MolecularAI/reinvent-scoring", "max_stars_repo_head_hexsha": "f7e052ceeffd29e17e16...
""" Alignment plans for the HXRSnD """ import logging import numpy as np from lmfit.models import LorentzianModel from bluesky import Msg from bluesky.plans import scan, list_scan from bluesky.utils import short_uid as _short_uid from bluesky.plan_stubs import abs_set, checkpoint, trigger_and_read from bluesky.preproc...
{"hexsha": "6e0dcc98500d3c8e6c90ba452c5716baeef4eb5d", "size": 8997, "ext": "py", "lang": "Python", "max_stars_repo_path": "hxrsnd/plans/alignment.py", "max_stars_repo_name": "klauer/hxrsnd", "max_stars_repo_head_hexsha": "aa78f3cdbdd59cd4b3aa7fc72d066158364b5ee2", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"], "max...
/*! \file \brief An entry. Copyright (C) 2019-2022 kaoru https://www.tetengo.org/ */ #include <any> #include <memory> #include <string> #include <string_view> #include <utility> #include <boost/preprocessor.hpp> #include <boost/scope_exit.hpp> #include <boost/test/unit_test.hpp> #include <t...
{"hexsha": "140c1d131c326efdb63f87c21554fd5c05b734f3", "size": 8679, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "library/lattice/test/src/test_tetengo.lattice.entry.cpp", "max_stars_repo_name": "tetengo/tetengo", "max_stars_repo_head_hexsha": "66e0d03635583c25be4320171f3cc1e7f40a56e6", "max_stars_repo_licenses...
function [tissueModel,coreRxnBool,coreMetBool,coreCtrsBool] = fastcore(model, coreRxnInd, epsilon, printLevel) % Use the FASTCORE algorithm ('Vlassis et al, 2014') to extract a context % specific model. FASTCORE algorithm defines one set of core % reactions that is guaranteed to be active in the extracted model and fin...
{"author": "opencobra", "repo": "cobratoolbox", "sha": "e60274d127f65d518535fd0814d20c53dc530f73", "save_path": "github-repos/MATLAB/opencobra-cobratoolbox", "path": "github-repos/MATLAB/opencobra-cobratoolbox/cobratoolbox-e60274d127f65d518535fd0814d20c53dc530f73/src/dataIntegration/transcriptomics/FASTCORE/fastcore.m"...
__author__ = "Nestor Bermudez" __license__ = "MIT" __version__ = "1.0.0" __email__ = "nab6@illinois.edu" __status__ = "Development" import numpy as np import pandas as pd import tensorflow as tf flags = tf.flags FLAGS = flags.FLAGS flags.DEFINE_string("data_dir", "./data", "Root of input data") flags.DEFINE_string...
{"hexsha": "b7566981b51ba1623eed2bdae98b9b61971358d5", "size": 4444, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/preprocess_homologs.py", "max_stars_repo_name": "nbermudezs/HoGEm", "max_stars_repo_head_hexsha": "a8f04e88b4ca9c1667502d408c2177a4466be344", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# pylint: disable=missing-docstring, invalid-name, import-error import numpy as np import pandas as pd from mltils.preprocessing.encoders import InfrequentValueEncoder from mltils.utils.test_utils import _test_immutability def test_infrequent_value_encoder_1(): ive = InfrequentValueEncoder() assert ive is no...
{"hexsha": "ef79d564fd77d03b91ef64900254490bf9c0882b", "size": 2476, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/mltils/test_infrequent_value_encoder.py", "max_stars_repo_name": "rladeira/mltils", "max_stars_repo_head_hexsha": "ed9c9f1e4f2eb0bb4c4457df82d5c28058223bfd", "max_stars_repo_licenses": ["MIT...
/*! @file Defines `boost::hana::extend`. @copyright Louis Dionne 2015 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_EXTEND_HPP #define BOOST_HANA_EXTEND_HPP #include <boost/hana/fwd/extend.hpp> #includ...
{"hexsha": "61251ed0b71b4f9d5ebab114622a6bdb86935982", "size": 1463, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/hana/extend.hpp", "max_stars_repo_name": "qicosmos/hana", "max_stars_repo_head_hexsha": "b0f8cf2bf19d491b7b739dcb7b8d7497b0e5829f", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_c...
import numpy as np ndarry = np.array([[35, 20, 66], [23, 67, 89], [13, 244, 67]], np.int32) print(ndarry.shape, ndarry.size) print(ndarry.dtype) print(ndarry[1:2, 1:2]) sdarry = np.array([ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ]) print(sdarry[1, 2]) print(sdarry[:, 2]) print(sdarry[2, :]) print(s...
{"hexsha": "943830220a32cf7705f90c40ccceba6968eaa0bf", "size": 404, "ext": "py", "lang": "Python", "max_stars_repo_path": "numpy/nparray.py", "max_stars_repo_name": "cloudgc/data-statistics", "max_stars_repo_head_hexsha": "b5c0f60fd6caccf9a2735602be864b4d537d8fb5", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
\section{Honours and Awards} \begin{tabular}{rll} 2022 & Certificate of Distinction (top 25\%) & Canadian Computing Competition Senior \\ 2021 & Certificate of Distinction (top 25\%) & Canadian Computing Competition Junior \\ 2021 & & Google Code Jam Round 1 Qualifier \\ 2021 & Certificate of Excellence (top 10\...
{"hexsha": "654460a94bb27a351fc4a3fa70b39987b59a58b2", "size": 541, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sections/awards.tex", "max_stars_repo_name": "isobarbaric/my-resume", "max_stars_repo_head_hexsha": "b7c616e4114f1ade5aa65517b69df75c8b77c687", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
program main use mpi DOUBLE PRECISION f(10,2) integer code,np,world,ierr do i=1,10 f(i,1)=1 f(i,2)=2 enddo call mpi_init(ierr) call mpi_comm_dup(mpi_comm_world,world,ierr) call mpi_comm_rank(world,code,ierr) call mpi_comm_size(world,np,ierr) do i=1,3 call update() if(code.eq.0)then print*,'global f',f endif endd...
{"hexsha": "579e997dee40faee56f9a34e4f49cd5943535fc0", "size": 1300, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Model5/yinheqing1.f90", "max_stars_repo_name": "CaptainYin/ParLTRANS", "max_stars_repo_head_hexsha": "760734f058589ab464897dcf01f3f5528803d43b", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
using StatsPlots using CSV using DataFrames jt = CSV.read(joinpath(@__DIR__, "julia_num_apertures.csv")) |> DataFrame pt = CSV.read(joinpath(@__DIR__, "python_num_apertures.csv")) |> DataFrame jt_ell = CSV.read(joinpath(@__DIR__, "julia_num_apertures-ellipse.csv")) |> DataFrame pt_ell = CSV.read(joinpath(@__DIR__, "p...
{"hexsha": "8f94fb435c3dcc821d3e5ac27ee69d6a7fd5ad02", "size": 1484, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "bench/num_apertures/plotting.jl", "max_stars_repo_name": "mileslucas/Photometry.jl", "max_stars_repo_head_hexsha": "fa5e225266db1eb3df92ff77082a857e41515cb0", "max_stars_repo_licenses": ["MIT"], "m...
''' Urban-PLUMBER processing code Associated with the manuscript: Harmonized, gap-filled dataset from 20 urban flux tower sites Maps developed based on: Hrisko, J. (2020). Geographic Visualizations in Python with Cartopy. Maker Portal. https://makersportal.com/blog/2020/4/24/geographic-visualizations-in-python-with-...
{"hexsha": "6bbe27d0c3c1326baaf35ce648fe06a7d7a80050", "size": 14948, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_sitemaps.py", "max_stars_repo_name": "matlipson/urban-plumber_pipeline", "max_stars_repo_head_hexsha": "d4ab7ef3942d502b422041a364be5eddd56e301b", "max_stars_repo_licenses": ["Apache-2.0"], ...
import array import typing import numpy as np import pandas as pd import six import logging from flask import json log = logging.getLogger(__name__) class Metadata: STATUS = "status" QUERY = "query" MESSAGE = "message" DATA_TYPE = "type" EXECUTION_TIME = "time" class Error: CODE = "code" ...
{"hexsha": "8ec448afb4491c648b57a2503c4b9627c315b521", "size": 4345, "ext": "py", "lang": "Python", "max_stars_repo_path": "libraries/unified-model/unified_model/server/response_format.py", "max_stars_repo_name": "felixridinger/machine-learning-lab", "max_stars_repo_head_hexsha": "410e2f5fecb7ea91dcec12a5b9cb9161331191...
""" The two primary classes this code uses are bfio.BioReader and bfio.BioWriter: bfio.BioReader will read any image that the Bioformats tool can read. bfio.BioWriter will only save images as an ome tiled tiff. Example usage is provided in the comments to each class. Required packages: javabridge (also requires jdk >...
{"hexsha": "584b0e28e80173a0a453a482277f34bf87adc8cf", "size": 77720, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/polus-bfio-util/bfio/bfio.py", "max_stars_repo_name": "blowekamp/polus-plugins", "max_stars_repo_head_hexsha": "87f9c36647b4cf95cf107cfede3a5a1d749415a5", "max_stars_repo_licenses": ["MIT"]...
import os import numpy as np import cv2 i=0 for root, dirs, file in os.walk("Published_database_FV-USM_Dec2013/2nd_session/extractedvein/"): for dir in dirs: for file in os.walk(root+dir): for each in file[2]: print(root+dir+each) x = cv2.imread(root+dir+"/"+e...
{"hexsha": "e3445a808b807df2dd3b76c82cd35cdd18cb20ab", "size": 501, "ext": "py", "lang": "Python", "max_stars_repo_path": "deliverable/data/regroup_db.py", "max_stars_repo_name": "samdubuis/ma-semester-project", "max_stars_repo_head_hexsha": "058e7be9782727cb4428772f8384322686e82000", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python3 import asyncio import json import keras.preprocessing import numpy as np import re import spacy import sys import tensorflow as tf from pathlib import Path from sklearn.feature_extraction.text import TfidfVectorizer from spacy import displacy from spacy.matcher import Matcher from textblob import...
{"hexsha": "59a19f905e09c0155f9063180efbef3584b87c9d", "size": 5472, "ext": "py", "lang": "Python", "max_stars_repo_path": "ml/processtext.py", "max_stars_repo_name": "QEDK/clarity", "max_stars_repo_head_hexsha": "cca58cce33e273b77190de50a5bdde3f5a199c4c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 4...
import ipywidgets as widgets from ipywidgets import Button, HBox, VBox, Layout, Label import lmfit import numpy as np import functools def layers2t(layers): t = [] for key in layers.keys(): t.append(layers[key].value) return t def build_gui_layer_v2(name, guess, nk): cb = widgets.Checkbox( ...
{"hexsha": "31f70c74726da71ff2c17d34d80837dcbc6e61c1", "size": 7798, "ext": "py", "lang": "Python", "max_stars_repo_path": "tes_optical_stack/jupyter_gui.py", "max_stars_repo_name": "saewoonam/tes_optical_stack", "max_stars_repo_head_hexsha": "975361064702b9e294c4815ee84bb51c7d6ccc4c", "max_stars_repo_licenses": ["MIT"...
"""Tests for GenomeCorrelation.""" import unittest from microbepy.common import constants as cn from microbepy.common import helpers from microbepy.common import util from microbepy.correlation import genome_correlation as gc from microbepy.correlation.genome_correlation import GenomeCorrelation import numpy as np i...
{"hexsha": "71c2d49bdd2f018a40447a8b0f166fa489d66245", "size": 5832, "ext": "py", "lang": "Python", "max_stars_repo_path": "microbepy/tests/correlation/test_genome_correlation.py", "max_stars_repo_name": "ScienceStacks/MicrobEPy", "max_stars_repo_head_hexsha": "704435e66c58677bab24f27820458870092924e2", "max_stars_repo...
import os import re import time from tqdm import tqdm import argparse import numpy as np import tensorflow as tf import imageio from model import PWCDCNet from flow_utils import vis_flow_pyramid def factor_crop(image, factor = 64): assert image.ndim == 3 h, w, _ = image.shape image = image[:factor*(h//fac...
{"hexsha": "344719358b2a9dde62bde2741e940e4e33466fe1", "size": 3087, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "daigo0927/pwcnet", "max_stars_repo_head_hexsha": "d0b749967940b8fac2ccf82502c3fe7923c3afab", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 49, "max_stars...
from __future__ import division, print_function import argparse import math import os import sys from timeit import Timer from collections import defaultdict import pkg_resources from PIL import Image import cv2 from tqdm import tqdm import numpy as np import pandas as pd import torchvision.transforms.functional as to...
{"hexsha": "c7a9894fdbbdc4d750a682753b2124c35f644c58", "size": 9789, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmark/benchmark.py", "max_stars_repo_name": "daisukelab/albumentations", "max_stars_repo_head_hexsha": "f5e9f4d46e7abaddfc137c7f697b4a5a98af5fb7", "max_stars_repo_licenses": ["MIT"], "max_star...
from numpy import percentile from a2e.datasets.bearing import load_data from a2e.experiment import Experiment from a2e.processing.stats import mad from a2e.utility import z_score as compute_z_score, compute_classification_metrics, compute_roc config = { # See https://medias.schaeffler.us/en/product/rotary/rolling-...
{"hexsha": "5097d59f0d49e49390a4fd6d465f37b3ecd1274c", "size": 5894, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/benchmark/frequency_analysis.py", "max_stars_repo_name": "maechler/a2e", "max_stars_repo_head_hexsha": "c28f546ca5fc3fdb9c740ea5f0f85d2aca044a00", "max_stars_repo_licenses": ["MIT"], "...
[STATEMENT] theorem T_monotonic: "MonotProblem TE_wtFsym wtPsym TE_arOf TE_resOf parOf tPB" [PROOF STATE] proof (prove) goal (1 subgoal): 1. MonotProblem TE_wtFsym wtPsym TE_arOf TE_resOf parOf tPB [PROOF STEP] ..
{"llama_tokens": 99, "file": "Sort_Encodings_T", "length": 1}
#!venv/bin/python3 ''' Author: Massimo Clementi Date: 2021-04-04 Display the 4D IRIS dataset and train a simple MLP on it ''' # %% Imports import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import tensorflow as tf import urllib.request # %% Download, sho...
{"hexsha": "dd78168bdbaa1dea0a8e4c2a5f72da2942077cad", "size": 3260, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_scripts/1_IRIS_dataset_and_MLP.py", "max_stars_repo_name": "alezuech/tf-neural-networks", "max_stars_repo_head_hexsha": "f601043de7e9a8789923189e2b1eafe62f00abdd", "max_stars_repo_licenses"...
#!/usr/bin/env python import numpy as np import cv2 import itertools class SegmentationFunctions(): def __init__(self, mask_values=[12]): self.mask_values=mask_values def overlay_mask(self, image, mask, mask_color=[255,0,0], alpha=0.5): orig_image_size=image.shape # reshape image for ...
{"hexsha": "6ea19e6e7b71f4bf3c6b1e4bc3695aa9c32ab9de", "size": 1968, "ext": "py", "lang": "Python", "max_stars_repo_path": "rr_mxnet/scripts/mxnet_segmentation_custom_functions.py", "max_stars_repo_name": "DavidFernandezChaves/ViMantic-Client", "max_stars_repo_head_hexsha": "cb28b459724b24a8acb1ed09387f7921960344bd", "...
# -*- coding: utf-8 -*- r"""Data handling """ import copy import numbers import warnings import numpy as np from collections import OrderedDict from multiprocessing import cpu_count, Pool # @UnresolvedImport from .analysis import Analysis from .plot import PlotData def _call_bin_parallel(arg, **kwarg): r"""Wra...
{"hexsha": "15a4c125114f53f51bcb566e43835dfb128f246c", "size": 21927, "ext": "py", "lang": "Python", "max_stars_repo_path": "neutronpy/data/data.py", "max_stars_repo_name": "neutronpy/neutronpy", "max_stars_repo_head_hexsha": "44ca74a0bef25c03397a77aafb359bb257de1fe6", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# Python 3.7.6 # -*- coding: utf-8 -*- # Author: Ines Pisetta import os import torch from torch import nn import numpy as np #from fast_ctc_decode import beam_search, viterbi_search #import tensorflow as tf char_list = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' # len_char_list = 62 ...
{"hexsha": "b3fee49dd621d29c4a5b22288217f692671eb77d", "size": 10969, "ext": "py", "lang": "Python", "max_stars_repo_path": "network.py", "max_stars_repo_name": "inlpi/ocr_crnn", "max_stars_repo_head_hexsha": "ddae200d00ecdbfc5d21d4ea7acc02026a4aadf0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
C @(#)putchr_8.f 20.1 1/4/99 subroutine putchr_8 (n, b, r8) character b*(*), format*4 double precision r8 C * PUTCHR_8 MOVES CHARACTER DATA INTO REAL * 8 STORAGE C * CURRENTLY USES READ/WRITE TO SIMULATE ENCODE C * NOTE THAT VARIABLES ARE SWITCHED FROM ENCODE ORDER C C ...
{"hexsha": "1d987a87c513b801f6cfdfe5d3fd9a83f14068cc", "size": 601, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/putchr_8.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, ...
[STATEMENT] lemma bound_main_lemma_charles: fixes PROB :: "'a problem" assumes "finite PROB" shows "problem_plan_bound_charles PROB \<le> 2 ^ (card (prob_dom PROB)) - 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. problem_plan_bound_charles PROB \<le> 2 ^ card (prob_dom PROB) - 1 [PROOF STEP] proof - [PROOF...
{"llama_tokens": 1663, "file": "Factored_Transition_System_Bounding_TopologicalProps", "length": 17}
/* MIT License Copyright (c) 2020 7Mersenne 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, dist...
{"hexsha": "13caa1d4d73e7210a0cc24ea4142ebef5e616028", "size": 3676, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "AIDataGen.cpp", "max_stars_repo_name": "sikkey/AIDataGenerator", "max_stars_repo_head_hexsha": "dc10ac7424258ed0d282442ec63148154075dfd3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
# coding: utf-8 # # Nengo Example: Many neurons # # This demo shows how to construct and manipulate a population of neurons. # # These are 100 leaky integrate-and-fire (LIF) neurons. The neuron tuning properties have been randomly selected. # # The input is a sine wave to show the effects of increasing or decreasi...
{"hexsha": "ef9f2b43decb055c0b3e248f679000581bd72235", "size": 2717, "ext": "py", "lang": "Python", "max_stars_repo_path": "mul_neuron.py", "max_stars_repo_name": "harshkothari410/snn-image-segmentation", "max_stars_repo_head_hexsha": "18fb28e8b2fee3d7583f6e62fd512ba90863c0ee", "max_stars_repo_licenses": ["MIT"], "max_...
# Copyright 2019 Mobvoi Inc. All Rights Reserved. # Author: binbinzhang@mobvoi.com (Binbin Zhang) import argparse import logging import random import sys import codecs import math import numpy as np import torch from torch.nn.utils.rnn import pad_sequence from torch.utils.data import Dataset, DataLoader from PIL impo...
{"hexsha": "d9e7a9a3b0e2b53751c54d2257acb867c3ac3cdf", "size": 13514, "ext": "py", "lang": "Python", "max_stars_repo_path": "wenet/dataset/dataset.py", "max_stars_repo_name": "glynpu/wenet", "max_stars_repo_head_hexsha": "a3c9bbba96a9e57d85c0aa6a2b5bff96fd0e48f7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
#coding:utf-8 ''' Created on 2018年9月6日 @author: xyj ''' from __future__ import division import pandas as pd import numpy as np import xgboost as xgb import LoadData from sklearn.model_selection import KFold def train(): # 将已经生成的DataFrame数据读取出来 df = LoadData.readDataSet() df_label = df['label'] # df_features = ...
{"hexsha": "fb67417889a1ea7c930067b38b1b879b194516b1", "size": 2281, "ext": "py", "lang": "Python", "max_stars_repo_path": "sklearn/Xgboost.py", "max_stars_repo_name": "xyj77/Machine-Learning-Record", "max_stars_repo_head_hexsha": "5b25f630db7fb95a4b7c6c8993b6e97efeaa8de7", "max_stars_repo_licenses": ["MIT"], "max_star...
from PIL import Image import numpy as np from torch.tensor import Tensor def list_to_tensor(image_list): for i, img in enumerate(image_list): image_list[i] = Image.fromarray(img).resize([220,155]) X_arr = np.stack(image_list,axis=0) X_arr = X_arr / 255.0 return Tensor(X_arr).view(len(image_lis...
{"hexsha": "ac100469857776742162425dc0a941d2a36f809f", "size": 346, "ext": "py", "lang": "Python", "max_stars_repo_path": "Preprocessing.py", "max_stars_repo_name": "khizar-anjum/signature_extraction", "max_stars_repo_head_hexsha": "5740408cb0a30895e59c33b624da43943d824ccb", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma convert_eval: "peval P a = ppeval (convert P) a v" [PROOF STATE] proof (prove) goal (1 subgoal): 1. peval P a = ppeval (convert P) a v [PROOF STEP] (* implicit for all v *) [PROOF STATE] proof (prove) goal (1 subgoal): 1. peval P a = ppeval (convert P) a v [PROOF STEP] by (induction P, auto)
{"llama_tokens": 134, "file": "DPRM_Theorem_Diophantine_Parametric_Polynomials", "length": 2}
# AUTOGENERATED! DO NOT EDIT! File to edit: 02_figures.ipynb (unless otherwise specified). __all__ = ['new_x_y', 'add_trace', 'get_figure'] # Cell import plotly.graph_objects as go import numpy as np from scipy.interpolate import interp1d import pandas as pd from pathlib2 import Path import datetime # Cell def new_x...
{"hexsha": "85322ec2b6286d997f951fb531a969d162d74cc9", "size": 1612, "ext": "py", "lang": "Python", "max_stars_repo_path": "ds18b20/figures.py", "max_stars_repo_name": "eandreas/ds18b20", "max_stars_repo_head_hexsha": "eac5da4d26504a3b8f9472955ec7fe38b104e732", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
import serial import serial.tools.list_ports import numpy as np import os,sys import time import matplotlib.pyplot as plt pwd = os.path.abspath(os.path.abspath(__file__)) father_path = os.path.abspath(os.path.dirname(pwd) + os.path.sep + "..") sys.path.append(father_path) data_path = os.path.abspath( os.path.dirn...
{"hexsha": "0a92a8b41615070c53bb550c38483fd2ab6ada66", "size": 7793, "ext": "py", "lang": "Python", "max_stars_repo_path": "Sensors/Infrared_Sensor.py", "max_stars_repo_name": "Forence1999/SmartWalker-master", "max_stars_repo_head_hexsha": "ec153f5d50ddd43bd5be88209b66ca7178aef7cb", "max_stars_repo_licenses": ["MIT"], ...
import os import numpy as np from tqdm import tqdm import json from collections import OrderedDict class SimpleKPLoader(object): def __init__(self, root, image_size, image_set='test', data_set='tusimple', norm=False): self.image_set = image_set self.data_set = data_set self.root = root ...
{"hexsha": "cddbb704fdb31a4bea171bedb03c78a4f7ad3056", "size": 4803, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/curve_fitting_tools/loader.py", "max_stars_repo_name": "voldemortX/DeeplabV3_PyTorch1.3_Codebase", "max_stars_repo_head_hexsha": "d22d23e74800fafb58eeb61d6649008745c1a287", "max_stars_repo_l...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 2 10:22:25 2020 @author: shanjuyeh """ import pandas as pd import numpy as np from sklearn.model_selection import StratifiedKFold, train_test_split from sklearn.ensemble import RandomForestClassifier from sklearn import metrics from sklearn.metric...
{"hexsha": "19a86b3c5f6deb73f28d6b7b795659f560152475", "size": 5721, "ext": "py", "lang": "Python", "max_stars_repo_path": "ml-prediction/GPL570_XGB_age.py", "max_stars_repo_name": "Bin-Chen-Lab/covid19_sex", "max_stars_repo_head_hexsha": "b593ed877b4868278c4546280d05572d0d6addb9", "max_stars_repo_licenses": ["MIT"], "...
#ifndef vef2vef_ogrpoly_hpp_included_ #define vef2vef_ogrpoly_hpp_included_ #include <string> #include <vector> #include <boost/optional.hpp> #include <boost/filesystem/path.hpp> #include "math/geometry.hpp" #include "geo/srsdef.hpp" using Polygon = math::Polygon; using Polygons = math::MultiPolygon; Polygons loa...
{"hexsha": "870e4d6aa552bef6792f5aed4c779e97619dfc0f", "size": 773, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "vef/tools/ogrpoly.hpp", "max_stars_repo_name": "Melown/libvef", "max_stars_repo_head_hexsha": "cb7df31d09a58d5ed4b894a4dc3bb66c6b8be825", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count...
% Copyright 2011-2015 David Hadka. All Rights Reserved. % % This file is part of the MOEA Framework User Manual. % % Permission is granted to copy, distribute and/or modify this document under % the terms of the GNU Free Documentation License, Version 1.3 or any later % version published by the Free Software Fou...
{"hexsha": "b43b11acd2087fcaef0872338e7a60760a291026", "size": 16006, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "manual/installation.tex", "max_stars_repo_name": "BrunoGrisci/EngineeringDesignusingMultiObjectiveEvolutionaryAlgorithms", "max_stars_repo_head_hexsha": "6b15dfe67521249ef1747f52a1ef709401eee377", ...
theory flash18Bra imports flash18Rev begin lemma onInv18: assumes a1:"iInv1 \<le> N" and a2:"iInv2 \<le> N" and a3:"iInv1~=iInv2 " and b1:"r \<in> rules N" and b2:"invf=inv18 iInv1 iInv2 " shows "invHoldForRule' s invf r (invariants N)" proof - have c1:"ex1P N (% iRule1 . r=NI_Local_Ge...
{"author": "lyj238Gmail", "repo": "IsabelleCourse", "sha": "cd49d944d3504328ad8210fbd987abebdf192ed8", "save_path": "github-repos/isabelle/lyj238Gmail-IsabelleCourse", "path": "github-repos/isabelle/lyj238Gmail-IsabelleCourse/IsabelleCourse-cd49d944d3504328ad8210fbd987abebdf192ed8/flash/flash18Bra.thy"}
"""Tests for normalization related utility functions.""" import numpy as np from neurodsp.utils.norm import * ################################################################################################### ################################################################################################### def te...
{"hexsha": "8aaf3bc2160f0edcf5e62eb7d770ab9119912b85", "size": 1191, "ext": "py", "lang": "Python", "max_stars_repo_path": "neurodsp/tests/test_utils_norm.py", "max_stars_repo_name": "josepfont65/neurodsp", "max_stars_repo_head_hexsha": "a7c5b72665eed6368e29bf4f15443a28a2e18732", "max_stars_repo_licenses": ["Apache-2.0...
from scipy.io import loadmat from MvKernelLapSRC import MvKernelLapSRC from construct_features import * from load_data import load_4mC_data from measurement_tools import performance def normalization(data, dim=2, V=1): data_v = [] if dim == 2: for i in range(np.shape(data)[1]): ...
{"hexsha": "ba8edf9c0bc572c9458e4bb513ab1fd752e90f02", "size": 7301, "ext": "py", "lang": "Python", "max_stars_repo_path": "MvLapKSRC_HSIC-master/main_crossSpecies.py", "max_stars_repo_name": "guofei-tju/MvLapKSRC_HSIC", "max_stars_repo_head_hexsha": "dc9e6d54b834cee5ef9a088f71eb506307672902", "max_stars_repo_licenses"...
""" Module containing the factor and belief classes. """ # License: BSD 3 clause import numpy class DiscreteFactor(object): """ A factor containing only discrete variables. Factors are immutable and basically a container for a probability table and its metadata. """ def __init__(self, variables,...
{"hexsha": "e226003a682ba08c8af0af216f73ac5cbafe2c2d", "size": 8041, "ext": "py", "lang": "Python", "max_stars_repo_path": "Statistical_methods/LoopyBeliefPropagation/pyugm/factor.py", "max_stars_repo_name": "Ali-Sahili/Background-Subtraction-Unsupervised-Learning", "max_stars_repo_head_hexsha": "445b2cf8736a4a28cff2b0...
""" `smooth(y, span=5)` Smooth a vector using a moving average filter. Endpoints are handled by collapsing the length of the filter as showed below. ``` yy[1] = y[1] yy[2] = (y[1] + y[2] + y[3]) / 3 yy[3] = (y[1] + y[2] + y[3] + y[4] + y[5]) / 5 yy[4] = (y[2] + y[3] + y[4] + y[4] + y[6]) / 5 ``` **Arguments** - `y`: ...
{"hexsha": "c387d0e602a8868a0956a5b0f176298bf1ffef3f", "size": 737, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/MiscFunctions/smooth.jl", "max_stars_repo_name": "vkumpost/stoosc", "max_stars_repo_head_hexsha": "2a1fd4dc3adf9e6066877aa4134530f9d79a16cc", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
"""Test the poisson model.""" import numpy as onp import pandas as pd from numpyro import distributions as dist from scipy.special import expit, logit from shabadoo import Bernoulli def logit(p): """Quick numpy logit function.""" return -onp.log(1 / p - 1) def test_single_coef_is_about_right_boolean(): ...
{"hexsha": "f529a27e2f5e77db03252df0124aec4a6c4bca51", "size": 4232, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_bernoulli.py", "max_stars_repo_name": "nolanbconaway/shabadoo", "max_stars_repo_head_hexsha": "a4d34993e2921b0ac853854bfcba5d90ce025b8c", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
""" Uses CRTM to compute surface transmittance. """ import crtmmodis_ as crtm from numpy import array, zeros def getSfcTrans(sample): """ Uses CRTM to compute surface transmittance. tau_21, tau_31 = getSfcTrans(sample) """ N = len(sample.tsh) u = sample.u.T v = sample.v...
{"hexsha": "35e71056e6ea79a54b84adc097604acfdf33715a", "size": 1390, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Components/qfed/qfed/sfctrans.py", "max_stars_repo_name": "GEOS-ESM/AeroApps", "max_stars_repo_head_hexsha": "874dad6f34420c014d98eccbe81a061bdc0110cf", "max_stars_repo_licenses": ["NASA-1.3",...
The Resource Manager/Monitor and Control Interface is intended to access both low level and abstracted information from the monitor and control system (if available), much like the Resource Manager/Operating System Interface (section \ref{sec:RMOS}). The resource manager is in a somewhat unique position of providing a ...
{"hexsha": "cc3432ee8b13e93537653261ac98c55d5fab820e", "size": 3206, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "RMMC.tex", "max_stars_repo_name": "regrant/powerapi_spec-1", "max_stars_repo_head_hexsha": "e3b74b0c62fa7e6104b8b18c4334e71afb745802", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":...
! ! Copyright (C) by Argonne National Laboratory ! See COPYRIGHT in top-level directory ! subroutine MPI_Graph_map_f08(comm, nnodes, index, edges, newrank, ierror) use, intrinsic :: iso_c_binding, only : c_int use :: mpi_f08, only : MPI_Comm use :: mpi_c_interface, only : c_Comm use :: mpi_c_interf...
{"hexsha": "dc79ed99ccee049d910d06b166f1cb12b5b54761", "size": 1257, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "torch-test/mpich-3.4.3/src/binding/fortran/use_mpi_f08/wrappers_f/graph_map_f08ts.f90", "max_stars_repo_name": "alchemy315/NoPFS", "max_stars_repo_head_hexsha": "f3901e963e2301e8a6f1c7aac0511d0c...
from matplotlib import pyplot as plt import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.metrics import r2_score, mean_squared_error from sklearn.preprocessing import StandardScaler def get_multiple_choice_value_cou...
{"hexsha": "120f983ddc4ba8f659c81606e2b6a0f2d6b90f08", "size": 14752, "ext": "py", "lang": "Python", "max_stars_repo_path": "stackoverflow_survey_analysis/src/data_utils.py", "max_stars_repo_name": "raminzohouri/udacity-data-scientist", "max_stars_repo_head_hexsha": "974665b13f7248bd5834f9b798669ba970662231", "max_star...
# utility functions for loading data import sys sys.path.insert(0,'/Users/neelguha/Dropbox/NeelResearch/fairness/code/tensorflow_constrained_optimization/') import math import random import numpy as np import pandas as pd import warnings from six.moves import xrange import tensorflow as tf import tensorflow_constraine...
{"hexsha": "8071e8f44551a5232919f742707dab413842ef16", "size": 10018, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/data_utils.py", "max_stars_repo_name": "neelguha/tensorflow_constrained_optimization", "max_stars_repo_head_hexsha": "46b34d1c2d6ec05ea1e46db3bcc481a81e041637", "max_stars_repo_licens...
# # Copyright (c) 2021 The Markovflow Contributors. # # 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...
{"hexsha": "0d9538a24207079fad3919d09b4cd35802097d3a", "size": 4817, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/test_constant_kernel.py", "max_stars_repo_name": "prakharverma/markovflow", "max_stars_repo_head_hexsha": "9b7fafc199dae2f7f3207c2945fd43f674386dc1", "max_stars_repo_licenses": ["Apache...
"""Script containing the base scenario kernel class.""" import logging import random import numpy as np # length of vehicles in the network, in meters VEHICLE_LENGTH = 5 class KernelScenario(object): """Base scenario kernel. This kernel subclass is responsible for generating any simulation-specific com...
{"hexsha": "0a3d75a29bee4ba86c58700fcab4c0acf44b4f47", "size": 20361, "ext": "py", "lang": "Python", "max_stars_repo_path": "flow/core/kernel/scenario/base.py", "max_stars_repo_name": "mawright/flow", "max_stars_repo_head_hexsha": "6e3f3da04b289a3f9e754c84915b60f0689dc78d", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma P25_invariant: shows "invariant (composition) P25" [PROOF STATE] proof (prove) goal (1 subgoal): 1. invariant composition P25 [PROOF STEP] proof (auto simp only:invariant_def) [PROOF STATE] proof (state) goal (1 subgoal): 1. \<And>a b. reachable composition (a, b) \<Longrightarrow> P25 (a, b) [PROOF...
{"llama_tokens": 8203, "file": "Abortable_Linearizable_Modules_Idempotence", "length": 87}
#define BOOST_TEST_MODULE "test_lennard_jones_wall_potential" #ifdef BOOST_TEST_DYN_LINK #include <boost/test/unit_test.hpp> #else #include <boost/test/included/unit_test.hpp> #endif #include <mjolnir/forcefield/external/LennardJonesWallPotential.hpp> BOOST_AUTO_TEST_CASE(LennardJonesWallPotential_double) { usin...
{"hexsha": "e71ba35a11a2ec634a19f2a20ddb5cc88b606f6d", "size": 1519, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/core/test_lennard_jones_wall_potential.cpp", "max_stars_repo_name": "yutakasi634/Mjolnir", "max_stars_repo_head_hexsha": "ab7a29a47f994111e8b889311c44487463f02116", "max_stars_repo_licenses": [...
#!/usr/bin/env python ''' A generator for some arbitrary test data roughly matching the description of the expected data from SAIL. Notes: * Additional covariate: Baseline intensity varies by care home size. * Data is daily number of cases from February to July. * 1000 Care homes * 330 homes had cases, 670 no cases *...
{"hexsha": "3f962ed8030e6148cb1c3be294a350702f406581", "size": 3238, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate_sample_data.py", "max_stars_repo_name": "sa2c/care-home-fit", "max_stars_repo_head_hexsha": "58a2639c74b53e24f062d0dfc3e21df6d53b3077", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
"""Implements the Kaplan-Meier estimator for non-parametric survival function estimation. References ---------- E. L. Kaplan and P. Meier. "Nonparametric estimation from incomplete observations". Journal of the American Statistical Association, Volume 53, Issue 282 (1958), 457--481. doi:10.2307/2281868 """ im...
{"hexsha": "617cdb8bd6fc707743e2c59f52b4646e5ec360d2", "size": 5387, "ext": "py", "lang": "Python", "max_stars_repo_path": "stattools/survival/kaplan_meier.py", "max_stars_repo_name": "artemmavrin/SLTools", "max_stars_repo_head_hexsha": "04525b5d6777be3ccdc6ad44e4cbfe24a8875933", "max_stars_repo_licenses": ["MIT"], "ma...
# -*- coding: utf-8 -*- """ Input: Food listing in csv format (e.g. output of Phenix platform) Output: Previous listing + food category added in dataframe format """ __author__ = 'Julie Seguela' __license__ = 'MIT License' __version__ = '0.1' __maintainer__ = 'Julie Seguela' __status__ = 'Development' import os impor...
{"hexsha": "8a57d9be7bf623213b97dbca76102d8eb544bdd0", "size": 6393, "ext": "py", "lang": "Python", "max_stars_repo_path": "import_demo.py", "max_stars_repo_name": "dataforgoodfr/batch5_happy_meal", "max_stars_repo_head_hexsha": "952e14d117ef57b06606b6ab6f6fb7d0c947f220", "max_stars_repo_licenses": ["MIT"], "max_stars_...
module CSV2Parquet using DataConvenience Base.@ccallable function julia_main()::Cint try real_main() catch Base.invokelatest(Base.display_error, Base.catch_stack()) return 1 end return 0 end function real_main() for file in ARGS if !isfile(file) error("...
{"hexsha": "b96987d1d43957a3dc3b3b3654a197b7d416f02b", "size": 643, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "CSV2Parquet.jl", "max_stars_repo_name": "xiaodaigh/csv-to-parquet", "max_stars_repo_head_hexsha": "e271989d9a9e6ee8c1beb83268070d4953a09b43", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
# # implementation greatly inspired from: https://github.com/geodynamics/seismic_cpml/blob/master # # Credits # Author: Pawan Bharadwaj # (bharadwaj.pawan@gmail.com) # # * original code in FORTRAN90: March 2013 # * modified: 11 Sept 2013 # * major update: 25 July 2014 # * code optimization with help from J...
{"hexsha": "e1a7ae62c8eab41ca138f11f82a5561c0f4f0252", "size": 21476, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/fdtd/core.jl", "max_stars_repo_name": "pawbz/SeismicInversion.jl", "max_stars_repo_head_hexsha": "d17c91c6e589f0444fb4f28a77bb5194bc242079", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
\begin{notsw} \section{Reflection} \textit{This section is added for IN4334 - Machine Learning for Software Engineering and should not be considered as a part of this paper.} \\ \noindent During the project we faced the following challenges: \begin{itemize} \item Because we are not using a ready-made dataset, we ...
{"hexsha": "26f65e72980541a0f304796f00adb27279024cce", "size": 2720, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report/6-reflection.tex", "max_stars_repo_name": "petroolg/dltpy", "max_stars_repo_head_hexsha": "8f8d522945f2362efc29e4d5c1aa3d64f30f4f6a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12...
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
{"hexsha": "290b78750bc7ae6fef6f80cdf33276e204d32a4f", "size": 9818, "ext": "py", "lang": "Python", "max_stars_repo_path": "nicos_mlz/kws1/devices/kwsfileformat.py", "max_stars_repo_name": "ebadkamil/nicos", "max_stars_repo_head_hexsha": "0355a970d627aae170c93292f08f95759c97f3b5", "max_stars_repo_licenses": ["CC-BY-3.0...
module procedures implicit none contains !---------------------------- ! Function to solve: !---------------------------- real(kind=8) function g (x) real(kind=8), intent (in) :: x g = 8.0d0 - 4.5d0*(x-sin(x)) end function g !---------------------------- ! Bisection routine: !---------------------------- sub...
{"hexsha": "1484af096bfa7a51e9867a0fd57afddccebeeb94", "size": 1947, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "ME_Numerical_Methods/HW3/ex2/mod.f95", "max_stars_repo_name": "ElenaKusevska/Fortran_exercises", "max_stars_repo_head_hexsha": "69bab3c2ac6a17612e28e71e8a7bd322f4260153", "max_stars_repo_license...
# imports import serial import numpy as np import matplotlib.pyplot as plt import time import glob from StringIO import StringIO ################################################################################ # NOTE: TO DO # - check the grab # - turn into numpy # - add a matplotlib output ############################...
{"hexsha": "961edcd70bb4951cd93979d650b964fcfd6d55a9", "size": 8802, "ext": "py", "lang": "Python", "max_stars_repo_path": "ReadingGauges/ComputerSide/GrabberGaugesOutput/Grabber.py", "max_stars_repo_name": "jerabaul29/PaddleAndUltrasonicGauges", "max_stars_repo_head_hexsha": "5c6ba80ddfd44190eb21d5c61979ac802a54cb99",...
import serial, sys, time, os, gzip, math import Sigma_koki import numpy as np class Stage(object): def __init__(self): #self.Range_Speed = 1 self.Min_Speed = 50 self.Max_Speed = 20000 self.w_x = 1000 / 2. #/1mm SGSP 33-200 self.w_z = 1000 / 6. #/1mm SGSP 26-200 ...
{"hexsha": "38797fda58238e9960cff61d411c69c1cb151e91", "size": 7067, "ext": "py", "lang": "Python", "max_stars_repo_path": "measurement/Stage_control.py", "max_stars_repo_name": "akira-okumura/isee_sipm", "max_stars_repo_head_hexsha": "dff98c82ed8ef950c450c83ad8951743e3799e94", "max_stars_repo_licenses": ["MIT"], "max_...
function [center, rotMat] = imPrincipalAxes(img, varargin) % Computes principal axes of a 2D/3D binary image. % % [CENTER, ROTMAT] = imPrincipalAxes(IMG) % % (Note: currently only implemented for binary images) % % Example % % Compute principal axes of a discretized 3D ellipsoid % % (requires the MatGeom ...
{"author": "mattools", "repo": "matImage", "sha": "94d892c7beac0db32daadf2646ce37f58e894caf", "save_path": "github-repos/MATLAB/mattools-matImage", "path": "github-repos/MATLAB/mattools-matImage/matImage-94d892c7beac0db32daadf2646ce37f58e894caf/matImage/imMeasures/imPrincipalAxes.m"}
#! /usr/bin/env python """Tests for the ``instrument_properties`` module. Authors ------- - Bryan Hilbert Use --- These tests can be run via the command line (omit the ``-s`` to suppress verbose output to stdout): :: pytest -s test_instrument_properties.py """ import os import pytest imp...
{"hexsha": "dc074ead26b07a2fd374c90e1932dd881070c55b", "size": 3340, "ext": "py", "lang": "Python", "max_stars_repo_path": "jwql/tests/test_instrument_properties.py", "max_stars_repo_name": "penaguerrero/jwql", "max_stars_repo_head_hexsha": "0e6eb58e7a631c1d6356ce6c1b192c7dd52962bf", "max_stars_repo_licenses": ["BSD-3-...
#!/usr/bin/env python3 import argparse import whois import time import numpy as np import csv import socket #import tld #run domains through a whois query #exclude results from domains where whois reports None, meaning domain not found def whoIsQuery(domain): try: data = whois.query(domain) if dat...
{"hexsha": "a238b8711fc900d9769c900ac4479ae8de12178c", "size": 3040, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/shank_hooper_whois.py", "max_stars_repo_name": "vaishnavi-sridhar/CU_HIN", "max_stars_repo_head_hexsha": "686a0cf883fbface41acdcdeba44eb8805bb74e1", "max_stars_repo_licenses": ["MIT"], "max_st...
import datetime import cmor import dateutil import logging import netCDF4 import numpy import os import unittest from nose.tools import eq_ from ece2cmor3 import ifs2cmor, ece2cmorlib logging.basicConfig(level=logging.DEBUG) calendar_ = "proleptic_gregorian" def write_postproc_timestamps(filename, startdate, refd...
{"hexsha": "0fb3fc6992a7a2fa23e4f9e9be37b8f14952cf9b", "size": 6094, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/ifs2cmor_test.py", "max_stars_repo_name": "etiennesky/ece2cmor3", "max_stars_repo_head_hexsha": "af51e99dd496b5202623569a23fe52c5506761e0", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
C LAST UPDATE 16/03/89 C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ C SUBROUTINE MULFIL IMPLICIT NONE C C PURPOSE: Multiply an image by a single file/raster. C INCLUDE 'COMMON.FOR' C C Calls 8: WFRAME , GETHDR , OUTFIL , GETVAL C IMDISP , RFRAME , OPNNEW , ...
{"hexsha": "17b659dc5d3d8d58530fe2259db042c5dee25d7e", "size": 4360, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "bsl/mulfil.f", "max_stars_repo_name": "scattering-central/CCP13", "max_stars_repo_head_hexsha": "e78440d34d0ac80d2294b131ca17dddcf7505b01", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
import tempfile import tensorflow_model_optimization as tfmot import tensorflow as tf import numpy as np import gzip class ModelOptimizers: @staticmethod def callbacks(log_dir): return [] @staticmethod def modify(model): return model @staticmethod def save(model): retu...
{"hexsha": "94aae6d4d9596655ef1e4fe9480a52b8add1999f", "size": 4023, "ext": "py", "lang": "Python", "max_stars_repo_path": "libmot.py", "max_stars_repo_name": "4g/tf-model-optimization", "max_stars_repo_head_hexsha": "cb719bf105a25393f78bdd7342e61a1f4be75d9e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
[STATEMENT] lemma addr_in_ipv4set_from_cidr_code[code_unfold]: fixes addr :: ipv4addr shows "addr \<in> (ipset_from_cidr pre len) \<longleftrightarrow> (pre AND ((mask len) << (32 - len))) \<le> addr \<and> addr \<le> pre OR (mask (32 - len))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (add...
{"llama_tokens": 200, "file": "IP_Addresses_IPv4", "length": 1}
import sys, os file_path = os.path.abspath(__file__) project_path = os.path.dirname(os.path.dirname(file_path)) sys.path.append(project_path) fcgf_path = os.path.join(project_path, 'ext', 'FCGF') sys.path.append(fcgf_path) from dataset.threedmatch_test import Dataset3DMatchTest from perception3d.adaptor import FCGFC...
{"hexsha": "ffae7b66a740f450d28853b13d719213f90e9ed6", "size": 1265, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/perception3d/test.py", "max_stars_repo_name": "theNded/SGP", "max_stars_repo_head_hexsha": "63d33cc8bffde53676d9c4800f4b11804b53b360", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
{"hexsha": "22af5af6298f108dd8b9aa88ec9849473c26005e", "size": 4097, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/parallelwave_gan/baker/batch_fn.py", "max_stars_repo_name": "lym0302/Parakeet", "max_stars_repo_head_hexsha": "97b7000aa2be182d3ff4681f435f8c1463e97083", "max_stars_repo_licenses": ["Apac...
# -*- coding: utf-8 -*- r""" The On-Line Encyclopedia of Integer Sequences (OEIS) You can query the OEIS (Online Database of Integer Sequences) through Sage in order to: - identify a sequence from its first terms. - obtain more terms, formulae, references, etc. for a given sequence. AUTHORS: - Thierry Mont...
{"hexsha": "be0138b6b76fc1faad1b51f07b0c0cc897c4aa04", "size": 73495, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage/databases/oeis.py", "max_stars_repo_name": "LaisRast/sage", "max_stars_repo_head_hexsha": "5fb2a6ea44400e469caee82748cf863ca0c5f724", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_c...
import warnings from pathlib import Path import numpy as np from tqdm.auto import tqdm from amset.constants import int_to_spin, numeric_types, spin_to_int from amset.wavefunction.common import ( get_gpoint_indices, get_gpoints, get_min_gpoints, get_overlap, is_ncl, sample_random_kpoints, ) __...
{"hexsha": "ab642fe87f329a225c9f12192285bd8faeae040f", "size": 6617, "ext": "py", "lang": "Python", "max_stars_repo_path": "amset/wavefunction/vasp.py", "max_stars_repo_name": "hackingmaterials/amset", "max_stars_repo_head_hexsha": "a99a9a9c33fc8d2e2937f3e51c7221e9620a33fc", "max_stars_repo_licenses": ["BSD-3-Clause-LB...
using PyPlot # 2000 samples with 0.1s per model eval Nprocs = [1, 5, 10, 20, 50, 80, 100, 120, 150, 180 ] t = [13287.663 2697.591854 1375.82991 709.99628 313.435787 218.478622 181.348302 161.611588 141.589949 127.132717]' # 2000 samples with 1s per model eval Nprocs2 = [5, 10, 20, 50, 80, 100, 120, 150, 180 ] t2 = [2...
{"hexsha": "dc5bde337fcf84eef6e1da8efc7559baee1829e1", "size": 1628, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "slurm_benchmarks/modelEvals/results.jl", "max_stars_repo_name": "AnderGray/TransitionalMCMC.jl", "max_stars_repo_head_hexsha": "547862f38a6ccb7880f780f497ab3f04dda34fb7", "max_stars_repo_licenses":...
[STATEMENT] lemma index_zero_implies_one_group: assumes "ps \<subseteq> \<V>" and "card ps = 2" and "\<B> index ps = 0" shows "size {#b \<in># mset_set \<G> . ps \<subseteq> b#} = 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. size (filter_mset ((\<subseteq>) ps) (mset_set \<G>)) = 1 [PROOF STEP] pro...
{"llama_tokens": 2242, "file": "Design_Theory_Group_Divisible_Designs", "length": 21}
# -*- coding: utf-8 -*- """ Created on Mon Apr 25 14:34:04 2016 @author: devd """ from __future__ import division import logging import math from choose import nCr import numpy as np from scipy.misc import comb import createRandomString as c import meshers import time import random import functools import json import ...
{"hexsha": "bb8acb8fa29a80c2fb2c8c9d044170333243fc96", "size": 1823, "ext": "py", "lang": "Python", "max_stars_repo_path": "theory/test.py", "max_stars_repo_name": "johnterickson/Mesh", "max_stars_repo_head_hexsha": "829f6183a6fb06eaef5ff16532677124d827bda5", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
\documentclass [11pt,a4paper]{moderncv} \usepackage{multicol} \usepackage[scale=0.75]{geometry} \moderncvtheme[blue]{classic} % colors include blue, orange, green, red, purple, grey, and black % styles casual, classic, oldstyle, banking %\nopagenumbers{} %used to remove line numbers %--------------------------------...
{"hexsha": "512fd37d98ad989ac32c31d617d807ff73c94329", "size": 6645, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "resume.tex", "max_stars_repo_name": "westrope/Resume", "max_stars_repo_head_hexsha": "7aeb23aa093529070f54723ecb081236326458af", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta...
import numpy as np import copy def hreflect1D(x): """ Calculate Householder reflection: Q = I - 2*uu'. Parameters: X: numpy array. Returns: Qx: reflected vector. Q: Reflector (matrix). """ # Construct v: v = copy.deepcopy(x) v[0] += np.linalg.norm(x) # Co...
{"hexsha": "021d34ddaf95214215c4e24758e26ffd7307ced3", "size": 1387, "ext": "py", "lang": "Python", "max_stars_repo_path": "algorithms/helpers.py", "max_stars_repo_name": "thsis/NIS18", "max_stars_repo_head_hexsha": "1f2a7be1ab209fa7c0a25cb8eace744336b07c1f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import pytest import torch import torch.nn.functional as F import numpy as np from cplxmodule import cplx def cplx_allclose(input, other): return torch.allclose(input.real, other.real) and \ torch.allclose(input.imag, other.imag) def cplx_allclose_numpy(input, other): other = np.asarray(other)...
{"hexsha": "18ca75799db755bb30a616975e215460d58c7e67", "size": 22730, "ext": "py", "lang": "Python", "max_stars_repo_path": "cplxmodule/tests/test_cplx.py", "max_stars_repo_name": "veya2ztn/mltool", "max_stars_repo_head_hexsha": "4ed151152845ebe3de128e1f53c478581c1492e4", "max_stars_repo_licenses": ["IJG"], "max_stars_...
""" See networks.csv https://github.com/GeoNet/delta/blob/master/network/networks.csv for what the codes mean. The relevant codes for QuakeCoRE are (I am guessing here) NZ (included per Brendon's advice SM National strong motion network SC Canterbury regional strong motion network SB is included in http...
{"hexsha": "07bfea4dd3c7da31dd35f48cfdf1b8ab0a9d1cb9", "size": 3737, "ext": "py", "lang": "Python", "max_stars_repo_path": "geoNet/extract_geoNet_stations.py", "max_stars_repo_name": "ucgmsim/Pre-processing", "max_stars_repo_head_hexsha": "c4b9ae20a9e5e4f96f930bde29aa15176d9c8b64", "max_stars_repo_licenses": ["MIT"], "...
import torch import numpy as np import wandb import torch.nn as nn from models.gnn import EdgeGnn, NodeGnn, QGnn, GlobalEdgeGnn from utils.distances import CosineDistance from utils.sigmoid_normal import SigmNorm class Agent(torch.nn.Module): def __init__(self, cfg, StateClass, distance, device, with_temp=True): ...
{"hexsha": "b3f7972370ba725293d38b51b1ffc457b68c8de3", "size": 7875, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/agent_model.py", "max_stars_repo_name": "edosedgar/RLForSeg", "max_stars_repo_head_hexsha": "fc748d8e7d2f2a1e7ac0dddb3f268ec3025d40ca", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
Jump to Timeline #Navigation Navigation ## If you are adding something, go ahead and remove the notice below! The Terminal Hotel opens ## ################## Leave this navigation here:
{"hexsha": "20590904bb5e371dcbcc2e3499c9633c1a2a5e46", "size": 203, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/1925.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- #cd /Users/iikura/Desktop/TerrainParam # terrain.py kiban50_450F.tif import sys import numpy as np import cv2 import terrain_util as ut #reload(ut) param=sys.argv if (len(param) <2) or (len(param) > 4): print " * Usage : terrain.py dem.tif => for slope and aspect" ...
{"hexsha": "dbf783051250dc518a1c8f0291f7dc89a33e03cf", "size": 1172, "ext": "py", "lang": "Python", "max_stars_repo_path": "terrain.py", "max_stars_repo_name": "y-iikura/TerrainParam", "max_stars_repo_head_hexsha": "58a1461e00f6209a56f5659c0f61950f3fde4b0b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
From mathcomp Require Import all_ssreflect. Implicit Type P Q R : Prop. (** *** Exercise 0: - Define not. In type theory negation is defined in terms of [False]. *) Definition not P := . (** *** Exercise 1: - Prove the negation of the excluded middle. *) Lemma ex0 P : not (P /\ not P). Proof. Qed. (...
{"author": "math-comp", "repo": "tutorial_material", "sha": "3e5fcef3a25d2a43115fb645645b437640624ad3", "save_path": "github-repos/coq/math-comp-tutorial_material", "path": "github-repos/coq/math-comp-tutorial_material/tutorial_material-3e5fcef3a25d2a43115fb645645b437640624ad3/SummerSchoolSophia/exercise4_todo.v"}
submodule (h5mpi:hdf5_read) hdf5_reader use hdf5, only: h5dread_f, h5sclose_f implicit none (type, external) contains module procedure h5exist type(hdf5_file) :: h call h%open(filename, action='r', mpi=mpi) h5exist = h%exist(dname) call h%close() end procedure h5exist module procedure h5read_1d include "reade...
{"hexsha": "55d176926b69daeb76e5dfb72a56aea62d9bce4f", "size": 879, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/reader.f90", "max_stars_repo_name": "geospace-code/h5fortran-mpi", "max_stars_repo_head_hexsha": "f18d5037f1fffcea954fedf2aedcf0f77605a937", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
[STATEMENT] lemma energy_graph_subsets_ge0 [simp]: "energy_graph_subsets U W G \<ge> 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. 0 \<le> energy_graph_subsets U W G [PROOF STEP] by (auto simp: energy_graph_subsets_def)
{"llama_tokens": 97, "file": "Szemeredi_Regularity_Szemeredi", "length": 1}
## ## i n t e g r a t i o n . j l Integration Routines ## function trapz(x::Vector{Tx}, y::Vector{Ty}) where {Tx<:Number, Ty<:Number} # Trapezoidal integration rule local n = length(x) if (length(y) != n) error("Vectors 'x', 'y' must be of same length") end r = zero(zero(Tx) + zero(Ty)) ...
{"hexsha": "c1b7d7a566394f2ded2bdff4cbe3efa1c979481e", "size": 1537, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/integrate.jl", "max_stars_repo_name": "danielbalzer/NumericalMath.jl", "max_stars_repo_head_hexsha": "8623632136da2b77a4d162eaaf7aca73109c5062", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
def demo_linearized_gpr(): import numpy as np import matplotlib.pyplot as plt import matplotlib # matplotlib.use("Agg") rng = np.random.RandomState(0) # Generate sample data noise = 1.0 input_noise = 0.2 n_train = 1_000 n_test = 1_000 n_inducing = 100 batch_size = Non...
{"hexsha": "7b4ba4fdb3e9c5c3846aa839e35a0b108d57bd1d", "size": 3617, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/uncertain.py", "max_stars_repo_name": "IPL-UV/gp_error_propagation", "max_stars_repo_head_hexsha": "5d37b4bc48b3fc9521d819970ba24b8bb8ea5b16", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/usr/bin/env python import random import sys import numpy as np from bst_vector import BSTVector from bst_matrix import BSTMatrix if '--seed' not in sys.argv: seed = random.randint(0, 10000) random.seed(seed) else: seed = sys.argv[1 + sys.argv.index('--seed')] print "Using seed {}".format(seed) seed = i...
{"hexsha": "0fc712774080968cbf706512b18b4676fc08c1e6", "size": 983, "ext": "py", "lang": "Python", "max_stars_repo_path": "bst_test.py", "max_stars_repo_name": "nuchi/bst-matrix-vector", "max_stars_repo_head_hexsha": "4abf5c8adf8352978d80fbbc596db20d2456449b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 17, ...
from sklearn.model_selection import train_test_split import numpy as np import pandas as pd import sklearn import json from sklearn.preprocessing import LabelEncoder, OneHotEncoder from sklearn.preprocessing import StandardScaler from sklearn.metrics import confusion_matrix from sklearn.linear_model import LogisticRegr...
{"hexsha": "3a7cd276b38e946b5049fd2c5ab85f370c11bff8", "size": 2644, "ext": "py", "lang": "Python", "max_stars_repo_path": "public/Python_Scripts/Main_Script.py", "max_stars_repo_name": "CodeDude19/Dell_Hackathon-Won-", "max_stars_repo_head_hexsha": "ab85ca4573296b343a8d655f59d3791a0c0711fa", "max_stars_repo_licenses":...
[STATEMENT] lemma closed_UN [continuous_intros, intro]: "finite A \<Longrightarrow> \<forall>x\<in>A. closed (B x) \<Longrightarrow> closed (\<Union>x\<in>A. B x)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>finite A; \<forall>x\<in>A. closed (B x)\<rbrakk> \<Longrightarrow> closed (\<Union> (B ` A)) [...
{"llama_tokens": 260, "file": null, "length": 2}
function bessel_i0_values_test ( ) %*****************************************************************************80 % %% BESSEL_I0_VALUES_TEST demonstrates the use of BESSEL_I0_VALUES. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 02 February 2009 % % Author: % % ...
{"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_values/bessel_i0_values_test.m"}
import numpy as np import sys import os sys.path.append(os.path.abspath('wethebestOLS')) import ols import matplotlib.pyplot as plt nsim = 1000 nObs = 1000 nParams = 3 const = np.ones((nObs,1)) XX = np.random.random((nObs, nParams)) XX[:,0] = 1 beta_list = [] sigma_list = [] mu_list = [] proportion_list = [] for s ...
{"hexsha": "238ab6fd501ff8dc498879a2e15dc27601f9ea04", "size": 915, "ext": "py", "lang": "Python", "max_stars_repo_path": "Projects/project_2_packages/wethebestOLS/sbc_excercise.py", "max_stars_repo_name": "FrancoCalle/modularizationandtesting", "max_stars_repo_head_hexsha": "d44b39b19fc1d7009a8b9be7624cecff2a3156dc", ...
const CONFIG = MOIT.Config(Int) const OPTIMIZER = JaCoP.Optimizer() const BRIDGED_OPTIMIZER = MOI.Bridges.full_bridge_optimizer(OPTIMIZER, Int32) COIT.runtests( # BRIDGED_OPTIMIZER, OPTIMIZER, CONFIG, )
{"hexsha": "48eeb4d90016f73ee6d0612df563d9d12786f161", "size": 217, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/MOI.jl", "max_stars_repo_name": "JuliaConstraints/JaCoP.jl", "max_stars_repo_head_hexsha": "cf774819da9822ac982a6ec119f8e9f8a9a73c4a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import datetime as dt import pandas as pd import numpy as np from pandas.plotting import table import matplotlib.pyplot as plt def ann_return(DF): "function to calculate the Annualized return from monthly prices of a fund/sript" df = DF.copy() df["mon_ret"] = df["NAV"].pct_change() df["cum_return"] = (...
{"hexsha": "1c30b0b0b2dd41db25f62e5e8c870bf536a3300b", "size": 2172, "ext": "py", "lang": "Python", "max_stars_repo_path": "Project_2.py", "max_stars_repo_name": "jainrachit1008/Titans-of-Wall-Street-Program-Projects", "max_stars_repo_head_hexsha": "2d71499a0942ed506330c412eae3b0822c837aa7", "max_stars_repo_licenses": ...