text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import numpy as np import os from matplotlib import pyplot as plt file_lons = np.arange(-180, 180, 40) file_lats = np.arange(90, -20, -50) DATA_FOLDER = os.path.expanduser("~") + "/.srtm30/" class Elevation(): def __init__(self, lonmin, lonmax, latmin, latmax): self._extent = [lonmin, lonmax, latmin, l...
{"hexsha": "d40485dab70ff0f821a746d8767a8642bde13af4", "size": 3150, "ext": "py", "lang": "Python", "max_stars_repo_path": "srtm30_parser/elevation.py", "max_stars_repo_name": "marcwie/srtm30-parser", "max_stars_repo_head_hexsha": "2e3290118b2a91924915dae2e6491153a9c679ff", "max_stars_repo_licenses": ["MIT"], "max_star...
change.base <- function(n, base) { ret <- integer(as.integer(logb(x=n, base=base))+1L) for (i in 1:length(ret)) { ret[i] <- n %% base n <- n %/% base } return(ret) } sum.digits <- function(n, base=10) { if (base < 2) stop("base must be at least 2") return(sum(change.base(n=n, base=base)))...
{"hexsha": "759b872eeabd1e8541f56d40ab255ecf5de126f7", "size": 418, "ext": "r", "lang": "R", "max_stars_repo_path": "Task/Sum-digits-of-an-integer/R/sum-digits-of-an-integer.r", "max_stars_repo_name": "LaudateCorpus1/RosettaCodeData", "max_stars_repo_head_hexsha": "9ad63ea473a958506c041077f1d810c0c7c8c18d", "max_stars_...
library(vegan) library(labdsv) data(varespec) data(varechem) vare.cca <- cca(varespec ~ Baresoil+Humdepth+pH+N+P+K+Ca+Mg+S+Al+Fe, data=varechem) vare.cca plot(vare.cca) summary(vare.cca) // See also http://ecology.msu.montana.edu/labdsv/R/labs/lab12/lab12.html
{"hexsha": "61a326bd64e0304e651ae5fc5b6a148cdb0dd699", "size": 263, "ext": "r", "lang": "R", "max_stars_repo_path": "examples/cca/cca.r", "max_stars_repo_name": "grovduck/pyimpute", "max_stars_repo_head_hexsha": "4ed2a6d4d2ff8258774906016ea690b16807f199", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": ...
# global imports import numpy as np import scipy.special as scsp import scipy.optimize as scop # local imports import helper as bhlp """ ref Helias14: Helias, Tetzlaff, Diesmann (2014) The Correlation Structure of Local Neuronal Networks Intrinsically Results from Recurrent Dynamics PLoS Comput Biol 10(1): e1003428 D...
{"hexsha": "424e153907c161b91b02f6bb8d34e352c0762391", "size": 6477, "ext": "py", "lang": "Python", "max_stars_repo_path": "meanfield.py", "max_stars_repo_name": "jakobj/binary_network", "max_stars_repo_head_hexsha": "078851026721cd2571a777f054d2f1fea097a3ea", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_cou...
import numpy as np from scipy.integrate import cumtrapz import sys sys.path.insert(0, '../..') import stellar_encounters r = np.geomspace(1e-12,1e15,10000) rho = stellar_encounters.postencounter_density_profile(r) M = cumtrapz(4*np.pi*r**3 * rho,x=np.log(r),initial=0) + 2*np.pi*r[0]**2 np.savetxt('M.txt',np...
{"hexsha": "28dc75986920e8e8d087425aa901374673cc5e2d", "size": 368, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/pulsar-timing/generate_mass_profile.py", "max_stars_repo_name": "delos/microhalo-models", "max_stars_repo_head_hexsha": "aaebc1a1fffbff8c6fd561d9936229e637926f5b", "max_stars_repo_licenses...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
{"hexsha": "8625465dd2f5dac3d6d95786095e09a5d3893aee", "size": 4693, "ext": "py", "lang": "Python", "max_stars_repo_path": "tutorials/frontend/from_keras.py", "max_stars_repo_name": "intheworld/incubator-tvm", "max_stars_repo_head_hexsha": "c07aa37aeb602e1ade7e26061d0fd3e908dd3791", "max_stars_repo_licenses": ["Apache-...
# encoding=utf8 # pylint: disable=mixed-indentation, trailing-whitespace, multiple-statements, attribute-defined-outside-init, logging-not-lazy, unused-argument, singleton-comparison, no-else-return, line-too-long, arguments-differ, no-self-use, superfluous-parens, redefined-builtin, bad-continuation, unused-variable i...
{"hexsha": "a91037b6aef6fee0823f91a1321423c300b0d7ec", "size": 9881, "ext": "py", "lang": "Python", "max_stars_repo_path": "NiaPy/algorithms/basic/es.py", "max_stars_repo_name": "kivancguckiran/NiaPy", "max_stars_repo_head_hexsha": "06d3699c1466bfc54c4220a4aabe97cad50f75e4", "max_stars_repo_licenses": ["MIT"], "max_sta...
################ # # General Utility Functions for R scripts for FRAM Admin # # Nicholas Komick # nicholas.komick@dfo-mpo.gc.ca # May 22, 2014 # Coding Style: http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html # # ################ ###____ Constants Section ____#### #Generic constants used in other ...
{"hexsha": "470cdf63a22bc393d402a54dfdba4944ef78cc9a", "size": 11012, "ext": "r", "lang": "R", "max_stars_repo_path": "lib/Util.r", "max_stars_repo_name": "methiess/PSC-FRAM-Admin", "max_stars_repo_head_hexsha": "14309790ecb30118757dc890fcb5d6e5c85db3f8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
import logging import sys from sqlalchemy import create_engine import pandas as pd import numpy as np from settings import ENGINE_STRING, QUALICHAIN_ENGINE_STRING from utils import filter_extracted_skills, remove_dump_skills logging.basicConfig(stream=sys.stdout, level=logging.INFO, format="%(as...
{"hexsha": "decaf94fadea912caf3ef239e9982900a6432578", "size": 6026, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/clients/postgress.py", "max_stars_repo_name": "QualiChain/course_recommendation", "max_stars_repo_head_hexsha": "998e4e4f93eea8a96b13dd4f4d5b957fb45eab3c", "max_stars_repo_licenses": ["MIT"], ...
import pandas as pd import numpy as np import tensorflow as tf from tensorflow import keras from sqlalchemy import create_engine engine = create_engine('mysql+pymysql://root:shero@localhost/sheroDB', echo=True) def data_from_csv(): wti = pd.read_csv('data/WTI_20050630_20200417.csv') wti_after_2015 = wti[wti[...
{"hexsha": "c338386a81d7b69ffdd7eaaebfaacf43911da892", "size": 3883, "ext": "py", "lang": "Python", "max_stars_repo_path": "database/price_pred_model.py", "max_stars_repo_name": "2020-SKKU-S-HERO/mobius_adaptation", "max_stars_repo_head_hexsha": "f1412a547a2bf402cb21bc16b97240acbaf5f082", "max_stars_repo_licenses": ["B...
# Load Julia packages (libraries) needed for the snippets in chapter 0 using StatisticalRethinking, CmdStan #gr(size=(600,600)); # CmdStan uses a tmp directory to store the output of cmdstan ProjDir = rel_path("..", "scripts", "04") cd(ProjDir) # CmdStan uses a tmp directory to store the output of cmdstan ProjDir...
{"hexsha": "502c0d89893d0ad1b862e2aa5af9bdabc61ae8f9", "size": 1500, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/04/clip-21-23.jl", "max_stars_repo_name": "UnofficialJuliaMirror/StatisticalRethinking.jl-2d09df54-9d0f-5258-8220-54c2a3d4fbee", "max_stars_repo_head_hexsha": "08ee7b4244edcb2c94f4410829372...
""" Author: Dr. John T. Hwang <hwangjt@umich.edu> This package is distributed under New BSD license. Base class for sampling algorithms. """ import numpy as np from smt.utils.options_dictionary import OptionsDictionary class SamplingMethod(object): def __init__(self, **kwargs): """ Constructor ...
{"hexsha": "beb2b01ace8b1cb3b058c9d3c5d1f15d1c42d0cd", "size": 2521, "ext": "py", "lang": "Python", "max_stars_repo_path": "smt/sampling_methods/sampling_method.py", "max_stars_repo_name": "kodexp/smt", "max_stars_repo_head_hexsha": "cc390b795ea21eed66aae95218d5dfb67ed87a88", "max_stars_repo_licenses": ["BSD-3-Clause"]...
[STATEMENT] lemma at_within_self_singleton[simp]: "at i within {i} = bot" [PROOF STATE] proof (prove) goal (1 subgoal): 1. at i within {i} = bot [PROOF STEP] by (auto intro!: antisym filter_leI simp: eventually_at_filter)
{"llama_tokens": 90, "file": "Laplace_Transform_Piecewise_Continuous", "length": 1}
# %% [markdown] # # Fitting a Beta Distribution with Pyro # # Here we assume we are flipping a slightly biased coin. # We think the probability of a heads is close to 0.5, but we are not sure. # We want to fit a beta distribution to the random observed data. # # References: # * [http://pyro.ai/examples/svi_part_i.ht...
{"hexsha": "9228caab6f5883b0bf9921c34c0499d23863c89f", "size": 6323, "ext": "py", "lang": "Python", "max_stars_repo_path": "FitDistWithPyro/fit_beta_distribution.py", "max_stars_repo_name": "stanton119/data-analysis", "max_stars_repo_head_hexsha": "b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9", "max_stars_repo_licenses": [...
import numpy as np from data.batch_provider import BatchProvider from data import qubiq_data_loader class qubiq_data(): def __init__(self, exp_config): data = qubiq_data_loader.load_and_process_data( root=exp_config.data_root, dataset=exp_config.dataset, task=exp_conf...
{"hexsha": "8a13e6fed2e13015db1eb838d184e0d3ed9e952a", "size": 3245, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/qubiq_data.py", "max_stars_repo_name": "WinstonHuTiger/PHiSeg-code", "max_stars_repo_head_hexsha": "11d61508e4bee320dbfcd533d355cae25a088117", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
""" This is the dashboard of CEA """ from __future__ import division from __future__ import print_function import pandas as pd from cea.plots.comparisons.old.primary_energy_intensity import primary_energy_intensity import cea.config import cea.inputlocator from cea.utilities.dbf import dbf_to_dataframe from cea.plots...
{"hexsha": "9a9231446737ae72e1e62c5f6730e819f9ee3760", "size": 22292, "ext": "py", "lang": "Python", "max_stars_repo_path": "cea/plots/comparisons/old/main.py", "max_stars_repo_name": "AlexJew/CityEnergyAnalyst", "max_stars_repo_head_hexsha": "6eb372c79e5100a2d0abce78561ae368fb409cd1", "max_stars_repo_licenses": ["MIT"...
import torch from torchvision import transforms from torch.utils.data import Dataset from functools import partial from skimage.io import imread from glob import glob from skimage import exposure, img_as_float, util from utils.augmentation import Augmentation, cropCenter, toGrayscale, cropCorner, cutout import numpy ...
{"hexsha": "7929cc8a04e20f543344bd232b929e3089ffda27", "size": 4428, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/csv_ua_dataset.py", "max_stars_repo_name": "system123/SOMatch", "max_stars_repo_head_hexsha": "6f10cf28f506998a5e430ccd3faab3076fe350d5", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import random import numpy as np import matplotlib.pyplot as plt import copy from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from matplotlib import colors ## counting = [0 for i in range(12)] counting_temp = [0 for i in range(12)] def refresh_counting(num): global counting counting[num] += 1...
{"hexsha": "20ea5ff848dec0c3770ec62f8b0ae2da0d91417a", "size": 11940, "ext": "py", "lang": "Python", "max_stars_repo_path": "Blackjack2.py", "max_stars_repo_name": "gusghrlrl101/BlackJack-AI", "max_stars_repo_head_hexsha": "b311e22d87af03d7df35232e995d235d508b319d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import matplotlib.pyplot as plt import numpy as np def get_data(file_name, network_list=['MobileNet', 'SqueezeNet', 'DenseNet121', 'ResNet50']): file_reader = open(file_name, 'r') res_list = [[] for _ in network_list] try: text_lines = file_reader.readlines() print(type(text_lines)) ...
{"hexsha": "9d148bd08840d3453cd50a2f897aac376fa80a9f", "size": 1214, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/data-visualization/boxplot/boxplot.py", "max_stars_repo_name": "lijiansong/lang", "max_stars_repo_head_hexsha": "e255709da2b12e09dea45f86d54f77a19b96f13b", "max_stars_repo_licenses": ["WTFP...
module DDg_allDsDa ! contains functions that compute the ddg/dsigmadalpha matrices of the material model ! and one main (model-indepenent) function that calls all ddg/dsigmadalpha functions of the model ! and returns the function values as a matrix ! load additional modules use constants use material_info use d...
{"hexsha": "75369af5ed158e8314ef67805be52be506611705", "size": 1941, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "return_mapping/model_components_all/DDg_allDsDa.f90", "max_stars_repo_name": "yuyong1990/TsaiWu-Fortran", "max_stars_repo_head_hexsha": "a111ca1717adfbbaf3e9e34f4189a441e16441b8", "max_stars_rep...
```python %matplotlib inline import numpy as np import matplotlib import matplotlib.pyplot as plt import sklearn.linear_model as linear_model np.random.seed(1337) from timeit import timeit import matplotlib import matplotlib.pyplot as plt ``` ### Well-conditioned linear regression ```python %matplotlib inline im...
{"hexsha": "bc27598e1319e87331ca60f858f744c79610f30c", "size": 123872, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "schedule/images/Chapter 6.ipynb", "max_stars_repo_name": "akyrillidis/comp414-514", "max_stars_repo_head_hexsha": "ed1a58cda99cb4cb14b62276eebfb4082276e9f9", "max_stars_repo_license...
# !/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function import tensorflow as tf from NumPyNet.utils import to_categorical from NumPyNet.utils import from_categorical import numpy as np import pytest from hypothesis import strategies as st from hypothesis...
{"hexsha": "51c471c91a670946580f9d73ee59cb7d20293798", "size": 1746, "ext": "py", "lang": "Python", "max_stars_repo_path": "testing/test_utils.py", "max_stars_repo_name": "Elisa-Raspanti/NumPyNet", "max_stars_repo_head_hexsha": "4e8d0d415275088f485457cdcf251d28a6826b0f", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
MODULE cbmz_mosaic_Model !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! Completely defines the model cbmz_mosaic ! by using all the associated modules !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ USE cbmz_mosaic_Precision USE cbmz_mosaic_Parameters USE cbmz_mosaic_Global USE cbmz_mosaic_Func...
{"hexsha": "298a690b42844b5f322bb7c5e42bc36ac2954028", "size": 517, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "WRF-CHEM/chem/KPP/mechanisms/cbmz_mosaic/cbmz_mosaic_Model.f90", "max_stars_repo_name": "ksetigui/paper_gmd-2020-50", "max_stars_repo_head_hexsha": "1c4bf2b0946bc31cfb443686c8aa1e33755d5fd2", "ma...
/* * Copyright 2019, Offchain Labs, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
{"hexsha": "680608cb8a47d1bb54afebaa0ef3593a2bf9e457", "size": 4180, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "packages/arb-avm-cpp/tests/value.cpp", "max_stars_repo_name": "tahmed4/arbitrum", "max_stars_repo_head_hexsha": "423adb4a21935b4470a68d0d9b073d7da3e82a7e", "max_stars_repo_licenses": ["Apache-2.0"],...
from unittest import TestCase import numpy as np import star from phd.thunderstorm import atmosphere from phd.thunderstorm.critical_energy import get_critical_energy, calculate_secondary_production_rate, \ CriticalEnergyProvider, plot_secondary_production_rate import matplotlib.pyplot as plt from tabulate import t...
{"hexsha": "22553c5b3f49e4fa220ced1b0e2689b7ead8cad6", "size": 2245, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/tests/thunderstorm/test_critical_energy.py", "max_stars_repo_name": "Zelenyy/phd-code", "max_stars_repo_head_hexsha": "d5b8bfefd2418a915dde89f7da2cb6683f438556", "max_stars_repo_licenses": ...
from typing import Tuple import albumentations as A import cv2 import random import numpy as np from albumentations.core.composition import BaseCompose from .dataset import ( INPUT_IMAGE_KEY, INPUT_FEATURES_ELA_KEY, INPUT_FEATURES_DCT_CR_KEY, INPUT_FEATURES_DCT_CB_KEY, INPUT_FEATURES_DCT_Y_KEY, ...
{"hexsha": "2accbdfbebd30610d0e15f5083f2c2ba9c01ed1c", "size": 10556, "ext": "py", "lang": "Python", "max_stars_repo_path": "alaska2/augmentations.py", "max_stars_repo_name": "simphide/Kaggle-2020-Alaska2", "max_stars_repo_head_hexsha": "3c1f5e8e564c9f04423beef69244fc74168f88ca", "max_stars_repo_licenses": ["MIT"], "ma...
from ophyd import Device, EpicsSignal, Signal, Component as Cpt from ophyd.areadetector import (ADComponent as ADCpt, StatsPlugin) from ophyd.quadem import NSLS_EM, TetrAMM, QuadEM from ophyd import DeviceStatus import numpy as np class Best(Device): x_mean = Cpt(EpicsSignal, ':BPM0:PosX_Mean') posx = Cpt(Epi...
{"hexsha": "37cacf7de5aef08de7de611f8ae996a3ea2bdef7", "size": 1721, "ext": "py", "lang": "Python", "max_stars_repo_path": "startup/20-bpm.py", "max_stars_repo_name": "NSLS-II-LIX/profile_collection", "max_stars_repo_head_hexsha": "3b942b90404c973625eb884c7a7a9c5e5a3a144a", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
import numpy as np import pandas as pd import pdb def eval(Xtest, ytest, weights, correctLabel, missLabel, numClasses, numFeatures): # hardcoded for MNIST W = np.reshape(weights, (numClasses, numFeatures)) yhat = np.argmax(np.dot(Xtest, W.T), axis=1) targetIdx = np.where(ytest == correctLabel) o...
{"hexsha": "4e49a804749a37b980e7fd422c9098ef661edba2", "size": 1802, "ext": "py", "lang": "Python", "max_stars_repo_path": "ML/code/poisoning_compare.py", "max_stars_repo_name": "DistributedML/TorML", "max_stars_repo_head_hexsha": "f41a0378f5e46e578c6bd9c8bfd56037d1a228cf", "max_stars_repo_licenses": ["MIT"], "max_star...
// // Copyright 2016 Pixar // // Licensed under the Apache License, Version 2.0 (the "Apache License") // with the following modification; you may not use this file except in // compliance with the Apache License and the following modification to it: // Section 6. Trademarks. is deleted and replaced with: // // 6. Trad...
{"hexsha": "fd80334490313d29d9a375344d5111ff31df12ae", "size": 8821, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "pxr/base/lib/tf/testenv/debug.cpp", "max_stars_repo_name": "marsupial/USD", "max_stars_repo_head_hexsha": "98d49911893d59be5a9904a29e15959affd530ec", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
\startcomponent co-en-13 \environment contextref-env \product contextref \chapter[blocks]{Blocks} \section{Introduction} \index{blocks} \index{floats} \index{placing+blocks} A block in \CONTEXT\ is defined as typographical unit that needs specific handling. We distinguish the following block types: \startitemize ...
{"hexsha": "a220259c78d77b23f56a456f517d148d0cf834ae", "size": 33207, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "contextman/context-reference/en/co-blocks.tex", "max_stars_repo_name": "marcpaterno/texmf", "max_stars_repo_head_hexsha": "aa7ad70e0102492ff89b7967b16b499cbd6c7f19", "max_stars_repo_licenses": ["BS...
""" raycast.py Author: Mahesh Venkitachalam This module has the classed and methods related to Volume rendering using the Ray Casting method. """ import OpenGL from OpenGL.GL import * from OpenGL.GL.shaders import * import numpy as np import math, sys import raycube, glutils, volreader strVS = """ #version 330...
{"hexsha": "84e7a551dc54b765814fef5c6f90752e1864f978", "size": 4929, "ext": "py", "lang": "Python", "max_stars_repo_path": "volrender/raycast.py", "max_stars_repo_name": "s-kistler/PyPlay", "max_stars_repo_head_hexsha": "559edc501ecc31dc0026652a0e65a2ac5a182c03", "max_stars_repo_licenses": ["MIT", "Unlicense"], "max_st...
__author__ = 'tim' import numpy as np from atj.tvwap import tvwap_trades, online_tvwap_trades t = np.asarray([1.,2.,3.,4.,5.,6.,7.,8.,9.,10]) px = np.asarray([100.,101.,99.,100.,110.,111.,109.,110.,120.,121.]) sz = np.asarray([50.,25.,25.,50.,50.,75.,75.,10.,20.,30]) window = 5 tvres = tvwap_trades(window,t,px,sz) ...
{"hexsha": "4ea0ba12a020dd952644b9ae157ec69eb5e77e9a", "size": 398, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/tvwap_test.py", "max_stars_repo_name": "tambu-j/signals", "max_stars_repo_head_hexsha": "9768e0c3b993d2a75cb0e6c3360197033739e9b4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
import numpy as np def main(n): a = np.random.randint(100000000, size=(n,n)) # Default type is np.int which should also be int64 b = a c = np.dot(a, b) print(c[n // 2][n // 2]) if __name__=='__main__': import sys if len(sys.argv) > 1: main(int(sys.argv[1])) else: main(100...
{"hexsha": "3c87e81e3bd86b5f77a14ba00811abe60e46a089", "size": 321, "ext": "py", "lang": "Python", "max_stars_repo_path": "arraymancerexer/benchmarks/matmul/integer_matmul.py", "max_stars_repo_name": "terasakisatoshi/nimProgram", "max_stars_repo_head_hexsha": "7835abcec1ec550bdc85f57d511c20508a6512e0", "max_stars_repo_...
import sys sys.path.append('..') from mtevi.mtevi import * from mtevi.utils import * from sklearn.datasets import load_boston from sklearn.model_selection import train_test_split from scipy.stats import zscore import matplotlib.pyplot as plt import matplotlib matplotlib.style.use('ggplot') import numpy as np import jso...
{"hexsha": "abbbc1f62345cd28c3fc00a8b7d0890f6b3ee68e", "size": 8256, "ext": "py", "lang": "Python", "max_stars_repo_path": "UCI_exp/uci_exp_norm.py", "max_stars_repo_name": "deargen/MT-ENet", "max_stars_repo_head_hexsha": "6ab482c99cb47162dc0c431b575ebe3475b91168", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
// // Created by ryan on 3/7/16. // #include "setup.h" #include <boost/format.hpp> #include <rapidjson/error/en.h> #include "csv_parser.h" #include "timoshenko_beam_element.h" namespace explicit_fea { namespace { template<typename T> void createVectorFromJSON(const rapidjson::Document &config_doc,...
{"hexsha": "c2920831970f9790f579c5c0c0c8083e6131e12a", "size": 7523, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/setup.cpp", "max_stars_repo_name": "latture/explicit-beam-fea", "max_stars_repo_head_hexsha": "003e940bda203e1d867494c891c9cee3477cd682", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
[STATEMENT] lemma FV_EqOnGL: "FV (EqOnGL p p') \<subseteq> {p,p'}" (is "?L \<subseteq> ?R") [PROOF STATE] proof (prove) goal (1 subgoal): 1. FV (EqOnGL p p') \<subseteq> {p, p'} [PROOF STEP] proof- [PROOF STATE] proof (state) goal (1 subgoal): 1. FV (EqOnGL p p') \<subseteq> {p, p'} [PROOF STEP] have "?L = \<Union> {...
{"llama_tokens": 1104, "file": "HyperCTL_Finite_Noninterference", "length": 12}
import numpy as np weights = np.array([0.5, 0.0, -0.7]) alpha = 0.1 streetlights = np.array( [ [ 1, 0, 1 ], [ 0, 1, 1 ], [ 0, 0, 1 ], [ 1, 1, 1 ], [ 0, 1, 1 ], [ 1, 0, 1 ] ] ) ...
{"hexsha": "02e8d8ef9f942f8a2574c7c0a95e4dd6c1d55b18", "size": 813, "ext": "py", "lang": "Python", "max_stars_repo_path": "books/grokking_deeplearning/ch5/nn1.py", "max_stars_repo_name": "gerritjvv/deeplearning", "max_stars_repo_head_hexsha": "1cfdee65c7f1d48156b5e1f64616cae0c90aa347", "max_stars_repo_licenses": ["MIT"...
\documentclass[../thesis.tex]{subfiles} \begin{document} This is a modification of CoPCSE@NTNUs LaTeX document class. It's purpose is to make a more friendly environment for writing mathematics, while removing some redundancy thereof. Additions to this class are the extra custom amsthm environments. Hopefully they ar...
{"hexsha": "b44b808722b75898009059b6a121f27016dd82ff", "size": 3999, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/introduction.tex", "max_stars_repo_name": "CelestialCry/thesis-NTNU", "max_stars_repo_head_hexsha": "19dfceca01ba4cfe261469de428cad1d0613f4a1", "max_stars_repo_licenses": ["MIT"], "max_star...
import matplotlib.pyplot as plt import numpy as np import torch import torch.nn as nn from matplotlib.lines import Line2D from torch.functional import Tensor _mean_ = np.array([0.41248123, -0.00600316]) _scale_ = np.array([2.07864733, 1.85605669]) def mult_normal_sample(mean, std_1, std_2, corr): std_1.squeeze_(...
{"hexsha": "957caf9ea3b91de67f5db80883862a65d358531f", "size": 3713, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/helper.py", "max_stars_repo_name": "eeishaan/handwriting-synthesis", "max_stars_repo_head_hexsha": "d7036335bf49c0f079c36f4c801c9bb0da15f3d1", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#### Procesamiento Digital de Señales # Trabajo Práctico Nº0 #### Gisela Farace # Introducción Jupyter Notebook es una herramienta para la confección de reportes técnicos, dado que permite la interacción en el mismo ambiente de: 1. un procesador de texto elemental (formato Markdown) que permite resaltar texto, en...
{"hexsha": "06956d5a290646cb1034be98f80c33e6532fb108", "size": 901755, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "notebook0.ipynb", "max_stars_repo_name": "gfarace/prueba_jupyter", "max_stars_repo_head_hexsha": "4ea8cd499566612afdfc2ee48aa539e32c02e605", "max_stars_repo_licenses": ["MIT"], "max...
"""Purpose: Visualise vertical profiles of variables from ICON simulation. Author: Stephanie Westerhuis Date: 25/11/2021. """ # Standard library import datetime import datetime as dt import sys from pprint import pprint # Third-party import matplotlib.dates as mdates import matplotlib.pyplot as plt import matplotli...
{"hexsha": "a4523096c1f43854dcb6937ab188e3ffd804905d", "size": 22329, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plot_profile/plot_icon/plot_icon.py", "max_stars_repo_name": "mizeller/plot_profile", "max_stars_repo_head_hexsha": "832f1d47a182d65747f18cf1ac90afc9a3b821c1", "max_stars_repo_licenses": ["MI...
/* Copyright (c) 2005-2021, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
{"hexsha": "b4751829e6160ddb1a1e5f7e600203631c9860c2", "size": 7785, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "heart/src/stimulus/tissue_electrodes/ElectrodesStimulusFactory.hpp", "max_stars_repo_name": "mdp19pn/Chaste", "max_stars_repo_head_hexsha": "f7b6bafa64287d567125b587b29af6d8bd7aeb90", "max_stars_rep...
#define BOOST_TEST_MODULE "test_truncate" #include <boost/test/included/unit_test.hpp> // the code to test: #include "truncate.hpp" BOOST_AUTO_TEST_CASE(_fast_pow) { // results for fast_pow(e < -126) are not defined BOOST_CHECK_EQUAL(fast_pow(0), 1); BOOST_CHECK_EQUAL(fast_pow(1), 2); BOOST_CHECK_EQU...
{"hexsha": "a40633f0f868a11ccb2e35dea77506b65a8f2de8", "size": 2377, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/boost/test_truncate.cpp", "max_stars_repo_name": "james-s-willis/kotekan", "max_stars_repo_head_hexsha": "155e874bb039702cec72c1785362a017548aa00a", "max_stars_repo_licenses": ["MIT"], "max_st...
import cv2 import numpy as np from siamfc import TrackerSiamFC def rectangleImg(img,startPt,stopPt,color=(0,0,255),thickness=2): return cv2.rectangle(img, startPt, stopPt, color=color, thickness=thickness) def cameraTracking(): net_path = 'siamfc_alexnet_e554.pth' tracker = TrackerSiamFC(net_path=net_pat...
{"hexsha": "b0fd583f243318c983be48c9ea273a5afdf1efe5", "size": 1163, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/videoCapTracking.py", "max_stars_repo_name": "StevenHuang2020/SiameseFc_PyTorch", "max_stars_repo_head_hexsha": "43f214a59e5841668f8b1fbadebd47384f8d4bf5", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np import time, warnings import scipy.weave #import pyximport; pyximport.install() # requires recent Cython import fastfinder_help class MissingValueError(Exception): pass class FastFinder(object): """fast search by use of a cached, sorted copy of the original data Parameters -------...
{"hexsha": "f6e121fbfb98814cafe8128785046d85d41b7e1a", "size": 11577, "ext": "py", "lang": "Python", "max_stars_repo_path": "flydra_analysis/flydra_analysis/a2/utils.py", "max_stars_repo_name": "liyi2017/flydra", "max_stars_repo_head_hexsha": "9ec83f14514f73e660ae8fbda32a3cc0348d0cb4", "max_stars_repo_licenses": ["Apac...
function [y,deriv] = cllr_obj(w,T,weights,logit_prior) % This is an MV2DF. See MV2DF_API_DEFINITION.readme. % % Weighted binary classifier cross-entropy objective, based on logarithmic % cost function. % % Differentiable inputs: % w: is vector of N detection scores (in log-likelihood-ratio format) % % Fixed parame...
{"author": "nesl", "repo": "asvspoof2019", "sha": "8b780369f7273345c22d979192119198bbf3db13", "save_path": "github-repos/MATLAB/nesl-asvspoof2019", "path": "github-repos/MATLAB/nesl-asvspoof2019/asvspoof2019-8b780369f7273345c22d979192119198bbf3db13/baseline/tDCF_v1/bosaris_toolkit.1.06/bosaris_toolkit/utility_funcs/Opt...
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- import json import pickle import numpy as np import pandas as pd import azureml.train.automl from sklearn.externals import joblib from azure...
{"hexsha": "82fc4a4f10c055ec451673ead7f807cf9d195ee6", "size": 1633, "ext": "py", "lang": "Python", "max_stars_repo_path": "2020/AutoML Classifiaction/inference/score.py", "max_stars_repo_name": "marcelfranke/sqlserverkonferenz", "max_stars_repo_head_hexsha": "4a784edfc6014ed189f44301ec8aea948d500f8f", "max_stars_repo_...
#pragma once #include <boost/utility/string_view.hpp> #include <cstddef> namespace swizzle { namespace lexer { class FileInfo; class Token; enum class TokenizerState : std::uint8_t; }} namespace swizzle { namespace lexer { class TokenizerStateInterface { public: virtual ~TokenizerSta...
{"hexsha": "330591f186c86553a4f974188b2b2b5608e455bd", "size": 486, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "swizzle/lexer/TokenizerStateInterface.hpp", "max_stars_repo_name": "SenorAgosto/Swizzle", "max_stars_repo_head_hexsha": "52c221de9fa293b0006f07a41b140d2afcc1a9ed", "max_stars_repo_licenses": ["BSD-4-...
import numpy as np import pickle rare_index = np.array([ 9, 23,28, 45,51, 56,63, 64,67, 71,77, 78,81, 84,85, 91,100,101,105,108,113,128,136,137,150,159,166,167,169,173,180,182,185,189,190,193,196,199,206,207,215,217,223,228,230,239,240,255,256,258,261,262,263,275,280,281,282,287,290,293,304,312,316,318,326,329,334,335...
{"hexsha": "8a4ce00d506c0b83319f24489df0f49d4a2e9dfe", "size": 8018, "ext": "py", "lang": "Python", "max_stars_repo_path": "HICO_DET_utils.py", "max_stars_repo_name": "Foruck/OC-Immunity", "max_stars_repo_head_hexsha": "bd0cf46ffc941c12d5d5299039d20a75699c6181", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6,...
import random import numpy as np import matplotlib.pyplot as plt from math import sqrt class hierarchical(object): nodes = {} #Dictionary that contains the entire tree structure (parent-child relationships) distance = {} #Keeps track of distances calculated. Keys: A tuple with internal names. Val: Di...
{"hexsha": "7cd1a4a42c289c6d87544aad7fdbb33b80bd765f", "size": 8002, "ext": "py", "lang": "Python", "max_stars_repo_path": "hw2skeleton/hier.py", "max_stars_repo_name": "hasuni-max/hw2-skeleton", "max_stars_repo_head_hexsha": "498f5d250ec18042c1e21fac177a92f3c7d3da7c", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
import numpy as np from .base import LeviCivitaTensor, ProjectiveCollection, ProjectiveElement, Tensor, TensorDiagram from .point import Point, infty_hyperplane from .utils import inv def identity(dim, collection_dims=None): """Returns the identity transformation. Parameters ---------- dim : int ...
{"hexsha": "484533b9b85d01c6487c2f9d77b403c725ce802d", "size": 10529, "ext": "py", "lang": "Python", "max_stars_repo_path": "geometer/transformation.py", "max_stars_repo_name": "diplodocuslongus/geometer", "max_stars_repo_head_hexsha": "3ebcfa2d27b621413099756a837b46fd5860c7f0", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python # coding=utf-8 """ @create time: 2019-11-22 10:21 @author: Jiawei Wu @edit time: 2019-11-25 11:28 @file: /find_treasure.py """ import numpy as np from gym.spaces import Discrete, Box import gym class FindTreasureEnv(gym.Env): def __init__(self, length=7, treasures=[6]): self.player_...
{"hexsha": "7ddbd9d516003bdaf3de01ec0695ff434340a4b3", "size": 2124, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl4net/envs/findtreasure_env.py", "max_stars_repo_name": "bupt-ipcr/RL4Net", "max_stars_repo_head_hexsha": "b1b694361c688f5e0055148a0cdcb4c6253cd7bd", "max_stars_repo_licenses": ["MIT"], "max_star...
__precompile__() """ The Luxor package provides a set of vector drawing functions for creating graphical documents. """ module Luxor using Colors, Cairo, Compat include("point.jl") include("Turtle.jl") include("polygons.jl") include("Tiler.jl") include("arrows.jl") include("text.jl") export Drawing, currentdrawing,...
{"hexsha": "dd77bffe91f8038a0f8d54ae3825c0f0463b1bb8", "size": 35229, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Luxor.jl", "max_stars_repo_name": "JuliaPackageMirrors/Luxor.jl", "max_stars_repo_head_hexsha": "564b74edd90c2ce8ca96e4fdd5aabaaaf329d44b", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
module RestartPrintM use UtilitiesM use GIDDataOutputM use ProcessM implicit none private public :: RestartPrintDT type, extends(NewProcessDT) :: RestartPrintDT contains procedure :: print end type RestartPrintDT integer(ikind), parameter :: restartFile = 94 contains subroutine ...
{"hexsha": "445430699e556f17d9c039bc6edd97207fde35e6", "size": 1031, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "applications/CFD2D/src/Process/RestartPrint.f90", "max_stars_repo_name": "ponfo/Project790", "max_stars_repo_head_hexsha": "abcfcc4945024bd6bd5832bc3ef3d4e1b0df3b91", "max_stars_repo_licenses": ...
[STATEMENT] lemma nprv_exuI_var: assumes n1: "nprv F (subst \<phi> t x)" and n2: "nprv (insert (subst \<phi> (Var y) x) F) (eql (Var y) t)" and i[simp]: "F \<subseteq> fmla" "finite F" "\<phi> \<in> fmla" "t \<in> trm" "x \<in> var" "y \<in> var" "y \<notin> FvarsT t" and u: "y \<notin> (\<Union>\<phi> \<in> F. Fvars \...
{"llama_tokens": 1602, "file": "Syntax_Independent_Logic_Natural_Deduction", "length": 17}
import unittest from unittest.mock import patch from unittest.mock import MagicMock from chart_ipynb import chart_framework import jp_proxy_widget class TestChartFramework(unittest.TestCase): @patch("chart_ipynb.chart_framework.load_requirements") def test_init(self, mock_load_requirements): widget =...
{"hexsha": "614436e7808898d7a1b7c847aee98308673f8827", "size": 4746, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_chart_framework.py", "max_stars_repo_name": "lingruiluo/Chart_ipynb", "max_stars_repo_head_hexsha": "3821950dc8d66d8ab518b39fc277855e2a7277cc", "max_stars_repo_licenses": ["BSD-2-Clause...
import sys, io import numpy as np import scipy as sp import scipy.spatial as sps from matplotlib import pyplot as plt import xml.etree.ElementTree as et # import lxml.etree as et # Get a 1D Cartesian mesh def get_cartesian_points_1d(xmin, xmax, num_points): p...
{"hexsha": "29d866ca01e6805f5b4b12defe5323519b12bb29", "size": 16749, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/mesh_functions.py", "max_stars_repo_name": "brbass/ibex", "max_stars_repo_head_hexsha": "5a4cc5b4d6d46430d9667970f8a34f37177953d4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
"""Credit to Adrian Rosebrock at http://www.pyimagesearch.com/2016/01/11/opencv-panorama-stitching/ A lot of the code from that website has been used in functions in this program, and some credit goes to the original author Credit to arcticfox at http://stackoverflow.com/questions/13063201/how-to-show-the-whole-image...
{"hexsha": "011e92095d9e7b935f4f01f2265c878405489e53", "size": 11695, "ext": "py", "lang": "Python", "max_stars_repo_path": "micasense_register.py", "max_stars_repo_name": "hsabiu/thesis-scripts", "max_stars_repo_head_hexsha": "54b7b2248f9a341be7579c96eb54dd43b7d7138f", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import numpy as np from utils_cv.detection.mask import ( binarise_mask, colorise_binary_mask, transparentise_mask, merge_binary_masks, ) def test_binarise_mask(od_mask_rects): """ Test that `binarise_mas...
{"hexsha": "cec2d6ac1e0ba42382e6df7067acb56371eaff67", "size": 1588, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/detection/test_detection_mask.py", "max_stars_repo_name": "muminkoykiran/computervision-recipes", "max_stars_repo_head_hexsha": "b573f2600ebda68b1ab571d4122a32525b674587", "max_stars_re...
[STATEMENT] lemma analytically_valid_x: assumes "analytically_valid s F j" shows "(\<lambda>x. integral UNIV (\<lambda>y. ((partial_vector_derivative F j) (x, y)) * (indicator s (x, y)))) \<in> borel_measurable lborel" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<lambda>x. integral UNIV (\<lambda>y. partial...
{"llama_tokens": 769, "file": "Green_Green", "length": 7}
# Note that this script can accept some limited command-line arguments, run # `julia build_tarballs.jl --help` to see a usage message. using BinaryBuilder, Pkg name = "Deno" version = v"1.12.2" release_url = "https://github.com/denoland/deno/releases/download/v$version" # Collection of sources required to complete bu...
{"hexsha": "3fe8d1674c2da2c951cace3883c9ef556b60c499", "size": 1774, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "D/Deno/build_tarballs.jl", "max_stars_repo_name": "jameskermode/Yggdrasil", "max_stars_repo_head_hexsha": "75140f4a7b6bd8839b22da5a39d7ee68780d7d65", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# ------------------------------------------------------------------------- # MSDS R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Chengyang Li # ------------------------------------------------------------------------- from __future__ import absolute_import from __future__ import division...
{"hexsha": "729efa68c4c981dbc7bb368f3e03fc5c705a641f", "size": 1204, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/layer_utils/fusion_layer.py", "max_stars_repo_name": "Li-Chengyang/MSDS-RCNN", "max_stars_repo_head_hexsha": "9f141d7d381e81c915043f5b41949d462a47a570", "max_stars_repo_licenses": ["MIT"], "ma...
\section{Throwing Booth} \label{sec:hardware:throwing_booth} The throwing booth is constructed from Item aluminum profiles. The background of the images shall remain the same, regardless of the current location. Therefore, a white side wall opposite the camera is used. When creating the booth design, care is taken to ...
{"hexsha": "12b437e11412319aa61c946d4f614fcffafe80de", "size": 1700, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/thesis/chapters/hardware/throwing_booth.tex", "max_stars_repo_name": "MuellerDominik/AIonFPGA", "max_stars_repo_head_hexsha": "f2379782660d4053a5bb60b9f6c6dea17363f96d", "max_stars_repo_licenses...
#!/usr/bin/env python # # (c) 20018 team exitzero (goapsych0@exitzero.de) # # links: # https://github.com/Gallopsled/pwntools # http://docs.pwntools.com/en/stable/ # https://medium.com/bugbountywriteup/learn-pwntools-step-by-step-8c96f2dba61a # from __future__ import print_function from pwn import * # import ot...
{"hexsha": "498bd8af4aed6b4da0858bcfdd01987da3d1b244", "size": 936, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/example.py", "max_stars_repo_name": "goapsych0/ctf", "max_stars_repo_head_hexsha": "7b9ae485de2c6d8f015c2a80b100feb14cafe090", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": nu...
function sigmaEq = equivalentStress(sigma,varargin) % von Mises equivalent stress % % Input % sigma - @stressTensor % % Output % s - double % s = sigma.deviatoricStress; sigmaEq = sqrt(3/2 * s:s); % the following code gives the same result % is more efficient but less readable % M = sigma.M; % sigmaEq = sqrt(M(1,1...
{"author": "mtex-toolbox", "repo": "mtex", "sha": "f0ce46a720935e9ae8106ef919340534bca1adcb", "save_path": "github-repos/MATLAB/mtex-toolbox-mtex", "path": "github-repos/MATLAB/mtex-toolbox-mtex/mtex-f0ce46a720935e9ae8106ef919340534bca1adcb/TensorAnalysis/@stressTensor/equivalentStress.m"}
! ! Copyright (c) 2019 National Technology & Engineering Solutions of ! Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with ! NTESS, the U.S. Government retains certain rights in this software. ! !**************************************************************************** ! ! PROGRAM: MatMCNP...
{"hexsha": "7ec51dd5050bb72febb90fedc6a9491078663870", "size": 12471, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "source/MatMCNP.f90", "max_stars_repo_name": "krdepri/MatMCNP", "max_stars_repo_head_hexsha": "84f2f1e97f325b29cb8474679a1fe57ef7320e7d", "max_stars_repo_licenses": ["Intel", "X11"], "max_stars_...
# -*- coding: utf-8 -*- # Copyright (C) 2015-2018 by Brendt Wohlberg <brendt@ieee.org> # All rights reserved. BSD 3-clause License. # This file is part of the SPORCO package. Details of the copyright # and user license can be found in the 'LICENSE.txt' file distributed # with the package. r"""Compute the nuclear norm ...
{"hexsha": "627a65a8f82d2149df7418fcc10b857263ff3081", "size": 1432, "ext": "py", "lang": "Python", "max_stars_repo_path": "sporco/prox/_nuclear.py", "max_stars_repo_name": "cwitkowitz/sporco", "max_stars_repo_head_hexsha": "3a0bf16f1fc6aee8f323653781ea4bc8dd79845b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
# ############################################################################# # ############################################################################# #Analysis of ray #This file contains functions for analyzing and computing properties of a given ray. # ######################################################...
{"hexsha": "55c51753847a721072bb1ee4ef661b902c5c3574", "size": 2418, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ray_analysis.jl", "max_stars_repo_name": "amyascwk/CavChaos.jl", "max_stars_repo_head_hexsha": "f4a2f9801af5e67a5648d37901a4e5cd377c064d", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
"An abstract type for the problems from [NSDE.jl](https://github.com/antonuccig/NSDE.jl)." abstract type AbstractNSDEProblem end "An abstract type for the solvers from [NSDE.jl](https://github.com/antonuccig/NSDE.jl)." abstract type AbstractNSDESolver end "An abstract type for the solutions from [NSDE.jl](https://git...
{"hexsha": "6ba93e1b6e623eaacaa9f6defb302f19a0d407e6", "size": 996, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/abstract.jl", "max_stars_repo_name": "antonuccig/NSDEBase.jl", "max_stars_repo_head_hexsha": "49f22b25ae80a2d861634fc4503fa9635ddd5142", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
# Copyright 2022 Deep Learning on Flink 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 l...
{"hexsha": "618323d89582cdc4534e0cb0e78ecdbb3c05456a", "size": 2696, "ext": "py", "lang": "Python", "max_stars_repo_path": "dl-on-flink-examples/src/test/python/mnist_data_setup.py", "max_stars_repo_name": "Sxnan/dl-on-flink", "max_stars_repo_head_hexsha": "5151eed9bde850eb07062a084f72096ff7b07027", "max_stars_repo_lic...
import numpy as np from stl import mesh def mesh_location_zero(my_mesh): midPosRel = (my_mesh.max_ - my_mesh.min_)/2 my_mesh.x = my_mesh.x - (midPosRel[0] + my_mesh.min_[0]) my_mesh.y = my_mesh.y - (midPosRel[1] + my_mesh.min_[1]) my_mesh.z = my_mesh.z - (midPosRel[2] + my_mesh.min_[2]) return my_m...
{"hexsha": "50d6e25b009af8f288305c235bc447fc90bb36c2", "size": 323, "ext": "py", "lang": "Python", "max_stars_repo_path": "HolePlateMaker/mesh_location_zero.py", "max_stars_repo_name": "henjin0/HolePlateMaker", "max_stars_repo_head_hexsha": "daf7ef5269b03f2ac2fdc9a8132f945b14177aa0", "max_stars_repo_licenses": ["MIT"],...
program t print *,'ok' end program t module m contains subroutine s print *,'bad' end subroutine s end module m
{"hexsha": "3ebdbf10855150fa93c81ed2b92483a4e9c4329d", "size": 123, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/t0220r/t.f90", "max_stars_repo_name": "maddenp/ppp", "max_stars_repo_head_hexsha": "81956c0fc66ff742531817ac9028c4df940cc13e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
# -*- coding: UTF-8 -*- """ Copyright 2021 Tianshu AI Platform. 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 req...
{"hexsha": "ede3dc7656bab9b6af9effaad3c9d2edbb24939a", "size": 28590, "ext": "py", "lang": "Python", "max_stars_repo_path": "tsvis/logger/utils.py", "max_stars_repo_name": "hdu-jinminghu/TS-VIS-master", "max_stars_repo_head_hexsha": "c717722f86ee6996afc052ec946fbaefc1b5d3dc", "max_stars_repo_licenses": ["Apache-2.0"], ...
// Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include <config.h> #include <asiolink/io_add...
{"hexsha": "3ec3fd5cca0d2988210ac6dd172e00b5c55ce0cc", "size": 17466, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/lib/dhcpsrv/parsers/host_reservation_parser.cc", "max_stars_repo_name": "nchaigne/kea", "max_stars_repo_head_hexsha": "2badfd4d9b4f2420b0e9683db5da16a3ab90dd81", "max_stars_repo_licenses": ["Apa...
''' Computes the magnetic coordinates of each packet Also determines whether the packet is in shadow ''' import numpy as np def xyz_to_magcoord(t, x, inputs, planet): if planet.object == 'Mercury': magcoord = None else: # Need to add magnetic coordinates for Jupiter and Saturn assert ...
{"hexsha": "d08c10737638c21b72988a3fc8be15c71b2a097a", "size": 381, "ext": "py", "lang": "Python", "max_stars_repo_path": "nexoclom/modelcode/xyz_to_magcoord.py", "max_stars_repo_name": "mburger-stsci/NExoCloM", "max_stars_repo_head_hexsha": "c0c81eeb04c5571662f3d86337d84a18f1cd0dcf", "max_stars_repo_licenses": ["BSD-3...
#!/usr/bin/env python3 import numpy as np from .base_converter import BaseConverter from ..egograph import EgoGraph from typing import Tuple, Dict NID = '_NID' EID = '_EID' UID = '_UID' VID = '_VID' class Ego2Tensor(BaseConverter): """ An object that convert ego-graph into tensor. :param graph: the gra...
{"hexsha": "b40890ef2bd3d3305996d7d02935ed48b3830516", "size": 3901, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/graph2tensor/converter/ego2tensor.py", "max_stars_repo_name": "deepest-stack/graph2tensor", "max_stars_repo_head_hexsha": "4258bd7fff68348c98a77cff88afef039c1d44ba", "max_stars_repo_license...
import h5py #from mpi4py import MPI import numpy as np import time from netCDF4 import Dataset as DS import os def writetofile(src, dest, channel_idx, varslist): if os.path.isfile(src): batch = 2**6 rank = MPI.COMM_WORLD.rank Nproc = MPI.COMM_WORLD.size Nimgtot = 1460#src_shape[0] ...
{"hexsha": "331e34aa34f00e06f5e60999b73257eea80d916e", "size": 2498, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/tp_tigge_nc2hdf5.py", "max_stars_repo_name": "pzharrington/WeatherBench", "max_stars_repo_head_hexsha": "244b8452c928d825af388ba62e0c3c21affb32d3", "max_stars_repo_licenses": ["MIT"], "max...
# PREAMBLE # PKG_SETUP # ## Setup using RoboDojo # ## Initial conditions q1 = nominal_configuration(quadruped) v1 = zeros(quadruped.nq) # ## Time h = 0.01 T = 100 # ## Simulator s = Simulator(quadruped, T, h=h) # ## Simulate simulate!(s, q1, v1) # ## Visualizer vis = Visualizer() render(vis) # ## Visualize v...
{"hexsha": "2c9f285d8491af46d2817c5cc874a0dc91689014", "size": 338, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/quadruped/quadruped.jl", "max_stars_repo_name": "mcx/RoboDojo.jl", "max_stars_repo_head_hexsha": "b31fa17ee84285f45b76de78d9e660a83f5ddc9e", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np import matplotlib.pyplot as plt from convolution_matrices import convmat2D as cm from RCWA_functions import run_RCWA_simulation as rrs import cmath from numpy.linalg import cond plt.close("all") ''' RCWA testing with a metal, which should match the spectra we showed in the RCWA_1D code. as in, if you...
{"hexsha": "0d6981fb19ff5b2e8045d2d63464fd0c81c5676a", "size": 3746, "ext": "py", "lang": "Python", "max_stars_repo_path": "RCWA_2D_examples/RCWA_metal_square_grid.py", "max_stars_repo_name": "zhaonat/RCWA", "max_stars_repo_head_hexsha": "a28fdf90b5b5fc0fedacc8bb44a0a0c2f2a02143", "max_stars_repo_licenses": ["MIT"], "m...
import numpy as np from scipy.ndimage import convolve def find_nearest_index(array, value): idx = (np.abs(np.array(array) - value)).argmin() return idx def get_min_max_xy(pos_array): min_x = 10000 max_x = -1 min_y = 10000 max_y = -1 for xy in pos_array: [_x, _y] = xy if ...
{"hexsha": "fefc9a5a59f617f09f3f20fa0b914ba11f254566", "size": 1950, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/iBeatles/utilities/array_utilities.py", "max_stars_repo_name": "ornlneutronimaging/iBeatles", "max_stars_repo_head_hexsha": "0a6ca1e18780cf08ad97b6cedede5a23f52bc953", "max_stars_repo_licenses...
from sympy import diag import rclpy from rclpy.node import Node from rclpy.qos import QoSPresetProfiles from cv_bridge import CvBridge from stereo_msgs.msg import DisparityImage from std_msgs.msg import Header from sensor_msgs.msg import PointCloud2, CameraInfo, PointField import cv2 from time import time import numpy...
{"hexsha": "68df36d4baab16e16f5ea636362556cbdf9bb792", "size": 3837, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/stereo_cam/stereo_cam/pcd_publisher.py", "max_stars_repo_name": "frank20a/collaborative-sats", "max_stars_repo_head_hexsha": "9d26d3c8f66cf43bbd514f02434851439e746797", "max_stars_repo_license...
# -*- coding: utf-8 -*- ################################################################################ #Importing Libraries ################################################################################ global debug, interactive debug = 0 interactive = 1 from pylab import * from math import * import matplotlib impo...
{"hexsha": "56ca067eb92481a1f6d0165695a46120057f39c4", "size": 22173, "ext": "py", "lang": "Python", "max_stars_repo_path": "Young_Massive_Stars/Code_v31_multiple/galaxy_generator/aux/gameFunctions31.py", "max_stars_repo_name": "lhquirogan/Galactic_Maser_Simulator", "max_stars_repo_head_hexsha": "cb74afd40b6d99429219c4...
#!/usr/bin/env python # # Created 19-Mar-2013 by Daniel Margala (University of California, Irvine) <dmargala@uci.edu> # # usage: # Import libraries import numpy as np import os #import yanny import pyfits as pf import sys import re import math class CAMERA: pass class RED_CAMERA (CAMERA): pass class BLUE_CAMERA (C...
{"hexsha": "5ae24c262fd35892a131468ba28a8f9d93fb97ec", "size": 7629, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/old/bosslya.py", "max_stars_repo_name": "dmargala/blupe", "max_stars_repo_head_hexsha": "317ca35f554ae25605310cddd3e67e9fdad7b2ba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import pandas as pd import numpy as np from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import mean_absolute_error from sklearn.model_selection import train_test_split from sklearn.pipeline import Pipeline from sklearn.compose import ColumnTransformer from sklearn.preprocessing import OneHotEncod...
{"hexsha": "8718b10aad5b5f67a7f2543af25415c32b892c44", "size": 2015, "ext": "py", "lang": "Python", "max_stars_repo_path": "AI & Domains (ML etc) Library/Titanic_kaggle/pipeline2.py", "max_stars_repo_name": "hammad1201/Hacktoberfest-2021", "max_stars_repo_head_hexsha": "b4b86792755c7b86d5bcc94ac8159d8825ed169e", "max_s...
module common_debug_oceanmodel ! This module is for debugging, but also for standard checks ! that should be maintained to catch any problems immediately and exit ! rather than continuing with bad values. ! ! Author: Steve Penny, June 2017 (visiting scientist, ECMWF) USE common, ONLY: r_size IMPLICIT NONE PUBLIC :: ...
{"hexsha": "6fcd7c366c81f5e0b2c8dab4018830cf9e718550", "size": 6921, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/model_specific/hycom/common_debug_hycom.f90", "max_stars_repo_name": "GEOS-ESM/Ocean-LETKF", "max_stars_repo_head_hexsha": "a7c4bbf86cdbff078212914dcc059d0b1450accf", "max_stars_repo_license...
#!/usr/bin/env python3 # Copyright 2019 Alexander Meulemans # # 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...
{"hexsha": "beb55b6f9dbfeca1f16d5c6ba4d94bb21c67842b", "size": 11781, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/builders.py", "max_stars_repo_name": "lebrice/theoretical_framework_for_target_propagation", "max_stars_repo_head_hexsha": "d177493a5b96f6563fc6bad18ac03d512f2b217f", "max_stars_repo_licenses...
#!/usr/bin/env python # Authors: Junior Costa de Jesus # import rospy import os import json import numpy as np import random import time import sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) from collections import deque from std_msgs.msg import Float32 from environment_stage_1 import...
{"hexsha": "c6208565c6a0397b397934f67b0e9e3771743d49", "size": 13674, "ext": "py", "lang": "Python", "max_stars_repo_path": "SAC/sac_stage_1.py", "max_stars_repo_name": "Crawford-fang/ROS_pytorch_RL", "max_stars_repo_head_hexsha": "2d3476f15d51aa1f5b5ae9edc5d7f4c776e5de9f", "max_stars_repo_licenses": ["Apache-2.0"], "m...
[STATEMENT] lemma istate_\<Delta>1: assumes B: "B vl vl1" shows "\<Delta>1 istate vl istate vl1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Delta>1 istate vl istate vl1 [PROOF STEP] using B [PROOF STATE] proof (prove) using this: B vl vl1 goal (1 subgoal): 1. \<Delta>1 istate vl istate vl1 [PROOF STEP] unfol...
{"llama_tokens": 649, "file": "CoCon_Paper_Confidentiality_Paper_Aut_PC", "length": 3}
using HTTP, Joseki, JSON, Sockets, Test @testset "Integration tests" begin # Simple server function pow(req::HTTP.Request) j = HTTP.queryparams(HTTP.URI(req.target)) if !(haskey(j, "x")&haskey(j, "y")) return error_responder(req, "You need to specify values for x and y!") ...
{"hexsha": "ec199af9b6e9d1ea8d752a240dd4091d1ca67941", "size": 1525, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/integration-tests.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Joseki.jl-b588beb9-536a-5a7d-a241-c127386fde06", "max_stars_repo_head_hexsha": "1a065dc90399c1009dfb4792457dde2542...
#!usr/bin/env python #coding=utf-8 import pyaudio import wave import numpy #define stream chunk chunk = 1024 #open a wav format music f = wave.open(r"crash_cymbal.wav","rb") snare = wave.open(r"snare.wav","rb") bass_drum = wave.open(r"bass_drum.wav","rb") crash_cymbal = wave.open(r"crash_cymbal.wav","...
{"hexsha": "235764aea1c2f884f61f17f0dbf4136b1fe8616b", "size": 1265, "ext": "py", "lang": "Python", "max_stars_repo_path": "audio/readWawe.py", "max_stars_repo_name": "valschneider/lauzhack2017", "max_stars_repo_head_hexsha": "36fe0bb043165fa788a28863298332d70a95a57a", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import argparse import sys import os import tensorflow as tf from utils.config import load_config, gan_from_config from classifiers.cifar_model import Model from blackbox import get_cached_gan_data from utils.network_builder import model_a, DefenseWrapper from cleverhans.utils_tf import model_train, model_eval from ut...
{"hexsha": "3b6b7f52441b27c2b935603d2826ddf5f98bae64", "size": 5434, "ext": "py", "lang": "Python", "max_stars_repo_path": "classification.py", "max_stars_repo_name": "killianlevacher/defenseInvGAN-src", "max_stars_repo_head_hexsha": "8fa398536773c5bc00c906562d2d9359572b8157", "max_stars_repo_licenses": ["MIT"], "max_s...
[STATEMENT] lemma transaction_strand_memberD[dest]: assumes "x \<in> set (transaction_strand T)" shows "x \<in> set (transaction_receive T) \<or> x \<in> set (transaction_checks T) \<or> x \<in> set (transaction_updates T) \<or> x \<in> set (transaction_send T)" [PROOF STATE] proof (prove) goal (1 subgoal)...
{"llama_tokens": 305, "file": "Automated_Stateful_Protocol_Verification_Transactions", "length": 2}
import matplotlib.pyplot as plt import numpy as np import pandas as pd import inspect from histogram import Hist # read in data for testing from 'test_data_1.csv' # file has 1 column of data with heading called 'col_1' # save to pandas dataframe 'df_1' df_1 = pd.read_csv(r'C:\projects_learning\ringvision\pypi...
{"hexsha": "08825ecd103757d4ba1afb5f5049539b0b296921", "size": 1152, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_hist_class.py", "max_stars_repo_name": "brianRingler/EDA-Tools-", "max_stars_repo_head_hexsha": "1870e786f1cd009f03a51243177e5b22a98bb921", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
#include <set> #include <iterator> #include <boost/test/unit_test.hpp> #include <dracosha/validator/validator.hpp> #include <dracosha/validator/prevalidation/resize_validated.hpp> using namespace DRACOSHA_VALIDATOR_NAMESPACE; BOOST_AUTO_TEST_SUITE(TestPrevalidation) BOOST_AUTO_TEST_CASE(CheckResizeValidated) { ...
{"hexsha": "b8a3d51c35d02be2143d95d5990abc0dac122d3f", "size": 9089, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/testresizevalidated.cpp", "max_stars_repo_name": "evgeniums/cpp-validator", "max_stars_repo_head_hexsha": "e4feccdce19c249369ddb631571b60613926febd", "max_stars_repo_licenses": ["BSL-1.0"], "ma...
# -*- coding: utf-8 -*- # @Author: sf942274 # @Date: 2020-04-01 08:09:19 # @Last Modified by: Weiyue Ji # @Last Modified time: 2021-06-06 17:52:02 import os, sys, pickle, datetime, time, warnings import pandas as pd import numpy as np import skimage.io as skiIo from skimage import exposure, img_as_float, filter...
{"hexsha": "bf8e84e58351d7b97cb34230162628e5471e59e6", "size": 16557, "ext": "py", "lang": "Python", "max_stars_repo_path": "image_quantification/src/main/data_quantification_main.py", "max_stars_repo_name": "AltschulerWu-Lab/nsp_extension", "max_stars_repo_head_hexsha": "e656063c345ddd5d8bbec50cdb1dc779af2f719e", "max...
#!/usr/bin/env python3 import os import numpy as np import matplotlib.pyplot as plt def main(): plt.rcParams.update({"font.size": 6}) fig = plt.figure(constrained_layout=True, figsize=(80/25.4, 35/25.4)) gs = fig.add_gridspec(1, 3) axs = gs.subplots() for d in [0, 1, 2]: errors = np.l...
{"hexsha": "795cc410967f76b8f01969dd837c8df7d05c5a11", "size": 958, "ext": "py", "lang": "Python", "max_stars_repo_path": "figures/performance_error.py", "max_stars_repo_name": "stefaniaebli/paper-snn-neurips2020tda", "max_stars_repo_head_hexsha": "935658c9fa93897b4e288918e6e9c3fb0a0bee3e", "max_stars_repo_licenses": [...
""" Created on September 5th, 2018 @author: itailang """ # import system modules import os.path as osp import sys import argparse import numpy as np # add paths parent_dir = osp.dirname(osp.dirname(osp.dirname(osp.abspath(__file__)))) if parent_dir not in sys.path: sys.path.append(parent_dir) # import modules f...
{"hexsha": "51088d4482d38e28dd61cc657effc8e5f759ede8", "size": 6228, "ext": "py", "lang": "Python", "max_stars_repo_path": "reconstruction/autoencoder/evaluate_ae.py", "max_stars_repo_name": "Pandinosaurus/learning_to_sample", "max_stars_repo_head_hexsha": "99e977e1c53ec0fa8b2b8a5151a56d0d088f6f78", "max_stars_repo_lic...
/* Copyright (c) 2012, Julian Straub <jstraub@csail.mit.edu> * Licensed under the MIT license. See LICENSE.txt or * http://www.opensource.org/licenses/mit-license.php */ #pragma once #include "baseMeasure.hpp" #include "probabilityHelpers.hpp" #include <stddef.h> #include <stdint.h> #include <typeinfo> #include ...
{"hexsha": "4339a8fbbefce275dad1d7e8753791653c159eb1", "size": 4237, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/hdp_base.hpp", "max_stars_repo_name": "jstraub/bnp", "max_stars_repo_head_hexsha": "11cd28b49e9cf1db96f349181aff57a17672b6a4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12.0, "m...
# This source code is part of the Biotite package and is distributed # under the 3-Clause BSD License. Please see 'LICENSE.rst' for further # information. """ This module provides functionality for pseudoknot detection. """ __name__ = "biotite.structure" __author__ = "Tom David Müller" __all__ = ["pseudoknots"] impo...
{"hexsha": "6424449dba9bda91843dc8b189690c879853ec77", "size": 22943, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/biotite/structure/pseudoknots.py", "max_stars_repo_name": "danijoo/biotite", "max_stars_repo_head_hexsha": "22072e64676e4e917236eac8493eed4c6a22cc33", "max_stars_repo_licenses": ["BSD-3-Claus...
import pickle import ray # TODO: Add ray to dependencies. import tensorflow as tf import numpy as np from rllab.misc.overrides import overrides from rllab.misc import logger from . import tf_utils from .sampler import Sampler, rollout # TODO: Make the remote sampler correctly use the initial exploration policy, as ...
{"hexsha": "1aa9a2943bc163a8164c950c8f880c84a2451473", "size": 2664, "ext": "py", "lang": "Python", "max_stars_repo_path": "maci/misc/remote_sampler.py", "max_stars_repo_name": "bbrito/mapr2", "max_stars_repo_head_hexsha": "5aa1a4c85c28918d9f16e5544793bf5574d7c49e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...