text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
import csv
import datetime
import matplotlib.pyplot as plt
import numpy as np
from scipy.misc import factorial
from scipy.stats import norm, skewnorm, exponnorm
def poisson_density(x, mu):
#return np.exp(-mu) * x / factorial(x)
return 1 / np.sqrt(2 * np.pi * x) * np.exp(x * (1 - mu - x * np.log(mu) - np.log(x)))
d... | {"hexsha": "8db51362c7b2b41caeba923203e5f3bc8d8516c3", "size": 1878, "ext": "py", "lang": "Python", "max_stars_repo_path": "PreliminaryAnalysis/Distribution of Trade Totals/distribution_of_trade_totals.py", "max_stars_repo_name": "alfredholmes/cryptocurrency_data_analysis", "max_stars_repo_head_hexsha": "084aff2f9b9fe6... |
from transformers import (
ElectraForSequenceClassification,
ElectraForTokenClassification,
DistilBertForTokenClassification,
DistilBertForSequenceClassification,
DebertaForSequenceClassification,
DebertaForTokenClassification,
RobertaForSequenceClassification
)
from ue4nlp.dropout_mc impor... | {"hexsha": "0a0edf8a307781f16800939fdf4384f8e792731e", "size": 10807, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ue4nlp/ue_estimator_mcddpp.py", "max_stars_repo_name": "AIRI-Institute/uncertainty_transformers", "max_stars_repo_head_hexsha": "982b5ae8b39cb484ce3559a72f95d18f30487e38", "max_stars_repo_lic... |
function factors = kernFactors(kern, factorType)
% KERNFACTORS Extract factors associated with transformed
% optimisation space. "factorType" is one of 'atox', 'xtoa',
% or 'gradfact', as follows.
%
% 'atox': transform unrestricted input parameters to a suitably
% restricted output range.
%
% 'xtoa': transform restric... | {"author": "SheffieldML", "repo": "GPmat", "sha": "4b5914a38ecbad9fb7a13a3392970bfc28c9d911", "save_path": "github-repos/MATLAB/SheffieldML-GPmat", "path": "github-repos/MATLAB/SheffieldML-GPmat/GPmat-4b5914a38ecbad9fb7a13a3392970bfc28c9d911/kern/kernFactors.m"} |
#!/usr/bin/env python
"""
Created on Fri May 9 20:53:41 2014
Author: Oren Freifeld
Email: freifeld@csail.mit.edu
"""
import numpy as np
from scipy import sparse
from of.utils import *
from of.gpu import CpuGpuArray
#from cpab.essentials import *
from cpab.cpaNd import CpaSpace as CpaSpaceNd
from cpab.cpaNd.utils impo... | {"hexsha": "a5ad9380a7c6a5ebdb868c7f2069e11311c547f3", "size": 18146, "ext": "py", "lang": "Python", "max_stars_repo_path": "cpab/cpa3d/CpaSpace.py", "max_stars_repo_name": "freifeld/cpabDiffeo", "max_stars_repo_head_hexsha": "22df6cdbd7111b9ae3e7f1c0e31ff85e92d281a6", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
#!/usr/bin/python
# PiFmRds - FM/RDS transmitter for the Raspberry Pi
# Copyright (C) 2014 Christophe Jacquet, F8FTK
#
# See https://github.com/ChristopheJacquet/PiFmRds
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publ... | {"hexsha": "044848d5125efc89540aa1ab9a2dc945d6298afc", "size": 1287, "ext": "py", "lang": "Python", "max_stars_repo_path": "pifm/generate_pulses.py", "max_stars_repo_name": "cedced19/pifm-browser-zikcenter", "max_stars_repo_head_hexsha": "a29fc3f43e1d144bb560d83a09994f4df29d3621", "max_stars_repo_licenses": ["MIT"], "m... |
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 28 15:00:44 2018
@author: anish
"""
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
import DNN
import pickle
with open("parameters.txt","rb") as fp:
parameters=pickle.load(fp)
for i in range(1,9):
img=Image.open("test"+str(i)+".jpg")
... | {"hexsha": "2b69b3d5f9a698b420b115e9b7e58e17050f1f61", "size": 522, "ext": "py", "lang": "Python", "max_stars_repo_path": "tester.py", "max_stars_repo_name": "nitrawf/Deep-Network", "max_stars_repo_head_hexsha": "2423ca98a8cf9df5548d4678b321024788e3b615", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
using RedPitayaDAQServer
using PyPlot
# obtain the URL of the RedPitaya
include("config.jl")
rp = RedPitayaCluster([URLs[1]])
dec = 64
modulus = 4800
base_frequency = 125000000
periods_per_step = 5
samples_per_period = div(modulus, dec)
periods_per_frame = 50 # about 0.5 s frame length
frame_period = dec*samples_per... | {"hexsha": "b3bc44bdb1a8d27750956c48de09cd6dbc121093", "size": 2893, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/examples/julia/sequenceTypes.jl", "max_stars_repo_name": "tknopp/RedPitayaDAQServer", "max_stars_repo_head_hexsha": "5255d595e78d28590cc10f714ab5921e8f87b609", "max_stars_repo_licenses": ["MIT"... |
//
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/cppalliance/json
//
#ifndef BOOST_JSON_IMPL_STATIC_RES... | {"hexsha": "4f4da04b129b318df14e4d204d959de76f25f5ae", "size": 1399, "ext": "ipp", "lang": "C++", "max_stars_repo_path": "include/boost/json/impl/static_resource.ipp", "max_stars_repo_name": "djarek/json", "max_stars_repo_head_hexsha": "e1bd8083ed547de26b567e7eef02a6f1142a9128", "max_stars_repo_licenses": ["BSL-1.0"], ... |
#
# Copyright 2022 DMetaSoul
#
# 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": "4ea95e5f46b619e37e6ddcab86a7eb21702f6339", "size": 4383, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo/dataset/common/neg_sampler.py", "max_stars_repo_name": "meta-soul/MetaSpore", "max_stars_repo_head_hexsha": "e6fbc12c6a3139df76c87215b16f9dba65962ec7", "max_stars_repo_licenses": ["Apache-2.0... |
import scipy.sparse as sp
import pandas as pd
import numpy as np
import os
from pathlib import Path
import argparse
import collections
import json
PATH = "datasets/"
def from_json(file):
with open(file, encoding='utf-8') as fh:
return json.load(fh)
def to_json(file, data):
os.makedirs(os.path.dirna... | {"hexsha": "b8b99c4873b189d12ef60475f6d8622fc82f0ec9", "size": 10810, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/mlens.py", "max_stars_repo_name": "WeiWeic6222848/CT3", "max_stars_repo_head_hexsha": "83eca467391b21c9edfc835623b4038369ffbbbb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
[STATEMENT]
lemma extended_Gromov_product_inside_boundary_aux:
assumes "y \<in> Gromov_boundary"
shows "extended_Gromov_product_at e (to_Gromov_completion x) y = Inf {liminf (\<lambda>n. ereal(Gromov_product_at e x (v n))) |v. (\<lambda>n. to_Gromov_completion (v n)) \<longlonglongrightarrow> y}"
[PROOF STATE]
proo... | {"llama_tokens": 2078, "file": "Gromov_Hyperbolicity_Gromov_Boundary", "length": 12} |
[STATEMENT]
lemma nth_weave:
assumes "i < length (weave A xs ys)"
shows "weave A xs ys ! i = (if i\<in>A then xs!(card {a\<in>A. a<i}) else ys!(card {a\<in>-A. a<i}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. weave A xs ys ! i = (if i \<in> A then xs ! card {a \<in> A. a < i} else ys ! card {a \<in> - A. a < i... | {"llama_tokens": 1452, "file": "Jordan_Normal_Form_DL_Missing_Sublist", "length": 16} |
"""
Copyright 2020 The OneFlow 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 applicable law or agreed... | {"hexsha": "66b74e7d806ac47cc6c1c4a28b7eea3824868c6c", "size": 2154, "ext": "py", "lang": "Python", "max_stars_repo_path": "Pix2Pix/plot.py", "max_stars_repo_name": "xunhen/oneflow_vision_model", "max_stars_repo_head_hexsha": "1774b04546034794af24f7b393717e19f11eb019", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
"""
controlbandwidthmax.py - This module defines a cost function that penalizes all
control frequencies above a specified maximum.
"""
import autograd.numpy as anp
import numpy as np
from qoc.models import Cost
class ControlBandwidthMax(Cost):
"""
This cost penalizes control frequencies above a set maximum.
... | {"hexsha": "e07252da309c59664ac79966f5734ff535a8d799", "size": 2615, "ext": "py", "lang": "Python", "max_stars_repo_path": "qoc/standard/costs/controlbandwidthmax.py", "max_stars_repo_name": "alibabaquantumlab/qoc", "max_stars_repo_head_hexsha": "273d5eff19b404107d45e655fe07cc55d80435e7", "max_stars_repo_licenses": ["M... |
%
% In this file, we mex the C files used in this package.
clear, clc;
current_path=cd;
%% Output infor
%%
fprintf('\n ----------------------------------------------------------------------------');
fprintf('\n The program is mexing the C files. Please wait...');
fprintf('\n If you have problem with mex, you can refe... | {"author": "zzstefan", "repo": "BrainNetClass", "sha": "556cda9516429a964100e1ac0bace4258194b4a1", "save_path": "github-repos/MATLAB/zzstefan-BrainNetClass", "path": "github-repos/MATLAB/zzstefan-BrainNetClass/BrainNetClass-556cda9516429a964100e1ac0bace4258194b4a1/Toolbox/SLEP_package_4.1/mexC.m"} |
\chapter{Calculus in 1-Complexity}
\section{Introduction and Motivation}
This chapter will present a specific set of $rComplexity$ classes, highlighting \textbf{Big \textit{r-}Theta}, \textbf{Big \textit{r-}O} and \textbf{Big \textit{r-}Omega} with unitary parameter (i.e. $r = 1$) by providing useful properties for a... | {"hexsha": "47a2274bfecef611cea51b54aa9b950217623a99", "size": 16517, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "TeX/complexity/unitaryRComplexity.tex", "max_stars_repo_name": "raresraf/rafMetrics", "max_stars_repo_head_hexsha": "21eb5e8210364bf70eee746d71c45f3e353dcb10", "max_stars_repo_licenses": ["MIT"], "... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import astropyp.phot.phot
import astropyp.phot.psf
import astropyp.phot.plots
import astropyp.phot.detect
import astropyp.phot.stack
import astropyp.phot.calibrate | {"hexsha": "3ddf5c49049913c7400f7b0753568c9d8b21bb5c", "size": 228, "ext": "py", "lang": "Python", "max_stars_repo_path": "astropyp/phot/__init__.py", "max_stars_repo_name": "fred3m/astropyp", "max_stars_repo_head_hexsha": "414c9e6d84da2604c6466b2046827d8b1988edab", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta... |
import torch
import numpy as np
from torch.autograd import Variable
import torch.optim as optim
import argparse
import random
import os
import models
import torchvision.utils as vutils
import utils
import dataLoader
import torch.nn as nn
from torch.utils.data import DataLoader
parser = argparse.ArgumentParser()
# The ... | {"hexsha": "2506c536f02c2b69de6f63b7ba06c0e2f5dab9d2", "size": 23683, "ext": "py", "lang": "Python", "max_stars_repo_path": "outputCascadeEnv_step.py", "max_stars_repo_name": "YouweiLyu/SingleImageShapeAndSVBRDF", "max_stars_repo_head_hexsha": "ef699658ae57a931ed14854137bfcb9f301de442", "max_stars_repo_licenses": ["MIT... |
from matplotlib import scale
import matplotlib.pyplot as plt
from scipy.stats import t, gamma, norm, bernoulli
import numpy as np
import time
# marginal prior parameter over mu
def t_parameters(sample_mean, sample_var, n):
mu, lamb, alpha, beta = sample_mean, n, n/2, n/(2/sample_var)
df, sigma = 2 * alpha, np... | {"hexsha": "4a3f26d01e4dbdb74025cef9142c3de936b1f285", "size": 4870, "ext": "py", "lang": "Python", "max_stars_repo_path": "tmp_jason_main/testing.py", "max_stars_repo_name": "truebluejason/autogluon", "max_stars_repo_head_hexsha": "9f0aac8453567f7fa57492288cb387d17c06ebe3", "max_stars_repo_licenses": ["Apache-2.0"], "... |
/**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef KAGOME_CORE_METRICS_EXPOSER_HPP
#define KAGOME_CORE_METRICS_EXPOSER_HPP
#include <memory>
#include <boost/asio/io_context.hpp>
#include <boost/asio/ip/tcp.hpp>
#include "handler.hpp"
namespace kagome::metric... | {"hexsha": "e115f5d6909d5b0fdef143b1c3807d4a9b96b068", "size": 1353, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "core/metrics/exposer.hpp", "max_stars_repo_name": "soramitsu/kagome", "max_stars_repo_head_hexsha": "d66755924477f2818fcae30ba2e65681fce34264", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_... |
from build.management.commands.base_build import Command as BaseBuild
from django.db.models import Q
from django.conf import settings
from protein.models import Protein, ProteinConformation, ProteinAnomaly, ProteinState, ProteinSegment
from residue.models import Residue
from residue.functions import dgn, ggn
from stru... | {"hexsha": "8c64e85ced9bc8ffb90bc910a007bb83af37b6ac", "size": 7015, "ext": "py", "lang": "Python", "max_stars_repo_path": "structure/management/commands/structure_anomaly_recognition.py", "max_stars_repo_name": "AlexanderHauser/protwis", "max_stars_repo_head_hexsha": "4e84bf99aeefe3874bd671a5d8d0714032dcadaf", "max_st... |
import matplotlib.pyplot as plt
from matplotlib import colors as mcolors
import numpy as np
x, y = np.loadtxt('gazeone.txt', delimiter=',', unpack=True)
plt.scatter(x,y, label='Trial1')
x, y = np.loadtxt('gazetwo.txt', delimiter=',', unpack=True,)
plt.scatter(x,y, color='green', label='Trial2')
plt.xlabel('X')
plt.yl... | {"hexsha": "29d7a71a2cd7317c2832b3cb4293d4cfa9f7c0d2", "size": 425, "ext": "py", "lang": "Python", "max_stars_repo_path": "PracticeData/PracticeScript2_SB.py", "max_stars_repo_name": "everymind/SurprisingMindsOnYoutube", "max_stars_repo_head_hexsha": "d6f4c5173e14ec2fa9e1e6156133ca4d9e09a562", "max_stars_repo_licenses"... |
from googleapiclient.errors import HttpError
import sys
import re
import os
import pytest
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import pygsheets
from pygsheets.exceptions import CannotRemoveOwnerError
from pygsheets.custom_types import ExportType
from pygsheets import Cell
from... | {"hexsha": "ed04097af4a50863e6cd98c99317bf1514e72ecd", "size": 32976, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/online_test.py", "max_stars_repo_name": "mqzhang/pygsheets", "max_stars_repo_head_hexsha": "9d1e18046b01e19326983fc648bfd16a97bd7545", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
module LC.Parallel where
open import LC.Base
open import LC.Subst
open import LC.Reduction
open import Data.Nat
open import Relation.Binary.Construct.Closure.ReflexiveTransitive
-- parallel β-reduction
infix 3 _β⇒_
data _β⇒_ : Term → Term → Set where
β-var : {n : ℕ} → var n β⇒ var n
β-ƛ : ∀ {M M'} → (M⇒M' :... | {"hexsha": "85a5c1ca43c0c411d67b949faa9c974fc68ccb20", "size": 5420, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "LC/Parallel.agda", "max_stars_repo_name": "banacorn/bidirectional", "max_stars_repo_head_hexsha": "0c9a6e79c23192b28ddb07315b200a94ee900ca6", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
using RollingFunctions
"""
BasicMetrics{O<:AbstractTakeObjective, H<:ValueSelection} <: AbstractMetrics
`BasicMetrics` is a Type that stores useful information derived from consecutive search, during either a learning process or an evaluation process.
It is filled just after a search. The metrics are called in t... | {"hexsha": "612770cf90e0441176ee8c6cd2ad6aa316c32dcc", "size": 7145, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/experiment/metrics/basicmetrics.jl", "max_stars_repo_name": "pitmonticone/SeaPearl.jl", "max_stars_repo_head_hexsha": "0c0ca5ec5cce81515acd202ea2d87c985c0c3fea", "max_stars_repo_licenses": ["BS... |
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import GaussianNB
from sklearn import metrics
import numpy as np
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import GridSea... | {"hexsha": "f4fa044a21d32510b856e488bcc774326a084f55", "size": 1932, "ext": "py", "lang": "Python", "max_stars_repo_path": "nb2.py", "max_stars_repo_name": "sgavela/heart_disease_prediction", "max_stars_repo_head_hexsha": "b34e8a6bc2b59d651e5852725954040e514d56ae", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_... |
import numpy
import matplotlib.pyplot as plot
import pandas
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
| {"hexsha": "fcb223c53c4ed9888b84a975db47a991ba09fe94", "size": 164, "ext": "py", "lang": "Python", "max_stars_repo_path": "linear_regression.py", "max_stars_repo_name": "CogitoNTNU/grunnkurs-template-1", "max_stars_repo_head_hexsha": "f25a7dc8474ccfcf0d358e30b59a11e1487817fd", "max_stars_repo_licenses": ["MIT"], "max_s... |
import numpy as np
from scipy.signal import fftconvolve
import matplotlib.pyplot as plt
import pyroomacoustics as pra
from pyroomacoustics.doa import circ_dist
from scipy.io import wavfile
def split_audio(audio):
left = []
right = []
for i in range(0, len(audio) // 2, 2):
left.append(audio[i * 2]... | {"hexsha": "daefaf88b699a44db0f283ced07292f71dc3be0e", "size": 3773, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/doa_inlab.py", "max_stars_repo_name": "PascalPolygon/myPyroomacoustics", "max_stars_repo_head_hexsha": "8efc96bcb378600e6cabc92c23621fccd2b664e1", "max_stars_repo_licenses": ["MIT"], "max... |
/*
* Implement Heap sort -- direct and indirect sorting
* Based on descriptions in Sedgewick "Algorithms in C"
*
* Copyright (C) 1999 Thomas Walter
*
* 18 February 2000: Modified for GSL by Brian Gough
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Pub... | {"hexsha": "9e86ab0b076ab1b13c3a82238d529b9ef7e7e984", "size": 2719, "ext": "c", "lang": "C", "max_stars_repo_path": "pkgs/libs/gsl/src/sort/sort.c", "max_stars_repo_name": "manggoguy/parsec-modified", "max_stars_repo_head_hexsha": "d14edfb62795805c84a4280d67b50cca175b95af", "max_stars_repo_licenses": ["BSD-3-Clause"],... |
! email: personal@auliakhalqillah.com
program bilangangenap
implicit none
integer :: i,n
real :: xeven
write(*,*) 'Bilangan Genap'
n = 10 ! banyak data
xeven = 2 ! inisial bilangan genap
do i = 1,n
write(*,*) xeven
xeven = xeven + 2
end do
end program
| {"hexsha": "bf15ac4382d57b34256dfa86a0787e4d4171cbef", "size": 304, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "bilangangenap.f95", "max_stars_repo_name": "auliakhalqillah/AlgortimaDasar", "max_stars_repo_head_hexsha": "351b68ce649c9b409d263d5fee83bbfa671316ca", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import numpy as np
from scipy import interpolate,linalg
def cumsummedian(a,weights=None):
"""
Compute the weighted median.
Returns the median of the array elements.
Parameters
----------
a : array_like, shape (n, )
Input array or object that can be converted to an array.
weights ... | {"hexsha": "f983118dc22eb37ff4620f0cdfecf47d3bb18334", "size": 10446, "ext": "py", "lang": "Python", "max_stars_repo_path": "morphokinematicsdiagnostics.py", "max_stars_repo_name": "athob/morphokinematics", "max_stars_repo_head_hexsha": "974b99188e46968dbff1e5a57bf0f93201c50985", "max_stars_repo_licenses": ["MIT"], "ma... |
from copy import copy
import re
import numpy as np
import pandas as pd
import torch
from nltk.tokenize import word_tokenize
from gensim.models.keyedvectors import FastTextKeyedVectors, KeyedVectors
from gensim.models.fasttext import load_facebook_vectors
from torch.utils.data import Dataset
import cfg
from text_cla... | {"hexsha": "c44ff59ceb2293d54c2d84e9a7aafe8c30368686", "size": 9834, "ext": "py", "lang": "Python", "max_stars_repo_path": "text_classification/datautils.py", "max_stars_repo_name": "Guitaricet/text_classification", "max_stars_repo_head_hexsha": "49cf5ab72f962b61b4ffc455e06eb5d6fb132f20", "max_stars_repo_licenses": ["M... |
import numpy
from worldengine.biome import biome_name_to_index, biome_index_to_name, Biome
from worldengine.biome import Iceland
import worldengine.protobuf.World_pb2 as Protobuf
from worldengine.step import Step
from worldengine.common import _equal
from worldengine.version import __version__
class Size(object):
... | {"hexsha": "9c51d0b364b95063f77649b21257de738fb3ce3f", "size": 30144, "ext": "py", "lang": "Python", "max_stars_repo_path": "worldengine/model/world.py", "max_stars_repo_name": "techdragon/worldengine", "max_stars_repo_head_hexsha": "a5a56c61d27d62d62bcc0ad4a86eed8cf85bd710", "max_stars_repo_licenses": ["MIT"], "max_st... |
'''
@Author: zjk
@Date: 2020-04-26 09:43:48
@LastEditTime: 2020-04-30 16:10:21
@LastEditors: zjk
@Description: 读取外层xml文件并抽取内层html,提取主诉等内容
'''
from lxml import etree
import os
import sys
import shutil
import regex
import pymysql
from traverse import gethtml, getxml
from xmltohtml import xmltohtml
from extract_text imp... | {"hexsha": "ab22e316ea61cb772847a30e3d55c94225da7cc6", "size": 1702, "ext": "py", "lang": "Python", "max_stars_repo_path": "EMR/main.py", "max_stars_repo_name": "Archaeoraptor/tools", "max_stars_repo_head_hexsha": "36d09a66b552454a9bdfdb8aea32cd2b3822a899", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"... |
theory hw2
imports Main
begin
fun add :: "nat \<Rightarrow> nat" where
"add x = x + 1"
value "add 3"
fun count :: "'a \<Rightarrow> 'a list \<Rightarrow> nat" where
"count x [] = 0"
| "count x (y # xs) = (if x = y then add (count x xs) else count x xs) "
value "length [1::nat,3,5,3]"
value "count (3::nat) [1... | {"author": "hong-code", "repo": "ucas_Pro_theory", "sha": "94c5e854987ba4bea5ce906ef166afe48b136eef", "save_path": "github-repos/isabelle/hong-code-ucas_Pro_theory", "path": "github-repos/isabelle/hong-code-ucas_Pro_theory/ucas_Pro_theory-94c5e854987ba4bea5ce906ef166afe48b136eef/hw2.thy"} |
universes u v
/-
Lean contains several automated reasoning techniques from in SMT solvers
These are available when using SMT tactics with `begin[smt] end`
-/
-- Congruence closure is applied automatically
example {α : Type} (f : α → α) (a b c)
(h1 : b = a) (h2 : f c = f b) : f a = f c :=
begin[smt] end
-- C... | {"author": "gebner", "repo": "avm2017_tutorial", "sha": "3954983cdc8aef0e58e1a5809c0b3e217057ac4c", "save_path": "github-repos/lean/gebner-avm2017_tutorial", "path": "github-repos/lean/gebner-avm2017_tutorial/avm2017_tutorial-3954983cdc8aef0e58e1a5809c0b3e217057ac4c/06_ematching.lean"} |
#include <boost/units/get_dimension.hpp>
| {"hexsha": "938c0e44e5a7e4c0d3c6fe84e8e7e35264ca2796", "size": 41, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_units_get_dimension.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1.0"]... |
theory Submission
imports Defs
begin
lemma subseq_append2 [intro]: "subseq xs ys \<Longrightarrow> subseq xs (zs @ ys)"
by (induct zs) auto
lemma subseq_prefix [intro]:
assumes "subseq xs ys" shows "subseq xs (ys @ zs)"
using assms
by (induct arbitrary: zs) auto
lemma subseq_ConsD:
assumes "subseq (x#xs)... | {"author": "maxhaslbeck", "repo": "proofground2020-solutions", "sha": "023ec2643f6aa06e60bec391e20f178c258ea1a3", "save_path": "github-repos/isabelle/maxhaslbeck-proofground2020-solutions", "path": "github-repos/isabelle/maxhaslbeck-proofground2020-solutions/proofground2020-solutions-023ec2643f6aa06e60bec391e20f178c258... |
import os
import collections
import numpy as np
__all__ = ["EazyParam", "TranslateFile", "read_param_file"]
def read_param_file(param_file=None, verbose=True):
"""
Load a param file and add default parameters if any missing
"""
param = EazyParam(param_file, verbose=True)
if param_file is not None:... | {"hexsha": "1db8caf2ec9f3256474eba93cf75bee7ea1349c3", "size": 8796, "ext": "py", "lang": "Python", "max_stars_repo_path": "eazy/param.py", "max_stars_repo_name": "albertfxwang/eazy-py", "max_stars_repo_head_hexsha": "bcfd8a1e49f077adc794202871345542ab29800b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 20, ... |
from __future__ import division, print_function, absolute_import
import numpy as np
import scipy.stats
from modisco import util
class AbstractValueProvider(object):
def __call__(self, seqlet):
raise NotImplementedError()
@classmethod
def from_hdf5(cls, grp):
the_class = eval(grp.attrs["c... | {"hexsha": "b340b23b85dff270131e596e5da647178a8946f9", "size": 10179, "ext": "py", "lang": "Python", "max_stars_repo_path": "modisco/value_provider.py", "max_stars_repo_name": "Bluedragon137/tfmodisco", "max_stars_repo_head_hexsha": "d7c56b21e1bb58b07695ef3035f173b7d1a039e6", "max_stars_repo_licenses": ["MIT"], "max_st... |
#!/usr/bin/env python
import json
import networkx as nx
import pygraphviz
import rospy
from cyborg_msgs.msg import BehaviorTree, BehaviorTreeNodes
from networkx.utils.misc import make_str
_attrs = dict(id='id', children='children')
def tree_graph(data, attrs=_attrs):
"""Return graph from tree data format.
P... | {"hexsha": "eeb4d06a1c174116bba9379bf6e3ac80c0245b2b", "size": 2650, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/rqt_bt/btdata.py", "max_stars_repo_name": "mortenmj/rqt_bt", "max_stars_repo_head_hexsha": "9aee7aef14bb22da4ac47d6ce71dc7f8040e16fa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
import os
import h5py
import mathutils
import math
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import matplotlib.cm as cmx
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
DATA_DIR = os.path.join(BASE_DIR, 'data')
with open(os.path.join(DATA_DIR, 'modelnet40_ply_hdf5_2048', 'shape_names.... | {"hexsha": "f2abf54276955bdd33981a47dafaac71b05c53f1", "size": 2967, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualize.py", "max_stars_repo_name": "jiawei-ren/ModelNet-C", "max_stars_repo_head_hexsha": "1187b20954e955c340b545c2ae9a055351b0242f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count... |
[STATEMENT]
lemma configuration_finite:
"finite (configuration q n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. finite (configuration q n)
[PROOF STEP]
by simp | {"llama_tokens": 60, "file": "LTL_to_DRA_Semi_Mojmir", "length": 1} |
import pandas as pd
import numpy as np
print('Start preprocessing ...')
method = snakemake.params["method"]
prediction_range = snakemake.config['prediction_range'][method]
print(method + ':', prediction_range)
# load prediction values
if method == 'graphprot2':
predictions = pd.read_csv(snakemake.input[0], header... | {"hexsha": "a1a25f6e43f48c2aee4838697a7fd95a52498408", "size": 1293, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/preprocess_predictions.py", "max_stars_repo_name": "julianhesse/Bachelor-Project", "max_stars_repo_head_hexsha": "7b7edc0caec807ee90c3572e0f095f6df1aec2a7", "max_stars_repo_licenses": ["MI... |
colours = c("fkss" = "red", "hQuick" = "burlywood4", "ms2LCPS" = "blue", "msLCPS" = "black", "pdNoGolombC" = "darkolivegreen4","pdC" = "deeppink", "pdNoGolombS"="deepskyblue3", "ms2LCPC" = "darkorange1", "msLCPC" = "darkgoldenrod3", "pdS" = "purple", "msBase" = "darkgreen")
#colours = c("fkss" = "coral3", "hQuick" = "... | {"hexsha": "bef839094b90c49c1125b99f7b1fc64820751acd", "size": 1577, "ext": "r", "lang": "R", "max_stars_repo_path": "forHLR_results/evaluation/legendSettings.r", "max_stars_repo_name": "bingmann/distributed-string-sorting", "max_stars_repo_head_hexsha": "238bdfd5f6139f2f14e33aed7b4d9bbffac5d295", "max_stars_repo_licen... |
import numpy as np
def _tv_denoise_3d(im, weight=100, eps=2.e-4, n_iter_max=200):
"""
Perform total-variation denoising on 3-D arrays
Parameters
----------
im: ndarray
3-D input data to be denoised
weight: float, optional
denoising weight. The greater ``weight``, the more den... | {"hexsha": "db45d63ec41f5650e7c8b27c12f74de84c92a1e3", "size": 7348, "ext": "py", "lang": "Python", "max_stars_repo_path": "skimage/filter/tv_denoise.py", "max_stars_repo_name": "amueller/scikit-image", "max_stars_repo_head_hexsha": "a8bfc5c5814a3c7fe363cfcad0c68b935706cd3c", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
# This file was generated by the Julia Swagger Code Generator
# Do not modify this file directly. Modify the swagger specification instead.
mutable struct ServiceEndpointPolicyDefinitionPropertiesFormat <: SwaggerModel
description::Any # spec type: Union{ Nothing, String } # spec name: description
service::An... | {"hexsha": "e6a6055924b88404e6e9c28209b784dc3228ee86", "size": 2821, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Network/ApplicationGatewayClient/model_ServiceEndpointPolicyDefinitionPropertiesFormat.jl", "max_stars_repo_name": "JuliaComputing/Azure.jl", "max_stars_repo_head_hexsha": "0e2b55e7602352d86bdf... |
using BHTsne
using Base.Test
@test 1 == 1
| {"hexsha": "e34dda40ce2f226fd2ad108800390032b6eb22dd", "size": 43, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "nassarhuda/BHTsne.jl", "max_stars_repo_head_hexsha": "136b9e65bf7a3843d05e523f79b8cc541dd6687a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : Luo Yao
# @Site : http://github.com/TJCVRS
# @File : extract_candidate.py
"""
Functions used to extract lane line candidates roi mainly including the thresholding function
"""
import math
import os
import sys
import time
import cv2
import numpy as np
impo... | {"hexsha": "ea6f03ef362e84fe07f456709d4170e8b5c0f98c", "size": 11147, "ext": "py", "lang": "Python", "max_stars_repo_path": "Extract_line_candidates/extract_candidate.py", "max_stars_repo_name": "MaybeShewill-CV/DVCNN_Lane_Detection", "max_stars_repo_head_hexsha": "b66a1a856ba69b0a0a82c7b53dd192e4906a375b", "max_stars_... |
# -*- coding: utf-8 -*-
import click
import logging
from pathlib import Path
from dotenv import find_dotenv, load_dotenv
import numpy as np
import pandas as pd
from src.features import parse_config
from src.visualization import plot_predictions
from src.models import Model
from sklearn.metrics import mean_squared_error... | {"hexsha": "44d6297fc2916a1dba7209a8f323e83602b2c60c", "size": 2359, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/predict_model.py", "max_stars_repo_name": "LazyEval/housing-prices-firenze", "max_stars_repo_head_hexsha": "c9e81554d86cbf54dfc12cca9b2d12725a8909a9", "max_stars_repo_licenses": ["MIT"]... |
def download_occultation_times(outdir='./'):
"""
Pull the orbital information from the Berkeley website
and then returns the location of the file.
Parameters
----------
outdir: Optional desired output location. Defaults to the working directory.
Returns
----------
... | {"hexsha": "7ff8d72c62434b72e17436cc8e0ad13f6e1f5b85", "size": 4088, "ext": "py", "lang": "Python", "max_stars_repo_path": "nustar_pysolar/io.py", "max_stars_repo_name": "bwgref/nustar_pysolar", "max_stars_repo_head_hexsha": "59b2bd045263b488693feedb2e01e6d922282d33", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
"""
data.py
~~~~~~~
Functions for caching and loading data.
"""
import random
random.seed(1)
import os, sys
import logging
import numpy as np
from timeit import default_timer as timer
from datetime import datetime
from tqdm import tqdm
from collections import OrderedDict, Counter
from sklearn.feature_selection impo... | {"hexsha": "9d9d52bcc14b2baddd9e1f645415d4db99a31c54", "size": 16763, "ext": "py", "lang": "Python", "max_stars_repo_path": "cade/data.py", "max_stars_repo_name": "whyisyoung/CADE", "max_stars_repo_head_hexsha": "22e9029b84a9fa50a9627f9b8bda8e6bbef7fc79", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": ... |
import numpy as np
import multiprocessing
from joblib import Parallel,delayed
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
class DecisionStump():
def __init__(self):
# Determines if sample shall be classified as -1 or 1 given threshold
self.polari... | {"hexsha": "4f1f1fe3f1c37c972ffcf174b1e40c488da52a8c", "size": 6440, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/AdaBoost.py", "max_stars_repo_name": "Avashist1998/Viola-Jones_Algorithm", "max_stars_repo_head_hexsha": "0de21a22485b0f60fa03397ce6592dd2c7e0e3a5", "max_stars_repo_licenses": ["MIT"], "max_... |
using BenchmarkTools
using PolygonOps
using StaticArrays
using Test
const suite = BenchmarkGroup()
suite["inpolygon"] = BenchmarkGroup()
circle(t) = SVector(cos(t), sin(t))
circle_poly = map(circle, 0:(2pi/1000000):2pi)
#@show length(circle_poly)
# using Plots
# display(plot(map(x -> x[1], circle_poly),map(x -> x[... | {"hexsha": "6b820935d3f97f8f8cf4f7ba2d6b55d98f8235cc", "size": 1134, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "bench/perf.jl", "max_stars_repo_name": "BioTurboNick/PolygonOps.jl", "max_stars_repo_head_hexsha": "2f2f291fc52114b795c36abc245ce93247ec3a62", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
import Mathlib.Algebra.Group.Basic
section FunctionOperations
variable {α : Type u} {β : (a : α) → Type v} {γ : Type w}
instance [∀ a, Add (β a)] : Add ((a : α) → β a) := ⟨λ f g => λ a => f a + g a⟩
instance [∀ a, Sub (β a)] : Sub ((a : α) → β a) := ⟨λ f g => λ a => f a - g a⟩
instance [∀ a, Mul (β a)] : M... | {"author": "lecopivo", "repo": "SciLean", "sha": "e4fe5962c862f9854a6c88a4082eb01bc1147086", "save_path": "github-repos/lean/lecopivo-SciLean", "path": "github-repos/lean/lecopivo-SciLean/SciLean-e4fe5962c862f9854a6c88a4082eb01bc1147086/SciLean/Mathlib/Data/Pi.lean"} |
import RowEchelon
#=
Homework 2
Section 1.4
Problem 4
=#
# Create the first Matrix
A = [1 3 -4 ;
3 2 1]
# Create the second matrix
B = [1 ; 2 ; 1]
# Multiply the A and B
matrixProduct = A*B
# Print the results
println()
println("Original Matrix, A:")
println(A)
println("Original Matrix, B")
println(B)
println... | {"hexsha": "e27e15a3d1b255291b46e7e440fbabe480729a80", "size": 378, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "HW2_S1.4_P4.jl", "max_stars_repo_name": "tleecsm/J4LA", "max_stars_repo_head_hexsha": "0ff51fa1771e9b5fc0b8a684a65cb36cebb8eefb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st... |
using Metatheory
using Metatheory.Rewriters
using Test
# using SymbolicUtils
array_theory = @theory x y f g M N begin
#map(f,x)[n:m] = map(f,x[n:m]) # but does NOT commute with filter
map(f,fill(x,N)) == fill(apply(f,x), N) # hmm
# cumsum(fill(x,N)) == collect(x:x:(N*x))
fill(x,N)[... | {"hexsha": "417eb507107ffccb1e239f04f5e470a279b774b4", "size": 2927, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_stream_fusion.jl", "max_stars_repo_name": "emaibb/Metatheory.jl", "max_stars_repo_head_hexsha": "7287a34a24b10203da52b900cf494adbdb788174", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import pandas as pd
import numpy as np
import pickle
from sklearn.cross_validation import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
from math import sqrt
from sklearn.svm import SVR
from sklearn.svm import LinearSVR
from sklearn.preprocessing imp... | {"hexsha": "7872cad86d5e6860db3423541d84ad83d99668ea", "size": 4103, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/pipeline/a04a_linear_reg.py", "max_stars_repo_name": "Iolaum/Phi1337", "max_stars_repo_head_hexsha": "c73b01cb85c0187ed5c23c672d4f3d05a6934a9f", "max_stars_repo_licenses": ["Apache-2.0"], ... |
library(SummarizedExperiment)
counts_to_fpkm <- function(counts, featureLength) {
stopifnot(length(featureLength) == nrow(counts))
# Process one column at a time.
result <- do.call(cbind, lapply(1:ncol(counts), function(i) {
countI<-counts[,i]
totalCount<-sum(countI)
res<-(10^9)*countI/(featureLen... | {"hexsha": "d98e50e0c96f119f1bf8f7c7b178855e5c492de0", "size": 4824, "ext": "r", "lang": "R", "max_stars_repo_path": "lib/TCGA/PrepareRnaseq.r", "max_stars_repo_name": "shengqh/ngsperl", "max_stars_repo_head_hexsha": "f81d5bf30171950583bb1ab656f51eabc1e9caf6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count... |
import numpy as np
inputs = [1,2,3,2.5]
weights = [0.2,0.8,-0.5,1.0]
bias = 2
output = np.dot(inputs,weights)+bias
# As i have inputs first to get the desired result but if we have weights as matrix form then weights will be first otherwise we have shape error bcz with weights frist we get weights list[1].inpu... | {"hexsha": "1c57cb62b69e38b1d123d5656cbf115c7c086fcd", "size": 348, "ext": "py", "lang": "Python", "max_stars_repo_path": "p3-2.py", "max_stars_repo_name": "Samrath49/python", "max_stars_repo_head_hexsha": "06d2bd73d501244dd80b7fa418bed8ace267a583", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_stars_r... |
#!/usr/bin/env python3
""" Masks functions for faceswap.py """
import inspect
import logging
import sys
import cv2
import numpy as np
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
def get_available_masks():
""" Return a list of the available masks for cli """
masks = sorted([name for... | {"hexsha": "ae8a2d6f6768d8ab2692661f787c838eaede823c", "size": 4626, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/model/masks.py", "max_stars_repo_name": "oveis/DeepVideoFaceSwap", "max_stars_repo_head_hexsha": "e507f94d4f5d74c36e41c386c6fb14bb745a4885", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
[STATEMENT]
lemma mult_left_cancel:
assumes x: "x \<in> V" and y: "y \<in> V" and a: "a \<noteq> 0"
shows "(a \<cdot> x = a \<cdot> y) = (x = y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (a \<cdot> x = a \<cdot> y) = (x = y)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
1. a \<cdot> x ... | {"llama_tokens": 1905, "file": null, "length": 27} |
"""
Intermediate class
"""
from typing import Any, Dict, Tuple, Union, Optional
from pathlib import Path
import json
import os
import numpy as np
import pandas as pd
from .dtypes_v2 import Continuous, Nominal, SmallCardNum
class Intermediate(Dict[str, Any]):
"""This class contains intermediate results."""
... | {"hexsha": "331e4fb0b4e22118ba9ee515b5fcd50a9d0a9125", "size": 7897, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataprep/eda/intermediate.py", "max_stars_repo_name": "Waterpine/dataprep-1", "max_stars_repo_head_hexsha": "4032acb1d1f2c413d4cb000d17e8ffa611315f9f", "max_stars_repo_licenses": ["MIT"], "max_sta... |
from __future__ import division, print_function, absolute_import
import numpy as np
__all__ = ['clarkson_woodruff_transform']
def cwt_matrix(n_rows, n_columns):
"""
TODO: Document Function
"""
S = np.zeros((n_rows, n_columns))
nz_positions = np.random.randint(0, n_rows, n_columns)
values = np... | {"hexsha": "3ea9cbfed5cb6f96d7f71e172a03bda10ee9980a", "size": 1879, "ext": "py", "lang": "Python", "max_stars_repo_path": "randnla/cwt_sketch.py", "max_stars_repo_name": "jomsdev/randomizedNLA", "max_stars_repo_head_hexsha": "f3018561e2c49ec5c626afc3059bace8c46961b4", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
[STATEMENT]
lemma dDia_false [dynlog_simp]: "\<^bold><false\<^bold>>\<Phi> = false"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<^bold><false\<^bold>>\<Phi> = false
[PROOF STEP]
by (simp add: dBox_false dDia_def) | {"llama_tokens": 93, "file": "UTP_utp_utp_dynlog", "length": 1} |
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
! Copyright by The HDF Group. *
! Copyright by the Board of Trustees of the University of Illinois. *
! All rights reserved. *
... | {"hexsha": "64d2bde103e2405a83567450b27f25f7fde62103", "size": 3657, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "fortran/examples/h5_crtatt.f90", "max_stars_repo_name": "hyoklee/hdf5", "max_stars_repo_head_hexsha": "d128e98a69039be58deeca9b737bf4b465b9756f", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"]... |
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
cwd = os.getcwd()
N_repeatitions = 50
N_multistarts = 20
area_dict = {}
time_dict = {}
args = ['gpy_mle1121', 'gpy_mle1122']
for arg in args:
data_dir = os.path.join(cwd, '../../results/bench1/multistarts/', arg)
df = pd.Da... | {"hexsha": "0e7eac55a9e5f577429b5f8b882218f92169eca0", "size": 4647, "ext": "py", "lang": "Python", "max_stars_repo_path": "safergpy/code/report/figure_5b_auc_multistart.py", "max_stars_repo_name": "johncoltrane1/saferGPMLE", "max_stars_repo_head_hexsha": "b86fbd329eaad0b6374a1b28cae43b2a7f81eb61", "max_stars_repo_lice... |
module MultilevelCoordinateSearch
using StaticArrays, DataStructures
using Compat
include("types.jl")
include("init.jl")
include("util.jl")
end # module
| {"hexsha": "7c6ee5984c98140ddb2d74169825e98a838d1a4e", "size": 156, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/MultilevelCoordinateSearch.jl", "max_stars_repo_name": "JuliaTagBot/MultilevelCoordinateSearch.jl", "max_stars_repo_head_hexsha": "fc67cf6eeec9d6c491c256c11f48777708ed1ee5", "max_stars_repo_lice... |
from __future__ import annotations
import torch
from torch import Tensor
import time
import matplotlib.pyplot as plt
from typing import List, Union, Optional, Iterable, Dict
from hcat.lib.cell import Cell
from hcat.lib.utils import graceful_exit
from io import BytesIO
from numpy import int8
import lz4.frame as compal... | {"hexsha": "3ce5eeac644ad260cce4dc47100f60854a428236", "size": 26058, "ext": "py", "lang": "Python", "max_stars_repo_path": "hcat/lib/cochlea.py", "max_stars_repo_name": "buswinka/hcat", "max_stars_repo_head_hexsha": "dcfd855904ba51f6e1fa6c9ddc775b3364695e3e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "... |
import sklearn.model_selection
import scipy
import numpy as np
import csv
import math
import matplotlib.pyplot as plt
from operator import itemgetter
from collections import Counter
#Load the Iris data file using python csv module
knn_file = open('iris.csv')
csvreader = csv.reader(knn_file)
knnd = []
for row in csvr... | {"hexsha": "656ba19660676c2759a935315055c3f6be2ba570", "size": 6306, "ext": "py", "lang": "Python", "max_stars_repo_path": "KNN.py", "max_stars_repo_name": "HarryWang0619/COMPSCI589-HW1", "max_stars_repo_head_hexsha": "0dbb292a41fb1ab9fd73af1dd5040245fcf20655", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
# author: Sasha Babicki, Ifeanyi Anene, and Cal Schafer
# date: 2021-01-22
"""
Generate crime statistics dashboard with 2 tabs
Usage: python src/app.py
Source for code to create tabs: https://dash.plotly.com/dash-core-components/tabs
Source for choropleth map boundaries: https://exploratory.io/map
Tutorial used for ... | {"hexsha": "1baebcedc3b7a8faf6d66bc1ee91a524139ef72b", "size": 13394, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/app.py", "max_stars_repo_name": "IfyAnene7/532_Group_22", "max_stars_repo_head_hexsha": "8038ba88d89b7e7966de9fd77134a42733e4983c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
From SimplyRatt Require Import Typing Worlds.
(* Typing examples *)
Example id_wt ty A (G : ctx ty) : ty <> later ->
G ⊢ abs (var 0) ∶ (Arrow A A).
Proof.
eauto.
Qed.
Example id_app_closed ty t A (G : ctx ty) :
ty <> later ->
G ⊢ t ∶ A ->
G ⊢ app (abs (var 0)) t ∶ A.
Proof.
eauto.
Qed.
Lemma now... | {"author": "pa-ba", "repo": "simply-ratt", "sha": "f0732830bb9ff082f3a1770967be6c9cf9b367e8", "save_path": "github-repos/coq/pa-ba-simply-ratt", "path": "github-repos/coq/pa-ba-simply-ratt/simply-ratt-f0732830bb9ff082f3a1770967be6c9cf9b367e8/theories/Examples.v"} |
import os
import time
import json
import logging
from collections import OrderedDict
from itertools import starmap
import numpy as np
import h5py
from .filelock import FileLock
logger = logging.getLogger(__name__)
# Here's an example of what the H5BlockStore index looks like...
EXAMPLE_INDEX = """
{
"axes": zyx,
... | {"hexsha": "37ef32a43be9197da70c1bb0641713e55ff5fdc4", "size": 22318, "ext": "py", "lang": "Python", "max_stars_repo_path": "quilted/h5blockstore.py", "max_stars_repo_name": "stuarteberg/quilted", "max_stars_repo_head_hexsha": "11c6e38cbce95133ab4e9cfe0dd2afb14ae088f7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max... |
import argparse
import torch
from utils.loss import SegmentationLosses
from utils.lr_scheduler import LR_Scheduler
from utils.saver import Saver
from utils.metrics import Evaluator
from dataloader import make_data_loader
from models.seg.ocrnet import OCRNet
import torch.optim
import os
import numpy as np
from tqdm impo... | {"hexsha": "b5157bcd2466eaf93d0318475d5ab404cb9f4b52", "size": 10979, "ext": "py", "lang": "Python", "max_stars_repo_path": "val.py", "max_stars_repo_name": "HenryOsborne/SemanticSegmentation", "max_stars_repo_head_hexsha": "d41549c3fd22731d7a12cdb1b438f730b0ebfcbc", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2017, Cabral, Juan; Luczywo, Nadia
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retai... | {"hexsha": "af39b93e6c8db35310ada93adda6f7e8cb02e741", "size": 4189, "ext": "py", "lang": "Python", "max_stars_repo_path": "skcriteria/tests/test_validate.py", "max_stars_repo_name": "dand-oss/scikit-criteria", "max_stars_repo_head_hexsha": "1ca7667e08e79d551f8241278c939f604800d81b", "max_stars_repo_licenses": ["BSD-3-... |
/**
* @file k_means_clustering.hpp
* @brief
* @author Piotr Smulewicz, Piotr Wygocki
* @version 1.0
* @date 2014-06-25
*/
#ifndef PAAL_K_MEANS_CLUSTERING_HPP
#define PAAL_K_MEANS_CLUSTERING_HPP
#include "paal/clustering/k_means_clustering_engine.hpp"
#include "paal/utils/irange.hpp"
#include <boost/range/algori... | {"hexsha": "c471a468c3c84a3e2ba65efa6ed6ced815717b58", "size": 3015, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/paal/clustering/k_means_clustering.hpp", "max_stars_repo_name": "Kommeren/AA", "max_stars_repo_head_hexsha": "e537b58d50e93d4a72709821b9ea413008970c6b", "max_stars_repo_licenses": ["BSL-1.0"... |
[STATEMENT]
lemma Digamma_numeral: "Digamma (numeral n) = harm (pred_numeral n) - euler_mascheroni"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Digamma (numeral n) = harm (pred_numeral n) - euler_mascheroni
[PROOF STEP]
by (subst of_nat_numeral[symmetric], subst numeral_eq_Suc, subst Digamma_of_nat) (rule refl) | {"llama_tokens": 128, "file": null, "length": 1} |
# Copyright (c) 2021 Valerii Sukhorukov. 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 conditions and ... | {"hexsha": "7d46d65050de706aaba992482355ed4765aa42d5", "size": 8887, "ext": "py", "lang": "Python", "max_stars_repo_path": "cytoskeleton_analyser/fitting/von_mises.py", "max_stars_repo_name": "vsukhor/cytoskeleton-analyser", "max_stars_repo_head_hexsha": "681a1f6ba1381a5fb293f2310fce5e97d400cfcb", "max_stars_repo_licen... |
import torch
from torch import optim
import torch.nn.functional as F
from torchvision import transforms
from matcher.models import ClassificationNet
from matcher.dataset import ClassificationDataset
from torch.utils.data import DataLoader
from torch.nn import CrossEntropyLoss
import time
import os
import numpy as np
... | {"hexsha": "035fff427955adc16622a9301de3dda72a4599d8", "size": 6209, "ext": "py", "lang": "Python", "max_stars_repo_path": "matcher/train_classification_model.py", "max_stars_repo_name": "gianscarpe/vipm-project", "max_stars_repo_head_hexsha": "2d9384173a8741e4e56439a06f2fd837b5e1ce4e", "max_stars_repo_licenses": ["MIT... |
[STATEMENT]
lemma (in encoding) indRelR_cond_respects_predA_and_reflects_predB:
fixes PredA PredB :: "('procS, 'procT) Proc \<Rightarrow> bool"
shows "((\<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> rel_respects_pred Rel PredA)
\<and> (\<exists>Rel. (\<foral... | {"llama_tokens": 7289, "file": "Encodability_Process_Calculi_CombinedCriteria", "length": 27} |
import re
from sys import argv
import pandas as pd
import numpy as np
total_regressions_pattern = re.compile("[0-9]+ Regressions has been done")
to_pattern = re.compile("batch size is [0-9]+")
def extract_regressions_from_log(logfile):
f = open(logfile, "r")
for line in f:
if " Regressions has been ... | {"hexsha": "dcd8135f47fa1c5b2fd07231e7dbef414b83611a", "size": 1588, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/benchmarking/extract_metrics.py", "max_stars_repo_name": "carojasq/HMMMR", "max_stars_repo_head_hexsha": "f94846d8f02fe8993a0e5fb55e936dd1c1596187", "max_stars_repo_licenses": ["MIT"], "max_st... |
import random
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import torchvision.models as models
from torch.autograd import Variable
import numpy as np
from model.utils.config import cfg
from model.rpn.rpn import _RPN
from model.roi_layers import ROIAlign, ROIPoo... | {"hexsha": "624ba83e43ae85a295a175aafc3dba4331c255ae", "size": 10966, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/model/faster_rcnn/faster_rcnn_phase.py", "max_stars_repo_name": "fregulationn/SANM", "max_stars_repo_head_hexsha": "7a2580893da32eefcab2d77138fda0f27068dd3c", "max_stars_repo_licenses": ["MIT... |
[STATEMENT]
lemma star_sub_one:
"x \<le> 1 \<Longrightarrow> x\<^sup>\<star> = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. coreflexive x \<Longrightarrow> x\<^sup>\<star> = (1::'a)
[PROOF STEP]
by (metis sup_right_isotone order.eq_iff le_iff_sup mult_1_right star.circ_plus_one star_left_induct) | {"llama_tokens": 127, "file": "Stone_Kleene_Relation_Algebras_Kleene_Algebras", "length": 1} |
import cv2
import numpy as np
def find_lane_pixels(image):
histogram = np.sum(image[image.shape[0] // 2:, :], axis=0)
out_img = np.dstack((image, image, image)) * 255
midpoint = np.int(histogram.shape[0] // 2)
leftx_base = np.argmax(histogram[:midpoint])
rightx_base = np.argmax(histogram[midpoint:]... | {"hexsha": "da329261f49c93fed186affb9eb778e07f07930a", "size": 6784, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/laneDetection.py", "max_stars_repo_name": "KushalBKusram/AdvancedLaneFinder", "max_stars_repo_head_hexsha": "7cd1935a48e26e22938aeb6c2e90eadb40436f30", "max_stars_repo_licenses": ["MIT"], "max... |
import numpy as np
import pandas as pd
import glob
import json
import os
import sys
sys.path.append('../')
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.metrics import roc_curve, precision_recall_curve
from scipy.stats import ttest_ind
def load_experiment_results(path, exp_folde... | {"hexsha": "3aff565fa725a117467cca46ef3b6d3038045688", "size": 18073, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code/src/utils/results_processing.py", "max_stars_repo_name": "antoine-spahr/X-ray-Anomaly-Detection", "max_stars_repo_head_hexsha": "850b6195d6290a50eee865b4d5a66f5db5260e8f", "max_stars_repo_li... |
SUBROUTINE HSCLR2 ( icolr, iclr2, iret )
C************************************************************************
C* HSCLR2 - VG *
C* *
C* This subroutine sets the color on a graphics device. *
C* *
C* HSCLR2 ( ICOLR, ICLR2, IRET ) *
C* *
C* Input parameters: *
C* ICOL... | {"hexsha": "39e32dcebec9aa324b851157f00776bfd378dd51", "size": 808, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/driver/active/vg/hsclr2.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Claus... |
"""
Project: ML-Chord-Progressions
Author: Gabriel Abrantes
Email: gabrantes99@gmail.com
Date: 7/21/2019
Filename: single_stage.py
Description:
[WARNING: DEPRECATED] The first iteration of a model to predict chord voicings.
After experimentation, it was discovered that it is much more
effective to split t... | {"hexsha": "fe2d9fff60fd5f6a5df818b7d63adf65e08d569a", "size": 5887, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/single_stage.py", "max_stars_repo_name": "gabrantes/ML-Chord-Progressions", "max_stars_repo_head_hexsha": "efccddaba02a9c065dad859197890a75b0102a47", "max_stars_repo_licenses": ["MIT"], "m... |
! Copyright (c) 2019, ARM Ltd. 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 applicable law o... | {"hexsha": "37a0a3d1f3bcd4af86f6fc8631dc20a1f6719e6a", "size": 1750, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/f90_correct/src/trailz.f90", "max_stars_repo_name": "s-u/flang-macos", "max_stars_repo_head_hexsha": "69bd1681f230fdd297dc5b2a0cec4f5f23499dce", "max_stars_repo_licenses": ["Apache-2.0"], "... |
import numpy as np
from ..base import Preprocessor
__all__ = [
"Normalizer",
]
class Normalizer(Preprocessor):
#TODO: add __doc__
def __init__(self):
self.mean = None
self.std = None
def fit(self, X):
self.mean = np.mean(X, axis=0)
self.std = np.std(X, axis=0)
d... | {"hexsha": "07aafa7be2471660b12ca28027a908e966b40980", "size": 385, "ext": "py", "lang": "Python", "max_stars_repo_path": "dojo/preprocessing/normalizer.py", "max_stars_repo_name": "VIVelev/PyDojo", "max_stars_repo_head_hexsha": "d932b3df841636208611192be1f881390c361289", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import Base: getindex, length, iterate
import Distributions.logpdf
"""
Priors
Struct
```
struct Priors
priors
indicesForUpdt::Array{Array{Int64,1},1}
end
```
holds relevant information about priors: distributions that need to be used
and the pattern in which MCMC makes use of those distributions. `priors`... | {"hexsha": "71636714966cf497ea06717921e4dedcf6d8be7d", "size": 3079, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/mcmc/priors.jl", "max_stars_repo_name": "mmider/BridgeSDEInference.jl", "max_stars_repo_head_hexsha": "c18dbe9c45bba9ef1d19e70deec8754df2c05293", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
#include <elle/log/CompositeLogger.hh>
#include <boost/algorithm/cxx11/any_of.hpp>
#include <elle/unreachable.hh>
namespace elle
{
namespace log
{
CompositeLogger::CompositeLogger(Loggers l)
: Super{"LOG"}
, _loggers{std::move(l)}
{}
CompositeLogger::CompositeLogger()
: Super{"LOG"... | {"hexsha": "adeff6fbf6217b2fa5f7f506ed1da5fa5123e3e3", "size": 1249, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/elle/log/CompositeLogger.cc", "max_stars_repo_name": "wk8/elle", "max_stars_repo_head_hexsha": "a66d3c0aeca86bcd13ec14d3797edc660b2496fc", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co... |
"""Plotting functions."""
import arviz as az
import numpy as np
from matplotlib import pyplot as plt
import pandas as pd
import seaborn as sns
def plot_marginals(
infd: az.InferenceData,
var_name,
ax: plt.Axes,
true_values: pd.Series = None,
):
"""Plot marginal ability parameters against true val... | {"hexsha": "f03f169d835d6f4e015a551e45693f39b57b3f93", "size": 1677, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plotting.py", "max_stars_repo_name": "OriolAbril/figure_skating", "max_stars_repo_head_hexsha": "02e10e8aae91ea5bce4a5f297c4e30e5b81e4ee7", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
#include "consulcpp/KV.h"
#include "consulcpp/Consul.h"
#include "internal/HttpClient.h"
#include <boost/beast/core/detail/base64.hpp>
#include <gsl/gsl>
struct consulcpp::KV::Private
{
consulcpp::Consul & mConsul;
explicit Private( Consul & consul )
: mConsul( consul )
{
}
std::string api( std::string_vie... | {"hexsha": "e5823b77b03635adea8f4a79cb9cc89dbb70de48", "size": 2264, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/KV.cpp", "max_stars_repo_name": "david-antiteum/consulcpp", "max_stars_repo_head_hexsha": "867659b8d3adaceda1ce49a607b1a6207b5fe00a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0, ... |
#!/usr/bin/env python3
"""Perform "post submission" actions on TriFingerPro.
Performs the following actins:
- run some self-tests to check if the robot is behaving as expected
- move the fingers on a previously recorded trajectory to randomize the
position of the cube
- use the cameras to check if the cube is still... | {"hexsha": "136d8b30e0cb8f2bba443eea1669390305976a36", "size": 9666, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/trifingerpro_post_submission.py", "max_stars_repo_name": "open-dynamic-robot-initiative/robot_fingers", "max_stars_repo_head_hexsha": "d186117dd1a1d7dcd7d38ae8fc847a972db24629", "max_stars... |
{-# OPTIONS --rewriting --without-K #-}
open import Agda.Primitive
open import Prelude
{- Syntax for the Type theory for globular sets -}
module GSeTT.Syntax where
data Pre-Ty : Set
data Pre-Tm : Set
data Pre-Ty where
∗ : Pre-Ty
⇒ : Pre-Ty → Pre-Tm → Pre-Tm → Pre-Ty
data Pre-Tm where
Var : ℕ → ... | {"hexsha": "443ca79e9dfa9c4d3b3c8c005552a9526b025fd0", "size": 3155, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "GSeTT/Syntax.agda", "max_stars_repo_name": "thibautbenjamin/catt-formalization", "max_stars_repo_head_hexsha": "3a02010a869697f4833c9bc6047d66ca27b87cf2", "max_stars_repo_licenses": ["MIT"], "max_... |
open import Formalization.PredicateLogic.Signature
module Formalization.PredicateLogic.Classical.SequentCalculus (𝔏 : Signature) where
open Signature(𝔏)
open import Data.List
open import Data.List.Functions using () renaming (singleton to · ; _++_ to _∪_)
open import Data.List.Relation.Permutation
open import Forma... | {"hexsha": "c89e068e2e91a2c44f9d59a7c75f0a418c11abb9", "size": 2027, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Formalization/PredicateLogic/Classical/SequentCalculus.agda", "max_stars_repo_name": "Lolirofle/stuff-in-agda", "max_stars_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_stars... |
# Read an observing sequence and write JSON files for DECam
# Author: Igor Andreoni
import json
import numpy as np
from astropy.io import ascii
def get_exp_data(fieldname, ra, dec, exptime, filt,
program, propID, seqID, seqnum, seqtot=None,
expType='object', comment='', count=1, do... | {"hexsha": "42ddacbf5fd332bb21614728279b4afa4963456c", "size": 5956, "ext": "py", "lang": "Python", "max_stars_repo_path": "create_json.py", "max_stars_repo_name": "igorandreoni/KNTraP", "max_stars_repo_head_hexsha": "8fbeca42d4efba22a2c9ceafe75cb315e208862f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
import numpy as np
import matplotlib.pyplot as plt
from N_body_simulator import N_body_solver
from energy_calculator import system_energy
'''
Investigating the TRAPPIST system by adding a Jupiter-sized interloper between TRAPPIST-1e and 1f, and varying its mass.
TRAPPIST-1e's eccentricity is measured and trajectories ... | {"hexsha": "74429ed9ae0fe5c377156d926488ee8d3570792d", "size": 11065, "ext": "py", "lang": "Python", "max_stars_repo_path": "project/Investigation/TRAPPIST - Jupiter Study.py", "max_stars_repo_name": "jpw447/N-body-gravity", "max_stars_repo_head_hexsha": "eafaddda9f4383c1427e258a4f2aec0a1be959cb", "max_stars_repo_licen... |
from HaPPPy.Transmission.TransmissionCalculator import TransmissionCalculator
from threading import Thread
from scipy.constants import codata
import threading
import unittest
import pytest
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
_x = []
_psi_plot = []
_V = []
cla... | {"hexsha": "2d96c8c0da06b295aba34fdad3148be68e62ea42", "size": 12360, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_transmission.py", "max_stars_repo_name": "Mohammed-El-Nabulsi/single-electron-transistor", "max_stars_repo_head_hexsha": "db1abd3627312403be83197c27d06ac4e3a61746", "max_stars_repo_lic... |
[STATEMENT]
lemma satisfies_bounded_conjuncts:
"\<AA> \<Turnstile>\<^sub>b \<phi> \<longleftrightarrow> (\<forall>\<psi> \<in> conjuncts \<phi>. \<AA> \<Turnstile>\<^sub>b \<psi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<AA> \<Turnstile>\<^sub>b \<phi>) = (\<forall>\<psi>\<in>conjuncts \<phi>. \<AA> \<Tu... | {"llama_tokens": 154, "file": "Formula_Derivatives_Abstract_Formula", "length": 1} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.