text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
'''
Created on Oct 25, 2018
@author: Michal.Busta at gmail.com
'''
import math
import numpy as np
import torch
import torch.nn.functional as F
import cv2
import net_utils
def print_seq_ext(wf, codec):
prev = 0
word = ''
current_word = ''
start_pos = 0
end_pos = 0
dec_splits = []
splits = []
hasLet... | {"hexsha": "e82381077cf054615bbe0119876bcda58bb932cc", "size": 3811, "ext": "py", "lang": "Python", "max_stars_repo_path": "ocr_utils.py", "max_stars_repo_name": "falimoradi/E2E-MLT", "max_stars_repo_head_hexsha": "f14111238cc941a0d3411b00c72e58347229ba8d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
//==================================================================================================
/*!
@file
@copyright 2016 NumScale SAS
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
//===========================... | {"hexsha": "593ca8ff7616bc9f8ff8c5fa778150dd954d7ad5", "size": 1111, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "third_party/boost/simd/function/exponentbits.hpp", "max_stars_repo_name": "xmar/pythran", "max_stars_repo_head_hexsha": "dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592", "max_stars_repo_licenses": ["BSD-3... |
% LLNCStmpl.tex
% Template file to use for LLNCS papers prepared in LaTeX
%websites for more information: http://www.springer.com
%http://www.springer.com/lncs
\documentclass{llncs}
\usepackage{graphicx}
%Use this line instead if you want to use running heads (i.e. headers on each page):
%\documentclass[runninghead... | {"hexsha": "c3cd73a86656ab83ec2288a7963260e8bc8220ff", "size": 8350, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/VE Intermediate Report/VisualEditorReport.tex", "max_stars_repo_name": "kcanfieldpugetsound/edith", "max_stars_repo_head_hexsha": "2c674f6feb333571eae240dc1d094936b8c59c71", "max_stars_repo_lic... |
[STATEMENT]
lemma equal_3: "equal_3 x y = (real_of_3 x = real_of_3 y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. equal_3 x y = (real_of_3 x = real_of_3 y)
[PROOF STEP]
by (transfer, auto) | {"llama_tokens": 93, "file": "Algebraic_Numbers_Real_Algebraic_Numbers", "length": 1} |
import numpy as np
#===============================================
#===============================================
#===============================================
#Corrections from ML2/alpha = 0.8 to 3D from Tremblay et al. (2013)
def ml28_to_3d_teff(teff,logg):
c = np.zeros(8)
c[0] = 1.0947335E-03
c... | {"hexsha": "4076e79a7871768af6f8b98b9b4d9d60b297d4d3", "size": 8141, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis_tools.py", "max_stars_repo_name": "joshfuchs/ZZCeti_analysis", "max_stars_repo_head_hexsha": "1674e4c69f0e9aa28989a4b202eb8f2f00d4d84f", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
"""
Liu et al.
"Metric Learning from Relative Comparisons by Minimizing Squared Residual".
ICDM 2012.
Adapted from https://gist.github.com/kcarnold/5439917
Paper: http://www.cs.ucla.edu/~weiwang/paper/ICDM12.pdf
"""
from __future__ import print_function, absolute_import, division
import warnings
import numpy as np
im... | {"hexsha": "312990ab808854f1b0c28b0d8484cf4b9864f931", "size": 8849, "ext": "py", "lang": "Python", "max_stars_repo_path": "metric_learn/lsml.py", "max_stars_repo_name": "Aaron1993/metric-learn", "max_stars_repo_head_hexsha": "bf5c7224cc7ad4c025e15b247a80e076b7f75062", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import itertools
import math
from itertools import islice
from logging import warning
import operator
import chardet
from decimal import Decimal
import numpy as np
from mpmath import mpf
def iter_chunks(n, iterable):
"""
Iterates iterable in "chunks" of size n
"""
it = iter(iterable)
while True:... | {"hexsha": "7472fd07d5e406a453f4c57cc7347c5cb8afffa7", "size": 12904, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils/utils.py", "max_stars_repo_name": "ahmadchatha/Scalable-PaQL-Queries", "max_stars_repo_head_hexsha": "01a93f671d4b43310867321fc9e36539ec2871de", "max_stars_repo_licenses": ["MIT"], "max... |
# try:
# import vrep
# import time
# import numpy as np
# import cv2
# except:
# print('--------------------------------------------------------------')
# print('"vrep.py" could not be imported. This means very probably that')
# print('either "vrep.py" or the remoteApi library could not be ... | {"hexsha": "ea19e1a623fefa4adc982a9276f3d6120595deee", "size": 4465, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "PinkFLoyd92/Robotica-VREP", "max_stars_repo_head_hexsha": "eb89bb8de5a0e5451d5b6dae758c8ba0ef150f0e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity
import pickle
import pathlib
from functools import reduce
import logging
import datetime
import pytz
import json
import os
import pandas as pd
import random
# Logging
LOG_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
def get_... | {"hexsha": "3c4b3fc35798a346016108b849a51bcaf151af05", "size": 3922, "ext": "py", "lang": "Python", "max_stars_repo_path": "ui/core.py", "max_stars_repo_name": "ankschoubey/Hybrid-Recommender-System", "max_stars_repo_head_hexsha": "81b71fcefc2a0153877f4b9828ff3a01dce7ca57", "max_stars_repo_licenses": ["MIT"], "max_star... |
import numpy as np
from sklearn.metrics import precision_recall_fscore_support
def softmax(data):
e = np.exp(data - np.amax(data, axis=-1, keepdims=True))
s = np.sum(e, axis=-1, keepdims=True)
return e / s
def acc(va_steer_results, va_cnn_results, label):
pred = va_steer_results + 1* va_cnn_results
... | {"hexsha": "557d05605df7a4cf83dc8dae6eaac7de572922b1", "size": 2406, "ext": "py", "lang": "Python", "max_stars_repo_path": "fusion/metrics.py", "max_stars_repo_name": "hsyntemiz/VA-ES-CNNs-for-Skeleton-based-Human-Action-Recognition", "max_stars_repo_head_hexsha": "0cacc8e2bfce62248b6fb738906edc4e49a89c51", "max_stars_... |
import os
import matplotlib.pyplot as plt
import numpy as np
from ipywidgets import interact, fixed, Button, Layout, GridspecLayout, Output
def create_expanded_button(description, button_style):
return Button(description=description, button_style=button_style, layout=Layout(height="auto", width="auto"))
def cr... | {"hexsha": "2efd77cd92349ec36f1bc4f3b4376a752cfd4474", "size": 6025, "ext": "py", "lang": "Python", "max_stars_repo_path": "winnow/annotation/utils.py", "max_stars_repo_name": "benetech/Winnow2.0", "max_stars_repo_head_hexsha": "bc428d7f74bd7db71b6d70ab15dc7a5c37786c46", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import importlib
from hydroDL import kPath, utils
from hydroDL.app import waterQuality
from hydroDL.master import basins
from hydroDL.data import usgs, gageII, gridMET, ntn
from hydroDL.master import slurm
from hydroDL.post import axplot, figplot
import numpy as np
import matplotlib.pyplot as plt
import os
import panda... | {"hexsha": "6cb1d9c122487cbdaf898d50b43693c229d83553", "size": 5101, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/waterQual/30yr/reason/121_lstm.py", "max_stars_repo_name": "fkwai/geolearn", "max_stars_repo_head_hexsha": "30cb4353d22af5020a48100d07ab04f465a315b0", "max_stars_repo_licenses": ["MIT"], "max_... |
from robosuite.controllers.base_controller import Controller
from robosuite.utils.control_utils import *
import robosuite.utils.transform_utils as T
import numpy as np
import math
# Supported impedance modes
IMPEDANCE_MODES = {"fixed",}
# TODO: Maybe better naming scheme to differentiate between input / output min /... | {"hexsha": "16d3f4a71725ceda5e5526565da4eedbf758e617", "size": 13199, "ext": "py", "lang": "Python", "max_stars_repo_path": "robosuite/controllers/imp_osc.py", "max_stars_repo_name": "garlicbutter/robosuite", "max_stars_repo_head_hexsha": "15924a9bbd554fef53134e518e76c0b85b57a1bf", "max_stars_repo_licenses": ["MIT"], "... |
import numpy as np
from scipy.optimize import least_squares
from .base_model import BaseModel
from ..signal_equations import spgr
class SPGR_T1w_mag(BaseModel):
def __init__(self, TR, alpha):
self.TR = TR # TR is a single value in seconds
self.alpha = alpha # Flip angle is an array of flip angle... | {"hexsha": "4185882b2ebb0a3a711e9bba11d059ebe7f8ebd5", "size": 3465, "ext": "py", "lang": "Python", "max_stars_repo_path": "qmrpy/model_fitting/spgr.py", "max_stars_repo_name": "dchandramohan/qmrpy", "max_stars_repo_head_hexsha": "b5abfa6429da9d836904d8f755a34ed3e6b3b96e", "max_stars_repo_licenses": ["BSD-3-Clause"], "... |
'''
@author Tian Shi
Please contact tshi@vt.edu
'''
import glob
import json
import os
import pickle
import re
import shutil
import time
from pprint import pprint
import numpy as np
import torch
from torch.autograd import Variable
from LeafNATS.data.utils import create_batch_file
from LeafNATS.utils.utils import show_... | {"hexsha": "46a037a081a5694b1b3eb2e5f8acedb8e90de0f9", "size": 16780, "ext": "py", "lang": "Python", "max_stars_repo_path": "LeafNATS/engines/end2end.py", "max_stars_repo_name": "dumpmemory/AspDecSSCL", "max_stars_repo_head_hexsha": "004d73d3248e8fdee1336cfc6490ef4872583665", "max_stars_repo_licenses": ["MIT"], "max_st... |
[STATEMENT]
lemma treeA_snth: \<open>p \<in> treeA steps \<Longrightarrow> \<exists>n. p [\<in>] lhsd (sdrop n steps)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. p \<in> treeA steps \<Longrightarrow> \<exists>n. p [\<in>] lhsd (sdrop n steps)
[PROOF STEP]
unfolding treeA_def
[PROOF STATE]
proof (prove)
go... | {"llama_tokens": 302, "file": "FOL_Seq_Calc3_Completeness", "length": 3} |
# Copyright (c) 2021 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 License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | {"hexsha": "6c2e7b39fcab773aae3581ffc977708d8682b687", "size": 7480, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/rank/din/net.py", "max_stars_repo_name": "Edouard87ljt5s/DisyInformationssysteme0", "max_stars_repo_head_hexsha": "082d7bc429a809c2aca8459cfc93c00ed41a340f", "max_stars_repo_licenses": ["Ap... |
abstract type AbstractGameModel <: AbstractModel
end
function Base.size(model::AbstractGameModel)
return model.n, model.m, model.pu, model.p
end
| {"hexsha": "a11a1763446a79f3276abf6ff14119f0abb47c3e", "size": 147, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/dynamics/game_model.jl", "max_stars_repo_name": "rejuvyesh/Algames.jl", "max_stars_repo_head_hexsha": "b860ba43eb104ef950fb00c9b68d43192832929a", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
program symmetry
c*****************************************************************************
c Given identical particles, and the configurations. This program identifies
c identical configurations and specifies which ones can be skipped
c*****************************************************************... | {"hexsha": "eba3d7cc48507e7e20dc4657568c596b003e28c5", "size": 14527, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Template/NLO/SubProcesses/symmetry_fks_test_Sij.f", "max_stars_repo_name": "khurtado/MG5_aMC", "max_stars_repo_head_hexsha": "9cde676b0a1097058c416983017af257385fa375", "max_stars_repo_licenses":... |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! EVB-QMDFF - RPMD molecular dynamics and rate constant calculations on
! black-box generated potential energy surfaces
!
! Copyright (c) 2021 by Julien Steffen (steffen@pctc.uni-kiel.de)
! Stefa... | {"hexsha": "44bdc2e0c2d67fdc32c97ee84d97957f63aee992", "size": 3701, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/lm_dq_func.f90", "max_stars_repo_name": "Trebonius91/EVB-QMDFF", "max_stars_repo_head_hexsha": "8d03e1ad073becb0161b0377b630d7b65fe3c290", "max_stars_repo_licenses": ["MIT", "Unlicense"], "m... |
import os
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import OneHotEncoder
from tensorflow.python.keras.models import load_model
import pickle
from Learn.data_in import resolve_points_per_sample
from utils.data_utils import load_idp_new_and_legacy, prepare_x, index_to_class
from ten... | {"hexsha": "0957d1fe8fd1c3e8237853d7cee5c928bf13a394", "size": 8474, "ext": "py", "lang": "Python", "max_stars_repo_path": "Learn/idp_scenario_test_compare_scenario.py", "max_stars_repo_name": "ApocalyVec/mGesf", "max_stars_repo_head_hexsha": "21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5", "max_stars_repo_licenses": ["MIT"... |
!**********************************************************************************************************************************
MODULE AeroSubs
USE NWTC_Library
USE AeroDyn14_Types
USE AeroGenSubs, ONLY : MaxInfl
IMPLICIT NONE
INTEGER(I... | {"hexsha": "3ca457193a2b819d33de7bc5ca6b15043f451c6b", "size": 210190, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "modules/aerodyn14/src/AeroSubs.f90", "max_stars_repo_name": "ndevelder/openfast", "max_stars_repo_head_hexsha": "3456a645581456883e44d441eb285ed688e98797", "max_stars_repo_licenses": ["Apache-... |
// This file is part of LatNet Builder.
//
// Copyright (C) 2012-2021 The LatNet Builder author's, supervised by Pierre L'Ecuyer, Universite de Montreal.
//
// 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... | {"hexsha": "855d3e10303542d14e9c9a55d29d19c613799494", "size": 4561, "ext": "cc", "lang": "C++", "max_stars_repo_path": "examples/tutorial/NetQuantiles.cc", "max_stars_repo_name": "YochevedDarmon/latnetbuilder", "max_stars_repo_head_hexsha": "7df3a7ba89e10ca51d4af347b75cdb0987e5151c", "max_stars_repo_licenses": ["Apach... |
//
// Copyright 2016 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trad... | {"hexsha": "4fe25761e9b5dc81184566449c2369d74a0f5b4b", "size": 117024, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "pxr/imaging/lib/hdSt/codeGen.cpp", "max_stars_repo_name": "dongyifan/USD", "max_stars_repo_head_hexsha": "61c6685d05d777a973539ba2a28f6f8deb5c042f", "max_stars_repo_licenses": ["Unlicense"], "max_... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import gym
from gym import spaces
from gym.utils import seeding
from gym_spectrum.envs.channel_env import ChannelEnv
import numpy as np
class SpectrumEnv(gym.Env):
metadata = {'render.modes': ('human', 'string'), 'action.modes': ('access',)}
spec = None
def _... | {"hexsha": "b8f4501cc280c2e0f39b8e188ee248952c1e41d0", "size": 3462, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym_spectrum/envs/spectrum_env.py", "max_stars_repo_name": "lukeprince20/gym-spectrum", "max_stars_repo_head_hexsha": "90eeef3c55db239a15f20f89d3c7d8f5ba2b17d4", "max_stars_repo_licenses": ["MIT"]... |
import numpy as np
def hyperbolic(x):
""" Using the hyperbolic function
.. _target hyperbolic_function:
.. math::
f(x) = \\frac{1}{2} \\left(x + \sqrt{1 + x^2} \\right)
Args:
x (tensor(shape=(...))): M-dimensional tensor
Returns:
y (tensor(shape=(...)... | {"hexsha": "d2f3ad958486ec35fdb4c54cf9d5dd52210fb91d", "size": 685, "ext": "py", "lang": "Python", "max_stars_repo_path": "quant_documentation/hyperbolic.py", "max_stars_repo_name": "carl-christian-kahl/quant_documentation", "max_stars_repo_head_hexsha": "8cac3d1970bd00672cd2e996294f45b747036643", "max_stars_repo_licen... |
#!/usr/bin/env python3
# Should be all Python3 compatible, and I'd suggest keeping it that way.
# However, it should *also* be all Python2.7 compatible, as well.
from __future__ import print_function, division
import numpy as np
import OutflowCone as oc
# How many clouds to generate in the cone model?
# 1e4 gives a ... | {"hexsha": "99d8857386d790968bec61358203eaef36fd9bc7", "size": 7656, "ext": "py", "lang": "Python", "max_stars_repo_path": "example/cone_example.py", "max_stars_repo_name": "fourwood/OutflowCone", "max_stars_repo_head_hexsha": "fbd52dd3e1f28b89fe860bd638a63fd0df277d50", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
export MinStepsGoal
"Goal specification where all steps have equal cost."
struct MinStepsGoal <: Goal
terms::Vector{Term} # Goal terms to be satisfied
end
MinStepsGoal(problem::Problem) = MinStepsGoal(flatten_conjs(problem.goal))
MinStepsGoal(goal::Term) = MinStepsGoal(flatten_conjs(goal))
Base.hash(spec::MinSte... | {"hexsha": "2cb25cedd760ddf3517e19e6d0d080e76aa5df77", "size": 816, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/specifications/min_steps.jl", "max_stars_repo_name": "owenps/SymbolicPlanners.jl", "max_stars_repo_head_hexsha": "824dedf9a73b9ee4f4881af0c16fe8963f033e4f", "max_stars_repo_licenses": ["Apache-2... |
import os
import subprocess
import json
import numpy
import time
def get_vectors(input_video):
# extract video data using ffedit
subprocess.call(f'ffgac -i {input_video} -an -mpv_flags +nopimb+forcemv -qscale:v 0 -g 1000' +
' -vcodec mpeg2video -f rawvideo -y tmp.mpg', shell=True)
subpr... | {"hexsha": "78920db117a066c28e81abd0d7aaa5f674e16e69", "size": 2433, "ext": "py", "lang": "Python", "max_stars_repo_path": "vector_util.py", "max_stars_repo_name": "CubeZeero/datamoshing_GUI", "max_stars_repo_head_hexsha": "3ab619520f9e92c2fc48b6947effc79e4a337545", "max_stars_repo_licenses": ["Unlicense"], "max_stars_... |
import os
import numpy as np
import requests
from datetime import datetime, timedelta
from pykml import parser
import logging
from config import LOG_PATH, DATA_PATH
class Download:
def __init__(self, date_range=14, log_mame=''):
os.makedirs(LOG_PATH, exist_ok=True)
logger = logging... | {"hexsha": "f381267183b7f6e7881b2d014aee1463d14cf230", "size": 3371, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/download.py", "max_stars_repo_name": "ronimos/EROS-Download", "max_stars_repo_head_hexsha": "994b0fd11bae7b25ea637dc86e3149d07936cde8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
\documentclass[journal,twocolumn,10pt]{IEEEtran}
\pagestyle{plain}
\usepackage[acronym]{glossaries}
\newacronym{IEEE}{IEEE}{Transactions on Information Forensics and Security}
\usepackage{epsfig}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{blindtext}
\usepackage{xcolor}
\usepackage[ampersand]{easylist}
\u... | {"hexsha": "0057574fe2a5442f04f03646bc44feaeb5ca65c3", "size": 85774, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "IEEE-TIFS-2020/article.tex", "max_stars_repo_name": "Maxul/Aurora", "max_stars_repo_head_hexsha": "c4315574f85b04f8575e7ff14bc251317b9ca5db", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import matlab.unittest.TestSuite
import matlab.unittest.TestRunner
import matlab.unittest.plugins.CodeCoveragePlugin
clear; clc;
suite = TestSuite.fromFile('replicationTests.m');
runner = TestRunner.withTextOutput;
runner.addPlugin(CodeCoveragePlugin.forFolder(bearroot(), 'IncludingSubfolders', true))
result = runner.... | {"author": "european-central-bank", "repo": "BEAR-toolbox", "sha": "f33aae80c40f7a2e78a54de99b2ce3663f59aa75", "save_path": "github-repos/MATLAB/european-central-bank-BEAR-toolbox", "path": "github-repos/MATLAB/european-central-bank-BEAR-toolbox/BEAR-toolbox-f33aae80c40f7a2e78a54de99b2ce3663f59aa75/tests/runAllTests.m"... |
"""
Copyright 2020 Johns Hopkins University (Author: Jesus Villalba)
Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""
import os.path as path
import logging
import copy
import numpy as np
import scipy.sparse as sparse
# import h5py
from ..hyp_defs import float_cpu
from .list_utils import *
from .tria... | {"hexsha": "d269c6299d1c517726a85b80e863d7cb60d06cca", "size": 12226, "ext": "py", "lang": "Python", "max_stars_repo_path": "hyperion/utils/sparse_trial_scores.py", "max_stars_repo_name": "hyperion-ml/hyperion", "max_stars_repo_head_hexsha": "c4c9eee0acab1ba572843373245da12d00dfffaa", "max_stars_repo_licenses": ["Apach... |
import numpy as np
import pandas as pd
def window_maker(
df,
window_size: int = 10,
input_dim: str = 'univariate',
normalize_window: bool = False,
shuffle: bool = False,
output_dim: str = 'forecast_length',
forecast_length: int = 1,
max_windows: int = 5000,
regression_type: str = N... | {"hexsha": "0cfb79c6bb5e47bfae36a19323a4de813bcb8a5d", "size": 12893, "ext": "py", "lang": "Python", "max_stars_repo_path": "autots/tools/window_functions.py", "max_stars_repo_name": "vishalbelsare/AutoTS-1", "max_stars_repo_head_hexsha": "9b08d42c6f80ee92b7838ede5a6fa45e239c8ca8", "max_stars_repo_licenses": ["MIT"], "... |
export AbstractEvolution, Evolution, log_gen, save_gen, get_best
abstract type AbstractEvolution end
"""
Every AbstractEvolution subclass needs to have the following fields:
config::NamedTuple
logger::CambrianLogger
population::Array{<:Individual}
for config, see get_default_config
Evolution classes shou... | {"hexsha": "ee099ad7ecd7ea692e9386bff960e5aed869d097", "size": 2339, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/evolution.jl", "max_stars_repo_name": "mrchaos/Cambrian.jl", "max_stars_repo_head_hexsha": "89f3afc22085b6ef81eed0d3fa270fc802392f1c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun... |
# Assignment 1 Testing - Biologically Inspired Computing
# Hunter Phillips
import sys
import os.path
from solvers import *
import numpy as nmp
import time
# Exhaustive Algorithm Text Output
cities, distance = open_file()
range1 = nmp.linspace(6,10,5)
range1 = [str(int(i)) for i in range1]
save_path = '../results/ex... | {"hexsha": "212a68426fe5e1efb0ce003008cc554f90d4e081", "size": 5257, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignments/assignment1/src/testing.py", "max_stars_repo_name": "robolux/Biologically_Inspired_Computing", "max_stars_repo_head_hexsha": "f0cd43a3443cb7a06e43eb87545436504ac4397f", "max_stars_repo... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : 2014Vee
# !/usr/bin/env python
# coding=utf-8
import os
import numpy
from PIL import Image, ImageDraw
import cv2
#created by chenfenyu 2018.3.20
cap = cv2.VideoCapture(0)
#获取外接摄像头
eye = cv2.imread("/Users/funny/Downloads/img/eye.png")
#读取眼睛区域替换的图片
mouth = c... | {"hexsha": "4d21226e2e6b414ef46730fc099ce0619a326ffa", "size": 5648, "ext": "py", "lang": "Python", "max_stars_repo_path": "face_mask/eyeDetect.py", "max_stars_repo_name": "2014Vee/face-mask-master", "max_stars_repo_head_hexsha": "6b5c183edc5da82ec9b3257bb26e19dc00526c4d", "max_stars_repo_licenses": ["MIT"], "max_stars... |
//
// simulator.cpp
// CDNSimulator
//
// Created by Juncheng on 11/18/18.
// Copyright © 2018 Juncheng. All rights reserved.
//
#ifndef SIMULATOR_HPP
#define SIMULATOR_HPP
#include "boost/program_options.hpp"
#include <algorithm>
#include <boost/algorithm/string.hpp>
#include <cstdlib>
#include <cmath>
#include... | {"hexsha": "db004638db5917446bebdd39e85042eb5760d613", "size": 9546, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "cacheTraceAnalysis/simulator/libCacheSim/libMimircache/example/cacheClusterCPP/include/simulator.hpp", "max_stars_repo_name": "Thesys-lab/cacheWorkloadAnalysisOSDI20", "max_stars_repo_head_hexsha": ... |
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 22 18:55:58 2020
@author: Robert
"""
import sklearn as sk #PCA
import seaborn as sns #Dataset de ejemplo
import scipy as sc #SVD
import numpy as np
from numpy.linalg import multi_dot as dot #Operaciones matriciales
import matplotlib.pyplot as plt
# Factorización co... | {"hexsha": "cf2a1e42ed8d268189b2eaea92a3cea81aa10838", "size": 1768, "ext": "py", "lang": "Python", "max_stars_repo_path": "Practica4/practica4_ejemplo.py", "max_stars_repo_name": "mbelda/GCOM", "max_stars_repo_head_hexsha": "a242b0befd51b03474d1aae8d23e97a728bec246", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
[STATEMENT]
lemma ltln_Until_to_StrongRelease:
"w \<Turnstile>\<^sub>n \<phi> U\<^sub>n \<psi> \<longleftrightarrow> w \<Turnstile>\<^sub>n \<psi> M\<^sub>n (\<phi> or\<^sub>n \<psi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. w \<Turnstile>\<^sub>n \<phi> U\<^sub>n \<psi> = w \<Turnstile>\<^sub>n \<psi> M\<^... | {"llama_tokens": 199, "file": "LTL_LTL", "length": 1} |
[STATEMENT]
lemma l9_18:
assumes "Col X Y P" and
"Col A B P"
shows "X Y TS A B \<longleftrightarrow> (Bet A P B \<and> \<not> Col X Y A \<and> \<not> Col X Y B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (X Y TS A B) = (Bet A P B \<and> \<not> Col X Y A \<and> \<not> Col X Y B)
[PROOF STEP]
using l9_18_... | {"llama_tokens": 397, "file": "IsaGeoCoq_Tarski_Neutral", "length": 2} |
// Boost.Geometry
// Copyright (c) 2021, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
#ifndef BOOST_GEOMETRY_STRATEGIES_LENGTH_CARTESIAN_HPP
#define BOOST_GEOM... | {"hexsha": "f390489a6047c4caa32e1031d43f910da99e25b4", "size": 1655, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "lib/boost_1.78.0/boost/geometry/strategies/length/cartesian.hpp", "max_stars_repo_name": "LaudateCorpus1/math", "max_stars_repo_head_hexsha": "990a66b3cccd27a5fd48626360bb91093a48278b", "max_stars_r... |
"""Test knn on pitch2dv0 color image data"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import os
import pandas as pd
import scipy.io as spio
import matplotlib.pyplot as plt
import time
from sklearn import neighbors
from sklearn.metr... | {"hexsha": "bdd3ccbb5dd343efcc4f87f4179676c620c9f689", "size": 5450, "ext": "py", "lang": "Python", "max_stars_repo_path": "intention_prediction_v0/pitch2dv0_color_knn_test.py", "max_stars_repo_name": "fantasylsc/Intention_Prediction", "max_stars_repo_head_hexsha": "c6d482741968d5e3111edc28a1e957b2e9d3e4e1", "max_stars... |
"""
This module contains functions to run the PT-JPL crop water use model.
The model functions are hybrid: they work both with numpy arrays or ee.Images*:
If the instance of the input is recognized as an ee.Image, the output is
computed as an ee.Image as well.
Otherwise, it is computed as a numpy array.
To reduce the... | {"hexsha": "4c668f89b05f7abef373c7c22a6c3887d3658d9e", "size": 13288, "ext": "py", "lang": "Python", "max_stars_repo_path": "geeet/ptjpl.py", "max_stars_repo_name": "Kripankc/geeet", "max_stars_repo_head_hexsha": "64f183e62376dc119989ba0e7db0ed6acbd041c6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
import matplotlib.pyplot as plt
import numpy as np
plt.switch_backend('Agg')
#
# Make image array with using matplotlib
#
def plot_to_buf(x: np.ndarray, align: bool = True) -> np.ndarray:
"""
make plotted image given array
:param x: an array to be plotted
:param align: make limit from -1 to +1 on ar... | {"hexsha": "a8e5ec2b852bd7a9c9f52b25154c4996cec32655", "size": 997, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch_sound/utils/plots.py", "max_stars_repo_name": "lunarbridge/pytorch_sound", "max_stars_repo_head_hexsha": "61270221d85fefd5aee4f015caf9a0375575019e", "max_stars_repo_licenses": ["BSD-2-Claus... |
struct GradientDescent{T1} <: QuasiNewton{T1}
approx::T1
end
# might want to clean this up
update!(A::UniformScaling, s, y, scheme::GradientDescent{<:InverseApprox}) = A
update!(A, s, y, scheme::GradientDescent{<:DirectApprox}) = A
update(A::UniformScaling, s, y, scheme::GradientDescent{<:InverseApprox}) = A
update... | {"hexsha": "0ebd830889bcc7261ae71dc947be14da7550dfe1", "size": 375, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/quasinewton/gradientdescent.jl", "max_stars_repo_name": "pkofod/NearlyNewton.jl", "max_stars_repo_head_hexsha": "f9f0f80f3b5e89dc3c56af838e338c9d77d8356a", "max_stars_repo_licenses": ["MIT"], "m... |
import numpy as np
import pytest
from sklearn.utils import check_random_state
from fri import FRI, NORMAL_MODELS, LUPI_MODELS
from fri import quick_generate
import fri
@pytest.fixture(scope="function")
def random_state():
return check_random_state(1337)
@pytest.fixture()
def data(prob):
return quick_genera... | {"hexsha": "10a6a20359a208b00858d159d19d9da6a62364ce", "size": 716, "ext": "py", "lang": "Python", "max_stars_repo_path": "fri/tests/test_grouping.py", "max_stars_repo_name": "lpfann/fri", "max_stars_repo_head_hexsha": "518e3b1419b0993272b9507d0dc01eee60afe26a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8,... |
function [ point, seed ] = p00_sample ( test, m, n, seed )
%*****************************************************************************80
%
%% P00_SAMPLE samples points from the region in a problem.
%
% Licensing:
%
% This code is distributed under the GNU LGPL license.
%
% Modified:
%
% 10 April 2009
%
% A... | {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_triangulation/p00_sample.m"} |
[STATEMENT]
lemma supI1: "eval A x \<Longrightarrow> eval (A \<squnion> B) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. eval A x \<Longrightarrow> eval (A \<squnion> B) x
[PROOF STEP]
by auto | {"llama_tokens": 81, "file": null, "length": 1} |
module GMC_NS
using Distributions, Serialization, UnicodePlots
import ProgressMeter: AbstractProgress, Progress, @showprogress, next!, move_cursor_up_while_clearing_lines, printover, durationstring
import Printf: @sprintf
import Random: rand
import Statistics: unscaled_covzm, det, eigen
import ... | {"hexsha": "1096e7d759b79b72d76eb262afdbbfe0f77897a2", "size": 2594, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/GMC_NS.jl", "max_stars_repo_name": "mmattocks/GMC_NS", "max_stars_repo_head_hexsha": "0849facc0e2695b6f7dbce2ab170aeb4762fa919", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
using Test
using Unfold
using StatsModels
using DataFrames
using Statistics
using Random
include("test_utilities.jl")
data, evts = loadtestdata("test_case_3a") #
data_r = reshape(data, (1, :))
data_e, times = Unfold.epoch(data = data_r, tbl = evts, τ = (0, 0.05), sfreq = 10) # cut the data into epochs
##
f = @formu... | {"hexsha": "c5c6bc0c1e96c67f840b873ec9e955ba93451771", "size": 4669, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/effects.jl", "max_stars_repo_name": "unfoldtoolbox/Unfold.jl", "max_stars_repo_head_hexsha": "63587c0eef24b69dad6266a97aa8657b7bef9dd6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import logging
import numpy as np
import rospy
from franka_interface_msgs.srv import GetCurrentRobotStateCmd
from .utils import franka_pose_to_rigid_transform
class FrankaArmStateClient:
def __init__(self, new_ros_node=True, robot_state_server_name='/get_current_robot_state_server_node_1/get_current_robot_stat... | {"hexsha": "81bae516a7763a5de58932392f9fcaeb11d15236", "size": 3724, "ext": "py", "lang": "Python", "max_stars_repo_path": "frankapy/franka_arm_state_client.py", "max_stars_repo_name": "iamlab-cmu/frankapy", "max_stars_repo_head_hexsha": "68d311f5906e6a10dcbb52ac7c9a4196aba63949", "max_stars_repo_licenses": ["Apache-2.... |
import edlib
from Bio.Seq import Seq
from Bio.SeqIO.QualityIO import FastqGeneralIterator
import ipywidgets as widgets
from copy import deepcopy as dc
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import glob
import os
import dnaplotlib
import random
def rc(seq):
return str(Seq(seq).rever... | {"hexsha": "57a23b9c50826094f374db2c86893bdd3bbbfd9f", "size": 49974, "ext": "py", "lang": "Python", "max_stars_repo_path": "nptools/nanopore_scripts.py", "max_stars_repo_name": "dr3y/andreys_np_tools", "max_stars_repo_head_hexsha": "2a6fea2562cf7af6f697014d2e5ee2dd47877322", "max_stars_repo_licenses": ["MIT"], "max_st... |
from random import randrange
import zlib
import cv2
import numpy as np
from util import stream
from config import Struct
def parse(npk_file, offset, size):
npk_file.seek(offset + 16)
index_table_size = stream.read_struct(npk_file, Struct['INT'])
stream.read_struct(npk_file, Struct['INT'])
version = s... | {"hexsha": "0d3b740e9db610fdc4c2c1a248f4f49854395c88", "size": 2498, "ext": "py", "lang": "Python", "max_stars_repo_path": "npk_parser/neople_img/v2.py", "max_stars_repo_name": "pacexy/npk-parser", "max_stars_repo_head_hexsha": "f409c1d0ee070753626c05b09377e4c4b284ea05", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
# coding: utf-8
# Creates:
# * spec_obs_tab.tex
# In[1]:
import os
import glob
from astropy.io import ascii as asc
from astropy.io import fits
from astropy.time import Time
from astropy.table import Table
from utilities_az import connect_to_sndavis, supernova
# In[2]:
sn15oz = supernova.LightCurve2(... | {"hexsha": "c23a08a92ffa7693330473508c4c72223f08b00a", "size": 6799, "ext": "py", "lang": "Python", "max_stars_repo_path": "paper/figures/make_spec_obs_tab.py", "max_stars_repo_name": "abostroem/asassn15oz", "max_stars_repo_head_hexsha": "ade090096b61b155c86108d1945bb7b4522365b8", "max_stars_repo_licenses": ["BSD-3-Cla... |
[STATEMENT]
lemma exp_not_eq_zero [simp]: "exp x \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. exp x \<noteq> (0::'a)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. exp x = (0::'a) \<Longrightarrow> False
[PROOF STEP]
have "exp x * exp (- x) = 1"
[PROOF STATE]
proof (prove)
goal (1... | {"llama_tokens": 536, "file": null, "length": 9} |
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 20 09:33:14 2017
@author: r.dewinter
"""
import numpy as np
from scipy.optimize import minimize
def fminsearchbnd(fun=None,x0=None,LB=None,UB=None,options=None,varargin=None):
'''
FMINSEARCHBND: FMINSEARCH, but with bound constraints by transformation
... | {"hexsha": "7c32f80c803052fd255a0a8a6d9f8833aa958e13", "size": 7100, "ext": "py", "lang": "Python", "max_stars_repo_path": "CEGO/fminsearchbnd.py", "max_stars_repo_name": "napa-jmm/CEGO", "max_stars_repo_head_hexsha": "172d511133a608ca5bf265d9ebd2937b8a171b3e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, ... |
#include <algorithm>
#include <fscio/chain/apply_context.hpp>
#include <fscio/chain/controller.hpp>
#include <fscio/chain/transaction_context.hpp>
#include <fscio/chain/exceptions.hpp>
#include <fscio/chain/wasm_interface.hpp>
#include <fscio/chain/generated_transaction_object.hpp>
#include <fscio/chain/authorization_m... | {"hexsha": "c86f07b63bf1bd6e2086746d272b64feef177026", "size": 29970, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libraries/chain/apply_context.cpp", "max_stars_repo_name": "FutureSharesCloud/FutureSharesCloud", "max_stars_repo_head_hexsha": "5070b49e7007d50f95f28463f167a440eea612a8", "max_stars_repo_licenses"... |
\chapter{Conclusion}
\renewcommand{\baselinestretch}{\mystretch}
\label{chap:Conclusion}
%\setlength{\parindent}{0pt}
\PARstart{T}{he} runtime performance of \cc{the} Vixen lighting control application was \ca{substantially} improved by changing the data preparation process and developing a new simplified playback eng... | {"hexsha": "f1c5678c67f49b93b37487b2eb7ffcf2dcbea059", "size": 3301, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report/Conclusion.tex", "max_stars_repo_name": "zhiyb/EE9-APRJ", "max_stars_repo_head_hexsha": "52ce486014bec596d1121fb13b15add3fc83161a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "... |
(* WS2812 ledstrip using SPI on MSP430FR5949
P2.5 - DATA-OUT \ Data bitstream out x1=Mosi
You configure this code to connect 1 to 1000 leds, note that at full
power each led consumes ~60 mA so 1000 * 60 = 60.000 mA = 60 Amp!!!
The word DEMO shows some colors on the connected LEDs
*)
dm ... | {"hexsha": "d3ab97b377137a7e5b9596129f634aa6852fc071", "size": 3382, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Communication-Protocols/SPI/MSP430/noForth/WS2812 simple FR5949.f", "max_stars_repo_name": "embeddingforth/embeddinForth", "max_stars_repo_head_hexsha": "b1921074c6f63be9570c7345e8196a6a4ff44b93",... |
import numpy as np
import os
from tqdm import tqdm
from random import randint, sample, seed
from feats_eng.utils import pref_attachment, ressource_allocation_measure, adamic_adar_measure, all_l_path, len_shortest_path, salton_index
from networkx import dispersion, pagerank, eigenvector_centrality
from pathlib imp... | {"hexsha": "951e79e13d1d1e76111633823256da845fcc4e68", "size": 10919, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/feats_eng/generate_train_test_set.py", "max_stars_repo_name": "ikhlo/LinkPrediction_Kaggle", "max_stars_repo_head_hexsha": "377dd1e266111aa71866e62417827d9ef29d140b", "max_stars_repo_license... |
# -*- coding:utf-8 -*-
import numpy
import pandas as pd
import os, sys
import subprocess
from nltk import pos_tag
from nltk.tokenize import word_tokenize
from nltk.stem.wordnet import WordNetLemmatizer
from load_common_sense import process_common_sense, find_similarity, load_commonsense
# from reverse_module import tra... | {"hexsha": "c2099f65fab0324888469d97bb0567ff2b3a6e7b", "size": 12870, "ext": "py", "lang": "Python", "max_stars_repo_path": "RQ_generator/run_train_classifier.py", "max_stars_repo_name": "sun510001/RQ_Chatbot", "max_stars_repo_head_hexsha": "6a06980d624d1bea26fb8e73ff8ba27f359072c3", "max_stars_repo_licenses": ["Apache... |
# DySyn_distance <- function (x, method= "hellinger"){
#
# if (method == "ord") {
# x_dif <- x[1,]-x[2,]
# acum <- 0
# aux <- 0
# for(i in 1:length(x_dif)){
# aux <- x_dif[i]+aux
# acum <- acum+aux
# }
# return(abs(acum))
# }
# return(as.numeric(philentropy::distance(x, met... | {"hexsha": "3fe3c74a932a3618b339561c419eca08da70f55f", "size": 2203, "ext": "r", "lang": "R", "max_stars_repo_path": "proposals/utils.r", "max_stars_repo_name": "andregustavom/icdm21_paper", "max_stars_repo_head_hexsha": "ee4f5247ae6574ab69f5a29134846d50d9e305b8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import torch.utils.data as data
import torch
from PIL import Image
import torchvision.transforms as transforms
import numpy as np
import random
class BaseDataset(data.Dataset):
def __init__(self):
super(BaseDataset, self).__init__()
def name(self):
return 'BaseDataset'
def initialize(self... | {"hexsha": "9e494d99a792082f882ed28160de74e2288f74ee", "size": 3429, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/base_dataset.py", "max_stars_repo_name": "enviromachinebeast/head2head", "max_stars_repo_head_hexsha": "11d8b75aada5c9031e16abe1c5b9ce99e84e7b66", "max_stars_repo_licenses": ["MIT"], "max_sta... |
"""
```
Module : FinanceLib.FixedIncomes.Rates
Description : Implement Fixed Incomes Rates modules for the FinanceLib library
Copyright : (c) 2022 Kishaloy Neogi
License : MIT
Maintainer : Kishaloy Neogi
Email : nkishaloy@yahoo.com
```
The module describes the base modules of Fixed Incomes Rates.
Y... | {"hexsha": "d6785a5f5fbfad48238b5fb7d5794125b0dbe41b", "size": 1164, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/FixedIncomes/Bonds/Rates.jl", "max_stars_repo_name": "n-kishaloy/FinanceLib.jl", "max_stars_repo_head_hexsha": "0c8ca56a7e366e8d411bba59f38bca6f0c9ac9d9", "max_stars_repo_licenses": ["MIT"], "m... |
using Documenter, OhMyREPL
makedocs(
sitename = "OhMyREPL",
pages = Any[
"Home" => "index.md",
"Installation" => "installation.md",
"Features" => Any[
"features/syntax_highlighting.md",
"features/bracket_highlighting.md",
"features/bracket_complete.md... | {"hexsha": "38a383f384b60acc8d6bcbda0118b52d8b49242e", "size": 614, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "UnofficialJuliaMirror/OhMyREPL.jl-5fb14364-9ced-5910-84b2-373655c76a03", "max_stars_repo_head_hexsha": "81dc145a5ed6f29bf65f9c802466d8e2f3cc7430", "max_stars_r... |
#!/usr/bin/env python
"""
Run timing test (GPU) scaled over number of ports.
"""
import csv
import glob
import multiprocessing as mp
import os
import re
import subprocess
import sys
import numpy as np
from neurokernel.tools.misc import get_pids_open
try:
from subprocess import DEVNULL
except ImportError:
i... | {"hexsha": "55ec43ffd0f7260f164515958defea1a3d3fbc32", "size": 1898, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmarks/timing/run_gpu_slow.py", "max_stars_repo_name": "KathyFeiyang/neurokernel", "max_stars_repo_head_hexsha": "8ce5d5159fdec9146299065375fa5f98ded313cb", "max_stars_repo_licenses": ["BSD-3-... |
if (Base.libllvm_version ≥ v"7" && VectorizationBase.AVX512F) || Base.libllvm_version ≥ v"9"
function vfilter!(f::F, x::Vector{T}, y::AbstractArray{T}) where {F,T <: NativeTypes}
W, Wshift = VectorizationBase.pick_vector_width_shift(T)
N = length(y)
Nrep = N >>> Wshift
Nrem = N & (W... | {"hexsha": "b155e27bd57c27877167f6cb8df57fd7f3da9603", "size": 1645, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/filter.jl", "max_stars_repo_name": "mcabbott/LoopVectorization.jl", "max_stars_repo_head_hexsha": "c21c174f0f6676ea9098e632d9bd79e5fb51e885", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
#!/usr/bin/env python3
import sys
sys.path.insert(0, "/cndd/fangming/CEMBA/snmcseq_dev")
from multiprocessing import Pool,cpu_count
from functools import partial
from scipy import sparse
from scipy import stats
import pickle
import datetime
import argparse
import loggi... | {"hexsha": "979e8720f4b962593dded78b686ee69e79cdf804", "size": 12755, "ext": "py", "lang": "Python", "max_stars_repo_path": "archives/correlation_analysis_celllevel/correlation_analysis_celllevel_mcrna_10xv3_Nov23.py", "max_stars_repo_name": "mukamel-lab/SingleCellFusion_EnhancerPaper", "max_stars_repo_head_hexsha": "a... |
"""
@author: Junguang Jiang
@contact: JiangJunguang1123@outlook.com
"""
from typing import Optional
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from dalib.modules.gl import WarmStartGradientLayer
from common.utils.metric.keypoint_detection import get_max_preds
class FastPseu... | {"hexsha": "9ed3c543ac4b390124183c87b154bb2e299b0d82", "size": 10332, "ext": "py", "lang": "Python", "max_stars_repo_path": "dalib/adaptation/regda.py", "max_stars_repo_name": "neka-nat/Transfer-Learning-Library", "max_stars_repo_head_hexsha": "a3b27b0d7562fa90a02e914140b37ab438469e6c", "max_stars_repo_licenses": ["MIT... |
[STATEMENT]
lemma supp_diff_subset_union_supp :
fixes f g :: "'a \<Rightarrow> 'b::group_add"
shows "supp (f - g) \<subseteq> supp f \<union> supp g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. supp (f - g) \<subseteq> supp f \<union> supp g
[PROOF STEP]
unfolding supp_def
[PROOF STATE]
proof (prove)
... | {"llama_tokens": 203, "file": "Rep_Fin_Groups_Rep_Fin_Groups", "length": 2} |
import os
import pickle
from datetime import datetime
from glob import glob
import re
import matplotlib.pyplot as plt
import numpy as np
from dateutil.tz import tzlocal
from pynwb import NWBFile, NWBHDF5IO, TimeSeries
from tqdm import tqdm
from hdmf.backends.hdf5.h5_utils import H5DataIO
def natural_key(text):
# ... | {"hexsha": "a61197cb4cf2e73e1a47c118c7b895400bacdbd4", "size": 2899, "ext": "py", "lang": "Python", "max_stars_repo_path": "to_nwb/Poirazi/spiros2nwb.py", "max_stars_repo_name": "mpompolas/to_nwb", "max_stars_repo_head_hexsha": "1317f0ee0f4d80dde451d60d8eb5c6a544e214fe", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma... |
import atexit
import numpy as np
import os
import cv2
import dlib
import keras
from keras import backend as K
dlib_detectors = []
keras_model = None
is_initialized = False
@atexit.register
def onExit():
global dlib_detectors
global keras_model
if keras_model is not None:
del keras_model
... | {"hexsha": "74878572a60bb404727a570a975ae49867199a31", "size": 8860, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/FaceLandmarksExtractor/FaceLandmarksExtractor.py", "max_stars_repo_name": "huangjiancong1/faceswap-huang", "max_stars_repo_head_hexsha": "f44c27f9e51e8bdba08a50b5e18174b3145287ab", "max_stars_... |
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
from ast import literal_eval
from pathlib import Path
def read_results(result_path):
result_file = open(Path(result_path), 'r')
sequences_raw = result_file.readlines()
result_file.close()
return sequences_raw
def parse_options(result_pa... | {"hexsha": "a531eba1c141e6d4f9c467ae142df6ecaa2603f3", "size": 3654, "ext": "py", "lang": "Python", "max_stars_repo_path": "coppredict/util.py", "max_stars_repo_name": "bitmapup/patricia_trie", "max_stars_repo_head_hexsha": "59a82dd04f82030c9f0995859e5dfcb75ab54476", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
"""
Compute time to process an image
It processes the images N_ITER times and print statistics
"""
from __future__ import print_function, with_statement, division
import time
import argparse
import cv2
import numpy as np
import torch as th
from torch import jit
from torch.jit import trace
from constants import NUM_O... | {"hexsha": "726bdc3a5d73b17a7e43f013dd187778ec8a9b2a", "size": 2057, "ext": "py", "lang": "Python", "max_stars_repo_path": "train/benchmark.py", "max_stars_repo_name": "AmaljithCf/RacingRobot", "max_stars_repo_head_hexsha": "6885ddb37407dff15845d29f641bc7c39279b216", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import logging
import numpy as np
import pandas as pd
console = logging.StreamHandler()
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
console.setFormatter(formatter)
LOG = logging.getLogger("Contact map parser")
LOG.addHandler(console)
LOG.setLevel(logging.INFO)
def parse_csv_... | {"hexsha": "43439feec0e5dba872e2f6301edf3e1cc3832a81", "size": 1353, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/CoReM/io/parser/csv_blomap_parser.py", "max_stars_repo_name": "steffenlem/Team_Tuebingen_BERT", "max_stars_repo_head_hexsha": "baeb92605133cded26cc99082b7c8a50e6f7eb3a", "max_stars_repo_licens... |
# Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES
#
# SPDX-License-Identifier: BSD-3-Clause
import cupy as cp
# This is future proof: In the future when CuPy enables cuQuantum Python
# as an optional backend, we don't want to create a circular dependency
# that ultimately tests against ourselves. Here we en... | {"hexsha": "70f609b1ae1c9fd53d14d7739d769e946bd6cb63", "size": 545, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/tests/cuquantum_tests/cutensornet_tests/__init__.py", "max_stars_repo_name": "NVIDIA/cuQuantum", "max_stars_repo_head_hexsha": "0f00494d4639d760228ac002e83e6d2d3dd97eca", "max_stars_repo_lic... |
#! /usr/bin/python3
from matplotlib import rc
import matplotlib.pyplot as plt
import numpy as np
rc('font', **{'family':'serif', 'serif':['Cardo']})
rc('text', usetex=True)
def save_plot(xlabel, ylabel, path):
plt.legend(loc=1)
plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.savefig(path)
def plot_covaria... | {"hexsha": "8352e0be45ecc12a84c8ff0641f60b87160c4952", "size": 1428, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/analyze.py", "max_stars_repo_name": "kvmanohar22/ins_init", "max_stars_repo_head_hexsha": "51a85d0970001a911eef6570e99a13685323c47e", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
####################################################
#
# @ Authors : SEKHRI Aymen
# MOHAMMED HACENE Tarek
#
# @ Hint: you have to install all requirements
# from requirements.txt
#
####################################################
import numpy as np
import cv2 as cv
import matplotlib... | {"hexsha": "18b62001be8267cfb714d9b0822270ad02d4cb8d", "size": 1478, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/ex_5.py", "max_stars_repo_name": "AymenSe/Geometric-operations-DIP", "max_stars_repo_head_hexsha": "ef0b0bc86210a8da5e63136bf5a239179b869722", "max_stars_repo_licenses": ["MIT"], "max_stars... |
\section{Deep Residual Networks - ResNet}
Deep convolutional neural networks is today used to produce the best results on the ImageNet dataset, and this reveals that the depth of the networks is of high importance for the performance of the networks\citep{RESNET}. Some of the leading results on the ImageNet dataset hav... | {"hexsha": "630e18a47ead739bcff3a5c1796002e75ae1500f", "size": 4793, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Report/chapter/ResNet.tex", "max_stars_repo_name": "Rotvig/cs231n", "max_stars_repo_head_hexsha": "a25aef7f8675eca930fc5cf651409edbcc35c6e2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1... |
from abc import ABC
import numpy as np
class Metric(ABC):
def __call__(self, y_pred, y_true):
raise NotImplementedError
class BinaryAccuracy(Metric):
def __init__(self, threshold: float = 0.5):
self.threshold = threshold
def __call__(self, y_pred, y_true):
assert y_true.shape =... | {"hexsha": "dcafc833c73f3267a1d85a1ccb8b037d04b7a5d1", "size": 522, "ext": "py", "lang": "Python", "max_stars_repo_path": "sproutnet/nn/metric.py", "max_stars_repo_name": "SharpKoi/SproutNet", "max_stars_repo_head_hexsha": "c3363eaa295fa92da162973b161a5718d75fc7dc", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
\section{Conservation Forms}
We begin with the fully compressible equations for the conserved state vector,
$\Ub = (\rho, \rho \ub, \rho E, \rho A_k, \rho X_k, \rho Y_k):$
\begin{eqnarray}
\frac{\partial \rho}{\partial t} &=& - \nabla \cdot (\rho \ub) + S_{{\rm ext},\rho}, \\
\frac{\partial (\rho \ub)}{\partial t} &=&... | {"hexsha": "df6c99d5622824b4820322190b9f003d87a2f447", "size": 7044, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "UsersGuide/Equations/Equations.tex", "max_stars_repo_name": "Gosenca/axionyx_1.0", "max_stars_repo_head_hexsha": "7e2a723e00e6287717d6d81b23db32bcf6c3521a", "max_stars_repo_licenses": ["BSD-3-Clause... |
# --------------------------------------------------------
# Tensorflow Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Jiasen Lu, Jianwei Yang, based on code from Ross Girshick
# Modified by Peiliang Li for Stereo RCNN test
# -------------------------------------------------------... | {"hexsha": "55802f49686225b4b8a6c0ba0f52f5aaf523aa1c", "size": 4335, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/week4/Stereo-RCNN/test.py", "max_stars_repo_name": "chargerKong/3D_detection", "max_stars_repo_head_hexsha": "d3fb7926413f86be9f8aceac169285ee03c8db00", "max_stars_repo_licenses": ["Apache-... |
/*
Copyright 2019 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_ALLOC_CONSTRUCT_HPP
#define BOOST_CORE_ALLOC_CONSTRUCT_HPP
#include <boost/core/noinit_adaptor.hpp>
namespace lslboost {
template<class... | {"hexsha": "41c7946d98863acddd0892c4f9b29bfdc93ffb71", "size": 3472, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "app/liblsl/lslboost/boost/core/alloc_construct.hpp", "max_stars_repo_name": "mvidaldp/liblsl-android-builder", "max_stars_repo_head_hexsha": "e48402fb88ca1b381fd38c70e105df8bd0f3902d", "max_stars_re... |
from datetime import timedelta
import numpy as np
import pytest
from pandas import Timedelta, offsets, to_timedelta
def test_construction():
expected = np.timedelta64(10, "D").astype("m8[ns]").view("i8")
assert Timedelta(10, unit="d").value == expected
assert Timedelta(10.0, unit="d").value =... | {"hexsha": "60d840aa1fa529aba927dbf29fa432d91995fc1e", "size": 9156, "ext": "py", "lang": "Python", "max_stars_repo_path": "venv/Lib/site-packages/pandas/tests/scalar/timedelta/test_constructors.py", "max_stars_repo_name": "Jos33y/student-performance-knn", "max_stars_repo_head_hexsha": "4e965434f52dd6a1380904aa257df1ed... |
import numpy as np
from rain import sum_rain
rain = np.load('../rain.npy')
print "Boost", sum_rain(rain.astype(int).tolist(), len(rain))
rain = .1 * rain
rain[rain < 0] = .025
print "Numpy", rain.sum()
| {"hexsha": "621cf0805a0c72f76e4a4052afcfd1c84c28a226", "size": 203, "ext": "py", "lang": "Python", "max_stars_repo_path": "PythonDAdata/3358OS_11_Code/code11/boost_demo/rain_demo.py", "max_stars_repo_name": "shijiale0609/Python_Data_Analysis", "max_stars_repo_head_hexsha": "c18b5ed006c171bbb6fcb6be5f51b2686edc8f7e", "m... |
# -*- coding: utf-8 -*-
"""
Description: Test the DPL Model
Author: wondervictor
"""
import os
import torch
import random
import argparse
import numpy as np
import torch.utils.data
from torch.autograd import Variable
import models.dpl as model
from datasets import pascal_voc
from datasets import utils as data_utils
... | {"hexsha": "d3f3694154ee9e522b3b4d325203e07cf98ecc8a", "size": 3219, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_cls.py", "max_stars_repo_name": "wondervictor/dpl.pytorch", "max_stars_repo_head_hexsha": "e4f5499616fcdcf09992daf22f2a4ecf38c26f22", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8,... |
import matplotlib.pyplot as plt
import numpy as np
from Filter import *
import Tools
class Filter_Rect_ArbitrarilySpaced(Filter) :
"""
This class define a function of time expanded using a set of arbitrarily rectangular basis functions.
A filter f(t) is defined in the form f(t) = sum_j b_j*rect_j(t),
... | {"hexsha": "7f333934948018dfda8c2256160d6645c3a0bcf5", "size": 6544, "ext": "py", "lang": "Python", "max_stars_repo_path": "Filter_Rect_ArbitrarilySpaced.py", "max_stars_repo_name": "apayeur/GIF-Ca", "max_stars_repo_head_hexsha": "7ba9e715d79aa3a733f417f7dfce81842041e7ec", "max_stars_repo_licenses": ["MIT"], "max_stars... |
from manimlib.imports import *
import random
import numpy as np
# for name in [s for s in list(COLOR_MAP.keys()) if s.endswith("_C")]:
# locals()[name.replace("_C", "")] = locals()[name]
POINT_FIGNT = 0.2
POINT_FIGHTWIN = 1.5
POINT_FIGHTLOSE = 1
POINT_COOPERATION = 1.2
class Civilization:
mark = ... | {"hexsha": "4b6c1a0f42aea909c02883a4a8c4e5554d30c347", "size": 8563, "ext": "py", "lang": "Python", "max_stars_repo_path": "darkVideo.py", "max_stars_repo_name": "BrackRat/darkforestsimulate", "max_stars_repo_head_hexsha": "23f7067ad9045a3fd349b6bed457ea21df01f392", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
PROGRAM Parallel_search
! This is a code to do a parallel search from the data file
implicit none
include 'mpif.h'
integer, parameter :: n = 300
integer, parameter :: endtag = 1
integer, parameter :: resulttag = 2
real, dimension(n) :: b
integer :: rank, size, ... | {"hexsha": "ec4da0d912e245b5bf701b39d5a60efdb5df31c0", "size": 3891, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "parallel_search/search.f90", "max_stars_repo_name": "skn96/MPI_examples", "max_stars_repo_head_hexsha": "0f09d76060b1ca478a01b1a8e4fac844a4dceeaa", "max_stars_repo_licenses": ["MIT"], "max_stars... |
#!/usr/bin/env python3
import sys
import os
import argparse
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import numpy as np
def main():
parser = argparse.ArgumentParser(description="Plot predictions with error bars from coverage experiment.")
parser.add_argument('--predictions', ... | {"hexsha": "062c79ef17436a0a89147d4ed0a7befc92145cba", "size": 2225, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/plot_results_cov_exp.py", "max_stars_repo_name": "baymlab/wastewater_analysis", "max_stars_repo_head_hexsha": "b009452669fa32c9a1a204c461725dd0a3a996c9", "max_stars_repo_licenses": ["MIT"... |
import pandas as pd
import numpy as np
import sys
from sklearn.ensemble import VotingClassifier
from sklearn.model_selection import cross_val_score
from validation.testPerformance import testAccuracy
from sklearn.model_selection import GridSearchCV
np.warnings.filterwarnings('ignore') # annoying np warning in sklearn v... | {"hexsha": "cd3df738e670ce790158228e4c0b625b6c5fb0ac", "size": 2286, "ext": "py", "lang": "Python", "max_stars_repo_path": "ensembles/votingEnsemble.py", "max_stars_repo_name": "thaije/capteam-iglo-titanic-ml", "max_stars_repo_head_hexsha": "6b1c724dd8fa4d8c9bc0694e5f626de94ee302fd", "max_stars_repo_licenses": ["MIT"],... |
import pandas as pd
import numpy as np
from neicmap.distance import sdist, getAzimuth
import os
trenches = pd.read_csv('trenches_usgs_2017.csv')
trenches.loc[trenches.lon < 0, 'lon'] += 360
masterdir = '../../MasterDB/bathymetry'
BAdataset = pd.DataFrame()
slablist = []
for SGfile in os.listdir(masterdir):
try:
... | {"hexsha": "517266f6685b87355be2a2c7aa4e53fe294d0ae3", "size": 1584, "ext": "py", "lang": "Python", "max_stars_repo_path": "misc/trenches/maketrenchdepth.py", "max_stars_repo_name": "ftbernales/slab2", "max_stars_repo_head_hexsha": "0070903421eb2ede8cb86bd06609389b0ecf52dd", "max_stars_repo_licenses": ["CC0-1.0"], "max... |
//==================================================================================================
/**
Copyright 2016 Numscale SAS
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
**/
//====================================... | {"hexsha": "81e92291bc21711435186b0c8e229cd6b7713f74", "size": 3150, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "third_party/boost/simd/arch/x86/sse2/simd/function/slide.hpp", "max_stars_repo_name": "xmar/pythran", "max_stars_repo_head_hexsha": "dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592", "max_stars_repo_licens... |
-- Lista 7: Capítulo 14
-- Lucas Moschen
-- Exercício 1
section
parameters {A : Type} {R : A → A → Prop}
parameter (irreflR : irreflexive R)
parameter (transR : transitive R)
variables a b c : A
local infix < := R
def R' (a b : A) : Prop := R a b ∨ a = b
local infix ≤ := R'
theore... | {"author": "lucasmoschen", "repo": "discrete-mathematics", "sha": "0f1945cc5eb094814c926cd6ae4a8b4c5c579a1e", "save_path": "github-repos/lean/lucasmoschen-discrete-mathematics", "path": "github-repos/lean/lucasmoschen-discrete-mathematics/discrete-mathematics-0f1945cc5eb094814c926cd6ae4a8b4c5c579a1e/Exercises/Lista 7/c... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Solver for equations in commutative monoids
--
-- Adapted from Algebra.Monoid-solver
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Algeb... | {"hexsha": "5aab691dff510a34b0e9cf4a8d0bb8794dc8d500", "size": 6384, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/asset/agda-stdlib-1.0/Algebra/Solver/IdempotentCommutativeMonoid.agda", "max_stars_repo_name": "omega12345/agda-mode", "max_stars_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71"... |
function new_PreequilibriumResults(fragmentBnk) result(results)
! ======================================================================
!
! Constructor for the "Preequilibrium" class
!
! USE:
! preequilibriumObject = Preequilibrium(fragmentBnk, preeqData, &
! & newRNG, [npreqtyp], [r0], [ifam], [sigpre]... | {"hexsha": "074eb1ec918a1d2d261e25af9d380fd9f2b14805", "size": 2559, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/Preequilibrium/new_PreequilibriumResults.f90", "max_stars_repo_name": "lanl/generalized-spallation-model", "max_stars_repo_head_hexsha": "4a2f01a873d2e8f2304b8fd1474d43d1ce8d744d", "max_star... |
\subsection{Functions}
We can call a function:
\(y=f(x)\)
Here \(x\) are the local variables to be used.
However the global state may also affect the outcome, so we have:
\(y=f(x,z)\)
As a result, calling the same function twice with the same inputs can have different outputs.
Side effects. If a function modifie... | {"hexsha": "5062777903c8b1d9a8ab12aebaa1fcf282e195c2", "size": 385, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/pug/theory/computer/functional/01-02-functions.tex", "max_stars_repo_name": "adamdboult/nodeHomePage", "max_stars_repo_head_hexsha": "266bfc6865bb8f6b1530499dde3aa6206bb09b93", "max_stars_repo_li... |
using MISAlgorithms
using Test
@testset "mis1" begin
include("mis1.jl")
end
@testset "mis2" begin
include("mis2.jl")
end
| {"hexsha": "893c7cf4e3f30ed4eac7f08df709b2f3562cb0d9", "size": 131, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "JuliaTagBot/MISAlgorithms.jl", "max_stars_repo_head_hexsha": "d97c95ea88dfb3ad4f2e71dc3db8f21fd1457152", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
import numpy as np
import torch
from torch import nn
from torch.distributions import Categorical
from torch.nn import functional as F
class OTCModel(nn.Module):
"""A flexible actor-critic model that supports:
- Multi-discrete action spaces
- Visual & vector observation spaces
- ... | {"hexsha": "3b317be620215cfbe3f4342c561fcc44f3e833da", "size": 12499, "ext": "py", "lang": "Python", "max_stars_repo_path": "neroRL/trainers/PPO/otc_model.py", "max_stars_repo_name": "MarcoMeter/neroRL", "max_stars_repo_head_hexsha": "f16c100b9029818e4322f7c1c88dbcc5bbade34b", "max_stars_repo_licenses": ["MIT"], "max_s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.