text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import pyqpanda.pyQPanda as pq from pyqpanda.Visualization.circuit_draw import * import numpy as np def test_decompose(): machine = pq.init_quantum_machine(pq.QMachineType.CPU) q = machine.qAlloc_many(2) c = machine.cAlloc_many(2) x = [(0.6477054522122977+0.1195417767870219j), (-0.16162176706189357-0....
{"hexsha": "c1518aa41c0df9a8d27b873348bb8cc977ee19b8", "size": 1511, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyQPanda/example/test_matrix_decompose.py", "max_stars_repo_name": "Deamon-wang/QPanda-2", "max_stars_repo_head_hexsha": "d85161281e72ee6718a19d854dedefcba6a34a18", "max_stars_repo_licenses": ["Ap...
[STATEMENT] lemma wadjust_loop_erase_move_Oc[simp]: "wadjust_loop_check m rs (c, Oc # list) \<Longrightarrow> wadjust_loop_erase m rs (tl c, hd c # Oc # list)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. wadjust_loop_check m rs (c, Oc # list) \<Longrightarrow> wadjust_loop_erase m rs (tl c, hd c #...
{"llama_tokens": 895, "file": "Universal_Turing_Machine_UTM", "length": 4}
# -------------- import pandas as pd from sklearn.model_selection import train_test_split #path - Path of file # Code starts here df=pd.read_csv(path) X=df.drop(['customerID','Churn'],axis=1) y=df['Churn'].copy() X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.3,random_state=0) # -------------- imp...
{"hexsha": "28b6291f05954f72cf9becab3c84e34dbeea7ef5", "size": 2827, "ext": "py", "lang": "Python", "max_stars_repo_path": "sushant-gradient-Boosting/code.py", "max_stars_repo_name": "sushant-tech/ga-learner-dsmp-repo", "max_stars_repo_head_hexsha": "aa40705fd5ac079c656c7c1cb2853a541f7d0447", "max_stars_repo_licenses":...
[STATEMENT] lemma eventually_deriv_mult: assumes "f twice_field_differentiable_at x" and "g twice_field_differentiable_at x" shows "\<forall>\<^sub>F x in nhds x. deriv (\<lambda>x. f x * g x) x = f x * deriv g x + deriv f x * g x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>\<^sub>F x in nhd...
{"llama_tokens": 3505, "file": "Hyperdual_TwiceFieldDifferentiable", "length": 31}
using Revise using ZonalFlow tspan = (0.0,1000.0); tsargs = ( dt=0.001, adaptive=false, progress=true, progress_steps=100000, save_everystep=false, saveat=50 ); domain = Domain(extent=(2π,2π),res=(8,8)); # domain = Domain(extent=(...
{"hexsha": "6aec6d8813948b85e208938768c8fbee954b7305", "size": 1472, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "validate/pointjet/pointjet.jl", "max_stars_repo_name": "gvn22/ZonalFlow.jl", "max_stars_repo_head_hexsha": "3ebfdd1d172f97321df13781239da28597137361", "max_stars_repo_licenses": ["MIT"], "max_stars...
from PIL import Image import os import cv2 as cv import matplotlib.pyplot as plt from pylab import plot import numpy as np import json import math import torch from functions import euclidean_dist, generate_cycle_mask, average_del_min mode = 'train' import glob img_path = '/home/ubuntu/src/IIM/datasets/ProcessedData...
{"hexsha": "ae2569cb56a76c23f80f25715e70f398e1f4bd8a", "size": 766, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/dataset_prepare/prepare_VisDrone.py", "max_stars_repo_name": "pohjao/IIM", "max_stars_repo_head_hexsha": "c721c952c5bc99af4bc8019f67afc613113e6ac6", "max_stars_repo_licenses": ["MIT"], "ma...
from graph import Graph,wl_labeling import networkx as nx from utils import per_section,indices_to_one_hot from collections import defaultdict import numpy as np import math class NotImplementedError(Exception): pass """ All methods for loading the data """ def load_local_data(data_path,name,one_hot=False,attribu...
{"hexsha": "b9719d6e7ee68e32e429e22e99f6b9d51626988a", "size": 13378, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/data_loader.py", "max_stars_repo_name": "wokas36/RWK", "max_stars_repo_head_hexsha": "c44d3d650f0704af49fe41969de0848563e63f65", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max...
import numpy as np import pandas as pd import torch from torch.utils import data from utils import AverageMeter, seed_everything, get_filename from PolicyGradient import REINFORCE, PPO from dataset import VideoDataset, LstmDataset from tqdm.auto import tqdm import glob import os import argparse import json import l...
{"hexsha": "87def0d45c3426165578941c16233466e26148f9", "size": 3725, "ext": "py", "lang": "Python", "max_stars_repo_path": "trainer.py", "max_stars_repo_name": "grohith327/Video-Summarization-Using-RL", "max_stars_repo_head_hexsha": "41272db73d0e44a489184e555b3747847755890c", "max_stars_repo_licenses": ["MIT"], "max_st...
import warnings from typing import Union, Tuple import numpy as np import cv2 import PySpin from .utils import EasyPySpinWarning, warn class VideoCapture: """Open a FLIR camera for video capturing. Attributes ---------- cam : PySpin.CameraPtr PySpin camera pointer. grabTimeout : int, de...
{"hexsha": "2a5a145ecc0e707e50906bd4e2e969306d80d20f", "size": 25501, "ext": "py", "lang": "Python", "max_stars_repo_path": "EasyPySpin/videocapture.py", "max_stars_repo_name": "iacopoerpichini/EasyCaptureFLIR", "max_stars_repo_head_hexsha": "1d4881c08920f71c09025716b9a4a176623d5db4", "max_stars_repo_licenses": ["MIT"]...
"""add ports from pin markers or labels.""" from functools import partial from typing import Optional, Tuple import numpy as np from numpy import arctan2, degrees, isclose from gdsfactory.component import Component from gdsfactory.port import Port, read_port_markers, sort_ports_clockwise from gdsfactory.snap import s...
{"hexsha": "a8f3813ade81344b9ecc5f34e65eabf3dcde6c18", "size": 14149, "ext": "py", "lang": "Python", "max_stars_repo_path": "gdsfactory/add_ports.py", "max_stars_repo_name": "simbilod/gdsfactory", "max_stars_repo_head_hexsha": "4d76db32674c3edb4d16260e3177ee29ef9ce11d", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# -*- coding: utf-8 -*- """ Train error functions with derivatives :Example: >>> msef = MSE() >>> x = np.array([[1.0, 0.0], [2.0, 0.0]]) >>> msef(x, 0) 1.25 >>> # calc derivative: >>> msef.deriv(x[0], 0) array([ 1., 0.]) """ import numpy as np class MSE(...
{"hexsha": "300f684e1bc2f6c2a50d6d0a93479b8dd9505eac", "size": 5382, "ext": "py", "lang": "Python", "max_stars_repo_path": "neurolab/error.py", "max_stars_repo_name": "Gabs48/SpringMassNetworks", "max_stars_repo_head_hexsha": "d917ef242ed99b02f82e9ff8697960d0d1d65178", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import os import torch import pickle import pandas as pd import numpy as np from data.base_dataset import BaseDataset from PIL import Image from PIL import ImageFile import cv2 import torchvision.transforms as transforms ImageFile.LOAD_TRUNCATED_IMAGES = True class CellRelDataset(BaseDataset): @staticmethod ...
{"hexsha": "4f3dd1671e1b7a0678b313cb43841b3f729fdd4b", "size": 5795, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/cell_rel_dataset.py", "max_stars_repo_name": "xuewenyuan/ReS2TIM", "max_stars_repo_head_hexsha": "27c101ad2ac3d40692ad6c53a7dabb33e3f8a74d", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2020-05-06 23:16 from edparser.utils.io_util import load_pickle, save_pickle from iwpt2020 import cdroot from edparser.metrics.parsing.iwpt20_eval import evaluate import numpy as np import matplotlib.pyplot as plt cdroot() gold_file = 'data/iwpt2020/test-udpipe/en.fixed...
{"hexsha": "0852cece9047a151ec121867136ec09ae3687d7d", "size": 2313, "ext": "py", "lang": "Python", "max_stars_repo_path": "iwpt2020/error/sentence_len_err.py", "max_stars_repo_name": "attardi/iwpt-shared-task-2020", "max_stars_repo_head_hexsha": "3a70c42d53716678776afcccf02d896655777353", "max_stars_repo_licenses": ["...
import io from flask import Blueprint, request, jsonify, send_file import tesserocr from PIL import Image from cv2 import cv2 import numpy from error import ParameterLostError image_api = Blueprint("image_api", __name__) @image_api.route("/tesseract_ocr", methods=["POST"]) def tesseract_ocr(): """ tesseract ...
{"hexsha": "d16ae9f238d97b9998e3bd9eecf7257db74cd728", "size": 4455, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/image.py", "max_stars_repo_name": "Soontao/HarvestTextServer", "max_stars_repo_head_hexsha": "0cf06f48db3093bb8447e00790923d6143e58a2b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import numpy as np import scipy as sp import scipy.ndimage as ndimage from dipy.core.ndindex import ndindex from dipy.data import get_data import dipy.align.vector_fields as vf from dipy.align.transforms import regtransforms from functools import reduce from operator import mul from dipy.align.mattes import (MattesBase...
{"hexsha": "d489acc7a218b8622d691860ea6a675bf5a9429c", "size": 31130, "ext": "py", "lang": "Python", "max_stars_repo_path": "dipy/align/tests/test_mattes.py", "max_stars_repo_name": "oesteban/dipy", "max_stars_repo_head_hexsha": "eb6ea58028959f4a507d70160dad770193449d66", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
# --- # title: 237. Delete Node in a Linked List # id: problem237 # author: Tian Jun # date: 2020-10-31 # difficulty: Easy # categories: Linked List # link: <https://leetcode.com/problems/delete-node-in-a-linked-list/description/> # hidden: true # --- # # Write a function to **delete a node** in a singly-linked list. ...
{"hexsha": "7c31313f9e3008101c43e99980c26f3243051e1e", "size": 1834, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/unresolved/237.delete-node-in-a-linked-list.jl", "max_stars_repo_name": "jmmshn/LeetCode.jl", "max_stars_repo_head_hexsha": "dd2f34af8d253b071e8a36823d390e52ad07ab2e", "max_stars_repo_licenses"...
//============================================================================== // Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // Se...
{"hexsha": "39469406d1fa3def483b924d1be063fbcd0a86e9", "size": 3761, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "modules/boost/simd/sdk/include/boost/simd/memory/functions/simd/sse/sse2/aligned_store.hpp", "max_stars_repo_name": "psiha/nt2", "max_stars_repo_head_hexsha": "5e829807f6b57b339ca1be918a6b60a2507c54...
import matplotlib matplotlib.use('Agg') import pylab as plt import os from scipy.ndimage.morphology import * from scipy.ndimage.measurements import * from scipy.ndimage.filters import * from scipy.interpolate import RectBivariateSpline import fitsio from astrometry.util.fits import * from astrometry.util.plotutils i...
{"hexsha": "75378b5171ac7f3eb706e8ab80137dbcdc4afe39", "size": 20996, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/legacyanalysis/lsb.py", "max_stars_repo_name": "michaelJwilson/legacypipe", "max_stars_repo_head_hexsha": "47d005356cbd0c9fb864c960ee7bbf800e543cad", "max_stars_repo_licenses": ["BSD-3-Clause"...
[STATEMENT] lemma dist_le_1_imp_domain_eq: shows "dist P Q < 1 \<Longrightarrow> domain P = domain Q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. dist P Q < 1 \<Longrightarrow> domain P = domain Q [PROOF STEP] by (simp add: dist_fmap_def finite_proj_diag split: if_split_asm)
{"llama_tokens": 109, "file": null, "length": 1}
/- Copyright (c) 2020 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Author: Mario Carneiro -/ import Mathlib.PrePort import Mathlib.Lean3Lib.init.default import Mathlib.data.num.lemmas import Mathlib.data.nat.prime import Mathlib.tactic.ring import Mathlib.Post...
{"author": "AurelienSaue", "repo": "Mathlib4_auto", "sha": "590df64109b08190abe22358fabc3eae000943f2", "save_path": "github-repos/lean/AurelienSaue-Mathlib4_auto", "path": "github-repos/lean/AurelienSaue-Mathlib4_auto/Mathlib4_auto-590df64109b08190abe22358fabc3eae000943f2/Mathlib/data/num/prime.lean"}
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import re ...
{"hexsha": "db6f55097127f7567e808b88c3c41cf967cd469e", "size": 5460, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/pants/backend/codegen/tasks/jaxb_gen.py", "max_stars_repo_name": "areitz/pants", "max_stars_repo_head_hexsha": "9bfb3feb0272c05f36e190c9147091b97ee1950d", "max_stars_repo_licenses": ["A...
[STATEMENT] lemma cartesian_product_singleton_factor_projection_is_semialg: assumes "A \<subseteq> carrier (Q\<^sub>p\<^bsup>m\<^esup>)" assumes "b \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>)" assumes "is_semialgebraic (m+n) (cartesian_product A {b})" shows "is_semialgebraic m A" [PROOF STATE] proof (prove) goal...
{"llama_tokens": 14003, "file": "Padic_Field_Padic_Field_Powers", "length": 142}
# Copyright 2020 Huawei Technologies Co., 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 law or agreed to...
{"hexsha": "53fde61d53368fd8c340f7ec47844cb72323b631", "size": 7603, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_zoo/official/cv/vgg16/src/utils/var_init.py", "max_stars_repo_name": "Rossil2012/mindspore", "max_stars_repo_head_hexsha": "8a20b5d784b3fec6d32e058581ec56ec553a06a0", "max_stars_repo_license...
! ! Copyright (c) 2006-2015, The Regents of the University of California, ! through Lawrence Berkeley National Laboratory (subject to receipt of any ! required approvals from the U.S. Dept. of Energy) and the Paul Scherrer ! Institut (Switzerland). All rights reserved.! ! ! License: see file COPYING...
{"hexsha": "f3a23f28c21f731138cd7230fce95adb87a77e1b", "size": 2527, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "examples/H5/write_step_attribsf.f90", "max_stars_repo_name": "greole/H5hut", "max_stars_repo_head_hexsha": "7833ed7877b7578b1ec3308ba2b465fc54d0c582", "max_stars_repo_licenses": ["BSD-3-Clause-L...
@cache mutable struct AitkenNevilleCache{uType,rateType,arrayType,dtType,uNoUnitsType} <: OrdinaryDiffEqMutableCache u::uType uprev::uType tmp::uType k::rateType utilde::uType atmp::uNoUnitsType fsalfirst::rateType dtpropose::dtType T::arrayType cur_order::Int work::dtType A::Int step_no::Int ...
{"hexsha": "1bea3d255ed921205e3e5da2a5b616bb73ae26d5", "size": 1529, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/caches/extrapolation_caches.jl", "max_stars_repo_name": "miguelraz/OrdinaryDiffEq.jl", "max_stars_repo_head_hexsha": "c3ecac0f1b86750dc41ea5d00a3d740824955616", "max_stars_repo_licenses": ["MIT...
"""Genetic Hello World Example. This example demonstrates how to use GeneticAlgorithm search to find a sequence of characters specified by `WordIndividual.expected`. Author: Lucas David -- <ld492@drexel.edu> License: MIT (c) 2016 """ import string import time import artificial as art import numpy as np random_sta...
{"hexsha": "06bd9333fde1899a0f154a996fa5d698a001aed5", "size": 2373, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/genetic/hello_world.py", "max_stars_repo_name": "lucasdavid/artificial", "max_stars_repo_head_hexsha": "18199591f926dd369e9de0cd2285c395506f0a55", "max_stars_repo_licenses": ["MIT"], "max...
''' created 03/06/2014 by sperez Hive class stores the nodes, edges and how they will be displayed including node position, edge coloring, number of axes etc... ''' #library imports import sys import os import numpy as np from math import pi from hive_utilities import * import string #hive parameter defaults when...
{"hexsha": "fbe68c38b64cc1b0b831d74b0c62cabd848846fa", "size": 26276, "ext": "py", "lang": "Python", "max_stars_repo_path": "hiveplot/hive.py", "max_stars_repo_name": "sperez8/HivePlotter", "max_stars_repo_head_hexsha": "769b442233405e54cca55391f32622c9c9242846", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
#include <ros/ros.h> //For ROS itself #include <opencv2/highgui/highgui.hpp> //FIXME Not exactly sure why this one is here; maybe it's for displaying the images that come in? #include <cv_bridge/cv_bridge.h> //The openCV bridge that image_transport needs #include <ros/console.h> //This is for ROS_ERROR and stuff. #incl...
{"hexsha": "72faad73b0945a13fee36ec638fd52260abe20e6", "size": 8918, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/DispatcherNode.cpp", "max_stars_repo_name": "kennondmckeever/obe_toolset", "max_stars_repo_head_hexsha": "5ecdb498914a49122e6a2137fc72aafae0868b6c", "max_stars_repo_licenses": ["MIT"], "max_star...
import torch import torch.nn as nn import torch.nn.functional as F import pandas as pd import numpy as np import tqdm from rec.model.pinsage import PinSage from rec.datasets.movielens import MovieLens from rec.utils import cuda from dgl import DGLGraph import argparse import pickle import os parser = argparse.Argumen...
{"hexsha": "6a29d840b7c70d44ecbcf2a3b61e6d2430a23a97", "size": 8730, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/pytorch/recommendation/main.py", "max_stars_repo_name": "vipermu/dgl", "max_stars_repo_head_hexsha": "c9ac6c9889423019977e431c8b74a7b6c70cdc01", "max_stars_repo_licenses": ["Apache-2.0"],...
import cv2 import numpy as np import dicom import json import os import random import re import shutil import sys from matplotlib import image from scipy.ndimage import label from scipy.ndimage.morphology import binary_erosion from scipy.fftpack import fftn, ifftn from scipy.signal import argrelmin, correlate from scip...
{"hexsha": "0f72df4ebe079d3b45d3ca5cbfa75c009ebd2aa6", "size": 24330, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/external/repositories/282415/2016_Kaggle_DataScience_Bowl-master/segment_fourier.py", "max_stars_repo_name": "Keesiu/meta-kaggle", "max_stars_repo_head_hexsha": "87de739aba2399fd31072ee81b39...
# coding: utf-8 import numpy as np DTYPES = { 'banner_pos': np.int8, 'device_type': np.int8, 'device_conn_type': np.int8, 'month': np.int8, 'day': np.int8, 'dayofweek': np.int8, 'hour': np.int16, 'C1': np.int32, 'C14': np.int32, 'C15': np.int32, 'C16': np.int32, 'C17': n...
{"hexsha": "624f946f41dda15be288fbc65da60d412b872ab3", "size": 2947, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctr-clean.py", "max_stars_repo_name": "tejaswiniallikanti/upgrad-mlcloud", "max_stars_repo_head_hexsha": "cca774238c5d3c342718ca8ad91c1405fc6908e2", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#Crude parsing of the BLAST XML. I could make types for Interations/Queries, Hits, and HSPs, but... """ blast_xml_to_dict_arr(xmldoc::EzXML.Document) ``` [Note: if you CBA to figure out how to traverse all this, just call ```flatten_to_dataframe(blast_arr)```] Takes an XML document, returned from BLAST and push...
{"hexsha": "720983b2d47f8f361a1254e61fdc8f4d6c570678", "size": 9297, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/functions.jl", "max_stars_repo_name": "MurrellGroup/WebBlast.jl", "max_stars_repo_head_hexsha": "e1daa7d46dd3f826adc84ba5c112844d3b91e23b", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
## this script loads an EXF/HDR as the lighting / background setup. import bpy import bmesh import mathutils import pdb import math import operator import numpy as np ### Basic -- load an EXR ## get the node tree for the world and clear it. node_tree = bpy.context.scene.world.node_tree tree_nodes = bpy.context.sce...
{"hexsha": "c32909154a5d3de1c93c004570097ba4e5120e7e", "size": 2255, "ext": "py", "lang": "Python", "max_stars_repo_path": "Blender/SceneBasics/HDRLightScene.py", "max_stars_repo_name": "ipeerbhai/technicalsmartistry", "max_stars_repo_head_hexsha": "2ad1584ab750ccd629448d17c18f4a21312ac031", "max_stars_repo_licenses": ...
using DrakeLCMTypes using Test using LCMCore using LCMCore: fingerprint #= The following Python code was used to retrieve all of the fingerprints for the various drake lcmtypes automatically: import sys import inspect import struct import drake for name, obj in inspect.getmembers(drake): if inspect.isclass(obj):...
{"hexsha": "22694d7a682aaa972861f0a790b152a7f0d41710", "size": 2515, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/DrakeLCMTypes.jl-6484683b-de53-5689-b9d2-2f18b83297fe", "max_stars_repo_head_hexsha": "8a42c278d38af5a785558410d32a103c632a...
import torch import numpy as np from torch.utils.data import Dataset class trainset(Dataset): def __init__(self, trainFileName,labelFileName): data=np.load(trainFileName) labels =np.loadtxt(labelFileName).astype(int) print(data.shape) print(labels.shape) self.mz_range=d...
{"hexsha": "bb420b2fa9802793032c1b01eabf173b4d442b81", "size": 1821, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset.py", "max_stars_repo_name": "p568912/-CNN_MALDI-TOF_VREfm", "max_stars_repo_head_hexsha": "efce061de2a140d8fe8d40f3e901d2a2839d5eb2", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
[STATEMENT] lemma ahi_eq: "\<lbrakk>ASID ahi' = ASID (ahi::ahi); ASIF (DownIF ahi') downif; ASIF (UpIF ahi') upif; ASIF (DownIF ahi) downif; ASIF (UpIF ahi) upif\<rbrakk> \<Longrightarrow> ahi = ahi'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>ASID ahi' = ASID ahi; ASIF (DownIF ahi') downif; ASIF...
{"llama_tokens": 225, "file": "IsaNet_Parametrized_Dataplane_1", "length": 1}
\documentclass[conference]{IEEEtran} %\IEEEoverridecommandlockouts % The preceding line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out. \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage{graphicx} \usepackage{textcomp} \usep...
{"hexsha": "3ecb778c5364b42d408a1505306b2893ca797bca", "size": 21762, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "LaTeX/Ranjbarpour_Tibaldi_Sajid_CV_Report.tex", "max_stars_repo_name": "WeLikeIke/ComputationalVision_Project", "max_stars_repo_head_hexsha": "154e8bc63f7e3c230ff70ac8b35b6de279909e38", "max_stars_...
module Tables using LinearAlgebra, DataValueInterfaces, DataAPI, TableTraits, IteratorInterfaceExtensions export rowtable, columntable if !hasmethod(getproperty, Tuple{Tuple, Int}) Base.getproperty(t::Tuple, i::Int) = t[i] end "Abstract row type with a simple required interface: row values are accessible via `g...
{"hexsha": "d90e527bd29b37564db17d03d8855e374a0ff79b", "size": 9004, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Tables.jl", "max_stars_repo_name": "tkf/Tables.jl", "max_stars_repo_head_hexsha": "0dd65308c76ae7b819253cff67b103f159de55f5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
"""Functions for random forest analysis. """ import numpy as np from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor from . import replicate from . import plot from . import utils __all__ = ['easy_random_forest'] def easy_random_forest(data, dependent_variable, family='gaussian', ...
{"hexsha": "50817d1c1c2665165cc7f1667f61c0a5d9a05255", "size": 5820, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/easyml/random_forest.py", "max_stars_repo_name": "Nathaniel-Haines/easyml", "max_stars_repo_head_hexsha": "2f888c6e7133270f2a841fdef7de19baa6469006", "max_stars_repo_licenses": ["MIT"], "ma...
The NWChem {\tt util} directory is a dumping ground for all sorts of useful things, some of which have been described elsewhere. Here are the rest. \subsection{Printing utilities} \subsubsection{{\tt util\_print\_centered}} \begin{verbatim} subroutine util_print_centered(unit, string, center, ounder) integer un...
{"hexsha": "724c2fc6884f4958b0e2c2461306fd5b7d7567a4", "size": 21827, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/prog/util.tex", "max_stars_repo_name": "dinisAbranches/nwchem", "max_stars_repo_head_hexsha": "21cb07ff634475600ab687882652b823cad8c0cd", "max_stars_repo_licenses": ["ECL-2.0"], "max_stars_coun...
const LEFT_SCALING_COEFFICIENTS = Dict{Int, Vector{Vector{Float64}}}( 2 => Any[ [ 0.6033325119E+00 ; 0.6908955318E+00 ; -0.3983129977E+00 ] , [ 0.3751746045E-01 ; 0.4573276599E+00 ; 0.8500881025E+00 ; 0.2238203570E+00 ; -0.1292227434E+00 ] ] , 3 => Any[ [ 0.3888997639E+00 ; -0.8820782813E-01 ; -0.8478413085E+00 ; 0.349...
{"hexsha": "34b154ccb5706a88f525954094a8f45568964f91", "size": 8169, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Filters/Left.jl", "max_stars_repo_name": "robertdj/IntervalWavelets.jl", "max_stars_repo_head_hexsha": "93c52c0e0f65d106ade6879355d8d11fd3081bd3", "max_stars_repo_licenses": ["MIT"], "max_stars...
import time import torch import numpy as np from pathlib import Path from transformers import WEIGHTS_NAME, CONFIG_NAME def init_seed(): seed_val = 42 np.random.seed(seed_val) torch.manual_seed(seed_val) torch.cuda.manual_seed_all(seed_val) device = torch.device("cuda") if torch.cuda.is_availabl...
{"hexsha": "2db2c6a35b8e84c53e6d8d737026235a3d6f7156", "size": 4217, "ext": "py", "lang": "Python", "max_stars_repo_path": "itr/train_util.py", "max_stars_repo_name": "Chinmay-jain767/itr", "max_stars_repo_head_hexsha": "041d276c2c9973ea7e33d4a293914c6e20acf968", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
#!usr/bin/env python3 ## /\ compatability line ## distribution notes - Calm Segment Extractor py34 v4.py """ Calm Segment Extractor by Chris Ward (C) 2015 updated for python 3.4 compatability by Chris Ward (C) 2016 provided free for non-commercial/fair use. This program attempts to define periods of calm beh...
{"hexsha": "f746cdc252f121d71b7228e30ebe61102ebbbc77", "size": 10426, "ext": "py", "lang": "Python", "max_stars_repo_path": "calm segment extractor py34 v5 20170918.py", "max_stars_repo_name": "realchrisward/RodentPlethysmography", "max_stars_repo_head_hexsha": "6b27e08a65b4c0b399e5b20173c0d134f5dbca38", "max_stars_rep...
import random from src.dataset.Dataset import Dataset from src.dataset.TorchImageDataset import TorchImageDataset import src.util.AuxUtil as AuxUtil from src.util.CudaUtil import to_device, get_default_device, empty_cache from tqdm import tqdm import numpy as np import torch import torchvision.transforms as T import...
{"hexsha": "7148e2097879f0fb5f9991e8c7d0ec688ca3d4f1", "size": 14615, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/metric/EvaluationEmbedding.py", "max_stars_repo_name": "sporreking/Evaluation-of-Synthetic-Face-Generation-Approaches", "max_stars_repo_head_hexsha": "480608524751c8f48445404ad92708133472cd0e...
# This set of python scripts runs a geological carbon cycle model over the last 100 Ma and plots the outputs alongside proxy data from the literature. # The model is described in J. Krissansen-Totton and D.C. Catling (2017) "Constraining climate sensitivity and continental versus seafloor weathering # using an inver...
{"hexsha": "71f90c062c33530c95c6159d82d2957a46be4d9a", "size": 15444, "ext": "py", "lang": "Python", "max_stars_repo_path": "PreviousVersions/KrissansenTotton_et_al_2017/Version1.0/Main_code.py", "max_stars_repo_name": "olehmer/CarbSilWeathering", "max_stars_repo_head_hexsha": "27b9d67028135dd06d89498c16c424574c41fa9e"...
# -------------- import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # code starts here df = pd.read_csv(path) df.head() df.isnull().sum() df = df.dropna(how = 'any') df.isnull().sum() df = df[df.Country== 'United Kingdom'] df['InvoiceDate'] = pd.to_datetime(df['InvoiceDate'...
{"hexsha": "74e9feea6b06e304c7df3e90a858627444fe8d28", "size": 3021, "ext": "py", "lang": "Python", "max_stars_repo_path": "code.py", "max_stars_repo_name": "akshatDongre/Customer-Segmentation-for-Online-Retail", "max_stars_repo_head_hexsha": "ce10a3c5826dda0d98d1daa8c6b3f16bc722a918", "max_stars_repo_licenses": ["MIT"...
// Copyright 2022 Haruki Uchiito // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, di...
{"hexsha": "052d4617e3061b74a6472bdc82e85bed14fbb077", "size": 14269, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/scan_matcher_2d.cpp", "max_stars_repo_name": "HarukiUchito/ndt_2d_slam", "max_stars_repo_head_hexsha": "7063044fc11a3ba1e0d708741615334afcbb102a", "max_stars_repo_licenses": ["MIT"], "max_stars...
# coding=utf8 import os import numpy as np from sklearn import metrics from PIL import Image import traceback def stati_class_number_true_flase(label, pred): label = np.array(label) pred = np.array(pred) cls_list = set(label) | set(pred) d = dict() for cls in cls_list: d[cls] = dict() ...
{"hexsha": "05e498dbffbf4837fe9cf6332e72507a928f287a", "size": 5612, "ext": "py", "lang": "Python", "max_stars_repo_path": "recognition/densenet/code/tools/measures.py", "max_stars_repo_name": "HLIG/HUAWEI_OCR2019", "max_stars_repo_head_hexsha": "1070d6291072e0223c2624f686766d0f3065e9c6", "max_stars_repo_licenses": ["M...
import numpy as np from utils.pil import fromimage, toimage, imresize, imread, imsave import os import h5py import tqdm from keras.utils import Sequence, to_categorical from keras_applications.imagenet_utils import preprocess_input from utils.preprocessing import IncrementalZCAWhitening class VideoSequence(Sequence):...
{"hexsha": "8654f9d1d2b1b65066839c01993aed08053260ad", "size": 8004, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/utils.py", "max_stars_repo_name": "srph25/group-ksparse-temporal-cnns", "max_stars_repo_head_hexsha": "aeee40a8c3d650afd4fc6d704f1a1f1d1d27c7d6", "max_stars_repo_licenses": ["MIT"], "max_sta...
# # Pandemic Control # A stochastic optimal control problem were we seek to control the spread of a # contagion with uncertain parameters. # ## Problem Statement and Model # We wish to determine optimal social distancing policy to control spread of a # contagion and minimize the economic impact of doing so. We'll mo...
{"hexsha": "af573964044dd36951b82b866cbe329fbd096360", "size": 10424, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/src/examples/Optimal Control/pandemic_control.jl", "max_stars_repo_name": "azev77/InfiniteOpt.jl", "max_stars_repo_head_hexsha": "db734856e6d89fd105f7bdb4fb5b8e16a72bd7fd", "max_stars_repo_li...
[STATEMENT] lemma in_abs_intervalI1: "lx < 0 \<Longrightarrow> 0 < ux \<Longrightarrow> 0 \<le> xa \<Longrightarrow> xa \<le> max (- lx) (ux) \<Longrightarrow> xa \<in> abs ` {lx..ux}" for xa::"'a::linordered_idom" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>lx < (0::'a); (0::'a) < ux; (0::'a) \<le> ...
{"llama_tokens": 249, "file": null, "length": 1}
# Copyright 2018 Goldman Sachs. # 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, # soft...
{"hexsha": "f0190cd0ab0574c0cc696522105b63b754250cc9", "size": 20097, "ext": "py", "lang": "Python", "max_stars_repo_path": "gs_quant/timeseries/technicals.py", "max_stars_repo_name": "webclinic017/gs-quant", "max_stars_repo_head_hexsha": "ebb8ee5e1d954ab362aa567293906ce51818cfa8", "max_stars_repo_licenses": ["Apache-2...
# coding: utf-8 import numpy as np from kerasy.Bio.string import ALPHABETS, StringSearch num_charactors = 10 len_string = 100000 len_query = 5 def get_test_data(): rnd = np.random.RandomState(1) string = "".join(rnd.choice(ALPHABETS[:num_charactors], len_string)) query = "".join(rnd.choice(ALPHABETS[:num...
{"hexsha": "eba1af33dfcce6d30d784aa8cc9427c83d40a7fa", "size": 658, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/Bio/test_string.py", "max_stars_repo_name": "iwasakishuto/Keras-Imitation", "max_stars_repo_head_hexsha": "8ac0cd7c8912d49d13b19a0182ad534c0781fbfe", "max_stars_repo_licenses": ["MIT"], "max_...
\documentclass[10pt,a4paper,ngerman,oneside,]{article} \newcommand\university{Universität zu Lübeck} \newcommand\teammembers{Florian Marwitz\\ Ian Pösse\\ Marcel Wienöbst} \newcommand\teamname{stoptryharding} \usepackage[log-declarations=false]{xparse} \usepackage[utf8]{luainputenc} \usepackage{luacode} \usepackage[T1...
{"hexsha": "a318f43fb1ddcc955ec84e54218985a18ac31596", "size": 10926, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tcr_main.tex", "max_stars_repo_name": "mwien/tcr", "max_stars_repo_head_hexsha": "a0d7db1d360145979c4f24e8ae6f2846ef4b7181", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_...
[STATEMENT] lemma T_measure1_less: "T_measure1 A < card (nodes rg)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. T_measure1 A < card (nodes rg) [PROOF STEP] unfolding T_measure1_def S_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. card (nodes rg - ({r} \<union> fst ` A \<union> snd ` A)) < card (nodes rg) [...
{"llama_tokens": 192, "file": "Prim_Dijkstra_Simple_Prim_Abstract", "length": 2}
import torch import numpy as np from deep3dmap.parallel.data_container import DataContainer # convert a function into recursive style to handle nested dict/list/tuple variables def make_recursive_func(func): def wrapper(vars): if isinstance(vars, list): return [wrapper(x) for x in vars] ...
{"hexsha": "de3060fe15120667bedbe57c0547aae9ff05be6b", "size": 1644, "ext": "py", "lang": "Python", "max_stars_repo_path": "deep3dmap/core/utils/device_transfer.py", "max_stars_repo_name": "achao2013/DeepRecon", "max_stars_repo_head_hexsha": "1c9b0480710212e1fe86ab75dcf0b30bd9f654e7", "max_stars_repo_licenses": ["Apach...
import xgboost as xgb import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.metrics import precision_recall_curve, auc, log_loss import time import pickle import os.path import datetime as dt import sys import math from Utils.Base.RecommenderGBM import RecommenderGBM f...
{"hexsha": "49466286a126d8d943151525a3d63c3b593892e7", "size": 1416, "ext": "py", "lang": "Python", "max_stars_repo_path": "multi.py", "max_stars_repo_name": "MaurizioFD/recsys-challenge-2020-twitter", "max_stars_repo_head_hexsha": "95dc024fb4f8777aa62e1304536daece640428de", "max_stars_repo_licenses": ["Apache-2.0"], "...
import matplotlib.pyplot as plt import seaborn import networkx as nx import pandas as pd import random import numpy as np import itertools import json import scipy import community def normalized_adj_matrix(G,conserve_heat=True,weighted=False): ''' This function returns normalized adjacency matrix. ...
{"hexsha": "f0750ed072fb2cf7f59e3f53dd63ccda773a6fd9", "size": 18303, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/restLayer/app/datascience/network_prop.py", "max_stars_repo_name": "ucsd-ccbb/Oncolist", "max_stars_repo_head_hexsha": "a3c7ecde6f665a665873e5aa7be5bc3778f5b17e", "max_stars_repo_licenses": [...
#EasyPlotGrace Defaults control #------------------------------------------------------------------------------- #==Constants ===============================================================================# DEFAULT_RENDERDPI = 75 #Low res for inline graphics #==Defaults =============================================...
{"hexsha": "f0f44eccc2bb4bd2daadc5df34a1b069cf3689bb", "size": 1067, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "subpkgs/EasyPlotGrace/src/defaults.jl", "max_stars_repo_name": "ma-laforge/CMDimData.jl", "max_stars_repo_head_hexsha": "f543265841b81dc20f5dca18a37cd642371a0a34", "max_stars_repo_licenses": ["MIT"...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on October 2019 @author: Nathan de Lara <ndelara@enst.fr> """ from abc import ABC import numpy as np from scipy import sparse from scipy.spatial import cKDTree from sknetwork.utils.knn1d import knn1d from sknetwork.utils.format import directed2undirected from...
{"hexsha": "5d1488be6d44b379ccf6c2906eb49e4d16f6019a", "size": 5297, "ext": "py", "lang": "Python", "max_stars_repo_path": "sknetwork/utils/knn.py", "max_stars_repo_name": "mynameisvinn/scikit-network", "max_stars_repo_head_hexsha": "255e99b2f7d5ad8914a8fad3a89d7817764666e0", "max_stars_repo_licenses": ["BSD-3-Clause"]...
""" @author: Yifei Ji, Junguang Jiang @contact: jiyf990330@163.com, JiangJunguang1123@outlook.com """ import math import os import random import time import warnings import sys import argparse import shutil import numpy as np from tqdm import tqdm import torch.backends.cudnn as cudnn from torch.optim import SGD from t...
{"hexsha": "84954e26b163370aeac22d47bad7c33d9a769314", "size": 17369, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/task_adaptation/image_classification/delta.py", "max_stars_repo_name": "billzhonggz/Transfer-Learning-Library", "max_stars_repo_head_hexsha": "d7a6e4298e571d5101e05515a2ab1f171160ef89", ...
import numpy as np import gym from gym.error import ResetNeeded from pogema.grid import Grid from pogema.grid_config import GridConfig from pogema.wrappers.metrics import MetricsWrapper from pogema.wrappers.multi_time_limit import MultiTimeLimit class ActionsSampler: def __init__(self, num_actions, seed=42): ...
{"hexsha": "190418f0475d291911d970c51fb6f9f5508a75e2", "size": 5393, "ext": "py", "lang": "Python", "max_stars_repo_path": "pogema/envs.py", "max_stars_repo_name": "AIRI-Institute/pogema", "max_stars_repo_head_hexsha": "c83bbdd805ab492e53fb38584e60aacc30e31947", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 20...
[STATEMENT] lemma exec_instr_known_addrs: assumes ok: "start_heap_ok" and exec: "(ta, xcp', h', frs') \<in> exec_instr i P t h stk loc C M pc frs" and check: "check_instr i P h stk loc C M pc frs" shows "jvm_known_addrs t (xcp', frs') \<subseteq> jvm_known_addrs t (None, (stk, loc, C, M, pc) # frs) \<union> new...
{"llama_tokens": 50822, "file": "JinjaThreads_MM_DRF_JVM", "length": 83}
from collections import namedtuple import logging import numpy as np from ray.rllib.policy.sample_batch import MultiAgentBatch, SampleBatch from ray.rllib.policy import Policy from ray.rllib.utils.annotations import DeveloperAPI from ray.rllib.offline.io_context import IOContext from ray.rllib.utils.annotations impor...
{"hexsha": "e04f8238682fbccd639585f81d7533c9a805f264", "size": 6056, "ext": "py", "lang": "Python", "max_stars_repo_path": "rllib/offline/off_policy_estimator.py", "max_stars_repo_name": "daobook/ray", "max_stars_repo_head_hexsha": "af9f1ef4dc160e0671206556b387f8017f3c3930", "max_stars_repo_licenses": ["Apache-2.0"], "...
import argparse import os from time import time import numpy as np import torch.utils.data from torch.utils.data import DataLoader from auxiliary.settings import DEVICE, make_deterministic from auxiliary.utils import print_val_metrics from classes.core.Evaluator import Evaluator from classes.core.LossTracker import L...
{"hexsha": "d81bdf09a957985105e8d9e6f6c781ef9bdae9a8", "size": 6430, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/tcc/test_itccnet.py", "max_stars_repo_name": "matteo-rizzo/interpretable-tcc", "max_stars_repo_head_hexsha": "c50ab5c7407d8b300e00a7a889aa45d34bae2276", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/env/python #coding:utf-8 import numpy as np import matplotlib.pyplot as plt from matplotlib import rc import matplotlib as mpl import sys, os, copy, math, re SHOW_THEORETICAL = True def thin(anarray): i = 1.0 retarray = [] while(i<=len(anarray)): retarray.append(anarray[int(i)-1]) i*=1.2 if in...
{"hexsha": "9155efaaa48ee65a79c533ebd416f8d5f227aee8", "size": 3292, "ext": "py", "lang": "Python", "max_stars_repo_path": "simpleplot.py", "max_stars_repo_name": "jkomiyama/multiplaybanditlib", "max_stars_repo_head_hexsha": "a97ffaa8917eb5d7f325a54fce0aeb492265f0ce", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np from gnuradio import gr import pmt import base64 class blk( gr.sync_block ): # other base classes are basic_block, decim_block, interp_block """Embedded Python Block example - a simple multiply const""" def __init__(self): # only default arguments here """arguments to this f...
{"hexsha": "6eed8a7d533dea2b0bc5070c0ee4bf9d8d242a32", "size": 1770, "ext": "py", "lang": "Python", "max_stars_repo_path": "gnuradio/epy_block_0.py", "max_stars_repo_name": "HexCam-Rosa/apay", "max_stars_repo_head_hexsha": "53a10083daeed17b497dcd6e128e95d7dba0faee", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
from env.chain_env import ChainEnv from env.circle_env import CircleEnv from env.mk_env import MKEnv from env.corner_env import CornerEnv from algo.EpisodicControl import EpisodicAgent from algo.EpisodicControlwE import EpisodicwExplorationAgent from algo.HumanAgent import HumanAgent import numpy as np import matplotl...
{"hexsha": "cb9dcf6357a4b4aa995666c8abfd04ce7490671e", "size": 2697, "ext": "py", "lang": "Python", "max_stars_repo_path": "baselines/tabular/run_algo.py", "max_stars_repo_name": "MouseHu/emdqn", "max_stars_repo_head_hexsha": "ba907e959f21dd0b5a17117accccae9c82a79a3b", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import numpy as np from distancematrix.ringbuffer import RingBuffer from .abstract_consumer import AbstractStreamingConsumer class MultidimensionalMatrixProfileLR(AbstractStreamingConsumer): """ A consumer that builds the multidimensional matrix profile. This consumer takes in distance measures from mult...
{"hexsha": "6a3477e0c131659e8a7263df340a13f8c31a9425", "size": 14402, "ext": "py", "lang": "Python", "max_stars_repo_path": "distancematrix/consumer/multidimensional_matrix_profile_lr.py", "max_stars_repo_name": "IDLabResearch/seriesdistancematrix", "max_stars_repo_head_hexsha": "c0e666d036f24184511e766cee9fdfa55f41df9...
# 3. faza: Vizualizacija podatkov #-------------------- # GRAFA 1 IN 2 graf1 <- tabela6 %>% filter(VRSTA.VODE=="SKUPAJ") %>% ggplot(aes(x=LETO, y=NACRPANO)) + geom_bar(stat="identity", fill="blue") + ylab("Načrpana voda skupaj v 100.000 * m^3") + xlab("Leto") povprecje <- ta...
{"hexsha": "faa1414908d851307d92caf1f2b2177a234e2629", "size": 3075, "ext": "r", "lang": "R", "max_stars_repo_path": "vizualizacija/vizualizacija.r", "max_stars_repo_name": "DavidRozman/APPR-2020-21", "max_stars_repo_head_hexsha": "9d4c6dc48acf84c0dcce540776210668a37736c5", "max_stars_repo_licenses": ["MIT"], "max_star...
import unittest import warnings warnings.filterwarnings("ignore") import copy import pandas as pd import numpy as np from shapely import wkt import geopandas as gpd from shapely.geometry import mapping def direction_east(gdf,building): building_list = list(mapping(building)['bbox']) building_list.sort() ...
{"hexsha": "65dbecf23f615f3eec712216169477cabdbe68d9", "size": 1446, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_east.py", "max_stars_repo_name": "Jingyi-hu/reportdetails", "max_stars_repo_head_hexsha": "c8c9ca822f5efe32056eb57a017a9beb0c6c68ff", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np from numpy.core.records import fromfile import open3d as o3d import argparse def get_pcd_from_np_data(data): pcd = o3d.geometry.PointCloud() pcd.points = o3d.utility.Vector3dVector(data[:,:3]) pcd.colors = o3d.utility.Vector3dVector(data[:,3:]/255.) return pcd if __name__=='__main__...
{"hexsha": "16f5f7778af61c4b28a81a5609ee82e7f460b40b", "size": 631, "ext": "py", "lang": "Python", "max_stars_repo_path": "Segmentation/txt_to_ply.py", "max_stars_repo_name": "engomarwasfy/Feature-Geometric-Net-FG-Net", "max_stars_repo_head_hexsha": "b2858f5ecdfab4c67e3b81a5b60ae816ab23eccc", "max_stars_repo_licenses":...
from ml3d.utils.config import Config from ml3d.tf.models import PointPillars from ml3d.tf.models.point_pillars_no_norm import PointPillarsNoNorm from ml3d.datasets.sly_dataset import SlyProjectDataset from ml3d.tf.pipelines import ObjectDetection import pprint import sys sys.path.append('../train/src') import sly_gl...
{"hexsha": "e10d91ca3ef5fad2936bac720e305ffe326c6afc", "size": 3021, "ext": "py", "lang": "Python", "max_stars_repo_path": "supervisely/src_backup/train.py", "max_stars_repo_name": "supervisely-ecosystem/Open3D-ML", "max_stars_repo_head_hexsha": "1c26dce2126f5b38f3801d3f9b9599fe978ad559", "max_stars_repo_licenses": ["M...
function yml=mbmling(xml,plt) %MBMLING_CELL converts any XML into MbML (Matlab Markup Language) compliant string % %Syntax: yml=mbmling(xml,plt) % %Description: % Converts any XML syntax into Matlab Markup Language (MbML) % % Jonas Almeida, almeidaj@musc.edu, 18 May 2002, MAT4NAT Tbox if nargin<2;plt=0;end if plt==...
{"author": "fieldtrip", "repo": "fieldtrip", "sha": "c2039be598a02d86b39aae76bfa7aaa720f9801c", "save_path": "github-repos/MATLAB/fieldtrip-fieldtrip", "path": "github-repos/MATLAB/fieldtrip-fieldtrip/fieldtrip-c2039be598a02d86b39aae76bfa7aaa720f9801c/external/xml4mat/mbmling.m"}
from functools import partial import joblib import numpy as np from dgl.nn import pytorch as dgl_layers from scipy import sparse from data_utils import get_validation_split from utils import load from defender.uxils.graph.node_classifier import (ConvolutionalNodeClassifier, ...
{"hexsha": "a27bb19648954b0258b902d516a46465a3b774ab", "size": 2452, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate_solution.py", "max_stars_repo_name": "u1234x1234/kdd2020-graph-adversarial-attacks-defence", "max_stars_repo_head_hexsha": "15e71852c296670b3f66f2a9fe33046688698a50", "max_stars_repo_lice...
# IMPORTS ----------------------------------------------------------------------------------------------------------------- # import numpy as np from scipy.integrate import odeint import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import scipy.special import math import mpld3 from mpld...
{"hexsha": "4514e7992f25c167b7d7c23a69b6bf8bc8c47fcf", "size": 13941, "ext": "py", "lang": "Python", "max_stars_repo_path": "ViraDose.py", "max_stars_repo_name": "ob0117/ViraDose", "max_stars_repo_head_hexsha": "4596c87959a13d3513b35d88776ecf65ffeb32ab", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
import matplotlib.pyplot as plt import numpy as np import sys for i in range(1, len(sys.argv)): fname = sys.argv[i] legend_name = fname.split('/')[0] print(legend_name) f = open(fname) l = [list(map(float, l.split())) for l in f] x = [2 * l[0] + 1 for l in l] y = [l[1] for l in l] x = ...
{"hexsha": "54823ad2eae5f7ee2743bb4ae83ed52065dbeba7", "size": 858, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/plot.py", "max_stars_repo_name": "ibraheem-moosa/protein-bvalue-nonseq", "max_stars_repo_head_hexsha": "d89bcc4e14dc3065134b716b78414a296dad873a", "max_stars_repo_licenses": ["MIT"], "max_st...
# A simple relation that uses hash-based lookup struct IsEqualRelation{names, T <: Tuple} <: Relation{names} values::T end Base.isequal(::Label{name}, value) where {name} = IsEqualRelation{(name,)}((value,)) Base.iteratorsize(::Type{<:IsEqualRelation}) = Base.HasLength() Base.length(::IsEqualRelation) = 1 Base.st...
{"hexsha": "4f23af59901298c3a8e9413217c548725a254df6", "size": 1090, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/isequal.jl", "max_stars_repo_name": "andyferris/MVTs.jl", "max_stars_repo_head_hexsha": "d3d92e054d7a917300d4679916a4718b288511d2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
*DECK D9LGIC DOUBLE PRECISION FUNCTION D9LGIC (A, X, ALX) C***BEGIN PROLOGUE D9LGIC C***SUBSIDIARY C***PURPOSE Compute the log complementary incomplete Gamma function C for large X and for A .LE. X. C***LIBRARY SLATEC (FNLIB) C***CATEGORY C7E C***TYPE DOUBLE PRECISION (R9LGIC-S, D9LGI...
{"hexsha": "22a8269c041122a10212ded7e027d7e309aa2bdd", "size": 1732, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Modules/ThirdParty/Netlib/src/netlib/slatec/d9lgic.f", "max_stars_repo_name": "nalinimsingh/ITK_4D", "max_stars_repo_head_hexsha": "95a2eacaeaffe572889832ef0894239f89e3f303", "max_stars_repo_licen...
# Steve Goldman, Space Telescope Science Institute, sgoldman@stsci.edu import os import ipdb import numpy as np import h5py from shutil import copyfile from astropy.table import Table, Column from astropy.utils.data import download_file from desk.set_up import config def read_hdf5(filename, testing): """Reads HDF...
{"hexsha": "6b66cd67f16af7569ce37bd418e856cae1c878ca", "size": 7183, "ext": "py", "lang": "Python", "max_stars_repo_path": "desk/set_up/get_models.py", "max_stars_repo_name": "s-goldman/Dusty-Evolved-Star-K", "max_stars_repo_head_hexsha": "50d8c056fc9006b45558a6430ee7a67b46f0cc99", "max_stars_repo_licenses": ["BSD-3-Cl...
(* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) *) theory WhileLoopVarsPreserved imports "../../AutoCorres" begin install_C_file "wh...
{"author": "8l", "repo": "AutoCorres", "sha": "47d800912e6e0d9b1b8009660e8b20c785a2ea8b", "save_path": "github-repos/isabelle/8l-AutoCorres", "path": "github-repos/isabelle/8l-AutoCorres/AutoCorres-47d800912e6e0d9b1b8009660e8b20c785a2ea8b/autocorres/tests/proof-tests/WhileLoopVarsPreserved.thy"}
module QuantumOperators using Printf: @printf, @sprintf using ...Prerequisites: atol, rtol using ...Prerequisites.NamedVectors: NamedVector using ...Prerequisites.Traits: efficientoperations, getcontent, contentorder using ...Prerequisites.Traits: rawtype, fulltype, parametertype, parameterpairs, reparameter, promotep...
{"hexsha": "98de19245b11ff98f59e63580d6f89f89d7f5e07", "size": 31744, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Essentials/QuantumOperators.jl", "max_stars_repo_name": "Quantum-Many-Body/QuantumLattices.jl", "max_stars_repo_head_hexsha": "203034b5281887811028484e24ce5a5ea9556185", "max_stars_repo_licens...
import numpy as np from pyalgotrade import technical from pyalgotrade.dataseries import bards class PRICEEventWindow(technical.EventWindow): def __init__(self, period=1): assert(period > 0) super(PRICEEventWindow, self).__init__(period) self.__value = None def onNewValue(self, dateTim...
{"hexsha": "4f15d50d02668f4d3f9cbcc434fe17565af761c3", "size": 2143, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyalgotrade/technical/price.py", "max_stars_repo_name": "hubbs5/pyalgotrade", "max_stars_repo_head_hexsha": "19afc367351a8fe6126bccac576c023593d043eb", "max_stars_repo_licenses": ["Apache-2.0"], "...
import torch from scipy.sparse.linalg import LinearOperator, cg from typing import Callable, Optional from torch import Tensor class CG(torch.autograd.Function): @staticmethod def forward(ctx, z: Tensor, AcquisitionModel, beta: Tensor, y, G: Callable, GH: Callable, GHG: Optional[Callable]=None) -> Tensor: ...
{"hexsha": "2705cf466648ba123d0499af3897fccbfc223e0a", "size": 1498, "ext": "py", "lang": "Python", "max_stars_repo_path": "nns_based_approach/tv_recon_network/cg.py", "max_stars_repo_name": "fzimmermann89/P1-Temp-Reg", "max_stars_repo_head_hexsha": "e81c70d93a86f825838af27d3ed9b724d0992a10", "max_stars_repo_licenses":...
\section{Science Drivers} \label{sec:science} The various different science drivers outlined in \ref{sec:science} naturally lead to different priorities for template generations, e.g. solar system science prefers templates to be generated in the NES and Milky Way science would to would prefer templates for the galacti...
{"hexsha": "553f148993e8b9007b604ab35c0a7dd61e42f6d0", "size": 1271, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "science.tex", "max_stars_repo_name": "lsst/rtn-011", "max_stars_repo_head_hexsha": "3f34fc56a5924957386c02228d8dec67c3d7cd07", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count": null, "max...
###################################### # # # Display results with matplotlib # # Reads an output file into a numpy # # array and displays scalar field. # # Uses python3. # # # ###################################### import numpy as np...
{"hexsha": "4bbe35922ba5e070d8d7ad21b3fc2a6ad789dc61", "size": 1011, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot.py", "max_stars_repo_name": "Hagen23/Monodomain-SPH", "max_stars_repo_head_hexsha": "be825dfa78ba30ebdc42f799f9b87821bd62908f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
# Use this script to compile the C module by running # # cpython setup.py build_ext --inplace # # Then run "python test.py" from distutils.core import setup from Cython.Build import cythonize import os, sys compile_args = [] include_dirs = ['.'] # '../../../../Include'] from Scientific import N try: num_...
{"hexsha": "b650c45a4be63e5911bfa66f4e29e0f370111bb2", "size": 988, "ext": "py", "lang": "Python", "max_stars_repo_path": "AlGDock/ForceFields/OBC/setup.py", "max_stars_repo_name": "CCBatIIT/AlGDock", "max_stars_repo_head_hexsha": "25c376e9d860d50696f5e20f1b107d289ec0903c", "max_stars_repo_licenses": ["MIT"], "max_star...
import math import pylab import numpy as np compiled = """ (function(){var j=window,k=document,l=Math;function n(a,b){return a.width=b}function o(a,b){return a.position=b}function p(a,b){return a.height=b}function q(a,b){return a.zIndex=b}var r="appendChild",s="createElement",t="getCoordinates",u="getView",w="pushLat...
{"hexsha": "016124dfa548e691909d1cb9c3cdc1241263c17b", "size": 19235, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygmaps/gmaps.py", "max_stars_repo_name": "thearn/pygmaps-extended", "max_stars_repo_head_hexsha": "021a06204ae43740245631b027ed6c7d2270af4b", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
import _pickle as pickle import logging from decimal import Decimal import numpy as np from scipy.optimize import minimize, brute, basinhopping from ...core import default from ...core.estimators.abstract_estimator import AbstractEstimator logger = logging.getLogger(__name__) class ScipyOptimize(AbstractEstimator)...
{"hexsha": "969d513463a3278d808a4ab4b57675b5c1b496bb", "size": 15640, "ext": "py", "lang": "Python", "max_stars_repo_path": "deformetrica/core/estimators/scipy_optimize.py", "max_stars_repo_name": "coolteemf/coolteemf-deformetrica", "max_stars_repo_head_hexsha": "f965d6ecc0d04f243e487468a9dafe9fe864eed2", "max_stars_re...
Require Import StructTact.StructTactics. Require Import Core.Core Core.Notations Core.Tactics Core.PtrLemmas. Require Import Spec Lists.List. Import ListNotations. Open Scope Z. Notation option_lift := RingMicromega.map_option. Definition string := list byte. (** * Memory read *) (* read [n] consecutive bytes from ...
{"author": "asosyuk", "repo": "asn1verification", "sha": "55395d63c2dcd512a28d9cd42d788e12f91e7641", "save_path": "github-repos/coq/asosyuk-asn1verification", "path": "github-repos/coq/asosyuk-asn1verification/asn1verification-55395d63c2dcd512a28d9cd42d788e12f91e7641/doc/strtoimax/C_strtoimax/RelationalSpec.v"}
from flask import Flask, jsonify, render_template, redirect, request, session import os import psycopg2 import numpy as np import socket import librosa import librosa.display from matplotlib import pyplot as plt from joblib import load import datetime import json results_dict = { "predictedEmotion": [], "emot...
{"hexsha": "d4107a942edab2caf22c28a54ee017941ccfda58", "size": 5428, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "timsamson/audible_emotion_recognition", "max_stars_repo_head_hexsha": "04e0adbb994a1478e301f4e068f7abd170be837a", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_st...
# -*- coding: utf-8 -*- """Spam Mail Prediction.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1j9A1pvH3ocuju96a-T63YtRl-MNBXyJ5 Import Libraries """ import numpy as np import pandas as pd from sklearn.model_selection import train_test_split fr...
{"hexsha": "474448d48479f478a180a694d31e79aa0a4df5bc", "size": 3034, "ext": "py", "lang": "Python", "max_stars_repo_path": "spam_mail_prediction.py", "max_stars_repo_name": "Saan-king/Spam-Ham-Mail-Prediction", "max_stars_repo_head_hexsha": "0872744280baa8de16d5f33776fcda2bdc72454b", "max_stars_repo_licenses": ["MIT"],...
SUBROUTINE SGRAY(x) INTEGER x PRINT 100, '.', x, 'setgray' 100 FORMAT(A1, I1, A8) RETURN END
{"hexsha": "1091c154bef77790db0ae79c174d6f2972deaf5b", "size": 127, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/sgray.f", "max_stars_repo_name": "asnowmang/fPS", "max_stars_repo_head_hexsha": "69a3c5a5c952873a789f7c80dacecab96f9c34f5", "max_stars_repo_licenses": ["0BSD"], "max_stars_count": null, "max_st...
"""Plots for spikes.""" import numpy as np import matplotlib.pyplot as plt from spiketools.utils.select import get_avg_func, get_var_func from spiketools.plts.data import plot_bar, plot_hist, plot_lines from spiketools.plts.utils import check_ax, savefig, set_plt_kwargs ##############################################...
{"hexsha": "d8860a41ed3f0d3ea6aeb50a68b46c5f590d795e", "size": 5734, "ext": "py", "lang": "Python", "max_stars_repo_path": "spiketools/plts/spikes.py", "max_stars_repo_name": "claire98han/SpikeTools", "max_stars_repo_head_hexsha": "f1cdffd50e2cbdb75961a716425c4665aa930f54", "max_stars_repo_licenses": ["Apache-2.0"], "m...
###### Data Classification (STEP 4th) #setwd("F:/Stevens/CS 513 - Knowledge Discovery & Data Mining/Project/Flight Delay Prediction/") ###### ###### 2013, 2014 and 2015 ###### ### read work dataset of month june and year 2013, 2014, and 2015 datasheet_13_14_15 <- read.csv("Datasets/Datasheet_NY_June_2013_2014_2015.cs...
{"hexsha": "be32fbef5b7374bdeffe73e04bd085efe8b8b2b8", "size": 2987, "ext": "r", "lang": "R", "max_stars_repo_path": "CS 513 - Knowledge Discovery & Data Mining/Project/R/5_Data_Classification.r", "max_stars_repo_name": "ParasGarg/Stevens-Computer-Science-Courses-Materials", "max_stars_repo_head_hexsha": "13015e6e83471...
(* Copyright (c) 2022, choukh <choukyuhei@gmail.com> *) Require Import GOO.Ordinal.Ord. Require Import GOO.Ordinal.Recursion. Require Import GOO.Ordinal.Iteration. Require Import GOO.Ordinal.VeblenFunction. Require Import GOO.Ordinal.ExtendedVeblenFunction. Local Open Scope 序数域. Notation ω元φ := ExtendedVeblenFunctio...
{"author": "choukh", "repo": "Googology", "sha": "10e283100a0c0d5eeef6e262e15023464c167c8f", "save_path": "github-repos/coq/choukh-Googology", "path": "github-repos/coq/choukh-Googology/Googology-10e283100a0c0d5eeef6e262e15023464c167c8f/Ordinal/OmegaAryVeblenFunction.v"}
import gym from GA_Base import model import torch import torch.nn as nn import copy import numpy as np from collections import deque, namedtuple import matplotlib.pyplot as plt OutputItem = namedtuple('OutputItem', field_names=["seeds", "reward", "steps", "bc"]) def evaluate(env, net): """ Runs ...
{"hexsha": "494e74fd69b2c63bca2acba9512c2069f3dc5e97", "size": 5204, "ext": "py", "lang": "Python", "max_stars_repo_path": "GA_Base/base.py", "max_stars_repo_name": "BY571/GARNE-Genetic-Algorithm-with-Recurrent-Network-and-Novelty-Exploration", "max_stars_repo_head_hexsha": "55e6b88e549c2aff7117f4f2c556f9d290a391a1", "...
// Copyright Oliver Kowalke 2009. // Copyright Edvard Severin Pettersen 2017. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at // http://www.boost.org/LICENSE_1_0.txt) #pragma once #include <proxc/config.hpp> #include <boost/i...
{"hexsha": "9a87b00f5c23dbe7ee53f08f4d5a055325406e4c", "size": 1048, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/proxc/detail/queue.hpp", "max_stars_repo_name": "edvardsp/libproxc-", "max_stars_repo_head_hexsha": "aea543d7de50a26fb424485a9eed458004f57510", "max_stars_repo_licenses": ["BSL-1.0"], "max_s...
#include <bunsan/process/error.hpp> #include <bunsan/process/context.hpp> #include <boost/io/detail/quoted_manip.hpp> #include <sstream> namespace boost { std::string to_string(const bunsan::process::error::context &context) { std::ostringstream sout; sout << '[' << bunsan::error::info_name(context) << "] = "; ...
{"hexsha": "20b7acb336cd75a605b03e251fa47d05b8235401", "size": 786, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/process/error.cpp", "max_stars_repo_name": "sarum9in/bunsan_process", "max_stars_repo_head_hexsha": "334c6a6134d722552848521665c8b3a61619a013", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
doc""" GeneralizedPareto(ξ, σ, μ) The *Generalized Pareto distribution* with shape parameter `ξ`, scale `σ` and location `μ` has probability density function $f(x; \xi, \sigma, \mu) = \begin{cases} \frac{1}{\sigma}(1 + \xi \frac{x - \mu}{\sigma} )^{-\frac{1}{\xi} - 1} & \text{for } \xi \neq 0 \\ \...
{"hexsha": "d81a7c3636a01a43a47e205ffffdc90003772ab9", "size": 4403, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/univariate/continuous/generalizedpareto.jl", "max_stars_repo_name": "ericproffitt/Distributions.jl", "max_stars_repo_head_hexsha": "54daf6f7230c6cf1fa46d9a948a33ad68b5fd3b0", "max_stars_repo_li...