text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
"""Module containing functionality for applying affine transformations to nd images."""
import numpy as np
from . import _affine_transform
def transform(
input_image,
linear_transformation,
translation,
order="linear",
origin=None,
output_image=None,
output_image_origin=None,
backgro... | {"hexsha": "ea86133668334036eebfb4c37f6d6e9d255323ea", "size": 6235, "ext": "py", "lang": "Python", "max_stars_repo_path": "affine_transform/affine_transform.py", "max_stars_repo_name": "NOhs/affine_transform_nd", "max_stars_repo_head_hexsha": "3f90c7a4d72616e7a6e7bf1b5cff8b7990ed40ec", "max_stars_repo_licenses": ["MIT... |
'''
Write a short function that performs the convolution between an image, and a
3 × 3 structuring element, by performing an explicit looping over the image
pixels. You should pad the edges of the input image with zeros to deal with the
edges and corners of the original image.
'''
import cv2
import numpy as np
def co... | {"hexsha": "0fc228f6b348de7a1781257738a24640255f66c3", "size": 1566, "ext": "py", "lang": "Python", "max_stars_repo_path": "lab1/ex1.py", "max_stars_repo_name": "zhangchenbocalvin/comp37212-labs", "max_stars_repo_head_hexsha": "adc55a7f9e02a0793cdc263e41adad2c26262af9", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
#include <boost/fusion/include/segmented_iterator.hpp>
| {"hexsha": "3fbb2bc311f8b428537c19461884cc62eaa5632a", "size": 55, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_fusion_include_segmented_iterator.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses... |
using OptimizationDynamics
const iLQR = OptimizationDynamics.IterativeLQR
using LinearAlgebra
using Random
# ## visualization
vis = Visualizer()
render(vis)
# ## mode
MODE = :friction
MODE = :frictionless
# ## state-space model
h = 0.05
T = 51
if MODE == :friction
im_dyn = ImplicitDynamics(cartpole_friction, h... | {"hexsha": "4455cf55b0e174414f0a763af3f339b079ffd8ff", "size": 3031, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/cartpole.jl", "max_stars_repo_name": "thowell/optimization_dynamics", "max_stars_repo_head_hexsha": "82ab4d03e1d57771639b1f2c9bc07ce2aa56b1ef", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import os
import json
import time
import argparse
import numpy as np
from autoPyTorch.components.metrics import accuracy
from autoPyTorch.pipeline.nodes.metric_selector import AutoNetMetric, undo_ohe, default_minimize_transform
from autoPyTorch.components.ensembles.ensemble_selection import EnsembleSelection
from hpba... | {"hexsha": "b7914cbe3b49f4df4d5695796d3f759d19e5fafa", "size": 11255, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ensemble/create_trajectory.py", "max_stars_repo_name": "mens-artis/Auto-PyTorch", "max_stars_repo_head_hexsha": "da8528d5cb1d5ac6a9050eaa84a332a5a11ee6d5", "max_stars_repo_licenses": ["A... |
# ---
# title: 988. Smallest String Starting From Leaf
# id: problem988
# author: Tian Jun
# date: 2020-10-31
# difficulty: Medium
# categories: Tree, Depth-first Search
# link: <https://leetcode.com/problems/smallest-string-starting-from-leaf/description/>
# hidden: true
# ---
#
# Given the `root` of a binary tree, e... | {"hexsha": "67f91e5e941634a6569605c04a5b0303c86ba00c", "size": 1544, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/unresolved/988.smallest-string-starting-from-leaf.jl", "max_stars_repo_name": "jmmshn/LeetCode.jl", "max_stars_repo_head_hexsha": "dd2f34af8d253b071e8a36823d390e52ad07ab2e", "max_stars_repo_lic... |
# David R Thompson
import sys, os
import numpy as np
from spectral.io import envi
# collect linearity curves
cmd = 'python ~/src/emit-sds-l1b/utils/combinelinearity.py /beegfs/scratch/drt/20220112_CWIS2/linearity/cwis_linearity_curves ../data/CWIS2_LinearityBasis_20220115'
print(cmd)
#os.system(cmd)
# Now fit per wav... | {"hexsha": "80845ca3afa8a856c0476b828a6e1f58f9aa783c", "size": 998, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/cwis_step04_combine_linearity.py", "max_stars_repo_name": "emit-sds/emit-sds-l1b", "max_stars_repo_head_hexsha": "be5307fe6821a043971becdd33609b4cf89b1974", "max_stars_repo_licenses": ["Apa... |
/*!
@file
Forward declares `boost::hana::slice` and `boost::hana::slice_c`.
@copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_FWD_SLICE_HPP
#define BOOST_HANA_FWD_SLICE_HPP
... | {"hexsha": "ab6d8f34f3954bc6c87caa71f6e5a77fb0504e4d", "size": 3578, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/hana/fwd/slice.hpp", "max_stars_repo_name": "angryDuck2/PopcornTorrent", "max_stars_repo_head_hexsha": "63bed793cbd59117fc296f887ed91b937a85ce77", "max_stars_repo_licenses": ["MIT"], "... |
from __future__ import absolute_import
from __future__ import division
import functools
import gzip
import math
import numpy as np
import random
from sys import version_info
from .base import stripSuffix
if version_info[0] > 2:
long = int
def isEven(x): # {{{
'''Return True if x is an even integer, else Fal... | {"hexsha": "a85b7721dbe45ddbd718cd55c1c4d149f0e95309", "size": 16858, "ext": "py", "lang": "Python", "max_stars_repo_path": "dmppl/math.py", "max_stars_repo_name": "DaveMcEwan/dmppl", "max_stars_repo_head_hexsha": "68e8a121d4591360080cd40121add1796ae48a1b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max... |
Module Image
implicit none
type RGBimage
integer, dimension(:,:), pointer :: Red, Green, Blue
integer :: width, height
end type RGBimage
type RGBAimage
integer, dimension(:,:), pointer :: Red, Green, Blue, Alpha
integer :: width, h... | {"hexsha": "492e5ed6ac48c8c0c30f77f6bdc0c8429312d0c7", "size": 16709, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Image_mod.f90", "max_stars_repo_name": "lewisfish/FortranForm", "max_stars_repo_head_hexsha": "1973bed433952f5aef298086095de8976b4447b2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
from src.layers import *
import pickle as pkl
from src.preprocess import *
import numpy as np
import tensorflow as tf
import codecs
import json
import glob
class Stage1:
def __init__(self, view_shape=(128, 128, 1), model_shape=(32, 32, 32, 1), z_size=100, channel=1, learning_rate=0.0002, alpha=0.2, bet... | {"hexsha": "d79fcae8db2de0622b592a572fe1183e03aaebaa", "size": 11639, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/trainer.py", "max_stars_repo_name": "ZijingPeng/3d-cgan", "max_stars_repo_head_hexsha": "041e0c17be25f7ac4c3ea1190600336ad05d2b58", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12, ... |
using LinearAlgebra
using UnicodePlots
include("gemm.jl")
function plot_data(ns, data)
scaling = 2 * ns.^3
minv = floatmax()
maxv = floatmin()
for (s, v) = pairs(data)
if s != :ref
minv = min(minv, minimum(scaling ./ v.min))
maxv = max(maxv, maximum(scaling ./ v.min))
end
end
plt = lineplot... | {"hexsha": "6486d235c4d69af25cda46af97816d8acd51f213", "size": 2567, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "week2/driver.jl", "max_stars_repo_name": "jkozdon/Julia-LAFF-On-PfHP", "max_stars_repo_head_hexsha": "3cf4fafae823c3104560a5da2f4faee2e6158685", "max_stars_repo_licenses": ["Unlicense"], "max_stars... |
/-
Copyright (c) 2017 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
import Mathlib.PrePort
import Mathlib.Lean3Lib.init.default
universes u w u_1
namespace Mathlib
def buffer (α : Type u) := sigma fun (n : ℕ) => array n ... | {"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/Lean3Lib/data/buffer_auto.lean"} |
from datetime import datetime
import pandas as pd
import numpy as np
import gzip
import requests
import json
def hist_data(exchange):
# Input exchange to obtain price data from
# Returns BTCUSD price data for Bitstamp, Kraken, Coinbase, CEX
if exchange == 'Bitstamp':
api = 'https://api.bitcoinch... | {"hexsha": "9e9163eb475f1e61492d5ee3062565448a3d6a38", "size": 2387, "ext": "py", "lang": "Python", "max_stars_repo_path": "Price_Data.py", "max_stars_repo_name": "Globe-Research/bittrends", "max_stars_repo_head_hexsha": "d2e66e405183349f52556a18d387bb1dfc900db5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import os
import numpy as np
import h5py
from tqdm import tqdm
from skimage.io import imsave
from model_creation import create_model
from data_handler import get_input, get_image_from_slide
def predict_each_element(output, slide, parameter_file, model):
"""
Takes a list of parameters associated to a tiff ... | {"hexsha": "f9fa273a40472d168b50f8a31905b6bd7ff217a9", "size": 2716, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/nuclei_segmentation/gpu_segmentation.py", "max_stars_repo_name": "PeterJackNaylor/CellularHeatmaps", "max_stars_repo_head_hexsha": "52829685683b6f3315b62246a77cc2206326e2b3", "max_stars_repo_l... |
# 행렬의 곱셈
import numpy as np
def solution(arr1, arr2):
arr1 = np.array(arr1)
arr2 = np.array(arr2)
answer = np.dot(arr1, arr2).tolist()
return answer
'''
채점을 시작합니다.
정확성 테스트
테스트 1 〉 통과 (0.53ms, 27.3MB)
테스트 2 〉 통과 (1.48ms, 28.2MB)
테스트 3 〉 통과 (2.45ms, 28.8MB)
테스트 4 〉 통과 (0.58ms, 27.8MB)
테스트 5 〉 통과 (1... | {"hexsha": "95916140909136a4508dd28688db1873244f22b4", "size": 1529, "ext": "py", "lang": "Python", "max_stars_repo_path": "Level2/Lessons12949/gamjapark.py", "max_stars_repo_name": "StudyForCoding/ProgrammersLevel", "max_stars_repo_head_hexsha": "dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25", "max_stars_repo_licenses": ["... |
import numpy as np
import pickle
import json
import os
from typing import Any, Dict, List, Tuple, NoReturn, NewType
from skfuzzy.cluster import cmeans
from skfuzzy.cluster import cmeans_predict
class FuzzyCMeans(object):
"""
object for fuzzy c-means clustering
-> based on skfuzzy.cluster
-> functions: cm... | {"hexsha": "f5593dd62a64ba9df45b0351fdf17f6ffa933f5f", "size": 4331, "ext": "py", "lang": "Python", "max_stars_repo_path": "clustering/util/fuzzy_cmeans.py", "max_stars_repo_name": "iag0g0mes/t2_fis_driving_style", "max_stars_repo_head_hexsha": "7f62ac3e67e65e7bd1273a2f845eb05820e95b70", "max_stars_repo_licenses": ["Ap... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 Elvis Yu-Jing Lin <elvisyjlin@gmail.com>
# Licensed under the MIT License - https://opensource.org/licenses/MIT
from . import config
from . import seleniumdriver
from .lf2exception import lf2raise
from .utils import png2rgb, rgb2gray, Recorder
impor... | {"hexsha": "f32698b087845a3a6e14ca69854ea016221a3bf4", "size": 22079, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/lf2environment.py", "max_stars_repo_name": "verystrongjoe/lf2gym", "max_stars_repo_head_hexsha": "5870c12f1825a23aa58216e622733ff61fb04e48", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
from __future__ import division
import numpy as np
from .fft import fftfreq, fft, ifft
try:
from accelerate.mkl.fftpack import fft, ifft
except ImportError:
try:
from pyfftw.interfaces.numpy_fft import fft, ifft
except ImportError:
from numpy.fft import fft, ifft
__authors__ = "Alex Bujan... | {"hexsha": "bffbda7fe4c08421212cf0fcca068a3b14e6896d", "size": 2345, "ext": "py", "lang": "Python", "max_stars_repo_path": "ecogvis/signal_processing/hilbert_transform.py", "max_stars_repo_name": "jgmakin/ecogVIS", "max_stars_repo_head_hexsha": "a3aeba07c5f967ad51455506820083548ecfa5d9", "max_stars_repo_licenses": ["BS... |
import argparse
import numpy as np
import tflite_runtime.interpreter as tflite
from PIL import Image
from semseg.utils.visualize import generate_palette
from semseg.utils.utils import timer
class Inference:
def __init__(self, model: str) -> None:
self.interpreter = tflite.Interpreter(model)
self.i... | {"hexsha": "1c6d59252323c83dbe392801407bac7bb24b072e", "size": 2720, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/tflite_infer.py", "max_stars_repo_name": "mediacatch/semantic-segmentation", "max_stars_repo_head_hexsha": "a4131f3b56bfbb0b02f50bcbd73aebb6f6b372e9", "max_stars_repo_licenses": ["MIT"], "... |
[STATEMENT]
lemma complement_down_closed_up_closed:
"down_closed x \<longleftrightarrow> up_closed (-x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. down_closed x = up_closed (- x)
[PROOF STEP]
using down_closed_def order.antisym mult_sub_right_one up_closed_def
[PROOF STATE]
proof (prove)
using this:
down_clos... | {"llama_tokens": 247, "file": "Correctness_Algebras_Boolean_Semirings", "length": 2} |
import xarray
import numpy as np
from numba import njit, prange
from math import sqrt
EUCLIDEAN = 0
GREAT_CIRCLE = 1
MANHATTAN = 2
NAN = np.nan
def _distance_metric_mapping():
DISTANCE_METRICS = {}
DISTANCE_METRICS['EUCLIDEAN'] = EUCLIDEAN
DISTANCE_METRICS['GREAT_CIRCLE'] = GREAT_CIRCLE
DISTANCE_MET... | {"hexsha": "020dc4c5d036a5c988b8db2c2cdd1d298725111a", "size": 12719, "ext": "py", "lang": "Python", "max_stars_repo_path": "datashader/spatial/proximity.py", "max_stars_repo_name": "tomwhite/datashader", "max_stars_repo_head_hexsha": "569520dc47493591ebdd058ab552e305420ac527", "max_stars_repo_licenses": ["BSD-3-Clause... |
************************************************************************
* INPUT.FOR *
* *
* PROGRAM: SIMRAND I *
* MODULE: 1.3 ... | {"hexsha": "641d16f3dcba6a63653a09a2879976f96287625b", "size": 5050, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "npo-16937/input.for", "max_stars_repo_name": "SteveDoyle2/nasa-cosmic", "max_stars_repo_head_hexsha": "c8015a9851a04f0483b978d92c2cbaee31c81fe3", "max_stars_repo_licenses": ["BSD-Source-Code"], ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu May 21 23:10:35 2020
@author: vik748
"""
from cmtpy.histogram_warping_ace import HistogramWarpingACE
from cmtpy import contrast_measurement as cm
import cv2
import numpy as np
import sys, os
from matplotlib import pyplot as plt
def calculate_best_scree... | {"hexsha": "f7d09f5b7ebe99486fc6346f42cc4dd24e19c233", "size": 7906, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyse_image_contrast.py", "max_stars_repo_name": "vik748/contrast_manipulation_toolbox", "max_stars_repo_head_hexsha": "ccf04cdf323e0cf16475a8873090fa87b5fdf6f3", "max_stars_repo_licenses": ["MI... |
# Copyright 2020 Forschungszentrum Jülich GmbH and Aix-Marseille Université
# "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0. "
"""
Mean field model based on Master equation about adaptative exponential leacky integr... | {"hexsha": "6f9a6a7ea8ffc13812fa508a09d73b39504ffabf", "size": 36265, "ext": "py", "lang": "Python", "max_stars_repo_path": "nest_elephant_tvb/Tvb/modify_tvb/Zerlaut.py", "max_stars_repo_name": "mfahdaz/TVB-NEST", "max_stars_repo_head_hexsha": "c16e18f41ff07b33482a55f4a033b8c698051c9a", "max_stars_repo_licenses": ["Apa... |
#!/usr/bin/env python3
# Common Imports
import rospy
import roslib
from harmoni_common_lib.constants import State, ActuatorNameSpace
from harmoni_common_lib.service_server import HarmoniServiceServer
from harmoni_common_lib.service_manager import HarmoniServiceManager
import harmoni_common_lib.helper_functions as hf
... | {"hexsha": "b959587e1341afed6ba72d21b8bb2271d0483bec", "size": 8564, "ext": "py", "lang": "Python", "max_stars_repo_path": "harmoni_actuators/harmoni_gesture/nodes/gesture_service.py", "max_stars_repo_name": "interaction-lab/HARMONI", "max_stars_repo_head_hexsha": "9c88019601a983a1739744919a95247a997d3bb1", "max_stars_... |
import cv2
import numpy as np
from synthetic_signs import utils
def adjust_brightness(image, multiply_value, add_value):
"""Adjust image brightness.
Args:
image (np.ndarray): Array of shape (H, W, ...) and dtype np.uint8 which
contains the image.
multiply_value (float | np.ndarray): Scalar scale f... | {"hexsha": "d1ba96bcb453ba840f5445fb51285d72c81c5f6c", "size": 10383, "ext": "py", "lang": "Python", "max_stars_repo_path": "synthetic_signs/augmentation.py", "max_stars_repo_name": "moabitcoin/signfeld", "max_stars_repo_head_hexsha": "55c56c707626261bf25f99e4c048492041098ea1", "max_stars_repo_licenses": ["MIT"], "max_... |
import numpy as np
import tensorflow as tf
HPARAMS_117M = {
"n_vocab": 50257,
"n_ctx": 1024,
"n_embd": 768,
"n_head": 12,
"n_layer": 12
}
HPARAMS_355M = {
"n_vocab": 50257,
"n_ctx": 1024,
"n_embd": 1024,
"n_head": 16,
"n_layer": 24
}
HPARAMS = {"117M": HPARAMS_117M,
"355M": HPARAMS_355... | {"hexsha": "9087d78cc92c7ec3bd41df2e58f3a426c179fe8d", "size": 12182, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/model_tf2.py", "max_stars_repo_name": "wenxichen/gpt-2", "max_stars_repo_head_hexsha": "8aa16dedf43fc8838c695bf18431c8b5bedeb9c6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "m... |
[GOAL]
X Y : TopCat
f : X ⟶ Y
⊢ Epi f ↔ Function.Surjective ↑f
[PROOFSTEP]
suffices Epi f ↔ Epi ((forget TopCat).map f)
by
rw [this, CategoryTheory.epi_iff_surjective]
rfl
[GOAL]
X Y : TopCat
f : X ⟶ Y
this : Epi f ↔ Epi ((forget TopCat).map f)
⊢ Epi f ↔ Function.Surjective ↑f
[PROOFSTEP]
rw [this, CategoryTheory... | {"mathlib_filename": "Mathlib.Topology.Category.TopCat.EpiMono", "llama_tokens": 876} |
# -*- coding: utf-8 -*-
# Copyright (c) 2017 The cableloss developers. All rights reserved.
# Project site: https://github.com/questrail/cableloss
# Use of this source code is governed by a MIT-style license that
# can be found in the LICENSE.txt file for the project.
"""Provide the cable loss for the specified cable t... | {"hexsha": "2e510408fd67ce4e348ac54a6ded42fd72ecc15f", "size": 3294, "ext": "py", "lang": "Python", "max_stars_repo_path": "cableloss.py", "max_stars_repo_name": "questrail/cableloss", "max_stars_repo_head_hexsha": "9b5907716020441e0c7cf005bfaa6b7f4c39166f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma... |
subroutine dscalf(n,da,dx,incx)
c
c scales a vector by a constant.
c uses unrolled loops for increment equal to one.
c jack dongarra, linpack, 3/11/78.
c modified 3/93 to return if incx .le. 0.
c modified 12/3/93, array(1) declarations changed to array(*)
c
double precision da,dx(*)
... | {"hexsha": "84d88987d2451cdef453d0ca57d985263a7517f0", "size": 1016, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "thirdparty/openblas/xianyi-OpenBLAS-e6e87a2/reference/dscalf.f", "max_stars_repo_name": "rozhuk-im/opentoonz", "max_stars_repo_head_hexsha": "ad5b632512746b97fd526aa79660fbaedf934fad", "max_stars_... |
import logging
import re, os
from westtools import WESTMasterCommand, WESTSubcommand
import numpy, h5py
from westpa import h5io, textio
import matplotlib
from matplotlib import pyplot
from matplotlib.image import NonUniformImage
from fasthist import normhistnd
from westpa.extloader import get_object
log = logging.get... | {"hexsha": "53f313bd61abbf8016662620f4cd0de13d9c1e6a", "size": 28588, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/west_tools/plothist.py", "max_stars_repo_name": "jeremyleung521/westpa", "max_stars_repo_head_hexsha": "5ce5b696a7bba8c9d2a8555015d2fb315ef87e5b", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import numpy as np
import pyopencl as cl
from xfields.contexts import XfPyopenclContext
context = XfPyopenclContext()
ctx = context.pyopencl_context
queue = context.command_queue
cla = context.nplike_lib
a_cont = cla.to_device(queue=context.command_queue,
ary=np.array([[1,2,3,4],[5,6,7,8],[9,10,11,12]], ord... | {"hexsha": "736f72e965d7c8359fb1c18d2785855787241baf", "size": 673, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/exploratory_scripts/004_pocl_contiguous/002_replacement_in_func.py", "max_stars_repo_name": "xbuffat/xfields", "max_stars_repo_head_hexsha": "2b51a544d0b15d98789fe4b14cf0104998607377", "ma... |
!___________________________________________________________________________
! --- material property libaray (matLIB.f90)
! --- most fits can be found in G. Manfreda, Review of ROXIE's Material Properties Database for Quench Simulation,
! --- CERN Internal Note: EDMS NR, vol. 1178007, 2018.
! --- distri... | {"hexsha": "b4e2e51a5227289a01488604859759f03c66dac3", "size": 13829, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "fortran_files/matLIB.f90", "max_stars_repo_name": "lnbrouwer/ANSYS_UEL", "max_stars_repo_head_hexsha": "e31ef0d25fb3556efe57847d01cff237efa6e503", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL... |
import os.path
import IMLearn.learners.regressors.linear_regression
from IMLearn.learners.regressors import PolynomialFitting
from IMLearn.utils import split_train_test
import numpy as np
import pandas as pd
import plotly.express as px
import plotly.io as pio
pio.templates.default = "simple_white"
from IMLearn.met... | {"hexsha": "79030c8e38c8d5bd7994b0e47923280d40e16904", "size": 4714, "ext": "py", "lang": "Python", "max_stars_repo_path": "exercises/city_temperature_prediction.py", "max_stars_repo_name": "noamwino/IML.HUJI", "max_stars_repo_head_hexsha": "0b1b6f333a16200fa7717af1be12e5f38694b74c", "max_stars_repo_licenses": ["MIT"],... |
/*
* This file is part of the CitizenFX project - http://citizen.re/
*
* See LICENSE and MENTIONS in the root of the source tree for information
* regarding licensing.
*/
#include "StdInc.h"
#include "HttpServer.h"
#include "HttpServerImpl.h"
#include "TLSServer.h"
#include <ctime>
#include <iomanip... | {"hexsha": "78f368365805f6230ca02078c72782265d224ada", "size": 5465, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "code/components/net-http-server/src/HttpServer.cpp", "max_stars_repo_name": "MyNameIsYesgo/fivem", "max_stars_repo_head_hexsha": "6def381fa0a992261a4414fae700c1c077e59327", "max_stars_repo_licenses"... |
# EqHeat.py : solves heat equation via finite differences , 3D plot
from numpy import *
import matplotlib.pylab as p
from mpl_toolkits.mplot3d import Axes3D
Nx = 101; Nt = 3000; Dx = 0.03; Dt = 0.9
KAPPA = 210.; SPH = 900.; RHO = 2700. # Conductivity , specf heat , density
T = zeros((N... | {"hexsha": "d0cd913ea6a77aaa392977218e01232679c48a5d", "size": 1678, "ext": "py", "lang": "Python", "max_stars_repo_path": "download/file.py", "max_stars_repo_name": "aglipthhau/userdyk-github.github.io", "max_stars_repo_head_hexsha": "e4ae15294fa0b95a03235ecfa5dc54b41774027a", "max_stars_repo_licenses": ["MIT"], "max_... |
[STATEMENT]
lemma rplusinf_uset:
assumes lp: "isrlfm p"
and nmi: "\<not> (Ifm (a # bs) (plusinf p))" (is "\<not> (Ifm (a # bs) (?M p))")
and ex: "Ifm (x # bs) p" (is "?I x p")
shows "\<exists>(s,m) \<in> set (uset p). x \<le> Inum (a#bs) s / real_of_int m"
(is "\<exists>(s,m) \<in> ?U p. x \<le> ?N a s ... | {"llama_tokens": 1975, "file": null, "length": 18} |
# Product Positioning of Movies (Python)
# prepare for Python version 3x features and functions
from __future__ import division, print_function
# import packages for multivariate analysis
import numpy as np # arrays and numerical processing
import scipy
import matplotlib.pyplot as plt # 2D plotting
# alternative d... | {"hexsha": "ec174c55c9b36fb0cfb965256425a25cd8f6ded1", "size": 2565, "ext": "py", "lang": "Python", "max_stars_repo_path": "Positioning Products/MDS_Exhibit_6_2.py", "max_stars_repo_name": "pbboxx/Model-predictif-marketing", "max_stars_repo_head_hexsha": "88bac903603b4aa3b4959ead024eae97d79aab6a", "max_stars_repo_licen... |
import numpy as np
one_dimensional_array = np.array([1.2, 2.4, 3.5, 4.7, 6.1, 7.2, 8.3, 9.5])
print(one_dimensional_array)
two_dimensional_array = np.array([[6, 5], [11, 7], [4, 8]])
print(two_dimensional_array)
sequence_of_integers = np.arange(5, 12)
print(sequence_of_integers)
random_integers_between_50_and_100 =... | {"hexsha": "46daaf4bd0162d05346f2a7a03c8eceed367e900", "size": 725, "ext": "py", "lang": "Python", "max_stars_repo_path": "NumpySample.py", "max_stars_repo_name": "AaronChuang/MachineLearningClasses", "max_stars_repo_head_hexsha": "53853eaeba8e736cf161aa8b347655b7120e1377", "max_stars_repo_licenses": ["MIT"], "max_star... |
import argparse
import re
import json
import multiprocessing
import itertools
import tqdm
import joblib
import numpy as np
from pathlib import Path
from sklearn import model_selection as sklearn_model_selection
METHOD_NAME, NUM = "METHODNAME", "NUM"
parser = argparse.ArgumentParser()
parser.add_argument("--data_dir"... | {"hexsha": "770167410d0bcac539e2ec8d4e82f02198499133", "size": 5396, "ext": "py", "lang": "Python", "max_stars_repo_path": "sub_modules/code2seq/Python150kExtractor/extract.py", "max_stars_repo_name": "SpirinEgor/code-transformer", "max_stars_repo_head_hexsha": "7fce7db040c91a5f2773d51e5f4f8bb30b1ac5ee", "max_stars_rep... |
import numpy as np
import torch
from crar.losses import compute_disambiguation
class TestDisambiguation:
def test_with_zero_1d(self):
a, b = torch.tensor([[0.0]]), torch.tensor([[0.0]])
expected = torch.exp(-5.0 * torch.tensor([[1e-3]]))
actual = compute_disambiguation(a, b)
assert... | {"hexsha": "fe21166c327996d85ab1826180438d1b8c41a9af", "size": 1613, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_losses.py", "max_stars_repo_name": "aayn/yarl", "max_stars_repo_head_hexsha": "c9204f86eed40d144fcc30cfdd716fd447c6a16e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_s... |
subroutine mega3d_inner_loop(action,node,lusefd,ctrl,
& nodhyb,nodhyboff,itp1,icr1,icontab,
& ieltary,ieltno,invmpary,ipvoloff,iplocvoloff,
& ipivoloffoff,itettyp,itetclr,itet,itetoff,xic
& ,yic,zic,nnodes,nelements,iedge,iedgeoff
& ... | {"hexsha": "91f529be19db761e54ed1f3ced66eedf3d119b1e", "size": 10616, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/mega3d_inner_loop.f", "max_stars_repo_name": "millerta/LaGriT-1", "max_stars_repo_head_hexsha": "511ef22f3b7e839c7e0484604cd7f6a2278ae6b9", "max_stars_repo_licenses": ["CNRI-Python"], "max_st... |
import argparse
import os
import sys
import numpy as np
import pdb
from tqdm import tqdm
import cv2
import glob
import numpy as np
from numpy import *
import matplotlib
#matplotlib.use("Agg")
#matplotlib.use("wx")
#matplotlib.use('tkagg')
import matplotlib.pyplot as plt
import scipy
from scipy.special import softmax
... | {"hexsha": "c9198e0d4a7f59edaf1c51c02c28b1c14841babd", "size": 8225, "ext": "py", "lang": "Python", "max_stars_repo_path": "F1_accuracy_rwi.py", "max_stars_repo_name": "TalalWasim/scene_text_segmentation", "max_stars_repo_head_hexsha": "ef687c3eea429e7e6cf7c8485111b08d4eea37d4", "max_stars_repo_licenses": ["MIT"], "max... |
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from a2c_ppo_acktr.model import DMPNet
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from a2... | {"hexsha": "14930497f2417616584872f46ec3afe77c013741", "size": 6570, "ext": "py", "lang": "Python", "max_stars_repo_path": "main_il.py", "max_stars_repo_name": "shikharbahl/neural-dynamic-policies", "max_stars_repo_head_hexsha": "6c8afe3b1d66850d76edb2bb7f401a0580c77d17", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# https://www.cnblogs.com/ssyfj/p/12913015.html
# https://www.jianshu.com/p/42b0b6ffcf97
import numpy as np
# 1-D array
a = np.array([1, 2, 3])
b = np.array([4, 5, 6])
print('result1 = a*b', a*b)
print('result2 = a@b' ,a@b)
# result1 = a@b [ 4 10 18]
# result2 = b@a 32
a = np.array([[1, 2, 3], [4, 5, 6]])
b = np.arr... | {"hexsha": "6a150fc01d96d09375bc58d48dabb267eb3ae8c5", "size": 950, "ext": "py", "lang": "Python", "max_stars_repo_path": "\u5b9e\u4f8b\u5b66\u4e60Numpy\u4e0eMatplotlib/np.dot(),np.outer(),np.multiply().py", "max_stars_repo_name": "shao1chuan/pythonbook", "max_stars_repo_head_hexsha": "cd9877d04e1e11422d38cc051e368d3d9... |
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors
import pickle
MHz = 2601.
Mcycle = 0.1
f = open('timeRecords/size_nsteps_lenTrank.txt','rb')
parameters = pickle.load(f)
f.close()
# load parameters
size = parameters[0]
nsteps = parameters[1]
lenTrank_body = 2+nsteps*4
# lenTrank_body = par... | {"hexsha": "fb8b8c7958f4626593842541a9fc7c0129976e43", "size": 3261, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualizer.py", "max_stars_repo_name": "moonbaby1023/HPC_final_project", "max_stars_repo_head_hexsha": "01fc52e0a3c3ffa86637a91ce6d51fc65e83839d", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
SUBROUTINE GSVIEW ( xllf, yllf, xurf, yurf, iret )
C************************************************************************
C* GSVIEW *
C* *
C* This subroutine sets the boundaries of the view region to be used *
C* to display the plot. The view region is specified using fractions *
C* of the availab... | {"hexsha": "f99caa77ffcff4ab3bb4e8dadad7ba5fed2ef0aa", "size": 2019, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/appl/bounds/gsview.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"],... |
// gauss_jordan.cpp : example program comparing float vs posit matrix inversion algorithms
//
// Copyright (C) 2017-2019 Stillwater Supercomputing, Inc.
//
// This file is part of the HPR-BLAS project, which is released under an MIT Open Source license.
//#include <chrono>
// Boost arbitrary precision floats
#include ... | {"hexsha": "898d4eb174fa1e0d3cafdd24cde4cdbc8eaa46a9", "size": 4887, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "solvers/gauss_jordan.cpp", "max_stars_repo_name": "fossabot/hpr-blas", "max_stars_repo_head_hexsha": "dad4656f556ea62abddbf3ddbb712d6b77fe7e91", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json
import os
import argparse
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy.cluster.hierarchy import dendrogram
from scipy.cluster.hierarchy import linkage
from scipy... | {"hexsha": "ec04d9d9608b0dca6e63a49823e1d1ed471a8362", "size": 7155, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyze_dataset.py", "max_stars_repo_name": "CandyDong/11747-A4", "max_stars_repo_head_hexsha": "a0952f4d6f62683b57c8bba9caabc955fb9ca40e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co... |
import networkx as nx
import numpy as np
import scipy.sparse as sps
class GraphLoader():
def __init__(self, path):
super(GraphLoader, self).__init__()
self.path = path
def load_graph(self, file):
return nx.read_weighted_edgelist(self.path + "edges" + str(file) +".csv", delimiter=',', n... | {"hexsha": "08e6f16f7d9b828a0c243a1e4186bdfbcd0c95d4", "size": 888, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/dataset/GraphLoader.py", "max_stars_repo_name": "stefanosantaris/DynVGAE", "max_stars_repo_head_hexsha": "79e5a3aca6c0d3ce8bd2e08cc90e7ec7a77f629d", "max_stars_repo_licenses": ["Apache-2.0"],... |
Require Import XR_Rmin.
Require Import XR_Rle_dec.
Require Import XR_Rle_trans.
Require Import XR_Rnot_le_lt.
Local Open Scope R_scope.
Lemma Rle_min_compat_l : forall x y z, x <= y -> Rmin z x <= Rmin z y.
Proof.
intros x y z.
intro h.
unfold Rmin.
destruct (Rle_dec z x) as [ hminxl | hminxr ] ;
destruct (... | {"author": "xavierdpt", "repo": "research", "sha": "de47f996cbb40312e21057fa343ed8346f8cb39f", "save_path": "github-repos/coq/xavierdpt-research", "path": "github-repos/coq/xavierdpt-research/research-de47f996cbb40312e21057fa343ed8346f8cb39f/coq/XReals/XR_Rle_min_compat_l.v"} |
%--- help for format_transition_probabilities ---
%
% INTERNAL FUNCTION
%
% | {"author": "jmaih", "repo": "RISE_toolbox", "sha": "1b2edfa27830c6d522f9d7d2335d33c3e4d84285", "save_path": "github-repos/MATLAB/jmaih-RISE_toolbox", "path": "github-repos/MATLAB/jmaih-RISE_toolbox/RISE_toolbox-1b2edfa27830c6d522f9d7d2335d33c3e4d84285/classes/models/@abstvar/format_transition_probabilities.m"} |
[STATEMENT]
lemma adj_cancel_eq1:
fixes f :: "'a::preorder \<Rightarrow> 'b::order"
shows "f \<stileturn> g \<Longrightarrow> f \<circ> g \<circ> f = f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. f \<stileturn> g \<Longrightarrow> f \<circ> g \<circ> f = f
[PROOF STEP]
unfolding adj_def comp_def fun_eq_iff
... | {"llama_tokens": 215, "file": "Order_Lattice_Props_Galois_Connections", "length": 2} |
# Over Under Game
def overUnder():
import random
print("TODO overUnder")
#Code Here and delete TODO
#Math Problem Simulator
def mathGame():
import random
print("TODO mathGame")
#Code Here and delete TODO
def changeMaker():
print("TODO changeMaker")
#Code Here and delete TODO
d... | {"hexsha": "6fdb6007c94bd143cf56a07b01fb67d730654470", "size": 477, "ext": "py", "lang": "Python", "max_stars_repo_path": "Projects/template.py", "max_stars_repo_name": "bgrose/TeachingPython", "max_stars_repo_head_hexsha": "206cefe9056fc2e6efb35749aee3fefa6ec747fd", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
# pylint: disable=no-member
# pylint: disable=too-many-branches
# pylint: disable=invalid-name
# pylint: disable=no-else-return
"""The 'utils' module implements types, and function to support data processing
utilities. THe types, which it implements are,
DataLoader: Serves the data to training epochs in smaller rand... | {"hexsha": "cda8b4600ee0a503e3cb6dc71302c1041237c0c8", "size": 18721, "ext": "py", "lang": "Python", "max_stars_repo_path": "dl/data/utils.py", "max_stars_repo_name": "sarkarchandan/nn-binary-classification", "max_stars_repo_head_hexsha": "c8a0a865d1775d0d988d3cad52ab0ede5be7d03f", "max_stars_repo_licenses": ["MIT"], "... |
# Automatically generated using Clang.jl wrap_c, version 0.0.0
using Compat
const Expat_INCLUDED = 1
const Expat_External_INCLUDED = 1
# Skipping MacroDefinition: XMLPARSEAPI ( type ) XMLIMPORT type XMLCALL
# Skipping MacroDefinition: XML_TRUE ( ( XML_Bool ) 1 )
# Skipping MacroDefinition: XML_FALSE ( ( XML_Bool ) 0... | {"hexsha": "35e9d8afc862ee0ac86a1ac93dbefb74824cc209", "size": 6306, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "jlnext/src/xml/libexpat/common.jl", "max_stars_repo_name": "rbt-lang/rbt-proto", "max_stars_repo_head_hexsha": "fe621af6bb5bb57f4bb474eefcc21975c34f4497", "max_stars_repo_licenses": ["Apache-2.0", ... |
[STATEMENT]
lemma step_pendingFReqs_\<phi>:
assumes "step s a = (ou, s')"
and "(UID1 \<in>\<in> pendingFReqs s UID2) \<noteq> (UID1 \<in>\<in> pendingFReqs s' UID2)
\<or> (UID2 \<in>\<in> pendingFReqs s UID1) \<noteq> (UID2 \<in>\<in> pendingFReqs s' UID1)"
shows "\<phi> (Trans s a ou s')"
[PROOF STATE]
proof (prove... | {"llama_tokens": 8492, "file": "CoSMed_Friend_Request_Confidentiality_Friend_Request_Value_Setup", "length": 26} |
'''
Nieve modeling of motion data
'''
import numpy as np
import tensorflow as tf
from tensorflow import keras
import time
OutsSeq = np.load('data/OutsSeqRnn.npy')
InsSeq = np.load('data/InsSeqRnn.npy')
#for i in range(1000):
# print(InsSeq[i, :, :])
# last value in the series
batch_size = OutsSeq.shape[0]
nsteps =... | {"hexsha": "5dcf8ccd579741f47d138b131f1192712775173d", "size": 2023, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/bdbd/src/bdbd/analysis/motion/rnn.py", "max_stars_repo_name": "rkent/BDBD", "max_stars_repo_head_hexsha": "c5d391da84faf5607c443078781f8b4e1c017dd5", "max_stars_repo_licenses": ["MIT"], "max_s... |
import time
import matplotlib.pyplot as plt
import numpy as np
class PID_Control():
"""
Class implemented a simple PID controller
"""
def __init__(self,Kp, Ki, Kd, target = 0):
self.Kp = Kp
self.Ki = Ki
self.Kd = Kd
self.error = 0 # Current Error
self.e... | {"hexsha": "df08d8aea4523484c1a3768b9a0636e11a1f800c", "size": 1055, "ext": "py", "lang": "Python", "max_stars_repo_path": "PID/PID.py", "max_stars_repo_name": "NourS-d/Random", "max_stars_repo_head_hexsha": "3f2c82dc05abc429c14afa52e46a0aa20301151f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st... |
[STATEMENT]
lemma must_lock_d_eq_must_lock:
"\<lbrakk> wf_jvm_prog\<^bsub>\<Phi>\<^esub> P; \<Phi> \<turnstile> t: (xcp, h, frs) \<surd> \<rbrakk>
\<Longrightarrow> execd_mthr.must_sync P t (xcp, frs) h = exec_mthr.must_sync P t (xcp, frs) h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>wf_jvm_prog\<^... | {"llama_tokens": 2094, "file": "JinjaThreads_BV_JVMDeadlocked", "length": 10} |
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\section*{Declaration of interests}
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
\end{document}
| {"hexsha": "c01213161f932658e0a879cbc849356fce380fc5", "size": 295, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/declaration/declaration.tex", "max_stars_repo_name": "jstr0em/sorption-vapor-intrusion", "max_stars_repo_head_hexsha": "181d46c8f6fee50c865c485b2559d32a118cd8de", "max_stars_repo_licenses": ["MI... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy.io import fits
from astropy.modeling import models
from astropy.units.quantity import Quantity
import astropy.units as u
from astropy.wcs import WCS
from astropy.tests.helper import catch_warnings
from astropy.utils.excepti... | {"hexsha": "8a56c4734d96dfc719964a13e3c0deee6eba1d5d", "size": 42682, "ext": "py", "lang": "Python", "max_stars_repo_path": "ccdproc/tests/test_ccdproc.py", "max_stars_repo_name": "Yash-10/ccdproc", "max_stars_repo_head_hexsha": "6ee2f6763425827e646e84171234fb08e607506e", "max_stars_repo_licenses": ["BSD-3-Clause"], "m... |
[STATEMENT]
lemma has_contour_integral_div:
"(f has_contour_integral i) g \<Longrightarrow> ((\<lambda>x. f x/c) has_contour_integral (i/c)) g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (f has_contour_integral i) g \<Longrightarrow> ((\<lambda>x. f x / c) has_contour_integral i / c) g
[PROOF STEP]
by (simp ad... | {"llama_tokens": 162, "file": null, "length": 1} |
import numpy as np
from ..constants import log
from .. import util
def load_wavefront(file_obj, **kwargs):
"""
Loads an ascii Wavefront OBJ file_obj into kwargs
for the Trimesh constructor.
Vertices with the same position but different normals or uvs
are split into multiple vertices.
Colors... | {"hexsha": "ed4c66413e060ef67304116762f4e8eb975e896d", "size": 8712, "ext": "py", "lang": "Python", "max_stars_repo_path": "trimesh/io/wavefront.py", "max_stars_repo_name": "hroncok/trimesh", "max_stars_repo_head_hexsha": "85c6af12f8bfdf7d3e6c0b8fa553142a9d4219fe", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
# --------------------------------------------------------
# Faster R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick and Sean Bell
# --------------------------------------------------------
import os
import yaml
from model.config import cfg
impo... | {"hexsha": "e6a57ef16dedaf74e608bb6c87575d30ae6d6b38", "size": 4048, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/nets/edge_box_layer_tf.py", "max_stars_repo_name": "jichilen/frcon", "max_stars_repo_head_hexsha": "f8646d39eae2fc648c7359aed63e89c85fee81d6", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
"""Utility functions and data handling for the shared task."""
from lingpy import *
from lingpy.evaluate.acd import _get_bcubed_score as bcubed_score
from pathlib import Path
from git import Repo
from lingpy.compare.partial import Partial
import argparse
from collections import defaultdict
import random
import network... | {"hexsha": "708aa44aa624137c67f7f748015bfe8612bf7864", "size": 32054, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sigtypst2022.py", "max_stars_repo_name": "sigtyp/ST2022", "max_stars_repo_head_hexsha": "03094435cba4293ce0eea383036cab78499ad50d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "... |
# -----------------------------------------------------------------------------
# VSOM (Voronoidal Self Organized Map)
# Copyright (c) 2019 Nicolas P. Rougier
#
# Distributed under the terms of the BSD License.
# -----------------------------------------------------------------------------
import numpy as np
import mat... | {"hexsha": "168254038d0b9d121f8aa4642ce1288e0aaa001c", "size": 5367, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot.py", "max_stars_repo_name": "rougier/VSOM", "max_stars_repo_head_hexsha": "78e6eb924b5f89a0e6f42eb6bbe7971473a9abaa", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 17, "max_... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 14 19:52:21 2020
@author: Sevans
Useful and user-friendly/convenient codes for making matplotlib plots.
See https://github.com/Sevans711/PythonQOL/wiki
(the sections about QOL.plots) for more help.
In documentation, this file is referred to as pq... | {"hexsha": "30eef28bb255344a3359c566d1fbd73cc850d888", "size": 89366, "ext": "py", "lang": "Python", "max_stars_repo_path": "QOL/plots.py", "max_stars_repo_name": "Sevans711/PythonQOL", "max_stars_repo_head_hexsha": "430d56b91f9cf38e8c4b6f8188eb31008d25d323", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
from datetime import time
import napari
import numpy as np
import os
from numpy.core.numeric import full
from numpy.random import sample
import pandas as pd
from pathlib import Path
def add_track_data(sv):
viewer = sv.v
sample = sv.sample
pair = sv.pairs[sv._i]
layer_names = [l.name for l in viewer.l... | {"hexsha": "437f6df3f79b00b19128ba7b15545fe5875c3110", "size": 18753, "ext": "py", "lang": "Python", "max_stars_repo_path": "annotrack/annotation.py", "max_stars_repo_name": "AbigailMcGovern/annotrack", "max_stars_repo_head_hexsha": "2dd5c807ade43861bccf2910eb8200e614fde524", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
import numpy as np
from sklearn import tree
from classCharbon import CharbonTree
from classQuery import *
from classRedescription import *
import pdb
#########################################################################
################# from trees_m2
##########################################################... | {"hexsha": "fe3b801ab80d4202fa8cd5f8d1117a20c3b42f96", "size": 18693, "ext": "py", "lang": "Python", "max_stars_repo_path": "python-siren/siren/reremi/classCharbonTLayer.py", "max_stars_repo_name": "zliobaite/redescription-China", "max_stars_repo_head_hexsha": "cab8ee08f21a0207bed5b48fd3493a3909d2a5ad", "max_stars_repo... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | {"hexsha": "89f68dacbd3ff2e578cd4667e111dc238c1068e4", "size": 13011, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/python/relay/test_conv2d_nchw_texture.py", "max_stars_repo_name": "psrivas2/relax", "max_stars_repo_head_hexsha": "4329af78eb1dc4c4ff8a61d3bf39aa4034e9cb2a", "max_stars_repo_licenses": ["Ap... |
unpack(v::StaticVector{2}) = @inbounds return v[1], v[2]
@inline function cross2(v1::StaticVector{2}, v2::StaticVector{2})
x1, y1 = unpack(v1)
x2, y2 = unpack(v2)
x1 * y2 - x2 * y1
end
normsquared(x) = sum(y -> y^2, x)
| {"hexsha": "137d7b87350a819cf653016090cd043df272f8f4", "size": 233, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/util.jl", "max_stars_repo_name": "zygmuntszpak/PlanarConvexHulls.jl", "max_stars_repo_head_hexsha": "01b8d17e45754725188c0be6744f34ed6fc9ccf7", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
#include <iostream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <AppConfig.hpp>
#include <Signals.hpp>
#include <CommandLineOperation.hpp>
#include <TokenDatabase.hpp>
#include <StdinEchoMode.hpp>
#include <sago/platform_folders.h>
#include <boost/filesystem.hpp>
#if !defined(OS_WINDOWS)
// gr... | {"hexsha": "3137d51a1743fbbc97a9e81b0a801e43aff286d8", "size": 3538, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Source/Cli/main.cpp", "max_stars_repo_name": "SCOTT-HAMILTON/OTPGen", "max_stars_repo_head_hexsha": "706ba9a3546abddc1d1eb8f4edac710fe35a0b22", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star... |
import pytest
import numpy as np
from src.eval import metrics
def test_ndcg_k_is_zero():
relevant = [1, 2, 3]
relevancy_scores = [2, 2, 1]
predicted = [1, 3, 2]
with pytest.raises(Exception):
metrics.ndcg_k(relevant=relevant, relevancy_scores=relevancy_scores, predicted=predicted, k=0)
def ... | {"hexsha": "29d000fda622bebc34f27598ee1460fd46314d97", "size": 4353, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/metrics/test_ndcg.py", "max_stars_repo_name": "rootsdev/nama", "max_stars_repo_head_hexsha": "1210a24e8ee7689619e800653bd11341d667462d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import numpy as np
import pandas as pd
from sklearn import metrics
import os
import sys
import pickle
import argparse
import logging
import time
logger = logging.getLogger(__name__)
from benchmark_mining.methods import Mining
from benchmark_mining.metrics import compute_metrics
from benchmark_mining.utils import load_... | {"hexsha": "71c478dc0bb341d95030ddcfdee76d1c74d92200", "size": 6246, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/run_methods/run_mining.py", "max_stars_repo_name": "VIGS25/benchmark_mining", "max_stars_repo_head_hexsha": "529233a56374365fbd68518ecc21635a812b8784", "max_stars_repo_licenses": ["MIT"], "max... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lic... | {"hexsha": "77b05768eaec5e468bc6a7fe65342259cd4c9113", "size": 4391, "ext": "py", "lang": "Python", "max_stars_repo_path": "ST_DM/KDD2021-MSTPAC/code/ST-PAC/utils/common_lib.py", "max_stars_repo_name": "zhangyimi/Research", "max_stars_repo_head_hexsha": "866f91d9774a38d205d6e9a3b1ee6293748261b3", "max_stars_repo_licens... |
import numpy as np
from copy import deepcopy
from math import sqrt, log
from random import choice
class Node:
def __init__(self, env, state):
self.env = deepcopy(env)
self.state = state
self.total_value = 0
self.visit_times = 0
self.parent = None
self.c... | {"hexsha": "c0c5b784a1efb97dac18f73435f17b42421accea", "size": 1469, "ext": "py", "lang": "Python", "max_stars_repo_path": "node.py", "max_stars_repo_name": "tom99763/Monte-Carlo-Tree-Search-on-Tic-Tac-Toe", "max_stars_repo_head_hexsha": "d99dfb1cc96decf47a9dcab4d8327d05ad197819", "max_stars_repo_licenses": ["MIT"], "m... |
subroutine middledk(q,ymiddle)
implicit none
include 'constants.f'
include 'zprods_decl.f'
include 'poles.f'
include 'alpha1.f'
include 'masses.f'
include 'scale.f'
include 'zcouple.f'
include 'decl_kininv.f'
include 'nwz.f'
integer j3,k1,k2,ep
... | {"hexsha": "13dff815377f5105fddbe233154894c20aa4a475", "size": 5104, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MCFM-JHUGen/src/SingletopZ/middledk.f", "max_stars_repo_name": "tmartini/JHUGen", "max_stars_repo_head_hexsha": "80da31668d7b7eb5b02bb4cac435562c45075d24", "max_stars_repo_licenses": ["Apache-2.0"... |
! =============================================================================
! Test ellipse multi merge
!
! This unit test checks the merging of three ellipses. The biggest
! ellipse is located at the origin. The smaller ellipses are located
! tangentially at 45 and 225 ... | {"hexsha": "28fff3abf6f0776e43c92fec0ab2ffe4f6db3f61", "size": 4122, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "unit-tests/2d/test_ellipse_merge_2.f90", "max_stars_repo_name": "matt-frey/epic", "max_stars_repo_head_hexsha": "954ebc44f2c041eee98bd14e22a85540a0c6c4bb", "max_stars_repo_licenses": ["BSD-3-Cla... |
from pathlib import Path
import xarray
from numpy import datetime64
from pytest import approx
import reesaurora as ra
R = Path(__file__).resolve().parents[1]
def test_reesiono():
minalt = 90
nalt = 286
isotropic = False
glat = 65.0
glon = -148.0
t = "2013-03-31T12:00:00" # datetime(2013,3,3... | {"hexsha": "8270544a521df3416daa42eb2c49c7ea50a03826", "size": 981, "ext": "py", "lang": "Python", "max_stars_repo_path": "reesaurora/tests/test_all.py", "max_stars_repo_name": "space-physics/reesaurora", "max_stars_repo_head_hexsha": "f209bb35dbaf62d191f9eb32e7611d85f232e383", "max_stars_repo_licenses": ["Apache-2.0"]... |
(* Title: ZF/Constructible/DPow_absolute.thy
Author: Lawrence C Paulson, Cambridge University Computer Laboratory
*)
section \<open>Absoluteness for the Definable Powerset Function\<close>
theory DPow_absolute imports Satisfies_absolute begin
subsection\<open>Preliminary Internalizations\<close>
sub... | {"author": "SEL4PROJ", "repo": "jormungand", "sha": "bad97f9817b4034cd705cd295a1f86af880a7631", "save_path": "github-repos/isabelle/SEL4PROJ-jormungand", "path": "github-repos/isabelle/SEL4PROJ-jormungand/jormungand-bad97f9817b4034cd705cd295a1f86af880a7631/case_study/isabelle/src/ZF/Constructible/DPow_absolute.thy"} |
import os
import numpy as np
import glob
from lxml import etree
from plateaupy.plutils import *
def scan_codelists( dir_codelists ):
gmlDict = dict()
for filename in glob.glob( dir_codelists + '/*.xml' ):
tree = etree.parse(filename)
root = tree.getroot()
# gml:name
vals = tree.xpath('/gml:Dictionary/gml:nam... | {"hexsha": "cc40b7e9b391ce27cd4c6a25812659006428fbdc", "size": 789, "ext": "py", "lang": "Python", "max_stars_repo_path": "plateaupy/plcodelists.py", "max_stars_repo_name": "kohakurei/plateaupy", "max_stars_repo_head_hexsha": "b72a59d204adc09a4a28809a24903e06aedc1ca3", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import matplotlib.pyplot as plt
import numpy as np
# Punti
x, y = np.loadtxt("punti.dat", unpack=True)
plt.plot(x, y, "o")
# Funzione logistica
P = 20
t0 = 10
t = np.linspace(-29, 40, 200)
f = lambda k: P / (1 + np.exp(-k * (t - t0)))
k = 0.25
plt.plot(t, f(k), label="k = 1 / 4")
k = 0.5
plt.plot(t, f(k), label="k... | {"hexsha": "8e29ecdf4fe14abb539349ccf4398ca0b2457b13", "size": 447, "ext": "py", "lang": "Python", "max_stars_repo_path": "LabCalc/Ex01/logistica.py", "max_stars_repo_name": "giuuliorusso/uni-physics", "max_stars_repo_head_hexsha": "11939b34cb09ca579d9e45fa224b23db0fb7e4f9", "max_stars_repo_licenses": ["MIT"], "max_sta... |
#=
Contents: Constructors for ConnectionPool instances.
=#
type ConnectionPool
connection_prototype # A disconnected instance of the connection
target_pool_size::Int64 # Target number of connections in the pool
peak_size::Int64 # Peak number of connections in the pool
unoccupie... | {"hexsha": "093b1034de551dd6f0343a202f4270b8bf8be543", "size": 1565, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/constructors.jl", "max_stars_repo_name": "JuliaPackageMirrors/ConnectionPools.jl", "max_stars_repo_head_hexsha": "bf0d4e4a7b82f6c66a0df022bde0d450402521d6", "max_stars_repo_licenses": ["MIT"], ... |
{-# OPTIONS --safe #-}
{-
This uses ideas from Floris van Doorn's phd thesis and the code in
https://github.com/cmu-phil/Spectral/blob/master/spectrum/basic.hlean
-}
module Cubical.Homotopy.Spectrum where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Unit.Pointed
open import Cubical.Foundations.... | {"hexsha": "bd628ac6c27102b00637821fcfac09513b387f60", "size": 651, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Cubical/Homotopy/Spectrum.agda", "max_stars_repo_name": "thomas-lamiaux/cubical", "max_stars_repo_head_hexsha": "58c0b83bb0fed0dc683f3d29b1709effe51c1689", "max_stars_repo_licenses": ["MIT"], "max_... |
[STATEMENT]
lemma continuous_map_into_fulltopology:
"continuous_map X (subtopology X' T) f \<Longrightarrow> continuous_map X X' f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. continuous_map X (subtopology X' T) f \<Longrightarrow> continuous_map X X' f
[PROOF STEP]
by (auto simp: continuous_map_in_subtopology... | {"llama_tokens": 115, "file": null, "length": 1} |
# Из заданного множества точек на плоскости выбрать две различные точки так,
# чтобы количества точек, лежащих по разные стороны прямой, проходящей через
# эти две точки, различались наименьшим образом.
import matplotlib.pyplot as plt
from mailcap import show
import numpy as np
def is_float(x):
dot = 0
... | {"hexsha": "12dc29894bdebe509378a4f0dd03990565051051", "size": 3197, "ext": "py", "lang": "Python", "max_stars_repo_path": "First course/1st semester/END!))))).py", "max_stars_repo_name": "tekcellat/University", "max_stars_repo_head_hexsha": "9a0196a45c9cf33ac58018d636c3e4857eba0330", "max_stars_repo_licenses": ["MIT"]... |
function y = iterapp(op,afun,atype,afcnstr,x,varargin)
%ITERAPP Apply matrix operator to vector and error gracefully.
% ITERAPP(OP,AFUN,ATYPE,AFCNSTR,X) applies matrix operator AFUN to vector
% X. If ATYPE is 'matrix, then AFUN is a matrix and the OP is applied
% directly. OP is either 'mtimes' or 'mldivide'.
%... | {"author": "he010103", "repo": "CFWCR", "sha": "c6a30234dd6448cef954b8b38f518fa8047c4850", "save_path": "github-repos/MATLAB/he010103-CFWCR", "path": "github-repos/MATLAB/he010103-CFWCR/CFWCR-c6a30234dd6448cef954b8b38f518fa8047c4850/implementation/conjugate_gradient/iterapp.m"} |
import cv2
from keras.models import load_model
import numpy as np
#queue
from collections import deque
model1=load_model("devanagari.h5")
print(model1)
letter_count={0:'CHECK',1: '01_ka', 2: '02_kha', 3: '03_ga', 4: '04_gha', 5: '05_kna', 6: 'character_06_cha',
7: '07_chha', 8: '08_ja', 9: '... | {"hexsha": "5c4b58935da74ba13c4f28839c13293b186627f3", "size": 3981, "ext": "py", "lang": "Python", "max_stars_repo_path": "Application Class.py", "max_stars_repo_name": "Aman02-github/Hindi_Handwriting_Recognition", "max_stars_repo_head_hexsha": "45dd17672c164c0725a0b81e9825adc76e5b7523", "max_stars_repo_licenses": ["... |
import time
import numpy as np
import torch
from torch import nn
from torch.nn import functional as F
from utilities.attention import MultiHeadAttention
from utilities.set_transformer import SetTransformer
from .blocks_core_scoffv2 import BlocksCore
import matplotlib.pyplot as plt
from utilities.invariant_modules impor... | {"hexsha": "1896908a6e8f09fd700cbffbfaeceecacdf87b30", "size": 11926, "ext": "py", "lang": "Python", "max_stars_repo_path": "modular_dynamics/SCOFFv2/rnn_models_scoffv2.py", "max_stars_repo_name": "dido1998/CausalMBRL", "max_stars_repo_head_hexsha": "2c595988b06b3d568fdde53213029e97841acb03", "max_stars_repo_licenses":... |
\section{Major external technologies}
\textbf{Model View Controller}
We decided to implement our project following the Model View Presenter (MVP) pattern.
%The most important advantage of MVC is that it separates logic from the program's views. It's really helpful to use an architecture that utilizes a controller ... | {"hexsha": "8ba7337e8a49e350111c476bf48e03b967c7b2f4", "size": 3882, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "SE deliverables/emergent architecture/report/sections/external_technologies.tex", "max_stars_repo_name": "HansSchouten/Aircraft-Trajectories", "max_stars_repo_head_hexsha": "5c301b806b5377813c140308... |
(*************************************************************************
* Copyright (C)
* 2019-2023 The University of Exeter
* 2018-2023 The University of Paris-Saclay
* 2018 The University of Sheffield
*
* License:
* This program can be redistributed and/or ... | {"author": "logicalhacking", "repo": "Isabelle_DOF", "sha": "07444efd2168aac992471259f3cd958bde777ea6", "save_path": "github-repos/isabelle/logicalhacking-Isabelle_DOF", "path": "github-repos/isabelle/logicalhacking-Isabelle_DOF/Isabelle_DOF-07444efd2168aac992471259f3cd958bde777ea6/Isabelle_DOF-Unit-Tests/Concept_OntoR... |
#!/usr/bin/env python3
import functools
import os
import os.path
import shutil
import cachetools.func
import cv2
import h5py
import numpy as np
import boxlib
import data.muco
import improc
import matlabfile
import paths
import util
matloader = functools.lru_cache(8192)(matlabfile.load)
def main():
composite_fr... | {"hexsha": "2e8e420442ffdf3c130d81048bca2f5c12239fec", "size": 8905, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset_preparation/postprocess_muco.py", "max_stars_repo_name": "BarqueroGerman/metrabs", "max_stars_repo_head_hexsha": "886cb1ea6eef530d350554376fe5efae329f22cd", "max_stars_repo_licenses": ["MI... |
[STATEMENT]
lemma fst_cs_changed_by_recv_recording:
assumes
step: "c \<turnstile> ev \<mapsto> c'" and
"fst (cs c cid) \<noteq> fst (cs c' cid)" and
"channel cid = Some (p, q)"
shows
"snd (cs c cid) = Recording \<and> (\<exists>p q u u' m. ev = Recv cid q p u u' m)"
[PROOF STATE]
proof (prove)
goal ... | {"llama_tokens": 7836, "file": "Chandy_Lamport_Distributed_System", "length": 68} |
"""
Validation of the model predictions by making H-R diagram plots.
"""
import numpy as np
import matplotlib.pyplot as plt
import velociraptor
from matplotlib.colors import LogNorm
from matplotlib.ticker import MaxNLocator
from astropy.table import Table
sources = Table.read("data/rv-all.fits")
is_binary = sourc... | {"hexsha": "2d89de147e41daaad2b7f2532a4e75c4f5e4f7c7", "size": 1780, "ext": "py", "lang": "Python", "max_stars_repo_path": "attic/validation_hrd.py", "max_stars_repo_name": "andycasey/velociraptor", "max_stars_repo_head_hexsha": "4c3f2cc0421f38fb5de7bb88f3c7bd4e9aa7d6d4", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
/**
* @file clean_shared_memory.cpp
* @author Vincent Berenz
* @license License BSD-3-Clause
* @copyright Copyright (c) 2019, New York University and Max Planck
* Gesellschaft.
* @date 2019-05-22
*
* @brief Clean the shared memory of the benchmark, the unnittests, ...
*/
#include <boost/interprocess/managed_s... | {"hexsha": "ec0eef56d74c1c6cc4dae12c44f81b1e0cf72c91", "size": 689, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "benchmarks/clean_shared_memory.cpp", "max_stars_repo_name": "MaximilienNaveau/shared_memory", "max_stars_repo_head_hexsha": "1440454759cdd19e0d898753d86b8714c1aefa84", "max_stars_repo_licenses": ["BS... |
import sys
import pkg_resources
from parselmouth import PraatError
from parselmouth.praat import run_file
import pandas as pd
import numpy as np
from scipy.stats import binom
from scipy.stats import ks_2samp
from scipy.stats import ttest_ind
import os
def get_praat_script_path():
return pkg_resou... | {"hexsha": "d57912dfc20be5d5b46b91c73e8588530aedf8a1", "size": 9327, "ext": "py", "lang": "Python", "max_stars_repo_path": "my-voice-analysis/__init__.py", "max_stars_repo_name": "paul0warren/my-voice-analysis", "max_stars_repo_head_hexsha": "8715dc4a18b265c46fdc3499a17d189f6a81920f", "max_stars_repo_licenses": ["MIT"]... |
[STATEMENT]
lemma prec_specD:
assumes "precise R"
assumes "prec_spec h (R a p) (R a' p)"
shows "a=a'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. a = a'
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
precise R
prec_spec h (R a p) (R a' p)
goal (1 subgoal):
1. a = a'
[PROOF STEP]
un... | {"llama_tokens": 277, "file": "Refine_Imperative_HOL_Sepref_Tool", "length": 3} |
/*
* SequenceSet.h
*
* Created on: Sep 6, 2015
* Author: CarstenK
* Email: CarstenK[@]posteo.de
* Copyright: 2015
*
* The MIT License (MIT)
*
* Copyright (c) 2015 Carsten Kemena
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated docum... | {"hexsha": "332fe838409f459b1200d11a3f44d8e92f1950a2", "size": 6425, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/lib/seq/SequenceSet.hpp", "max_stars_repo_name": "CarstenK/BioBundle", "max_stars_repo_head_hexsha": "31103a2f01b1ba02163dffafba1b71edb41ebdae", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.