text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
#!/usr/bin/env python import argparse import pdb from astropy.stats import sigma_clipped_stats from astropy.table import Table, vstack import matplotlib.pyplot as plt import numpy as np from drizzlepac.devutils.comparison_tools import compare_sourcelists from drizzlepac.haputils.diagnostic_utils import read_json_file...
{"hexsha": "432d34495400e09a24a26c333d64ddc909211c39", "size": 5379, "ext": "py", "lang": "Python", "max_stars_repo_path": "drizzlepac/devutils/plot_ci_vs_fwhm.py", "max_stars_repo_name": "check-spelling/drizzlepac", "max_stars_repo_head_hexsha": "19baaf5a416c72f272889800b13d251f33f76d2c", "max_stars_repo_licenses": ["...
[STATEMENT] lemma meld_correct: shows "to_mset (meld q q') = to_mset q + to_mset q'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. to_mset (meld q q') = to_mset q + to_mset q' [PROOF STEP] apply (unfold to_mset_def meld_def) [PROOF STATE] proof (prove) goal (1 subgoal): 1. BsSkewBinomialHeapStruc.bs_to_mset (R...
{"llama_tokens": 354, "file": "Binomial-Heaps_SkewBinomialHeap", "length": 3}
[STATEMENT] lemma "\<FF> \<F> \<Longrightarrow> DNI \<^bold>\<not>\<^sup>C" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<FF> \<F> \<Longrightarrow> DNI \<^bold>\<not>\<^sup>C [PROOF STEP] nitpick [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<FF> \<F> \<Longrightarrow> DNI \<^bold>\<not>\<^sup>C [PROOF STEP...
{"llama_tokens": 137, "file": "Topological_Semantics_topo_negation_conditions", "length": 2}
[STATEMENT] lemma Healthy_intro: "H(P) = P \<Longrightarrow> P is H" [PROOF STATE] proof (prove) goal (1 subgoal): 1. H P = P \<Longrightarrow> P is H [PROOF STEP] by (simp add: Healthy_def)
{"llama_tokens": 78, "file": "UTP_utp_utp_healthy", "length": 1}
# Bipartite graph crosses minimization import numpy as np class CrossMinimizer: def __init__(self, A): self.N1, self.N2 = A.shape self.A = np.zeros((self.N1, self.N2)) for i in range(self.N1): for j in range(self.N2): self.A[i][j] = 1 if A[i][j] else 0 ...
{"hexsha": "6e925624d7895b0088c1f31e4a2f5cef8e694162", "size": 5524, "ext": "py", "lang": "Python", "max_stars_repo_path": "algo/arranging/crossmin.py", "max_stars_repo_name": "alexeyev/visartm", "max_stars_repo_head_hexsha": "d19e193b3c084d7f355a45b966c8bb2ebb6fa366", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
import unittest from setup.settings import * from numpy.testing import * from pandas.util.testing import * import numpy as np import dolphindb_numpy as dnp import pandas as pd import orca class FunctionGreaterTest(unittest.TestCase): @classmethod def setUpClass(cls): # connect to a DolphinDB server ...
{"hexsha": "164c48e176230e5d64f91eca14ce22ed0f800d31", "size": 3324, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/numpy_unit_testing/test_function_binary_operator_greater.py", "max_stars_repo_name": "jiajiaxu123/Orca", "max_stars_repo_head_hexsha": "e86189e70c1d0387816bb98b8047a6232fbda9df", "max_stars_...
# Dispersion relations for cold fluid/hybrid electrons ## 1. Cold fluid electrons Only frequencies much larger than the ion plasma frequency $\Omega_\text{pi}$ are considered why ions are treated as a neutralizing stationary background. The remaining linear model for the perturbed electric field $\textbf{E}_1$, magne...
{"hexsha": "b82ad66cac11d7d46ba3d1fdb58c79eabfb8566d", "size": 250986, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "02_HybridModelling/10_DispersionRelations.ipynb", "max_stars_repo_name": "ratnania/mhd", "max_stars_repo_head_hexsha": "89f383695075aa26fc805ffbf6ba458f0cdd6f4e", "max_stars_repo_li...
(* Title: HOL/Algebra/Sym_Groups.thy Author: Paulo Emílio de Vilhena *) theory Sym_Groups imports "HOL-Combinatorics.Cycles" Solvable_Groups begin section \<open>Symmetric Groups\<close> subsection \<open>Definitions\<close> abbreviation inv' :: "('a \<Rightarrow> 'b) \<Rightarrow> ('b \<Rig...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/Algebra/Sym_Groups.thy"}
"""Functions copypasted from newer versions of numpy. """ from __future__ import division, print_function, absolute_import import warnings import sys import numpy as np from numpy.testing.nosetester import import_nose from scipy._lib._version import NumpyVersion if NumpyVersion(np.__version__) > '1.7.0.dev': ...
{"hexsha": "ff8032fcfc7e9ebd3ea564ba1b97fde4b69dce57", "size": 11513, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/python2.7/site-packages/scipy/_lib/_numpy_compat.py", "max_stars_repo_name": "wfehrnstrom/harmonize", "max_stars_repo_head_hexsha": "e5661d24b2021739e8ac4bf1d3a530eda4e155b3", "max_stars_repo...
using JLSponge, DataStructures function move_segments(x::TCPConnection, y::TCPConnection, segments::Vector{TCPSegment}, reorder::Bool) while x.segments_out |> !isempty push!(segments, dequeue!(x.segments_out)) end if reorder for seg in Iterators.reverse(segments) ...
{"hexsha": "92f71cef307ecae21fdf1d67d35c79c8d55744db", "size": 6201, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/tcp_benckmark.jl", "max_stars_repo_name": "AquaIndigo/JLSponge", "max_stars_repo_head_hexsha": "06b6204c40c89194762ae4c15f0526cefb689f0e", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import os.path import sys sys.path.append(os.path.dirname(os.path.abspath(__file__)) + os.path.sep + '../../../') import numpy as np def points_to_voxels_transform(points, affine): """ Only useful for image + mesh cases. Not implemented yet. """ return points def metric_to_image_radial_length(leng...
{"hexsha": "5960e0ee8becb1e1a225115427a9de9b595480fa", "size": 1052, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/in_out/image_functions.py", "max_stars_repo_name": "EuroPOND/deformetrica", "max_stars_repo_head_hexsha": "29cb3a4ecd40d6a19b3ee2a1c5827c4ebab54062", "max_stars_repo_licenses": ["BSD-3-Clause"...
# USAGE # python face_detection_caffe.py -i oriImgs/liudehua.jpg [-p 0.5] import cv2 import argparse import numpy as np ap = argparse.ArgumentParser() ap.add_argument("-i", "--image", type = str, required = True, help = "path to input image") ap.add_argument("-c", "--confidence", type = float, default = 0.5, help = "...
{"hexsha": "437facadf710ddca186a566254afd2149501d262", "size": 1312, "ext": "py", "lang": "Python", "max_stars_repo_path": "06.face_detection/face_detection_caffe.py", "max_stars_repo_name": "Ayonveig/pycv-training", "max_stars_repo_head_hexsha": "a9ad8755c82bff62e907099ebac7587422b28ccd", "max_stars_repo_licenses": ["...
import theano import theano.tensor as T import lasagne import lasagne.layers as L import numpy as np def Tconcat(t1,t2): return T.concatenate([t1,t2], axis=2) def Tsum(t1,t2): return t1+t2 class GatedAttentionLayer(L.MergeLayer): def __init__(self, incomings, gating_fn='T.mul', mask_input=None, transpose...
{"hexsha": "b07c573cd6b2f037ce4c67d8115f8686f1c49a3c", "size": 4145, "ext": "py", "lang": "Python", "max_stars_repo_path": "ga-reader/model/layers.py", "max_stars_repo_name": "MihawkHu/Reading_Comprehension", "max_stars_repo_head_hexsha": "ee2d1ccb8dc1adcbff7e1980be1742babaf07056", "max_stars_repo_licenses": ["MIT"], "...
\documentclass{article} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{tikz} \begin{document} \begin{table} \centering \caption{Versions} \begin{tabular}{|l|l|} \hline Date & Summary\\ \hline 2015-12-10 & Initial version.\\ 2016-5-2 & Corrected port image for 6mm Pitot. \\ \hline \end{tabular} \end{table} \...
{"hexsha": "93e0fc85b64e6b63824d8bf933d3f100add81f03", "size": 9041, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "documentation/control/aero/pitot.tex", "max_stars_repo_name": "leozz37/makani", "max_stars_repo_head_hexsha": "c94d5c2b600b98002f932e80a313a06b9285cc1b", "max_stars_repo_licenses": ["Apache-2.0"], "...
""" Analyze tipping curve data taken with observatoryCtrl This was superceded by class TidTipAnalyzer in Data_Reduction.dss43-tipping A tipping array consists of two 1-D arrays, the first containing the elevation in degrees and the second the system temperature for each of the four channels. Older files (like 2014) ...
{"hexsha": "a0778d60c9a53b69841328388a8ade2ad4b6091d", "size": 8848, "ext": "py", "lang": "Python", "max_stars_repo_path": "tipping.py", "max_stars_repo_name": "SDRAST/Data_Reduction", "max_stars_repo_head_hexsha": "f007d716b5c28c086910a81206cffaf37ff6368c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
[STATEMENT] lemma module_hom_compose: "module_hom s1 s2 f \<Longrightarrow> module_hom s2 s3 g \<Longrightarrow> module_hom s1 s3 (g o f)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>module_hom s1 s2 f; module_hom s2 s3 g\<rbrakk> \<Longrightarrow> module_hom s1 s3 (g \<circ> f) [PROOF STEP] by (auto sim...
{"llama_tokens": 135, "file": null, "length": 1}
import scipy.spatial class TLDetector(object): def __init__(self, waypoints_2d = None): self.waypoints_2d = waypoints_2d if self.waypoints_2d: self.wp_tree = scipy.spatial.KDTree(waypoints_2d) else: self.wp_tree = None def is_ready(self): return...
{"hexsha": "2d752bc0dfe42b0251731b113ad8a241507d5cfc", "size": 1542, "ext": "py", "lang": "Python", "max_stars_repo_path": "ros/src/tl_detector/impl/tl_detector.py", "max_stars_repo_name": "stefancyliax/CarND-Capstone", "max_stars_repo_head_hexsha": "21d61be1a7086e9c8035a31b0312cbd15ed4d937", "max_stars_repo_licenses":...
function moi_sensorloc(optimizer, seed, n; verbose = false, test = false, scalar = false) rng = Random.MersenneTwister(seed) MOI.empty!(optimizer) if test @test MOI.is_empty(optimizer) end # Generate randomized problem data m, x_true, a, d, d_bar = sensorloc_data(seed, n) ...
{"hexsha": "6324bbf22ff72a2cb7c733a4fe3cf26eb26a17da", "size": 5110, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/moi_sensorloc.jl", "max_stars_repo_name": "mhsouto/ProxSDP.jl", "max_stars_repo_head_hexsha": "73a843e63cf60d5ffa67e0d1d664721947327800", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
""" test_subcomp_c.py Contains tests for subcomponent_c_calculate_emissions, which calculates emissions impacts of demand response products. """ import unittest import pandas as pd import numpy as np from subcomp_c_calculate_emissions import shift_hours, sort_bins, \ make_barchart_df, calc_yearly_avoided_emissions...
{"hexsha": "4f9a1e022c266d2b7cd5af32d7491414326aad98", "size": 6230, "ext": "py", "lang": "Python", "max_stars_repo_path": "emissions_calculator/phase1_emissions_calculator/tests/test_subcomp_c.py", "max_stars_repo_name": "NW-Demand-Response-Emissions-Impacts/emissions_calculator", "max_stars_repo_head_hexsha": "d4ed60...
# # Splitting a string into words and counting them in parallel # # We start from the parallel algorithm presented in Guy Steele's 2009 # ICFP talk [(video)](https://vimeo.com/6624203). It splits a # space-separated string into list of strings (words). The repeating # theme in the talk was to build "singleton solutio...
{"hexsha": "32bcedc8626df850bd55e0aadbf64c6d9e6c50b8", "size": 7266, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/words.jl", "max_stars_repo_name": "UnofficialJuliaMirror/Transducers.jl-28d57a85-8fef-5791-bfe6-a80928e7c999", "max_stars_repo_head_hexsha": "abfa98490d7f1af655dc2d276dca31964a153c9a", "ma...
from cvxpy.atoms.affine.add_expr import AddExpression from cvxpy.atoms.affine.binary_operators import MulExpression, DivExpression, multiply from cvxpy.atoms.affine.sum import Sum from cvxpy.atoms.affine.trace import trace from cvxpy.atoms.elementwise.exp import exp from cvxpy.atoms.elementwise.log import log from cvxp...
{"hexsha": "867beef2b3b7e3d73a4b2ab928a6e1a553a2332f", "size": 4781, "ext": "py", "lang": "Python", "max_stars_repo_path": "cvxpy/reductions/dgp2dcp/atom_canonicalizers/__init__.py", "max_stars_repo_name": "mostafaelaraby/cvxpy", "max_stars_repo_head_hexsha": "078e025be8b8315b5f579bd0209e8e3a1e2a2a19", "max_stars_repo_...
import numpy as np import copy as cp DIRECTIONS = [np.array((0, 1)), np.array((1, 0)), np.array((1, 1)), np.array((0, -1)), np.array((-1, 0)), np.array((-1, -1)), np.array((1, -1)), np.array((-1, 1))] class State: def __init__(self, grid=None, previous_skip=False, side=2, master_side=2): if...
{"hexsha": "ec86d982b8e1a1d266577007916873c3de12a685", "size": 6584, "ext": "py", "lang": "Python", "max_stars_repo_path": "othello_rules.py", "max_stars_repo_name": "anthony-moreau/MCTS", "max_stars_repo_head_hexsha": "7cf59ea0092e3ed7a8a0736076b0bdfa0ed46a14", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
# coding='utf-8' import matplotlib.pyplot as plt import numpy as np import os def t_SNE_visualisations(): from time import time import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.ticker import NullFormatter from sklearn import manifold, datasets n_points ...
{"hexsha": "5c9a48ab59c98274837d3b03c6b0cdd8895257c7", "size": 16242, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotFunc.py", "max_stars_repo_name": "duzhizhai/HGNN", "max_stars_repo_head_hexsha": "1d219f9eb773e0d2f585295d6fc13c2eb093d908", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
"""Example for generating a synthetic reflection spectrum, fitting to the single-layer-coating model and finding the solar weighted photon reflectance and power enhancement due to the coating. Todd Karin """ import numpy as np import pandas as pd import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as ...
{"hexsha": "bc747165997dd2fa7179c45365a485160bfa5519", "size": 3219, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/example_synthetic_fit.py", "max_stars_repo_name": "DuraMAT/pvarc", "max_stars_repo_head_hexsha": "bdcd87165eae530b953cfa26afb7e09e80dc52a3", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
import os from os.path import expanduser from graph.util import load_graph, dump_graph def thor_generator(scene, screen_size, goals, seed = 1, grid_size = 0.5, cameraY = 0.675): def _thunk(): import ai2thor.controller import graph.thor_graph reconstructor = graph.thor_graph.GridWorldReconst...
{"hexsha": "e6ee0114d32383f8a24ded9e0a07596e304bc685", "size": 3362, "ext": "py", "lang": "Python", "max_stars_repo_path": "environments/gym_graph/download.py", "max_stars_repo_name": "felipefelixarias/a2cat-vn-pytorch", "max_stars_repo_head_hexsha": "6e1b97c58be2405ef860718a91ecd2b07bc4b65f", "max_stars_repo_licenses"...
# Copyright 2017 The dm_control Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
{"hexsha": "654ac84f4c60d875bfedd76a6cdb18c4a175cbd3", "size": 14148, "ext": "py", "lang": "Python", "max_stars_repo_path": "dm_control/mujoco/index_test.py", "max_stars_repo_name": "wpumacay/dm_control", "max_stars_repo_head_hexsha": "e13b6941470cd6be618b0cc004b8ea20d69429fe", "max_stars_repo_licenses": ["Apache-2.0"]...
import numpy as np import os def pt3(a,b,c): return " ({:.6f} {:.6f} {:.6f})\n".format(a,b,c) #blockMeshDict writer def write_blockMeshDict(x,y,param): Mdict=open('system/blockMeshDict','w') #Header format header="FoamFile\n{{\n version 2.0;\n format ascii;\n class dictionary;\n object blockMeshDi...
{"hexsha": "2a9c6e9fbf4019c525e4801f7b157f5a5162cb30", "size": 16592, "ext": "py", "lang": "Python", "max_stars_repo_path": "writer.py", "max_stars_repo_name": "leomakoto/airfoil-optim", "max_stars_repo_head_hexsha": "f5437bd0e2f0bedcec8fc895c13fa2b25372f6ab", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
""" $(SIGNATURES) Log jacobian abs determinant via automatic differentiation. For testing. """ AD_logjac(t::VectorTransform, x, vec_y) = logabsdet(ForwardDiff.jacobian(x -> vec_y(transform(t, x)), x))[1] AD_logjac(t::ScalarTransform, x) = log(abs(ForwardDiff.derivative(x -> transform(t, x), x))) """ $(SIGNAT...
{"hexsha": "e1ff5334e8c1aae6733be711f6df14725d62cd5d", "size": 2140, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/utilities.jl", "max_stars_repo_name": "andreasnoack/TransformVariables.jl", "max_stars_repo_head_hexsha": "9afc4a484b2b127e0fed1cf5b0e4364436f9a67d", "max_stars_repo_licenses": ["MIT"], "max_s...
import torch from torch._C import device, wait from torch.functional import Tensor import torch.nn as nn import torch.optim as optim import matplotlib.pyplot as plt import numpy as np import IPython import collections import pdb from Environment import * from experience_replay import * from brain import * fro...
{"hexsha": "96f85980de9fa8809465587deafed52e86468128", "size": 5861, "ext": "py", "lang": "Python", "max_stars_repo_path": "breakout/agent.py", "max_stars_repo_name": "alizindari/Deep-Reinforcement-Learning", "max_stars_repo_head_hexsha": "315aedcaaa2ba134e77c95270fd30ed5d814182c", "max_stars_repo_licenses": ["MIT"], "...
# Symmetric triangular distribution immutable TriangularDist <: ContinuousUnivariateDistribution location::Float64 scale::Float64 function TriangularDist(l::Real, s::Real) s > zero(s) || error("scale must be positive") new(float64(l), float64(s)) end end TriangularDist(location::Real) =...
{"hexsha": "bfc6705826f77e2430eb6388fe2e8f97948fe1c7", "size": 3763, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/univariate/triangular.jl", "max_stars_repo_name": "alyst/Distributions.jl", "max_stars_repo_head_hexsha": "361f10c8e630f10b0dd96454de713129c13db59e", "max_stars_repo_licenses": ["MIT"], "max_st...
# Autogenerated wrapper script for Graphviz_jll for x86_64-linux-musl-cxx11 export acyclic, bcomps, ccomps, circo, cluster, dijkstra, dot, dot2gxl, dot_builtins, edgepaint, fdp, gc, gml2gv, graphml2gv, gv2gml, gv2gxl, gvcolor, gvgen, gvmap, gvpack, gvpr, gxl2dot, gxl2gv, libcdt, libcgraph, libgvc, libgvpr, liblab_gamut...
{"hexsha": "2ea88180e529d7ac2dc503cead55a9fa4182ed85", "size": 6597, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/wrappers/x86_64-linux-musl-cxx11.jl", "max_stars_repo_name": "JuliaBinaryWrappers/Graphviz_jll.jl", "max_stars_repo_head_hexsha": "2816f1e0b9c4c88627dcafbe3589a25fb7245205", "max_stars_repo_lic...
\documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage{hyperref} \usepackage{graphicx} \usepackage{amsmath} \setkomafont{disposition}{\normalfont\bfseries} \begin{document} \title{STA6166 Final Project} \author{Biswas, Sayak} \subtitle{Final Project Report for STA6166\\Spring 2017} \maketitle \section{PSA Lev...
{"hexsha": "cc761411c9096e3638526a02085b29db4151ce7b", "size": 6776, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Sayak_Biswas_Project_Report.tex", "max_stars_repo_name": "sayakbiswas/stats-final-project", "max_stars_repo_head_hexsha": "ffd84b8ce5203ffd813befa6ff646b2f30f0a927", "max_stars_repo_licenses": ["MIT...
from collections import Counter from pathlib import Path import numpy as np def load_raw(filename, shape, dtype='int16', mmap=True, mode='r'): filename = Path(filename) if not filename.is_file(): raise FileNotFoundError(f"File not found: {filename}") filesize = filename.stat().st_size itemsiz...
{"hexsha": "a3e579e4dccc0c3a2dddc67e4b532480fa58e66f", "size": 1520, "ext": "py", "lang": "Python", "max_stars_repo_path": "simianpy/io/raw/raw.py", "max_stars_repo_name": "jselvan/simianpy", "max_stars_repo_head_hexsha": "5b2b162789e11bc89ca2179358ab682269e7df15", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
"""Test around scalar constructors and scalar methods.""" import riptable as rt import numpy as np import pytest from numpy.testing import assert_almost_equal, assert_warns class TestScalarConstructor(object): # Type-coercion from strings test cases adapted from numpy/core/tests/test_scalar_ctors.py. ...
{"hexsha": "f713157fa8e0a5fb64ac7dc684b4acc75edad6c4", "size": 1467, "ext": "py", "lang": "Python", "max_stars_repo_path": "riptable/tests/test_scalar.py", "max_stars_repo_name": "972d5defe3218bd62b741e6a2f11f5b3/riptable", "max_stars_repo_head_hexsha": "bb928c11752e831ec701f91964979b31db53826a", "max_stars_repo_licens...
from __future__ import division import numpy as np from matplotlib import pyplot as plt import os import re # NOCARRY 0/1 # PADDING 0/1 # INVERT 0/1 # # Baseline: 000 PATH_ROOT = os.path.curdir exps = {'000' : os.path.join(PATH_ROOT, 'sum_exp_full_000.txt'), '001' : os.path.join(PATH_ROOT, 'sum_exp_full_00...
{"hexsha": "00f44499a10f5677695535167af6aacd0332cbc7", "size": 2874, "ext": "py", "lang": "Python", "max_stars_repo_path": "out/plots.py", "max_stars_repo_name": "waldr/learning_to_add", "max_stars_repo_head_hexsha": "d6238a8a7130e800407e7a64577e9f42efac87d4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
# -*- coding: utf-8 -*- from __future__ import division, print_function import pytest import numpy as np from itertools import product try: import cPickle as pickle except ImportError: import pickle import celerite from celerite import GP, terms from celerite.solver import get_kernel_value, CARMASolver __a...
{"hexsha": "ef1f0e7ef81c798d6b832514ba21c4dfe4a8a9a4", "size": 17596, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_celerite.py", "max_stars_repo_name": "dfm/ess", "max_stars_repo_head_hexsha": "09ee14e516bb3bc3b517c0c1b6716eaeb28183b1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 172, "m...
[STATEMENT] lemma liouville_lambda_altdef: "liouville_lambda n = (\<Sum>d | d ^ 2 dvd n. moebius_mu (n div d ^ 2))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. liouville_lambda n = (\<Sum>d | d\<^sup>2 dvd n. moebius_mu (n div d\<^sup>2)) [PROOF STEP] proof (cases "n = 0") [PROOF STATE] proof (state) goal (2 su...
{"llama_tokens": 2975, "file": "Dirichlet_Series_Liouville_Lambda", "length": 21}
section \<open>Smooth Functions between Normed Vector Spaces\<close> theory Smooth imports Analysis_More begin subsection \<open>From/To \<open>Multivariate_Taylor.thy\<close>\<close> lemma multivariate_Taylor_integral: fixes f::"'a::real_normed_vector \<Rightarrow> 'b::banach" and Df::"'a \<Rightarrow> n...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Smooth_Manifolds/Smooth.thy"}
! { dg-do run } ! { dg-options "-w" } ! Test program for PR 28439 integer function myfunc(i) integer i integer, save :: value = 2 value = value - 1 + 0 * i myfunc = value end function myfunc program pr28439 integer myfunc if (myfunc(0)) 10, 20, 30 ! Should go to 30 10 STOP 1 20 STOP 2 30 if...
{"hexsha": "995d985b5055210ec5340a18a95c6d4cf03a2b2b", "size": 488, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/arithmetic_if.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_li...
import numpy as np import cv2 #feature transforms def hogFeature(data): #extract hog features hog=cv2.HOGDescriptor('../config/hogConfig.xml') features=[] for img in data: img=np.reshape(img,(28,28)).astype(np.uint8) hog_feature=hog.compute(img) features.append(hog_...
{"hexsha": "dc641eef9a289de8a1b94f568ddcf5466f669783", "size": 1064, "ext": "py", "lang": "Python", "max_stars_repo_path": "utilities/transform.py", "max_stars_repo_name": "RockeyCoss/machineLearningImplementation", "max_stars_repo_head_hexsha": "92442f9a9703de57df6308881c4a87bbf0f9163c", "max_stars_repo_licenses": ["M...
import pathlib import numpy as np from loguru import logger from cv.pytorch.pytorch_utils import train_model from cv.pytorch.unet_small import UNetSmall from io_utils.data_source import get_image_label, get_plates_bounding_metadata from io_utils.utils import set_index def get_params(): path = '/home/sebastian/p...
{"hexsha": "e8fe0a50ec9f63711acf68e6936813709ec31da5", "size": 1578, "ext": "py", "lang": "Python", "max_stars_repo_path": "services/plate_segmentation/training_pytorch.py", "max_stars_repo_name": "sebastiancepeda/pedro", "max_stars_repo_head_hexsha": "f606db53aa7ad4f77cd813ac771a0aef3f98b4d8", "max_stars_repo_licenses...
# !/usr/bin/env python3 # -*-coding:utf-8-*- # @file: tf_vs_pt_ResnetV2_50.py # @brief: # @author: Changjiang Cai, ccai1@stevens.edu, caicj5351@gmail.com # @version: 0.0.1 # @creation date: 30-10-2019 # @last modified: Wed 30 Oct 2019 07:33:42 PM EDT from __future__ import absolute_import from __future__ import divisi...
{"hexsha": "b32812b2b38ebf818c274f8f2e8f968388be7aba", "size": 5192, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/get_tf_resnetv2_feature.py", "max_stars_repo_name": "ccj5351/hmr_rgbd", "max_stars_repo_head_hexsha": "d1dcf81d72c11e1f502f2c494cd86425f384d9cc", "max_stars_repo_licenses": ["MIT"], "max_stars...
import cv2 import numpy as np def convolve_mean(img,mask): m, n = img.shape img_new = np.zeros([m, n]) for i in range(1, m-1): for j in range(1, n-1): temp = img[i-1, j-1]*mask[0, 0]+img[i-1, j]*mask[0, 1]+img[i-1, j + 1]*mask[0, 2]+img[i, j-1]*mask[1, 0]+ img[i, j]*mask[1, ...
{"hexsha": "3bada7f659387d6a164087eb49a1e81a4c9a7d75", "size": 1513, "ext": "py", "lang": "Python", "max_stars_repo_path": "spatial median filtering.py", "max_stars_repo_name": "nitishabharathi/Computer-Vision-Assignments", "max_stars_repo_head_hexsha": "5ef4e663ef83bc598dd22699d6fb82d567ca5f44", "max_stars_repo_licens...
import numpy import scipy import matplotlib.pyplot as plt import random import datetime import os import sys import time import math import argparse import matplotlib.pyplot as plt import FastPID import ArduinoPID import AutoPID import refpid import process def main() : kp = 1 while FastPID.configure(k...
{"hexsha": "c2f92841f585bda69789525f2c3e2438d8a097ab", "size": 587, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/FastPID/test/param_domain.py", "max_stars_repo_name": "Molegvas/MySERCOM", "max_stars_repo_head_hexsha": "4d2538162b5e685a5a91700a531ef91642091075", "max_stars_repo_licenses": ["MIT"], "max_sta...
#include <boost/spirit/include/qi_lit.hpp>
{"hexsha": "3bf2bd3fbaaf072871fe32ea2e8d10958cc80e41", "size": 43, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_spirit_include_qi_lit.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1.0...
[STATEMENT] lemma freshChainAppend[simp]: fixes xvec :: "name list" and yvec :: "name list" and C :: "'a::fs_name" shows "(xvec@yvec) \<sharp>* C = ((xvec \<sharp>* C) \<and> (yvec \<sharp>* C))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (xvec @ yvec) \<sharp>* C = (xvec \<sharp>* C \<and> yve...
{"llama_tokens": 164, "file": "Psi_Calculi_Chain", "length": 1}
theory Dev imports "$HIPSTER_HOME/IsaHipster" begin setup Tactic_Data.set_induct_simp datatype 'a Tree = Leaf 'a | Node "'a Tree""'a Tree" ML\<open> Sledgehammer.run_sledgehammer; Toplevel.proof_of; fun my_sledgehammer state minimiser = let (* val state = Toplevel.proof_of @{Isar.state} *) val thy =...
{"author": "moajohansson", "repo": "IsaHipster", "sha": "91f6ea3f1166a9de547722ece6445fe843ad89b4", "save_path": "github-repos/isabelle/moajohansson-IsaHipster", "path": "github-repos/isabelle/moajohansson-IsaHipster/IsaHipster-91f6ea3f1166a9de547722ece6445fe843ad89b4/Examples/Dev.thy"}
# Copyright (c) 2021, Lawrence Livermore National Security, LLC. All rights reserved. LLNL-CODE-827197. # This work was produced at the Lawrence Livermore National Laboratory (LLNL) under contract no. DE-AC52-07NA27344 (Contract 44) between the U.S. Department of Energy (DOE) and Lawrence Livermore National Security, L...
{"hexsha": "8d1cfa8f413c94c44b63da3e1427fca097328a95", "size": 9285, "ext": "py", "lang": "Python", "max_stars_repo_path": "mummi_core/interfaces/base.py", "max_stars_repo_name": "mummi-framework/mummi-core", "max_stars_repo_head_hexsha": "3fb36c4701f536a534ce4c8884fee3524b96a689", "max_stars_repo_licenses": ["MIT"], "...
module TestGradient using Test using LinearAlgebra using BlockFactorizations using CovarianceFunctions using CovarianceFunctions: EQ, RQ, Dot, ExponentialDot, NN, Matern, MaternP, Lengthscale, input_trait, GradientKernel, ValueGradientKernel, GradientKernelElement, DerivativeKernel, ValueDerivativeKern...
{"hexsha": "933a6767ea540508b19e6dcb59b09187165fc573", "size": 5609, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/gradient.jl", "max_stars_repo_name": "SebastianAment/Kernel.jl", "max_stars_repo_head_hexsha": "c4931f0db29031239ecdbe1f811e3ccbc737a9bc", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
using Markdown using InteractiveUtils using ExtremeStats, PyCall, Conda, DataFrames Conda.pip_interop(true, "/Users/david/.julia/conda/3") Conda.pip("install","numerapi") Conda.pip("install","pandas") begin numerapi = pyimport("numerapi") pandas = pyimport("pandas") end napi = numerapi.NumerAPI() begin raw_d...
{"hexsha": "e4c303cc08860b33a10d22f1a66970e6c38c8885", "size": 436, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/RWRI-15/notebook.jl", "max_stars_repo_name": "davidchris/RWRI15Tinkering.jl", "max_stars_repo_head_hexsha": "f607d6adf547d59d06b97219604e9e86499d1a09", "max_stars_repo_licenses": ["MIT"], "max_s...
from __future__ import print_function import dynet as dy import numpy as np input_vals = np.arange(81) squared_norm = (input_vals**2).sum() shapes = [(81,), (3, 27), (3, 3, 9), (3, 3, 3, 3)] for i in range(4): # Not batched dy.renew_cg() input_tensor = input_vals.reshape(shapes[i]) x = dy.inputTensor(i...
{"hexsha": "1c3c863f8dbfa12aebedfc5f04b59e1dd98d9fe3", "size": 1849, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_tests/test_input.py", "max_stars_repo_name": "cherryc/dynet", "max_stars_repo_head_hexsha": "54bf3fa04f55f0730a9a21b5708e94dc153394da", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
# insert "marbles" in a "circle" # original, naive version: function star1(players, marbles) circle = [0] scores = zeros(Int, players) pos = 1 for i in 1:marbles if i % 23 == 0 # score marble i, and remove+score marble 7 marbles CCW from positive pos = mod(pos - 7 - 1, le...
{"hexsha": "6d22595e79865c94d418b1e75f77a96018a987cd", "size": 2569, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "09.jl", "max_stars_repo_name": "kleinschmidt/adventofcode2018", "max_stars_repo_head_hexsha": "42251ae353525b7333553b7766d9b919b68845fa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
C$Procedure OTHER ( Process everything else ) SUBROUTINE OTHER ( SOURCE, N ) C$ Abstract C C Process whatever doesn't get processed elsewhere. C C$ Disclaimer C C THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE C CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. C GOVE...
{"hexsha": "9f362f0ee31fb3f1acdff5fde81c6766a9bb7d07", "size": 4595, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "source/nasa_f/other.f", "max_stars_repo_name": "agforero/FTFramework", "max_stars_repo_head_hexsha": "6caf0bc7bae8dc54a62da62df37e852625f0427d", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Lecture 11: Scalar and Vector Fields, Accumulation ## Background Engineers and scientists are typically interested in how certain quantities vary within space. A scalar field is a mapping of values to positions within some coordinate system. In physical problems it is common to map values to three dimensions or...
{"hexsha": "b69c25a4743fda1199e5420dd5de251cf2c994a8", "size": 23238, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Lecture-11-Scalars-Vectors.ipynb", "max_stars_repo_name": "notbirdofprey/mathinmse.github.io", "max_stars_repo_head_hexsha": "2ecdeef537b3e9cb0286bf1a04925c289e994efe", "max_stars_re...
# Model hyperparameters """ RAPIDS Docs for KMeans: https://docs.rapids.ai/api/cuml/stable/api.html#k-means-clustering Example: ``` using RAPIDS using MLJ X = rand(100, 5) model = KMeans() mach = machine(model, X) fit!(mach) preds = predict(mach, X) ``` """ MLJModelInterface.@mlj_model mutable struct KMeans <: MM...
{"hexsha": "e57efb95d08044e78845e69298483c0fa610c416", "size": 5852, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/cuml/clustering.jl", "max_stars_repo_name": "tylerjthomas9/RAPIDS.jl", "max_stars_repo_head_hexsha": "e88f458e6fea71997dbe60cbf733118d1ca50d11", "max_stars_repo_licenses": ["Apache-2.0", "MIT"]...
import pyegt import numpy as np def prisoners_dilemma_equal_gains(benefit=2,cost=1): return prisoners_dilemma(reward=benefit-cost,sucker=-cost,temptation=benefit,punishment=0) def prisoners_dilemma(reward=3.0,sucker=0.0,temptation=4.0,punishment=1.0): return np.array([[reward,sucker],[temptation,punishment]]...
{"hexsha": "ca4af5ca50078ab8c1cf64e1bbc8973c3e9470d0", "size": 2948, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_moran_process.py", "max_stars_repo_name": "juliangarcia/pyegt", "max_stars_repo_head_hexsha": "02793a374aa50bec8c3779c0db34c64749ab5ff6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
[STATEMENT] lemma continuous_on_compact_surface_projection: fixes S :: "'a::real_normed_vector set" assumes "compact S" and S: "S \<subseteq> V - {0}" and "cone V" and iff: "\<And>x k. x \<in> V - {0} \<Longrightarrow> 0 < k \<and> (k *\<^sub>R x) \<in> S \<longleftrightarrow> d x = k" shows "continuo...
{"llama_tokens": 2636, "file": null, "length": 21}
#!/usr/bin/env Rscript options(stringAsfactors = FALSE, useFancyQuotes = FALSE) # This script is used to group or link different mass traces across samples # Taking the command line arguments args <- commandArgs(trailingOnly = TRUE) if(length(args)==0)stop("No file has been specified! Please select a file for performi...
{"hexsha": "09c9712478a5c804039b209e1ba3e6ff272153e5", "size": 2119, "ext": "r", "lang": "R", "max_stars_repo_path": "bin/group.r", "max_stars_repo_name": "jordeu/metaboigniter", "max_stars_repo_head_hexsha": "5417e975537515a16cc621292bbd77e3830585aa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9, "max_star...
SUBROUTINE tide_perm (dC20_perm) ! ---------------------------------------------------------------------- ! SUBROUTINE: tide_perm.f90 ! ---------------------------------------------------------------------- ! Purpose: ! Permanent Tide term ! -------------------------------------------------------------------...
{"hexsha": "6a38a5041d552552497fcac793b726f955582c62", "size": 1979, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/fortran/tide_perm.f90", "max_stars_repo_name": "RodrigoNaves/ginan-bitbucket-update-tests", "max_stars_repo_head_hexsha": "4bd5cc0a9dd0e94b1c2d8b35385e128404009b0c", "max_stars_repo_licenses...
# SPDX-License-Identifier: Apache-2.0 from ..proto import keras from ..proto.tfcompat import tensorflow as tf from ..common import name_func from ..common.onnx_ops import apply_relu_6, apply_softmax, apply_shape, apply_gather, \ apply_squeeze, apply_transpose, OnnxOperatorBuilder from .activation import activation...
{"hexsha": "a1bd122fad94cf5736398da9e612b85d965d2ab6", "size": 4487, "ext": "py", "lang": "Python", "max_stars_repo_path": "keras2onnx/ke2onnx/common.py", "max_stars_repo_name": "TomWildenhain-Microsoft/keras-onnx", "max_stars_repo_head_hexsha": "383e431583d9a67da67d5a01f401b9f4df26ae4a", "max_stars_repo_licenses": ["A...
\documentclass[12pt,]{article} \usepackage{lmodern} \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \else % if luatex or xelatex \ifxetex \usepackag...
{"hexsha": "20c8adf7e39182202346e1fc51d80cb7f141c0de", "size": 44929, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "MS/OrgSize.tex", "max_stars_repo_name": "aammd/Habitat_Filtering", "max_stars_repo_head_hexsha": "d5b7e63d77d7ddf3d9321ce8909310279c50b7f4", "max_stars_repo_licenses": ["CC-BY-3.0"], "max_stars_cou...
module Mod_ToCSR implicit none contains subroutine i1p2CSR(npoin,list,ia,ja,Memor,vanam) use typre use Mod_Memor implicit none integer(ip) :: npoin,ia(*),ja(*) type(i1p) :: list(*) type(MemoryMan) :: Memor character(*) :: vanam integer(ip) :: ia...
{"hexsha": "6eb0b8811fb52d90a08041b52f8c7e5856378ff5", "size": 1523, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Sources/base/Mod_ToCSR.f90", "max_stars_repo_name": "ciaid-colombia/InsFEM", "max_stars_repo_head_hexsha": "be7eb35baa75c31e3b175e95286549ccd84f8d40", "max_stars_repo_licenses": ["MIT"], "max_st...
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 """Factory functions for all ngraph ops.""" from typing import Callable, Iterable, List, Optional, Set, Union import numpy as np from functools import partial from ngraph.impl import Node, Shape from ngraph.impl.op import Constant, Par...
{"hexsha": "7cb1acc2364480ac700feada4bdc6e83e3cc1777", "size": 24067, "ext": "py", "lang": "Python", "max_stars_repo_path": "runtime/bindings/python/src/compatibility/ngraph/opset3/ops.py", "max_stars_repo_name": "monroid/openvino", "max_stars_repo_head_hexsha": "8272b3857ef5be0aaa8abbf7bd0d5d5615dc40b6", "max_stars_re...
[STATEMENT] lemma ite_pre_else: "--p*(x\<lhd>-p\<rhd>y\<guillemotleft>-q) = --p*(y\<guillemotleft>-q)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. - - p * (x \<lhd> - p \<rhd> y \<guillemotleft> - q) = - - p * (y \<guillemotleft> - q) [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. - - p ...
{"llama_tokens": 847, "file": "Correctness_Algebras_Hoare", "length": 6}
from sortedcontainers import SortedList from collections import namedtuple import random import numpy as np class SuperTuple: experience = namedtuple("Experience", field_names=["state", "action", "reward", "next_state", "done"]) d = {'e': None, 'p': None, 'p_prob': None} def __init__(self, state, action...
{"hexsha": "0f2f21cd09f4b3b10969a4618243e27529837cc8", "size": 4959, "ext": "py", "lang": "Python", "max_stars_repo_path": "dqn/exercise/double_DQN/prio_replay_list/prio_rep_mem.py", "max_stars_repo_name": "tricostume/deep-reinforcement-learning", "max_stars_repo_head_hexsha": "aaed4c55f5016eca7af3f727e8daecfd113f6f6f"...
include("../src/fdfd_local_field.jl") cd("examples/") using BenchmarkTools using DelimitedFiles println("$(Threads.nthreads()) threads!") number_training_data = 150000 # ideally 1e5 here r = rand() δ = 1e-2 fname = "test_data_$(round(Int, r*1e5))_$δ.csv" number_holes = 10 lb = 0.1 # for a blue wavelength this corres...
{"hexsha": "74e2927016362862b19f2669d3f18461e397f8a0", "size": 1213, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/serial_simulations.jl", "max_stars_repo_name": "rpestourie/fdfd_local_field", "max_stars_repo_head_hexsha": "a530506f396c3e75be13aa8aeb07a045b8ac75b5", "max_stars_repo_licenses": ["MIT"], ...
// vim:ts=2:sw=2:expandtab:autoindent:filetype=cpp: /* The MIT License Copyright (c) 2008, 2009 Flusspferd contributors (see "CONTRIBUTORS" or http://flusspferd.org/contributors.txt) Permission is hereby granted, free of charge, to any person obtaining a copy of this software an...
{"hexsha": "52c4c7e94c47d8f113989908dc8e2bd8f079c09b", "size": 10578, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/plugins/sqlite3/sqlite_cursor.cpp", "max_stars_repo_name": "ngoyal/flusspferd", "max_stars_repo_head_hexsha": "93ca7ec99d751bc4e240fbd7cbcf235f8fa49e3e", "max_stars_repo_licenses": ["MIT"], "ma...
[STATEMENT] lemma nonempty: "x \<in> A \<Longrightarrow> A \<noteq> {}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<in> A \<Longrightarrow> A \<noteq> {} [PROOF STEP] by blast
{"llama_tokens": 75, "file": "Group-Ring-Module_Algebra1", "length": 1}
"""Scattering Matrix File Loading This contains various useful functions for loading data from files Often, refractive index data will be found using ellipsometry or taken from another resource. In programs, these will likely be stored as csv files. Alternatively, various spectra may be stored as csv files. This mod...
{"hexsha": "c55fab4a718f74a3087dbd04894b5432ac47c208", "size": 12465, "ext": "py", "lang": "Python", "max_stars_repo_path": "scatteringmatrix/smfileload.py", "max_stars_repo_name": "agflood/scatteringmatrix", "max_stars_repo_head_hexsha": "dc9a048e4b57475c67bbac7d3165cf29b5cc66e9", "max_stars_repo_licenses": ["MIT"], "...
# -*- coding: utf-8 -*- import numpy as np from ztlearn.utils import * from ztlearn.dl.models import Sequential from ztlearn.optimizers import register_opt from ztlearn.datasets.cifar import fetch_cifar_10 from ztlearn.dl.layers import BatchNormalization, Dense img_rows = 32 img_cols = 32 img_dim = 3072 # cha...
{"hexsha": "12a8bb6b546c4e6ed7a1b4171d4a67257463e6b9", "size": 4143, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/cifar_10/cifar_10_autoencoder.py", "max_stars_repo_name": "jefkine/zeta-learn", "max_stars_repo_head_hexsha": "04388f90093b52f5df2f334c898f3a1224f5a13f", "max_stars_repo_licenses": ["MIT"...
import inspect import os import pickle from boltons.funcutils import wraps import numpy as np from tqdm import tqdm def exporter(): """Export utility modified from https://stackoverflow.com/a/41895194 Returns export decorator, __all__ list """ all_ = [] def decorator(obj): all_.append(ob...
{"hexsha": "10eb230ad050fa59b2d9d883d9cbe04cefc31941", "size": 1401, "ext": "py", "lang": "Python", "max_stars_repo_path": "wimprates/utils.py", "max_stars_repo_name": "jorana/wimprates", "max_stars_repo_head_hexsha": "3f431598d1c44ac27a3b88580f1b75dc41bf525e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, ...
#Date: December 15, 2021 #This code contains material supporting a paper, currently titled *Five #Starter Pieces: Quantum Information Science via Semi-definite Programs*, by #Vikesh Siddhu (vsiddhu@protonmail.com) and Sridhar Tayur (stayur@cmu.edu). #The paper is available on the arXiv(https://arxiv.org/). #The arXiv...
{"hexsha": "00c75e2d13727b4fd85b34c64a07111124449daf", "size": 5014, "ext": "py", "lang": "Python", "max_stars_repo_path": "HelperFunctionsforNotebook5.py", "max_stars_repo_name": "vsiddhu/SDP-Quantum-OR", "max_stars_repo_head_hexsha": "32864fca86ad33e40258ccbde99bd315f7d5ff67", "max_stars_repo_licenses": ["MIT"], "max...
""" inverter.py Density-to-potential inversion module Handles the primary functions """ import numpy as np from dataclasses import dataclass from opt_einsum import contract import psi4 psi4.core.be_quiet() psi4.core.clean() from .methods.wuyang import WuYang from .methods.zmp import ZMP from .methods.mrks import MR...
{"hexsha": "e880f7f0cbdc54896462f4b8d06e495a9b755e93", "size": 22918, "ext": "py", "lang": "Python", "max_stars_repo_path": "n2v/inverter.py", "max_stars_repo_name": "ymshi449/n2v", "max_stars_repo_head_hexsha": "9427d97fed9daf303291b4fd9c533ee15b072710", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": ...
import wave import struct import numpy as np def isSilence(windowPosition): sumVal = sum( [ x*x for x in sound[windowPosition:windowPosition+windowSize+1] ] ) avg = sumVal/(windowSize) if avg <= 0.0001: return True else: return False #read from wav file sound_file = wave.open('cmaj.wav...
{"hexsha": "1a09698c5ed009adccb6f8a0e0db86e20c0fecc2", "size": 1505, "ext": "py", "lang": "Python", "max_stars_repo_path": "Audio2.py", "max_stars_repo_name": "fletcherino/MLKeyDetection", "max_stars_repo_head_hexsha": "aff36ac2c3c5fa1184bc7a573ee477cbaf232e8f", "max_stars_repo_licenses": ["bzip2-1.0.6"], "max_stars_co...
import os, sys root_dir = os.path.dirname(os.path.abspath(__file__)) external_dir = os.path.join(root_dir, 'externals') sys.path.insert(0, root_dir) sys.path.insert(1, os.path.join(external_dir, 'PyTorch-NEAT')) sys.path.insert(1, os.path.join(external_dir, 'pytorch_a2c_ppo_acktr_gail')) import json import argparse im...
{"hexsha": "57bb51db3a32d927fff8c140366962af7a4c63cb", "size": 10383, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/visualize.py", "max_stars_repo_name": "federico-camerota/evogym", "max_stars_repo_head_hexsha": "fb3a792f93a61be15c9715a036da3721f99d2d42", "max_stars_repo_licenses": ["MIT"], "max_stars...
subroutine presplane(uw,uo3,xpp,ftray) real z,p,t,wh,wo,zpl,ppl,tpl,whpl,wopl,xa,xb,xalt real xtemp,xwo,xwh,g,air,ro3,rt,rp,roair,ds integer i,isup,iinf,k real rmo3(34),rmwh(34) real ps,xpp,uo3,uw,ftray common /sixs_atm/z(34),p(34),t(34),wh(34),wo(34) common /sixs_plane...
{"hexsha": "84a141390e19092c4e40443aed8883fdb116ac85", "size": 2289, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Modules/ThirdParty/6S/src/6SV1.0B/PRESPLANE.f", "max_stars_repo_name": "xcorail/OTB", "max_stars_repo_head_hexsha": "092a93654c3b5d009e420f450fe9b675f737cdca", "max_stars_repo_licenses": ["Apache-...
SUBROUTINE AMPC2 (INP,OUTP,SCRF) C C THE PURPOSE OF THIS ROUTINE IS TO COPY SCR5 ONTO THE BOTTOM OF C OUTPUT C INTEGER OUTP,SCRF,SYSBUF,MCBI(7),MCBO(7) COMMON /PACKX / IT1,IT2,II,JJ,INCR COMMON /UNPAKX/ IT3,II1,JJ1,INCR1 COMMON /SYSTEM/ SYSBUF COMMON /ZZZZZZ/...
{"hexsha": "e3afed07b835d0de8231e0e2c89d8dffb287f306", "size": 1668, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "mis/ampc2.f", "max_stars_repo_name": "ldallolio/NASTRAN-95", "max_stars_repo_head_hexsha": "6d2c175f5b53ebaec4ba2b5186f7926ef9d0ed47", "max_stars_repo_licenses": ["NASA-1.3"], "max_stars_count": 1...
function ydot = lorenzeq(t,y) %LORENZEQ Equation of the Lorenz chaotic attractor. % ydot = lorenzeq(t,y). % The differential equation is written in almost linear form. SIGMA = 10.; RHO = 28.; BETA = 8./3.; A = [ -BETA 0 y(2) 0 -SIGMA SIGMA -y(2) RHO -1 ]; ydot = A*y;
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/24320-algorithmic-trading-with-matlab-2009-u...
[STATEMENT] lemma (in Interpretation) FunctionalExpr: "\<And>i j A B.\<lbrakk>L\<lbrakk>Vx : A \<turnstile> e : B\<rbrakk> \<rightarrow> i; L\<lbrakk>Vx : A \<turnstile> e : B\<rbrakk> \<rightarrow> j\<rbrakk> \<Longrightarrow> i = j" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<And>i j A B. \<lbrakk>L\<lbrakk>V...
{"llama_tokens": 2117, "file": "Category2_MonadicEquationalTheory", "length": 5}
import argparse import numpy as np import os, subprocess from pydub import AudioSegment import shutil import soundfile as sf import torch from model.generator import Generator from utils import Audio device = torch.device('cuda' if torch.cuda.is_available else 'cpu') audio = Audio() gen = Generator().to(device) ch...
{"hexsha": "61ec4e3b2037f0ec1ce0ea2511bbffc0e58fddab", "size": 2797, "ext": "py", "lang": "Python", "max_stars_repo_path": "convert.py", "max_stars_repo_name": "Top34051/auto-cover", "max_stars_repo_head_hexsha": "883d517c2766011ece15c7b11ceb01574175a51b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
[STATEMENT] lemma n_n_L_split_n_L: "x * n(y) * L \<le> x * bot \<squnion> n(x * y) * L" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x * n y * L \<le> x * bot \<squnion> n (x * y) * L [PROOF STEP] by (metis n_n_L_split_n_n_L_L n_L_decreasing mult_assoc mult_left_isotone mult_right_isotone n_isotone sup_right_iso...
{"llama_tokens": 163, "file": "Correctness_Algebras_N_Algebras", "length": 1}
from caer import preprocess, saveNumpy import numpy as np import os DIR = r'F:\Dogs and Cats\Train' classes = [i for i in os.listdir(DIR)] IMG_SIZE = 224 # Create the train data train = preprocess(DIR, classes, 'train.npz', IMG_SIZE) print(f'Train shape = {train.shape}')
{"hexsha": "3a071c4fdd5010751ba0ff83de70eda4207d9108", "size": 275, "ext": "py", "lang": "Python", "max_stars_repo_path": "trainer.py", "max_stars_repo_name": "jasmcaus/deep-learning-keras-configs", "max_stars_repo_head_hexsha": "5500730d2c189cbd75d8fa80be593e4d47e6da9e", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# svmtest ## Check data: can the SVM be performed svmMessage = "" if (length(unique(Multi_datainput_m$groupingvar)) > 3) { NO_svm = TRUE svmMessage = paste0(svmMessage, "SVM can only be done if there no more than 3 groups.") } if (min(summary( Multi_datainput_m$groupingvar)) < 10 ) { NO_svm = TRUE svmMessag...
{"hexsha": "98981905932ba7df2163e3118af7ed2bcbfc8781", "size": 1092, "ext": "r", "lang": "R", "max_stars_repo_path": "analysis/Rcode/svmtest.r", "max_stars_repo_name": "jcolomb/HCS_analysis", "max_stars_repo_head_hexsha": "4bad7b048eae47ce19a8095862dee8908061379a", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# -*- coding: UTF-8 -*- # Copyright (c) 2018, Dirk Gütlin & Thomas Hartmann # All rights reserved. # # This file is part of the pymatreader Project, see: https://gitlab.com/obob/pymatreader # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following c...
{"hexsha": "6b779a4d855bb6002e918bd102f24af4dd482850", "size": 7570, "ext": "py", "lang": "Python", "max_stars_repo_path": "mne/externals/pymatreader/pymatreader.py", "max_stars_repo_name": "jasmainak/mne-python", "max_stars_repo_head_hexsha": "039cb1bf52770019bd48ac028795af0861792fa2", "max_stars_repo_licenses": ["BSD...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Jan 16 22:37:55 2021 @author: joannamoraza """ #Importing libraries import numpy as np import pandas as pd import matplotlib.pyplot as plt #Importing the dataset dataset = pd.read_csv('Salary_Data.csv') ##Years of experience is independent var...
{"hexsha": "0108aeb4a1a02429b65bc9b8de84814ce33d85c3", "size": 1795, "ext": "py", "lang": "Python", "max_stars_repo_path": "Machine Learning A-Z/Part 2 - Regression/Section 4 - Simple Linear Regression/Python/simple_linear_regression_jm.py", "max_stars_repo_name": "JMoraza/TodayILearned", "max_stars_repo_head_hexsha": ...
module TestScheduleUndirectedWiringDiagrams using Test using LinearAlgebra: dot, tr using Catlab.Theories: codom using Catlab.CategoricalAlgebra.CSets using Catlab.WiringDiagrams using Catlab.WiringDiagrams.ScheduleUndirectedWiringDiagrams: composites, composite_junction, composite_ports, parent, box_parent using C...
{"hexsha": "1e8dbe449232d1af8fe16011f20c7a6750ae2022", "size": 1952, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/wiring_diagrams/ScheduleUndirected.jl", "max_stars_repo_name": "Xiaoyan-Li/Catlab.jl", "max_stars_repo_head_hexsha": "e4b1b5fed310d473ad94978a9a2930e1abdfa181", "max_stars_repo_licenses": ["MI...
using Xpress, Compat.Test m = Xpress.Model() @testset "Attributes" begin @test Xpress.get_intattr(m, Xpress.XPRS_COLS) == 0 @test Xpress.get_dblattr(m, Xpress.XPRS_OBJRHS) == 0.0 @test Xpress.get_strattr(m, Xpress.XPRS_MATRIXNAME) == "" end
{"hexsha": "49f21ef85b119e0ea96923ed74f73efade10507e", "size": 256, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/xprs_attrs_test.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Xpress.jl-9e70acf3-d6c9-5be6-b5bd-4e2c73e3e054", "max_stars_repo_head_hexsha": "162f714998af86e8fd76d96b5008ebd7fb79d...
# Matthew Dunlop, August 2018 # https://github.com/mdunlop2 # # Contact: # https://www.linkedin.com/in/mdunlop2/ ''' Set of utility functions to help with loading and testing a mobilenet-v1 model trained with https://github.com/cloud-annotations/training ''' import tensorflow as tf import numpy as np import json impo...
{"hexsha": "d221a616e9a8df4fa748afa0f4416bde79242d23", "size": 7518, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/identify/utils/cacli_models.py", "max_stars_repo_name": "perlynchew/Silverbois-PORTAL_SCDFXIBM", "max_stars_repo_head_hexsha": "2aae1333e8f89c93b1f8c98a5a846043de3e06eb", "max_stars_repo_licen...
// Copyright (c) 2001-2011 Hartmut Kaiser // Copyright (c) 2010 Bryce Lelbach // // 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) #if !defined(BOOST_SPIRIT_LEX_STATE_SWITCHER_SEP_23_2007_0714PM) #define BOO...
{"hexsha": "29bb9786a63f80c381ba6af26f72ff18b4c23ab9", "size": 9557, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/lib/boost/spirit/home/lex/qi/state_switcher.hpp", "max_stars_repo_name": "nlchao/ofxBoost", "max_stars_repo_head_hexsha": "a7024684a5ad541eb9055030d0cd32045eac4024", "max_stars_repo_licenses": [...
from copy import copy import numpy as np import pandas as pd from sklearn.decomposition import FastICA from sklearn.ensemble import ExtraTreesClassifier from sklearn.model_selection import train_test_split from sklearn.pipeline import make_pipeline, make_union from sklearn.preprocessing import FunctionTransformer, Sta...
{"hexsha": "60614652d8088acf39a9a0c17eae3fcc8eb505e5", "size": 1435, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/qsar/tpot/fold2/pipeline.py", "max_stars_repo_name": "luisferreira97/autoautoml", "max_stars_repo_head_hexsha": "501d2de8b2153748b57e5c8cb247058c587ce29c", "max_stars_repo_licenses": ["MIT"],...
# -*- coding: utf-8 -*- try: import cPickle as pickle except ModuleNotFoundError: import pickle import numpy as np import model.dataset_class from model.dataset_class import AffectiveMonitorDataset from model.dataset_class import ToTensor import matplotlib.pyplot as plt import matplotlib.backends.backend_pdf f...
{"hexsha": "a6359ab79d1b7489d740f9c9a5cc1d471b0ecb22", "size": 12451, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "amysudarat/affective-monitor-model", "max_stars_repo_head_hexsha": "4de08704a3d36a0a228d5eeb9a33317be51f18fc", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
''' @author: Zhengguang Zhao @copyright: Copyright 2016-2019, Zhengguang Zhao. @license: MIT @contact: zg.zhao@outlook.com ''' function psraytrace(vp, vs, zlayer, dg, sourcex, sourcey, sourcez, receiverx, receivery, receiverz) # Input geometry max_x = maximum(sourcex) max_y = maximum(sourc...
{"hexsha": "ae2d397f221aebfee277ba33da2d55183bee922a", "size": 10367, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "psraytrace.jl", "max_stars_repo_name": "uqzzhao/psraytracing", "max_stars_repo_head_hexsha": "11f94ff480f4588ae19a389d7bb7986a9505fd30", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
using IOCapture using Test, Random # hasfield was added in Julia 1.2. This definition borrowed from Compat.jl (MIT) # Note: this can not be inside the testset (VERSION < v"1.2.0-DEV.272") && (hasfield(::Type{T}, name::Symbol) where T = Base.fieldindex(T, name, false) > 0) hascolor(io) = VERSION >= v"1.6.0-DEV.481" &&...
{"hexsha": "a6d7b3d6c7d766627796aad8a0910e47bbefbf24", "size": 6025, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "JuliaDocs/IOCapture.jl", "max_stars_repo_head_hexsha": "d8b27045cec8953e0e5a8d719ca1692b3a6d0d02", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
\clearpage \phantomsection \addcontentsline{toc}{subsection}{copyinto} \label{subr:copyinto} \subsection*{copyinto: copy data from a source to a destination} \subsubsection*{Calling convention} \begin{description} \item[\registerop{rd}] void \item[\registerop{arg0}] Address to copy from \item[\registerop{arg1}] Lengt...
{"hexsha": "7f5e95e6a9098b2900d358a47ad5f1be70757727", "size": 673, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "specification/subr/copyinto.tex", "max_stars_repo_name": "trombonehero/opendtrace-documentation", "max_stars_repo_head_hexsha": "ffa4129d0d6caa1e719502f416a082498c54be5d", "max_stars_repo_licenses": ...
C @(#)bsekvhsh.f 20.3 2/13/96 integer function bsekvhsh (basekv) real basekv c Integer function bsekvhsh computes the hash value of basekv include 'ipfinc/bsekvhsh.inc' integer k real PI parameter (PI = 3.1415926535) k = PI * basekv bsekvhsh = mod (k, BSE_HASHS...
{"hexsha": "10351057b5ed7bf2ae8c7e853fe889c6fe478583", "size": 343, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/bsekvhsh.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, ...
import cv2 import numpy as np from pynput.mouse import Button ,Controller import wx mouse=Controller() app=wx.App(False) (sx,sy)=wx.GetDisplaySize() (camx,camy)=(320,240) cap=cv2.VideoCapture(0) cap.set(3,camx) cap.set(4,camy) #range for HSV (green color) lower_g=np.array([33,70,30]) upper_g=np.array([102,255,255]) ...
{"hexsha": "591f2a985f48bf3a7ee55189ee685eac13ee6b95", "size": 4205, "ext": "py", "lang": "Python", "max_stars_repo_path": "Virtual-Mouse-Using-Gesture-Recognition-master/Virtual_mouse.py", "max_stars_repo_name": "NikisCodes/Machine-Learning", "max_stars_repo_head_hexsha": "649b5edcacd9063e6c37f596c8f930d578c84838", "m...
import numpy as np from gp import * import matplotlib.pyplot as plt def elastic(eps): De = 3760 return De*eps def felastic(eps): De = 1.20535955e+04 return De*eps fdata = np.loadtxt("lodi.dat") fstrain = fdata[:,1] fstress = fdata[:,2] - felastic(fstrain) data = np.loadtxt("lodi-homo.dat") strain = da...
{"hexsha": "cc6019a1e2d6a6578e6c57414ce6a7a9ebe73335", "size": 1493, "ext": "py", "lang": "Python", "max_stars_repo_path": "purgatory/reg2.py", "max_stars_repo_name": "taylanot/GP-INHOUSE", "max_stars_repo_head_hexsha": "b981c75238f90fad736515412a3520a626d04b16", "max_stars_repo_licenses": ["BSD-4-Clause-UC"], "max_sta...
/* Desc: narf_interst_image.cpp Author: Sasha Sax, CVGL Desc: Reads in a depth image and saves out an interest image. An interest image contains the 'soft' output of a keypoint detector, in this case NARF (paper: https://pdfs.semanticscholar.org/e070/1662a370622a1cdbb7c6a83bbede3d0e6c23.pdf) Specifical...
{"hexsha": "47225067943c6f825d874be217dcfdbefa67fb73", "size": 13682, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "omnidata_annotator/scripts/narf_interest_image.cpp", "max_stars_repo_name": "EPFL-VILAB/omnidata", "max_stars_repo_head_hexsha": "a1e31eb26172ecf8a3e49ba8a5c82ab3038a9c01", "max_stars_repo_licenses...
(* File: IMO2019_Q4.thy Author: Manuel Eberl, TU München *) section \<open>Q4\<close> theory IMO2019_Q4 imports "Prime_Distribution_Elementary.More_Dirichlet_Misc" begin text \<open> Find all pairs \<open>(k, n)\<close> of positive integers such that $k! = \prod_{i=0}^{n-1} (2^n - 2^i)$. \<close> subsecti...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/IMO2019/IMO2019_Q4.thy"}
import numpy as np import unittest import os import openmdao.api as om from openmdao.utils.assert_utils import assert_near_equal import pycycle.api as pyc from example_cycles.simple_turbojet import MPTurbojet class SimpleTurbojetTestCase(unittest.TestCase): def benchmark_case1(self): pr...
{"hexsha": "9ec989b9ec27e514dbe4b91ba538b9a6a000b09c", "size": 4180, "ext": "py", "lang": "Python", "max_stars_repo_path": "example_cycles/tests/benchmark_simple_turbojet.py", "max_stars_repo_name": "askprash/pyCycle", "max_stars_repo_head_hexsha": "e0845d7e320b6cb47367734c26ec3410c9fa5bf7", "max_stars_repo_licenses": ...