text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
from collections import OrderedDict
import numpy as np
from hailo_model_zoo.core.eval.eval_base_class import Eval
from hailo_model_zoo.core.eval.widerface_evaluation_external.evaluation import (
image_eval, img_pr_info, dataset_pr_info, voc_ap)
THRESH_NUM = 1000
IOU_THRESH = 0.5
class FaceDetectionEval(Eval):
... | {"hexsha": "1b38b28c97c6211ac0a1d59a3a8b992cc0b5d764", "size": 3660, "ext": "py", "lang": "Python", "max_stars_repo_path": "hailo_model_zoo/core/eval/face_detection_evaluation.py", "max_stars_repo_name": "markgrobman/hailo_model_zoo", "max_stars_repo_head_hexsha": "2ea72272ed2debd7f6bee7c4a65bd41de57ec9cf", "max_stars_... |
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import sys
import numpy as np
import pandas as pd
from sklearn import linear_model, preprocessing, cluster, metrics, svm, model_selection
import matplotlib.pyplot as ... | {"hexsha": "e69ab5b62cda55a19592eb02395cf69c09648292", "size": 5407, "ext": "py", "lang": "Python", "max_stars_repo_path": "report.py", "max_stars_repo_name": "iamgroot42/data-poisoning-release", "max_stars_repo_head_hexsha": "fef371060878b7524af9b31225d3144d268b98b3", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
########################################################
# resulthandler.py: get the average values of the results
# Author: Jamie Zhu <jimzhu@GitHub>
# Created: 2014/2/6
# Last updated: 2014/11/14
########################################################
import numpy as np
import linecache
import os, sys, time
####... | {"hexsha": "84637c0bbfcefe67bdcc9cbaf91a7ad17d2e6b07", "size": 1969, "ext": "py", "lang": "Python", "max_stars_repo_path": "PMF/src/resulthandler.py", "max_stars_repo_name": "WS-DREAM/CARP", "max_stars_repo_head_hexsha": "72ee0598656e88278fb4d27c9ce5e3a820905a6e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# Copyright 2019-2021 Toyota Research Institute. All rights reserved.
"""Useful utilities for pre-processing datasets"""
import datetime
import hashlib
import logging
import os
from collections import OrderedDict
from functools import lru_cache
from multiprocessing import Pool, cpu_count
import numpy as np
from googl... | {"hexsha": "a6b6fe92f6f4a58898917531ea22381d7c7eab66", "size": 17698, "ext": "py", "lang": "Python", "max_stars_repo_path": "dgp/utils/dataset_conversion.py", "max_stars_repo_name": "visakii-work/dgp", "max_stars_repo_head_hexsha": "51eed60bba0679399b73392bdb0935a4e2306604", "max_stars_repo_licenses": ["MIT"], "max_sta... |
#include <boost/mpl/aux_/config/bind.hpp>
| {"hexsha": "a0364ceb513dd38580eff3c013b984b3eb7f551f", "size": 42, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_mpl_aux__config_bind.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1.0"... |
import numpy as np
from data.database import Universe
class Query(object):
def __init__(self, uni, func, dim=None, sensitivity=None):
assert (isinstance(uni, Universe))
assert (callable(func))
self._uni = uni
self._func = func
# lazy calculated attributed
self._di... | {"hexsha": "26c4de8a80778a9e393e67fecd77bdc0bffe4bf9", "size": 4481, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/query.py", "max_stars_repo_name": "chuxuantinh/differential-privacy-ct", "max_stars_repo_head_hexsha": "987254d59aab95ede712ccc51b1555c5ffeaee7e", "max_stars_repo_licenses": ["MIT"], "max_sta... |
################
#
# Deep Flow Prediction - N. Thuerey, K. Weissenov, H. Mehrotra, N. Mainali, L. Prantl, X. Hu (TUM)
#
# Helpers for data generation
#
################
import os
import numpy as np
from PIL import Image
from matplotlib import cm
def makeDirs(directoryList):
for directory in directoryList:
... | {"hexsha": "6654a0d961d5a07aecda7b234e14e8211ac2f052", "size": 1701, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/utils.py", "max_stars_repo_name": "aalksii/Deep-Flow-Prediction", "max_stars_repo_head_hexsha": "c3123d1bac6e79fca0d3bba5bcc32cd08bd16464", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
#!/usr/bin/env python3
"""
Ceres-shape
Calculate the hydrostatic shape of Ceres, as in Wieczorek et al. (2019).
"""
import numpy as np
import pyshtools
from ctplanet import HydrostaticShape
# ==== MAIN FUNCTION ====
def main():
# Thomas et al. 2005
mass = 9.395e20
gm = mass * pyshtools.constants.G.val... | {"hexsha": "ce9a946119310881f1106b32a1f577fe0c0fe25e", "size": 927, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/Ceres-shape.py", "max_stars_repo_name": "AlbertoJimenezDiaz/ctplanet", "max_stars_repo_head_hexsha": "66651288abfb2c8588aec3bca1af160b1ec1d574", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
/*!
@file
Forward declares `boost::hana::Applicative`.
@copyright Louis Dionne 2014
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_APPLICATIVE_APPLICATIVE_HPP
#define BOOST_HANA_APPLICATIVE_APPLICATIVE_HP... | {"hexsha": "422508530714abc0a7cce4f3335de3da904b63bb", "size": 4556, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/hana/applicative/applicative.hpp", "max_stars_repo_name": "rbock/hana", "max_stars_repo_head_hexsha": "2b76377f91a5ebe037dea444e4eaabba6498d3a8", "max_stars_repo_licenses": ["BSL-1.0"]... |
\section{The \find algorithm}
\Label{sec:find}
The \find algorithm in the \cxx Standard Library \cite[\S 28.5.5]{cxx-17-draft}
implements \emph{sequential search} for general sequences.
We have modified the generic implementation,
which relies heavily on \cxx templates, to that of a range of
type \valuetype.
The sign... | {"hexsha": "3ffbf13eff2b416d4795eae681c88d82a1d5f8b8", "size": 3786, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Informal/nonmutating/find.tex", "max_stars_repo_name": "fraunhoferfokus/acsl-by-example", "max_stars_repo_head_hexsha": "d8472670150fb3ff4360924af2d0eb14bc80d1e2", "max_stars_repo_licenses": ["MIT"]... |
import sklearn.model_selection
import sklearn.datasets
import sklearn.metrics
import pandas as pd
from autosklearn.metrics import balanced_accuracy
from autosklearn.workaround.Workaround import Workaround
from sklearn.metrics import balanced_accuracy_score
import autosklearn.classification
from sklearn import preproces... | {"hexsha": "8e9d85dbb903bd6f56c5c4099994c7b963f86822", "size": 3286, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/new.py", "max_stars_repo_name": "FelixNeutatz/auto-sklearn", "max_stars_repo_head_hexsha": "b5d141603332041475ed746aa1640334f5561aea", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st... |
"""
Trigger task with NI USB-6229 USB
"""
from __future__ import division
import ctypes
import numpy
nidaq = ctypes.windll.nicaiu # load the DLL
##############################
# Setup some typedefs and constants
# to correspond with values in
# C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDA... | {"hexsha": "f2d1d92e69997c030911900eceefc1e6a388a610", "size": 7103, "ext": "py", "lang": "Python", "max_stars_repo_path": "projects/camera/trigger.py", "max_stars_repo_name": "imrehg/labhardware", "max_stars_repo_head_hexsha": "44e9cb120b20627cecbdd3ce01e07e3a282b7eb1", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json
import h5py
import os
import numpy as np
import random
import torch
import torch.utils.data as data
class HybridLoader:
"""
If db_path is a director, then use normal file loading
The l... | {"hexsha": "162999ffa115d8cad17ecdb7f1c97dcec9728231", "size": 23819, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataloaders/dataloader.py", "max_stars_repo_name": "Maxi-0902/DRAN", "max_stars_repo_head_hexsha": "c3dbfcbc018446544150dc4e151442d6a9fcd4d9", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
"""
Functions for simulated two country time series
"""
import numpy as np
from integrated_econ import *
def simulate_world_econ(n,
country_x,
country_y,
x0=None,
y0=None,
stochastic=False):
# == Initialize arrays == #
x = np.empty(n)
y = np.empty(n)
c... | {"hexsha": "c81d65b64e60a8c5aeb8e8c07de6b920f62dfe46", "size": 1254, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/simulate_world_econ_ts.py", "max_stars_repo_name": "jstac/cycles_moral_hazard", "max_stars_repo_head_hexsha": "ff4881b8b27f6738edfc526ead98579bc801c834", "max_stars_repo_licenses": ["BSD-3-Cl... |
\chapter{Subversion Server}
\label{chp:subversion}
\section{Installation}
So to start lets install the required packages;
\begin{lstlisting}
sudo apt-get install subversion
sudo apt-get install subversion-tools
\end{lstlisting}
With these installed, lets create a new directory for all your repository’s in the $home$... | {"hexsha": "d9789abba61aa97d5fbdac8e4ab0c22d95513edc", "size": 2978, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/subversion.tex", "max_stars_repo_name": "adamrees89/UbuntuServerGuide", "max_stars_repo_head_hexsha": "4e7de689ae536fab65f8e1706a927297f98594d0", "max_stars_repo_licenses": ["MIT"], "max_st... |
#include <boost/algorithm/string/erase.hpp>
| {"hexsha": "db3c00a6e2b892401e0f20e5feb6f46784d03bc4", "size": 44, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_algorithm_string_erase.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1.... |
[STATEMENT]
lemma One_not_eq_j1 [simp]:
shows "One \<noteq> j1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. One \<noteq> j1
[PROOF STEP]
using One_def j1_def One_not_eq_fromArr
[PROOF STATE]
proof (prove)
using this:
One \<equiv> MkIde True
j1 \<equiv> fromArr True
One \<notin> fromArr ` {False, True}
goal (... | {"llama_tokens": 164, "file": "Category3_FreeCategory", "length": 2} |
using JuMP, EAGO
m = Model()
EAGO.register_eago_operators!(m)
@variable(m, -1 <= x[i=1:5] <= 1)
@variable(m, -11.981958290664823 <= q <= 14.886364381032921)
add_NL_constraint(m, :((0.5346214578242647 + 0.732839... | {"hexsha": "a41ebc88c914223c1ee351fa8d4ab28b9bf9993b", "size": 2227, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "solver_benchmarking/MINLPLib.jl/instances/ANN_Expr/46_gelu_5_1_5.jl", "max_stars_repo_name": "PSORLab/RSActivationFunctions", "max_stars_repo_head_hexsha": "0bf8b4500b21144c076ea958ce93dbdd19a53314... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | {"hexsha": "b62b638c03dc96d63e2f832d05a881c360ea003f", "size": 5877, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/python/unittest/test_meta_schedule_relay_tir_compute.py", "max_stars_repo_name": "xinetzone/tvm", "max_stars_repo_head_hexsha": "6576b422da06ebd10a64d182f7f12d91d1d77387", "max_stars_repo_li... |
[STATEMENT]
lemma tranclp_imp_exists_finite_chain_list:
"R\<^sup>+\<^sup>+ x y \<Longrightarrow> \<exists>xs. chain R (llist_of (x # xs @ [y]))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. R\<^sup>+\<^sup>+ x y \<Longrightarrow> \<exists>xs. chain R (llist_of (x # xs @ [y]))
[PROOF STEP]
proof (induct rule: tra... | {"llama_tokens": 2494, "file": "Ordered_Resolution_Prover_Lazy_List_Chain", "length": 23} |
import copy
from dataclasses import dataclass, field
import math
from typing import Any, List, Tuple
import cv2
import numpy as np
import tensorflow as tf
from config import config
from dataset import dataset_utils
@dataclass
class DatasetOptions:
input_res: config.Resolution
output_res: config.Resolution
... | {"hexsha": "df8598e1d5a4289cd3c2ee274e4461811ef19b4a", "size": 24904, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dataset/generic_dataset.py", "max_stars_repo_name": "lupvasile/keypoint-mot", "max_stars_repo_head_hexsha": "e185f150e5ea5f234c06402b8ea5db30487d16cc", "max_stars_repo_licenses": ["Apache-2.0... |
import copy
import itertools
import operator
from collections import namedtuple
from functools import partial
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Iterable,
Mapping,
Optional,
Sequence,
Tuple,
Union,
)
import numpy as np
import numpy_groupies as npg
import pa... | {"hexsha": "40ead6d111c4473b3a088f35ca2ac9f1da8a71ca", "size": 49705, "ext": "py", "lang": "Python", "max_stars_repo_path": "flox/core.py", "max_stars_repo_name": "Illviljan/flox", "max_stars_repo_head_hexsha": "5a2bd5746d5be6c8c4b9d81ea0b688f88e152055", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nul... |
import sys
sys.path.append('../sepdesign')
from _quality_functions import *
from _cost_functions import *
from _utility_functions import *
from _transfer_functions import *
from _value_functions import *
from _types import *
from _agent import *
from _principal import *
from _tools import *
import pickle
from pyDOE imp... | {"hexsha": "672fc5868aab4c0d8db43c98c2014d57efd12cce", "size": 1008, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/test_05.py", "max_stars_repo_name": "salarsk1/principal-agent-bilevel-programming", "max_stars_repo_head_hexsha": "e09b9456dff1e5d253b57bd4bc60f87fd36a749b", "max_stars_repo_licenses": ["... |
#
# Copyright (c) 2020 jintian.
#
# This file is part of CenterNet_Pro_Max
# (see jinfagang.github.io).
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. ... | {"hexsha": "6aaf2f859c067cc94202ccb6c17cf55752f55982", "size": 16471, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/structures/masks.py", "max_stars_repo_name": "giorking/CenterNet_Pro_Max", "max_stars_repo_head_hexsha": "dc50e7dd4b10eff5ad8f428641cc2f9a7ba01ce6", "max_stars_repo_licenses": ["Apache-2.0... |
import sys
sys.path.append('../ThirdParty/PyMongeAmpere')
import MongeAmpere as ma
sys.path.append('../ThirdParty/cgal-python')
from CGAL.CGAL_Kernel import Point_2
from CGAL.CGAL_Triangulation_2 import Delaunay_triangulation_2
from CGAL.CGAL_Interpolation import natural_neighbor_coordinates_2, linear_interpolation, D... | {"hexsha": "7531942871827278621f150df2d6902732747bca", "size": 24006, "ext": "py", "lang": "Python", "max_stars_repo_path": "schwartzburg_2014/ma.py", "max_stars_repo_name": "CompN3rd/ShapeFromCaustics", "max_stars_repo_head_hexsha": "bf98bc970ce500212594f30c1070a5ffc46cfa2b", "max_stars_repo_licenses": ["MIT"], "max_s... |
import os
from datetime import datetime
import cv2
import numpy as np
count = 0
vid_files = [name for name in os.listdir("./data/video_data/") if name[0] != '.']
for file in vid_files:
cap = cv2.VideoCapture("./data/video_data/" + file)
if not cap.isOpened():
print("Error opening video file")
wh... | {"hexsha": "e26f671e3e0e97fe4183576a7b046d13a8e32a21", "size": 1657, "ext": "py", "lang": "Python", "max_stars_repo_path": "video2jpg.py", "max_stars_repo_name": "avasid/gaze_detection", "max_stars_repo_head_hexsha": "dbb76a2b3f3eedff5801b53bc95b3a95bc715bc5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "... |
import numpy as np
from copy import deepcopy
class Noble_Gas_Model:
def __init__(self, gas_type):
if ( gas_type == 'Argon' ):
self.model_parameters = {
'r_hop' : 3.1810226927827516,
't_ss' : 0.03365982238611262,
't_sp' : -0.029154833035109226,
... | {"hexsha": "93d1a365e3a7624e35c2894c01dcd5a6e5e2b8d6", "size": 20730, "ext": "py", "lang": "Python", "max_stars_repo_path": "Day_3/day_3.py", "max_stars_repo_name": "godotalgorithm/qm_project_sss2019", "max_stars_repo_head_hexsha": "740d571b9f8d751be7748fd08fee88ca02820dd1", "max_stars_repo_licenses": ["BSD-3-Clause"],... |
MODULE asminc
USE oce
USE par_oce
USE dom_oce
USE domvvl
USE ldfdyn
USE eosbn2
USE zpshde
USE asmpar
USE asmbkg
USE c1d
USE sbc_oce
USE diaobs, ONLY: calc_date
USE ice, ONLY: hm_i, at_i, at_i_b
USE in_out_manager
USE iom
USE lib_mpp
IMPLICIT NONE
PRIVATE
PUBLIC :: asm_inc_init
PU... | {"hexsha": "91341b34ef94c858b91c0d1baaf58ee3f239707f", "size": 24393, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "asminc.f90", "max_stars_repo_name": "deardenchris/psycloned_nemo_CDe", "max_stars_repo_head_hexsha": "d0040fb20daa5775575b8220cb5f186857973fdb", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma... |
import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np
from pylab import cm
import math
from mpl_toolkits.mplot3d import Axes3D
import os
import sys
import matplotlib.gridspec as gridspec
mpl.rcParams['font.family'] = 'STIXGeneral'
plt.rcParams['xtick.labelsize'] = 16
plt.rcParams['ytick.labelsize... | {"hexsha": "b8b52a65d11e9ebb47f9ff01de099b95eb27be1f", "size": 2032, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/cm.py", "max_stars_repo_name": "MorrisHuang-skipper/Serial-MD", "max_stars_repo_head_hexsha": "48356dc88cdc47a832fa02bc61a03d8583bb4a79", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
[STATEMENT]
lemma vcomp_vconst_on_vid_on[simp]: "vconst_on A c \<circ>\<^sub>\<circ> vid_on A = vconst_on A c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. vconst_on A c \<circ>\<^sub>\<circ> vid_on A = vconst_on A c
[PROOF STEP]
by auto | {"llama_tokens": 105, "file": "CZH_Foundations_czh_sets_CZH_Sets_BRelations", "length": 1} |
using Colors
using Plots
using NoisySignalIntegration
using Random: seed!
gausspeaks(x, p) = sum([@. A * 1/√(2π * σ^2) * exp(-(x - μ)^2 / (2σ^2)) for (A, μ, σ) in p])
c1, c2, c3 = let
seed!(1)
x = 0:0.1:100
y = gausspeaks(x, [(3.3, 30.0, 4.0), (4.1, 70.0, 4.0), (1, 50.0, 20.0)])
c = Curve(x, y)
uc... | {"hexsha": "a25441e59d9738fa3852a5320a3c56e08b82679c", "size": 1192, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make_logo.jl", "max_stars_repo_name": "nluetts/NoisySignalIntegration.jl", "max_stars_repo_head_hexsha": "95c6533a933c7fa52d1556295d91d1d793857672", "max_stars_repo_licenses": ["MIT"], "max_st... |
"""
creation.py
--------------
Create meshes from primitives, or with operations.
"""
from .base import Trimesh
from .constants import log, tol
from .geometry import faces_to_edges, align_vectors, plane_transform
from . import util
from . import grouping
from . import triangles
from . import transformations as tf
i... | {"hexsha": "9c56b696106cbdb33193664ec222cb97521c2bf4", "size": 40606, "ext": "py", "lang": "Python", "max_stars_repo_path": "trimesh/creation.py", "max_stars_repo_name": "jpmaterial/trimesh", "max_stars_repo_head_hexsha": "4f493ff0a96a14e62eb7c748964fd8f4e44064c5", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
[STATEMENT]
lemma S3: "E(x\<cdot>y) \<^bold>\<leftrightarrow> dom x \<simeq> cod y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (E (dom x) \<^bold>\<and> \<^bold>\<not> (\<^bold>\<not> (E (cod y)) \<^bold>\<or> dom x \<noteq> cod y) \<^bold>\<leftarrow> E (x \<cdot> y)) \<^bold>\<and> (E (x \<cdot> y) \<^bold>\<l... | {"llama_tokens": 199, "file": "AxiomaticCategoryTheory_AxiomaticCategoryTheory", "length": 1} |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
from typing import NoReturn
import cv2 as cv
import numpy as np
from numpy import mat
import xml.etree.ElementTree as ET
import math
camera_angle = 315
camera_intrinsic = {
# # 相机内参矩阵
# 相机内参矩阵 matlab 求得
"camera_matrix": [871.08632815... | {"hexsha": "1ffb6e885c207ea205ef242e09f2cabe5866ad26", "size": 3705, "ext": "py", "lang": "Python", "max_stars_repo_path": "cameraToWorld.py", "max_stars_repo_name": "blguweb/Tap-Tap-computer", "max_stars_repo_head_hexsha": "4e2007b5a31e6d5f902b1e3ca58206870331ef07", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
[STATEMENT]
theorem Knaster_Tarski:
assumes mono: "\<And>x y. x \<sqsubseteq> y \<Longrightarrow> f x \<sqsubseteq> f y"
obtains a :: "'a::complete_lattice" where
"f a = a" and "\<And>a'. f a' = a' \<Longrightarrow> a \<sqsubseteq> a'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<And>a. \<lbrakk>f a = a... | {"llama_tokens": 4563, "file": null, "length": 49} |
import numpy as np
import torch
import os
import torch.nn as nn
import ipdb
import yaml
import argparse
from shutil import copyfile
from utils import datasets
from wae_models import model_train_mmd
from torch.utils.data import Dataset, DataLoader
def get_args():
parser = argparse.ArgumentParser()
parser.add_ar... | {"hexsha": "699e9cb8805b5ae7e691dc9435475510e5207683", "size": 6938, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/train.py", "max_stars_repo_name": "Chenxingyu1990/Wasserstein_AE_ZSL", "max_stars_repo_head_hexsha": "9bbe77394b25d9e0bc6556cb427b0809c542f213", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
/*
// Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a
// component of the Texas A&M University System.
// All rights reserved.
// The information and source code contained herein is the exclusive
// property of TEES and may not be disclosed, examined or reproduced
// in whole or in part withou... | {"hexsha": "05369c22936392434b150ed7991283e3cb4a2f43", "size": 48720, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "stapl_release/stapl/containers/distribution/distributor.hpp", "max_stars_repo_name": "parasol-ppl/PPL_utils", "max_stars_repo_head_hexsha": "92728bb89692fda1705a0dee436592d97922a6cb", "max_stars_re... |
\documentclass{article}
\usepackage[margin=1in, left=1.5in, includefoot]{geometry}
\usepackage{amsmath}
\usepackage{gensymb}
\usepackage{parskip}
\usepackage[none]{hyphenat}
%graphic stuff
\usepackage{graphicx} % allows images
\usepackage{float} %helps with posisioning
%header and footer stuff
\usepackage{fanc... | {"hexsha": "ed5b76d76dd12c512e16e7a735ba650fd77b5b32", "size": 12288, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Documentation/Final Report.tex", "max_stars_repo_name": "souleater42/MMP-Robotic-Artist", "max_stars_repo_head_hexsha": "2a67b611c2a3af5feb34276c0d3d30340667f1fa", "max_stars_repo_licenses": ["MIT"... |
[STATEMENT]
lemma ordinality_of_utility_function :
fixes f :: "real \<Rightarrow> real"
assumes monot: "monotone (>) (>) f"
shows "(f \<circ> u) x > (f \<circ> u) y \<longleftrightarrow> u x > u y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ((f \<circ> u) y < (f \<circ> u) x) = (u y < u x)
[PROOF STEP]
pro... | {"llama_tokens": 933, "file": "First_Welfare_Theorem_Utility_Functions", "length": 10} |
[STATEMENT]
lemma tarski_prod:
assumes "\<And>x. x \<sqinter> nc \<noteq> 0 \<Longrightarrow> nc \<cdot> ((x \<sqinter> nc) \<cdot> nc) = nc"
and "\<And>x y z. d x \<cdot> (y \<cdot> z) = (d x \<cdot> y) \<cdot> z"
shows "((x \<sqinter> nc) \<cdot> nc) \<cdot> ((y \<sqinter> nc) \<cdot> nc) = (if (y \<sqinter> nc) = ... | {"llama_tokens": 3590, "file": "Multirelations_C_Algebras", "length": 20} |
import BioMetaheuristics.TestFunctions: Benchmark, evaluate
# Some useful constants
const ln2 = log(2.0)
const sqrtpi = √π
struct SimulatedAnnealing <: TrajectoryBase end
struct GeneralSimulatedAnnealing <: TrajectoryBase end
# To enable dispatch based on the type
function optimize(f, range, dim, iters, rng, ::Simu... | {"hexsha": "29b1e3f591aedfb5a714af0881279db2763d7f5a", "size": 11012, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/solvers/simulated_annealing.jl", "max_stars_repo_name": "edwinb-ai/BioMetaheuristics.jl", "max_stars_repo_head_hexsha": "4b3570d446d2c9effef74dfee874aec807f66ac6", "max_stars_repo_licenses": [... |
import numpy as np
from scipy.interpolate import interp1d
from pyTools import *
################################################################################
#~~~~~~~~~Log ops
################################################################################
def logPolyVal(p,x):
ord = p.order()
logs = []
... | {"hexsha": "91928996da1f5de4298b9395563c76e7f7e3542f", "size": 4681, "ext": "py", "lang": "Python", "max_stars_repo_path": "Libraries/mattsLibraries/mathOperations.py", "max_stars_repo_name": "mrware91/PhilTransA-TRXS-Limits", "max_stars_repo_head_hexsha": "5592c6c66276cd493d10f066aa636aaf600d3a00", "max_stars_repo_lic... |
"""
discretediag(chains::Chains{<:Real}; sections, kwargs...)
Discrete diagnostic where `method` can be
`[:weiss, :hangartner, :DARBOOT, MCBOOT, :billinsgley, :billingsleyBOOT]`.
"""
function MCMCDiagnosticTools.discretediag(
chains::Chains{<:Real};
sections = _default_sections(chains),
kwargs...
)
... | {"hexsha": "0ae64368e72f64523dba4317a24ab07f26bff726", "size": 1029, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/discretediag.jl", "max_stars_repo_name": "TuringLang/MCMCChains.jl", "max_stars_repo_head_hexsha": "e7b3db5a4bb09e0c7dcdffc82a51461e084faa54", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
# %%
# 生成词嵌入文件
import os
from tqdm import tqdm
import numpy as np
import pandas as pd
import argparse
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras import losses
from tensorflow.keras import optimizers
from tensorflow.keras.callbacks import ModelCheckpoin... | {"hexsha": "d9bac3e8df66c844178e795d3c7246c2ff2b3429", "size": 22159, "ext": "py", "lang": "Python", "max_stars_repo_path": "Transformer_keras.py", "max_stars_repo_name": "sunlanchang/Tencent-Ads-Algo-Comp-2020", "max_stars_repo_head_hexsha": "09a4a7023cbcc8867c614fb659aefd631ca5d1f6", "max_stars_repo_licenses": ["MIT"... |
if false
M=Model(:[1-R*β*Expect(λ[+1])/λ
Uh/λ-η
],:[b = (-2,10.,8)
η = (1,0.9,0.1,1)
],:[b = (-2,10.,b*0.95)
h = (0,1,0.7)
c = h*η+R*b[-1]-b
λ = c^-σc
Uh = ϕh*(1-h)^-σh
B = ∫(b,0.0)
H = ∫(h*η,0.3)
],:[β = 0.98
σc ... | {"hexsha": "8eda791df4fafa43e7317ba1a0df6c53ab2b7e0d", "size": 7063, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/display.jl", "max_stars_repo_name": "ZacLN/HADSGE", "max_stars_repo_head_hexsha": "8b81c36b46f960b3b1efed1ee757d501b343adb2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_star... |
import os
import argparse
import os.path as osp
import numpy as np
from data_utils.kitti_util import Calibration, load_velo_scan, load_image
from data_utils.kitti_object import get_lidar_in_image_fov
from tqdm.auto import tqdm
from multiprocessing import Process, Queue, Pool
def get_ptc_in_image(ptc, calib, img):
... | {"hexsha": "0a54ee25551dc43e11aa0027f01b9a68395b7e3d", "size": 3093, "ext": "py", "lang": "Python", "max_stars_repo_path": "gdc/ptc2depthmap.py", "max_stars_repo_name": "lkk688/MyPseudoLidar", "max_stars_repo_head_hexsha": "399fddfa608bcfdf8bddc6f01ebafa8b110fdcb7", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
#!/usr/bin/env python
# coding: utf-8
"""
A module for reading and writing NIfTI-1 files [NIFTI1]_, basically a wrapper for calls
on the Nibabel library [NIFTI2]_.
References
----------
.. [NIFTI1] http://niftilib.sourceforge.net/c_api_html/nifti1_8h-source.html (20180212)
.. [NIFTI2] http://nipy.org/nibabel/ (201802... | {"hexsha": "880b5bb09d68438d7cbcc9790513d94593e272d2", "size": 7768, "ext": "py", "lang": "Python", "max_stars_repo_path": "mvloader/nifti.py", "max_stars_repo_name": "gergely-xyz/mvloader", "max_stars_repo_head_hexsha": "0ff317701bf4f77a048ba218114bcfbeade0fe4a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import numpy as np
import os
import subprocess
milestones = [-80.0, -60.0, -40.0, -20.0, 0.0, 20.0, 40.0, 60.0, 80.0]
for i in range(len(milestones)-1):
left = milestones[i]
right = milestones[i+1]
middle = 0.5*(left + right)
dir_name = 'cell_%d'%i
os.system('cp -r template %s'%dir_name)
... | {"hexsha": "97d19908dd9d7871116a11f3704583675638c54c", "size": 635, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/build_system/Alanine_dipeptide/build.py", "max_stars_repo_name": "dhimanray/MWEM", "max_stars_repo_head_hexsha": "a105b2cd0d39a76ef6058cd16cf0959c650a8cc6", "max_stars_repo_licenses": ["BSD... |
# coding: utf-8
import pytest
import datetime
from numbers import Real
import numpy as np
from ..linear import (LinearGaussianTimeInvariantTransitionModel,
CombinedLinearGaussianTransitionModel,
ConstantVelocity)
from ..nonlinear import ConstantTurn
from ..base import Combi... | {"hexsha": "0cb7e8a26fed95d4ab6e78b62c3389becd33d05e", "size": 3843, "ext": "py", "lang": "Python", "max_stars_repo_path": "stonesoup/models/transition/tests/test_combined.py", "max_stars_repo_name": "io8ex/Stone-Soup", "max_stars_repo_head_hexsha": "071abc8f6004296ab35094db04c7ec410103c419", "max_stars_repo_licenses":... |
import os
import math
import numpy as np
import torch
from torch.nn import functional as F
from scipy.special import gamma
from .utils import imresize
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
NIQE_PRIS_PARAMS = np.load(os.path.join(ROOT_DIR, 'niqe_pris_params.npz'))
def estimate_aggd_param(block: tor... | {"hexsha": "a703de00ec99283bba24ad0d42f023dc5d904a6d", "size": 5958, "ext": "py", "lang": "Python", "max_stars_repo_path": "iqa/niqe/niqe_core.py", "max_stars_repo_name": "cnstark/iqa-torch", "max_stars_repo_head_hexsha": "d8a1045c118a8370aed381f5322903fd45be6727", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_... |
# MINLP written by GAMS Convert at 04/21/18 13:54:18
#
# Equation counts
# Total E G L N X C B
# 841 41 0 800 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | {"hexsha": "d72f9fa75459b9273953e322de7c8ec23bcdd9f2", "size": 130622, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/examples/minlplib/squfl020-040.py", "max_stars_repo_name": "ouyang-w-19/decogo", "max_stars_repo_head_hexsha": "52546480e49776251d4d27856e18a46f40c824a1", "max_stars_repo_licenses": ["MIT"... |
[STATEMENT]
lemma one_eq_of_rat_iff [simp]: "1 = of_rat a \<longleftrightarrow> 1 = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ((1::'a) = of_rat a) = (1 = a)
[PROOF STEP]
by simp | {"llama_tokens": 88, "file": null, "length": 1} |
[STATEMENT]
lemma sublist_append_5:
fixes l l1 l2 h
assumes "(subseq (h # l) (l1 @ l2))" "(list_all (\<lambda>x. \<not>(h = x)) l1)"
shows "subseq (h # l) l2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. subseq (h # l) l2
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
subseq (h # l) (l1 @ ... | {"llama_tokens": 402, "file": "Factored_Transition_System_Bounding_FSSublist", "length": 3} |
"""
Simulation(config, init_state, final_state, agent_log, post_log, graph_list)
Provide data structure for a simulation.
# Examples
```julia-repl
julia>using ABM4OSN
julia>Simulation()
Simulation{Config, Any, Any, DataFrame, Any, Array{AbstractGraph}}
```
# Arguments
- `config`: Config object as provided by Co... | {"hexsha": "4e4ebe9d8daa5d67d552e97a5df7c17e0211ce05", "size": 11014, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/simulation.jl", "max_stars_repo_name": "digimuen/ABM4OSN.jl", "max_stars_repo_head_hexsha": "53ca6bdb2566022ca8375f2bfe3a37c2b82c2030", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2... |
export import_csv
export read_nnimage
export make_centroids
export centroid2xy
export import_stack
export stack2xy
function import_csv(centroid_data_file::String)
nnResult = read(centroid_data_file; header=false)
end
function read_nnimage(image_path::String)
gray_im = Gray.(load(image_path))
end
function mak... | {"hexsha": "5df0336055aae327e4a1d270c1e42a36ddcfacc9", "size": 1132, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/fileio.jl", "max_stars_repo_name": "chenspc/Graphene.jl", "max_stars_repo_head_hexsha": "ca7213b75561a48054c9f70ffc330448f09c2f54", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
"""rio_tiler.sentinel1: Sentinel-1 processing."""
import os
import re
import json
from functools import partial
from concurrent import futures
import numpy
from boto3.session import Session as boto3_session
import mercantile
import rasterio
from rasterio.vrt import WarpedVRT
from rasterio import transform
from ri... | {"hexsha": "64f6d55b790a7284499f177d35a4f4210d878d0f", "size": 8315, "ext": "py", "lang": "Python", "max_stars_repo_path": "rio_tiler/sentinel1.py", "max_stars_repo_name": "mares29/rio-tiler", "max_stars_repo_head_hexsha": "72ddbaa7ff1a972774cdb94fea664a9d017409bf", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta... |
from collections import defaultdict
from datetime import datetime
import pandas as pd
import yaml
from bokeh.embed import components
from bokeh.layouts import row
from bokeh.models import (
ColumnDataSource,
CrosshairTool,
HoverTool,
PanTool,
Range1d,
ResetTool,
SaveTool,
)
from bokeh.palet... | {"hexsha": "28dea7b6754c70aa3e1e99283878f65a6fd6d595", "size": 7849, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/webplots.py", "max_stars_repo_name": "ericmjl/flu-sequence-predictor", "max_stars_repo_head_hexsha": "33eab076222e3c5c0e0d886da8d69ad2e61eb0ef", "max_stars_repo_licenses": ["BSD-3-Clause"], ... |
\setlist[coloritemize]{label=\textcolor{itemizecolor}{\textbullet}}
\colorlet{itemizecolor}{.}% Default colour for \item in itemizecolor
\setlength{\parindent}{0pt}% Just for this example
\colorlet{itemizecolor}{black}
\begin{coloritemize}
\item Black is Examiners Question
\end{coloritemize}
\colorlet{itemizeco... | {"hexsha": "f42998de221faccf6b8bd7e34615e4ea09c47186", "size": 4794, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "DistributedSystems-master/LaTeX-Project-WriteUp/chapters/2016-17DB.tex", "max_stars_repo_name": "OmalleyTomas98/4thYearPapersSolution-Master", "max_stars_repo_head_hexsha": "67d02f691de2f880d9cb6e5b... |
##############################################################################################################################
# This program takes a starting image frame and the events recorded, performs delta modulation and displays the output
# Author: Ashish Rao M
# email: ashish.rao.m@gmail.com
###################... | {"hexsha": "40689ded6c84afdc8205c6ed6443930638084240", "size": 1726, "ext": "py", "lang": "Python", "max_stars_repo_path": "deltaModulate.py", "max_stars_repo_name": "ashishrao7/Neuromorphic-Sampling", "max_stars_repo_head_hexsha": "ab921456ebcada361c64f24cd0fd727771d1acd8", "max_stars_repo_licenses": ["MIT"], "max_sta... |
[STATEMENT]
lemma Part_Collect: "Part (A \<inter> {x. P x}) h = (Part A h) \<inter> {x. P x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Part (A \<inter> {x. P x}) h = Part A h \<inter> {x. P x}
[PROOF STEP]
by blast | {"llama_tokens": 101, "file": "Statecharts_Contrib", "length": 1} |
#!python3
"""
Utility functions for solving optimization problems using a sequence of CVXPY solvers.
CVXPY supports many solvers, but some of them fail for some problems.
Therefore, for robustness, it may be useful to try a list of solvers, one at a time,
until the first one that succeeds.
"""
import cvxpy
DEF... | {"hexsha": "dd937d6fa819c6d16eeaae0b448c6f2bc92e191e", "size": 3202, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/numberpartitioning/solve.py", "max_stars_repo_name": "erelsgl/numberpartitioning", "max_stars_repo_head_hexsha": "1f7e47adb3861cc38a475017bb3ae20c08d9f8c6", "max_stars_repo_licenses": ["MIT"],... |
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 17 10:23:20 2020
@brief: Serial class for communication over COM port.
@description: Serial connection manager with convenience
methods for connecting to serial, discovering ports
and sending data as a stream of bytes.
@author: Tom Sharkey
@last-modified: 2020-11-09
"""
... | {"hexsha": "1cc6d0ae1b0c8c608920fc538d5795f9f65d00ac", "size": 10804, "ext": "py", "lang": "Python", "max_stars_repo_path": "MotorControlGUI/Python/libs/adiSerial.py", "max_stars_repo_name": "CriticalLink/ArrowCMR", "max_stars_repo_head_hexsha": "d7e45421b8762421aeff660108d1166be83e0d89", "max_stars_repo_licenses": ["M... |
# Copyright 2017 Google Inc.
# 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
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, softwa... | {"hexsha": "b2e4a10fd3935afcdda64bd35f2da440d65c63fa", "size": 19289, "ext": "py", "lang": "Python", "max_stars_repo_path": "interest_point.py", "max_stars_repo_name": "jaipreet92/cv_project1", "max_stars_repo_head_hexsha": "4c8a6ddafa600d6ae6f842daaa6fb55a319fa347", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
import jax.numpy as jnp
from jax import lax
from onnx_jax.handlers.backend_handler import BackendHandler
from onnx_jax.handlers.handler import onnx_op
@onnx_op("ConvTranspose")
class ConvTranspose(BackendHandler):
@classmethod
def _common(cls, node, inputs, **kwargs):
return onnx_conv_transpose(*inpu... | {"hexsha": "46a8a8ae2349293f1255c86150c790bd4040ca34", "size": 3813, "ext": "py", "lang": "Python", "max_stars_repo_path": "onnx_jax/handlers/backend/conv_transpose.py", "max_stars_repo_name": "gglin001/onnx_jax", "max_stars_repo_head_hexsha": "08e2a1181250db48f4436f6430903fc895a3a1d6", "max_stars_repo_licenses": ["Apa... |
module Friend
export remove_nb
function remove_nb(n)
Σ = (n*(n+1)) ÷ 2
result = Tuple{Int64,Int64}[]
for a in 1:n
b = ((Σ+1)÷(a+1))-1
if 1 ≤ b ≤ n && Σ-a-b == a*b
push!( result, (a,b) )
end
end
result
end
end | {"hexsha": "027e3966f589d3409b6d9f145daea75f3d262572", "size": 320, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "5_kyu/Is_my_friend_cheating.jl", "max_stars_repo_name": "UlrichBerntien/Codewars-Katas", "max_stars_repo_head_hexsha": "bbd025e67aa352d313564d3862db19fffa39f552", "max_stars_repo_licenses": ["MIT"],... |
import tensorflow as tf
import numpy as np
from typing import Tuple
class SparseDataValue(object):
"""
Sparse representation of dense tensor value. Differs to tf.SparseTensorValue representation because only
spatial indices are stored; it is assumed that all channels have the same set of active sites.
... | {"hexsha": "43618568d06b8aec019a3ef59cdafa153057a47b", "size": 3001, "ext": "py", "lang": "Python", "max_stars_repo_path": "sparse_cnn_tensorflow/sparse_data_value.py", "max_stars_repo_name": "IdRatherBeCoding/sparse_cnn", "max_stars_repo_head_hexsha": "bb5110f527ff8e148777decf4628455780f565c1", "max_stars_repo_license... |
# Create dataset of randomly rotated images
# Use this to create a dataset of rotated images for testing or supply your own
import cv2
from imutils import paths
import numpy as np
import progressbar
import argparse
import imutils
import random
import os
if __name__ == "__main__":
ap = argparse.ArgumentParser()
... | {"hexsha": "dd09bed5a8fbffdb7fdbf0a45e50f241b56129ee", "size": 1692, "ext": "py", "lang": "Python", "max_stars_repo_path": "create_dataset.py", "max_stars_repo_name": "cheeyeo/transfer_learning_portfolio_example_2", "max_stars_repo_head_hexsha": "7f7ea4726a8b91a95aa5a8bd2fe1256e1c97f22c", "max_stars_repo_licenses": ["M... |
//==================================================================================================
/*!
@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": "10157fc792b214e6485c4fd5e32d56bee64d429f", "size": 3371, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/function/simd/fma.regular.cpp", "max_stars_repo_name": "TobiasLudwig/boost.simd", "max_stars_repo_head_hexsha": "c04d0cc56747188ddb9a128ccb5715dd3608dbc1", "max_stars_repo_licenses": ["BSL-1.0"... |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
from scipy.interpolate import spline
from matplotlib import rc
from csv_utils import read_from_csv
rc('font', **{'family': 'serif', 'serif': ['Computer Modern']})
rc('text', usetex=True)
def plot_scores(scores, filename):
... | {"hexsha": "0f170ac1ba5aeb21e4ca37c98cd50f4b29051ac3", "size": 970, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotter.py", "max_stars_repo_name": "seanstappas/qbert-reinforcement-learning", "max_stars_repo_head_hexsha": "3d9c8b0821ba6df07d1711c0199a6e876ebc4ad7", "max_stars_repo_licenses": ["MIT"], "max_st... |
module Main
import Data.Hash
main : IO ()
main = do printLn $ hash (the Bits8 3)
printLn $ hash (the (List Bits8) [3])
printLn $ hash "hello world"
printLn $ hash 'a'
printLn $ hash (the Bits8 3)
printLn $ hash (the Bits16 3)
printLn $ hash (the Bits32 3)
... | {"hexsha": "68c31f7c508fd8fd8069e1796304a8e185dd15f1", "size": 598, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "test/idris-dev/basic011/basic011.idr", "max_stars_repo_name": "grin-compiler/idris-grin", "max_stars_repo_head_hexsha": "0514e4d41933143223cb685e23f450dcbf3d5593", "max_stars_repo_licenses": ["BSD-... |
import sympy as sp
# functions and symbols
from pyinduct.examples.string_with_mass.utils import sym
m, lam, om, theta = sym.m, sym.lam, sym.om, sym.theta
eta = sp.Function("eta", real=True)(theta)
tau = sp.Function("tau", real=True)(theta)
epsilon = sp.Symbol("epsilon", real=True)
# eigenvector for lambda = 0
eta10 ... | {"hexsha": "09d805efda3fa2a6777023cab934129ebbbf8feb", "size": 4352, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyinduct/examples/string_with_mass/observer_evp_scripts/evp_primal_nf.py", "max_stars_repo_name": "riemarc/pyinduct", "max_stars_repo_head_hexsha": "5c407b6ae301be76639d464d43a20ba3fafd7e66", "max... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
TRAPPIST-1 constraints and prior distributions
"""
import numpy as np
from scipy.stats import norm
from trappist import utils
__all__ = ["kwargsTRAPPIST1", "LnPriorTRAPPIST1", "samplePriorTRAPPIST1",
"LnFlatPriorTRAPPIST1"]
# Observational constraints
bet... | {"hexsha": "dc9cdaa38afa3cb721f13bf71e0aaea28f0ae781", "size": 5870, "ext": "py", "lang": "Python", "max_stars_repo_path": "mcmc/trappist1.py", "max_stars_repo_name": "jbirky/trappist_xuv", "max_stars_repo_head_hexsha": "a38a1478bf56cb911713a834e7a56d51e1818bb4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
subroutine kompbs(l )
!----- GPL ---------------------------------------------------------------------
!
! Copyright (C) Stichting Deltares, 2011-2016.
! ... | {"hexsha": "5fe7cb8d842d1ec5fb3de6c4a4fc87374694f7a9", "size": 17816, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "docker/water/delft3d/tags/v6686/src/engines_gpl/flow2d3d/packages/io/src/preprocessor/kompbs.f90", "max_stars_repo_name": "liujiamingustc/phd", "max_stars_repo_head_hexsha": "4f815a738abad43531... |
from sklearn.base import TransformerMixin, BaseEstimator
from gensim.models import LdaMulticore, CoherenceModel
from gensim.corpora import Dictionary
from gensim.matutils import corpus2dense, corpus2csc
import numpy as np
class GensimLDAVectorizer(BaseEstimator, TransformerMixin):
def __init__(self, num_topics, r... | {"hexsha": "7d669b2af84a7aba225395bacd2823ccffaaec2b", "size": 3161, "ext": "py", "lang": "Python", "max_stars_repo_path": "lda_classification/model/gensim_lda_vectorizer.py", "max_stars_repo_name": "FeryET/lda_classification", "max_stars_repo_head_hexsha": "530f972b8955c9f51668475ef640cb644f9b3ab7", "max_stars_repo_li... |
import numpy
import copy
class CreateEQ3Band:
"""Creating a 3Band FFT EQ audio-effect class/device.
Can be used to manipulate frequencies in your audio numpy-array.
Is based on Robert Bristow-Johnson's Audio EQ Cookbook.
Is the slower one, the faster, FFT based one being CreateEQ3BandFFT.
Is NOT o... | {"hexsha": "1b14a4466f7c763cf62f57ac5b452842a0839e09", "size": 8692, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyAudioDspTools/EffectEQ3Band.py", "max_stars_repo_name": "stefanh-it/pyaudiodsptools", "max_stars_repo_head_hexsha": "3836117b02b43acb14488d7c8b3718a270c527be", "max_stars_repo_licenses": ["MIT"]... |
import numpy as np
import sys
sys.path.insert(0, './breast_segment/breast_segment')
from breast_segment import breast_segment
from matplotlib import pyplot as plt
import PIL
import cv2
import warnings
from medpy.filter.smoothing import anisotropic_diffusion
import math
import random
import statistics
import os
DEBUG =... | {"hexsha": "4e944e6f79b8c83bb7e8f88bbb2db7e2afcbd7ba", "size": 29563, "ext": "py", "lang": "Python", "max_stars_repo_path": "Solution3/Code/breast_muscle_segmentation.py", "max_stars_repo_name": "skywolf829/DeepMammo", "max_stars_repo_head_hexsha": "1297bfd9d4d6a292b050996fcacfa299db7271f3", "max_stars_repo_licenses": ... |
import torch
import os
import numpy as np
import pandas as pd
from pathflowai.utils import segmentation_predictions2npy, create_train_val_test
from os.path import join
# from large_data_utils import *
from pathflowai.datasets import DynamicImageDataset, get_data_transforms, get_normalizer
from pathflowai.models import... | {"hexsha": "f64e05c54576399a4b67bac2e237bc8d6384de04", "size": 44585, "ext": "py", "lang": "Python", "max_stars_repo_path": "pathflowai/model_training.py", "max_stars_repo_name": "sumanthratna/PathFlowAI", "max_stars_repo_head_hexsha": "70324e78da7ad9452789478b9be7cc76515ea3ab", "max_stars_repo_licenses": ["MIT"], "max... |
/-
Copyright (c) 2021 Markus Himmel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Markus Himmel
-/
import category_theory.monoidal.functor
/-!
# The free monoidal category over a type
Given a type `C`, the free monoidal category over `C` has as objects formal expre... | {"author": "jjaassoonn", "repo": "projective_space", "sha": "11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce", "save_path": "github-repos/lean/jjaassoonn-projective_space", "path": "github-repos/lean/jjaassoonn-projective_space/projective_space-11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce/src/category_theory/monoidal/free/basic.l... |
abstract type EllipticalCopula{d,MT} <: Copula{d} end
# N(::Type{EllipticalCopula) = @error "Not Implemented"
# U(::EllipticalCopula) = @error "Not Implemented"
Base.eltype(C::CT) where CT<:EllipticalCopula = Base.eltype(N(CT)(C.Σ))
function Distributions._rand!(rng::Distributions.AbstractRNG, C::CT, x::AbstractVec... | {"hexsha": "c01c94536e43a37603f6ee0efd5539b95a1877ff", "size": 1040, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/EllipticalCopula.jl", "max_stars_repo_name": "lrnv/Copulas.jl", "max_stars_repo_head_hexsha": "97695c7e89275d07d44274c494fed0359625cf30", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
"""
Currently TF/Keras has issues exporting the combined model from two different
trained models. One alternative (although fussy) is to "recreate" an merged
untrained version of the model and manually set the weights per layer from the
trained models. This approach is pursued below
"""
###############################... | {"hexsha": "83083dd418740e84558da6ccc3707ca317ff6f5e", "size": 4020, "ext": "py", "lang": "Python", "max_stars_repo_path": "03-Models/combine.py", "max_stars_repo_name": "markusmeingast/Spiced-Final-Presentation", "max_stars_repo_head_hexsha": "dc3b6ab244dbf07ac3634dd5935dfbcfef231da5", "max_stars_repo_licenses": ["MIT... |
[STATEMENT]
lemma minus_divide_left [simp]:
"a \<in> carrier R \<Longrightarrow> b \<in> carrier R \<Longrightarrow> b \<noteq> \<zero> \<Longrightarrow> \<ominus> (a \<oslash> b) = \<ominus> a \<oslash> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>a \<in> carrier R; b \<in> carrier R; b \<noteq> \<z... | {"llama_tokens": 183, "file": null, "length": 1} |
"""Module for the Vector class."""
import math
from typing import cast
import numpy as np
from matplotlib.axes import Axes
from mpl_toolkits.mplot3d import Axes3D
from skspatial._functions import np_float
from skspatial.objects._base_array import _BaseArray1D
from skspatial.plotting import _connect_points_3d
from sk... | {"hexsha": "82d49d3cb5803ff9828db8f71d0bedee73f8f4e3", "size": 17570, "ext": "py", "lang": "Python", "max_stars_repo_path": "skspatial/objects/vector.py", "max_stars_repo_name": "yamila-moreno/scikit-spatial", "max_stars_repo_head_hexsha": "e763c1fdd518570f184d6d353e57c0f5adb9ba16", "max_stars_repo_licenses": ["BSD-3-C... |
subroutine makefile(ch)
c
C THIS IS MAKEFILE27
c copied from makefile4, to try to find ion acoustic waves
c like Thejappa found, in FFTH data.
c Examples are: 2000/11/08 23:58:58
c 2001/08/12 18:07:55
c 2000/03/04 after 1200
c
integer*4 ch,ok,okt,OK2,SCETI4(2),NDATA(1025)
INTEGER*4 W_CHANNEL_CLOSE,W_EVENT,R... | {"hexsha": "137346d37963672d1d143846c9600bdb4675254c", "size": 5249, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "WAVES_VMS_Fortran/PJK_Fortran/wind_dir/makefile27_37.for", "max_stars_repo_name": "lynnbwilsoniii/Wind_Decom_Code", "max_stars_repo_head_hexsha": "ef596644fe0ed3df5ff3b462602e7550a04323e2", "max... |
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import cross_val_score
from scipy.io import mmread
import numpy as np
malware_classes = ["Agent", "AutoRun", "FraudLoad", "FraudPack", "Hupigon", "Krap",
"Lipler", "Magania", "None", "Poison", "Swizzor", "Tdss",
"VB"... | {"hexsha": "b5338554f27474d9e4556f7bfcd5fe62b4a75ee2", "size": 1899, "ext": "py", "lang": "Python", "max_stars_repo_path": "walter/basic_classify.py", "max_stars_repo_name": "sandias42/mlware", "max_stars_repo_head_hexsha": "f365623c4efcf54c539c1dc95e569fab80c90286", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import numpy as np
import matplotlib.pyplot as plt
from obspy.signal.tf_misfit import cwt
class ImageModel:
"""
Currently supports only mono signal
"""
def generate_morlet_scalogram(self, signal, image_path):
axis = signal.ndim - 1
signal_length = signal.shape[axis]
t = np.lins... | {"hexsha": "e64119e0baada4d50e4aea2b6b1cd85266195ba6", "size": 1026, "ext": "py", "lang": "Python", "max_stars_repo_path": "Models/ImageModel.py", "max_stars_repo_name": "xuhaoteoh/car-sound-classification-with-keras", "max_stars_repo_head_hexsha": "7c71c6e8b200aac24da78462b2820baceec9e087", "max_stars_repo_licenses": ... |
[STATEMENT]
lemma (in Graph) isSimplePath_append[split_path_simps]:
"isSimplePath s (p1@p2) t
\<longleftrightarrow> (\<exists>u.
isSimplePath s p1 u
\<and> isSimplePath u p2 t
\<and> set (pathVertices_fwd s p1) \<inter> set (pathVertices_fwd u p2) = {u})"
(is "_ \<longleftrightarrow> ?R")
[... | {"llama_tokens": 932, "file": "Flow_Networks_Graph", "length": 3} |
import argparse
import json
import logging
import numpy as np
import pandas as pd
import random
from pyspark import SparkConf, SparkContext
from pyspark.sql import Row, SQLContext
from pyspark.sql.types import FloatType, TimestampType
from connect_to_cassandra import cassandra_connection , close_cassandra_connection
... | {"hexsha": "362a02dfb44c9a64b35bbaa02ff7fd76890e6b75", "size": 4642, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyspark_cassandra/write_session_cassandra.py", "max_stars_repo_name": "prakashdontaraju/docker-ecommerce", "max_stars_repo_head_hexsha": "29db6be70d3ad82cf719255d0ee1283909be2bea", "max_stars_repo... |
import pandas as pd
import os
import logging
import yfinance as yf
import time
import numpy as np
import mysql.connector
import logging
import sys
from datetime import datetime
log_filename = 'log_stocks_' + time.strftime("%Y-%m-%d %H;%M;%S", time.gmtime()) + '_run' + '.log'
if sys.platform == 'darwin':
log_filepa... | {"hexsha": "cba65c0672f76f279dfb75b383eaad9100d9054c", "size": 7750, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_dev/investigate_market.py", "max_stars_repo_name": "Dloar/stocks_games", "max_stars_repo_head_hexsha": "2b6414faf8d28546b8e81a63b8a0916f3d515cf9", "max_stars_repo_licenses": ["Unlicense"], ... |
from .preprocessing.cross_validation import train_test_split, one_hot_encoded
from .train.callbacks import callback_registry
from .preprocessing.scalers import scaler_registry
from .layers.abstract import layer_registry
from .train.fabric import OptimizatonFabric
from .models.sequental import Sequental
import numpy ... | {"hexsha": "baa43b00ad82a63536c9d908980d48f7b30200d7", "size": 3036, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/big_torch/remote_client.py", "max_stars_repo_name": "Denchidlo/big-torch", "max_stars_repo_head_hexsha": "f5a65e6216e46e6d4fe98670c52618e4cccc8163", "max_stars_repo_licenses": ["MIT"], "max_st... |
<a href="https://colab.research.google.com/github/NeuromatchAcademy/course-content/blob/master/tutorials/W3D1_RealNeurons/W3D1_Tutorial1.ipynb" target="_parent"></a>
# Neuromatch Academy: Week 3, Day 1, Tutorial 1
# Real Neurons: The Leaky Integrate-and-Fire (LIF) Neuron Model
__Content creators:__ Qinglong Gu, Songti... | {"hexsha": "c1c15141e21fe119bd39c12560bcae45bc29e717", "size": 1032940, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "tutorials/W3D1_RealNeurons/W3D1_Tutorial1.ipynb", "max_stars_repo_name": "nipunawe/course-content", "max_stars_repo_head_hexsha": "eca5c9a1ab324d9bf1075fd91d869d7df3fc1d88", "max_s... |
# João Vitor Guino Rieswick nº9283607
# SCC0251 - Prof. Moacir Ponti
# Teaching Assistant: Aline Becher
import numpy as np
import cv2
def draw_boundariesWBC(markers, n_cells, edit_img):
rgb_img = edit_img.copy()
font = cv2.QT_FONT_NORMAL
for k in range(2, n_cells + 2):
contours, hier = cv2.findCo... | {"hexsha": "4c103b3d0b6f673c6da74d3e9aaef5203b2c99a5", "size": 1896, "ext": "py", "lang": "Python", "max_stars_repo_path": "draw.py", "max_stars_repo_name": "Dionen/Classifying-Blood-Cells", "max_stars_repo_head_hexsha": "2af46a8204d4ddc7cfb974013aabbda0103bd5fd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import cv2
import numpy as np
import torch
from torchvision import transforms
from torch.autograd import Variable
import configs as cf
from backend.backend_utils import timer
from backend.saliency.data_loader import SalObjDataset, RescaleT, ToTensorLab, normPRED
@timer
def run_saliency(net, img):
test_salobj_dat... | {"hexsha": "e154372a1a4d0c611b5839e46d82767dee99ba1b", "size": 1143, "ext": "py", "lang": "Python", "max_stars_repo_path": "backend/saliency/infer.py", "max_stars_repo_name": "huyhoang17/KIE_invoice_minimal", "max_stars_repo_head_hexsha": "72b8469195e68c83e7ee373a551bb6dd00cabc7e", "max_stars_repo_licenses": ["MIT"], "... |
[GOAL]
α✝ : Type u_1
β✝ : Type u_2
α : Type u
β : Type v
inst✝¹ : Fintype α
inst✝ : Fintype β
⊢ ∀ (x : α ⊕ β), x ∈ disjSum univ univ
[PROOFSTEP]
rintro (_ | _)
[GOAL]
case inl
α✝ : Type u_1
β✝ : Type u_2
α : Type u
β : Type v
inst✝¹ : Fintype α
inst✝ : Fintype β
val✝ : α
⊢ Sum.inl val✝ ∈ disjSum univ univ
[PROOFSTEP]
s... | {"mathlib_filename": "Mathlib.Data.Fintype.Sum", "llama_tokens": 11911} |
"""
@brief test log(time=2s)
"""
from io import StringIO
import unittest
from logging import getLogger
import numpy
import pandas
from sklearn.gaussian_process.kernels import RBF, ConstantKernel as CK, Sum
from pyquickhelper.pycode import ExtTestCase, ignore_warnings
from pyquickhelper.texthelper.version_helper im... | {"hexsha": "0b02705dc9c9dc956791fa1688850c8277e83131", "size": 11557, "ext": "py", "lang": "Python", "max_stars_repo_path": "_unittests/ut_onnxrt/test_onnxrt_side_by_side.py", "max_stars_repo_name": "henrywu2019/mlprodict", "max_stars_repo_head_hexsha": "4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad", "max_stars_repo_licens... |
import matplotlib.pyplot as plt
import numpy as np
import astropy.coordinates as coord
import astropy.units as u
class Catalog:
'''
This defines a Catalog object, which can be plotted or written
out into a variety of formats.
'''
def __init__(self, coordinates, name="skyofstars", apparentmagnitud... | {"hexsha": "0933d619cefbaab3abd51a77c9d0f7d23de014ae", "size": 3327, "ext": "py", "lang": "Python", "max_stars_repo_path": "skyofstars/catalog.py", "max_stars_repo_name": "zkbt/skyofstars", "max_stars_repo_head_hexsha": "b3ef2615795d34fe77e811ad1e28a6f9a118c4ad", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1... |
#!/usr/bin/env python3
import sys
import os
import re
import logging
import glob
import atexit
import shutil
import copy
import numpy as np
import matplotlib
matplotlib.use('Agg')
from matplotlib.backends.backend_pdf import PdfPages
from csld.util.string_utils import str2arr
from csld.interface_vasp import Poscar
fro... | {"hexsha": "833ba2c91b534646ae41969a61817043eb163eea", "size": 24628, "ext": "py", "lang": "Python", "max_stars_repo_path": "csld/csld_main_functions.py", "max_stars_repo_name": "jsyony37/csld", "max_stars_repo_head_hexsha": "b0e6d5845d807174f24ca7b591bc164c608c99c8", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
# from wildml.com
import random
from keras.preprocessing import sequence
from keras.models import Sequential
from keras.layers.embeddings import Embedding
from keras.layers.recurrent import LSTM, GRU
from keras.layers.core import Dense, Dropout, Activation
import numpy as np
import utils as ut
import nltk
import itert... | {"hexsha": "c9a73551097989baae179dbdbf882fb4b5dafd1b", "size": 6202, "ext": "py", "lang": "Python", "max_stars_repo_path": "experimental_work/code/wordembedding/rnn_imdb.py", "max_stars_repo_name": "fgadaleta/deeplearning-stuff", "max_stars_repo_head_hexsha": "fe023aeeb2ef8a58cc9e5eaf69fc9413674be4d0", "max_stars_repo_... |
# This script is used to collect and analyze the results
import numpy as np
import os
import matplotlib
import matplotlib.pyplot as plt
matplotlib.rcParams.update({'font.size': 17})
import pandas as pd
if __name__ == '__main__':
learning_rate = 1e-3
hidden_size = 1024
IDs = [30600, 30700, 30800, 30900, 309... | {"hexsha": "973377f9668485715e52e952c0f5a825754d0d3c", "size": 4395, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/torch/Processing_Results.py", "max_stars_repo_name": "FAIR-UMN/fair_ecal_monitoring", "max_stars_repo_head_hexsha": "bbbf55451111162c419d414c50367d153a544754", "max_stars_repo_licenses"... |
module CRUDType
@enum CRUD begin
create = 1
retrieve = 2
update = 3
delete = 4
end
end
| {"hexsha": "a7c9f1e91d199e8ecd4041899edd9289dfbe7e11", "size": 133, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/enums/CRUDType.jl", "max_stars_repo_name": "JuliaPostgresORM/PostgresORM.jl", "max_stars_repo_head_hexsha": "ea3cbe36ce35a8f77d71e575d01ed9e56d03f4e6", "max_stars_repo_licenses": ["MIT"], "max_s... |
"""
Tests for intercept
"""
from intercept import intercept
import unittest
import numpy as np
import scipy as sp
# TODO: Create approx equal function
TOLERANCE = 0.01
#############################
# Tests
#############################
# pylint: disable=W0212,C0111,R0904
class TestIntercept(unittest.TestCase):
... | {"hexsha": "33ce20bab10fdfd1b2a1016bf49fa898782105fc", "size": 1110, "ext": "py", "lang": "Python", "max_stars_repo_path": "mysite/scisheets/plugins/test_intercept.py", "max_stars_repo_name": "ScienceStacks/JViz", "max_stars_repo_head_hexsha": "c8de23d90d49d4c9bc10da25f4a87d6f44aab138", "max_stars_repo_licenses": ["Art... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.