text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# author: Caelan Garrett and Zi Wang import numpy as np import sys sys.path.append('motion-planners') try: from motion_planners.rrt_connect import birrt from motion_planners.rrt_connect import direct_path except ImportError: raise RuntimeError('Requires https://github.com/caelan/motion-planners') from kitch...
{"hexsha": "ee3c9c6eb571869500f557e5854f96d98729a981", "size": 3026, "ext": "py", "lang": "Python", "max_stars_repo_path": "kitchen2d/motion_planner.py", "max_stars_repo_name": "zerongxi/Kitchen2D", "max_stars_repo_head_hexsha": "2cbaa6c8ea8fbf5f5c3a5de34cb11efde4121793", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from camera_mat_distortion import * from color_trans_gradients import * from perpective_transform import * import numpy as np import cv2 import glob import matplotlib.pyplot as plt import pickle # Loading camera calibration cameraCalibration = pickle.load(open('serialized_camera_data/camera_calibration.p', 'rb')) mtx...
{"hexsha": "30dc5017c37fc4ad5f88f654d1fefddbc0645d9d", "size": 12905, "ext": "py", "lang": "Python", "max_stars_repo_path": "advanced_lane_lines.py", "max_stars_repo_name": "vaneeshdass/self_driving_car_rough", "max_stars_repo_head_hexsha": "d656c8f27aa687006a09fb98c90f703e78cb3028", "max_stars_repo_licenses": ["MIT"],...
# -*- coding: utf-8 -*- """ Created on Mon Jul 26 12:27:48 2021 @author: bjorn Traininer and Evaluation loops functioning with WandB """ import torch import time from tqdm import tqdm import wandb import numpy as np from sklearn.metrics import confusion_matrix from model_utils import get_rri, plot_grad_flow def tra...
{"hexsha": "054e20e65e7d71837fb6cae779e9cb3eda959546", "size": 4761, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/train_eval.py", "max_stars_repo_name": "bh1995/AF-classification", "max_stars_repo_head_hexsha": "cabb932d27c63ea493a97770f4b136c28397117f", "max_stars_repo_licenses": ["MIT"], "max_sta...
import torch import torch.nn as nn import os import json import numpy as np class BaseModule(nn.Module): def __init__(self): super(BaseModule, self).__init__() self.zero_const = nn.Parameter(torch.Tensor([0])) self.zero_const.requires_grad = False self.pi_const = nn.Parameter(torch.Tensor([3.1415926535897932...
{"hexsha": "183e0f77734c4f79f9c9c2717fd5d777b26d3329", "size": 1501, "ext": "py", "lang": "Python", "max_stars_repo_path": "5/new code/OpenKE-OpenKE-PyTorch/openke/module/BaseModule.py", "max_stars_repo_name": "smurf-1119/knowledge-engeneering-experiment", "max_stars_repo_head_hexsha": "7fd3647bfc5b05e5fd6f93fea324e7ec...
[STATEMENT] lemma crel_vs_rel_state: "(R0 ===> state_dp_consistency.crel_vs R1) x (state_of o y)" if "(R0 ===> state_dp_consistency.crel_vs R1 OO rel_state (=)) x y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. state_dp_consistency.rel_fun_lifted R0 R1 x (state_of \<circ> y) [PROOF STEP] using that [PROOF STATE]...
{"llama_tokens": 4995, "file": "Monad_Memo_DP_heap_monad_DP_CRelVH_Ext", "length": 34}
# Copyright 2021 Stephen Baek. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
{"hexsha": "5f5fbe39e3e4678b9504d9c50cfa15c3ef5e6deb", "size": 3133, "ext": "py", "lang": "Python", "max_stars_repo_path": "pneumo/data.py", "max_stars_repo_name": "stephenbaek/pneumo", "max_stars_repo_head_hexsha": "664a73ecf46dbff09850dd213bd85a702f9bdda9", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
import networkx as nx from reuters_utils import * import pickle import random import clustering.hierarchical_emb_clustering #from clustering.hierarchical_emb_clustering import CFIEClustering class ReutersEvaluator: def __init__(self, reuters_df, topics_G, industry_cat_G): self.reuters_df = reuters_df ...
{"hexsha": "3ca5b1e6d59a31d8b4a1ecde76ac9458d4843f8b", "size": 8944, "ext": "py", "lang": "Python", "max_stars_repo_path": "cfis/evaluation/reuters_evaluator2.py", "max_stars_repo_name": "vinidixit/hierarchical-labelled-clustering-evaluation", "max_stars_repo_head_hexsha": "bff4198ef0d90de62c939b45ff167873f611ae2d", "m...
%% CUBESTOKES Stokes equations on the unit cube % % SQUARESTOKE computes CR-P0 approximations of the Stokes equations in % the unit cube. % % Added by Shuhao Cao. Apr, 2020. % % Copyright (C) Long Chen. See COPYRIGHT.txt for details. close all; clear; %% Set up maxIt = 4; N = zeros(maxIt,1); h = zeros(maxIt,1);...
{"author": "lyc102", "repo": "ifem", "sha": "29f31c812001ca8d93dad08e67208ca60e8716d4", "save_path": "github-repos/MATLAB/lyc102-ifem", "path": "github-repos/MATLAB/lyc102-ifem/ifem-29f31c812001ca8d93dad08e67208ca60e8716d4/example/fem/Stokes/cubeStokes.m"}
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: paste.py # Author: Yuxin Wu <ppwwyyxxc@gmail.com> from .base import ImageAugmentor from abc import abstractmethod import numpy as np __all__ = [ 'CenterPaste', 'BackgroundFiller', 'ConstantBackgroundFiller'] class BackgroundFiller(object): """ Base class fo...
{"hexsha": "89d50ecdbf89679a175a9757ce15e9aa71b8d722", "size": 2292, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorpack/dataflow/imgaug/paste.py", "max_stars_repo_name": "skoppula/ternarynet", "max_stars_repo_head_hexsha": "1a67251f7f5a1cdf854f87f90f841655c7c9f11c", "max_stars_repo_licenses": ["Apache-2....
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
{"hexsha": "054abd75f76ad9d8166f28636e1c07cd561dda18", "size": 1188, "ext": "py", "lang": "Python", "max_stars_repo_path": "third_party/rlkit_library/rlkit/demos/play_demo.py", "max_stars_repo_name": "google-research/DBAP-algorithm", "max_stars_repo_head_hexsha": "545a4e780f9d9d480c96b67e7a8ae590a983db6b", "max_stars_r...
from openfermion.ops.operators.ising_operator import IsingOperator import pytest import numpy as np import dimod from zquantum.qubo.conversions import ( convert_qubo_to_openfermion_ising, convert_openfermion_ising_to_qubo, convert_sampleset_to_measurements, convert_measurements_to_sampleset, ) from zqu...
{"hexsha": "cd5690ce108881d5ac087cc2e5f6834083ecdec1", "size": 8544, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_conversion.py", "max_stars_repo_name": "zapatacomputing/z-quantum-qubo", "max_stars_repo_head_hexsha": "eda4db91c696f3252dcb0cb69938845c6856e099", "max_stars_repo_licenses": ["Apache-2....
""" """ import base64 import numpy as np import re from .bunch import Bunch def parse_transfer(LW_node): specbunch = Bunch() for sparam in LW_node.findall('Time'): if sparam.attrib["Name"] == 't0': specbunch.gps_second = float(sparam.text) for sparam in LW_node.findall('Param'): ...
{"hexsha": "46465753422fbef996b335b4cebf2027e4e8511c", "size": 3939, "ext": "py", "lang": "Python", "max_stars_repo_path": "dttxml/parse_transfer.py", "max_stars_repo_name": "mccullerlp/ligodtt", "max_stars_repo_head_hexsha": "f586dd58bffe6e792547ffab1e05e5e7201f29e5", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
import numpy as np import sputter as sp import matplotlib.pyplot as pl import everest as ev import csv from numpy import genfromtxt from everest import detrender from everest.math import SavGol, Scatter, Downbin from astropy.stats import median_absolute_deviation as mad from numpy.polynomial import polynomial as P from...
{"hexsha": "693612eaa43e5d70467c1a06fa85554fd32e8522", "size": 932, "ext": "py", "lang": "Python", "max_stars_repo_path": "cave/findflux.py", "max_stars_repo_name": "nksaunders/CAVE", "max_stars_repo_head_hexsha": "1428f1fa6d50e0a4e7f064346ba8aeacd791d2c2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max...
import numpy as np import PySide2 from PySide2.QtWidgets import QWidget, QHBoxLayout from matplotlib.figure import Figure from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas class RadialProfileWidget(QWidget): def __init__(self, data, *args, **kwargs): super().__init__(*args,...
{"hexsha": "d824f4a99fbc601f8e5df61fa409f09996d18f47", "size": 3293, "ext": "py", "lang": "Python", "max_stars_repo_path": "teda/widgets/radialprofile.py", "max_stars_repo_name": "majkelx/teda", "max_stars_repo_head_hexsha": "c4167af36d1826a258b429fe56601ba2375fc2b4", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
[STATEMENT] lemma nnvs_card_ge_n: "\<lbrakk> n_nearest_verts w u n U; unvisited_verts u U \<noteq> {} \<rbrakk> \<Longrightarrow> card U \<ge> Suc n" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>n_nearest_verts w u n U; unvisited_verts u U \<noteq> {}\<rbrakk> \<Longrightarrow> Suc n \<le> card U [PROOF...
{"llama_tokens": 2372, "file": "Query_Optimization_Graph_Definitions", "length": 13}
import numpy as np import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets('MNIST_data', one_hot=True) flags = tf.app.flags FLAGS = flags.FLAGS FLAGS.checkpoint_dir = './models/' # Define layer to extract # Define the shapes of x and y without specifying t...
{"hexsha": "3b3219ebf315896d2d00a535e2c6306c1141a06a", "size": 3388, "ext": "py", "lang": "Python", "max_stars_repo_path": "save_hidden_representation.py", "max_stars_repo_name": "perellonieto/background_check", "max_stars_repo_head_hexsha": "a5b6549a62be276c7199e87e78a94a64af688ab9", "max_stars_repo_licenses": ["MIT"]...
\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{lmodern,textcomp} \usepackage{pgfplots} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} \usepackage{tikz} \usepackage{dirtree} \usepackage{csquotes} \usepackage{wrapfig} \usepackage{tipa} \usepackage{array,multirow,graphicx} \usepackage{...
{"hexsha": "867a62e018a27223aba0db01fe4825c6ac70ba2c", "size": 169218, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "thesis.tex", "max_stars_repo_name": "AnandChowdhary/thesis", "max_stars_repo_head_hexsha": "47df27c6b159088bf0086312558031c68613630e", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count": ...
import math import numpy as np import matplotlib.pyplot as plt from PIL import Image, ImageFilter from skimage import io, measure from scipy.cluster.vq import kmeans # can identify up to 255 objects def mark_objects(image: Image.Image): new_image = image.copy() current = 0 free_labels = [] pixels = ...
{"hexsha": "155a9e128585af758ffbb980f0676a22f92df89e", "size": 6004, "ext": "py", "lang": "Python", "max_stars_repo_path": "7 term/DSIP-Digital-Signal-and-Image-Processing/Lab 2/main.py", "max_stars_repo_name": "Vanya112/BSUIR_Labs", "max_stars_repo_head_hexsha": "d63de54f1d07c5bd0eae598d507be051101f1165", "max_stars_r...
import numpy import time class TrainingLog: def __init__(self, file_name, iteartions_skip_log = 10): self.iterations = 0 self.episodes = 0 self.episode_score_sum = 0.0 self.episode_iterations = 0.0 self.episode_iterations_filtered = 0.0 se...
{"hexsha": "0cf5caf053fc5ea7de57eb9cb540d874344b20db", "size": 2638, "ext": "py", "lang": "Python", "max_stars_repo_path": "RLAgents/lib_common/TrainingLog.py", "max_stars_repo_name": "michalnand/reinforcement_learning_agents", "max_stars_repo_head_hexsha": "45f02c23b1135c87311dce5a52f6e643e4313fc3", "max_stars_repo_li...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Apr 6 13:46:06 2022 @author: alex """ ############################################################################### import numpy as np ############################################################################### from pyro.dynamic import system fro...
{"hexsha": "beca11d9db996616a92ea38bc5bcbdcf0f1edfd2", "size": 14524, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/projects/hybrid_systems/hybrid_mechanical.py", "max_stars_repo_name": "SherbyRobotics/PyRobotics", "max_stars_repo_head_hexsha": "86eb1189258f6f41642a149c813dd2fd6853bcc1", "max_stars_re...
\ tui.f - x4 text user interface \ ------------------------------------------------------------------------ .( tui.f ) \ ------------------------------------------------------------------------ \ BUG: cannot create a new vocabulary when headerless words exist \ vocabulary tui tui definitions \ ---------...
{"hexsha": "75c987e51fc24532def26be2820859c8e1628636", "size": 10281, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/ext/tui/tui.f", "max_stars_repo_name": "mark4th/x4", "max_stars_repo_head_hexsha": "68db810e19b6ee454212b8809a739ddad2cd7928", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 16, "max_...
// // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // Official repository: https://github.com/boostorg/beast // #ifndef net_h #defin...
{"hexsha": "7b9315c550be63b0f107ffc9f24d7fb34fe7b785", "size": 439, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "beast_practice-1/beast_practice/net.hpp", "max_stars_repo_name": "larry-kof/boost_practice", "max_stars_repo_head_hexsha": "804e6cdaed8f5f497d03d61a7ca8fd9ca5ffd2d4", "max_stars_repo_licenses": ["BSD...
SUBROUTINE FL_SOPN ( filnam, lun, iret ) C************************************************************************ C* FL_SOPN * C* * C* This subroutine opens an existing sequential file and returns a * C* logical unit number to be used to access the file. The file is * C* opened READONLY. * C...
{"hexsha": "4914577431966caac3c88b0f2a0f071fdeda7bfa", "size": 2192, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/gemlib/fl/flsopn.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
# Ciholas, Inc. - www.ciholas.com # Licensed under: creativecommons.org/licenses/by/4.0 # System libraries import numpy as np import pyqtgraph as pg from pyqtgraph.Qt import QtGui, QtCore # Local libraries from cdp import MPUGyroscopeV2 from network_objects import * from settings import * class PlotGyro(pg.Graphics...
{"hexsha": "9c100449ee42cc98a377a51350205cd44919c6f0", "size": 2470, "ext": "py", "lang": "Python", "max_stars_repo_path": "libs/plots/public/individual_plots/plot_gyro.py", "max_stars_repo_name": "ciholas/cuwb-monitor", "max_stars_repo_head_hexsha": "7fa72bc83e61a69e8aadc92d9fea4710de3321c1", "max_stars_repo_licenses"...
// Copyright 2021 Oxford Technical Solutions Ltd. // // 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": "41e1fe31893eb8c262f88b66cb1a9195ea138e02", "size": 17098, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "oxts_ins/include/oxts_ins/convert.hpp", "max_stars_repo_name": "M-slibi/oxts_ros2_driver", "max_stars_repo_head_hexsha": "c619d110536235bd8cb2e8afb10e21550aa42526", "max_stars_repo_licenses": ["Apa...
#= AdvancedPrim: - Julia version: - Author: samuel - Date: 2021-09-10 =# using SuiteSparseGraphBLAS using SparseArrays using LinearAlgebra function stoppingCondition(m, n) infinito = true for i = 1:n if(m[i] == 0.0) return false end end return infinito end #A is the input matrix, n is ...
{"hexsha": "933cbd58c6a2f1f2864ced94f1cd165018daa5aa", "size": 1190, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/AdvancedPrim.jl", "max_stars_repo_name": "samuel-esp/GraphBlasAlgorithms.jl", "max_stars_repo_head_hexsha": "b4986f4a1b44684f874541821aef08c240a3e713", "max_stars_repo_licenses": ["MIT"], "max_...
import pandas as pd import numpy as np from skbio import TreeNode from biom.table import Table from collections import defaultdict, OrderedDict from glob import glob from tqdm import tqdm from scipy.optimize import curve_fit def log_linear_func(x, a, b, c, psuedocount=10e-20): return a*np.log(x+b+psuedocount)+c ...
{"hexsha": "31deffcf15aa400535924c375ac9ada39dbdbb32", "size": 7640, "ext": "py", "lang": "Python", "max_stars_repo_path": "SCNIC/annotate_correls.py", "max_stars_repo_name": "shafferm/module_maker", "max_stars_repo_head_hexsha": "736f5959596a6e38aac4e5c42603e203a0671d28", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
"""Shelving Filter Cascade with Adjustable Transition Slope and Bandwidth Frank Schultz, Nara Hahn, Sascha Spors In: Proc. of 148th AES Convention, Virtual Vienna, May 2020, Paper 10339 http://www.aes.org/e-lib/browse.cfm?elib=20756 Fig. 4a, slide 9/12 """ import numpy as np import matplotlib.pyplot as plt from matp...
{"hexsha": "1a8d0f3be7987952a75f1165a48a35cd4d12dea8", "size": 4671, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/mkfig-gain-error.py", "max_stars_repo_name": "spatialaudio/aes148-shelving-filter", "max_stars_repo_head_hexsha": "a11de97d6be79c23ffc55084ca95d9da15f3e3eb", "max_stars_repo_licenses": ["MI...
from typing import Dict, Optional, Tuple, Union import argparse import os from pathlib import Path import numpy as np def str_to_bool(x): return x.lower() == 'true' parser = argparse.ArgumentParser() parser.add_argument('source', help='the source directory to use') parser.add_argument('clones', nargs='+', he...
{"hexsha": "c54d050c7d9c94739115d9728d486a611eb73179", "size": 2301, "ext": "py", "lang": "Python", "max_stars_repo_path": "clonedir/__main__.py", "max_stars_repo_name": "bentheiii/clonedir", "max_stars_repo_head_hexsha": "1988305d352a1558b84f5fc530b9cd16a690a23b", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
/* fft/test.c * * Copyright (C) 1996, 1997, 1998, 1999, 2000 Brian Gough * * 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 2 of the License, or (at * your option) any lat...
{"hexsha": "779a056f266e3eef777bfb06d3c16f37c07c25eb", "size": 3264, "ext": "c", "lang": "C", "max_stars_repo_path": "pkgs/libs/gsl/src/fft/test.c", "max_stars_repo_name": "manggoguy/parsec-modified", "max_stars_repo_head_hexsha": "d14edfb62795805c84a4280d67b50cca175b95af", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
from starry_process import calibrate import numpy as np import os import shutil # Utility funcs to move figures to this directory abspath = lambda *args: os.path.join( os.path.dirname(os.path.abspath(__file__)), *args ) copy = lambda name, src, dest: shutil.copyfile( abspath("data", name, src), abspath(dest) )...
{"hexsha": "2e7040e11ae9ee1dfa29a9acc88975d2a9c16bff", "size": 703, "ext": "py", "lang": "Python", "max_stars_repo_path": "paper2/figures/calibration_default.py", "max_stars_repo_name": "dfm/mapping_stellar_surfaces", "max_stars_repo_head_hexsha": "52d4ba1a726c65868e4a1290a801fe046fb2155f", "max_stars_repo_licenses": [...
import sys import numpy as np import scipy as sp import re from copy import deepcopy from pprint import pprint from timeit import default_timer as timer from enum import Enum from qiskit import Aer from qiskit.aqua import QuantumInstance from qiskit.aqua.operators import Z2Symmetries from qiskit.aqua.algorithms.minimu...
{"hexsha": "8caf0c14b0e3aab3b807b49312c827036cc2e748", "size": 8410, "ext": "py", "lang": "Python", "max_stars_repo_path": "vqe_wrapper/VQE_wrapper.py", "max_stars_repo_name": "MartenSkogh/QiskitVQEWrapper", "max_stars_repo_head_hexsha": "5f1e3e84769e4978e0b50b30e3e48873d7dd4f41", "max_stars_repo_licenses": ["MIT"], "m...
[STATEMENT] lemma (in Corps) val_Pg:" valuation K v \<Longrightarrow> Pg K v \<in> carrier K - {\<zero>} \<and> v (Pg K v) = Lv K v" [PROOF STATE] proof (prove) goal (1 subgoal): 1. valuation K v \<Longrightarrow> Pg K v \<in> carrier K - {\<zero>} \<and> v (Pg K v) = Lv K v [PROOF STEP] apply (frule...
{"llama_tokens": 807, "file": "Valuation_Valuation1", "length": 5}
""" Stochastic Hodgkin-Huxley Neurons ================================= Analysis of Synchronization and Unsync through time ---------------------------------------------------- **Author**: Guilherme M. Toso **Tittle**: shh_sync_unsync.py **Project**: Semi-Supervised Learning Using Competition for Neurons' Synchroniz...
{"hexsha": "2f274d0f75f15fc5ae3cdc82b37a6305341b94ef", "size": 4791, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/4 - Sync and Unsync/4.1 - Hodgkin-Huxley/shh_sync_unsync.py", "max_stars_repo_name": "GuilhermeToso/masters-project", "max_stars_repo_head_hexsha": "01d5acfddaedb3cbf7fa9247a88108530547e155"...
/*************************************************************************** * \file CWToneGenComponent.cpp * \brief Defines the basic continuous-wave (CW) tone generator interface * for an NDR-class radio. * \author DA * \author NH * \author MN * \copyright (c) 2017 CyberRadio Solutions, Inc. All rights res...
{"hexsha": "e92cdb534e30742e69e2dc70a844e93bc8fb5826", "size": 24612, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libcyberradio/libcyberradio/Driver/CWToneGenComponent.cpp", "max_stars_repo_name": "CyberRadio/libcyberradio", "max_stars_repo_head_hexsha": "28f165c9cc024ade66bd9837ccbdc8dbfd802c0a", "max_stars_r...
# coding=utf-8 import os import time import numpy as np from keras import layers import keras.backend as K from keras.models import load_model from scipy.spatial.distance import cdist, euclidean, cosine from glob import glob from tools import get_mfcc_1,calculate_eer,get_mfcc_2 import constants as c from keras.models i...
{"hexsha": "e1cac72d8604c3967f8acb06b7d28a629f94844a", "size": 3454, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/verification_for_triplet.py", "max_stars_repo_name": "qiaoxiaobin2018/mfcc_cnn", "max_stars_repo_head_hexsha": "76711b9d25fce480d1cf603e844434ad65f8662b", "max_stars_repo_licenses": ["MIT"], "...
# !/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Mar 5 16:30:08 2018 @author: jose.saavedra A convolutional neural network for mnist This uses Dataset and Estimator components from tensorflow """ import argparse import os import numpy import numpy as np import tensorflow as tf import utils.data a...
{"hexsha": "c3078558c27141ebc7f9df92920ea239b6ddec77", "size": 6415, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_sketch_net.py", "max_stars_repo_name": "Vichoko/ConvSketch", "max_stars_repo_head_hexsha": "fee85ed509834babada3d319d30267ad3daefd7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
subroutine nut_pminrl2 !! ~ ~ ~ PURPOSE ~ ~ ~ !! this subroutine computes p flux between the labile, active mineral !! and stable mineral p pools. !! this is the alternate phosphorus model described in Vadas and White (2010) !! ~ ~ ~ SUBROUTINES/FUNCTIONS CALLED ~ ~ ~ !! Intrinsic: Min ...
{"hexsha": "301b170aebdf16f75507ba1a57cd1bd070f9ea62", "size": 7327, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "source_codes_60.5/nut_pminrl2.f90", "max_stars_repo_name": "ankwasa/wetlands_swatplus", "max_stars_repo_head_hexsha": "3cdf83cc6a4dc68ce4f53ce1d0ebacd7695b54cf", "max_stars_repo_licenses": ["MIT...
#include <chrono> #include <pcl/io/ply_io.h> #include <Eigen/Dense> #include "../Edge_Extraction/Difference_Eigenvalues.h" #include "../hough3d-code/hough3dlines.h" #include "../hough3d-code/vector3d.h" #include "icp.h" #include "filter.h" #include "findTransformation.h" #include "intersection.h" #include "resultWrite...
{"hexsha": "8722bd912b154fa25382d730a9ccf87c94cd48b9", "size": 11081, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/main.cc", "max_stars_repo_name": "Milos9304/LowOverlapPCRegistration", "max_stars_repo_head_hexsha": "fd9d7d3cb31978b700dc0160bc0fa022f02762f2", "max_stars_repo_licenses": ["BSD-2-Clause"], "max...
""" Take an input SMILES file, and augment it by some fixed factor via SMILES enumeration. """ import argparse import numpy as np import os import pandas as pd from tqdm import tqdm # set working directory git_dir = os.path.expanduser("~/git/low-data-generative-models") python_dir = git_dir + "/python" os.chdir(pytho...
{"hexsha": "045c8c6832127470ff992444687c3f09488d73b0", "size": 1756, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/augment-SMILES.py", "max_stars_repo_name": "skinnider/low-data-generative-models", "max_stars_repo_head_hexsha": "6e743b6d1ba3265f58fcbd33f2c60e633cf25999", "max_stars_repo_licenses": ["MIT...
import abc from typing import TYPE_CHECKING, List, Optional if TYPE_CHECKING: import numpy as np from ..enums import ExpandMode class Storage(abc.ABC): def __init__( self, initial_size: Optional[int] = None, expand_step_size: int = 10240, expand_mode: ExpandMode = ExpandMode....
{"hexsha": "4d15fe18d4a3de254fc2db8bcf4bca096fe4f3aa", "size": 1300, "ext": "py", "lang": "Python", "max_stars_repo_path": "annlite/storage/base.py", "max_stars_repo_name": "jina-ai/pqlite", "max_stars_repo_head_hexsha": "2ce1ec2283b381f5153ea60141a6bb474bbf0f0c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
import torch import os import argparse from tqdm import tqdm import time from im2scene import config from im2scene.checkpoints import CheckpointIO import numpy as np from im2scene.eval import ( calculate_activation_statistics, calculate_frechet_distance) from math import ceil from torchvision.utils import save_imag...
{"hexsha": "2f90f23198847768db329bdbb816cc7b7e66a238", "size": 1805, "ext": "py", "lang": "Python", "max_stars_repo_path": "make_fid_images.py", "max_stars_repo_name": "matthew-a-chan/giraffe", "max_stars_repo_head_hexsha": "e3a7e29ecd9052a4e756940d71d3a05ec5098765", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import argparse import json import math import os import shutil from pprint import pprint from collections import namedtuple import tensorflow as tf from tqdm import tqdm import numpy as np import sys from trainers.bidaf_trainer import BiDAFTrainer from models.bidaf_model import BiDAFModel from models.bidaf_model impor...
{"hexsha": "1a789d3f920129097b04b014aef8fb81bea1e077", "size": 5207, "ext": "py", "lang": "Python", "max_stars_repo_path": "mains/main.py", "max_stars_repo_name": "Singed-jj/bidaf", "max_stars_repo_head_hexsha": "3eeec2ab60c32c0103f13822503dc3b0e985b5ff", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nu...
mutable struct RhoComparison <: AbstractModel params::NamedTuple{(:env_alpha,:patch_aplha,:beta,:reset,:bias), NTuple{5,Float64}} limits::NTuple{5,Float64} end function init(::Type{WaltonForaging.RhoComparison}) return RhoComparison( (env_alpha = rand(0.0:0.0001:0.1), #=alpha_environment = [0,0.1] ...
{"hexsha": "6453c9029a664aaf3a981b1795614418fe094612", "size": 3089, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/RhoComparison.jl", "max_stars_repo_name": "DarioSarra/WaltonForaging.jl", "max_stars_repo_head_hexsha": "39217575b2dee7da279ca169646f05f371ec081f", "max_stars_repo_licenses": ["MIT"], "max_star...
import torch import torch.nn.functional as F import torchvision.transforms as transforms from torch.utils.data import DataLoader, Dataset import numpy as np import os import time import logging import collections logger =logging.getLogger('global') from lib.dataset.kitti_object import kitti_object, get_lidar_in_image_...
{"hexsha": "ed8c96fbf580231542fbc01bbd52e37d13d8ffcd", "size": 11673, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/dataset/kitti_dataset.py", "max_stars_repo_name": "eduardohenriquearnold/coop-3dod-infra", "max_stars_repo_head_hexsha": "05c6620b6856efa5d5a060efc4a874ba5b5460c0", "max_stars_repo_licenses":...
[STATEMENT] lemma points_index_singleton: "{#b#} index ps = 1 \<longleftrightarrow> ps \<subseteq> b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ({#b#} index ps = 1) = (ps \<subseteq> b) [PROOF STEP] by (simp add: points_index_def)
{"llama_tokens": 97, "file": "Design_Theory_Design_Basics", "length": 1}
#include <iostream> #include <boost/smart_ptr.hpp> using namespace std; int main(){ int *arr = new int[100]; boost::scoped_array<int> sa(arr); fill_n(&sa[0],100,5); for(int i=0;i<100;++i) cout << sa[i] << " " << endl; return 0; }
{"hexsha": "1bece24a95e0acfabe2c0cbff2ff978223c8edc7", "size": 261, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cpp/boost/smart_ptr/02_scoped_array_example.cpp", "max_stars_repo_name": "Trickness/pl_learning", "max_stars_repo_head_hexsha": "53c10490aed1ba4a02b14aae4890321ad099cc60", "max_stars_repo_licenses": ...
import gym from gym.utils import seeding from gym.envs.registration import register import numpy as np import pyBaba import rendering class BabaEnv(gym.Env): metadata = {'render.modes': ['human', 'rgb_array']} def __init__(self, enable_render=True): super(BabaEnv, self).__init__() self.path...
{"hexsha": "531b85841d1ed9f1fb16a8eed47babf1b1c8c6ba", "size": 1858, "ext": "py", "lang": "Python", "max_stars_repo_path": "Extensions/BabaRL/baba-volcano-v0/environment.py", "max_stars_repo_name": "siva-msft/baba-is-auto", "max_stars_repo_head_hexsha": "3237b5b70167130558827979bde7dcee14ef39f3", "max_stars_repo_licens...
[STATEMENT] lemma init_nil [simp]: "init\<cdot>[] = \<bottom>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. init\<cdot>[] = \<bottom> [PROOF STEP] by (fixrec_simp)
{"llama_tokens": 73, "file": "HOLCF-Prelude_Data_List", "length": 1}
import Virtualization as virt import os import glob import numpy as np import cv2 import matplotlib.pyplot as plt import seaborn as sns import skimage.io # image analysis functionality import sys from tqdm import tqdm from pathlib import Path from tqdm import tqdm from scipy.ndimage import rotate from stl import mesh ...
{"hexsha": "c583ba88434be1c7bd93367e1bb0dbb30a5e2415", "size": 6850, "ext": "py", "lang": "Python", "max_stars_repo_path": "imageArrangement.py", "max_stars_repo_name": "Gustafferson/particleVirtualization", "max_stars_repo_head_hexsha": "358fc8d9cb8c2e14b2d63b69518ee2d8c009cabf", "max_stars_repo_licenses": ["MIT"], "m...
subroutine cudaclaw_qinit(maxmx,maxmy,meqn,mbc,mx,my, & xlower,ylower,dx,dy,q,maux,aux) !! # Set initial conditions for q. !! # Acoustics with smooth radially symmetric profile to test accuracy implicit none integer :: maxmx, maxmy, meqn, mbc, mx, my, maux double precision :: xlower, ylower, ...
{"hexsha": "fe40adb53e7bf17355e7a7d5b5142704cee6c26b", "size": 1109, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "applications/cudaclaw/acoustics/2d/radial/user_cuda/qinit.f90", "max_stars_repo_name": "ECLAIRWaveS/ForestClaw", "max_stars_repo_head_hexsha": "0a18a563b8c91c55fb51b56034fe5d3928db37dd", "max_st...
import os os.environ["CUDA_VISIBLE_DEVICES"]="-1" import tensorflow as tf from tqdm import tqdm import pandas as pd import matplotlib.pyplot as plt import numpy as np import json def _bytestring_feature(list_of_bytestrings): return tf.train.Feature(bytes_list=tf.train.BytesList(value=list_of_bytestrings)) def _...
{"hexsha": "2afd6bb88f2ccc86db4175002ee99b7af89a1af4", "size": 3803, "ext": "py", "lang": "Python", "max_stars_repo_path": "kubeflow/components/tile_engine_component/src/df_to_tfrec.py", "max_stars_repo_name": "angusll/scancer_pip", "max_stars_repo_head_hexsha": "0c490505f5bb7bccc316676e686ca9fcecf46d40", "max_stars_re...
#用来保存预测的语音 import torch from AVModel import AVModel from DataLoader import AudioDataset,AudioDataLoader,collate_fn import soundfile import numpy as np import os from Loss import cal_si_snr,permute_SI_SNR,permute_SDR from Loss import cal_sdr import torch.nn as nn from Loss import cal_snr import torch.nn from collect...
{"hexsha": "8e8c00236affe42667ab202bc76d710ad592eee7", "size": 3829, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/03-speech-enhancement/Conv_Tasnet/separate.py", "max_stars_repo_name": "TongtongSong/speech_experiments", "max_stars_repo_head_hexsha": "8f69766d7c262c62dd4d36696a46b64c58570eda", "max...
"""Function for calculating the electron cooling transfer function. """ import numpy as np import darkhistory.physics as phys import darkhistory.utilities as utils import darkhistory.spec.transferfunction as tf import darkhistory.spec.spectools as spectools from config import load_data from darkhistory.spec.spectru...
{"hexsha": "7229ac166cd0b8ce021ff10fcf6ba15adafe2f7d", "size": 22165, "ext": "py", "lang": "Python", "max_stars_repo_path": "darkhistory/electrons/elec_cooling.py", "max_stars_repo_name": "cgiovanetti/DarkHistory", "max_stars_repo_head_hexsha": "ca1ce2e9478be1023a7b5fee19e7c1b2a21862e8", "max_stars_repo_licenses": ["MI...
export minConf_PQN, pqn_options mutable struct PQN_params verbose optTol progTol maxIter maxProject suffDec corrections adjustStep bbInit SPGoptTol SPGprogTol SPGiters SPGtestOpt end function pqn_options(;verbose=3,optTol=1f-5,progTol=1f-7, maxIter=20,maxProject=100000, suffDec=1f-4, correct...
{"hexsha": "24e034d3dd612a7140db1bb9d614c0aa66ea52c1", "size": 8842, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Optimization/PQNSlim.jl", "max_stars_repo_name": "SINBADconsortium/opesciSLIM", "max_stars_repo_head_hexsha": "8c3af2d8e9809fcd4d53fa160c01dbd624b6bb25", "max_stars_repo_licenses": ["MIT"], "ma...
from __future__ import absolute_import, division, print_function, unicode_literals from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Convolution2D from tensorflow.keras.layers import MaxPooling2D from tensorflow.keras.layers import Flatten from tensorflow.keras.layers import Dense from ...
{"hexsha": "354a580336d2a86c290cc767faedc80fa97722e6", "size": 7594, "ext": "py", "lang": "Python", "max_stars_repo_path": "visual_diarization_cnn/cnn_model_train_concatenate_49.py", "max_stars_repo_name": "cvossos2046/visual_speaker_diarization_cnn_project", "max_stars_repo_head_hexsha": "d6958748a2fedd4dac939c0b91491...
import pandas import numpy as np from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score from sklearn.metrics import confusion_matrix from sklearn import preprocessing import sys import os path=os.getcwd() path=path.strip('with_set') path=path.strip('set_divide') sys.path.append...
{"hexsha": "86da82c18aab2fe995fb838a4e2acf33b2ce3506", "size": 1200, "ext": "py", "lang": "Python", "max_stars_repo_path": "ML/set_divide/ridge.py", "max_stars_repo_name": "saisankargochhayat/doot", "max_stars_repo_head_hexsha": "00bd74463a065f23886e829aae677267b7619e13", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# -*- coding: utf-8 -*- """ test file for mean calculation """ from __future__ import division import numpy as np def mean(data): s = np.zeros(data.shape[1]) for row in range(data.shape[0]): for col in range(data.shape[1]): s[col]+=data[row,col] f...
{"hexsha": "6d7b5870da934f93eb03d1c39bea5d8ad218e6cd", "size": 429, "ext": "py", "lang": "Python", "max_stars_repo_path": "cookbook/cython/mean_py.py", "max_stars_repo_name": "CanadaMontreal/trading-with-python", "max_stars_repo_head_hexsha": "537b3a34c9a9b0a6fc8ceaa8ecee806d1285a165", "max_stars_repo_licenses": ["BSD-...
# Copyright (C) 2019 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # pylint: disable=too-many-lines """ Dontains classes that define: - Nodes from the tree - Tokens from lexing a line of code - Operators to handle tokens """ import logging import collections import hashlib import numpy as np from . import ...
{"hexsha": "517ffac002899ab900bd608231b2e838739a20f3", "size": 61271, "ext": "py", "lang": "Python", "max_stars_repo_path": "codebasin/preprocessor.py", "max_stars_repo_name": "Pennycook/code-base-investigator", "max_stars_repo_head_hexsha": "1673301553100f567ab4140ab27f7417d84e3f08", "max_stars_repo_licenses": ["BSD-3...
using Images: data, Image, load ENV["PYTHON"] = "/usr/bin/python3" using PyCall using PartsBasedDetector: make_estimator, estimate filename = "dress.jpg" url = "http://images0.chictopia.com/photos/districtofchic/9466442894/" * "black-skinny-jeans-dl1961-jeans-sky-blue-pixie-market-shirt_400.jpg" filename_png =...
{"hexsha": "1ffe32cc1493fb8ae9914afa3b8095f6a436b905", "size": 729, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "IshitaTakeshi/VirtualFitting", "max_stars_repo_head_hexsha": "dc63931a4703cd8749528e31f2a6e017e5df68bf", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
module Tagging export tag, mergetag, hastag, HasTag, NotHasTag, traithastag, Tags # # Tags # Many functionalities of Omega are achieved through contextual-execution # That means we evaluate a function `f(ω)` under some context. # See Cassette.jl for more information on contextual execution # Omega uses a poor-mans Ca...
{"hexsha": "de7aaac799df5fe19d84d04d89951e7ebe205f44", "size": 525, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "OmegaCore/src/tagging/tagging.jl", "max_stars_repo_name": "mrakgr/Omega.jl", "max_stars_repo_head_hexsha": "7338c5f4c5c6931d676db2f43f6fe41d05eb19ee", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from manimlib.imports import * import networkx as nx import manimnx.manimnx as mnx import numpy as np import random class RandomGraphs(Scene): def construct(self): import time # list of colors to choose from COLORS = [RED, BLUE, GREEN, ORANGE, YELLOW] np.random.seed(int(time.time(...
{"hexsha": "cb8299098cf5c9792ddc8e770cb8dc901618d464", "size": 1649, "ext": "py", "lang": "Python", "max_stars_repo_path": "example.py", "max_stars_repo_name": "j6k4m8/manimnx", "max_stars_repo_head_hexsha": "eea30015e3f5594f8a8e01715e32d94962b44095", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 40, "max_star...
"""yearly precip""" from __future__ import print_function import datetime import numpy as np from pyiem.plot import MapPlot from pyiem.network import Table as NetworkTable from pyiem.util import get_dbconn def main(): """Go Main Go""" st = NetworkTable('IACLIMATE') pgconn = get_dbconn('coop', user='nobod...
{"hexsha": "d86c75ab844441a89a02751459b3d4a9e80bb696", "size": 2835, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/year/precip.py", "max_stars_repo_name": "trentford/iem", "max_stars_repo_head_hexsha": "7264d24f2d79a3cd69251a09758e6531233a732f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
import numpy as np import pandas as pd import altair as alt plot_params = { "exposed": {"name": "Exposed", "color": "#1f77b4"}, "infected": {"name": "Infected", "color": "#ff7f0e"}, } # enable tooltips def tooltips(): return {"config": {"mark": {"tooltip": {"content": "encoding"}}}} alt.themes.registe...
{"hexsha": "86635b96b9f6aef6dc4aa1a6e7686be3ecef2ed5", "size": 4036, "ext": "py", "lang": "Python", "max_stars_repo_path": "covid_19/legacy/visualization.py", "max_stars_repo_name": "ramonfontes/Mathematical-and-Statistical-Modeling-of-COVID19-in-Brazil", "max_stars_repo_head_hexsha": "0f93a195ad867f6d405c4a80469b535a0...
from ryu.base import app_manager from ryu.ofproto import ofproto_v1_3 from ryu.controller.handler import set_ev_cls from ryu.controller.handler import MAIN_DISPATCHER, DEAD_DISPATCHER, CONFIG_DISPATCHER from ryu.controller import ofp_event from ryu.lib import hub from ryu.lib.packet import packet from ryu.lib.packet im...
{"hexsha": "16aaba58bdcc89960dd84ee19632269220e6e577", "size": 11826, "ext": "py", "lang": "Python", "max_stars_repo_path": "MyStudy/app/secure_ddos/DDOS_Detector.py", "max_stars_repo_name": "OucMan/ryu", "max_stars_repo_head_hexsha": "6ca460ec16f967945643fc7b3846898c571ad6cf", "max_stars_repo_licenses": ["Apache-2.0"]...
function solve(s::String) maximum(regex -> length(regex.match), eachmatch(r"[aeiou]+"i, s)) end
{"hexsha": "b4c9e2a148cf56a0e8350023264e8486bfdb5190", "size": 99, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "7_kyu/Longest_vowel_chain.jl", "max_stars_repo_name": "UlrichBerntien/Codewars-Katas", "max_stars_repo_head_hexsha": "bbd025e67aa352d313564d3862db19fffa39f552", "max_stars_repo_licenses": ["MIT"], "m...
## path to TRPL folder --> set it before running the code! path_to_trpl = "D:\\Projects\\TRPL" # some path to the TRPL folder (just an example here) ## activate package environment cd(@__DIR__) using Pkg Pkg.activate("Project.toml") ## loading packages using CSV, DataFrames ## directory cd(joinpath(path_to_trpl,"Dat...
{"hexsha": "58da1ebff53e1c2040c5384877c6714b4426e54d", "size": 1542, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Code/eta0_calc.jl", "max_stars_repo_name": "MaxGrossmann/TRPL", "max_stars_repo_head_hexsha": "b27bc01299502e09b997e52da0842edfb7dd61fb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
[STATEMENT] lemma get\<^sub>N\<^sub>o\<^sub>d\<^sub>e_type_wf: assumes "type_wf h" shows "node_ptr |\<in>| node_ptr_kinds h \<longleftrightarrow> get\<^sub>N\<^sub>o\<^sub>d\<^sub>e node_ptr h \<noteq> None" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (node_ptr |\<in>| node_ptr_kinds h) = (get node_ptr h \<no...
{"llama_tokens": 592, "file": "Core_SC_DOM_common_classes_NodeClass", "length": 3}
import platform import numpy import matplotlib import scipy import tkinter import emcee import astroquery import sys tcl = tkinter.Tcl() tkinter__version__ = tcl.call("info", "patchlevel") def run_app(): print('\nSystem setup:\n') print('OS: {0} {1}\n'.format(platform.system(), platform.release())) pr...
{"hexsha": "3286f7dcc51b0d6cf5962b4a87526e0c981ff136", "size": 1436, "ext": "py", "lang": "Python", "max_stars_repo_path": "hops/__run__.py", "max_stars_repo_name": "ExoWorldsSpies/hops", "max_stars_repo_head_hexsha": "a33e434befe17318c064210a289b453c6f91b44f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, ...
import matplotlib.pyplot as plt import numpy as np def main(): # create figure fig = plt.figure() # b) add two axes ax1 = fig.add_axes([0.11, 0.11, 0.35, 0.8]) ax2 = fig.add_axes([0.6, 0.11, 0.35, 0.8]) # c) plot, set labels and titles ax1.set_title("first plot") ax2.set_title...
{"hexsha": "e4b593e528a5d183ead0222c9cceeca139251c48", "size": 937, "ext": "py", "lang": "Python", "max_stars_repo_path": "serie10/ex10_1.py", "max_stars_repo_name": "roctubre/compmath", "max_stars_repo_head_hexsha": "06b287b2d24d6f033c60defb5a70d97e045644ad", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
# # Recursively with model # # Important: this is the tool one must use to extract back information # after fitting. Instead of trying to track individual parameters, # simply visit the models and extract required information. # # Note that you can also tag the models that interest you using a # Model2Fit_TaggedModel i...
{"hexsha": "4e613e1e2673407b03aa288776e40bc386b53163", "size": 2571, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/model2fit/visit.jl", "max_stars_repo_name": "vincent-picaud/NLS_Fit.jl", "max_stars_repo_head_hexsha": "f72882bb00495dff81500a40e4e417a1a720d947", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" Name : c12_14_stock_price_movement.py Book : Python for Finance (2nd ed.) Publisher: Packt Publishing Ltd. Author : Yuxing Yan Date : 6/6/2017 email : yany@canisius.edu paulyxy@hotmail.com """ import scipy as sp import matplotlib.pyplot as plt # input area stock_price_tod...
{"hexsha": "3595d92e439a9fd0a612fdddb927f6cbd3143d63", "size": 1256, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter12/c12_14_stock_price_movement.py", "max_stars_repo_name": "John-ye666/Python-for-Finance-Second-Edition", "max_stars_repo_head_hexsha": "dabef09bcdd7b0ec2934774741bd0a7e1950de73", "max_sta...
import numpy as np Array = np.ndarray
{"hexsha": "13b76cf74ce10e8f9d64fa9d2a2ea46f900cc976", "size": 39, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/environment.py", "max_stars_repo_name": "ifsm/apollon", "max_stars_repo_head_hexsha": "c733591240f3a4d3825d61385bd19262bd76b43b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
from __future__ import division import sys import os import numpy as np from scipy.spatial import distance from expyriment.misc import data_preprocessing from ld_utils import extractCorrectAnswers, printErrors, printBasicResults, extractRecognitionAnswers from ld_utils import correctCards, wrongCards from config import...
{"hexsha": "965c71067168b2da0a14c5192354cb45c004a1b6", "size": 16888, "ext": "py", "lang": "Python", "max_stars_repo_path": "ld_analysis.py", "max_stars_repo_name": "labdoyon/DeCoNap", "max_stars_repo_head_hexsha": "4509addbd6a2402b30a2e618acdc9fc636e0ca6c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
!* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. !* See https://llvm.org/LICENSE.txt for license information. !* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ! ! Derived types program p type test integer,dimension(:,:),pointer:: mem end type integer results(9), expect(9) d...
{"hexsha": "ec7e0575cc7b40ad4762f59d62d651e262444ac0", "size": 620, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/f90_correct/src/dt00.f90", "max_stars_repo_name": "abrahamtovarmob/flang", "max_stars_repo_head_hexsha": "bcd84b29df046b6d6574f0bfa34ea5059092615a", "max_stars_repo_licenses": ["Apache-2.0"]...
## Densidad de electrones Ge ## Jeison Ivan Roa M. import numpy as np import matplotlib.pyplot as plt import scipy.constants as sc from matplotlib.widgets import RadioButtons, Slider #-------------------------------------------------------------------------------------------------------- #DEL...
{"hexsha": "a5501b8f9fd6b8a2a647a7d3f978a39850b4fb8c", "size": 5702, "ext": "py", "lang": "Python", "max_stars_repo_path": "Desidad_Electrones_Ge.py", "max_stars_repo_name": "jeisonroa1/FisicaSemiconductoresPython", "max_stars_repo_head_hexsha": "149534992231f1b5ff89f837be1fe00a6ecb8e46", "max_stars_repo_licenses": ["M...
import cv2 import numpy as np face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') cap = cv2.VideoCapture(0) while True: ret, img = cap.read() gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) faces = face_cascade.detectMultiScale(gray, 1.3, 5) for (x,y,w,h) in faces: cv2.re...
{"hexsha": "9a5a8715b95fe243a2f16b421c5127827e5e88a4", "size": 493, "ext": "py", "lang": "Python", "max_stars_repo_path": "cv_test/face_track.py", "max_stars_repo_name": "JoshVorick/webcamVR", "max_stars_repo_head_hexsha": "05f16e0ebc3fa935313d97bed6f13bf26a6f2dc4", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#%% from copy import deepcopy from qutip.operators import create, destroy, num, qeye import numpy as np from qutip import sigmax, sigmay, sigmaz, tensor, fidelity from qutip.qip.device.processor import Processor from qutip.qip.compiler import Instruction from qutip.qip.compiler import GateCompiler import matplotlib.py...
{"hexsha": "deae359f5590f6bcba7de9fdf6775df3fec25994", "size": 8722, "ext": "py", "lang": "Python", "max_stars_repo_path": "HyQu_scripts/qip_demo.py", "max_stars_repo_name": "ldabas/qutip", "max_stars_repo_head_hexsha": "2bd445c0625b89a8b5bfe636182e2c44c961da5e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created in September 2020 @author: karliskanders Functions and classes for generating and analysing career transition recommendations """ import pandas as pd import numpy as np import pickle from time import time import yaml import os from ast import literal_eval fr...
{"hexsha": "c9cd6a65c71e8e8f4d646198656bd5ba8fd710c1", "size": 63138, "ext": "py", "lang": "Python", "max_stars_repo_path": "mapping_career_causeways/transitions_utils.py", "max_stars_repo_name": "bb20417/mapping-career-causeways", "max_stars_repo_head_hexsha": "cb8c57a2c4a0ab40a2bba4eca6664601bcc24cad", "max_stars_rep...
/* * XferItem.cpp * * Created on: 17.07.2016 * Author: Frank */ #include "XferItem.h" #include <boost/format.hpp> #include <boost/lambda/lambda.hpp> #include <boost/lexical_cast.hpp> #include <boost/algorithm/string.hpp> #include "ParameterValue.h" #include "ParameterWithChilds.h" namespace testprot { us...
{"hexsha": "ec542ef67b2bccec86847a4b13b1838fb14fe0e2", "size": 4600, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "c/org.chabu.node/src/testprot/XferItem.cpp", "max_stars_repo_name": "keinfarbton/Chabu", "max_stars_repo_head_hexsha": "fa29191a1cc4bce2b0de63513714a7e98d588d99", "max_stars_repo_licenses": ["MIT"],...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2018 Elvis Yu-Jing Lin <elvisyjlin@gmail.com> # Licensed under the MIT License - https://opensource.org/licenses/MIT import base64 import io import numpy as np import os from collections import deque from PIL import Image import gym from gym import error...
{"hexsha": "f4c9c1dd98c52d7f84b80c95942feeafae47deee", "size": 5524, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym_chrome_dino/envs/chrome_dino_env.py", "max_stars_repo_name": "yukang1996/gym-chrome-dino", "max_stars_repo_head_hexsha": "3463f6dd041014062d9d23d62a87df6a1819a24c", "max_stars_repo_licenses": ...
[STATEMENT] lemma lUnionM_empty [simp]: "lUnionM [] = return []" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lUnionM [] = return [] [PROOF STEP] by(simp add: lUnionM_def)
{"llama_tokens": 74, "file": "Monomorphic_Monad_Monomorphic_Monad", "length": 1}
# Copyright 2020, the e-prop team # Full paper: A solution to the learning dilemma for recurrent networks of spiking neurons # Authors: G Bellec*, F Scherr*, A Subramoney, E Hajek, Darjan Salaj, R Legenstein, W Maass import matplotlib.pyplot as plt import numpy as np import numpy.random as rd import tensorflow as tf f...
{"hexsha": "375b36074e7580761bf420396511903a11d1ec64", "size": 13649, "ext": "py", "lang": "Python", "max_stars_repo_path": "Figure_3_and_S7_e_prop_tutorials/tutorial_pattern_generation.py", "max_stars_repo_name": "Ebanflo42/eligibility_propagation", "max_stars_repo_head_hexsha": "ae454a68ea4473a768e147ab2766feaa063e83...
using VoronoiCells using Test include("Points.jl") include("Rectangle.jl") include("Clipping.jl") include("Sort.jl") include("Cells.jl") include("Area.jl") include("Plot.jl")
{"hexsha": "0d5d7bad1ed8bcd0f478847db75005b8c6882604", "size": 177, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "philbit/VoronoiCells.jl", "max_stars_repo_head_hexsha": "19ac0d1dcc222fbf10c9f27c1afc83dd3c47e8c9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
""" University of Minnesota Aerospace Engineering and Mechanics - UAV Lab Copyright 2019 Regents of the University of Minnesota See: LICENSE.md for complete license details Author: Chris Regan Example script for testing Frequency Response Estimation - MIMO. """ import numpy as np import matplotlib.pyplot as plt impo...
{"hexsha": "ab62d4df8c1a78594b6529f72b5e2c845162e178", "size": 23005, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tests/TestFreqRespEstMIMO.py", "max_stars_repo_name": "UASLab/OpenFlightAnalysis", "max_stars_repo_head_hexsha": "b5ecb3ea7ff82f5fb21efa7e9cbee60bf68aea37", "max_stars_repo_licenses": ["MIT"], "m...
import json from statistics import mean import numpy as np def find_nearest(array, value): idx, val = min(enumerate(array), key=lambda x: abs(x[1] - value)) return idx def calculate_demographic_bias_metric( demographic_percentiles, approaches, output_path_percentiles, calculate_sex=True, ...
{"hexsha": "b49a94dffd809ddc4b5672866e60a98ffe7ff5f5", "size": 4162, "ext": "py", "lang": "Python", "max_stars_repo_path": "gradgpad/reproducible_research/cli/calculate_demographic_bias_metric.py", "max_stars_repo_name": "acostapazo/gradgpad", "max_stars_repo_head_hexsha": "bbf75e11eed844a0014f7cb6627c8fa0c73cd3f1", "m...
from typing import Dict, Text from constants.config import SMOTE_IMBALANCE from core.preprocessing.imbalance import smote_oversampling import numpy as np def fix_imbalance(x, y, params: Dict, imbalance_type: Text = None): if imbalance_type == SMOTE_IMBALANCE:...
{"hexsha": "2bc8044f791444f55c3fa7c9ac86b7f3755995c8", "size": 771, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/data/imbalance.py", "max_stars_repo_name": "daniele21/Financial_Sentiment_Analysis", "max_stars_repo_head_hexsha": "3734733f2d1d291c81a6239de121edcce861b463", "max_stars_repo_licenses": ["M...
using CorrelationView using Base.Test @test true
{"hexsha": "472d540d518c5945c15495ba2ad1b1c7ab01fc7d", "size": 50, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "JuliaTagBot/CorrelationView.jl", "max_stars_repo_head_hexsha": "1dc6bcbcc97069c2089eafa2e6e2d97b158ec9d9", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
from normal_forms import normal_form from normal_forms.lie_bracket import lie_bracket import sympy # Guckenheimer, Excercise 7.3.1 def f(x, y): f1 = y f2 = x * x + x * y return f1, f2 k = 5 h = normal_form(f, (0, 0), k) # each normal form term for deg>1 is in the nullspace of transpose(L1) print np.isc...
{"hexsha": "f36e1bc4da0e1d860f1b2ed2799dd3ee99f225cc", "size": 686, "ext": "py", "lang": "Python", "max_stars_repo_path": "normal_forms/examples/equivariant/01.py", "max_stars_repo_name": "joepatmckenna/normal_forms", "max_stars_repo_head_hexsha": "e506304295a2592cfc050a2a688add89715aa5ff", "max_stars_repo_licenses": [...
[STATEMENT] lemma fpxs_const_0 [simp]: "fpxs_const 0 = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. fpxs_const (0::'a) = 0 [PROOF STEP] by transfer auto
{"llama_tokens": 78, "file": "Formal_Puiseux_Series_Formal_Puiseux_Series", "length": 1}
#ifndef AGRO_DAEMON_WEBSOCKET_CERTIFICATE_HPP__ #define AGRO_DAEMON_WEBSOCKET_CERTIFICATE_HPP__ #include <boost/asio/ssl.hpp> #include <string> namespace Agro{ void load_certificate(boost::asio::ssl::context& ctx, const std::string& cert_file_name, const std::string& key_file_name, boost::system::error_code& e...
{"hexsha": "0c2a6b2e842f4481d62d1e89ed20beb1aaa50f23", "size": 396, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/websocket/load_certificate.hpp", "max_stars_repo_name": "rnascunha/agro_daemon", "max_stars_repo_head_hexsha": "061e9c3ad16b6cebed64a9554dff97481e28f26d", "max_stars_repo_licenses": ["MIT"], "max...
# coding: utf-8 import numpy as np from itertools import groupby from collections import OrderedDict #from sympy.core.sympify import sympify from sympy.simplify.simplify import simplify from sympy import Symbol from sympy import Lambda from sympy import Function from sympy import bspline_basis from sympy import lambd...
{"hexsha": "dc8b74c9699c4b207e4dda2d5f622980f49da7f6", "size": 7298, "ext": "py", "lang": "Python", "max_stars_repo_path": "sympde/core/algebra.py", "max_stars_repo_name": "pyccel/sympde", "max_stars_repo_head_hexsha": "69e6a6634b2045d46286a0453cb66deab5f2e76c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12...
/* * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. */ #include <boost/bind.hpp> #include <boost/asio/ip/host_name.hpp> #include <boost/foreach.hpp> #include <boost/tokenizer.hpp> #include <boost/assign/list_of.hpp> #include <isc/hmacmd5.h> #include <isc/hmacsha.h> #include "base/contrail_ports.h" ...
{"hexsha": "4fc57a6725a0406e386ac8686e3ef4c256c8bb50", "size": 16799, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/vnsw/agent/services/metadata_proxy.cc", "max_stars_repo_name": "jnpr-pranav/contrail-controller", "max_stars_repo_head_hexsha": "428eee37c28c31830fd764315794e1a6e52720c1", "max_stars_repo_licens...
import nengo from numpydoc.docscrape import NumpyDocString, ClassDoc import inspect import ipdb doc = ClassDoc(nengo.Ensemble) print(len(doc["Parameters"])) argspec = inspect.getargspec(nengo.Ensemble.__init__) # check for basic spelling errors # TODO: skip 'self' for classes, but not for functions for a_i, arg in e...
{"hexsha": "2eba7f17c5c60a9696dc5122f7b95c8831fd0131", "size": 805, "ext": "py", "lang": "Python", "max_stars_repo_path": "nengo_checker.py", "max_stars_repo_name": "Seanny123/sphinx-checker", "max_stars_repo_head_hexsha": "7bf0b1bea3102cbe50b3db7fdabf632d16de0426", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
/** Copyright (c) 2016, Engelmann Stephan, Heller Florian, Meißner Pascal, Stöckle Patrick, Wittenbeck Valerij All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must ret...
{"hexsha": "b9d2651ad540927cfcfb484eb9428b7553a9cd83", "size": 9148, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/PTUTracker.cpp", "max_stars_repo_name": "asr-ros/asr_flock_of_birds_tracking", "max_stars_repo_head_hexsha": "c5bed81a230aae81791156acb68cc54751b007f1", "max_stars_repo_licenses": ["BSD-3-Clause...
import tensorflow as tf import numpy as np import time from .sample_mlp import SampleMLP from .frame_rnn import FrameRNN from .utils import unsqueeze class SampleRNN(tf.keras.Model): def __init__(self, batch_size, frame_sizes, q_levels, q_type, dim, rnn_type, num_rnn_layers, seq_len, emb_size, s...
{"hexsha": "892bcc8395d773262253aa3489433ed72c88caed", "size": 5449, "ext": "py", "lang": "Python", "max_stars_repo_path": "samplernn/model.py", "max_stars_repo_name": "fdb/prism-samplernn", "max_stars_repo_head_hexsha": "cd34a67dc45264c736d5116fa96d62415f91824a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
[STATEMENT] lemma Suc_0_or_eq: \<open>Suc 0 OR n = n + of_bool (even n)\<close> [PROOF STATE] proof (prove) goal (1 subgoal): 1. Suc 0 OR n = n + of_bool (even n) [PROOF STEP] using one_or_eq [of n] [PROOF STATE] proof (prove) using this: 1 OR n = n + of_bool (even n) goal (1 subgoal): 1. Suc 0 OR n = n + of_bool ...
{"llama_tokens": 168, "file": null, "length": 2}
import csv import cv2 import numpy as np import tensorflow as tf from keras.callbacks import EarlyStopping, ModelCheckpoint from keras.layers.convolutional import Conv2D, Convolution2D, Cropping2D from keras.layers.core import Activation, Dense, Dropout, Flatten, Lambda from keras.layers.normalization import BatchNorm...
{"hexsha": "37675e31c38367e5cd174cb18ac480f67fa67fbf", "size": 3686, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "samsonmking/BehavioralCloning", "max_stars_repo_head_hexsha": "871802f31fb3e06135a1050e639941ab91112b20", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import os import os.path as osp import gym import time import joblib import logging import numpy as np import tensorflow as tf from baselines import logger from collections import deque from baselines.common import set_global_seeds, explained_variance from baselines.common.vec_env.subproc_vec_env import SubprocVecEnv ...
{"hexsha": "329e804eac48b029448068ee8a2a8cd9f55fa0b6", "size": 11783, "ext": "py", "lang": "Python", "max_stars_repo_path": "baselines/a2c/a2c.py", "max_stars_repo_name": "AnonymousAddress/ExplorationConsciousRL", "max_stars_repo_head_hexsha": "9836335d3f0bb8e733076be7011167a89732d887", "max_stars_repo_licenses": ["MIT...
def function_getMontage(montage): # large laplacian ## Calculates spatial filter matrix for Laplacian derivations. ## ## Returns a spatial filter matrix used to calculate Laplacian derivations as ## well as indices used to plot in a topographical layout. ## Assuming that the data vector s is of ...
{"hexsha": "f361f48bc9e8a0849b91d9df51f68f3bddbdfe58", "size": 6848, "ext": "py", "lang": "Python", "max_stars_repo_path": "gcpds/filters/spatial_filters/Large_laplacian.py", "max_stars_repo_name": "FrankYesid/python-gcpds.filters", "max_stars_repo_head_hexsha": "f16b1384fb7640320728959f6a1f0fb1410db9f3", "max_stars_re...