text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
// Copyright 2021 Peter Dimov. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #include <boost/system.hpp> #include <boost/core/lightweight_test.hpp> #include <cerrno> namespace sys = boost::system; enum E { none = 0, einval = EINVAL }; namespace boost ...
{"hexsha": "e60bb7ab2e0f3acb0a8671f84d0c8e9d5c1dbed2", "size": 6826, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "console/src/boost_1_78_0/libs/system/test/ec_location_test2.cpp", "max_stars_repo_name": "vany152/FilesHash", "max_stars_repo_head_hexsha": "39f282807b7f1abc56dac389e8259ee3bb557a8d", "max_stars_rep...
using Pkg Pkg.activate(".") Pkg.instantiate() ## using DataFrames using CSV using Plots using StatsPlots using MCPhylo using ProgressMeter ## fpairs = CSV.read("../data/fpairs.txt", DataFrame, header=false)[:,1] ## theme(:solarized_light) # upscale = 1 #8x upscaling in resolution fntsm = Plots.font("sans-serif", po...
{"hexsha": "561a96d7a7112e87376da930eb56c52a6a23a577", "size": 7329, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "code/visualizePPP.jl", "max_stars_repo_name": "erathorn/phylogeneticTypology", "max_stars_repo_head_hexsha": "ba1fb23eed99b63708291bbbbdf49f1c2a3c1b07", "max_stars_repo_licenses": ["MIT"], "max_sta...
import numpy as np import torch def grad_norm(net): # returns the norm of the gradient corresponding to the convolutional parameters # count number of convolutional layers nconvnets = 0 for p in list(filter(lambda p: len(p.data.shape)>1, net.parameters())): nconvnets += 1 out_...
{"hexsha": "c4a6a5bd04c0b94858f0d263c2f62431cd03e34e", "size": 7758, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/proj_utils.py", "max_stars_repo_name": "MLI-lab/early_stopping_double_descent", "max_stars_repo_head_hexsha": "31caa8bb6a901a94f70f8100c5c274dd45b6a10a", "max_stars_repo_licenses": ["Apache-1...
# import os # import fnmatch # # filename = '/Users/yanzhexu/Google Drive/Marley Grant Data/CEDM pilot data-selected/benign' # # # for casefile in os.listdir(filename): # if casefile.startswith('.'): # continue # if casefile.startswith('..'): # continue # if fnmatch.fnmatch(casefile, '*Icon*...
{"hexsha": "22e6aee64305bccdffd82a668e5b5b2df80b92a7", "size": 8899, "ext": "py", "lang": "Python", "max_stars_repo_path": "testparser.py", "max_stars_repo_name": "joshlyman/ROIShapeAnalysis", "max_stars_repo_head_hexsha": "91e369096662eab9c065d319c0da5a567f272aaa", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
/- Copyright (c) 2018 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import algebra.big_operators.ring import data.real.pointwise import algebra.indicator_function import algebra.algebra.basic import algebra.order.module import algebra...
{"author": "nick-kuhn", "repo": "leantools", "sha": "567a98c031fffe3f270b7b8dea48389bc70d7abb", "save_path": "github-repos/lean/nick-kuhn-leantools", "path": "github-repos/lean/nick-kuhn-leantools/leantools-567a98c031fffe3f270b7b8dea48389bc70d7abb/src/data/real/nnreal.lean"}
/* -*- Mode: c++; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab: */ /* * Software License Agreement (BSD License) * * Copyright (c) 2014, Autonomous Intelligent Systems Group, Rheinische * Friedrich-Wilhelms-Universität Bonn * All rights r...
{"hexsha": "f8d3940cf5035cd6efb8b25e2c449e4c100dbef9", "size": 6790, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/openni_driver.cpp", "max_stars_repo_name": "AIS-Bonn/ros_openni2_multicam", "max_stars_repo_head_hexsha": "0bc4afe420fe619a84c8cd66c2e2cf8a73f10178", "max_stars_repo_licenses": ["BSD-3-Clause"],...
import numpy as np import matplotlib.pyplot as plt from IPython.display import display, Audio import librosa import torch from fastai.basics import ItemBase # Parent classes used to distinguish transforms for data augmentation and transforms to convert audio into image class MyDataAugmentation: pass class MySoun...
{"hexsha": "93be3e5cc0a9a57806bacd671c6e7afac068a481", "size": 2708, "ext": "py", "lang": "Python", "max_stars_repo_path": "fastai_audio/audio_clip.py", "max_stars_repo_name": "JoshVarty/AudioTagging", "max_stars_repo_head_hexsha": "d1d038a08e783c11839638e83c691b333317d832", "max_stars_repo_licenses": ["MIT"], "max_sta...
import torch import torch.nn as nn import torch.nn.functional as F import sys import numpy as np import scipy import copy import time import pickle import os import math import psutil import itertools import datetime import shutil from functions_utils import * def train_initialization(data_, params, args): al...
{"hexsha": "4735e4b6ce14fdbd5e7faaea47528c44fafb781e", "size": 10244, "ext": "py", "lang": "Python", "max_stars_repo_path": "training_utils.py", "max_stars_repo_name": "b-mu/kbfgs_neurips2020_public", "max_stars_repo_head_hexsha": "f9e8300211dee764e0a669d50a7176f83a28034a", "max_stars_repo_licenses": ["MIT"], "max_star...
# -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Jiasen Lu, Jianwei Yang, based on code from Ross Girshick # -------------------------------------------------------- from __future__ import absolute_import from __...
{"hexsha": "30d6d4625869c2b0cbaf7c3299d26c986678054a", "size": 14746, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_test.py", "max_stars_repo_name": "skkestrel/faster-rcnn.pytorch", "max_stars_repo_head_hexsha": "d131ff43440d1c0f0a58c553a2a5695b7a223821", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np import numpy.testing as npt import pytest @pytest.mark.usefixtures('nae_case') class TestDataset: @staticmethod def test_op(nae_case): b, ds = nae_case actual = ds.op(b) expect = ds.ys npt.assert_array_almost_equal(actual, expect) @staticmethod d...
{"hexsha": "759920498e30545bfd3e4bfc1c83153ef5e27434", "size": 495, "ext": "py", "lang": "Python", "max_stars_repo_path": "impute/tests/test_base.py", "max_stars_repo_name": "nimily/low-rank-impute", "max_stars_repo_head_hexsha": "0b2fb5c911a4b7505e61f9a7e412bcb11bf3e89a", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" Implementation of the class `OpenFOAMSimulation`. """ import os import numpy from scipy import signal from matplotlib import pyplot from ..simulation import Simulation from ..force import Force class OpenFOAMSimulation(Simulation): """ Contains info about a OpenFOAM simulation. Inherits from class Simula...
{"hexsha": "b63231746a493639f147c227c1045c852f08b263", "size": 14299, "ext": "py", "lang": "Python", "max_stars_repo_path": "external/snake-0.3/snake/openfoam/simulation.py", "max_stars_repo_name": "mesnardo/cuIBM", "max_stars_repo_head_hexsha": "0b63f86c58e93e62f9dc720c08510cc88b10dd04", "max_stars_repo_licenses": ["M...
from __future__ import print_function import numpy as np import Spectrum import csv import sys from scipy import signal from scipy import stats from scipy.ndimage.filters import median_filter import handythread import multiprocessing from functools import partial import dm3_lib as DM3 #from ncempy.io import dm import n...
{"hexsha": "30c5311c64605a32602bf8e71af255c3e3af8a3a", "size": 17656, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/SpectrumImage.py", "max_stars_repo_name": "shmouses/SpectrumImageAnalysisPy", "max_stars_repo_head_hexsha": "4374e604fb7b493ba84b9675041015b87084e07f", "max_stars_repo_licenses": ["BSD-3-Clau...
""" Utility functions for working with Jobman. """ import os import sys import yaml import numpy as np import itertools as it from keras.callbacks import EarlyStopping, ModelCheckpoint from adios.datasets import * from adios.callbacks import HammingLoss from adios.metrics import f1_measure from adios.metrics import ...
{"hexsha": "454800219881270a9a8de50cda5bd7eaeec74ce1", "size": 8900, "ext": "py", "lang": "Python", "max_stars_repo_path": "adios/utils/jobman.py", "max_stars_repo_name": "alshedivat/adios", "max_stars_repo_head_hexsha": "242a68fd1f929b150b5c4229beed90c8acb79530", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from django.shortcuts import render from keras.preprocessing import image import numpy as np import tensorflow as tf from keras.models import load_model import pickle global graph,model #initializing the graph graph = tf.get_default_graph() #loading our trained model print("Keras model loading.......") model = load...
{"hexsha": "5671e300c4f34d4b1c3dee71e50ac9397a480307", "size": 825, "ext": "py", "lang": "Python", "max_stars_repo_path": "food_ai/utils.py", "max_stars_repo_name": "risusanto/food-recognition-web", "max_stars_repo_head_hexsha": "1f4cea9edca8fabf4a300093abb4b8e090df3c22", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np import pandas as pd import pandas._testing as tm class TestSeriesSubclassing: def test_indexing_sliced(self): s = tm.SubclassedSeries([1, 2, 3, 4], index=list("abcd")) res = s.loc[["a", "b"]] exp = tm.SubclassedSeries([1, 2], index=list("ab")) tm.assert_series_e...
{"hexsha": "86330b7cc69937ddca6b4a69d3796dfe6f93618c", "size": 2084, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandas/tests/series/test_subclass.py", "max_stars_repo_name": "CJL89/pandas", "max_stars_repo_head_hexsha": "6210077d32a9e9675526ea896e6d1f9189629d4a", "max_stars_repo_licenses": ["BSD-3-Clause"],...
import shutil import numpy as np from sklearn.linear_model import LinearRegression import ujson as json import os.path as ops # import matplotlib.pyplot as plt import os from tools.generate_prediction_results import generate_prediction_result class LaneEval(object): lr = LinearRegression() pixel_thresh = 20...
{"hexsha": "6cf7802869e0355ed4cba32fa4e69a1debbf5a36", "size": 8960, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/tusimple_eval.py", "max_stars_repo_name": "Steve-Mr/lanenet-lane-detection", "max_stars_repo_head_hexsha": "1c539d29ca119cc92a837f5bb54a169c33a57860", "max_stars_repo_licenses": ["Apache-2.0...
'''Formats Biopython's Structure object as keras-compatable dataset.''' import numpy as np from package.dwt import DWT as DWT class BatchManager(): def __init__(self, data, wavelet_size=4, verbose=False): '''Manages a moving window over the dataset based on the given wavelet size. Paramet...
{"hexsha": "b67489b43996b87de4e0b6c595265dcb3503d0aa", "size": 8038, "ext": "py", "lang": "Python", "max_stars_repo_path": "JustinShaw/ECNN/package/batch_manager.py", "max_stars_repo_name": "rathsidd/Dynamical-Analysis", "max_stars_repo_head_hexsha": "ba9a0a48e0a7a145b943ad0f672e7b600af0bdff", "max_stars_repo_licenses"...
# -#!/usr/bin/env python # -*- encoding: utf-8 -*- # @Author : Ch # File : bias_module.py # @Time : 2021/6/3 10:20 import numpy as np import torch import torch.nn as nn from .utils import load_data class PenaltyModule(nn.Module): def __init__(self, cfg, statistics, penalty_type, fusion_weight): ...
{"hexsha": "74c1d8a86b42719338a07849af92de42e70827c1", "size": 13417, "ext": "py", "lang": "Python", "max_stars_repo_path": "maskrcnn_benchmark/modeling/roi_heads/relation_head/modules/bias_module.py", "max_stars_repo_name": "ChCh1999/RTPB", "max_stars_repo_head_hexsha": "1066a3bfe4fe1b41eff74fd152936880302a60a2", "max...
import argparse import sys from copy import deepcopy import logging from pathlib import Path import pandas as pd from syntaxgym import utils from syntaxgym.suite import Sentence, Region, Suite from syntaxgym.agg_surprisals import * from syntaxgym import _load_suite import json import numpy as np parser = argparse.Arg...
{"hexsha": "b2cab5d9b5597ac47f83a8db5b1c47d44c297f38", "size": 2320, "ext": "py", "lang": "Python", "max_stars_repo_path": "score.py", "max_stars_repo_name": "pqian11/sg-eval", "max_stars_repo_head_hexsha": "b4013bd1c9b9a33e6a904308a811fa2c4dffd9d7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta...
[STATEMENT] lemma properL_notEmp[simp]: "properL cl \<Longrightarrow> cl \<noteq> []" [PROOF STATE] proof (prove) goal (1 subgoal): 1. properL cl \<Longrightarrow> cl \<noteq> [] [PROOF STEP] unfolding properL_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. cl \<noteq> [] \<and> (\<forall>c\<in>set cl. proper c)...
{"llama_tokens": 147, "file": "Probabilistic_Noninterference_Language_Semantics", "length": 2}
#!/usr/bin/env python import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator, FormatStrFormatter font = {'family' : 'Times New Roman' , 'weight' : 'normal' , 'size' : '25'} plt.rc('font',**font) plt.figure(figsize=(16,8)) data=np.loadtxt('rixs.da...
{"hexsha": "b29221565775df9c6834a2f9beb7c7e15828a68a", "size": 2680, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/more/RIXS/Ba2YOsO6/t2g_single_atom/plot_rixs_map.py", "max_stars_repo_name": "danielballan/edrixs", "max_stars_repo_head_hexsha": "57fbd11ba9aaeaa393c3e2f06af41e4e386749e4", "max_stars_re...
#!/usr/bin/env python """ Some visualization utilities. """ import os import numpy as np from matplotlib import pyplot as plt import mpl_toolkits.mplot3d as mplt import scipy import point_cloud def plot_mesh(mesh, filepath = ''): """ Plot a mesh. :param mesh: mesh to plot :type mesh: mesh.Mesh :p...
{"hexsha": "c1f5425ce898265cfb3429650137a9f3d900800b", "size": 14784, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/lib/visualization.py", "max_stars_repo_name": "davidstutz/daml-shape-completion", "max_stars_repo_head_hexsha": "d0d1d1c26ba547d02c4102077aeb0a1ea46c4e50", "max_stars_repo_licenses": ["Unlic...
\documentclass[fleqn]{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath} \usepackage[colorlinks=true]{hyperref} \usepackage{tikz} \usetikzlibrary{calc,patterns,angles,quotes} \begin{document} \begin{center} {\bfseries Solution to assignment \#2}\\ Introduction to GR, 2020 Fall\\ International Centr...
{"hexsha": "6a69e90296a8be5d3ef67068ce65f70623b1d901", "size": 7108, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sol-assignment-2/Solution_assignment_2_icts_igr_2020_fall.tex", "max_stars_repo_name": "mdarifshaikh/GR-Fall-2020-ICTS", "max_stars_repo_head_hexsha": "4b651c965b58d899a98f6ebe838a6bc30c3c37ef", "ma...
integer:: NN = 4, u integer:: A1 = 0 integer(len=NN):: Data do u = 0, NN Data(u) = u * 9 A1 = A1 + Data(u) print *, "Data[", u, "]=", Data(u) end do print *, "A1=", A1
{"hexsha": "c5311730de0410069aaef37a21fc9fcb5fe23af7", "size": 170, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Auto-generated-tasks/Difficulty-1/Task-1/Solution.f90", "max_stars_repo_name": "Alexxx180/EasyTasks", "max_stars_repo_head_hexsha": "3661e062f0dc48e10d463816c4ab725d1eec6cc7", "max_stars_repo_lic...
import pickle import os from time import time from sklearn import svm from sklearn.metrics import accuracy_score from sklearn.grid_search import GridSearchCV from sklearn.datasets import fetch_mldata from sklearn import cross_validation from sklearn.neighbors import KNeighborsClassifier from scipy import ndimage import...
{"hexsha": "a4dbb96c6bec5dc43fdffecce2a4ce8241f6b156", "size": 3010, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/digit_recognition.py", "max_stars_repo_name": "abhishekstha98/HandW-Recog", "max_stars_repo_head_hexsha": "419516810346376cb73095a45d1b47c95268a8bb", "max_stars_repo_licenses": ["Apache-2.0...
import argparse import os import sys parser = argparse.ArgumentParser() parser.add_argument('--lr', type=float, default=2.5e-4) parser.add_argument('--eps', type=float, default=1e-5) parser.add_argument('--gpu', type=int, default=0) parser.add_argument('--epochs', type=int, default=5) parser.add_argument('--batch_siz...
{"hexsha": "538767ae1339c742663e926ce9bc2abb667c6adf", "size": 5873, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl/breakout.py", "max_stars_repo_name": "bcrafton/icsrl-deep-learning", "max_stars_repo_head_hexsha": "e3616982d1dda5f978d61d6591c91cb0da76ab02", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from attrbench.suite import SuiteResult from attrbench.metrics import Metric from attrbench.lib import AttributionWriter from tqdm import tqdm import torch from torch.utils.data import DataLoader import numpy as np from os import path from typing import Dict, Callable import logging class Suite: """ Represent...
{"hexsha": "7688b6f973fa875b0fc7ad580ee4e0beecfb5529", "size": 7327, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/attrbench/suite/suite.py", "max_stars_repo_name": "zoeparman/benchmark", "max_stars_repo_head_hexsha": "96331b7fa0db84f5f422b52cae2211b41bbd15ce", "max_stars_repo_licenses": ["MIT"], "max_star...
// Copyright Takatoshi Kondo 2016 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #if !defined(MQTT_NULL_STRAND_HPP) #define MQTT_NULL_STRAND_HPP #include <boost/asio.hpp> #include <mqtt/utility.hpp> names...
{"hexsha": "eaf21d3ea5c2a3ad085483134eb84f7798893e54", "size": 824, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/mqtt/null_strand.hpp", "max_stars_repo_name": "airmap/mqtt_client_cpp", "max_stars_repo_head_hexsha": "778e386010eb605e0637d7272e5a193c2e6b28d6", "max_stars_repo_licenses": ["BSL-1.0"], "max_...
from sstcam_sandbox import get_data, get_plot from CHECLabPy.plotting.setup import Plotter import pickle import pandas as pd from matplotlib.ticker import FuncFormatter import datetime import numpy as np from matplotlib import pyplot as plt from IPython import embed class Timeseries(Plotter): def plot(self, x, y)...
{"hexsha": "a002508b067324bb45ebb80b895fa8cf304cad35", "size": 2210, "ext": "py", "lang": "Python", "max_stars_repo_path": "sstcam_sandbox/d200122_pointing/open_pkl.py", "max_stars_repo_name": "watsonjj/CHECLabPySB", "max_stars_repo_head_hexsha": "91330d3a6f510a392f635bd7f4abd2f77871322c", "max_stars_repo_licenses": ["...
\subsection{Electroweak theory} \label{ewktheory} The electroweak interaction is the unified description of two of the four known fundamental interactions of nature: electromagnetism and the weak interaction. It is based on the gauge group $SU(2)_{L} \times SU(1)_{Y}$, in which $L$ is the left-handed fields and $Y$ is ...
{"hexsha": "be06c17e2543e5e002ea72d75e4b71002357e87e", "size": 4216, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/Theory/ewktheory.tex", "max_stars_repo_name": "zhuhel/PhDthesis", "max_stars_repo_head_hexsha": "55ec32affb5c105143798989d78043467c88da8e", "max_stars_repo_licenses": ["LPPL-1.3c"], "max_st...
''' Author: Liu Xin Date: 2021-11-13 19:11:06 LastEditors: Liu Xin LastEditTime: 2021-11-25 15:44:12 Description: 静态工具库 FilePath: /CVMI_Sementic_Segmentation/utils/static_common_utils.py ''' import os import random import numpy as np import torch import torch.backends.cudnn as cudnn import warnings from socket import g...
{"hexsha": "44be7e179d9f24df461429aeb0c1ef7aff9ab585", "size": 3060, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/static_common_utils.py", "max_stars_repo_name": "UESTC-Liuxin/CVMI_Sementic_Segmentation", "max_stars_repo_head_hexsha": "dc5bf6e940cf6961ef65abb6e7ec372f29d55249", "max_stars_repo_licenses"...
####################################################################### # print to stderr, since that is where Pkg prints its messages eprintln(x...) = println(STDERR, x...) # creating `GeoEfficiency` folder at the home directory. println("INFO: Creating 'GeoEfficiency' folder at '$(homedir())'.....") try cp(joinpa...
{"hexsha": "447c97bf6c48f2765f41fdb6bd4dfabd2797f08a", "size": 569, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "deps/build.jl", "max_stars_repo_name": "JuliaPackageMirrors/GeoEfficiency.jl", "max_stars_repo_head_hexsha": "d41245477df85153aab7103cf9b6e118d23e43e3", "max_stars_repo_licenses": ["MIT"], "max_star...
import sys, re, time, string import numpy; import scipy; import scipy.special; import nltk; from inferencer import compute_dirichlet_expectation; from inferencer import Inferencer; class Hybrid(Inferencer): def __init__(self, hash_oov_words=False, number_of_samples=10, ...
{"hexsha": "c1ef9455ce7a81c3e9f70bb0d1fede736243cc86", "size": 4946, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/fixvoc/hybrid.py", "max_stars_repo_name": "kzhai/InfVocLDA", "max_stars_repo_head_hexsha": "05a87890d613b07f7b0c2d2bb6c79aad39e2f75d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
# LibFTD2XX.jl - High Level Module # # By Reuben Hill 2019, Gowerlabs Ltd, reuben@gowerlabs.co.uk # # Copyright (c) Gowerlabs Ltd. # # This module contains methods and functions for interacting with D2XX devices. # It calls functions from the submodule `Wrapper` which in turn call Functions # from the FT D2XX library. ...
{"hexsha": "b9734c92b944ac50ef5457538b29e85aaabcc548", "size": 23653, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/LibFTD2XX.jl", "max_stars_repo_name": "anders-jakobsson/LibFTD2XX.jl", "max_stars_repo_head_hexsha": "b6151ad1b147c596b6d92a06179e685a6a8e6266", "max_stars_repo_licenses": ["MIT"], "max_stars_...
clear; t0=0.01; tf=0.05; b0=[1.2 2.2 1.8]; [t,b]=ode45('dfun2',[t0, tf],b0); plot(b(:,1),b(:,2)); hold on xlabel('x1'); ylabel('x2');
{"author": "sfvsfv", "repo": "Mathematical-modeling", "sha": "cef1a3688246851f067777b3599b1b3831d3d948", "save_path": "github-repos/MATLAB/sfvsfv-Mathematical-modeling", "path": "github-repos/MATLAB/sfvsfv-Mathematical-modeling/Mathematical-modeling-cef1a3688246851f067777b3599b1b3831d3d948/\u7f8e\u8d5bA\u9898\u5e38\u89...
import pycqed as pq import matplotlib.pyplot as plt import os from pycqed.analysis import measurement_analysis as ma from numpy.testing import assert_almost_equal class TestSSRODiscriminationAnalysis: @classmethod def setup_class(cls): cls.datadir = os.path.join(pq.__path__[0], 'tests', 'test_data') ...
{"hexsha": "bb8a71d85c8a875f95b9f9193dd879867146ebf8", "size": 1317, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycqed/tests/test_butterfly_analysis.py", "max_stars_repo_name": "nuttamas/PycQED_py3", "max_stars_repo_head_hexsha": "1ee35c7428d36ed42ba4afb5d4bda98140b2283e", "max_stars_repo_licenses": ["MIT"]...
/- Copyright (c) 2022 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import combinatorics.simple_graph.connectivity /-! # Acyclic graphs and trees > THIS FILE IS SYNCHRONIZED WITH MATHLIB4. > Any changes to this file require a correspondin...
{"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/src/combinatorics/simple_graph/acyclic.lean"}
//============================================================================== // Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // Se...
{"hexsha": "0ad6e8f1ddaf9074210461045e4733f87e1fcbbc", "size": 1320, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "modules/boost/simd/arithmetic/include/boost/simd/toolbox/arithmetic/functions/simd/common/fma.hpp", "max_stars_repo_name": "timblechmann/nt2", "max_stars_repo_head_hexsha": "6c71f7063ca4e5975c9c0198...
import time import graphs.graph_utils as graph_utils import numpy as np import processing.processing_utils as processing from nltk.tag import pos_tag def generate_summary_dutta(text_as_sentences_without_footnotes, summary_size, threshold=0.05): start_time = time.time() sentences = sentences_for_dutta(text_as_...
{"hexsha": "d489f98d8148b81329a470d3ae32f59d405ab97e", "size": 4485, "ext": "py", "lang": "Python", "max_stars_repo_path": "thesis-project/graphs/dutta.py", "max_stars_repo_name": "AvramPop/bachelor-thesis", "max_stars_repo_head_hexsha": "b0f5f9d349b53e79acd7cc10140e551112e672a0", "max_stars_repo_licenses": ["MIT"], "m...
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import collections import copy import dotdict import json import numpy as np import os import random import regex import tempfile import torch import torch.nn as nn from glob import glob from chinese_converter import to_traditional, to_simplified from ...
{"hexsha": "7ee56436ee0bdaca9868713e47647df6fec4dc33", "size": 8944, "ext": "py", "lang": "Python", "max_stars_repo_path": "align/train.py", "max_stars_repo_name": "facebookresearch/bitext-lexind", "max_stars_repo_head_hexsha": "e4999cd08a977572e476b0a8c1381520ba02a443", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np from utils import get_features_fewshot_full_library import os, random import torch import torch.nn as nn import argparse model_names = ['resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152', 'densenet121', 'densenet161', 'densenet169', 'densenet201'] parser = argparse.Argument...
{"hexsha": "3896dc2a9d4f246634db176b5ecf68f5232266e7", "size": 6541, "ext": "py", "lang": "Python", "max_stars_repo_path": "classifier_ensemble_old.py", "max_stars_repo_name": "arjish/PreTrainedFullLibrary_FewShot", "max_stars_repo_head_hexsha": "c52d3374e5e1d5fe20f428cc2f599cb4b36847ef", "max_stars_repo_licenses": ["M...
import numpy as np from sklearn.base import BaseEstimator from sklearn.model_selection import GridSearchCV from common_functions.rolling_windows_validation import rolling_windows_validation class custom_gridsearch_cv(BaseEstimator): def __init__(self, STRATEGY_SELECTED): self.STRATEGY_SELECTED = STRATEGY...
{"hexsha": "b06903cf45a1e93d7b970c61edf37b02cc97b1da", "size": 4402, "ext": "py", "lang": "Python", "max_stars_repo_path": "pipoh/concrete_factories/gscv_folder/gscv_configuration.py", "max_stars_repo_name": "faprieto96/pyInvestment", "max_stars_repo_head_hexsha": "a5c1bdb7823df0df215c3ac55dc8427fd18b2e15", "max_stars_...
// Copyright 2017 Rodeo FX. All rights reserved. #include "mtoaScene.h" #include <link.h> #include <boost/foreach.hpp> // Returns true if str ends with ending inline bool endsWith(const std::string& str, const std::string& ending) { if (ending.size() > str.size()) { return false; } return std:...
{"hexsha": "425edd905c6c7120facab5b755dda8aca7a07171", "size": 4004, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "walter/maya/walterMtoaConnection/mtoaScene.cpp", "max_stars_repo_name": "all-in-one-of/OpenWalter", "max_stars_repo_head_hexsha": "c2034f7fac20b36ffe3e500c01d40b87e84e2b97", "max_stars_repo_licenses...
from typing import Callable, Optional, Tuple, Union import numpy as np import pandas as pd from utipy.utils.messenger import Messenger, check_messenger def print_nan_stats( x: Union[np.ndarray, pd.DataFrame], message: str, messenger: Optional[Callable] = Messenger( verbose=True,...
{"hexsha": "b2358cb81a24c84bdb30165148fabeb10b45b46a", "size": 1767, "ext": "py", "lang": "Python", "max_stars_repo_path": "utipy/array/nan_stats.py", "max_stars_repo_name": "LudvigOlsen/utipy", "max_stars_repo_head_hexsha": "c287f7eed15b3591118bba49ecdfc2b2605f59a0", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import pandas as pd import numpy as np #TODO remove *, at least use the name of the module from zucaml.util import * import zucaml.util as mlutil def create_reset(df, item, time_ref, order): if order is None: order = [True, True] df = df.sort_values([item, time_ref], ascending = order) ...
{"hexsha": "2392b7cc820dfea952b85d7903bedba80e85fbf8", "size": 5516, "ext": "py", "lang": "Python", "max_stars_repo_path": "zucaml/feature_engineering.py", "max_stars_repo_name": "GustavoBMG/earthquake-prediction", "max_stars_repo_head_hexsha": "a3278bb22385c78013269356990a60d60aba50f1", "max_stars_repo_licenses": ["MI...
#!/usr/bin/env python """ ml_fits.py Basic code for building models in scikit-learn and xgboost For intermediate-level code, see ml_fits2.py """ import argparse import numpy as np import pandas as pd import seaborn as sns import warnings from sklearn.metrics import accuracy_score, mean_absolute_error from sklearn.m...
{"hexsha": "879eac13b6c13afab975570a37678e8048edefc8", "size": 2720, "ext": "py", "lang": "Python", "max_stars_repo_path": "machine-learning/ml_fits.py", "max_stars_repo_name": "nathanielng/python-snippets", "max_stars_repo_head_hexsha": "d310f074acc1ea7fdb41b2db3ab69406b96a18ca", "max_stars_repo_licenses": ["MIT"], "m...
import numpy as np import sys sys.path.append(".") from ai.action.movement.movements.basic import * from ai.action.movement.movements import sit import ai.actionplanner def main(mars, times=3, lookaround=True): sit.main(mars) ai.actionplanner.ActionPlanner.sleep(0.2) treading(mars, times, looka...
{"hexsha": "dd914d1d12ad75549d9cc9238359c94fcac4d5f9", "size": 7686, "ext": "py", "lang": "Python", "max_stars_repo_path": "ai/action/movement/movements/treading.py", "max_stars_repo_name": "elephantrobotics-joey/marsai", "max_stars_repo_head_hexsha": "d7cc2a807727dddb615b2a1640dba5f9656f1da0", "max_stars_repo_licenses...
''' Created on 24 Feb 2014 @author: maxz ''' import numpy as np from ..util.pca import PCA def initialize_latent(init, input_dim, Y): Xr = np.asfortranarray(np.random.normal(0, 1, (Y.shape[0], input_dim))) if 'PCA' in init: p = PCA(Y) PC = p.project(Y, min(input_dim, Y.shape[1])) Xr[:...
{"hexsha": "1e19a3216e0ece17dcd3be1189d799782f2ad022", "size": 874, "ext": "py", "lang": "Python", "max_stars_repo_path": "GPy/util/initialization.py", "max_stars_repo_name": "ekalosak/GPy", "max_stars_repo_head_hexsha": "ff82f12c3d321bfc3ce6615447fad25aea9de6bd", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
# -*- coding: utf-8 -*- from numpy import * from gridworld import GridworldEnv from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('-alg', dest='alg', default='q', type=str) # q for q-learn, s for sarsa(λ) parser.add_argument('-size', dest='size', default=5, type=int) ...
{"hexsha": "1699c1f31d6386ddb12850ce0a70ed27005956e1", "size": 3383, "ext": "py", "lang": "Python", "max_stars_repo_path": "PA4/train.py", "max_stars_repo_name": "xueguangl23/Machine_Learning_Coursework", "max_stars_repo_head_hexsha": "fa164ff330f24150e3c788ad653d6563bdda7e58", "max_stars_repo_licenses": ["Apache-2.0"]...
### A Pluto.jl notebook ### # v0.12.18 using Markdown using InteractiveUtils # This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). macro bind(def, element) quote lo...
{"hexsha": "ddf26f7f492b6d42894fe2f1a67ee32f9954a312", "size": 2886, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/searchmnist.jl", "max_stars_repo_name": "sadit/NeighborhoodApproximationIndex.jl", "max_stars_repo_head_hexsha": "ce8a1c1df370e204a4ab4dc6f8fec54512f3ef7e", "max_stars_repo_licenses": ["MI...
import numpy as np import torch import tqdm from torch import nn class MyLayerNormNoAffine(nn.Module): def __init__(self, normalized_shape, eps=1e-5): super().__init__() self.normalized_shape = normalized_shape self.eps = eps def forward(self, x): assert len(x.shape) == 4 ...
{"hexsha": "e3c16eb28423ac0ce2909d7d0868e4708a1b4ada", "size": 2352, "ext": "py", "lang": "Python", "max_stars_repo_path": "dl_norms/layer_norm.py", "max_stars_repo_name": "dniku/dl-norms", "max_stars_repo_head_hexsha": "0f1eef942bd318ac988ec7dfa9caea300d17e82a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
#include <iostream> #include <Eigen/Core> #include "celerite/solver/direct.h" #include "celerite/solver/cholesky.h" #define DO_TEST(NAME, VAR1, VAR2) \ { \ double base, comp, delta; \ base = VAR1...
{"hexsha": "ad05da339aa94803103e4cc41eedc1647addfe90", "size": 4082, "ext": "cc", "lang": "C++", "max_stars_repo_path": "cpp/src/test_solvers.cc", "max_stars_repo_name": "dfm/ess", "max_stars_repo_head_hexsha": "09ee14e516bb3bc3b517c0c1b6716eaeb28183b1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 172.0, "ma...
using OrdinaryDiffEq, DiffEqDevTools, ParameterizedFunctions, Plots, ODE, ODEInterfaceDiffEq, LSODA, Sundials gr() #gr(fmt=:png) using LinearAlgebra f = @ode_def Orego begin dy1 = p1*(y2+y1*(1-p2*y1-y2)) dy2 = (y3-(1+y1)*y2)/p1 dy3 = p3*(y1-y3) end p1 p2 p3 p = [77.27,8.375e-6,0.161] prob = ODEProblem(f,[1.0,2...
{"hexsha": "42ab6db3c69eb14ef5e450f83df1a745bc904511", "size": 6445, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "script/StiffODE/Orego.jl", "max_stars_repo_name": "SciML/SciMLBenchmarksOutput", "max_stars_repo_head_hexsha": "6e81c96f646ee1310f9c18f8c051a281bd8095dd", "max_stars_repo_licenses": ["MIT"], "max_s...
import torch import numpy from pathlib import Path from torchvision import datasets, models, transforms import torch.nn as nn import torchvision import numpy as np import matplotlib.pyplot as plt # from tools.plotcm import plot_confusion_matrix # from sklearn.metrics import confusion_matrix from tqdm import tqdm import...
{"hexsha": "6bd308f12328545f0f3d16625f3664108d103980", "size": 1932, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "JerryJack121/Automatic-optical-defect-detection", "max_stars_repo_head_hexsha": "d620649dfaba5b9a03c9c53caf628704b151d609", "max_stars_repo_licenses": ["MIT"], "m...
""" ai-utilities - machine_learning/label_rank.py Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. """ import numpy as np import pandas as pd def score_rank(scores): """ Add Rank to Series :param scores: Series to Rank :return: Ranked Series """ retur...
{"hexsha": "d176bf66ebfa22f0b2a33ebdc7aead60c40f1e05", "size": 1032, "ext": "py", "lang": "Python", "max_stars_repo_path": "azure_utils/machine_learning/label_rank.py", "max_stars_repo_name": "Bhaskers-Blu-Org2/ai-utilities", "max_stars_repo_head_hexsha": "b6c097dddff00ae4f7321da52653d9d6d8a94884", "max_stars_repo_lice...
// __BEGIN_LICENSE__ // Copyright (c) 2009-2013, United States Government as represented by the // Administrator of the National Aeronautics and Space Administration. All // rights reserved. // // The NGT platform is licensed under the Apache License, Version 2.0 (the // "License"); you may not use this file excep...
{"hexsha": "bec549df581c15b01f57cde178766cbdf74bddf1", "size": 27586, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/asp/Core/LocalAlignment.cc", "max_stars_repo_name": "Site-Command/StereoPipeline", "max_stars_repo_head_hexsha": "d6ff7ab9aebe625eb2f97f386eb681050480f312", "max_stars_repo_licenses": ["Apache-2...
############### # Repository: https://github.com/lgervasoni/urbansprawl # MIT License ############### import osmnx as ox import pandas as pd import geopandas as gpd import numpy as np from .tags import height_tags from ..settings import storage_folder # Format for load/save the geo-data ['geojson','shp'] geo_format...
{"hexsha": "031d86401010ca9cc67a6538821881ca06d14319", "size": 8009, "ext": "py", "lang": "Python", "max_stars_repo_path": "urbansprawl/osm/utils.py", "max_stars_repo_name": "Oslandia/urbansprawl", "max_stars_repo_head_hexsha": "afbc1da6ce640569571d26900a2cc97a063fb0a9", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np import itertools import pandas as pd from sklearn.decomposition import FastICA from sklearn import linear_model from scipy.optimize import linear_sum_assignment from graphviz import Digraph import scipy.stats as stats from tqdm import tqdm """ Input: X: shape (n_samples, n_variables) ...
{"hexsha": "d2c85c6d482d938e1b90f82dfcc1861867b7d181", "size": 18101, "ext": "py", "lang": "Python", "max_stars_repo_path": "lingam_fast.py", "max_stars_repo_name": "MorinibuTakeshi/LiNGAM-fast", "max_stars_repo_head_hexsha": "404204fbafcef7f1deb6bcdcb9bedc50d8a74594", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import pickle import os import sys import pathlib import numpy as np from torch import optim from torch.utils.data import DataLoader import torch from torch.nn.utils import clip_grad_norm_ from tqdm import tqdm from tensorboardX import SummaryWriter abs_path = pathlib.Path(__file__).parent.absolute() sys.path.append(...
{"hexsha": "7cf6ec8b1a7f3043d18dc0b6ddabb02774287682", "size": 6258, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/train.py", "max_stars_repo_name": "leon2milan/pytorchPGN", "max_stars_repo_head_hexsha": "4f43afef5b97709060063cb547c658e23b42e552", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
module UniDerivative """ Compute derivative of a univariate function. """ abstract type DerivativeMethod end struct CentralDiff <: DerivativeMethod h CentralDiff(h = cbrt(eps())) = new(h) end function df(param::CentralDiff, f, x::Real)::Real (f(x + param.h / 2) - f(x - param.h / 2)) / param.h end struct...
{"hexsha": "f94d496dc91791dfa83137c3bb4761a37fd91031", "size": 508, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/UniDerivative.jl", "max_stars_repo_name": "gshaikov/Algopt.jl", "max_stars_repo_head_hexsha": "0fced0ae1963b68cf1c6118ab03e6eb6ccc0e6c2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import os import random import numpy as np import torch from config import LEARNING_RATE from torch.utils.tensorboard import SummaryWriter checkpoint_dir = 'models' GAMMA = 0.95 use_cuda = torch.cuda.is_available() class DQN: def __init__(self, model_name, replay_memory, target=False): self.online_network...
{"hexsha": "2372799a96c1c4cd5ad4baefd6287c834161b20f", "size": 5964, "ext": "py", "lang": "Python", "max_stars_repo_path": "dqn.py", "max_stars_repo_name": "andy920262/Reinforcement-Learning-for-Self-Driving-Cars", "max_stars_repo_head_hexsha": "d6bd3571101c829eb7082a96305c355eb09eebcc", "max_stars_repo_licenses": ["Ap...
/** * Author: Junjie Shi, Ardalan Naseri * * This file is responsible for inferring the relationship between a pair of individuals. * */ #include <algorithm> #include <iostream> #include <unordered_set> #include <boost/functional/hash.hpp> #include "parser.hpp" #include "mapper.hpp" #include "classifier.hpp" /...
{"hexsha": "5a18f98cf1d044778f8b286647f6a6902ff3c856", "size": 3577, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "classifier.cpp", "max_stars_repo_name": "ZhiGroup/RAFFI", "max_stars_repo_head_hexsha": "e6b89602b6b898e82ec9f9ebc27074182606c724", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4.0, "max_s...
import matplotlib matplotlib.use('agg') import sys import random import gc sys.path = ['../'] + sys.path from deepmass import map_functions as mf from deepmass import cnn_keras as cnn import numpy as np import time import os from scipy.stats import pearsonr import script_functions print(os.getcwd()) rescale_fa...
{"hexsha": "cbf1f5a8ddc65acd59e645ee8fa465aa80a72bc2", "size": 5621, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_scripts/test_wiener_prototype.py", "max_stars_repo_name": "david-w-a/DeepMass", "max_stars_repo_head_hexsha": "c33a3a6ac108c2b13f4f45d45c721229184d04fe", "max_stars_repo_licenses": ["MIT"], "m...
""" Copyright 2013 Steven Diamond, Eric Chu This file is part of CVXPY. CVXPY is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. CVXPY is dis...
{"hexsha": "6ebba89b7b3c9b5aa46b3e33a97a406923df9423", "size": 3474, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tools/ecos/cvxpy/cvxpy/constraints/nonlinear.py", "max_stars_repo_name": "riadnassiffe/Simulator", "max_stars_repo_head_hexsha": "7d9ff09f26367d3714e3d10be3dd4a9817b8ed6b", "max_stars_repo_lic...
using PyPlot, PrintFig x = linspace(0,2pi,100); fig = plt.figure(); plot(x,sin(x),color="red"); title("Test plot"); xlabel(L"$x$"); ylabel(L"$\sin(x)$"); printfig(fig) # Saves to file "FIG1.tex" printfig(fig,filename="test.tex") # Saves to file "test.tex"
{"hexsha": "503b1399869964b204348cbf80a6a288038bd923", "size": 256, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/basic.jl", "max_stars_repo_name": "1oly/PrintFig.jl", "max_stars_repo_head_hexsha": "de453e951d511cbc94aad7bf09c1a538b801ffa2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_st...
# Copyright 2021 Konstantin Herb, Pol Welter. 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 ap...
{"hexsha": "2501a5abe58868bb9d5427c7e78c21cb1af6fa69", "size": 11720, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/pyparament/parament/parament.py", "max_stars_repo_name": "parament-integrator/parament", "max_stars_repo_head_hexsha": "2e871824ac40499cec69e516bf90be590dfde0ab", "max_stars_repo_licen...
module SimpleTrees using ..Factories: Inference,Argument,Parameter,FunctionFactory,TypeFactory using ..Factories: addfields!,addparams!,addargs!,addwhereparams!,extendbody! using ..Factories: MixEscaped,Escaped,UnEscaped,rawexpr using ..TypeTraits: efficientoperations export simpletreedepth,simpletreewidth export Abs...
{"hexsha": "fb507dc2d49f3f0f056bb04687fc9600858cf383", "size": 17664, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Prerequisites/SimpleTrees.jl", "max_stars_repo_name": "JuliaTagBot/QuantumLattices.jl", "max_stars_repo_head_hexsha": "fcaedf19ecf783ea3cd0af611595d0d961e3b509", "max_stars_repo_licenses": ["A...
import numpy as np from copy import copy from .util import interpret_array class _AnyDensity(object): # make Proposal and Density have the same __init__ def __init__(self, ndim, is_symmetric=False): self.ndim = ndim self.is_symmetric = is_symmetric class Proposal(_AnyDensity): def prop...
{"hexsha": "2c78d3c1e3445b45c8245e1eb06b7292fe157558", "size": 3637, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/hepmc/core/density.py", "max_stars_repo_name": "mathisgerdes/monte-carlo-integration", "max_stars_repo_head_hexsha": "533d13eeb538fec46f8d5ed00e780153b68ba7d9", "max_stars_repo_licenses": ["MI...
# -*- coding: utf-8 -*- """ This script that provides basic plotting functionality for PhoREAL Copyright 2019 Applied Research Laboratories, University of Texas at Austin This package is free software; the copyright holder gives unlimited permission to copy and/or distribute, with or without modification, as long as ...
{"hexsha": "fe6c360e18d5ec243b41cd6e5975a525139ed03f", "size": 41673, "ext": "py", "lang": "Python", "max_stars_repo_path": "PhoREAL/source_code/icesatPlot.py", "max_stars_repo_name": "aboestpetersen/icesat2_canopy_heights", "max_stars_repo_head_hexsha": "556078d72036f18d00e645fb731ecca53320aa58", "max_stars_repo_licen...
import numpy as np from torch import Tensor from train_utils import training_step, model_validation def test_train_step(module_dict): model = module_dict["model"] optimizer = module_dict["optimizer"] criterion = module_dict["criterion"] train_dataloader = module_dict["train_dataloader"] for ba...
{"hexsha": "a15c4e651ef15f05addd613512049846baad412d", "size": 779, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/train_utils/test_train_val_steps.py", "max_stars_repo_name": "mintusf/land_cover_segmentation", "max_stars_repo_head_hexsha": "6e136c076d50aa6a85b9628e5cdcbedcf0dd9836", "max_stars_repo_licen...
from init import * from sinc_fun import stability_inc_linear, stability_inc_log, stability_inc_exp import numpy as np def get_r(RI, ISI): start_stability = 5 r = np.exp(np.log(0.9) * ISI / start_stability) return r * np.exp(np.log(0.9) * RI / (start_stability * stability_inc_linear(start_stability, r))) +...
{"hexsha": "a92060918034fdac26b5ae13ea1c11602a03cd4f", "size": 777, "ext": "py", "lang": "Python", "max_stars_repo_path": "Analysis/optISI.py", "max_stars_repo_name": "L-M-Sherlock/space_repetition_simulators", "max_stars_repo_head_hexsha": "66dbc5fc23db70c86e0ca9d4b80fc00b1df78ab1", "max_stars_repo_licenses": ["MIT"],...
dyn.load('/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib') library(rJava) setwd("/Users/mengmengjiang/all datas/chap4") library(xlsx) #读取数据 q2 <- read.xlsx("f_eject_2.xls", sheetName = "single_k2", header = TRUE) q3 <- read.xlsx("f_eject_2.xls", sheetName = "single_k3", he...
{"hexsha": "cb8e7203c629ff734017b8001d6ae1c692cc671d", "size": 8795, "ext": "r", "lang": "R", "max_stars_repo_path": "thesis/chap4/fig4-10.r", "max_stars_repo_name": "shuaimeng/r", "max_stars_repo_head_hexsha": "94fa0cce89c89a847b95000f07e64a0feac1eabe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
# Copyright (c) 2016 The UUV Simulator 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 b...
{"hexsha": "c2cf8cdec88f8f2fae6d25af3d5e2c25b97cafb5", "size": 1251, "ext": "py", "lang": "Python", "max_stars_repo_path": "uuv_simulator/uuv_evaluation/src/bag_evaluation/metrics/mean_abs_thrust.py", "max_stars_repo_name": "laughlinbarker/underice_ekf", "max_stars_repo_head_hexsha": "d74a83b2d02cef986fc904cf588a408382...
#include <boost/units/is_unit_of_system.hpp>
{"hexsha": "accfec373740d8ff132709f7ba4b8faa37c179de", "size": 45, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_units_is_unit_of_system.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1...
############################################################################### # plot_maptwohz.py: make a plot of 2nd scale height vs. first scale height ############################################################################### import sys import pickle import numpy import matplotlib matplotlib.use('Agg') from ga...
{"hexsha": "bfdf77f10ac54ae11125772564389f4a62025b9c", "size": 2093, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/plot_maptwohz.py", "max_stars_repo_name": "jobovy/apogee-maps", "max_stars_repo_head_hexsha": "0316e95bdf9b85f3f4b758e8e67dc197d228288f", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
[STATEMENT] lemma Macaulay_list_distinct_lt: assumes "x \<in> set (Macaulay_list ps)" and "y \<in> set (Macaulay_list ps)" and "x \<noteq> y" shows "lt x \<noteq> lt y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lt x \<noteq> lt y [PROOF STEP] proof [PROOF STATE] proof (state) goal (1 subgoal): 1. lt x ...
{"llama_tokens": 3281, "file": "Groebner_Bases_Macaulay_Matrix", "length": 34}
import tensorflow as tf import numpy as np import pandas as pd import math import pickle import os import json from datetime import datetime # from IPython import embed import tensorflow.contrib.slim as slim from scipy.sparse import coo_matrix from graph import adjacency, distance_scipy_spatial from sklearn.preprocessi...
{"hexsha": "3d231b9c6ce93b30fe0dc5f9bebbfb87dcecd7b2", "size": 7324, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "qlongyinqw/gcn-japan-weather-forecast", "max_stars_repo_head_hexsha": "645f8239b1a913c0b6fc7b7b9ecaf87c0e5e9ea8", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#include <Settings.h> #include <string> #include <utilstrencodings.h> #include <DataDirectory.h> #include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/case_conv.hpp> #include <boost/filesystem/fstream.hpp> #include <boost/program_options/detail/config_file.hpp> #include <set> std::string Cop...
{"hexsha": "3ae551c3865ffc4145c31dabf9cca8a19f03eaa1", "size": 5469, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Settings.cpp", "max_stars_repo_name": "izzy-developer/core", "max_stars_repo_head_hexsha": "32b83537a255aeef50a64252ea001c99c7e69a01", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
''' Written by Mengzhan Liufu at Yu Lab, the University of Chicago ''' import numpy as np # TESTED def data_buffering(lfp_client, dio_client, Detector): while True: current_data = lfp_client.receive()['lfpData'] Detector.data_buffer.append(current_data[Detector.target_channel]) # current_...
{"hexsha": "cbd58caeea3267e9cc47547ef453e76bdbe1ce2c", "size": 439, "ext": "py", "lang": "Python", "max_stars_repo_path": "Closedloop_control/data_buffering.py", "max_stars_repo_name": "JohnLauFoo/PhaseControl2022_Yu", "max_stars_repo_head_hexsha": "83a1859864ecba1cda267d613b8eb1972766bddd", "max_stars_repo_licenses": ...
import numpy as np from ipso_phen.ipapi.base.ip_abstract import BaseImageProcessor from ipso_phen.ipapi.tools.csv_writer import AbstractCsvWriter from ipso_phen.ipapi.tools.common_functions import add_header_footer from ipso_phen.ipapi.tools.common_functions import time_method class ImageCsvWriter(AbstractCsvWriter)...
{"hexsha": "be7ad10a1bc933f738058b76aa4c0f6388f00410", "size": 4841, "ext": "py", "lang": "Python", "max_stars_repo_path": "class_pipelines/ip_019s1804_dib.py", "max_stars_repo_name": "tpmp-inra/ipapi", "max_stars_repo_head_hexsha": "b0f6be8960a20dbf95ef9df96efdd22bd6e031c5", "max_stars_repo_licenses": ["MIT"], "max_st...
# Kyle Lee from pathlib import Path import os import pandas as pd import time import matplotlib.pyplot as plt import numpy as np def loadSlang(fName): with open(fName) as file: for line in file: if(line!="\n"): line = line.strip("\n") # strip trailing newline ...
{"hexsha": "0e19c11210d1f058bdf523342ef46c0dbbbf35cb", "size": 3187, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/corpus.py", "max_stars_repo_name": "kaiXlee/keyword-replacement-in-corpus", "max_stars_repo_head_hexsha": "66fa9f8b3461a92d7cf7d008593ff07a23a1e036", "max_stars_repo_licenses": ["MIT"], "max_s...
/* * Copyright (c) 2018-2021 Aleksas Mazeliauskas, Stefan Floerchinger, * Eduardo Grossi, and Derek Teaney * All rights reserved. * * FastReso is distributed under MIT license; * see the LICENSE file that should be present in the root * of the source distribution, or alternately available at:...
{"hexsha": "d0aa1033203d4d8e91de367ad908576d54dd3b79", "size": 3389, "ext": "h", "lang": "C", "max_stars_repo_path": "TFastReso_AZYHYDRO.h", "max_stars_repo_name": "amazeliauskas/FastReso", "max_stars_repo_head_hexsha": "a694de368e79e3d21afa5d57b47209d5c9c55ed9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license, see LICENSE and LICENSE_ASTROML """ Bayesian Block implementation ============================= Dynamic programming algorithm for finding the optimal adaptive-width histogram. Modified from the bayesian blocks python implementation found in astroM...
{"hexsha": "15040846c50bdb0e0dbff66e77fe4858c5bdc7a6", "size": 5891, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/hepstats/modeling/bayesian_blocks.py", "max_stars_repo_name": "scikit-hep/statutils", "max_stars_repo_head_hexsha": "636d305c1e9d76dea2613ac0ce085789821ee9ad", "max_stars_repo_licenses": ["BSD...
# License: Apache-2.0 from ..util import util from feature_gen_str import string_length from typing import List, Union import numpy as np import pandas as pd import databricks.koalas as ks from._base_string_feature import _BaseStringFeature pd.options.mode.chained_assignment = None class StringLength(_BaseStringFeatu...
{"hexsha": "c700bcd851b749493cd3a00f8f7079e4b9ce7a36", "size": 4142, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib.macosx-10.9-x86_64-3.9/gators/feature_generation_str/string_length.py", "max_stars_repo_name": "Aditya-Kapadiya/gators", "max_stars_repo_head_hexsha": "d7c9967e3a8e304a601b6a92ad834d03d3...
import numpy as np import cv2 from evaluation_DHT.basic_ops import Line def sa_metric(angle_p, angle_g): d_angle = np.abs(angle_p - angle_g) d_angle = min(d_angle, np.pi - d_angle) d_angle = d_angle * 2 / np.pi return max(0, (1 - d_angle)) ** 2 def se_metric(coord_p, coord_g, size=(400, 400)): c_...
{"hexsha": "6a31d86457a79c7e05992f01eeaf929f8427b4c3", "size": 794, "ext": "py", "lang": "Python", "max_stars_repo_path": "Modeling/H_Net/code/evaluation_DHT/metric.py", "max_stars_repo_name": "dongkwonjin/Semantic-Line-MWCS", "max_stars_repo_head_hexsha": "2533bbaa62dde955b560fa2ab6a78a9b1a0038ac", "max_stars_repo_lic...
module RunBeast #module for running BEAST export run_beast, check_beast, find_beast const BEAST_JAR = "beast.jar" const BEAST_HOME = "BEAST_HOME" function find_beast(;beast_home::String="") if isempty(beast_home) beast_home = haskey(ENV, BEAST_HOME) ? ENV[BEAST_HOME] : pwd() end if...
{"hexsha": "05bd593bf36024252292770439d0e459eaaf7787", "size": 2082, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/RunBeast.jl", "max_stars_repo_name": "gabehassler/BeastUtils.jl", "max_stars_repo_head_hexsha": "5d708de8184a47f6db5da60e39a36d9dd279e457", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# -------------- import numpy as np import pandas as pd import matplotlib.pyplot as plt # Load the dataframe df = pd.read_csv(path) #Code starts here # probability p(A)for the event that fico credit score is greater than 700. p_a = df[df['fico'].astype(float) > 700].shape[0]/df.shape[0] print(p_a) # ...
{"hexsha": "0502607df4513298052b56f8b7d998ea89b9fb82", "size": 2210, "ext": "py", "lang": "Python", "max_stars_repo_path": "loan-defaulters/code.py", "max_stars_repo_name": "imvishal23/ga-learner-dsmp-repo", "max_stars_repo_head_hexsha": "bba87e3fa9cc2e71165eb7f05c9b280045b73c46", "max_stars_repo_licenses": ["MIT"], "m...
import os import os.path as path import logging from common.config import DATA_PATH, DEFAULT_TABLE from common.const import UPLOAD_PATH from common.const import input_shape from common.const import default_cache_dir from service.train import do_train from service.search import do_search from service.count import do_cou...
{"hexsha": "cbe7a09f14ac02bac48d1eaccd9a0b0fbd09e55b", "size": 4540, "ext": "py", "lang": "Python", "max_stars_repo_path": "solutions/pic_search/webserver/src/app.py", "max_stars_repo_name": "naetimus/bootcamp", "max_stars_repo_head_hexsha": "0182992df7c54012944b51fe9b70532ab6a0059b", "max_stars_repo_licenses": ["Apach...
[STATEMENT] lemma adds_antisym: assumes "s adds t" "t adds s" shows "s = t" [PROOF STATE] proof (prove) goal (1 subgoal): 1. s = t [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. s = t [PROOF STEP] from \<open>s adds t\<close> [PROOF STATE] proof (chain) picking this: s adds t [PROOF STEP] o...
{"llama_tokens": 1388, "file": "Polynomials_Power_Products", "length": 23}
from pandas import DataFrame, Series from pandasUtils import isSeries, isDataFrame from numpyUtils import isArray from numpy import ndarray, asarray ############################################################################################################################## # Geo Clusters Class ######################...
{"hexsha": "742b820f58f55182cfbf241fda2f82e3b8910826", "size": 5680, "ext": "py", "lang": "Python", "max_stars_repo_path": "convertData.py", "max_stars_repo_name": "tgadf/geocluster", "max_stars_repo_head_hexsha": "ee24038b81240ec47a202601e5c6b4dad8b63172", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
import numpy as np from scipy.linalg import lu_factor, lu_solve class Truss: """ Simple static equilibrium solver for truss structures Args ---- points : ndarray, shape (n_points, dim) Point coordinates with spatial dimension ``dim`` lines : ndarray, shape (n_lines, 2) Connect...
{"hexsha": "9621194e1500b84b02a01f5f5d7cc0aac0361717", "size": 7376, "ext": "py", "lang": "Python", "max_stars_repo_path": "ddtruss/truss.py", "max_stars_repo_name": "deeepeshthakur/ddtruss", "max_stars_repo_head_hexsha": "86aa945d577c6efe752099eee579386762942289", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
// Autogenerated from KST: please remove this line if doing any edits by hand! #include <boost/test/unit_test.hpp> #include "cast_to_top.h" #include <iostream> #include <fstream> #include <vector> BOOST_AUTO_TEST_CASE(test_cast_to_top) { std::ifstream ifs("src/fixed_struct.bin", std::ifstream::binary); kaitai...
{"hexsha": "b65bd7d78cbb75070fd23810b3338cdaa363c079", "size": 546, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "spec/cpp_stl_98/test_cast_to_top.cpp", "max_stars_repo_name": "DarkShadow44/kaitai_struct_tests", "max_stars_repo_head_hexsha": "4bb13cef82965cca66dda2eb2b77cd64e9f70a12", "max_stars_repo_licenses": ...
from PIL import Image import numpy def readImage(path): im = Image.open(path) # Can be many different formats. pix = im.load() print 'load image: {}'.format(path) print 'image size: {}'.format(im.size) # Get the width and hight of the image for iterating over # print pix[0, 0] # Get the ...
{"hexsha": "4839d3f8471000dcc0e62eb451b7e5ad34cbb3f8", "size": 1328, "ext": "py", "lang": "Python", "max_stars_repo_path": "loader.py", "max_stars_repo_name": "ifenglin/ERF_Python", "max_stars_repo_head_hexsha": "29fc87c52b104d3a2c191e68148e3e0b1ff76257", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This package contains utilities to run the test suite. """ import numpy as np import astropy.units as u from mskpy import photometry as P from mskpy.photometry import hb class TestHB(): """Test photometry.hb. From Dave Schleicher 2017 Mar 24...
{"hexsha": "6788b1abc622e23c9f0827ee8aa6898b49ff5e17", "size": 3090, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_photometry.py", "max_stars_repo_name": "mkelley/mskpy", "max_stars_repo_head_hexsha": "41f41fd69bae71853abdfd2afbd535cd0b79c530", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
import re import numba as nb import numpy as np import pandas as pd # =================================================================== # Useful functions # =================================================================== def isfloat(value): """ This function checks if a string can be converted to a flo...
{"hexsha": "71bfb974311f7d27503219ef91ed5dc2d73ce26a", "size": 2886, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_processing/data_funcs.py", "max_stars_repo_name": "yardasol/pride", "max_stars_repo_head_hexsha": "d63ee7711c7f5e4bd88b89dabd4140c562ac32e7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
import importlib import logging import os import time from collections import defaultdict from pathlib import Path import joblib import numpy as np import tensorflow.compat.v1 as tf import tensorflow.compat.v1.keras.backend as K import toml from keras_contrib.callbacks import CyclicLR from logzero import setup_logger ...
{"hexsha": "9478bbafcd45b3051ef25f4b2690c5a665bde08f", "size": 27671, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyoaz/training/trainer.py", "max_stars_repo_name": "ameroueh/oaz", "max_stars_repo_head_hexsha": "7cf192b02adaa373b7b93bedae3ef67886ea53af", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import os import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import tensorflow_addons as tfa import tensorflow_datasets as tfds units = 64 class att_block(tf.keras.layers.Layer): ''' quoted from https://arxiv.org/pdf/1903.03878.pdf ''' def __init__(self, x, y): super(...
{"hexsha": "4c3f088b57c9eaf56e7fb1808196f95702fad0c0", "size": 1595, "ext": "py", "lang": "Python", "max_stars_repo_path": "backup/SMT_t.py", "max_stars_repo_name": "miffyrcee/tf", "max_stars_repo_head_hexsha": "1dd7bef0428c62704cb14d9e030731aa1badb037", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
abstract type AbstractAmplifier end struct SimpleAmplifier <: AbstractAmplifier name::String in_min::typeof(0.0V) in_max::typeof(0.0V) gain::Float64 offset::typeof(0.0V) current_max::typeof(0.0mA) end name(amp::SimpleAmplifier) = amp.name in_min(amp::SimpleAmplifier) = amp.in_min out_min(amp::...
{"hexsha": "1225cc846f2388cd356ab478e214641638e5e7f3", "size": 1500, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/amplifiers.jl", "max_stars_repo_name": "HolyLab/ImagineHardware.jl", "max_stars_repo_head_hexsha": "c22737a08f76fef1aeef42a957bbfc6d548c3025", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from tensorflow.keras.models import Sequential, Model from tensorflow.keras.layers import Dense, Flatten, Input, \ Concatenate, LeakyReLU from tensorflow.keras import initializers, regularizers import tensorflow as tf from tensorflow.keras.optimizers import Adam from rl.agents import DDPGAgent from rl.memory import...
{"hexsha": "b4a9d579e3d8daa9eabca4b71dc7dff395cdef1e", "size": 16097, "ext": "py", "lang": "Python", "max_stars_repo_path": "Examples/PMSM_CurrentControl/ddpg_pmsm_dqCC_training.py", "max_stars_repo_name": "max-schenke/DESSCA", "max_stars_repo_head_hexsha": "1c9e22f5503e5fb32f307286baff228aee4a6e46", "max_stars_repo_li...
[STATEMENT] lemma lookup_fresh: fixes z::"name" assumes a: "z\<sharp>\<theta>" and b: "z\<sharp>x" shows "z \<sharp>lookup \<theta> x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. z \<sharp> lookup \<theta> x [PROOF STEP] using a b [PROOF STATE] proof (prove) using this: z \<sharp> \<theta> z \<sharp> x goa...
{"llama_tokens": 183, "file": null, "length": 2}