text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
"""This metric outputs a transformer-based classifier prediction of the paraphrased text.""" import os import numpy as np import torch import torch.nn.functional as F import tqdm import transformers from torch.utils.tensorboard import SummaryWriter from transformers import AutoModelForSequenceClassification, AutoToke...
{"hexsha": "706717c241f218819833578fc8bfe7c72601eb87", "size": 19589, "ext": "py", "lang": "Python", "max_stars_repo_path": "fibber/metrics/classifier/transformer_classifier.py", "max_stars_repo_name": "stungkit/fibber", "max_stars_repo_head_hexsha": "115bc594d69cfd5d48c63450c5f3a2c08f463ba3", "max_stars_repo_licenses"...
import cv2 import numpy as np from matplotlib import pyplot as plt from prelib import preprocess import pywt def segment(img): seg = [] for i in range(4): for j in range(4): start = i*128 start1 = j*128 end = start+128 end1 = start1+128 seg.a...
{"hexsha": "e9c60ee8401173e511d049e9b40ce1be0bdd6ef9", "size": 2355, "ext": "py", "lang": "Python", "max_stars_repo_path": "feature.py", "max_stars_repo_name": "devashishp/Content-Based-Image-Retrieval", "max_stars_repo_head_hexsha": "86f08255694452d7fd2abaf5ab595f5f3f4e6a18", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/usr/bin/env python # coding: utf-8 # In[3]: import numpy as np import cv2 import glob import matplotlib.pyplot as plt import matplotlib.image as mpimg from moviepy.editor import VideoFileClip from collections import deque class Line: def __init__(self, region): # Was the line found in the previous fr...
{"hexsha": "c8c7a8e8ffbaade8a53230355e55639fa1c861f8", "size": 12468, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "2dongheee/Udacity-CarND-Advanced-Lane-Lines", "max_stars_repo_head_hexsha": "f636f745c17431ebebd8df7291682b6afc8bb38d", "max_stars_repo_licenses": ["MIT"], "max...
import os import tkinter as tk from collections import Counter from tkinter.filedialog import askopenfilename os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2" import cv2 as cv import numpy as np from PIL import Image, ImageTk from tensorflow.keras import models from utils import decoder IMAGE_FORMATS = [("JPEG", "*.jpg"), ...
{"hexsha": "5b1d7071dfd28c627ec2cf2fbadddfb22585179a", "size": 7020, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "morswin22/anpr", "max_stars_repo_head_hexsha": "b9c50ad3c1309f35415ff60067d0cb4bbac57e24", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_re...
/* * Copyright (C) 2016-2018 Philippe Proulx <eepp.ca> * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ #ifndef _YACTFR_METADATA_PACKETIZED_METADATA_STREAM_HPP #define _YACTFR_METADATA_PACKETIZED_METADATA_STREAM_HPP #include <string> #in...
{"hexsha": "dabbd5aa8838860a8a39e23bd1678637f20954e8", "size": 1867, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/yactfr/metadata/packetized-metadata-stream.hpp", "max_stars_repo_name": "eepp/yactfr", "max_stars_repo_head_hexsha": "5cec5680d025d82a4f175ffc19c0704b32ef529f", "max_stars_repo_licenses": ["...
! ################################################################### ! Copyright (c) 2013-2022, Marc De Graef Research Group/Carnegie Mellon University ! All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are...
{"hexsha": "4e7848ee31c5d75cdd3e0ded7c32db2e1f2451ed", "size": 5603, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Source/Utilities/EMdrawcell.f90", "max_stars_repo_name": "EMsoft-org/EMsoftOO", "max_stars_repo_head_hexsha": "052aefc32a603b0dcb830901fcf14535afc15676", "max_stars_repo_licenses": ["Unlicense"]...
# ---------------------------------------------------------------------------- # - Open3D: www.open3d.org - # ---------------------------------------------------------------------------- # The MIT License (MIT) # # Copyright (c) 2018-2021 www.open3d.org # # Permission i...
{"hexsha": "91274ff1f31b152a72def9d43ce648ce99bb0e54", "size": 3003, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/python/visualization/non_blocking_visualization.py", "max_stars_repo_name": "BlenderGamer/Open3D", "max_stars_repo_head_hexsha": "8c6a7e74582fe09f3a2295933794bfc16026c21f", "max_stars_rep...
import matplotlib.pyplot as plt import matplotlib.animation as animation import numpy as np import keras from keras.datasets import mnist # Load MNIST def load_MNIST(binary=False): (x_train, y_train), (x_test, y_test) = mnist.load_data() # Normalize the data x_train = x_train/255. x_test = x_test/255...
{"hexsha": "e22f13178a5f68925570e247a28c09f458df898a", "size": 6221, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils.py", "max_stars_repo_name": "marc-moreaux/Deep-Learning-classes", "max_stars_repo_head_hexsha": "aff39bb710b189ea7aec479db102b1e6628e4a91", "max_stars_repo_licenses": ["MIT"], "max_stars...
[STATEMENT] lemma stream_from_llist: "type_definition llist_of_stream stream_of_llist {xs. \<not> lfinite xs}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. type_definition llist_of_stream stream_of_llist {xs. \<not> lfinite xs} [PROOF STEP] by(unfold_locales) simp_all
{"llama_tokens": 108, "file": "Coinductive_Coinductive_Stream", "length": 1}
""" @authors: # ============================================================================= Information: The functions in this script all regard matters related to matplotlib figures and cartopy maps. This script replaces previous works done with the discontinued Basemap library. # ==================...
{"hexsha": "34e04fe9de7ee8d33b9c17bf8796c1b6b40d1952", "size": 9647, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/GH_earthMap.py", "max_stars_repo_name": "x-champ/tolosat_gravimetry", "max_stars_repo_head_hexsha": "87f36cbe774537c748b7b1bdaae0af5e87917ca0", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import scipy.stats as stats from scipy.integrate import quad from scipy.fft import fft, ifft from scipy.interpolate import interp1d from functools import partial from scipy.optimize import minimize, fsolve, newton def CallPut...
{"hexsha": "29fa9acf70d687cceab78ad416057a1dee4d25f4", "size": 3724, "ext": "py", "lang": "Python", "max_stars_repo_path": "AllFunctions/exact_methods.py", "max_stars_repo_name": "kirillzx/Stochastic-Differential-Equations", "max_stars_repo_head_hexsha": "1bb8ea1b6027a44e216e16a2a6a6b42761c182e7", "max_stars_repo_licen...
# Licensed under a 3-clause BSD style license - see LICENSE from __future__ import print_function, division import Icarus from Icarus.Utils.import_modules import * ##### Welcome message print( "Analysing some mock data. It is recommended to run it within the `ipython --pylab' environment.\n" ) ##### Loading the da...
{"hexsha": "dec0770189c58ea1d126c23732a6c92086875d7a", "size": 4839, "ext": "py", "lang": "Python", "max_stars_repo_path": "Examples/Example1/example1.py", "max_stars_repo_name": "mhvk/Icarus", "max_stars_repo_head_hexsha": "bd07ba440cc82d4374e90d6d95dc8844fd82ff19", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created: Mon Apr 8 15:27:35 2019 Author: crdrisko Description: Reproducing the silver plot from the fit functions provided in the literature. Ref: "Field Enhancement around Metal Nanoparticles and Nanoshells: A Systematic Investigation" by Katsuaki Tana...
{"hexsha": "fa1e4995f393383d7fcdb449aa8a8b4e9a3fea2d", "size": 5622, "ext": "py", "lang": "Python", "max_stars_repo_path": "nd-coursework/courses/spectroscopy/.in-progress/HW_5/E_and_M_HW5.1.py", "max_stars_repo_name": "crdrisko/nd-grad", "max_stars_repo_head_hexsha": "f1765e4f24d7a4b1b3a76c64eb8d88bcca0eaa44", "max_st...
""" Runs LIME the inter document metaclusters created by the pipeline. For each pair of clusters connected by some threshold, LIME is run against those clusters and the results are saved. """ import utils.db_utils as udb import utils.data_utils as uds import utils.os_utils as uos import document_scoring as ds import...
{"hexsha": "9a6c232ba1cc55fecc240e616abade38f13b8cc7", "size": 4089, "ext": "py", "lang": "Python", "max_stars_repo_path": "pipeline_src/postprocessing/lime_explainer.py", "max_stars_repo_name": "NIHOPA/pipline-word2vec", "max_stars_repo_head_hexsha": "61b8ae2ba42e9376c855202e86237d10b8a62853", "max_stars_repo_licenses...
\section{Adventure Conversion} \index{Converting Adventures|(} There isn't always time for prep. People aren't entirely committed to a game--you just want to test it out or you've got a four-hour slot at a convention that you want to fill and you've never met the players before in your life. Maybe prep isn't somethin...
{"hexsha": "66da7d2c4093fbf30f8d09f335ce11e8a25ab140", "size": 14163, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/appendices/Conversion.tex", "max_stars_repo_name": "Hegz/DW-Latex", "max_stars_repo_head_hexsha": "49a230f82fdeab7faa7c736ef81ef13266ac399d", "max_stars_repo_licenses": ["CC-BY-3.0"], "max_star...
# Included in benchmark.jl using Distributed using Dates "Adds process 2, same LOAD_PATH as process 1" function prepareworker() # Prepare worker FULLLOADPATH = LOAD_PATH if nworkers() < 2 addprocs(1) end futur = @spawnat 2 for p in FULLLOADPATH p ∉ LOAD_PATH && p...
{"hexsha": "beef0a0e29d0965a6eac76ee8c9b8f37e7f2ba61", "size": 9847, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "benchmark/functions_benchmark.jl", "max_stars_repo_name": "jebej/WebSockets.jl", "max_stars_repo_head_hexsha": "99775084900e15561e5c8949b81279521c0f3d21", "max_stars_repo_licenses": ["MIT"], "max_s...
# forward propagation example for deep learning in python class. # # the notes for this class can be found at: # https://deeplearningcourses.com/c/data-science-deep-learning-in-python # https://www.udemy.com/data-science-deep-learning-in-python from __future__ import print_function, division from builtins import rang...
{"hexsha": "2d5c7a8c6a174ce3544e8b9d5278ede746d086c6", "size": 1828, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ann_class/forwardprop.py", "max_stars_repo_name": "JouniVatanen/NLP-and-Deep-Learning", "max_stars_repo_head_hexsha": "2fddcc2c39787713d33d17e80565de4ed073ca60", "max_stars_repo_licenses": ["M...
#include <boost/phoenix/core/visit_each.hpp>
{"hexsha": "819f16791f42a6757dcbefd9875ab128951dc296", "size": 45, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_phoenix_core_visit_each.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1...
[STATEMENT] lemma cas_G_T: "G.cas = cas" [PROOF STATE] proof (prove) goal (1 subgoal): 1. G.cas = cas [PROOF STEP] using sub_G compatible_cas [PROOF STATE] proof (prove) using this: Digraph_Component.subgraph T G compatible ?G ?H \<Longrightarrow> pre_digraph.cas ?G = pre_digraph.cas ?H goal (1 subgoal): 1. G.cas = ...
{"llama_tokens": 146, "file": "Query_Optimization_Directed_Tree_Additions", "length": 2}
from sample.estimate import negLoglikelihood from scipy.optimize import minimize import numpy as np init = np.array([0.5,0.18,0.18]) print(minimize(negLoglikelihood,init,options={'gtol': 1e-6, 'disp': True}))
{"hexsha": "a02a49c7f185e07609683b8c40be521aee2c6419", "size": 212, "ext": "py", "lang": "Python", "max_stars_repo_path": "sample/param.py", "max_stars_repo_name": "Alkane0050/SimulateCovid19Spread", "max_stars_repo_head_hexsha": "5099c47b55f8f5007a758cde6b37bb19fc17175e", "max_stars_repo_licenses": ["MIT"], "max_stars...
From hahn Require Import Hahn. Require Import Execution Execution_Aux Events Labels. From Coq Require Import Lia. Require Import Util Sem Path TerminateGen. Set Implicit Arguments. Section Prev. Variable thread_sem : tsemType. Variable LR : LRType thread_sem. Variable cons : consType. Notation "e1 '<_...
{"author": "volodeyka", "repo": "trust-coq", "sha": "108aea7c1ea2852fe81e1cbf63450fed6b892435", "save_path": "github-repos/coq/volodeyka-trust-coq", "path": "github-repos/coq/volodeyka-trust-coq/trust-coq-108aea7c1ea2852fe81e1cbf63450fed6b892435/src/trust/Prev.v"}
from flask import Flask, flash, request, redirect, url_for from werkzeug.utils import secure_filename import json import os import cv2 import tensorflow as tf import numpy as np app = Flask(__name__) UPLOAD_FOLDER = './uploads_cnn' ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'} CATEGORIES = ["covid...
{"hexsha": "60bba9451434edcf68fcbdbcc2af5e0a72dc58c7", "size": 2274, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "hamedpa/covid19", "max_stars_repo_head_hexsha": "aef1ea3a48244ac78f1e18286dd67bd86cbbd23c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars...
# # Copyright (c) 2020, NVIDIA CORPORATION. # # 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 ...
{"hexsha": "f844e5b45a825f5299bd974941c97b0d1048ee42", "size": 28372, "ext": "py", "lang": "Python", "max_stars_repo_path": "nvtabular/ops/categorify.py", "max_stars_repo_name": "EvenOldridge/NVTabular", "max_stars_repo_head_hexsha": "85333ae754c0512f7b213a4e98117a1501500dda", "max_stars_repo_licenses": ["Apache-2.0"],...
# # types.jl -- # # Type definitions for the Julia interface to the C libraries of TAO, a Toolkit # for Adaptive Optics. # #------------------------------------------------------------------------------ # # This file is part of TAO software (https://git-cral.univ-lyon1.fr/tao) # licensed under the MIT license. # # Copy...
{"hexsha": "39e9b012910ccebbcecdaaf38be6edff5c9a7614", "size": 13865, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/typesSharedObjects.jl", "max_stars_repo_name": "Bossax/FLICameras.jl", "max_stars_repo_head_hexsha": "dd1a590d7f0d2c9466e6092e2bac254840c4e440", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# Copyright (c) 2021 brainlife.io # # This file is a MNE python-based brainlife.io App # # Author: Guiomar Niso # Indiana University # set up environment import os import json import numpy as np import pandas as pd import matplotlib.pyplot as plt # Current path __location__ = os.path.realpath( os.path.join(os.ge...
{"hexsha": "23769cb8a4a077c1e95604dae29e5752bf875268", "size": 3269, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "guiomar/app-average-channels", "max_stars_repo_head_hexsha": "7ff98cb2a16ee6dc8659ebe94417e70f57a5f20a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import numpy as np from csv import reader from decimal import * def SDM(datalist): """ 逐差法 :param datalist: :return: """ length = len(datalist) resultlist = [] halfLen = int(length/2) for i in range(0, halfLen): resultlist.append((Decimal(datalist[i+halfLen])...
{"hexsha": "cc5a75deef32a4ba90bb49cc59868534e2fa9662", "size": 2530, "ext": "py", "lang": "Python", "max_stars_repo_path": "DataReader.py", "max_stars_repo_name": "DezhengLee/Labster", "max_stars_repo_head_hexsha": "561c522d6d3d0b4b70c667d2f9a1d16e1734affc", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
# -*- coding: utf-8 -*- """ # @file name : focal_loss.py # @author : JLChen # @date : 2020-03-12 # @brief : 标准的 focal loss """ import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import matplotlib.pyplot as plt class FocalLoss(nn.Module): def __init__(self, gamma=...
{"hexsha": "53aeb3b25297481609590b2b522cb2e1ed13ec6c", "size": 1803, "ext": "py", "lang": "Python", "max_stars_repo_path": "Segmentation/losses/focal_loss.py", "max_stars_repo_name": "ttthomaschan/DeepcvLib", "max_stars_repo_head_hexsha": "18f7728559136a3c5c8ad54666788ea771e95b16", "max_stars_repo_licenses": ["MIT"], "...
[STATEMENT] lemma nth_prime_eqI: assumes "prime p" "card {q. prime q \<and> q < p} = n" shows "nth_prime n = p" [PROOF STATE] proof (prove) goal (1 subgoal): 1. nth_prime n = p [PROOF STEP] unfolding nth_prime_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. (THE p. prime p \<and> card {q. prime q \<and> q ...
{"llama_tokens": 183, "file": "Prime_Number_Theorem_Prime_Counting_Functions", "length": 2}
[STATEMENT] lemma branch0: "branch subs Gamma f ==> f 0 = Gamma" [PROOF STATE] proof (prove) goal (1 subgoal): 1. branch subs Gamma f \<Longrightarrow> f 0 = Gamma [PROOF STEP] by (simp add: branch_def)
{"llama_tokens": 79, "file": "Completeness_Tree", "length": 1}
import re import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from tqdm import tqdm EPOCHS=20 def parse(file): with open(file) as fopen: texts = fopen.read().split('\n') left, right = [], [] for text in texts: if '-DOCSTART-' ...
{"hexsha": "404058c6bf3511b65fb00b9576fec0f5ea3e22b4", "size": 3881, "ext": "py", "lang": "Python", "max_stars_repo_path": "entity-tagging/torch_bilstm.py", "max_stars_repo_name": "naetherm/NLP", "max_stars_repo_head_hexsha": "c715e424e37f1a3a1bde28df430a2d2b30ef205a", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import networkx as nx import numpy as np def independent_cascade_model_2(G, contagious_nodes, attempted_nodes, active_nodes, verbose) : next_contagious = set() # Set of nodes going to be passed as contagious at time t+1 this_attempt = set() # Nodes that are go...
{"hexsha": "428c2cf37d2615676f1e5e7483cdeb792259764b", "size": 2143, "ext": "py", "lang": "Python", "max_stars_repo_path": "cascade_models/independent_cascade_model.py", "max_stars_repo_name": "theReuben/sonar", "max_stars_repo_head_hexsha": "8cf49f01bf9e6c38dbcea9d92b814781fd905e94", "max_stars_repo_licenses": ["MIT"]...
import cv2 import numpy as np # Helper function def imnoise(img_in, method, dens): if method == 'salt & pepper': img_out = np.copy(img_in) r, c = img_in.shape x = np.random.rand(r, c) ids = x < dens / 2. img_out[ids] = 0 ids = dens / 2. <= x ids &= x < dens...
{"hexsha": "ef0de86b9dc6e12fb24801481e9d81198ac31893", "size": 815, "ext": "py", "lang": "Python", "max_stars_repo_path": "CV-lecture-quizzes-python-master/2A-L3/answers/apply_median_filter.py", "max_stars_repo_name": "jperuggia/ComputerVision", "max_stars_repo_head_hexsha": "6a36cf96dec40fe4cd5584fbc2d8e384a74a66cf", ...
# -*- coding: utf-8 -*- """ Created on Mon Feb 20 09:56:23 2017 @author: Martin """ import os import numpy as np import sys import csv import argparse import logging import pickle from lib.data import Data from lib.classifier import * from lib.json_to_table import parse_json from lib.json_to_table im...
{"hexsha": "b58cb1b27f1317ca663d478d9c41867bdc52dc1d", "size": 10653, "ext": "py", "lang": "Python", "max_stars_repo_path": "pedia.py", "max_stars_repo_name": "PEDIA-Charite/classifier", "max_stars_repo_head_hexsha": "13e9d6108f9691b089aac59c7392f7940033b8af", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "...
\section{Prove circle area using integrals in Cartesian plane} From what had been taught in a Geometry class, the area of a circle can be calculated using $A=\pi r^2$, and it is possible to be proven using different approaches. As we know, circle in Cartesian plane is defined by $x^2+y^2=r^2$, where $r$ determines the...
{"hexsha": "96336b64bb03f9822df4b76f9f482fa66c272082", "size": 3555, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "integrate-circle.tex", "max_stars_repo_name": "TravorLZH/mathcol-doc", "max_stars_repo_head_hexsha": "7800a3056657691e9cf81687309cb8ffd1a44887", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_co...
[STATEMENT] lemma get_ancestors_ok: assumes "heap_is_wellformed h" and "ptr |\<in>| object_ptr_kinds h" and "known_ptrs h" and type_wf: "type_wf h" shows "h \<turnstile> ok (get_ancestors ptr)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. h \<turnstile> ok get_ancestors ptr [PROOF STEP] proof (inse...
{"llama_tokens": 2363, "file": "Core_DOM_standard_Core_DOM_Heap_WF", "length": 9}
import networkx as nx import time from functools import cmp_to_key from preprocessing import config import sys class IndexDict: def __init__(self, original_ids): self.original_to_new = {} self.new_to_original = [] cnt = 0 for i in original_ids: new = self.o...
{"hexsha": "b7fd4f9aa83dda7b62201396043fd26d9d66c3aa", "size": 11163, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing/utils.py", "max_stars_repo_name": "ChenNed/CascadeGCN", "max_stars_repo_head_hexsha": "a68011b7c1c4ae3b56db8ab40d7d36e25e152d6a", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import unittest import numpy as np from openvino.tools.mo.ops.ctc_loss import CTCLoss from openvino.tools.mo.front.common.partial_infer.utils import int64_array from openvino.tools.mo.graph.graph import Node from unit_tests.utils.graph...
{"hexsha": "731f3ed2dbd32f02e5edf1f2133b95d739831d90", "size": 3931, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/mo/unit_tests/mo/ops/ctc_loss_test.py", "max_stars_repo_name": "pazamelin/openvino", "max_stars_repo_head_hexsha": "b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48", "max_stars_repo_licenses": ["Ap...
# -*- coding:utf-8 -*- import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np from tensorflow.examples.tutorials.mnist import input_data def lenet5(inputs): inputs = tf.reshape(inputs, [-1, 28, 28, 1]) net = slim.conv2d(inputs, 32, [5, 5], padding='SAME', scope='layer1-conv') n...
{"hexsha": "de19f2d14a2aa809ebafb7e0972983469642b5b7", "size": 695, "ext": "py", "lang": "Python", "max_stars_repo_path": "Encapsulation/slim_usage.py", "max_stars_repo_name": "carbo-T/TF", "max_stars_repo_head_hexsha": "56ebfc253615b22fc3a55ba5e952837c47bf85cf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
import os import numpy as np import cv2 as cv from PIL import Image indir='./fake_images/in' outdir='./fake_images/scaled' scale=(600,600) for file in os.listdir(indir): img = cv.imread(os.path.join(indir,file)) res = cv.resize(img, scale) #res = np.resize(img, scale) #res = np.asarray(res) cv.imwrite(os.path....
{"hexsha": "1760981aee85971555b617b292691da0ae0b76af", "size": 398, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/resize.py", "max_stars_repo_name": "kkahatapitiya/occlusion_removal", "max_stars_repo_head_hexsha": "b574f06ae32ea7e86b6051ee43afe084d5f005a3", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from stable_baselines3 import PPO from stable_baselines3.common.vec_env import SubprocVecEnv from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.utils import set_random_seed from coopihc import State, BasePolicy, Bundle, discrete_array_element from coopihc.bundle.wrappers.Train imp...
{"hexsha": "c626d0f64b052aa0292d57e8a66861d02c6a1f69", "size": 7263, "ext": "py", "lang": "Python", "max_stars_repo_path": "coopihc/examples/simple_examples/rl_sb3.py", "max_stars_repo_name": "jgori-ouistiti/CoopIHC", "max_stars_repo_head_hexsha": "0fe24c618a430517c1394625275faff3ce344f7f", "max_stars_repo_licenses": [...
import logging import networkx as nx import pandas as pd import sqlite3 logger = logging.getLogger(__name__) class QueryCircuit(): def __init__(self, sqlite_path, sqltable='synlinks', score_thr=60, filter_autapses=True): self.cached_links = pd.DataFrame() self.cached_seg_ids = ...
{"hexsha": "1b1b57975dddb89b91fe0b8c9aac5fd60343ee66", "size": 4518, "ext": "py", "lang": "Python", "max_stars_repo_path": "synfulcircuit/querycircuit.py", "max_stars_repo_name": "funkelab/synful_circuit", "max_stars_repo_head_hexsha": "c9689ae8c12381a980b3edc588c299290c8a4956", "max_stars_repo_licenses": ["MIT"], "max...
# -*- coding: utf-8 -*- #!/usr/bin/python3 # Narrator: Visualizer for tweet data # by Chris Lindgren <chris.a.lindgren@gmail.com> # Distributed under the BSD 3-clause license. # See LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause for details. # WHAT IS IT? # A set of functions that process and create regul...
{"hexsha": "954b4708b65f398d0b2ebefbe5f88c9e06f9d2b9", "size": 37161, "ext": "py", "lang": "Python", "max_stars_repo_path": "narrator/narrator.py", "max_stars_repo_name": "lingeringcode/narrator", "max_stars_repo_head_hexsha": "4ba28679d66c1f8a5d07feea041fe0abe2691d99", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt import scipy.optimize as optimization import collections from MGD_func import MGD_PowerLaw ##set values to dictionary def set_dic(a): param_d['V0'] = a[0] param_d['K0'] = a[1] param_d['K0p'] = a[2] param_d['theta0'] = np.exp(a[3]) #param_d['...
{"hexsha": "c868ffdbdeac05032f7d8a462a593597a839eac1", "size": 10214, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/Jamieson1982Analysis_codecleanup/Fei2007_fit.py", "max_stars_repo_name": "rongzh/unbiased-pscale", "max_stars_repo_head_hexsha": "87ed71baf71af0b447d26b5c440e30fec39a02be", "max_stars_repo_l...
\section{acknowledgment} \label{sec:ack} If you think that this template helped you on writing research papers and you work on the related topics, please help to cite some of my publications \cite{cheng2016task, cheng2017utility, chen2014gmission, cheng2015reliable, cheng2017prediction, chen2018effective, cheng2018e...
{"hexsha": "96fecf8d1406438952b575ea46f41de156d6d87d", "size": 402, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Paper/tex/ack.tex", "max_stars_repo_name": "haidaoxiaofei/cslatextemplate", "max_stars_repo_head_hexsha": "c2bcbd90a41da2c7e1d4489d70309fbb3184810f", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import pandas as pd import os from os.path import join import os import numpy as np import matplotlib.pyplot as plt from ya_pca.PCA import PCA from ya_pca.viz import scree_plot from mvmm_sim.mouse_et.load_aligned_data import load_aligned_data from mvmm_sim.mouse_et.MouseETPaths import MouseETPaths from mvmm_sim.simul...
{"hexsha": "6d7a4a805ee8ece4a244fad27c8339a4f4406cae", "size": 2952, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_analysis_scripts/mouse_et_process_data.py", "max_stars_repo_name": "idc9/mvmm_sim", "max_stars_repo_head_hexsha": "5819d9ff95e36310536fd436bba50baba4f0ca71", "max_stars_repo_licenses": ["MIT"...
[STATEMENT] lemma bin_nth_cat: "(bit :: int \<Rightarrow> nat \<Rightarrow> bool) ((\<lambda>k n l. concat_bit n l k) x k y) n = (if n < k then (bit :: int \<Rightarrow> nat \<Rightarrow> bool) y n else (bit :: int \<Rightarrow> nat \<Rightarrow> bool) x (n - k))" [PROOF STATE] proof (prove) goal (1 subgoal): 1....
{"llama_tokens": 168, "file": "Word_Lib_Bits_Int", "length": 1}
import tensorflow as tf from models import RobustL21_X_Autoencoder as l21RDA import numpy as np from sklearn.metrics import (recall_score,f1_score,accuracy_score,precision_score) import warnings warnings.filterwarnings("ignore") import logging logging.getLogger('tensorflow').setLevel(logging.ERROR) import os os.environ...
{"hexsha": "87e4b197e175cae8aebe9619ed624ecccdb44e58", "size": 4769, "ext": "py", "lang": "Python", "max_stars_repo_path": "rave_runner.py", "max_stars_repo_name": "yassienshaalan/DTOPS", "max_stars_repo_head_hexsha": "75679b63050189236f4f045db7bed558a666da90", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
#!/usr/bin/env python3 import time import math import numpy as np import rospy from std_msgs.msg import Bool, Float32, Float32MultiArray from robot3_18c1054.msg import HandClose from robot3_18c1054.srv import GetHandState, GetHandStateResponse, GetInitTime, GetInitTimeResponse class ArmControllerNode(): DELTA_TIME =...
{"hexsha": "bba0cb97ad949ae646cd00de72de81d038f8931c", "size": 14647, "ext": "py", "lang": "Python", "max_stars_repo_path": "robot3_18c1054/scripts/arm_controller.py", "max_stars_repo_name": "18C1054-S-K/robot3_ros", "max_stars_repo_head_hexsha": "c34cf2989829b3f38648b5e32be1d5cc5264ad80", "max_stars_repo_licenses": ["...
from abc import ABCMeta, abstractmethod from typing import Dict, Optional import numpy as np from datasets import load_metric from transformers import EvalPrediction from trapper.common import Registrable from trapper.common.constants import IGNORED_LABEL_ID from trapper.data.label_mapper import LabelMapper class T...
{"hexsha": "8f44be25e92f77fd03313fffa25ac963d107a6e3", "size": 3738, "ext": "py", "lang": "Python", "max_stars_repo_path": "trapper/training/metrics.py", "max_stars_repo_name": "cemilcengiz/trapper", "max_stars_repo_head_hexsha": "8233a444be388bace032bdd5fd5cf87a64424cd5", "max_stars_repo_licenses": ["MIT"], "max_stars...
# -*- coding: utf-8 -*- """ Fejér proposed two quadrature rules very similar to :ref:`clenshaw_curtis`. The only difference is that the endpoints are set to zero. That is, Fejér only used the interior extrema of the Chebyshev polynomials, i.e. the true stationary points. This makes this a better method for performing q...
{"hexsha": "4f13b9514074517a9e03af64a13db39a4408729b", "size": 5791, "ext": "py", "lang": "Python", "max_stars_repo_path": "chaospy/quadrature/fejer.py", "max_stars_repo_name": "krystophny/chaospy", "max_stars_repo_head_hexsha": "e09f8e3f6dfc26145f15774edd5b03665140712f", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ This example showcases several advanced features of JiTCODE that are relevant for an efficient integration of more complex systems as well as how to deal with some special situations. Therefore it is pretty bizarre from a dynamical perspective. Suppose we want to integra...
{"hexsha": "eac9a08b53e07507369eb626a964d7bb1c3a8aa3", "size": 5025, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/SW_of_Roesslers.py", "max_stars_repo_name": "neurophysik/jitcode", "max_stars_repo_head_hexsha": "cbc815da01974597057c8d78f74d16169bdad580", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
import pickle as pk import pandas as pd import statsmodels.api as sm # %% paths to the pkl files storing the reliability scores path_ls = ['../data/results/reliability/reddit/askhistorians/glove.pkl', '../data/results/reliability/reddit/askhistorians/sgns.pkl', '../data/results/reliability/reddit...
{"hexsha": "a22548be2ecc73efe642b6726e2f9fe2c353e1a6", "size": 3415, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlr/data_prepare_test_retest.py", "max_stars_repo_name": "gersondekleuver/Fact-AI", "max_stars_repo_head_hexsha": "91d4f25320db98cab333f22651e73e149cec7710", "max_stars_repo_licenses": ["MIT"], "m...
module EvolvingGraphs import Base: ==, show, issorted, deepcopy, length, eltype, push!, append!, reverse using Requires export # base Node, Edge, TimeNode, AttributeNode, TimeEdge, WeightedTimeEdge, make_node, node_index, node_key, edge_reverse, node_timestamp, edge_timestamp, find_node, node_attributes...
{"hexsha": "0310925ab350fdb09ed9050682120e17a02d687d", "size": 2562, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/EvolvingGraphs.jl", "max_stars_repo_name": "EtymoIO/EvolvingGraphs.jl", "max_stars_repo_head_hexsha": "093bcb9acb9f5b4d32c67e6b72510bdd38058fbc", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from elegy import module, hooks from typing import Tuple from elegy.metrics.metric import Metric import typing as tp from elegy import utils import jax class LossMetrics(Metric): def call(self, logs): count = hooks.get_state("count", initializer=0) total = hooks.get_state("total", initializer=j...
{"hexsha": "554c88ce5399d92832b3a4622a93bfff8e0a1d2a", "size": 2141, "ext": "py", "lang": "Python", "max_stars_repo_path": "elegy/metrics/metric_modes.py", "max_stars_repo_name": "abhinavsp0730/elegy", "max_stars_repo_head_hexsha": "d3e6ebba0d56b5d9a489f75c9512eb8aaf214c6d", "max_stars_repo_licenses": ["Apache-2.0"], "...
% Fig. 6.25 Feedback Control of Dynamic Systems, 5e % Franklin, Powell, Emami % clear all; close all; num=1; den=conv([1 0],[1 2 1]); w=logspace(-2,3,100); [m,p]=bode(num,den,w); subplot(2,1,1) loglog(w,m); axis([.01 100 .0001 100]) hold on; ii=[11 21 47 61]; loglog(w([ii]),m([ii]),'*'); loglog(1,.5,'*...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/9907-feedback-control-of-dynamic-systems-fif...
import numpy from . import nn from . import models from . import variable from . import initializers __version__ = "alpha"
{"hexsha": "c79f201ca52a7965728ca377c43708825559a772", "size": 125, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylight/__init__.py", "max_stars_repo_name": "gergf/pylight", "max_stars_repo_head_hexsha": "3bd2067badfe3f2e30118c28300ff009022524d6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "ma...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ #plot maps of dSSLA and multi-model distributions nearest to 8 example locations @author: thermans """ import xarray as xr import matplotlib.pyplot as plt import os import numpy as np import fnmatch import cmocean import cartopy.crs as ccrs import matplotlib import ma...
{"hexsha": "e9e7aa8a60167f6c92c1e31216e7e2f0af1158e1", "size": 12751, "ext": "py", "lang": "Python", "max_stars_repo_path": "code_for_figures/Fig1_dSSLA/cmip6_plot_dSSLA.py", "max_stars_repo_name": "Timh37/SeasonalDSLC_NWES", "max_stars_repo_head_hexsha": "9cbc155448dbd0ba07a5b95c5ce49dc3cb4a4187", "max_stars_repo_lice...
# coding=utf-8 from typing import Tuple, Union import cv2 import numpy as np from skimage import color, io, transform def downscale_image(img: np.ndarray, max_side_size: int) -> np.ndarray: """ Downscale image preserving aspect ratio :param img: Image to downscale :param max_side_size: Size of larges...
{"hexsha": "afc2c7ea4ab59302c0e8b11d5019e25b008416cb", "size": 2893, "ext": "py", "lang": "Python", "max_stars_repo_path": "imgfind/core/image.py", "max_stars_repo_name": "nekto-nekto/imgfind", "max_stars_repo_head_hexsha": "2e0c3853c564f58e514dd4b30c2fed951ec8fde0", "max_stars_repo_licenses": ["WTFPL"], "max_stars_cou...
from grtoolkit.Math import solveEqs, algebraSolve from sympy import symbols, Piecewise, sympify #Capacitors and inductors are considered fully charged at 5 time constants. def naturalResponse(find, printEq=True, **kwargs): """ Source-Free The natural response of a circuit refers to the behavior (in terms...
{"hexsha": "cb340962c1edb641e149429e713d7eedd0c3c39d", "size": 2562, "ext": "py", "lang": "Python", "max_stars_repo_path": "grtoolkit/Circuits/RC/__init__.py", "max_stars_repo_name": "ZenosParadox/grtoolkit", "max_stars_repo_head_hexsha": "2e34f151a78f57864e39e572c221ca4b73e48bb7", "max_stars_repo_licenses": ["MIT"], "...
""" compute radii of auxiliary spheres""" from __future__ import annotations try: from numpy import radians, sin, cos, log, sqrt, degrees, asarray except ImportError: from math import radians, sin, cos, log, sqrt, degrees # type: ignore from .ellipsoid import Ellipsoid from . import rcurve from .vincenty im...
{"hexsha": "3febd0c845b619a6dca3325efe96c5fa8c89d78f", "size": 5378, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pymap3d/rsphere.py", "max_stars_repo_name": "scienceopen/python-mapping", "max_stars_repo_head_hexsha": "fb6147542fc0cab9e2f3b07713605f074a30e086", "max_stars_repo_licenses": ["BSD-2-Clause"],...
"""Tests for epsilon greedy strategy.""" import pickle import unittest import numpy as np from malib.policies.explorations import EpsilonGreedyExploration from tests.malib.environments.dummy import DummyDiscreteEnv class SimplePolicy: """Simple policy for testing.""" def __init__(self, action_space): ...
{"hexsha": "c15339a15154fa941c749671bfb1d489a29b88d9", "size": 2269, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/malib/policies/exploration/test_epsilon_greedy_strategy.py", "max_stars_repo_name": "wwxFromTju/malib", "max_stars_repo_head_hexsha": "7cd2a4af55cf1f56da8854e26ea7a4f3782ceea2", "max_stars_r...
###################################################################### # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # SPDX-License-Identifier: MIT-0 # ###################################################################### import os import random import time...
{"hexsha": "d194cea2b9f1f296a0b0af659cc8299fd9b62694", "size": 4843, "ext": "py", "lang": "Python", "max_stars_repo_path": "2-dl-container/Container-Root/job/bert/direct_benchmark-gpu.py", "max_stars_repo_name": "kamranjkhan/aws-reinvent21-inf1-workshop", "max_stars_repo_head_hexsha": "d5c94dc4a53779e6b5d30581295fe98e4...
using MIRTjim using Documenter using Literate # based on: # https://github.com/jw3126/UnitfulRecipes.jl/blob/master/docs/make.jl # https://juliadocs.github.io/Documenter.jl/stable/man/syntax/#@example-block ENV["GKSwstype"] = "100" # generate tutorials and how-to guides using Literate lit = joinpath(@__DIR__, "lit")...
{"hexsha": "ada0b525a04b5b78934743901f395c6f265856f2", "size": 1916, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "JeffFessler/MIRTjim.jl", "max_stars_repo_head_hexsha": "7483bedef0aac6236647dc8a055fe07b54459cf6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "...
""" Created by Rohan Paleja on Sep 8, 2019 This is an implementation of the paper IMITATION LEARNING FROM VISUAL DATA WITH MULTIPLE INTENTIONS """ import torch import torch.nn as nn from torch.distributions import RelaxedOneHotCategorical from utils.naive_utils import load_in_naive_data, find_which_schedule_this_belon...
{"hexsha": "63c902a93b02090245d5ab3df2c9022e9cd74752", "size": 11084, "ext": "py", "lang": "Python", "max_stars_repo_path": "scheduling/methods/SNN.py", "max_stars_repo_name": "CORE-Robotics-Lab/Personalized_Neural_Trees", "max_stars_repo_head_hexsha": "3e8dd12fe4fc850be65c96c847eb143ef3bcdc2e", "max_stars_repo_license...
function get_graph(graphname, size; degree, filling, seed) if graphname=="diag" return DiagGraphConfig(; filling, n=size, m=size, seed=seed) elseif graphname == "regular" return RegularGraphConfig(; degree, size=size, seed=seed) elseif graphname == "square" return SquareGraphConfig(;...
{"hexsha": "478ab4bd9facd5994e22fce342e2dedcb0c5b9f8", "size": 6938, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/json.jl", "max_stars_repo_name": "RydbergBoston/GraphUtilities.jl", "max_stars_repo_head_hexsha": "99235c9481dd19d7eda4732382d13d53d48a8b70", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
(* Title: CoreC++ Author: Tobias Nipkow, Daniel Wasserrab Maintainer: Daniel Wasserrab <wasserra at fmi.uni-passau.de> *) header {* \isaheader{Well-formedness Constraints} *} theory CWellForm imports WellForm WWellForm WellTypeRT DefAss begin definition wf_C_mdecl :: "prog \<Rightarrow> cname ...
{"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/CoreC++/CWellForm.thy"}
from itertools import product import numpy as np import scipy.sparse import numba from ..utils import isscalar, PositinalArgumentPartial, _zero_of_dtype from ..compatibility import range, zip, zip_longest def elemwise(func, *args, **kwargs): """ Apply a function to any number of arguments. Parameters ...
{"hexsha": "d5ebf5897611bd5475bd366b158705da876532a2", "size": 17840, "ext": "py", "lang": "Python", "max_stars_repo_path": "sparse/coo/umath.py", "max_stars_repo_name": "nimroha/sparse", "max_stars_repo_head_hexsha": "975a202fb68452dc3cc4421c18f415bc7d5033e8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
import numpy as np class BaseScheduler(object): def __init__(self, epoch_iters: int, warmup_iters: int=0, warmup_epochs: int=0, warmup_init_lr: float=0, noice_std: float=.0, last_epoch: int=-1): if (warmup_epochs > 0 and warmup_iters...
{"hexsha": "80a4a9a17b0dd89ed9c57dbd0c1d1378b267963f", "size": 1087, "ext": "py", "lang": "Python", "max_stars_repo_path": "vlkit/lrscheduler/base.py", "max_stars_repo_name": "vlkit/vlk", "max_stars_repo_head_hexsha": "0fc79b39972356af1ca921eab5fce5d671366725", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, ...
import numpy as np import pickle import sklearn.metrics as skmetrics import xgboost as xgb from logging import getLogger logger = getLogger(__name__) def main() -> None: # load data data_train = xgb.DMatrix("_data/agaricus.txt.train") data_test = xgb.DMatrix("_data/agaricus.txt.test") # train p...
{"hexsha": "01dc7d833dd7c5b8e463c9b29ac04955373ff2f7", "size": 1328, "ext": "py", "lang": "Python", "max_stars_repo_path": "machine_learning/xgboost_sample/get_started.py", "max_stars_repo_name": "iimuz/til", "max_stars_repo_head_hexsha": "b100438e8ce2f369331b3be215a4b9cdce9ffda5", "max_stars_repo_licenses": ["MIT"], "...
import os import numpy as np import matplotlib.pyplot as plt from mazelib import Maze from mazelib.generate.DungeonRooms import DungeonRooms from mazelib.generate.Prims import Prims from ipywidgets import interact,Dropdown,IntSlider from PIL import Image from .image import mesh_to_mask,mask_to_image3d class Maze...
{"hexsha": "9a5aec060f51b76cedc367629485068d47e3bf75", "size": 2408, "ext": "py", "lang": "Python", "max_stars_repo_path": "westworld/utils/maze.py", "max_stars_repo_name": "TheoLvs/westworld", "max_stars_repo_head_hexsha": "7fb435f3a028ff3d3156bf2a023b44ee06aa9f8b", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#!/usr/bin/env python """ USAGE: $ parser_pandas.py log_file """ import os import re import sys import pandas as pd import numpy as np def log_reader(log_file): s = pd.Series([1,3,5,np.nan,6,8]) print(s) def main(): if not len(sys.argv) > 1: print (__doc__) sys.exit(1) log_file = ...
{"hexsha": "c15be5897969d6d6807f8603eebc9bc525d99b3f", "size": 396, "ext": "py", "lang": "Python", "max_stars_repo_path": "parser_pandas.py", "max_stars_repo_name": "skyzenr/LogParser", "max_stars_repo_head_hexsha": "4dcd080d7e14b6c635c35fba0b40a7affefff5c8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
#!/usr/bin/env python3 #Author: Ongo Gablogian import argparse import networkx as nx import numpy as np import pandas as pd import sys def parse_args(): parser = argparse.ArgumentParser(prog=sys.argv[0], description="Generate golden network adjacency matrix, using specified weight threshold to generate binary edg...
{"hexsha": "29b9e129ef966a62a9d9df5a40a155df0cbc474a", "size": 1441, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/goldenThreshold.py", "max_stars_repo_name": "stewarthkerr/CS760_project", "max_stars_repo_head_hexsha": "1dfc74b8a4dafa1eed3ab7bb3738845386926305", "max_stars_repo_licenses": ["MIT"], "max_st...
#=================================== SUITS ===================================# """ The root abstract type for suit types. This is also used to represent "pseudo-suit" types, like the winds, dragons, flowers, etc. """ abstract type Suit end abstract type Character <: Suit end abstract type Bamboo <: Suit end abstrac...
{"hexsha": "b8675779f5320ffdd7ad2856ab55bb69e592d925", "size": 7522, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/tiles.jl", "max_stars_repo_name": "tmthyln/MahjongTiles.jl", "max_stars_repo_head_hexsha": "dc0c81a924944dc50ba350c05043e8a3c3557154", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
-f ${RGGEN_SV_RTL_ROOT}/compile_backdoor.f ${RGGEN_SV_RTL_ROOT}/rggen_rtl_pkg.sv ${RGGEN_SV_RTL_ROOT}/rggen_mux.sv ${RGGEN_SV_RTL_ROOT}/rggen_bit_field_if.sv ${RGGEN_SV_RTL_ROOT}/rggen_bit_field.sv ${RGGEN_SV_RTL_ROOT}/rggen_bit_field_w01trg.sv ${RGGEN_SV_RTL_ROOT}/rggen_register_if.sv ${RGGEN_SV_RTL_ROOT}/rggen_addres...
{"hexsha": "5b368cb1383057f1a4bf1cb4e09f1484ce1b5671", "size": 910, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "compile.f", "max_stars_repo_name": "rggen/rggen-sv-rtl", "max_stars_repo_head_hexsha": "5d9e6b62e9c18945b555f9a0fa4c884e22dbdbb7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_sta...
[STATEMENT] lemma seqr_inf_distr: "(P ;; (Q \<sqinter> R)) = ((P ;; Q) \<sqinter> (P ;; R))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. P ;; Q \<sqinter> R = (P ;; Q) \<sqinter> (P ;; R) [PROOF STEP] by (rel_auto)
{"llama_tokens": 105, "file": "UTP_utp_utp_rel_laws", "length": 1}
"""Time czt.iczt function.""" import numpy as np import czt import timeit def model(t): output = (1.0 * np.sin(2 * np.pi * 1e3 * t) + 0.3 * np.sin(2 * np.pi * 2e3 * t) + 0.1 * np.sin(2 * np.pi * 3e3 * t)) * np.exp(-1e3 * t) return output # Create time-domain data t = np.arange(0...
{"hexsha": "4ab125720e0355504c222fec90673010c7902577", "size": 861, "ext": "py", "lang": "Python", "max_stars_repo_path": "profile/time_iczt.py", "max_stars_repo_name": "haoruilee/CZT", "max_stars_repo_head_hexsha": "82e48aa4c4a78b8ddff97e065b5e09c784c6c6f9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12, "...
[STATEMENT] lemma not_rt_fresher_single [elim]: assumes "\<not>(rt1 \<sqsubseteq>\<^bsub>ip\<^esub> rt2)" shows "\<not>(the (rt1 ip) \<sqsubseteq> the (rt2 ip))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> the (rt1 ip) \<sqsubseteq> the (rt2 ip) [PROOF STEP] proof [PROOF STATE] proof (state) goal (1 ...
{"llama_tokens": 645, "file": "AODV_Fresher", "length": 8}
import numpy as np import torch from pathlib import Path import json import random import re import torch.backends.cudnn as cudnn import torch.multiprocessing as mp import time import fire import torch.distributed as dist import os from collections import defaultdict import kornia import flow_vis import copy import a...
{"hexsha": "8f360eed468039dd0abf4880cfbe18a1d3c4693a", "size": 27902, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/train.py", "max_stars_repo_name": "DecaYale/RNNPose", "max_stars_repo_head_hexsha": "18d1a2b12d2c82499b0da363a39f421cdc0f4b77", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
\chapter{Export Formats} \label{chap:exports} \section{CSV} Exports waveform data to a comma-separated-value file. The first two columns of the generated file contain the X and Y values of the timebase reference channel (the channel selected on the first page of the export wizard). Each sample in this channel maps d...
{"hexsha": "2906698fd941b8e708db506e543567e622321f9b", "size": 2202, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "section-exports.tex", "max_stars_repo_name": "glscopeclient/scopehal-docs", "max_stars_repo_head_hexsha": "333c3fcaa8e1e6a801ecd64aeabb097cf95e7295", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
"""Exact distributions correlation plot module. The functions in the module plot the data obtained in the exact_distributions_correlation_analysis module. This script requires the following modules: * gc * pickle * typing * matplotlib * numpy * pandas * seaborn * exact_distributions_co...
{"hexsha": "0f4df397c1a5bbb04c0dc8adcf70be689cd6bf0f", "size": 32247, "ext": "py", "lang": "Python", "max_stars_repo_path": "project/exact_distributions_correlation/exact_distributions_correlation_plot.py", "max_stars_repo_name": "juanhenao21/exact_distributions_financial", "max_stars_repo_head_hexsha": "02eb058e5f963f...
library(here) data = readRDS(here("src/epidemia_fixed_seed.rds")) library(rstan) options(mc.cores = parallel::detectCores()) rstan_options(auto_write = TRUE) m = stan_model(here("stan-models/epidemia_fixed_seed.stan")) fit = sampling(m, data=data, iter=400, control = list(max_treedepth=15, adapt_delta=0.9),thin=4,see...
{"hexsha": "97642bb2dda91a12fcf27744d667f1ff4e07ad52", "size": 326, "ext": "r", "lang": "R", "max_stars_repo_path": "src/epidemia-fixed-seed.r", "max_stars_repo_name": "codatmo/Imperial", "max_stars_repo_head_hexsha": "7f786911aba18f17c0faafc73bdcb3039f7cde10", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
/***************************************************************************** * * This file is part of Mapnik (c++ mapping toolkit) * * Copyright (C) 2012 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
{"hexsha": "07632e8734a1ef8936e880db67cfcfe070ef0d04", "size": 13383, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "external/include/mapnik/vertex_converters.hpp", "max_stars_repo_name": "Wujingli/OpenWebGlobeDataProcessing", "max_stars_repo_head_hexsha": "932eaa00c81fc0571122bc618ade010fa255735e", "max_stars_re...
import numpy as np import csv import sys class CSV_Parser: global end_file_name end_file_name = 'PARSED_CSV.csv' def __init__(self, file_name): self.file_name = file_name def read_csv(self, path): with open(path, 'r') as f: data = list(csv.reader(f, delimiter=",")) ...
{"hexsha": "673d5a1bca43ffcfc6292b4526cf4b42c00e781f", "size": 3361, "ext": "py", "lang": "Python", "max_stars_repo_path": "parser.py", "max_stars_repo_name": "JanBinkowski/RolesParserRepo", "max_stars_repo_head_hexsha": "0e8c20382676c7495074b35216bbc758e7a599f6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
""" Make simple models for testing :Author: Arthur Goldberg <Arthur.Goldberg@mssm.edu> :Author: Jonathan Karr <karr@mssm.edu> :Date: 2018-04-27 :Copyright: 2018, Karr Lab :License: MIT """ from obj_tables.math.expression import Expression from scipy.constants import Avogadro from wc_lang import (Model, Submodel, Comp...
{"hexsha": "3552a2a9f680015e290eef8c44fa4855a7fac893", "size": 18536, "ext": "py", "lang": "Python", "max_stars_repo_path": "wc_sim/testing/make_models.py", "max_stars_repo_name": "KarrLab/wc_sim", "max_stars_repo_head_hexsha": "5b0ee03c3d19193fa67a3797d4258b753e6bc576", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#!/usr/bin/env python # -*- coding:utf-8 -*- """ An extension to the standard STScI data model, which defines a means of describing MIRI distortion coefficients. NOTE: The contents of this data model might change, depending on the STScI implementation of distortion models. :Reference: The STScI jwst.datamodels d...
{"hexsha": "21533926cef4c5f6831b03b268b03af469a3d172", "size": 86927, "ext": "py", "lang": "Python", "max_stars_repo_path": "miri/datamodels/miri_distortion_models.py", "max_stars_repo_name": "eslavich/MiriTE", "max_stars_repo_head_hexsha": "05e25e1222e854fef5a72011f6618fa8fb5eaaff", "max_stars_repo_licenses": ["CNRI-P...
% % Chapter 1.2 % \section*{1.2 Types of Functions} A linear function can be written in \textbf{slope-intercept form} (\(y=mx+b\)) where \(m\) is the slope of the line and \(b\) is the y-intercept. \\\\ A function \(P\) is a \textbf{polynomial} if $$P(x)=a_n{x}^n+a_{n-1}x^{n-1}+ \cdots +a_2x^2+a_1x+a_0$$ where n is ...
{"hexsha": "3dbd9e57d880caa0340dec2f2133f3e3e65fbdc0", "size": 2413, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/1-2.tex", "max_stars_repo_name": "davidcorbin/calc-1-study-guide", "max_stars_repo_head_hexsha": "b6b0a43ef551d1735ba4af55f3917ed1ed39e926", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
""" This file is under Apache License 2.0, see more details at https://www.apache.org/licenses/LICENSE-2.0 Author: Coder.AN, contact me at an.hongjun@foxmail.com Github: https://github.com/BestAnHongjun/VOC-Augmentation Reference: [1]Code in method voc_aug.random_hsv_augmentation refers to code by 太阳花的小绿豆 at CSDN plat...
{"hexsha": "2c0d152a18aa3c58961bada5268f94ed79e56a9d", "size": 9698, "ext": "py", "lang": "Python", "max_stars_repo_path": "VocAug/voc_aug.py", "max_stars_repo_name": "BestAnHongjun/VOC-Augmentation", "max_stars_repo_head_hexsha": "feeafaf747ac67d0845581246cd083dd7616c013", "max_stars_repo_licenses": ["Apache-2.0"], "m...
from unittest import TestCase from deepclustering.meters import AverageValueMeter, MeterInterface, SliceDiceMeter import numpy as np import torch class TestBasicInterface(TestCase): def test_averagevalueMeter(self): meter = AverageValueMeter() for i in range(10000): meter.add(1) ...
{"hexsha": "ff9e95f053cba2d6a36fcbf399cdb429602f89c2", "size": 2597, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/deepclustering/meters/test_meters.py", "max_stars_repo_name": "jizongFox/deep-clustering-toolbox", "max_stars_repo_head_hexsha": "0721cbbb278af027409ed4c115ccc743b6daed1b", "max_stars_repo_li...
import matplotlib as plt from datetime import datetime import os,re import numpy as np from numpy.core.fromnumeric import size import pandas as pd import matplotlib.pyplot as plt import holidays from mawiparse.tool import week_split from scipy import stats # the abstract class class graph: def plot(self): ...
{"hexsha": "66d7ad997fced6576fb6ce43c08958a31a494322", "size": 8757, "ext": "py", "lang": "Python", "max_stars_repo_path": "mawiparse/plot2.py", "max_stars_repo_name": "zouchengyao/MAWI_trace", "max_stars_repo_head_hexsha": "8c02efdf6909b9e88207d1d4a6eb06484f6232db", "max_stars_repo_licenses": ["Unlicense"], "max_stars...
""" tvdiff(data::AbstractVector, iter::Integer, α::Real; kwargs...) # Arguments - `data::AbstractVector`: Vector of data to be differentiated. - `iter::Integer`: Number of iterations to run the main loop. A stopping condition based on the norm of the gradient vector `g` below would be an eas...
{"hexsha": "b8b72edbc35a631b69fa7eda6d0e895947cf0398", "size": 9800, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/tvdiff.jl", "max_stars_repo_name": "adrhill/TVDifferentiation.jl", "max_stars_repo_head_hexsha": "276207a0f5bf6fbd485e89af1dd3f1c5586ea2e6", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" Obstacle detector unit tests. """ import os, sys from io import IOBase parent_dir = os.path.dirname(os.path.abspath(__file__)) gparent_dir = os.path.dirname(parent_dir) ggparent_dir = os.path.dirname(gparent_dir) gggparent_dir = os.path.dirname(ggparent_dir) sys.path += [parent_dir, gparent_dir, ggparent_dir, gggp...
{"hexsha": "4a33678ea82fb2819ab94c5a01db1a542adabfd3", "size": 6405, "ext": "py", "lang": "Python", "max_stars_repo_path": "vision/benchmarks/accuracy/bench_obstacle.py", "max_stars_repo_name": "pieperm/IARC-2020", "max_stars_repo_head_hexsha": "a90bfe830ea2ceced59e8f2e7b54862dda42f5a3", "max_stars_repo_licenses": ["MI...
import argparse import os import random import time import sys import warnings import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.distributed as dist import torch.optim import torch.utils.data import torch.utils.data.distributed import numpy as np import matp...
{"hexsha": "c1b2f7c3cf8f60067b7f9315aa3a4c5ad0873e70", "size": 10586, "ext": "py", "lang": "Python", "max_stars_repo_path": "research/active_learning/archive/run_bk.py", "max_stars_repo_name": "dnarqq/WildHack", "max_stars_repo_head_hexsha": "4fb9e4545cb47a4283ebc1dec955c0817b1664c0", "max_stars_repo_licenses": ["MIT"]...
# using Pkg; for p in ("Knet","ArgParse"); haskey(Pkg.installed(),p) || Pkg.add(p); end """ This example learns to classify hand-written digits from the [MNIST](http://yann.lecun.com/exdb/mnist) dataset. There are 60000 training and 10000 test examples. Each input x consists of 784 pixels representing a 28x28 image....
{"hexsha": "f658e37439acf673359fdb67e4ce296079a92065", "size": 4940, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/lenet/lenet.jl", "max_stars_repo_name": "Ybakman/Knet.jl", "max_stars_repo_head_hexsha": "543c38c4f17bf8270be500d97e7064ad26fc5fcc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
#ifndef IOC_GENERATORS_HPP #define IOC_GENERATORS_HPP ////////////////////////////////////////////////////////////////////////// // generators.hpp // (C) Copyright 2011-2012 Guardian // (C) Copyright 2013-2014 Yury Yakovlev <yvzmail@gmail.com> // Use, modification and distribution is subject to the Boost Software // ...
{"hexsha": "e0d28dcaeb840644e483ad937c4271ab3a209a89", "size": 11655, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/generators.hpp", "max_stars_repo_name": "yvz/iocplusplus", "max_stars_repo_head_hexsha": "b7305fc45ba3c7e2c978d1fae6032bf1d90e5f1e", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": 1...
#!/usr/bin/env python # coding: utf-8 # # Copyright (c) 2020-2021 Arm Ltd. # All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause """Plot s-LLGS/FPE evolution. Please, setup all the required parameters. Inputs are the files generated by stochastic_multithread_simulation.py """ import numpy as np import mat...
{"hexsha": "48278e9115f67028a40dd7e95b40452ed3236c95", "size": 16806, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sllgs_fpe_comparison/plot_sllgs_fpe_comparison.py", "max_stars_repo_name": "ARM-software/mram_simulation_framework", "max_stars_repo_head_hexsha": "2624e42012c33a3c105062a5f1c07e53a648bc0a", ...
# Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany # # 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://w...
{"hexsha": "31e84d8aef186e34f6b23fb63124dbba61d96a57", "size": 11051, "ext": "py", "lang": "Python", "max_stars_repo_path": "nnunet/experiment_planning/DatasetAnalyzer.py", "max_stars_repo_name": "nasyxx/nnUNet", "max_stars_repo_head_hexsha": "92d5f2352349eed278e22f7a38cb86b0fccd7c75", "max_stars_repo_licenses": ["Apac...
# -*- coding: utf-8 -*- """ Created on Mon Jun 4 20:48:26 2018 @author: elcok """ import os import sys import pandas as pd import numpy as np import matplotlib.pyplot as plt import geopandas as gpd from mpl_toolkits.basemap import Basemap from matplotlib.patches import Polygon from matplotlib.collections import Pat...
{"hexsha": "d05660d31d22d2691cd115ff806d7a2ea0a56412", "size": 8238, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/plotting.py", "max_stars_repo_name": "ElcoK/WISC", "max_stars_repo_head_hexsha": "c3779b387664b37cdfc49399202c74ab30531066", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_...
import numpy as np from manage_db import Bill, Stage, Subject, Period def periods(): all_periods = Period.query.all() all_subjects = Subject.query.all() all_stage = Stage.query.all() info = np.zeros((len(all_periods), len(all_subjects), len(all_stage) - 1)) for i, period in enumerate(all_periods...
{"hexsha": "58dcf72820bc2f65b4487a3aa375cac926622dd1", "size": 1268, "ext": "py", "lang": "Python", "max_stars_repo_path": "count_info_in_periods.py", "max_stars_repo_name": "harumarix/duma", "max_stars_repo_head_hexsha": "7bed124f06338a6a7ff40059191a5295fd291ac9", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from concurrent.futures import ProcessPoolExecutor from functools import partial import numpy as np import os import audio from nnmnkwii.datasets import cmu_arctic from nnmnkwii.io import hts from nnmnkwii import preprocessing as P from hparams import hparams from os.path import exists import librosa from wavenet_voco...
{"hexsha": "5a6bb297d0f2dc41f928cccfb38c24a2d1468289", "size": 4270, "ext": "py", "lang": "Python", "max_stars_repo_path": "cmu_arctic.py", "max_stars_repo_name": "pfriesch/wavenet_vocoder", "max_stars_repo_head_hexsha": "2b557d4cbacef52bc3441fc4f2c54b1351ae9df4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
\documentclass[letterpaper]{article} \usepackage{amssymb} \usepackage{newcent} \usepackage[pdftex]{graphicx} \setlength{\parindent}{0in} \setlength{\parskip}{1.5ex plus 0.5ex minus 0.2ex} \newlength{\sjfhmargin} \newlength{\sjfvmargin} \setlength{\sjfhmargin}{1in} \setlength{\sjfvmargin}{1in} \setlength{\voffset}{0i...
{"hexsha": "d786d921738aac1a45104df6036140fdf644fe98", "size": 57672, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "VSAnalysis/Reconstruction.tex", "max_stars_repo_name": "sfegan/ChiLA", "max_stars_repo_head_hexsha": "916bdd95348c2df2ecc736511d5f5b2bfb4a831e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...