text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
\section{Implementation and Deployment}
\label{sec:implementation_and_deployment_details}
In this chapter the implementation details for a proof-of-concept prototype of the proposed solution, as well as the deployment procedures for it are discussed, with in-depth explanations of the components of the system and th... | {"hexsha": "ad1d3b74a936c85d866a3b6f1494926dec4b137a", "size": 32227, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "thesis/chapters/7-implementation_deployment.tex", "max_stars_repo_name": "FilipeCapela98/SSI-IoT-PoC", "max_stars_repo_head_hexsha": "b1761565ed551c0ffdad4c1d6b9aa652eda3dfed", "max_stars_repo_lice... |
__all__ = ["data_chooser", "split_data", "threshold_subset", "clean_data",
"stoi"]
import numpy as np
import re
import os
from pathlib import Path
from tqdm.auto import tqdm
def data_chooser(path, destine, threshold=35):
"""
Clean data with 2 steps:
- The first paragraph containing the metad... | {"hexsha": "cfe6a6155c0e9fdef7fd8ba750f9c9c11732c214", "size": 5247, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_files/nlputils.py", "max_stars_repo_name": "Wabinab/NLP_GroupProject_DG", "max_stars_repo_head_hexsha": "5ed5eb5cacc59dbac1d208fd6df83744c89f3bbc", "max_stars_repo_licenses": ["Apache-2.0"]... |
import numpy as np
def get_display_time(elapsed_seconds):
"""
Returns the readable format of Time elapsed in Hours, Min and seconds
:param elapsed_seconds:
:return:
"""
hours, minutes, sec = 0, 0, 0
import math
if elapsed_seconds > 60 * 60:
hours = math.floor(int(elapsed_second... | {"hexsha": "c872e54e6cc9764868d1b3929e50d3057a94f676", "size": 967, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/misc.py", "max_stars_repo_name": "maindolaamit/mllib", "max_stars_repo_head_hexsha": "03f46089b1d6661dcc3245118b7d108d124e645c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
[STATEMENT]
lemma Crypt_Hash_imp_sign: "[| evs \<in> p2; A \<notin> bad |] ==>
Crypt (priK A) (Hash X) \<in> parts (spies evs)
\<longrightarrow> (\<exists>B Y. Says A B Y \<in> set evs \<and> sign A X \<in> parts {Y})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>evs \<in> p2; A \<notin> bad\<rbrakk> \<Lo... | {"llama_tokens": 19605, "file": null, "length": 29} |
import sys
import os
import random
import copy
import logging
import argparse
import paddle
import numpy as np
from seqeval.metrics import classification_report, f1_score, precision_score, recall_score
from paddlenlp.transformers import LayoutXLMModel, LayoutXLMTokenizer, LayoutXLMForTokenClassification
from xfun impo... | {"hexsha": "50540742c5a89ba75771926782d99629a8ab6c1c", "size": 13739, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/multimodal/layoutxlm/run_xfun_ser.py", "max_stars_repo_name": "mukaiu/PaddleNLP", "max_stars_repo_head_hexsha": "0315365dbafa6e3b1c7147121ba85e05884125a5", "max_stars_repo_licenses": ["A... |
import os
import itertools
from tempfile import mkstemp, TemporaryDirectory as InTemporaryDirectory
import pytest
import numpy as np
import numpy.testing as npt
from scipy.ndimage.measurements import center_of_mass
from fury import shaders
from fury import actor, window
from fury.actor import grid
from fury.decorator... | {"hexsha": "ed1fe64a5222216aab8aa4ec9bb17559238152f1", "size": 45999, "ext": "py", "lang": "Python", "max_stars_repo_path": "fury/tests/test_actors.py", "max_stars_repo_name": "Soumi7/fury", "max_stars_repo_head_hexsha": "1c369a8590d5fa5eaa8948431a6d378bb6a678a6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars... |
from functools import reduce
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import os
import yaml
from matplotlib import cm
import pymongo
import matplotlib
from matplotlib.backends.backend_pdf import PdfPages
from matplotlib.lines import Line2D
from matplotlib.patches import Rectangle
from co... | {"hexsha": "37061e0c420d7bf2c869932af34f099cf61b5c43", "size": 13658, "ext": "py", "lang": "Python", "max_stars_repo_path": "plots/plots/weight_distribution.py", "max_stars_repo_name": "pps-lab/rofl-project-code", "max_stars_repo_head_hexsha": "eaa9f1aeca3a40ca939c0f723af0186af0f95f9b", "max_stars_repo_licenses": ["MIT... |
[STATEMENT]
lemma (in Semilat) ub1 [simp, intro?]: "\<lbrakk> x \<in> A; y \<in> A \<rbrakk> \<Longrightarrow> x \<sqsubseteq>\<^sub>r x \<squnion>\<^sub>f y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>x \<in> A; y \<in> A\<rbrakk> \<Longrightarrow> x \<sqsubseteq>\<^bsub>r\<^esub> x \<squnion>\<^bsub>f... | {"llama_tokens": 254, "file": "Jinja_DFA_Semilat", "length": 2} |
# Copyright 2018-2020 Xanadu Quantum Technologies 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
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or... | {"hexsha": "b17c900c6559617521ac381619280853dda7bf6e", "size": 3448, "ext": "py", "lang": "Python", "max_stars_repo_path": "pennylane/qaoa/mixers.py", "max_stars_repo_name": "vijpandaturtle/pennylane", "max_stars_repo_head_hexsha": "cd04be10da680087f4312761ca16aa357864790a", "max_stars_repo_licenses": ["Apache-2.0"], "... |
###########################################
## RITVIK KHARKAR
## UCLA CLASS OF 2017
## COMPUTATIONAL MATHEMATICS & ECONOMICS
## www.ritvikmath.com
## SEPT 2016
###########################################
from pulp import *
import numpy as np
import pandas as pd
from random import s... | {"hexsha": "e6dd1fa9f8940c7c47ce462f66356e57f6cf64c0", "size": 12640, "ext": "py", "lang": "Python", "max_stars_repo_path": "SADIE/SADIE.py", "max_stars_repo_name": "ritvikmath/ritvikmath.github.io", "max_stars_repo_head_hexsha": "ce413180d5d3344690d36d79b5969d62db291c09", "max_stars_repo_licenses": ["MIT"], "max_stars... |
"""This script sorts the data for facilities for the last 2 years
to identify just the publications that at least one facility identifies
as involved in technology development"""
import pandas as pd
import numpy as np
from fac_map import df
techdev_df = df
techdev_df["Qualifiers"] = techdev_df["Qualifiers"].replace... | {"hexsha": "fec8015c2fa0e5e04d6727e6e225b3ad0e95abb3", "size": 5393, "ext": "py", "lang": "Python", "max_stars_repo_path": "chord/filter_techdev.py", "max_stars_repo_name": "ScilifelabDataCentre/IAB_2021", "max_stars_repo_head_hexsha": "cefe4fd46a9c8865d868bd05b60a1bb32deebda0", "max_stars_repo_licenses": ["MIT"], "max... |
# This demo replicates Figure 2 of the paper
# "Measuring the Intrinsic Dimension of Objetive Landscape"
# By Li et al. (https://arxiv.org/abs/1804.08838)
# We consider a 2-layer MLP with ReLU activations
# Code based on the following repos:
# * https://github.com/ganguli-lab/degrees-of-freedom
# * https://github.com/u... | {"hexsha": "81d4b182ad101db7c6e6f0c4e81c53c60e269532", "size": 4491, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/subspace_optimize_demo.py", "max_stars_repo_name": "XGX-CURRY/pyprobml", "max_stars_repo_head_hexsha": "83de364cb4228405d621c9392b2dbf3555b5b77c", "max_stars_repo_licenses": ["MIT"], "max_... |
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
import tensorflow_probability as tfp
import tensorflow as tf
import pyarrow as pa
import pyarrow.parquet as pq
from pr3d.nonbayesian import GammaEVM, ConditionalGammaEVM
from .utils.dataset import create_dataset, load_parquet
... | {"hexsha": "f8125dfb8af1587fe56cd7cd9a343f7aebdef456", "size": 2740, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_sampling.py", "max_stars_repo_name": "samiemostafavi/conditional-latency-probability-prediction", "max_stars_repo_head_hexsha": "a196f2db8c6f30f8613797b6a23bffd77a01e1e3", "max_stars_repo_lic... |
#include <boost/fiber/algo/numa/work_stealing.hpp>
| {"hexsha": "00d5fcfbea04819bec9a863637dc101830a6e558", "size": 51, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_fiber_algo_numa_work_stealing.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": [... |
"""
# Example call:
cd path/where/to/store/simulation/results
# Define how you want to parallelize.
# Note: The mixture models need significant more computation power.
# ccsalloc is an HPC scheduler, and this command requests 50 workers and each has 2GB memory
run="ccsalloc --res=rset=50:mem=2g:ncpus=1 --tracefile=om... | {"hexsha": "80d39adb64ba924732a64e13236c138ba578481b", "size": 24483, "ext": "py", "lang": "Python", "max_stars_repo_path": "sms_wsj/examples/reference_systems.py", "max_stars_repo_name": "boeddeker/sms_wsj", "max_stars_repo_head_hexsha": "534872474fd893b12166768ed398c903d0a66f03", "max_stars_repo_licenses": ["MIT"], "... |
import sys
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
def plot_data (data):
plt.grid()
plt.plot(data[:,0], data[:,1], label="PMJ Delay tuning - NminPMJ=60", c="black", linewidth=2.0, marker='o')
plt.xlabel(r"$R_{PMJ}$ ($M \Omega$)",fontsize=15)
plt.ylabel("PMJ delay (ms)",fo... | {"hexsha": "02f45d998687666db69f7072eaa42910e10767fb", "size": 1233, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/tunePMJ/scripts/plot.py", "max_stars_repo_name": "bergolho/MonoAlg3D_C", "max_stars_repo_head_hexsha": "4a9ad99a94c7aa047427bbd36cce1a7d8b17d195", "max_stars_repo_licenses": ["MIT"], "max_... |
import os
import sys
import numpy as np
try:
import pymake
except:
msg = 'Error. Pymake package is not available.\n'
msg += 'Try installing using the following command:\n'
msg += ' pip install https://github.com/modflowpy/pymake/zipball/master'
raise Exception(msg)
try:
import flopy
except:
... | {"hexsha": "6c2d768c3ea6d9066e527b669be71a244ae7e2f4", "size": 14577, "ext": "py", "lang": "Python", "max_stars_repo_path": "autotest/test_gwt_moc3d01.py", "max_stars_repo_name": "verkaik/modflow6-parallel", "max_stars_repo_head_hexsha": "fac2892612d044634b9527fc7a417530ed43ca8f", "max_stars_repo_licenses": ["CC0-1.0"]... |
PROGRAM INITIALIZE
IMPLICIT NONE
open(unit=23,file="parameters.inc")
call setpara('param_card.dat') !first call to setup the paramaters
close(23)
end
| {"hexsha": "855b291e3a4fc80907512da87998a751a1abec24", "size": 190, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MadSpin/src/initialize.f", "max_stars_repo_name": "valassi/mg5amc_test", "max_stars_repo_head_hexsha": "2e04f23353051f64e1604b23105fe3faabd32869", "max_stars_repo_licenses": ["NCSA"], "max_stars_co... |
import os
import numpy as np
import pandas as pd
data_dir = os.path.dirname(__file__)
with open(os.path.join(data_dir, 'geography_names.txt')) as f:
geography_names = [name[:-1] for name in f.readlines()]
with open(os.path.join(data_dir, 'names.txt')) as f:
names = [name[:-1] for name in f.readlines()]
N = ... | {"hexsha": "2800831c79462ccd8d3e4275aa2fd8ae7b7d1032", "size": 1398, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/data/data_gen.py", "max_stars_repo_name": "airbnb/mensor", "max_stars_repo_head_hexsha": "8127d163b180811d17afea21c85640f2ce48bf73", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 48... |
include("DGFVModel_kernels.jl")
struct DGFVModel{BL, G, FVR, NFND, NFD, GNF, AS, DS, HDS, D, DD, MD, GF, TF} <:
SpaceDiscretization
balance_law::BL
grid::G
fv_reconstruction::FVR
numerical_flux_first_order::NFND
numerical_flux_second_order::NFD
numerical_flux_gradient::GNF
state_auxil... | {"hexsha": "dd2464b1dc96e92427088ed7c3dc8e9e19581ad5", "size": 10395, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Numerics/DGMethods/DGFVModel.jl", "max_stars_repo_name": "ErikQQY/ClimateMachine.jl", "max_stars_repo_head_hexsha": "ad128d457dd877bf21b5bcd845d6c3fa42de3f8a", "max_stars_repo_licenses": ["Apa... |
! { dg-do compile }
! { dg-additional-options "-O -Wfrontend-loop-interchange" }
PROGRAM TEST_DO_SPEED
IMPLICIT NONE
REAL, ALLOCATABLE :: A(:,:,:), B(:,:,:), C(:,:,:)
REAL :: TIC
INTEGER :: T0, T1, T2
INTEGER :: I, J, K
INTEGER, PARAMETER :: L = 512, M = 512, N = 512
ALLOCATE( A(L,M,N), B(L,M,N), C(L,M,... | {"hexsha": "a061e28b35ad2a9a820968cb91d4b5387c5173fe", "size": 530, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/loop_interchange_1.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_re... |
# Generalized Adaptive Solvers
# as described in Kottmann, Anand, Aspuru-Guzik: https://doi.org/10.1039/D0SC06627C
from tequila import QCircuit, QubitHamiltonian, gates, paulis, grad, simulate, TequilaWarning, TequilaException, minimize, ExpectationValue
import numpy
import dataclasses
import warnings
from itertools i... | {"hexsha": "b410b0152621cf0a20e58c6888ba6ff5c82c1e98", "size": 16447, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tequila/apps/adapt/adapt.py", "max_stars_repo_name": "doomspec/tequila", "max_stars_repo_head_hexsha": "28979009a79fa6288d2892f01ae18c02f96792e6", "max_stars_repo_licenses": ["MIT"], "max_sta... |
#!/usr/bin/env python
# Author: Giacomo Vianello (giacomov@stanford.edu)
##############
# Produce background maps for XMM EPIC via smart smoothing
##############
import argparse
import logging
import astropy.io.fits as pyfits
import numpy
import os
from astropy.convolution import Gaussian2DKernel
log = None
def ... | {"hexsha": "0cb87eec9556959f2c5e9461e85b7555e2a6a301", "size": 8713, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/xmm/xtbgmap.py", "max_stars_repo_name": "giacomov/XtDac", "max_stars_repo_head_hexsha": "60eb1f1d492c7ab3099731738c257955502194a6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun... |
printstyled(" SAC support extensions\n", color=:light_green)
printstyled(" writesac from SeisEvent\n", color=:light_green)
writesac(rse_wb(8))
sac_file = path*"/SampleFiles/SAC/test_le.sac"
f_stub = "1981.088.10.38.23.460"
f_out = f_stub * "..CDV...R.SAC"
sacv7_out = "v7_out.sac"
test_fs = 50.0... | {"hexsha": "5c0326ffe85865cda705a4ea73fe45b3db58896a", "size": 2699, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Quake/test_format_ext.jl", "max_stars_repo_name": "jpjones76/SeisIO.jl", "max_stars_repo_head_hexsha": "ddbb529b9c9b158df83f1a438facae08fc44d680", "max_stars_repo_licenses": ["MIT"], "max_star... |
import numpy as np
from sklearn.preprocessing import PolynomialFeatures
from sklearn.model_selection import train_test_split
from sklearn import linear_model
from sklearn.metrics import mean_squared_error
x1 = np.random.normal(0, 10, 1000)
x2 = np.random.normal(10, 1, 1000)
X = np.zeros((1000, 2))
X[:,0] = x1
X[:,1] ... | {"hexsha": "f8f17ff317af19ee68726b396cdf922ed37a698e", "size": 2638, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lesson07/activity_2.py", "max_stars_repo_name": "TrainingByPackt/Hands-On-Machine-Learning-with-Python", "max_stars_repo_head_hexsha": "4efb37a48374c35ce03d653b117cf87ee6d28b94", "max_stars_repo_l... |
[STATEMENT]
lemma path_avoid_node:
assumes path: "LCons n xs \<in> paths graph"
and set: "x \<in> lset xs"
and n_neq_x: "n \<noteq> x"
shows "\<exists>xs'. LCons n xs' \<in> paths graph \<and> lset xs' \<subseteq> lset xs \<and> x \<in> lset xs' \<and> n \<notin> lset xs'"
[PROOF STATE]
proof (prove)
goal (1 su... | {"llama_tokens": 6796, "file": "Coinductive_Examples_Koenigslemma", "length": 53} |
"""UWahsers for images."""
# %%
import json
import numpy as np
import keras_applications
from tensorflow import keras
from depiction.core import DataType, Task
from depiction.models.keras import KerasApplicationModel
from depiction.interpreters.u_wash import UWasher
# %%
# general utils
def image_preprocessing(image... | {"hexsha": "22c92326f7b7b817be700bf562cde1228a3933f4", "size": 2071, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/uwashers_imagenet.py", "max_stars_repo_name": "IBM/dl-interpretability-compbio", "max_stars_repo_head_hexsha": "3b13394f2dd9614736b4183b407a938a2c5924ac", "max_stars_repo_licenses": ["Apa... |
import mmap
import json
import struct
import sqlite3
import warnings
import datetime
from typing import Iterable, Tuple, Dict, Any, Iterator, Optional, Callable, Set
from pathlib import Path
import numpy
with warnings.catch_warnings():
warnings.simplefilter("ignore")
import h5py
from .serie import Serie
from... | {"hexsha": "b1eb5b1caa3445d1aca07119d7cbc620e8b8e598", "size": 16278, "ext": "py", "lang": "Python", "max_stars_repo_path": "processing/storage.py", "max_stars_repo_name": "koder-ua/influx_export", "max_stars_repo_head_hexsha": "bed70a9e2a9a084fba9926df301c30b139271123", "max_stars_repo_licenses": ["Apache-2.0"], "max_... |
# -*- coding: utf-8 -*-
from bokeh.io import output_file, show
from bokeh.models import GeoJSONDataSource
from bokeh.plotting import figure, ColumnDataSource
from bokeh.models import Range1d, HoverTool, CustomJS
from bokeh.layouts import widgetbox,column,row, gridplot, layout
from bokeh.models.widgets import Dropdown, ... | {"hexsha": "067bd90b0ec6ad0104334fc14b87bd4a7d06a43b", "size": 3718, "ext": "py", "lang": "Python", "max_stars_repo_path": "standalone/bokehmap.py", "max_stars_repo_name": "abaelhe/bokeh-china-map", "max_stars_repo_head_hexsha": "7165ee3afc6897dfbef4f70bd4007490c7b8bfa6", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
#pragma once
#include <skynet/config.hpp>
#include <skynet/core/array.hpp>
#include <skynet/cv/pixel.hpp>
#include <stdexcept>
#include <boost/any.hpp>
namespace skynet{namespace cv{
typedef multi_array<cv::bgr, 2> image_bgr;
typedef multi_array<byte, 2> image_gray;
typedef multi_array<int, 2>... | {"hexsha": "2406534b164dbbdd6db14fa27d174f008eeaac23", "size": 3150, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "skynet/cv/extension/image.hpp", "max_stars_repo_name": "zhangzhimin/skynet", "max_stars_repo_head_hexsha": "a311b86433821a071002dd279d57333baba1f973", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
from bokeh.embed import file_html
from bokeh.layouts import row, column
from bokeh.models import BoxZoomTool, ColumnDataSource, DatetimeTickFormatter, Div, HoverTool, PanTool, ResetTool, SaveTool
from bokeh.plotting import figure
from bokeh.resources import CDN
from bokeh.transform import factor_cmap
import src.amhair... | {"hexsha": "d72e3b35f0bb30e7e2776b3596d1c48572d1445c", "size": 25910, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/amhairc/chartGeneration/generate_chart.py", "max_stars_repo_name": "andrewpenrose/data-viz-python-sdk", "max_stars_repo_head_hexsha": "e27cc07ab919e6b47e4260ee52910a69bda70483", "max_stars_re... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 20 18:10:15 2020
@author: jlee
"""
import time
start_time = time.time()
import numpy as np
import glob, os
import init_cfg as ic
from astropy.stats import sigma_clip
from astropy.io import fits
import tqdm
# ---- Loading the aligned cubes ----- #... | {"hexsha": "d6da7e3a2905b1ff9cc2afbba431395bb17ab87d", "size": 2816, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/combine_cubes.py", "max_stars_repo_name": "joungh93/PyRAF_GMOS_IFU", "max_stars_repo_head_hexsha": "1750caaf846c426cf1fc761ad539f740c8ae64d9", "max_stars_repo_licenses": ["MIT"], "max_sta... |
\chapter{Iterators}
\label{sec:ImageIteratorsChapter}
\index{Iterators!image|(}
\index{Generic Programming}
This chapter introduces the \emph{image iterator}, an important generic
programming construct for image processing in ITK. An iterator is a
generalization of the familiar C programming language pointer used to
r... | {"hexsha": "1c303cbbf132a564db755845251a4cb5fda50b2c", "size": 39050, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Documentation/SoftwareGuide/Latex/Iterators.tex", "max_stars_repo_name": "lfyater/Orfeo", "max_stars_repo_head_hexsha": "eb3d4d56089065b99641d8ae7338d2ed0358d28a", "max_stars_repo_licenses": ["Apac... |
module WaveFD
using Base.Threads, CvxCompress, DSP, Distributed, DistributedArrays, FFTW, LinearAlgebra, NearestNeighbors, Random, SpecialFunctions, StaticArrays, Statistics, WaveFD_jll
import
Base.convert,
Base.copy,
Base.get,
Base.min,
Base.max,
Base.maximum,
Base.show,
Base.size
abstract type Language end
struct ... | {"hexsha": "b70c1333e030f3997e259db2bdc93e9fb1bd9bc8", "size": 1541, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/WaveFD.jl", "max_stars_repo_name": "ChevronETC/WaveFD", "max_stars_repo_head_hexsha": "555cf24fc70835e789a8126a1d9866e25de4a8d3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_... |
# Gaussian Process Classifier demo
# Author: Drishtii@
# Based on
# https://github.com/probml/pmtk3/blob/master/demos/gpcDemo2d.m
# See also gpc_demo_2d_pytorch for a Gpytorch version of this demo.
import superimport
import pyprobml_utils as pml
import numpy as np
import matplotlib.pyplot as plt
from sklearn.gaussia... | {"hexsha": "a3e773f1576ef97a524ac07d96bd9144f25371ce", "size": 1888, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/gpc_demo_2d_sklearn.py", "max_stars_repo_name": "vipavlovic/pyprobml", "max_stars_repo_head_hexsha": "59a2edc682d0163955db5e2f27491ad772b60141", "max_stars_repo_licenses": ["MIT"], "max_st... |
from nose.tools import *
from material import mat_map
from material import mat_lib
import numpy as np
testData_loc = './tests/testData/materials/'
class TestFunctionality:
# Tests to verify the material library class
@classmethod
def setup_class(cls):
files = ['test_mat.xml', 'test_mat2.xml']... | {"hexsha": "b41f242ee3f5b9f37f9383ca4d86e315bbacc4a9", "size": 3930, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/mat_map_tests.py", "max_stars_repo_name": "weixiong-zheng-berkeley/BART-lite", "max_stars_repo_head_hexsha": "ead39f757acab936af815352262080318163debb", "max_stars_repo_licenses": ["MIT"], "... |
import os
import cv2
import numpy as np
import pymysql
import webtest
import time
import json
from flask import Flask, render_template, request, make_response,Response, jsonify, redirect, url_for
from cos_similarity import *
from rate_menu import rate
from settings.config import DB_INFO, GEO_KEY
from naver_order import... | {"hexsha": "6cce7418910ed8d0823bb1b25c6c338e074f842c", "size": 10567, "ext": "py", "lang": "Python", "max_stars_repo_path": "run.py", "max_stars_repo_name": "manzino0705/Hungry_Genie", "max_stars_repo_head_hexsha": "5934f0c278a6bedb9a0ca844b34a24cf3ac6f88d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
"""Graphcal plotting convenience utilities.
"""
__author__ = 'Paul Landes'
import logging
import pylab
from scipy.stats import gaussian_kde
import numpy as np
import matplotlib.pyplot as plt
from . import DeepLearnError
logger = logging.getLogger(__name__)
class PlotManager(object):
"""A Convenience class to g... | {"hexsha": "82352ed2d09f96ae33199629b65a99d503ece036", "size": 4839, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/zensols/deeplearn/plot.py", "max_stars_repo_name": "plandes/deeplearn", "max_stars_repo_head_hexsha": "925f02200c62a7dc798e474ed94a86e009fd1ebf", "max_stars_repo_licenses": ["MIT"], "ma... |
# Copyright 2019, Oath Inc.
# Licensed under the terms of the Apache License, Version 2.0. See LICENSE file for terms.
from ariel import utils, LOGGER
from datetime import timedelta
import numpy as np
import pandas as pd
import operator
import sys
# Two reports to be generated:
# 1) By region / family - % chance a ne... | {"hexsha": "400a8c268407f11ca7deff2b9c1b5da436e5a9c6", "size": 36539, "ext": "py", "lang": "Python", "max_stars_repo_path": "ariel/generate_reports.py", "max_stars_repo_name": "bastille/ariel", "max_stars_repo_head_hexsha": "fc272268596be5867c3d4af7dfbf07418dc30464", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
mutable struct PlaneWaveMW{T,P}
direction::P
polarisation::P
wavenumber::T
amplitude::T
end
function PlaneWaveMW(d,p,k,a = 1)
T = promote_type(eltype(d), eltype(p), typeof(k), typeof(a))
P = similar_type(typeof(d), T)
PlaneWaveMW{T,P}(d,p,k,a)
end
"""
planewavemw3d(;direction, polarization, wa... | {"hexsha": "e6e7bda93eb4487390ace3bcf1430ef658b7ac3e", "size": 5318, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/maxwell/mwexc.jl", "max_stars_repo_name": "RainerHeintzmann/BEAST.jl", "max_stars_repo_head_hexsha": "9bf9f03c38ea3eece6e86327787ed5caa717822e", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
#pragma once
#include "error_handler.hpp"
#include <boost/spirit/home/x3.hpp>
namespace parser {
namespace x3 = boost::spirit::x3;
using x3::error_handler_tag;
using iterator_type = std::string::const_iterator;
// Our Error Handler
using ErrorHandlerType = boost::spirit::x3::error_handler<itera... | {"hexsha": "14d46857951b445f61b435066c80f7d6330ade6c", "size": 589, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "lib/parsing/config.hpp", "max_stars_repo_name": "ml4ai/tomcat-planrec", "max_stars_repo_head_hexsha": "70af6464851c641eb414fd1c818cfb5b1351e079", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
# function ChainRulesCore.rrule(::Interpolations.BSplineInterpolation, T, A, it, axs)
# y = Interpolations.BSplineInterpolation(T, A, it, axs)
# function bspline_pb(Δy)
# return NoTangent(), NoTangent(), Δy, NoTangent(), NoTangent()
# end
# return y, bspline_pb
# end TODO: Remove the rrule later... | {"hexsha": "3973fd9aa499a00d4fba619ac9ba6be26eeb9286", "size": 3534, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/geometry/adjoints.jl", "max_stars_repo_name": "SomTambe/DiffImages.jl", "max_stars_repo_head_hexsha": "890e92796dc66af277432ee550851927ae93f64a", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# some simple helper routines for the SymPy eigenvalue stuff for hydro
import sympy
u, c = sympy.symbols("u c")
plus = u + c
zero = u
minus = u - c
class Eigenvector(object):
def __init__(self, name, ev, r, l=None):
self.name = name
self.ev = ev
self.l = l
self.r = r
def __lt... | {"hexsha": "479b8eb5513c1f394f17105ac13436a89f04bd19", "size": 1905, "ext": "py", "lang": "Python", "max_stars_repo_path": "compressible/eigen_help.py", "max_stars_repo_name": "python-hydro/hydro_examples", "max_stars_repo_head_hexsha": "55b7750a7644f3e2187f7fe338b6bc1d6fb9c139", "max_stars_repo_licenses": ["BSD-3-Clau... |
subroutine a_proc
implicit none
integer :: i
parameter(i = 1)
print *, i
end subroutine a_proc
module a_mod
implicit none
integer :: i
parameter(i = 2)
end module a_mod
program parameter_02
use a_mod, only: i
implicit none
call a_proc()
print *, i
end program
| {"hexsha": "471710500929b3249386ce4bf76331e8451fc1d8", "size": 262, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "integration_tests/parameter_02.f90", "max_stars_repo_name": "Thirumalai-Shaktivel/lfortran", "max_stars_repo_head_hexsha": "bb39faf1094b028351d5aefe27d64ee69302300a", "max_stars_repo_licenses": [... |
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2009-2012. 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)
//
// See http://www.boost.org/libs/interpr... | {"hexsha": "c890c326bc54f32749136458f98251d193c6b48f", "size": 20081, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "deps/cinder/include/boost/interprocess/detail/intermodule_singleton_common.hpp", "max_stars_repo_name": "multi-os-engine/cinder-natj-binding", "max_stars_repo_head_hexsha": "969b66fdd49e4ca63442baf... |
"""Checks for null values regardless of type."""
import collections
import numpy as np
def isNan(val):
"""
Checks for NaN even if not float
:param object val:
:return bool:
"""
if isinstance(val, collections.Iterable):
return False
try:
result = np.isnan(val)
except:
result = False
retu... | {"hexsha": "96393d6b43c403b68dac5d2bfa026a5667e4a9d8", "size": 486, "ext": "py", "lang": "Python", "max_stars_repo_path": "archived_lectures/Fall_2019/common_python/common_python/util/is_null.py", "max_stars_repo_name": "ModelEngineering/topics-course", "max_stars_repo_head_hexsha": "cd0d73e4056663d170465669ecd699e8e74... |
import numpy as np
import gym
from gym import wrappers
import random
import datetime
import time
import dataiku
from dataiku.customrecipe import *
import pickle
def test_q_agent(agent):
# Get the parameters (the common ones)
environment_var = get_recipe_config()['environment']
environment_library_var = g... | {"hexsha": "a36a4cb7d3e2d652ecf347a1fb3f4e725928bf43", "size": 2673, "ext": "py", "lang": "Python", "max_stars_repo_path": "python-lib/q_testing_wrapper.py", "max_stars_repo_name": "dataiku/dss-plugin-reinforcement-learning", "max_stars_repo_head_hexsha": "4101e2bf84949248df2d90d6247f5990ed410af6", "max_stars_repo_lice... |
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import statsmodels.api as sm
import statsmodels.formula.api as smf
from scripts.config import params as plot_params
from locker.analysis import *
from matplotlib import cm
from itertools import repeat
def jitter_yvals(ax, start_range, offset_rang... | {"hexsha": "a61154943a5ce964f3d6947130007165b3fa7d0d", "size": 10502, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/fig8_factors_punit.py", "max_stars_repo_name": "fabiansinz/locker", "max_stars_repo_head_hexsha": "9ca397d0a9aa747552bc43188b07056b87c6e9f0", "max_stars_repo_licenses": ["MIT"], "max_star... |
import numpy as np
import matplotlib.pyplot as plt
def debug(msg, *args):
print(msg.format(*args))
def least_square_average(d, y):
"""
自乗誤差平均を求めます
:param d:教師データ(expected)
:param y:予想(actual)
:return: 自乗誤差平均
"""
return (np.sum(np.square(d - y)) / 2.0) / float(len(d))
def draw_hist... | {"hexsha": "6f9559d27dc3428c0f2e5d230a21306727376bca", "size": 745, "ext": "py", "lang": "Python", "max_stars_repo_path": "ai_chan/util.py", "max_stars_repo_name": "kagyuu/ai-chan", "max_stars_repo_head_hexsha": "1fa5c803ca9fefb1ccf6c9195c8f8015da56bda1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
# using Revise
using mujoco_sim
import Distributions: Uniform
using MatrixEquations
keypath = joinpath(@__DIR__, "../key/mjkey.txt")
activate_mujoco(keypath)
function lqr(A, B, Q, R)
G = B*inv(R)*B'
P = arec(A, G, Q)[1] #continuous ricatti eqn solver
K = inv(R)*B'*P
return K
end
T = 100
mk = 1... | {"hexsha": "008124874e97d4a9064f4c8c03c3e4dd002f0d2f", "size": 1280, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/balance_cartpole.jl", "max_stars_repo_name": "adubredu/mujoco_sim.jl", "max_stars_repo_head_hexsha": "3a53dfd0ac206f7f178263786c65f1a235f00bae", "max_stars_repo_licenses": ["MIT"], "max_st... |
import os
import re
from typing import Dict, Union
from io import BytesIO
import random
from pathlib import Path
import pandas as pd
from PIL import Image
import torchvision
import torch
import msgpack
from argparse import Namespace
import json
import yaml
import numpy as np
import scipy.io
import argparse
parser = a... | {"hexsha": "3d4dc1d28635944086b8df909aefd6f8156d31d9", "size": 20072, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataloader_glimpse.py", "max_stars_repo_name": "ewanowara/geolocalization", "max_stars_repo_head_hexsha": "6fcd26772cc297ee49889463ee42ad025544330a", "max_stars_repo_licenses": ["MIT"], "max_star... |
% ! TeX root = ../erc-B1.tex
\subsection{Bibliometrics and summary of publication activities}
\subsection{10 research highlights}
I now present my achievements through a selection of my publications, in
reverse chronological order. My name appears in bold, names of PhD
students I supervised in italics.
\begin{aspara... | {"hexsha": "40643f3acda5beb9f54426ea310e32d3a04bd02f", "size": 717, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "erc-B1/parts/eatr.tex", "max_stars_repo_name": "DanySK/erc-latex-template", "max_stars_repo_head_hexsha": "fe622d5da70418362549ccf86e629188937a72c7", "max_stars_repo_licenses": ["LPPL-1.3c"], "max_st... |
#! /usr/bin/env python
from argparse import ArgumentParser
from itertools import product as cartesian
import numpy as np
import calib.data as data
import calib.gen as gen
import calib.plot as cplot
import calib.analysis as an
import calib.simulation as sims
def enob_improvement(args, real_snr, ideal_snr, est_snr, ... | {"hexsha": "98d1c7d66694a022043047a873b8f68dfc3a8233", "size": 11288, "ext": "py", "lang": "Python", "max_stars_repo_path": "calib/calib/script/plot_snr.py", "max_stars_repo_name": "jabozzo/delta_sigma_pipe_lascas_2020", "max_stars_repo_head_hexsha": "1351371aa03a12385c6fd9b29cf606ddd421ee18", "max_stars_repo_licenses"... |
import os
import os.path as op
import numpy as np
from nose.tools import assert_true, assert_raises
from numpy.testing import (assert_array_equal, assert_equal, assert_allclose,
assert_almost_equal, assert_array_almost_equal)
import warnings
from mne.datasets import testing
from mne import ... | {"hexsha": "9f81adf4d3acd6a895e182bac0770b953308ba17", "size": 7918, "ext": "py", "lang": "Python", "max_stars_repo_path": "mne/tests/test_transforms.py", "max_stars_repo_name": "ARudiuk/mne-python", "max_stars_repo_head_hexsha": "63feb683cd1f8ddd598a78d12c8ef522f9ca2d78", "max_stars_repo_licenses": ["BSD-3-Clause"], "... |
#!/usr/bin/env python
"""
Convert a storm-control acquired movie .off file into a format
appropriate for use by measure_psf_beads.py. This makes the
following assumptions:
1. The first frame is at z = 0.
2. The drift in z is neglible, so the stagez position is accurate.
Hazen 1/16
"""
import numpy
import sys
def off... | {"hexsha": "f254badf38523dc0a34c8bae7cd82d537c09b84e", "size": 1839, "ext": "py", "lang": "Python", "max_stars_repo_path": "storm_analysis/spliner/offset_to_z.py", "max_stars_repo_name": "bintulab/storm-analysis", "max_stars_repo_head_hexsha": "71ae493cbd17ddb97938d0ae2032d97a0eaa76b2", "max_stars_repo_licenses": ["CNR... |
! Copyright (C) 2014 Science and Technology Facilities Council (STFC)
!
! This is a reimplementation of similar functionality to YM11 based on the
! description in the "Method" section of the YM11 documentation.
!
! FIXME: I don't think the positive definite case is implemented as per doc yet!
module spral_random_matri... | {"hexsha": "c506c3b7bd8e919724f4c92fffac90dcde50cbf6", "size": 13539, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/random_matrix.f90", "max_stars_repo_name": "mjacobse/spral", "max_stars_repo_head_hexsha": "9bf003b2cc199928ec18c967ce0e009d98790898", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star... |
import math, time
import numpy as np
from ui_element import UIElement, UIArt, UIRenderable
from renderable_line import LineRenderable, SwatchSelectionBoxRenderable, UIRenderableX
# min width for charset; if charset is tiny adjust to this
MIN_CHARSET_WIDTH = 16
class UISwatch(UIElement):
def __init__(self, u... | {"hexsha": "1e65acb1d46f810fdbd8da776b63826f0a32f7d3", "size": 16981, "ext": "py", "lang": "Python", "max_stars_repo_path": "ui_swatch.py", "max_stars_repo_name": "michael-lazar/playscii", "max_stars_repo_head_hexsha": "2416e7438b993abd119a86b0fc1ffb1170eb33c3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14... |
'''
@author: Loïc Grobol <loic.grobol@gmail.com>
Copyright © 2014, Loïc Grobol <loic.grobol@gmail.com>
Permission is granted to Do What The Fuck You Want To
with this document.
See the WTF Public License, Version 2 as published by Sam Hocevar
at http://www.wtfpl.net if you need more details.
This provides the maths f... | {"hexsha": "9a6aee8d64afba05882a86ecb99b4b1564519cd5", "size": 4149, "ext": "py", "lang": "Python", "max_stars_repo_path": "libkrampouezh/libinterpol.py", "max_stars_repo_name": "Evpok/krampouezh", "max_stars_repo_head_hexsha": "ba8f1b5a1a70a9992b86692d4f0a3d78f7ca13f2", "max_stars_repo_licenses": ["CC0-1.0"], "max_sta... |
# -*- coding: utf-8 -*-
import click
import random
import numpy as np
from collections import Counter
from keras.preprocessing.sequence import pad_sequences
from sklearn.utils.class_weight import compute_class_weight
from utils.tokenizer import DefaultTokenizer
_tokenizer = DefaultTokenizer()
def build_dataset(dat... | {"hexsha": "804f589de9602ada04cfb42c6fa52c7262a574e2", "size": 5325, "ext": "py", "lang": "Python", "max_stars_repo_path": "page_classifier.py", "max_stars_repo_name": "wsdm-cup-2017/lettuce", "max_stars_repo_head_hexsha": "13c327753a8d15245e93a4db2480191125e9a6be", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
[STATEMENT]
lemma [code]: "mset xs - mset ys = mset (fold remove1 ys xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. mset xs - mset ys = mset (fold remove1 ys xs)
[PROOF STEP]
by (rule sym, induct ys arbitrary: xs) (simp_all add: diff_add diff_right_commute diff_diff_add) | {"llama_tokens": 114, "file": null, "length": 1} |
! PR fortran/23663
function i (n)
i = n
i = max (i, 6)
return
entry j (n)
j = n
j = max (j, 3)
end
program entrytest
if (i (8).ne.8) call abort
if (i (4).ne.6) call abort
if (j (0).ne.3) call abort
if (j (7).ne.7) call abort
end
| {"hexsha": "916891fdeb9919e0e3e940343bf5f0bf00774bf7", "size": 314, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "gcc-gcc-7_3_0-release/gcc/testsuite/gfortran.fortran-torture/execute/entry_11.f90", "max_stars_repo_name": "best08618/asylo", "max_stars_repo_head_hexsha": "5a520a9f5c461ede0f32acc284017b737a4389... |
data ⊥ : Set where
data Maybe : Set where
just : ⊥ → Maybe
nothing : Maybe
test : Set → Set
test x with nothing
test x | just ()
test x | nothing = test x
| {"hexsha": "5e45ae12b939d0d04313f8a61154fe0098f26620", "size": 161, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Fail/Issue2583.agda", "max_stars_repo_name": "cruhland/agda", "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=no-member
# pylint: disable=not-an-iterable
""" Functions
__author__: Conor Heins, Alexander Tschantz, Brennan Klein
"""
import itertools
import numpy as np
import torch
from scipy import special
from inferactively.distributions import Categorical, Diric... | {"hexsha": "f21fb83f0a6ad235b6ccbd4142058eb097b98aba", "size": 22423, "ext": "py", "lang": "Python", "max_stars_repo_path": "inferactively/core/control.py", "max_stars_repo_name": "BerenMillidge/inferactively", "max_stars_repo_head_hexsha": "110ba5f01c1c302ecde40b4d7e555d1da535e372", "max_stars_repo_licenses": ["MIT"],... |
import numpy as np
from sklearn.datasets import make_spd_matrix
import time
from General_LP_OT import *
import random
from General_RKHS_OT import ot_cont_rkhs
K = 1
WASSER_Q = 2 # which L_Q norm to use on R^d
WASSER_P = 2 # which Wasserstein distance to use
MARGS = 2
DIM = 1
GAMMA = 500
MINMAX = -1 # 1 is minimizat... | {"hexsha": "e6365064712cfb75cf3a43d3703465427f4340a6", "size": 3682, "ext": "py", "lang": "Python", "max_stars_repo_path": "OT_Mixture_RKHS.py", "max_stars_repo_name": "stephaneckstein/OT_Comparison", "max_stars_repo_head_hexsha": "2b8831a3044bd2b74eb3899a4af6341c77544add", "max_stars_repo_licenses": ["MIT"], "max_star... |
from Projects.Project3.Autoencoder import Autoencoder
from Projects.Project3.Classifier import Classifier
from Projects.Project3.Encoder import Encoder
from Projects.Project3.Decoder import Decoder
from Projects.Project3.Trainer import Trainer
from Projects.Project3.ClassifierHead import ClassifierHead
from Projects.Pr... | {"hexsha": "f05b9d9b6688bb35bb983955ecd416120a423d67", "size": 7078, "ext": "py", "lang": "Python", "max_stars_repo_path": "SemiSupervisedLearning/SSN.py", "max_stars_repo_name": "martahal/DeepLearning", "max_stars_repo_head_hexsha": "c3a70a117c2f3417832c7caecd3baf6cd9862ae2", "max_stars_repo_licenses": ["MIT"], "max_s... |
// Copyright 2010-2014, D. E. Shaw Research.
// 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 )
#ifndef BOOST_RANDOM_DETAIL_MULHILO_HPP
#define BOOST_RANDOM_DETAIL_MULHILO_HPP
#include <limits>
#include <boost/c... | {"hexsha": "ebee0dbe9182d5ad263200409fa4c8a7a70e9962", "size": 5094, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/random/detail/mulhilo.hpp", "max_stars_repo_name": "DEShawResearch/Random123-Boost", "max_stars_repo_head_hexsha": "65e3d874b67aa7b3e02d5ad8306462f52d2079c0", "max_stars_repo_licenses": ["BSL-... |
"""Mixin classes for unittests"""
from chromatictools import math
import functools
import contextlib
import numpy as np
import io
class AssertPrintsMixin:
"""Mixin class for print assertion"""
@contextlib.contextmanager
def assert_prints(self, target: str):
"""Assert that contextual code prints the target s... | {"hexsha": "f2a4fa8c1f7a3d08b7abb00c091e6c48839b2c2a", "size": 2442, "ext": "py", "lang": "Python", "max_stars_repo_path": "chromatictools/unittestmixins.py", "max_stars_repo_name": "ChromaticIsobar/chromatictools", "max_stars_repo_head_hexsha": "746bb68547c383812a5996503328fc1ab40dacb4", "max_stars_repo_licenses": ["M... |
[STATEMENT]
lemma acquired_mono: "\<And>A B pending_write. A \<subseteq> B \<Longrightarrow> acquired pending_write xs A \<subseteq> acquired pending_write xs B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<And>A B pending_write. A \<subseteq> B \<Longrightarrow> acquired pending_write xs A \<subseteq> acquired ... | {"llama_tokens": 3690, "file": "Store_Buffer_Reduction_ReduceStoreBuffer", "length": 20} |
[STATEMENT]
lemma interp_ins_append_memb:
assumes "insert_ops (pre @ [(oid, Some ref)] @ suf)"
and "ref \<in> set (interp_ins pre)"
shows "oid \<in> set (interp_ins (pre @ [(oid, Some ref)] @ suf))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. oid \<in> set (interp_ins (pre @ [(oid, Some ref)] @ suf))
[PRO... | {"llama_tokens": 263, "file": "OpSets_Interleaving", "length": 2} |
#ifndef MPLLIBS_SAFE_PRINTF_IMPL_PARSER_HPP
#define MPLLIBS_SAFE_PRINTF_IMPL_PARSER_HPP
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2009 - 2010.
// 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)
... | {"hexsha": "dcee9316163009c8255f21fbe98e446980ea162d", "size": 613, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "mpllibs/safe_printf/v1/impl/parser.hpp", "max_stars_repo_name": "sabel83/mpllibs", "max_stars_repo_head_hexsha": "8e245aedcf658fe77bb29537aeba1d4e1a619a19", "max_stars_repo_licenses": ["BSL-1.0"], "m... |
from data_loader import my_read_dataset_path_and_label
from input_ops import my_train_test_split
from preprocess_data import get_image_data
import numpy as np
from sklearn.preprocessing import LabelEncoder, OneHotEncoder
import matplotlib.pyplot as plt
class DataManager(object):
def __init__(self, dataset_path,... | {"hexsha": "490b140f0631ad0cd631c682b71e0e36f92122e4", "size": 2637, "ext": "py", "lang": "Python", "max_stars_repo_path": "TF Study 1/data_manager.py", "max_stars_repo_name": "tucan9389/mot-TF-Study-Challenge", "max_stars_repo_head_hexsha": "c5c32b7f931877f434fdf33a16648bc13fd528fe", "max_stars_repo_licenses": ["MIT"]... |
"""
Gas Transfer Velocity
---------------------
Modulates the magnitude of the flux between the atmosphere and the ocean.
"""
def _add_xarray_attrs(func):
"""A helper function to add attributes to xarray."""
import re
from functools import wraps
from xarray import DataArray
def get_refs(func):... | {"hexsha": "8271fdc9179ab0d03f4234b4498dfe75f1f86633", "size": 13057, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyseaflux/gas_transfer_velocity.py", "max_stars_repo_name": "luke-gregor/SeaFlux", "max_stars_repo_head_hexsha": "3ecc2c7bedc121925be4056fa55f0e5a544eae64", "max_stars_repo_licenses": ["MIT"], "m... |
'''
@author Waldinsamkeit
@email Zenglz_pro@163.com
@create date 2020-10-19 16:29:05
@desc [description]
'''
from os import name
from typing import Tuple
import torch
import torch.nn as nn
import numpy as np
from torch.nn.modules.linear import Linear
class Embedding_layer(nn.Module):
"""embedding layer and pro... | {"hexsha": "f45ba99d9d5e40cd4cb1c2a8431cbd303893104f", "size": 4784, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "OpenNLPhub/SynSetMineRe", "max_stars_repo_head_hexsha": "f326b3189e226d21e40b6411fd1afca96a8afe0c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma... |
'''
Basic algorithms and data handling code.
'''
from __future__ import absolute_import, division, print_function, unicode_literals
import math
from numbers import Integral
import numpy as np
import pickle
import spectral as spy
from ..io.spyfile import SpyFile, TransformedImage
from ..utilities.errors import has_na... | {"hexsha": "88752ab1b939dfc32721abde7f3205252a547816", "size": 64167, "ext": "py", "lang": "Python", "max_stars_repo_path": "spectral/algorithms/algorithms.py", "max_stars_repo_name": "wwlswj/spectral", "max_stars_repo_head_hexsha": "e886e4d9f8c34f512c8e81867f0de76e15550572", "max_stars_repo_licenses": ["MIT"], "max_st... |
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np # type: ignore
import onnx
from onnx.backend.test.case.base import Base
from onnx.backend.test.case.node impor... | {"hexsha": "1c80e7334b44fc748ff7b718e4a6ffb70f98d0db", "size": 1205, "ext": "py", "lang": "Python", "max_stars_repo_path": "onnx/backend/test/case/node/squeeze.py", "max_stars_repo_name": "How-Wang/onnx", "max_stars_repo_head_hexsha": "c940fa3fea84948e46603cab2f86467291443beb", "max_stars_repo_licenses": ["Apache-2.0"]... |
\ EVALUATE: Given a string and length on the stack, evaluate it in the
\ current system context.
: source \ -- c-addr len \ 6.1.2216
tibs 2@
;
: save-input \ -- xn ... x1 n
source-id 5
dup >r for @+ swap
next drop r>
;
: restore-input \ xn ... x1 n -- flag
5 over <> -63 ... | {"hexsha": "02e962e992fa71bf271a9c11d470a64abf60f96d", "size": 799, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "forth/evaluate.f", "max_stars_repo_name": "bradleyeckert/Mforth", "max_stars_repo_head_hexsha": "a0c403ccc85cf67e66e9714a974ecf8515876f2c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 11... |
# Copyright 2021 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": "737c8f67f8ef163d373f3222f3fd447f7e81a802", "size": 2205, "ext": "py", "lang": "Python", "max_stars_repo_path": "research/cv/STGAN/src/dataset/datasets.py", "max_stars_repo_name": "leelige/mindspore", "max_stars_repo_head_hexsha": "5199e05ba3888963473f2b07da3f7bca5b9ef6dc", "max_stars_repo_licenses": ["Apach... |
import category_theory.category
import category_theory.isomorphism
import category_theory.types
import category_theory.isomorphism
import data.finset.basic
import data.finset.sort
import data.int.parity
import .article2
namespace exercises
universe u
section endomaps
open category_theory
variables {α β: Type*}
va... | {"author": "paraseba", "repo": "conceptual-mathematics-in-lean", "sha": "cc7877f528bfaf99a024844744e023acbfcadb1d", "save_path": "github-repos/lean/paraseba-conceptual-mathematics-in-lean", "path": "github-repos/lean/paraseba-conceptual-mathematics-in-lean/conceptual-mathematics-in-lean-cc7877f528bfaf99a024844744e023ac... |
"""
===========================================================================
The code for autoregressive components
===========================================================================
This code implements the autoregressive component as a sub-class of dynamic.
Different from the dynamic component, the fea... | {"hexsha": "727f81421ac7b85c5a0c62a47099084071a4d060", "size": 5155, "ext": "py", "lang": "Python", "max_stars_repo_path": "pydlm_lite/modeler/autoReg.py", "max_stars_repo_name": "wwrechard/pydlm-lite", "max_stars_repo_head_hexsha": "72e745c3ac9eae0da08dfc2c780e1c344e47ab0e", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Estimates the distribution of TRAPPIST-1's XUV luminosity given the observations
from Wheatley et al. (2017), LXUV/LBOL in the range 6-9 x 10^-4, and the
observed bolometric luminosity from Van Grootel et al. (2018),
5.22 +/- 0.19 x 10^-4 Lsun.
We assume the Wheatley e... | {"hexsha": "9312ded3c1b52de56ee802e044562b136e7dc853", "size": 2707, "ext": "py", "lang": "Python", "max_stars_repo_path": "Analysis/EstimateTRAPPIST1XUV/estLXUV.py", "max_stars_repo_name": "dflemin3/trappist", "max_stars_repo_head_hexsha": "1aeb273f49678d685addc540cd4444ff045bc601", "max_stars_repo_licenses": ["MIT"],... |
[STATEMENT]
lemma asym_factor_Restr[simp]: "asym_factor (Restr r A) = Restr (asym_factor r) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. asym_factor (Restr r A) = Restr (asym_factor r) A
[PROOF STEP]
unfolding asym_factor_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. {(x, y). (x, y) \<in> Restr r A \<an... | {"llama_tokens": 201, "file": "Szpilrajn_Szpilrajn", "length": 2} |
Closed
Ez Eyebrows Davis is a local Beauty Salons and Barber Shops salon.
Threading Hair
Threading Hair is an ancient method commonly practiced in Eastern countries, like Egypt and India, but is becoming very popular here in the West. Threading Removes the Entire hair follicle and is by far the gentlest form of hai... | {"hexsha": "13fd95d9fd7ba576f927b7e3354057ae07f81ead", "size": 5433, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Ez_Eyebrows_Davis.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
"""Training Script"""
import os
import shutil
import numpy as np
import torch
import torch.nn as nn
import torch.optim
from torch.utils.data import DataLoader
from torch.optim.lr_scheduler import MultiStepLR
import torch.backends.cudnn as cudnn
from torchvision.transforms import Compose
from models.fewshot import Few... | {"hexsha": "975dcf4fa02aa36945a257af0c243e33e05a4caf", "size": 6375, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "FelixFu520/PANet", "max_stars_repo_head_hexsha": "26b9efcb7b8c44a39a32bcd9d2fa1f4c0cd9ac6e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, ... |
import pandas as pd
import csv
import sklearn.cluster as cluster
import numpy as np
from sklearn.cluster import KMeans
import seaborn as sns
import matplotlib.pyplot as plt
name=[
'label','original_glszm_GrayLevelVariance',
'log-sigma-1-0-mm-3D_firstorder_Minimum',
'log-sigma-3-0-mm-3D_firstorder_Median',
'log-si... | {"hexsha": "a8560dba019bc35c3a35eb4b303a0918aff70dc5", "size": 3940, "ext": "py", "lang": "Python", "max_stars_repo_path": "radiomics/find_s_d.py", "max_stars_repo_name": "bemu/diagnosis_covid19", "max_stars_repo_head_hexsha": "625954beb136caa3348edfc75de16cc4db21ee43", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
from pynwb import NWBFile
from pynwb.ecephys import ElectricalSeries
from hdmf.data_utils import DataChunkIterator
from singer_lab_to_nwb.converter import NWBConverter
from singer_lab_to_nwb.ecephys.intan.load_intan import load_intan, read_header
from pathlib import Path
from datetime import datetime
import pandas as ... | {"hexsha": "0710a16ca0f084c6a05fca51f62d4c2ac201a9a9", "size": 7191, "ext": "py", "lang": "Python", "max_stars_repo_path": "singer_lab_to_nwb/ecephys/intan/intan.py", "max_stars_repo_name": "stephprince/singer-lab-to-nwb-hackathon", "max_stars_repo_head_hexsha": "d357c1ebf948d8b49d7bc132dc892610be155e46", "max_stars_re... |
! MD5 of template: 4487f0f616ecccd76ea2b91ab000241b
! 3D angle related routines
!
! ------------------------------------------------------------------------------
! Copyright (c) 2009-13, Thomas P. Robitaille
!
! All rights reserved.
!
! Redistribution and use in source and binary forms, with or without
! modification,... | {"hexsha": "da8a9b4b79179a54a793ae7403922a8c5b46768f", "size": 24665, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "extra/Fortran/fortranlib-master/fortranlib-master/src/type_angle3d.f90", "max_stars_repo_name": "jfitz/code-stat", "max_stars_repo_head_hexsha": "dd2a13177f3ef03ab42123ef3cfcbbd062a2ae26", "max... |
"""This file takes arrays and writes them into dictionaries"""
import csv
from math import inf
import numpy as np
from bound_evaluation.change_enum import ChangeEnum
from bound_evaluation.manipulate_data import remove_full_nan_rows
from bound_evaluation.monte_carlo_dist import MonteCarloDist
from nc_arrivals.arrival_... | {"hexsha": "1122373ce182c36c4466ca99462be2b2efc8bf87", "size": 10338, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/msob_and_fp/msob_fp_array_to_results.py", "max_stars_repo_name": "paulnikolaus/python-mgf-calculator", "max_stars_repo_head_hexsha": "b6a897e211e8003a7b4eee26fafdaf5f06e8a0c5", "max_stars_rep... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2020/12/13
# @Author : Janghoo Lee, ProtossDragoon
# @Site : https://github.com/ProtossDragoon/bisenetv2-tensorflow
# @File : convert_cityscapes_bisenetv2_tensorrt.py
# @IDE: Google COLAB, VSCode
"""
TF-TensorRT Optimization bisenetv2 on cityspaces data... | {"hexsha": "a4b76bc87a43fd47e8cc8280fc256e963339ac02", "size": 6916, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/cityscapes/convert_cityscapes_bisenetv2_tensorrt.py", "max_stars_repo_name": "ProtossDragoon/bisenetv2_tensorflow", "max_stars_repo_head_hexsha": "579cb13bc12e681a49bf588c66e3c5475c6ce62f", ... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from __future__ import division
"""
Created on 2015-02-14
@author: Eugene Dvoretsky
python2 cli_ip.py ~/analysis/Лесничая\ О.В./Immunopy/2015-01-26/2015-01-26_rescaled_analyzed/ ~/analysis/Лесничая\ О.В./Immunopy/2015-01-26/origin/flat/ 0.5 -o here.csv --dab-shift -30 -... | {"hexsha": "4cc38e95f42504f02353ce5738d30e3e0036c493", "size": 3535, "ext": "py", "lang": "Python", "max_stars_repo_path": "immunopy/cli_ip.py", "max_stars_repo_name": "radioxoma/immunopy", "max_stars_repo_head_hexsha": "32feb335341fe175ed11767cf79545c66dc36a46", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6... |
import os
import os.path as osp
import time
from PIL import Image
import multiprocessing
import numpy as np
import torch
from torch import nn
from tqdm import tqdm
from advent.utils.func import per_class_iu, fast_hist
from advent.utils.serialization import pickle_dump, pickle_load
def extract_pseudo_labels(model, t... | {"hexsha": "aafd0e7e5c0e24d9748f7748a8c0da531d820a90", "size": 4601, "ext": "py", "lang": "Python", "max_stars_repo_path": "advent/domain_adaptation/esl_UDA.py", "max_stars_repo_name": "MLIA/ESL", "max_stars_repo_head_hexsha": "86679fd25d03667880379d59bc73194e7d8d03e3", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
mutable struct CSVExporter{T <: AbstractSchema} <: AbstractExporter
isenabled::Bool
schema::T
end
function isenabled(exporter::CSVExporter)
return exporter.isenabled
end
function enable!(exporter::CSVExporter)
exporter.isenabled = true
end
function disable!(exporter::CSVExporter)
exporter.isenabl... | {"hexsha": "2845af1b59089edcdb5a9618414a5adea4d33db8", "size": 2489, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/operation/csv_export.jl", "max_stars_repo_name": "zygmuntszpak/CImGuiExtensions.jl", "max_stars_repo_head_hexsha": "6e81f9949cc536fbaa6ca1f91e4276cd069200f4", "max_stars_repo_licenses": ["MIT"]... |
"""
missing data -s coded as -999 - this filter uses clip to ensure that the minimum elevation is the value of parameter 0
"""
import sys, math
from numpy import *
min_elev = float(sys.argv[1])
elev = loadtxt(sys.stdin)
sys.stderr.write("set minimum to "+ str(min_elev)+'\n')
# replace missing data -9999 by 0
... | {"hexsha": "4320af3e305bad3a137c11edf178899cd9abf07a", "size": 386, "ext": "py", "lang": "Python", "max_stars_repo_path": "clip.py", "max_stars_repo_name": "KitWallace/terrain", "max_stars_repo_head_hexsha": "c9a1a7e11fbcc470e659c4b2c5b46d3e4e2c93cc", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": null, "ma... |
using ArgParse
s=ArgParseSettings()
@add_arg_table s begin
"--part2"
help="Do part 2"
action=:store_true
end
parsed_args = parse_args(ARGS, s)
function calculate_gamma(numbers, bitlen)
counts = zeros(bitlen)
for n in numbers
for idx in 1:bitlen
mask = 0x1000 >>> idx
... | {"hexsha": "26b4f1332dd12be0fa7233b0c8619d650dde1f4d", "size": 1525, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "day3.jl", "max_stars_repo_name": "ntwyman/aoc_2021", "max_stars_repo_head_hexsha": "34dc0af6efdabef216a7be3267a1736643a50545", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star... |
from unittest import TestCase
import numpy as np
from uncertainty_wizard import ProblemType
from uncertainty_wizard.quantifiers import MutualInformation, QuantifierRegistry
class TestMutualInformation(TestCase):
# =================
# Test Class Methods
# =================
def test_string_represent... | {"hexsha": "7eb2c11637c85d4359e8c2284f5f8a562717f5d8", "size": 3020, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests_unit/quantifiers_tests/test_mutual_information.py", "max_stars_repo_name": "p1ndsvin/uncertainty-wizard", "max_stars_repo_head_hexsha": "92a7a9bcb411e512cf6ad54e7ba226a3c66d3583", "max_stars... |
import numpy as np
class PlotParam:
def __init__(self, title=None, ytitle=None, color=None):
self.title=title
self.oneaxis=False
self.colorchoices=['b','g','r','c','m','y','k']
if color is not None:
self.color=color
else:
#randomize colors
... | {"hexsha": "1301bba3cf756dadcce7866c0c1b826520bff504", "size": 394, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/InstPyr/Plotting/plotparam.py", "max_stars_repo_name": "soodsidd/instpyr", "max_stars_repo_head_hexsha": "138d0a8164dc388187fde58329b9ff770af77af4", "max_stars_repo_licenses": ["MIT"], "max_sta... |
\<comment>\<open>
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
\<close>
\<comment>\<open> Zhe Hou: I removed the lemmas related to the ... | {"author": "CompSoftVer", "repo": "SPARCv8-Models", "sha": "1abb204edb45e4839d3bfc0bc8b3e8ab4148c1a5", "save_path": "github-repos/isabelle/CompSoftVer-SPARCv8-Models", "path": "github-repos/isabelle/CompSoftVer-SPARCv8-Models/SPARCv8-Models-1abb204edb45e4839d3bfc0bc8b3e8ab4148c1a5/lib/wp/DetMonadLemmas.thy"} |
[STATEMENT]
theorem wf_termi_call_steps: "wf (termi_call_steps \<Gamma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. wf (termi_call_steps \<Gamma>)
[PROOF STEP]
proof (simp only: termi_call_steps_def wf_iff_no_infinite_down_chain,
clarify,simp)
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. \<And>f. \<... | {"llama_tokens": 7492, "file": "Simpl_SmallStep", "length": 59} |
import argparse
import sys
from BayesPaths.UnitigGraph import UnitigGraph
from BayesPaths.UtilsFunctions import convertNodeToName
from collections import defaultdict
from collections import Counter
import networkx as nx
def main(argv):
parser = argparse.ArgumentParser()
parser.add_argument("gfa_file", help="... | {"hexsha": "c25e5e26760a9c5d144596d187d1342861da3f51", "size": 3081, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utils/PropBin.py", "max_stars_repo_name": "chrisquince/BayesPaths", "max_stars_repo_head_hexsha": "d632578079daa9edd65d5a60f9244c3f2017cc14", "max_stars_repo_licenses": ["Apache-2.0", "MIT"], "max... |
import numpy as np
import matplotlib.pyplot as plt
import os
from PIL import Image
from pathlib import Path
try:
os.mkdir("../figures")
except OSError:
pass
def psnr(im, imref, d=255):
mse = np.mean((im - imref)**2)
return 10 * np.log(d * d / mse) / np.log(10)
path = Path(__file__).resolve().pare... | {"hexsha": "db6abeb7c64076b676baf924118b4486843b67c8", "size": 3630, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/figures_from_results/images_inpainting_zoom.py", "max_stars_repo_name": "bmalezieux/plipy", "max_stars_repo_head_hexsha": "35d17cad908219013fa43d81c4aeb6bb46ce9384", "max_stars_repo_li... |
import os
import numpy as np
from scipy.spatial.distance import pdist
from plyfile import PlyData
import cv2
from vispy import gloo
class Model3D:
def __init__(self, file_to_load=None):
self.vertices = None
self.centroid = None
self.indices = None
self.colors = None
self.... | {"hexsha": "18fb201f65ed2a82c6410854634f26cab85e987d", "size": 5189, "ext": "py", "lang": "Python", "max_stars_repo_path": "rendering/model.py", "max_stars_repo_name": "LinyeLi60/ssd-6d.render", "max_stars_repo_head_hexsha": "b836f05d3ea3f69a4d21917a3adc40eabd096776", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.