text
stringlengths
0
27.1M
meta
dict
[STATEMENT] lemma karatsuba_main_step: fixes f :: "'a :: comm_ring_1 poly" assumes f: "f = monom_mult n f1 + f0" and g: "g = monom_mult n g1 + g0" shows "monom_mult (n + n) (f1 * g1) + (monom_mult n (f1 * g1 - (f1 - f0) * (g1 - g0) + f0 * g0) + f0 * g0) = f * g" [PROOF STATE] proof (prove) goal (1 subgoal): ...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Berlekamp_Zassenhaus_Karatsuba_Multiplication", "hexsha": null, "include": null, "lang": null, "length": 2, "llama_tokens": 374, "mathlib_filename": null, "max_forks_count": null, "...
[STATEMENT] lemma cas_subset : assumes "ces v1 es v2 subs1" assumes "subs1 \<subseteq> subs2" shows "ces v1 es v2 subs2" [PROOF STATE] proof (prove) goal (1 subgoal): 1. SubRel.ces v1 es v2 subs2 [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: SubRel.ces v1 es v2 subs1 subs1 \<subseteq> subs2...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "InfPathElimination_SubRel", "hexsha": null, "include": null, "lang": null, "length": 2, "llama_tokens": 188, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks...
# -*- coding: utf-8 -*- """ Created: 08/11/2018 Last update: 12/11/2018 Alex Daniel, Sir Peter Mansfield Imaging Centre, The University of Nottingham, 2018. pton (p-to-n or par-to-nifti) converts Philips PAR/REC format data into compressed nifti data. This tool is designed as an alternative to the popular ptoa.exe whi...
{ "alphanum_fraction": 0.5396809267, "author": null, "avg_line_length": 46.6398104265, "converted": null, "ext": "py", "file": null, "hexsha": "54ede52908dc0f1dcc61bb1aac4d0ac0007b27e0", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
from flask import Flask, jsonify, request, redirect, make_response import logging, sys, time import cv2 import numpy as np import os, re from werkzeug.datastructures import ImmutableMultiDict import face_recognition import json from google.cloud import firestore from datetime import date # Intializion code. Also reduc...
{ "alphanum_fraction": 0.5984388552, "author": null, "avg_line_length": 35.2445414847, "converted": null, "ext": "py", "file": null, "hexsha": "d82904d04385dfe9b22d9a533646e6f3fd43e920", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import gcsfs import pandas as pd import numpy as np import statistics as stats from line_reader import LineReader from table_identifier import TableIdentifier from table_fitter import TableFitter from pdf_annotator import PDFAnnotator from doc_ai_parser import DocParser from table_to_df import Table2Df fs = gcsfs.GCS...
{ "alphanum_fraction": 0.68975, "author": null, "avg_line_length": 36.3636363636, "converted": null, "ext": "py", "file": null, "hexsha": "401ef552f8566e29e91756bdeb677881d04ee6fd", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_co...
import os import random import numpy as np import tensorflow as tf from tensorflow import keras from PIL import Image from train_data import TrainData class ModelLoss(): def __init__(self): pass def call(self, y_true, y_pred): return tf.losses.mean_squared_error(y_true, y_pred) def buil...
{ "alphanum_fraction": 0.4927697442, "author": null, "avg_line_length": 28.6914893617, "converted": null, "ext": "py", "file": null, "hexsha": "90823c8c307ca59303ba7f50bb8f7e4d41cc057c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import codecs import pandas as pd import numpy as np import mysql.connector as MySQL import re arabic_diacritics = re.compile(""" ّ | # Tashdid َ | # Fatha ً | # Tanwin Fath ُ | # Damma ...
{ "alphanum_fraction": 0.5589095219, "author": null, "avg_line_length": 52.2933884298, "converted": null, "ext": "py", "file": null, "hexsha": "a1ada4e2431d074d83bb8901c4c3fc89d780a12d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
!############################################################################## !# **************************************************************************** !# <name> timescalehierarchy </name> !# **************************************************************************** !# !# <purpose> !# This module maintains ti...
{ "alphanum_fraction": 0.6122390621, "author": null, "avg_line_length": 24.4545454545, "converted": null, "ext": "f90", "file": null, "hexsha": "8f9a9754ad42986eccc0e334a6d8f8a737558b8e", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_f...
import os import shutil import argparse import time as t import torch import numpy as np import torch.nn as nn import tensorboardX as tX import torch.optim as optim import torch.nn.functional as F import torchvision.transforms as T from torch.utils.data import DataLoader from dataloader.KITTI2015_loader i...
{ "alphanum_fraction": 0.6335364452, "author": null, "avg_line_length": 42.9530864198, "converted": null, "ext": "py", "file": null, "hexsha": "48860b14b6be07e756d64588db67e9a7da6a1241", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
def maketree(n=12, gamma=0.1, algorithm='kurtosis-matching', k=10, tol=1e-12, extra_precision=False): ''' Generate and plot the willow tree in a single step. Input --------------------------------------------------------------------------- n: int, optional argument. The number of space...
{ "alphanum_fraction": 0.6127477236, "author": null, "avg_line_length": 48.4935064935, "converted": null, "ext": "py", "file": null, "hexsha": "86e397c533901fe79645e9d67dd42e8a57ab90b5", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
from __future__ import absolute_import import sys sys.path.append('./') import argparse import os import os.path as osp import numpy as np import math import time from PIL import Image, ImageFile import torch from torch import nn, optim from torch.backends import cudnn from torch.utils.data import DataLoader from tor...
{ "alphanum_fraction": 0.6598796034, "author": null, "avg_line_length": 30.0425531915, "converted": null, "ext": "py", "file": null, "hexsha": "c70d777d647af24fbcca54865db975663a1b46cd", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import os import torch import torchvision from torch import nn from torch.autograd import Variable from torch.utils.data import DataLoader from torchvision import transforms from torchvision.utils import save_image from datasets import get_datase...
{ "alphanum_fraction": 0.637236534, "author": null, "avg_line_length": 35, "converted": null, "ext": "py", "file": null, "hexsha": "70f9b6f09968523e77dc7e5f1dc2ba649c176bd8", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": 1...
import gym import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import pickle import trfl from DQN_utilities import * # env parameters STATE_SIZE_0 = 52 ACTION_SIZE_0 = 5 STATE_SIZE_1 = 36 ACTION_SIZE_1 = 11 RESTORE_PAR = False ckpt_dir = "./checkpoints_2/dataCache.ckpt-4999" # define network hy...
{ "alphanum_fraction": 0.642321069, "author": null, "avg_line_length": 37.4178082192, "converted": null, "ext": "py", "file": null, "hexsha": "eb665f1e9b867c7642d309f18e60c6733594445f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import caffe import numpy as np np.set_printoptions(threshold='nan') MODEL_FILE = 'train_val.prototxt' PRETRAIN_FILE = 'solver_iter_500.caffemodel' params_txt = 'params.txt' pf = open(params_txt, 'w') net = caffe.Net(MODEL_FILE, PRETRAIN_FILE, caffe.TEST) for param_name in net.params.keys(): print(param_...
{ "alphanum_fraction": 0.4915857893, "author": null, "avg_line_length": 21.8077669903, "converted": null, "ext": "py", "file": null, "hexsha": "65137f7a4e49e10e26616263153c1c9aaef6e684", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
"""A set of extra ufuncs inspired from PDL: Fused operations. - add3 - multiply3 - multiply3_add - multiply_add - multiply_add2 - multiply4 - multiply4_add Note: for many use-cases, numba may provide a better solution """ from __future__ import division, absolute_import, print_function import numpy as np from . im...
{ "alphanum_fraction": 0.5999522046, "author": null, "avg_line_length": 25.9102167183, "converted": null, "ext": "py", "file": null, "hexsha": "6f1febbef214c8a113482086dd9257b996d556a5", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import logging import abc import logging import os import shutil import struct import sys from typing import List, Union, Optional import numpy as np from dataforge import Meta from dataforge.io import JsonMetaFormat from numpy import dtype from tables import open_file, File, Group, Filters from .run_tools import Inp...
{ "alphanum_fraction": 0.5974859588, "author": null, "avg_line_length": 36.1256038647, "converted": null, "ext": "py", "file": null, "hexsha": "638f28b58b31cc85af31c38224511437db4edd41", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
from numba.cuda.testing import CUDATestCase, skip_on_cudasim import subprocess import sys import unittest cuhello_usecase = """\ from numba import cuda @cuda.jit def cuhello(): i = cuda.grid(1) print(i, 999) print(-42) cuhello[2, 3]() cuda.synchronize() """ printfloat_usecase = """\ from numba import ...
{ "alphanum_fraction": 0.6387592643, "author": null, "avg_line_length": 28.2403100775, "converted": null, "ext": "py", "file": null, "hexsha": "d8dca831a1ea455f9c29dd50d29f27dfd7720690", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import argparse import os import shutil from tqdm import tqdm import logging import json import numpy as np from datasets import load_from_disk,load_metric from src.utils.all_utils import read_yaml,read_json,parameters,create_directory,has_same_value,quantize_onnx_model,CompressModel from transformers import AutoTokeni...
{ "alphanum_fraction": 0.7016031719, "author": null, "avg_line_length": 37.4258064516, "converted": null, "ext": "py", "file": null, "hexsha": "583052b376ee53acd1317c1e02d0029addbc8f22", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
""" Filter 过滤式 """ from sklearn.feature_selection import VarianceThreshold from pandas.core.frame import DataFrame from scipy.stats import pearsonr from sklearn.decomposition import PCA import pandas as pd def vt_test(): """ 方差选择: 选择方差较大的特征 """ data = [ [-0.46736075, -0.44944782, 0., -0.22941...
{ "alphanum_fraction": 0.5609328424, "author": null, "avg_line_length": 41.6277372263, "converted": null, "ext": "py", "file": null, "hexsha": "13e6463fbcf0cbbda67bcab54a9b25c32765eabf", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import threading import numpy import pyglet from pyglet import gl from . import visualizer, Visualizer, VisualizerWindow from ..dsp import bands class BandsVisualizerWindow(VisualizerWindow): # TODO: # Use a shader for rendering and offload some of the calculations into it, this should yield a big # perfo...
{ "alphanum_fraction": 0.564797361, "author": null, "avg_line_length": 38.9357798165, "converted": null, "ext": "py", "file": null, "hexsha": "631138c1c8985b9576ace6f74af85191aed5a6a3", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
\chapter{Sufficient statistics} In this chapter the theory of sufficient statistics are introduced. First we begin with understanding of a statistic. Information about this subject can be found in \cite{casella2002statistical}. A statistic is a function that returns a summary of the data. Examples of this can be mean v...
{ "alphanum_fraction": 0.7279236277, "author": null, "avg_line_length": 79.8095238095, "converted": null, "ext": "tex", "file": null, "hexsha": "db73b34252a86ea718810d836db86a59de4ca84a", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
import os import sys import unittest import numpy as np import torch from torch.nn import functional as torch_F from src.cranet.nn import functional as cranet_F from src import cranet from ..utils import teq class TestRelu(unittest.TestCase): def test_relu_0(self): for _ in range(100): sha...
{ "alphanum_fraction": 0.548940009, "author": null, "avg_line_length": 30.7916666667, "converted": null, "ext": "py", "file": null, "hexsha": "2951e52cf3bb6c5f058077451ab86e379a6692d8", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{url} \usepackage[margin=0.75in]{geometry} \setlength{\parskip}{0.7em} \setlength{\parindent}{0em} \begin{document} \begin{center} % MAKE SURE YOU TAKE OUT THE SQUARE BRACKETS \LARGE{\textbf{CSE 6730, Checkpoint}} \\ \vspace...
{ "alphanum_fraction": 0.7350320245, "author": null, "avg_line_length": 57.9193548387, "converted": null, "ext": "tex", "file": null, "hexsha": "4bd4a2a04c4a63c3cac30d8b2910b22f25af86d5", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
module field_mod use kind_params_mod use region_mod use halo_mod use grid_mod use gocean_mod, only: gocean_stop implicit none private ! Enumeration of grid-point types on the Arakawa C grid. A ! field lives on one of these types. integer, public, parameter :: U_POINTS = 0 integer, public, para...
{ "alphanum_fraction": 0.5806362731, "author": null, "avg_line_length": 34.6155539252, "converted": null, "ext": "f90", "file": null, "hexsha": "391b97e21f6d170afdf20f15b21d61c8d13c9624", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_f...
import time import sys;sys.path.append(".") import numpy as np vectors1 = np.random.rand(1000, 3) vectors2 = np.random.rand(1000, 3) from pikapi.utils.development import compare_function_performances import pikapi.utils.landmark import pikapi.landmark_utils compare_function_performances([ pikapi.landmark_util...
{ "alphanum_fraction": 0.7797356828, "author": null, "avg_line_length": 23.4827586207, "converted": null, "ext": "py", "file": null, "hexsha": "b48903e5318f12452488e8680976826fb0ad4da7", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: qiujiarong # Date: 01/04/2018 from __future__ import print_function from __future__ import absolute_import from __future__ import division # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you...
{ "alphanum_fraction": 0.5862888079, "author": null, "avg_line_length": 31.3183391003, "converted": null, "ext": "py", "file": null, "hexsha": "69eb3c6163e2478ec92186e53ae4a08bbb77c9e2", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
from collections import namedtuple from typing import Tuple import numpy as np from .util import indices_of_binned_phase from .metrics import _modulation_index from .signal import Signal PACResult: Tuple[float] = namedtuple( "PACResult", "modulation_index mean_phase_coherence" ) def phase_amplitude_coupling(sa...
{ "alphanum_fraction": 0.7542997543, "author": null, "avg_line_length": 32.56, "converted": null, "ext": "py", "file": null, "hexsha": "2ae2eb68a479c835180565eaa34a7597c678316e", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
"""Tests for graphein.protein.subgraphs""" # Graphein # Author: Arian Jamasb <arian@jamasb.io> # License: MIT # Project Website: https://github.com/a-r-j/graphein # Code Repository: https://github.com/a-r-j/graphein from pathlib import Path import networkx as nx import numpy as np import pytest from sklearn import ne...
{ "alphanum_fraction": 0.6643807987, "author": null, "avg_line_length": 31.3797468354, "converted": null, "ext": "py", "file": null, "hexsha": "6f627907c94f455571f1e2f09f6e911d0662b76e", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#include "stdafx.h" #include "CppUnitTest.h" #include <vector> #include <algorithm> #include <list> #include "../../../iterators.hpp" #include "../../../math/root.hpp" #include "../../../math/axis.hpp" #include "../../../math/multiaxis.hpp" #include "../../../math/combinatorics.hpp" #include <boost/math/distributions/n...
{ "alphanum_fraction": 0.6178061694, "author": null, "avg_line_length": 35.4250764526, "converted": null, "ext": "cpp", "file": null, "hexsha": "5f7acf09f5e594f281cd42a417ff5b3fd7ead5ac", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
//---------------------------------------------------------------------------// // Copyright (c) 2019-2020 Mikhail Komarov <nemo@nil.foundation> // // MIT License // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), ...
{ "alphanum_fraction": 0.4694394753, "author": null, "avg_line_length": 53.664, "converted": null, "ext": "hpp", "file": null, "hexsha": "33705912704d1cfaf4839b61bff210d8fd154ddd", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count"...
# The resilu linearity / non-linearity The function $resilu(x)=\frac{x}{1-e^{-x}}$ can be written as the sum of a linear funciton and a function that limits to relu(x). By using resilu(x) and 'non'-linearity in neural networks, the effect of a skip-connection should thus be included 'for free'. ```python import cop...
{ "alphanum_fraction": 0.8986964963, "author": null, "avg_line_length": 167.9658385093, "converted": true, "ext": "ipynb", "file": null, "hexsha": "bf4e7f2861021168f6f07e5100ee6901829e2704", "include": null, "lang": "Jupyter Notebook", "length": null, "llama_tokens": null, "mathlib_filename": nu...
"""Module to generate wordclouds from data. Developed by EricZhu-42 in June, 2019. """ import json import os.path import matplotlib.pyplot as plt from scipy.misc import imread from wordcloud import WordCloud if __name__ == "__main__": working_path = os.path.dirname(__file__) name = r'Frequency_list_of_all'...
{ "alphanum_fraction": 0.6429298067, "author": null, "avg_line_length": 26.5675675676, "converted": null, "ext": "py", "file": null, "hexsha": "b532caec9d02fc97fb29477a73ccad46822e220d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma (in Worder) ord_isom_Pre1:"\<lbrakk>Worder E; a \<in> carrier D; ExPre D a; ord_isom D E f\<rbrakk> \<Longrightarrow> ExPre E (f a)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>Worder E; a \<in> carrier D; ExPre D a; ord_isom D E f\<rbrakk> \<Longrightarrow> ExPre E (...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Group-Ring-Module_Algebra2", "hexsha": null, "include": null, "lang": null, "length": 7, "llama_tokens": 1597, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_for...
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,py:light # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.13.0 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: pyt...
{ "alphanum_fraction": 0.5932885906, "author": null, "avg_line_length": 30.4970760234, "converted": null, "ext": "py", "file": null, "hexsha": "e07d3919bf4d2df1fcb90d3fc4ee297e576d1863", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
!############################################################################## !# **************************************************************************** !# <name> spacediscretisation </name> !# **************************************************************************** !# !# <purpose> !# This module contains th...
{ "alphanum_fraction": 0.564916794, "author": null, "avg_line_length": 33.7100271003, "converted": null, "ext": "f90", "file": null, "hexsha": "441f77977d5f1e76bd93d07a563d58c21826c44c", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fo...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import numpy as np from collections import OrderedDict import sys import os from decimal import Decimal import argparse import copy import matplotlib.pyplot as plt from utils import read_sols, write_cfn, read_sim_mat, dissim, get_domain, sols_to_cpd_sols, read_cfn_gzip, ...
{ "alphanum_fraction": 0.5576802508, "author": null, "avg_line_length": 35.0549450549, "converted": null, "ext": "py", "file": null, "hexsha": "28b700886ea61911b0a454988a623708d216fbe0", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import pickle as pkl import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader import torchaudio import torchvision import torchvision.models as models class TomoModel(nn.Module): def __init__(self): super(TomoModel, self).__init...
{ "alphanum_fraction": 0.6785137318, "author": null, "avg_line_length": 25.7916666667, "converted": null, "ext": "py", "file": null, "hexsha": "9c389dc8ea557828cfb2af6830cdb1a6291650d0", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np from sklearn.datasets import make_classification from sklearn.model_selection import train_test_split # Set random seed for reproducibility np.random.seed(1000) if __name__ == "__main__": # Create a dummy classification dataset X, Y = make_classification(n_samples=500, n_classes=5, n_fea...
{ "alphanum_fraction": 0.721633888, "author": null, "avg_line_length": 25.4230769231, "converted": null, "ext": "py", "file": null, "hexsha": "33495348e9d2047a1a791d7d915e578c4f934a0e", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import os import pickle import random import shutil import uuid from pathlib import Path import numpy as np class SamplePool: def __init__(self, location='/tmp/sample_pool', redo=False): self.location = Path(location) if self.location.exists() and redo: shutil.rmtree(str(self.locatio...
{ "alphanum_fraction": 0.5907172996, "author": null, "avg_line_length": 34.3026315789, "converted": null, "ext": "py", "file": null, "hexsha": "b1b6ef708c9806c649f4f3046b12e98151a3c9c3", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#define BOOST_TEST_MODULE AReleaseRPPDU #include <boost/test/unit_test.hpp> #include <sstream> #include <string> #include "odil/pdu/AReleaseRQ.h" std::string const data = { 0x05, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 }; BOOST_AUTO_TEST_CASE(ConstructorFields) { odil::pdu::ARelease...
{ "alphanum_fraction": 0.6992, "author": null, "avg_line_length": 17.8571428571, "converted": null, "ext": "cpp", "file": null, "hexsha": "44cb275dc81d58e0653e7e219fe759be6ac9ba9e", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
import numpy as np class Perceptron(object): def __init__(self, bias=0, eta=0.1, epoch=10): self.bias = bias self.eta = eta self.epoch = epoch def net_input(self, x): return self.weights[0] + np.dot(x, self.weights[1:]) def fit(self, X, y): self.weights = np.z...
{ "alphanum_fraction": 0.4959349593, "author": null, "avg_line_length": 22.8837209302, "converted": null, "ext": "py", "file": null, "hexsha": "a1e263d7f32ca20758b7216978789a5923c372a1", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
from rpy2 import robjects from typing import Sequence, TypeVar, Union, Dict import os from d3m.primitive_interfaces.transformer import TransformerPrimitiveBase import numpy from d3m import container from d3m import utils from d3m.metadata import hyperparams, base as metadata_module, params from d3m.primitive_interfaces...
{ "alphanum_fraction": 0.5824226566, "author": null, "avg_line_length": 38.2176470588, "converted": null, "ext": "py", "file": null, "hexsha": "a2da14be0ef053559ec9686c53b524220d6eb02f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np from exptools2.core import Trial from psychopy.visual import TextStim from stimuli import FixationLines class SomaVisualTrial(Trial): def __init__(self, session, trial_nr, phase_durations, phase_names, parameters, timing, verbose=True, condition='blank'): ...
{ "alphanum_fraction": 0.5849056604, "author": null, "avg_line_length": 32.4328358209, "converted": null, "ext": "py", "file": null, "hexsha": "7766ead9a2bd3b7d5e528397c9cee46031e33e23", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
// big_string_traits.hpp -*- C++ -*- // Copyright (C) 2013 Martin Trenkmann #ifndef NETSPEAK_VALUE_BIG_STRING_TRAITS_HPP #define NETSPEAK_VALUE_BIG_STRING_TRAITS_HPP #include <cstdio> #include <string> #include <boost/algorithm/string/trim.hpp> #include "netspeak/util/exception.hpp" #include "netspeak/value/big_stri...
{ "alphanum_fraction": 0.6080544526, "author": null, "avg_line_length": 30.3965517241, "converted": null, "ext": "hpp", "file": null, "hexsha": "ae85bad704313ffc0b06dc52af402682a8166ff1", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
x <= (a);
{ "alphanum_fraction": 0.2, "author": null, "avg_line_length": 5, "converted": null, "ext": "f", "file": null, "hexsha": "86aef590951acaf51af82dc82f580747da0edfb5", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "m...
import jax import jax.numpy as jnp import jax.scipy import numpy as np from ._su2 import su2_clebsch_gordan, su2_generators def naive_broadcast_decorator(func): def wrapper(*args): args = [jnp.asarray(a) for a in args] shape = jnp.broadcast_shapes(*(arg.shape for arg in args)) args = [jnp...
{ "alphanum_fraction": 0.5971400394, "author": null, "avg_line_length": 31.2, "converted": null, "ext": "py", "file": null, "hexsha": "e5fb602b8c7194f5810b3326e2ee3931ba5d402c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count"...
# This program is in the public domain # Author: Paul Kienzle """ Random walk functions. :function:`walk` simulates a mean-reverting random walk. """ # This code was developed to test outlier detection from __future__ import division __all__ = ["walk"] from numpy import asarray, ones_like, NaN, isnan from . import ...
{ "alphanum_fraction": 0.5986358867, "author": null, "avg_line_length": 32.0336134454, "converted": null, "ext": "py", "file": null, "hexsha": "833cbb6220089dc93235c9743cbd31c927137e98", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#include <set> #include <boost/filesystem/fstream.hpp> #include <boost/program_options.hpp> #include "picpac-cv.h" using namespace std; using namespace picpac; int main(int argc, char const* argv[]) { BatchImageStream::Config config; unsigned max; float scale; fs::path db_path; fs::path dir_path; ...
{ "alphanum_fraction": 0.5160714286, "author": null, "avg_line_length": 32.9411764706, "converted": null, "ext": "cpp", "file": null, "hexsha": "e91294f1f23b160d08261d89add011942b4a7949", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
import numpy as np import time # Ray casting # Dakai Zhou def TransferFunc1(vol, l1, l2, l3, l4, alpha1, alpha2, alpha3, alpha4, alpha5): dim = np.shape(vol) fres = np.zeros([dim[0], 4, dim[1], dim[2]]) res1 = np.zeros([dim[1], dim[2]]) res2 = np.zeros([dim[1], dim[2]]) res3 = np.zeros([dim[1], d...
{ "alphanum_fraction": 0.5034062388, "author": null, "avg_line_length": 31.6931818182, "converted": null, "ext": "py", "file": null, "hexsha": "0120143ded6347768c5ecbf26521e4932953ea81", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np from example_robot_data.robots_loader import getModelPath np.set_printoptions(precision=3, linewidth=200, suppress=True) LINE_WIDTH = 60 N_SIMULATION = 4000 # number of time steps simulated dt = 0.002 # controller time step q0 = np.array([1.73046e-01, -2e-04, -5.25366e-01, 0, 0, 1, 0]) # REFEREN...
{ "alphanum_fraction": 0.7141017386, "author": null, "avg_line_length": 36.1162790698, "converted": null, "ext": "py", "file": null, "hexsha": "42410d6e086693e0ed4baa3f24ce9b4f41679bf0", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import matplotlib.pyplot as plt XMIN = 100 XMAX = 700 file = "/media/data/Data/Orderphobic/TwoIntruders/SpikyIntruder/Logging/210121_liquid_{}_flipped_rail.txt" duties = [590, 600, 610, 620] fig, ax = plt.subplots(2, 2, sharex=True) ax = np.ndarray.flatten(ax) bins = np.arange(XMIN, XMAX) for i, ...
{ "alphanum_fraction": 0.706013363, "author": null, "avg_line_length": 22.45, "converted": null, "ext": "py", "file": null, "hexsha": "3abd427fd95b9f0af118693e9436d7a881c7c561", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count"...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Test different integration methods. Things not covered here but somewhere else: * ``conf.set_temp('default_integrator', 'analytical')`` and its default covered in ``spectrum.rst``. * The following integrations are tested in ``test_spectrum.py``: ...
{ "alphanum_fraction": 0.667628866, "author": null, "avg_line_length": 37.5, "converted": null, "ext": "py", "file": null, "hexsha": "e690c37d63f66295fbfa4d5d684e649129c97b5b", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count":...
#!/usr/bin/env python import numpy as np def calculate_charges(waveforms, ped_min, ped_max, sig_min, sig_max): """ Calculates the charges of an array of waveforms Parameters ---------- waveforms: np.array 2D numpy array with one waveform in each row [[waveform1], [waveform...
{ "alphanum_fraction": 0.6381059752, "author": null, "avg_line_length": 25.3428571429, "converted": null, "ext": "py", "file": null, "hexsha": "7779cb449bd51781d8fcb78cc461763d99fdb8fe", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma starfun_less_mono: "\<forall>n. N \<le> n \<longrightarrow> f n < g n \<Longrightarrow> \<forall>n. hypnat_of_nat N \<le> n \<longrightarrow> ( *f* f) n < ( *f* g) n" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>n\<ge>N. f n < g n \<Longrightarrow> \<forall>n\<ge>hypnat_of_nat N. (*f* ...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 153, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": n...
export ± """ ```julia ±(a,b) ``` - returns (a-b,a+b) ```julia # Examples 1 ± 0.5 # returns (0.5,1.5) ``` """ ±(a,b) = [a-b,a+b]
{ "alphanum_fraction": 0.4318181818, "author": null, "avg_line_length": 8.8, "converted": null, "ext": "jl", "file": null, "hexsha": "49fa540159a44c9790f08d8c5d9dd7a609fb0c86", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
""" @author: A. G. Sreejith """ ######################################### ### Import Libraries and Functions ######################################### import os import numpy as np import astropy.modeling.functional_models as am import csc_functions as csc from astropy.io import ascii import scipy.speci...
{ "alphanum_fraction": 0.5350840915, "author": null, "avg_line_length": 37.6831168831, "converted": null, "ext": "py", "file": null, "hexsha": "64832720ff4c4ac13303bc296899ba18f2b651a4", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
@testset "find_traversal & list_traversal" for t in TEST_TREES for l in list_traversal(t) res = find_traversal(t, walk(t, l)) @test all(c -> walk(t, c) === walk(t, l), res) end @test isempty(find_traversal(t, Leaf(-1))) @test isempty(find_traversal(t, [t, t])) @test isempty(find_trav...
{ "alphanum_fraction": 0.6284916201, "author": null, "avg_line_length": 35.8, "converted": null, "ext": "jl", "file": null, "hexsha": "bd3c805aaaa543fa8d41184c4dfbf433c1bc2932", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count":...
\section{Power Reactor Terminology} \begin{labeling} \item [\underline{Coolant}:] Material used to remove heat from core, to heat water, to push a turbine, etc. \item [\underline{Steam or Coolant Loops}:] Number of heat transfer mechanisms. Must be at least 1. \item [\underline{Moderator}:] ...
{ "alphanum_fraction": 0.6602603844, "author": null, "avg_line_length": 43.5945945946, "converted": null, "ext": "tex", "file": null, "hexsha": "285a536b09bcb88057093c823a8e69c650034dbd", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
//============================================================================= // // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // ...
{ "alphanum_fraction": 0.7055659787, "author": null, "avg_line_length": 31.23046875, "converted": null, "ext": "cxx", "file": null, "hexsha": "28c759f58805d99b6d3ac7e3fc157913f720ddb5", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_c...
import torch import torch.nn as nn from .steer_pyr_utils import * class SteerablePyramid(nn.Module): # refer to https://github.com/LabForComputationalVision/pyrtools # https://github.com/olivierhenaff/steerablePyramid def __init__(self, imgSize=[256,256], K=4, N=4, hilb=True, includeHF=True, device=torc...
{ "alphanum_fraction": 0.5040964952, "author": null, "avg_line_length": 33.2878787879, "converted": null, "ext": "py", "file": null, "hexsha": "a26b76b8073bb1ef81ec89cf655eb5b09966431c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
(* Title: HOL/Induct/Sigma_Algebra.thy Author: Markus Wenzel, TU Muenchen *) section \<open>Sigma algebras\<close> theory Sigma_Algebra imports MainRLT begin text \<open> This is just a tiny example demonstrating the use of inductive definitions in classical mathematics. We define the least \<open...
{ "alphanum_fraction": null, "author": "dtraytel", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_da...
import numpy as np import matplotlib.pyplot as plt import time import tracemalloc as tm import psutil from resource import * class Stats: def __init__(self): self.tic = time.perf_counter() tm.start() self.current, _ = tm.get_traced_memory() def end(self): _, peak = tm.get_trace...
{ "alphanum_fraction": 0.6043521266, "author": null, "avg_line_length": 31.59375, "converted": null, "ext": "py", "file": null, "hexsha": "a293ac3152500a2c0c24b7dba829c54e035adbaf", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_co...
#include <boost/preprocessor/list/adt.hpp>
{ "alphanum_fraction": 0.7906976744, "author": null, "avg_line_length": 21.5, "converted": null, "ext": "hpp", "file": null, "hexsha": "6d2f42d673711b32e6347d8ccb908863f40ccca6", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
""" rest.py quantumML is Handles the primary functions """ from urllib.request import urlopen import json import urllib import os import io import math from pymatgen.core.structure import Structure from ase.io import vasp from dscribe.descriptors import SOAP from pymatgen.io.vasp import Xdatcar, Oszicar from sklearn....
{ "alphanum_fraction": 0.5466290466, "author": null, "avg_line_length": 29.2782608696, "converted": null, "ext": "py", "file": null, "hexsha": "79fd875d4c2aa7ad3dccc0b73cbc21dbc0ee1af0", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#%% import torch from model import Model import numpy as np import argparse from utils.pyart import * from utils.curve import * from loss import * from torch.autograd.functional import jacobian def ForwardNet(model): def fn(input): output = model(input) output = t2p(output) return output ...
{ "alphanum_fraction": 0.6018937834, "author": null, "avg_line_length": 29.6219512195, "converted": null, "ext": "py", "file": null, "hexsha": "c308a414d0bb05fdb1c7ecacd3e3fd991c95c110", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
from mutation import mutate, mutate_replace, mutate_insert, mutate_shrink from node_set import PrimitiveSet, TerminalSet from tree import generate_tree, parse_tree from crossover import one_point_crossover from copy import deepcopy import numpy as np import random if __name__ == '__main__': # We should use strings...
{ "alphanum_fraction": 0.6978566859, "author": null, "avg_line_length": 48.0923076923, "converted": null, "ext": "py", "file": null, "hexsha": "cebf8ba997d00ad6ed03f7418b2e205f49f78333", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# -*- coding: utf-8 -*- r""" ClusterSeed A *cluster seed* is a pair `(B,\mathbf{x})` with `B` being a *skew-symmetrizable* `(n+m \times n)` *-matrix* and with `\mathbf{x}` being an `n`-tuple of *independent elements* in the field of rational functions in `n` variables. For the compendium on the cluster algebra and qu...
{ "alphanum_fraction": 0.5160983283, "author": null, "avg_line_length": 38.5137950994, "converted": null, "ext": "py", "file": null, "hexsha": "8abe4c401a8f3213dce9c2e7c12e557f93e94a22", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import pybullet as p import pybullet_data import pybullet_utils.bullet_client as bc import numpy as np import time import enum from spatialmath import SE3 from scipy.spatial.transform import Rotation as R from .pybullet_robot import PyBulletRobot class GUI_MODE(enum.Enum): DIRECT = enum.auto() SIMPLE_GUI = enu...
{ "alphanum_fraction": 0.6501556751, "author": null, "avg_line_length": 37.585106383, "converted": null, "ext": "py", "file": null, "hexsha": "9bc8140c31093e4d902de76d2e27e454830871c3", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
from __future__ import print_function import os import unittest import numpy import copy from baseclasses import BaseRegTest from pygeo import DVGeometry, geo_utils class RegTestPyGeo(unittest.TestCase): N_PROCS = 1 # def setUp(self): # Store the path where this current script lives # This ...
{ "alphanum_fraction": 0.5455990463, "author": null, "avg_line_length": 30.1377245509, "converted": null, "ext": "py", "file": null, "hexsha": "72014da1e5bfcbbd60b6e2ce0977f8f19110fb7b", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
{ "alphanum_fraction": 0.6123445274, "author": null, "avg_line_length": 38.8875453446, "converted": null, "ext": "py", "file": null, "hexsha": "e747370f9f91b78d85d46cb69dcaafbe3c2af0bc", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import pycuda.autoinit import pycuda.driver as drv import numpy from pycuda.compiler import SourceModule from jinja2 import Environment, PackageLoader def main(): #Create dictionary argument for rendering RenderArgs= {"safe_memory_mapping":1, "aligned_byte_length_genome":8, ...
{ "alphanum_fraction": 0.620166245, "author": null, "avg_line_length": 32.5529411765, "converted": null, "ext": "py", "file": null, "hexsha": "f55a1f67cb844309d7113d938c460f0dc86a80fa", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
# -*- coding: utf-8 -*- """ Created on Sat Mar 6 17:11:46 2021 @author: mbeni """ import numpy as np import matplotlib.pyplot as plt x = np.random.randn(1000) #plt.scatter(x, np.ones_like(x)) hist, _ = np.histogram(x, 100) plt.plot(np.linspace(x.min(), x.max(), 100), hist) plt.show() #%% from scipy.signal i...
{ "alphanum_fraction": 0.6720930233, "author": null, "avg_line_length": 13.0303030303, "converted": null, "ext": "py", "file": null, "hexsha": "f187f1939c9edb2754c7d4e7ec0a3947fbe2c409", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
""" This is where you set the run "gtagex" and the initial condition based on an experiment name passed by the calling code. """ import numpy as np import sys, os import xarray as xr from pathlib import Path as pth path0 = pth.cwd().parent.parent / 'LO_data' / 'grids' / 'cas6' / 'grid.nc' path1 = pth.cwd().parent / ...
{ "alphanum_fraction": 0.6022628372, "author": null, "avg_line_length": 35.6832298137, "converted": null, "ext": "py", "file": null, "hexsha": "4b70eb60b1fba706f620013f01f88c7b37a426c9", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import spikeextractors as si #import spikewidgets as sw import spiketoolkit as st import mlprocessors as mlpr import json from cairio import client as ca import numpy as np from copy import deepcopy def compare_sortings_with_truth(sortings,compute_resource,num_workers=None): print('>>>>>> compare sortings with tru...
{ "alphanum_fraction": 0.6768395432, "author": null, "avg_line_length": 39.2720588235, "converted": null, "ext": "py", "file": null, "hexsha": "f7369619cd01529ee372590cea33f5f73b48f876", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
// // FILE NAME: $HeadURL: svn+ssh://svn.cm.aol.com/advertising/adlearn/gen1/trunk/lib/cpp/DataProxy/StreamTransformers/Blackout/private/BlackoutStreamTransformer.cpp $ // // REVISION: $Revision: 239069 $ // // COPYRIGHT: (c) 2008 Advertising.com All Rights Reserved. // // LAST UPDATED: $Date: 201...
{ "alphanum_fraction": 0.7223215737, "author": null, "avg_line_length": 36.3964497041, "converted": null, "ext": "cpp", "file": null, "hexsha": "00f3e691b69af8f5507fcc0c8ea8433dd993766f", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
from . import InvertibleModule import torch import torch.nn as nn import numpy as np def _fast_h(v, stride=2): """ Fast product of a series of Householder matrices. This implementation is oriented to the one introducesd in: https://invertibleworkshop.github.io/accepted_papers/pdfs/10.pdf This makes us...
{ "alphanum_fraction": 0.5999569615, "author": null, "avg_line_length": 40.0603448276, "converted": null, "ext": "py", "file": null, "hexsha": "eb4c0ca227d7911321f9811828c1d47a8c5a7245", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
from __future__ import absolute_import, division, print_function import os import pickle import tensorflow as tf from tensorflow import keras from keras import backend as K import numpy as np import tf_util import gym import load_policy import matplotlib.pyplot as plt from policy import * def dagger(expert_file, envn...
{ "alphanum_fraction": 0.5727831881, "author": null, "avg_line_length": 33.3504273504, "converted": null, "ext": "py", "file": null, "hexsha": "750ec0ef5676eae7a5413512e4b6eaa1403c37f5", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np class Solution: def kClosest(self, points: List[List[int]], K: int) -> List[List[int]]: points.sort(key=lambda P: P[0]**2 + P[1]**2) return points[:K]
{ "alphanum_fraction": 0.59375, "author": null, "avg_line_length": 24, "converted": null, "ext": "py", "file": null, "hexsha": "d002e054583fbc0edfc68c651d9806a69bdac62c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null,...
import argparse import glob import json import logging import os import random import numpy as np import torch from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset from torch.utils.data.distributed import DistributedSampler from tqdm import tqdm, trange from sklearn.datasets import ...
{ "alphanum_fraction": 0.7105850826, "author": null, "avg_line_length": 39.2807017544, "converted": null, "ext": "py", "file": null, "hexsha": "a668546e75fca9768f538a9129a5d5c5f817b3d6", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import os import cv2 ##imports open cv## import numpy as np IMAGE_SIZE = (500, 500) THRESHOLD_VALUE = 110 ##Threshold Details## MAX_VALUE = 255 INV_THRESHOLD_VALUE = 50 ##Invert Threshold Details## INV_MAX_VALUE = 255 THRESHOLD1 = 100 THRESHOLD2 = 70 CON_COLOR = (0, 0, 255) CON_THICKNESS = 1 WHITE = (255, ...
{ "alphanum_fraction": 0.5515441496, "author": null, "avg_line_length": 37.3821138211, "converted": null, "ext": "py", "file": null, "hexsha": "a65d82b462ab9808a61ad7487ca46b397f06e7f9", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
! Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. ! ! From the struct-cxx test reference module struct_mod use iso_c_binding, only : C_DOUBLE, C_INT type, bind(C) :: cstruct1 integer(C_INT) :: ifield ...
{ "alphanum_fraction": 0.7358974359, "author": null, "avg_line_length": 24.375, "converted": null, "ext": "f", "file": null, "hexsha": "1faba0b2c7042c4d0411460849a76380645b3e78", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_coun...
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import algebra.group_power.lemmas /-! # Powers of elements of groups with an adjoined zero element In this file we define integer power functions for groups with an...
{ "alphanum_fraction": null, "author": "Parinya-Siri", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_ma...
[STATEMENT] lemma resid_join\<^sub>E [simp]: assumes "joinable t u" and "v \<frown> t \<squnion> u" shows "v \\ (t \<squnion> u) = (v \\ u) \\ (t \\ u)" and "v \\ (t \<squnion> u) = (v \\ t) \\ (u \\ t)" and "(t \<squnion> u) \\ v = (t \\ v) \<squnion> (u \\ v)" [PROOF STATE] proof (prove) goal (1 subgo...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "ResiduatedTransitionSystem_ResiduatedTransitionSystem", "hexsha": null, "include": null, "lang": null, "length": 9, "llama_tokens": 1117, "mathlib_filename": null, "max_forks_count": ...
[STATEMENT] lemma RELATESI_refspec[refine_dref_pattern]: "RELATES R \<Longrightarrow> S \<le>\<Down>R S' \<Longrightarrow> S \<le>\<Down>R S'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>RELATES R; S \<le> \<Down> R S'\<rbrakk> \<Longrightarrow> S \<le> \<Down> R S' [PROOF STEP] .
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Refine_Monadic_Refine_Heuristics", "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 129, "mathlib_filename": null, "max_forks_count": null, "max_forks_rep...
'''############ Willard Wider 6/20/18 ELEC 3800 Lab 7 Fourier stuffs '''############ #importing all the modules we will need import numpy as np import scipy.signal as sig import matplotlib.pyplot as plt #specify the stype of the plot to use plt.style.use('ggplot') #notes #https://www.mathsisfun.com/calculus/fourier-s...
{ "alphanum_fraction": 0.6333409246, "author": null, "avg_line_length": 31.3642857143, "converted": null, "ext": "py", "file": null, "hexsha": "b3ea59e24a6f407370c99cd84a03a190a745f6c6", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
\newcommand{\norm}[1]{\left\lVert#1\right\rVert} \newcommand{\KL}[2]{D_{\mathrm{KL}} \bigl( #1 ~||~ #2 \bigr)} \newcommand{\trans}{\mathbf{T}} \newcommand{\qex}{Q_{\text{explore}}} \newcommand{\qtask}{Q_{\text{task}}} \newcommand{\tex}{\tau_{\text{explore}}} \newcommand{\ttask}{\tau_{\text{task}}} \newcommand{\pitask}{...
{ "alphanum_fraction": 0.7787268794, "author": null, "avg_line_length": 85.3220338983, "converted": null, "ext": "tex", "file": null, "hexsha": "5608cca57f0a7ae0b99d7d70174c5d1a404fbe5c", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for :mod:`orion.algo.hyperband`.""" import hashlib import numpy as np import pytest from orion.algo.hyperband.hyperband import Bracket, compute_budgets, Hyperband from orion.algo.space import Fidelity, Real, Space @pytest.fixture def space(): """Create a S...
{ "alphanum_fraction": 0.6210530127, "author": null, "avg_line_length": 35.2244897959, "converted": null, "ext": "py", "file": null, "hexsha": "31bee7998016d94f348e18de0f8d0c392aa738e8", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import cv2 import numpy as np import random from scipy.stats import norm import matplotlib.pyplot as plt def generate_spot_light_mask(mask_size, position=None, max_brightness=255, min_brightness=0, mode="...
{ "alphanum_fraction": 0.631090945, "author": null, "avg_line_length": 43.6982758621, "converted": null, "ext": "py", "file": null, "hexsha": "ca737d942f65b347ad14eb139a2c78b20047bc40", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
#include "RC2Logging.h" #include <boost/log/core/core.hpp> #include <boost/log/expressions/formatters/date_time.hpp> #include <boost/log/expressions.hpp> #include <boost/log/sinks/sync_frontend.hpp> #include <boost/log/sinks/text_ostream_backend.hpp> #include <boost/log/sources/severity_feature.hpp> #include <boost/lo...
{ "alphanum_fraction": 0.712197864, "author": null, "avg_line_length": 35.58, "converted": null, "ext": "cpp", "file": null, "hexsha": "66d9d6f5416723ec7d1d590826df3daa27e52efc", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
# Author: Teon Brooks <teon.brooks@gmail.com> # Stefan Appelhoff <stefan.appelhoff@mailbox.org> # # License: BSD (3-clause) from itertools import chain import os import os.path as op import pytest import numpy as np from functools import partial from string import ascii_lowercase from numpy.testing import (...
{ "alphanum_fraction": 0.5899392746, "author": null, "avg_line_length": 38.4416403785, "converted": null, "ext": "py", "file": null, "hexsha": "7c957c28814365fc2d41305f2fa9e4ffa5b80dfc", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma dg_SemiCAT_is_arrE: assumes "\<FF> : \<AA> \<mapsto>\<^bsub>dg_SemiCAT \<alpha>\<^esub> \<BB>" obtains "\<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "CZH_Foundations_czh_semicategories_CZH_DG_SemiCAT", "hexsha": null, "include": null, "lang": null, "length": 2, "llama_tokens": 298, "mathlib_filename": null, "max_forks_count": null,...
import torch from torch.autograd import Variable import numpy as np from depth_transformation_utils import Rotation, Intrinsics, Translation from depth_map import DepthMap from loss import DepthMapTransformation, ReconstructionLoss device = 'cuda' def getFrame() : H, W = 10, 10 intrinsics = Variable(torch.Flo...
{ "alphanum_fraction": 0.7368421053, "author": null, "avg_line_length": 38, "converted": null, "ext": "py", "file": null, "hexsha": "833c522285bcc282606f96615f3c922efef82fd9", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
#!/usr/bin/python import os import sys import glob import scipy.stats as stats import numpy as np import matplotlib.pyplot as plt from scipy.io import savemat from get_qdec_info import get_qdec_info from fdr import fdr from exclusion_paradigms import exclParad qdec_fn = '/users/cais/STUT/FSDATA/qdec/qdec.table.dat' ...
{ "alphanum_fraction": 0.5406079396, "author": null, "avg_line_length": 33.0445434298, "converted": null, "ext": "py", "file": null, "hexsha": "d8f00e55fa835fb4c1a3c062e599075ab12490f5", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
/*************************************************************************** * Software License Agreement (BSD License) * * Copyright (C) 2017 by * * Klaus Buchegger <klaus.buchegger@student.tuwien.ac.at> * * Florian...
{ "alphanum_fraction": 0.6246932226, "author": null, "avg_line_length": 43.1820652174, "converted": null, "ext": "cpp", "file": null, "hexsha": "3b11242f88808d154ecd5316a3b8ed2777fef6d4", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import math import numpy as np from functools import partial import os from .transformer import Transformer class DVSA(nn.Module): def __init__(self, num_class, input_size=2048, enc_size=128, dropout=0.2, hidde...
{ "alphanum_fraction": 0.6056957187, "author": null, "avg_line_length": 41.1968503937, "converted": null, "ext": "py", "file": null, "hexsha": "99ad05357ba5d5a74d078c57d6126a093d456039", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import os from src.domain.cargo_space import CargoSpace from src.model.dataset import Dataset from src.model.simulation_run_info import SimulationRunInfo from src.output_option.output_option import OutputOptionInterface from PIL import Image, ImageDraw, ImageFont import matplotlib.font_manager as fm import numpy as n...
{ "alphanum_fraction": 0.6125964472, "author": null, "avg_line_length": 39.524822695, "converted": null, "ext": "py", "file": null, "hexsha": "772d9e3fcc0b17e3bbe515e16f1ffe7ef330f1cd", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
# Copyright 2019 ChangyuLiu Authors. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
{ "alphanum_fraction": 0.6985960989, "author": null, "avg_line_length": 33.6778242678, "converted": null, "ext": "py", "file": null, "hexsha": "73ce59b54e13b46d945549ec4c1b7ec72efe2759", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np def dataset_vs_testset_checking(data_model, in_dataset): print("-" * 100) print("Starting Dataset check") testing_set = data_model.parameter_range(20, theta_scale_min=None, theta_scale_max=None).cpu().detach().numpy() for theta in testing_set: label_array = np.stack(in_datas...
{ "alphanum_fraction": 0.6605504587, "author": null, "avg_line_length": 36.3333333333, "converted": null, "ext": "py", "file": null, "hexsha": "60c1ba4a3130e2b6fa3bc13bbb543ea7db2883bb", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# experimenting with curiosity exploration method. # Code derived from: https://github.com/pytorch/examples/blob/master/reinforcement_learning/reinforce.py # example command setting args in base_utils.py # python curiosity.py --models_dir=models-MountainCarContinuous-v0/models_2018_11_28-17-45/ --env="MountainCarCont...
{ "alphanum_fraction": 0.6710043377, "author": null, "avg_line_length": 30.5816326531, "converted": null, "ext": "py", "file": null, "hexsha": "5ca4fdffc9dfbf3a036a4106f681d7fbd26b599e", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import json import time import numpy as np import requests import ctypes import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import threading from Quaternion import * url = 'http://192.168.1.108:8080/sensors.json' def getData(url = 'http://192.168.1.108:8080/sensors.json'): s = requests.Session(...
{ "alphanum_fraction": 0.5357237716, "author": null, "avg_line_length": 28.3082706767, "converted": null, "ext": "py", "file": null, "hexsha": "dad5a7bf3af0e1db6b0af0a9111b01901fd4f772", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...