text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | {"hexsha": "35f417a8aefd2c7b18ef3e560d612b567c647f0d", "size": 6797, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/python/circuit/test_operation.py", "max_stars_repo_name": "Roshan-Thomas/qiskit-terra", "max_stars_repo_head_hexsha": "77219b5c7b7146b1545c5e5190739b36f4064b2f", "max_stars_repo_licenses": ["... |
# --------------
import pandas as pd
import scipy.stats as stats
import math
import numpy as np
import warnings
warnings.filterwarnings('ignore')
#Sample_Size
sample_size=2000
#Z_Critical Score
z_critical = stats.norm.ppf(q = 0.95)
# path [File location variable]
data = pd.read_csv(path)
#C... | {"hexsha": "646f5c6af173beb518164fd565b1eaf03dc33cda", "size": 5182, "ext": "py", "lang": "Python", "max_stars_repo_path": "Banking-Inferences-(Making-inferences-from-the-data)/code.py", "max_stars_repo_name": "tanup05/ga-learner-dsmp-repo", "max_stars_repo_head_hexsha": "8d5421587194101d18fbfff2ff8dd0ada4074c21", "max... |
# Autogenerated wrapper script for ALPS_jll for armv7l-linux-gnueabihf-cxx11
export libalps
using CoinUtils_jll
using Osi_jll
using Clp_jll
using Cgl_jll
using CompilerSupportLibraries_jll
JLLWrappers.@generate_wrapper_header("ALPS")
JLLWrappers.@declare_library_product(libalps, "libAlps.so.0")
function __init__()
... | {"hexsha": "86fc760d00544a132560be0659c26133d9963ad3", "size": 609, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/wrappers/armv7l-linux-gnueabihf-cxx11.jl", "max_stars_repo_name": "JuliaBinaryWrappers/ALPS_jll.jl", "max_stars_repo_head_hexsha": "b61187ea7eae403e108c73cc028c9b02128e41b4", "max_stars_repo_lic... |
import json
import os
from paver.easy import pushd
import numpy as np
import matplotlib
matplotlib.use('Agg') # in the case of perform on server
import matplotlib.pyplot as plt
import pickle
import csv
from sklearn import metrics
def main():
import argparse
parser = argparse.ArgumentParser()
parser.add_arg... | {"hexsha": "14df73b351d8dd2f8f3ef72f449f125746aaecb7", "size": 4994, "ext": "py", "lang": "Python", "max_stars_repo_path": "HDP_HLM/SAMPLE/summary.py", "max_stars_repo_name": "GUZHIXIANG/DAA_taguchi", "max_stars_repo_head_hexsha": "5c77f0a326b53e0cc908cf08714fd470870877ec", "max_stars_repo_licenses": ["MIT"], "max_star... |
\chapter{Lexicon and ontology}\label{a:lexicon}
In this appendix the lexicon and ontology of the basic experiment (\chapref{ch:basic}) is given. Of some additional meanings the legend is given (Tables~\ref{t:st:legend0a} and \ref{t:st:legend1a}). The lexicons (Tables~\ref{t:st:lexicon0} and \ref{t:st:lexicon1}) and on... | {"hexsha": "06e2d1e4e18dd3170612ee9689548255141cc152", "size": 10486, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "appLex.tex", "max_stars_repo_name": "langsci/Vogt", "max_stars_repo_head_hexsha": "bbec105485e4641c61e0df6157f62dccf61d6f93", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count": 1, "max_st... |
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
## Created by: RainbowSecret
## Microsoft Research
## yuyua@microsoft.com
## Copyright (c) 2018
##
## This source code is licensed under the MIT-style license found in the
## LICENSE file in the root directory of this source tree
##++++... | {"hexsha": "c371e6617a9041f96377af9eeb02b83b94cd8daa", "size": 5471, "ext": "py", "lang": "Python", "max_stars_repo_path": "seg/lib/models/nets/fcnet.py", "max_stars_repo_name": "Frank-Abagnal/HRFormer", "max_stars_repo_head_hexsha": "d7d362770de8648f8e0a379a71cee25f42954503", "max_stars_repo_licenses": ["MIT"], "max_s... |
using BasisFunctions, LinearAlgebra, DomainSets, GridArrays, Test, StaticArrays, FrameFun
@testset begin
B = (Fourier(11) → -1..1)^2
Dom = Disk(0.8)
@test support(dictionary(∂x(random_expansion(extensionframe(B, Dom)))))≈Dom
# @test SamplingStyle(ExtensionFramePlatform(FrameFun.ProductPlatform(Fourier... | {"hexsha": "b5a8cde62f65b02d9884207a8ad679bf601707b7", "size": 3583, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_scenariolist.jl", "max_stars_repo_name": "JuliaApproximation/FrameFun.jl", "max_stars_repo_head_hexsha": "aa4247015d1bc8528514f86d8b6d82e4886b1976", "max_stars_repo_licenses": ["MIT"], "m... |
# Copyright (c) OpenMMLab. All rights reserved.
# In this example, we convert babel120_train to MMAction2 format
# The required files can be downloaded from the homepage of BABEL project
import numpy as np
from mmcv import dump, load
def gen_babel(x, y):
data = []
for i, xx in enumerate(x):
sample = d... | {"hexsha": "3dedc1b31eb316d00722709aa1f2e9e27f419c4d", "size": 770, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/data/skeleton/babel2mma2.py", "max_stars_repo_name": "vineethbabu/mmaction2", "max_stars_repo_head_hexsha": "f2e4289807c95bad7dd83757a49c5d9ebd2f881e", "max_stars_repo_licenses": ["Apache-2.0... |
import argparse
import math
import os
import time
from collections import OrderedDict
import numpy as np
import torch
import torch.nn as nn
import torchvision.transforms as transforms
import matplotlib.pyplot as plt
from matplotlib.ticker import ScalarFormatter, MultipleLocator
from PIL import Image
from models.enet ... | {"hexsha": "03910f43b63baf4d078255fc79d07d429344246f", "size": 7752, "ext": "py", "lang": "Python", "max_stars_repo_path": "profiling.py", "max_stars_repo_name": "jtang10/PyTorch-ENet", "max_stars_repo_head_hexsha": "d407eb6444e12ca5dd0fbe60145ed17440d31db2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
[STATEMENT]
lemma normalize_field [simp]: "normalize (a :: 'a :: {field, semiring_gcd}) = (if a = 0 then 0 else 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. normalize a = (if a = (0::'a) then 0::'a else (1::'a))
[PROOF STEP]
using unit_factor_normalize
[PROOF STATE]
proof (prove)
using this:
?a \<noteq> (0::?'... | {"llama_tokens": 212, "file": "LLL_Basis_Reduction_Missing_Lemmas", "length": 2} |
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 18 17:31:54 2017
@author: ning
"""
import os
import numpy as np
#from sklearn.preprocessing import MinMaxScaler
from mne.decoding import Vectorizer
from sklearn import metrics
import pandas as pd
import pickle
from matplotlib import pyplot as plt
from keras.utils import ... | {"hexsha": "8a93ba4271a526010891d5c5462f0c7c04c8561c", "size": 18176, "ext": "py", "lang": "Python", "max_stars_repo_path": "encoder only 3 (inverse small to large).py", "max_stars_repo_name": "adowaconan/variational_autoencoder_spindles", "max_stars_repo_head_hexsha": "0410fe86372ed50c5d136e7bbb13bbdf4dc4cc7b", "max_s... |
[STATEMENT]
lemma gmctxt_cl_refl:
"funas_gterm t \<subseteq> \<F> \<Longrightarrow> (t, t) \<in> gmctxt_cl \<F> \<R>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. funas_gterm t \<subseteq> \<F> \<Longrightarrow> (t, t) \<in> gmctxt_cl \<F> \<R>
[PROOF STEP]
by (induct t) (auto simp: SUP_le_iff intro!: gmctxt_cl.... | {"llama_tokens": 150, "file": "Regular_Tree_Relations_Util_Ground_Closure", "length": 1} |
# -*- coding: utf-8 -*-
import numpy as np
from copy import deepcopy
from sklearn.cluster import MiniBatchKMeans
from sklearn.cluster import KMeans
from sklearn.tree import DecisionTreeRegressor
from utils.ensemble_model import EnsembleModel
from utils.model_io import save_model
from sklearn.metrics import r2_score
f... | {"hexsha": "6a2768c59ff47cd60d67c8962f03461802ba7df1", "size": 8938, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/learning.py", "max_stars_repo_name": "BuildFL/BuildFL", "max_stars_repo_head_hexsha": "2b9fb786c9655b52d54b53e3efaf25e033a5b532", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "m... |
#! /usr/bin/env python
"""
Script for creating a histogram of the time difference between two triggers
Usage python plot_trigger_time_differences.py PULSEFILE
"""
import numpy as n
import pylab as p
import sys
f = open(sys.argv[1])
triggers = []
last_line = None
this_line = None
ini = True
iniini = True
for lin... | {"hexsha": "6ff42c14acd781ebac8e7358879b633421448b97", "size": 1396, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis_scripts/plot_trigger_time_differences.py", "max_stars_repo_name": "LambdaDigamma/muonic", "max_stars_repo_head_hexsha": "cc242582168101f1ab444ffdc915f8a007078bc4", "max_stars_repo_license... |
import time
import pickle
from numpy import diff, sort, median, array, zeros, linspace
import numpy as np
import matplotlib
matplotlib.use('Agg')
from pystorm.hal import HAL
from pystorm.hal.neuromorph import graph # to describe HAL/neuromorph network
from pystorm.PyDriver import bddriver as bd
HAL = HAL()
CORE_ID = ... | {"hexsha": "fe3fb49b6906d466a73492f3887717f6cd8a5668", "size": 7166, "ext": "py", "lang": "Python", "max_stars_repo_path": "pystorm/examples/test_adc.py", "max_stars_repo_name": "Stanford-BIS/pystorm", "max_stars_repo_head_hexsha": "4acaaee78a04b69ad17554126018016800e5a140", "max_stars_repo_licenses": ["MIT"], "max_sta... |
# Install python 3, duh!
# Run the command below in a cmd window to install the needed packages, without the #, duh!
# pip install bs4 requests pandas openpyxl lxml html5lib
# Run the python file with the included batch file, DUH!
try:
# Error handling if something happens during script initialisation
from csv... | {"hexsha": "61827a2b6f82e9372ae78b5733250a95b4b1c740", "size": 12314, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scrape the Ducanator.py", "max_stars_repo_name": "BaconCatBug/Scrape-the-Ducanator", "max_stars_repo_head_hexsha": "14c0a3e1ac9a78c57a4bce331f8dfbab79ec90cd", "max_stars_repo_licenses": ["Unlicen... |
import numpy
from scipy.ndimage import shift
from skimage.exposure import rescale_intensity
from aydin.features.groups.translations import TranslationFeatures
from aydin.io.datasets import camera
def n(image):
return rescale_intensity(
image.astype(numpy.float32), in_range='image', out_range=(0, 1)
)... | {"hexsha": "948c3b4484f019f4e52b2c150e7ab813aa5a5180", "size": 1319, "ext": "py", "lang": "Python", "max_stars_repo_path": "aydin/features/groups/test/test_translation_feature_group.py", "max_stars_repo_name": "royerloic/aydin", "max_stars_repo_head_hexsha": "f9c61a24030891d008c318b250da5faec69fcd7d", "max_stars_repo_l... |
#include <cstdlib>
#include <ctime>
#include <chrono>
#include <iostream>
#include <unordered_set>
#include <boost/program_options.hpp>
#include "../yche_refactor/bprw_yche.h"
#include "../yche_refactor/simrank.h"
using namespace std;
using namespace std::chrono;
using namespace boost::program_options;
void test_b... | {"hexsha": "ee607c646da2a3ffd18dd72ec37bcbbecde1ee07", "size": 1819, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "LPMC-Profile/playground/main_bprw.cpp", "max_stars_repo_name": "CheYulin/SimRankRelease", "max_stars_repo_head_hexsha": "f05cce8664d0ba754020abb39405ae49857c3b0d", "max_stars_repo_licenses": ["MIT"]... |
Eric Price
yes that is his name.
He is a student of music at UC Davis. Hes active in many of the musical efforts that this town puts forth.
His instrument is the bass.
Currently Eric is working with the University Symphony Orchestra UC Davis Symphony and serving as Music Manager. Also he plays with local band The ... | {"hexsha": "c4de1af36eed9cfdd6f7cfe012c281e7755e9e80", "size": 720, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/EricPrice.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
%%*************************************************************************
%% mybicgstab
%%
%% [xx,resnrm,flag] = mybicgstab(A,b,M1,tol,maxit)
%%
%% iterate on bb - (M1)*AA*x
%%
%% r = b-A*xtrue;
%%
%%*************************************************************************
function [xx,resnrm,flag] = mybicgstab(A,b... | {"author": "zarathustr", "repo": "LibQPEP", "sha": "99e5c23e746ace0bac4a86742c31db6fcf7297ba", "save_path": "github-repos/MATLAB/zarathustr-LibQPEP", "path": "github-repos/MATLAB/zarathustr-LibQPEP/LibQPEP-99e5c23e746ace0bac4a86742c31db6fcf7297ba/MATLAB/sdpt3/Solver/mybicgstab.m"} |
from typing import List
import math
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from oolearning.enums.Metric import Metric
from oolearning.evaluators.CostFunctionMixin import CostFunctionMixin
from oolearning.evaluators.ScoreBase import ScoreBase
from oolearning.model_processors.GridSearchT... | {"hexsha": "37b6e93d7628670937f01a5d0e8529f6c496f6f1", "size": 12350, "ext": "py", "lang": "Python", "max_stars_repo_path": "oolearning/model_processors/SearcherResults.py", "max_stars_repo_name": "shane-kercheval/oo-learning", "max_stars_repo_head_hexsha": "9e3ebe5f7460179e23f6801bc01f1114bb896dea", "max_stars_repo_li... |
SUBROUTINE getfsq_par(gcr, gcz, gnormr, gnormz, gnorm, medge)
USE vmec_main, ONLY: rprec, ns, ns1, mnsize
USE vmec_params, ONLY: ntmax
USE parallel_include_module
IMPLICIT NONE
!-----------------------------------------------
! D u m m y A r g u m e n t s
!-----------------------------... | {"hexsha": "8661c6fe4ee48292a4291b49d085fba99b228cc7", "size": 2160, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "VMEC2000/Sources/General/getfsq.f", "max_stars_repo_name": "joseluisvelasco/STELLOPT", "max_stars_repo_head_hexsha": "e064ebb96414d5afc4e205f43b44766558dca2af", "max_stars_repo_licenses": ["MIT"],... |
\subsection{Commands}\label{subsec:steps_commands}
Commands are wrappers for the programs normally used in the pipeline: \shell{g++}, \shell{diff}, etc.
They take care of making sure that every dependency is properly set up, and reporting the execution status back to
the \hyperref[sec:environments]{environm... | {"hexsha": "5d2fa484a923b6b9e90233cb9dadaa43ffc87442", "size": 15443, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/sections/steps_commands.tex", "max_stars_repo_name": "zielinskit/kolejka-judge", "max_stars_repo_head_hexsha": "571df05b12c5a4748d7a2ca4c217b0042acf6b48", "max_stars_repo_licenses": ["MIT"], "m... |
from datetime import datetime
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
# Question 1
df = pd.read_excel('Covid19IndiaData_30032020.xlsx')
MAX = max(df['Age']) + 1
infected = [0] * MAX
recovered = [0] * MAX
dead = [0] * MAX
infected_males = [0] * MAX
infected_females = [0] * MAX
avg_in... | {"hexsha": "c10d638a43ac88945bba27909add110f01321c2f", "size": 5983, "ext": "py", "lang": "Python", "max_stars_repo_path": "IC252/Lab 6/Analyse_Covid_Data.py", "max_stars_repo_name": "anu2kool/MyPythonScripts", "max_stars_repo_head_hexsha": "954312e3a9422620056af145faa041cba5624329", "max_stars_repo_licenses": ["MIT"],... |
# State-dependent version of the Q(\sigma) algorithm in the control task
# The Stochastic Windy Grid world from DeAsis et al.(2018)
import numpy as np
gamma, epsilon, N_x, N_y, N_a, Reward, N_episodes, N_runs=1, 0.1, 6, 9, 4, -1, 100, 100
i_start,j_start,i_end,j_end=3,0,3,7
wind=np.array([0,0,0,1,1,1,2,2,1,0])
action... | {"hexsha": "54988d1256b82ce93239953ef66cc2b844fd354f", "size": 6328, "ext": "py", "lang": "Python", "max_stars_repo_path": "Stochastic_Windy_Gridworld.py", "max_stars_repo_name": "NikolayGudkov/Unifying-algorithms-for-multi-step-reinforcement-learning", "max_stars_repo_head_hexsha": "4195234e1f89413a0b63c83c656e1cbed5e... |
import numpy as np
import pandas as pd
from matplotlib import gridspec
from matplotlib import pyplot as plt
from abc import ABCMeta, abstractmethod
from sklearn.utils.extmath import softmax
from sklearn.preprocessing import LabelBinarizer
from sklearn.utils.validation import check_is_fitted
from sklearn.utils import c... | {"hexsha": "b454731de7f6aa7a081b7b13d3ba9938fcbc2f41", "size": 10510, "ext": "py", "lang": "Python", "max_stars_repo_path": "statsgaim/smspline_bigspline.py", "max_stars_repo_name": "SelfExplainML/GAIM", "max_stars_repo_head_hexsha": "320184ff3e0ddd9bc031dfddfd3d30c342421d8f", "max_stars_repo_licenses": ["BSD-3-Clause"... |
# Enter your code here
n = parse(Int, readline())
arr = parse.(Int,split(readline()))
numswaps = 0
for i = 1:n
for j = 1:n-1
if arr[j]>arr[j+1]
dummy = arr[j]
arr[j] = arr[j+1]
arr[j+1] = dummy
numswaps += 1
end
end
end
print("Array is sorted in $... | {"hexsha": "1ba4eb6aa25d59fc713b80f74c531bc7a639408f", "size": 424, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Hackerrank/30 Days of Code/Julia/day 20.jl", "max_stars_repo_name": "Next-Gen-UI/Code-Dynamics", "max_stars_repo_head_hexsha": "a9b9d5e3f27e870b3e030c75a1060d88292de01c", "max_stars_repo_licenses": ... |
'''
'''
import json
import logging
from collections import namedtuple
from datetime import datetime
from pathlib import Path
from PIL import Image
import numpy as np
import cv2
from ..baseStrategy import baseStrategy
from ....common import id2rgb, write_to_json
logger = logging.getLogger("superannotate-python-sdk")
... | {"hexsha": "9ece458cd6b6c334cdeb47abca3acdae468b2dbe", "size": 10803, "ext": "py", "lang": "Python", "max_stars_repo_path": "superannotate/input_converters/converters/coco_converters/coco_converter.py", "max_stars_repo_name": "dskkato/superannotate-python-sdk", "max_stars_repo_head_hexsha": "67eece2d7d06375ad2e502c2282... |
import matplotlib.pyplot as plt
'''
import numpy as np
x=np.array([10,15,20,22.5,30],float)
y=np.array([227.04,362.78,517.35,602.97,901.67],float)
# plt.plot(x,y)
# plt.show()
x1=[-1,0,1,2]
y1=[3,-4,5,6]
plt.plot(x1,y1)
plt.show()
x2=[1,2,3,4,5,6,7]
y2=[-1.5,-1,0.5,0.25,1,1.65,2.5]
plt.plot(x2,y2)
#... | {"hexsha": "6edc2723b0afa886cd02f4ca24d9d0f24fe38b76", "size": 5247, "ext": "py", "lang": "Python", "max_stars_repo_path": "Numerical_Methods_Physics/Newton_div_Diff_Poly_Method.py", "max_stars_repo_name": "Simba2805/Computational_Physics_Python", "max_stars_repo_head_hexsha": "be687939c16a1d08066939830ac31ba666a3e1bb"... |
import xarray as xr
import numpy as np
from scipy import stats
from os.path import join
from ..settings import *
# compute lat-lon average on both icefields at the same time
def average_icefields_data(npi_dataarray, spi_dataarray):
# reshape arrays for averaging
x = npi_dataarray.values
m2d_npi = np.m... | {"hexsha": "c85797a1d3a18b3c0f687a52778fb98a429103de", "size": 2873, "ext": "py", "lang": "Python", "max_stars_repo_path": "processing/processing/utils/icefields.py", "max_stars_repo_name": "tomescaff/patagonia", "max_stars_repo_head_hexsha": "4bcb1ad38e87a58db6ea60bf36bc01a76ed930a1", "max_stars_repo_licenses": ["MIT"... |
#!/usr/bin/python
# developer: Ahmed Taha Elthakeb
# email: (a1yousse@eng.ucsd.edu)
"""
[21-oct-2018]
- test case: alexnet
- changing reward function to be func(val_acc + train_acc) on 10k images
"""
from __future__ import division
import pandas as pd
import numpy as np
import tensorflow as tf
impor... | {"hexsha": "435447166cfbbbf89de904411a4a1f8161cbebe4", "size": 52939, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/examples/classifier_compression/sinreq_v2_svhn_runcode/evaluate_svhn_sin2.py", "max_stars_repo_name": "he-actlab/waveq.code", "max_stars_repo_head_hexsha": "024d55af6d989d4074d3e555d03b76a2f... |
Jack Zwald is a Sophomore International Relations major and a UC Davis Chinese Program Chinese Minors minor. He is also the current Campaign Director for the Davis College Democrats, a former intern for ASUCD Senator Andrew Peake, the former Voter Registration Coordinator for the Office of University Affairs, and the V... | {"hexsha": "526a4ec9e21f8b6f085dc7fd02598d52c6f418de", "size": 1094, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/JackZwald.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
\chapter{Introduction}
\label{chap:intro}
This document is intended both as a thesis template and a written tutorial on typesetting a professional looking academic document. The style of the template is designed to mimic an equivalent LaTeX document template that is commonly used for within the Computer Vision and ... | {"hexsha": "594cf74df3ed2d9c65e5df1139af8117aed49a31", "size": 2714, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "thesis-templates/LaTeX/chapter/thesis_intro.tex", "max_stars_repo_name": "CS-Swansea/Computer-Vision-and-Machine-Learning-Wiki", "max_stars_repo_head_hexsha": "490cb0bdbf0ae62dc541b743a1e48cf530be34... |
module failing_case_test
use example_asserts_m, only: &
FAILURE_MESSAGE, &
NUM_ASSERTS_IN_FAILING, &
NUM_FAILING_ASSERTS_IN_FAILING, &
SUCCESS_MESSAGE
use example_cases_m, only: &
example_failing_test_case, &
EXAMPLE_DESCRIPTION
use hel... | {"hexsha": "18fc31ce5bb3464dd6e5ce61fed909085ccb90db", "size": 8709, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/failing_case_test.f90", "max_stars_repo_name": "everythingfunctional/vegetables", "max_stars_repo_head_hexsha": "5625f1f3e318fb301d654e7875e254fa3e0cc4a1", "max_stars_repo_licenses": ["MIT"... |
[STATEMENT]
lemma seq_meas_props:
shows "incseq seq_meas \<and> range seq_meas \<subseteq> pos_img \<and>
\<Squnion> pos_img = \<Squnion> range seq_meas"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. incseq seq_meas \<and> range seq_meas \<subseteq> pos_img \<and> \<Squnion> pos_img = \<Squnion> range seq_me... | {"llama_tokens": 2743, "file": "Hahn_Jordan_Decomposition_Hahn_Jordan_Decomposition", "length": 24} |
# -*- coding: utf-8 -*-
"""main_rungekutta_multivar.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1sSdGdMNuQTa5rDS_zCCKfyVvoElMFITh
"""
from sympy import *
from math import *
import sys
from lib_rungekutta import *
"""# Phương pháp Runge - K... | {"hexsha": "0ae38e6d8f361d0d84272941ee2986325321b5df", "size": 2628, "ext": "py", "lang": "Python", "max_stars_repo_path": "Topic 5 - Solving Differential Equations/28.Runge_Kutta/R-K system of equation/main_rungekutta_multivar.py", "max_stars_repo_name": "Talented-K64MI/MI3040-Numerical-Analysis", "max_stars_repo_head... |
'''
Copyright 2017 TensorFlow Authors and Kent Sommer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | {"hexsha": "e68c7c7aac4290e56067a0892a962e239de8623a", "size": 10206, "ext": "py", "lang": "Python", "max_stars_repo_path": "inception_v4.py", "max_stars_repo_name": "lvwuyunlifan/crop", "max_stars_repo_head_hexsha": "7392d007a8271ff384c5c66ed5717afbc4172b4d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count... |
[STATEMENT]
lemma residue_simple_pole:
assumes "isolated_singularity_at f z0"
assumes "is_pole f z0" "zorder f z0 = - 1"
shows "residue f z0 = zor_poly f z0 z0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. residue f z0 = zor_poly f z0 z0
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
isol... | {"llama_tokens": 221, "file": null, "length": 2} |
#!/usr/bin/python
import numpy
from numpy import savetxt
import matplotlib
from matplotlib import pyplot
import scipy
from scipy import interpolate
from matplotlib.ticker import MultipleLocator, FormatStrFormatter
s = matplotlib.font_manager.FontProperties()
s.set_family('serif')
s.set_size(14)
from matplotlib import r... | {"hexsha": "6a5543c78ac8505938c79da43ebe10a5031b2452", "size": 2287, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/makeplot_chi_general.py", "max_stars_repo_name": "HWRix/TheCannon", "max_stars_repo_head_hexsha": "d4c059e63b61be8cf9327b51970041898a4f4212", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import os
import argparse
import re
from glob import glob
import numpy
from matplotlib import pyplot
class DataObject(object):
def __init__(self, file_pattern, log_pattern):
self.files = glob(file_pattern)
self.regex = re.compile(log_pattern)
self.data_dict = {}
for file in self.... | {"hexsha": "ba5224f5fde55ce746d3917975bcd58482825d7f", "size": 1225, "ext": "py", "lang": "Python", "max_stars_repo_path": "ifp_toolbox/scripts/log_plotter.py", "max_stars_repo_name": "ifp-uiuc/ifp_toolbox", "max_stars_repo_head_hexsha": "e03472d06329aad1ba86e0d037e16cf7af195cd3", "max_stars_repo_licenses": ["BSD-3-Cla... |
/*
* phold.hpp
*
* Copyright (c) 2016 Masatoshi Hanai
*
* This software is released under MIT License.
* See LICENSE.
*
*/
#ifndef PHOLD_PHOLD_HPP_
#define PHOLD_PHOLD_HPP_
#include <random>
#include <string>
#include <boost/serialization/serialization.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/m... | {"hexsha": "65d45fce27c239419e7da186e9ce5a093343f856", "size": 9813, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/phold/phold.hpp", "max_stars_repo_name": "asia-lab-sustech/ScaleSim", "max_stars_repo_head_hexsha": "614869fe9ff2092e6c1f219cbcf44391118517d5", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
#emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
#ex: set sts=4 ts=4 sw=4 noet:
__author__ = 'Yaroslav Halchenko'
__copyright__ = 'Copyright (c) 2013 Yaroslav Halchenko'
__license__ = 'MIT'
import numpy as np
test_variable = "just so we could check if things are loaded/ava... | {"hexsha": "c30188960ee11e8fb6e3b236d895631670aa0efb", "size": 338, "ext": "py", "lang": "Python", "max_stars_repo_path": "vbench/tests/vbenchtest/vb_common.py", "max_stars_repo_name": "DataDog/vbench", "max_stars_repo_head_hexsha": "a4e4497bed2778989fb714c2537cff03438e9ae6", "max_stars_repo_licenses": ["MIT"], "max_st... |
{-# OPTIONS --without-K #-}
module PathStructure.Coproduct {a b} {A : Set a} {B : Set b} where
open import Equivalence
open import PathOperations
open import Types
-- We need to use Lift here, because Agda doesn't have
-- cumulative universes.
F : A ⊎ B → A ⊎ B → Set (a ⊔ b)
F = case (λ _ → A ⊎ B → Set _)
(λ a₁ → c... | {"hexsha": "98cf757193b5f86df3ebd2355b3d622fe1455360", "size": 1939, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/PathStructure/Coproduct.agda", "max_stars_repo_name": "vituscze/HoTT-lectures", "max_stars_repo_head_hexsha": "7730385adfdbdda38ee8b124be3cdeebb7312c65", "max_stars_repo_licenses": ["BSD-3-Cla... |
abstract type Ordering end
Base.iterate(ordering::Ordering, state = 0) = state > 0 ? nothing : (ordering, state + 1)
Base.length(ordering::Ordering) = 1
Base.show(io::IO, ordering::Ordering) = print(io, string(ordering))
Base.show(io::IO, ::MIME"application/prs.juno.inline", ordering::Ordering) = print(io, string(ord... | {"hexsha": "72cf1bda44e1c1b19cb71716618be780ae8705f7", "size": 3176, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/orderings/Ordering.jl", "max_stars_repo_name": "JuliaTagBot/bad.jl", "max_stars_repo_head_hexsha": "7cccc038b65e4d6e923221064c20b361466e21cf", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
! MAIN.F
! **********************************************************************
! "PARAMETERS"
! R= GAS CONSTANT KCAL/(MOL-K)
! D0= FREQUENCY FACTOR (1/SEC)
! "INPUT"
! NUSA=# OF SAMPLES
! NSAMP=# OF DIFFERENT DIFF. DOMAINs
! E= ACTIVATION ENERGY (KCAL/MOL)
! ORD = LOG (Doi/Ro**2)
! C(J)= VOL. FRAC.... | {"hexsha": "117f665c235bdaff9de3d7dcf6e85eb4bf944d2e", "size": 29649, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "resources/lovera/src/py3/autoarr_py.f90", "max_stars_repo_name": "ASUPychron/pychron", "max_stars_repo_head_hexsha": "dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76", "max_stars_repo_licenses": ["Apa... |
[STATEMENT]
lemma analz_insert_freshK:
"[| evs \<in> recur; KAB \<notin> range shrK |]
==> (Key K \<in> analz (insert (Key KAB) (spies evs))) =
(K = KAB | Key K \<in> analz (spies evs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>evs \<in> recur; KAB \<notin> range shrK\<rbrakk> \<... | {"llama_tokens": 228, "file": null, "length": 1} |
module independent
using QuantumOpticsBase
using ..interaction, ..system
import ..integrate
# Define Spin 1/2 operators
spinbasis = SpinBasis(1//2)
sigmax_ = sigmax(spinbasis)
sigmay_ = sigmay(spinbasis)
sigmaz_ = sigmaz(spinbasis)
sigmap_ = sigmap(spinbasis)
sigmam_ = sigmam(spinbasis)
I_spin = identityoperator(spi... | {"hexsha": "cbe6edd9c96c5f0907338f797bbc64454d52e288", "size": 3619, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/independent.jl", "max_stars_repo_name": "taylorpatti/CollectiveSpins.jl", "max_stars_repo_head_hexsha": "ef3bcd8f4efcf87165c44f2bd9dd21b574f55755", "max_stars_repo_licenses": ["MIT"], "max_star... |
[STATEMENT]
lemma diffconst_result_correct:"proof_result DiffConstProof = ([], ([],[Equals (Differential (Const 0)) (Const 0)]))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. proof_result DiffConstProof = ([], [], [Equals (Differential (Const 0)) (Const 0)])
[PROOF STEP]
by(auto simp add: prover DiffConstProof_def... | {"llama_tokens": 118, "file": "Differential_Dynamic_Logic_Proof_Checker", "length": 1} |
/*
* smack-ms - split mapping check "Multisplice Edition"
*
* Created by David Brawand on 04.05.10.
* Copyright 2010 UNIL. All rights reserved.
*
*/
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <vector>
#include <unistd.h>
#include <time.h>
#include ... | {"hexsha": "e0ba309ae2868e791465181850285608081cc431", "size": 10333, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/smack-ms/main.cpp", "max_stars_repo_name": "preciserobot/rex", "max_stars_repo_head_hexsha": "91b58e22ea45b56b01a2cdd2ea63b253c9edc467", "max_stars_repo_licenses": ["BSD-4-Clause-UC"], "max_sta... |
/*=============================================================================
Copyright (c) 2016 Paul Fultz II
noexcept.hpp
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)
===============================... | {"hexsha": "c7078a8b279f79c1adad5e9cdcb670731cf8e906", "size": 637, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ReactNativeFrontend/ios/Pods/boost/boost/hof/detail/noexcept.hpp", "max_stars_repo_name": "Harshitha91/Tmdb-react-native-node", "max_stars_repo_head_hexsha": "e06e3f25a7ee6946ef07a1f524fdf62e48424293... |
# This code has overlap parts with prep_sent.py
import nltk
from nltk.tokenize import word_tokenize
from nltk.tag import StanfordPOSTagger
from tqdm import tqdm
import numpy as np
import os
import csv
import sys
import math
from sentence_transformers import SentenceTransformer
from nltk.stem import WordNet... | {"hexsha": "b2e80f50be78ce277b6525a086426436a01de14c", "size": 6663, "ext": "py", "lang": "Python", "max_stars_repo_path": "SentiLARE/preprocess/aspect_utils.py", "max_stars_repo_name": "authorAnonymousGit/WOCEL", "max_stars_repo_head_hexsha": "5edcf1c0cce07c8280ef3c10c9e01ad0d2643885", "max_stars_repo_licenses": ["Apa... |
"""
Augmenters that apply artistic image filters.
List of augmenters:
* :class:`Cartoon`
Added in 0.4.0.
"""
from __future__ import print_function, division, absolute_import
import numpy as np
import cv2
from imgaug.imgaug import _normalize_cv2_input_arr_
from . import meta
from . import color as colorlib
fr... | {"hexsha": "0a84d473c2253d7e00a71093203efd0c63ece40d", "size": 15813, "ext": "py", "lang": "Python", "max_stars_repo_path": "imgaug/augmenters/artistic.py", "max_stars_repo_name": "Darktex/imgaug", "max_stars_repo_head_hexsha": "2bbe47eff8c2ec8b9ee1360474de25a786a9ec9a", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
# -*- coding: utf-8 -*-
import os
import pickle
import numpy as np
import cv2
import torch
from torch.utils import data
import torchvision.transforms as transforms
class Lighting(object):
"""Lighting noise(AlexNet - style PCA - based noise)"""
def __init__(self):
self.alphastd = 0.1
self.ei... | {"hexsha": "9aa717c60b36a2dbe762be6693fc05c148ae5f9e", "size": 15465, "ext": "py", "lang": "Python", "max_stars_repo_path": "loader/KITTI15Mask.py", "max_stars_repo_name": "YaoChengTang/DecNet", "max_stars_repo_head_hexsha": "b623ac8d0505ec68eb930ad7a21fe9d84dd07543", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
[STATEMENT]
lemma has_derivative_imp_has_field_derivative:
"(f has_derivative D) F \<Longrightarrow> (\<And>x. x * D' = D x) \<Longrightarrow> (f has_field_derivative D') F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>(f has_derivative D) F; \<And>x. x * D' = D x\<rbrakk> \<Longrightarrow> (f has_field... | {"llama_tokens": 272, "file": null, "length": 2} |
# coding: UTF-8
"""
@author: samuel ko
@date: 2019.05.03
@func: style loss(ssim and its multiple variants.)
"""
import os
from math import exp
import cv2
import numpy as np
import torch
import torch.nn.functional as F
from torch.autograd import Variable
from torch.nn import Conv2d
from tools.prnet_loss im... | {"hexsha": "0bd50c4ef65ffc3ab819bd9b05f5369719bf4295", "size": 6593, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo/face/utils/losses.py", "max_stars_repo_name": "shachargluska/centerpose", "max_stars_repo_head_hexsha": "01c2c8bfa9d3ee91807f2ffdcc48728d104265bd", "max_stars_repo_licenses": ["MIT"], "max_st... |
from __future__ import absolute_import
import torch
import torch.nn as nn
import numpy as np
import numpy.random as npr
from ..utils.config import cfg
from .bbox_transform import bbox_overlaps_batch, bbox_transform_batch
import pdb
class _ProposalTargetLayer(nn.Module):
"""
Assign object detection proposals t... | {"hexsha": "d9f462e0c208249634bfb47316eef3da3a13b337", "size": 9368, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/model/rpn/proposal_target_layer.py", "max_stars_repo_name": "strongwolf/CDG", "max_stars_repo_head_hexsha": "a78864ca3519de77deb60a11f68059b76e076b5c", "max_stars_repo_licenses": ["MIT"], "max... |
#!/usr/bin/env python
import os
import numpy as np
from gmprocess.io.renadic.core import is_renadic, read_renadic
from gmprocess.utils.test_utils import read_data_dir
def test_renadic():
datafiles, origin = read_data_dir("renadic", "official20100227063411530_30")
# make sure format checker works
assert... | {"hexsha": "12dc2bc32cfdfe2ec2fbe7f3276dc15434cf275c", "size": 1174, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/gmprocess/io/renadic/renadic_test.py", "max_stars_repo_name": "baagaard-usgs/groundmotion-processing", "max_stars_repo_head_hexsha": "6be2b4460d598bba0935135efa85af2655578565", "max_stars_re... |
__author__ = 'mangalbhaskar'
__version__ = '1.0'
"""
# Utility functions
# --------------------------------------------------------
# Copyright (c) 2020 mangalbhaskar
# Licensed under [see LICENSE for details]
# Written by mangalbhaskar
# --------------------------------------------------------
"""
import os
import sys... | {"hexsha": "37085c0cc972018fc7be682a0ddf761825f034d1", "size": 35465, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/falcon/arch/Model.py", "max_stars_repo_name": "Roy-Tuhin/maskrcnn_sophisticate-", "max_stars_repo_head_hexsha": "a5a2300abbe2633d66847cdbfa7ed2bc2f901ec3", "max_stars_repo_licenses": ["Apach... |
from logging import getLogger, StreamHandler, INFO
import unittest
import numpy as np
#import openjij as oj
import cxxjij.graph as G
import cxxjij.system as S
import cxxjij.algorithm as A
import cxxjij.utility as U
import cxxjij.result as R
class CXXTest(unittest.TestCase):
def setUp(self):
self.size =... | {"hexsha": "812b6492167dd49de5d5485a89a3b56c8ab1df45", "size": 25187, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test.py", "max_stars_repo_name": "OpenJij/OpenJij", "max_stars_repo_head_hexsha": "9ed58500ef47583bc472410d470bb2dd4bfec74a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 6... |
import os, sys
import numpy as np
import csv
def load_data(seed=0):
d = os.path.dirname(sys.modules['jpdatasets'].__file__)
file_path = os.path.join(d, 'data/polarity.csv')
with open(file_path) as f:
r = csv.reader(f, delimiter=",", doublequote=True, lineterminator="\r\n", quotechar='"', skipiniti... | {"hexsha": "b60a979d37de9264f82cac56661e58376a2e88a1", "size": 695, "ext": "py", "lang": "Python", "max_stars_repo_path": "jpdatasets/polarity.py", "max_stars_repo_name": "harada4atsushi/jp-datasets", "max_stars_repo_head_hexsha": "d5649f3de67a9df28666671c349cd7bebdebe1fc", "max_stars_repo_licenses": ["MIT"], "max_star... |
module dg2d_problem
use fsystem
use storage
implicit none
real(dp), parameter :: g = 1.0_dp
contains
! This function returns the Roe mean values
function calculateQroe(Ql, Qr) result(Qroe)
! The left and right Q values
! The solution components q1 = h, q2 = uh, q3 = vh
real(DP), dimens... | {"hexsha": "aa53a94c79572a3b2d15adb50091a996ef241523", "size": 69157, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "area51/dg_conslaw/src/dg2d_problem.f90", "max_stars_repo_name": "tudo-math-ls3/FeatFlow2", "max_stars_repo_head_hexsha": "56159aff28f161aca513bc7c5e2014a2d11ff1b3", "max_stars_repo_licenses": [... |
using PyCall, Compat
using Compat.Test, Compat.Dates, Compat.Serialization
filter(f, itr) = collect(Iterators.filter(f, itr))
filter(f, d::AbstractDict) = Base.filter(f, d)
PYTHONPATH=get(ENV,"PYTHONPATH","")
PYTHONHOME=get(ENV,"PYTHONHOME","")
PYTHONEXECUTABLE=get(ENV,"PYTHONEXECUTABLE","")
Compat.@info "Python vers... | {"hexsha": "282c23f1de07814af45385bbe08cd507412b88c5", "size": 20645, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "schmrlng/PyCall.jl", "max_stars_repo_head_hexsha": "2673bfe7559ff9d7bd9056e58f08e6ed160cb737", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
""""
Python Class with dedicated utilities/methods to analyse Gaia DR3 samples
Héctor Cánovas Oct 2019 - now
"""
import glob, warnings, getpass
import numpy as np
from astropy import units as u
from astropy.coordinates import SkyCoord
from astropy.table import Table, MaskedColumn
from... | {"hexsha": "22284b0c261b76e91224b9df4d95d3a7002d73e7", "size": 9479, "ext": "py", "lang": "Python", "max_stars_repo_path": "pangaia/utils.py", "max_stars_repo_name": "hectorcanovas/PanGaia", "max_stars_repo_head_hexsha": "cb5aa46efdf3056d22a38dd581f5522118fc99d9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
function spiral_matrix(n)
end
| {"hexsha": "15461952a35ad750187adeea091af71bcbdae2c5", "size": 31, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "exercises/spiral-matrix/spiral-matrix.jl", "max_stars_repo_name": "tomerarnon/julia-1", "max_stars_repo_head_hexsha": "6313e702d82f4fee10efdf29e943df50857cd7b5", "max_stars_repo_licenses": ["MIT"], "... |
#!/usr/bin/python
"""Loads a single video and returns action predictions"""
import numpy as np
import tensorflow as tf
from video_utils import *
import i3d
_IMAGE_SIZE = 224
_NUM_CLASSES = 400
_SAMPLE_VIDEO_FRAMES = 79
_SAMPLE_PATHS = {
'rgb': 'data/v_CricketShot_g04_c01_rgb.npy',
'flow': 'data/v_CricketShot... | {"hexsha": "787827100da764f7b109a6c85fadb5c2812755d0", "size": 3290, "ext": "py", "lang": "Python", "max_stars_repo_path": "depreciated/test_single_video.py", "max_stars_repo_name": "vijayvee/behavior-recognition", "max_stars_repo_head_hexsha": "76eeeb27c2e64f34d0b17884a183fcb346f5634b", "max_stars_repo_licenses": ["Ap... |
# Based on notebooks (Compute Covariance.ipnyb and Covariance Analysis.ipnyb) and utilities.py
# from: https://github.com/LukasMosser/PorousMediaGan/tree/master/code/notebooks/covariance
# Compute covariance and perform analysis
import numpy as np
import tifffile
from utils import two_point_correlation
import pandas... | {"hexsha": "d25deae11a22086d8d7a0f5dbe5ca28b4c2114d3", "size": 7902, "ext": "py", "lang": "Python", "max_stars_repo_path": "covariance.py", "max_stars_repo_name": "supri-a/RockFlow", "max_stars_repo_head_hexsha": "bb325dbd8cfcfe6a431fe669a33fd0796683c307", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_... |
library(ggplot2)
library(tidyr)
library(dplyr)
library(cowplot)
library(readr)
library(ggbeeswarm)
theme_set(theme_bw())
options(stringsAsFactors=F)
library(argparser)
p <- arg_parser("ddOWL mutatation allele phasing and plotting tools, v0.1 - Nils Koelling")
p <- add_argument(p, "FAMILIES", help="families file")
p <-... | {"hexsha": "3501ab6129d386f08689f2b3b1b3bba438118095", "size": 12737, "ext": "r", "lang": "R", "max_stars_repo_path": "phaser.r", "max_stars_repo_name": "koelling/ddowl", "max_stars_repo_head_hexsha": "ff9a0fa40768c7efd8e0218da12c63ead1743c26", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1, "max_stars... |
import numpy as np
import tfunet
from tfunet.image.generator import GrayScaleDataProvider
from tfunet.train import Trainer
np.random.seed(2018)
generator = GrayScaleDataProvider(nx=572, ny=572, cnt=20, rectangles=False)
print(f"n_channels: {generator.channels}")
print(f"n_classes: {generator.n_class}")
net = t... | {"hexsha": "df6fae1761aade251f77e9308718931745947e92", "size": 788, "ext": "py", "lang": "Python", "max_stars_repo_path": "tfunet/scripts/demo.py", "max_stars_repo_name": "aidinhass/tgs-salt-challenge", "max_stars_repo_head_hexsha": "707a64dd33e8d09b483cf44132bb156c27151da4", "max_stars_repo_licenses": ["MIT"], "max_st... |
Require Import Coq.Setoids.Setoid.
Require Import List.
Require Import JamesTactics.
Require Import Misc.
Require Import ListEx.
Require Import EqDec.
Require Import Enumerable.
Import ListNotations.
Class SpaceSearch := {
Space : Type -> Type;
empty : forall {A}, Space A;
single : forall {A}, A -> Space A;
un... | {"author": "konne88", "repo": "CoqStdlib", "sha": "ffac367394a6c9ed9a84e403682c09de90806e4b", "save_path": "github-repos/coq/konne88-CoqStdlib", "path": "github-repos/coq/konne88-CoqStdlib/CoqStdlib-ffac367394a6c9ed9a84e403682c09de90806e4b/SpaceSearch.v"} |
\subsection{Cosmic ray signal removal}
\label{subsec:spike_removal}
Raman scattering is a weak phenomenon, and therefore its measurements need to
be performed using very sensitive detectors.
Hand in hand with sensitivity also comes susceptibility to artifacts
caused by signals originating from different sources than t... | {"hexsha": "2520d5e6ba1e0fdb82ae852f82429d6ea7206711", "size": 3348, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/results_and_discussion/spike_removal.tex", "max_stars_repo_name": "lumik/phd_thesis", "max_stars_repo_head_hexsha": "3b29f24732d49b64c627aeb8f6585f042cd59c4e", "max_stars_repo_licenses": ["CC-BY... |
# Author: Lukasz Bratos
# Funkcja f wyliczajaca wartosc dla danego x
function f(x :: Float64)
return sqrt(x^2 + one(Float64)) - one(Float64)
end
# Funkcja g wyliczajaca wartosc dla danego x
function g(x :: Float64)
return x^2 / (sqrt(x^2 + one(Float64)) + one(Float64))
end
# Wypisywanie wartości w formacie p... | {"hexsha": "e506ac49c78d033f493926d235de5909cac9098c", "size": 535, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "list1/task6.jl", "max_stars_repo_name": "luk9400/on", "max_stars_repo_head_hexsha": "0f35fb60d020c065c96c54893161a3c41ab77acb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star... |
SUBROUTINE MCFIT(LOUT)
LOGICAL IERR
! KERR = KERR.OR.IERR
IF (IERR) WRITE (LOUT,8000)
8000 FORMAT (10X, 'ERROR IN CKXNUM READING FROM TRANSPORT DATA BASE')
END
| {"hexsha": "d2a732e325f73bba7105162e1fefd3202368a317", "size": 189, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "tests/CompileTests/Fortran_tests/test2007_223.f", "max_stars_repo_name": "maurizioabba/rose", "max_stars_repo_head_hexsha": "7597292cf14da292bdb9a4ef573001b6c5b9b6c0", "max_stars_repo_licenses": ["... |
import init
import pandas as pd
import constants as cn
from support import coordinate
from dateutil import parser
import datetime as dt
import support.seamo_exceptions as se
import numpy as np
"""
Trip base class.
A trip is one of the base inputs for the Mobility Index. This class is created to facilitate
the... | {"hexsha": "12e68d7b52f45de8a947122cb5dc4290b858fb4f", "size": 8780, "ext": "py", "lang": "Python", "max_stars_repo_path": "seamo/support/trip.py", "max_stars_repo_name": "amandalynne/Seattle-Mobility-Index", "max_stars_repo_head_hexsha": "f21d2fa6913ce9474aedc298e9e4a6e7c9390e64", "max_stars_repo_licenses": ["MIT"], "... |
/*
MIT License
Copyright (c) 2022 Lou Amadio
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dis... | {"hexsha": "7d3ef71253f074854a6de38c9bfbafd43a1a4981", "size": 6948, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/main.cpp", "max_stars_repo_name": "polyhobbyist/ros_qwiic_motor", "max_stars_repo_head_hexsha": "fcbeefe94fab2e37300f0daecf551f2ef807b02c", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
import numpy as np
from scipy.integrate import ode
from .common import validate_tol, validate_first_step, warn_extraneous
from .base import OdeSolver, DenseOutput
class LSODA(OdeSolver):
"""Adams/BDF method with automatic stiffness detection and switching.
This is a wrapper to the Fortran solver from ODEPACK... | {"hexsha": "ab37af3980fd0f544de1e2ecbe7229276187d8cb", "size": 8108, "ext": "py", "lang": "Python", "max_stars_repo_path": "ServidorPython/python32_web/Lib/site-packages/scipy/integrate/_ivp/lsoda.py", "max_stars_repo_name": "mak213k/Servidor_automatizado_python", "max_stars_repo_head_hexsha": "4403ef8027a2f814220baacc... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
#
# RMG - Reaction Mechanism Generator
#
# Copyright (c) 2002-2009 Prof. William H. Green (whgreen@mit.edu) and the
# RMG Team (rmg_dev@mit.edu)
#
# Permission is hereby granted, free ... | {"hexsha": "9ce3c2bc359edc6d5d4eee4e11e9c8982dddf669", "size": 7475, "ext": "py", "lang": "Python", "max_stars_repo_path": "rmgpy/cantherm/commonTest.py", "max_stars_repo_name": "nyee/RMG-Py", "max_stars_repo_head_hexsha": "1c8816af340c106967bc877bee0ff9fe71607d7a", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import jax.numpy as jnp
import haiku as hk
class RelationNetwork(hk.nets.MLP):
def __call__(self, inputs: jnp.ndarray) -> jnp.ndarray:
num_inputs = inputs.shape[-2]
left = jnp.expand_dims(inputs, axis=-2).repeat(num_inputs, axis=-2)
right = jnp.expand_dims(inputs, axis=-3).repeat(num_inpu... | {"hexsha": "a721d714829670c803d6877c501e91697c07b628", "size": 489, "ext": "py", "lang": "Python", "max_stars_repo_path": "jax_meta/modules/relation_network.py", "max_stars_repo_name": "tristandeleu/jax-meta-learning", "max_stars_repo_head_hexsha": "3e83cc1be77dd99ad7539cbcb47536097e896d3a", "max_stars_repo_licenses": ... |
Alice J. Gonzales is a Rocklin resident who has held several positions within the state government. She was appointed Director of the California Department of Aging by Governor Deukmejian in 1983. From 1990 until 1998, she was Director of the states Employment Development Department, and she also served on the UC Boa... | {"hexsha": "8c3127241d1dd1c96bf4f70807019a97f90fb08a", "size": 640, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Alice_Gonzales.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
export objective, smooth_objective
# NOTE: RobustLoss are not always everywhere smooth but "smooth-enough".
const SmoothLoss = Union{L2Loss, LogisticLoss, MultinomialLoss, RobustLoss}
"""
$SIGNATURES
Return the objective function (sum of loss + penalty) of a Generalized Linear Model.
"""
objective(glr::GLR, n) = gl... | {"hexsha": "026f0ffd96b036268de23b974e4660b718b4caf4", "size": 1544, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/glr/utils.jl", "max_stars_repo_name": "jbrea/MLJLinearModels.jl", "max_stars_repo_head_hexsha": "d4c7a7f302e72072ddf0af553b1ad1ddd1b1569e", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import os
import argparse
import pprint
import torch
import json
import cv2
import numpy as np
import EOC.spring.linklink as link
import torch.nn.functional as F
import torchvision.transforms as transforms
import matplotlib.pyplot as plt
from easydict import EasyDict
from torch.autograd import Variable
from EOC.prot... | {"hexsha": "91afeb5db8968eca23ef368aaec2460aff658ff2", "size": 11325, "ext": "py", "lang": "Python", "max_stars_repo_path": "EOC/prototype/tools/inference.py", "max_stars_repo_name": "double-fire-0/SystemNoise", "max_stars_repo_head_hexsha": "ab042dd54371482a18117eb13f816a7472e51590", "max_stars_repo_licenses": ["Apach... |
! This test code tests the correct handling of labels on the if-stmt.
integer i,m,n
do 20 m=1,n
i = m
20 if (.true.) i = 0
end
| {"hexsha": "dafb063fc1f2aada918e6a60cee0a214fc90b833", "size": 140, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/CompileTests/Fortran_tests/test2010_133.f90", "max_stars_repo_name": "maurizioabba/rose", "max_stars_repo_head_hexsha": "7597292cf14da292bdb9a4ef573001b6c5b9b6c0", "max_stars_repo_licenses"... |
program facbench
use fmzm
implicit none
integer :: i
type(im) :: res
character(10000) :: out
res = 0
do i = 1, 3000
res = res + fac(i)
end do
call im_form('i10000', res, out)
print '(a)', trim(adjustl(out))
contains
type(im) function fac(n)
integer, intent(in) :: n
integer :: i
... | {"hexsha": "af79a86d327b7654d28f9a09448f18a4d3515394", "size": 421, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "fortran/fac-bench.f90", "max_stars_repo_name": "robindaumann/fac-bench", "max_stars_repo_head_hexsha": "57d040514bdd541308c44b831c631fc16e20f026", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
from functools import partial
from typing import Optional
import numpy as np
from trackpy import bandpass
from starfish.imagestack.imagestack import ImageStack
from starfish.types import Number
from ._base import FilterAlgorithmBase
class Bandpass(FilterAlgorithmBase):
def __init__(
self, lshort: N... | {"hexsha": "e56268d59f87bbc11d430e08f16c44d074e6e0da", "size": 3945, "ext": "py", "lang": "Python", "max_stars_repo_path": "starfish/image/_filter/bandpass.py", "max_stars_repo_name": "vipulsinghal02/starfish", "max_stars_repo_head_hexsha": "c3d347954ad40a7a4be9a50d89974f5fbbc2919d", "max_stars_repo_licenses": ["MIT"],... |
import numpy as np
import matplotlib.pyplot as plt
import scipy
from scipy.fftpack import fftshift, ifftshift, fft2, ifft2
from mpl_toolkits.axes_grid1 import make_axes_locatable, axes_size
from scipy.signal import correlate2d as correlate
from scipy.signal import general_gaussian
from astropy.io import fits
from sc... | {"hexsha": "89582ba10b7f4e3167f129665448a8c4b065de4f", "size": 1306, "ext": "py", "lang": "Python", "max_stars_repo_path": "PD.py", "max_stars_repo_name": "fakahil/PyPD", "max_stars_repo_head_hexsha": "eff5a1cd88abb7839177f2b73a9cbc0e9dfb9365", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_stars_repo_s... |
[STATEMENT]
lemma is_ta_empty_trim_reg:
"is_ta_eps_free (ta A) \<Longrightarrow> eps (ta (trim_reg A)) = {||}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. is_ta_eps_free (ta A) \<Longrightarrow> eps (ta (trim_reg A)) = {||}
[PROOF STEP]
by (auto simp: is_ta_eps_free_def trim_reg_def trim_ta_def ta_restrict_def) | {"llama_tokens": 139, "file": "FO_Theory_Rewriting_FOR_Check_Impl", "length": 1} |
import numpy as np
from holoviews.core import NdOverlay
from holoviews.element import Polygons, Contours
from .testplot import TestMPLPlot, mpl_renderer
class TestPolygonPlot(TestMPLPlot):
def test_polygons_colored(self):
polygons = NdOverlay({j: Polygons([[(i**j, i) for i in range(10)]], level=j)
... | {"hexsha": "3a8610ebd8cf96f32c91d9a0da64561659d95d51", "size": 2726, "ext": "py", "lang": "Python", "max_stars_repo_path": "holoviews/tests/plotting/matplotlib/testpathplot.py", "max_stars_repo_name": "jewfro-cuban/holoviews", "max_stars_repo_head_hexsha": "c59f847c3d05b6eea1b05d3e8162d9ea80428587", "max_stars_repo_lic... |
import sys
import multiprocessing
try:
from multiprocessing import shared_memory
except ImportError:
## check MP version
version = sys.version_info[:2]
version = float("%d.%d"%version)
if version < 3.8:
print("Upgrade to Python 3.8 to use multiprocessing with shared memory.")
import numpy ... | {"hexsha": "9f9ad5fa5410ee5d4947681a366c6eb5ef1dec26", "size": 2050, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/abg_python/parallel/multiproc_utils.py", "max_stars_repo_name": "agurvich/abg_python", "max_stars_repo_head_hexsha": "f76425481781e6e8e28caf9e8290c0b5b920ab91", "max_stars_repo_licenses": ["MI... |
# -*- coding: utf-8 -*-
# Author: Simone Marsili <simomarsili@gmail.com>
# License: BSD 3 clause
"""Classes for entropy estimators."""
import logging
from abc import ABC, abstractmethod # python >= 3.4
from functools import wraps
from inspect import isclass
import numpy
from numpy import PZERO, euler_gamma # pylint:... | {"hexsha": "c95935280a60ae344492aaf6513301a6d008b450", "size": 16536, "ext": "py", "lang": "Python", "max_stars_repo_path": "ndd/estimators.py", "max_stars_repo_name": "simomarsili/ndd", "max_stars_repo_head_hexsha": "3a8f8f80116ddaf8666dd13b246a04c9806447a7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou... |
# Copyright 2020 MONAI Consortium
# 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, s... | {"hexsha": "cb2f446dfcfeeb341d52189dea6f96c459f24fa1", "size": 6526, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_local_normalized_cross_correlation_loss.py", "max_stars_repo_name": "JoHof/MONAI", "max_stars_repo_head_hexsha": "70483b648fba92f0a8346e53dc14d686e56120a3", "max_stars_repo_licenses": [... |
**Exercise set 7**
==============
> The goal of this exercise is to run PCA and PLSR on a real
data set in order to show how these methods can be used in practice.
We are considering data that are given by
[Platikanov et al.](https://doi.org/10.1016/j.watres.2012.10.040) and we are aiming to
reproduce some of the resu... | {"hexsha": "81aafa6de83d00056bbebcbb8bbdcc5acfc7d7b0", "size": 10754, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "exercises_2020/07_Exercise_Set_7.ipynb", "max_stars_repo_name": "sroet/chemometrics", "max_stars_repo_head_hexsha": "c797505d07e366319ba1544e8a602be94b88fbb6", "max_stars_repo_licens... |
import numpy as np
path = 'training_data/1546786435.npz'
f = np.load(path)
x_train, y_train = f['train'], f['train_labels']
print(x_train.shape)
print(y_train.shape)
print(x_train)
print(y_train)
#x_test, y_test = f['x_test'], f['y_test']
f.close()
| {"hexsha": "e2397bb1d120f619740ebd3578c735d59a69fc2e", "size": 255, "ext": "py", "lang": "Python", "max_stars_repo_path": "esp8266/esp8266car/computer/load_npz.py", "max_stars_repo_name": "OZhang/AutoCar", "max_stars_repo_head_hexsha": "47f033601941cd30e3725999ddeb1a67143e3c18", "max_stars_repo_licenses": ["MIT"], "max... |
\documentclass{amsart}
\title{LocalGraph Abstract Data Type}
\author{Todd D. Vance}
\date{\today}
\begin{document}
\maketitle{}
\section{Local Graph}
A local graph (modeling a directed graph, loops and multiple edges allowed, from which only a node and its immediate neighborhood are visible at any one time) is actu... | {"hexsha": "4b2d7395b4f60cb7f731f81d1c1053c6dd8b50b0", "size": 2809, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/local_graph_adt.tex", "max_stars_repo_name": "tdvance/LocalGraph", "max_stars_repo_head_hexsha": "c927947391c04e9e6870e0edcfef6e2ffe2a4f7b", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
using TextGrid
using Test
@testset "TextGrid.jl" begin
# Write your tests here.
end
| {"hexsha": "fd9c5f32b2c646e95c257bd3ed7483fabda1eff9", "size": 89, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "Hasanfcb/TextGrid.jl", "max_stars_repo_head_hexsha": "9ae5ebd1c1791ee0217b56ad788d81257b413afe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
'''
synbiochem (c) University of Manchester 2016
synbiochem is licensed under the MIT License.
To view a copy of this license, visit <http://opensource.org/licenses/MIT/>.
@author: neilswainston
'''
# pylint: disable=no-member
import uuid
import matplotlib.pyplot as plt
import numpy as np
def do_plot(data):
... | {"hexsha": "92df4ec17370e045104c86eb575c8d9136a78764", "size": 935, "ext": "py", "lang": "Python", "max_stars_repo_path": "synbiochemdev/learning/hist.py", "max_stars_repo_name": "neilswainston/development-py", "max_stars_repo_head_hexsha": "47041c8059cf4d617b9ca26c16b4a691ce68aa2c", "max_stars_repo_licenses": ["MIT"],... |
# pylint: disable=unused-argument
"""Debug runtime functions."""
import os
import json
import numpy as np
from tvm import ndarray as nd
from tvm.tools.debug.wrappers import local_cli_wrapper as tvmdbg
class DebugGraphModule(object):
"""Wrapper debug runtime module.
This is a thin wrapper of the debug for TVM... | {"hexsha": "78dec36f0c40e502d4d19870341aada1c2f69e3e", "size": 5888, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/tvm/tools/debug/runtime/debugruntime.py", "max_stars_repo_name": "dayanandasiet/tvmdbg", "max_stars_repo_head_hexsha": "5e3266a65422990d385c43424d51a4e5e8dfe6ee", "max_stars_repo_licenses":... |
import pyclesperanto_prototype as cle
import numpy as np
def test_standard_deviation_z_projection():
test1 = cle.push(np.asarray([
[
[1, 0, 0, 0, 9],
[0, 2, 0, 8, 0],
[3, 0, 1, 0, 10],
[0, 4, 0, 7, 0],
[5, 0, 6, 0, 10]
], [
[0,... | {"hexsha": "4220ed87462f7c948f193cc72ca5d11664c65eb4", "size": 1368, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_standard_deviation_z_projection.py", "max_stars_repo_name": "elsandal/pyclesperanto_prototype", "max_stars_repo_head_hexsha": "7bda828813b86b44b63d73d5e8f466d9769cded1", "max_stars_repo... |
from nltk.tree import Tree
import copy
import itertools
from numpy import insert
from collections import Counter
"""
Class to manage the transformation of a constituent tree into a sequence of labels
and vice versa. It extends the Tree class from the NLTK framework to address constituent Parsing as a
sequential labeli... | {"hexsha": "484125dd969f4b9c877431fbdee3ec5d7dd7ac2d", "size": 12885, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/tree.py", "max_stars_repo_name": "mstrise/seq2label-crossrep", "max_stars_repo_head_hexsha": "db55c42ece8ab02af9c170eaba1d503b494032cc", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
// Copyright (C) 2010 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#include <dlib/optimization.h>
#include "optimization_test_functions.h"
#include <sstream>
#include <string>
#include <cstdlib>
#include <ctime>
#include <vector>
#include "../rand.h"
#inc... | {"hexsha": "aa2775b9c950da21a570390abeca930cff5964b9", "size": 8958, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "dlib/test/trust_region.cpp", "max_stars_repo_name": "yatonon/dlib-face", "max_stars_repo_head_hexsha": "0230c1034ee65d0846d007e6145bfe73ca0d6321", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_... |
"""
Module for processing oxygen from CTD and bottle samples.
"""
import csv
import logging
import xml.etree.cElementTree as ET
from collections import OrderedDict
from pathlib import Path
import gsw
import numpy as np
import pandas as pd
import scipy
from . import ctd_plots as ctd_plots
from . import flagging as fl... | {"hexsha": "b82a08f74b927be5d9eefecc61deaa56b3f69427", "size": 28631, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctdcal/oxy_fitting.py", "max_stars_repo_name": "lmerchant/ctdcal", "max_stars_repo_head_hexsha": "0b8d3312ca5720d6b934f7d7f87b765e549d8dba", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star... |
@testset "fourier_diff" begin
@test fourier_diff(5, order=1) ≈ [0.0 0.8506508083520398 -0.5257311121191336 0.5257311121191336 -0.8506508083520399; -0.8506508083520399 0.0 0.8506508083520398 -0.5257311121191336 0.5257311121191336; 0.5257311121191336 -0.8506508083520399 0.0 0.8506508083520398 -0.5257311121191336; -0.... | {"hexsha": "36b751fb7858d191e28e897678a60673e7390092", "size": 12711, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_fourier_diff.jl", "max_stars_repo_name": "dawbarton/RandomUseful.jl", "max_stars_repo_head_hexsha": "4411a4c7a8927f0be13811e6c97427733447f2ac", "max_stars_repo_licenses": ["MIT"], "max_s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.