text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
Load LFindLoad.
Load LFindLoad.
From adtind Require Import goal78.
From lfind Require Import LFind.
Lemma lfind_state (n:natural) (x:lst) (IHx:@eq lst (rev (rev x)) x):@eq lst (rev (append (rev x) (Cons n Nil))) (Cons n x).
Admitted.
From QuickChick Require Import QuickChick.
QCInclude "/home/yousef/lemmafinder/bench... | {"author": "yalhessi", "repo": "lemmaranker", "sha": "53bc2ad63ad7faba0d7fc9af4e1e34216173574a", "save_path": "github-repos/coq/yalhessi-lemmaranker", "path": "github-repos/coq/yalhessi-lemmaranker/lemmaranker-53bc2ad63ad7faba0d7fc9af4e1e34216173574a/benchmark/clam/_lfind_clam_lf_goal78_rev_rev_58_rev_append/lfind_quic... |
#include <iostream>
#include <fstream>
#include <cstdio>
#include <map>
#include <gflags/gflags.h>
#include <vector>
#include <array>
#include <json/json.h>
#include <simple.h>
#include "totalmodel.h"
#include <FitToBody.h>
#include <VisualizedData.h>
#include <KinematicModel.h>
#include <cassert>
#include <opencv2/ope... | {"hexsha": "12ea7ef01e63cf21ad643e0f290515b4155ef8c2", "size": 11526, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "FitAdam/process_results.cpp", "max_stars_repo_name": "davrempe/MonocularTotalCapture", "max_stars_repo_head_hexsha": "649768d127d16ae49a4da200a4e4d11980785df7", "max_stars_repo_licenses": ["MIT"], ... |
"""Watch is an object to easily watch what is happening
during the training/evaluation of a deep net.
"""
import os
import time
import pdb
from collections import defaultdict
import numpy as np
from . import evaluation
class AverageMeter(object):
"""Computes and stores the average and current value of a metric.
... | {"hexsha": "d35d433c64c703df50bff64f6a154199fdd6e1f3", "size": 16323, "ext": "py", "lang": "Python", "max_stars_repo_path": "ML_Models/DeepImageRetrieval/dirtorch/utils/watcher.py", "max_stars_repo_name": "MU-Data-Science/QIK", "max_stars_repo_head_hexsha": "95df516cd5629fddf549bfb877b14ebfce0519df", "max_stars_repo_li... |
[STATEMENT]
lemma sort_simps [simp]:
"sort cmp [] = []"
"sort cmp (x # xs) = insort cmp x (sort cmp xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Sorting_Algorithms.sort cmp [] = [] &&& Sorting_Algorithms.sort cmp (x # xs) = Sorting_Algorithms.insort cmp x (Sorting_Algorithms.sort cmp xs)
[PROOF STEP]
by (... | {"llama_tokens": 142, "file": null, "length": 1} |
# Some basic functions to interact with the data.
function gencov(d::Integer)
A = rand(d, d)
eye(d) + (A + A')/2
end
function plotclouds(cloudA, cloudB)
scatter(cloudA[1,:], cloudA[2,:], label="-1")
scatter!(cloudB[1,:], cloudB[2,:], label="1")
end
function errorrate(classA::MvNormal,
clas... | {"hexsha": "28fbb396b9021b2b35ead1360a2bd19c7ad08c66", "size": 1188, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "SVM/common.jl", "max_stars_repo_name": "cyber-meow/Optimization_algos", "max_stars_repo_head_hexsha": "ae38b156fbd6ca71bf200fb8d2af7a5d5f817b68", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
[STATEMENT]
lemma summable_zeta:
assumes "Re s > 1"
shows "summable (\<lambda>n. of_nat (Suc n) powr -s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. summable (\<lambda>n. of_nat (Suc n) powr - s)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. summable (\<lambda>n. of_nat (Suc n) pow... | {"llama_tokens": 870, "file": "Zeta_Function_Zeta_Function", "length": 10} |
import argparse
import json
import os
import numpy as np
import pandas as pd
import torch
from sklearn import metrics as sklearn_metrics
from sklearn.model_selection import train_test_split
from torch.utils.data import TensorDataset, DataLoader, SequentialSampler
from transformers import BertTokenizerFast, BertTokenize... | {"hexsha": "0f7f2c197b57fa46ccf115796fc6bb005f2294ce", "size": 19175, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "GullyBurns/meta-full-text-mining-ner", "max_stars_repo_head_hexsha": "968013a89c65af9b7b60d6bb5f445869ba53fbca", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# -*- coding: utf-8 -*-
from numpy import array as numpy_array
from numpy import empty as numpy_empty
from numpy import where as numpy_where
from numpy import sum as numpy_sum
from numpy import finfo as numpy_finfo
from .data.data import Data
from .dimensioncoordinate import DimensionCoordinate
from .functions import R... | {"hexsha": "b8e61d9f64cca38a510e58d8c8a297817ba37a6e", "size": 20225, "ext": "py", "lang": "Python", "max_stars_repo_path": "cf/regrid.py", "max_stars_repo_name": "AJamesPhillips/cf-python", "max_stars_repo_head_hexsha": "4631bc4ba3c0cb51dcd18905116440007e291e6b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
module Sheets
export RWGSheet, read_sheet_data, write_sheet_data, find_unique_periods
export rotate!, translate!, combine, recttri, SV2, MV2
using StaticArrays: SVector, MVector, SMatrix
using ..PSSFSSLen
using JLD2
using LinearAlgebra: norm
using RecipesBase
const MV2 = MVector{2,Float64}
const SV2 = SVector{2,Flo... | {"hexsha": "c27efb5264a8b65dddb505e35da1b6cc435dc7c5", "size": 23528, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Sheets.jl", "max_stars_repo_name": "mortenpi/PSSFSS.jl", "max_stars_repo_head_hexsha": "9a3a6503d9266eee57771612a47a3e9b77bc9a2e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10, "m... |
! wrapftutorial.f
! This file is generated by Shroud nowrite-version. Do not edit.
! Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC and
! other Shroud Project Developers.
! See the top-level COPYRIGHT file for details.
!
! SPDX-License-Identifier: (BSD-3-Clause)
!
!>
!! \file wrapftutorial.f
!! \bri... | {"hexsha": "02df73bd593d4c491844e78a279ceb8a380b4de0", "size": 26737, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "regression/reference/debugfalse/wrapftutorial.f", "max_stars_repo_name": "ExternalRepositories/shroud", "max_stars_repo_head_hexsha": "86c39d2324d947d28055f9024f52cc493eb0c813", "max_stars_repo_l... |
import numpy as np
import pandas as pd
import re
def stack_chunks(dat_list):
'''
For preserving categories instead of converting to objects.
If you concat categories w/ different levels (or even the same in a
different order), it silently converts to object
'''
columns, dtypes = dat_list[0].co... | {"hexsha": "04ec3b9c4ca8f326f69119022c4926baa41a241c", "size": 7735, "ext": "py", "lang": "Python", "max_stars_repo_path": "jwpy/sas_fwf.py", "max_stars_repo_name": "jake-westfall/jwpy", "max_stars_repo_head_hexsha": "12b1616339eb4a6e27dfb670154df5dfb1b309ba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
\section{Introduction}
\textbf{\textit{UniSup}} is an instantaneous chat application that allows users to exchange short text messages among them.
\subsection{Description}
\textit{UniSup} name is composed by \textit{Uni} that stands for University, which is the main application scope; and \textit{Sup} which is a pop... | {"hexsha": "d69f7126fa74cb57201195d4fb43d5919f19e2a4", "size": 1782, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Documentation/Latex/chapters/introduction.tex", "max_stars_repo_name": "edofazza/uniSup", "max_stars_repo_head_hexsha": "95d87d6bfca85b1f9e123aa75ae97f2a39c81eb8", "max_stars_repo_licenses": ["MIT"]... |
[STATEMENT]
lemma (in abelian_subgroup) a_inv_FactGroup:
"X \<in> carrier (G A_Mod H) \<Longrightarrow> inv\<^bsub>G A_Mod H\<^esub> X = a_set_inv X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. X \<in> carrier (G A_Mod H) \<Longrightarrow> inv\<^bsub>G A_Mod H\<^esub> X = a_set_inv X
[PROOF STEP]
by (rule no... | {"llama_tokens": 177, "file": null, "length": 1} |
function [x,y] = combinatorialDependentRows(A)
[m,n]=size(A);
% A is a binarized [F R] matrix (each entry of A is 0 or 1)
% if this program is feasible, then there exist 2 combinatorially dependent subsets of rows of A
%cvx_solver gurobi
cvx_solver mosek
cvx_begin sdp quiet
variable x(m) binary;
variable y(... | {"author": "opencobra", "repo": "cobratoolbox", "sha": "e60274d127f65d518535fd0814d20c53dc530f73", "save_path": "github-repos/MATLAB/opencobra-cobratoolbox", "path": "github-repos/MATLAB/opencobra-cobratoolbox/cobratoolbox-e60274d127f65d518535fd0814d20c53dc530f73/src/analysis/topology/FR/combinatorialDependentRows.m"} |
import hashlib
import os
import time
import random
import subprocess as sub
import numpy as np
def assemble_population(population,genome):
population.append(genome[:])
return population
def new_population(population,fitness,pop_size,cpop):
for i in range(pop_size):
if i<2:
new_genome... | {"hexsha": "ff18e471d41b33bcd1b736c2d6b5f49330d25762", "size": 1422, "ext": "py", "lang": "Python", "max_stars_repo_path": "evosoro/_voxcad_land_water/new_population.py", "max_stars_repo_name": "kattwalker/evosoro", "max_stars_repo_head_hexsha": "75915d1d794ef6ef2ae78a6e9be00dfd2a0b3283", "max_stars_repo_licenses": ["M... |
import argparse
from meter import AverageMeter
import os
import torch
import numpy as np
from utils import *
from model import *
from vocab import Vocab
from batchify import get_batches2, get_batches, get_batches3
import time
from train import evaluate
import matplotlib.pyplot as plt
import itertools
import sys
print(... | {"hexsha": "5337cbcc0a6257e989d0cd25cc536ca993b533a3", "size": 12648, "ext": "py", "lang": "Python", "max_stars_repo_path": "steerability_joint.py", "max_stars_repo_name": "kttian/text-autoencoders", "max_stars_repo_head_hexsha": "76107444c25bdec62aae7fc5ff29b89fdb8691a4", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
from baconian.core.core import Env
from baconian.common.spaces import Box
from baconian.envs.gym_env import GymEnv
import numpy as np
class Wrapper(Env):
def __init__(self, env: Env):
if isinstance(env, GymEnv):
self.env = env.unwrapped_gym
self.src_env = env
else:
... | {"hexsha": "58205704e71a4b55eb578f3c1503f9f080d533fd", "size": 3515, "ext": "py", "lang": "Python", "max_stars_repo_path": "baconian/envs/env_wrapper.py", "max_stars_repo_name": "yitongx/baconian-public", "max_stars_repo_head_hexsha": "a67e23c6bc6bfe7019ec9532a3d18f06aed6bbbb", "max_stars_repo_licenses": ["MIT"], "max_... |
#redirect UC Davis Classrooms
| {"hexsha": "e19a508d2817c8076713bffc6759f1c2098bdb78", "size": 30, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Classrooms.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
SubWorker{F,T,A,S} = RemoteChannel{Channel{Vector{SubProblem{F,T,A,S}}}}
ScenarioProblemChannel{S} = RemoteChannel{Channel{StochasticPrograms.ScenarioProblems{S}}}
Work = RemoteChannel{Channel{Int}}
function load_subproblems!(subworkers::Vector{SubWorker{F,T,A,S}},
scenarioproblems::Abstract... | {"hexsha": "5cf1edfaed975d2f5a2c20009ed57fa497560bff", "size": 8754, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/solvers/structured/lshaped/execution/distributed.jl", "max_stars_repo_name": "JuliaTagBot/StochasticPrograms.jl", "max_stars_repo_head_hexsha": "43ab69b654368f219a13808b4359035d89bf95a4", "max_... |
#-------------------------------------------------------------------------------------------------------------------
# Packages & Settings
#-------------------------------------------------------------------------------------------------------------------
# General packages
import time
import sys
import os
import date... | {"hexsha": "1729be861814dd0f8cafa841138ffb7190c51a53", "size": 5035, "ext": "py", "lang": "Python", "max_stars_repo_path": "thesis/3 - Global Distance Metrics/1 - [Table 2.8] Influence of Proxy Size on PIP Loss.py", "max_stars_repo_name": "lucasrettenmeier/word-embedding-stability", "max_stars_repo_head_hexsha": "d7a93... |
"""
`ClimbingImage(∇V, τ, ∇V_climb,integrate!, dist, Δt)` - Set up the Climbing Image Method
### Fields
* `∇V` - In place gradient of the potential
* `τ` - Approximate tangent vector of the unstable direction
* `∇V_climb `- In place gradient of the potential with reflector
* `integrate!` - In place integrator
* `Δ... | {"hexsha": "8dc8e86d8426f5c84f3868a9dab744d73c516d0d", "size": 2535, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/saddle.jl", "max_stars_repo_name": "gideonsimpson/StringMethod.jl", "max_stars_repo_head_hexsha": "158e06c4ce72f2e5afcbbba5b4ae493311d09611", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
#=
https://www.allendowney.com/blog/2018/10/21/the-game-of-ur-problem/
"""
Here’s a probability puzzle to ruin your week.
In the Royal Game of Ur, players advance tokens along a track with 14 spaces.
To determine how many spaces to advance, a player rolls 4 dice with 4 sides. Two corners
on each die ... | {"hexsha": "48f137f0459e519c6d3d6d7641b3b4fdae44aecb", "size": 2586, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "julia/turing/game_of_ur_problem.jl", "max_stars_repo_name": "tias/hakank", "max_stars_repo_head_hexsha": "87b7f180c9393afce440864eb9e5fb119bdec1a4", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
#!/usr/bin/env python3
# ------------------------------------------------------------------------ 79->
# Author: ${name=Kelcey Damage}
# Python: 3.5+
#
# 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 Lice... | {"hexsha": "be8df101aa8bf888bb82a233b84b65ac16f85bb4", "size": 1741, "ext": "py", "lang": "Python", "max_stars_repo_path": "rtl/tasks/sort.py", "max_stars_repo_name": "kelceydamage/raspi-tasks", "max_stars_repo_head_hexsha": "18aa323e3e2428c998b7472c226d05a00c8ae8c2", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
import numpy as np
import warnings
from scipy.io import loadmat
from LFSpy import LocalFeatureSelection
from sklearn.ensemble import RandomForestClassifier
from sklearn.svm import LinearSVC
from sklearn.feature_selection import SelectKBest, f_classif
from sklearn.pipeline import Pipeline
from sklearn import datasets
im... | {"hexsha": "0aaff3e0fe0f1231047b686e10d8d50b36d945b4", "size": 5648, "ext": "py", "lang": "Python", "max_stars_repo_path": "LFSpy/comparisons/comparisons.py", "max_stars_repo_name": "sauln/LFSpy", "max_stars_repo_head_hexsha": "91eed1577603e619a160a62d209d6c45543438f8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max... |
import os, math, multiprocessing
from os.path import join
from copy import copy
import numpy as np
from PIL import Image
import visual_words
def get_feature_from_wordmap(opts, wordmap):
'''
Compute histogram of visual words.
[input]
* opts : options
* wordmap : numpy.ndarray of... | {"hexsha": "0f1e781e263a502af07d058bc61567c304d1e9d7", "size": 5878, "ext": "py", "lang": "Python", "max_stars_repo_path": "visual_recog.py", "max_stars_repo_name": "zhenweil/Bag-of-words-for-Scene-Classification", "max_stars_repo_head_hexsha": "7db72cb89c2f07edcb41ce2caa69b8fac0e54ab1", "max_stars_repo_licenses": ["MI... |
# Chemfiles.jl, a modern library for chemistry file reading and writing
# Copyright (C) Guillaume Fraux and contributors -- BSD license
export add_atom!, remove_atom!
export has_velocities, add_velocities!, positions, velocities
export set_cell!, set_topology!, set_step!, guess_bonds!
export distance, dihedral, out_of... | {"hexsha": "a5f032b034b16004ace3e9c77316ce123d5e7976", "size": 10201, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Frame.jl", "max_stars_repo_name": "Ruibin-Liu/Chemfiles.jl", "max_stars_repo_head_hexsha": "2c271b4906e6db5c453d344df527dc69775ca488", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c... |
program test_netcdf_layer
use kinds
use netcdf
use nc_diag_write_mod
implicit none
integer :: i
real(r_single) :: f
real(r_double) :: d
character(len=100) :: str_header
character(len=100) :: str_chaninfo
character(len=100) :: str_metadata
character(len=100) :: str_d... | {"hexsha": "c9441a60bef0c9d65dc6fe99e73373d90255a146", "size": 16920, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "GMAO_ncdiag/nc_diag_write/tests/test_netcdf_layer.f90", "max_stars_repo_name": "GEOS-ESM/GMAO_Shared", "max_stars_repo_head_hexsha": "022af23abbc7883891006b57379be96d9a50df23", "max_stars_repo_... |
// Boost.Varaint
// Contains multivisitors that are implemented via variadic templates, std::tuple
// and decltype(auto)
//
// See http://www.boost.org for most recent version, including documentation.
//
// Copyright Antony Polukhin, 2013-2014.
//
// Distributed under the Boost
// Software License, Version 1.0.... | {"hexsha": "abf03eb57d458e93bd5d9f92ce488dbfe10796b4", "size": 5611, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/variant/detail/multivisitors_cpp14_based.hpp", "max_stars_repo_name": "cpp-pm/boost", "max_stars_repo_head_hexsha": "38c6c8c07f2fcc42d573b10807fef27ec14930f8", "max_stars_repo_licenses": ["BSL... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import numpy as np
import matplotlib.pyplot as plt
import torch.optim as optim
from torch.autograd import Variable
from torchvision import datasets, transforms
from torch.autograd import Variable
nclasses = 43 # GTSRB has 43 classe... | {"hexsha": "4e46fb44a5dc70acb4b9be4f8758642d0be6b47a", "size": 7207, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/model.py", "max_stars_repo_name": "sovit-123/German-Traffic-Sign-Recognition-with-Deep-Learning", "max_stars_repo_head_hexsha": "249122f3e1a0d96043d23ce7a8aaaf9ca2cd7913", "max_stars_repo_lice... |
'''
svg_to_mesh module
==================
This modules allows to read an Inkscape SVG file, parse its elements, and convert them to 3D meshes.
svg_to_mesh module API
----------------------
'''
from __future__ import print_function
from __future__ import absolute_import
import xml.etree.cElementTree as ET
from six.... | {"hexsha": "944015b586009e13f508bca21e128de35d63d247", "size": 67292, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/catamap/svg_to_mesh.py", "max_stars_repo_name": "denisri/fdc_catamaps", "max_stars_repo_head_hexsha": "3636c925d0407fbb12a7dcd3ff953018568aee7e", "max_stars_repo_licenses": ["BSD-3-Clause"... |
# Copyright (c) 2020 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": "e2cc33b09abb83267017e2a06cc291e1ea701a2f", "size": 3372, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmark/torch/qmix/replay_buffer.py", "max_stars_repo_name": "lp2333/PARL", "max_stars_repo_head_hexsha": "e4bde1f5b7e69c5f8d3ee3a90a647dfe12204bd3", "max_stars_repo_licenses": ["ECL-2.0", "Apac... |
import json
import pandas as pd
import numpy as np
from sklearn.feature_extraction import DictVectorizer
from sklearn.linear_model import Perceptron
from sklearn.model_selection import train_test_split
from sklearn.metrics import precision_recall_fscore_support, f1_score
from sklearn.externals import joblib
#Try and s... | {"hexsha": "3b392975505944ad927f0fd1cbd23a56112b1928", "size": 1331, "ext": "py", "lang": "Python", "max_stars_repo_path": "SciKit/main.py", "max_stars_repo_name": "varunchitale/Named_Entity_Recognition", "max_stars_repo_head_hexsha": "9a2e9b5db44c09b44469c115269e74446f8d489d", "max_stars_repo_licenses": ["Apache-2.0"]... |
from typing import Union
import numpy as np
from anndata import AnnData
def interpolation_spateo(
adata,
genes: Union[str, list] = None,
max_iter: int = 1000,
data_batch_size: int = 5000,
autoencoder_batch_size: int = 50,
) -> AnnData:
"""
Predict missing location’s gene expression and le... | {"hexsha": "3a1f04030a78f30e7d2a0d5dfe76065ef613378d", "size": 2339, "ext": "py", "lang": "Python", "max_stars_repo_path": "stRT/preprocess/gene/gene_interpolation_spateo.py", "max_stars_repo_name": "Yao-14/stAnalysis", "max_stars_repo_head_hexsha": "d08483ce581f5b03cfcad8be500aaa64b0293f74", "max_stars_repo_licenses":... |
import numpy as np
n,m = input().split()
arr = np.array([input().split() for _ in range(int(n))], int)
np.set_printoptions(legacy='1.13')
print(np.mean(arr,axis=1))
print(np.var(arr,axis=0))
print(np.std(arr)) | {"hexsha": "7256aaf4d3387a4ad738a14e52d0d3307f00b1cd", "size": 209, "ext": "py", "lang": "Python", "max_stars_repo_path": "Mean var std.py", "max_stars_repo_name": "jibinmathew691993/PythonHackerrank", "max_stars_repo_head_hexsha": "14ab5b620435a006d5ccff17536bc01acd7c22dc", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import copy
import random
from functools import wraps
import numpy as np
from deap.gp import PrimitiveTree, compile, cxOnePoint, mutUniform
from scipy.special import softmax
class MultipleGeneGP():
def __init__(self, content, gene_num):
self.gene = []
self.gene_num = gene_num
for i in ran... | {"hexsha": "a8e118389d3ee9616a2ad4eab5508189e6fd220e", "size": 3382, "ext": "py", "lang": "Python", "max_stars_repo_path": "pstree/multigene_gp.py", "max_stars_repo_name": "Hengzhe-Zhang/PS-Tree", "max_stars_repo_head_hexsha": "88750666f4391f7cc62b34d676f334e22fed3f68", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
// Copyright 2012 Cloudera 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 in wr... | {"hexsha": "5b50cf5a8e2c4445538c1aad53aacf8a4589e19a", "size": 26079, "ext": "cc", "lang": "C++", "max_stars_repo_path": "be/src/exprs/timestamp-functions.cc", "max_stars_repo_name": "andybab/Impala", "max_stars_repo_head_hexsha": "d520a9cdea2fc97e8d5da9fbb0244e60ee416bfa", "max_stars_repo_licenses": ["Apache-2.0"], "m... |
#!/usr/bin/env python3
import os
import sys
import shm
import cv2
import numpy as np
from collections import namedtuple
from conf.vehicle import VEHICLE, is_mainsub
from vision import options
from vision.modules.base import ModuleBase
from vision.framework.feature import outer_contours, contour_area, contour_centroid,... | {"hexsha": "1c7b3f47d1bd9595cd6b9cb6abcb5ca77117ad6b", "size": 12497, "ext": "py", "lang": "Python", "max_stars_repo_path": "vision/modules/gate.py", "max_stars_repo_name": "cuauv/software", "max_stars_repo_head_hexsha": "5ad4d52d603f81a7f254f365d9b0fe636d03a260", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars... |
import graphlearning as gl
import numpy as np
import matplotlib.pyplot as plt
import time
X = np.random.rand(int(10000),2)
x,y = X[:,0],X[:,1]
eps = 0.02
W = gl.weightmatrix.epsilon_ball(X, eps)
G = gl.graph(W)
bdy_set = (x < eps) | (x > 1-eps) | (y < eps) | (y > 1-eps)
u = G.peikonal(bdy_set)
plt.scatter(x,y,c=u,... | {"hexsha": "7fa670a23c0d9f03e61c4a01b173bebb37e5ee70", "size": 386, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/peikonal.py", "max_stars_repo_name": "dfloeder/GraphLearning", "max_stars_repo_head_hexsha": "f9b7ea91a43622b5c271315b0b3b2fdd82e37fe4", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
[STATEMENT]
lemma hcis_inverse [simp]: "\<And>a. inverse (hcis a) = hcis (- a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<And>a. inverse (hcis a) = hcis (- a)
[PROOF STEP]
by transfer (rule cis_inverse) | {"llama_tokens": 91, "file": null, "length": 1} |
using PolarFact
using Test, LinearAlgebra
using Random
Random.seed!(1103)
include("test_newton.jl")
include("test_halley.jl")
include("test_svd.jl")
include("test_hybrid.jl")
include("test_f32.jl") # test Float32 case
| {"hexsha": "8fbb3da21e47016ae7a503eecc04cbf5e658d724", "size": 220, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "weijianzhang/PolarFact.jl", "max_stars_repo_head_hexsha": "6530009072c8774274508fef3c05a1487f09bd60", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
# Author: Francesco Grussu, University College London
# <f.grussu@ucl.ac.uk> <francegrussu@gmail.com>
#
# Code released under BSD Two-Clause license
#
# Copyright (c) 2020 University College London.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are perm... | {"hexsha": "0c0ef44bce24c56499e4b132cf970b001d8c5b52", "size": 10161, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/sig2sig_qmriinterp_deepqmri.py", "max_stars_repo_name": "fragrussu/qMRINet", "max_stars_repo_head_hexsha": "418cbe22cefa2974d8a97b359324ff4c35865d22", "max_stars_repo_licenses": ["BSD-2-Cla... |
from keras.layers import Dense, Conv2D, Deconvolution2D, \
MaxPool2D, UpSampling2D, Flatten, Dropout, Reshape,\
Concatenate
from keras.models import Sequential, Model, load_model, Input
from keras.utils import to_categorical
from sklearn.metrics import mean_squared_error
from sklearn.model_selection import trai... | {"hexsha": "cf0fd6acca2eb0cf98449288c81beff8990d347a", "size": 2541, "ext": "py", "lang": "Python", "max_stars_repo_path": "autoencoder.py", "max_stars_repo_name": "MarkintoshZ/FontTransformer", "max_stars_repo_head_hexsha": "5051db0d38a4b8ae7602fb22c75c008f9f59d2d1", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
"""
Created on Thu Oct 26 14:19:44 2017
@author: Utku Ozbulak - github.com/utkuozbulak
"""
import os
import numpy as np
import torch
from torch.optim import SGD
from cnn_visualization.misc_functions import preprocess_image, recreate_image, save_image
import argparse
import torch.nn as nn
class ClassSpecificImageGe... | {"hexsha": "1591d43ba00250badb5c4fb0808383cba8b16c8b", "size": 8238, "ext": "py", "lang": "Python", "max_stars_repo_path": "cnn_visualization/generate_class_specific_samples.py", "max_stars_repo_name": "tamlhp/dfd_benchmark", "max_stars_repo_head_hexsha": "15cc5c4708a5414c6309ea1f20a5dfa3428409fa", "max_stars_repo_lice... |
import unittest
import torch
import numpy as np
from torchradon import radon, iradon, np_iradon
import matplotlib.pyplot as plt
class TestRADONBIAS(unittest.TestCase):
def test_radon_bias_circular_phantom(self):
"""
test that a uniform circular phantom has a small reconstruction bias
"""
pixels = 128
xy =... | {"hexsha": "e53b0fcd1fe8ec1da9de9d9f68505283bf7cdaa3", "size": 4203, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_phantom.py", "max_stars_repo_name": "AlbertZhangHIT/pytorch_radon", "max_stars_repo_head_hexsha": "6a08e6488dbb4244d02e37034d225fcf2a7f52e5", "max_stars_repo_licenses": ["MIT"], "max_st... |
#redirect The Baxter House
| {"hexsha": "f150532ef16f6fa67eface622182232554d6efd4", "size": 27, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Baxter_House.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
"""Module for target encoding."""
from typing import Union, Tuple, List
import numpy as np
from sklearn.base import BaseEstimator
from sklearn.model_selection import check_cv, BaseCrossValidator
from target_encoding.utils import TargetStatistic, cv_splitter
__version__ = '1.1.0'
class BaseTargetEncoder:
"""Cl... | {"hexsha": "6a2935075e6050266ff411b18142724f0eebb9f4", "size": 8753, "ext": "py", "lang": "Python", "max_stars_repo_path": "target_encoding/target_encoding.py", "max_stars_repo_name": "KirillTushin/target_encoding", "max_stars_repo_head_hexsha": "b8c8fc2bc46d4a5323f6271c0bb23fca5d886040", "max_stars_repo_licenses": ["M... |
import numpy as np
import pylab as plt
from ai_traineree.runners.env_runner import EnvRunner
from ai_traineree.agents.dqn import DQNAgent
from ai_traineree.tasks import GymTask
from ai_traineree.types import TaskType
env_name = "LunarLander-v2"
task: TaskType = GymTask(env_name)
config = {"batch_size": 64}
agent = D... | {"hexsha": "13ad136b97abeebe6a75581d04f40916c9172a24", "size": 780, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/lunar_lander_discrete.py", "max_stars_repo_name": "LuisFMCuriel/ai-traineree", "max_stars_repo_head_hexsha": "121da3ea48992d9db3ede3634e4e5f48f50f4cc3", "max_stars_repo_licenses": ["Apache... |
"""
Material Balance Plots
@author: Yohanes Nuwara
@email: ign.nuwara97@gmail.com
"""
class drygas():
"""
Dry-Gas Material Balance Plot
"""
def calculate_params(self, p, Bg, Gp, cf, cw, swi):
"""Calculate Material Balance Paramaters for Dry-Gas Reservoir"""
import numpy as np
p... | {"hexsha": "38867eb361c12c0ebd4864ec423ecfec69bec8e7", "size": 13693, "ext": "py", "lang": "Python", "max_stars_repo_path": "matbal/mbal.py", "max_stars_repo_name": "jikutlenova/pyreservoir", "max_stars_repo_head_hexsha": "fb5bb5f408265da060859550ec16daf3b7a1c543", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
/*
* TesterScheduler.cpp
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2013-2022 Apple Inc. and the FoundationDB project 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 ... | {"hexsha": "f3e62a3356f76fc4c02a51a2ce9e75b0d514d76f", "size": 2312, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "bindings/c/test/apitester/TesterScheduler.cpp", "max_stars_repo_name": "sfc-gh-bvr/foundationdb", "max_stars_repo_head_hexsha": "7594f5c0f92d2582dae717ce0244c11642b27dd4", "max_stars_repo_licenses":... |
function beta = linearCompressibility(S,x)
% computes the linear compressibility of an elasticity tensor
%
% Description
%
% $$\beta(x) = S_{ijkk} x_i x_j$$
%
% Input
% S - elastic @complianceTensor
% x - list of @vector3d
%
% Output
% beta - linear compressibility in directions v
%
% return a function if required
... | {"author": "mtex-toolbox", "repo": "mtex", "sha": "f0ce46a720935e9ae8106ef919340534bca1adcb", "save_path": "github-repos/MATLAB/mtex-toolbox-mtex", "path": "github-repos/MATLAB/mtex-toolbox-mtex/mtex-f0ce46a720935e9ae8106ef919340534bca1adcb/TensorAnalysis/@complianceTensor/linearCompressibility.m"} |
[STATEMENT]
lemma semantics_tm_id_map [simp]: \<open>map \<lparr>\<^bold>#, \<^bold>\<dagger>\<rparr> ts = ts\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. map \<lparr>\<^bold>#, \<^bold>\<dagger>\<rparr> ts = ts
[PROOF STEP]
by (auto cong: map_cong) | {"llama_tokens": 109, "file": "FOL_Axiomatic_FOL_Axiomatic_Variant", "length": 1} |
# Copyright 2021 Huawei Technologies Co., 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 agreed to... | {"hexsha": "75b7b363a32f14e6ae476459c8823845575f9066", "size": 5045, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/privacy/inversion_attack/mnist_inversion_attack.py", "max_stars_repo_name": "hboshnak/mindarmour", "max_stars_repo_head_hexsha": "0609a4eaea875a84667bed279add9305752880cc", "max_stars_rep... |
[STATEMENT]
lemma tree_map_of_dom: "dom (lookup (tree_map_of' empty pres)) = dom (map_of pres)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. dom (lookup (tree_map_of' empty pres)) = dom (AList_Upd_Del.map_of pres)
[PROOF STEP]
by (induction pres) (auto simp: map_empty map_update[OF tree_map_of_invar[OF invar_empty... | {"llama_tokens": 139, "file": "Verified_SAT_Based_AI_Planning_Solve_SASP", "length": 1} |
# parameters that govern counterfactual
remove_shock!(parameters, :global_sectoral_shock_njs)
remove_shock!(parameters, :idiosyncratic_shock_njs)
| {"hexsha": "5ebb8b2d1d134762dc04dd334b16883b994d6432", "size": 147, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "experiments/CES0.5/nosectoral/change_parameters.jl", "max_stars_repo_name": "korenmiklos/Diversification-Through-Trade-Replication", "max_stars_repo_head_hexsha": "5e286506a97fbf60c344879110fb7c38ef... |
#!/bin/python
import numpy as np
def test_lookup_AaronHill_by_mlb_ID(lookup_obj):
s = lookup_obj.from_mlb_ids([431094])
print(s)
assert(len(s) == 1)
assert(s.iloc[0].mlb_name == 'Aaron Hill')
def test_lookup_bad_ID(lookup_obj):
s = lookup_obj.from_mlb_ids([0])
assert(len(s) == 0)
def test... | {"hexsha": "0ed9c22d794019ee1d72b87358524795b102c330", "size": 2965, "ext": "py", "lang": "Python", "max_stars_repo_path": "baseball_id/tests/test_lookup.py", "max_stars_repo_name": "spilchen/baseball_id_map", "max_stars_repo_head_hexsha": "09b824ce19a6da459b6e7409687263c179202f2a", "max_stars_repo_licenses": ["MIT"], ... |
[STATEMENT]
lemma "\<And>x. P x \<and> Q x \<Longrightarrow> A x \<and> B x \<Longrightarrow> R x y \<Longrightarrow> True"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<And>x. \<lbrakk>P x \<and> Q x; A x \<and> B x; R x y\<rbrakk> \<Longrightarrow> True
[PROOF STEP]
apply match_test \<comment> \<open>Valid mat... | {"llama_tokens": 892, "file": null, "length": 11} |
@testset "Node flux report" begin
fName = "report/nodeflux"
nodeFluxPlot( mpSim, 12, :in, "A junior", "B junior", "Reserve junior",
"A senior", "B senior", "Master" )
nodeFluxPlot( mpSim, 12, :out, "A junior", "B junior", "Reserve junior",
"A senior", "B senior", "Master", plotType=:stacked )
#=
nodeFluxPlot(... | {"hexsha": "745d8163798646f61ffcec5405afd103394e3852", "size": 697, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/plot/nodeflux.jl", "max_stars_repo_name": "jvkerckh/ManpowerPlanningIO.jl", "max_stars_repo_head_hexsha": "90ca00b46616804034bfd962e2a79c14c4328e16", "max_stars_repo_licenses": ["MIT"], "max_st... |
import pathlib
import pickle
import numpy as np
from keras.models import load_model as model_loader
from utils import preprocess, create_dataset
MODEL_DIR = pathlib.Path(__file__).parent / 'models'
MODEL_NAME = 'weights-06-6.66.hdf5'
TEXT = """
Наталья Ильинишна очень хорошо со мной обходится,
— сказал Борис.
... | {"hexsha": "c490223c24f8b9fefabfe7bad918a3bb948848f6", "size": 1928, "ext": "py", "lang": "Python", "max_stars_repo_path": "lstm/predict.py", "max_stars_repo_name": "MardanovTimur/kaggle", "max_stars_repo_head_hexsha": "62392863a07fcc5de9821c28cf9c6dbbf39ced59", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
import os
import pickle
from glob import glob
import numpy as np
import pandas as pd
from kaggle_runner.utils.kernel_utils import logger, rle2mask
# The following functions can be used to convert a value to a type compatible
# with tf.Example.
def _bytes_feature(value):
"""Returns a bytes_list from a string / ... | {"hexsha": "cf3e0ff6651d3079ccd560de027c90e74f2bca9f", "size": 16405, "ext": "py", "lang": "Python", "max_stars_repo_path": "kaggle_runner/datasets/data_handlers.py", "max_stars_repo_name": "pennz/kaggle_runner", "max_stars_repo_head_hexsha": "19b979ae86f1fcaff5d17f55f4d8bc3d3f2a4ced", "max_stars_repo_licenses": ["MIT"... |
# from ast import *
from dolang.symbolic import stringify, stringify_symbol, parse_string, list_variables
from dolang.grammar import str_expression
from dolo.compiler.misc import CalibrationDict
from numpy import log, exp
import xarray
def eval_formula(expr: str, dataframe=None, context=None):
'''
expr: str... | {"hexsha": "b46025283ac5284d81fe0cbf2c2ced0a7780ea7b", "size": 1343, "ext": "py", "lang": "Python", "max_stars_repo_path": "dolo/compiler/eval_formula.py", "max_stars_repo_name": "s4465413/dolo.py", "max_stars_repo_head_hexsha": "6a1bfbd65a8f69a7495c5ade51af8cc6c35eded3", "max_stars_repo_licenses": ["BSD-2-Clause"], "m... |
import TimeSeries.TimeArray
struct APIResponse
data::String
http_resp::HTTP.Messages.Response
end
"""
Description
The yahoo() method is a wrapper for downloading historical stock prices from Yahoo.
Usage
AAPL = yahoo("AAPL)
SPX = yahoo()
Method Signature(s)
yahoo(data::ASCIIString="^GSP... | {"hexsha": "070a5fc14c87702bbe7c6658e5f92211fca3f547", "size": 3461, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/downloads.jl", "max_stars_repo_name": "UnofficialJuliaMirror/MarketData.jl-945b72a4-3b13-509d-9b46-1525bb5c06de", "max_stars_repo_head_hexsha": "6c66eaf1c4797474fa3db156cf8a6ef13dcb81d2", "max_... |
[STATEMENT]
lemma co_test_inf_distributive:
"co_test x \<Longrightarrow> inf_distributive x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. co_test x \<Longrightarrow> inf_distributive x
[PROOF STEP]
by (metis co_test_def distrib_imp1 inf_sup_distrib1 inf_distributive_def mult_zero_sup_one_dist) | {"llama_tokens": 116, "file": "Correctness_Algebras_Lattice_Ordered_Semirings", "length": 1} |
#define BOOST_TEST_MAIN TestTopK
#include <boost/test/unit_test.hpp>
#include <stdexcept>
#include <iostream>
#include <sam/TestProducers.hpp>
#include <sam/TopK.hpp>
#include <sam/Filter.hpp>
#include <sam/Expression.hpp>
#include <sam/VastNetflow.hpp>
using namespace sam;
struct F
{
std::shared_ptr<FeatureMap> fe... | {"hexsha": "b6ff09b26f22e6a699ab700b2497c7949625990e", "size": 5694, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "TestSrc/TestTopK.cpp", "max_stars_repo_name": "dirkcgrunwald/SAM", "max_stars_repo_head_hexsha": "0478925c506ad38fd405954cc4415a3e96e77d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
import numpy as np
import pandas as pd
# Class for Item similarity based Recommender System model
class ItemSimilarityRecommender:
def __init__(self):
self.train_data = None
self.user_id = None
self.item_id = None
self.cooccurence_matrix = None
self.songs_dict = None
... | {"hexsha": "62f64dbfa45d53d6631805a4807e334432e1ed9c", "size": 6844, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "dimitreOliveira/RecsysChallenge_Spotify", "max_stars_repo_head_hexsha": "3b7cd4e4d12a51049573cca1dd86ef66603fddcb", "max_stars_repo_licenses": ["Apache-2.0"], "m... |
[STATEMENT]
lemma length_Casts_vs':
"P \<turnstile> Ts Casts vs to vs' \<Longrightarrow> length Ts = length vs'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. P \<turnstile> Ts Casts vs to vs' \<Longrightarrow> length Ts = length vs'
[PROOF STEP]
by (induct rule:Casts_to.induct,simp_all) | {"llama_tokens": 112, "file": "CoreC++_SubObj", "length": 1} |
# -*- coding: utf-8 -*-
"""LanguageModel.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1Z9Fn4bYa16NSDzxaTlRV_XRF4NDF1r2J
# 利用LSTM和GRU训练语言模型
"""
import os
import numpy as np
import torchtext
from torchtext.vocab import Vectors
from tqdm imp... | {"hexsha": "29a39d674f8606d3f4d0bf0ee9cfbf4b699f9af7", "size": 7195, "ext": "py", "lang": "Python", "max_stars_repo_path": "languagemodel.py", "max_stars_repo_name": "wangwk/LanguageModelDemo", "max_stars_repo_head_hexsha": "6be04f5d072fb79e0cf5e8a465a056faba9cf91a", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
# Lint as: python3
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | {"hexsha": "4afa039b32d67b7d992edb9e2604a5df58af757e", "size": 11489, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_model_analysis/util.py", "max_stars_repo_name": "Mikehem/tfx", "max_stars_repo_head_hexsha": "e803ea6778d8550ec77dcc92bc8172f1a3a90f38", "max_stars_repo_licenses": ["Apache-2.0"], "max... |
(* --------------------------------------------------------------------
* (c) Copyright 2011--2012 Microsoft Corporation and Inria.
* (c) Copyright 2012--2014 Inria.
* (c) Copyright 2012--2014 IMDEA Software Institute.
* -------------------------------------------------------------------- *)
(* -------------------... | {"author": "jasmin-lang", "repo": "jasmin", "sha": "3c783b662000c371ba924a953d444fd80b860d9f", "save_path": "github-repos/coq/jasmin-lang-jasmin", "path": "github-repos/coq/jasmin-lang-jasmin/jasmin-3c783b662000c371ba924a953d444fd80b860d9f/proofs/3rdparty/ssrring.v"} |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""CLDNN (CNN + bidirectional LSTM + DNN) encoder."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
from models.encoders.core.cnn_util import conv_layer, max_pool,... | {"hexsha": "b72afba643847329d79a9905795267b636fa596a", "size": 10323, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/encoders/core/cldnn_wang.py", "max_stars_repo_name": "sundogrd/tensorflow_end2end_speech_recognition", "max_stars_repo_head_hexsha": "61e4a65fb5c9f3d9f690d713dcd77a48b1de0a14", "max_stars_... |
! { dg-do compile }
! various checks which verify that we don't change do-iterators
DO I=1,5 ! { dg-error "cannot be redefined" "changing do-iterator 1" }
I=1 ! { dg-error "cannot be redefined" "changing do-iterator 1" }
END DO
DO I=1,5 ! { dg-error "cannot be redefined" "changing do-iterator 2" ... | {"hexsha": "0e11aa23339a0b6eb436074eb64124ebd3fd296b", "size": 580, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "llvm-gcc-4.2-2.9/gcc/testsuite/gfortran.dg/do_iterator.f90", "max_stars_repo_name": "vidkidz/crossbridge", "max_stars_repo_head_hexsha": "ba0bf94aee0ce6cf7eb5be882382e52bc57ba396", "max_stars_rep... |
import datetime
import os
import logging
import re
import six
from six.moves import cPickle
import numpy as np
import xarray as xr
import pandas as pd
import requests
log=logging.getLogger('usgs_nwis')
from ... import utils
from .. import rdb
from .common import periods
try:
import seawater
except ImportError:... | {"hexsha": "689bfb34a7f2a910ff24decca90c67d12da6ad2a", "size": 9091, "ext": "py", "lang": "Python", "max_stars_repo_path": "stompy/io/local/usgs_nwis.py", "max_stars_repo_name": "rustychris/stompy", "max_stars_repo_head_hexsha": "4efb78824804edc68555bced275e37842f98ba1f", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
from six.moves import input
import numpy as np
from os.path import dirname, join
#import joblib
from sklearn.datasets import load_iris
from sklearn.linear_model import LogisticRegression
import warnings
warnings.filterwarnings('ignore')
from sklearn.externals import joblib
def main():
print("Predict Type of I... | {"hexsha": "5257c85714f8e7574ea5fc9e9b30b735afa6b38d", "size": 2553, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/src/main/python/main.py", "max_stars_repo_name": "kongkip/Ml_on_Android", "max_stars_repo_head_hexsha": "616dc4c86dc9250ec1c84854f857d083221a1deb", "max_stars_repo_licenses": ["MIT"], "max_sta... |
from weka.classifiers import Classifier, Evaluation
from weka.core.converters import Loader
import weka.core.jvm as jvm
import numpy as np
import tempfile
import os
from wirecaml.tools.ascii import print_notice
from wirecaml.tools.file_tools import silent_remove
from wirecaml.tools.data_tools import pandas2arff
clas... | {"hexsha": "c4fffa9b471c00e3058e8fb52987e0feb3b48d08", "size": 3407, "ext": "py", "lang": "Python", "max_stars_repo_path": "wirecaml/model/tan.py", "max_stars_repo_name": "jorkro/wirecaml", "max_stars_repo_head_hexsha": "819c24a127eb026b83ae41eb3c8c1ac8f77f25b8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5... |
import numpy as np
from control_msgs.msg import JointTrajectoryControllerState,\
FollowJointTrajectoryActionResult, FollowJointTrajectoryActionGoal
import matplotlib.pyplot as plt
from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint
class PartialTrajListener():
def __init__(self):
sel... | {"hexsha": "d3b8d2ce92d06f7389652b8e5e4a468d606c62f0", "size": 7572, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/my_arm/partial_trajectory_listener.py", "max_stars_repo_name": "Tadinu/my_arm", "max_stars_repo_head_hexsha": "ac4fb295ddad7c7ee999a03d2e7d229802b64226", "max_stars_repo_licenses": ["BSD-3... |
import os
import cflearn
import numpy as np
from cfdata.tabular import TabularDataset
def test_onnx() -> None:
logging_folder = "__test_onnx__"
def _core(dataset: TabularDataset) -> None:
x, y = dataset.xy
m = cflearn.make(
model,
verbose_level=0,
use_tqd... | {"hexsha": "811bac5404e0fcbfe2683e48c4b0209592f8460b", "size": 1150, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/usages/test_onnx.py", "max_stars_repo_name": "beyondacm/carefree-learn", "max_stars_repo_head_hexsha": "a9c69141163c04a16aba8317febe7a66218510b6", "max_stars_repo_licenses": ["MIT"], "max_st... |
import argparse
import importlib
import os
import sys
import numpy as np
import torch as th
import yaml
from stable_baselines3.common.utils import set_random_seed
import utils.import_envs # noqa: F401 pylint: disable=unused-import
from utils import ALGOS, create_test_env, get_saved_hyperparams
from utils.exp_manager... | {"hexsha": "d4b672c14fd6ff9e748c50d24a35c9a598c01bbd", "size": 8652, "ext": "py", "lang": "Python", "max_stars_repo_path": "enjoy.py", "max_stars_repo_name": "HumanCompatibleAI/rl-baselines3-zoo", "max_stars_repo_head_hexsha": "9ef5fba185b8f5c8e11823b1e1de1735675ecc32", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import numpy as np
from scipy.special import logsumexp
from scipy.sparse import lil_matrix
import sys
from utils.corpus import CorpusHelper
class HMMPOSTagger:
"""
HMM 词性标注模型,实现模型的定义,训练和预测等功能
HMM 参数:
初始状态概率向量 pi,
状态转移概率矩阵 A,
观测概率矩阵 B
"""
def __init__(self, corpus_helper, ... | {"hexsha": "47a484d22d824abdd85bf8cd4eec4257a415416a", "size": 3447, "ext": "py", "lang": "Python", "max_stars_repo_path": "CodePratices/MachineLearning/pos_tagging_hmm_project/models/hmm.py", "max_stars_repo_name": "Coolgiserz/NLP_starter", "max_stars_repo_head_hexsha": "8f6be48d1971876767a24731b95c729e03dca1c9", "max... |
"""
ABC Class of Simulator which generates dummy data.
"""
from abc import ABC, abstractmethod
from typing import Any, Dict
import numpy as np
__all__ = [
"_Simulator"
]
class _Simulator(ABC):
"""
ABC Class of DoE Simulator
Methods
-------
simulate(exmatrix: np.ndarray) -> np.ndarray
"... | {"hexsha": "2936e4e455b7c20e9513f80205b0dd211e179129", "size": 954, "ext": "py", "lang": "Python", "max_stars_repo_path": "tagupy/type/_abs_simulator.py", "max_stars_repo_name": "algebra-club/TaguPy", "max_stars_repo_head_hexsha": "1ff5a792f7c78cfb6741cf27659215fef287a1c1", "max_stars_repo_licenses": ["MIT"], "max_star... |
import os
from collections import defaultdict
from functools import lru_cache
from typing import Callable, Dict, List, Optional, Tuple
import networkx as nx
import numpy as np
import pytket
import pytket.cirq
from pytket.circuit import Node, Qubit
from pytket.passes import SequencePass, RoutingPass, PlacementPass
from... | {"hexsha": "76f39b090f9b3b310051af51f99884b3941754d3", "size": 22863, "ext": "py", "lang": "Python", "max_stars_repo_path": "recirq/qaoa/placement.py", "max_stars_repo_name": "PawelPamula/ReCirq", "max_stars_repo_head_hexsha": "79a351310cd98f67524a9df0c4ef9f300bf9eea4", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Create a plot of the Roche potential for a simple binary system.
"""
import numpy as np
from constants import PI, MSOL, G
from matplotlib import pyplot as plt
def calc_orbital_separation(
period: float, m_star: float, m_seco: float
) -> float:
"""
Calcu... | {"hexsha": "713c89e450b0bf4f66c1edd1c695b16dc8d3c2a4", "size": 3429, "ext": "py", "lang": "Python", "max_stars_repo_path": "roche_potential.py", "max_stars_repo_name": "saultyevil/Python-scripts", "max_stars_repo_head_hexsha": "38eaf3c448a509b3751409cae22ecd553cdd2bfc", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
function cond = condition_linpack ( n, a )
%*****************************************************************************80
%
%% CONDITION_LINPACK estimates the L1 condition number of a matrix.
%
% Discussion:
%
% The R8GE storage format is used for a general M by N matrix. A storage
% space is made for each ... | {"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/condition/condition_linpack.m"} |
# coding=utf-8
# Author: Rafael Menelau Oliveira e Cruz <rafaelmenelau@gmail.com>
#
# License: BSD 3 clause
import numpy as np
from sklearn.metrics import check_scoring
from sklearn.utils.validation import check_X_y, check_is_fitted, check_array
from .base import BaseStaticEnsemble
class SingleBest(BaseStaticEnsem... | {"hexsha": "0c8b13a401d82a960ccafaa107b34d33336e9092", "size": 5201, "ext": "py", "lang": "Python", "max_stars_repo_path": "deslib/static/single_best.py", "max_stars_repo_name": "walbermr/DESlib", "max_stars_repo_head_hexsha": "6ae0f5a8f837f1843ccf0a48ae89e911108aa3d2", "max_stars_repo_licenses": ["BSD-3-Clause"], "max... |
import csv
import math
import os
import pickle
import numpy as np
import tensorflow as tf
from scipy import misc
import facenet
vgg_num_image_per_folder = 1 # -1 means all
vgg_gender_meta_file_path = "../datasets/VGGFace2/meta/identity_meta.csv"
vgg_age_meta_file_path = "../datasets/VGGFace2/meta/test_agetemp_imgli... | {"hexsha": "4e0f2eb1531d953f7bcaf5de3eb98ee68cace704", "size": 4174, "ext": "py", "lang": "Python", "max_stars_repo_path": "contributed/vggface2_gender_age_dataset_builder.py", "max_stars_repo_name": "helloyide/facenet", "max_stars_repo_head_hexsha": "e3f096afe122c54b3a3ff5720b6dfb1c581149b7", "max_stars_repo_licenses"... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 5 12:18:36 2020
@author: alex
###############################################################################
# KalmanFilter.py
#
# Revision: 1.02
# Date: 8/17/2020
# Author: Alex
#
# Purpose: Implement a general-purpose Kal... | {"hexsha": "db193766ba03fa4312ba70b720c078a777ef57ac", "size": 6549, "ext": "py", "lang": "Python", "max_stars_repo_path": "KalmanFilter.py", "max_stars_repo_name": "AlexMGitHub/KalmanCar", "max_stars_repo_head_hexsha": "ae146efcaa9a9b393c2bf574eb11fe9f51355da1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1... |
from measure.measure_average_precision import average_precision
from measure.measure_hamming_loss import hamming_loss
from measure.measure_ranking_loss import ranking_loss
from measure.measure_example_auc import example_auc
from measure.measure_example_f1 import example_f1
from measure.measure_one_error import one_erro... | {"hexsha": "40ed04de195ecbfbfd14fbf28eb837b76d32d141", "size": 5620, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/test.py", "max_stars_repo_name": "sunshiding/M3DNS", "max_stars_repo_head_hexsha": "363301b6f95f7a144a94ecf6f88a3efe378cd562", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_... |
# Copyright 2019 Google LLC
#
# 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, ... | {"hexsha": "0ffa976971d299ca7a56248864ad7fcb0d9b68fd", "size": 8809, "ext": "py", "lang": "Python", "max_stars_repo_path": "pddm/policies/cem.py", "max_stars_repo_name": "Jianshu-Hu/pddm", "max_stars_repo_head_hexsha": "66c23e7a50cbaafc94e8001214481ac194889df1", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou... |
import numpy as np
from numpy import linalg as line
import sklearn
from sklearn.model_selection import KFold
from sklearn.decomposition import PCA
from scipy import interpolate
import torch
import torchvision.transforms as transforms
def de_preprocess(tensor):
"""preprocess function
"""
return tensor * 0.... | {"hexsha": "5bf42bea9ec4895bbf3b5898f33091b85787840d", "size": 13752, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/utils.py", "max_stars_repo_name": "sarvex/TFace", "max_stars_repo_head_hexsha": "b3d8a1392816e0d941425c30ad843d185e286431", "max_stars_repo_licenses": ["PSF-2.0"], "max_stars_count": 764, "m... |
\documentclass{article}
\usepackage{hyperref}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{color}
\usepackage[section]{placeins}
\usepackage{listings}
\title{Combustion Theory Final Take Home Exam}
\author{Nicholas Malaya\\ Department of Mechanical Engin... | {"hexsha": "077796d85458aee5d2660e6e69735ac18593d7a9", "size": 13960, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "combustion/final/report.tex", "max_stars_repo_name": "nicholasmalaya/paleologos", "max_stars_repo_head_hexsha": "11959056caa80d3c910759b714a0f8e42f986f0f", "max_stars_repo_licenses": ["MIT"], "max_... |
using Interpolations
include("UnitConversions.jl")
"""
Fluid(gravityAPI::T, gasGravity::T, solutionGOR::T)
Creates a struct to represent a crude oil sample.
All properties must be given at standard conditions (60F, 14.5 psia)
"""
mutable struct Fluid{T}
gravityAPI::T
gasGravity::T
solutionGOR::T
end... | {"hexsha": "0a8c3e3758333ff0d9dc5cff013733c17d1ac0e9", "size": 3071, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Fluid.jl", "max_stars_repo_name": "leytzher/Shot", "max_stars_repo_head_hexsha": "b35d2dab13e74dc1cd251197029ae31d291fdbe4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st... |
#!/usr/bin/env python
import sys
import os
import fnmatch
import re
import traceback
import random
import math
import matplotlib.pyplot as plt; plt.rcdefaults()
import numpy as np
import matplotlib.pyplot as plt
obj = ["#Satisfied","#CRCs","#CLCs","#CLCDiff","#nodeDiff","#flowDiff","CRCpathlength","CLCpathlength","C... | {"hexsha": "83433f5a7dd1e5566bc3838ba4d2a3f3feddb0ab", "size": 3039, "ext": "py", "lang": "Python", "max_stars_repo_path": "testbed/runtimeplot.py", "max_stars_repo_name": "CN-UPB/fcapp", "max_stars_repo_head_hexsha": "ca8708b74b84dcf29e966635e7ba91b31d358a52", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
# Copyright (c) 2021, Greg Michael
# Licensed under BSD 3-Clause License. See LICENSE.txt for details.
import numpy as np
import gm
def poisson(k,lam,cumulative=False):
#poisson pmf
#vectorised in lambda, but not k
threshold=23 #threshold for switching to normal approximation
if k<threshold: #poi... | {"hexsha": "6b0c0b76014d188fde3d0247e87192c74d056172", "size": 1011, "ext": "py", "lang": "Python", "max_stars_repo_path": "gm/maths/poisson.py", "max_stars_repo_name": "thareUSGS/craterstats", "max_stars_repo_head_hexsha": "7c3cdc3c55f8ba357c8e0e17a87e28e3d48b1d0d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st... |
import numpy as np
lines = np.loadtxt("test_3D_VITESSE_U.son", comments="#", delimiter=" ", unpack=False)
time=[]
uan=[]
err=[]
for i in range(len(lines)):
time.append(0)
uan.append(0)
err.append(0)
for n in range(0,len(lines)):
time[n]=lines[n,0]
uan[n]=lines[n,0]/2+0.1
err[n]=abs((lines[n,3... | {"hexsha": "b93d62ecac096d94d864912ec2676be9c81d5a68", "size": 522, "ext": "py", "lang": "Python", "max_stars_repo_path": "Validation/Rapports_automatiques/Verification/Verification_codage/Time_dependent_velocity/src/post_run3.py", "max_stars_repo_name": "cea-trust-platform/trust-code", "max_stars_repo_head_hexsha": "c... |
import tensorflow_advanced_segmentation_models as tasm
import os
import cv2
import numpy as np
from time import time
import tensorflow as tf
import albumentations as A
import matplotlib.pyplot as plt
import tensorflow.keras.backend as K
from functools import partial
from tensorflow.keras import mixed_precision
import m... | {"hexsha": "88538309b460ac94fed2c8805114ad9bb1859b47", "size": 7951, "ext": "py", "lang": "Python", "max_stars_repo_path": "slurm_deeplabv3.py", "max_stars_repo_name": "minouei-kl/TensorFlow-Advanced-Segmentation-Models", "max_stars_repo_head_hexsha": "a53a8264028bfa1abc52c9f60ec47e1736690731", "max_stars_repo_licenses... |
from pandas import read_csv
import numpy as np
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import RepeatedKFold
from sklearn.linear_model import ElasticNet, ElasticNetCV
from sklearn.model_selection import ShuffleSplit
from sklearn import metrics
from scipy.stats import pearsonr
fro... | {"hexsha": "9bc996cd66460e097c854345bb8b420bd06e5d4f", "size": 12368, "ext": "py", "lang": "Python", "max_stars_repo_path": "library/identify_strains_L2_Enet_Pscan_new_sp_et.py", "max_stars_repo_name": "liaoherui/StrainScan", "max_stars_repo_head_hexsha": "7cb953232e08d286124b24dc27e83ea6d6e3a9a3", "max_stars_repo_lice... |
import pandas as pd
from math import sqrt
import numpy as np
from tqdm import tqdm
import os
import glob
import re
import os
import re
import subprocess
from scipy.stats import pearsonr, spearmanr
from sklearn.pipeline import make_pipeline
from sklearn.linear_model import Ridge
from sklearn.ensemble import RandomFore... | {"hexsha": "ab71469904597d03cfa039e33e2d00388e85c882", "size": 28908, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/modelutils.py", "max_stars_repo_name": "thinkingmachines/geoai-immap-wash", "max_stars_repo_head_hexsha": "466d027bc4ffdd5418375b1c67d5b6f786b01add", "max_stars_repo_licenses": ["MIT"], "ma... |
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 27 01:06:59 2016
@author: yxl
"""
from imagepy import IPy, wx
import numpy as np
from imagepy.core.engine import Simple, Filter
from imagepy.core.manager import WindowsManager
from scipy.ndimage import label, generate_binary_structure
from skimage.measure import regionprop... | {"hexsha": "fc0f51c3ffa5673b1a5b164ae24ac7e5dc1902fc", "size": 7781, "ext": "py", "lang": "Python", "max_stars_repo_path": "imagepy/menus/Analysis/Region Analysis/regionprops_plgs.py", "max_stars_repo_name": "siyemuxu888/imagepy", "max_stars_repo_head_hexsha": "a933526483a15da282bacac54608d44d2173beb4", "max_stars_repo... |
#The first 270 lines were provided graciously from Nicole Paulat, https://github.com/npaulat
import sys
import os
import argparse
import itertools
import subprocess
from pyfaidx import Faidx
from pyfaidx import Fasta
import time
import re
import stat
import shutil
from shutil import copyfile
import errno
from Bio impor... | {"hexsha": "70de33fbe2b395cf8a487a5af3d71d011e987603", "size": 11178, "ext": "py", "lang": "Python", "max_stars_repo_path": "PERM.py", "max_stars_repo_name": "MoamenElmassry/PERM-Pythonized-RepeatMasker-", "max_stars_repo_head_hexsha": "2d9ae54281cac328d40562d760c2aef67a2b47c9", "max_stars_repo_licenses": ["MIT"], "max... |
#!/usr/bin/env python
# compatibility with python 2/3:
from __future__ import print_function
from __future__ import division
import os, sys
import string
from pylab import *
import astropy.io.fits as pyfits
import numpy as np
import glob
from matplotlib import pylab as plt
from . import ac_settings as ac_set
def... | {"hexsha": "4e760e44c048df82fd23a64b362605481c2ad1dd", "size": 11267, "ext": "py", "lang": "Python", "max_stars_repo_path": "actin/actin_files/ac_tools.py", "max_stars_repo_name": "j-faria/ACTIN", "max_stars_repo_head_hexsha": "f16d597472ccabb7627753179032e18ae21e83a2", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2015, Oracle and/or its affiliates.
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
#ifndef BOOST_GEOMETRY_ALGORITHMS_... | {"hexsha": "5833665ba7bbafb533b947ee8d6d54395420dbab", "size": 15533, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "other/mysql/include/boost_1_59_0/boost/geometry/algorithms/detail/overlay/split_rings.hpp", "max_stars_repo_name": "35niavlys/teeworlds-fng2-mod", "max_stars_repo_head_hexsha": "d73be893c060fb38326... |
[STATEMENT]
lemma mp_objT_correct[simp]: "Mapping.lookup mp_constT = constT"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Mapping.lookup mp_constT = constT
[PROOF STEP]
unfolding mp_constT_def constT_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Mapping.lookup (Mapping.of_alist (consts D)) = map_of (consts... | {"llama_tokens": 160, "file": "AI_Planning_Languages_Semantics_PDDL_STRIPS_Checker", "length": 2} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.