text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
[STATEMENT]
lemma upto_enum_step_shift:
"is_aligned p n \<Longrightarrow> ([p , p + 2 ^ m .e. p + 2 ^ n - 1]) = map ((+) p) [0, 2 ^ m .e. 2 ^ n - 1]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. is_aligned p n \<Longrightarrow> [p , p + 2 ^ m .e. p + 2 ^ n - 1] = map ((+) p) [0 , 2 ^ m .e. 2 ^ n - 1]
[PROOF STEP... | {"llama_tokens": 943, "file": "Word_Lib_Word_Lemmas", "length": 7} |
#include <cassert>
#include <exception>
#include <iostream>
#include <boost/safe_numerics/safe_integer.hpp>
int main(int, const char *[]){
std::cout << "example 3:";
std::cout << "undetected underflow in data type" << std::endl;
std::cout << "Not using safe numerics" << std::endl;
// problem: decremen... | {"hexsha": "a0427b107348a0020e282300cb6ef149dc4e5058", "size": 1369, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "deps/boost/libs/safe_numerics/example/example3.cpp", "max_stars_repo_name": "alexhenrie/poedit", "max_stars_repo_head_hexsha": "b9b31a111d9e8a84cf1e698aff2c922a79bdd859", "max_stars_repo_licenses": ... |
from SciDataTool.Classes._check import check_dimensions, check_var
from numpy import squeeze, array
def _set_values(self, value):
"""setter of values"""
if type(value) is int and value == -1:
value = array([])
elif type(value) is list:
try:
value = array(value)
except:
... | {"hexsha": "90b0bd9ac0bb76b73fbe1951596c49a2a6203553", "size": 532, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/SciDataTool/Methods/DataND/_set_values.py", "max_stars_repo_name": "enjoyneer87/SciDataTool", "max_stars_repo_head_hexsha": "37ddc4071f1edb1270ee03e43595c3f943fb9bd8", "max_stars_repo_lic... |
#!/usr/bin/env python3
"""
Plot t-SNE to check embedding quality.
TODO Separate TDC, CMC, TDC+CMC
"""
from typing import Any, List, Tuple
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn.functional as F
import wandb
from sklearn.manifold import TSNE
from torch... | {"hexsha": "4df9a16cd9a27d7a3882d2cace3ad4c6b9307ebd", "size": 3430, "ext": "py", "lang": "Python", "max_stars_repo_path": "tsne.py", "max_stars_repo_name": "seungjaeryanlee/playing-hard-exploration-games-by-watching-youtube", "max_stars_repo_head_hexsha": "93eeec7647784b2c92206b6279dfe3fab8e23088", "max_stars_repo_lic... |
(*******************************************************************************
Project: Refining Authenticated Key Agreement with Strong Adversaries
Module: sklvl3.thy (Isabelle/HOL 2016-1)
ID: $Id: sklvl3.thy 133183 2017-01-31 13:55:43Z csprenge $
Author: Joseph Lallemand, INRIA Nancy <joseph.lallem... | {"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/Key_Agreement_Strong_Adversaries/sklvl3.thy"} |
line 1
line 2
line 3
line 4
line5
hello world
| {"hexsha": "fe99e41628632ed99ba3feee153ff0efa3a73184", "size": 46, "ext": "r", "lang": "R", "max_stars_repo_path": "bin/ed/test/nl2.r", "max_stars_repo_name": "lambdaxymox/DragonFlyBSD", "max_stars_repo_head_hexsha": "6379cf2998a4a073c65b12d99e62988a375b4598", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou... |
FUNCTION Youngs( Model, n, x ) RESULT( s )
USE Types
TYPE(Model_t) :: Model
INTEGER :: n
REAL(KIND=dp) :: x,s,s1,s2,s3,xx,yy
xx = Model % Nodes % x(n)
yy = Model % Nodes % y(n)
s = 1.0d0 / SQRT( (xx-11.0)**2 + (yy-4.9)**2 )
END FUNCTION Youngs
FUNCTION InFlow( Model, n, x ) RESULT( vin )
USE... | {"hexsha": "50add8460844aa2b808bf7eb1b1f70c335863e21", "size": 594, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "benchmark_apps/elmerfem/fem/tests/fsi_beam/FsiStuff.f90", "max_stars_repo_name": "readex-eu/readex-apps", "max_stars_repo_head_hexsha": "38493b11806c306f4e8f1b7b2d97764b45fac8e2", "max_stars_repo... |
from __future__ import print_function
__author__ = 'pbmanis'
"""
Decorator:
A class to insert biophysical mechanisms into a model.
This function attempts to automatically decorate a hoc-imported model set of sections
with appropriate conductances.
The class takes as input the object hf, which is an instance of morpho... | {"hexsha": "14c4fe742ce80de8dedfc51ca85cacc28540d73b", "size": 15647, "ext": "py", "lang": "Python", "max_stars_repo_path": "cnmodel/decorator/decorator.py", "max_stars_repo_name": "cnmodel/cnmodel", "max_stars_repo_head_hexsha": "e4fee803d9f783d961c4a7ebb69ae222b74d8441", "max_stars_repo_licenses": ["BSD-3-Clause"], "... |
\section{The \texorpdfstring{\lstinline{linqtowiki-codegen}}{linqtowiki-codegen} application}
\label{ltw-ca}
\lstinline{linqtowiki-codegen} is a simple console application
that can be used to access the functionality of LinqToWiki.Codegen.
In other words, it can generate a library for accessing a specific wiki using L... | {"hexsha": "3a1b59128a39f212202d8871feafb2a61c98e46a", "size": 1310, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Doc/Thesis/ltw-codegen-app.tex", "max_stars_repo_name": "svick/LINQ-to-Wiki", "max_stars_repo_head_hexsha": "3bda58a74d1b398d70965f17467ec268b3ebe91c", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import matplotlib.pyplot as plt
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import *
from pathlib import Path
import sounddevice as sd
import soundfile as sf
import numpy as np
import sys
from warn... | {"hexsha": "7000f01358ddcab7fa23ef9668b93c9e4e0241ab", "size": 5664, "ext": "py", "lang": "Python", "max_stars_repo_path": "voicebox/vc/ui.py", "max_stars_repo_name": "raccoonML/voicebox", "max_stars_repo_head_hexsha": "93ac21b0b0c6e3a40b72c1e5311ecb34892b2931", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
using Multilane
using JLD
using Multilane
using POMDPs
using MCTS
using DataFrames
using DataFramesMeta
using Plots
using StatPlots
# results = load("results_Aug_22_23_26.jld")
# results = load("combined_results_Aug_25_10_10.jld")
# results = load("combined_results_Aug_26_19_53.jld")
# results = load("combined_result... | {"hexsha": "68f821db7feb26a52ba5b89b5e4fac5df4376216", "size": 1340, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scratch_old/aug_18_gap_study_plots.jl", "max_stars_repo_name": "AutomobilePOMDP/Multilane.jl", "max_stars_repo_head_hexsha": "681fa5fe6617443eb8f42cadeb9f9cd6492155aa", "max_stars_repo_licenses": [... |
[STATEMENT]
lemma rreqs_increase:
"paodv i \<TTurnstile>\<^sub>A onll \<Gamma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V (\<lambda>((\<xi>, _), _, (\<xi>', _)). rreqs \<xi> \<subseteq> rreqs \<xi>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. paodv i \<TTurnstile>\<^sub>A onll \<Gamma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V (\... | {"llama_tokens": 202, "file": "AODV_variants_a_norreqid_A_Seq_Invariants", "length": 1} |
from ..imports import *
from .TOI import *
from .TransitingExoplanetsSubsets import *
from astropy.coordinates import SkyCoord
from astropy import units as u
__all__ = ['TOISubset', 'PreviouslyKnownTOI', 'BrandNewTOI']
class TOISubset(TOI):
def __init__(self, label, **kw):
TOI.__init__(self, **kw)
... | {"hexsha": "ebf0cf7a4ee7e7dff81ee6859d5893db458e121c", "size": 3461, "ext": "py", "lang": "Python", "max_stars_repo_path": "exoatlas/populations/TOISubsets.py", "max_stars_repo_name": "zkbt/exopop", "max_stars_repo_head_hexsha": "5e8b9d391fe9e2d39c623d7ccd7eca8fd0f0f3f8", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# Math functions unrelated to any particular structure.
@inline lerp(t::AbstractFloat, v₁::AbstractFloat, v₂::AbstractFloat) =
(1.0 - t) * v₁ + t * v₂
@inline Γ(n::T) where T<:AbstractFloat = (n * eps(T)) / (1 - n * eps(T))
| {"hexsha": "21336f28b2844521f5fa34516de3ed52fdc94ab7", "size": 230, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utils.jl", "max_stars_repo_name": "OTDE/RenderingGeometry.jl", "max_stars_repo_head_hexsha": "30a05e0c871af37be82b537c6529632358151f8f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3,... |
import pyarrow as pa
import numpy as np
from timeit import default_timer
def serialize(data):
buf = pa.serialize(data).to_buffer()
return buf
def save(name, buf):
with open(name, 'wb') as f:
f.write(buf)
def readBuf(name):
mmap = pa.memory_map(name)
buf = mmap.read_buffer()
return buf
def deserialize(buf):... | {"hexsha": "8d7e81dc498ee6809654dcb730e1465b93d45209", "size": 819, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/general/serialize.py", "max_stars_repo_name": "cjnolet/datasets-1", "max_stars_repo_head_hexsha": "eb33c34a897204f20a8869b33c4f6357b3f2fb6f", "max_stars_repo_licenses": ["MIT"], "max_stars... |
#ifndef MONGO_INTERFACE_HPP
#define MONGO_INTERFACE_HPP
#include <iostream>
#include <string>
#include <Eigen/Dense>
#include <vector>
#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>
using namespace std;
using namespace Eigen;
class MongoInterface {
private:
MongoInterface();
MongoInterface(... | {"hexsha": "fdb16366837f497955c9af9c11d7567e8cfb36b4", "size": 1000, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/IO/MongoInterface.hpp", "max_stars_repo_name": "blengerich/jenkins_test", "max_stars_repo_head_hexsha": "512aec681577063e3d68f699d19f53374e59585a", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# -*- coding: utf-8 -*-
from classic import rrt_connect_3d, Astar_test, rrt3D
from metaHeuristic import pso
from machineLearning import rl
from helper.unknown3D import run
from helper.utils import memory_usage, diminuir_pontos
import numpy as np
import statistics as stc
import psutil
from datetime import d... | {"hexsha": "ae42003a273029f9caf27271b114e72f3c4962da", "size": 11992, "ext": "py", "lang": "Python", "max_stars_repo_path": "3D/unknownEnvironment3D.py", "max_stars_repo_name": "lidiaxp/plannie", "max_stars_repo_head_hexsha": "b05f80a8bb5170ccec0124c97251d515892dc931", "max_stars_repo_licenses": ["Unlicense"], "max_sta... |
from dataclasses import dataclass
from datetime import datetime
from pathlib import Path
from typing import Tuple
import numpy as np
import pandapower as pp
import pandas as pd
from pandapower.control import ConstControl
from pandapower.timeseries import DFData, OutputWriter, run_timeseries
from tqdm import tqdm
from... | {"hexsha": "07cebfde16c8052ffe69a6ba2c48c2e2184b1e71", "size": 3917, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/simulation/simulation.py", "max_stars_repo_name": "DecodEPFL/eiv-grid-id", "max_stars_repo_head_hexsha": "093a0f6f3537ee2d4003b6af6a10caaca986fa7a", "max_stars_repo_licenses": ["CC-BY-4.0"], "... |
import sys
sys.path.insert(0, '../')
import numpy as np
from jax.nn import softplus
from jax.experimental import optimizers
import matplotlib.pyplot as plt
import time
from sde_gp import SDEGP
import approximate_inference as approx_inf
import priors
import likelihoods
pi = 3.141592653589793
print('generating some data... | {"hexsha": "4dea0ffb04e57cc309573defb6972a3b6803efc2", "size": 3827, "ext": "py", "lang": "Python", "max_stars_repo_path": "kalmanjax/notebooks/comparison.py", "max_stars_repo_name": "NajwaLaabid/kalman-jax", "max_stars_repo_head_hexsha": "7cd4d83f9c5a22008d2c565deefe3fa7ffd2005d", "max_stars_repo_licenses": ["Apache-2... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Fule Liu, Nackel, luo, Hao Wu
"""
import sys
import re
import time, math
import multiprocessing
import os
from numpy import array
from itertools import combinations, combinations_with_replacement, permutations, product
import numpy as np
from util import fr... | {"hexsha": "c7d0507fc0ca18b585399c2cdfbf71561b853569", "size": 29950, "ext": "py", "lang": "Python", "max_stars_repo_path": "nac.py", "max_stars_repo_name": "yq342/Aptamer-predictor", "max_stars_repo_head_hexsha": "29ff3788c9a3ccfa2c017295d1c8b09b2a89e43e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"... |
# Copyright (c) Microsoft Corporation.
# Copyright (c) University of Florida Research Foundation, Inc.
# Licensed under the MIT License.
#
# 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 wi... | {"hexsha": "c371ff7145a9e55dda28e54a7e09433bb58d39e4", "size": 9411, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo_colmap.py", "max_stars_repo_name": "kunalchelani/invsfm", "max_stars_repo_head_hexsha": "ea2ef4e14168c8ee7c187ee1ce08f0b22e7e9000", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "... |
function denoised = KSVD_WRAP(image_path, sigma)
Noisy_Image = im2double(imread(image_path));
redChannel = Noisy_Image(:,:,1); % Red channel
greenChannel = Noisy_Image(:,:,2); % Green channel
blueChannel = Noisy_Image(:,:,3); % Blue channel
redChannel=im2double(redChannel);
if (length(siz... | {"author": "lbasek", "repo": "image-denoising-benchmark", "sha": "9d753198d715b7628c8e7d9259dfa5c219d033ea", "save_path": "github-repos/MATLAB/lbasek-image-denoising-benchmark", "path": "github-repos/MATLAB/lbasek-image-denoising-benchmark/image-denoising-benchmark-9d753198d715b7628c8e7d9259dfa5c219d033ea/algoritms/mat... |
from astropy.utils.data import get_pkg_data_filename
def get_data_filename():
return get_pkg_data_filename('data/foo.txt')
| {"hexsha": "80284679beb9f5db3b270d3236e37617fb48b1bd", "size": 129, "ext": "py", "lang": "Python", "max_stars_repo_path": "astropy/utils/tests/data/test_package/__init__.py", "max_stars_repo_name": "jayvdb/astropy", "max_stars_repo_head_hexsha": "bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f", "max_stars_repo_licenses": ["B... |
import numpy as np
from numpy import newaxis
import random
import os
import PIL
from PIL import ImageOps, Image
import matplotlib.pyplot as plt
from scipy import ndimage
from torchvision.transforms import ToPILImage
position_i = ["justAPlaceholder", "symbol_1", "symbol_2",
"symbol_3", "symbol_4", "symbo... | {"hexsha": "17a6c52c7f831a30c1f840d4151ecd83a6f9e2f9", "size": 4873, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/utils.py", "max_stars_repo_name": "pducanh2000/VJCS", "max_stars_repo_head_hexsha": "bdb48988ab95a1904e944674375e7f27bde4fac1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max... |
from flask import Flask,render_template,url_for,request
from flask_material import Material
# EDA PKg
import pandas as pd
import numpy as np
import pickle
# ML Pkg
#from sklearn.externals import joblib
app = Flask(__name__)
Material(app)
@app.route('/')
def index():
return render_template("index.html")
@app... | {"hexsha": "50654adab6e17b5433237d00f5d7fcc263551685", "size": 1834, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "Pankajd007/Iris-Species-Predictor", "max_stars_repo_head_hexsha": "cf3a29ff5a97ef11ce5fae329b9f4195be51598e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
import numpy as np
import os
import skimage.io as io
import skimage.transform as trans
import numpy as np
from tensorflow.keras.models import *
from tensorflow.keras.layers import *
from tensorflow.keras.optimizers import *
from tensorflow.keras.callbacks import ModelCheckpoint, LearningRateScheduler
#from tensorflow.... | {"hexsha": "97e1d5cdee549a97958ddc2f68e15580a22bc764", "size": 4635, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "larry1995/U-Net-based-image-segmentation", "max_stars_repo_head_hexsha": "8a04de12bdf7ca324443072d37ebe6ee683cb12b", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import dace
import numpy as np
N = dace.symbol('N')
@dace.program
def dace_softmax(X_in: dace.float32[N], X_out: dace.float32[N]):
tmp_max = dace.reduce(lambda a, b: a + b, X_in, identity=0)
X_out[:] = exp(X_in - tmp_max)
tmp_sum = dace.reduce(lambda a, b: max(a, b), X_in)
X_out[:] /= tmp_sum
@dace... | {"hexsha": "640c63478c3ae5b26dbbb0871cb017f41a9d125b", "size": 575, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/numpy/nested_call_subarray_test.py", "max_stars_repo_name": "gronerl/dace", "max_stars_repo_head_hexsha": "886e14cfec5df4aa28ff9a5e6c0fe8150570b8c7", "max_stars_repo_licenses": ["BSD-3-Clause... |
#################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021
# by the softwar... | {"hexsha": "5f56e55e45f91d807972e04979ef448cad62f5e2", "size": 4988, "ext": "py", "lang": "Python", "max_stars_repo_path": "idaes/commands/config.py", "max_stars_repo_name": "carldlaird/idaes-pse", "max_stars_repo_head_hexsha": "cc7a32ca9fa788f483fa8ef85f3d1186ef4a596f", "max_stars_repo_licenses": ["RSA-MD"], "max_star... |
Global
Set Primitive Projections.
Global
Unset Printing Primitive Projection Parameters.
Global
Set Universe Polymorphism.
Global
Set Default Goal Selector "!".
From Ltac2 Require Import Ltac2.
Set Default Proof Mode "Classic".
Require Import Coq.Unicode.Utf8.
Require Import Coq.Lists.List.
Require Import Coq.Seto... | {"author": "mstewartgallus", "repo": "category-fun", "sha": "436a90c0f9e8a729da6416a2c0e54611ca5e4575", "save_path": "github-repos/coq/mstewartgallus-category-fun", "path": "github-repos/coq/mstewartgallus-category-fun/category-fun-436a90c0f9e8a729da6416a2c0e54611ca5e4575/theories/Program.v"} |
def mangoPlot(mango_filenames):
# Copyright 2019, University of Maryland and the MANGO development team.
#
# This file is part of MANGO.
#
# MANGO is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either... | {"hexsha": "69ab896824ba832c85a3672e162e772df6f4f805", "size": 6446, "ext": "py", "lang": "Python", "max_stars_repo_path": "01_mango/mango_plot.py", "max_stars_repo_name": "zhucaoxiang/stellopt_labs", "max_stars_repo_head_hexsha": "9c28235d475db73d8b9ac06130090ee3b4f5ad31", "max_stars_repo_licenses": ["MIT"], "max_star... |
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
import numpy as np
import os
import argparse
def plot():
results_dir = './'
results_files = [result for result in os.listdir(results_dir) if 'MAESTROeX' in result]
n_gpus_per_node = 6
throughput_list = []
nnodes_list = []
... | {"hexsha": "7914922469ca6040da9790c707e97cbdd14d92e2", "size": 2448, "ext": "py", "lang": "Python", "max_stars_repo_path": "Exec/test_problems/reacting_bubble/scaling/sc20/plot.py", "max_stars_repo_name": "AMReX-Astro/MAESTRO-", "max_stars_repo_head_hexsha": "53b99e9451c1d4f8f113b19d7de5ba7963531382", "max_stars_repo_l... |
import os
import sys
import time
import psutil
import startinpy
import numpy as np
from multiprocessing import cpu_count, Process, Lock, Queue, current_process
from scipy.spatial import KDTree
COARSE_THRESHOLD = 2
FINE_THRESHOLD = 0.2
class MemoryUsage:
def __init__(self, process_name, timestamp, memory_usage... | {"hexsha": "ff04ab09b4f81c0a82b554914b5769f7995df802", "size": 8912, "ext": "py", "lang": "Python", "max_stars_repo_path": "methods/fcfs_refinement.py", "max_stars_repo_name": "mdjong1/simpliPy", "max_stars_repo_head_hexsha": "79196586b63e09a2dedac1d22622270ca646c52c", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
#!/usr/bin/env python3
import os
import subprocess
import sys
import serial
import numpy as np
import datetime
iterations = 1
def run(scheme, precomp_bitslicing, use_hardware_crypto, keygen, sign, verify, aes, sha2):
os.system("make clean")
path = f"crypto_sign/{scheme}/m4"
binary = f"crypto_sign_{scheme}_m4_co... | {"hexsha": "3700815ef0a0e7984b4b8830ba9b7c0fe9fdbe22", "size": 3422, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_codesize.py", "max_stars_repo_name": "TobiasKovats/rainbowm4", "max_stars_repo_head_hexsha": "22e8eb5bc8470b3b49cb570621b2a15e750fb8e3", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_coun... |
\section{Axioms for propositional logic}
| {"hexsha": "00cf28d0701c58d7275c6059eb87c01770b2dcc0", "size": 43, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/pug/theory/logic/propositionalLogicAxioms/01-00-Axioms_for_propositional_logic.tex", "max_stars_repo_name": "adamdboult/nodeHomePage", "max_stars_repo_head_hexsha": "266bfc6865bb8f6b1530499dde3aa6... |
[STATEMENT]
lemma \<psi>_in_hom:
assumes "C.ide x" and "\<guillemotleft>g : y \<rightarrow>\<^sub>D G x\<guillemotright>"
shows "\<guillemotleft>\<psi> x g : F y \<rightarrow>\<^sub>C x\<guillemotright>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<guillemotleft>\<psi> x g : F y \<rightarrow>\<^sub>C x\<... | {"llama_tokens": 370, "file": "Category3_Adjunction", "length": 3} |
#!/usr/bin/env python
# coding: utf-8
# # [Membaca file dengan menggunakan pandas](https://academy.dqlab.id/main/livecode/79/142/578)
# In[2]:
import pandas as pd
csv_data = pd.read_csv("shopping_data.csv")
print(csv_data)
# # [Membaca file dengan menggunakan head()](https://academy.dqlab.id/main/livecode/79/14... | {"hexsha": "85451e806ae25a3299569cd8aacfc0c97066d19e", "size": 3559, "ext": "py", "lang": "Python", "max_stars_repo_path": "Learn/Python/Fundamental/Data Wrangling Python/Data Wrangling Python.py", "max_stars_repo_name": "IrvanKurnia213/DQLab", "max_stars_repo_head_hexsha": "13469ea4fba29228ac04ce64a9b9a2adeeaf14d1", "... |
"""
Simple steady VLM demo
======================
Minimal example of simulation execution.
"""
import time
import numpy as np
import ezaero.vlm.steady as vlm
start = time.time()
# definition of wing, mesh and flight condition parameters
wing = vlm.WingParams(cr=1, ct=0.6, bp=4, theta=30 * np.pi / 180,
... | {"hexsha": "fe598e8784cdfde96bbcb79761612264d2c9a48f", "size": 673, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/plot_steady_simple_demo.py", "max_stars_repo_name": "Juanlu001/ezaero", "max_stars_repo_head_hexsha": "564b3c3442081a5b18c30a0e884ffa217381c859", "max_stars_repo_licenses": ["MIT"], "max_s... |
import numpy as np
from pwtools.parse import PDBFile
from pwtools import common
def test_pdb():
struct = PDBFile('files/pdb_struct.pdb',
units={'length': 1.0}).get_struct()
assert struct.cell is not None
assert struct.cryst_const is not None
assert struct.symbols is not None
... | {"hexsha": "4b05f2a88957e9aaf279e965aefedb287973a97e", "size": 954, "ext": "py", "lang": "Python", "max_stars_repo_path": "pwtools/test/test_pdb.py", "max_stars_repo_name": "elcorto/pwtools", "max_stars_repo_head_hexsha": "cee068d1c7984d85e94ace243f86de350d3a1dba", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star... |
# This file was generated, do not modify it. # hide
plt.figure(figsize=(8,6))
plt.hist(df.price, color = "blue", edgecolor = "white", bins=50,
density=true, alpha=0.5)
plt.xlabel("Price", fontsize=14)
plt.ylabel("Frequency", fontsize=14)
plt.savefig(joinpath(@OUTPUT, "hist_price.svg")) # hide | {"hexsha": "7f7ba226c635c8af767627a9c8ee2ccf86e85a5b", "size": 302, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "__site/assets/end-to-end/HouseKingCounty/code/ex10.jl", "max_stars_repo_name": "giordano/DataScienceTutorials.jl", "max_stars_repo_head_hexsha": "8284298842e0d77061cf8ee767d0899fb7d051ff", "max_star... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
/**
* © Copyright (C) 2016-2020 Xilinx, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may
* not use this file except in compliance with the License. A copy of the
* License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
... | {"hexsha": "467390355fd9d18bc4d98316e22609e03d57b9d5", "size": 1751, "ext": "py", "lang": "Python", "max_stars_repo_path": "Machine_Learning/Design_Tutorials/05-Keras_FCN8_UNET_segmentation/files/code/graph_input_fn.py", "max_stars_repo_name": "mkolod/Vitis-Tutorials", "max_stars_repo_head_hexsha": "33d6cf9686398ef1179... |
##########################################################
# Implementación de Backpropagation
# Basado en el algoritmo 4 y 5, sección 5.3 de la memoria
##########################################################
export backpropagation!
using Random
VectorOrMatrix = Union{Matrix,Vector}
function descent_grad... | {"hexsha": "a35ee28d47840e29bcbb782c07df5878fc526a94", "size": 3283, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "OptimizedNeuralNetwork.jl/src/backpropagation.jl", "max_stars_repo_name": "BlancaCC/TFG-Estudio-de-las-redes-neuronales", "max_stars_repo_head_hexsha": "e16d039ba972c6f2fb4eeed899b3abfa6e121d07", "... |
"""
See documentation at https://github.com/baggepinnen/Robotlib.jl
"""
module Robotlib
using LinearAlgebra, Statistics, StaticArrays, SparseArrays
using TotalLeastSquares
using Quaternions
import Quaternions: Quaternion, rotationmatrix
using Optim
export rotationmatrix
const I4 = SMatrix{4,4,Float64,16}(Matrix{Float64... | {"hexsha": "e1a04f2df9b583d3e3ef1ea09a1fa7742f2397ee", "size": 2770, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Robotlib.jl", "max_stars_repo_name": "tetov/Robotlib.jl", "max_stars_repo_head_hexsha": "d7af6c51eeb51649c8d158d9480fb90d79289af4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 34, "m... |
'''
This script get average color of a grey-scale image
'''
import cv2
import numpy
myimg = cv2.imread('faces/01F_NE_C - Copy-02.png')
avg_color_per_row = numpy.average(myimg, axis=0)
avg_color = numpy.average(avg_color_per_row, axis=0)
print(avg_color)
| {"hexsha": "d25436eac594fd42c18eebb6061c2ac2fb20685f", "size": 255, "ext": "py", "lang": "Python", "max_stars_repo_path": "get_average_color_grey_scale_image.py", "max_stars_repo_name": "miaoli-psy/handyscript", "max_stars_repo_head_hexsha": "c604e54028b35bf5ae52182f1159162d0123d014", "max_stars_repo_licenses": ["BSD-2... |
import numpy as np
from rl_memory.erik.network_cnn import network
from rl_memory.models.a2c.tools import plot_episode_rewards
from rl_memory.custom_env.agents import Agent
from rl_memory.custom_env.environment import Env, Observation
from rl_memory.custom_env.representations import ImageTransforms
it = ImageTransfor... | {"hexsha": "3338ec9602b47575287fd75e31f3c84dc18c0276", "size": 6861, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl_memory/erik/old_pg_cnn.py", "max_stars_repo_name": "eskalnes/RL_memory", "max_stars_repo_head_hexsha": "bd1a5cc07a41be89ea9f8de9edc2a2b557dcedbb", "max_stars_repo_licenses": ["MIT"], "max_stars... |
REBOL [
Title: "Red compile error test script"
Author: "Peter W A Wood"
File: %compile-error-test.r
Rights: "Copyright (C) 2013-2015 Peter W A Wood. All rights reserved."
License: "BSD-3 - https://github.com/red/red/blob/origin/BSD-3-License.txt"
]
~~~start-file~~~ "Red compile errors"
===start-group=== "... | {"hexsha": "a92825e4b2d6dda4c241b3edd13bfe465adff5a4", "size": 1321, "ext": "r", "lang": "R", "max_stars_repo_path": "tests/source/compiler/compile-error-test.r", "max_stars_repo_name": "0xflotus/red", "max_stars_repo_head_hexsha": "d329c17bfe905cdc1917969e9ac649f586542626", "max_stars_repo_licenses": ["BSL-1.0", "BSD-... |
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Arr_segment_traits_2.h>
#include <CGAL/Arrangement_2.h>
#include <boost/unordered_map.hpp>
#include <unordered_map>
typedef int Number_type;
typedef CGAL::Simple_cartesian<Number_type> Kernel;
typedef CGAL::Arr_segm... | {"hexsha": "6a66e260e86794f03a278b0e239b4dad17c30bb2", "size": 1297, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Hash_map/benchmark/Hash_map/arrangement.cpp", "max_stars_repo_name": "ffteja/cgal", "max_stars_repo_head_hexsha": "c1c7f4ad9a4cd669e33ca07a299062a461581812", "max_stars_repo_licenses": ["CC0-1.0"], ... |
import numpy as np
import itertools as itl
import aqml.cheminfo as ci
import aqml.cheminfo.molecule.core as cmc
abc='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ss = [ si+'*' for si in abc ] + [ si[0]+si[1]+'*' for si in itl.product(abc,abc) ]
ss1 = [ si for si in abc ] + [ si[0]+si[1] for si in itl.product(abc,abc) ]
def replace... | {"hexsha": "c988ded00ab753c03ec8a07eb25094716d0ef486", "size": 13597, "ext": "py", "lang": "Python", "max_stars_repo_path": "cheminfo/coords/zmat.py", "max_stars_repo_name": "binghuang2018/aqml", "max_stars_repo_head_hexsha": "4901f3bd85db968fb3fc7ab97fd443421909d89d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
/*=============================================================================
Copyright (c) 2010, 2012 Christopher Schmidt, Nathan Ridge
Distributed under the Boost Software Liceclse, Version 1.0. (See accompanying
file LICEclsE_1_0.txt or copy at http://www.boost.org/LICEclsE_1_0.txt)
==================... | {"hexsha": "9cbd8ea0c47df9d43e15c02db6f3d2117d821579", "size": 3427, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/fusion/test/sequence/define_struct_inline.cpp", "max_stars_repo_name": "ballisticwhisper/boost", "max_stars_repo_head_hexsha": "f72119ab640b564c4b983bd457457046b52af9ee", "max_stars_repo_licens... |
#ifndef PORTABLE_BINARY_IARCHIVE_HPP
#define PORTABLE_BINARY_IARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// portable_binary_iarchive.hpp
// (C) Copyright ... | {"hexsha": "62edc638c31180a1fdc306edce033c85650adb9c", "size": 4772, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "Source/boost_1_33_1/libs/serialization/example/portable_binary_iarchive.hpp", "max_stars_repo_name": "spxuw/RFIM", "max_stars_repo_head_hexsha": "32b78fbb90c7008b1106b0cff4f8023ae83c9b6d", "max_star... |
# Define Recommender class to predict strains from user input.
# Imports
import basilica
from joblib import load
import numpy as np
import os
class Suggester():
"""
Generate five strain suggestions from user input.
"""
def __init__(self):
self.scaler = load('assets/scaler.pkl')
self.p... | {"hexsha": "cd3affce348d34ebb4962a23b5e4009f76961086", "size": 1268, "ext": "py", "lang": "Python", "max_stars_repo_path": "suggestions/predict.py", "max_stars_repo_name": "Med-Cabinet-BW/strain-suggester", "max_stars_repo_head_hexsha": "9f6b926873804c3aa2be99f3b48478f5d42cd430", "max_stars_repo_licenses": ["MIT"], "ma... |
[STATEMENT]
lemma emeasure_set_long: "emeasure lborel Buffon_set =
4 * ennreal (l * (1 - sqrt (1 - (d / l)\<^sup>2)) + arccos (d / l) * d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. emeasure lborel Buffon_set = 4 * ennreal (l * (1 - sqrt (1 - (d / l)\<^sup>2)) + arccos (d / l) * d)
[PROOF STEP]
by (sim... | {"llama_tokens": 188, "file": "Buffons_Needle_Buffons_Needle", "length": 1} |
# Positive current (A) indicator descriptions
import numpy
import pandas as pd
from pandas import set_option
from matplotlib import pyplot
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
DIR = "../Logsn/ind_and_selBcol/v140/"
FILE = DIR + "JPmth023.csv" #a
FILE2 = DIR + "JP... | {"hexsha": "cbf4a23839ca16ed7d2dfeb77c6c030435e6b4dc", "size": 3332, "ext": "py", "lang": "Python", "max_stars_repo_path": "041_J_P5batteries.py", "max_stars_repo_name": "huotarim/huotarim-xgboost-li-ion-batteries", "max_stars_repo_head_hexsha": "a5c183be35aab4bd86924913d37d0ec7bc3a4220", "max_stars_repo_licenses": ["C... |
"""
TruncSVD
ITensor factorization type for a truncated singular-value
decomposition, returned by `svd`.
"""
struct TruncSVD
U::ITensor
S::ITensor
V::ITensor
spec::Spectrum
u::Index
v::Index
end
# iteration for destructuring into components `U,S,V,spec,u,v = S`
iterate(S::TruncSVD) = (S.U, Val(:S))
... | {"hexsha": "cf399e67b9adb271d2b79eff2af47bce7efa9b51", "size": 19001, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/decomp.jl", "max_stars_repo_name": "nticea/ITensors.jl", "max_stars_repo_head_hexsha": "e3694cc50e4b6387222832f23d81996990244782", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":... |
import pandas as pd
import numpy as np
import re
from sklearn import svm
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
import pickle
file = 'data_set.csv'
data = pd.read_csv(file)
data = data.drop(['Month','Day','Hour','ACO'],axis = 1)
Y = data['DCO'].values
data... | {"hexsha": "a9271ec5a208c0f3e35dae73f8e0e78a865ac9dc", "size": 644, "ext": "py", "lang": "Python", "max_stars_repo_path": "Prediction_model.py", "max_stars_repo_name": "walkerps/btp_ZEH", "max_stars_repo_head_hexsha": "348b775bb0f342934698c57df3f30d644445dd52", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun... |
import numpy as np
import torch
def sharpen_prob(p, temperature=2):
"""Sharpening probability with a temperature.
Args:
p (torch.Tensor): probability matrix (batch_size, n_classes)
temperature (float): temperature.
"""
p = p.pow(temperature)
return p / p.sum(1, keepdim=True)
def... | {"hexsha": "0764de858bbfa95da6996324d0b68959ffff0493", "size": 1977, "ext": "py", "lang": "Python", "max_stars_repo_path": "dassl/modeling/ops/utils.py", "max_stars_repo_name": "Fyy10/Dassl.pytorch", "max_stars_repo_head_hexsha": "1b654e3567223ad76e0ff90bd4043157e66e4307", "max_stars_repo_licenses": ["MIT"], "max_stars... |
[STATEMENT]
lemma summable_sums_iff: "summable f \<longleftrightarrow> f sums suminf f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. summable f = f sums suminf f
[PROOF STEP]
by (auto simp: sums_iff summable_sums) | {"llama_tokens": 86, "file": null, "length": 1} |
# -*- coding: utf-8 -*-
"""This example assumes you've read `advanced.py`, and covers:
- Inspecting gradients per layer
- Estimating good values of gradient clipping threshold
"""
import deeptrain
deeptrain.util.misc.append_examples_dir_to_sys_path()
from utils import make_autoencoder, init_session
from utils imp... | {"hexsha": "dfd346855756b5dee9c1e80cce5f8ca769ec9c96", "size": 1527, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/introspection/gradients.py", "max_stars_repo_name": "Mario-Kart-Felix/deeptrain", "max_stars_repo_head_hexsha": "45e066e9aa97c16780682d62250516c7d64d9897", "max_stars_repo_licenses": ["MI... |
#!/usr/bin/env python
# coding: utf-8
import os
import torch
import torch.nn as nn
from torch_geometric.data import DataLoader
from torch_geometric.datasets import ZINC
import argparse
import numpy as np
import time
import yaml
from models.model_zinc import SMPZinc
from models.utils.transforms import OneHotNodeEdgeFea... | {"hexsha": "5fbe2c72f9b7ee8b8ebe100654487ceffad94760", "size": 6446, "ext": "py", "lang": "Python", "max_stars_repo_path": "zinc_main.py", "max_stars_repo_name": "cvignac/SMP", "max_stars_repo_head_hexsha": "95b55a880d0fc9149ddf32e8c2fdf5eac5b474b3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 20, "max_stars... |
halve <- function(a) floor(a/2)
double <- function(a) a*2
iseven <- function(a) (a%%2)==0
ethiopicmult <- function(plier, plicand, tutor=FALSE) {
if (tutor) { cat("ethiopic multiplication of", plier, "and", plicand, "\n") }
result <- 0
while(plier >= 1) {
if (!iseven(plier)) { result <- result + plicand }
... | {"hexsha": "1fbb7a37183dcba8189ec99909333fc313da5e8c", "size": 540, "ext": "r", "lang": "R", "max_stars_repo_path": "Task/Ethiopian-multiplication/R/ethiopian-multiplication-1.r", "max_stars_repo_name": "LaudateCorpus1/RosettaCodeData", "max_stars_repo_head_hexsha": "9ad63ea473a958506c041077f1d810c0c7c8c18d", "max_star... |
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%% %%%%%
# %%%%% BISMILLAH HIRRAHMA NIRRAHEEM %%%%%
# %%%%% %%%%%
# %%%%% Programmed By: Muzammil Behzad %%%%%
# %%%%% Center for M... | {"hexsha": "5fd159f195fcb3371e3b88c129887f8698ddc14f", "size": 2381, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/LiveMaskWebcam.py", "max_stars_repo_name": "muzammilbehzad/FaceMaskDetection", "max_stars_repo_head_hexsha": "659ec209549fce7d3c10aa8bb4f623e5b9f3fd1c", "max_stars_repo_licenses": ["MIT"], ... |
# Copyright (c) OpenMMLab. All rights reserved.
import copy
import os.path as osp
import warnings
from abc import ABCMeta, abstractmethod
from collections import OrderedDict, defaultdict
import mmcv
import numpy as np
import torch
from mmcv.utils import print_log
from torch.utils.data import Dataset
from ..core impor... | {"hexsha": "a3bd0585bcdf53d41e0aced08040054518b09dbf", "size": 12457, "ext": "py", "lang": "Python", "max_stars_repo_path": "mmaction/datasets/base.py", "max_stars_repo_name": "Haawron/mmaction2", "max_stars_repo_head_hexsha": "5927ccc2936759df8977fb588640cbf158264afc", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
// This file is part of DM-HEOM (https://github.com/noma/dm-heom)
//
// Copyright (c) 2015-2019 Matthias Noack, Zuse Institute Berlin
//
// Licensed under the 3-clause BSD License, see accompanying LICENSE,
// CONTRIBUTORS.md, and README.md for further information.
#ifndef heom_matrix_trace_observer_hpp
#define heom_m... | {"hexsha": "fade9517c70011a2fc104c488834a6ddfd026216", "size": 4796, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "dm-heom/include/heom/matrix_trace_observer.hpp", "max_stars_repo_name": "noma/dm-heom", "max_stars_repo_head_hexsha": "85c94f947190064d21bd38544094731113c15412", "max_stars_repo_licenses": ["BSD-3-C... |
"""
Helper classes and functions
============================
Suppress warnings
-----------------
The whole quadrature space is half deprecated, half not. We roll with it
and just ignore the warnings.
"""
import numpy as np
import warnings
from dolfin import *
from ffc.quadrature.deprecation import QuadratureRepre... | {"hexsha": "baf468103355ec6d954c04350bcb49e887a08b98", "size": 4673, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/helper.py", "max_stars_repo_name": "TTitscher/fenics-constitutive", "max_stars_repo_head_hexsha": "1d4917fe9fc52ca9babb4311f761ce8050a54e16", "max_stars_repo_licenses": ["MIT"], "max_star... |
"""General-purpose test script for image-to-image translation.
Once you have trained your model with train.py, you can use this script to test the model.
It will load a saved model from --checkpoints_dir and save the results to --results_dir.
It first creates model and dataset given the option. It will hard-code some... | {"hexsha": "4641c80f4dc6e7db8527bf179b9c802b1893720c", "size": 5412, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_pelvic.py", "max_stars_repo_name": "chenxu31/DCLGAN", "max_stars_repo_head_hexsha": "7c190091f6190cfb96579bd2bdf9ee450d0c8151", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":... |
"""
License: Apache 2.0
Author: Ashley Gritzman
E-mail: ashley.gritzman@za.ibm.com
"""
import tensorflow as tf
import numpy as np
# Get logger that has already been created in config.py
import daiquiri
logger = daiquiri.getLogger(__name__)
import utils as utl
import em_routing as em
def conv_caps(activation_in,
... | {"hexsha": "170f992812c4944883cd596c8c0cc56341475dd8", "size": 10728, "ext": "py", "lang": "Python", "max_stars_repo_path": "layers.py", "max_stars_repo_name": "adiehl96/matrix-capsules-with-em-routing", "max_stars_repo_head_hexsha": "a29b063458698405bb94d7a213aec80531bc028a", "max_stars_repo_licenses": ["Apache-2.0"],... |
import tensorflow as tf
import numpy as np
def conv(name, inputs, nums_out, k_size, strides=1):
nums_in = int(inputs.shape[-1])
with tf.variable_scope(name):
kernel = tf.get_variable("weights", [k_size, k_size, nums_in, nums_out], initializer=tf.random_normal_initializer(mean=0, stddev=np.sqrt(2/... | {"hexsha": "02cabe9f0e20a1f701d11f96aa95c80ebce53bb5", "size": 3742, "ext": "py", "lang": "Python", "max_stars_repo_path": "ops.py", "max_stars_repo_name": "annashekhawat/DenseNet-TensorFlow-1", "max_stars_repo_head_hexsha": "f59eee090826daf0429db1c7109b4ff980b644cf", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
[STATEMENT]
lemma two_ordered_loc:
assumes "a = f 0" and "b = f 1"
shows "local_ordering f ord {a, b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. local_ordering f ord {a, b}
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
1. ?P \<Longrightarrow> local_ordering f ord {a, b}
2. \<not>... | {"llama_tokens": 2895, "file": "Schutz_Spacetime_TernaryOrdering", "length": 25} |
import numpy as np
def convert_to_color_(arr_2d, palette=None):
"""Convert an array of labels to RGB color-encoded image.
Args:
arr_2d: int 2D array of labels
palette: dict of colors used (label number -> RGB tuple)
Returns:
arr_3d: int 2D images of color-encoded labels ... | {"hexsha": "131b0083e6379c17084cdf62d4e8faabfcac0e81", "size": 689, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "mztmzt/F2HNN", "max_stars_repo_head_hexsha": "0aea91d84d8886cb994de6076081a6c28d11bc47", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_stars_repo... |
# Copyright (c) 2021 Qualcomm Technologies, Inc.
# All rights reserved.
import networkx as nx
import torch
from torch_geometric.utils import from_networkx
def random_geometry(num_vertices, edge_p=0.3, dtype=torch.float32):
graph = nx.fast_gnp_random_graph(num_vertices, edge_p)
data = from_networkx(graph)
... | {"hexsha": "0c8a12a59650d0951e9de058b434d9232bfafd64", "size": 509, "ext": "py", "lang": "Python", "max_stars_repo_path": "gem_cnn/tests/utils.py", "max_stars_repo_name": "Qualcomm-AI-research/gauge-equivariant-mesh-cnn", "max_stars_repo_head_hexsha": "52f74948c9d0b3b74156f6c2efb4dddea9d3c0a2", "max_stars_repo_licenses... |
/* ----------------------------------------------------------------------
*
* *** Smooth Mach Dynamics ***
*
* This file is part of the USER-SMD package for LAMMPS.
* Copyright (2014) Georg C. Ganzenmueller, georg.ganzenmueller@emi.fhg.de
* Fraunhofer Ernst-Mach Institute for High-Speed Dynamic... | {"hexsha": "f5ff4fef98fc6ec308855be74c635b4d03465c87", "size": 4590, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "lammps-master/src/USER-SMD/compute_smd_ulsph_strain_rate.cpp", "max_stars_repo_name": "rajkubp020/helloword", "max_stars_repo_head_hexsha": "4bd22691de24b30a0f5b73821c35a7ac0666b034", "max_stars_rep... |
#include <string>
#include <map>
#include <boost/format.hpp>
#include "word_loader/word_loader.h"
namespace cross_language_match {
WordLoader::InputError WordLoader::ParseAndLoadIntoMap() {
word_pairs_ = std::map<std::string, std::string>();
std::istream &input_stream = OpenInputStream();
std::string line;
... | {"hexsha": "4682598dbbcafa5fd00b18cae5a002be21b1bae6", "size": 1260, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/word_loader/word_loader.cc", "max_stars_repo_name": "acurtiz/cross-language-match", "max_stars_repo_head_hexsha": "b980ac6102660bf8e721c6178ceae9c319177fef", "max_stars_repo_licenses": ["MIT"], "... |
#!/usr/bin/env python
# coding: utf8
#
# Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES).
#
# This file is part of PANDORA
#
# https://github.com/CNES/Pandora
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may... | {"hexsha": "57d993f0904c5434bf53f984bf26267b554a6e93", "size": 9721, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandora/matching_cost/census.py", "max_stars_repo_name": "steuxyo/Pandora", "max_stars_repo_head_hexsha": "57db04f31d6cecba93fa3bc0091f624c8b8ec5f1", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
import numpy as np
import hera_pspec as hp
import hera_stats as hs
from pyuvdata import UVData
from hera_pspec.data import DATA_PATH as PSPEC_DATA_PATH
import nose.tools as nt
import os, sys
import unittest
def get_data_redgrp(uvd, redgrp, array='data'):
"""
Get data from all bls in a redundant group and outpu... | {"hexsha": "06d4817dc4ca8a1dd6a487480b55592e953f0ce8", "size": 3021, "ext": "py", "lang": "Python", "max_stars_repo_path": "hera_stats/tests/test_shuffle.py", "max_stars_repo_name": "HERA-Team/hera_stats", "max_stars_repo_head_hexsha": "94d93db23ac14a1da2dce2c327b8542b781825e8", "max_stars_repo_licenses": ["BSD-3-Claus... |
import Tcl
module TclDemos
using Tcl
# Define some shortcuts.
const resume = Tcl.resume
const cget = Tcl.cget
const grid = Tcl.grid
const pack = Tcl.pack
const place = Tcl.place
const list = Tcl.list
#const tkgetpixels = Tcl.getpixels
const getparent = Tcl.getparent
const getpath = Tcl.getpath
const getinterp = Tcl.... | {"hexsha": "003c4ccff3eae45b5c26cfdc8136f7f9aa642e81", "size": 4899, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/demos.jl", "max_stars_repo_name": "emmt/Tcl.jl", "max_stars_repo_head_hexsha": "6c624a576f783f9f604d08ca4eb0c0cfc679b506", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_stars_... |
[STATEMENT]
theorem FullSpec_impl_Spec: "\<turnstile> FullSpec \<longrightarrow> Spec inp out"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<turnstile> FullSpec \<longrightarrow> Spec inp out
[PROOF STEP]
unfolding Spec_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<turnstile> FullSpec \<longrightarrow> ... | {"llama_tokens": 241, "file": "TLA_Buffer", "length": 3} |
#include <boost/mpl/aux_/preprocessed/dmc/bind.hpp>
| {"hexsha": "6f40b52b71c1a93de0404a904f07bc84d4785d74", "size": 52, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_mpl_aux__preprocessed_dmc_bind.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ... |
//
// Copyright (c) 2015-2016 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef NUDB_IMPL_POSIX_FILE_IPP
#define NUDB_IMPL_POSIX_FILE_IPP
#include <boos... | {"hexsha": "cb33b82004c950b4205fa4a7de844ad1bb6eaf84", "size": 4762, "ext": "ipp", "lang": "C++", "max_stars_repo_path": "include/nudb/impl/posix_file.ipp", "max_stars_repo_name": "movitto/NuDB", "max_stars_repo_head_hexsha": "79c1dcaec8aa54d93979fb56c66ab4d925eda29c", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars... |
\chapter{Related Work}
\textit{Note: Describe related work regarding your topic and emphasize your (scientific) contribution in \textbf{contrast} to existing approaches / concepts / workflows. Related work is usually current research by others and you defend yourself against the statement: ``Why is your thesis releva... | {"hexsha": "fbe6fe52a6d43c8d21a0f5f07f748af6b6c9da46", "size": 439, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "include/related_work.tex", "max_stars_repo_name": "Mtze/thesis-template", "max_stars_repo_head_hexsha": "787d848fa894a878efb7644b1d6e07767a9dc684", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
\documentclass{article}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage[tablegrid]{vhistory}
\title{Vision and Business Case}
\author{My Name \\
\multicolumn{1}{p{.7\textwidth}}{\centering\emph{MY INSTITUTION}}}
\date{\today}
%\pagenumbering{gobble} % remove paging on the bottom
\renewcommand{\footrulew... | {"hexsha": "2c26d9fb9860120d469541b86be479953179fd00", "size": 1249, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "BettensLaTeX/01_Vision_and_Business_Case.tex", "max_stars_repo_name": "JaredDyreson/Agile-Documentation", "max_stars_repo_head_hexsha": "00bab46f00534ce01b5acb83e3dc402783cd9061", "max_stars_repo_li... |
!---------------------------------------------------------------------
!
!
! In this file (numerators.f)
! you should place all numerator functions
!
!
!---------------------------------------------------------------------
!
subroutine test(q,amp)
!
!-------------------------------
! ... | {"hexsha": "9f7e13267f4484f81108cb39b68e33e405f45d8f", "size": 930, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "vendor/CutTools/examples/numerators.f", "max_stars_repo_name": "valassi/mg5amc_test", "max_stars_repo_head_hexsha": "2e04f23353051f64e1604b23105fe3faabd32869", "max_stars_repo_licenses": ["NCSA"], ... |
import unittest
import numpy as np
from negative_cycles import find_negative_cycle
class TestNegativeCycles(unittest.TestCase):
def _check(self, actual, expected):
np.testing.assert_allclose(actual, expected)
def _check_eq(self, actual, expected):
assert actual == expected, 'Two expected {0}... | {"hexsha": "44720a847211c02cdaaf26e769968b61544107b1", "size": 3298, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_negative_cycle_finder.py", "max_stars_repo_name": "mnpatil17/negative-cycles", "max_stars_repo_head_hexsha": "35a8b163dcaa8556702dd9069d246fa1d80fd3e6", "max_stars_repo_licenses": ["BSD-... |
# modules we'll use
import pandas as pd
import numpy as np
# helpful modules
import fuzzywuzzy
from fuzzywuzzy import process
import chardet
# set seed for reproducibility
np.random.seed(0)
#%%
# look at the first ten thousand bytes to guess the character encoding
with open("../input/PakistanSuicideAttac... | {"hexsha": "5db46d55019214c35d148dcfd1752d78f0072b79", "size": 2774, "ext": "py", "lang": "Python", "max_stars_repo_path": "Medium Data Cleaning Series/Inconsistent data/inconsistent data values.py", "max_stars_repo_name": "cse75/Machine-Learning", "max_stars_repo_head_hexsha": "0c499603eab6aa0e157b3aa324254863a929b106... |
import numpy as np
from laspec.extern.interpolate import SmoothSpline
from scipy.interpolate import interp1d
from scipy.stats import binned_statistic
import joblib
# deprecated
# def rebin(x, y, xx):
# bins_xx = np.hstack((1.5 * xx[0] - 0.5 * xx[1],
# xx[:-1] + 0.5 * np.diff(xx),
# ... | {"hexsha": "426e28308fb48c0d55b2757e752c0998beb724ee", "size": 18572, "ext": "py", "lang": "Python", "max_stars_repo_path": "twodspec/extract.py", "max_stars_repo_name": "hypergravity/songcn", "max_stars_repo_head_hexsha": "e2b071c932720d02e5f085884c83c46baba7802d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
# %%
import shutil
from unicodedata import normalize
from torch.utils.tensorboard.writer import SummaryWriter
# Enable import from parent package
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))... | {"hexsha": "2d7bd3c73ce2442483c1f2fa28399e0f5a286cc1", "size": 7666, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiment_scripts/train_hji_air3D.py", "max_stars_repo_name": "sudo-michael/deepreach", "max_stars_repo_head_hexsha": "a8affc4cc53b7671fda54dc159129315ec6b7ca8", "max_stars_repo_licenses": ["MIT"... |
from kgmk.dsa.tree.misc.fenwick.one_indexed.jit import (
fw_build,
fw_get,
fw_set,
fw_max_right,
)
# TODO cut below
import typing
import numpy as np
import numba as nb
S = typing.TypeVar('S')
@nb.njit
def build_fw(a: np.ndarray) -> np.ndarray:
return fw_build(fw_op, a)
@nb.njit
def set_fw(fw: np.... | {"hexsha": "581e298a8c8e9d667276ca2d9ee623fc02c2b736", "size": 930, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/kgmk/dsa/misc/online_update_query/set_point_get_range/abstract/fenwick/jit.py", "max_stars_repo_name": "kagemeka/python", "max_stars_repo_head_hexsha": "486ce39d97360b61029527bacf00a87fdbcf552c... |
[STATEMENT]
lemma index_Basis_list_axis1: "index Basis_list (axis i (1::real)) = index enum_class.enum i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. index Basis_list (axis i 1) = index enum_class.enum i
[PROOF STEP]
apply (auto simp: Basis_list_vec_def Basis_list_real_def )
[PROOF STATE]
proof (prove)
goal (1 su... | {"llama_tokens": 269, "file": "Affine_Arithmetic_Executable_Euclidean_Space", "length": 3} |
import numpy as np
import scipy
import matcompat
from matcompat import *
def convmtx(v, n):
# Local Variables: cidx, c, x_left, ridx, m, n, x_right, mv, t, v, x, r, nv
# Function calls: convmtx, length, ones, zeros, size
#%CONVMTX Convolution matrix.
#% CONVMTX(C,N) returns the convolution matrix ... | {"hexsha": "e0f093c7aa334abb0cbe643503e013f126246561", "size": 1776, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/trashbin/convmtx.py", "max_stars_repo_name": "vishalbelsare/parametric_modeling", "max_stars_repo_head_hexsha": "9bfe5df35671930043215c8f6c855af8f49e28bf", "max_stars_repo_licenses": ["BSD-3-C... |
#
# Copyright (C) 2019 Databricks, 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 agreed to i... | {"hexsha": "7dbe5e52b457244a976c5703ffaf51022c7b30dc", "size": 10160, "ext": "py", "lang": "Python", "max_stars_repo_path": "databricks/koalas/tests/test_stats.py", "max_stars_repo_name": "LucasG0/koalas", "max_stars_repo_head_hexsha": "c973195600f2b28b4dfb92aa3e114d1c6e8528ab", "max_stars_repo_licenses": ["Apache-2.0"... |
from __future__ import division
import sys, time, random
import numpy as np
from copy import deepcopy
from itertools import product
sys.path.append('../../')
sys.path.append('/Users/elieeshoa/Desktop/Elie-Zomorrodi/Ali_codes/userError.py')
import userError
from NashEqFinder import NashEqFinder
class game(object):
... | {"hexsha": "f8f47a5bb53db7f0f8a71262f6ff29ee6e5e3ca3", "size": 8662, "ext": "py", "lang": "Python", "max_stars_repo_path": "Ali_codes/GAMETES/game.py", "max_stars_repo_name": "elieeshoagit1/Evolutionary-Game-Theory", "max_stars_repo_head_hexsha": "296dc5a6693945240a56430b71b0bda184bf9104", "max_stars_repo_licenses": ["... |
import collections
import threading
import gc
import traceback
import pandas as pd
import numpy as np
from optable.dataset import feature_types
from optable import _core
class Table(object):
"""avalble for only automl data frame
"""
def __init__(self, df, time_col=None, label_encoders={}, min_time=None)... | {"hexsha": "d791c148d21ea31024a77e6c77d768a1b716bcea", "size": 22369, "ext": "py", "lang": "Python", "max_stars_repo_path": "optable_submission/optable_package/optable/dataset/table.py", "max_stars_repo_name": "pfnet-research/KDD-Cup-AutoML-5", "max_stars_repo_head_hexsha": "54202eb6aa414316a70faa8e07a68e1c8ca7bd1b", "... |
"""
LightGBM
----------------------
"""
from lightgbm import LGBMRegressor
import numpy as np
from darts.models.forecasting_model import ForecastingModel
from darts.timeseries import TimeSeries
from darts.logging import get_logger
logger = get_logger(__name__)
class LightGBM(ForecastingModel):
def __init__(sel... | {"hexsha": "446a422a8d0c1513dfc8881b860ee2cca055e108", "size": 2310, "ext": "py", "lang": "Python", "max_stars_repo_path": "darts/models/lightgbm.py", "max_stars_repo_name": "RNogales94/darts", "max_stars_repo_head_hexsha": "1082f754eeee7a61bc91ba308252c4c8e6284238", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
class DataLoader():
def __init__(self, tfrecord, imsize, num_examples=None, label_dim=80):
if not isinstance(tfrecord, list): tfrecord = [tfrecord]
self.... | {"hexsha": "fa6f3a4523858ab1aee1a172bda4fa64551ee06a", "size": 3723, "ext": "py", "lang": "Python", "max_stars_repo_path": "transfer/dataloader.py", "max_stars_repo_name": "yao-zhao/EDGAN", "max_stars_repo_head_hexsha": "b3164fb9d5d9b571b52328b7dd187b748d5a304d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3... |
import datasets
import torch
import requests
import IPython
# import torchaudio
import numpy as np
import glob
import pickle
import os
from sklearn.model_selection import train_test_split
from torch.utils.data import TensorDataset, DataLoader
class prepareData:
def __init__(self):
X = []
k = 1
... | {"hexsha": "668fa01e83eb703644c0bbe9873adb25df2cae57", "size": 3650, "ext": "py", "lang": "Python", "max_stars_repo_path": "gender/preprocessing_gender.py", "max_stars_repo_name": "Orya-s/DeepLearningSound", "max_stars_repo_head_hexsha": "2599d6215809894b801d9f0922627fc5a3458e82", "max_stars_repo_licenses": ["Apache-2.... |
import os
import fire
import torch
import numpy as np
from tqdm import tqdm
from collections import defaultdict
from configparser import ConfigParser
from models.lpcc_net import LPCC_Net
from ops.common import get_class, get_input, read_bin
from ops.transform import indices_to_coors
# create inferenced kitti velodyn... | {"hexsha": "d85a89be91a89f87f925bc2b395a0de47a3b1b65", "size": 3236, "ext": "py", "lang": "Python", "max_stars_repo_path": "create_kitti_data.py", "max_stars_repo_name": "emdata-ailab/LPCC-Net", "max_stars_repo_head_hexsha": "d39ce63699998fa4403f20f02d19ab5f53843614", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
\chapter{Tests with nccopy}
\label{ch:nccopy}
\section{Introduction}
{\itshape
The nccopy command-line utility copies and optionally compresses and chunks netCDF data.
The nccopy has options to specify what kind of output to generate and optionally what level of compression to use and how to chunk the output.
}\foot... | {"hexsha": "34bd75ea9ba2284602ab8ada35da79da623a08b2", "size": 5496, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "libsrcesdm_test/report/nccopy.tex", "max_stars_repo_name": "ESiWACE/esdm-netcdf-c", "max_stars_repo_head_hexsha": "bde3a4b08fae29a94694e6b56e5d9a41c5e7be3a", "max_stars_repo_licenses": ["BSD-3-Claus... |
[STATEMENT]
lemma set_integrable_discrete_difference:
fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
assumes "countable X"
assumes diff: "(A - B) \<union> (B - A) \<subseteq> X"
assumes "\<And>x. x \<in> X \<Longrightarrow> emeasure M {x} = 0" "\<And>x. x \<in> X \<Longrightarrow> {x} \<i... | {"llama_tokens": 866, "file": null, "length": 6} |
module PointsOnASphere
export Point3D,Point2D,SphericalPoint
struct Point3D{R<:Real,T<:Real,P<:Real}
r :: R
θ :: T
ϕ :: P
function Point3D(r::R,θ::T,ϕ::P) where {R,T,P}
r >= 0 || throw(ArgumentError("r must be non-negative"))
0 <= θ <= π || throw(ArgumentError("θ should lie in [0,π]"))
0 <= ϕ < 2π || throw... | {"hexsha": "cc32793d6ca0b4449832005929c7ce353e1fd57d", "size": 1509, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PointsOnASphere.jl", "max_stars_repo_name": "jishnub/PointsOnASphere.jl", "max_stars_repo_head_hexsha": "f46ca6ddb9f6ce4ad1fd154dceb3fb7b213517a4", "max_stars_repo_licenses": ["MIT"], "max_star... |
# Copyright 2019 Systems & Technology Research, LLC
# Use of this software is governed by the license.txt file.
import numpy as np
import os
import numpy as np
import imp
import torch
import torchvision.ops
import torch.nn as nn
import torch.nn.functional
import time
import os
import sys
from math import ceil
impo... | {"hexsha": "fde6d5a3cd0f353b05d76aa76c38ccde73a4ee3d", "size": 31142, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/strface/strface/detection.py", "max_stars_repo_name": "rwe0214/xfr", "max_stars_repo_head_hexsha": "a49d9e80a1bc45c25c72c394c60f6274599321aa", "max_stars_repo_licenses": ["MIT"], "max_star... |
#' Trains an ARTMAP network on the given input data.
#'
#' This function trains an ARTMAP network on the given input data. Each sample
#' of the data is presented to the network, which categorizes each sample
#' and compares that category's entry in the map field to the supervisor signal.
#' If the map field value and... | {"hexsha": "ffa54de0b2ccf480cf2aacde3952565374962977", "size": 9907, "ext": "r", "lang": "R", "max_stars_repo_path": "R/ARTMAP_Learn.r", "max_stars_repo_name": "gbaquer/fuzzyARTMAP", "max_stars_repo_head_hexsha": "dc5378a742673f5279d054e7cc3bd92d601235cc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
module ConfParser
import Base: haskey, merge!
export ConfParse, parse_conf!, erase!, save!, retrieve, commit!, haskey, merge!
Base.@deprecate open_fh(filename::String, mode::String) open(filename, mode) false
mutable struct ConfParse
_fh::IO
_filename::String
_syntax::String
_data::Dict
_is_modi... | {"hexsha": "3082ced9d958d871c35a81f50052ed0f42ef1845", "size": 10870, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ConfParser.jl", "max_stars_repo_name": "cycloidgamma/ConfParser.jl", "max_stars_repo_head_hexsha": "6a3ff08ac5f669c0b1c77f0876b9d938b0d5bea4", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.