text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
#pragma once #include <Eigen/Dense> using namespace Eigen; class lrsgd { public: lrsgd(); ~lrsgd() {}; VectorXf sigmoid(VectorXf& a); void lr_objective(float& cost, VectorXf& grad, VectorXf& theta); void fit(void); void generate_data(MatrixXf& X, VectorXi& y); int num_iter; //max number of iterations V...
{"hexsha": "ebcbe36e769fac34b1da05d76f0c1f9ee2553b53", "size": 729, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "machine_learning/logreg/logreg.hpp", "max_stars_repo_name": "vishalbelsare/cpp", "max_stars_repo_head_hexsha": "772178d911e8f90c23e9d3c1d8d32482bc397fc5", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma lcmof_leastUpper: fixes G (structure) assumes carr[simp]: "a \<in> carrier G" "b \<in> carrier G" shows "(x \<in> carrier G \<and> x lcmof a b) = least (division_rel G) x (Upper (division_rel G) {a, b})" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (x \<in> carrier G \<and> x lcmof a b) = ...
{"llama_tokens": 182, "file": null, "length": 1}
import numpy as np import cv2 from id.trafficmon.objecttracking import ObjectTrackingAbstract __author__ = 'Luqman' class OpticalFlowHS(ObjectTrackingAbstract): """ class OpticalFlowHS implementation of classical Horn-Schunck optical flow (Horn, 1981) """ def __init__(self): ObjectTrac...
{"hexsha": "84a37a1420a7b629009b1bee6c16de1fb4ab5af9", "size": 2436, "ext": "py", "lang": "Python", "max_stars_repo_path": "id/trafficmon/objecttracking/OpticalFlow.py", "max_stars_repo_name": "umanium/trafficmon", "max_stars_repo_head_hexsha": "86c138bda3c8a3e38fff273e5d61610acee123b5", "max_stars_repo_licenses": ["MI...
#!/usr/bin/python3 import matplotlib.pyplot as plt import numpy as np import csv # CPU UTILIZATION # Make the data num = 0 # Amount of x ticks x_ticks=np.arange(0, 900, 10) plt.xticks(x_ticks) for files in range(6): x = [] y = [] num += 1 with open('APM' + str(num) + '_metrics.csv', 'r') as file: lines = csv.r...
{"hexsha": "d6b5474536e9465d594c0a08338620bdb5d7acd9", "size": 3629, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python Tutorials/Graphing/Lab4.py", "max_stars_repo_name": "GarrettMaury7921/OpenAI_Tutorials", "max_stars_repo_head_hexsha": "6db988c249565264c94efda65739b2e87007b87e", "max_stars_repo_licenses":...
c###findf.for SUBROUTINE FINDF(K) C-------------------------------- C C THIS ROUTINE DOES AREA COVERAGE FOR A SPECIFIED FREQUENCY C (FIND ALL MODES FOR AN OPERATING FREQUENCY) C INSERTS PENETRATION ANGLES INTO THE ANGLE TABLE AND COMPUTES ALL C RAY PATH PARAMETERS FOR EACH ANGLE AT THE FREQ...
{"hexsha": "e0b886614176047f481b578117d6c74960befa3f", "size": 8494, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "src/voacapw/findf.for", "max_stars_repo_name": "jawatson/voacapl", "max_stars_repo_head_hexsha": "6861fbad041ff7a56b8875c735c9242c81a94320", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_co...
# coding=utf-8 # Copyright 2018 Google LLC & Hwalsuk Lee. # # 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": "d51f36b29a6e3f8c7947a64ead69957fd88e98fc", "size": 9724, "ext": "py", "lang": "Python", "max_stars_repo_path": "DiffAugment-biggan-imagenet/compare_gan/gans/ssgan.py", "max_stars_repo_name": "Rian-T/data-efficient-gans", "max_stars_repo_head_hexsha": "1d7e58be909524c86c863b5ab7c9d591afc00d1d", "max_stars_re...
-- Math 52: Week 5 import .utils open classical -- The following lemmas may be useful for the next proof. -- mul_lt_mul_of_pos_left (a b c : ℝ) : a < b → 0 < c → c * a < c * b -- mul_lt_mul_of_pos_right (a b c : ℝ) : a < b → 0 < c → a * c < b * c -- Lakins 2.1.2: For all real numbers a and b, if 0 < a < b, then a² <...
{"author": "UVM-M52", "repo": "week-5-maddiehutchinson", "sha": "7fd99c56b0a9a313ed1b462e9a8e50c0d66857aa", "save_path": "github-repos/lean/UVM-M52-week-5-maddiehutchinson", "path": "github-repos/lean/UVM-M52-week-5-maddiehutchinson/week-5-maddiehutchinson-7fd99c56b0a9a313ed1b462e9a8e50c0d66857aa/src/week05.lean"}
import sys sys.path.append('..') import numpy as np import apis from apis import apis_system from apis import apis_basic from .hvdc import calculate_dc_line_power def init_powerflow_solution(): ''' Initial power flow solution with flat start. Args: None Rets: (1) S, array, no...
{"hexsha": "0824f72b7bbd3081fe2180d3f0d66718bd08bbde", "size": 6815, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/powerflow/branch.py", "max_stars_repo_name": "yanzhaochang/PSATools-Python", "max_stars_repo_head_hexsha": "7524d7eeed26db9fba93c0ea03a7c8c0bfee7410", "max_stars_repo_licenses": ["Apache-2.0"]...
[STATEMENT] lemma sturm_meta_spec: "(\<And>x::real. P x) \<Longrightarrow> P x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>x. P x) \<Longrightarrow> P x [PROOF STEP] by simp
{"llama_tokens": 79, "file": "Sturm_Sequences_Sturm_Method", "length": 1}
#-------------------------- # Tensorflow Keras imports #-------------------------- import os import warnings import logging from distutils.util import strtobool from packaging import version import re os.environ['NUMEXPR_MAX_THREADS'] = '8' # suppress warning from NumExpr on machines with many CPUs # TensorFlow SUPP...
{"hexsha": "f52ec79dde08035d4ad963f47fe0d7fddf97aab4", "size": 6415, "ext": "py", "lang": "Python", "max_stars_repo_path": "ktrain/imports.py", "max_stars_repo_name": "rubensmau/ktrain", "max_stars_repo_head_hexsha": "de32b87b9d3996f35882e7ca18273356c72d342c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
simulationMode = False if not simulationMode: import TensorflowProcessingModule as TPM from imutils.video.pivideostream import PiVideoStream import MathModule as MM import math, time, copy import cv2 import numpy as np from multiprocessing import Process, RawValue, RawArray #program sluzacy do analizy obraz...
{"hexsha": "2702ded874a778118a2f2e4c08e01dbcf139ffa0", "size": 11360, "ext": "py", "lang": "Python", "max_stars_repo_path": "PythonCode/ImageProcessingModule.py", "max_stars_repo_name": "janw23/Ballance", "max_stars_repo_head_hexsha": "f085d2d03c31a8e3be74d4c82300f571cc3cad65", "max_stars_repo_licenses": ["MIT"], "max_...
import pandas as pd import numpy as np from dataclasses import dataclass, InitVar, field from enum import Enum, Flag, auto, unique from functools import reduce print("\nWarning: pre-loading selected modules, see your config", end='')
{"hexsha": "9948661f9f157cc1a137345ce1e15902114b75be", "size": 236, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ipython/profile_default/startup/00-import_selected_modules.py", "max_stars_repo_name": "dpopchev/linux", "max_stars_repo_head_hexsha": "b5348b9543276b06366497681924441ef4f43005", "max_stars_rep...
# used from predict.py import pandas as pd from collections import OrderedDict import numpy as np import random from sato.extract.helpers import utils from sherlock.features.bag_of_characters import extract_bag_of_characters_features from sherlock.features.bag_of_words import extract_bag_of_words_features from she...
{"hexsha": "35569439a3077dcea88b8a06490fd25423a989a6", "size": 2385, "ext": "py", "lang": "Python", "max_stars_repo_path": "sato/extract/feature_extraction/sherlock_features.py", "max_stars_repo_name": "VIDA-NYU/sato", "max_stars_repo_head_hexsha": "8fb51787b36114df13f54c1acd11df12a66ad3e4", "max_stars_repo_licenses": ...
#include <Server.h> #include <Session.h> #include <Database.h> #include <iterator> #include <boost/asio.hpp> #include <signal.h> namespace NHttpProxy { TServerError::TServerError(const std::string& message) : std::runtime_error(message) {} class TServer::TImpl { public: TImpl() : IOContext_(1) ...
{"hexsha": "8c1c61df83b8f41ff8a8beb6db653a0f52aab3d1", "size": 2700, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "individual/lib/Server.cpp", "max_stars_repo_name": "vasalf/NetworksLab2020HSE", "max_stars_repo_head_hexsha": "b1971981921ae6288e741a578182bfd5279d792f", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma [code_unfold]: fixes literal :: Literal and clause :: Clause shows "literal el clause = List.member clause literal" [PROOF STATE] proof (prove) goal (1 subgoal): 1. literal el clause = List.member clause literal [PROOF STEP] by (auto simp add: member_def)
{"llama_tokens": 91, "file": "SATSolverVerification_SatSolverCode", "length": 1}
''' This is the homework for SJTU IE308 Image Processing by Prof. Yi Xu Copy right by Sizhe Wei, Dec 2019; ID: 517021910796 HW No.2 BM3D Denoising Implement & False Color Transfer If you have any question, feel free to contact me at sizhewei@sjtu.edu.cn ''' import cv2 import numpy import math import numpy.matli...
{"hexsha": "dd36d33f761f75bbae4f5de8335a6da57c2611b6", "size": 19180, "ext": "py", "lang": "Python", "max_stars_repo_path": "Codework_and_Images/bm3d/bm3d.py", "max_stars_repo_name": "SizheWei/bm3d", "max_stars_repo_head_hexsha": "e6f3a084cafb2bc87b3860dd80eb0aa42398f51b", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import cv2 import numpy as np from matplotlib import pyplot as plt def find_matching_points(img1, img2, method='sift', match_method='bf', plot=False): ''' Find matching points in img1 and img2. ''' if method == 'orb': # Initiate ORB detector detector = cv2.ORB_create() nor...
{"hexsha": "5f5d4317913e35398061494faa90d952ac0308fe", "size": 2319, "ext": "py", "lang": "Python", "max_stars_repo_path": "registration.py", "max_stars_repo_name": "duembgen/NIRdehazing", "max_stars_repo_head_hexsha": "b985762a5a80f20874751abd7f4b3683e4f2e8b0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14...
import Flux struct PointwiseFeedForward FirstFilter::Flux.Conv SecondFilter::Flux.Conv end PointwiseFeedForward(dims::Integer) = PointwiseFeedForward( Flux.Conv((1, 1), dims => 4 * dims, Flux.relu) |> Flux.gpu, Flux.Conv((1, 1), 4 * dims => dims) |> Flux.gpu ) Flux.@treelike PointwiseFeedForward func...
{"hexsha": "a74580f6ceab5c8e56395231d25a67bbc61126d5", "size": 583, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/FeedForward.jl", "max_stars_repo_name": "brainsqueeze/SequenceModels.jl", "max_stars_repo_head_hexsha": "990d8217150807fcc8989eac562af3d63153f43c", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" Bookcrossing dataset transformation methods """ import os import shutil import urllib import zipfile import numpy as np import pandas as pd from sklearn.model_selection import train_test_split def download_bookcrossing(url='http://www2.informatik.uni-freiburg.de/~cziegler/BX/BX-CSV-Dump.zip', ...
{"hexsha": "9b054ddf19c9b5e044e4e0e560e6b5c6c8626906", "size": 1622, "ext": "py", "lang": "Python", "max_stars_repo_path": "rec_tool/transformations/bookcrossing.py", "max_stars_repo_name": "Ilyushin/rec-tool", "max_stars_repo_head_hexsha": "f9e3338ee19f93c5dee483feb5301958591abf80", "max_stars_repo_licenses": ["MIT"],...
# Copyright (c) 2020, NVIDIA Corporation. All rights reserved. # # This work is made available # under the Nvidia Source Code License (1-way Commercial). # To view a copy of this license, visit # https://nvlabs.github.io/Dancing2Music/License.txt import torch import torch.nn as nn import torch.nn.parallel import torch...
{"hexsha": "f1d84875073abb4bac6836d0ff13df50c664e68a", "size": 14704, "ext": "py", "lang": "Python", "max_stars_repo_path": "networks.py", "max_stars_repo_name": "Neoutlier/Dancing2Music", "max_stars_repo_head_hexsha": "b1b51ed5319415238869a9bc78a34d4d90662dc0", "max_stars_repo_licenses": ["BSD-Source-Code"], "max_star...
// This file is part of the dune-xt project: // https://zivgitlab.uni-muenster.de/ag-ohlberger/dune-community/dune-xt // Copyright 2009-2021 dune-xt developers and contributors. All rights reserved. // License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) // or GPL-2.0+ (h...
{"hexsha": "2fff57ef690d0b7a223974fec44fed1c0d5dcb74", "size": 15094, "ext": "hh", "lang": "C++", "max_stars_repo_path": "dune/xt/la/container/matrix-market.hh", "max_stars_repo_name": "dune-community/dune-xt", "max_stars_repo_head_hexsha": "da921524c6fff8d60c715cb4849a0bdd5f020d2b", "max_stars_repo_licenses": ["BSD-2-...
import numpy as np import os, sys import torch import torch.optim as optim import torch.nn as nn import torch.nn.functional as F from torch import autograd from torch.autograd import Variable from torch.nn import Parameter import torchvision.transforms as transforms from torch.utils.data import DataLoader from torch.n...
{"hexsha": "8892c27e328788c7cde3f51068e89f534f6cf790", "size": 5801, "ext": "py", "lang": "Python", "max_stars_repo_path": "gan/neuralDist/trainNeuralDist.py", "max_stars_repo_name": "pedroryzewski/TCC", "max_stars_repo_head_hexsha": "ba5167928d5a14dc0c6e144d0927c050090950a6", "max_stars_repo_licenses": ["MIT"], "max_s...
export snr, smooth, smooth!, abs_max, abs_max!, standardize, standardize! export mad, std_threshold """ snr(A) Signal to noise ratio of cross-correlations in matrix `A`. Follows method of Clarke et. al, 2011. Measures SNR at each point. """ function snr(A::AbstractArray) Nrows,Ncols = size(A) A_mean = me...
{"hexsha": "691666aa8eeb7fc041ae0be3065515a9ba6e3eae", "size": 3025, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/tools.jl", "max_stars_repo_name": "Denolle-Lab/SeisNoise.jl", "max_stars_repo_head_hexsha": "0eba10ca056ddbc73da50a137b4d2c13cea956ef", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 46...
from astropy import units as u from astropy.coordinates import SkyCoord, AltAz, Angle def azToDirection(az): #azimut to direction az = float(az) if (az >=360): az -= 360 if (az <0): az += 360 if (az >= 0 and az < 22.5) or (az >= 337.5 and az < 360): lettre='North' elif az >= 22.5 and az < ...
{"hexsha": "d393986883dcc6098350bc5698987cda4f06bdf5", "size": 2491, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/functions.py", "max_stars_repo_name": "serge-golovanow/SpectroStars", "max_stars_repo_head_hexsha": "19e1ca2fbecd8dd814ceea18a54c54603b9efbf4", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
''' wrapper for change detector that is called by 3D solver based on tomostream ''' from roi_utils.roi import roi_search, load_seg_nn, roi_search_subtraction, rescale_vol_for_NN from roi_utils.patches import Patches from roi_utils.voxel_processing import modified_autocontrast from roi_utils.ADet4RoI import roi_searc...
{"hexsha": "b80bb9d7442ba7c2982b6dabd1a39508ee1e8d40", "size": 3405, "ext": "py", "lang": "Python", "max_stars_repo_path": "scratchpad/tomostream_roi/tomostream/change_detector.py", "max_stars_repo_name": "arshadzahangirchowdhury/TomoEncoders", "max_stars_repo_head_hexsha": "9c2b15fd515d864079f198546821faee5d78df17", "...
import re import collections.abc import datetime import hashlib import logging import os import time import random from copy import deepcopy from concurrent.futures import ( ProcessPoolExecutor, as_completed, ThreadPoolExecutor, ) import github3 import networkx as nx import requests from xonsh.lib.collec...
{"hexsha": "6f672b510f766ec63db2fdf2e1688577b203bee1", "size": 7570, "ext": "py", "lang": "Python", "max_stars_repo_path": "conda_forge_tick/make_graph.py", "max_stars_repo_name": "sdvillal/cf-scripts", "max_stars_repo_head_hexsha": "026a90a0a0e4e5ef09c3f0cb8e1a8659977250b2", "max_stars_repo_licenses": ["BSD-3-Clause"]...
\documentclass{article} \usepackage{jobapp} %% Contact info \SetName{PHILLIP FRY} \SetProfessionalTitle{A Real Person} \SetAddress{1600 Pennsylvania Avenue, N.W. \\ Washington, DC 20500} \SetPhone{(555) 555-5555} \SetEmail{p.fry@dev.null} \begin{document} \section*{Skills \& Expertise} \ResumeLayout {\te...
{"hexsha": "523660cac8c5352fee0406478c84693f559b014d", "size": 1619, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "example.tex", "max_stars_repo_name": "cahna/JobApp", "max_stars_repo_head_hexsha": "74d369b016e050c25d151155e3018e99726271d8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars...
export l_bfgs_rcst export Steighaug export BhaskaraTop export LimitedMemory """ l_bfgs_rcst(nlp; options...) - Ainda não chegamos nesse! Este método é chamado L-BFGS com região de confiança por Steihaug-Toint. Tenta-se resolver B_k d = - ∇f(xₖ) usando Gradientes Conjugados. Se em algum momento a direção ficar maior...
{"hexsha": "f9fe58f57bdbefaaedbf7914347524dd7f37c9ce", "size": 8224, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/l_bfgs_rcst.jl", "max_stars_repo_name": "FKrukoski/Projeto2Solvers.jl", "max_stars_repo_head_hexsha": "8d48093e9bc1fca9470f568c2415df7bdbaa1672", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import category_theory.category category_theory.epi_mono tactic-- this transitively imports open category_theory universes v u variables (C : Type u) [category.{v} C] /-Prove Lemma 1.2.11 by proving either (i) or (i') and either (ii) or (i'), then arguing by duality. Conclude that the monomorphisms in any category...
{"author": "agusakov", "repo": "riehl-solutions", "sha": "3cba620de377649e9269c53e17a65cfccd7db651", "save_path": "github-repos/lean/agusakov-riehl-solutions", "path": "github-repos/lean/agusakov-riehl-solutions/riehl-solutions-3cba620de377649e9269c53e17a65cfccd7db651/src/category_theory_stuff/solutions/chapter_1/secti...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import json import os import pickle import random from abc import ABC, abstractmethod from dataclasses import dataclass,...
{"hexsha": "22e5d087398964c1be75899619889bfe28bdc2af", "size": 22886, "ext": "py", "lang": "Python", "max_stars_repo_path": "parlai/crowdsourcing/tasks/model_chat/model_chat_blueprint.py", "max_stars_repo_name": "Uzornd/ParlAI", "max_stars_repo_head_hexsha": "5c07877f493db75847029ed9906aabc48c4d9f54", "max_stars_repo_l...
from __future__ import print_function # This lets us use the python3-style print() function even in python2. It should have no effect if you're already running python3. import os import dwl import numpy as np # Configure the printing np.set_printoptions(suppress=True) # Construct an instance of the FloatingBaseSyste...
{"hexsha": "48893f398e94989c34633abff9d9adef53fd4b0a", "size": 5445, "ext": "py", "lang": "Python", "max_stars_repo_path": "sample/python/FloatingBaseSystem.py", "max_stars_repo_name": "EricWang1hitsz/dwl", "max_stars_repo_head_hexsha": "b45e6babfcace928af2601f3d453e3f27e2e76c8", "max_stars_repo_licenses": ["BSD-3-Clau...
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Jens Wagemaker, Aaron Anderson -/ import ring_theory.coprime.basic import ring_theory.principal_ideal_domain /-! # Divisibility over ℕ and ℤ This file collects result...
{"author": "jjaassoonn", "repo": "projective_space", "sha": "11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce", "save_path": "github-repos/lean/jjaassoonn-projective_space", "path": "github-repos/lean/jjaassoonn-projective_space/projective_space-11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce/src/ring_theory/int/basic.lean"}
import numpy as np import halotools.empirical_models as htem import halotools.sim_manager as htsm import galtab def test_bolshoi_zheng_placeholder_weights(use_jax=False): redshift = 0 threshold = -21 halocat = htsm.CachedHaloCatalog(simname="bolshoi", redshift=redshift, ...
{"hexsha": "704084b5da172b351eb33282feb40f74c05d4a06", "size": 4726, "ext": "py", "lang": "Python", "max_stars_repo_path": "galtab/tests/test_galtab.py", "max_stars_repo_name": "AlanPearl/hodtab", "max_stars_repo_head_hexsha": "d10e1ba2c314a068665d2cfc1bfc4c4f9a16c10f", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import os import re from collections import defaultdict import numpy as np from utensor_cgen.frontend import FrontendSelector from utensor_cgen.frontend.base import Parser from utensor_cgen.ir.base import OperationInfo, TensorInfo, uTensorGraph from utensor_cgen.ir.converter import (AttrValueConverter, ...
{"hexsha": "d7229a35c23cf079e8934b813e719dd62e54a998", "size": 15662, "ext": "py", "lang": "Python", "max_stars_repo_path": "utensor_cgen/frontend/tflite.py", "max_stars_repo_name": "uTensor/utensor_cgen", "max_stars_repo_head_hexsha": "eccd6859028d0b6a350dced25ea72ff02faaf9ad", "max_stars_repo_licenses": ["Apache-2.0"...
# -*- coding: utf-8 -*- import torch import torch.nn as nn from torch.optim import Adam import torch.nn.functional as functional from torch.utils.data import DataLoader import numpy as np from tqdm import tqdm import matplotlib.pyplot as plt from config import Config from dataset import Vocabulary, DualNovelD...
{"hexsha": "9d757ddcea374b48451a0be014e63fb5edcaa26b", "size": 11129, "ext": "py", "lang": "Python", "max_stars_repo_path": "autoencoder.py", "max_stars_repo_name": "RunTimeError2/TextStyleTransfer_PTO", "max_stars_repo_head_hexsha": "870ee837696d8eddffed6a3fd162ea1ad403ce44", "max_stars_repo_licenses": ["Apache-2.0"],...
import time t0t=time.time() from os.path import join import os import numpy as n import glob import sys import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as p import astropy.io.fits as fits from scipy.interpolate import interp1d from scipy.stats import norm as gaussD import GalaxySpectrumFIREFLY as ...
{"hexsha": "70ac254fe73b4cc60cf93afb21c4beec904fb417", "size": 8527, "ext": "py", "lang": "Python", "max_stars_repo_path": "spm/bin_simulated_spectra/combine_model_spectra_GAMA_SNR.py", "max_stars_repo_name": "AndresSixtos/pyeBOSS", "max_stars_repo_head_hexsha": "4750908c8bc409633bef8f790133e3a1f3f0c9e4", "max_stars_re...
#ifndef _PS_ #define _PS_ #include <stdio.h> #include <stddef.h> #include <stdlib.h> #include <ctype.h> #include <math.h> #include <unistd.h> #include "../Parameter_files/COSMOLOGY.H" #include "../Parameter_files/INIT_PARAMS.H" #include <gsl/gsl_interp.h> #include <gsl/gsl_spline.h> #include "cosmo_progs.c" #include "...
{"hexsha": "38bb9b2f8a04e9bc4060d300282b7b180a9060e2", "size": 55391, "ext": "c", "lang": "C", "max_stars_repo_path": "public_21CMvFAST_MC/Cosmo_c_files/ps.c", "max_stars_repo_name": "JulianBMunoz/21cmvFAST", "max_stars_repo_head_hexsha": "14c053c301a7f10081071e815281f9c3879efa6b", "max_stars_repo_licenses": ["MIT"], "...
from lcc.utils.data_analysis import to_PAA, normalize import numpy as np class SAX(object): """ This class manages symbolic representation of data series via Symbolic Aggregate approXimation method. It translates series of data to a words, which can then be compared with other such words in sym...
{"hexsha": "6a23fa50d5b12cccbb528df83af52255473f4508", "size": 8047, "ext": "py", "lang": "Python", "max_stars_repo_path": "lcc/stars_processing/utilities/sax.py", "max_stars_repo_name": "mavrix93/LightCurvesClassifier", "max_stars_repo_head_hexsha": "a0a51f033cb8adf45296913f0de0aa2568e0530c", "max_stars_repo_licenses"...
(* Copyright 2014 Cornell University Copyright 2015 Cornell University Copyright 2016 Cornell University Copyright 2017 Cornell University This file is part of VPrl (the Verified Nuprl project). VPrl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Li...
{"author": "vrahli", "repo": "NuprlInCoq", "sha": "0c3d7723836d3f615ea47f56e58b2ea6173e7d98", "save_path": "github-repos/coq/vrahli-NuprlInCoq", "path": "github-repos/coq/vrahli-NuprlInCoq/NuprlInCoq-0c3d7723836d3f615ea47f56e58b2ea6173e7d98/bar_induction/bar_induction_cterm2.v"}
import numpy as np from utils import peak_skewness, peak_kurtosis class Gene: """ Gene object, save a gene's information """ def __init__(self, gene_id, celltype, label, chr, start, end, step=10, signal=None, exp=None, cur_signal=None): """ :param gene_id: unique gene identifier ...
{"hexsha": "1d30f43350287fd67eed217088296d5b807eeafe", "size": 5784, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/gene.py", "max_stars_repo_name": "bxia888/CEFCIG", "max_stars_repo_head_hexsha": "5431d3bba91847c99f9facc67d1996b08705e8e9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_star...
#!/usr/bin/env """ ctd.py Seabird CNV only Built using Anaconda packaged Python: Original code reference: -------------- purpose: Some classes and functions to work with CTD data. author: Filipe P. A. Fernandes e-mail: ocefpaf@gmail web: http://ocefpaf.tiddlyspot.com/ created: 22-Jun-2012 ...
{"hexsha": "0c2070ae3d9b7cb6c93c7f0cec5db8ccc5b6701d", "size": 9958, "ext": "py", "lang": "Python", "max_stars_repo_path": "OnCruiseRoutines/CTD_Vis/ctd.py", "max_stars_repo_name": "shaunwbell/AtSeaPrograms", "max_stars_repo_head_hexsha": "839ee4dc1cf7a85bce1de82b04379c6d1670c414", "max_stars_repo_licenses": ["MIT"], "...
function jed = ymdf_to_jed_islamic_b ( y, m, d, f ) %*****************************************************************************80 % %% YMDF_TO_JED_ISLAMIC_B converts an Islamic B YMDF date to a JED. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 13 March 2013 % % ...
{"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/calpak/ymdf_to_jed_islamic_b.m"}
// Copyright (c) 2012 - 2017 Object Computing, Inc. // All rights reserved. // See the file license.txt for licensing information. #define BOOST_TEST_NO_MAIN LiquibookTest #include <boost/test/unit_test.hpp> #include "ut_utils.h" #include "changed_checker.h" #include <book/order_book.h> #include <simple/simple_order....
{"hexsha": "d1f1322653dc32ea8fa3cc05b7f7dc5c3a1685c6", "size": 3041, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/unit/ut_order_book_shared_ptr.cpp", "max_stars_repo_name": "coinderex/liquibook", "max_stars_repo_head_hexsha": "110695cf0a234888555323c94d8b65edb45fe8cf", "max_stars_repo_licenses": ["BSD-3-Cl...
#include <boost/phoenix/statement/while.hpp>
{"hexsha": "7b177457ab074ecc679ae6fcd23015b111d5b3af", "size": 45, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_phoenix_statement_while.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1...
#ifndef GRAPHCLASS #define GRAPHCLASS #include "graph_node.hpp" #include <Eigen/Dense> #include <memory> #include <stddef.h> #include <vector> class UndirectedGraph { public: // constructors UndirectedGraph() = delete; UndirectedGraph(const size_t num_nodes, const double lower_weight, const d...
{"hexsha": "9a67827514109914706659c064585d9c2a471304", "size": 1941, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/graph_utils/graph_class.hpp", "max_stars_repo_name": "jweber94/dijkstras_shortest_path", "max_stars_repo_head_hexsha": "ec175081895b5bca924c7c98d403fa61db59b992", "max_stars_repo_licenses": ...
import numpy as np def deprojectVis(data, incl=0., PA=0., offset=[0., 0.], wsc=1.): # - read in, parse data u, v, real, imag = data # - convert keywords into relevant units inclr = np.radians(incl) PAr = np.radians(PA) offr = 1e3*offset*np.pi/(180.*3600.) # - change to an appropriate coo...
{"hexsha": "32b44303f7e2350a5f1e97020161e314d05160d8", "size": 689, "ext": "py", "lang": "Python", "max_stars_repo_path": "deprojectVis.py", "max_stars_repo_name": "seanandrews/discrete-SB", "max_stars_repo_head_hexsha": "28571ebcef2c01cc2403eff6d3183beb7bf3810e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# import numpy as np import pandas as pd class PandasUtil(): def __init__(self, datetime_format=None): self.datetime_format = datetime_format def fix_string(self, series): return series.astype(str) def fix_bool(self, series): return series.astype(bool) def fix_float(self, se...
{"hexsha": "0eba977abb2f03a7d418f095454d843b1753ccba", "size": 785, "ext": "py", "lang": "Python", "max_stars_repo_path": "bqsqoop/utils/pandas_util.py", "max_stars_repo_name": "therako/bqsqoop", "max_stars_repo_head_hexsha": "43bb120a34811bfc62dc49095c39c68be9a49aba", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
------------------------------------------------------------------------ -- The Agda standard library -- -- Conversion of < to ≤, along with a number of properties ------------------------------------------------------------------------ -- Possible TODO: Prove that a conversion ≤ → < → ≤ returns a -- relation equivale...
{"hexsha": "85434fdcf388404262c64bc5c5e2f7b2251b5305", "size": 3212, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "agda-stdlib-0.9/src/Relation/Binary/StrictToNonStrict.agda", "max_stars_repo_name": "qwe2/try-agda", "max_stars_repo_head_hexsha": "9d4c43b1609d3f085636376fdca73093481ab882", "max_stars_repo_licen...
#= 6 digit numbers From Gunnar Blom, Lars Holst, Dennis Sandell: "Problems and Snapshots from the World of Probability" Page 19f, Problem 2.5 Problems concerning random numbers Given the 6 digits numbers: a) Problem 1 find the probability that at least one of the digits 0..9 appears ...
{"hexsha": "a17849009f77187cb2d8952aa17d3ede7a5d6e9a", "size": 3139, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "julia/turing/6_digit_numbers.jl", "max_stars_repo_name": "Wikunia/hakank", "max_stars_repo_head_hexsha": "030bc928d2efe8dcbc5118bda3f8ae9575d0fd13", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# Parameters beta = .96 y = [1.0, 2.0] b0 = 0.0 P = [0.8 0.2; 0.4 0.6] cp = ConsumptionProblem(beta, y, b0, P) Q = beta*P N_simul = 150 c_bar, b1, b2 = consumption_complete(cp) debt_complete = [b1, b2] println("P = ", P) println("Q= ", Q, "\n") println("Govt expenditures in peace and war =", y...
{"hexsha": "e099082e7b3f45a8f32a3c8f25039eb5bbc5359b", "size": 1449, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "smoothing/war_peace_example.jl", "max_stars_repo_name": "parkjt0506/QuantEconPractice", "max_stars_repo_head_hexsha": "2d83848dab7ed8d40efc9bbcf1e73aed7e5e532f", "max_stars_repo_licenses": ["BSD-3-...
import numpy as np from pyscf import gto from pyscf.dft import rks from pyscf.pbc import gto as pbcgto from pyscf.pbc.dft import rks as pbcrks def test_ke_cutoff(pseudo=None): # The periodic calculation eke_cut = [] eno_cut = [] max_ke = [] Ls = [5, 10, 15, 20, 25, 30, 40, 50] for L in Ls: ...
{"hexsha": "dca0e7da041ca1b7148c65a6194a921723d6a5c6", "size": 2167, "ext": "py", "lang": "Python", "max_stars_repo_path": "pbc/tests/test_ke_cutoff.py", "max_stars_repo_name": "gmwang18/pyscf", "max_stars_repo_head_hexsha": "fcd6877751661c8a9743c1c872a4a2b65f6dd7ac", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_s...
# -*- coding: utf-8 -*- """ gutils/numpy_/test/test_numpy_ """ import unittest import numpy as np from scipy import linalg from gutils.numpy_.numpy_ import colnorms_squared_new, normcols, LabelMatrixManager, \ scale_using_general_min_max_values, split_numpy_array class MatrixMixin: def setUp(self): ...
{"hexsha": "55a699d0076a64d7c62c627952478dc8df5329c1", "size": 7536, "ext": "py", "lang": "Python", "max_stars_repo_path": "gutils/numpy_/test/test_numpy_.py", "max_stars_repo_name": "giussepi/gutils", "max_stars_repo_head_hexsha": "f43a207a4a10884096a5d92d81183c2213169c14", "max_stars_repo_licenses": ["MIT"], "max_sta...
# -*- coding: utf-8 -*- """ Created on Tue Jul 30 20:35:22 2019 @author: icbab """ import numpy as np import matplotlib.pyplot as plt import matplotlib import matplotlib.font_manager as fm font_location = 'C:/HANDotum.ttf' # ex - 'C:/asiahead4.ttf' font_name = fm.FontProperties(fname = font...
{"hexsha": "d91d1d6f6990117bc6b0adebe63a66031e2c19e9", "size": 1222, "ext": "py", "lang": "Python", "max_stars_repo_path": "pics/2019-07-27_PCA/score_dist.py", "max_stars_repo_name": "reporeferences/angeloyeo.github.io", "max_stars_repo_head_hexsha": "c249e860665b918d1144f9cc5093dbe24b384224", "max_stars_repo_licenses"...
[STATEMENT] lemma forward_UV_lists_arg_min_ex: "\<lbrakk>finite xs; ys \<noteq> {}; ys = {x. set x = xs \<and> distinct x \<and> take 1 x = [r] \<and> forward x \<and> (\<forall>xs \<in> Y. sublist xs x)}\<rbrakk> \<Longrightarrow> \<exists>y \<in> ys. \<forall>z \<in> ys. (f :: 'a list \<Rightarrow> real) y ...
{"llama_tokens": 583, "file": "Query_Optimization_IKKBZ_Optimality", "length": 2}
import os import numpy as np import pandas as pd from sklearn.metrics import confusion_matrix from sklearn.metrics import accuracy_score, classification_report from plot_cm import plot_cm def pat_meta_info(pro_data_dir): """ Get patient and scan metadata for chest CT @params: data_sitk - requir...
{"hexsha": "776fbf74cafd94ce127050ccea0e383062295e21", "size": 17319, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils/HN_patient_meta.py", "max_stars_repo_name": "xmuyzz/IVContrast", "max_stars_repo_head_hexsha": "f3100e54f1808e1a796acd97ef5d23d0a2fd4f6c", "max_stars_repo_licenses": ["MIT"], "max_stars...
# -*- coding: utf-8 -*- """ Created on Thu Jul 26 11:08:30 2018 @author: wangyf """ ''' Objective Oriented Version of Lattice Building functon ''' import numpy as np import math import json import networkx as nx from networkx.algorithms import isomorphism as iso from itertools import combinations import matplotlib.p...
{"hexsha": "7d8fb93fd591dafe012b1df1a3ee641ec49dd48c", "size": 52301, "ext": "py", "lang": "Python", "max_stars_repo_path": "lasso-assisted-CE/lattice_functions.py", "max_stars_repo_name": "VlachosGroup/Pdn-Cluster-Structure-Optimization", "max_stars_repo_head_hexsha": "470fe57bd0dcfdfc131c9b7138b6c6480dfafd4b", "max_s...
from os.path import dirname, join import sys import platform from ctypes import * from .xi_wintypes import * from .xidefs import * try: import numpy as np except ImportError: pass #import platform; platform.architecture - not reliable on Mac OSX if platform.machine().startswith('arm') or plat...
{"hexsha": "5c4275fd801db0afc31cd779218accf15d3c0d51", "size": 195478, "ext": "py", "lang": "Python", "max_stars_repo_path": "Catkin_PKG_Car/src/ximea_cam/src/ximea/xiapi.py", "max_stars_repo_name": "jessecha/OPCAS", "max_stars_repo_head_hexsha": "2b51543b4ad1ee37dba2e45a0c7d0b872309d418", "max_stars_repo_licenses": ["...
#include <boost/filesystem/operations.hpp> #include <palette_loader.hxx> #include <global_state.hxx> auto asset_loader<palette>::load_asset(const ::std::string& p_name) const -> palette { // Retrieve data path const auto t_dataPath = global_state<path_manager>().data_path(); // Build path to requested palette f...
{"hexsha": "061c3c8aa401125ecf7a43577df9c2cdb755e1f5", "size": 670, "ext": "cxx", "lang": "C++", "max_stars_repo_path": "src/palette_loader.cxx", "max_stars_repo_name": "nshcat/gl_app", "max_stars_repo_head_hexsha": "49b97f07f81dc252695a379c46213ad9c1d94e1a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0, ...
#!/usr/bin/env python from PyQt4 import QtGui from PyQt4 import QtCore from PyQt4 import Qt import PyQt4.Qwt5 as Qwt import numpy as np from datetime import datetime as date import sys from Relay_QCheckBox import * class MainWindow(QtGui.QWidget): def __init__(self): QtGui.QMainWindow.__init__(self) ...
{"hexsha": "31bf7d8cf09a918fefed7540bfdcb7504feae807", "size": 16782, "ext": "py", "lang": "Python", "max_stars_repo_path": "old/python/rr_main_gui.py", "max_stars_repo_name": "vt-gs/relay_daemon", "max_stars_repo_head_hexsha": "9d77cd3222a3fe3e588f7c2196a4a06e8a73a471", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#redirect wiki:Sacramento:Sapor
{"hexsha": "eb4c22f3d7b12dcbfda15640ba03c062af7e8152", "size": 32, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Sapor.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
import argparse import os import pickle import re import glob import numpy as np import PIL.Image from PIL import Image from cv2 import VideoWriter, VideoWriter_fourcc, imread import dnnlib import dnnlib.tflib as tflib def generate_images(arrs, network_pkl, truncation_psi=1.0,noise_mode='const', outdir='out', save=T...
{"hexsha": "2704adc790c3a791b91340ffdda9f4be19e8f0e7", "size": 1590, "ext": "py", "lang": "Python", "max_stars_repo_path": "StyleganTools/custom_generate_tf.py", "max_stars_repo_name": "LeoLinRui/SSTP", "max_stars_repo_head_hexsha": "2cad02fd14d1fd76f24a58fe609421796dee59f9", "max_stars_repo_licenses": ["CC0-1.0"], "ma...
import os import numpy as np import pytest import torch from skimage.metrics import peak_signal_noise_ratio as ski_psnr import ignite.distributed as idist from ignite.exceptions import NotComputableError from ignite.metrics import PSNR from ignite.utils import manual_seed def test_zero_div(): psnr = PSNR() ...
{"hexsha": "6374390fdb5f24d0fb5c0c809c058f8c8038b96d", "size": 9774, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/ignite/metrics/test_psnr.py", "max_stars_repo_name": "DecSnowFlake/ignite", "max_stars_repo_head_hexsha": "b48354236a9993b75bcab12c8657fbf2f2318c70", "max_stars_repo_licenses": ["BSD-3-Claus...
using Knet Pkg.test("Knet") load_only = true for (p,f,o1,o2,o3) = ( (:LinReg, "linreg.jl", "--gcheck 2", "--fast", "--fast"), (:Housing, "housing.jl", "--gcheck 2 --atype Array{Float64}", "--fast", "--fast"), (:MNIST, "mnist.jl", "--gcheck 2", "--fast", "--fast"), (:LeNet, "lenet.jl", "--gchec...
{"hexsha": "9f0ddf07249e68b74cf376e375efffdd51646b2c", "size": 576, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/runexamples.jl", "max_stars_repo_name": "enzotarta/Knet.jl", "max_stars_repo_head_hexsha": "4330f3fec812ccbbfeabbcf6aa63450ca743f9c2", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
\documentclass[12pt,oneside,a4]{article} \usepackage{float} \usepackage[utf8]{inputenc} \usepackage[a4paper,width=160mm,top=25mm,bottom=25mm]{geometry} \usepackage[lining,tabular]{fbb} % so math uses tabular lining figures \usepackage{graphicx} \usepackage{enumitem} \usepackage{listings} \usepackage[svgnames]{xcolor} \...
{"hexsha": "9e9710859c1fc0ddc4d4ef00fe85e5d9583d4526", "size": 31109, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/marble_user_guide/Marble_User_Guide.tex", "max_stars_repo_name": "BerkeleyLab/Marble", "max_stars_repo_head_hexsha": "df6742000361e6a103fdec6a5667684df13a7a9e", "max_stars_repo_licenses": ["Un...
import numpy as np import csv class Grid(object): def __init__(self,n): self.n = n self.x = np.zeros(self.n,dtype=np.float64) self.conc = np.zeros(self.n*4,dtype=np.float64) self.concA = np.zeros(self.n,dtype=np.float64) self.concB = np.zeros(self.n,dtype=np.float64) ...
{"hexsha": "6739c2896cff75fcf02831712353222f1fab5a00", "size": 4016, "ext": "py", "lang": "Python", "max_stars_repo_path": "Simulation Python/grid.py", "max_stars_repo_name": "nmerovingian/dissociativeCE-Simulation-MachineLearning", "max_stars_repo_head_hexsha": "cfbc8b8e6c9e3f2efc994fcf1d207c6266eedf2e", "max_stars_re...
from typing import Callable, Iterable, Sized from itertools import product import numpy as np def convert_tuple_to_array(elements: Iterable, **kw) -> np.ndarray: if "dtype" in kw: dtype = kw["dtype"] else: dtype = np.result_type(*elements) return np.array(elements, dtype=dtype) def car...
{"hexsha": "080d6517f0615fa74a48ca6f5647538f23f77769", "size": 1035, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mckit_meshes/utils/cartesian_product.py", "max_stars_repo_name": "MC-kit/mckit-meshes", "max_stars_repo_head_hexsha": "8aa06ff95ffd1dabac95f399d45047325c265f78", "max_stars_repo_licenses": ["M...
function y = tdis_prb(x,n) % PURPOSE: calculates t-probabilities for elements in x-vector %--------------------------------------------------- % USAGE: y = tdis_prb(x,n) % where: x = vector containing computed t-values % n = degrees of freedom parameter %--------------------------------------------------- % RET...
{"author": "ambropo", "repo": "VAR-Toolbox", "sha": "9fe5d763da307cdded2827851325766b3a7c60e1", "save_path": "github-repos/MATLAB/ambropo-VAR-Toolbox", "path": "github-repos/MATLAB/ambropo-VAR-Toolbox/VAR-Toolbox-9fe5d763da307cdded2827851325766b3a7c60e1/OldVersions/v2dot0/Auxiliary/tdis_prb.m"}
[STATEMENT] theorem f0_asymptotic_space_complexity: "f0_space_usage \<in> O[at_top \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / of_rat \<epsilon>) * (ln (real n) + 1 / (of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / of_rat \<delta>))))" (is "_ \<in>...
{"llama_tokens": 35859, "file": "Frequency_Moments_Frequency_Moment_0", "length": 144}
%HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH \section{Understanding the "right-hand side"\label{RHS}} %HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH As can be seen from the above example, you need to know the exact appearance of the "right-hand side"...
{"hexsha": "b9068821446117fee4b5c832d5ee28648e39fed3", "size": 1993, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Mouse/source/manual/RHS.tex", "max_stars_repo_name": "celer/mouse", "max_stars_repo_head_hexsha": "021a81f0c02fc079a944569ba382f2c9d7b9b9eb", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
# ====================================================== # Copyright (C) 2020 repa1030 # This program and the accompanying materials # are made available under the terms of the MIT license. # ====================================================== import numpy as np import os import math class KNearestNeighbor: de...
{"hexsha": "4ec68ab564c60ba91bd907d45f2d91704ba72400", "size": 2699, "ext": "py", "lang": "Python", "max_stars_repo_path": "classificator1/k_nearest_neighbors.py", "max_stars_repo_name": "repa1030/simple_object_classification", "max_stars_repo_head_hexsha": "14c75f262c512ae6404174a96d818dfda10ed060", "max_stars_repo_li...
import pytest import numpy as np from FindTheTail.ftt import Ftt @pytest.fixture def ftt_with_parameters(): ftt = Ftt(np.arange(10), 'test_data', 100) return ftt @pytest.fixture def ftt_with_data(): ftt = Ftt(np.arange(10), 'test_data') return ftt @pytest.fixture def ftt_data_with_dublicates(): ...
{"hexsha": "dc32cfcc078bcc5139ac9aa7ba665f061442d794", "size": 1128, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_ftt.py", "max_stars_repo_name": "fstroth/findthetail", "max_stars_repo_head_hexsha": "f4525a1393ab362886395bfb3a789446c1ac5143", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
#ifndef INCLUDED_STDDEFX #include "stddefx.h" #define INCLUDED_STDDEFX #endif #ifndef INCLUDED_CALC_OBJECTLINKRUNTIME #include "calc_objectlinkruntime.h" #define INCLUDED_CALC_OBJECTLINKRUNTIME #endif // Library headers. #ifndef INCLUDED_BOOST_FORMAT #include <boost/format.hpp> #define INCLUDED_BOOST_FORMAT #endif #if...
{"hexsha": "de7bfad6850806d4a538a7b98a4fae5a2cfe7b52", "size": 3230, "ext": "cc", "lang": "C++", "max_stars_repo_path": "pcraster/pcraster-4.2.0/pcraster-4.2.0/source/pcraster_model_engine/calc_objectlinkruntime.cc", "max_stars_repo_name": "quanpands/wflow", "max_stars_repo_head_hexsha": "b454a55e4a63556eaac3fbabd97f8a...
from flask import Flask, jsonify from flask_restplus import Resource, Api from google_api import google from pubmed_api import pubmed from bioarchive_api import bioarchive from medrxiv_api import medrxiv import math import json from rake_nltk import Rake import requests import datetime import re from statistics import ...
{"hexsha": "bdd5a24c05763c349b9ca76fed777d0ad1059765", "size": 5506, "ext": "py", "lang": "Python", "max_stars_repo_path": "sci_search_api.py", "max_stars_repo_name": "forensx/hatch2020", "max_stars_repo_head_hexsha": "982e6821ec8f0c1862c208a12bdabbf7fad15101", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
# coding=utf-8 import numpy as np import scipy.sparse as sp from pymg.problem_base import ProblemBase class Helmholtz1D_Periodic(ProblemBase): """Implementation of the 1D Helmholtz problem. Here we define the 1D Poisson problem :math:`-\Delta u - \sigma u = 0` with Dirichlet-Zero boundary conditions. Th...
{"hexsha": "6a9b4e563cce0254d6859a5041bc1db5e637da84", "size": 2511, "ext": "py", "lang": "Python", "max_stars_repo_path": "project/helmholtz1d_periodic.py", "max_stars_repo_name": "amit17133129/pyMG-2016", "max_stars_repo_head_hexsha": "b82a60811bb0a8b91d8793c47177a240221f9176", "max_stars_repo_licenses": ["BSD-2-Clau...
import numpy as np import matplotlib.pyplot as plt from ML_functions import gen_events from density_funcs import rho_baryon from astropy.io import fits hdu = fits.open('galaxy1.fits') data = hdu[1].data def IMF(m): #use a Kroupa IMF #calculated in a seperate jupyter notebook if (m<0.08): alph...
{"hexsha": "182a885424d5da616fe7c65756c0593a6a942ba3", "size": 2420, "ext": "py", "lang": "Python", "max_stars_repo_path": "genbaryons.py", "max_stars_repo_name": "HarrisonWinch96/DarkDisk_Microlensing", "max_stars_repo_head_hexsha": "e25d59051771318239116a8d2036aca8ce70236d", "max_stars_repo_licenses": ["BSD-3-Clause"...
#include <procedural_graph/reader/graph_reader_grammar.h> #include <procedural_graph/reader/named_argument.h> #include <procedural_graph/reader/node_definition_node.h> #include <procedural_graph/reader/node_link_node.h> #include <boost/spirit/include/qi.hpp> #include <gtest/gtest.h> using namespace pagoda; using nam...
{"hexsha": "67e0bf57baff940bee5f4eb83a28a639c2351f9b", "size": 9787, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/unit_tests/procedural_graph/graph_reader_grammar.cpp", "max_stars_repo_name": "diegoarjz/selector", "max_stars_repo_head_hexsha": "976abd0d9e721639e6314e2599ef7e6f3dafdc4f", "max_stars_repo_li...
############################################################### # _ _ _ _ _ # | |__ (_) ___ _ __ __ _ _ __| |_(_) ___| | ___ # | '_ \| |/ _ \| '_ \ / _` | '__| __| |/ __| |/ _ \ # | |_) | | (_) | |_) | (_| | | | |_| | (__| | __/ # |_.__/|_|\___/| .__/ \__,_|_| \__|_|\___|_|\___...
{"hexsha": "ab3999a4fe3f9be668941a919d000ce4634e049d", "size": 2557, "ext": "py", "lang": "Python", "max_stars_repo_path": "doeTests/3DUnstructuredCylinder/createMesh.py", "max_stars_repo_name": "edsaac/bioparticle", "max_stars_repo_head_hexsha": "67e191329ef191fc539b290069524b42fbaf7e21", "max_stars_repo_licenses": ["...
# https://github.com/JuliaDiffEq/DifferentialEquations.jl/issues/525 using OrdinaryDiffEq, StaticArrays, Test mutable struct SimType{T} <: DEDataVector{T} x::Array{T,1} f1::T end function f(u,p,t) # new out-of-place definition SimType([-0.5*u[1] + u.f1, -0.5*u[2]],u.f1) end function f!...
{"hexsha": "3debbad17a3fcb2a544804ac71b1bcf1b7ab8e9d", "size": 4162, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/downstream/data_array_regression_tests.jl", "max_stars_repo_name": "frankschae/DiffEqBase.jl", "max_stars_repo_head_hexsha": "406640750d8bf6e38009a40d377fa6d95717fe04", "max_stars_repo_license...
#!/usr/bin/env /usr/bin/python3 import numpy as np ################################################################################ #=============================================================================== # geometry.py #=============================================================================== ###########...
{"hexsha": "e97a81fc1db11353e8ac5b43c5bff45b44cdaf0f", "size": 1230, "ext": "py", "lang": "Python", "max_stars_repo_path": "flat_source/geometry.py", "max_stars_repo_name": "HopyanLab/ConPT2D", "max_stars_repo_head_hexsha": "4e5cb2de8959c88b79613431fb9fb71675db17ca", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy as np from simple_convnet.helpers import ( filter2D, batch_filter3D, padarray, atleast, safe_exp, safe_log, choice, imshow ) from matplotlib import pyplot as plt from time import time from skimage.transform import downscale_local_mean class Layer(object): def __init__(self, input_shape, rand_...
{"hexsha": "a178e7757858331e2d0db6e767e6d1fd3f157c95", "size": 34064, "ext": "py", "lang": "Python", "max_stars_repo_path": "simple_convnet/convnet.py", "max_stars_repo_name": "bbabenko/simple_convnet", "max_stars_repo_head_hexsha": "015dd33be80365f704049790a547a2b3e0251f2a", "max_stars_repo_licenses": ["MIT"], "max_st...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Dec 18 06:01:03 2021 @author: hakimbmkg """ import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import pandas as pd import librosa import librosa.display import matplotlib.pyplot as plt plt.rcParams['agg.path.chunksize'] = 1000000 from tqdm import tqdm...
{"hexsha": "8011e3b1d463d765905ca870bdd66ed4e534fb3b", "size": 18234, "ext": "py", "lang": "Python", "max_stars_repo_path": "LinduAI/preprocessing/transform.py", "max_stars_repo_name": "hakimbmkg/linduAI", "max_stars_repo_head_hexsha": "7d413ba03d54498dfe4871136748d95527e6d575", "max_stars_repo_licenses": ["MIT"], "max...
""" Benchmarks for code in pandas/_libs, excluding pandas/_libs/tslibs, which has its own directory """ import numpy as np from pandas._libs.lib import ( is_list_like, is_scalar, ) from pandas import ( NA, NaT, ) # TODO: share with something in pd._testing? scalars = [ 0, 1.0, 1 + 2j, ...
{"hexsha": "f5c2397945cea52fd66be72ca57beaa9f654cc9d", "size": 746, "ext": "py", "lang": "Python", "max_stars_repo_path": "asv_bench/benchmarks/libs.py", "max_stars_repo_name": "oricou/pandas", "max_stars_repo_head_hexsha": "9405e58d9268041f5416711c051cf5429a19bf49", "max_stars_repo_licenses": ["PSF-2.0", "Apache-2.0",...
import os import pickle import numpy as np from numbers import Number from typing import Union, Optional, Dict from .common import get_datetime, mkdir from .metric import Metric class Logger: """ Log training statistics and visualize them via Tensorboard. Parameters ---------- root : str ...
{"hexsha": "e0b0099f96ea27c1a5f2188c749a84f9d1f17dd8", "size": 4006, "ext": "py", "lang": "Python", "max_stars_repo_path": "alkaid/utils/logger.py", "max_stars_repo_name": "Renovamen/alkaid", "max_stars_repo_head_hexsha": "78bb19c3d18856234dec9444235b749c6006655f", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
SUBROUTINE setvars ! set variables we have found are undefined C-------------------------------- common /cantenna/ numants,iats(20),anttype(20),antname(20), + xfqs(20),xfqe(20),designfreq(20),antfile(20), + beammain(20),offazim(20),cond(20),diel(20), ...
{"hexsha": "7de8e50775ec691e905b297fbe28d4dd6257af85", "size": 1892, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "src/voacapw/setvars.for", "max_stars_repo_name": "jawatson/voacapl", "max_stars_repo_head_hexsha": "6861fbad041ff7a56b8875c735c9242c81a94320", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_...
""" Purpose: Sample size Date created: 2020-11-19 Ref: https://www.qualtrics.com/experience-management/research/determine-sample-size/ https://github.com/shawnohare/samplesize/blob/master/samplesize.py Contributor(s): Mark M. """ try: from secrets import SystemRandom except ModuleNotFoundError: ...
{"hexsha": "e1115fe56b498d3201b93529f7eeb195c50a5133", "size": 4840, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebook-samples/sample_size.py", "max_stars_repo_name": "MarkMoretto/python-examples-main", "max_stars_repo_head_hexsha": "37b8c41d2f175029f4536ca970f037ff19b4e951", "max_stars_repo_licenses": ["...
import numpy as np from ..constants import log def load_assimp(file_obj, file_type=None): ''' Use the assimp library to load a mesh, from a file object and type, or filename (if file_obj is a string) Assimp supports a huge number of mesh formats. Performance notes: in tests on binary STL pyassim...
{"hexsha": "ad57009bb8fb670e41ca2595c2bfd2ec3102bf9b", "size": 2042, "ext": "py", "lang": "Python", "max_stars_repo_path": "basis/trimesh/io/assimp.py", "max_stars_repo_name": "takuya-ki/wrs", "max_stars_repo_head_hexsha": "f6e1009b94332504042fbde9b39323410394ecde", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# This file is part of the pyMOR project (http://www.pymor.org). # Copyright 2013-2020 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) from pymor.core.config import config if config.HAVE_TORCH: from numbers import Number i...
{"hexsha": "f41c80b8a97130bbfcfcbd769a79cc83c383f9f8", "size": 24315, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pymor/reductors/neural_network.py", "max_stars_repo_name": "TreeerT/pymor", "max_stars_repo_head_hexsha": "e8b18d2d4c4b5998f0bd84f6728e365e0693b753", "max_stars_repo_licenses": ["Unlicense"],...
module SD_ale_boundary_operator #include <messenger.h> use mod_kinds, only: rk,ik use mod_constants, only: ZERO,ONE,TWO,HALF use type_operator, only: operator_t use type_chidg_worker, only: chidg_worker_t use type_properties, only: prope...
{"hexsha": "b29cd5909cd835efd4abf865c73fe40aeeb66294", "size": 4211, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/equations/scalar/scalar_diffusion_ale/SD_ale_boundary_operator.f90", "max_stars_repo_name": "wanglican/ChiDG", "max_stars_repo_head_hexsha": "d3177b87cc2f611e66e26bb51616f9385168f338", "max_...
#!/usr/bin/env python # Author: Tony Zheng import rospy import time import roslib import sys import cv2 import scipy.linalg import numpy as np from geometry_msgs.msg import Twist from std_msgs.msg import String, Int32, Float32, Float32MultiArray, Bool, Float64 from sensor_msgs.msg import Image, CompressedImage from m...
{"hexsha": "9415ed165b5f0ec75a45d328542366bf9e875a4d", "size": 23839, "ext": "py", "lang": "Python", "max_stars_repo_path": "workspace/src/labs/src/lab7/image_processing_lane_keeping.py", "max_stars_repo_name": "treyfortmuller/barc", "max_stars_repo_head_hexsha": "29c1e6e2f5ad530b4020c552eea8e82411c2a0af", "max_stars_r...
import numpy as np def bridge(var, steps, state=None): """1D Brownian bridge in the time interval [0,1] # Arguments var: variance of the Brownian bridge steps: number of time steps to simulate state: state of random number generator # Result trace of the bridge """ i...
{"hexsha": "ce283dc38e469488f503a939fd9f39ab37d1d148", "size": 620, "ext": "py", "lang": "Python", "max_stars_repo_path": "jellium/bridge.py", "max_stars_repo_name": "Christian-Hirsch/jellium", "max_stars_repo_head_hexsha": "f3887af722a1793207ecfeeb2fd2d8f81bbfc5c5", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" This module provides the EvaluateModel class. """ import logging import os import warnings import numpy as np import torch import torch.nn as nn from selene_sdk.sequences import Genome from selene_sdk.utils import ( PerformanceMetrics, initialize_logger, load_model_from_state_dict, ) from sklearn.metri...
{"hexsha": "8a691c6aef7419221efe5ffbeaeab2da92ab23b6", "size": 7243, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/evaluation/evaluate_model.py", "max_stars_repo_name": "AIRI-Institute/DeepCT", "max_stars_repo_head_hexsha": "8e23fda101bd4a2bce2c98c5a73d97072a3892de", "max_stars_repo_licenses": ["Apache-2.0...
import pandas as pd import numpy as np import sklearn from sklearn.linear_model import LogisticRegression from sklearn.svm import SVC import sklearn.metrics as metrics import matplotlib.pyplot as plt import ipdb blabels = pd.read_csv('bad_label_losses.csv') glabels = pd.read_csv('good_label_losses.csv') blabels['labe...
{"hexsha": "46c2f9ebc86355e490e1e7f71a31dc200dc6c76b", "size": 1422, "ext": "py", "lang": "Python", "max_stars_repo_path": "trainLR.py", "max_stars_repo_name": "bhaprayan/keras-yolo3", "max_stars_repo_head_hexsha": "9ad5ff761f3baf9042a17327c0149591ce1307c8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
c c ---------------------------------------------------------------------- c subroutine fsicxx(fic,sc,gc,fmass,fwidth , fsic) c c this subroutine computes an off-shell antifermion wavefunction from a c flowing-in external antifermion and a vector boson. c ...
{"hexsha": "549de7c5ba112c72c43162dfaa7ee4b7d6a45e13", "size": 1910, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "HELAS/fsicxx.f", "max_stars_repo_name": "valassi/mg5amc_test", "max_stars_repo_head_hexsha": "2e04f23353051f64e1604b23105fe3faabd32869", "max_stars_repo_licenses": ["NCSA"], "max_stars_count": 5, ...
""" Class average finetuning functions. Before using any of these finetuning functions, ensure that the model is set up with nb_classes=2. """ from __future__ import print_function import sys import uuid import numpy as np from os.path import dirname from time import sleep from keras.optimizers import Adam from g...
{"hexsha": "13bc1b6b4db0459eef58b85f4a7175fca07ba0e4", "size": 13300, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepmoji/class_avg_finetuning.py", "max_stars_repo_name": "Bodzio-2/DeepMoji", "max_stars_repo_head_hexsha": "4081db22f9bcb0305ee930bf75c1e4cc76aa1c2f", "max_stars_repo_licenses": ["MIT"], "max_s...
''' xECG Project Repository (https://github.com/jtrpinto/xECG) File: train_model_uoftdb.py - Uses data from prepare_data.py and the Model class from models.py to train a model for biometric identification on the UofTDB database. The training routine can be found at trainers.py. "Explaining ECG Biometric...
{"hexsha": "8a159e5be644219e8fa919a7e35e40985893172c", "size": 4060, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_model_uoftdb.py", "max_stars_repo_name": "jtrpinto/xECG", "max_stars_repo_head_hexsha": "e062cd94defb49ae946c1874267a36713733baba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ...
import numpy as np class MeshIOInterface: """ Mesh reader/writer interface for meshio """ def read(self, mesh_file): assert mesh_file[-4:] == '.ply', "Only PLY format for input mesh" # Read mesh import meshio mesh = meshio.read(mesh_file) # Check that it is triangulat...
{"hexsha": "50f2bc0eea6962f97ad19d6da4aa1eaba88d0ba3", "size": 6533, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tools/mesh_interfaces.py", "max_stars_repo_name": "rolanddenis/MeshDD", "max_stars_repo_head_hexsha": "83e2f0faae3f4e90075a7f3135c8c66fd8721b7f", "max_stars_repo_licenses": ["MIT"], "max_stars...
# # -*- coding: utf-8 -*- # """ # Created on Wed Feb 3 12:49:07 2021 # @author: user # """ import mph from polygen import random_poly from polygen import poly_add from polygen import poly_draw import os os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE" import jpype import pandas as pd import numpy as np import matplotlib...
{"hexsha": "49be98cc777aa17fad93c30f5590b5c7df3b86f0", "size": 673, "ext": "py", "lang": "Python", "max_stars_repo_path": "comsol/comsol_connect.py", "max_stars_repo_name": "ITMO-NSS-team/cell-trap-design", "max_stars_repo_head_hexsha": "161c4c98c0c068516277ab096d407013427cf340", "max_stars_repo_licenses": ["BSD-3-Clau...
Subroutine ptoh Parameter (maxstr=150001) Double Precision gxp, gyp, gzp, ftp, pxp, pyp, pzp, pep, pmp Double Precision gxp0, gyp0, gzp0, ft0fom, drlocl Double Precision enenew, pxnew, pynew, pznew, beta2, gam Double Precision ftavg0, gxavg0, gyavg0, gzavg0, bex, bey, bez Double Precision pxsgs, pysgs, pzsg...
{"hexsha": "ec13827f7ef6733cccea14bfaa89fd8c68732818", "size": 10915, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/ptoh.f90", "max_stars_repo_name": "xiaohaijin/AMPT", "max_stars_repo_head_hexsha": "90c7a1ab4dc04a092e64af759d53e22f6fea5b02", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max...
[STATEMENT] lemma typing_swp: assumes "\<Gamma>(a \<mapsto> \<sigma>) \<turnstile> M : \<tau>" "b \<notin> fvs M" shows "\<Gamma>(b \<mapsto> \<sigma>) \<turnstile> [a \<leftrightarrow> b] \<cdot> M : \<tau>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Gamma>(b \<mapsto> \<sigma>) \<turnstile> [a \<leftrigh...
{"llama_tokens": 1736, "file": "Name_Carrying_Type_Inference_SimplyTyped", "length": 16}
import numpy as np import aoc_helper FLOOR = np.array(list(map(list, aoc_helper.day(25).splitlines()))) EMPTY, EAST, SOUTH = ".>v" def step(): moving_east = (FLOOR == EAST) & np.roll(FLOOR == EMPTY, -1, 1) FLOOR[moving_east] = EMPTY FLOOR[np.roll(moving_east, 1, 1)] = EAST moving_south = (FLOOR == ...
{"hexsha": "a9409507828f50d5dd86e749c4b051fc5db56d7c", "size": 575, "ext": "py", "lang": "Python", "max_stars_repo_path": "2021/day_25.py", "max_stars_repo_name": "salt-die/Advent-of-Code", "max_stars_repo_head_hexsha": "b0344dafda4576b41023134b8289c08af877a77a", "max_stars_repo_licenses": ["Unlicense"], "max_stars_cou...