text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 6 21:39:46 2017
@author: Siqi Miao
"""
# test5.py
#
# Unboundedness test.
#
# indices of iB, iN start with 1
import numpy as np
from simplex_step import simplex_step
# start with a tableau form
A1 = np.matrix([[-1, 1, 2],
[-1, ... | {"hexsha": "a779de498b27b5bc4c93b86b1975516be95a5bb2", "size": 1191, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python_IE411/simplex_method/test5.py", "max_stars_repo_name": "Rothdyt/codes-for-courses", "max_stars_repo_head_hexsha": "a2dfea516ebc7cabef31a5169533b6da352e7ccb", "max_stars_repo_licenses": ["MI... |
import numpy as np
import os
import argparse
import torch
from text import text_to_sequence, cmudict
from text.symbols import symbols
import commons
import models
import utils
import json
import jamotools
from glob import glob
import g2pk
from g2pk import G2p
g2p = G2p()
if __name__ == "__main__":
parser = argp... | {"hexsha": "3fe066bcd3eecae12e3897940814b6010a501571", "size": 5225, "ext": "py", "lang": "Python", "max_stars_repo_path": "inference.py", "max_stars_repo_name": "Joovvhan/glow-tts-custom", "max_stars_repo_head_hexsha": "47eab350ccd958beea78b9662d1b360fd3562f46", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2... |
import numpy as np
import scipy as sp
import pandas as pd
import matplotlib.pyplot as plt
from scipy.optimize import minimize
from dechorate import constants
from dechorate.utils.mds_utils import edm
from dechorate.utils.dsp_utils import envelope, normalize
def nlls_mds(D, X, A, thr_mic=0.05, thr_src=0.05):
di... | {"hexsha": "0bb45a0cbe697eccce31b2b92d55fa9fa15f930f", "size": 25823, "ext": "py", "lang": "Python", "max_stars_repo_path": "dechorate/calibration_and_mds.py", "max_stars_repo_name": "Chutlhu/DechorateDB", "max_stars_repo_head_hexsha": "378eda37ed296f2823e3306238101343c5f4084a", "max_stars_repo_licenses": ["MIT"], "max... |
[STATEMENT]
lemma (in linorder_topology) not_in_connected_cases:
assumes conn: "connected S"
assumes nbdd: "x \<notin> S"
assumes ne: "S \<noteq> {}"
obtains "bdd_above S" "\<And>y. y \<in> S \<Longrightarrow> x \<ge> y" | "bdd_below S" "\<And>y. y \<in> S \<Longrightarrow> x \<le> y"
[PROOF STATE]
proof (prove... | {"llama_tokens": 4398, "file": null, "length": 37} |
/**
*-----------------------------------------------------------------------------
* Title : Memory Master
* ----------------------------------------------------------------------------
* File : Master.cpp
* Created : 2016-09-20
* ---------------------------------------------------------------------... | {"hexsha": "0e460a05d885c7fdb925e01870e3b85f3c9a0370", "size": 13440, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/rogue/interfaces/memory/Master.cpp", "max_stars_repo_name": "mwittgen/rogue", "max_stars_repo_head_hexsha": "4be0e9a4d17bdd3987a268f54ad195ee1093190d", "max_stars_repo_licenses": ["BSD-3-Clause... |
from functools import partial
from typing import Optional, Dict
import glm
import numpy as np
from lib.opengl.core.base import *
from lib.opengl import *
from lib.gen import Worker
from .shader_node import GameShaderNode
from .rs import GameRenderSettings
from ..map import TilemapSampler
from tests.util import Timer... | {"hexsha": "356c3f1a9bac2ff2723fb587f898cf1d9128b25a", "size": 5672, "ext": "py", "lang": "Python", "max_stars_repo_path": "tilegame/render/tilemap_node.py", "max_stars_repo_name": "defgsus/thegame", "max_stars_repo_head_hexsha": "38a627d9108f1418b94b08831fd640dd87fbba83", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import numpy as np
import pandas as pd
from .wordle_dictionary import popularity_dict
class Guesser:
"""This class handles guessing strategies. It is sent a strategy name on initialization and sets its guessing function
to one of the strategy functions.
"""
def __init__(self,strategy):
stra... | {"hexsha": "318e43181b985926bade0b235dad813bc1785c2b", "size": 4070, "ext": "py", "lang": "Python", "max_stars_repo_path": "WordleBot/Guesser.py", "max_stars_repo_name": "jonholdship/WordleBot", "max_stars_repo_head_hexsha": "16eb715218a73924068f0caa813082cfe5a8bcbc", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
# Copyright 2021 KU Leuven.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | {"hexsha": "a111272687f795c728603ee69858983187a672b1", "size": 18379, "ext": "py", "lang": "Python", "max_stars_repo_path": "melodia/geometryparser.py", "max_stars_repo_name": "rwmontalvao/Melodia", "max_stars_repo_head_hexsha": "ff0a21637b976fd89853504a59c86db6e127878f", "max_stars_repo_licenses": ["Apache-2.0"], "max... |
from numpy.random import random_integers
from numpy import mean, amin
class DictionaryManager:
@staticmethod
def create_default_dict():
return {
'1': [],
'2': [],
'3': []
}
@staticmethod
def fill_dict(quantity, dictionary):
for key in dictio... | {"hexsha": "cda57d7861751297029d6d47515acaf5c2a27028", "size": 874, "ext": "py", "lang": "Python", "max_stars_repo_path": "data-science-module/task_1/services/dictionary_manager.py", "max_stars_repo_name": "burevestnik-png/tint-ognp", "max_stars_repo_head_hexsha": "c4b6a4a08e37ac89f3cb0677f79032b473c70aa1", "max_stars_... |
[STATEMENT]
lemma iMODb_card: "0 < m \<Longrightarrow> card [r, mod m, c] = Suc c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. 0 < m \<Longrightarrow> card [ r, mod m, c ] = Suc c
[PROOF STEP]
apply (induct c)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
1. 0 < m \<Longrightarrow> card [ r, mod m, 0 ] = Suc 0
... | {"llama_tokens": 715, "file": "Nat-Interval-Logic_IL_Interval", "length": 6} |
[STATEMENT]
lemma state_q_bound:
fixes c :: nat
and l :: register
and ic :: configuration
and p :: program
and q :: nat
and a :: nat
defines "b == B c"
and "m == length p - 1"
assumes is_val: "is_valid_initial ic p a"
and q: "q > 0"
and terminate: "terminates ic p q"
and c: "c > 0"
assumes ... | {"llama_tokens": 2626, "file": "DPRM_Theorem_Register_Machine_MultipleStepState", "length": 31} |
# Overlap Iterator
# ================
struct OverlapIterator{Sa,Sb,F,G}
intervals_a::Sa
intervals_b::Sb
isless::F
filter::G
end
function Base.eltype(::Type{OverlapIterator{Sa,Sb,F,G}}) where {Sa,Sb,F,G}
return Tuple{Interval{metadatatype(Sa)},Interval{metadatatype(Sb)}}
end
function Base.Iterator... | {"hexsha": "dfbd1e71900debb227edefcf4eb5e6d8d81273df", "size": 5721, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/overlap.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/GenomicFeatures.jl-899a7d2d-5c61-547b-bef9-6698a8d05446", "max_stars_repo_head_hexsha": "ceb9cf17264ced957a6c05c7a2c206c8e8c8... |
import sys
import numpy as np
import math
sys.path.append("../../")
from config import Config
import g2o
opt = g2o.SparseOptimizer()
block_solver = g2o.BlockSolverSE3(g2o.LinearSolverEigenSE3())
solver = g2o.OptimizationAlgorithmLevenberg(block_solver)
opt.set_algorithm(solver)
flag = g2o.Flag()
print('f... | {"hexsha": "14f2083aa872b771216a053cdec3f8834dd88a9d", "size": 497, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyslam/test/g2o/test_optimization_flag.py", "max_stars_repo_name": "dysdsyd/VO_benchmark", "max_stars_repo_head_hexsha": "a7602edab934419c1ec73618ee655e18026f834f", "max_stars_repo_licenses": ["Apa... |
#!/usr/bin/env python
# coding: utf-8
# In[16]:
# import necessary libraries - Monir
import pandas as pd
import os
import glob
import numpy as np
# In[18]:
# assign dataset names - Monir
PUBLIC_DISPATCHSCADA_list_of_files = []
#read all dataset names with starting PUBLIC_DISPATCHSCADA - Monir
PUBLIC_DISPATCHSCA... | {"hexsha": "f98d4c9ed05fa595d138c20f6b0d30e1c7ab8189", "size": 1435, "ext": "py", "lang": "Python", "max_stars_repo_path": "code-for-fetching-data/PUBLIC_DISPATCHSCADA_DATA-monir.py", "max_stars_repo_name": "mzkhan2000/AEMO-data-Analytics", "max_stars_repo_head_hexsha": "94c2906d8af699b55e95744656841c79fd019f77", "max_... |
#
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | {"hexsha": "bed5070611c6e8fdee8fcb708fe20667a7aed96b", "size": 13815, "ext": "py", "lang": "Python", "max_stars_repo_path": "transformers4rec/tf/ranking_metric.py", "max_stars_repo_name": "Jwmc999/Transformers4Rec", "max_stars_repo_head_hexsha": "e6cdf13a7c0102303c0258120274f88b2d42c9c2", "max_stars_repo_licenses": ["A... |
theory prop_15
imports Main
"$HIPSTER_HOME/IsaHipster"
begin
datatype 'a list = Nil2 | Cons2 "'a" "'a list"
datatype Nat = Z | S "Nat"
fun lt :: "Nat => Nat => bool" where
"lt x (Z) = False"
| "lt (Z) (S z) = True"
| "lt (S x2) (S z) = lt x2 z"
fun len :: "'a list => Nat" where
"len (Nil2) = Z"
... | {"author": "moajohansson", "repo": "IsaHipster", "sha": "91f6ea3f1166a9de547722ece6445fe843ad89b4", "save_path": "github-repos/isabelle/moajohansson-IsaHipster", "path": "github-repos/isabelle/moajohansson-IsaHipster/IsaHipster-91f6ea3f1166a9de547722ece6445fe843ad89b4/benchmark/isaplanner/prop_15.thy"} |
\chapter{Malware and malware samples}
First of all, before addressing the question of what a ``malware sample'' is,
let us analyze what a ``malware'' is.
The National Institute of Standards and Technologies (NIST) throws the
following definition of malware: ``Software or firmware intended to perform an
unauthorized p... | {"hexsha": "4eb720e60b9494d0a6dc7ed00ec45742a27155a5", "size": 32092, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Master Thesis/malware.tex", "max_stars_repo_name": "dalvarezperez/umse", "max_stars_repo_head_hexsha": "253b103b0955e20ca1437a2b28d93462f97e4810", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_... |
import logging
import numpy as np
from monai.inferers import SlidingWindowInferer
from monai.transforms import (
Activationsd,
AsDiscreted,
CenterSpatialCropd,
CropForegroundd,
EnsureChannelFirstd,
LoadImaged,
NormalizeIntensityd,
Orientationd,
RandAffined,
RandFlipd,
RandHi... | {"hexsha": "adff4273f89578b51e77b51612d08004d00af30e", "size": 2526, "ext": "py", "lang": "Python", "max_stars_repo_path": "segmentation_heart_ventricles/lib/train.py", "max_stars_repo_name": "pritesh-mehta/MONAILabel-Apps", "max_stars_repo_head_hexsha": "b7f89f8a4cfbdbd788616e9fb95cd7427a9d729b", "max_stars_repo_licen... |
//==================================================================================================
/*!
@file
@copyright 2016 NumScale SAS
@copyright 2016 J.T. Lapreste
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": "8de1d3716eae487ad862eada00fbb22bb10da515", "size": 1417, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/simd/function/iround2even.hpp", "max_stars_repo_name": "yaeldarmon/boost.simd", "max_stars_repo_head_hexsha": "561316cc54bdc6353ca78f3b6d7e9120acd11144", "max_stars_repo_licenses": ["B... |
# -*- coding: utf-8 -*-
"""ai__Final.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1bFFlIU-MF56Bt6dX1edpg14OptUTmTSi
# SUBMITTED BY :
SUNIDHI SINGLA 101983052
In this notebook, I have made an attempt to get a simple text classification ... | {"hexsha": "48d6fdf238a92123c2c4141c55c435a7baae41b8", "size": 13235, "ext": "py", "lang": "Python", "max_stars_repo_path": "ai__final.py", "max_stars_repo_name": "SunidhiSingla/Sentiment-analysis", "max_stars_repo_head_hexsha": "40f1d2f921c6ba135bdf9c7f402456a5aa572763", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# test_peakfinder.py
"""
Test suite for `PeakFinder` class
Copyright (c) 2016, David Hoffman
"""
from nose.tools import *
from peaks.peakfinder import PeakFinder
import numpy as np
from numpy.testing import assert_array_equal, assert_allclose
import unittest
class TestP... | {"hexsha": "9ba8321ec662158c4f88c3634e552aca08ddb790", "size": 1018, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_peakfinder.py", "max_stars_repo_name": "david-hoffman/peaks", "max_stars_repo_head_hexsha": "b31a13fcb93005ed01e5295389f91491bafc71cd", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
import utils
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
np.random.seed(123)
inputData = utils.GetInputData((100, 75))
# Plot 4 graphics with different data statistics from csv input
plt.figure(figsize=(20, 14))
plt.subplot(2, 2, 1)
fig = sns.countplot(
y=inputData['cellType'], order=... | {"hexsha": "2b734a92011ce4106b023ac3d5d748638fcdf3dc", "size": 1523, "ext": "py", "lang": "Python", "max_stars_repo_path": "ML/dataVis.py", "max_stars_repo_name": "AlexandruStahie/SkinLesSuggest", "max_stars_repo_head_hexsha": "ecf4a25a56ce620aaef9a88052559b9e97349ddd", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import datetime
import time
import cv2 as cv
import numpy as np
from munkres import Munkres
from scipy.special import comb
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, adjusted_mutual_info_score, \
mutual_info_score, normalized_mutual_info_score
from sklearn.metrics.cluster ... | {"hexsha": "86f15ea97d05bd67dc65121816b20ef90778905d", "size": 12367, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/util.py", "max_stars_repo_name": "giuliabaldini/brainclustering", "max_stars_repo_head_hexsha": "853bd46e12338da9ae4fe348c508163d9951feb3", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2012-2020 Barend Gehrels, Amsterdam, the Netherlands.
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifnd... | {"hexsha": "f1014c9bb450975b8b7251d2707d0d62ea75f66c", "size": 4446, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ReactNativeFrontend/ios/Pods/boost/boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp", "max_stars_repo_name": "Harshitha91/Tmdb-react-native-node", "max_stars_repo_head_hexsha": "e0... |
import numpy as np
import pandas as pd
from .base_test_class import DartsBaseTestClass
from ..models.kalman_filter import KalmanFilter
from ..models.filtering_model import MovingAverage
from ..timeseries import TimeSeries
from ..utils import timeseries_generation as tg
class KalmanFilterTestCase(DartsBaseTestClass):... | {"hexsha": "7942a6b51f2c12124eae3aac1c29bba63d4ae55d", "size": 2614, "ext": "py", "lang": "Python", "max_stars_repo_path": "darts/tests/test_filters.py", "max_stars_repo_name": "muliliao/darts", "max_stars_repo_head_hexsha": "2b5f5c3aa81c6962f4d0d2ba5f280d42f5dc5eb0", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
MODULE interpolation_functions
! Module containing functions necessary for 3DInterpolation
CONTAINS
INTEGER FUNCTION fact(n)
! Retruns the factorial of n
IMPLICIT NONE
INTEGER, INTENT(IN) :: n
INTEGER p,i
p = 1
do i = 1, n
p = p * i
end do
fact = p
END FUNCTION fa... | {"hexsha": "087e9d1f1d94d4b7da3b5ab7352370afb73a653f", "size": 1480, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/OpenFoam/interpolation_functions.f90", "max_stars_repo_name": "apengsigkarup/OceanWave3D", "max_stars_repo_head_hexsha": "91979da3ede3215b2ae65bffab89b695ff17f112", "max_stars_repo_licenses"... |
# Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | {"hexsha": "01c196fadc28b2761d1fea2051a4de31cdd56373", "size": 7230, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/common/test_run/maxpool_with_argmax_run.py", "max_stars_repo_name": "laekov/akg", "max_stars_repo_head_hexsha": "5316b8cb2340bbf71bdc724dc9d81513a67b3104", "max_stars_repo_licenses": ["Apach... |
# OpenFace API tests.
#
# Copyright 2015-2016 Carnegie Mellon University
#
# 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... | {"hexsha": "b98c7ef5294c47ecffc5c02fa3ca79ce95ff7315", "size": 3246, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/openface_api_tests.py", "max_stars_repo_name": "rhyswat/openface", "max_stars_repo_head_hexsha": "d495e579f537d6009c8a6b42d3b7e2b654bdc8e2", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 21 03:23:54 2021
@author: ASUS
"""
import cv2
import numpy as np
def model_train(SUDOKU_TRAIN_DATA_PATH, SUDOKU_TRAIN_LABEL_PATH, MODEL_PATH):
# load training data and label
samples = np.loadtxt(SUDOKU_TRAIN_DATA_PATH, np.float32)
response... | {"hexsha": "9b393ec6c849f929f0d5812747c13d9c30b882a0", "size": 905, "ext": "py", "lang": "Python", "max_stars_repo_path": "knn_train.py", "max_stars_repo_name": "terenceylchow124/sudoku_automating", "max_stars_repo_head_hexsha": "21686545938f3c1d782c4f23486fc603635c3a8a", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
-- To mathlib ?
import data.set.function
import data.equiv.basic
import topology.basic
import topology.constructions
#print continuous_equiv_fun_basis
#check function.uncurry
#check continuous
#print is_open_map.of_inverse
#print is_open_map.comp
#check preimage_equivalence
#print nhds_le_of_le
lemma continuous_uncu... | {"author": "ramonfmir", "repo": "lean-experiments", "sha": "041c8727bb540fb8d1519c1ad84924d473885c27", "save_path": "github-repos/lean/ramonfmir-lean-experiments", "path": "github-repos/lean/ramonfmir-lean-experiments/lean-experiments-041c8727bb540fb8d1519c1ad84924d473885c27/src/mlv/differentiable_ltl/other/continuous.... |
import numpy as np
import torch
import torch.nn.functional as F
def compute_hist(prediction, gt, n_classes, ignore_label):
N, C, H, W = gt.size()
prediction = F.interpolate(prediction, (H, W), mode='bilinear', align_corners=True)
prediction = torch.argmax(prediction, dim=1).flatten().cpu().numpy()
... | {"hexsha": "27b3c929b38a1ec10362ce81c75659dc6f8bff37", "size": 1842, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/utils/metrics.py", "max_stars_repo_name": "WZzhaoyi/MTLNAS", "max_stars_repo_head_hexsha": "c04fcce1437eef306a41a6a224551be99d88f9a3", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co... |
#ifndef NTFMT_FLOAT_HPP_
#define NTFMT_FLOAT_HPP_
#include "ntfmt_fwd.hpp"
#include "ntfmt.hpp"
#ifndef NTFMT_PRINT_FLOAT_BUFFER_SIZE
#ifdef BOOST_PLATFORM_CONFIG
#define NTFMT_PRINT_FLOAT_BUFFER_SIZE std::numeric_limits<T>::max_exponent
#else
#define NTFMT_PRINT_FLOAT_BUFFER_SIZE 24
#endif
#endif
#inc... | {"hexsha": "8bd442bd9b410e5540a10e1f17919f5173b605f7", "size": 9396, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ntfmt_float.hpp", "max_stars_repo_name": "kikairoya/ntfmt", "max_stars_repo_head_hexsha": "17899285d87bddaf90ea64a7203f32e3881ba3b6", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": 3.0, ... |
From algebra Require Export cmra.
From algebra Require Import upred.
Local Hint Extern 10 (_ ≤ _) => omega.
Record agree (A : Type) : Type := Agree {
agree_car :> nat → A;
agree_is_valid : nat → Prop;
agree_valid_S n : agree_is_valid (S n) → agree_is_valid n
}.
Arguments Agree {_} _ _ _.
Arguments agree_car {_} ... | {"author": "amintimany", "repo": "iris-with-logrel-backup", "sha": "9e98ff8be4b4ca516a497d328aaf31cbae186a6c", "save_path": "github-repos/coq/amintimany-iris-with-logrel-backup", "path": "github-repos/coq/amintimany-iris-with-logrel-backup/iris-with-logrel-backup-9e98ff8be4b4ca516a497d328aaf31cbae186a6c/algebra/agree.v... |
/*
enum Tokens__
{
STRING = 257,
BOOLEAN = 258,
INTEGER = 259,
DOUBLE = 260,
NIL = 261,
LAMBDA = 262,
REGEX = 263,
LCB = 264,
RCB = 265,
LB = 266,
RB = 267,
COMMA = 268,
COLON = 269,
};
*/
%baseclass-hea... | {"hexsha": "fbdc3715511d09c79b198c5217055089196b33b5", "size": 4529, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "parsers/json/src/json/JSON.f", "max_stars_repo_name": "naazgull/zapata", "max_stars_repo_head_hexsha": "e5734ff88a17b261a2f4547fa47f01dbb1a69d84", "max_stars_repo_licenses": ["Unlicense"], "max_st... |
# --------------------------------
# Name: DensityToVector.py
# Purpose: This script is intended to help aid the network/vector analysis process by computing weighted kernel densities on
# list of incoming fields which represent weights for the KDE estimation. These estimations are then joined back to
# a network featu... | {"hexsha": "b9142c28f64b9c430683e803c36c8a60855f8b43", "size": 6877, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/DensityToVector.py", "max_stars_repo_name": "d-wasserman/arc-numerical-tools", "max_stars_repo_head_hexsha": "a88ed46c48083dfa615895ecf75e7c1c9c650f97", "max_stars_repo_licenses": ["Apache... |
"""Variational priors q(nu)."""
import math
import torch
from torch import nn
from torch import distributions
import numpy as np
import flow
import network.mask
from util import reshape_lattice
class AutoregressivePrior(nn.Module):
"""q(\nu; \theta) is the prior on the auxiliary latent variables \nu."""
def __in... | {"hexsha": "25f83a5f76bda1e0317272f7bff5e681ca6a8d35", "size": 2758, "ext": "py", "lang": "Python", "max_stars_repo_path": "variational/prior.py", "max_stars_repo_name": "altosaar/hierarchical-variational-models-physics", "max_stars_repo_head_hexsha": "611d91e0281664d7d5ba1679bec7adfb3aac41e2", "max_stars_repo_licenses... |
import numpy as np
from sklearn.cluster import KMeans
from sklearn.metrics import calinski_harabasz_score, davies_bouldin_score, silhouette_score
from .base import BaseModel
from ..utils import get_array_counts
class BestKMeans(BaseModel):
sklearn_estimator = KMeans
available_metrics = {
"calinski_... | {"hexsha": "ea98a2388dd17fa25e8e0f4083a499a00f90a60b", "size": 1500, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/cluster.py", "max_stars_repo_name": "joshunrau/CognitiveSubtypes", "max_stars_repo_head_hexsha": "a23464c5e66e2f84f28fab5686011eb01f8bb548", "max_stars_repo_licenses": ["MIT"], "max_sta... |
//
// Copyright (C) 2011 Danny Havenith
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
/**
* Generic instruction decoder classes.
*
* This file defines a template meta function:
* ~~~~{.cpp}
* ... | {"hexsha": "16401bd03331dd0fdccf44332836e51bd56caf75", "size": 8797, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "avrsim/decoder.hpp", "max_stars_repo_name": "DannyHavenith/avrgo", "max_stars_repo_head_hexsha": "c61002455968f918eeaad280b86906d76c4b65de", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count"... |
"""
Various utilities, running tools, img editing etc.
If you plan on using this implementation, please cite our work:
@INPROCEEDINGS{Grabowski2021IGARSS,
author={Grabowski, Bartosz and Ziaja, Maciej and Kawulok, Michal
and Nalepa, Jakub},
booktitle={IGARSS 2021 - 2021 IEEE International Geoscience
and Remote Sensing ... | {"hexsha": "0cfb52a7b7d5debfc5250e7c1b090ea665dbed09", "size": 13232, "ext": "py", "lang": "Python", "max_stars_repo_path": "beetles/cloud_detection/utils.py", "max_stars_repo_name": "ESA-PhiLab/hypernet", "max_stars_repo_head_hexsha": "b33f7893d3dfcbbc2c10076fb61b2b1f1316402a", "max_stars_repo_licenses": ["MIT"], "max... |
\section{Linear SNR maximisation in practice}
\subsection{Spectral split before SNR maximisation}
The cutoff frequencies were chosen to introduce
| {"hexsha": "d1bb4a76b6963786dc1fda775c9c74f226882555", "size": 153, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "modules/Scraps/GEVD_practice.tex", "max_stars_repo_name": "tfiers/master-thesis", "max_stars_repo_head_hexsha": "3e97128eeb18827b03da90817fe6f6985c84ad80", "max_stars_repo_licenses": ["MIT"], "max_st... |
import numpy as np
from .ext.at_patch import get_nodes_at_patch as _get_nodes_at_patch
def get_nodes_at_patch(graph):
"""Set up data structure that describes node-patch connectivity.
Parameters
----------
links_at_patch: ndarray
Links that define each patch.
nodes_at_link: ndarray
... | {"hexsha": "0d1d537fb64eebf9ff7372fae6a25dcdc447c75c", "size": 617, "ext": "py", "lang": "Python", "max_stars_repo_path": "landlab/graph/object/at_patch.py", "max_stars_repo_name": "amanaster2/landlab", "max_stars_repo_head_hexsha": "ea17f8314eb12e3fc76df66c9b6ff32078caa75c", "max_stars_repo_licenses": ["MIT"], "max_st... |
from keras.models import load_model
model=load_model("cnn-intel-image-model.h5") #load model <- this has run on 3 epochs with ~85% accuracy
from keras.preprocessing import image
test_image = image.load_img("seg_pred/14.jpg",target_size=(64,64))
#test_image #since this format is PIL or pillow so it can be printe... | {"hexsha": "96f450edf38a5ccab48f31ce2738d185c9cde28f", "size": 904, "ext": "py", "lang": "Python", "max_stars_repo_path": "Intel-Placeimage-Classification Testing.py", "max_stars_repo_name": "rajansh87/Intel-Image-Classification-using-CNN", "max_stars_repo_head_hexsha": "39ec1417316c12e14bdce3a37195d8328b7b7aa5", "max_... |
[STATEMENT]
lemma support_preList: "support (preList upds C1) \<subseteq> lesvars upds"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. support (preList upds C1) \<subseteq> lesvars upds
[PROOF STEP]
proof (induct upds)
[PROOF STATE]
proof (state)
goal (2 subgoals):
1. support (preList [] C1) \<subseteq> lesvars []
... | {"llama_tokens": 2101, "file": "Hoare_Time_Nielson_VCGi", "length": 24} |
"""Contains the audio featurizer class."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from data_utils.utility import read_manifest
from data_utils.audio import AudioSegment
from python_speech_features import mfcc
from python_speech_fe... | {"hexsha": "0a54701bff7269ffe8b02df74ad5298986c14507", "size": 8253, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_utils/featurizer/audio_featurizer.py", "max_stars_repo_name": "limpidezza/DeepSpeech", "max_stars_repo_head_hexsha": "b3c728d46ff4eee68c45f20b0abb76e968008bcb", "max_stars_repo_licenses": ["A... |
using LinearAlgebra
struct ValueOne; end
ValueOne()
# Compute X <- a X + b I.
function matfun_axpby!(X,a,b,Y::UniformScaling)
m,n=size(X)
if ~(a isa ValueOne)
rmul!(X,a)
end
@inbounds for i=1:n
X[i,i]+=(b isa ValueOne) ? 1 : b
end
end
# Compute X <- a X + b Y.
function matfun_axp... | {"hexsha": "435e9e141b70f715b87524488d05ec6feac03b56", "size": 3564, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "data/generated/exp/exp_bbcs_m4.jl", "max_stars_repo_name": "matrixfunctions/GraphMatFunData", "max_stars_repo_head_hexsha": "e69413a9c6f297ef003179cb04e738137f775759", "max_stars_repo_licenses": ["... |
import json
import logging
import numpy as np
import requests
from commons.operations_utils.functions import serialize, deserialize
from commons.decorators.decorators import optimized_collection_response, normalize_optimized_collection_argument
from commons.utils.async_thread_pool_executor import AsyncThreadPoolExecu... | {"hexsha": "db830d05acd2d80125ea515516a2a9245f9b88b7", "size": 7866, "ext": "py", "lang": "Python", "max_stars_repo_path": "federated_aggregator/connectors/data_owner_connector.py", "max_stars_repo_name": "DeltaML/federated-aggregator", "max_stars_repo_head_hexsha": "89ce539b82f71f8151518f4578334ae7c6f684a1", "max_star... |
from sets import Set
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer, TfidfTransformer
from sklearn.linear_model import LogisticRegression
from sklearn.naive_bayes import GaussianNB, MultinomialNB
from sklearn.mixture import GMM
from sklearn import svm
import numpy as np
from scipy import s... | {"hexsha": "2ce9ab846ad6f53aeb83351ea77c6ff261b1f60a", "size": 7083, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code Submission/Genre Classification/classifiers.py", "max_stars_repo_name": "bluechill/Gendered-Lyrical-Identification", "max_stars_repo_head_hexsha": "adecb7cf356b0ca1b6b6f3bca80fa4aadb125d97", ... |
[STATEMENT]
lemma mag_zero [simp]: "mag 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. mag 0 = (0::'a)
[PROOF STEP]
by (simp add: zero_Quantity_ext_def) | {"llama_tokens": 79, "file": "Physical_Quantities_ISQ_Quantities", "length": 1} |
#!/usr/bin/env python
""""
Take event file and create multiple new event files separated by CCD
command from CIAO: dmcopy filtered_event.fits[EVENTS][ccd_id=N] out.fits clobber=yes
Make sure CIAO is running before running this script
"""
import argparse
import os
import subprocess
import astropy.io.fits as pyfits
... | {"hexsha": "b44b89e1254f8a1fc5ef2fc7f946909408da49dc", "size": 1242, "ext": "py", "lang": "Python", "max_stars_repo_path": "chandra_suli/separate_CCD.py", "max_stars_repo_name": "nitikayad96/chandra_suli", "max_stars_repo_head_hexsha": "905ded69825f8b3d4fa29a84661697abdb827a87", "max_stars_repo_licenses": ["BSD-3-Claus... |
[STATEMENT]
lemma LIM_offset_zero_cancel: "(\<lambda>h. f (a + h)) \<midarrow>0\<rightarrow> L \<Longrightarrow> f \<midarrow>a\<rightarrow> L"
for a :: "'a::real_normed_vector"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<lambda>h. f (a + h)) \<midarrow>0::'a\<rightarrow> L \<Longrightarrow> f \<midarrow>a\<... | {"llama_tokens": 149, "file": null, "length": 1} |
from __future__ import division
from sympy import S, sqrt, Sum, symbols
from sympy.physics.quantum.cg import Wigner3j, Wigner6j, Wigner9j, CG, cg_simp
from sympy.functions.special.tensor_functions import KroneckerDelta
def test_cg_simp_add():
j, m1, m1p, m2, m2p = symbols('j m1 m1p m2 m2p')
# Test Varshalovic... | {"hexsha": "ac853d7f24d933af914f8fead97759958ec15ae0", "size": 7510, "ext": "py", "lang": "Python", "max_stars_repo_path": "sympy/physics/quantum/tests/test_cg.py", "max_stars_repo_name": "sn6uv/sympy", "max_stars_repo_head_hexsha": "5b149c2f72847e4785c65358b09d99b29f101dd5", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
import pandas as pd
import numpy as np
from klasy.RedisClient import RedisClient
from klasy.CassandraClient import CassandraClient
import json
from datetime import datetime
# INFO
#
# ponoć wykorzystanie w Pandas funkcji agregującej - argument aggfunc jest dosyć nietypowe i warte ujęcia w sprawku
class PandasMo... | {"hexsha": "fdcba9215192d9d4630f84c29a41664e9112b486", "size": 10294, "ext": "py", "lang": "Python", "max_stars_repo_path": "klasy/PandasMovies.py", "max_stars_repo_name": "BMarcin/PP_sem6_WTI_lab", "max_stars_repo_head_hexsha": "19bd0ee88a0a4751b2683d8fd6694fbbce7ba698", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
#Python3
#Creando un diseño de Baticircuito
###### IMPORTANTO PAQUETES ######
import numpy as np
###### COLOCANDO VALORES DE CORRIENTES ######
i1 = 0.001
i2 = 0.002
i3 = 0.003
i4 = 0... | {"hexsha": "113550cdcea8da951438f28ce8848eef438b0781", "size": 2247, "ext": "py", "lang": "Python", "max_stars_repo_path": "DisenoBaticircuito.py", "max_stars_repo_name": "brown9804/Python_DiversosAlgortimos", "max_stars_repo_head_hexsha": "e9ff0fbe761f24a49a30a513d50824ca56cafaa3", "max_stars_repo_licenses": ["Apache-... |
from enum import Enum
import cv2
import numpy as np
from keras.models import model_from_json
from keras.preprocessing import image
class FaceEmotionEstimatorModels(Enum):
KERAS = 0
DEFAULT = KERAS
class FaceEmotionEstimator:
def __init__(self, model=FaceEmotionEstimatorModels.DEFAULT, path=None):
... | {"hexsha": "ab97fac72e0110c4c6d21bc44ad4ff45bd904ad3", "size": 1266, "ext": "py", "lang": "Python", "max_stars_repo_path": "libfaceid/emotion.py", "max_stars_repo_name": "anhlbt/faceidsys", "max_stars_repo_head_hexsha": "630efe78830360565958621c80d247a6055c7cb4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4... |
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <gridmap/operations/rasterize.h>
#include <navigation_interface/params.h>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <pluginlib/class_list_macros.h>
#incl... | {"hexsha": "3015e27b715ce9d51ddb52038c79869de607c8a8", "size": 24900, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "pure_pursuit_controller/src/plugin.cpp", "max_stars_repo_name": "Boeing/modular_navigation", "max_stars_repo_head_hexsha": "1489fdf94079fd6b1d3a41d0fc18924f43805a52", "max_stars_repo_licenses": ["A... |
"""
file: database.py
language:python 3
extracts information from the unicode consortium web database
"""
__DB = "https://www.unicode.org/Public/UCD/latest/ucd/"
from typing import *
import urllib.request
import requests
import pickle
import numpy as np
import random
# inclusive decimal range of a unicode subset
__... | {"hexsha": "913ba10a55920a1c828f5f08ea57a734b595ef09", "size": 10882, "ext": "py", "lang": "Python", "max_stars_repo_path": "unicode_info/database.py", "max_stars_repo_name": "PerryXDeng/project_punyslayer", "max_stars_repo_head_hexsha": "79529b020ca56a5473dbb85ac7155bc03dc5023a", "max_stars_repo_licenses": ["MIT"], "m... |
# Copyright (c) 2021 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
from . import SyncSmokeTest
from . import SmokeTest
import carla
import time
import math
import num... | {"hexsha": "b8d8a502e5ea83dab39ba2bd4a92fa2bc00a7b1a", "size": 29718, "ext": "py", "lang": "Python", "max_stars_repo_path": "PythonAPI/test/smoke/test_vehicle_physics.py", "max_stars_repo_name": "Sid1057/carla_sport", "max_stars_repo_head_hexsha": "76323ce68f7093278b2f47aa3d37ec90fa19038a", "max_stars_repo_licenses": [... |
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while(1):
_, frame = cap.read()
hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
lower = np.array([0, 10, 60], dtype = "uint8")
upper = np.array([20, 150, 255], dtype = "uint8")
mask = cv2.inRange(hsv, lower, upper)
res = ... | {"hexsha": "e13e956164f7746a05f342d2b4e834bd030b57de", "size": 563, "ext": "py", "lang": "Python", "max_stars_repo_path": "gsv_skin_color.py", "max_stars_repo_name": "bhargavyagnik/AutoMouse", "max_stars_repo_head_hexsha": "717e92e1d9af006650641b9e234c95a4a86d277f", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import struct
import numpy as np
from ._header import header_size
from ._protocol import protocol_version
class Writer(object):
def __init__(self):
self.format_ = '='
self.args_ = []
def tobytes(self):
return struct.pack(self.format_, *self.args_)
def write_uint8(self, c):
... | {"hexsha": "f19b8c3a4a5421300a79df1aae77879bd293cf37", "size": 1181, "ext": "py", "lang": "Python", "max_stars_repo_path": "bbai/_computation/_writer.py", "max_stars_repo_name": "rnburn/bbai", "max_stars_repo_head_hexsha": "403f84b4937f4bce4fad8d10ee887330d1a322be", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_... |
# -*- coding: utf-8 -*-
"""
Copyright (c) 2019 Kiri Choi
pySME is a Python script to run R SME package
(https://cran.r-project.org/web/packages/sme/index.html). SME package generates
smoothing-splines mixed-effects models from metabolomics data. This script
follows methodology given by Berk et al. (2011) and ... | {"hexsha": "281d2dedfd8e110140a1fc12fde7c20621977144", "size": 5398, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotting.py", "max_stars_repo_name": "kirichoi/pySME", "max_stars_repo_head_hexsha": "4879a80cefe131568f8c4d91b52f97fe0c79d315", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 12 12:16:24 2019
@author: kyle
"""
import numpy as np
import os
import time
import sys
if ".." not in sys.path:
sys.path.append("..")
from utilities import create_directories
from state import State
from recombination_methods import structure, ... | {"hexsha": "3460eccf3f2bc31060cb142758eba294ab830a33", "size": 3047, "ext": "py", "lang": "Python", "max_stars_repo_path": "recombination/combined_method.py", "max_stars_repo_name": "hvanwyk/atomic_data_uncertainties", "max_stars_repo_head_hexsha": "e6b376d600090203b20810c730a21021ea62ab44", "max_stars_repo_licenses": ... |
[STATEMENT]
lemma ProjInd_mem_eq1:"\<lbrakk>\<forall>j\<in>I. aGroup (A j); f \<in> carrier (a\<Pi>\<^bsub>I\<^esub> A) \<rightarrow> B;
bij_to f (carrier (a\<Pi>\<^bsub>I\<^esub> A)) B; aGroup S;
h \<in> aHom (Ag_ind (a\<Pi>\<^bsub>I\<^esub> A) f) (Ag_ind (a\<Pi>\<^bsub>I\<^esub> A) f);
\<forall>j\<i... | {"llama_tokens": 5301, "file": "Group-Ring-Module_Algebra4", "length": 13} |
[STATEMENT]
lemma frontier_ball [simp]:
fixes a :: "'a::real_normed_vector"
shows "0 < e \<Longrightarrow> frontier (ball a e) = sphere a e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. 0 < e \<Longrightarrow> frontier (ball a e) = sphere a e
[PROOF STEP]
by (force simp: frontier_def) | {"llama_tokens": 111, "file": null, "length": 1} |
[STATEMENT]
lemma tensor_eqI[intro]:
assumes "dims A = dims B" and "vec A = vec B"
shows "A=B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. A = B
[PROOF STEP]
by (metis assms tensor_from_vec_simp) | {"llama_tokens": 91, "file": "Deep_Learning_Tensor", "length": 1} |
/*!
@file
Includes all the adaptors for the standard library.
@copyright Louis Dionne 2013-2016
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_EXT_STD_HPP
#define BOOST_HANA_EXT_STD_HPP
//! @... | {"hexsha": "449415a7eadab0f23ff899953dc13195f971254b", "size": 898, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ios/Pods/boost-for-react-native/boost/hana/ext/std.hpp", "max_stars_repo_name": "rudylee/expo", "max_stars_repo_head_hexsha": "b3e65a7a5b205f14a3eb6cd6fa8d13c8d663b1cc", "max_stars_repo_licenses": ["... |
import cv2
import numpy as np
import PIL, PIL.Image
def imrectify(img, K, D, balance=0.0):
# https://medium.com/@kennethjiang/calibrate-fisheye-lens-using-opencv-part-2-13990f1b157f
dim = img.shape[:2][::-1]
new_K = cv2.fisheye.estimateNewCameraMatrixForUndistortRectify(K, D, dim, np.eye(3), balance=balan... | {"hexsha": "934f73593d68ec75dfc011bf789dc06b6d469281", "size": 1302, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/badgr/utils/np_utils.py", "max_stars_repo_name": "KaiW-53/badgr", "max_stars_repo_head_hexsha": "6184302f156a7bc624af57b2521b1e89ffd6523d", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
r"""## CMS Open Data and the MOD HDF5 Format
Starting in 2014, the CMS Collaboration began to release research-grade
recorded and simulated datasets on the [CERN Open Data Portal](http://opendata.
cern.ch/). These fantastic resources provide a unique opportunity for
researchers with diverse connections to experimental... | {"hexsha": "ce3d4428bf405c6c671c72135b0f0d3c845ac236", "size": 55113, "ext": "py", "lang": "Python", "max_stars_repo_path": "env/lib/python3.7/site-packages/energyflow/datasets/mod.py", "max_stars_repo_name": "nickchak21/particledist", "max_stars_repo_head_hexsha": "59b788a894655273ec177a3a6bb4cf9526f8c402", "max_stars... |
# Copyright (c) 2020 fortiss GmbH
#
# Authors: Patrick Hart
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
import sys
import logging
import time
import tensorflow as tf
import numpy as np
tf.compat.v1.enable_v2_behavior()
# BARK imports
from bark.... | {"hexsha": "0fdef245afde13ed611999bf57b4fd07c1621406", "size": 5563, "ext": "py", "lang": "Python", "max_stars_repo_path": "bark_ml/library_wrappers/lib_tf_agents/runners/tfa_runner.py", "max_stars_repo_name": "mansoorcheema/bark-ml", "max_stars_repo_head_hexsha": "349c0039a5f54778d6b7aea7fd18e3e979efc3a3", "max_stars_... |
#include <leatherman/windows/registry.hpp>
#include <leatherman/windows/system_error.hpp>
#include <leatherman/windows/windows.hpp>
#include <leatherman/locale/locale.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/nowide/convert.hpp>
// Mark string for translation (alias for leatherman::locale::format... | {"hexsha": "a7e313ac7114c9c6fd1e4a1a64ff623745519097", "size": 4937, "ext": "cc", "lang": "C++", "max_stars_repo_path": "windows/src/registry.cc", "max_stars_repo_name": "gimmyxd/leatherman", "max_stars_repo_head_hexsha": "1215b70591c9386a34e2ca6f640dd4db40f942a6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_... |
abstract type InterleaveMarker end
struct Iyes <: InterleaveMarker end
struct Ino <: InterleaveMarker end
struct InterleavedImage{T,N,AA1<:AbstractArray{T,N}, AA2<:AbstractArray{T,N}, IMS<:NTuple{N,InterleaveMarker}} <: AbstractArray{T,N}
oddA::AA1
evenA::AA2
imarkers::IMS
end
function InterleavedImage(o... | {"hexsha": "ff5a53633ae27e87545b5d50d244e25757de6e56", "size": 2773, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/interleaved.jl", "max_stars_repo_name": "HolyLab/InterleavedImages.jl", "max_stars_repo_head_hexsha": "fb15e99d6bcc55af603e2316c769350737464c62", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
def us_counties_Data2Dict(RemoveEmptyFips=False,RemoveUnknownCounties=False):
# Function to import nyt_us_counties.csv data into a dictionary
import numpy as np
import sys
import pickle
import os
import git
repo=git.Repo('.', search_parent_directories=True)
cwd=repo.working_dir
os.c... | {"hexsha": "0333949b2644b4fd9d027f9f8aaf2712da0debe5", "size": 2198, "ext": "py", "lang": "Python", "max_stars_repo_path": "Josh/Processing/nyt_us_counties_Import2.py", "max_stars_repo_name": "aco8ogren/Tentin-Quarantino", "max_stars_repo_head_hexsha": "08b494f5deb2c33e3bb5981135c780b0a34d5557", "max_stars_repo_license... |
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... | {"hexsha": "1b269110bf3e2912ecae039da0aeee797c0fc879", "size": 11086, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "modules/constant.cpp", "max_stars_repo_name": "b1v1r/ironbee", "max_stars_repo_head_hexsha": "97b453afd9c3dc70342c6183a875bde22c9c4a76", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"... |
#################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021
# by the softwar... | {"hexsha": "6a22105958ba669a41c6d114a7414adfad663cd4", "size": 11266, "ext": "py", "lang": "Python", "max_stars_repo_path": "idaes/apps/ripe/emsampling.py", "max_stars_repo_name": "OOAmusat/idaes-pse", "max_stars_repo_head_hexsha": "ae7d3bb8e372bc32822dcdcb75e9fd96b78da539", "max_stars_repo_licenses": ["RSA-MD"], "max_... |
import numpy as np
import tensorflow as tf
import gym
import time
import spinup.algos.sppox.core as core
from spinup.utils.logx import EpochLogger
from spinup.utils.mpi_tf import MpiAdamOptimizer, sync_all_params
from spinup.utils.mpi_tools import mpi_fork, mpi_avg, proc_id, mpi_statistics_scalar, num_procs
config = ... | {"hexsha": "6a5e8ae8ed5f447d0baa725df3e6b5316fb5facb", "size": 15930, "ext": "py", "lang": "Python", "max_stars_repo_path": "spinup/algos/sppox/sppox.py", "max_stars_repo_name": "JingbinLiu/DRL", "max_stars_repo_head_hexsha": "90578c2447d47da661269cb6c981fd04fe2977f9", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
[STATEMENT]
lemma of_bl_length2:
"length xs + c < LENGTH('a) \<Longrightarrow> of_bl xs * 2^c < (2::'a::len word) ^ (length xs + c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. length xs + c < LENGTH('a) \<Longrightarrow> of_bl xs * 2 ^ c < 2 ^ (length xs + c)
[PROOF STEP]
by (simp add: of_bl_length word_less_p... | {"llama_tokens": 143, "file": "Word_Lib_Reversed_Bit_Lists", "length": 1} |
# # Estimate Binomial draw probabilility
using DynamicHMCModels
Random.seed!(1356779)
# Define a structure to hold the data.
Base.@kwdef struct BernoulliProblem
"Total number of draws in the data."
n::Int
"Number of draws ' == 1' "
obs::Vector{Int}
end;
# Write a function to return properly dimensi... | {"hexsha": "61ba91c5c9ea342df6bd1c9e67930c6468e60dbf", "size": 1274, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/02/m2.1d.jl", "max_stars_repo_name": "StatisticalRethinkingJulia/SRDynamicHMC.jl", "max_stars_repo_head_hexsha": "fba06cfe037b98d5a9a64d367f15bec8dcecb9ed", "max_stars_repo_licenses": ["MIT... |
"""Tests for spatio_temporal."""
import numpy as np
from vizier import pyvizier
from vizier.pyvizier.converters import core
from vizier.pyvizier.converters import spatio_temporal as st
from absl.testing import absltest
_metric_converters = [
core.DefaultModelOutputConverter(
pyvizier.MetricInformation(
... | {"hexsha": "6253c56931e0e821b69fbf533f929d5d7b6d6e1a", "size": 9346, "ext": "py", "lang": "Python", "max_stars_repo_path": "vizier/pyvizier/converters/spatio_temporal_test.py", "max_stars_repo_name": "google/vizier", "max_stars_repo_head_hexsha": "12b64ce191410e1c3a79a98472a1b17811290ed3", "max_stars_repo_licenses": ["... |
"""
Example oneD_discrete_control.py
Author: Joshua A. Marshall <joshua.marshall@queensu.ca>
GitHub: https://github.com/botprof/agv-examples
"""
# %% SIMULATION SETUP
from scipy import signal
import numpy as np
import matplotlib.pyplot as plt
from mobotpy.models import Cart
# %% PARAMETERS
# Set some parameters tha... | {"hexsha": "d99f971f253a8dcaabb7ddd68ee978392f4598e3", "size": 2593, "ext": "py", "lang": "Python", "max_stars_repo_path": "oneD_discrete_control.py", "max_stars_repo_name": "botprof/agv-examples", "max_stars_repo_head_hexsha": "a21b0f65fa50ad023864e18c40a37353f2a37f84", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
# Script to plot Figures 4 (A, B and C)
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import cm
import numpy as np
# Prepare the dataframe containing all variation data. MERGED_prio1_prio2.csv is a dataframe with all germline variation found in actionable genes (known and novel)
df = pd.read_csv... | {"hexsha": "09c36d8d8de47aa328b40d7efa6b47561ada7eea", "size": 14158, "ext": "py", "lang": "Python", "max_stars_repo_path": "Figures_tables/7_Fig4A_B_C.py", "max_stars_repo_name": "jlanillos/clinAcc_PGx_WES", "max_stars_repo_head_hexsha": "cc9a5dc89520b05793b5e7fda1aa7cb953d22ff9", "max_stars_repo_licenses": ["MIT"], "... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import json
import os
import numpy as np
import ray
import ray.services
from ray.experimental.sgd import utils
logger = logging.getLogger(__name__)
def _try_import_strategy():
"""Late imp... | {"hexsha": "13903c073fdce24ef4acd7ac573c3c58b7e7cd88", "size": 5218, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/ray/experimental/sgd/tf/tf_runner.py", "max_stars_repo_name": "sunho/ray", "max_stars_repo_head_hexsha": "0ac8138b26cc66978df150c89ef291263f23c9a1", "max_stars_repo_licenses": ["Apache-2.0"... |
import numpy as np
from pyqtgraph import ImageView, PlotItem
from qtpy import QtCore
from qtpy.QtWidgets import *
class ImageViewModule(QFrame):
"""
This class wraps the pyqt imageview model, takes care of configuring it and adds
a set image method to it
"""
def __init__(self, main_widget, histog... | {"hexsha": "69f434abfae875dfb1d2ce72b648618e9df6f49b", "size": 4182, "ext": "py", "lang": "Python", "max_stars_repo_path": "cidan/GUI/ImageView/ImageViewModule.py", "max_stars_repo_name": "Mishne-Lab/cidan", "max_stars_repo_head_hexsha": "3f579b6d5a49e17690e9aa07dfb60d3e8c05e681", "max_stars_repo_licenses": ["MIT"], "m... |
[STATEMENT]
lemma suffix_eval: "(\<sigma> |\<^sub>s i) j = \<sigma> (j + i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<sigma> |\<^sub>s i) j = \<sigma> (j + i)
[PROOF STEP]
unfolding suffix_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<sigma> (j + i) = \<sigma> (j + i)
[PROOF STEP]
by simp | {"llama_tokens": 143, "file": "ConcurrentIMP_Infinite_Sequences", "length": 2} |
import pandas as pd
import numpy as np
def test(start_date, end_date, ticker_list, data_source, time_interval,
technical_indicator_list, drl_lib, env, model_name, if_vix = True,
**kwargs):
from finrl.apps import config
# import DRL agents
from finrl.drl_agents.stablebaselines3.models imp... | {"hexsha": "8620bdbdbcb033ce51b7551fd691ae284474ca7b", "size": 5080, "ext": "py", "lang": "Python", "max_stars_repo_path": "finrl/test.py", "max_stars_repo_name": "puneeth714/FinRL", "max_stars_repo_head_hexsha": "ec71c84342f7b78cf91d5c32e16e5fc88f24bc56", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1949, "m... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import argparse
import pprint
import tqdm
from collections import defaultdict
import numpy as np
import pandas as pd
import torch
from datasets import get_dataloader
from transforms impo... | {"hexsha": "59e241022d5f1c82b9fb386882f0dcc1b7864e77", "size": 10642, "ext": "py", "lang": "Python", "max_stars_repo_path": "kaggle_humpback/inference_similarity.py", "max_stars_repo_name": "maxjeblick/kaggle-humpback", "max_stars_repo_head_hexsha": "78674fc8761490fafc2db825ccbebcec89508ca2", "max_stars_repo_licenses":... |
"""Test the PetsKSP linear solver class."""
import unittest
import numpy as np
import openmdao.api as om
from openmdao.test_suite.components.misc_components import Comp4LinearCacheTest
from openmdao.test_suite.components.sellar import SellarDis1withDerivatives, SellarDis2withDerivatives
try:
from openmdao.vecto... | {"hexsha": "92c08026435c217211f4b6a80ac03269b72f6e64", "size": 22938, "ext": "py", "lang": "Python", "max_stars_repo_path": "openmdao/solvers/linear/tests/test_petsc_ksp.py", "max_stars_repo_name": "anilyil/OpenMDAO", "max_stars_repo_head_hexsha": "97c6e589ccb00318093d7d17f0e853fba74ec1f9", "max_stars_repo_licenses": [... |
'''
amplicon experiment (:mod:`calour.amplicon_experiment`)
=======================================================
.. currentmodule:: calour.amplicon_experiment
Classes
^^^^^^^
.. autosummary::
:toctree: generated
AmpliconExperiment
'''
# ----------------------------------------------------------------------... | {"hexsha": "92db8baa8fcf1f4df1d776af6f4c25804dafed06", "size": 10704, "ext": "py", "lang": "Python", "max_stars_repo_path": "calour/amplicon_experiment.py", "max_stars_repo_name": "pennyneve/calour", "max_stars_repo_head_hexsha": "f255fa822d82bdbffa604e14126603c48b0daff4", "max_stars_repo_licenses": ["BSD-3-Clause"], "... |
import math
import numpy as np
import pypact as pp
from tests.testerbase import Tester
DECIMAL_PLACE_ACC = 6
class GroupConvertUnitTest(Tester):
def _test_imp(self, in_group, in_values, out_group, expected_values, almost=False):
if almost:
np.testing.assert_almost_equal(expected_values, pp... | {"hexsha": "7916c7c4b8efd48f69d33eaf8b6dd51ab98bbf54", "size": 4038, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/input/groupconverttest.py", "max_stars_repo_name": "zxkjack123/pypact", "max_stars_repo_head_hexsha": "8b37f42007e0accabc9fb31d4ab76935b559d817", "max_stars_repo_licenses": ["Apache-2.0"], "... |
#!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University of Chicago
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://ge... | {"hexsha": "0f5ed13d1b5cf5703bfbbec2d307213084b9c5c8", "size": 1980, "ext": "py", "lang": "Python", "max_stars_repo_path": "unittests/libtests/feassemble/data/ElasticityImplicit.py", "max_stars_repo_name": "joegeisz/pylith", "max_stars_repo_head_hexsha": "f74060b7b19d7e90abf8597bbe9250c96593c0ad", "max_stars_repo_licen... |
import os
import json
import math
import numpy as np
from collections import OrderedDict
from sklearn.mixture import GaussianMixture
from mp.utils.feature_extractor import Feature_extractor # pylint: disable=import-error
class histogramm_based_warning():
def __init__(self) -> None:
self.path... | {"hexsha": "8333297614b3ff11612ce0bfaf34227dde22b166", "size": 13016, "ext": "py", "lang": "Python", "max_stars_repo_path": "mp/models/statistical/histogramm_based_warnings.py", "max_stars_repo_name": "MECLabTUDA/QA_Seg", "max_stars_repo_head_hexsha": "72a961e081ac814243ae65b46e0276079af5680f", "max_stars_repo_licenses... |
/*
* Copyright (C) 2005 National Association of REALTORS(R)
*
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitat... | {"hexsha": "a8c6c4defac4fd9faae88eab1b2fcdd1d95b3bc0", "size": 2134, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "project/examples/cpp/src/ExecuteQuery.cpp", "max_stars_repo_name": "mkhon/ezRETS", "max_stars_repo_head_hexsha": "7040e80061da719b5a2d56a80431198962f57893", "max_stars_repo_licenses": ["ICU"], "max_... |
// Boost.Bimap
//
// Copyright (c) 2006-2007 Matias Capeletto
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// VC++ 8.0 warns on usage of certain Standard Library and API functions that
// can be cause bu... | {"hexsha": "e747cb7c44863a95b94bba7d22891e19a967153e", "size": 5109, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "deps/src/boost_1_65_1/libs/bimap/test/test_bimap_ordered.cpp", "max_stars_repo_name": "shreyasvj25/turicreate", "max_stars_repo_head_hexsha": "32e84ca16aef8d04aff3d49ae9984bd49326bffd", "max_stars_r... |
import numpy as np
import pytest
import quanguru.QuantumToolbox.evolution as evo#pylint: disable=import-error
sigmaOpers = ["sigmaMinusReference", "sigmaPlusReference", "sigmaZReference"]
preExpects = [np.array([[0, 0, 0, 0], [1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0]]),
np.array([[0, 1, 0, 0], [0, 0, 0, ... | {"hexsha": "96be66a1e5b53d451c4ff7217447376e80d0bce1", "size": 2520, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_evolution.py", "max_stars_repo_name": "AngsarM/QuanGuru", "max_stars_repo_head_hexsha": "5db6105f843bbc78c2d5b1547e32d494fbe10b8d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta... |
using JuLIP
using Base.Test
using JuLIP.Testing
verbose=true
# check whether on CI
isCI = haskey(ENV, "CI")
notCI = !isCI
eam_W4 = nothing
# check whether ASE is available
hasase = true
try
import ASE
catch
hasase = false
end
julip_tests = [
("testaux.jl", "Miscellaneous"),
("test_atoms.jl", "Atoms"),
... | {"hexsha": "4ae70cb90664d32a70be51ee296a84110eaafe21", "size": 1560, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "hlwang0717/JuLIP.jl", "max_stars_repo_head_hexsha": "c8d325191b99be5c545a0fdb2b8fe11581c125fe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
""" Unit tests for testing support
"""
import logging
import unittest
import numpy
from astropy import units as u
from astropy.coordinates import SkyCoord
from data_models.memory_data_models import BlockVisibility
from wrappers.arlexecute.execution_support.arlexecutebase import ARLExecuteBase
from wrappers.arlexecu... | {"hexsha": "6d8a7386f259e536a462fc77558535f2a28b1c0f", "size": 1672, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/workflows/test_simulation_arlexecute.py", "max_stars_repo_name": "ska-telescope/algorithm-reference-library", "max_stars_repo_head_hexsha": "1b2c8d6079249202864abf8c60cdea40f0f123cb", "max_s... |
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
⊢ Injective toFun
[PROOFSTEP]
rintro ⟨s, f, hf⟩ ⟨t, g, hg⟩ (rfl : f = g)
[GOAL]
case mk.mk
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type... | {"mathlib_filename": "Mathlib.Data.Finsupp.Defs", "llama_tokens": 66341} |
# ------------------------------------------------------------------------------
# Portions of this code are from
# det3d (https://github.com/poodarchu/Det3D/tree/56402d4761a5b73acd23080f537599b0888cce07)
# Copyright (c) 2019 朱本金
# Licensed under the MIT License
# -------------------------------------------------------... | {"hexsha": "ceee6b5e40e1ec681d1fd61776b4a0ced00e75e1", "size": 11675, "ext": "py", "lang": "Python", "max_stars_repo_path": "det3d/models/bbox_heads/center_head_parallel.py", "max_stars_repo_name": "motional/polarstream", "max_stars_repo_head_hexsha": "74af9548cad69a4f546b83dae7b87454bc590c9e", "max_stars_repo_licenses... |
# Copyright 2019 United Kingdom Research and Innovation
# Author: Evgueni Ovtchinnikov (evgueni.ovtchinnikov@stfc.ac.uk)
# -*- coding: utf-8 -*-
"""
Principal Components update demo.
Performs PCA on a chunk of data, then addds more data and updates principal
components.
Usage: pca_update <data_file> <tolerance> <q... | {"hexsha": "4b3d8c4581aff51f8fa67a8673cbff00060e5feb", "size": 2212, "ext": "py", "lang": "Python", "max_stars_repo_path": "raleigh/examples/pca/pca_update.py", "max_stars_repo_name": "evgueni-ovtchinnikov/raleigh", "max_stars_repo_head_hexsha": "620cff4a848cb98034671edc1ebdc6b108fe88b4", "max_stars_repo_licenses": ["B... |
/**
* Copyright (C) 2016-2020 Xilinx, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may
* not use this file except in compliance with the License. A copy of the
* License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | {"hexsha": "d9f89ba77f3f6d7d9d368542359c9cd2ed8a27e6", "size": 9206, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/runtime_src/xocl/test/api/tclEnqueueMapBuffer.cpp", "max_stars_repo_name": "AlphaBu/XRT", "max_stars_repo_head_hexsha": "72d34d637d3292e56871f9384888e6aed73b5969", "max_stars_repo_licenses": ["A... |
"""
Created on Mon Jun 8 15:57:44 2020
@author: prbpedro
"""
import pandas
import matplotlib.pyplot
import numpy
def executeKMeans():
"""
Método de Clustering que objetiva particionar n observações dentre k grupos
onde cada observação pertence ao grupo mais próximo da média. Isso resulta
em uma di... | {"hexsha": "09900b9b177e5421cd587384c79c233cb73c72a9", "size": 5442, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/modulo2/algoritimos_mineracao.py", "max_stars_repo_name": "prbpedro/bootcamp_machine_learning", "max_stars_repo_head_hexsha": "1713e121cd333c8e80ef05aac0365e886ed9dab1", "max_stars_repo_licens... |
from __future__ import annotations
__all__ = [
"load_months",
]
from os import PathLike
import numpy as np
import pandas as pd
def load_months(fnames: PathLike | list[PathLike]):
"""
Load and process a month's csv - setting up approriate multiindex etc.
Note
----
At the end of the month for... | {"hexsha": "f0cc78778e9875fd95096dffab3251f35920a6ed", "size": 1243, "ext": "py", "lang": "Python", "max_stars_repo_path": "mbta_analysis/_loading.py", "max_stars_repo_name": "ianhi/mbta-analysis", "max_stars_repo_head_hexsha": "3701345989677516af14b3fb2beb7fccbe4b0bff", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.