text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
(* Title: Kleene Relation Algebras
Author: Walter Guttmann
Maintainer: Walter Guttmann <walter.guttmann at canterbury.ac.nz>
*)
section \<open>Kleene Relation Algebras\<close>
text \<open>
This theory combines Kleene algebras with Stone relation algebras.
Relation algebras with transitive closure have ... | {"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Stone_Kleene_Relation_Algebras/Kleene_Relation_Algebras.thy"} |
import os
from copy import copy
from itertools import combinations
from tempfile import mkstemp
import numpy as np
import pytest
import aesara
from aesara import function, shared
from aesara.compile.mode import get_default_mode
from aesara.configdefaults import config
from aesara.graph.utils import MethodNotDefined
f... | {"hexsha": "0ad8d72c3afed5e3adb60bfc1eea58223bd214d3", "size": 39358, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/tensor/utils.py", "max_stars_repo_name": "sagartomar/aesara", "max_stars_repo_head_hexsha": "477f4e5dd757b1ccd3deaf59bf75fc27d7ab9cf6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta... |
#! /usr/bin/python2
from __future__ import division
import numpy as np
from sys import exit
from collections import OrderedDict
# ------Training data-------------
# Politics
xP = [
[1, 0, 1, 1, 1, 0, 1, 1],
[0, 0, 0, 1, 0, 0, 1, 1],
[1, 0, 0, 1, 1, 0, 1, 0],
[0, 1, 0, 0, 1, 1, 0, 1],
[0, 0,... | {"hexsha": "2e062ceec205e7526432cf4bb13be63182d23723", "size": 4044, "ext": "py", "lang": "Python", "max_stars_repo_path": "naive_bayes.py", "max_stars_repo_name": "jvasilakes/ML_Programs", "max_stars_repo_head_hexsha": "ae734fdad0cbafdb29ba608a48741ac93c7b4774", "max_stars_repo_licenses": ["Unlicense"], "max_stars_cou... |
"""
Implementation of whole image prediction with variable overlap.
"""
from seg_utils import *
from seg_models import *
from numpy.random import seed
from tensorflow import set_random_seed
# Set seed
seed(1)
set_random_seed(2)
num_classes = 12
gpus = 1
# Import model
model = ResNet_UNet_Dropout(num_classes=num... | {"hexsha": "8a85836605c4dec8e8a1cb414fe49c7c4391e967", "size": 2106, "ext": "py", "lang": "Python", "max_stars_repo_path": "09_whole_image_predict.py", "max_stars_repo_name": "smthomas-sci/SemanticSegmentation", "max_stars_repo_head_hexsha": "aea1149e3e8ae5b6e66050b6aab9f37e6064d29b", "max_stars_repo_licenses": ["MIT"]... |
import pandas as pd
import cv2
import zipfile
import random
import numpy as np
import matplotlib.pyplot as plt
from sklearn.utils import shuffle
from keras.models import Sequential, load_model, Model
from keras.layers import Flatten, Dense, Lambda, Cropping2D, Dropout, SpatialDropout2D
from keras.layers.convolutional i... | {"hexsha": "87684da22f70196128face70e1708847e1eb658b", "size": 8878, "ext": "py", "lang": "Python", "max_stars_repo_path": "helper.py", "max_stars_repo_name": "mhBahrami/CarND-Behavioral-Cloning-P3", "max_stars_repo_head_hexsha": "2e21604adfeb72e459c204caf84b153de6e6d669", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import numpy as np
import logging
from dataclasses import dataclass, astuple
logger = logging.getLogger(__name__)
@dataclass
class Line:
"""Oriented Lines in R^2. """
a: float
b: float
c: float
def __post_init__(self):
if self.a == self.b == 0:
raise ValueError("Parameter... | {"hexsha": "4bd0d8774c8858c08fe7fa87ee4a75fb39e91215", "size": 2959, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dgimage/line.py", "max_stars_repo_name": "expertanalytics/digeeg", "max_stars_repo_head_hexsha": "147d2afbab3618de75ccc2ddb49fd4ec44f5c3a9", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
[STATEMENT]
lemma HeronConf_interp_stepwise_tagrel_cases:
\<open>\<lbrakk> \<Gamma>, n \<turnstile> ((time-relation \<lfloor>K\<^sub>1, K\<^sub>2\<rfloor> \<in> R) # \<Psi>) \<triangleright> \<Phi> \<rbrakk>\<^sub>c\<^sub>o\<^sub>n\<^sub>f\<^sub>i\<^sub>g
= \<lbrakk> ((\<lfloor>\<tau>\<^sub>v\<^sub>a\<^sub>r(K\<... | {"llama_tokens": 9746, "file": "TESL_Language_Corecursive_Prop", "length": 16} |
\section{Vaccination}
\subsection{Model structure}
In this application we introduced separate strata to the model for vaccinated an unvaccinated individuals.
All model compartments are replicated into three categories:
\begin{itemize}
\item Unvaccinated persons
\item Persons who have only received one dose of vacci... | {"hexsha": "80d2b0749c0c35717fd367f52f3160c629e1aed5", "size": 1723, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/tex/tex_descriptions/models/covid_19/stratifications/vaccination.tex", "max_stars_repo_name": "emmamcbryde/AuTuMN-1", "max_stars_repo_head_hexsha": "b1e7de15ac6ef6bed95a80efab17f0780ec9ff6f", "... |
# source: http://scatterlib.wdfiles.com/local--files/codes/bhmie.py
from numpy import *
def bhmie(x,refrel,nang):
# This file is converted from mie.m, see http://atol.ucsd.edu/scatlib/index.htm
# Bohren and Huffman originally published the code in their book on light scattering
# Calculation based on Mie scattering ... | {"hexsha": "0d2fe9ee18d945f82a26702147e0913de8c51b12", "size": 5437, "ext": "py", "lang": "Python", "max_stars_repo_path": "validation/bhmie.py", "max_stars_repo_name": "fekad/jlmie", "max_stars_repo_head_hexsha": "f4e5c6a21785e3228a7cc894d384127d5a1b36c7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
import hashlib
import pickle
import numpy as np
from collections import deque
"""
ReplayMemory class gives an ability to store and give back data in random batches.
Memory has a limited buffer based on the FIFO queue.
"""
class ReplayMemory:
def __init__(self, capacity=10000):
self._capacity = capacity
... | {"hexsha": "1d8447f843b9422f2773bfba4761833e96311725", "size": 5756, "ext": "py", "lang": "Python", "max_stars_repo_path": "katie/rl/replay_memory.py", "max_stars_repo_name": "danpeczek/ai-katie", "max_stars_repo_head_hexsha": "14e12a469f158c732f50b3d605d29117766016eb", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
[STATEMENT]
lemma gbinomial_rec: "((a + 1) gchoose (Suc k)) = (a gchoose k) * ((a + 1) / of_nat (Suc k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. a + (1::'a) gchoose Suc k = (a gchoose k) * ((a + (1::'a)) / of_nat (Suc k))
[PROOF STEP]
using gbinomial_mult_1[of a k]
[PROOF STATE]
proof (prove)
using this:
a *... | {"llama_tokens": 289, "file": null, "length": 2} |
"""Tests for direct solution of LBTE."""
import numpy as np
from phono3py.api_phono3py import Phono3py
si_pbesol_kappa_P_LBTE = [111.123, 111.123, 111.123, 0, 0, 0] # old value 111.117
si_pbesol_kappa_C = [0.167, 0.167, 0.167, 0.000, 0.000, 0.000]
si_pbesol_kappa_P_LBTE_redcol = [62.783, 62.783, 62.783, 0, 0, 0] #... | {"hexsha": "73375593d3c12dd0f60c0a49d5a878e2b9005e9e", "size": 1839, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/conductivity/test_kappa_LBTE_Wigner.py", "max_stars_repo_name": "MSimoncelli/phono3py", "max_stars_repo_head_hexsha": "b28b45a025c279833e9269e5d91330c75d3f6ae0", "max_stars_repo_licenses": ["... |
#' Estimate number of MCMC samples necessary for convergence
#'
#' This function is a wrapper for the \code{\link[coda]{raftery.diag}} function in the \pck{coda} package which estimates the number iterations (plus burnin) and thinning interval for MCMC samples necessary for sufficient convergence. This function adds s... | {"hexsha": "85908c87c536fb9c7cabc3e6215292043dc98e49", "size": 7173, "ext": "r", "lang": "R", "max_stars_repo_path": "code/rafLewis.r", "max_stars_repo_name": "adamlilith/tropicosMassModeling", "max_stars_repo_head_hexsha": "4772fcb431283224b90544ecdbdb5ee4513b8d86", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
import numpy as np
import math
from regression import Regression
from IPython import embed
from copy import copy
class Sampler(object):
def __init__(self, sim_env, dim):
self.sim_env = sim_env
self.dim = dim
self.v_mean = 0.0
self.v_mean_boundary = 0.0
self.random = True
self.k = 5
self.k_ex = 20
... | {"hexsha": "aafbef7a9171982c50be873a47b4692d5e9567e4", "size": 10097, "ext": "py", "lang": "Python", "max_stars_repo_path": "network/sampler.py", "max_stars_repo_name": "snumrl/CAR", "max_stars_repo_head_hexsha": "af2ef26860bae56c42df71df0de4682d4898f380", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 2... |
import numpy as np
from typing import Callable, Dict, Optional, Union
from alibi_detect.utils.frameworks import has_pytorch, has_tensorflow
if has_pytorch:
from alibi_detect.cd.pytorch.spot_the_diff import SpotTheDiffDriftTorch
from alibi_detect.utils.pytorch.data import TorchDataset
from torch.utils.data ... | {"hexsha": "dd26f8ddbb0e9509fcfbfa1f0aed767bef35a517", "size": 8593, "ext": "py", "lang": "Python", "max_stars_repo_path": "alibi_detect/cd/spot_the_diff.py", "max_stars_repo_name": "sugatoray/alibi-detect", "max_stars_repo_head_hexsha": "66d7873c248c0be1a1d836e6fe1ef59351b802d9", "max_stars_repo_licenses": ["Apache-2.... |
# @Time : 1/26/2022 11:09 AM
# @Author : Alejandro Velasquez
import os
import csv
import statistics as st
import math
import numpy as np
from numpy import genfromtxt
import pandas as pd
# --- GUI related packages
import tqdm
# location = 'C:/Users/15416/PycharmProjects/PickApp/data_postprocess1 (only grasp)/'
main ... | {"hexsha": "3d0a50b5e89cdd8a25c59b0c2433b702718ec70d", "size": 2248, "ext": "py", "lang": "Python", "max_stars_repo_path": "temporal/(pp) downsampler.py", "max_stars_repo_name": "velasale/PickApp", "max_stars_repo_head_hexsha": "2a6b025de217a6f350bd4e83a9bf120d7a2bae56", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
# -*- coding: utf-8 -*-
"""
File name: utils.py
Description: a set of function not directly related to experiments
Author: Roman Pogodin
Python version: 3.6
"""
import time
import numpy as np
import george
from george.kernels import ExpSquaredKernel
from warnings import warn
import h5py
class Timer:... | {"hexsha": "9f78e899f7b9f592481830a14de1b7792d6e0015", "size": 7833, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "neuroai-workshop-anon-1224113/working-memory-facilitating-reservoir-learning", "max_stars_repo_head_hexsha": "5afb55dc7b170beb57af3e4e81d02dc6454a230f", "max_sta... |
# encoding: utf-8
from .rbf import RBFNet
import numpy as np
import scipy.io as scio
import warnings
warnings.filterwarnings('ignore') # ignore all warnings
"""
This python file is the main function to execute the self-defined RBF network
to train the model and do measurement
"""
def obtainData():
# load trainin... | {"hexsha": "86bc5e5c7a4e720f860016bd2e44367745aa0f8f", "size": 1340, "ext": "py", "lang": "Python", "max_stars_repo_path": "rbf_networks_classification/execute.py", "max_stars_repo_name": "IsaacChanghau/AmusingPythonCodes", "max_stars_repo_head_hexsha": "013ecaaafe62696866b47b0910e1db00cca9ea37", "max_stars_repo_licens... |
# Copyright (c) 2020 Branislav Holländer. All rights reserved.
# See the file LICENSE for copying permission.
import pytest
import jax
import jax.numpy as jnp
import piper.functional as func
import piper.distributions as dist
from piper import test_util as tu
def test_metropolis_hastings_wrong_proposal_or_initial_... | {"hexsha": "43937b4bb9228876a3393678c07c659d8697c0bd", "size": 6370, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/functional/test_metropolis_hastings.py", "max_stars_repo_name": "branislav1991/piper", "max_stars_repo_head_hexsha": "88fede157912445e982bbcc832253c30ec86ca6b", "max_stars_repo_licenses": ["... |
import os
import sys
import unittest
import numpy as np
import h5py as h5
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
from import_toolkit.cluster import Cluster
np.set_printoptions(suppress=True)
class TestRotVel(unittest.TestCase):
def test_rotvel_alignment_GAS(se... | {"hexsha": "03d9c76867b5a3808db58efd50cad68358753bce", "size": 8414, "ext": "py", "lang": "Python", "max_stars_repo_path": "Unittest/test_rotvel_alignment.py", "max_stars_repo_name": "LBJ-Wade/C-Eagle-analysis", "max_stars_repo_head_hexsha": "d13ffb219834e11baeb5b9d863c6a6eb965ba6ad", "max_stars_repo_licenses": ["Unlic... |
# Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import builtins
import collections
import datetime
import pickle
import io
import numpy
import numpy.core.multiarray
import hyperopt.base
import hyperopt.pyll.base
def object_dump(obj, filename):
with open(filename, 'wb') as f:
... | {"hexsha": "4045c8bcae31d7e7dabf0f4a439badcebb52f5f2", "size": 1752, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/pot/openvino/tools/pot/utils/object_dump.py", "max_stars_repo_name": "chccc1994/openvino", "max_stars_repo_head_hexsha": "41f7893ae81d186d15c1754b179bf32a66d03bcf", "max_stars_repo_licenses"... |
#######################################################################
#
# Copyright (C) 2004-2014, Michele Cappellari
# E-mail: cappellari_at_astro.ox.ac.uk
#
# This software is provided as is without any warranty whatsoever.
# Permission to use, for non-commercial purposes is granted.
# Permission to modify for pers... | {"hexsha": "e0b82f70acc9ebf2318a216217c23c0b17bb8101", "size": 3195, "ext": "py", "lang": "Python", "max_stars_repo_path": "Cappellari/display_pixels/cap_symmetrize_velfield.py", "max_stars_repo_name": "Hoseung/pyRamAn", "max_stars_repo_head_hexsha": "f9386fa5a9f045f98590039988d3cd50bc488dc2", "max_stars_repo_licenses"... |
#! /usr/bin/env python
# Copyright 2019. IBM All Rights Reserved.
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www... | {"hexsha": "6033087d81d8ccd52dc077acefa1651303cf785e", "size": 3736, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/tensorflow_serving/batch_rest_client_example.py", "max_stars_repo_name": "predrag12/powerai", "max_stars_repo_head_hexsha": "27718e3e3a078c0345e6c4cd4da99d9294d1f399", "max_stars_repo_lic... |
function [D, Isubj]=pons_cut_dir_adf(dirname,th_pval)
% For all the subjects in the directory "dirname":
% Computes the Dice coefficients D=2Nab/Na+Nb
% where:
% Na is the volume of the Cerebellum obtrained trough the volume-based labeling
% Nb is the volume "filled" ... | {"author": "vistalab", "repo": "vistasoft", "sha": "7f0102c696c091c858233340cc7e1ab02f064d4c", "save_path": "github-repos/MATLAB/vistalab-vistasoft", "path": "github-repos/MATLAB/vistalab-vistasoft/vistasoft-7f0102c696c091c858233340cc7e1ab02f064d4c/external/freesurfer/pons_cut_dir_afd.m"} |
import glob
import numpy as np
import torch
import os
import time
import cv2
import csv
import tqdm
# from models import ModelBuilder, SegmentationModule, SAUNet, VGG19UNet,VGG19UNet_without_boudary
from models.unet import UNet
from models.fcn import get_fcn8s
from models.AttU_Net_model import AttU_Net
from models.R2U... | {"hexsha": "bd64c84f33bb66ece2471c0943dc51ad0b246201", "size": 9130, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_XS2021_gan.py", "max_stars_repo_name": "DLWK/SegTrGAN", "max_stars_repo_head_hexsha": "b76f95a893dbb4461c5e3b050bc8778fc89e56b2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
clf
hold on;
x = 0:0.01:8*pi;
data = [x', sin(x)'];
plot(data(:,1), data(:,2));
axis([0, 8*pi, -3, 3]);
legend('original data');
grid on;
pause;
clf
hold on;
data_length = length(data)
for idx = 1500:2000
data(idx,2) = cos(data(idx,1));
end;
plot(data(:,1), data(:,2));
axis([0, 8*pi, -3, 3]);
legend('human modif... | {"author": "dsmi-lab-ntust", "repo": "AnomalyDetectionToolbox", "sha": "b9385ba405026f56a008f88c0580b1a18e24b355", "save_path": "github-repos/MATLAB/dsmi-lab-ntust-AnomalyDetectionToolbox", "path": "github-repos/MATLAB/dsmi-lab-ntust-AnomalyDetectionToolbox/AnomalyDetectionToolbox-b9385ba405026f56a008f88c0580b1a18e24b3... |
(*********************************************)
(*********************************************)
(**** ****)
(**** Ordinary functional programming ****)
(**** ****)
(*********************************************)
(*******************************... | {"author": "stepchowfun", "repo": "proofs", "sha": "00da33f63a56080227d06d37fd0f28b560f24624", "save_path": "github-repos/coq/stepchowfun-proofs", "path": "github-repos/coq/stepchowfun-proofs/proofs-00da33f63a56080227d06d37fd0f28b560f24624/proofs/Tutorial/Lesson1_FunctionalProgramming.v"} |
!..................................................................................................................................
! LICENSING
! Copyright (C) 2013-2016 National Renewable Energy Laboratory
!
! This file is part of SubDyn.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you ma... | {"hexsha": "ba74d2bf507975146dbee709219e35c9506cbdbd", "size": 63064, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "modules/subdyn/src/FEM.f90", "max_stars_repo_name": "ndevelder/openfast", "max_stars_repo_head_hexsha": "3456a645581456883e44d441eb285ed688e98797", "max_stars_repo_licenses": ["Apache-2.0"], "m... |
import networkx as nx
import matplotlib.pyplot as plt
import distributions
from walker import ETM_rest, steady_state, walk
import numpy as np
#Create a graph, add three nodes and edges with associated WTDs
G = nx.Graph()
G.add_edge(0, 1, wtd = distributions.exponential(1.))
G.add_edge(1, 2, wtd = distributions.uniform... | {"hexsha": "cc3b268b29f688ca2be69b74d8b02b8543e86a3e", "size": 1818, "ext": "py", "lang": "Python", "max_stars_repo_path": "example.py", "max_stars_repo_name": "tillahoffmann/nonpoisson-dynamics", "max_stars_repo_head_hexsha": "add866ce441fd399736dd178b92f1c527e28ad48", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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 applicab... | {"hexsha": "1db897a6d30fa084bb71ca7f175822331bd14b04", "size": 14757, "ext": "py", "lang": "Python", "max_stars_repo_path": "value_dice/train_eval.py", "max_stars_repo_name": "deepneuralmachine/google-research", "max_stars_repo_head_hexsha": "d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231", "max_stars_repo_licenses": ["Apach... |
import numpy as np
import matplotlib.pyplot as plt
from shutil import copyfile
from itertools import islice
from pylightnix import (
RRef, Path, realize, realizeMany, instantiate, redefine, mkconfig, promise,
rref2dref, mksymlink, rref2path, mklens, match_best, match_some )
from stagedml.imports.sys import ( ... | {"hexsha": "ac81d4ed08a695ec986acbeecf0c93fa12d3d1a8", "size": 9907, "ext": "py", "lang": "Python", "max_stars_repo_path": "run/nl2bash/out/Report.py", "max_stars_repo_name": "stagedml/stagedml", "max_stars_repo_head_hexsha": "35c1b107cc92bb727bf2e7ccd4a1983f475d5938", "max_stars_repo_licenses": ["BSD-4-Clause"], "max_... |
#ifndef ONPACAG_HPP
#define ONPACAG_HPP
#include <vector>
#include <string>
#include <boost/serialization/list.hpp>
#include <boost/serialization/set.hpp>
#include <boost/serialization/vector.hpp>
#include <tbb/parallel_for.h>
#include <tbb/blocked_range.h>
#include "arch/ARLAgent.hpp"
#include "bib/Seed.hpp"
#includ... | {"hexsha": "b034002d1a86107e2df595f076e65ae68a649b78", "size": 8738, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "agent/cacla/include/OnPACAg.hpp", "max_stars_repo_name": "matthieu637/ddrl", "max_stars_repo_head_hexsha": "a454d09a3ac9be5db960ff180b3d075c2f9e4a70", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
#include <iostream>
#include <godec/HelperFuncs.h>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/optional/optional.hpp>
namespace Godec {
std::string CdToFilePath(std::string filePath) {
boost::filesystem::path cwd(boost::filesystem::curren... | {"hexsha": "cbf1b80626c5950cf731cd05dc07f4ee8a5cadcc", "size": 10965, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/HelperFuncs.cc", "max_stars_repo_name": "Montana/Godec", "max_stars_repo_head_hexsha": "b25dc93b27fb547121cc6ad24e0e639dacd485d8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10.0, "m... |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import hashlib
import math
import logging
import numpy as np
from fairseq.data import SampledMultiDataset
from .sampled_multi_dataset import ... | {"hexsha": "81ff78f7055d2c99c1e14d2d5b175b126e005e79", "size": 7488, "ext": "py", "lang": "Python", "max_stars_repo_path": "fairseq/data/multilingual/sampled_multi_epoch_dataset.py", "max_stars_repo_name": "PAWS-Lab/fairseq", "max_stars_repo_head_hexsha": "66101b0564d99daa598ead2cc75615e96b362411", "max_stars_repo_lice... |
// vim:ts=2:sw=2:expandtab:autoindent:filetype=cpp:
/*
The MIT License
Copyright (c) 2008, 2009 Flusspferd contributors (see "CONTRIBUTORS" or
http://flusspferd.org/contributors.txt)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software an... | {"hexsha": "8a40eb6b81750fdbb1bc20aa81bf58f26eb43bea", "size": 4047, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libflusspferd/io/binary_stream.cpp", "max_stars_repo_name": "Flusspferd/flusspferd", "max_stars_repo_head_hexsha": "f2a070c4805e0bdbae4b5f528e94a9a36ceb80c5", "max_stars_repo_licenses": ["MIT"], "ma... |
[STATEMENT]
lemma sqn_update_same [simp]:
"\<And>rt ip dsn dsk flag hops nhip. sqn (rt(ip \<mapsto> v)) ip = \<pi>\<^sub>2(v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<And>rt ip dsn dsk flag hops nhip. sqn (rt(ip \<mapsto> v)) ip = \<pi>\<^sub>2 v
[PROOF STEP]
unfolding sqn_def
[PROOF STATE]
proof (prove)
... | {"llama_tokens": 220, "file": "AODV_variants_e_all_abcd_E_Aodv_Data", "length": 2} |
# ___________________________________________________________________________
#
# Prescient
# Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
# Government retains certain rights in this software.
# This software is ... | {"hexsha": "0afb806e3103e61faadae2099f4d958a00a726eb", "size": 19726, "ext": "py", "lang": "Python", "max_stars_repo_path": "prescient/util/distributions/splines.py", "max_stars_repo_name": "iSoron/Prescient", "max_stars_repo_head_hexsha": "a3c1d7c5840893ff43dca48c40dc90f083292d26", "max_stars_repo_licenses": ["BSD-3-C... |
# --------------------------------------------------------
# DenseCap-Tensorflow
# Written by InnerPeace
# This file is adapted from Linjie's work
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from... | {"hexsha": "8e21274b73e8692856eb2c02e902f2e003ee9341", "size": 1970, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/architecture_test.py", "max_stars_repo_name": "jasonx1011/densecap-tensorflow", "max_stars_repo_head_hexsha": "a5f9c8d0c88af1a0d8488b41c239a288a3f21904", "max_stars_repo_licenses": ["MIT"], ... |
"""
Container structures for data that should be read or written to disk
"""
from astropy import units as u
from astropy.time import Time
from numpy import nan
import numpy as np
from ..core import Container, Field, Map
from ..instrument import SubarrayDescription
__all__ = [
'InstrumentContainer',
'R0Contai... | {"hexsha": "c4d664b48730f210c1ff95664237c58faa27f7cd", "size": 22617, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctapipe/io/containers.py", "max_stars_repo_name": "maxnoe/ctapipe", "max_stars_repo_head_hexsha": "87273b3419edb67757ae0830905f2e2277aad915", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta... |
import numpy as np
from sklearn.base import BaseEstimator, RegressorMixin
from sklearn.utils.validation import check_X_y, check_array, check_is_fitted
from scipy.optimize import minimize
from scipy.linalg import cholesky, solve
class GaussianProcessRegressor(BaseEstimator, RegressorMixin):
def __init__(self, kern... | {"hexsha": "b64ff2cee6c010087e9a78b8432b65420152338f", "size": 2225, "ext": "py", "lang": "Python", "max_stars_repo_path": "gassianprocess.py", "max_stars_repo_name": "jejjohnson/gaussian_processes", "max_stars_repo_head_hexsha": "e514d4d16d895f2e0530c7668cb01b68823dedd9", "max_stars_repo_licenses": ["MIT"], "max_stars... |
"""
TODO:
Main trick is getting the sentence matching task to work.
Probably the easiest thing is:
1. write dataset with the 'natural' (i.e., tf_record) structure
2. adapt this by drawing a batch of size 2, and randomly swapping examples.
(but I'm not 100% sure how to do this)
3. ?????
4. profit.
"""
import p... | {"hexsha": "f4c03f202da620c724b433b640d84032174b87da", "size": 23570, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/reddit/dataset/dataset.py", "max_stars_repo_name": "dveni/causal-text-embeddings", "max_stars_repo_head_hexsha": "82104f3fb6fd540cf98cb4ca0fd5b5d1fb5f757a", "max_stars_repo_licenses": ["MIT"]... |
"""Process Shopify Return."""
import pandas as pd
import json
from numpy import nan, sum
from typing import Dict
import timeit
from pyshopify.vars import (keys_list,
order_dtypes,
cust_dtypes,
ref_dtypes,
ref... | {"hexsha": "ed9c2248c8534a0b72c7700178061254088410be", "size": 6929, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pyshopify/return_parse.py", "max_stars_repo_name": "webdjoe/pyshopify", "max_stars_repo_head_hexsha": "69a6af2d168b327a1e94b1e9113852d04a6e1eb3", "max_stars_repo_licenses": ["MIT"], "max_stars... |
library("ggplot2")
data <- read.table("miniDistance")
changetoK <- function ( position ){
position=(10^position)/1000;
paste(position, "K", sep="")
}
changetoK2 <- function ( position ){
position=position/1000;
paste(position, "K", sep="")
}
pdf(file="conserved_hist.pdf")
ggplot(data=data, aes(x=log10(data$... | {"hexsha": "277a85899f2bbb9823bd76ef047368d8830a39ee", "size": 1974, "ext": "r", "lang": "R", "max_stars_repo_path": "scripts/extractInterGeneticSequence/mapConservedGeneToDenovoMiniPosition_plot.r", "max_stars_repo_name": "baoxingsong/dCNS", "max_stars_repo_head_hexsha": "86e324dc8321bceba8ecca325e4a64777286ae11", "ma... |
import Image_pb2
import ChannelOrder_pb2
import PacketMotionData_pb2
import TimestampedPacketMotionData_pb2
import cv2
import numpy as np
import argparse
import skimage
import skimage.io as io
import os
import time
from concurrent import futures
import logging
import argparse
import lmdb
import cv2
import deepracing.ba... | {"hexsha": "43b6f578e7955a9e566277e62f8f1c3c83f09640", "size": 7618, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepracing_py/deepracing/controls/PurePursuitControl.py", "max_stars_repo_name": "linklab-uva/deepracing", "max_stars_repo_head_hexsha": "fc25c47658277df029e7399d295d97a75fe85216", "max_stars_repo... |
import json
import numpy as np
def stats(fname):
with open(fname,"r") as infile:
data = json.load(infile)
paths_data = data['data']
site = data['site']
node_type = data['node_type']
name = data['name']
experiment_nodes = data['experiment_nodes']
paths = {}
f... | {"hexsha": "8c3313b0f7dd2684a08040b81eb19ba038360734", "size": 1053, "ext": "py", "lang": "Python", "max_stars_repo_path": "topology/stats.py", "max_stars_repo_name": "flmeyer/iotlab_topologies", "max_stars_repo_head_hexsha": "6e971454d1b20c8a95bb8ff2549dc7ac4ab8c4d5", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_... |
import os
import pickle
from unittest import mock, TestCase
from scipy import stats
import dynast.estimation.p_c as p_c
import dynast.estimation.p_e as p_e
import dynast.estimation.pi as pi
import dynast.preprocessing.aggregation as aggregation
from .. import mixins
class TestPi(mixins.TestMixin, TestCase):
d... | {"hexsha": "100ce6303cb6e0ed5087a87767b2fd7a53156df9", "size": 2372, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/estimation/test_pi.py", "max_stars_repo_name": "aristoteleo/dynast-release", "max_stars_repo_head_hexsha": "b676c7075b2907ebce7833dd668f32bc1c60d08e", "max_stars_repo_licenses": ["MIT"], "ma... |
(** * IndistRelations.v: indistinguishability relation for annotated programs *)
(*Require FFun.*)
Require Export DEX_BigStepAnnot.
Require Export Annotated.
Open Scope type_scope.
Import DEX_BigStepAnnot.DEX_BigStepAnnot DEX_BigStep.DEX_BigStep DEX_Dom DEX_Prog.
(* Hendra 12082016 - remove beta function, focus on D... | {"author": "h3nd24", "repo": "DEX_formalization", "sha": "8f56f3ee473701aa70ad7621355481dc8df0d1b4", "save_path": "github-repos/coq/h3nd24-DEX_formalization", "path": "github-repos/coq/h3nd24-DEX_formalization/DEX_formalization-8f56f3ee473701aa70ad7621355481dc8df0d1b4/DEX_IndistRelations.v"} |
/-
Try defining other operations on the natural numbers, such as multiplication,
the predecessor function (with pred 0 = 0), truncated subtraction
(with n - m = 0 when m is greater than or equal to n), and exponentiation.
Then try proving some of their basic properties,
building on the theorems we have already prov... | {"author": "ManuelAlejandroMartinezFlores", "repo": "LEAN_projects", "sha": "e60bda4bf3d9bbf4b958dd24641c97ac90da9514", "save_path": "github-repos/lean/ManuelAlejandroMartinezFlores-LEAN_projects", "path": "github-repos/lean/ManuelAlejandroMartinezFlores-LEAN_projects/LEAN_projects-e60bda4bf3d9bbf4b958dd24641c97ac90da9... |
! chk_random_init.f90 --
! Check if the compiler supports the random_init intrinsic function
!
program chk_random_init
implicit none
real, dimension(100) :: array1, array2
!
! Call random_init and random_number twice in succession
!
call random_init( .true., .true. )
call... | {"hexsha": "a23b375d888be0e82c185bd3e23c2796e3fa0832", "size": 855, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "chkfeatures/chk_random_init.f90", "max_stars_repo_name": "timcera/flibs_from_svn", "max_stars_repo_head_hexsha": "7790369ac1f0ff6e35ef43546446b32446dccc6b", "max_stars_repo_licenses": ["BSD-3-Cla... |
from __future__ import absolute_import, division, print_function
import argparse
import os
import re
from collections import defaultdict
import glob
import time
import pathlib
import imageio
import sys
import numpy as np
import fid
import imageio
import torch
import torchvision.utils as vutils
import torch.utils.data a... | {"hexsha": "1cf1ba751ce3c0b07964e2469f1d18896c732c87", "size": 8174, "ext": "py", "lang": "Python", "max_stars_repo_path": "closest_faces_plot.py", "max_stars_repo_name": "ilyakava/ACGAN-PyTorch", "max_stars_repo_head_hexsha": "a2ac29d4d297e091a9c6a80281767f796b390be2", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
push!(LOAD_PATH, "/home/ian/Grad/Research/Disks/DiskJockey/movie/")
# push!(LOAD_PATH, "/n/home07/iczekala/DiskJockey/")
# push!(LOAD_PATH, "/pool/scout0/DiskJockey/")
using consonance
using ArgParse
s = ArgParseSettings()
@add_arg_table s begin
# "--opt1"
# help = "an option with an argument"
"--run_ind... | {"hexsha": "0b728ca7f38a1aae03941a7239220b9229fc8a83", "size": 3138, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "movie/make_gplots.jl", "max_stars_repo_name": "elnjensen/DiskJockey", "max_stars_repo_head_hexsha": "ef618d27c2aff9b0540b0e00035b9a4dbfea1968", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
Require Import Crypto.Arithmetic.PrimeFieldTheorems.
Require Import Crypto.Specific.solinas32_2e226m5_9limbs.Synthesis.
(* TODO : change this to field once field isomorphism happens *)
Definition sub :
{ sub : feBW_tight -> feBW_tight -> feBW_loose
| forall a b, phiBW_loose (sub a b) = F.sub (phiBW_tight a) (phiBW... | {"author": "anonymous-code-submission-01", "repo": "sp2019-54-code", "sha": "8867f5bed0821415ec99f593b1d61f715ed4f789", "save_path": "github-repos/coq/anonymous-code-submission-01-sp2019-54-code", "path": "github-repos/coq/anonymous-code-submission-01-sp2019-54-code/sp2019-54-code-8867f5bed0821415ec99f593b1d61f715ed4f7... |
import gurobipy as gurobi
import numpy as np
from DCpower.config2 import *
import copy
class Region:
def __init__(self, index, X_raw, node_info, connection_info):
self.index = index
# give basic topology and information
self.node_count = 0
self.X_raw = X_raw
# connection_in... | {"hexsha": "4a651b87029e4d4d1e1b472f6d577bcf05e51602", "size": 15980, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/New folder/config3.py", "max_stars_repo_name": "MrDotJ/repetition-paper", "max_stars_repo_head_hexsha": "ddd4cf470681b845da1b8e6ae43f00ebccb1ee7b", "max_stars_repo_licenses": ["MIT"], "max... |
####
import os
#import glob
from glob import glob
from collections import namedtuple
import numpy as np
import numpy.ma as ma
import matplotlib.pyplot as plt
import wradlib
import wradlib.adjust as adjust
import wradlib.verify as verify
import wradlib.util as util
import scipy
#from scipy import ndimage
from scipy ... | {"hexsha": "4c54d5585d0542b42b4e9aba53b430b7025c1a4d", "size": 7623, "ext": "py", "lang": "Python", "max_stars_repo_path": "joachims_code/Sanity.py", "max_stars_repo_name": "cchwala/rainscanner", "max_stars_repo_head_hexsha": "0280ef2389b04e6cb1009433493d4f40d52fe5fe", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_... |
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import division
import unittest
import numpy as np
import turret
import turret.layers as L
from util import execute_inference
class Convolution2DTest(unittest.TestCase):
def _convolution_2d(self, x, W, b, stride, pad):
N, C,... | {"hexsha": "0b62404bc8260334706d34b121ff822061bf4910", "size": 4762, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/layers/convolution_2d_test.py", "max_stars_repo_name": "hemantranvir/turret", "max_stars_repo_head_hexsha": "bc3df21541ce2f808c749c985db47a210149f22c", "max_stars_repo_licenses": ["MIT"], "m... |
# -----------------------------------------------------------------------------
# Copyright (C) 2018 Nicolas P. Rougier
# Distributed under the terms of the BSD License.
# -----------------------------------------------------------------------------
import numpy as np
# Create our own dtype
dtype = np.dtype([('rank',... | {"hexsha": "12c8239b2a0b26510ea2178dd1613f8c92fd6b64", "size": 940, "ext": "py", "lang": "Python", "max_stars_repo_path": "input-output.py", "max_stars_repo_name": "ASPP/ASPP-2018-numpy", "max_stars_repo_head_hexsha": "430c43d4023b20ee581557ce874dbcacede3f56f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10,... |
function [soln,eqn,info] = StokesBDM1B(node,elem,bdFlag,pde,option)
%% STOKESRT0 Stokes equations: the lowest order BDM element in 2D.
%
% [soln,eqn,info] = StokesBDM1B(node,elem,bdFlag,pde,option)
% uses the lowest order of BDM1 element with bubble function
% (BDM1B) to approximate velocity u and piecewise
% const... | {"author": "lyc102", "repo": "ifem", "sha": "29f31c812001ca8d93dad08e67208ca60e8716d4", "save_path": "github-repos/MATLAB/lyc102-ifem", "path": "github-repos/MATLAB/lyc102-ifem/ifem-29f31c812001ca8d93dad08e67208ca60e8716d4/equation/StokesBDM1B.m"} |
(* --------------------------------------------------------------------
* Copyright (c) - 2006--2012 - IMDEA Software Institute
* Copyright (c) - 2006--2012 - Inria
* Copyright (c) - 2006--2012 - Microsoft Coprporation
*
* Distributed under the terms of the CeCILL-B-V1 license
* ----------------------------------... | {"author": "EasyCrypt", "repo": "certicrypt", "sha": "7b3cd2fe4a317aec38dfff9eec902b265c575587", "save_path": "github-repos/coq/EasyCrypt-certicrypt", "path": "github-repos/coq/EasyCrypt-certicrypt/certicrypt-7b3cd2fe4a317aec38dfff9eec902b265c575587/Examples/ZK/SigmaOr.v"} |
#include <boost/test/unit_test.hpp>
#include "ethcrypto/cipher/AesCipher.hpp"
#include "ethcrypto/cipher/Scrypt.hpp"
using namespace Ethereum;
BOOST_AUTO_TEST_SUITE(AesCipherTest)
BOOST_AUTO_TEST_CASE(encrypt)
{
std::string plain("hello world !!!");
AesCipher<Scrypt> cipher(MakeRandomIV(), MakeRandomScry... | {"hexsha": "6839cb300d6c22f0e863d0ff9c858b2b69b3e7c2", "size": 607, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/AesTest.cpp", "max_stars_repo_name": "devktor/libbitcrypto", "max_stars_repo_head_hexsha": "1b08fb75e6884a622f3a646bfb7bf22609f968ea", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0,... |
from typing import Dict, Optional, Union, cast
import numpy as np
import pandas as pd
from autotabular.constants import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, MULTILABEL_CLASSIFICATION, MULTIOUTPUT_REGRESSION, REGRESSION
from autotabular.data.abstract_data_manager import AbstractDataManager
from autotabular... | {"hexsha": "59c64ac4c6cbb9875505f281ec032e361cb4c385", "size": 2602, "ext": "py", "lang": "Python", "max_stars_repo_path": "autotabular/data/xy_data_manager.py", "max_stars_repo_name": "jianzhnie/AutoTabular", "max_stars_repo_head_hexsha": "fb407300adf97532a26d33f7442d2a606fa30512", "max_stars_repo_licenses": ["Apache-... |
from robonet.video_prediction.layers.dnaflow_rnn_cell import VPredCell
import numpy as np
from robonet.video_prediction.layers.dnaflow_rnn_cell import apply_flows, apply_cdna_kernels, apply_dna_kernels, apply_kernels, identity_kernel, RELU_SHIFT
import tensorflow as tf
from robonet.video_prediction import ops, flow_ops... | {"hexsha": "165d5cb1d5674ab840538d75ab091b59446ecd9f", "size": 14716, "ext": "py", "lang": "Python", "max_stars_repo_path": "robonet/video_prediction/layers/deterministic_embedding_rnn_cell.py", "max_stars_repo_name": "russellmendonca/RoboNet", "max_stars_repo_head_hexsha": "de30fa069dacb2888e62bd239e7a3471ea3aaa9d", "... |
# --------------
# Importing header files
import numpy as np
# Path of the file has been stored in variable called 'path'
#New record
new_record=[[50, 9, 4, 1, 0, 0, 40, 0]]
#Code starts here
data=np.genfromtxt(path,delimiter=",",skip_header=1)
new_record=np.array(new_record)
census=np.concatenate((... | {"hexsha": "79b9bdb9792eb0ad99a8ea168d15658548ee3403", "size": 1480, "ext": "py", "lang": "Python", "max_stars_repo_path": "Working-On-Census-/code.py", "max_stars_repo_name": "Saurabh2702/Machine-Learning-Grey-Atom", "max_stars_repo_head_hexsha": "7c129a90b4ed5ba2f02fd7164640028af1ddb99f", "max_stars_repo_licenses": [... |
# Copyright 2021 NREL
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distri... | {"hexsha": "9fc8b8399b9bf0ea10769430ac240a9769527452", "size": 9954, "ext": "py", "lang": "Python", "max_stars_repo_path": "flasc/optimization.py", "max_stars_repo_name": "NREL/flasc", "max_stars_repo_head_hexsha": "ac734892efc1bc7684e2393ffa1ce7a97a54efa1", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":... |
import time
import random
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import distancemap as dm
BENCHMARK = True
EXAMPLE = True
def benchmark():
# 1024 x 1024 with 10 points
input = np.zeros((1024, 1024)).astype(np.bool)
input[256, 256] = True
input[256, 512] = True
input[... | {"hexsha": "6dccd8f7ff477e347cfdf2a20b2026010a2fad0c", "size": 5495, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "Cyril-Meyer/DistanceMap", "max_stars_repo_head_hexsha": "1eb06e47519800d49cdf5662932b29d78a2740e6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
theory Projective_Space_Axioms
imports Main
begin
(* Author: Anthony Bordg, University of Cambridge, apdb3@cam.ac.uk *)
text \<open>
Contents:
\<^item> We introduce the types @{typ 'point} of points and @{typ 'line} of lines and an incidence relation
between them.
\<^item> A set of axioms for the (3-dimensional) p... | {"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/Projective_Ge... |
program t
integer::k=-1
call s(2,k)
print '(i0)',k
contains
subroutine s(j,k)
integer,intent(in)::j
integer,intent(out)::k
integer::i=1
print '(i0)',i+j
k=77
end subroutine
end program t
| {"hexsha": "230decbf18bf3db7bf3251ea8c144f311aba6cd3", "size": 217, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/t0207r/t.f90", "max_stars_repo_name": "maddenp/ppp", "max_stars_repo_head_hexsha": "81956c0fc66ff742531817ac9028c4df940cc13e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ... |
%10
%examples done
%bib done
%tables done
%crossrefs
\section{Introduction}
\label{sec:10:1}
\hypertarget{Toc385255248}{}The Alor-Pantar languages sometimes index event participants using pronominal indexing\is{pronominal indexing} on the verb. The factors that determine when this happens vary significantly acros... | {"hexsha": "c0de374c96c84cab1412f8c849fc2bb78d8c8432", "size": 104402, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "finished/Klamer/chapters/wl10.tex", "max_stars_repo_name": "langsci/sidl", "max_stars_repo_head_hexsha": "ca113bd66d56345895af9a6d5bd9adbcde69fc22", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_... |
#!/usr/bin/env python
# a bar plot with errorbars ... | {"hexsha": "32086414f6f89f74099432c53caf59f66acf44ee", "size": 1204, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/print_source_paths.py", "max_stars_repo_name": "rolandomar/stheno", "max_stars_repo_head_hexsha": "6b41f56f25be1e7d56c8be4973203bf943e4f041", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
import numpy as np
from .bbo_agent import BBOAgent
from typing import Callable
class GA(BBOAgent):
"""
A canonical Genetic Algorithm (GA) for policy search is a black box
optimization (BBO) algorithm.
Parameters
----------
populationSize (int): the number of individuals per generation
... | {"hexsha": "e60ba42335f79bc0e1b36349d754298dce092d38", "size": 2013, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl687/agents/ga.py", "max_stars_repo_name": "purujitgoyal/rl-framework-687-public", "max_stars_repo_head_hexsha": "c315ba64267b2f15aa18fe098259243bec521954", "max_stars_repo_licenses": ["MIT"], "m... |
PROGRAM FM025
C COMMENT SECTION. 00010025
C 00020025
C FM025 00030025
C ... | {"hexsha": "931d3aaed789fcfbdadb243bc9d9490a53001cc3", "size": 35418, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Fortran/UnitTests/fcvs21_f95/FM025.f", "max_stars_repo_name": "MrSidims/llvm-test-suite", "max_stars_repo_head_hexsha": "8a717b0ecf8302afcf8606f25dc1713435cea69d", "max_stars_repo_licenses": ["Ap... |
import numpy as np
import matplotlib.pyplot as plt
data = np.loadtxt('Filename.txt')
# Choose how many bins you want here
num_bins = 10
# Use the histogram function to bin the data
counts, bin_edges = np.histogram(data, bins=num_bins, normed=True)
# Now find the cdf
cdf = np.cumsum(counts)
# And finally plot the c... | {"hexsha": "1d377a5b7a7f00166da375fa191e122b28478a80", "size": 364, "ext": "py", "lang": "Python", "max_stars_repo_path": "net/dev/benchmarks/old/pausing/cdfPlot.py", "max_stars_repo_name": "JinLabIIT/DSSnet", "max_stars_repo_head_hexsha": "3b9c1771eae8e2a1157d36500bce4b6e84e52c4d", "max_stars_repo_licenses": ["Apache-... |
import gym
import numpy as np
from utils import plot_value_function
from collections import defaultdict
env = gym.make('Blackjack-v0')
gamma = 1
def create_random_policy(nA):
A = np.ones(nA, dtype=float) / nA
def policy(observarion):
return A
return policy
def create_greedy_policy(Q):
de... | {"hexsha": "89cade49d84de20efd41907feecdb3d172865c76", "size": 2182, "ext": "py", "lang": "Python", "max_stars_repo_path": "Monte Carlo/MonteCarlo_Off-policy.py", "max_stars_repo_name": "Sushant-ctrl/reinforcement-learning", "max_stars_repo_head_hexsha": "01fdf6ece5ddef0e55fc2047fecd9bd951182ccb", "max_stars_repo_licen... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 5 11:58:04 2021
@author: dberke
Make changes to the data in star.Star objects, up to rebuilding them entirely.
"""
import argparse
from functools import partial
from glob import glob
from json.decoder import JSONDecodeError
import lzma
from multi... | {"hexsha": "12a4f2e152503b97c1676914dc8f1d49be02c19e", "size": 10069, "ext": "py", "lang": "Python", "max_stars_repo_path": "varconlib/scripts/modify_stars.py", "max_stars_repo_name": "DBerke/alpha-var-code", "max_stars_repo_head_hexsha": "9b97622dfddd582e048e32d47afb29cf8ec14544", "max_stars_repo_licenses": ["MIT"], "... |
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.13.1
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# %% _uuid="8f2839f25d086af7... | {"hexsha": "0b088883b5dd7c121ec2fcac21cf028f979c4272", "size": 17435, "ext": "py", "lang": "Python", "max_stars_repo_path": "_kaggle/_render/heart-diseases-modeling/nb.py", "max_stars_repo_name": "jramirez857/soorgeon", "max_stars_repo_head_hexsha": "54ab679f72be38731f5b43c6835f9a14921c396d", "max_stars_repo_licenses":... |
from __future__ import print_function
import tensorflow as tf
import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout
from keras.optimizers import RMSprop
import numpy as np
#print('tensorflow:', tf.__version__)
#print('keras:', keras.__version__)
#l... | {"hexsha": "01f847d50924067e8fc3251ed3f4496ddc442dd4", "size": 2960, "ext": "py", "lang": "Python", "max_stars_repo_path": "td/lab2_skeleton.py", "max_stars_repo_name": "K1ntus/Deep-Learning", "max_stars_repo_head_hexsha": "8737c0cf32d34d1533f249ddd3eb8ada181fb7ad", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import numpy as np
import matplotlib.pyplot as plt
from sklearn import datasets
from neupy import algorithms, layers, utils
def load_data():
X, _ = datasets.fetch_openml('mnist_784', version=1, return_X_y=True)
X = (X / 255.).astype(np.float32)
np.random.shuffle(X)
x_train, x_test = X[:60000], X[6000... | {"hexsha": "10513d78527af24a07e72a69af2a75e824a3c117", "size": 1641, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/autoencoder/denoising_autoencoder.py", "max_stars_repo_name": "FrostByte266/neupy", "max_stars_repo_head_hexsha": "4b7127e5e4178b0cce023ba36542f5ad3f1d798c", "max_stars_repo_licenses": ["... |
import typing as t
import numpy as np
import pandas as pd # type: ignore
from tgboost import __version__ as _version
from tgboost.config.core import config
from tgboost.processing.data_manager import load_pipeline
from tgboost.processing.smiles_manager import SmilesEmbedder, SmilesWrapper
from tgboost.processing.val... | {"hexsha": "03c5a54a9d112e933977664e6df991a1809f865b", "size": 1751, "ext": "py", "lang": "Python", "max_stars_repo_path": "tgboost/predict.py", "max_stars_repo_name": "U0M0Z/tgpipe", "max_stars_repo_head_hexsha": "436b8166858f80d59dfedc07769ea1f5b0278423", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"... |
import numpy as np
from typing import List
from . import core
class Reshape(core.Layer):
def __init__(self, input_shape: List[int], output_shape: List[int] = [-1]) -> None:
self.output_shape = output_shape
super(Reshape, self).__init__(input_shape)
def get_output_shape(self) -> List[int]:
... | {"hexsha": "06a0022f51020114f019a7ce0daec2a93703c96f", "size": 1112, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf_encrypted/layers/reshape.py", "max_stars_repo_name": "bendecoste/tf-encrypted", "max_stars_repo_head_hexsha": "00c9b80435411299a518f777de644c61d64cceea", "max_stars_repo_licenses": ["Apache-2.0... |
function lgwt(N0::Integer,a::Real=-1,b::Real=1)
# This script is for computing definite integrals using Legendre-Gauss
# Quadrature. Computes the Legendre-Gauss nodes and weights on an interval
# [a,b] with truncation order N
#
# Suppose you have a continuous function f(x) which is defined on [a,b]
... | {"hexsha": "45401624b80c7e8b0b36dd0c0efb833aa1d7f592", "size": 2592, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "ProblemSets/PS4-mixture/functions.jl", "max_stars_repo_name": "aelfat/fall-2021", "max_stars_repo_head_hexsha": "0c0c0c08102b2f7e30c38e1ac510b313241f3f82", "max_stars_repo_licenses": ["MIT"], "max_... |
import numpy as NP
from matplotlib import pyplot as PLT
with open('./random.txt') as f:
v = NP.loadtxt(f, delimiter=",\n", dtype='float', comments="#", skiprows=1, usecols=None)
PLT.hist(v,bins=100)
PLT.ylabel("Frequency")
PLT.xlabel("Random Vector")
PLT.show()
| {"hexsha": "cdac0fa121bad705073f06757906149db276a922", "size": 274, "ext": "py", "lang": "Python", "max_stars_repo_path": "MonteCarlo/histo.py", "max_stars_repo_name": "namhonhat96/Monte_Carlos_project", "max_stars_repo_head_hexsha": "0b2d809eb72563fdca9f234139415aa7a8a265dd", "max_stars_repo_licenses": ["MIT"], "max_s... |
using OCToolbox
using QuantumOpticsBase
using Test
b = SpinBasis(1//2)
sx = sigmax(b)
sy = sigmay(b)
sz = sigmaz(b)
example_control = [0.810635963493793
, 0.46484987867321426
, 0.34970273151618936
, 0.7916035280985718
, 0.3613862392184721
, 0.619927796151712
, 0.6967410801849956
, 0.055413818931025594
, 0.545223199751... | {"hexsha": "198d1655d01a145de87974f2e9b58799245901d7", "size": 534, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Test_utils.jl", "max_stars_repo_name": "Bzzzt90/OCToolbox.jl", "max_stars_repo_head_hexsha": "4ef2bd3dd2d40042bbd5d8505feb6b8b5cded770", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4... |
[STATEMENT]
lemma store_sub2_privilege:
assumes a1: "s' = snd (fst (store_sub2 instr curr_win rd asi address s))
\<and> (((get_S (cpu_reg_val PSR s)))::word1) = 0"
shows "(((get_S (cpu_reg_val PSR s')))::word1) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. get_S (cpu_reg_val PSR s') = 0
[PROOF STEP]
proof (... | {"llama_tokens": 19367, "file": "SPARCv8_SparcModel_MMU_Sparc_Properties", "length": 53} |
[STATEMENT]
lemma (*cp_OclForall:*)
"cp S \<Longrightarrow>
(\<And> x. cp(P x)) \<Longrightarrow>
cp(\<lambda>X. ((S X)->forAll\<^sub>B\<^sub>a\<^sub>g(x | P x X)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>cp S; \<And>x. cp (P x)\<rbrakk> \<Longrightarrow> cp (\<lambda>X. S X->forAll\<^sub>B\<^sub>... | {"llama_tokens": 161, "file": "Featherweight_OCL_collection_types_UML_Bag", "length": 1} |
import random
from collections import deque
from multiprocessing.dummy import Pool as ThreadPool
import numpy as np
from keras.layers import Dense
from keras.models import Sequential
from keras.optimizers import Adam
from util import v_upperbound, reverse_subarray, AtomicInteger, plot_running_avg, plot, \
greedy_rev... | {"hexsha": "ca3db6174bca1ec8c195297439e2a5e0dfcbfe09", "size": 8430, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/ddqn.py", "max_stars_repo_name": "gbuenoandrade/Permutations-Sorting-with-RL", "max_stars_repo_head_hexsha": "b977c0100257a58f764bbd3e83b4046f631dc530", "max_stars_repo_licenses": ["MIT"], "m... |
# -*- coding: utf-8 -*-
# Copyright (c) 2014, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""
Simple demonstration of ImageVisual.
"""
import numpy as np
import vispy.app
from vispy import gloo
from vispy.scene import visuals
image = np.random.normal(size=(100, 1... | {"hexsha": "dfe215215fe58c2c1cf70d25571f38bcb7cd10f7", "size": 884, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/basics/visuals/image_visual.py", "max_stars_repo_name": "shjoshi/vispy", "max_stars_repo_head_hexsha": "2f3d169aa60c738467e766c59096f51570483d6f", "max_stars_repo_licenses": ["BSD-3-Clause... |
SUBROUTINE jacob3(cartd,deriv,detj,elcod,elem,nnode,istop)
!*********************************************************************
!
!**** this SUBROUTINE evaluates the jacobian matrix and the cartesian
! shape function derivatives
!
!*********************************************************************... | {"hexsha": "4e1444ab8ae72501fb73291047b507a88ed93862", "size": 1777, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/auxil/jacob3.f90", "max_stars_repo_name": "jerebenitez/IFE-simpact-openfoam", "max_stars_repo_head_hexsha": "2dbcbf3195b22fca1c80ad0da6b3822b6cad5cdf", "max_stars_repo_licenses": ["MIT"], "m... |
# Copyright 2020 D-Wave Systems 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": "d61300522f353f40ec1e91d6e37ff13ce8eb5170", "size": 8684, "ext": "py", "lang": "Python", "max_stars_repo_path": "minorminer/layout/tests/test_layout.py", "max_stars_repo_name": "randomir/minorminer", "max_stars_repo_head_hexsha": "f9add48786796e8be5379778fac745ac8f663b35", "max_stars_repo_licenses": ["Apache... |
""" Fully Connected Layer """
import numpy as np
from layers.sigmoid_layer import sigmoid,sigmoid_deriv
from layers.relu_layer import Relu,Relu_deriv
class FCLayer():
def __init__(self, num_input, num_output, actFunction='relu', trainable=True):
"""
Apply a linear transformation to the incoming data: y = Wx + b... | {"hexsha": "9130a1e7d5a6738a23c5fe2a375ed6ef012df6eb", "size": 2936, "ext": "py", "lang": "Python", "max_stars_repo_path": "homework-12345/homework3/layers/fc_layer.py", "max_stars_repo_name": "easilylazy/pattern-recognition", "max_stars_repo_head_hexsha": "2b95689bb3f34e4821a0211b19b76164aa6e615f", "max_stars_repo_lic... |
Require Import Gappa_common.
Require Import Gappa_pred_nzr.
Lemma Rabs_def2b :
forall x a : R, (Rabs x <= a)%R -> (-a <= x <= a)%R.
Proof.
intros x a H.
split.
case (Rcase_abs x); intros.
rewrite Rabs_left with (1 := r) in H.
rewrite <- (Ropp_involutive x).
apply Ropp_le_contravar with (1 := H).
apply Rle_trans with... | {"author": "cartazio", "repo": "gappa-coq", "sha": "2d72e2f71a9f52a04bdf878b2fddea573aced0fa", "save_path": "github-repos/coq/cartazio-gappa-coq", "path": "github-repos/coq/cartazio-gappa-coq/gappa-coq-2d72e2f71a9f52a04bdf878b2fddea573aced0fa/src/Gappa_pred_abs.v"} |
import numpy as np
import tensorflow as tf
import pandas as pd
import matplotlib.pyplot as plt
import time
import math
# load data function:
def load_data(filename):
print("Loading data...")
start = time.time()
csv = np.array(pd.read_csv(filename))
y = np.array(csv[:, 0], ndmin=2).T
x = np.array(cs... | {"hexsha": "084392d578eb2ffdf2a9bf4db24547be5ec59063", "size": 29233, "ext": "py", "lang": "Python", "max_stars_repo_path": "cnn_functions.py", "max_stars_repo_name": "xtymbbt/digit_recognize_cnn", "max_stars_repo_head_hexsha": "78c8edf74f964e5e1e9d4fa335d4aaccc0bf49df", "max_stars_repo_licenses": ["Apache-2.0"], "max_... |
import numpy as np
from .containers import Input, Output, Parameter, req, regression_types, cv_types
class Binarizer(object):
task = 'Prepare'
subtask = 'feature representation'
host = 'sklearn'
function = 'Binarizer'
modules = ('sklearn','preprocessing')
requirements = (req(1), req(2))
doc... | {"hexsha": "ba2d0b586dc279ef7fcd8388469cce0645505ce6", "size": 58210, "ext": "py", "lang": "Python", "max_stars_repo_path": "chemeco/wrappers/database/unhooked/sklearn_db2.py", "max_stars_repo_name": "hachmannlab/chemeco", "max_stars_repo_head_hexsha": "a8c71dec4bbc0079b4fb11bf64981faf927a3e2f", "max_stars_repo_license... |
export calculate_press_grad, calculate_press_grad_all
"""
port_dist(port1, port2, port2channels, portdists)
port_dist(port1, port2, res)
Distance between two pressure ports
"""
port_dist(port1, port2, res::RcRes) = port_dist(port1, port2, res.ex)
function port_dist(port1, port2, ex::RcExp)
@unpack portdis... | {"hexsha": "8b6149220bf4d1ecebbbc8ab9c53932d7a07083a", "size": 4731, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/proc.jl", "max_stars_repo_name": "mauro3/RchannelImages.jl", "max_stars_repo_head_hexsha": "738ad3d318cebf1e2d3afebf16ad60f70b08a6cf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
\documentstyle[11pt]{article}
\setlength{\parindent}{0.0in}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0.0in}
\pagestyle{headings}
\begin{document}
{\Large \bf Sorted Documentation }\\
{\tt [ Python Module : swig ] }\\
This file tests SWIG's documentation sorting
\\\section{C Section}{\tt \bf cvar... | {"hexsha": "7e77cb34a3d11424ce399fdb2ee1296ff07af694", "size": 2455, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "OOFSWIG/Tests/Doc/sort_regr.tex", "max_stars_repo_name": "usnistgov/OOF3D", "max_stars_repo_head_hexsha": "4fd423a48aea9c5dc207520f02de53ae184be74c", "max_stars_repo_licenses": ["X11"], "max_stars_c... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import math
import pickle
from multiprocessing import Pool, Value
class Counter(object):
def __init__(self):
self.val = Value('i', 0)
def add(self, n=1):
with self.... | {"hexsha": "0b4fb4cdbe99322949ade22eaf192e70d12fd60e", "size": 3580, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/cal_geometry_feats.py", "max_stars_repo_name": "deepylt/VSUA-Captioning", "max_stars_repo_head_hexsha": "ae4ed4fd478c88764f24ccea6aefb3c76c4f0eac", "max_stars_repo_licenses": ["MIT"], "max... |
import pandas as pd
import numpy as np
import warnings
warnings.filterwarnings('ignore')
import tkinter as tk
from tkinter import ttk, scrolledtext, Menu, \
messagebox as msg, Spinbox, \
filedialog
global sol,f1Var,filePathBank,\
filePathLedger,filePathBank, \
int... | {"hexsha": "9dc26e34b67c5a2ced5924b98e6fee323282fa4a", "size": 4449, "ext": "py", "lang": "Python", "max_stars_repo_path": "BankReconciliation.py", "max_stars_repo_name": "pavitsu/pavit-bank-reconciliation", "max_stars_repo_head_hexsha": "332426f697302308c2f2a5d8278448b545ce513c", "max_stars_repo_licenses": ["MIT"], "m... |
import os
import h5py
import numpy as np
from chainer_chemistry.datasets.numpy_tuple_dataset import NumpyTupleDataset
MAX_NUM_POINT = 4096
def load_h5(h5_filename):
f = h5py.File(h5_filename)
data = f['data'][:]
label = f['label'][:]
return data, label
def get_dataset(test_area_int=6, num_point=... | {"hexsha": "d20bf47172bc2616d50951d0c0bda00db82f24e4", "size": 3497, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/s3dis/s3dis_dataset.py", "max_stars_repo_name": "corochann/chainer-pointnet", "max_stars_repo_head_hexsha": "4b0350122c6a704ebea9bf206896a6f18e1ab4d7", "max_stars_repo_licenses": ["MIT... |
import numpy as np
from scipy.stats import pearsonr, spearmanr
def _clear_max_min(x, y):
idx_x = set(np.where((x > x.min()) & (x < x.max()))[0])
idx_y = set(np.where((y > y.min()) & (y < y.max()))[0])
inter_idx = sorted(list(idx_x.intersection(idx_y)))
return x[inter_idx], y[inter_idx]
def diagcorr(... | {"hexsha": "98ebec1858dc4e16a77bb27ab085b42a4c7c4767", "size": 1628, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utils/Corr.py", "max_stars_repo_name": "phicks22/HiCARN", "max_stars_repo_head_hexsha": "4df30b41ebc20722b9791f6eef0d4317250e7258", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_s... |
import numpy as np
import collections
import scipy.stats as stats
import matplotlib.pyplot as plt
x = [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9]
#calculate frequency
c = collections.Counter(x) #print(c)
# calculate the number of instances in the list
count_sum = ... | {"hexsha": "2a0239d69295f1e8bcb2c92a22eaf3ccd1c41d73", "size": 830, "ext": "py", "lang": "Python", "max_stars_repo_path": "prob.py", "max_stars_repo_name": "ttglennhall/simple_data_analysis_python", "max_stars_repo_head_hexsha": "f18659d87d061e18fe7169ad0dcb3aa61fb8e430", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import numpy as np
import pandas as pd
import pytest
from pandas.testing import assert_frame_equal
from evalml.pipelines.components import DateTimeFeaturizer
def test_datetime_featurizer_init():
datetime_transformer = DateTimeFeaturizer()
assert datetime_transformer.parameters == {"features_to_extract": ["ye... | {"hexsha": "0a1a5b4c3cd6a278ccf1eed6947a437a2c93dbd4", "size": 8049, "ext": "py", "lang": "Python", "max_stars_repo_path": "evalml/tests/component_tests/test_datetime_featurizer.py", "max_stars_repo_name": "sharshofski/evalml", "max_stars_repo_head_hexsha": "f13dcd969e86b72ba01ca520247a16850030dcb0", "max_stars_repo_li... |
%==============================================================================
% This code is part of the Matlab-based toolbox
% FAIR - Flexible Algorithms for Image Registration.
% For details see
% - https://github.com/C4IR and
% - http://www.siam.org/books/fa06/
%==================================================... | {"author": "C4IR", "repo": "FAIR.m", "sha": "975edebd37b833ae76696792870de5c05efcb9cb", "save_path": "github-repos/MATLAB/C4IR-FAIR.m", "path": "github-repos/MATLAB/C4IR-FAIR.m/FAIR.m-975edebd37b833ae76696792870de5c05efcb9cb/kernel/examples/E6_HNSP_SSD_rotation2D_level4.m"} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.