text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
# Import packages
import os
import pandas as pd
import scipy
import hplib as hpl
from functools import partial
import concurrent.futures
# Functions
def import_heating_data():
# read in keymark data from *.txt files in /input/txt/
# save a dataframe to database_heating.csv in folder /output/
Modul = []
... | {"hexsha": "5711d90461c072aec5a1d8bb564606d44f32b820", "size": 90401, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/hplib_database.py", "max_stars_repo_name": "a-buntjer/hplib", "max_stars_repo_head_hexsha": "03a4755145053e7b145768081afb6b93b6c7ddbd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
#!/usr/bin/env python3
from pathlib import Path
import sys
import cv2
import depthai as dai
import numpy as np
import time
# limit fps and wait for all cams to get one frame
sync_cams = True
# Get argument first
mobilenet_path = str((Path(__file__).parent / Path('models/mobilenet.blob')).resolve().absolute())
if len... | {"hexsha": "b53e0c671eff50b6be9df55f4f032400a81f7462", "size": 4780, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/03_count_persons.py", "max_stars_repo_name": "MxFxM/TGMB", "max_stars_repo_head_hexsha": "1367703287b4748aaf725445f19690ef7e3679ab", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
"""
Template class for all learners
"""
import os
import threading
import queue
import time
import numpy as np
from pathlib import Path
from benedict import BeneDict
import surreal.utils as U
from surreal.session import (
TimeThrottledTensorplex,
get_loggerplex_client,
get_tensorplex_client,
Config
)
fr... | {"hexsha": "34c79c28a237d31c40cba9a2e2307c7401198588", "size": 12802, "ext": "py", "lang": "Python", "max_stars_repo_path": "surreal/learner/base.py", "max_stars_repo_name": "PeihongYu/surreal", "max_stars_repo_head_hexsha": "2556bd9c362a53e0a94da914ba59b5d4621c4081", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
#My take based on starlight engine.
#TODO: examine the message_fires, examine whether it should fire multiple messages or not, or if we should just have different clocks.
#=
mutable struct Clock
started::Base.Event
stopped::Bool
message_fires::Vector{Tuple{float,Function,String}}
freq::AbstractFloat
... | {"hexsha": "18e9d399d4a69e4ee14eb00886e641a61233e08b", "size": 2979, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Clock.jl", "max_stars_repo_name": "AliceRoselia/Nebula.jl", "max_stars_repo_head_hexsha": "7601d88af9c2978a0afdf646cc2b7fa48d082003", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "... |
[STATEMENT]
lemma ctstate_assume_new_not_has_CT_State:
"r \<in> set (ctstate_assume_new rs) \<Longrightarrow> \<not> has_disc is_CT_State (get_match r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. r \<in> set (ctstate_assume_new rs) \<Longrightarrow> \<not> has_disc is_CT_State (get_match r)
[PROOF STEP]
apply(... | {"llama_tokens": 1905, "file": "Iptables_Semantics_Simple_Firewall_SimpleFw_Compliance", "length": 10} |
subroutine help()
implicit none!all variables must be declared
return
end subroutine help | {"hexsha": "44c0f42f9217474f9c194aaa88bc8cf5ce1fa674", "size": 93, "ext": "f08", "lang": "FORTRAN", "max_stars_repo_path": "help.f08", "max_stars_repo_name": "jeruiznavarro/Gnumberama", "max_stars_repo_head_hexsha": "4aad7cdde0d95b7065ea844f9f51dd982064b23f", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count":... |
using DitherImage
using Base.Test
using Images
using TestImages
img = testimage("lena_gray_256")
imA = convert(Array{Float64, 2}, data(img))
imA_out = ditherimage(imA)
img_expected = load("lena_dither.png")
imA_expected = convert(Array{Float64, 2}, data(img_expected))
w = size(imA_out, 1)
h = size(imA_out, 2)
@test w... | {"hexsha": "90a90ed390f1de565d1eb5859b4b615179d1f1a5", "size": 470, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "xianrenb/DitherImage.jl", "max_stars_repo_head_hexsha": "fadf23da1339c873a3f2cba672067c7f4a5c16f4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# -*- coding: utf-8 -*-
""" Group-by bit match for FLAME algorithm, from "Fast Large..."(Wang etal)"""
# author: Neha Gupta, Tianyu Wang, Duke University
# Copyright Duke University 2020
# License: MIT
import numpy as np
def match_ng(df, covs, covs_max_list, treatment_indicator_col='treated'):
'''
This is th... | {"hexsha": "e70da6b1c729e6b25a8d67a48c9a4b9124b770f6", "size": 1893, "ext": "py", "lang": "Python", "max_stars_repo_path": "dame_flame/flame_group_by.py", "max_stars_repo_name": "saksham-jain01/DAME-FLAME-Python-Package", "max_stars_repo_head_hexsha": "1362baeadc05cf7ba368e40b0f2873c758c0c515", "max_stars_repo_licenses... |
function chrpak_test ( )
%*****************************************************************************80
%
%% CHRPAK_TEST tests the CHRPAK library.
%
% Licensing:
%
% This code is distributed under the GNU LGPL license.
%
% Modified:
%
% 15 January 2013
%
% Author:
%
% John Burkardt
%
timestamp ( );
f... | {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/chrpak/chrpak_test.m"} |
[STATEMENT]
lemma noVal_K1exit: "noVal (K1exit cid) v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. noVal (K1exit cid) v
[PROOF STEP]
apply(rule no\<phi>_noVal)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. no\<phi> (K1exit cid)
[PROOF STEP]
unfolding no\<phi>_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
... | {"llama_tokens": 2488, "file": "CoCon_Decision_Confidentiality_Decision_NCPC", "length": 15} |
# coding: utf-8
from __future__ import print_function
from hyperparams import Hp
import codecs
import re
import numpy as np
def load_vocab():
# Note that ␀, ␂, ␃, and ⁇ mean padding, EOS, and OOV respectively.
vocab = u'''␀␃⁇ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÄÅÇÉÖ×ÜßàáâãäçèéêëíïñóôöøúüýāćČ... | {"hexsha": "c78eb43aeceaf99904148a1359655b948bb77b1d", "size": 2387, "ext": "py", "lang": "Python", "max_stars_repo_path": "prepro.py", "max_stars_repo_name": "riktimmondal/quasi-rnn-tensorflow-", "max_stars_repo_head_hexsha": "d7e6d954b6116caf5dc917022d4e14a755adb76c", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
__author__ = 'sibirrer'
#this file contains a class to make a gaussian
import numpy as np
class Gaussian(object):
"""
this class contains functions to evaluate a Gaussian function and calculates its derivative and hessian matrix
"""
param_names = ['amp', 'sigma_x', 'sigma_y', 'center_x', 'center_y']
... | {"hexsha": "4a495339c3bb7dc20934697ac79803b464f31e2f", "size": 1626, "ext": "py", "lang": "Python", "max_stars_repo_path": "lenstronomy/LensModel/Profiles/gaussian_potential.py", "max_stars_repo_name": "Jasonpoh/lenstronomy_sims", "max_stars_repo_head_hexsha": "10715966f2d15018fb4e1bcfe934ffa2c36a3073", "max_stars_repo... |
% SPDX-FileCopyrightText: © 2021 Martin Michlmayr <tbm@cyrius.com>
% SPDX-License-Identifier: CC-BY-4.0
\setchapterimage[9.5cm]{images/waterpass}
\chapter{Level playing field}
\labch{level-playing-field}
Open source projects are increasingly being formed and led by companies. Some of these projects garner signific... | {"hexsha": "ea4a785c0ba06963592235a15d37c36f87b22ce9", "size": 2025, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/governance/level-playing-field.tex", "max_stars_repo_name": "tbm/foss-foundations-primer", "max_stars_repo_head_hexsha": "1c7370b86f9ea5133f6a077d9b7b0105729f21ac", "max_stars_repo_licenses... |
// Software License for MTL
//
// Copyright (c) 2007 The Trustees of Indiana University.
// 2008 Dresden University of Technology and the Trustees of Indiana University.
// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com.
// All rights reserved.
// Authors: Peter Gottschling and A... | {"hexsha": "ab7660e12ddb2627087dfab2859463ae5090f29d", "size": 2562, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/numeric/mtl/operation/static_num_rows.hpp", "max_stars_repo_name": "lit-uriy/mtl4-mirror", "max_stars_repo_head_hexsha": "37cf7c2847165d3537cbc3400cb5fde6f80e3d8b", "max_stars_repo_licenses": ... |
# Third-party
import astropy.units as u
import numpy as np
import pytest
# Custom
from ..core import MockStream
def test_init():
xyz = np.random.random(size=(3, 100)) * u.kpc
vxyz = np.random.random(size=(3, 100)) * u.km / u.s
t1 = np.random.random(size=100) * u.Myr
lead_trail = np.empty(100, dtype... | {"hexsha": "13a178fb75ae3c5fc967f7318bf531002619fad4", "size": 710, "ext": "py", "lang": "Python", "max_stars_repo_path": "gala/dynamics/mockstream/tests/test_mockstream_class.py", "max_stars_repo_name": "segasai/gala", "max_stars_repo_head_hexsha": "8d6f3557894231d975c287a2b8560d09a4789513", "max_stars_repo_licenses":... |
Require Import Coq.Program.Equality.
Require Import Coq.Sets.Ensembles.
Require Import Coq.FSets.FSetAVL.
Require Import Coq.FSets.FSetWeakList.
Require Import Coq.MSets.MSetWeakList.
Require Import Coq.FSets.FSetFacts.
Require Import Coq.FSets.FMapAVL.
Require Import Coq.FSets.FMapFacts.
Require Import Coq.Structures.... | {"author": "esmifro", "repo": "surface-effects", "sha": "ee3a0c769c7d9f5ac17fde22971fe8d39c2e527e", "save_path": "github-repos/coq/esmifro-surface-effects", "path": "github-repos/coq/esmifro-surface-effects/surface-effects-ee3a0c769c7d9f5ac17fde22971fe8d39c2e527e/Definitions2.v"} |
# Copyright Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompan... | {"hexsha": "6f30f926401cfe87741876d54e6baf8d24508a9c", "size": 4710, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sagemaker/workflow/emr_step.py", "max_stars_repo_name": "satishpasumarthi/sagemaker-python-sdk", "max_stars_repo_head_hexsha": "255a339ae985041ef47e3a80da91b9f54bca17b9", "max_stars_repo_licen... |
##############################
### SVM PREDICT
##############################
##############################
### FILENAME DETAILS
##############################
filename <- sprintf("%s PREDICT %s.txt", "SVM", toString(format(Sys.time(), "%Y-%m-%d %H-%M-%S")))
##############################
### PREDICTION DATAFRAME
####... | {"hexsha": "d290800947b8f3c19736f0201f706157bc43166d", "size": 1197, "ext": "r", "lang": "R", "max_stars_repo_path": "svm_predict.r", "max_stars_repo_name": "dkanu/quantpac", "max_stars_repo_head_hexsha": "b3a00dffb9f8e98f67b7563356661e35f2f59921", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars... |
# Software License Agreement (BSD License)
#
# Copyright (c) 2011, Willow Garage, Inc.
# Copyright (c) 2016, Tal Regev.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of ... | {"hexsha": "76e10e1d693d57873d9f2f3a5fbeb2a6d24575c1", "size": 11689, "ext": "py", "lang": "Python", "max_stars_repo_path": "cv_bridge_cus/core.py", "max_stars_repo_name": "zshiningstar/Ultra-Fast-Lane-Detection", "max_stars_repo_head_hexsha": "d401651781c55d2e562192a9b00f80274a1fb03e", "max_stars_repo_licenses": ["MIT... |
Require Import floyd.proofauto. (* Import the Verifiable C system *)
Require Import verif_bin_search.
Require Import progs.btree. (* Import the AST of this C program *)
(* The next line is "boilerplate", always required after importing an AST. *)
Require Export VST.floyd.Funspec_old_Notation.
Instance CompSpecs : comps... | {"author": "anshumanmohan", "repo": "CertiGraph-VST", "sha": "13a28072723615e48ced4182b9d7ca8b002e544f", "save_path": "github-repos/coq/anshumanmohan-CertiGraph-VST", "path": "github-repos/coq/anshumanmohan-CertiGraph-VST/CertiGraph-VST-13a28072723615e48ced4182b9d7ca8b002e544f/VST/progs/verif_btree.v"} |
import os
import numpy as np
from django.conf import settings
from api.lib.excepion import *
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence import pad_sequences
from keras.models import load_model
# cho, jung, jong & total
chosung = list("ㄱㄲㄴㄷㄸㄹㅁㅂㅃㅅㅆㅇㅈㅉㅊㅋㅌㅍㅎ") # 19개
jungsung = list... | {"hexsha": "4ff6672813cf5a8fede14fc8ac9bf0c9c98fe5c5", "size": 6024, "ext": "py", "lang": "Python", "max_stars_repo_path": "server/api/lib/hangul_transform.py", "max_stars_repo_name": "seu0313/Bad-word-filter", "max_stars_repo_head_hexsha": "8d4f752032cb16c33729099f836e096cda9c163b", "max_stars_repo_licenses": ["Apache... |
[STATEMENT]
lemma rr2_of_rr2_rel_impl_sound:
assumes "\<forall>R \<in> set Rs. lv_trs (fset R) \<and> ffunas_trs R |\<subseteq>| \<F>"
shows "\<And> A B. rr1_of_rr1_rel_impl \<F> Rs r1 = Some A \<Longrightarrow> rr1_of_rr1_rel \<F> Rs r1 = Some B \<Longrightarrow> \<L> A = \<L> B"
"\<And> A B. rr2_of_rr2_rel_imp... | {"llama_tokens": 55041, "file": "FO_Theory_Rewriting_FOR_Check_Impl", "length": 94} |
#####################################################################
# #
# aom.py #
# #
# Copyright 2013, Monash University ... | {"hexsha": "4fb2fac5a02bc2bc67fb536ede21199595fa64cb", "size": 3118, "ext": "py", "lang": "Python", "max_stars_repo_path": "labscript_utils/unitconversions/aom.py", "max_stars_repo_name": "JQIamo/labscript_utils", "max_stars_repo_head_hexsha": "e13c992622f6c5294068e808c59ad0f32dae14c0", "max_stars_repo_licenses": ["BSD... |
# Lint as: python3
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | {"hexsha": "06d3e25fe8941995b6ce0dcc247563bc9c3d608c", "size": 2160, "ext": "py", "lang": "Python", "max_stars_repo_path": "Google/benchmarks/bert/implementations/bert-research-JAX-tpu-v4-2048/jax/layers/activations.py", "max_stars_repo_name": "gglin001/training_results_v1.1", "max_stars_repo_head_hexsha": "58fd4103f0f... |
[STATEMENT]
lemma deg_monom_le:
"a \<in> carrier R \<Longrightarrow> deg R (monom P a n) \<le> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. a \<in> carrier R \<Longrightarrow> deg R (monom P a n) \<le> n
[PROOF STEP]
by (intro deg_aboveI) simp_all | {"llama_tokens": 107, "file": null, "length": 1} |
from numpy import *
from random import uniform
import tqdm
from random import uniform
#import sys
import time
from multiprocessing import Pool
from numpy import linspace,sqrt,zeros
from tqdm import tqdm_notebook
from random import uniform
from multiprocessing import Pool
from matplotlib.font_manager import FontProper... | {"hexsha": "938612b21364b679031186c0a944f1ecdf79f94c", "size": 14632, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/helpers.py", "max_stars_repo_name": "weiszr/MonteCarloBoulder", "max_stars_repo_head_hexsha": "88c1bcffcd964e0eb937d4f04d02e6ed1cb4d6b6", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_sta... |
import numpy as np
import matplotlib.pyplot as plt
# read data from file
xdata, ydata = np.loadtxt('wavePulseData.txt', unpack=True)
# create x and y arrays for theory
x = np.linspace(-10., 10., 200)
y = np.sin(x) * np.exp(-(x/5.0)**2)
# create plot
plt.figure(1, figsize = (6,4) )
plt.plot(x, y, 'b-', label='theory'... | {"hexsha": "d90e6c006ed6bffe1141f7266a72c4167f8c3acd", "size": 613, "ext": "py", "lang": "Python", "max_stars_repo_path": "Book/chap5/Supporting Materials/wavePulsePlot.py", "max_stars_repo_name": "lorenghoh/pyman", "max_stars_repo_head_hexsha": "9b4ddd52c5577fc85e2601ae3128f398f0eb673c", "max_stars_repo_licenses": ["C... |
(* NOTE: this file is almost an exact copy of [FHCOLtoSFHCOL.v]
up to some name changes: [s/FHCOL/RHCOL/g], [s/Int64asNT/NatAsNT/g], etc.
Ideally these two would be merged.
*)
Require Import ZArith Psatz List.
Require Import MathClasses.interfaces.canonical_names.
Require Import ExtLib.Structures.Monad.
Require... | {"author": "vzaliva", "repo": "helix", "sha": "5d0a71df99722d2011c36156f12b04875df7e1cb", "save_path": "github-repos/coq/vzaliva-helix", "path": "github-repos/coq/vzaliva-helix/helix-5d0a71df99722d2011c36156f12b04875df7e1cb/coq/SymbolicDHCOL/RHCOLtoSRHCOL.v"} |
import requests
import time
import urllib
import zipfile
import re
import string
import random
import socket
import shutil
import numpy as np
from subprocess import Popen, PIPE
from requests import Session
from fake_useragent import UserAgent
from stem import Signal
from stem.control import Controller
from stem.proc... | {"hexsha": "49d4d3fd78c2b81e34cef3913ebf2c688a256420", "size": 11156, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/autotor/autotor_base.py", "max_stars_repo_name": "salvaba94/AutoTor", "max_stars_repo_head_hexsha": "f87332e6e1a9277a46e7375a1e5a712b8d31e10b", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import argparse
import torch
import torch.nn as nn
from torch.backends import cudnn
from torch.optim import Adam, lr_scheduler, SGD
from torch.utils import data
import time
import os, sys
sys.path.append("..")
import datetime
import cv2
from src.networks import Accumulate_LSTM
from src.data import Fusion_dataset_te... | {"hexsha": "9937a9de0c45e3592561b876b2435e840dab0def", "size": 12796, "ext": "py", "lang": "Python", "max_stars_repo_path": "train/1.text_accu_LSTM.py", "max_stars_repo_name": "Larry-u/JAFPro", "max_stars_repo_head_hexsha": "10e5ee3b77bcdb103709c08c3e7d033396bab5ba", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
# (coeff, featurenum, lag, windowlen) for each factor and possibly an intercept.
"""
A moving average linear regression model for time series prediction. This is
similar to but more general than a lagged factor model since the factors can
be moving averages over a range of lags rather than simply a single lag.
In theor... | {"hexsha": "97d301370bf64d07d44acd5a8da4a914c917f56b", "size": 4795, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/models/moving_average_linear_itrm.jl", "max_stars_repo_name": "robertfeldt/InterpretableModels.jl", "max_stars_repo_head_hexsha": "7585609ca88b477294bbcc58fa6dfad75f9dfef1", "max_stars_repo_lic... |
import numpy as np
import argparse
import torch
import torch.nn as nn
from torch.autograd import Variable
from .complex_mul import ComplexMul
class MyModel(nn.Module):
def __init__(self):
super(MyModel, self).__init__()
self.complex_mul = ComplexMul()
def forward(self, x, y):
return se... | {"hexsha": "564d93342e6308b0d5b54d61e43bc5c3469a1298", "size": 1401, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/complex_mul/export_model.py", "max_stars_repo_name": "AyanKumarBhunia/openvino_pytorch_layers", "max_stars_repo_head_hexsha": "4fd2091fab1a0c3240147c00b906a7a233bf392e", "max_stars_repo_l... |
(*
ascribing value members with less precise bad-bounds types results in typesafety breaches
--> only allow (type A: Bot..X) and (type A: X..X) in the ascriptions
*)
Set Implicit Arguments.
Require Import LibLN.
Require Import Coq.Program.Equality.
(* ##############################################################... | {"author": "samuelgruetter", "repo": "dot-calculus", "sha": "f34c4f142c48ecc60c4aa50720a0cda93189da43", "save_path": "github-repos/coq/samuelgruetter-dot-calculus", "path": "github-repos/coq/samuelgruetter-dot-calculus/dot-calculus-f34c4f142c48ecc60c4aa50720a0cda93189da43/dev/lf2/dot_with_paths.v"} |
# Copyright 2015 Ufora 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": "cb97e5bb71937e2567b731f62833d596e41303b1", "size": 11214, "ext": "py", "lang": "Python", "max_stars_repo_path": "packages/python/pyfora/pure_modules/pure_pandas.py", "max_stars_repo_name": "ufora/ufora", "max_stars_repo_head_hexsha": "04db96ab049b8499d6d6526445f4f9857f1b6c7e", "max_stars_repo_licenses": ["A... |
# Copyright 2016-2018, Rigetti Computing
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
QuantumFlow: Directed Acyclic Graph representations of a Circuit.
"""
from typing import List, Dict, Iterable, Iterator, Genera... | {"hexsha": "fef1f833b849f4a7762dfe2916f6f7ffa134c1b6", "size": 5532, "ext": "py", "lang": "Python", "max_stars_repo_path": "quantumflow/dagcircuit.py", "max_stars_repo_name": "stjordanis/quantumflow", "max_stars_repo_head_hexsha": "bf965f0ca70cd69b387f9ca8407ab38da955e925", "max_stars_repo_licenses": ["Apache-2.0"], "m... |
import isdhic
import numpy as np
from isdhic import utils
from isdhic.core import take_time
from scipy import optimize
class HamiltonianMonteCarlo(isdhic.HamiltonianMonteCarlo):
stepsizes = []
@property
def stepsize(self):
return self.leapfrog.stepsize
@stepsize.setter
def stepsize(sel... | {"hexsha": "5ddc425903bd4bdf54e047374109780dc7011ca8", "size": 2824, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_hmc_chromosome.py", "max_stars_repo_name": "michaelhabeck/isdhic", "max_stars_repo_head_hexsha": "35ccec0621c815c77e683bcce7d26e1e6c82b53b", "max_stars_repo_licenses": ["MIT"], "max_sta... |
## Copyright (c) Aslak W. Bergersen, Henrik A. Kjeldsberg. All rights reserved.
## See LICENSE file for details.
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notices fo... | {"hexsha": "e736610269db55ebe9c3cb114aad32503d5c000b", "size": 3070, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_manipulate_curvature.py", "max_stars_repo_name": "KVSlab/vascularManipulationToolkit", "max_stars_repo_head_hexsha": "981ab029be61f472bfff922eeb0c87400dbd92f6", "max_stars_repo_licenses"... |
import Agent
import aux_functions
from collections import deque
import pickle
import numpy as np
import torch
import torch.optim as optim
def init_algo(data_path, history_power_td=60000, weather_dim=6):
agents = deque(maxlen=4)
policy = Agent.Policy(state_size=weather_dim)
optimizer = o... | {"hexsha": "46933a06b7d6db8d53ecd1ba71937ae03ee71047", "size": 2552, "ext": "py", "lang": "Python", "max_stars_repo_path": "algo/Run.py", "max_stars_repo_name": "SENERGY-Platform/pv-usecase", "max_stars_repo_head_hexsha": "89000cd1ed74fd665ad9af5a630462a8e247a82a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_... |
import numpy as np
import mdtraj as md
all = ["rdf_by_frame"]
def rdf_by_frame(trj, **kwargs):
"""Helper function that computes rdf frame-wise and returns the average
rdf over all frames. Can be useful for large systems in which a
distance array of size n_frames * n_atoms (used internally in
md.compu... | {"hexsha": "580816f73c8868e33c663720567634d04c947ab7", "size": 1331, "ext": "py", "lang": "Python", "max_stars_repo_path": "scattering/utils/utils.py", "max_stars_repo_name": "ramanishsingh/scattering", "max_stars_repo_head_hexsha": "40033377283b8aee3d41bad24bba94cc31afcfb0", "max_stars_repo_licenses": ["MIT"], "max_st... |
[STATEMENT]
lemma nba_image_nbae:
assumes "inj_on f (nodes A)"
shows "nbae_image f (nba_nbae A) = nba_nbae (nba_image f A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. nbae_image f (nba_nbae A) = nba_nbae (nba_image f A)
[PROOF STEP]
unfolding nbae_image_nba_nbae
[PROOF STATE]
proof (prove)
goal (1 subgoa... | {"llama_tokens": 1629, "file": "Transition_Systems_and_Automata_Automata_NBA_NBA_Translate", "length": 8} |
# Slugify.jl -- A library that simplifies a text to an ASCII subset
# By: Emmanuel Raviart <emmanuel@raviart.com>
#
# Copyright (C) 2015 Emmanuel Raviart
# https://github.com/eraviart/Slugify.jl
#
# This file is part of Slugify.jl.
#
# The Slugify.jl package is licensed under the MIT "Expat" License.
using Base.Test
... | {"hexsha": "3b95e6d75de16f20f306146676df42be125a2067", "size": 763, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Slugify.jl-bdb4541e-a990-5e30-b34f-5f04038aa20d", "max_stars_repo_head_hexsha": "68283ebaae2c76655b1c0b109a2f7e2eafc818b7", ... |
MODULE floblk
CONTAINS
SUBROUTINE flo_blk
END SUBROUTINE flo_blk
END MODULE floblk | {"hexsha": "34a41a3b8b1a879918f1e74a9aa6ad7292477afc", "size": 88, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "floblk.f90", "max_stars_repo_name": "deardenchris/psycloned_nemo_CDe", "max_stars_repo_head_hexsha": "d0040fb20daa5775575b8220cb5f186857973fdb", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s... |
// STD Headers
#include <iostream>
// Boost Headers
#include <boost/dll.hpp>
int main(int argc, char** argv)
{
#ifdef _WIN32
boost::filesystem::path pathDLL = "DLLa.dll";
#else
boost::filesystem::path pathDLL = "libDLLa.so";
#endif
boost::shared_ptr<std::string> pVar = boost::dll::import<std::string>( pathDLL,... | {"hexsha": "7de666f0e59c80f29fd8b2e2b0460e9fb0072d01", "size": 552, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "App/AppMain.cpp", "max_stars_repo_name": "KHeresy/Boost.DLL.Example", "max_stars_repo_head_hexsha": "faa99b86da28184da541355e96faaef7f61430e5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
//==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... | {"hexsha": "539893969dca53cb24b6c287ff4df8e22995b453", "size": 5169, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "modules/boost/simd/sdk/include/boost/simd/memory/functions/pack/aligned_load.hpp", "max_stars_repo_name": "psiha/nt2", "max_stars_repo_head_hexsha": "5e829807f6b57b339ca1be918a6b60a2507c54d0", "max_... |
#ifndef UID_HPP
#define UID_HPP
#include <string>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
namespace dicom
{
namespace util
{
class uid
{
public:
uid(std::string prefix = "999.999");
std::string generate_uid(std::string suffix = "");... | {"hexsha": "29afb11aa52c8a59cd4c7342fda9c8bd7c94f4c7", "size": 443, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "source/util/uid.hpp", "max_stars_repo_name": "mariusherzog/dicom", "max_stars_repo_head_hexsha": "826a1dadb294637f350a665b9c4f97f2cd46439d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 15.... |
'''
Created on Oct 6, 2010
@author: Peter
'''
from numpy import *
import matplotlib
import matplotlib.pyplot as plt
xcord0 = []; ycord0 = []; xcord1 = []; ycord1 = []
markers =[]
colors =[]
fr = open('testSet.txt')#this file was generated by 2normalGen.py
for line in fr.readlines():
lineSplit = line.strip().split... | {"hexsha": "659f56ad2d039d871ac35d8cb96e89f8ce86185c", "size": 2295, "ext": "py", "lang": "Python", "max_stars_repo_path": "Ch06_Support_Vector_Machine/notLinSeperable.py", "max_stars_repo_name": "jhljx/MachineLearningInAction", "max_stars_repo_head_hexsha": "782b2ff2213aa79e48c5536738c92cc03c3ab6ca", "max_stars_repo_l... |
/-
Copyright (c) 2018 Guy Leroy. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sangwoo Jo (aka Jason), Guy Leroy, Johannes Hölzl, Mario Carneiro
-/
import Mathlib.PrePort
import Mathlib.Lean3Lib.init.default
import Mathlib.data.nat.prime
import Mathlib.PostPort
unive... | {"author": "AurelienSaue", "repo": "Mathlib4_auto", "sha": "590df64109b08190abe22358fabc3eae000943f2", "save_path": "github-repos/lean/AurelienSaue-Mathlib4_auto", "path": "github-repos/lean/AurelienSaue-Mathlib4_auto/Mathlib4_auto-590df64109b08190abe22358fabc3eae000943f2/Mathlib/data/int/gcd_auto.lean"} |
from sklearn.model_selection import train_test_split
import pandas as pd
import numpy as numpy
import matplotlib.pyplot as plt
from sklearn import linear_model
import joblib
df = pd.read_csv(
"Predicciones_Finales\\Data\\th_station_3rd_data.csv", delimiter=",")
x = df[["field2"]]
y = df[["field1"]]
X_train, X_te... | {"hexsha": "0d1f91bc59ac5dd63bef203c718c8a64202f21a1", "size": 674, "ext": "py", "lang": "Python", "max_stars_repo_path": "Predicciones_Finales/train_temperature.py", "max_stars_repo_name": "gaiborjosue/Temp-Hum-Predictor", "max_stars_repo_head_hexsha": "46843b881f6168caef276ad3803e36e4801b4605", "max_stars_repo_licens... |
"""
Script to train one-vs-all logistic regression
It saves models weights in weights.pt
"""
import numpy as np
import pandas as pd
from time import time
from argparse import ArgumentParser
from matplotlib import pyplot as plt
from config import Config
from dslr.preprocessing import scale, fill_na
from dslr.multi_cla... | {"hexsha": "4f85547c4a153edc3d1f0e5f46087d5f801a774b", "size": 2695, "ext": "py", "lang": "Python", "max_stars_repo_path": "logreg_train.py", "max_stars_repo_name": "Gleonett/DSLR", "max_stars_repo_head_hexsha": "b30a27ced0bdf913021366c60b647e0e3bcdb8cf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_s... |
using Pkg
println("Activating environment in $(pwd())...")
Pkg.activate(".")
println("Installing packages...")
flush(stdout)
Pkg.instantiate()
Pkg.precompile()
println("Done!")
| {"hexsha": "b04b1200c81f10cf4832b710e50927c99c4a7eb5", "size": 178, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "install-manual.jl", "max_stars_repo_name": "tuanvo-git/2022-rwth-julia-workshop", "max_stars_repo_head_hexsha": "0b10ede0d49b4121adb9f6932a10623f7eef7015", "max_stars_repo_licenses": ["MIT"], "max_s... |
#import the necessary packages
from utilities.nn.conv.lenet import LeNet
from keras.optimizers import SGD
from sklearn.preprocessing import LabelBinarizer
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report
from keras import backend as K
import matplotlib.pyplot as plt... | {"hexsha": "eeb0053e20e9c0d2c3817fa428f6f26acf2f8690", "size": 2204, "ext": "py", "lang": "Python", "max_stars_repo_path": "DL4CV/lenet_mnist.py", "max_stars_repo_name": "Blowoffvalve/OpenCv", "max_stars_repo_head_hexsha": "ddc1eaa907ff0267b7f0382ee6f7423a574311de", "max_stars_repo_licenses": ["Xnet", "X11"], "max_star... |
[STATEMENT]
lemma hull_Un_right: "P hull (S \<union> T) = P hull (S \<union> P hull T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. P hull (S \<union> T) = P hull (S \<union> P hull T)
[PROOF STEP]
by (metis hull_Un_left sup.commute) | {"llama_tokens": 110, "file": null, "length": 1} |
#######################################################################
# Example: approximate density given by mixture model with a Gaussian #
#######################################################################
using PyPlot
# Define means for three-component Gaussian mixture model
# All components are implicitly... | {"hexsha": "4be73d8f9eb6f9b883843bed1a8cba82a4bf4b98", "size": 1816, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Examples/mixturemodel.jl", "max_stars_repo_name": "ngiann/ApproximateVI.jl", "max_stars_repo_head_hexsha": "61b08c374eb419aeb65ccb23706ac8352d0b46df", "max_stars_repo_licenses": ["MIT"], "max_s... |
% demo script for regression with HKL
clear all
% fixing the seed of the random generators
seed=1;
randn('state',seed);
rand('state',seed);
% toy example characteristics
p = 1024; % total number of variables (used to generate a Wishart distribution)
psub = 32; % kept number of variables = dimensio... | {"author": "goodshawn12", "repo": "REST", "sha": "e34ce521fcb36e7813357a9720072dd111edf797", "save_path": "github-repos/MATLAB/goodshawn12-REST", "path": "github-repos/MATLAB/goodshawn12-REST/REST-e34ce521fcb36e7813357a9720072dd111edf797/dependencies/BCILAB/dependencies/hkl-3.0/demo_regression_kfold.m"} |
import pickle
from torch.utils.data import DataLoader, Dataset
import pandas as pd
import numpy as np
import torch
class PM25_Dataset(Dataset):
def __init__(self, eval_length=36, target_dim=36, mode="train", validindex=0):
self.eval_length = eval_length
self.target_dim = target_dim
path =... | {"hexsha": "9a4f9357120659658248eea31286b4fe7a868092", "size": 6649, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset_pm25.py", "max_stars_repo_name": "jevonxu/CSDI", "max_stars_repo_head_hexsha": "48235b162d6d8b7efd06d3dc12ea44e675fc79a8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 26, "max_s... |
from tqdm import tqdm
import torch
from torch.utils.data import DataLoader
from torch import nn
from torch.nn import functional as nnf
import numpy as np
import json
import os
from os.path import join, basename, isdir, isfile, expanduser
from sklearn.manifold import TSNE
from matplotlib import pyplot as plt
import nu... | {"hexsha": "cd6e0ba793f5b2c41067df693c517c93195d1e3d", "size": 590, "ext": "py", "lang": "Python", "max_stars_repo_path": "tralo/interactive.py", "max_stars_repo_name": "timojl/tralo", "max_stars_repo_head_hexsha": "90b928c0cb38dbc2a324d8761bce1b2a422f5e31", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
// Copyright Louis Dionne 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
#include <boost/hana/assert.hpp>
#include <boost/hana/core/tag_of.hpp>
#include <boost/hana/integral_constant.hpp>
#include <boost/hana/min... | {"hexsha": "0868223887060a6e8b5bfe4663b4f3a6ac3f4745", "size": 3828, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/hana/example/tutorial/tag_dispatching.cpp", "max_stars_repo_name": "Manu343726/boost-cmake", "max_stars_repo_head_hexsha": "009c3843b49a56880d988ffdca6d909f881edb3d", "max_stars_repo_licenses":... |
import quandl
import datetime
import pandas as pd
import argparse
#https://chrisconlan.com/download-historical-stock-data-google-r-python/
quandl.ApiConfig.api_key = 'API key'
def get_from_quandl(symbol, start_date=(2000, 1, 1), end_date=None):
"""
symbol is a string representing a stock symbol, e.g. 'AAPL'
... | {"hexsha": "5abdf7e407ec7ea5cc71e67f8e447ca8bcd6e5f2", "size": 1990, "ext": "py", "lang": "Python", "max_stars_repo_path": "derivatives_pricing/scripts/build_dataset_quandl.py", "max_stars_repo_name": "RobinsoGarcia/derivatives-pricing", "max_stars_repo_head_hexsha": "09fdd7b5083b26342561faefa94aeb3b76ace9af", "max_sta... |
function net_pingIIWA(ip)
%% About
% Ping kuka iiwa through the network
%% Syntax
% net_pingIIWA(ip)
%% Arreguments
% ip: is the IP of the kuka controller
% Copyright: Mohammad SAFEEA 16th-April-2018
command=['ping ',ip];
dos(command);
end | {"author": "Modi1987", "repo": "KST-Kuka-Sunrise-Toolbox", "sha": "9299bed2b46058aeb4105d7fbff6d2290ce68bba", "save_path": "github-repos/MATLAB/Modi1987-KST-Kuka-Sunrise-Toolbox", "path": "github-repos/MATLAB/Modi1987-KST-Kuka-Sunrise-Toolbox/KST-Kuka-Sunrise-Toolbox-9299bed2b46058aeb4105d7fbff6d2290ce68bba/Matlab_clie... |
[STATEMENT]
lemma nxt_not_possible[simp]: "\<not> possible t x \<Longrightarrow> nxt t x = empty"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<not> possible t x \<Longrightarrow> nxt t x = TTree.empty
[PROOF STEP]
by transfer auto | {"llama_tokens": 85, "file": "Call_Arity_TTree", "length": 1} |
#include "ball_gz.h"
#include <vector>
#include <armadillo>
#include <iostream>
#include <cmath>
using namespace gazebo;
BallPlugin::BallPlugin(void) : WorldPlugin() {
}
BallPlugin::~BallPlugin(void) {
}
void BallPlugin::Load(physics::WorldPtr _parent, sdf::ElementPtr _sdf) {
this->model = _parent;
this->node =... | {"hexsha": "f51330d295e4c0263202a9ca0ed1de69561c403e", "size": 1758, "ext": "cc", "lang": "C++", "max_stars_repo_path": "plugins/ball_gz.cc", "max_stars_repo_name": "timrobot/ArmRL", "max_stars_repo_head_hexsha": "7de4588d7df288735a4995f216c809768ea8f59f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
(* Title: ZF/ex/Ring.thy
*)
section \<open>Rings\<close>
theory Ring imports Group begin
no_notation
cadd (infixl \<open>\<oplus>\<close> 65) and
cmult (infixl \<open>\<otimes>\<close> 70)
(*First, we must simulate a record declaration:
record ring = monoid +
add :: "[i, i] \<Rightarrow> i" (infixl "\<opl... | {"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/ZF/ex/Ring.thy"} |
import numpy as np
import numpy.ma as ma
import cdms2, cdutil, cdtime
import os.path
class TS (object):
def __init__(self, filename):
self.filename = filename
self.f = cdms2.open(filename)
def __del__(self):
self.f.close()
def globalAnnual(self, var):
# Constants, fro... | {"hexsha": "a0e37e865edd4d36e114452e78fa33046c21b533", "size": 1660, "ext": "py", "lang": "Python", "max_stars_repo_path": "zppy/templates/readTS.py", "max_stars_repo_name": "xylar/zppy", "max_stars_repo_head_hexsha": "8f1c80cfc4eae36731a759be74b3d6f5998cf7f6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co... |
[STATEMENT]
lemma rcm_A: "a * (a r\<rightarrow> b) = b * (b r\<rightarrow> a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. a * (a r\<rightarrow> b) = b * (b r\<rightarrow> a)
[PROOF STEP]
by (rule dual.lcm_A) | {"llama_tokens": 97, "file": "PseudoHoops_RightComplementedMonoid", "length": 1} |
#!/usr/bin/env python
# # -*- coding: utf-8 -*-
"""
Test script for omas saving/loading data in different formats
.. code-block:: none
python -m unittest omas/tests/test_omas_suite
-------
"""
from __future__ import print_function, division, unicode_literals
import unittest
import os
import numpy
from omas imp... | {"hexsha": "12d0e97c8746bb67e5481a5ce3d91c2aedf9d84f", "size": 3852, "ext": "py", "lang": "Python", "max_stars_repo_path": "omas/tests/test_omas_suite.py", "max_stars_repo_name": "gkdb/omas", "max_stars_repo_head_hexsha": "a4946641890b6132b9dafd89f37963b30f363821", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
#' Plot index at age consistency
#'
#' Lattice style plot of index catch at age X vs age Y with each point a cohort for each fleet. Computed for both input and predicted index catch at age.
#' @param asap name of the variable that read in the asap.rdat file
#' @param index.names names of indices
#' @param save.p... | {"hexsha": "ded3ba63f90a67e09ef0412fdeeb71e039982aaa", "size": 2114, "ext": "r", "lang": "R", "max_stars_repo_path": "R/plot_index_at_age_consistency.r", "max_stars_repo_name": "liz-brooks/ASAPplots", "max_stars_repo_head_hexsha": "f42263d80f28b9de5d1abd2f87676d26bb30d4ec", "max_stars_repo_licenses": ["MIT"], "max_star... |
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | {"hexsha": "17d102310f0a81c839e049b4dc806bba57624bc0", "size": 22609, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_model_optimization/python/core/sparsity_tf2/lthpruner_test.py", "max_stars_repo_name": "xwinxu/model-optimization", "max_stars_repo_head_hexsha": "c3d78bff440e1cb9f237d9b31f1047b36775d... |
! { dg-do run }
! { dg-options "-ffrontend-optimize -fdump-tree-optimized -Wrealloc-lhs -finline-matmul-limit=1000 -O" }
! PR 66094: Check functionality for MATMUL(TRANSPOSE(A),B)) for two-dimensional arrays
program main
implicit none
integer, parameter :: n = 3, m=4, cnt=2
real, dimension(cnt,n) :: a
real, dim... | {"hexsha": "9d54094cd90e6985e423ad638f7a03bf74eae7ac", "size": 2052, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/inline_matmul_16.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_rep... |
"""The :mod:`search` module defines algorithms to search for Push programs."""
from abc import ABC, abstractmethod
from typing import Union, Tuple, Optional
import numpy as np
import math
from functools import partial
from multiprocessing import Pool, Manager
from pyshgp.utils import DiscreteProbDistrib
from pyshgp.g... | {"hexsha": "b9e7b5ff72a916132eec9840594eb9e1b5146dfb", "size": 14523, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyshgp/gp/search.py", "max_stars_repo_name": "epicfaace/pyshgp", "max_stars_repo_head_hexsha": "ab6fc85e6a474f1603c43ad3d298bcf5cf4a53c6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
// ======================================================================
/*!
* \brief class woml::ParameterTimeSeriesPoint
*/
// ======================================================================
#include "ParameterTimeSeriesPoint.h"
#include "FeatureVisitor.h"
#include "TimeSeriesSlot.h"
#include <boost/date_... | {"hexsha": "3d5faac4a855d1ac8172257e40d31dc57dbb960e", "size": 3004, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "woml/ParameterTimeSeriesPoint.cpp", "max_stars_repo_name": "fmidev/smartmet-library-woml", "max_stars_repo_head_hexsha": "3672833c54333027655bf5cfe9cec18310aaacdf", "max_stars_repo_licenses": ["MIT"... |
# Copyright (c) 2018 PaddlePaddle 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 app... | {"hexsha": "35f6cc4c780c37cc84246d6d93d83cccd3aac99d", "size": 3602, "ext": "py", "lang": "Python", "max_stars_repo_path": "parl/algorithms/torch/td3.py", "max_stars_repo_name": "jkren6/PARL", "max_stars_repo_head_hexsha": "7299032f8e1804bb4ada0f087fd485816046fa90", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
# -*- coding: utf-8 -*-
from functools import wraps
from multiprocessing import Manager, Process
from typing import Union, Tuple, List, Iterable, Callable
import numpy as np
import warnings
from domain import Domain3D
from cloudforms import CylinderCloud
from plank import Plank
class tf:
class Tensor:
pa... | {"hexsha": "c3b200c212b71389f8c7eea8e59ab1fc6c4bcb08", "size": 61896, "ext": "py", "lang": "Python", "max_stars_repo_path": "old/cpu.py", "max_stars_repo_name": "dobribobri/amodel", "max_stars_repo_head_hexsha": "dae41f99549e7f3a76586fa4b785ba0d30350084", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
# Import required libraries
from numpy import save
import questionary
import fire
from questionary.constants import NO, YES, YES_OR_NO
import csv
import sys
from sqlalchemy import column
# Define the clients general information
def general_info():
full_name = questionary.text("What's your name?").ask()
phone_nu... | {"hexsha": "9af5cced3e2e230cee7ddc298d72f325cce904c4", "size": 3168, "ext": "py", "lang": "Python", "max_stars_repo_path": "investor_assessment_app.py", "max_stars_repo_name": "Kevinator9000/portfolio_suitability_app", "max_stars_repo_head_hexsha": "d0ed3c76409b4ad969f18763d58f45bfd85677ec", "max_stars_repo_licenses": ... |
[STATEMENT]
lemma iff_elimC:
"(P \<longleftrightarrow> Q) x \<Longrightarrow> (P x \<Longrightarrow> Q x \<Longrightarrow> R) \<Longrightarrow> (\<not> P x \<Longrightarrow> \<not> Q x \<Longrightarrow> R) \<Longrightarrow> R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>(P \<longleftrightarrow> Q) x; \<... | {"llama_tokens": 181, "file": "Circus_Relations", "length": 1} |
import numpy as np
import pandas as pd
import joblib
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix
from sklearn.metrics import classification_report
def impute_age(cols):
age=cols[0]
pClass = cols[1]
if pd.isnull(age):
if pClass == 1:
... | {"hexsha": "9ce72bb18439c0d767227994a7a40d6a60ed1332", "size": 1437, "ext": "py", "lang": "Python", "max_stars_repo_path": "titantic.py", "max_stars_repo_name": "vatsarahul999/django_demo", "max_stars_repo_head_hexsha": "57d439e60b64990a6fb21229e643a1e95d9f5466", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
import numpy as np
from itertools import product
from pymatgen.core import Structure, Lattice, Site
from typing import Dict, Sequence, Any, Callable, Optional, List, Iterator
from numpy.typing import ArrayLike
from pymatgen.util.typing import SpeciesLike
from .grain import Grain, GrainGenerator
class GrainBoundaryGen... | {"hexsha": "c68b79577f6397c05bb8c78378bfc184a3a2da40", "size": 15703, "ext": "py", "lang": "Python", "max_stars_repo_path": "gbmaker/grain_boundary.py", "max_stars_repo_name": "KPMcKenna/GBMaker", "max_stars_repo_head_hexsha": "c6395602f208d18780e00216aa9d78c5bbd5492e", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
# import dependencies
import argparse
import numpy as np
import os
import tensorflow as tf
import tensorflow.keras.backend as K
import tensorflow.keras.layers as layers
import tensorflow.keras.models as models
import tensorflow.keras.preprocessing as preprocessing
import tensorflow.keras.regularizers as regularizers
i... | {"hexsha": "012150a8b38426417025ea43a6d0e9b7b6c58cdc", "size": 4596, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "positivevaib/residual-neural-net", "max_stars_repo_head_hexsha": "fb6d8182c447ee41234d5bc8f701438db17544a9", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import pandas as pd
import numpy as np
import re
from law.utils import *
import jieba.posseg as pseg
import datetime
import mysql.connector
class case_reader:
def __init__(self, user, password, n=1000, preprocessing=False):
'''
n is total types,
preprocessing: whether needs preproc... | {"hexsha": "04c390ae0a660a57d71ce357f75790a5f3d27885", "size": 26972, "ext": "py", "lang": "Python", "max_stars_repo_path": "law/data.py", "max_stars_repo_name": "Evangeline98/Legal-AI", "max_stars_repo_head_hexsha": "4d6e01e7956f2f1940f803bc7c9599581a992a2d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "... |
import struct
import numpy as np
import pygimli as pg
def importGTT(filename, return_header=False):
"""Import refraction data from Tomo+ GTT data file into DataContainer."""
header = {}
with open(filename, 'rb') as fid:
block = fid.read(100)
nshots = struct.unpack(">I", block[:4])[0]
... | {"hexsha": "55d3377899e75aaf4c381d04c58da518b0d24ae7", "size": 11548, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/pygimli/physics/traveltime/importData.py", "max_stars_repo_name": "sathyanarayanrao/gimli", "max_stars_repo_head_hexsha": "96eda5a99ba642a75801bd359b6ae746c2955d0b", "max_stars_repo_licens... |
const IM2COL_FLOAT_HANDLE = Libdl.dlsym(Native.library, :im2col_float)
const IM2COL_DOUBLE_HANDLE = Libdl.dlsym(Native.library, :im2col_double)
const COL2IM_FLOAT_HANDLE = Libdl.dlsym(Native.library, :col2im_float)
const COL2IM_DOUBLE_HANDLE = Libdl.dlsym(Native.library, :col2im_double)
function im2col{T}(img::Array{T... | {"hexsha": "13f7b10b50ed104e2d03837d0348bec54e53d82c", "size": 3079, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utils/im2col-native.jl", "max_stars_repo_name": "baajur/Mocha.jl", "max_stars_repo_head_hexsha": "5e15b882d7dd615b0c5159bb6fde2cc040b2d8ee", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
#include <boost/type_traits.hpp>
#include <iostream>
using namespace boost;
int main()
{
std::cout.setf(std::ios::boolalpha);
std::cout << has_plus<int>::value << '\n';
std::cout << has_pre_increment<int>::value << '\n';
std::cout << has_trivial_copy<int>::value << '\n';
std::cout << has_virtual_destructor<... | {"hexsha": "207815eb1110890ce23aa9639601e9ab9abee28b", "size": 342, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Example/typetraits_03/main.cpp", "max_stars_repo_name": "KwangjoJeong/Boost", "max_stars_repo_head_hexsha": "29c4e2422feded66a689e3aef73086c5cf95b6fe", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
/*
* Copyright (c) 2013-2014 ADTECH GmbH
* Licensed under MIT (https://github.com/adtechlabs/libtasks/blob/master/COPYING)
*
* Author: Andreas Pohl
*/
#include <arpa/inet.h>
#include <csignal>
#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/transport/THttpClient.h>
#include <thrift/transport/TSocket... | {"hexsha": "cb37d02b56095e3f73887cdf3473109abc5e78d8", "size": 6632, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/test_uwsgi_thrift_async.cpp", "max_stars_repo_name": "toptan/libtasks", "max_stars_repo_head_hexsha": "9bb2a8ec7c17cbdfef30e04e7114807be135df10", "max_stars_repo_licenses": ["MIT"], "max_stars... |
from typing import Any, Callable, Dict, List, Tuple, Union
import numpy as np
import torch
def apply(
data: Union[
float,
np.ndarray,
List[np.ndarray],
Tuple[np.ndarray],
Dict[Any, np.ndarray],
torch.Tensor,
],
func: Callable,
):
if isinstance(data, flo... | {"hexsha": "380d9d351878916cb30b98544b5c7681faa7393e", "size": 1111, "ext": "py", "lang": "Python", "max_stars_repo_path": "dreamer/utils/apply.py", "max_stars_repo_name": "KohMat/carracing-dreamer", "max_stars_repo_head_hexsha": "1e46bf0e6bcbb45adc2fef1b9b65f54e2706f77d", "max_stars_repo_licenses": ["MIT"], "max_stars... |
#!/usr/bin/env python3
from functools import partial
import numpy as np
import rclpy
from rclpy.node import Node
from turtlesim.srv import Kill
from turtlesim.srv import Spawn
from turtle_tag_simulator_interfaces.msg import Turtle
from turtle_tag_simulator_interfaces.msg import Turtles
from turtle_tag_simulator_interf... | {"hexsha": "34f49940681259b951ea28caf021442490f42ab4", "size": 6098, "ext": "py", "lang": "Python", "max_stars_repo_path": "packages_src/turtle_tag_simulator/turtle_tag_simulator/players_spawner.py", "max_stars_repo_name": "martin0004/ros2_turtle_tag_simulator", "max_stars_repo_head_hexsha": "3d20cf3eb837fdda22ccf477bc... |
#include <boost/units/physical_dimensions/moment_of_inertia.hpp>
| {"hexsha": "339a775083ac5cc7f410fb87a5e7229e9985b8db", "size": 65, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_units_physical_dimensions_moment_of_inertia.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_rep... |
MODULE ghex_structured_mod
use iso_c_binding
use ghex_defs
use ghex_comm_mod
implicit none
interface
! callback type
subroutine f_cart_rank_neighbor (id, offset_x, offset_y, offset_z, nbid_out, nbrank_out)
use iso_c_binding
integer(c_int), value, intent(in) :: id, offset_x, offset_y,... | {"hexsha": "6cdd7ec2cb0a233550bc1c11fd078c6200fffcc5", "size": 9834, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "bindings/fhex/ghex_structured_mod.f90", "max_stars_repo_name": "tehrengruber/GHEX", "max_stars_repo_head_hexsha": "f164bb625aaa106f77d31d45fce05c4711b066f0", "max_stars_repo_licenses": ["BSD-3-C... |
import numpy as np
import matplotlib.pyplot as plt
import warnings
from functools import reduce
from matplotlib.colors import LogNorm
def plot_err(x, y, yerr, color="salmon", alpha_fill=0.2,
ax=None, label="", lw=2, ls="-"):
if len(y.shape)!=1: y, yerr = y.reshape(-1), yerr.reshape(-1)
ax ... | {"hexsha": "5703d6f442f48a076eb2a6d0b5da65e7d14a53d4", "size": 3546, "ext": "py", "lang": "Python", "max_stars_repo_path": "posterior_visualization/plot_primitives.py", "max_stars_repo_name": "zehsilva/prior-predictive-specification", "max_stars_repo_head_hexsha": "200291ca55469fd7d07df9ba68b82cdd51c31afc", "max_stars_... |
r"""
Definition
----------
This model describes a Gaussian shaped peak on a flat background
.. math::
I(q) = (\text{scale}) \exp\left[ -\tfrac12 (q-q_0)^2 / \sigma^2 \right]
+ \text{background}
with the peak having height of *scale* centered at $q_0$ and having a standard
deviation of $\sigma$. The FWH... | {"hexsha": "826f2048913a14dc5014433ccad8f6c472a84e2b", "size": 1322, "ext": "py", "lang": "Python", "max_stars_repo_path": "sasmodels/models/gaussian_peak.py", "max_stars_repo_name": "jmborr/sasmodels", "max_stars_repo_head_hexsha": "bedb9b0fed4f3f4bc2bbfa5878de6f2b6fdfbcc9", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
(* Author: Pascal Stoop, ETH Zurich
Author: Andreas Lochbihler, Digital Asset *)
section \<open>Lazy types in generated code\<close>
theory Code_Lazy
imports Case_Converter
keywords
"code_lazy_type"
"activate_lazy_type"
"deactivate_lazy_type"
"activate_lazy_types"
"deactivate_lazy_types"
"print_lazy_ty... | {"author": "m-fleury", "repo": "isabelle-emacs", "sha": "756c662195e138a1941d22d4dd7ff759cbf6b6b9", "save_path": "github-repos/isabelle/m-fleury-isabelle-emacs", "path": "github-repos/isabelle/m-fleury-isabelle-emacs/isabelle-emacs-756c662195e138a1941d22d4dd7ff759cbf6b6b9/src/HOL/Library/Code_Lazy.thy"} |
import numpy as np
import math
import matplotlib
import matplotlib.pyplot as plt
import cv2
import os
from alphapose.hand.hand_src import Hand
from alphapose.hand import model
from alphapose.hand import util
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figu... | {"hexsha": "93ae7018b46981b582bc1dfde74e47130b0a4a9e", "size": 5437, "ext": "py", "lang": "Python", "max_stars_repo_path": "alphapose/hand/hand.py", "max_stars_repo_name": "7-GUO-7/AlphaPose", "max_stars_repo_head_hexsha": "3f681b29ac4f4e63c96de48c4b1501b7bcd0e43d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
from rlkit.exploration_strategies.base import RawExplorationStrategy
import numpy as np
class UniformStrategy(RawExplorationStrategy):
"""
This strategy adds noise sampled uniformly to the action taken by the
deterministic policy.
"""
def __init__(self, action_space, low=0., high=1.):
self... | {"hexsha": "8a94ef7dd385813994332049ff482fcb25fab3ae", "size": 679, "ext": "py", "lang": "Python", "max_stars_repo_path": "rlkit/exploration_strategies/uniform_strategy.py", "max_stars_repo_name": "Asap7772/railrl_evalsawyer", "max_stars_repo_head_hexsha": "baba8ce634d32a48c7dfe4dc03b123e18e96e0a3", "max_stars_repo_lic... |
[STATEMENT]
lemma "(\<not> ((a1 \<and> a2) \<or> (b1 \<and> b2) \<or> c)) = ((\<not>a1 \<and> \<not> b1 \<and> \<not> c) \<or> (\<not>a2 \<and> \<not> b1 \<and> \<not> c) \<or> (\<not>a1 \<and> \<not> b2 \<and> \<not> c) \<or> (\<not>a2 \<and> \<not> b2 \<and> \<not> c))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
... | {"llama_tokens": 287, "file": "Iptables_Semantics_Common_Negation_Type_DNF", "length": 1} |
SUBROUTINE zgetinfo (IFLTAB, CPATH, IBUFF, ISTAT)
C
implicit none
C
C
INTEGER IFLTAB(*), IBUFF(*), ISTAT,zdssVersion
CHARACTER CPATH*(*)
CHARACTER PATHNAME*393
C
C
C Adjust the time interval for the DSS version, if necessary
pathname = cpath
call ztsPathCheckInterval(ifltab... | {"hexsha": "ec7fb8e11e09aaa7587c47415fe1ed12bed56f2f", "size": 538, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "heclib/heclib_f/src/DssInterface/v6and7/zgetInfoInterface.f", "max_stars_repo_name": "HydrologicEngineeringCenter/heclib", "max_stars_repo_head_hexsha": "dd3111ee2a8d0c80b88d21bd529991f154fec40a", ... |
import numpy
from aydin.io.datasets import camera
from aydin.it.transforms.histogram import HistogramEqualisationTransform
def demo_histogram():
image = camera()
ht = HistogramEqualisationTransform()
preprocessed = ht.preprocess(image)
postprocessed = ht.postprocess(preprocessed)
import napari... | {"hexsha": "a4ff4cd8abadfc4c7cc001d5b5317c4c65b31b7b", "size": 648, "ext": "py", "lang": "Python", "max_stars_repo_path": "aydin/it/transforms/demo/demo_histogram.py", "max_stars_repo_name": "royerloic/aydin", "max_stars_repo_head_hexsha": "f9c61a24030891d008c318b250da5faec69fcd7d", "max_stars_repo_licenses": ["BSD-3-C... |
import pandas as pd
import xlrd
import decimal
import numpy as np
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
from sklearn.cluster import AgglomerativeClustering
from sklearn.cluster import DBSCAN
from sklearn.preprocessing import scale
from pyclustertend import hopkins
import random
f... | {"hexsha": "4a700c075e7b88b47f67334d7a5fa903c1a22038", "size": 9608, "ext": "py", "lang": "Python", "max_stars_repo_path": "1D_clustering.py", "max_stars_repo_name": "TheoEfthymiadis/Greek-Police-Crimes-2016-Analysis", "max_stars_repo_head_hexsha": "89240681cc242a136fc9b3128d19001d22ed5adc", "max_stars_repo_licenses": ... |
"""
Testing JSON serialization of parameters and the corresponding schemas.
"""
import json
import datetime
import param
from unittest import SkipTest
from . import API1TestCase
try:
from jsonschema import validate, ValidationError
except ImportError:
validate = None
try:
import numpy as np
ndarray =... | {"hexsha": "26c7eaa80d1ba2cd3f111175f6da7e4a8f37957e", "size": 8354, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/API1/testjsonserialization.py", "max_stars_repo_name": "tonyfast/param", "max_stars_repo_head_hexsha": "1568c261bd25434c7f6fc155db6aee3590642d31", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
using LatinHypercubeSampling
using Random
using StableRNGs
using Test
@testset "AudzeEglais" begin
LHC = [1 3; 3 1; 2 2]
n = size(LHC,1)
dist = zeros(Float64,Int(n*(n-1)*0.5))
@test_logs (:warn,"AudzeEglaisObjective!(dist,LHC) is deprecated and does not differ from AudzeEglaisObjective(LHC)") AudzeEg... | {"hexsha": "bad176411d7f100471daf6754bd6fb0159bddc56", "size": 4742, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "MrUrq/LatinHypercubeSampling", "max_stars_repo_head_hexsha": "bf3a316b0ffa1f980d4c9e8839aaaad8bb5e7d2f", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import torch
import torch.nn as nn
import pandas as pd
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import nn, optim
from torch.autograd import Variable
from sklearn.decomposition import PCA
from torch.utils.data import Dataset, DataLoader
import pandas as pd
import ... | {"hexsha": "2d7efc8cb5e2d81e08367c7553df72e8b2d39f23", "size": 4844, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/model_arch/table_architecture.py", "max_stars_repo_name": "tridungduong16/counterfactual_fairness_game_theoretic", "max_stars_repo_head_hexsha": "794d5224f9c656c06e5eb197ebbe1875f1856e7e", "ma... |
import pandas as pd
import numpy as np
import os
from flask import Flask, render_template, jsonify, request
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, inspect
##########################################... | {"hexsha": "b8e75765c969c212ec6b35026cc4461a2db180b1", "size": 4604, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "poojabajaj/Project15--Interactive-Visualization---Belly-Button-Biodiversity", "max_stars_repo_head_hexsha": "de3eeaf2d099d197ade9a9ca830f320bbe26ac50", "max_stars_... |
#Importing Necessary Libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.linear_model import ElasticNet
from pandas import Series, DataFrame
from sklearn.model_selection import train_test_split
#Importing the Training and Test Files
train = pd.read_csv('Train.csv')
test = pd.r... | {"hexsha": "13f276e4261b4d877c1caf097ef3b918bf8c4ba8", "size": 1274, "ext": "py", "lang": "Python", "max_stars_repo_path": "ElasticNet_Regression.py", "max_stars_repo_name": "vgaurav3011/Regression-Algorithms", "max_stars_repo_head_hexsha": "7cb3a96e652657fa25d96cfff65463019b7ebfd9", "max_stars_repo_licenses": ["MIT"],... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.