text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
"""Icestupa class object definition """ # External modules import pickle pickle.HIGHEST_PROTOCOL = 4 # For python version 2.7 import pandas as pd import sys, os, math, json import numpy as np import logging import pytz from tqdm import tqdm from codetiming import Timer from datetime import timedelta # Locals dirname...
{"hexsha": "92c37130dfd9eee3a74f387fd08f0314d67511cd", "size": 17492, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/icestupaClass.py", "max_stars_repo_name": "gayashiva/air_model", "max_stars_repo_head_hexsha": "fb6fb02b866a821ee8a83551be78c25bdb7da7c9", "max_stars_repo_licenses": ["FTL"], "max_star...
""" Constant definitions. """ import numpy as np # Messages NOT_SETTING_FONT_MSG = """ You haven't set font. If you are not using English, this may cause text rendering problem. You set font like: text = Text('your text', font='your font') """ SCENE_NOT_FOUND_MESSAGE = """ {} is not in the script """ CHOOSE_NUMBE...
{"hexsha": "e1e8e3064e6e1726a55f430dccd88ba0678f2dc9", "size": 4109, "ext": "py", "lang": "Python", "max_stars_repo_path": "manim/constants.py", "max_stars_repo_name": "rlinwu/manim", "max_stars_repo_head_hexsha": "65e4ff5f2195dbc76198616df0d81f4629863958", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
import pickle from abc import ABC, abstractmethod from dataclasses import dataclass from math import ceil from os.path import exists from pathlib import Path from typing import List import h5py import matplotlib.pyplot as plt import numpy as np from centrex_TlF.states import State, UncoupledBasisState from hexalattice...
{"hexsha": "37d5943e18f80bd32b3c93ce5c8b76959652dac0", "size": 5771, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/trajectories/beamline_elements/meshes.py", "max_stars_repo_name": "otimgren/centrex-molecule-trajectories", "max_stars_repo_head_hexsha": "1624af5b2ad3ee169705957b51f0d0fa6c03f103", "max_stars...
import os import unittest from unittest import mock import json from io import StringIO import pandas as pd import numpy as np import dataprofiler as dp from dataprofiler.data_readers.csv_data import CSVData from dataprofiler.data_readers.csv_data import JSONData from dataprofiler.data_readers.csv_data import Parquet...
{"hexsha": "54fb7799bd9f8b8973c2948b6b3e8e9df1c53d15", "size": 24391, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataprofiler/tests/labelers/test_data_labelers.py", "max_stars_repo_name": "gautomdas/DataProfiler", "max_stars_repo_head_hexsha": "7afaa61a814c1bf24c51272dc2aa657397d9f1e5", "max_stars_repo_lice...
[STATEMENT] lemma wfrestrictedvars\<^sub>e\<^sub>s\<^sub>t_eq_wfrestrictedvars\<^sub>s\<^sub>t: "wfrestrictedvars\<^sub>e\<^sub>s\<^sub>t A = wfrestrictedvars\<^sub>s\<^sub>t (to_st A)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. wfrestrictedvars\<^sub>e\<^sub>s\<^sub>t A = wfrestrictedvars\<^sub>e\<^sub>s\<^su...
{"llama_tokens": 159, "file": "Stateful_Protocol_Composition_and_Typing_Typing_Result", "length": 1}
from math import * import sys, os, argparse, time, gc import numpy as np from scipy.optimize import curve_fit import mdtraj as md import general_scripts as gs import general_maths as gm #import transforms3d.quaternions as q_ops import transforms3d_supplement as qs try: import psutil bPsutil = True except: p...
{"hexsha": "fbc7568363b27f1c65749b410a7d7d1599a690c7", "size": 32180, "ext": "py", "lang": "Python", "max_stars_repo_path": "calculate-Ct-from-traj.py", "max_stars_repo_name": "zharmad/SpinRelax", "max_stars_repo_head_hexsha": "5075c666f9c43e4418a41f724d5548f53e533908", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
from tqdm import trange, tqdm import numpy as np from polaris2.geomvis import R2toR, R2toC2, R3S2toR, utilsh import logging log = logging.getLogger('log') # Simulates a linear dipole imaged by 4f detection system. class FourF: def __init__(self, NA=1.2, M=60, n0=1.3, lamb=0.546, wpx_real=6.5, npx...
{"hexsha": "8a210be36e90005e3f4f076e1d5957bb53c80b92", "size": 22273, "ext": "py", "lang": "Python", "max_stars_repo_path": "polaris2/micro/det.py", "max_stars_repo_name": "talonchandler/polaris2", "max_stars_repo_head_hexsha": "2ec215edf7f63967af109661d40bc55b10d836da", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
""" """ import mysql.connector import json import glob import numpy as np import matplotlib.pyplot as plt __author__ = "Vaclav Kuna" __copyright__ = "" __license__ = "" __version__ = "1.0" __maintainer__ = "Vaclav Kuna" __email__ = "kuna.vaclav@gmail.com" __status__ = "" def db_init(db): """The function crete...
{"hexsha": "412c3d9876c48cb6da5e79a39245d7fe8a7f689f", "size": 2965, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/db_handle.py", "max_stars_repo_name": "KOSASIH/openeew-seismology", "max_stars_repo_head_hexsha": "f51b72ead405e77d1326a91f823c837c8d56c469", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
[STATEMENT] theorem explosion_not_valid: "\<not> valid (Explosion (Pro ''p'') (Pro ''q''))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> valid (Imp' (Con' (Pro ''p'') (Neg' (Pro ''p''))) (Pro ''q'')) [PROOF STEP] using explosion_counterexample transfer [PROOF STATE] proof (prove) using this: \<not> valid_in...
{"llama_tokens": 237, "file": "Paraconsistency_Paraconsistency", "length": 2}
using MyExample using Test my_f(2,3) @testset "MyExample.jl" begin # Write your tests here. my_f(2,3) end
{"hexsha": "a4cf4f5b8ec04fc8470a6873b95c0f1e87a4cba5", "size": 117, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "zhaotianjing/MyExample", "max_stars_repo_head_hexsha": "156dc29138e7450a46365edfd4a945b508981809", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import numpy as np import matplotlib.pyplot as plt from run_sort_table_of_results import RunSortResultsParser def get_filename(n, method, tau, lr, num_epochs, repetition): filename = "./run_sort_results/N_%s_%s/N_%s_%s_TAU_%s_LR_%s_E_%s_REP_%s.txt" %\ (n, method, n, method, tau, lr, num_epochs, repetitio...
{"hexsha": "7b4ddd6ba0bd9a230da28b82a679ff15502cdd9b", "size": 3526, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf/run_sort_learning_curves.py", "max_stars_repo_name": "sprillo/softsort", "max_stars_repo_head_hexsha": "8dcb552804ccb3638ade1a53ef12c0e84f3831d8", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" badge(id, name, department) Return the employee badge label. """ function badge(id, name, department) department = isnothing(department) ? "owner" : department prefix = isnothing(id) ? "" : "[$id] - " prefix * "$name - $(uppercase(department))" end
{"hexsha": "b835406bae3890a67b58bb5299729729f72f823b", "size": 271, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "exercises/concept/name-badge/.meta/exemplar.jl", "max_stars_repo_name": "ee7/julia", "max_stars_repo_head_hexsha": "8ea1a08503d6ee9480655039d45ca02c43d85dd0", "max_stars_repo_licenses": ["MIT"], "ma...
# -*- coding: utf-8 -*- """ Created on Wed Sep 16 19:22:56 2020 @author: albyr """ import numpy as np import csv import pandas as pd import time import math from decimal import * from fractions import Fraction # K = [8, 16, 32, 50, 75, 100] # PARTITIONS = [16] # NUM_TESTS = 100 # MATRIX_SIZE = 100...
{"hexsha": "47a60675d28e59f26d867acfcd82a1ae15828bfa", "size": 3230, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/resources/python/topk_errors.py", "max_stars_repo_name": "AlbertoParravicini/approximate-spmv-topk", "max_stars_repo_head_hexsha": "f98dd1846d81a5c21faa9af48bb5b531543424c7", "max_stars_repo_l...
from meta_policy_search.utils.rl2 import utils from meta_policy_search.utils import logger import numpy as np class Sampler(object): """ Sampler interface Args: env (gym.Env) : environment object policy (maml_zoo.policies.policy) : policy object batch_size (int) : number of trajec...
{"hexsha": "0acc5560d81fcb128436eebf310812c08267b514", "size": 8526, "ext": "py", "lang": "Python", "max_stars_repo_path": "meta_policy_search/samplers/rl2/base.py", "max_stars_repo_name": "clrrrr/promp_plus", "max_stars_repo_head_hexsha": "26f3a80061f85336880241aa3571c92342149f39", "max_stars_repo_licenses": ["MIT"], ...
SUBROUTINE IS_VLOC ( report, lenr, keywd, mxp, iptr, vlat, vlon, + ipkey, iret ) C************************************************************************ C* IS_VLOC * C* * C* This subroutine gets the volcano location. * C* ...
{"hexsha": "a2af062971e51f2d925d605bd5614a0864d42a84", "size": 3740, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/bridge/is/isvloc.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
""" Plot results Author(s): Wei Chen (wchen459@umd.edu) """ import os import numpy as np from sklearn.manifold import TSNE from sklearn.preprocessing import MinMaxScaler from sklearn.metrics import pairwise_distances from matplotlib import pyplot as plt from matplotlib import cm import matplotlib import seaborn as s...
{"hexsha": "7bb6a6b8b4d79737f9c5addf2c3f0b754e2a13ed", "size": 13943, "ext": "py", "lang": "Python", "max_stars_repo_path": "airfoil/plot_results.py", "max_stars_repo_name": "wchen459/PaDGAN", "max_stars_repo_head_hexsha": "298c20eba29ff3e2054b53e3f982bd6bf4c24632", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
""" Test functions for GEE External comparisons are to R and Stata. The statsmodels GEE implementation should generally agree with the R GEE implementation for the independence and exchangeable correlation structures. For other correlation structures, the details of the correlation estimation differ among implementa...
{"hexsha": "7c9e2b68d08dcb7acb6b97951f32cfcf5794907a", "size": 79629, "ext": "py", "lang": "Python", "max_stars_repo_path": "statsmodels/genmod/tests/test_gee.py", "max_stars_repo_name": "aliavni/statsmodels", "max_stars_repo_head_hexsha": "ef5d57a8d45de76a895e9401705280d558d688ad", "max_stars_repo_licenses": ["BSD-3-C...
from jina.executors.encoders.helper import reduce_mean import numpy as np from tests import JinaTestCase class HelperTestCases(JinaTestCase): def test_reduce_mean_with_correct_input(self): correct_data = np.random.rand(10, 10, 3) correct_mask = np.random.rand(10, 10) correct_mean = reduce...
{"hexsha": "b9d83f3a407a6c49bf859ca683edb825ec63b78d", "size": 732, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/executors/encoders/nlp/test_helper.py", "max_stars_repo_name": "gvvynplaine/jina", "max_stars_repo_head_hexsha": "1441f40f849d22c21b8397527960b4307ff0d5a3", "max_stars_repo_licenses": ["...
*DECK DPCHCI SUBROUTINE DPCHCI (N, H, SLOPE, D, INCFD) C***BEGIN PROLOGUE DPCHCI C***SUBSIDIARY C***PURPOSE Set interior derivatives for DPCHIC C***LIBRARY SLATEC (PCHIP) C***TYPE DOUBLE PRECISION (PCHCI-S, DPCHCI-D) C***AUTHOR Fritsch, F. N., (LLNL) C***DESCRIPTION C C DPCHCI: DPCHIC Initial ...
{"hexsha": "fcf03c4b8a19e8c22a2021798b45a36d96138a67", "size": 5777, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "slatec/src/dpchci.f", "max_stars_repo_name": "andremirt/v_cond", "max_stars_repo_head_hexsha": "6b5c364d7cd4243686488b2bd4318be3927e07ea", "max_stars_repo_licenses": ["Unlicense"], "max_stars_coun...
module FDMTests include("../test_fdm.jl") nparts = (2,2,2) prun(test_fdm,sequential,nparts) nparts = 4 prun(test_fdm,sequential,nparts) end # module
{"hexsha": "2485ecc57d250f4354a0b215295e550e3c55eb97", "size": 153, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/sequential/FDMTests.jl", "max_stars_repo_name": "fverdugo/ChunkyArrays.jl", "max_stars_repo_head_hexsha": "ca220ee518247f0b46b9cdb086dc58c92a68685c", "max_stars_repo_licenses": ["MIT"], "max_st...
import os import sys import math import torch import argparse import numpy as np from torch.utils.data import DataLoader from models import BiLSTMCRF from loss_func import CRF_Loss from data_utils import MyDataset, build_tokenizer, build_embedding_matrix, compute_score class Instructor: ''' Model training and eval...
{"hexsha": "dbcd3dd9dc96b8afcca84937a85e16bfb38c994f", "size": 9569, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "hiyouga/BiLSTM-CRF-PyTorch-demo", "max_stars_repo_head_hexsha": "83a391cd55629cf7f425172a3a0e50f118a2a80e", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect from django.urls import reverse from django.utils import timezone from django.views import generic from django.core import serializers from chartjs.views.lines import BaseLineChartView from chartjs.colors import next_co...
{"hexsha": "b60c7f09974d97d770b6e9c8cf837825fcac99e8", "size": 15122, "ext": "py", "lang": "Python", "max_stars_repo_path": "polls/views.py", "max_stars_repo_name": "feraco/shifting-morals", "max_stars_repo_head_hexsha": "115b80ca82d0715db49e593e1463a449ded0477c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
LOGICAL FUNCTION OPNLIST3( FID, PGNAME ) RESULT( OFLAG ) !!*********************************************************************** !! Version "$Id: opnlist3.f90 118 2019-06-15 20:50:32Z coats $" !! EDSS/Models-3 I/O API. !! Copyright (C) 1992-2002 MCNC and Carlie J. Coats, Jr., !! (C) 2003-2013 Ba...
{"hexsha": "91b7dc3fe44c3bfdf5f0060c4ada2230ed76cf41", "size": 13114, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "JPS_CITY_CHEM/citychem-1.3/preproc/bconcc2.2/ioapi3.2/ioapi/opnlist3.f90", "max_stars_repo_name": "mdhillmancmcl/TheWorldAvatar-CMCL-Fork", "max_stars_repo_head_hexsha": "011aee78c016b76762eaf5...
#!/bin/python # -*- coding: utf-8 -*- import time import numpy as np from tqdm import tqdm from grgrlib.core import timeprint from grgrlib.optimize import cmaes from .stats import logpdf def npas(self, func=None, X=None, init_states=None, vals=None, covs=None, nsamples=False, bound_sigma=4, frtol=1e-5, seed=0, verbo...
{"hexsha": "ecfd318dae85983cd72acf8714f7b38469123690", "size": 3470, "ext": "py", "lang": "Python", "max_stars_repo_path": "econsieve/npas.py", "max_stars_repo_name": "gboehl/econsieve", "max_stars_repo_head_hexsha": "f43a2a34c5714465165961bc82451b7529286069", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "...
# -*- coding: utf-8 -*- import click import logging from pathlib import Path from dotenv import find_dotenv, load_dotenv import numpy as np import h5py from src.config.load_config import load_config def generate_sinusoids(frequencies, amplitudes, phases, duration, fs, *args, **kwargs): t = (np.arange(duration)/fs)...
{"hexsha": "0d631562349e3f2354f37959229ac6142eab1a97", "size": 3882, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/make_dataset.py", "max_stars_repo_name": "egaznep/toy_vae_example", "max_stars_repo_head_hexsha": "a41bed14454462da9a1b0ca658f4e72998b7d10b", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import torch from collections import deque from .a2c_ppo_acktr import utils from .a2c_ppo_acktr.envs import make_vec_envs def evaluate(actor_critic, ob_rms, task_sequences, seed, num_processes, eval_log_dir, device, obs_shape, current_task_idx, gamma): eval_episode_rewards_arr = []...
{"hexsha": "38eb2863ed3d641b3b24e8cb44247c2f5c952ee1", "size": 2570, "ext": "py", "lang": "Python", "max_stars_repo_path": "RL/rl_module/evaluation.py", "max_stars_repo_name": "Yujun-Shi/BLIP", "max_stars_repo_head_hexsha": "87bc558aec17feb6c65ed3c37ab9317fd444b254", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
\section{Introduction} \label{sec:introduction} Type systems are one of the most widely-used techniques for program verification. A type checker only accepts a program if it can \emph{prove} the absence of an entire class of bugs. % Typed functional languages like \ocaml and \haskell are equipped with particularly pow...
{"hexsha": "06c164f3bf1c59eb265fbfa242d3ca0e91a3f868", "size": 8560, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "paper/oopsla17-cameraready/introduction.tex", "max_stars_repo_name": "ucsd-progsys/nate", "max_stars_repo_head_hexsha": "8b1267cd8b10283d8bc239d16a28c654a4cb8942", "max_stars_repo_licenses": ["BSD-3...
module PolyharmonicInterpolation using LinearAlgebra export PolyharmonicInterpolator,polyharmonicSpline struct PolyharmonicInterpolator knots::AbstractArray values::Vector{Float64} nPts::Int dim::Int order::Int w::Vector{Float64} v::Vector{Float64} end PolyharmonicInterpolator(knots::AbstractArray{T},values::...
{"hexsha": "85bddbb2d5cc4894dbe58844d26566ab5e71c5ad", "size": 2692, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Julia/polyHarmonicInterp.jl", "max_stars_repo_name": "MathOnco/ploidyEvolution", "max_stars_repo_head_hexsha": "5e7211f2e6ef7a19ac3c72c5836d8aa3298177b6", "max_stars_repo_licenses": ["BSD-2-Clause"...
# -*- coding: utf-8 -*- #/usr/bin/python2 ''' By kyubyong park. kbpark.linguist@gmail.com. https://www.github.com/kyubyong/dc_tts ''' from __future__ import print_function, division import numpy as np import librosa import os, copy import matplotlib matplotlib.use('pdf') import matplotlib.pyplot as plt from scipy imp...
{"hexsha": "0733b383322d2b5d597ea1627fed25167c48a73f", "size": 6088, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "Edresson/DCTTS-Faithful", "max_stars_repo_head_hexsha": "2ec0b38acd76316fedb7d44e6b03b677b72b5b3a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
""" We load Linjie's features from: datasets/npy_per_img_id.visual_grounding_coco_gt Each feature is named as: visual_grounding_coco_000000581857.npz containing {norm_bb, features, conf, soft_labels} The order of extracted bbox and features should align with ann_ids for each img_id. We save this order for the use of...
{"hexsha": "90812ced40acf2085726de3a18883c7d77b4be6b", "size": 4639, "ext": "py", "lang": "Python", "max_stars_repo_path": "uniter_model/scripts/map_iid_to_ann_ids.py", "max_stars_repo_name": "intersun/LightningDOT", "max_stars_repo_head_hexsha": "5f2880f69ba87b8701ab89348d70ebb11432578c", "max_stars_repo_licenses": ["...
"""Copyright (c) 2021 Alistair Child 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, distribute, ...
{"hexsha": "a22c9fe8d3d74ec1ce8d4468ad0d0c86121c750d", "size": 3163, "ext": "py", "lang": "Python", "max_stars_repo_path": "percolate/Subfunctions/integrate.py", "max_stars_repo_name": "AlistairChild/Percolate", "max_stars_repo_head_hexsha": "064ef1d16b6bc50f2ebab251c439b30386378235", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python3 import rospy import serial.tools.list_ports import time from collections import deque import numpy as np from std_msgs.msg import String, UInt16MultiArray import sys, select, os, serial # Custom Modules from motor_util import Hermes if os.name == 'nt': import msvcrt else: import tty, ter...
{"hexsha": "bfbaf9af9c382a48d904f1ca72a734624687bdd5", "size": 1914, "ext": "py", "lang": "Python", "max_stars_repo_path": "catkin_ws/src/MIE438/scripts/write_STM.py", "max_stars_repo_name": "Martin0xFF/FlapJack", "max_stars_repo_head_hexsha": "51886f88135fc12a80dcc083a16646ec77cfe7dc", "max_stars_repo_licenses": ["MIT...
[STATEMENT] lemma newton_seq_fact7: "(ns (Suc n)) \<ominus> (ns n) = \<ominus>divide (f\<bullet>(ns n)) (f'\<bullet>(ns n))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ns (Suc n) \<ominus> ns n = \<ominus> local.divide (f \<bullet> ns n) (f' \<bullet> ns n) [PROOF STEP] using newton_seq.simps(2)[of n] newton_s...
{"llama_tokens": 2753, "file": "Padic_Ints_Hensels_Lemma", "length": 3}
# *****************************COPYRIGHT****************************** # (C) Crown copyright Met Office. All rights reserved. # For further details please refer to the file LICENCE.txt # which you should have received as part of this distribution. # *****************************COPYRIGHT****************************** #...
{"hexsha": "9ef44d2efacbb088847118e82881d06a9a7e0531", "size": 2665, "ext": "py", "lang": "Python", "max_stars_repo_path": "um_sstpert/setup.py", "max_stars_repo_name": "metomi/mule", "max_stars_repo_head_hexsha": "44a64bb6d49755cf6fec3d466e8719671e73d130", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
import os from random import choices import numpy as np from mesa import Model from mesa.datacollection import DataCollector from mesa.space import Grid from mesa.time import RandomActivation from .agents.block import Block from .agents.citizen import Citizen from .agents.cop import Cop from .environments import * t...
{"hexsha": "b83dbfe9d590abd705c5222d6b39088749171111", "size": 7394, "ext": "py", "lang": "Python", "max_stars_repo_path": "pvp/model.py", "max_stars_repo_name": "SubhadityaMukherjee/DMAS-B07", "max_stars_repo_head_hexsha": "b4fb9f09d2ae1ca10e7f2e1de2ed49a7de9c7f79", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
\documentclass[a4paper,11pt]{report} %\usepackage{hyperref} \usepackage{setspace} \usepackage{url,natbib,amssymb,hyperref,graphicx,wrapfig,setspace,multirow,booktabs,subfig,array,wrapfig,calc} \usepackage{array} \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}} \usepackage{fancyhdr} \usepackage{color} \usepackage...
{"hexsha": "8302cd8592e421773d20c6bef3a91d534a958f9e", "size": 35296, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapter5/ch5.tex", "max_stars_repo_name": "braghiere/Thesis", "max_stars_repo_head_hexsha": "feff90ddd880d1961db64e2b719618c2bf6b294f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
# Kernel Principal Component Analysis import Arpack """Center a kernel matrix""" struct KernelCenter{T<:Real} means::AbstractVector{T} total::T end """Fit `KernelCenter` object""" function fit(::Type{KernelCenter}, K::AbstractMatrix{T}) where {T<:Real} n = size(K, 1) means = vec(mean(K, dims=2)) ...
{"hexsha": "eb94dce1ba7f653b2f31612be5427745f286da8c", "size": 3835, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/kpca.jl", "max_stars_repo_name": "yingqiuz/MultivariateStats.jl", "max_stars_repo_head_hexsha": "b84cbc94c04057297acc42168a58b599a984f87d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging as _logging import pybullet as _pybullet import numpy as _numpy from .joint_info import JointInfo from .joint_state import JointState from .link_state import LinkState from .dynamics_info import DynamicsInfo _log = _logging.getLogg...
{"hexsha": "680ecbbe155e8f98714355ff7cccb41dafd05832", "size": 5970, "ext": "py", "lang": "Python", "max_stars_repo_path": "pybulletX/_wrapper.py", "max_stars_repo_name": "mcx/pybulletX", "max_stars_repo_head_hexsha": "38877701d2eb875d7493f6f45172af94eae3b5a7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 55,...
import tensorflow as tf import numpy as np import tensorflow.keras as keras import time from ragged_plotting_tools import make_cluster_coordinates_plot,make_original_truth_shower_plot import matplotlib.pyplot as plt from latent_space_grid_op import LatentSpaceGrid def createData(nvert,ncoords,nfeat): c = tf.rando...
{"hexsha": "cfaa828eeea8abc4273ac0a83815ab34ae855aca", "size": 3843, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules/compiled/tests/test_latent_cnn.py", "max_stars_repo_name": "shahrukhqasim/HGCalML", "max_stars_repo_head_hexsha": "2808564b31c89d9b7eb882734f6aebc6f35e94f3", "max_stars_repo_licenses": ["B...
[STATEMENT] lemma eliminate_swap_val [simp, intro]: "r \<notin> RID\<^sub>V v \<Longrightarrow> r' \<notin> RID\<^sub>V v \<Longrightarrow> \<R>\<^sub>V (id(r := r', r' := r)) id v = v" "l \<notin> LID\<^sub>V v \<Longrightarrow> l' \<notin> LID\<^sub>V v \<Longrightarrow> \<R>\<^sub>V id (id(l := l', l' := l)) v =...
{"llama_tokens": 284, "file": "Concurrent_Revisions_Renaming", "length": 1}
import numpy as np import tensorflow as tf import requests #NLP import spacy import nltk from nltk.sentiment.vader import SentimentIntensityAnalyzer from pattern.en import pluralize, singularize #universal sentence encoder import tensorflow_hub as hub import pickle from sklearn.neighbors import KNeighborsClassifier...
{"hexsha": "a7b5743a8bd4e5711a01966e1ae9b558dd6de383", "size": 6241, "ext": "py", "lang": "Python", "max_stars_repo_path": "agent_commons.py", "max_stars_repo_name": "lcebear/memoryDialogueBot", "max_stars_repo_head_hexsha": "f87fda3475f95c62096b02e6ef65b3aa1508f7ff", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
[STATEMENT] lemma inj_on_imp_inj_on_swap: "inj_on f A \<Longrightarrow> a \<in> A \<Longrightarrow> b \<in> A \<Longrightarrow> inj_on (Fun.swap a b f) A" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>inj_on f A; a \<in> A; b \<in> A\<rbrakk> \<Longrightarrow> inj_on (f \<circ> Transposition.transpose a b)...
{"llama_tokens": 151, "file": null, "length": 1}
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Description # ============================================================================== # # Private functions. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ###################################...
{"hexsha": "b4af40c8d8439a21811a1a1c8eda21f67f5d609d", "size": 16602, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/private.jl", "max_stars_repo_name": "charleskawczynski/PrettyTables.jl", "max_stars_repo_head_hexsha": "0ab64207f0689e35ad2e3e807ca1d2dc1357c7b8", "max_stars_repo_licenses": ["MIT"], "max_star...
import jax.numpy as jnp import numpy as np from scipy.interpolate import interp1d, RectBivariateSpline from scipy.special import binom # finite differentiation def central_difference(func, axis='x', args=(), order=1, delta=1.e-4): r"""Return n-th order central numerical difference of a given time-independent...
{"hexsha": "36a8413f3d61f2f6d6ef59d56d1ec4fc2d5d29a9", "size": 7266, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/nc_utils.py", "max_stars_repo_name": "antelk/ipd-autodiff", "max_stars_repo_head_hexsha": "df0e56f243d0fe11abcf1a538b9b896ee307bf88", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from bids.layout import BIDSLayout import pytest import os from os.path import join from bids.tests import get_test_data_path from bids.variables import (merge_variables, DenseRunVariable, SimpleVariable, load_variables) from bids.variables.entities import RunInfo import numpy as np import p...
{"hexsha": "54083989ca265764c236f3f6b28122c37e6ad4c6", "size": 9847, "ext": "py", "lang": "Python", "max_stars_repo_path": "bids/variables/tests/test_variables.py", "max_stars_repo_name": "marcobarilari/pybids", "max_stars_repo_head_hexsha": "ce98ad8fee0ed19518a7b9ba48aec5eed13a4783", "max_stars_repo_licenses": ["MIT"]...
import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np def color2gray(img): I=[] for i in range(0,len(img)): temp=[] for j in range(0,len(img[i])): t=img[i][j][0]+img[i][j][1]+img[i][j][2] temp.append(int(t/3)) I.append(temp) retu...
{"hexsha": "839efa31528235387ea347d222d06b9d8072ca36", "size": 1681, "ext": "py", "lang": "Python", "max_stars_repo_path": "Assignment-2/3_1.py", "max_stars_repo_name": "yashwanthguguloth24/Image-Processing", "max_stars_repo_head_hexsha": "2573cbc6bb43576f67d300694943fd83ab3a0aef", "max_stars_repo_licenses": ["MIT"], "...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Python libraries import logging import numpy as np import pandas as pd import scipy.sparse as scsp from scipy.sparse import save_npz import os from time import time # Local imports from rdigraphs.supergraph.snode import DataGraph from rdigraphs.sim_graph.sim_bigraph imp...
{"hexsha": "6f1ae93de97a8c1d43f5186b2bcb12c25759bb4c", "size": 30535, "ext": "py", "lang": "Python", "max_stars_repo_path": "rdigraphs/supergraph/sedge.py", "max_stars_repo_name": "Orieus/supergraph", "max_stars_repo_head_hexsha": "9132c318da8a3f48a859887555532d5cfa5dbad7", "max_stars_repo_licenses": ["MIT"], "max_star...
''' Image Translation image translation through path tracing engine functions: test_image = import_image(path, edge_len) patt = gen_image(edge_len, style = 'target') rays = gen_img_rays(edge_len, height, ss = 1.0) back_rays = gen_rev_rays(paths, opt_params) grid ...
{"hexsha": "c22ae3f51a19ed4df8d50c73e3bacbfe39d02b2b", "size": 9483, "ext": "py", "lang": "Python", "max_stars_repo_path": "optics/image.py", "max_stars_repo_name": "bfw930/optics", "max_stars_repo_head_hexsha": "a6034104e0934a083992ea188504c5cfe386beef", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
// Boost.Geometry // Copyright (c) 2021, Oracle and/or its affiliates. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_CLOSEST_POINTS_POINT_TO_G...
{"hexsha": "88fad5247f3f85c862b797669db846a6912a268b", "size": 13653, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "AqooleEngine/src/main/cpp/boost/boost/geometry/algorithms/detail/closest_points/point_to_geometry.hpp", "max_stars_repo_name": "kodai731/Aqoole-Engine-Android-Vulkan-Rendering-Engine-", "max_stars_...
subroutine qqb_zgam_frag(p,msq) implicit none C-----Author John Campbell C-----June 2000 !---- Modifed to include Fragmentation by !---- C Williams Dec 2010 c----Matrix element for Z production C----averaged over initial colours and spins c q(-p1)+qbar(-p2)-->(e^-(p3)+e^+(p4))+g(p5) c--- include ...
{"hexsha": "49055e5ccf2aba50fa80d06df09f6136e3e9da7f", "size": 8052, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MCFM-JHUGen/src/Zgam/qqb_zgam_frag.f", "max_stars_repo_name": "tmartini/JHUGen", "max_stars_repo_head_hexsha": "80da31668d7b7eb5b02bb4cac435562c45075d24", "max_stars_repo_licenses": ["Apache-2.0"]...
import numpy as np def computeCost(X, y, theta): """ computes the cost of using theta as the parameter for linear regression to fit the data points in X and y """ m = y.size J = 0 # ====================== YOUR CODE HERE ====================== # Instructions: Compute the cost of a partic...
{"hexsha": "2db3ff24665f700f65434af8b3f98e5fbcd6ccce", "size": 481, "ext": "py", "lang": "Python", "max_stars_repo_path": "ex1/computeCost.py", "max_stars_repo_name": "cyberbaker/CSML", "max_stars_repo_head_hexsha": "c2adad5e796fa12b5afcfafd5fd1b51f642ce730", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
%------------------------- % Resume in Latex % Author : Sourabh Bajaj % License : MIT %------------------------ \documentclass[letterpaper,11pt]{article} \usepackage{latexsym} \usepackage[empty]{fullpage} \usepackage{titlesec} \usepackage{marvosym} \usepackage[usenames,dvipsnames]{color} \usepackage{verbatim} \usepac...
{"hexsha": "afef47f66e316dc0df13e4853188d06fd36b9ed4", "size": 7720, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "eric_doi_resume.tex", "max_stars_repo_name": "ericdoi/resume", "max_stars_repo_head_hexsha": "f96f92a59f1239ec7892d63d295c85aa5306ad19", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "ma...
from collections import defaultdict import vg import math as m import numpy as np import random import pandas as pd np.seterr(divide='ignore', invalid='ignore') # ------------------------------------------------------------------------------------------------------------- # This file is Rule_based and gives 66 or 67...
{"hexsha": "270dd0d51709021fba8d0b47513d7ef420191cad", "size": 10142, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python_Files/1C2P/Rule_Based_theta_66acc.py", "max_stars_repo_name": "nananasiri/Multiple-Interaction-Photon-Events-in-Pixelated-CZT", "max_stars_repo_head_hexsha": "f13259b34c703bd378492d263ac27...
# -*- coding: utf-8 -*- """house-prices.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1ylkgQqd7E7ocX0GKeTtsKoUNhNE_5vb5 In this exercise you'll try to build a neural network that predicts the price of a house according to a simple formula. So,...
{"hexsha": "ccc25d26bd9fc043c1a3b6b33f4b4cf80d3644ec", "size": 1366, "ext": "py", "lang": "Python", "max_stars_repo_path": "Mock-Test-Questions/Intro-to-ml/Housing-Prices/house_prices.py", "max_stars_repo_name": "Ace5584/Machine-Learning-Notes", "max_stars_repo_head_hexsha": "8d721895165833f6ea2ac3c75326ec5ed29111eb", ...
\input{../preamble} %---------------------------------------------------------------------------------------- % TITLE PAGE %---------------------------------------------------------------------------------------- \title[第4讲]{第4讲 :Optimization of Virtual Machine Monitor} % The short title appears at the bottom of ever...
{"hexsha": "367733829b292afc8b6fd93aede9dab5f282298f", "size": 15941, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "lec4/slide-04-03.tex", "max_stars_repo_name": "LearningOS/aos-lectures", "max_stars_repo_head_hexsha": "9181bb49eb58a2d3a3944068ba9390a5f0061f89", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars...
""" Tensorflow model """ from __future__ import absolute_import import numpy as np import os from .base import Model import logging logger=logging.getLogger(__name__) #直接加载pb文件 class MxNetModel(Model): def __init__(self, model, loss, bounds, ...
{"hexsha": "91e9e4a4ab8325ecba5c9cd9cde3dcf8cc7ff8ff", "size": 2818, "ext": "py", "lang": "Python", "max_stars_repo_path": "adversarialbox/models/mxnet.py", "max_stars_repo_name": "StijnMatsHendriks/adversarial_attack_demo", "max_stars_repo_head_hexsha": "956fd8a96c0c8abf1f4a3e0ffb9d83eeda79b8ff", "max_stars_repo_licen...
import os.path import time from collections import defaultdict # import ray import cv2 import numpy as np import pandas as pd import utils.metrics as metrics from joblib import Parallel, delayed from scipy import spatial from tqdm import tqdm from utils.hpatch import get_patch from utils.misc import green PARALLEL_E...
{"hexsha": "f2f31c3d61c3641224cbb2f5a4cae01d464a970c", "size": 13508, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/utils/tasks.py", "max_stars_repo_name": "iago-suarez/hpatches-benchmark", "max_stars_repo_head_hexsha": "09aba1268f7b16f94676bca4bb32909c25497b41", "max_stars_repo_licenses": ["BSD-2-Claus...
# # Tools that implement common datacube operations. The first argument in each # function is a numpy ndarray. Datacubes are not the same as mapcubes. # from copy import deepcopy import numpy as np # Decorator testing the input for these functions def datacube_input(func): def check(*args, **kwargs): if...
{"hexsha": "332e1b29c5a6fd518222dbeab9669d2ff534f119", "size": 4556, "ext": "py", "lang": "Python", "max_stars_repo_path": "datacube_tools.py", "max_stars_repo_name": "wafels/utils", "max_stars_repo_head_hexsha": "369dd99d1ec15a079e1d734dce191ee70fc371ea", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":...
""" Predict ======= Functions used to load models at prediction time and produce model decisions. """ from __future__ import print_function import functools import numpy as np import tensorflow as tf from tensorflow_mnist import model, paths @functools.lru_cache() def load_model(): """ Load the saved model...
{"hexsha": "534469eccab12484855802db1e7461258bd9f751", "size": 1943, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/4-tensorflow-mnist/tensorflow_mnist/predict.py", "max_stars_repo_name": "awcchungster/baklava", "max_stars_repo_head_hexsha": "ad301afd7aa163ccf662efe08d00eeff68cdb667", "max_stars_repo_l...
# -*- coding: utf-8 -*- """ Core class and method definitions Organized as follows: 1) Core class definitions 2) Core method definitions 3) Helper method definitions """ import time import torch import math torch.manual_seed(123456789) import torch.nn as nn import torch.optim as optim from torch.optim import lr_schedul...
{"hexsha": "9d8bd111c4711ae57befafdd36e8481c67d58474", "size": 105108, "ext": "py", "lang": "Python", "max_stars_repo_path": "core.py", "max_stars_repo_name": "keiserlab/consensus-learning-paper", "max_stars_repo_head_hexsha": "2d204362569489b9ab4c861b6cb6c5b819659ada", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# Copyright (c) 1996-2015 PSERC. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Saves a PYPOWER case file. """ from sys import stderr from os.path import basename from numpy import array, c_, r_, any from scipy.io import savemat from py...
{"hexsha": "f3705577e42e29d0bf3a4f4377da57e36a074790", "size": 17789, "ext": "py", "lang": "Python", "max_stars_repo_path": "pypower/savecase.py", "max_stars_repo_name": "Bengt/PYPOWER", "max_stars_repo_head_hexsha": "78a0f8d4765d147f8237e9a905ef871508ecfee7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
#include <boost/algorithm/string.hpp> #include <boost/foreach.hpp> #include <boost/thread/lock_guard.hpp> #include "VFSPP/merged.hpp" #include "VFSPP/util.hpp" using namespace vfspp; using namespace vfspp::merged; using namespace boost; namespace { boost::shared_ptr<MergedEntry> getParent(MergedEntry* entry) { ...
{"hexsha": "880894add1ffc1844701f42252f948911c193d81", "size": 7900, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/merged/MergedEntry.cpp", "max_stars_repo_name": "asarium/vfspp", "max_stars_repo_head_hexsha": "854af7fdef8b8f72629c81fae5f2404b572d490d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
/// @file t_UString.cpp /// @brief A test unit for checking if all interfaces is /// available to use. /// @author Do Hyun Yun /// @date 2008-07-11 /// /// /// @brief Test all the interfaces in UString class. /// /// @details /// /// ==================================== [ Test Schemes ] =============...
{"hexsha": "b5b24ff891964693ff566f14edf602774f2c59e6", "size": 7221, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/duplicate-detection/t_dupd.cpp", "max_stars_repo_name": "izenecloud/idmlib", "max_stars_repo_head_hexsha": "ec6afd44490170a70ef980afa6d21fba8c77ed9d", "max_stars_repo_licenses": ["Apache-2.0"],...
## 3D Panels #==========================================================================================# abstract type AbstractPanel3D <: AbstractPanel end """ Panel3D(p1, p2, p3, p4) A composite type consisting of 4 Cartesian coordinates `p1, p2, p3, p4` representing corners of a panel in 3 dimensions. The fol...
{"hexsha": "b917363b9b1c383ff7f13e751f072f9a23597787", "size": 2322, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Geometry/PanelGeometry/3d_panels.jl", "max_stars_repo_name": "GodotMisogi/AeroMDAO.jl", "max_stars_repo_head_hexsha": "e05b3d4589583a3e106c5fc2fde86578483133c2", "max_stars_repo_licenses": ["MI...
import cv2 import math import os import random as rnd import numpy as np from PIL import Image, ImageDraw, ImageFilter def _apply_func_distorsion(image, mask, vertical, horizontal, max_offset, func): """ Apply a distorsion to an image """ # Nothing to do! if not vertical and not horizontal: ...
{"hexsha": "a3a99e2ed67bf01132d1bb96a7a89ec0157b634e", "size": 4115, "ext": "py", "lang": "Python", "max_stars_repo_path": "trdg/distorsion_generator.py", "max_stars_repo_name": "Rashomon5487/TextRecognitionDataGenerator", "max_stars_repo_head_hexsha": "d029d2518bd8a8b9de670ec295e61fd65a26a025", "max_stars_repo_license...
N = 10 folders = ["definedtypes", "factors", "newlines", "quoting", "scaling", "separators", "typeinference"] cd(Pkg.dir("DataFrames", "test", "data")) do for folder in folders for filename in readdir(folder) relpath = joinpath(folder, filename) df = benchmark(() -> readt...
{"hexsha": "26c18001c10c6345503459f5238e3ca3f4f3560e", "size": 552, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "benchmark/io.jl", "max_stars_repo_name": "tkelman/DataFrames.jl", "max_stars_repo_head_hexsha": "a6e63137b7ae08ca0958ee99eade7486acffab75", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ...
# This code is from # Pareto Multi-Task LearningLin # Xi Lin, Hui-Ling Zhen, Zhenhua Li, Qingfu Zhang, Sam Kwong # Neural Information Processing Systems (NeurIPS) 2019 # https://github.com/Xi-L/ParetoMTL print("Script started.") import numpy as np import os import torch import torch.utils.data from model_lenet imp...
{"hexsha": "6f4b6d8cce363dd37a9d0a18b3f9d69734cf20ea", "size": 9434, "ext": "py", "lang": "Python", "max_stars_repo_path": "multiMNIST/previously/gradnorm_train.py", "max_stars_repo_name": "kelvin95/EPOSearch", "max_stars_repo_head_hexsha": "020f0a8890437449dd7bb37534697aa9f71e8305", "max_stars_repo_licenses": ["MIT"],...
"""Implementation ported from Boost, which is: Copyright John Maddock 2007. Use, modification and distribution are subject to 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) """ from numba import njit, vectorize import numpy as np from ...
{"hexsha": "2a77e77f4c8dee7876064d9c5be37d55b39d221f", "size": 5636, "ext": "py", "lang": "Python", "max_stars_repo_path": "spycial/ei.py", "max_stars_repo_name": "person142/spycial", "max_stars_repo_head_hexsha": "d017048c8c09ee0714f438cb75c2e221e068baee", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
[STATEMENT] lemma finite_long_chain_with_card: "[f\<leadsto>Q|x..y..z] \<Longrightarrow> card Q \<ge> 3" [PROOF STATE] proof (prove) goal (1 subgoal): 1. [f\<leadsto>Q|x..y..z] \<Longrightarrow> 3 \<le> card Q [PROOF STEP] unfolding chain_defs numeral_3_eq_3 [PROOF STATE] proof (prove) goal (1 subgoal): 1. ((finite Q...
{"llama_tokens": 295, "file": "Schutz_Spacetime_TemporalOrderOnPath", "length": 2}
import unittest from Swing.util.permutation_test import Permuter import numpy as np from random import randint import numpy.testing as npt import pdb import random """I'm performing a running mean and variance calculation. It seems to be a close enough approximation, and this unit test will check if the answer is withi...
{"hexsha": "fd05a558ba6d5f1b6755fe0adba34ec01e385423", "size": 7825, "ext": "py", "lang": "Python", "max_stars_repo_path": "Swing/unittests/test_permutation_tests.py", "max_stars_repo_name": "jiawu/Roller", "max_stars_repo_head_hexsha": "a70e350905a59c2254dcefda7ab23c6417cf8f7d", "max_stars_repo_licenses": ["MIT"], "ma...
[STATEMENT] lemma map_inj_on: assumes map: "map f xs = map f ys" and inj: "inj_on f (set xs Un set ys)" shows "xs = ys" [PROOF STATE] proof (prove) goal (1 subgoal): 1. xs = ys [PROOF STEP] using map_eq_imp_length_eq [OF map] assms [PROOF STATE] proof (prove) using this: length xs = length ys map f xs = map f ys i...
{"llama_tokens": 1013, "file": null, "length": 7}
# Lead-Acid Models We compare a standard porous-electrode model for lead-acid batteries with two asymptotic reductions. For a more in-depth introduction to PyBaMM models, see the [SPM notebook](./SPM.ipynb). Further details on the models can be found in [[1]](#ref) <a name="ref">[1]</a> Sulzer, Valentin, S. Jon Chapm...
{"hexsha": "28eaa4d996821ddfc9fb1fcf235b553c99467e5d", "size": 40409, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "examples/notebooks/models/lead-acid.ipynb", "max_stars_repo_name": "danieljtait/PyBaMM", "max_stars_repo_head_hexsha": "f9d6143770e4a01099f06e3574142424730f731a", "max_stars_repo_lic...
(* Counter with contributions. A specification derived from the modular specification proved in modular_incr module. *) From iris.base_logic Require Import invariants. From iris.program_logic Require Export weakestpre. From iris.heap_lang Require Export lang proofmode notation. From iris.proofmode Require Import pro...
{"author": "pavel-ivanov-rnd", "repo": "iris-heaplang-experiments", "sha": "a283a53fe994672f7a6dbdaefa0d4eedd044b733", "save_path": "github-repos/coq/pavel-ivanov-rnd-iris-heaplang-experiments", "path": "github-repos/coq/pavel-ivanov-rnd-iris-heaplang-experiments/iris-heaplang-experiments-a283a53fe994672f7a6dbdaefa0d4e...
import sys import os import numpy as np from scipy import misc import matplotlib.pyplot as plt if len(sys.argv) < 2: print("bad usage") sys.exit(1) photo_data = misc.imread(sys.argv[1]) with open(os.path.basename(sys.argv[1])+"-dump.txt", "w") as f: data = [] for x in photo_data: ...
{"hexsha": "9e5e6212fd8949b5d40c8d1f72d1b5da3249e0fd", "size": 572, "ext": "py", "lang": "Python", "max_stars_repo_path": "python-compare-images/dump_image.py", "max_stars_repo_name": "zeralight/image-matching", "max_stars_repo_head_hexsha": "6e254d45586ec703fd08ebf07df9b48b685fdc6d", "max_stars_repo_licenses": ["Apach...
import numpy as np import matplotlib.pyplot as plt import pandas as pd from copy import deepcopy from indicator_utils import simple_moving_avg, RSI, max_drawdown, BollingerBand, EWM, sliding_window_view, smaCross # Signal Generating Functions def SMASignal(input_data, fast_period, slow_period, signal_to_return = 'buy...
{"hexsha": "68318dc3557b9f52e7e91e35d8aa13b25e21da79", "size": 6240, "ext": "py", "lang": "Python", "max_stars_repo_path": "gp_signals.py", "max_stars_repo_name": "nuke504/qf-genetic-program", "max_stars_repo_head_hexsha": "452d9d0879c9e366e46d638b8975774cfe07e221", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python import numpy as np import pandas as pd from scipy.optimize import curve_fit, minimize df = pd.DataFrame({ 'capital': [2860, 2740, 2950, 2880, 2510, 2690, 2990, 2850, 3000, 3070], 'labor': [10680, 10310, 10680, 10800, 10540, 10420, 10940, 10710, 9900, 9930], 'production': [49920, 47750, 50550,...
{"hexsha": "0281b0924ea05f442a9ab525e605b37e189e11dc", "size": 2685, "ext": "py", "lang": "Python", "max_stars_repo_path": "labs/examples/4/py/all.py", "max_stars_repo_name": "Sky-Nik/ecology-and-economics", "max_stars_repo_head_hexsha": "25dfc7bccc9b8c430eb31729805f75daebda24d0", "max_stars_repo_licenses": ["MIT"], "m...
module Sets.PredicateSet.Listable where import Lvl open import Data.List as List using (List) open import Data.List.Functions renaming (_++_ to _∪ₗ_) using (singleton) open import Data.List.Relation.Membership renaming (_∈_ to _∈ₗ_ ; _∈!_ to _∈!ₗ_) using (use ; skip) open import Data.List.Relation.Permutation ope...
{"hexsha": "2a51bff46fae8dfca53f77a9504d640d77b5526b", "size": 2528, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Sets/PredicateSet/Listable.agda", "max_stars_repo_name": "Lolirofle/stuff-in-agda", "max_stars_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_stars_repo_licenses": ["MIT"], "m...
//============================================================================= // Copyright (C) 2001 Authors // // This source file may be used and distributed without restriction provided // that this copyright statement is not removed from the file and that any // derivative work contains the original copyright noti...
{"hexsha": "a59377830a114e4a34bf42d7309105d7eb6208c6", "size": 2587, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "fpga/xilinx_diligent_s3board/rtl/verilog/openmsp430/filelist.f", "max_stars_repo_name": "galenseitz/openmsp430", "max_stars_repo_head_hexsha": "92c883abb4518dbc35b027e6cad5ffef5b2fbb81", "max_star...
import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib import colors from scipy import misc import argparse import os parser = argparse.ArgumentParser(description='Display recorded Kinect data', fromfile_prefix_chars="@") parser.add_argument('-p', dest='recording_path', action='s...
{"hexsha": "2e0823debe71f68add68083c5e2d38be772d5b46", "size": 2173, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/show.py", "max_stars_repo_name": "dotKokott/KinectV2Recorder", "max_stars_repo_head_hexsha": "16f8e1eba28abaedc8ce4830addb2fcc78df8ebf", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy as np import tensorflow as tf import os import ray from Ray_ACNet import ACNet from Runner import imitationRunner, RLRunner from parameters import * import random ray.init(num_gpus=1) tf.reset_default_graph() print("Hello World") config = tf.ConfigProto(allow_soft_placement = True) config.gpu_option...
{"hexsha": "4a15171b6064f676e51d3e338f3ad734330384bd", "size": 8291, "ext": "py", "lang": "Python", "max_stars_repo_path": "driver.py", "max_stars_repo_name": "ct2034/PRIMAL2", "max_stars_repo_head_hexsha": "1bd44cba6f674e37e78b893a323d35a348dfb759", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 58, "max_stars...
import dataLoader import argparse import numpy as np import scipy.io as io parser = argparse.ArgumentParser() # The locationi of testing set parser.add_argument('--dataRoot', default='../Data/test/', help='path to real image distorted by water') parser.add_argument('--experiment', default=None, help='the path to store...
{"hexsha": "23e9e4b7b1fce85ced384c89dbb37f370e7328da", "size": 1524, "ext": "py", "lang": "Python", "max_stars_repo_path": "multiBounceDistribution.py", "max_stars_repo_name": "YouweiLyu/SingleImageShapeAndSVBRDF", "max_stars_repo_head_hexsha": "ef699658ae57a931ed14854137bfcb9f301de442", "max_stars_repo_licenses": ["MI...
import os import collections import json import logging import subprocess from tqdm import tqdm import numpy as np from pyquaternion import Quaternion from smoke.utils.miscellaneous import mkdir ID_TYPE_CONVERSION = { 0: 'bicycle', 1: 'bus', 2: 'car', 3: 'construction_vehicle', 4: 'motorcycle', ...
{"hexsha": "159f36bdb81ccfc7a9effe5e8e59f25ae3b5adc5", "size": 4455, "ext": "py", "lang": "Python", "max_stars_repo_path": "smoke/data/datasets/evaluation/nuscenes/nuscenes_eval.py", "max_stars_repo_name": "dashidhy/SMOKE", "max_stars_repo_head_hexsha": "724876443db90bbdca8f942515e881993b3f47b2", "max_stars_repo_licens...
using Chess, Test include("piece.jl") include("square.jl") include("squareset.jl") include("move.jl") include("board.jl") include("san.jl") include("chess960.jl") include("movegen.jl")
{"hexsha": "6cc6b1c8edecf7ef823dd56c3f82c68cf5c43f43", "size": 186, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "NateSolon/Chess.jl", "max_stars_repo_head_hexsha": "f626fade5a8720aabdb6817ab20044bc13cad506", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 96, "...
import functools import json import os import sys import time import keras.metrics as keras_metrics import mri_loader import numpy as np from keras.optimizers import Adam from src import networks sys.path.append('../evolving_wilds') from cnn_utils import classification_utils, vis_utils from cnn_utils import metrics ...
{"hexsha": "b88c95292f8b8c4d0c50550636c2cb8a2aeaece0", "size": 35626, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/transform_models.py", "max_stars_repo_name": "yumoye/brainstorm", "max_stars_repo_head_hexsha": "2c8989232c5dc6a336ca1158a26fe0c6a647b84e", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import gym import numpy as np from gym.utils import seeding from gym.envs.classic_control import rendering class PushBoxEnv(gym.Env): metadata = {'render.modes': ['human', 'rgb_array'], 'video.frames_per_second': 1} def __init__(self): self.reward = np.array([[-100, -100, -100, -100,...
{"hexsha": "3155561fa3f831878019cc101796ed1c2e263d6b", "size": 6204, "ext": "py", "lang": "Python", "max_stars_repo_path": "temporal_difference/push_box_game/push_box_game.py", "max_stars_repo_name": "GodWriter/RL-Pytorch", "max_stars_repo_head_hexsha": "26f5b3ec4c12bd5c7c33d0a9b0952165c86330ae", "max_stars_repo_licens...
/********************************************************************** * Copyright (c) 2008-2015, Alliance for Sustainable Energy. * All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by t...
{"hexsha": "b98c0ff8ec9f47405e2e2c5fb65ac2ee957ceb31", "size": 6103, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "openstudiocore/src/model/UtilityCost_Computation.cpp", "max_stars_repo_name": "pepsi7959/OpenstudioThai", "max_stars_repo_head_hexsha": "fb18afb8b983f71dd5eb171e753dac7d9a4b811b", "max_stars_repo_li...
import cv2 import numpy as np import os import pandas as pd import time import torch import torch.nn as nn import torchvision.transforms as transforms from casme.stats import AverageMeter, StatisticsContainer from casme.model_basics import casme_load_model, get_masks_and_check_predictions, BoxCoords, classification_a...
{"hexsha": "7151406d38244e710c8460d5b76f683ac8bfaa0f", "size": 19441, "ext": "py", "lang": "Python", "max_stars_repo_path": "casme/tasks/imagenet/score_bboxes.py", "max_stars_repo_name": "zphang/saliency_investigation", "max_stars_repo_head_hexsha": "cdd03e92c4b8b26c43a60cb50f9d97ea2c7f9400", "max_stars_repo_licenses":...
# # Base integration tests for lithium-ion models # import pybamm import tests import numpy as np class BaseIntegrationTestLithiumIon: def run_basic_processing_test(self, options, **kwargs): model = self.model(options) modeltest = tests.StandardModelTest(model, **kwargs) modeltest.test_all...
{"hexsha": "ac09973c5c2b80e1ad45b206ba331adaf3232aba", "size": 9773, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/integration/test_models/test_full_battery_models/test_lithium_ion/base_lithium_ion_tests.py", "max_stars_repo_name": "priyanshuone6/PyBaMM", "max_stars_repo_head_hexsha": "fb6ebaa12900d227d3...
import numpy as np import pandas as pd import math from scipy.stats import norm import matplotlib.pyplot as plt def forwardPrice(spot,strike,maturity,rate,dividend,vol = None): return math.exp(-rate*maturity)*((math.exp((rate-dividend)*maturity)*spot) - strike) def europeanCallOptionPrice(spot,strike,maturity,rat...
{"hexsha": "648452c84919b892d9f942f1c6125b74576a2520", "size": 1562, "ext": "py", "lang": "Python", "max_stars_repo_path": "B3_VanillaOptionsinBlackScholesWorld.py", "max_stars_repo_name": "Abhi1588/PricingToolBox", "max_stars_repo_head_hexsha": "2c0bded1a6374c481113c972c819101df043d9f2", "max_stars_repo_licenses": ["M...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from __future__ import unicode_literals from pkg_resources import resource_filename import nose from nose.tools import * import numpy as np # from sknano.generators import DefectGenerator from sknano.io import XYZReader from s...
{"hexsha": "cba9f50f5c9711de5328b6e01250b73ef6a83011", "size": 581, "ext": "py", "lang": "Python", "max_stars_repo_path": "sknano/generators/tests/test_defect_generators.py", "max_stars_repo_name": "haidi-ustc/scikit-nano", "max_stars_repo_head_hexsha": "ef9b24165ba37918b3f520657f7311ba139b3e7d", "max_stars_repo_licens...
# Copyright 2021 The TensorFlow Probability 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 o...
{"hexsha": "3fee7f63b09fd7c46858621e809e785053034e9c", "size": 12329, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_probability/python/experimental/math/manual_special_functions_test.py", "max_stars_repo_name": "PavanKishore21/probability", "max_stars_repo_head_hexsha": "4bad1b796b0e6ed2959205915d42...
#! /usr/bin/python3 ''' CQ_Gears - CadQuery based involute profile gear generator Copyright 2021 meadiode@github 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/LIC...
{"hexsha": "7f0b66d80eba63cd4954b14ea6734b43a46d2400", "size": 7645, "ext": "py", "lang": "Python", "max_stars_repo_path": "cq_gears/worm_gear.py", "max_stars_repo_name": "meadiode/cq_gears", "max_stars_repo_head_hexsha": "76cc1d4ffce6b784bcf05c3dcdc9160a7f9151af", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
%% BioMed_Central_Tex_Template_v1.06 %% % % bmc_article.tex ver: 1.06 % % % %%IMPORTANT: do not delete the first line of this template %%It must be present to enable the BMC Submission system to %%recognise this template!! %%%%%%%%...
{"hexsha": "96dadfd65a0b2de706a4fa5f606a96727b0ef8bd", "size": 50188, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tea_paper_docs/doc/tea_main_text.tex", "max_stars_repo_name": "Lioscro/TissueEnrichmentAnalysis", "max_stars_repo_head_hexsha": "33ef872902818e2ca9b75dda1ea110cdee2f0703", "max_stars_repo_licenses"...
using MPI using StaticArrays using Logging using Printf using LinearAlgebra using GPUifyLoops using Test using CLIMA using CLIMA.Mesh.Topologies using CLIMA.Mesh.Grids using CLIMA.MPIStateArrays using CLIMA.DGmethods using CLIMA.DGmethods.NumericalFluxes using CLIMA.ODESolvers using CLIMA.GenericCallbacks using CLIMA.A...
{"hexsha": "bde38c73dffac870a93b9315b980dbbb57535676", "size": 8968, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/DGmethods/horizontal_integral_test.jl", "max_stars_repo_name": "favba/CLIMA", "max_stars_repo_head_hexsha": "0fd99247903bba86497c6b50333cc7e38fc949aa", "max_stars_repo_licenses": ["Apache-2.0"...
using AdventOfCodeSolutions using Test import IterTools: groupby function input(puzzle::Puzzle{2019, 4, n}) where n io = openInput(puzzle) inputs = split(read(io, String), '-', keepempty=false) return parse.(Int, inputs) end function isValidPassword(password) it = adjacentElements(digits(password)) ...
{"hexsha": "3fe1f294b666452bcf1a232793b661bf635a6ca2", "size": 1279, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "2019/src/day_4.jl", "max_stars_repo_name": "MarkRedeman/AdventOfCode.jl", "max_stars_repo_head_hexsha": "d83584f4cc5272cf125325c98b0a98aedffb2e30", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
using PkgSRA using Plots, Random, Distributions, Interpolations pyplot() Random.seed!(11) using BSON: @save include("../scripts/paper_settings.jl"); ##### ##### Define the controlled dynamical system ##### # Load example problem include(EXAMPLE_FOLDERNAME*"example_falling_ball.jl") U_starts = [6.0] U_widths = 0.2;...
{"hexsha": "fe30f9913c69666d166e1586739d8ba5c7c5ccd0", "size": 4710, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "paper/dat/ball_system_NN_controller.jl", "max_stars_repo_name": "Charles-Fieseler/Learn_Control_Signals", "max_stars_repo_head_hexsha": "987a3775f4f75080c23d631832dd6963e7be078a", "max_stars_repo_l...
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserve import labgraph as lg import numpy as np class RandomMessage(lg.Message): timestamp: float data: np.ndarray
{"hexsha": "83e0070193924ad480e79bd5abcebf3baa246dbc", "size": 196, "ext": "py", "lang": "Python", "max_stars_repo_path": "extensions/graphviz_support/graphviz_support/tests/demo_graph/random_message.py", "max_stars_repo_name": "dtemir/labgraph", "max_stars_repo_head_hexsha": "34e12f203ba1254291a6b3b08458ede75f1d4383",...
module spindispersion real*8, allocatable, public, save :: wq(:,:) real*8, public, save :: cw public :: spin_wav contains subroutine get_cw() use constants, only : kboltz use param, only : sspin, atom_label, nrpt, nsite, r_bond implicit none logical ...
{"hexsha": "7054e7b11c12279821505a5f6f14e280867492b6", "size": 3565, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "spinwav.f90", "max_stars_repo_name": "oarcelus/HFPP", "max_stars_repo_head_hexsha": "d0da797c4cf51b09a261e355385905131ccadcf4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
import warnings from abc import ABC from abc import abstractmethod import gdspy import numpy as np import pkg_resources import scipy.integrate as integrate import scipy.special as special from SiPANN.import_nn import ImportLR from SiPANN.nn import bentWaveguide from SiPANN.nn import straightWaveguide from SiPANN.scee...
{"hexsha": "63fa07aa56fa361b1e9c34643172fed3a2b54315", "size": 12405, "ext": "py", "lang": "Python", "max_stars_repo_path": "SiPANN/comp.py", "max_stars_repo_name": "contagon/SiPANN", "max_stars_repo_head_hexsha": "bc342631b1923653b9398c86559930a0a29500e9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max...
### Part 1: Performing the simulation experiment from random import choice from statistics import mean n = 1000 observed = [] for i in range(n): outcome = choice(['Head', 'Tail']) if outcome == 'Head': observed.append(1) else: observed.append(0) print("Prob = ", round(mean(observed), 2)) ### Part 2: Computin...
{"hexsha": "6fdacdcdcb5c0dd1750db5bec249984cadec447a", "size": 805, "ext": "py", "lang": "Python", "max_stars_repo_path": "ch03/moving_avg_tossing_coin.py", "max_stars_repo_name": "yosais/Computer-Simulation-Book", "max_stars_repo_head_hexsha": "87b2d83eded02f69cd7b8d839adfa554b25ae19d", "max_stars_repo_licenses": ["MI...