text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import plotly.express as px from dash import dcc, html, Dash import dash_bootstrap_components as dbc from dash.dependencies import Input, Output, State import pandas as pd import numpy as np import os import dash ### FIGURES ### from .plotlyfunctions import * # Build App def init_dashboard(server): ...
{"hexsha": "bca4aea5a257f302fd3172d28d482f8470a5553d", "size": 2984, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/dashboards/forecast/train.py", "max_stars_repo_name": "wesleybeckner/truffletopia", "max_stars_repo_head_hexsha": "574caf24b41126d3d71c45b49cfd44820c42fa7e", "max_stars_repo_licenses": ["MIT"...
import time import os import tensorflow as tf import numpy as np from keras.optimizers import Adam from keras.layers import Input import Model import Util class DeRed(): def __init__(self,orientation): self.orientation = orientation self.filter = 32 self.data_path = '../Data/' se...
{"hexsha": "24bbc8e9ca44afa29210e56525ba5740fcdbd6af", "size": 3081, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code/DeRed.py", "max_stars_repo_name": "DezhengTian/DeRed-Harmonization", "max_stars_repo_head_hexsha": "5c22d874ec61643d5dee0a43ffe817db5cae18b5", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- vim:set ts=4 sw=4 sts=4 noet: */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "load/var.h" #include <boost/uuid/uuid_io.hpp> #include "bc/pack.h" #include "cellml.h" #include "database.h" #include "lo.pb.h" #include "phml.h" #incl...
{"hexsha": "81d854ea74a241feb005bb3b775da0aff0199185", "size": 3884, "ext": "cc", "lang": "C++", "max_stars_repo_path": "test/load/test_var.cc", "max_stars_repo_name": "Abhisheknishant/Flint", "max_stars_repo_head_hexsha": "441beab56d21e4069b858ae6588fa0fa3084d722", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
REBOL [ Title: "Testing library" File: %spec.r Author: "Kirill Temnov" Date: 15/11/2015 ] test-suite: context [ name: "" total: "" errors: 0 fails: 0 assert: func [ block ][ if error? try [ r: do block either do block [ ...
{"hexsha": "b7181b5c446e1dfe4cf938592d36b5c12c1bb0be", "size": 876, "ext": "r", "lang": "R", "max_stars_repo_path": "tests/spec.r", "max_stars_repo_name": "KirillTemnov/stack-vm", "max_stars_repo_head_hexsha": "b3b5ddcc6da7e454d0433c22ad7d7ba78c279597", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_sta...
#ifndef N_BODY_PHYSICAL_HPP #define N_BODY_PHYSICAL_HPP #include "communication.hpp" #include "config.hpp" #include "data.hpp" #include "logging.hpp" #include "space.hpp" #include "tree.hpp" #include <boost/archive/xml_oarchive.hpp> #include <boost/mpi.hpp> #include <cmath> #include <cstddef> namespace n_body::physic...
{"hexsha": "1677364b618111ee7d20ad04b0faacb007c4ff55", "size": 6233, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/physical.hpp", "max_stars_repo_name": "linyinfeng/n-body", "max_stars_repo_head_hexsha": "e40c859689d76a3f36cd08e072d7ee24685e8be4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0, "...
\documentclass[10pt]{sigplanconf} \usepackage[compact]{titlesec} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amssymb} \usepackage{url} \usepackage{color} \usepackage{multirow} \setlength{\textfloatsep}{8pt} \newcommand{\Value}{\mathbf{value}} \newcommand{\Any}{\mathbf{any}} \newcommand{\Nil}{\mathbf...
{"hexsha": "da65a1761927c2f74d3233bb34ca2f0633969750", "size": 82737, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/papers/dls15/paper.tex", "max_stars_repo_name": "andremm/typedlua", "max_stars_repo_head_hexsha": "2ff68c56668da62b0fa8e7256f70f3ca1475586a", "max_stars_repo_licenses": ["MIT", "Unlicense"], "m...
\section{Partition function} Theories with an action can be quantized using a path integral. The partition function in Euclidean signature is defined as % \footnote{ % Wick rotation analytically continues time to imaginary (Euclidean) time, $t\rightarrow -i t_E$, % then the oscillatory exponential becomes decaying. } ...
{"hexsha": "f169b913dac53bf56299f2f74f754ad2402e5707", "size": 11872, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Chapters/PartitionFunctions.tex", "max_stars_repo_name": "yixinyi/PhDThesis", "max_stars_repo_head_hexsha": "fa5e6d89bf6e7658cebae8bab8a3d22fe4e53e29", "max_stars_repo_licenses": ["MIT"], "max_star...
import os import numpy as np import pandas as pd from time import time, sleep from datetime import timedelta from torch.utils.tensorboard import SummaryWriter from tensorboard.backend.event_processing import event_accumulator from tqdm import tqdm from .algo.base import Algorithm from .env import NormalizedE...
{"hexsha": "943401f914012a4379580df049f55bbdc68727cd", "size": 4385, "ext": "py", "lang": "Python", "max_stars_repo_path": "cail/trainer.py", "max_stars_repo_name": "Stanford-ILIAD/Confidence-Aware-Imitation-Learning", "max_stars_repo_head_hexsha": "1d8af0e4ab87a025885133a2384d5a937329b2f5", "max_stars_repo_licenses": ...
#ifndef UNIT_TESTS_JSON_EQUAL #define UNIT_TESTS_JSON_EQUAL #include <boost/test/unit_test.hpp> #include "osrm/json_container.hpp" #include "util/json_deep_compare.hpp" inline boost::test_tools::predicate_result compareJSON(const osrm::util::json::Value &reference, ...
{"hexsha": "1453086e0dec6448a76a8f89c922844516369ebe", "size": 721, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "unit_tests/library/equal_json.hpp", "max_stars_repo_name": "jhermsmeier/osrm-backend", "max_stars_repo_head_hexsha": "7b11cd3a11c939c957eeff71af7feddaa86e7f82", "max_stars_repo_licenses": ["BSD-2-Cla...
#!/usr/local/bin/python """ *********************************************** - PROGRAM: matrix2tab.py - CONTACT: Bryan lajoie (bryan.lajoie@umassmed.edu) *********************************************** """ from __future__ import print_function from __future__ import division import numpy as np import scipy as sp impor...
{"hexsha": "e060efb3b5ae045ae97d60ab195831989417a867", "size": 14297, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/python/matrix2tab.py", "max_stars_repo_name": "sergpolly/cworld-dekker", "max_stars_repo_head_hexsha": "7557bbe873e623e9059482722922faca4e784ad0", "max_stars_repo_licenses": ["Apache-2.0"...
#!/bin/python # This script will ... # # # # TO DO: annotation paths are hard coded and if two-sided or one-sided p-values are also hard coded # # # Abin Abraham # created on: 2020-01-05 08:20:56 import os import sys import numpy as np import pandas as pd import pickle from .helper_general import safe_mkdir f...
{"hexsha": "7804716456647ec213df03a29488ce0f81fe474b", "size": 2158, "ext": "py", "lang": "Python", "max_stars_repo_path": "gsel_vec/scripts/helper_calc_genome_distribution_of_annotations.py", "max_stars_repo_name": "abraham-abin13/gsel_vec", "max_stars_repo_head_hexsha": "486baa867f95f1d9d106e59a00e408d14ac42271", "ma...
[STATEMENT] lemma reduce_system_matrix_signs_helper_aux_R: fixes p:: "real poly" fixes qs :: "real poly list" fixes subsets :: "(nat list*nat list) list" fixes signs :: "rat list list" fixes S:: "nat list" assumes well_def_h: "\<forall>x. List.member S x \<longrightarrow> x < length signs" assumes nonz...
{"llama_tokens": 9144, "file": "BenOr_Kozen_Reif_Renegar_Proofs", "length": 66}
theory Semantics imports Main begin section {* The Language *} subsection {* Variables and Values *} type_synonym vname = string -- "names for variables" datatype val = Bool bool -- "Boolean value" | Intg int -- "integer value" abbreviation "true == Bool True" abbreviation "false == Bool False" ...
{"author": "Josh-Tilles", "repo": "AFP", "sha": "f4bf1d502bde2a3469d482b62c531f1c3af3e881", "save_path": "github-repos/isabelle/Josh-Tilles-AFP", "path": "github-repos/isabelle/Josh-Tilles-AFP/AFP-f4bf1d502bde2a3469d482b62c531f1c3af3e881/thys/VolpanoSmith/Semantics.thy"}
# !/usr/bin/env python # -*- coding:utf-8 -*- import argparse import cv2 import numpy as np def color_encode(color): if color == 'red': return (0,0,255) elif color == 'blue': return (255,0,0) elif color == 'green': return (0,255,0) elif color == 'yellow': return (0,255,...
{"hexsha": "07a623233d7a564c021bf57899ac2574810de382", "size": 2253, "ext": "py", "lang": "Python", "max_stars_repo_path": "others/change_bg_color.py", "max_stars_repo_name": "daishoui/ex", "max_stars_repo_head_hexsha": "fd75f6a907cabb6c60036136b6a182a7d025d4b3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import os from operator import add import numpy as np import torch from PIL import Image from torchvision.datasets import CocoDetection from transforms import ToImgaug, ImgaugToTensor class CocoMask(CocoDetection): def __init__(self, root, annFile, transform=None, target_transform=None, transforms=None, use_mas...
{"hexsha": "88cb95bfbf43fff29cdd5e21e133c70fe7027323", "size": 2181, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets.py", "max_stars_repo_name": "danmalowany/trains-model-zoo", "max_stars_repo_head_hexsha": "2091100057afae9593b18ddcefd81b7d46724a96", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
% Time-Variable Input In earlier versions of MODFLOW, most stress-boundary packages read input on a stress period-by-stress period basis, and those values were held constant during the stress period. In \programname{}, many stress values can be specified with a higher degree of time resolution (from time step to time ...
{"hexsha": "f2aaa4c05e7b2439f7b8b00bae2465172d429a24", "size": 19456, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/mf6io/gwf/tsi.tex", "max_stars_repo_name": "scharlton2/modflow6", "max_stars_repo_head_hexsha": "83ac72ee3b6f580aaffef6352cf15c1697d3ce66", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_co...
import sys import socket import binascii import networkx as nx import matplotlib.pyplot as plt from pcapng import FileScanner from pcapng import blocks def get_pcap_packet_blocks(filename): packet_blocks = [] with open(filename, 'rb') as fp: scanner = FileScanner(fp) for block in scanner: ...
{"hexsha": "8bed8c14d8a6636cd350221f7b321433568c4f52", "size": 3116, "ext": "py", "lang": "Python", "max_stars_repo_path": "simple-pcapng-visualizer.py", "max_stars_repo_name": "heyi1999/simple-pcapng-visualizer", "max_stars_repo_head_hexsha": "785102efd2408e7526c0aebecbe2da057b697bf9", "max_stars_repo_licenses": ["Apa...
#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsign-compare" #include <boost/test/unit_test.hpp> #pragma GCC diagnostic pop #include <eosio/chain/exceptions.hpp> #include <eosio/chain/resource_limits.hpp> #include <eosio/testing/tester.hpp> #include <fc/exception/exception.hpp> #include <fc/variant_obj...
{"hexsha": "3e9a9318229930f1204f021821da0e305dc1652d", "size": 5162, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "unittests/rem_account_price_test.cpp", "max_stars_repo_name": "Remmeauth/core", "max_stars_repo_head_hexsha": "578996ce408ca0adbe6a6b895177199017ee907b", "max_stars_repo_licenses": ["MIT"], "max_sta...
modelMatrix = function(x, interactions = FALSE, intercept = FALSE){ #' Create a sparse design matrix from data frame #' #' \code{modelMatrix} takes in a data.frame and encodes it as a sparse model.Matrix object. #' Factors use treatment ("one-hot") encoding, creating indicator variables from categorical #'...
{"hexsha": "00a3e7e5ef29bfc4e15df8eeeb91e7ff4ba9e1e6", "size": 1639, "ext": "r", "lang": "R", "max_stars_repo_path": "R/modelMatrix.r", "max_stars_repo_name": "dhelkey/babymonitor", "max_stars_repo_head_hexsha": "591dbfa43678ee25be1ea0d9601da78735be0639", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
from constants import Directions import numpy as np import matplotlib.pyplot as plt import time def simple_run(pool, direction): def forward(f_pool): node_to_run = f_pool[0] f_pool = f_pool[1:] node_to_run.forward() f_pool.extend(list(filter(lambda ol: ol.can_forward, node_to_run.g...
{"hexsha": "3ee64c083d495c404d372936a352e5fecd4ac9cb", "size": 4311, "ext": "py", "lang": "Python", "max_stars_repo_path": "session.py", "max_stars_repo_name": "WallFacer5/ArtifIdiot", "max_stars_repo_head_hexsha": "698aac564901f64138b1e6287ab1996792a8f2fa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
```python import numpy as np from pycalphad import Model, Database, calculate, equilibrium import pycalphad.variables as v #dbf = Database('2016-08-10-AlGdMgand18RLPSO-for 3d plot.tdb') dbf = Database('alfe_sei.TDB') models = {key: Model(dbf, ['AL', 'FE', 'VA'], key) for key in dbf.phases.keys()} ``` ```python #Set ...
{"hexsha": "9b9edb92a41123cdf5c658be1aaf878ab40cdfde", "size": 806655, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "EqPerformance-solveq.ipynb", "max_stars_repo_name": "richardotis/pycalphad-sandbox", "max_stars_repo_head_hexsha": "43d8786eee8f279266497e9c5f4630d19c893092", "max_stars_repo_licens...
import matplotlib.pyplot as plt import numpy as np from typing import List def bits_to_int_list(bits: str) -> List[int]: """ Ex: 1010100 -> [1, 0, 1, 0, 1, 0, 0] """ bits = list(map(int, bits)) return bits def make_graph(signal: List[int], bits: List[int], title: str) -> None: """Use...
{"hexsha": "945432d729e002edb16c7d46be99ec4d9f1c4ac5", "size": 4701, "ext": "py", "lang": "Python", "max_stars_repo_path": "bits_to_plot.py", "max_stars_repo_name": "renan-cunha/signal_encoding", "max_stars_repo_head_hexsha": "16ae675fb6575f13219f44dc15c2eb1c84069632", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
module TestPatterns using Test using ReTest: and, or, not, interpolated, reachable, depth, pass, fail, iter import ReTest struct MockTestset id marks parent iter MockTestset() = new(rand(1:typemax(Int)), ReTest.Marks(), nothing, 1) end ReTest.tsdepth(::MockTestset) = 1 const basic_patterns = [a...
{"hexsha": "dc7cc65bf92f4deda0706c2353117b0dfe7f70c6", "size": 2595, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_patterns.jl", "max_stars_repo_name": "danielsoutar/ReTest.jl", "max_stars_repo_head_hexsha": "4831b0fc23f2897bbeb999de9bdd14e968653199", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
program t integer::ierr,i character(5)::s 100 format (i0) open(unit=77,file='infile',status='old',iostat=ierr) read(77,fmt='(a)',iostat=ierr) s print 100,ierr print '(a)',s close(77,iostat=ierr) end program t
{"hexsha": "fdb1879ff0f73c9226e85d66f2cffb282e7c744a", "size": 223, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/t0180r/t.f90", "max_stars_repo_name": "maddenp/ppp", "max_stars_repo_head_hexsha": "81956c0fc66ff742531817ac9028c4df940cc13e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
import numpy as np import fastfilters as ff import vigra import time class Timer(object): def __enter__(self): self.a = time.clock() return self def __exit__(self, *args): self.b = time.clock() self.delta = self.b - self.a a = np.zeros((5000,5000)).astype(np.float32) for order in [0,1,2]: for sigma in [...
{"hexsha": "914c2c5928fe6cc64f0b23915b391e57e2e59696", "size": 4099, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmark/bench_vigra.py", "max_stars_repo_name": "k-dominik/fastfilters", "max_stars_repo_head_hexsha": "715281e8ee20e15080e416b60e13e1d33984908f", "max_stars_repo_licenses": ["MIT"], "max_stars_...
""" @author: Torben Gräber """ # Imports import numpy as np import matplotlib.pyplot as plt import GPyOpt # Keras and Tensorflow Imports from keras.callbacks import ModelCheckpoint # Custom Imports from .HelperFunctions import ensure_dir, get_color_setup from .HelperFunctions import save_pickle_file, l...
{"hexsha": "eec7e32853f342902f242cf18daaf26e829c4565", "size": 22932, "ext": "py", "lang": "Python", "max_stars_repo_path": "StatePerception/Trainer.py", "max_stars_repo_name": "graebe/StatePerception", "max_stars_repo_head_hexsha": "bba6743ef95ba5f1d693ba9d409188e37b0d95ec", "max_stars_repo_licenses": ["BSD-3-Clause"]...
import deepmatcher as dm import numpy as np np.random.seed(42) import random random.seed(42) if __name__ == "__main__": data_dir = "/home/zz/Work/data/deepmatcher_toy/sample_data/itunes-amazon" train, validation, test = \ dm.data.process(path=data_dir, check_cached_data=False, ...
{"hexsha": "cacd15bd541f6934f979688a2423f230987cd12b", "size": 2017, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sandbox/dm_test.py", "max_stars_repo_name": "ziqizhang/wop_matching", "max_stars_repo_head_hexsha": "dd1beb12284c1dd43889c09b4935b8fe20f7c36c", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
import pickle import numpy as np from scipy.stats import entropy from create_edgelist import read_network from collections import Counter G, mapping = read_network(network_type='directed') scratch_base = '/scratch/larock.t/shipping/results/interpolated_paths/' #scratch_base = '../results/interpolated_paths/' data = d...
{"hexsha": "1d750f2c6f3ea3b8578c49c2699ccda8b7f97255", "size": 1978, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/degreeseq_vs_routeseq.py", "max_stars_repo_name": "tlarock/shipping", "max_stars_repo_head_hexsha": "9d8e608e98824281126248d726783eda8ddf80f5", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '0' from numpy.random import randn, randint from decimal import Decimal from tqdm import tqdm import pickle from tensorflow.keras.utils import plot_model from cDCGAN.Discriminator import make_discriminator from cDCGAN.Generator import make_generator import tensorf...
{"hexsha": "f3eead6a15850b160fdbbecd28d6381ab9d0348e", "size": 6840, "ext": "py", "lang": "Python", "max_stars_repo_path": "cDCGAN/cdcgan.py", "max_stars_repo_name": "Laende/Bacheloroppgave-droneteknologi", "max_stars_repo_head_hexsha": "15d9b2cd0eeba47fd2e9615fb01d598516826194", "max_stars_repo_licenses": ["MIT"], "ma...
[STATEMENT] lemma nn_integral_count_space_reindex: "inj_on f A \<Longrightarrow>(\<integral>\<^sup>+ y. g y \<partial>count_space (f ` A)) = (\<integral>\<^sup>+ x. g (f x) \<partial>count_space A)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. inj_on f A \<Longrightarrow> integral\<^sup>N (count_space (f ` A)) g...
{"llama_tokens": 190, "file": "MFMC_Countable_MFMC_Misc", "length": 1}
""" SubgradientMaster Implementation of projected subgradient method """ mutable struct SubgradientMaster <: AbstractLagrangeMaster num_vars::Int num_functions::Int eval_f::Union{Nothing,Function} iter::Int # current iteration count maxiter::Int obj_limit::Float64 f::Float64 best_...
{"hexsha": "e95599ce178e18658f47883c746b08abd02e4c51", "size": 4085, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/LagrangeMaster/SubgradientMethod.jl", "max_stars_repo_name": "kibaekkim/JuDD.jl", "max_stars_repo_head_hexsha": "de25e24f1475e3aaa5908335ba6749e88125c953", "max_stars_repo_licenses": ["MIT"], "...
from collections.abc import Sequence import numbers import numpy as np from brian2.core.variables import Variables, get_dtype from brian2.groups.group import Group, CodeRunner from brian2.utils.logger import get_logger from brian2.units.fundamentalunits import Quantity from brian2.units.allunits import second __all_...
{"hexsha": "d49af0a604ad2883c342c42bf534df3ffde428c6", "size": 16296, "ext": "py", "lang": "Python", "max_stars_repo_path": "brian2/monitors/statemonitor.py", "max_stars_repo_name": "adriangb/brian2", "max_stars_repo_head_hexsha": "eef588f9b258af82dc5f8f06599ecf11bcaae53e", "max_stars_repo_licenses": ["BSD-2-Clause"], ...
#!/usr/bin/env python3 import numpy as np from numpy import sin, cos from numpy.linalg import eig from scipy.integrate import solve_ivp import matplotlib.pyplot as plt def system(t, x): plant = np.array([ [ 0.0, 1.0], [-1, -0.1] ]) desired_point = np.array([1.0,0.0]) error = desire...
{"hexsha": "a74279f16b58d376348508ec74252ef64ea75e71", "size": 675, "ext": "py", "lang": "Python", "max_stars_repo_path": "autopilot/proof.py", "max_stars_repo_name": "FunRoss7/sailing", "max_stars_repo_head_hexsha": "f4c931ea65b5c12ae3d6c4f533cd864da97f908c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
'''Test utilities in xroms''' import xroms import xarray as xr import numpy as np import cartopy grid = xr.open_dataset('tests/input/grid.nc') ds = xr.open_dataset('tests/input/ocean_his_0001.nc') # combine the two: ds = ds.merge(grid, overwrite_vars=True, compat='override') def test_argsel2d(): '''Check that ...
{"hexsha": "84a28285e3e5efeb5ca960ea11194b94d9db6c39", "size": 3745, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_utils.py", "max_stars_repo_name": "ocefpaf/xroms", "max_stars_repo_head_hexsha": "763d6e678e28fe074e0aaab26fecd2b74e51a8b0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "m...
#!/usr/bin/env python # -*- coding: utf-8 -*- from time import time import random import networkx as nx def random_walk(G, path_length, alpha=0, rand=random.Random(), start=None): """ Returns a truncated random walk. path_length: Length of the random walk. alpha: probability of restarts. ...
{"hexsha": "717f95e3d665d5f13a206e5e7ee7834966e49bc1", "size": 1189, "ext": "py", "lang": "Python", "max_stars_repo_path": "algorithms/deepwalk/graph.py", "max_stars_repo_name": "mpoiitis/GraphM-framework", "max_stars_repo_head_hexsha": "82904b9940b029579b86c359e17312cfa7ef1692", "max_stars_repo_licenses": ["MIT"], "ma...
/* * Copyright (c) 2019 Opticks Team. All Rights Reserved. * * This file is part of Opticks * (see https://bitbucket.org/simoncblyth/opticks). * * 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 ...
{"hexsha": "f475b6f03dd0afb6d673aee5f8f7fe6826a7e3ee", "size": 12497, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "npy/NGeoTestConfig.cpp", "max_stars_repo_name": "hanswenzel/opticks", "max_stars_repo_head_hexsha": "b75b5929b6cf36a5eedeffb3031af2920f75f9f0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
#!/usr/bin/env python3 import pandas as pd import numpy as np import math import os import sys from datetime import datetime, timedelta import matplotlib.pyplot as plt import matplotlib.ticker as mticker from jmaloc import MapRegion import cartopy.crs as ccrs import cartopy.feature as cfeature import cartopy.io.shapere...
{"hexsha": "8c430323502e90f07e8d2d29b372183a8cf06560", "size": 9540, "ext": "py", "lang": "Python", "max_stars_repo_path": "jma_ame_nrt/cartopy_jma_cumrain.py", "max_stars_repo_name": "yyousuke/jma_draw", "max_stars_repo_head_hexsha": "e8e24521e494ec7ae26be211bfc8ddc62bb73899", "max_stars_repo_licenses": ["MIT"], "max_...
#redirect Institute of Transportation Studies
{"hexsha": "7d7f54ec4509a0541569f04d7411f6d012d0ddea", "size": 46, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Institute_for_Transportation_Studies.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["M...
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import ring_theory.witt_vector.basic /-! # Teichmüller lifts This file defines `witt_vector.teichmuller`, a monoid hom `R →* 𝕎 R`, which embeds `r : R` as the `0`...
{"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/ring_theory/witt_vector/teichmuller.lean"}
[STATEMENT] lemma dense_accessible_frontier_points: fixes S :: "'a::{complete_space,real_normed_vector} set" assumes "open S" and opeSV: "openin (top_of_set (frontier S)) V" and "V \<noteq> {}" obtains g where "arc g" "g ` {0..<1} \<subseteq> S" "pathstart g \<in> S" "pathfinish g \<in> V" [PROOF STATE] proof (pr...
{"llama_tokens": 10377, "file": null, "length": 114}
import numpy as np import scipy as sp import scipy.spatial.distance import matplotlib.pyplot as plt from keras import backend as K from ViewMNIST import PlotResult def GetFeature(x, functor, saveIdx, normalize=False): embedding = None try: layer_outs = functor([x, 0.]) embedding = layer_outs[...
{"hexsha": "6cb8c3fccaf0a289c26128905937527c1d3f7bf6", "size": 1780, "ext": "py", "lang": "Python", "max_stars_repo_path": "ReIDHelpers.py", "max_stars_repo_name": "psiva7/MNISTTriplet", "max_stars_repo_head_hexsha": "695897b5229387a092b69b5de17dbd996ca2d899", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import matplotlib.pyplot as plt import numpy as np from scipy.stats import norm from functools import reduce import sys import subprocess import argparse import pandas as pd from statistics import mean, variance, stdev, median_grouped # ref. https://qiita.com/qsnsr123/items/325d21621cfe9e553c17 plt.rcParams['font.fa...
{"hexsha": "4f1eab1c3cc220b768892c9f8150bd1767358d7c", "size": 15604, "ext": "py", "lang": "Python", "max_stars_repo_path": "calc_e2e.py", "max_stars_repo_name": "mu-mu-mu/ros1_analysis", "max_stars_repo_head_hexsha": "48f69e337cee9a992904fa6b5394251f8876cdc0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
C C $Id: kurv1.f,v 1.5 2008-07-27 03:10:11 haley Exp $ C C Copyright (C) 2000 C University Corporation for Atmospheric Research C All Rights Reserved C C The use of this Software is governed by a License Agreemen...
{"hexsha": "c659c950ded7fa10e14c12ee73761e15a77d20c5", "size": 6071, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ngmath/src/lib/gridpack/fitgrid/kurv1.f", "max_stars_repo_name": "tenomoto/ncl", "max_stars_repo_head_hexsha": "a87114a689a1566e9aa03d85bcf6dc7325b47633", "max_stars_repo_licenses": ["Apache-2.0"]...
import numpy as np import fabio import configparser from fabio.edfimage import edfimage from fabio.tifimage import tifimage ### This function save the calibrant image as edf extension ### ### root_save: path of the folder where the image will be saved ### save_img_name: name of the image ### extension: format...
{"hexsha": "477ecb619cb11c6c1f784ced6d35c64a291e4375", "size": 637, "ext": "py", "lang": "Python", "max_stars_repo_path": "easistrain/func_save_edf_image.py", "max_stars_repo_name": "woutdenolf/easistrain", "max_stars_repo_head_hexsha": "0484168e33e548af01a5cc649abf815c45b182f1", "max_stars_repo_licenses": ["MIT"], "ma...
import torch import os import gc import pandas as pd import numpy as np from BengaliDataset import BengaliDataset from Resnet import ResNet from Utils import seed_everything # Constants # Setting SEED = 222 BATCH_SIZE = 64 HEIGHT = 137 WIDTH = 236 device = "cuda" if torch.cuda.is_available() else "cpu" seed_everythin...
{"hexsha": "21928405de2a90801cea41fca354009a06452e87", "size": 2525, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/CreateTestCsv.py", "max_stars_repo_name": "jaswged/bengali-handwritten-ai", "max_stars_repo_head_hexsha": "aef86c495255cf9ec671f46f1c919a7f97d35762", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np import scipy.sparse as sp from ...common_files.common_infos import CommonInfos import multiprocessing as mp from ...solvers.solvers_scipy.solver_sp import SolverSp from ...solvers.solvers_trilinos.solvers_tril import solverTril import time class masterNeumanNonNested: def __init__(self, data_i...
{"hexsha": "4493bf3c587db86f991807366822c87413283ba8", "size": 14055, "ext": "py", "lang": "Python", "max_stars_repo_path": "packs/adm/non_uniform/paralel_neuman_new0.py", "max_stars_repo_name": "CiceroAraujo/SB", "max_stars_repo_head_hexsha": "637cc4bc63c952f058c316b2b1fbfbb5cd6250c8", "max_stars_repo_licenses": ["MIT...
[STATEMENT] theorem mk_alt_consistency_subset: \<open>C \<subseteq> mk_alt_consistency C\<close> [PROOF STATE] proof (prove) goal (1 subgoal): 1. C \<subseteq> mk_alt_consistency C [PROOF STEP] unfolding mk_alt_consistency_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. C \<subseteq> {S. \<exists>f. psubst f ` S...
{"llama_tokens": 980, "file": "FOL-Fitting_FOL_Fitting", "length": 14}
import argparse import os import numpy as np from PIL import Image from matplotlib import pyplot as plt # --------------- Arguments --------------- parser = argparse.ArgumentParser(description='Colorpalette') parser.add_argument('--img', type=str, required=True) args = parser.parse_args() def get_dom...
{"hexsha": "843893c11a0e2b8a707dfbaeb77ee59f82a21883", "size": 2363, "ext": "py", "lang": "Python", "max_stars_repo_path": "ColorpaletteFromImage.py", "max_stars_repo_name": "flow-dev/ColorpaletteFromImage", "max_stars_repo_head_hexsha": "5763942a7a5f6cf2d975e51a738a6e7df3c73538", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/env python3 """ This python scripts visualizes and plots the 3D voxels based on their confidence score and produces a heatmap. """ from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as np from pylab import * import time import torch def visualizeVoxels(voxelGrids, frameRa...
{"hexsha": "c432df790ebd4bac4da093ac02ceaeb3645102cc", "size": 2182, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/plotvoxel.py", "max_stars_repo_name": "prithusuresh/semantic-point-generation", "max_stars_repo_head_hexsha": "e9dd107b86e6068bd1de38b6dc177108a54deee1", "max_stars_repo_licenses": ["Apache-...
library(rhdf5) library(qvalue) library(dplyr) ##Settings baseFolder <- "C:/OnlineFolders/BitSync/Current_Work/EBI_HipSci/T/" ################# ##Read files. setwd(baseFolder) observedFeatures <- 0 results <- NULL snpAnnotation <- NULL featureAnnotation <- NULL filesToRead <- list.files(".",pattern = ".h...
{"hexsha": "9a40818524c8bf9e23bd58f148d88e66af3c7dd3", "size": 911, "ext": "r", "lang": "R", "max_stars_repo_path": "Limix_QTL/post_processing/scripts/R/GettingPermQTLsFromH5.r", "max_stars_repo_name": "Bonder-MJ/limix_qtl", "max_stars_repo_head_hexsha": "71f18f4e39cdba0f0e6dc59713b83701599bc86f", "max_stars_repo_licen...
import cv2 import numpy as np from lib.dataset import resize def find_circle(image, kernel=33): image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) image_gray = resize(image, 512, size_is_min=True) image_gray = cv2.medianBlur(image_gray, kernel) height, width = image_gray.shape min_dim = min(height, ...
{"hexsha": "c3c522ad299cd3ee08543d4003637c00af986cb8", "size": 2042, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing/image_ops.py", "max_stars_repo_name": "wonderit/aptos-retinopathy-detection", "max_stars_repo_head_hexsha": "8402ce798fa0419627fb878788fa771849e34516", "max_stars_repo_licenses": ["M...
From SyDPaCC.Tree Require Import Skeletons Closure BTree. From SyDPaCC.Bsml Require Import Model.Core Model.Pid Skeletons.StdLib. From SyDPaCC.Core Require Import Bmf Parallelization. Require Import Lia NArith. Open Scope N_scope. Module Make (Import Bsml : SyDPaCC.Bsml.Model.Core.BSML). Module Pid := Pid.Mak...
{"author": "SyDPaCC", "repo": "sydpacc", "sha": "640f0f74f21524ee203b192255ecfa9e456fb7d1", "save_path": "github-repos/coq/SyDPaCC-sydpacc", "path": "github-repos/coq/SyDPaCC-sydpacc/sydpacc-640f0f74f21524ee203b192255ecfa9e456fb7d1/Tree/Applications/MapOne.v"}
"""Some custom helper types to make type hints and type checking easier. For user facing type declarations, please see :py:func:`biopsykit.utils.datatype_helper`. """ from pathlib import Path from typing import Hashable, Sequence, TypeVar, Union import numpy as np import pandas as pd _Hashable = Union[Hashable, str...
{"hexsha": "5b1fddc4d202f434e11819bad248ea09142a7926", "size": 578, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/biopsykit/utils/_types.py", "max_stars_repo_name": "Zwitscherle/BioPsyKit", "max_stars_repo_head_hexsha": "7200c5f1be75c20f53e1eb4c991aca1c89e3dd88", "max_stars_repo_licenses": ["MIT"], "max_st...
import gym import tensorflow as tf import numpy as np from collections import deque from stable_baselines import logger from stable_baselines.ppo2 import PPO2 from stable_baselines.ppo2.ppo2 import swap_and_flatten from stable_baselines.common.callbacks import BaseCallback, CallbackList from stable_baselines.asil.cal...
{"hexsha": "9db9bdb39d0160dcc69b594c9e88680a48d24e2f", "size": 19073, "ext": "py", "lang": "Python", "max_stars_repo_path": "stable_baselines/asil/asil.py", "max_stars_repo_name": "philippaltmann/ASIL", "max_stars_repo_head_hexsha": "d01d782e6fe0dd21ad2aadcb02f0f380732f81d7", "max_stars_repo_licenses": ["MIT"], "max_st...
import slicer import math import numpy as np from fMRSICore import MatLibraryClass as matLibraryClass from fMRSICore import UnitClass as unitClass class SpectrumClass(object): """ properties """ """ % constantes """ STATUS_OK = 0; FILE_ERROR = -1; status = STATUS_OK ; #figureArrang...
{"hexsha": "70d1fdc4a84bb3eb572135774b83dea3ac30951d", "size": 10177, "ext": "py", "lang": "Python", "max_stars_repo_path": "PFileParser/fMRSICore/SpectrumClass.py", "max_stars_repo_name": "fmarcano/SlicerFMRSI", "max_stars_repo_head_hexsha": "e6c538938275fd6d917f2287fb0da49b67dcf6ef", "max_stars_repo_licenses": ["Apac...
#define BOOST_TEST_DYN_LINK #ifdef STAND_ALONE #define BOOST_TEST_MODULE Main #endif #include <boost/test/unit_test.hpp> #include "time_helper.h" #include <iostream> namespace r = reinforcement_learning; BOOST_AUTO_TEST_CASE(time_usage) { r::clock_time_provider ctp; const uint16_t NUM_ITER = 1000; for (int i = ...
{"hexsha": "cfe77c25d39163c9c0970dd2f2fc04c84334ab90", "size": 1290, "ext": "cc", "lang": "C++", "max_stars_repo_path": "unit_test/time_tests.cc", "max_stars_repo_name": "yannstad/reinforcement_learning", "max_stars_repo_head_hexsha": "29e5a4f786ed81ed2c9bc64ae6b14bdbf18b99e4", "max_stars_repo_licenses": ["MIT"], "max_...
! Copyright 2020 Free Software Foundation, Inc. ! This program 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. ! ! This program is dis...
{"hexsha": "b72cd1bb2bccb4fd80c2d38bd85c799e75cdafa2", "size": 901, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "contrib/gnu/gdb/dist/gdb/testsuite/gdb.fortran/array-bounds-high.f90", "max_stars_repo_name": "TheSledgeHammer/2.11BSD", "max_stars_repo_head_hexsha": "fe61f0b9aaa273783cd027c7b5ec77e95ead2153", ...
import quantum_circuit.gates from quantum_circuit.gates import State import quantum_circuit.gates_library as g_lib import numpy as np import math from tests.testcase import BaseTestCase class TestShor(BaseTestCase): def test_shor(self): # run test and see if errors are thrown main() def main():...
{"hexsha": "3f0f8a8cabcedcc694a1f1d2e808183a1e6c21ae", "size": 1390, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_grover.py", "max_stars_repo_name": "mathisgerdes/Quantum_Computing_Project", "max_stars_repo_head_hexsha": "d83855003da7b45b0ea90e9b214d78c6d452379b", "max_stars_repo_licenses": ["MIT"]...
subroutine furlea( i spavac,time1,time0, m ii) c c + + + PURPOSE + + + c This subprogram allows for lower end advance during the depletion c and recession phases. c c Called from FURREC c Author(s): E. R. Kottwitz c Reference in U...
{"hexsha": "f59150ff0b4d8505897e0add5e69381bb211a701", "size": 4261, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "src/wepp2010.1/furlea.for", "max_stars_repo_name": "jarad/dep", "max_stars_repo_head_hexsha": "fe73982f4c70039e1a31b9e8e2d9aac31502f803", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
theory Mg_Prod imports "../Pord" "../Mergeable" "../Bump" begin (* For product types, we impose an ordering that requires that _all_ components of * product a be less than or equal to their corresponding components of b, * in order for a <[ b to hold. * * In other words, this is _not_ a lexicographic ordering. L...
{"author": "mmalvarez", "repo": "Gazelle", "sha": "0a80144107b3ec7487725bd88d658843beb6cb82", "save_path": "github-repos/isabelle/mmalvarez-Gazelle", "path": "github-repos/isabelle/mmalvarez-Gazelle/Gazelle-0a80144107b3ec7487725bd88d658843beb6cb82/Mergeable/Instances/Mg_Prod.thy"}
import os import nltk nltk.download('punkt') nltk.download('wordnet') import numpy from tensorflow import keras import random import json from nltk.stem.wordnet import WordNetLemmatizer from nltk.stem.snowball import SnowballStemmer scriptpath = os.path.abspath(__file__) scriptdir = os.path.dirname(scriptpath) INTENTS...
{"hexsha": "b72ea6f06961554705caa4d0eb7f8d5a4c4a9ce0", "size": 3789, "ext": "py", "lang": "Python", "max_stars_repo_path": "api/bot/chatbot-deployment/ChatbotFunctions.py", "max_stars_repo_name": "Ammar-Raneez/SDGP-MEDIC-IN-ONE", "max_stars_repo_head_hexsha": "bffcc424a1cde4eaad012cfba6fbeeb4b12e75d3", "max_stars_repo_...
using LinearAlgebra function sigmoid(a) return 1.0 / (1 + exp(-a)) end function fit(x, t; alpha = 0.01, tau_max = 1000) function CEE(w, x, t) grad = zeros(size(w)) for i in 1:length(t) ti = (t[i] > 0) ? 1 : 0 h = sigmoid(dot(w, x[i, :])) grad += ((h - ti) * x[...
{"hexsha": "c6443455c31facba90bdd0c9c8840972cd0a27f9", "size": 1304, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Classification/OVR.jl", "max_stars_repo_name": "QGMW22/Horse.jl", "max_stars_repo_head_hexsha": "77be589dbf047a029615dde7773360ebcb5d99b6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# Imports import torch from torch.utils.data import DataLoader, Dataset from torchvision import datasets import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import warnings from skimage.transform import resize as sk_resize from skimage import exposure warnings.filterwarnings('ign...
{"hexsha": "13f5bc52ea78ae2144c6893a9d35d976fc3228c3", "size": 4819, "ext": "py", "lang": "Python", "max_stars_repo_path": "emotion_detection/fer_data_utils.py", "max_stars_repo_name": "anmol-sinha-coder/DEmoClassi", "max_stars_repo_head_hexsha": "476e8ffe95312b302f02dd44d238d5c447e5b054", "max_stars_repo_licenses": ["...
section \<open>Static data dependence\<close> theory DataDependence imports "../Basic/DynDataDependence" begin context CFG_wf begin definition data_dependence :: "'node \<Rightarrow> 'var \<Rightarrow> 'node \<Rightarrow> bool" ("_ influences _ in _" [51,0]) where data_dependences_eq:"n influences V in n' \<equi...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Slicing/StaticIntra/DataDependence.thy"}
-makelib xcelium_lib/xilinx_vip -sv \ "D:/Xilinx/Vivado/2018.2/data/xilinx_vip/hdl/axi4stream_vip_axi4streampc.sv" \ "D:/Xilinx/Vivado/2018.2/data/xilinx_vip/hdl/axi_vip_axi4pc.sv" \ "D:/Xilinx/Vivado/2018.2/data/xilinx_vip/hdl/xil_common_vip_pkg.sv" \ "D:/Xilinx/Vivado/2018.2/data/xilinx_vip/hdl/axi4stream_vip...
{"hexsha": "90622289a116c061894fca534214b052592b645c", "size": 28687, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "project_1/project_1.ip_user_files/sim_scripts/design_1/xcelium/run.f", "max_stars_repo_name": "qxynju2017/Nexys-Video-Microblaze-OV5640-HDMI-", "max_stars_repo_head_hexsha": "64392396aab6c6b92c05...
import mylib import ctypes import numpy as np print("Try test_empty:") mylib.test_empty() print("\nTry test_add:") print(mylib.test_add(34.55, 23)) print("\nTry test_add_double:") print(mylib.test_add_double(34.55, 43.0)) # Create a 25 elements array numel = 25 data = (ctypes.c_int * numel)(*[x for x in range(nume...
{"hexsha": "33e0d55fe93cbffac3dd7206c100f592d0b16798", "size": 1911, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/C++/Core/Python/test_mylib.py", "max_stars_repo_name": "cesmix-mit/MDP", "max_stars_repo_head_hexsha": "746e4f4aead5911ddeda77b0d2c117e3b70cc5c4", "max_stars_repo_licenses": ["MIT"], "max_star...
\chapter*{Abstract} Maximising the economic effectiveness of a wind farm is essential in making wind a more economic source of energy. This effectiveness can be increased through the reduction of operation and maintenance costs, which can be achieved through continuously monitoring the condition of wind turbines. An a...
{"hexsha": "bfb8a902622f582374fd84e422ad3694c9022d16", "size": 2051, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/abstract.tex", "max_stars_repo_name": "nmstreethran/WindTurbineClassification", "max_stars_repo_head_hexsha": "b0ea6de909ccd5bb425cee291ca3c252c11df4eb", "max_stars_repo_licenses": ["MIT"], "ma...
struct NNStatistics units::String arealUnits::String area::Polygon observedMeanDistance::Real expectedMeanDistance::Real nearestNeighbourIndex::Real pointsCount::Real zScore::Real end """ analysis(data::F, area::Union{P, Nothing}=nothing, units::String="kilometers") ...
{"hexsha": "56ad33b06abaf0f062476104c172569abfc07146", "size": 2794, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/lib/NearestNeighbour.jl", "max_stars_repo_name": "visr/Turf.jl", "max_stars_repo_head_hexsha": "fe3a61fabe6d5b9e7f0197bf1820be25432c467d", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Implements a simple high/low pass filter for audio source separation """ from __future__ import division import numpy as np import scipy.signal import mask_separation_base from ideal_mask import IdealMask class HighLowPassFilter(mask_separation_base.MaskSeparationB...
{"hexsha": "e0136bb10914166b84c838e0666b9a3f3e5fa2c4", "size": 4524, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/nussl/separation/high_low_pass_filter.py", "max_stars_repo_name": "KingStorm/nussl", "max_stars_repo_head_hexsha": "78edfdaad16845fc705cefb336a7e6e5923fbcd4", "max_stars_repo_licenses": ...
import os import sys import numpy as np from PIL import Image num=1 path ="/Users/pection/Documents/mn_furniture/AddwatermarkProgram/Lastday/" #we shall store all the file names in this list filelist=[] for root, dirs, files in os.walk(path): for file in files: if(file.endswith(".jpg")): filelis...
{"hexsha": "dd7f9dbcfe5bd13ce56beb5ae807d4bb63f3c4df", "size": 1609, "ext": "py", "lang": "Python", "max_stars_repo_path": "Program_python/Extractfolderimage.py", "max_stars_repo_name": "pection/MN-furniture", "max_stars_repo_head_hexsha": "4c796f072662c15b2a263272ef2637e221c42cab", "max_stars_repo_licenses": ["MIT"], ...
from __future__ import print_function import numpy as np import tensorflow as tf import sklearn.metrics # Import MNIST data from tensorflow.examples.tutorials.mnist import input_data def readData(filename): with open(filename, 'r') as f: string = [line.strip().split('\t') for line in f.readlin...
{"hexsha": "b342df6655d48103222dd408514e69bb3613f130", "size": 2589, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/knn/knn.py", "max_stars_repo_name": "ZhengtianXu/Gene_Chip", "max_stars_repo_head_hexsha": "f7b8e84bdaf8963923de16443fac22ce11df5714", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 17...
[STATEMENT] lemma PsiInv_alpha1: "\<turnstile> alpha1 \<and> $PsiInv \<longrightarrow> PsiInv$" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<turnstile> alpha1 \<and> $PsiInv \<longrightarrow> PsiInv$ [PROOF STEP] by (auto simp: alpha1_def PsiInv_defs)
{"llama_tokens": 103, "file": null, "length": 1}
[STATEMENT] lemma [code abstract]: "integer_of_natural (m - n) = max 0 (integer_of_natural m - integer_of_natural n)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. integer_of_natural (m - n) = max 0 (integer_of_natural m - integer_of_natural n) [PROOF STEP] by transfer simp
{"llama_tokens": 107, "file": null, "length": 1}
using Test using JSON3 using Pinecone APIKEY = ENV["PINECONE_API_KEY"] CLOUDENV="us-west1-gcp" context = Pinecone.init(APIKEY, CLOUDENV) INDEX = "filter-example" NAMESPACE = "mynamespace" index = Pinecone.Index(INDEX); @testset verbose = true "Create/Delete" begin testindexname = "unittestindex" @testset ...
{"hexsha": "af6b951ba6def5978beab9bd842468fded56664a", "size": 2286, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/testcreatedelete.jl", "max_stars_repo_name": "tullytim/Pinecone.jl", "max_stars_repo_head_hexsha": "1846a919bd1ba337e8c3f161d7f95469cdd2d252", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import pytest import numpy as np from context import Runner, ExecutionType, get_configs, docker_available class MockContext(): def __init__(self): self.obj = {} @pytest.mark.skipif(not docker_available(), reason='Docker is not available') def test_runner_langermann(): internal_conf = get_configs('c...
{"hexsha": "efbcd20984caeb62b715ba75dbe7a42ac7515b65", "size": 685, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_runner.py", "max_stars_repo_name": "d53dave/cgopt", "max_stars_repo_head_hexsha": "a655d87a8577d18a7a714431f4237e4c9ebbf7e8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
# -*- coding: utf-8 -*- from distutils.version import LooseVersion import numpy from aiida.orm import Dict, TrajectoryData from qe_tools import CONSTANTS from .base import Parser from .parse_raw.cp import parse_cp_raw_output, parse_cp_traj_stanzas class CpParser(Parser): """This class is the implementation of t...
{"hexsha": "143030d7b7b4c832b03c3fdc365597fe2ddd2f5f", "size": 16514, "ext": "py", "lang": "Python", "max_stars_repo_path": "aiida_quantumespresso/parsers/cp.py", "max_stars_repo_name": "ramirezfranciscof/aiida-quantumespresso", "max_stars_repo_head_hexsha": "cb32be5361afa05bad617f00f8b187c96eb365ec", "max_stars_repo_l...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module provides tools for calculating total error arrays. """ import astropy.units as u from astropy.utils.misc import isiterable import numpy as np __all__ = ['calc_total_error'] def calc_total_error(data, bkg_error, effective_gain): """ ...
{"hexsha": "67e969f13b71b077283c91eeb3346832c2d32774", "size": 7791, "ext": "py", "lang": "Python", "max_stars_repo_path": "photutils/utils/errors.py", "max_stars_repo_name": "pllim/photutils", "max_stars_repo_head_hexsha": "ff78b6dd97a9fa890b6c77b51f207d4c2ff28889", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
[STATEMENT] lemma up_injective: "\<up>x = \<up>y \<Longrightarrow> x = y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<up>x = \<up>y \<Longrightarrow> x = y [PROOF STEP] using order.antisym [PROOF STATE] proof (prove) using this: \<lbrakk>?a \<le> ?b; ?b \<le> ?a\<rbrakk> \<Longrightarrow> ?a = ?b goal (1 sub...
{"llama_tokens": 172, "file": "Stone_Algebras_Filters", "length": 2}
""" check https://github.com/thautwarm/MLStyle.jl/blob/master/matrix_benchmark.jl """ include("matrix-benchmark/sampler.jl") include("matrix-benchmark/utils.jl") export ArbitrarySampler export Utils versus_items = ("datatype", "misc", "tuple", "array", "structfields", "vs-match") function run_all() for item in v...
{"hexsha": "bed74abf1a55f53e09cf9b9fff5ceb6ab1e73c12", "size": 531, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "benchmark.jl", "max_stars_repo_name": "caseykneale/MLStyle.jl", "max_stars_repo_head_hexsha": "866e3bf3fcd21329bdc8cf3bd0d8d576fe33b666", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 309, ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Unit tests for KinwaveImplicitOverlandFlowModel. Created on Sat Apr 1 10:49:33 2017 @author: gtucker """ from numpy.testing import assert_allclose, assert_raises from landlab import RasterModelGrid from landlab.components import LinearDiffusionOverlandFlowRouter ...
{"hexsha": "f8a4616e592559a9ac6ff3141c3be3df862a44ba", "size": 2136, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/components/overland_flow/test_linear_diffusion_overland_flow.py", "max_stars_repo_name": "clebouteiller/landlab", "max_stars_repo_head_hexsha": "e6f47db76ea0814c4c5a24e695bbafb74c722ff7", "m...
import logging import uuid import numpy as np from sklearn.datasets import load_diabetes import pandas as pd import os from commons.utils.singleton import Singleton class Metadata: id = None filename = None features = None features_min = None features_max = None target_min = None target_m...
{"hexsha": "755c2f37f3588d625a196b2711a03dcf726867a1", "size": 6699, "ext": "py", "lang": "Python", "max_stars_repo_path": "commons/data/data_loader.py", "max_stars_repo_name": "DeltaML/commons", "max_stars_repo_head_hexsha": "5f75783e8e63972bc906fac9f63eb4d1469cad4a", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
[STATEMENT] lemma en_eq_3[PLM]: "[\<^bold>\<diamond>\<lbrace>x,F\<rbrace> \<^bold>\<equiv> \<lbrace>x,F\<rbrace> in v]" [PROOF STATE] proof (prove) goal (1 subgoal): 1. [\<^bold>\<diamond>\<lbrace>x,F\<rbrace> \<^bold>\<equiv> \<lbrace>x,F\<rbrace> in v] [PROOF STEP] using encoding[axiom_instance] derived_S5_rules...
{"llama_tokens": 444, "file": "PLM_TAO_9_PLM", "length": 2}
[STATEMENT] lemma alphaAbs_qAbs_imp_alphaAbs_all_qFresh: assumes "qGood X" and "qAbs xs x X $= qAbs xs' x' X'" shows "alphaAbs_all_qFresh xs x X xs' x' X'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. alphaAbs_all_qFresh xs x X xs' x' X' [PROOF STEP] proof- [PROOF STATE] proof (state) goal (1 subgoal): 1. alphaAb...
{"llama_tokens": 1751, "file": "Binding_Syntax_Theory_QuasiTerms_PickFresh_Alpha", "length": 16}
MODULE wlGridModule USE wlKindModule, ONLY: dp IMPLICIT NONE PRIVATE TYPE, PUBLIC :: GridType CHARACTER(LEN=32) :: Name CHARACTER(LEN=32) :: Unit INTEGER :: nPoints INTEGER :: LogInterp REAL(dp) :: minValue REAL(dp) :: maxValue REAL(dp), DIMENSION(:), ALLOCATABLE :: Values END...
{"hexsha": "995c9f91777dc0034476b34a5c388a34e2c0bed9", "size": 3044, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Distributions/Library/wlGridModule.f90", "max_stars_repo_name": "srichers/weaklib", "max_stars_repo_head_hexsha": "4a26ff17d3224d8fe90b922cb55ea9d865200154", "max_stars_repo_licenses": ["BSD-3-C...
#!/usr/bin/env python import rospy import numpy as np from geometry_msgs.msg import Point from std_msgs.msg import Int64 import time import math from Adafruit_MotorHAT import Adafruit_MotorHAT class gazebo_car_control_node(object): def __init__(self): self.node_name = "gazebo_car_control_node" self.active = Tr...
{"hexsha": "258a2d48560b1ec21f684475acb740739ffc103d", "size": 2229, "ext": "py", "lang": "Python", "max_stars_repo_path": "catkin_ws/src/arg_nctu/kaku/duckietown_kaku/src/gazebo_car_control_node.py", "max_stars_repo_name": "eric565648/duckietown-pi2", "max_stars_repo_head_hexsha": "33af7985a857a323e15d20e6572bc07530a1...
import os.path as osp from PIL import Image from torch.utils.data import Dataset from torchvision import transforms import os import numpy as np class MiniImageNet(Dataset): def __init__(self, setname, args, return_path=False): IMAGE_PATH = os.path.join(args.data_dir, 'miniimagenet/images') SPLIT...
{"hexsha": "8ab819d07f24d03a67d3ed1fcde2941dffd6b502", "size": 2349, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/dataloader/mini_imagenet.py", "max_stars_repo_name": "TJUdyk/Matrix_RENet", "max_stars_repo_head_hexsha": "5d066e4e08e412b1f880c63743edfdb72bdc7138", "max_stars_repo_licenses": ["MIT"], "ma...
\section{Summary and Conclusions} \label{sec:conclusions} We have developed a realizability-preserving DG-IMEX scheme for a two-moment model of fermion transport. The scheme employs algebraic closures based on Fermi-Dirac statistics and combines a time step restriction (CFL condition), a realizability-enforcing limi...
{"hexsha": "8c39a14fd89c0b670f4610105fa48dbc1619739c", "size": 4881, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Documents/M1/realizableFermionicM1/sections/conclusion.tex", "max_stars_repo_name": "srichers/thornado", "max_stars_repo_head_hexsha": "bc6666cbf9ae8b39b1ba5feffac80303c2b1f9a8", "max_stars_repo_lic...
import cv2 import numpy as np import time import threading import queue from xavier_config import qsize class VideoStream(threading.Thread): def __init__(self, url, pos, frame_q, resolution=(360, 640), threaded=False): super(VideoStream, self).__init__() self.cam = cv2.VideoCapture(url) se...
{"hexsha": "7c5dea8b3325b442440b8413ee23c1fce310ff90", "size": 7318, "ext": "py", "lang": "Python", "max_stars_repo_path": "xavier/streamutils.py", "max_stars_repo_name": "igarag/homesecurity", "max_stars_repo_head_hexsha": "35e9ea3b02fbeed771ad9d7c1bd474c36b8b64d3", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# Main window and functions of the ephys analysis program import sys from PyQt5.QtCore import Qt, pyqtSlot, QEvent from PyQt5.QtWidgets import QMainWindow, QAction, QLabel, QGridLayout, \ QPushButton, QButtonGroup, QRadioButton, QVBoxLayout, QHBoxLayout, \ QTextEdit, QWidget, QFileDialog, QApplication, QCheckBox,\...
{"hexsha": "3b46dce4d7de86b27484ba7d6ee28ee87923ada7", "size": 21906, "ext": "py", "lang": "Python", "max_stars_repo_path": "whole_cell_patch/main.py", "max_stars_repo_name": "11uc/whole_cell_patch", "max_stars_repo_head_hexsha": "84e11bbb904b363a6bb5af878d46e23d789c5be0", "max_stars_repo_licenses": ["MIT"], "max_stars...
//initialization related to ros #include "ros/ros.h" #include "std_msgs/Byte.h" //#include "std_msgs/String.h" //#include "dynamixel_workbench_msgs/DynamixelCommand.h" #include <darknet_ros_msgs/BoundingBoxes.h> #include <gb_visual_detection_3d_msgs/BoundingBoxes3d.h> #include <python2.7/Python.h> //#include <thre...
{"hexsha": "33af2bc16b4882fdb78c551b323761e094e62c87", "size": 17098, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "final/rosi_controller/src/mobile_tolerance.cpp", "max_stars_repo_name": "songdaegeun/school-zone-enforcement-system", "max_stars_repo_head_hexsha": "b5680909fd5a348575563534428d2117f8dc2e3f", "max_...
/** * Copyright (c) 2018, University Osnabrück * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this li...
{"hexsha": "366e1a7c978857bf174af29a05486a15b63c781f", "size": 16761, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/tools/lvr2_reconstruct/Options.hpp", "max_stars_repo_name": "uos/lvr", "max_stars_repo_head_hexsha": "9bb03a30441b027c39db967318877e03725112d5", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
from typing import Dict, Union import numpy as np from scipy.optimize import linear_sum_assignment # type: ignore from ..dist import iou_dist from ..tracks import Tracks def calculate_id_metrics( ground_truth: Tracks, hypotheses: Tracks, dist_threshold: float = 0.5 ) -> Dict[str, Union[float, int]]: gts =...
{"hexsha": "a421ece6f5afcfca51e749653b86e5f8fd8da341", "size": 2290, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/evaldet/mot_metrics/identity.py", "max_stars_repo_name": "traffic-ai/EvalDeT", "max_stars_repo_head_hexsha": "3b52698e1b03fb9066e3203c2f36aebfa0030aba", "max_stars_repo_licenses": ["Apache-2.0...
#' #This source code is provided under the BSD license and is provided AS IS with no warranty or guarantee of fit for purpose. See the project's LICENSE.txt for details. #' #Copyright Thomson Reuters 2013. All rights reserved. #' @param dates dates #' @param seccodes seccodes #' @param per.seccode per.seccode #' ...
{"hexsha": "52a85b7f752650874f4b3e2ef083767a35c1db5b", "size": 1035, "ext": "r", "lang": "R", "max_stars_repo_path": "R/get.unadj.daily.close.r", "max_stars_repo_name": "thomsonreuters/oqad", "max_stars_repo_head_hexsha": "eeebc58aebdc514513d41f572ca89b170996ae8e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
// Copyright (c) 2014-2021 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <chainparams.h> #include <consensus/amount.h> #include <net.h> #include <signet.h> #include <uint256.h> #include <va...
{"hexsha": "a0871174c41fc75187990fec6284998c5b0c3863", "size": 8413, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/test/validation_tests.cpp", "max_stars_repo_name": "spaceexpanse/xaya", "max_stars_repo_head_hexsha": "49aee2d5abc0c36d6aee990e7acbc3aece2b7a82", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
from numpy.testing import assert_allclose, run_module_suite from pyins import earth def test_principal_radii(): lat = 0 re, rn = earth.principal_radii(lat) assert_allclose(re, earth.R0, rtol=1e-10) assert_allclose(rn, earth.R0 * (1 - earth.E2), rtol=1e-10) lat = [0, 90] re, rn = earth.princip...
{"hexsha": "3727a4f61e7d39e04465de369c8a44716b191e62", "size": 1546, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyins/tests/test_earth.py", "max_stars_repo_name": "toniklenk/pyins", "max_stars_repo_head_hexsha": "db18a6083dbd7397315095d9a5096cd515f7e248", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This module defines a class `PartitionExt` which extends the `Partition` class in SageMath with methods related to the computation of the generalized core and quotient decomposition as described in [Pearce, 2020]. See the docstring of the `PartitionExt` class for a des...
{"hexsha": "f91a053fa833361787bd1251951cc18b6fa2c968", "size": 16822, "ext": "py", "lang": "Python", "max_stars_repo_path": "abacus_extension.py", "max_stars_repo_name": "edwardmpearce/pyparti", "max_stars_repo_head_hexsha": "951e78da7dfd6d4891a02b77ea67910e7435a17d", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
\documentclass[11pt]{article} \usepackage[breakable]{tcolorbox} \usepackage{parskip} % Stop auto-indenting (to mimic markdown behaviour) \usepackage{iftex} \ifPDFTeX \usepackage[T1]{fontenc} \usepackage{mathpazo} \else \usepackage{fontspec} \fi % Basic figure setup, for...
{"hexsha": "209eaeef869d361835bb4524311bbfa252241ce3", "size": 133309, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "03_tail/data_analyse.tex", "max_stars_repo_name": "eXpensia/Confined-Brownian-Motion", "max_stars_repo_head_hexsha": "bd0eb6dea929727ea081dae060a7d1aa32efafd1", "max_stars_repo_licenses": ["MIT"],...
'''reorganizes full 20 year 100% timeseries into 25/50/100% 5/10/20 year ones. So less extensive sureys can be done. 2020-01-01T19:00:00.000 = 2458850.29166667 # start date 2025-01-01T19:00:00.000 = 2460677.29166667 # 5 years 2030-01-01T19:00:00.000 = 2462503.29166667 # 10 years 2040-01-01T19:00:00.000 = 2466155.291666...
{"hexsha": "5a9ee226009d063aba40a2ffcf19fa0b8499d9d8", "size": 4563, "ext": "py", "lang": "Python", "max_stars_repo_path": "truncate.py", "max_stars_repo_name": "pdn4kd/isochoric-expander", "max_stars_repo_head_hexsha": "56bfdc3c7efb3a242ff4ae4c556d70bb7f171e5f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
from flask import Flask, request, jsonify import json import pickle import pandas as pd import numpy as np import drmodel app = Flask(__name__) # Load the model model = pickle.load(open('model.pkl','rb')) labels ={ 0: "versicolor", 1: "setosa", 2: "virginica" } @app.route('/api',methods=['POST']) def predi...
{"hexsha": "cab58ea6954cc4d3d115ffbddea76b13100853a9", "size": 683, "ext": "py", "lang": "Python", "max_stars_repo_path": "server.py", "max_stars_repo_name": "datarobot-community/mlops-pipeline", "max_stars_repo_head_hexsha": "dbb717f9b805dda6933912daa80d427db350e1a5", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
{-# OPTIONS --without-K --safe #-} open import Algebra module Data.FingerTree.View {r m} (ℳ : Monoid r m) where open import Level using (_⊔_) open import Data.Product open import Function open import Data.List as List using (List; _∷_; []) open import Data.FingerTree.Structures ℳ open import Data.FingerTree....
{"hexsha": "268576458d0b5e0e55137bd7bb8322ac23b1470c", "size": 4581, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/Data/FingerTree/View.agda", "max_stars_repo_name": "oisdk/agda-indexed-fingertree", "max_stars_repo_head_hexsha": "39c3d96937384b052b782ffddf4fdec68c5d139f", "max_stars_repo_licenses": ["MIT"]...