text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
module Prelude.Smashed where
open import Prelude.Equality
open import Prelude.Unit
open import Prelude.Empty
open import Prelude.Nat.Core
open import Prelude.Function
open import Prelude.Ord
record Smashed {a} (A : Set a) : Set a where
field
smashed : ∀ {x y : A} → x ≡ y
open Smashed {{...}} public
{-# DISPLA... | {"hexsha": "7ffee0a17595991e7cb460dd51fd4fa9bac918a7", "size": 742, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/Prelude/Smashed.agda", "max_stars_repo_name": "L-TChen/agda-prelude", "max_stars_repo_head_hexsha": "158d299b1b365e186f00d8ef5b8c6844235ee267", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
using PkgBenchmark
using HMMBase
# path = dirname(dirname(pathof(HMMBase)))
path = pwd()
println("Benchmarking $path...")
timestamp = Int64(time() * 1e9)
results = benchmarkpkg(path, resultfile = "benchmark_$timestamp.json")
export_markdown("benchmark_$timestamp.md", results)
| {"hexsha": "6c2a324c2edab73a72db2d7099891db961155780", "size": 279, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "benchmark/make.jl", "max_stars_repo_name": "SosUts/HMMBase.jl", "max_stars_repo_head_hexsha": "c39a8cc62673622881e0b43d905d7fa493690851", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 73, "... |
# Copyright (c) 2021, Xilinx, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of con... | {"hexsha": "4e4847216e4aa0c18da7e3ef36dd88561e50caf7", "size": 50350, "ext": "py", "lang": "Python", "max_stars_repo_path": "composable_pipeline/composable.py", "max_stars_repo_name": "mariodruiz/PYNQ_Composable_Pipeline", "max_stars_repo_head_hexsha": "32db3ad60e9b157077e32669ec49bee5419d4062", "max_stars_repo_license... |
import numpy as np
# import tensorflow as tf
import torch
from matplotlib import pyplot as plt
import os
import pandas as pd
import re
import sentence2vec
from sklearn.manifold import TSNE
class Get_Data():
def get_movie_message(self, path = './movies.dat'):
"""
Read Movie DataSets
"... | {"hexsha": "0ebcfeea358909feb775327f33e5bc7241412057", "size": 8219, "ext": "py", "lang": "Python", "max_stars_repo_path": "get_data.py", "max_stars_repo_name": "LinghaoChan/Movie-Scoring", "max_stars_repo_head_hexsha": "07210099dc45d6968f3e25b14a36d3d45c06f4dd", "max_stars_repo_licenses": ["BSD-4-Clause-UC"], "max_sta... |
[STATEMENT]
lemma nxt_run_distinct:
"distinct (run (nxt \<Sigma> \<Delta> q\<^sub>0) (init q\<^sub>0) w n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. distinct (run (nxt \<Sigma> \<Delta> q\<^sub>0) (init q\<^sub>0) w n)
[PROOF STEP]
by (cases n; simp del: remdups_fwd.simps; metis (no_types) remdups_fwd_distin... | {"llama_tokens": 144, "file": "LTL_to_DRA_Impl_Mojmir_Rabin_Impl", "length": 1} |
"""Tools to store information on the Variables and Dimensions in the Database"""
import netCDF4
import numpy as np
from ..utils.osutils import exists_and_isfile
#
from colt.generator import Generator
class _DBVariable(object):
"""Store info for Database and easy comparison"""
__slots__ = ('type', 'dimension... | {"hexsha": "26efdca44df04f68bc975125f6b8f10e70e8f2ae", "size": 8641, "ext": "py", "lang": "Python", "max_stars_repo_path": "pysurf/database/dbtools.py", "max_stars_repo_name": "MFSJMenger/pysurf", "max_stars_repo_head_hexsha": "99c6a94d4cb5046f16a0961b907061d989ffb6dc", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | {"hexsha": "5a8c5b2688c67a3ee1d72f8049932f7a6e637586", "size": 1193, "ext": "py", "lang": "Python", "max_stars_repo_path": "dlfs/activation_functions/linear.py", "max_stars_repo_name": "Pabloo22/Deep-Learning-from-Scratch", "max_stars_repo_head_hexsha": "9192ea9323c40502880d42c0fc3a3d7837de1f26", "max_stars_repo_licens... |
! { dg-do run }
program main
character(len=*), parameter :: f='(3L1)'
character(len=*), parameter :: g='(3I1)'
real, dimension(3,3) :: a
logical(kind=1), dimension(3,3) :: m1
logical(kind=2), dimension(3,3) :: m2
logical(kind=4), dimension(3,3) :: m4
logical(kind=8), dimension(3,3) :: m8
charact... | {"hexsha": "efc406d90bc5c1d048c91e85b8fa980404a0515d", "size": 2141, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/anyallcount_1.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_l... |
import numpy as np
import itertools
import pandas as pd
class PortfolioRebalance:
def __init__(self, sample, volatility_target=None):
self.sample = sample
self.cov = self.risk_model()
self.vol = np.sqrt(np.diag(self.cov))
self.mu = self.expected_returns()
self.weights = Non... | {"hexsha": "37d1a3ea22c9565612c97d1a266d1c96ccbc820a", "size": 4158, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/utils.py", "max_stars_repo_name": "fcoibanez/eigenportfolio", "max_stars_repo_head_hexsha": "6e0f6c0239448a191aecf9137d545abf12cb344e", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
From Hammer Require Import Hammer.
Global Set Automatic Coercions Import.
Set Implicit Arguments.
Require Import List.
From QuicksortComplexity Require Import list_utils.
From QuicksortComplexity Require Import util.
Record Monad: Type :=
{ mon:> Set -> Set
; bind: forall a b, mon a -> (a -> mon b) -> mon b
; ret: f... | {"author": "lukaszcz", "repo": "coqhammer-eval", "sha": "e7a30119c1470623125728006fd1299641192a60", "save_path": "github-repos/coq/lukaszcz-coqhammer-eval", "path": "github-repos/coq/lukaszcz-coqhammer-eval/coqhammer-eval-e7a30119c1470623125728006fd1299641192a60/quicksort-complexity/monads.v"} |
function h = mobile_text(varargin)
% MOBILE_TEXT('str1', 'str2', ...) places each string in a random position
% on the current axes. The strings can be dragged around with the mouse.
% Returns handles to the text objects, for setting colors, etc.
strs = varargin;
n = length(strs);
ax = axis;
% random placement
x = ra... | {"author": "andrewssobral", "repo": "lrslibrary", "sha": "06d457349cb5f1fc56a583cd61af9f1d5150e3a1", "save_path": "github-repos/MATLAB/andrewssobral-lrslibrary", "path": "github-repos/MATLAB/andrewssobral-lrslibrary/lrslibrary-06d457349cb5f1fc56a583cd61af9f1d5150e3a1/libs/+lightspeed/graphics/mobile_text.m"} |
#! /usr/bin/python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
# Last modified: 2018-06-16 20:46:29
import logging
import sys
import json
import pandas as pd
from flask import Flask, request, render_template, jsonify
from flask import url_for
from flaskext.mysql import MySQL
import urllib
import xml.etree.ElementTree as ... | {"hexsha": "8037385708bcb3c9e56b3d4d9571464ac65699f5", "size": 10702, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/app.py", "max_stars_repo_name": "splasky/flask_web_service", "max_stars_repo_head_hexsha": "355224a03b6ac6727335200a05c7afafa632d732", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_... |
module mt19937
! This module is the submodule of "random_number" module
use,intrinsic :: iso_fortran_env
implicit none
private
public:: set_seed, random_mt
integer(int32),parameter:: N = 624
integer(int32),parameter:: N1 = 625
integer(int32),parameter:: M = 397
integer(int32),paramet... | {"hexsha": "4fc1018c22761928b1d2a8fc0c2fe97507e3c954", "size": 3926, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/random_number.f90", "max_stars_repo_name": "ohtorilab/fortran_lib", "max_stars_repo_head_hexsha": "e3551a0730a91f79e8e09796f147f761b2df6fc1", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
module Progress
using Logging
using Atom: msg
const progs = Set()
"""
JunoProgressLogger(previous_logger<:AbstractLogger)
Logger that only handles messages with `progress` argument set and passes all
others throught to the previously defined logger.
If the `progress` argument is set then a corresponding progre... | {"hexsha": "8836fab7b47dc00d39b6dc1b3de8e2ca3fd85f9b", "size": 2577, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/progress.jl", "max_stars_repo_name": "SimonDanisch/Atom.jl", "max_stars_repo_head_hexsha": "55e105006dddf0dad8b75654daf0c2998e9609bc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
using Stopping
import Stopping: reinit!, update!
const Iterate = Union{Number, Vector, Nothing}
const FloatVoid = Union{Number, Nothing}
const MatrixType = Union{Number, AbstractArray, AbstractMatrix, Nothing}
"""
Type: MPCCAtX
Methods: update!, reinit!
MPCCAtX contains the information conce... | {"hexsha": "2a47dbd67a24668bc82c2d275879fdc2a41f791e", "size": 4927, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/MPCCState.jl", "max_stars_repo_name": "tmigot/MPCC.jl", "max_stars_repo_head_hexsha": "86a50b5c21c3579df166fdef158cb23e65cdbb9c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
#Definitions of coils
#Andre Torres 16.01.19
import numpy as np
from field import getPFFlux2
from filters import CSfilter
#define the active coils
H0=[[58.*1e-2,58.*1e-2],[-7*1e-2,7*1e-2],[-1.,1.],4]
V0=[[0.58,0.58,0.35,0.35],[-0.07,0.07,-0.07,0.07],[-1.,-1.,1.,1.],5]
P0=[[0.62,0.62],[-0.13,0.13],[-1.,-1.],14]
H1=[[... | {"hexsha": "57deb0666ddc4ee715a6b4a08197d905d57ce851", "size": 4888, "ext": "py", "lang": "Python", "max_stars_repo_path": "coilDefinitions.py", "max_stars_repo_name": "andregtorres/ISTTOK", "max_stars_repo_head_hexsha": "56c8c7d46ed3a473d0e5e26963197fa19e661f18", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
"""
Author: Ziyad Jappie
License: Apache 2.0
Redistribution Licensing:
- OpenCV: https://opencv.org/license/
- NumPy: https://www.numpy.org/license.html#
Module containing a Python implementation of the Farneback
algorithm to compute optical flow.
"""
import numpy as np
import cv2
class Farneback(object):
"""... | {"hexsha": "1cff7e572548317ea717c0ad7c7494e9d2c544aa", "size": 1643, "ext": "py", "lang": "Python", "max_stars_repo_path": "theama/optical_flow/farneback.py", "max_stars_repo_name": "DavidTorpey/theama", "max_stars_repo_head_hexsha": "809aed207a66a5e9b24afd78876b9b62796c6aba", "max_stars_repo_licenses": ["Apache-2.0"],... |
\documentclass[12pt]{article}
% packages
\usepackage{setspace}
\usepackage{array}
\usepackage[margin=0.75in]{geometry}
\usepackage{amsmath,bm}
\usepackage{amssymb}
\usepackage{bbold}
\usepackage{physics}
\usepackage{xcolor}
\usepackage{indentfirst}
\usepackage{enumerate}
\usepackage{mathtools}
\usepackage{fancyhdr}
\u... | {"hexsha": "5fed339c5b1ffb7ac9009b66cf6e76d4bad1cb63", "size": 1654, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Project_2_VQE_Molecules/Setup/S0_Setup.tex", "max_stars_repo_name": "hsadeghidw/CohortProject_2020", "max_stars_repo_head_hexsha": "035621a8feaf48879e3997e665b71dba1b38b1a9", "max_stars_repo_license... |
"""
See also: test_reindex.py:TestReindexSetIndex
"""
from datetime import (
datetime,
timedelta,
)
import numpy as np
import pytest
from pandas import (
Categorical,
DataFrame,
DatetimeIndex,
Index,
MultiIndex,
Series,
date_range,
period_range,
to_datetime,
)
import panda... | {"hexsha": "4c39cf99f18ffa9e2ce78c8c97f85e327e4cc587", "size": 25995, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandas/tests/frame/methods/test_set_index.py", "max_stars_repo_name": "luftwurzel/pandas", "max_stars_repo_head_hexsha": "8980af7ce9d98713b0f8792e38f0fe43088e8780", "max_stars_repo_licenses": ["B... |
import csv
import glob
import os
import sys
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import numpy as np
from os.path import dirname, abspath
import plot_results
def get_data_models(directory, model_names):
aggregated_results = []
os.chdir(directory)
for i in ... | {"hexsha": "1e3249430cde006c71dbe0e0b88a7194460562b9", "size": 4101, "ext": "py", "lang": "Python", "max_stars_repo_path": "result_analysis_scripts/time_distribution_grapher.py", "max_stars_repo_name": "javigm98/Mejorando-el-Aprendizaje-Automatico", "max_stars_repo_head_hexsha": "fefdbb5c3b3826230738b3e5fbd76f64e701d34... |
! written by jxzou at 20200512: generate PySCF format basis set (.py file) from Gaussian .fch(k) file
! updated by jxzou at 20200809: combined with util_wrapper.f90
! Note: this subroutine is actually a wrapper of two utilities 'fch2inp' and 'bas_gms2py',
! thus 'fch2inp' and 'bas_gms2py' must be compiled as wel... | {"hexsha": "29c0ccee63b5dd348c05ae20006d9d1c719863e8", "size": 1980, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/bas_fch2py.f90", "max_stars_repo_name": "1234zou/MOKIT", "max_stars_repo_head_hexsha": "47171b0c168212ef27281882085fbb23055c3ea3", "max_stars_repo_licenses": ["FSFAP"], "max_stars_count": 9,... |
from typing import Dict, List
import numpy as np
import numpy.typing as npt
class Column:
values: npt.ArrayLike
def __init__(self, values: List[int]):
self.values = values
# def __iadd__(self, other):
# self.values = np.append(self.values, other.values)
# return self.values
cla... | {"hexsha": "3f877fe5ea5030982d15a9fd291178da4bd8e854", "size": 1089, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/NormalizeSinisters/ValuesClasses.py", "max_stars_repo_name": "jbb494/Predictor-de-sinistres-PAE", "max_stars_repo_head_hexsha": "c623e49733e96415327af9e542827e153a7e147c", "max_stars_repo_... |
# From: https://github.com/hmallen/numpyencoder
#
# MIT License
#
# Copyright (c) 2018 Hunter Allen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without li... | {"hexsha": "433c277a0558108a253340697e3ea5ced095343c", "size": 2009, "ext": "py", "lang": "Python", "max_stars_repo_path": "emat/util/json_encoder.py", "max_stars_repo_name": "jinsanity07git/tmip-emat", "max_stars_repo_head_hexsha": "ff816cf50f141825078bb276d6da46d92c5028a9", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
##############################################################################
#
# Fallback methods, usually overridden for specific distributions
#
##############################################################################
binaryentropy(d::Distribution) = entropy(d) / log(2)
function cor(d::MultivariateDistribut... | {"hexsha": "7fd43835a2707a949690ed12c0c0435d17fb56ae", "size": 6250, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/fallbacks.jl", "max_stars_repo_name": "mewo2/Distributions.jl", "max_stars_repo_head_hexsha": "00dd06fb13632b9f0259f036bb861e47b7170a76", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
[STATEMENT]
lemma SubgroupD1 : "Subgroup H \<Longrightarrow> Group H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Subgroup H \<Longrightarrow> Group H
[PROOF STEP]
by fast | {"llama_tokens": 64, "file": "Rep_Fin_Groups_Rep_Fin_Groups", "length": 1} |
box::use(./s3)
#' @export
test = s3$test
| {"hexsha": "5038d68fc8da1f43054ccffc015b9f02eea2cbbb", "size": 42, "ext": "r", "lang": "R", "max_stars_repo_path": "tests/testthat/mod/s3_b.r", "max_stars_repo_name": "jimhester/box", "max_stars_repo_head_hexsha": "7b902a3acbd8b44b7ca2e46743f72213ea351d46", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 341, "m... |
#!/usr/bin/env python
__author__ = 'Florian Hase'
#========================================================================
import os, uuid
import numpy as np
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
from threading import Thread
from Utilities.file_logger import FileLogger
from Ut... | {"hexsha": "7ed1171285dbce8cad86decd1f7d5f0359195a4a", "size": 2092, "ext": "py", "lang": "Python", "max_stars_repo_path": "Analyzer/analyzer.py", "max_stars_repo_name": "Tabor-Research-Group/ChemOS", "max_stars_repo_head_hexsha": "50117f572e95e68dc4dccb624cedb28dbfc6e419", "max_stars_repo_licenses": ["Apache-2.0"], "m... |
import pandas as pd
import numpy as np
from itertools import chain
import json
from datetime import datetime
import os
import itertools
from datetime import timedelta
from dateutil.parser import isoparse
from microgridRLsimulator.history import Database
from microgridRLsimulator.simulate.gridstate import GridState
fro... | {"hexsha": "18d68ea75c2b1d965b33c5ea2810da4ec95239fb", "size": 18065, "ext": "py", "lang": "Python", "max_stars_repo_path": "microgridRLsimulator/simulate/simulatorMCTS.py", "max_stars_repo_name": "bcornelusse/microgridRLsimulator", "max_stars_repo_head_hexsha": "f2d7a0c77c47b9727d69c14d80fa521dea6a3861", "max_stars_re... |
import tensorflow as tf
import tensorflow_datasets as tfds
import tensorflow_addons as tfa
import matplotlib.pyplot as plt
import numpy as np
import time
import unittest
| {"hexsha": "636e4213b3ecab9a27c3452191766da75f98268c", "size": 171, "ext": "py", "lang": "Python", "max_stars_repo_path": "config.py", "max_stars_repo_name": "stevencheng1220/ImageSparseWarp", "max_stars_repo_head_hexsha": "a71d9e8747e1a2e11acebe0f3cf5def489f60787", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 21 09:56:58 2019
@author: calbert
"""
import numpy as np
import matplotlib.pyplot as plt
cores = np.array([1, 2, 4, 8, 16, 32, 64])
times = np.array([12371.45, 22974.33, 22654.08, 23083.88, 22474.06,
22319.14, 25479.76])
speedup... | {"hexsha": "6b66655be0395f6b0fa033346cdf178eafa69415", "size": 1170, "ext": "py", "lang": "Python", "max_stars_repo_path": "PLOT/plot_computing.py", "max_stars_repo_name": "itpplasma/SIMPLE", "max_stars_repo_head_hexsha": "6981791e0a7889647ac5c006325ac951811c2f36", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
import numpy as np
from matplotlib import pyplot as plt
import MC
def Pre_Eq(lat, L, beta=1):
mag = Mag(lat)
E = 0
log_mag2 = np.array([], dtype=np.float64)
log_E = np.array([], dtype=np.float64)
for i in range(L**2*150):
dmag, dE = Metropolis(lat, L, beta)
mag += dmag
E ... | {"hexsha": "a6edf2da909fb260ea4fd408e938f92e65ce2e14", "size": 1511, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/preeq.py", "max_stars_repo_name": "zhang-changwei/Phase-Transition-Through-Quenching", "max_stars_repo_head_hexsha": "ff47d3a0209c6121eb570b74003934358bc17482", "max_stars_repo_licenses": ["MI... |
import networkx as nx
from binaryninja import MediumLevelILOperation as op
from functools import reduce
from utils import *
def get_reliability_score(src, dst):
# TODO - support cases other than Phi functions that provide the full value
if dst.operation in {op.MLIL_CALL_SSA, op.MLIL_CALL_PARAM_SSA}:
r... | {"hexsha": "c6983e84090acfe0157f7bd80c5bcdb2883c0077", "size": 3895, "ext": "py", "lang": "Python", "max_stars_repo_path": "graphslice/insnslice.py", "max_stars_repo_name": "trailofbits/binjascripts", "max_stars_repo_head_hexsha": "d755816431cc84d35149b48fe6c3bc29ef2344da", "max_stars_repo_licenses": ["MIT"], "max_star... |
@testset "Basic tests" begin
optimizer = POI.ParametricOptimizer(GLPK.Optimizer())
MOI.set(optimizer, MOI.Silent(), true)
x = MOI.add_variables(optimizer, 2)
y, cy = MOI.add_constrained_variable(optimizer, POI.Parameter(0))
z = MOI.VariableIndex(4)
cz = MOI.ConstraintIndex{MOI.SingleVariable,P... | {"hexsha": "8a0aeec203ed6b8263e9b24fcfe562c6378f23f9", "size": 21493, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/basic_tests.jl", "max_stars_repo_name": "jd-lara/ParametricOptInterface.jl", "max_stars_repo_head_hexsha": "2ac81b0a46b7264e51081a61d22b801e7f95cbe2", "max_stars_repo_licenses": ["MIT"], "max... |
import datetime as dt
import pandas as pd
import numpy as np
from pathlib import Path
from datadict import DataDict
from .common import remove_temp_cols
# Define type aliases
DF = pd.DataFrame
DATA_EXPORT_FORMAT = '%Y-%m-%d %H:%M:%S'
VERSION = '1'
# noinspection PyTypeChecker
def export_df(df: DF, data_dir: str, df... | {"hexsha": "1b428d9e131109948718b3b3c697d7f6f8f5f151", "size": 1728, "ext": "py", "lang": "Python", "max_stars_repo_path": "fpldata/export.py", "max_stars_repo_name": "177arc/fpl-data", "max_stars_repo_head_hexsha": "cfa9d8a93a8878ca5be1ff4946c4d9f0f1643197", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "m... |
#include "CppUnitTest.h"
#include "UnitTestAux.h"
#include "../BVP/Utils/AuxUtils.h"
#include "..\BVP\Problems\TroeschProblem.h"
#include "..\BVP\FunctionApproximation\PointSimple.h"
#include "..\BVP\MultipleShooting\HybridMultipleShootingComponent.h"
#include <boost/multiprecision/cpp_dec_float.hpp>
#include "../BVP/U... | {"hexsha": "0d2b7df7436090f6393823ad997a4a38cd417843", "size": 3049, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Software/GeneralTest/MultipleShootingHybridTestUnit.cpp", "max_stars_repo_name": "imathsoft/MathSoftDevelopment", "max_stars_repo_head_hexsha": "4c449f6e378a942cfc39081739ba4c0aa2dce4de", "max_stars... |
import numpy as np
import cupy as cp
def fasta_to_matrix(file_name, num_reads):
# Allocate memory for the reads matrix
reads_matrix = np.empty((num_reads, 150), dtype=np.uint8)
i = 0
f = open(file_name, "rb")
for line in f:
if line[0] != 62:
reads_matrix[i] = np.frombuffer(line... | {"hexsha": "8c2307db87eb3ddbbe5c11d878f400a9b52c82d1", "size": 1400, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing/functional.py", "max_stars_repo_name": "jorgenwh/npstructures", "max_stars_repo_head_hexsha": "0eab421f1ddde159b2450e3e8b3cadbdaad00ba9", "max_stars_repo_licenses": ["MIT"], "max_sta... |
#!/usr/local/sci/bin/python
# PYTHON3
#
# Author: Kate Willett
# Created: 27 April 2021
# (adapted from David Parker's station_9pixels_landuse_ISTI.py)
# Last update: 27 April 2021
# Location: /home/h04/hadkw/HadISDH_Code/CLIMEXPLORER/PYTHON/
# GitHub: https://github.com/Kate-Willett/Climate_Explorer/tree/master/PYT... | {"hexsha": "6c2167d869c57cb4148c88ea25970b7747b2a46e", "size": 17059, "ext": "py", "lang": "Python", "max_stars_repo_path": "PYTHON/DetermineUrbanStations.py", "max_stars_repo_name": "Kate-Willett/Climate_Explorer", "max_stars_repo_head_hexsha": "d49e65a6caa9beb1a859e16d3827022442bad324", "max_stars_repo_licenses": ["C... |
! { dg-do run }
program reduction
implicit none
integer, parameter :: n = 100
integer :: i, h1, h2, s1, s2, a1, a2
h1 = 0
h2 = 0
do i = 1, n
h1 = h1 + 1
h2 = h2 + 2
end do
s1 = 0
s2 = 0
!$acc parallel loop reduction(+:s1, s2)
do i = 1, n
s1 = s1 + 1
s2 = s2 ... | {"hexsha": "5cf4681191b01ab5f1f451949f36638268660bcf", "size": 682, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "gcc-gcc-7_3_0-release/libgomp/testsuite/libgomp.oacc-fortran/reduction-8.f90", "max_stars_repo_name": "best08618/asylo", "max_stars_repo_head_hexsha": "5a520a9f5c461ede0f32acc284017b737a43898c", ... |
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\begin{document}
\chapter{Chapter 4: The Microcontroller}
<h2>``Hello World!'' is the Hard Part</h2>
I dont actually subscribe to this supposition. but thats ok.
\section{Identifying the Pins on the Microcontroller (P51)}
\includegraphics[scale=0... | {"hexsha": "f6abed6b82970e3317d40a25cb130a8b45161f21", "size": 9391, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "errata.tex", "max_stars_repo_name": "suspect-devices/errata_physical_computing", "max_stars_repo_head_hexsha": "2cc1d07c2b13df9433f332d96d451150dba3c047", "max_stars_repo_licenses": ["MIT"], "max_st... |
/*
* patWriteBiogemeData.cc
*
* Created on: May 4, 2012
* Author: jchen
*/
#include "patWriteBiogemeData.h"
#include <fstream>
#include <iomanip>
#include <vector>
#include "patDisplay.h"
#include "patLinkAndPathCost.h"
#include "patNBParameters.h"
#include "patRandomNumber.h"
#include "patArc.h"
#include <... | {"hexsha": "b0f0052da16dd76012db1d2f626f1f8fb04e1bb3", "size": 11457, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/RouteChoice/patWriteBiogemeData.cc", "max_stars_repo_name": "godosou/smaroute", "max_stars_repo_head_hexsha": "e2ccc9492dff54c8ef5c74d5309d2b06758ba342", "max_stars_repo_licenses": ["MIT"], "max... |
[STATEMENT]
lemma lemma2_6_5_a: assumes t: "trans r" and "ds r S \<subseteq> S" and "(M,N) \<in> mul_eq r"
shows "(M -s S, N -s S) \<in> mul_eq r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (M -s S, N -s S) \<in> mul_eq r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. (M -s S, N -s S) \<i... | {"llama_tokens": 2968, "file": "Decreasing-Diagrams_Decreasing_Diagrams", "length": 32} |
import numpy as np
from sklearn.metrics import f1_score, roc_auc_score, matthews_corrcoef, accuracy_score, confusion_matrix, precision_score, recall_score
def metrics(eval_pred):
predictions, labels = eval_pred
predictions = np.argmax(predictions, axis=1)
accuracy = accuracy_score(labels, predictions)
f1 = f1... | {"hexsha": "7f6534bfa4a6561b3712932a67c8cf13f64021e1", "size": 814, "ext": "py", "lang": "Python", "max_stars_repo_path": "backend/utils.py", "max_stars_repo_name": "bruceleung2/22", "max_stars_repo_head_hexsha": "e7107999e29f2f7e2cb7837ba5b4dba73bc3ccd0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": n... |
[STATEMENT]
lemma dvd_lcm_I1_nat [simp]: "k dvd m \<Longrightarrow> k dvd lcm m n"
for k m n :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. k dvd m \<Longrightarrow> k dvd lcm m n
[PROOF STEP]
by (fact dvd_lcmI1) | {"llama_tokens": 101, "file": null, "length": 1} |
function varargout = animation(varargin)
% ANIMATION M-file for animation.fig
% ANIMATION, by itself, creates a new ANIMATION or raises the existing
% singleton*.
%
% H = ANIMATION returns the handle to a new ANIMATION or the handle to
% the existing singleton*.
%
% ANIMATION('CALLBACK',hObject... | {"author": "OLPS", "repo": "OLPS", "sha": "9120783cd59a7966b0f78e2b5668030a4378b8af", "save_path": "github-repos/MATLAB/OLPS-OLPS", "path": "github-repos/MATLAB/OLPS-OLPS/OLPS-9120783cd59a7966b0f78e2b5668030a4378b8af/GUI/animation.m"} |
"""
Communicability.
"""
import networkx as nx
from networkx.utils import not_implemented_for
__all__ = ['communicability',
'communicability_exp',
]
@not_implemented_for('directed')
@not_implemented_for('multigraph')
def communicability(G):
r"""Returns communicability between all pairs of n... | {"hexsha": "e066e373549e60266f3d874dcf0973cf309c30d9", "size": 4540, "ext": "py", "lang": "Python", "max_stars_repo_path": "networkx/algorithms/communicability_alg.py", "max_stars_repo_name": "Mackyboy12/networkx", "max_stars_repo_head_hexsha": "2afe713bce0a57dbdd8e51d3b83ae28f73c9b677", "max_stars_repo_licenses": ["BS... |
#######################################################################
# Simulation Tensor (Movie) Viewer
# AP Ruymgaart 5/25/2018
#######################################################################
#
#######################################################################
import time, sys, os
import random
import ... | {"hexsha": "1d9cb059e24ed1a468fa8c9b6100035bcf278560", "size": 8479, "ext": "py", "lang": "Python", "max_stars_repo_path": "acoustic_simulation/viewer.py", "max_stars_repo_name": "aruymgaart/AMATH", "max_stars_repo_head_hexsha": "87579a076ec74094d0420c2a1f477022aaefb6bc", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# coding=utf-8
# Copyright 2021 The init2winit Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | {"hexsha": "fceee30acd7cbcb3cf81490775faa94a30192175", "size": 11637, "ext": "py", "lang": "Python", "max_stars_repo_path": "init2winit/model_lib/test_models.py", "max_stars_repo_name": "isabella232/init2winit", "max_stars_repo_head_hexsha": "c009729c2ecc4fdbda555b541b5fb5c04d4932ca", "max_stars_repo_licenses": ["Apach... |
from math import sqrt
import math
import numpy as np
import pandas as pd
import streamlit as st
from datetime import date
from statsmodels.tsa.arima.model import ARIMA
from sklearn.metrics import mean_squared_error, mean_absolute_error
from plotly import graph_objs as go
import matplotlib.pyplot as plt
import seaborn a... | {"hexsha": "e0deec643aa668e858b87da0c0a86d8e0d521c18", "size": 6462, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/app.py", "max_stars_repo_name": "pjulma/A62_TS", "max_stars_repo_head_hexsha": "a1d31a901486befb938dca09f37a7dc0f8b1c75c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta... |
from abc import abstractmethod, ABC
import networkx as nx
import random
import matplotlib.pyplot as plt
def nand(arg1: bool, arg2: bool):
"""
Performs a nand (not and) operation on two booleans
:param arg1: boolean 1
:param arg2: boolean 2
:return: not (arg1 and arg2)
"""
return not (arg1... | {"hexsha": "43e0dd55d169bafe65198fb026e21055641f7a32", "size": 13300, "ext": "py", "lang": "Python", "max_stars_repo_path": "logic_gates/gates.py", "max_stars_repo_name": "ZBoroda/logic_gate_modeling", "max_stars_repo_head_hexsha": "8d88191c7d0ce4f1a5f3fdc6272d7874563a7458", "max_stars_repo_licenses": ["MIT"], "max_sta... |
# coding=UTF-8
# ex:ts=4:sw=4:et=on
# Copyright (c) 2013, Mathijs Dumon
# All rights reserved.
# Complete license can be found in the LICENSE file.
from itertools import product
from copy import deepcopy
from contextlib import contextmanager
import numpy as np
from mvc.models.properties import StringProperty, Label... | {"hexsha": "10f65bd5bef75f68aa907646b2eed62e1026e1f7", "size": 11087, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyxrd/probabilities/models/base_models.py", "max_stars_repo_name": "PyXRD/pyxrd", "max_stars_repo_head_hexsha": "26bacdf64f3153fa74b8caa62e219b76d91a55c1", "max_stars_repo_licenses": ["BSD-2-Clau... |
### Input widgets
"""
init_wobsval([T], observable, value; default=nothing) -> observable, value
Return a suitable initial state for `observable` and `value` for a
widget. Any but one of these argument can be `nothing`. A new `observable`
will be created if the input `observable` is `nothing`. Passing in a
pre-ex... | {"hexsha": "14691690b0b17011c90caf56b8b98bb050b41123", "size": 35782, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/widgets.jl", "max_stars_repo_name": "BioTurboNick/GtkObservables.jl", "max_stars_repo_head_hexsha": "8639e5e75200f5797e275beccba56925e4f4ac3c", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
[STATEMENT]
lemma bind_advantage:
shows "abstract_com.bind_advantage \<A> \<le> rel_advantage (adversary \<A>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. abstract_com.bind_advantage \<A> \<le> rel_advantage (adversary \<A>)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. abstract_com.bin... | {"llama_tokens": 5162, "file": "Sigma_Commit_Crypto_Sigma_Protocols", "length": 16} |
using Plots
x = -π:0.01:π
ys=hcat(sin.(x), cos.(x),tan.(x),sinh.(x))
plot(x,ys,layout=(4,1))
| {"hexsha": "4b9cc1a7d42fc4c6047e7769acf92804cf4b9309", "size": 94, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "plotExer/subplotsexer.jl", "max_stars_repo_name": "terasakisatoshi/juliaExer", "max_stars_repo_head_hexsha": "e3c2195f39de858915a3dcd47684eccbb7ecb552", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Miscellaneous utility functions
"""
import numpy as np
import os
from distutils.version import LooseVersion
from nipype.interfaces.traits import _Undefined
def isdefined(object):
return not isinstan... | {"hexsha": "22efc918fcd9d35d69327451a6d4a55321cf4911", "size": 3233, "ext": "py", "lang": "Python", "max_stars_repo_path": "nipype/utils/misc.py", "max_stars_repo_name": "satra/NiPypeold", "max_stars_repo_head_hexsha": "23f3ce25a8bace32f29e912a3903fdc2485c68d3", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c... |
[STATEMENT]
lemma (in prob_space) prob_space_completion: "prob_space (completion M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. prob_space (completion M)
[PROOF STEP]
by (rule prob_spaceI) (simp add: emeasure_space_1) | {"llama_tokens": 89, "file": null, "length": 1} |
[STATEMENT]
lemma tauPres:
fixes P :: pi
and Q :: pi
assumes "P \<sim>\<^sup>s Q"
shows "\<tau>.(P) \<sim>\<^sup>s \<tau>.(Q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<tau>.P \<sim>\<^sup>s \<tau>.Q
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
P \<sim>\<^sup>s Q
goal (1 sub... | {"llama_tokens": 200, "file": "Pi_Calculus_Strong_Early_Bisim_Subst_Pres", "length": 2} |
# Copyright 2020, Jean-Benoist Leger <jb@leger.tf>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge... | {"hexsha": "1c532fe43bad304a1028bfc3e5a69bd27b47d406", "size": 11712, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignator/_cli.py", "max_stars_repo_name": "jb-leger/assignator", "max_stars_repo_head_hexsha": "6047e739b0a65be8aa0f8f685b1b20f5a0622f81", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
(* Title: HOL/Parity.thy
Author: Jeremy Avigad
Author: Jacques D. Fleuriot
*)
section \<open>Parity in rings and semirings\<close>
theory Parity
imports Euclidean_Division
begin
subsection \<open>Ring structures with parity and \<open>even\<close>/\<open>odd\<close> predicates\<close>
class ... | {"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/Parity.thy"} |
"""Differentiation example
Demonstrates some differentiation operations.
"""
import re
from sympy import Symbol, pprint
import math
from Libs import symbolictoolbox as symbbox
from Libs import geometriccalc as gc
from Element_Initialising import integrate_function_with_constant
# TODO Find out how to do a properly e... | {"hexsha": "662ecb1f3f8270aa7882271b91c95e1b9e72e734", "size": 4663, "ext": "py", "lang": "Python", "max_stars_repo_path": "System_of_Beams/symbolicTests/start_symbolic.py", "max_stars_repo_name": "ChairOfStructuralMechanicsTUM/Mechanics_Apps", "max_stars_repo_head_hexsha": "b064a42d4df3fa9bde62a5cff9cb27ca61b0127c", "... |
import sys
import collections
import numpy as np
import pandas as pd
from sklearn import tree
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
import matplotlib.pyplot as plt
continuous_columns_global = [0,4,11,12,13,14,15,16,17... | {"hexsha": "d13d4b47a096a4942591bbc84c702b5bad8b8929", "size": 26263, "ext": "py", "lang": "Python", "max_stars_repo_path": "Assignment-3/dec_tree.py", "max_stars_repo_name": "abhiaj/COL774-Machine-Learning", "max_stars_repo_head_hexsha": "0047e8d967a597718190a9299d8e59a920a3c3b1", "max_stars_repo_licenses": ["MIT"], "... |
theory Proof_1_500
imports Proofs1
begin
abbreviation s where " s s0 PdOut'value paid'value opened'value \<equiv>
(toEnv
(setPstate
(setVarBool (setVarBool (setVarBool s0 PdOut' PdOut'value) paid' paid'value) opened' opened'value)
Init'init' Controller'isOpened'))"
theorem proof_1_500: "VC500 inv1 env ... | {"author": "ivchernenko", "repo": "post_vcgenerator", "sha": "fadfff131086870a027d6bd1c78b8d5a3baf183b", "save_path": "github-repos/isabelle/ivchernenko-post_vcgenerator", "path": "github-repos/isabelle/ivchernenko-post_vcgenerator/post_vcgenerator-fadfff131086870a027d6bd1c78b8d5a3baf183b/case-studies/turnstile/Proof_1... |
from __future__ import division
import re
from collections import Counter, defaultdict, deque
import itertools
class AlignLabels:
correct = 'C'
substitution = 'S'
insertion = 'I'
deletion = 'D'
validOptions = set([correct, substitution, insertion, deletion])
class ExpandedAlignment:
'''Leven... | {"hexsha": "e0ef151975ec9b6b3dbe35cff3454ba282031f23", "size": 21344, "ext": "py", "lang": "Python", "max_stars_repo_path": "power/levenshtein.py", "max_stars_repo_name": "NickRuiz/power-asr", "max_stars_repo_head_hexsha": "bbb42f1c20a2a78303c427b0f0361fbd7499e428", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
function [stat, cfg] = statistics_wrapper(cfg, varargin)
% STATISTICS_WRAPPER performs the selection of the biological data for
% timelock, frequency or source data and sets up the design vector or
% matrix.
%
% The specific configuration options for selecting timelock, frequency
% of source data are described in FT_T... | {"author": "spm", "repo": "spm12", "sha": "3085dac00ac804adb190a7e82c6ef11866c8af02", "save_path": "github-repos/MATLAB/spm-spm12", "path": "github-repos/MATLAB/spm-spm12/spm12-3085dac00ac804adb190a7e82c6ef11866c8af02/external/fieldtrip/private/statistics_wrapper.m"} |
using Redis
import DataStructures: OrderedSet
if VERSION >= v"0.5.0-dev+7720"
using Base.Test
else
using BaseTestNext
const Test = BaseTestNext
end
include(joinpath(dirname(@__FILE__),"client_tests.jl"))
include(joinpath(dirname(@__FILE__),"redis_tests.jl"))
| {"hexsha": "21fdce78d8d8e2a1e9a5ada2261488a1dcf49c90", "size": 273, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "JuliaPackageMirrors/Redis.jl", "max_stars_repo_head_hexsha": "77a7537b420ade95c9d7f98a94eab625d304f88b", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
[STATEMENT]
lemma lcs_same [simp]: "lcs s s = s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. lcs s s = s
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. lcs s s = s
[PROOF STEP]
have "lcs s s adds s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. lcs s s adds s
[PROOF STEP]
by (rule lcs_... | {"llama_tokens": 521, "file": "Polynomials_Power_Products", "length": 10} |
"""
preferential_attachment!(g, n, k)
Add `n` vertices to graph `g` and link them existing vertices by preferential attachment.
`k` can be
* a positive integer, in which case up to `k` links are created
* a discrete distribution, in which case the number of links to create is sampled from that distribution (trun... | {"hexsha": "bfe68b1c5ff8b94a2bec6186a9dc04d416dab75b", "size": 1805, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/modifiers/preferential_attachment.jl", "max_stars_repo_name": "csimal/NetworkModels.jl", "max_stars_repo_head_hexsha": "0358c127c79cf7a9bef5cef36499d9d6f427f796", "max_stars_repo_licenses": ["M... |
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 24 11:54:30 2020
@author: Ajit Johnson Nirmal
DNA correlation over t-cycif cycles plot to assess tissue loss
"""
# Import Packages
import sys
import numpy as np
import tifffile as tiff
import matplotlib.pyplot as plt
import pandas as pd
import multiprocessing as mp
# Fu... | {"hexsha": "30c2453b1ac598ecc4545c7ddad1884b8b013893", "size": 3400, "ext": "py", "lang": "Python", "max_stars_repo_path": "archive/plots/dna_corr.py", "max_stars_repo_name": "ajitjohnson/mipy", "max_stars_repo_head_hexsha": "69a904390558036cca5c1948ecc9db947f0fd5d5", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
[STATEMENT]
lemma alg_not_empty:
"alg B1 B2 s1 s2 \<Longrightarrow> B1 \<noteq> {} \<and> B2 \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. alg B1 B2 s1 s2 \<Longrightarrow> B1 \<noteq> {} \<and> B2 \<noteq> {}
[PROOF STEP]
apply (rule conjI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
1. alg B1 B... | {"llama_tokens": 4056, "file": "BNF_Operations_LFP", "length": 29} |
\documentclass[aspectratio=169]{beamer}
\usetheme{metropolis} % Use metropolis theme
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{eso-pic}
\usepackage{graphics}
\usepackage{tikz}
\usepackage[export]{adjustbox}
\usepackage{multicol}
\usepackage{listings}
\usepackage{helvet}
\usepackage{bookta... | {"hexsha": "056bfdf26cbacf189051cc2d4e202efd9ceb8af6", "size": 8018, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Material/Hands-on/HandsOn-Georeferencing/Presentation/HandsOn-georeferencing.tex", "max_stars_repo_name": "worldbank/DIME-MSIE-Workshop", "max_stars_repo_head_hexsha": "a0c37f6dc1bb04a8bf3f66e3959c0... |
import unittest
import os
import os.path
import shutil
import numpy as np
import PyWavTool
class TestPyWavToolInput(unittest.TestCase):
def test_envelope_matching(self):
wavtool=PyWavTool.WavTool(os.path.join("test_output", "test.wav"))
wavtool.inputCheck(os.path.join("testdata", "440.wav"))
... | {"hexsha": "a87e4cddec286b1c8ff761282a3b725b7af8840b", "size": 6478, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyWavTool/tests/test_pywavtool.py", "max_stars_repo_name": "delta-kimigatame/PyWavTool", "max_stars_repo_head_hexsha": "89090880da8ba5205afcd3b60c906a5bde458e36", "max_stars_repo_licenses": ["MIT"... |
! { dg-do compile }
! { dg-options "-Wall -std=f95" }
! There should only two warnings be printed.
! PR fortran/30968
print *, "Foo bar&
&Bar foo"
print *, "Foo bar&
Bar foo" ! { dg-warning "Missing '&' in continued character constant" }
print *, "Foo bar"&
&, "Bar foo"
print *, "Foo bar"&
... | {"hexsha": "02602e86a3657e2213c837a724a45f9929adc9c0", "size": 519, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/continuation_7.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_l... |
# Example from Soare et al.
using JLD2;
using Distributed;
using Printf;
using IterTools;
using Distributions
@everywhere include("runit_bis.jl");
@everywhere include("../thresholds.jl");
include("../experiment_helpers.jl");
# setup
dist = Gaussian();
dim = 2
μ = zeros(dim);
µ[1] = 2.0;
# μ = [.9, .7, .5];
arms =... | {"hexsha": "4ee324446d2d20987153052e0fd56f3771bed7f2", "size": 1340, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "linear/experiment_bai1.jl", "max_stars_repo_name": "xuedong/LinBAI.jl", "max_stars_repo_head_hexsha": "47da3f6f3adb2cd077ad8696fa72b70de5b7a31b", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
#!/usr/bin/env python
# the purpose of this script is to test for clonal hematopoiesis by checking for differences in the age and allele balance distibutions for LoF and synonymous variants
from gnomad_hail import *
from gnomad_hail.resources.sample_qc import *
from scipy import stats
import numpy as np
import argpar... | {"hexsha": "b95d249d02b461f3e99533b7bb60bf2d3ce2213f", "size": 12043, "ext": "py", "lang": "Python", "max_stars_repo_path": "constraint/chip_analysis.py", "max_stars_repo_name": "macarthur-lab/gnomad_lof", "max_stars_repo_head_hexsha": "49ebacbcb42d0bd14d8601761ce532433682e33f", "max_stars_repo_licenses": ["MIT"], "max... |
#ifndef TELEBOTXX_SEND_MESSAGE_REQUEST_HPP
#define TELEBOTXX_SEND_MESSAGE_REQUEST_HPP
#include <telebotxx/RequestOptions.hpp>
#include <telebotxx/Message.hpp>
#include <boost/optional.hpp>
#include <string>
#include <memory>
namespace telebotxx
{
class SendMessageRequest
{
public:
SendMessageRequest(const std:... | {"hexsha": "7ffb86148e05324bed112f5c45d3f6f4276f0089", "size": 1025, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/telebotxx/SendMessageRequest.hpp", "max_stars_repo_name": "JackKek/telebotxx", "max_stars_repo_head_hexsha": "2fbcdebb9e318af5e3143151ba3879ea6a8e25b2", "max_stars_repo_licenses": ["MIT"], "... |
# Title : discretization.py
# Author : Henry Lin <hlin117@gmail.com>
# License : BSD 3 clause
#==============================================================================
from __future__ import division
from sklearn.base import BaseEstimator
from sklearn.base import TransformerMixin
from sk... | {"hexsha": "f04251f1778d7d01062c6ff97f2899566a65e601", "size": 8310, "ext": "py", "lang": "Python", "max_stars_repo_path": "mdlp/discretization32.py", "max_stars_repo_name": "xcctc/mdlp-discretization", "max_stars_repo_head_hexsha": "935d174ccfef7fd06004ed82b04b2efaa974b169", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
Add LoadPath "metatheory".
Require Import Coq.Arith.Wf_nat.
Require Import Coq.Logic.FunctionalExtensionality.
Require Import Coq.Program.Equality.
Require Export Metatheory.
Require Export LibLNgen.
Require Export Unbound.
(** NOTE: Auxiliary theorems are hidden in generated documentation.
In general, there is ... | {"author": "spire", "repo": "replib", "sha": "f296898c5a7c89787935095e116890725d0d16f3", "save_path": "github-repos/coq/spire-replib", "path": "github-repos/coq/spire-replib/replib-f296898c5a7c89787935095e116890725d0d16f3/meta/Unbound_thy.v"} |
\section{Methods for pattern selection}
\subsection{Based on Conditional Mutual Information}
When studying methylation we are faced with two main questions:
\begin{enumerate}
\item Which genes exhibit an L-shape, and
\item what is the optimal threshold for binarizing
methylation data for each L-shape gene.
\... | {"hexsha": "30b50411b7654d0b2058e4e18ed23dccebe16ef4", "size": 3068, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Treballs_nostres/2019-07-UseR-A Shiny_App_for_SGRM/2019-07-UseR-Poster/sectionsUseR/methods.tex", "max_stars_repo_name": "bertamiro/Selecting_GRM", "max_stars_repo_head_hexsha": "f7d91df489cb5bd6b6f... |
import numpy as np
import pytest
import source.q8 as q8
@pytest.fixture()
def in_img():
in_img = np.zeros((24, 24, 3), np.uint8)
in_img[0:4:2, 0:4:2, ::] = 60
in_img[4:8:2, 4:8:2, ::] = 20
in_img[16:18:2, 16:18:2, 2] = 55
in_img[18:24:2, 18:24:2, 2] = 150
return in_img
@pytest.fixture()
def... | {"hexsha": "bf7d970f05d68b8b6bd06b22dfe7a4f01c6ac310", "size": 578, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_q8.py", "max_stars_repo_name": "rpianna/ImageProcessing100", "max_stars_repo_head_hexsha": "47299941edc0f6f31a31e6d943b0784f249f076b", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
# -*- coding: utf-8 -*-
import numpy as np
_rng = np.random
_dtype = 'float32'
def get_rng():
"""Get the package-level random number generator.
Returns
-------
:class:`numpy.random.RandomState` instance
The :class:`numpy.random.RandomState` instance passed to the most
... | {"hexsha": "cacb6e0b268aea16e42be275d9da3dd2323479af", "size": 1213, "ext": "py", "lang": "Python", "max_stars_repo_path": "npdl/utils/random.py", "max_stars_repo_name": "philipxyc/NumpyDL", "max_stars_repo_head_hexsha": "170935a09b87bbf436c9f9728f28a0c33d8cb3f3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
#include "murk/crypto/block.hpp"
#include <boost/asio/thread_pool.hpp>
#include <boost/asio/post.hpp>
namespace murk::crypto {
data ecb_crack_prepend_oracle(threaded_flow_t<data_const_ref, data> oracle, size_t block_size, uint8_t spam_byte, log_params log) {
// Get the ctext
boost::asio::thread_pool pool;
... | {"hexsha": "30e6b011e92d657828e00de5eae9a92b6072910c", "size": 11557, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/crypto/analysis/block.cpp", "max_stars_repo_name": "Cyclic3/murk", "max_stars_repo_head_hexsha": "fd2f71a4b258be71ef828f1223ddb76cc4ec8254", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
module TestSetup
ENV["MPLBACKEND"] = "Agg"
using Spikes
include("rate_test.jl")
end
| {"hexsha": "ca78892ac6353a342d94cec9989f6e251fd6b6cc", "size": 89, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "paulmthompson/Spikes.jl", "max_stars_repo_head_hexsha": "43de3dfc6ec1fc9a1fcf93231590e8d98a85db4e", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_... |
import numpy as np
input = open("day_1_input.txt", "r")
input_list = np.fromstring(input.read(), dtype="int", sep="\n")
n_plus_one = np.roll(input_list, 1)
difference = (input_list-n_plus_one)[1:]
count = np.sum(difference >= 0)
print(count)
| {"hexsha": "fbbbb272189d330c4b7b96b31bb8939e3d6809cc", "size": 242, "ext": "py", "lang": "Python", "max_stars_repo_path": "Day1p1.py", "max_stars_repo_name": "maxreader/AoC_2021", "max_stars_repo_head_hexsha": "e7edaddff7f25eff11829934632be2b5acd5c6b3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_... |
from models import *
from utils.utils import *
import numpy as np
from copy import deepcopy
from test import test
from terminaltables import AsciiTable
import time
from utils.prune_utils import *
import argparse
from utils.compute_flops import print_model_param_nums, print_model_param_flops
def write_info... | {"hexsha": "ed4874f05d06a6034de81c9f7207e04f3c5c7c4d", "size": 10058, "ext": "py", "lang": "Python", "max_stars_repo_path": "slim_prune.py", "max_stars_repo_name": "CheungBH/yolov3-channel-and-layer-pruning", "max_stars_repo_head_hexsha": "457f81386cbc54ace0ad677581e383c516305ba9", "max_stars_repo_licenses": ["Apache-2... |
!============================================================
!Procedure Collection by Shriraj Hegde
!-
!References:
!https://ww2.odu.edu/~agodunov/computing/programs/book2/Ch06/Inverse.f90
!https://stackoverflow.com/questions/13293964/module-calling-an-external-procedure-with-implicit-interface
!=====================... | {"hexsha": "92c38662cc6146aca89e1c66fa925267a3f4020a", "size": 6402, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Modules/linearAlgebra.f90", "max_stars_repo_name": "brianconcannon2/fortran-90-snippet-collection", "max_stars_repo_head_hexsha": "70301ff37a086399c81eb38d9baf0fdc99224854", "max_stars_repo_lice... |
# Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | {"hexsha": "a380aeb18db6870de8d8558ce1b9de480a718c5a", "size": 6471, "ext": "py", "lang": "Python", "max_stars_repo_path": "mars/dataframe/arithmetic/dot.py", "max_stars_repo_name": "ueshin/mars", "max_stars_repo_head_hexsha": "0b542974243be4e0ff239eaf49ab0fb2935f3361", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
using Base64
struct Viewer
fn::String
end
"""
visualize gif result at Plots pane
See https://discourse.julialang.org/t/base-show-and-plotpane/17835/3
"""
function Base.show(io::IO, b::Viewer)
mime = "image/png"
suffix = ";base64,"
str = stringmime(mime, read(b.fn))
str = string("<img src=\"data:", m... | {"hexsha": "15d98d11782ac58ed8c56b8e19c2c673e426bd54", "size": 393, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "luxorExer/slackemoji/viewer.jl", "max_stars_repo_name": "terasakisatoshi/juliaExer", "max_stars_repo_head_hexsha": "e3c2195f39de858915a3dcd47684eccbb7ecb552", "max_stars_repo_licenses": ["MIT"], "ma... |
#!/usr/bin/env RScript
library(parallel)
library(iterators)
library(foreach)
library(doParallel)
library(proto)
library(argparse)
parser <- ArgumentParser()
parser$add_argument('input', help = 'input csv file')
parser$add_argument('gameplayInput', help = 'input gameplay video')
parser$add_argument('output', help = 'ou... | {"hexsha": "d088405270fda77adfbd2bf0c487a1fbba302a04", "size": 2977, "ext": "r", "lang": "R", "max_stars_repo_path": "bin/gsr-video.r", "max_stars_repo_name": "returnString/node-gsr", "max_stars_repo_head_hexsha": "45306d96558fcd3fa80c1b99092a67c8b55eb8a8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max... |
import json
import os
from collections import OrderedDict
from functools import partial
import numpy as np
from sklearn.metrics import cohen_kappa_score, f1_score
from tabulate import tabulate
def compute_soft_agreement(hypnogram, hypnograms_consensus):
epochs = range(len(hypnogram))
probabilistic_consensus ... | {"hexsha": "49e2f0ad23047136c89164bb9adbb884e86b8c7d", "size": 14576, "ext": "py", "lang": "Python", "max_stars_repo_path": "plots/plot_learning_curve.py", "max_stars_repo_name": "Dreem-Organization/dreem-learning-evaluation", "max_stars_repo_head_hexsha": "1e4c142d84634b60898845243b01b81d7eb4acec", "max_stars_repo_lic... |
import os,shutil,sys
import numpy as np
from mpi4py import MPI
from pypospack.pyposmat import PyposmatMonteCarloSampler
from pypospack.pyposmat import PyposmatConfigurationFile
class PyposmatIterativeSampler(object):
def __init__(self,
configuration_filename):
self.RANK_DIR_FORMAT = 'rank_{}'
... | {"hexsha": "80fceef6f612f8efe69885f48cd3d9ef529992df", "size": 5593, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/pyposmat/engines/PyposmatIterativeSampler/test__sw_Si/mc_sampler_iterate.py", "max_stars_repo_name": "eragasa/pypospack", "max_stars_repo_head_hexsha": "21cdecaf3b05c87acc532d992be2c04d85bfb... |
using SymbolicUtils.Rewriters
_iszero(x) = x isa Number && iszero(x)
_isone(x) = x isa Number && isone(x)
_isinteger(x) = (x isa Number && isinteger(x)) || (x isa Symbolic && symtype(x) <: Integer)
_isreal(x) = (x isa Number && isreal(x)) || (x isa Symbolic && symtype(x) <: Real)
begin
PLUS_RULES = [
@rul... | {"hexsha": "bac7de26fcee37a028af53e487c664e40d9eb6e7", "size": 7277, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/simplify_rules.jl", "max_stars_repo_name": "albertomercurio/SecondQuantization.jl", "max_stars_repo_head_hexsha": "79446ef69c783fe8ae949caf62a58cf7e8202e22", "max_stars_repo_licenses": ["MIT"],... |
import json
import cv2
import numpy as np
import tensorflow as tf
import keras
from keras.models import Sequential
from keras.layers import Conv2D
from keras.layers import MaxPooling2D
from keras.layers import Flatten
from keras.layers import Dense
from keras.layers.normalization import BatchNormalization
from keras.la... | {"hexsha": "d88987ade76273b80fad709fb67ebb75f016e630", "size": 3334, "ext": "py", "lang": "Python", "max_stars_repo_path": "train-classifier.py", "max_stars_repo_name": "vinodalase/Licence_plate_detection_tensorflow", "max_stars_repo_head_hexsha": "8409358e2c2236c1b827c22cf1f3a5eb91dc893d", "max_stars_repo_licenses": [... |
import cv2 as cv
import numpy as np
def HomographyCorrection(im1, im2):
MAX_FEATURES = 500
GOOD_MATCH_PERCENT = 0.10
# Convert images to grayscale
im1Gray = cv.cvtColor(im1, cv.COLOR_BGR2GRAY)
im2Gray = cv.cvtColor(im2, cv.COLOR_BGR2GRAY)
# Detect ORB features and compute descriptors.
or... | {"hexsha": "5d1d9b7c532b26ee068480c6247cdec70b31f49a", "size": 1584, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/processing/homography.py", "max_stars_repo_name": "Sargastico/insp3ct0r", "max_stars_repo_head_hexsha": "3363fbcf4058054b1437620ee1deb640d272d0bf", "max_stars_repo_licenses": ["MIT"], "max_st... |
/*
Copyright (C) 2015-present CompatibL
Performance test results and finance-specific examples are available at:
http://www.tapescript.org
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://w... | {"hexsha": "8a0637a554c17e67fa08ec05e6a4aa08a4917192", "size": 9693, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "tapescript/cpp/cl/tape/examples/impl/performance_utils.hpp", "max_stars_repo_name": "fduffy/QuantLibAdjoint", "max_stars_repo_head_hexsha": "d9d355db4f46824bb5e607e28381943aef994ed4", "max_stars_rep... |
@testset "Table" begin
v1 = [1,2]
v2 = [2.0, 4.0]
@test @inferred(Table(l"a" => v1, l"b" => v2)) isa Table{(:a, :b), Tuple{Vector{Int}, Vector{Float64}}}
table = Table(l"a" => v1, l"b" => v2)
@test @inferred(table[1]) === Row(l"a" => 1, l"b" => 2.0)
@test @inferred(table[2]) === Row(l"a" => 2, ... | {"hexsha": "e9ec88888508e42a612c99706f08910a8e60152e", "size": 462, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Table.jl", "max_stars_repo_name": "andyferris/MVTs.jl", "max_stars_repo_head_hexsha": "d3d92e054d7a917300d4679916a4718b288511d2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_... |
# -*-coding:utf-8-*-
import numpy as np
from io import BytesIO
import tensorflow as tf
class TFLogger(object):
def __init__(self, log_dir=None):
"""Create a summary writer logging to log_dir."""
self.writer = tf.compat.v1.summary.FileWriter(log_dir)
def scalar_summary(self, tag, value, step):
... | {"hexsha": "6ec65bd000a3b6f8dd6bdab0fb781e1d0ad73831", "size": 3073, "ext": "py", "lang": "Python", "max_stars_repo_path": "TFLogger/logger.py", "max_stars_repo_name": "Rand2AI/GRNN", "max_stars_repo_head_hexsha": "1117c4129dc47048586d9ca8ca40408bcdfeca33", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 15, "ma... |
import numpy as np
from numba import njit, guvectorize, float64, float32, void
from ._utils import _invertmatrix
@njit(cache = True)
def _pdf(vectors, cov):
inv_cov = _invertmatrix(cov).astype(vectors.dtype)
constant = 1/(4* np.pi * np.sqrt(np.linalg.det(cov)))
size = vectors.size
n_samples =... | {"hexsha": "88b0180676c3f4bdcddc74da0b597ab37934775e", "size": 4629, "ext": "py", "lang": "Python", "max_stars_repo_path": "spherical_stats/_acg.py", "max_stars_repo_name": "dschmitz89/spherical_stats", "max_stars_repo_head_hexsha": "2d7423d0db94649048d82c94a2a194cb689a75da", "max_stars_repo_licenses": ["MIT"], "max_st... |
#!/usr/bin/env python
"""
A version of DMD-MPC with Gaussian sampling,
exponential utility cost function and
covariance adaptation
Author - Mohak Bhardwaj
Date - Jan 19, 2020
"""
from mjmpc.utils.control_utils import cost_to_go
from .olgaussian_mpc import OLGaussianMPC
import copy
import numpy as np
import scipy.s... | {"hexsha": "4fd942f47c9a6e05b9480b1f959e5865d239a867", "size": 5414, "ext": "py", "lang": "Python", "max_stars_repo_path": "mjmpc/control/gaussian_dmd.py", "max_stars_repo_name": "mohakbhardwaj/mjmpc", "max_stars_repo_head_hexsha": "097e8d9bdaf0b3a15afa39030b2f53b00dfa25de", "max_stars_repo_licenses": ["Apache-2.0"], "... |
from pyrate.utils import valid_imo, \
valid_mmsi, \
is_valid_cog, \
is_valid_heading, \
is_valid_sog, \
valid_latitude, valid_longitude
import numpy as np
class TestValidationFunctions():
... | {"hexsha": "c1447ca62df55b00febb5ead1ace511292fafd2c", "size": 2303, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_validation.py", "max_stars_repo_name": "vprakash-ucl/pyrate", "max_stars_repo_head_hexsha": "42f67a5f8a89740bd6ef31458383550dba5a09ca", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
# GPyTorch Regression Tutorial (GPU)
(This notebook is the same as the [simple GP regression tutorial](../01_Exact_GPs/Simple_GP_Regression.ipynb) notebook, but does all computations on a GPU for acceleration.
Check out the [multi-GPU tutorial](./Simple_MultiGPU_GP_Regression.ipynb) if you have large datasets that nee... | {"hexsha": "80525f03fa3caa9cc7496aa2dc9b9c78bd03a917", "size": 31747, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "examples/02_Scalable_Exact_GPs/Simple_GP_Regression_CUDA.ipynb", "max_stars_repo_name": "llguo95/gpytorch", "max_stars_repo_head_hexsha": "1fa69935104565c377ce95d2c581c9eedfb55817", ... |
[STATEMENT]
lemma uint_bintrunc_neg [simp]:
"uint (- numeral bin :: 'a word) = take_bit (LENGTH('a::len)) (- numeral bin)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. uint (- numeral bin) = take_bit LENGTH('a) (- numeral bin)
[PROOF STEP]
by transfer rule | {"llama_tokens": 103, "file": null, "length": 1} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.