text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import matplotlib.pyplot as plt from matplotlib.dates import DateFormatter, WeekdayLocator, DayLocator, MONDAY from matplotlib.finance import quotes_historical_yahoo_ohlc, candlestick_ohlc import numpy as np import matplotlib.pyplot as plt import datetime from matplotlib.finance import candlestick_ohlc from matplotlib...
{"hexsha": "fde650c2cdaf3eaecb2710f8727f44c5fa9465b8", "size": 1487, "ext": "py", "lang": "Python", "max_stars_repo_path": "chart.py", "max_stars_repo_name": "guardiantest/dailyreport", "max_stars_repo_head_hexsha": "60a075432f3356d4a4a75568205e683fee58466d", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count":...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Integrations tests for the LLVM CompilerGym environments.""" import numpy as np import pytest from compiler_gym.envs.llvm.llvm_env import L...
{"hexsha": "b7f5b3dddb18d0b96a58004cac6fcc15b2332b47", "size": 5590, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/llvm/reward_spaces_test.py", "max_stars_repo_name": "ibrumar/CompilerGym", "max_stars_repo_head_hexsha": "ecd1b62a3f072082227910a2a2487d6e06a52d4e", "max_stars_repo_licenses": ["MIT"], "max_...
import unittest import os import copy from itertools import chain import warnings import numpy as np from monty.json import jsanitize, MontyDecoder from pint import UnitStrippedWarning from propnet.dbtools.storage import StorageQuantity, ProvenanceStore, ProvenanceStoreQuantity from propnet.core.symbols import Symbol...
{"hexsha": "8711099b0bad7c3f1f762a759c4c062ea332a6b1", "size": 37432, "ext": "py", "lang": "Python", "max_stars_repo_path": "propnet/dbtools/tests/test_storage.py", "max_stars_repo_name": "ruriboshi/propnet", "max_stars_repo_head_hexsha": "770703fb4fc344f785f89c02f26b31ea5733d2bd", "max_stars_repo_licenses": ["BSD-3-Cl...
#!/usr/bin/env python import operator import matplotlib.lines import matplotlib.pyplot as plt import numpy as np import ce_expansion.atomgraph as atomgraph import ce_expansion.npdb as npdb def _build_atomgraph(bimetallic_result): """ Returns an atomgraph object from the result of a bimetallic result query. ...
{"hexsha": "94bc26cfd6ab3924bcf44adae554d3288551715a", "size": 9430, "ext": "py", "lang": "Python", "max_stars_repo_path": "ce_expansion/plots/plots.py", "max_stars_repo_name": "loevlie/ce_expansion", "max_stars_repo_head_hexsha": "17417b9467914dd91ee8e0325cfdc3bd19ad7f1e", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Imports import nsNLP import sys import torchlanguage.transforms import os import torch import settings from tools import load_glove_embeddings as gle import numpy as np # Function words function_words = [u"a", u"about", u"above", u"after", u"after", u"again", u"again...
{"hexsha": "c335bc00286de3baff1597c3a977a78d1ccd9fba", "size": 10692, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/features.py", "max_stars_repo_name": "nschaetti/PAN17-author-profiling", "max_stars_repo_head_hexsha": "c1d1041bbdc4b631709b1cbc134c562fcff2b542", "max_stars_repo_licenses": ["Apache-2.0"],...
import os import numpy as np import flopy # Assign name and create modflow model object modelname = 'units' mf = flopy.modflow.Modflow(modelname, exe_name='mf2005', model_ws=os.path.join('data')) cbc_unit_nb = 1053 # Model domain and grid definition Lx = 1000. Ly = 1000. ztop = 0. zbot = -50. nlay = 1...
{"hexsha": "490a40b6e32dcc52a3b68a06ed983944588c5daf", "size": 2323, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/Testing/testunitcbc.py", "max_stars_repo_name": "MzCorona/flopyy", "max_stars_repo_head_hexsha": "91969cc191006db5cfd5d231faa513479992a50a", "max_stars_repo_licenses": ["CC0-1.0", "BSD-3-...
import numpy as np import matplotlib.pyplot as plt import util import yield_curve # dr(t) = (k - theta * r(t))dt + sigma dW(t) # Parameters T = 7 # In years dt = 0.5 # Time step k = 0.0045 # 0.45% theta = 0.1 # 10% sigma = 0.01 # 1% # Starting point r0 = 0.046 # 4.6% # Strike K = 0.047 # 4.7% # Early exercise p...
{"hexsha": "f64cf454cfb43c8450210fd6d78e305a7975d7a3", "size": 666, "ext": "py", "lang": "Python", "max_stars_repo_path": "vasicek/test_vasicek.py", "max_stars_repo_name": "ladjanszki/interest_rate_option", "max_stars_repo_head_hexsha": "1e0a89eed6afa79a3b5019852a194ab87a2397d7", "max_stars_repo_licenses": ["MIT"], "ma...
#include "luxurycoinupdater.h" #include "util.h" #include <iostream> #include <vector> #include <boost/regex.hpp> #include <sstream> #include <boost/algorithm/string.hpp> const std::string LuxuryCoinUpdater::ClientVersionSrcFileLink = "https://raw.githubusercontent.com/qw23qw2/luxurycoin/master/wallet/clientversion....
{"hexsha": "6775f3f186e85c432a601cdfa8c0e4944d614038", "size": 4950, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "wallet/luxurycoinupdater.cpp", "max_stars_repo_name": "qw23qw2/luxurycoin", "max_stars_repo_head_hexsha": "a9190882cd6534564d951099b9323d2c788bd123", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
function [y,p_avg,p_std]=multinomrnd(p,m,n) %Performs random sampling from a binomial distribution % % [y]=multinomrnd(p,m,n) % where p=1-by-k vector of probabilities of occurrence % n=sample size % and m= number of trials % y=samples-matrix of size k-by-m % % for picking out one of k mixture components,...
{"author": "OHBA-analysis", "repo": "HMM-MAR", "sha": "bb0433b75482e473980791a2b30afe2012cf6578", "save_path": "github-repos/MATLAB/OHBA-analysis-HMM-MAR", "path": "github-repos/MATLAB/OHBA-analysis-HMM-MAR/HMM-MAR-bb0433b75482e473980791a2b30afe2012cf6578/utils/math/multinomrnd.m"}
# PlacesCNN to predict the scene category, attribute, and class activation map in a single pass # by Bolei Zhou, sep 2, 2017 # last modified date: Dec. 27, 2017, migrating everything to python36 and latest pytorch and torchvision import os import io import torch import torchvision.models as models from torch.autograd ...
{"hexsha": "eb371f5950527c838a5328499de3a4f203548073", "size": 7222, "ext": "py", "lang": "Python", "max_stars_repo_path": "frontend/run_placesCNN_unified.py", "max_stars_repo_name": "dendisuhubdy/deepmersion", "max_stars_repo_head_hexsha": "d6413a998e2d2de57c74a123de144cffd1235462", "max_stars_repo_licenses": ["MIT"],...
% Read all images and extract point coordinates. % % All information needed are stored and retrieved % from the function read_configuration, % which in turn uses the --config=FILENAME command-line % option. % $Author: svoboda $ % $Revision: 2.0 $ % $Id: im2points.m,v 2.0 2003/06/19 12:07:11 svoboda Exp $ % $State: Exp...
{"author": "strawlab", "repo": "MultiCamSelfCal", "sha": "0a26c88c63d8513eab76553033a9a6fb15ba6575", "save_path": "github-repos/MATLAB/strawlab-MultiCamSelfCal", "path": "github-repos/MATLAB/strawlab-MultiCamSelfCal/MultiCamSelfCal-0a26c88c63d8513eab76553033a9a6fb15ba6575/MultiCamValidation/FindingPoints/im2points.m"}
struct SimControls nu::Int64 ctrl::MJMatrix normalized::Vector{mjtNum} ctrl_magnitude::MJMatrix function SimControls(data::MJData) mat = data.ctrl norm = zeros(data.nu) rng = data.model.actuator_ctrlrange new(data.nu, mat, norm, rng) end end function SetSimCont...
{"hexsha": "0eee490d61226720dbf03b453149b59384010f40", "size": 2312, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/simenvi.jl", "max_stars_repo_name": "liammcinroy/reaching_goal_inference", "max_stars_repo_head_hexsha": "fac7afbec868af605c19edd404da61209c83a394", "max_stars_repo_licenses": ["MIT"], "max_sta...
Require Export Iron.Language.SystemF2Effect.Type.Exp.Base. Require Export Iron.Language.SystemF2Effect.Type.Operator.FlattenT. Require Export Iron.Language.SystemF2Effect.Type.Relation.KindT. Require Export Iron.Language.SystemF2Effect.Type.Relation.KindTs. Require Export Iron.Language.SystemF2Effect.Type.Relation.Equ...
{"author": "discus-lang", "repo": "iron", "sha": "75c007375eb62e1c0be4b8b8eb17a0fe66880039", "save_path": "github-repos/coq/discus-lang-iron", "path": "github-repos/coq/discus-lang-iron/iron-75c007375eb62e1c0be4b8b8eb17a0fe66880039/done/Iron/Language/SystemF2Effect/Type/Operator/BunchT.v"}
""" Provides the implementation of isoparametric quadrilateral elements for plane-stress and plane-strain problems. """ import abc import numpy as np __author__ = 'Konstantinos Tatsis' __email__ = 'konnos.tatsis@gmail.com' class Quadrilateral(abc.ABC): """ Class for interfacing the methods of...
{"hexsha": "3ce86e7f417b5634f141f166ca780fd296466559", "size": 19868, "ext": "py", "lang": "Python", "max_stars_repo_path": "quadrilaterals.py", "max_stars_repo_name": "ETH-WindMil/benchmarktu1402", "max_stars_repo_head_hexsha": "54dae8f159c8525c17b9bff942e7b6b60fe3a66c", "max_stars_repo_licenses": ["Apache-2.0"], "max...
(* Title: HOL/Imperative_HOL/ex/Imperative_Quicksort.thy Author: Lukas Bulwahn, TU Muenchen *) section \<open>An imperative implementation of Quicksort on arrays\<close> theory Imperative_Quicksort imports "../Imperative_HOL" Subarray "HOL-Library.Multiset" "HOL-Library.Code_Target_Numeral" begi...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/Imperative_HOL/ex/Imperative_Quicksort.thy"}
import pandas as pd import numpy as np from Levenshtein import distance,ratio import multiprocessing import itertools import os import sys def get_Enigma(): usecols = ['identifier','shipper_party_name', 'shipper_address','harmonized_number'] dtype = {'identifier':str,'shipper_party_name':str,'shipper_address'...
{"hexsha": "aa92dd8e584cece01292d3504b4f794f91bd2d28", "size": 4576, "ext": "py", "lang": "Python", "max_stars_repo_path": "shipper_matching/Enigma_Enigma_matching.py", "max_stars_repo_name": "raymond180/FEIII-SHIP", "max_stars_repo_head_hexsha": "05587eabd323c4fd38ad8d295ff3595139f5dcab", "max_stars_repo_licenses": ["...
# demo # ==== # fibonacci # --------- fib(n) = n ≤ 2 ? n : fib(n-1) + fib(n-2) fib(1000) # never terminates in ordinal execution fib(m) # undef var fib("1000") # obvious type error # language features # ----------------- # user-defined types struct Ty{T} fld::T end function foo(a) v = Ty(a) re...
{"hexsha": "b0f347feca29b30b6188ab007ec09b57d86eb610", "size": 627, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "demo.jl", "max_stars_repo_name": "GunnarFarneback/JET.jl", "max_stars_repo_head_hexsha": "281bfb0b23b21a74c8dcc55daa26777ff6026622", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_st...
UCD student. Former south Davis safeway employee. Currently serving time at Davis Shell as the full time whipping boy. . Can often be seen walking around the north Davis Safeway or Longs at The Marketplace or the SaveMart in the Anderson Plaza. Can be contacted via email at somesthetic@gmail.com
{"hexsha": "fe74fb5d0055fddbc0f0c5d4d67c9b42b743ca17", "size": 301, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/GarrettTiemann.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
#!/usr/bin/python import sys import json import locale import numpy as np import matplotlib import os import warnings from sklearn import preprocessing warnings.simplefilter('ignore', np.RankWarning) InDir = "" if (len(sys.argv) > 1): InDir = sys.argv[1] else: InDir = "./" GeneratePlot = True if (len(sys...
{"hexsha": "d14a9a1d209771cf7d76544d796a8ee06aa383ad", "size": 4318, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/smoothing/polynomial/poly-line-generation.py", "max_stars_repo_name": "xuther/nyc-taxi-data", "max_stars_repo_head_hexsha": "70893f8299c293a487fd69e2c74517eb764ce997", "max_stars_repo_license...
from .output import Output class MatplotlibOutput(Output): def __init__(self, args): super().__init__(args) self.columns = None self.rows = [] # Called in the beginning of processing, # to announce what columns to use in the output. def start(self, columns): self.colum...
{"hexsha": "1e3b3d79107ee07265e0aabf43c1705012f912c8", "size": 2876, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/git_repo_language_trends/_internal/matplotlib_output.py", "max_stars_repo_name": "Enselic/git-repo-language-trend", "max_stars_repo_head_hexsha": "b701138a85f7c7b4e3cde5f6cd29b6d006b493cf", "m...
!------------------------------------------------------------------ ! Program to test if my concept for checking that two structures ! are equal works properly. ! ! Works by generating two equal geometric shapes as points ! (sets of coordinates on a grid), but located at different ! positions on the grid. If it wor...
{"hexsha": "734ff8d4fc667a0420a13a9a1c91a8a0a6617c5b", "size": 3422, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "test_compare_procedure/test1/main.f95", "max_stars_repo_name": "ElenaKusevska/coordinates_on_a_grid", "max_stars_repo_head_hexsha": "6605c76d9c6561fee6eaaa844fb954f7784f623c", "max_stars_repo_li...
/* Copyright 2016-2017 Robotics and Biology Lab, TU Berlin. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of condit...
{"hexsha": "b9a4f4314bdc962071684c20cea3dfd2d27b5c95", "size": 5326, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "ecto_rbo_grasping/src/ecto_rbo_grasping/SlidingSeeds.cpp", "max_stars_repo_name": "SoMa-Project/vision", "max_stars_repo_head_hexsha": "ea8199d98edc363b2be79baa7c691da3a5a6cc86", "max_stars_repo_lic...
using JuMP, EAGO m = Model() EAGO.register_eago_operators!(m) @variable(m, -1 <= x[i=1:3] <= 1) @variable(m, -7.107954588851326 <= q <= 8.439913276188518) add_NL_constraint(m, :(log(1 + exp(-0.4953615570310643 ...
{"hexsha": "9a9b289ea7babebb5cc33a53d74ef5b4b5da47f6", "size": 4910, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "solver_benchmarking/MINLPLib.jl/instances/ANN_Expr/55_softplus_3_3_3.jl", "max_stars_repo_name": "PSORLab/RSActivationFunctions", "max_stars_repo_head_hexsha": "0bf8b4500b21144c076ea958ce93dbdd19a5...
# Test to verify database integrity import os import pytest from . import REFERENCE_TABLES from sqlalchemy import func from simple.schema import * from astrodbkit2.astrodb import create_database, Database, or_ from astropy.table import unique from astroquery.simbad import Simbad from astrodbkit2.utils import _name_for...
{"hexsha": "fc4a1e7504b0cdaab6849db6134292508ae110fd", "size": 13638, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_integrity.py", "max_stars_repo_name": "dr-rodriguez/SIMPLE", "max_stars_repo_head_hexsha": "d1decae38b1a3320ace97c3deccc7e058afc5d09", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
import unittest import astropy.units as u import numpy as np from input import exomol_file, dace_file from rapoc.loaders import ExoMolFileLoader, DACEFileLoader class ExoMolLoaderTest(unittest.TestCase): loaded = ExoMolFileLoader(filename=exomol_file) mol, mol_mass, pressure_grid, temperature_grid, wavenumb...
{"hexsha": "11217a282ba0c8a4617c7cbc2b0bbdc01ea94419", "size": 4043, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_loader.py", "max_stars_repo_name": "ExObsSim/Rapoc-public", "max_stars_repo_head_hexsha": "dd5a4af1e7ab531e8d3176026354719585752d58", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
import math import tqdm import numpy as np import scipy.ndimage import matplotlib.pyplot as plt import seaborn as sns import sympy.utilities.iterables sns.set(color_codes=True) def nchoosek(n, k): return math.factorial(n) / (math.factorial(k) * math.factorial(n - k)) def compute_probability_of_configuration(c...
{"hexsha": "9138c6e0d98309da8e2b65601bba2576b2178dc6", "size": 3019, "ext": "py", "lang": "Python", "max_stars_repo_path": "exam/tiny_perc.py", "max_stars_repo_name": "Schoyen/FYS4460", "max_stars_repo_head_hexsha": "0c6ba1deefbfd5e9d1657910243afc2297c695a3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
import unittest import numpy as np import openmdao.api as om from openmdao.utils.assert_utils import assert_near_equal from openmdao.utils.mpi import MPI if MPI: try: from openmdao.vectors.petsc_vector import PETScVector except ImportError: PETScVector = None class L2(om.ExplicitComponent): ...
{"hexsha": "7cc354f6c7f6f619a47c714409bb306c457bdbf2", "size": 30380, "ext": "py", "lang": "Python", "max_stars_repo_path": "openmdao/core/tests/test_dyn_sizing.py", "max_stars_repo_name": "JustinSGray/blue", "max_stars_repo_head_hexsha": "49f4edd00eda43f7ce5e10a5121839f2e897d429", "max_stars_repo_licenses": ["Apache-2...
import random import pandas as pd import numpy as np import matplotlib.pyplot as plt #%matplotlib inline import tensorflow as tf import keras.backend as K from keras import metrics from keras.models import Model, load_model from keras.layers import Input, BatchNormalization, Activation, Dense, Dropout,Maximum from ker...
{"hexsha": "cfd835f844f20b909ad833fb7bc798e9d2b46eb1", "size": 5248, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "GingerSpacetail/Brain-Tumor-Segmentation-and-Survival-Prediction-using-Deep-Neural-Networks", "max_stars_repo_head_hexsha": "f627ce48e44bcc7d295ee1cf4086bfdfd7705...
import numpy as np def mse(y_true, y_pred): return np.mean(np.power(y_true-y_pred, 2)) def mse_prime(y_true, y_pred): return 2*(y_pred - y_true)/ y_true.size def binary_cross_entropy(y_true, y_pred): return - np.mean(((y_true * np.log(y_pred)) + ((1 - y_true) * np.log((1 - y_pred))))) def BCE_prime(y_t...
{"hexsha": "5e1071d2ae7f9c0891107b33341a4e54fd147b1a", "size": 411, "ext": "py", "lang": "Python", "max_stars_repo_path": "loss.py", "max_stars_repo_name": "rijulizer/NeuralFlow", "max_stars_repo_head_hexsha": "246bdc95f7715b841dccd25ebcdbb72aead4354d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
'''An implementation of the GLYMMR alogrithm using some of the pre-existing CCARL framework. GLYMMR Algorithm (from Cholleti et al, 2012) 1. Initialize each unique node among all the binding glycans as a subtree of size 1. Let this set be S. 2. For each subtree in S: - Calculate the number of binding glycans conta...
{"hexsha": "63261582ea67de4a0224a6abe31f400cdea5d12a", "size": 5596, "ext": "py", "lang": "Python", "max_stars_repo_path": "glymmr.py", "max_stars_repo_name": "andrewguy/CCARL", "max_stars_repo_head_hexsha": "0afda67bcc58be2b6b6bf426cccaab04453c0590", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_stars...
from __future__ import annotations import numpy as np import bottleneck as bn from sigpyproc.core import kernels def running_median(array, window): """ Calculate the running median of an array. Parameters ---------- array : numpy.ndarray The array to calculate the running median of. ...
{"hexsha": "cac334f7d9974bfd512ef872cad96bd245476508", "size": 4923, "ext": "py", "lang": "Python", "max_stars_repo_path": "sigpyproc/core/stats.py", "max_stars_repo_name": "FRBs/sigpyproc3", "max_stars_repo_head_hexsha": "b1f87c0174ca5770d0e5b5380a53cdd2dd8b7a86", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
%% Parameters Parameters_struct.CenterFrequency = 5e9; % 5 GHz Parameters_struct.Bandwidth = 20e6; % 20 MHz Parameters_struct.Ts = 1/Parameters_struct.Bandwidth; % 50 ns %% Load Given data load('Long_preamble_slot_Frequency'); % [1x64] load('data_Payload_1'); % [1x48] load('data_Payload_2'); % [1x48] Parameters_struct....
{"author": "MeowLucian", "repo": "SDR_Matlab_OFDM_802.11a", "sha": "ee4a1ff01799242bad455054bfb318242250f973", "save_path": "github-repos/MATLAB/MeowLucian-SDR_Matlab_OFDM_802.11a", "path": "github-repos/MATLAB/MeowLucian-SDR_Matlab_OFDM_802.11a/SDR_Matlab_OFDM_802.11a-ee4a1ff01799242bad455054bfb318242250f973/Global_Pa...
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
{"hexsha": "e3a5a94eab46477a8fb9676f5a5bf67000783018", "size": 7426, "ext": "py", "lang": "Python", "max_stars_repo_path": "dygraph/mobilenet/mobilenet_v1.py", "max_stars_repo_name": "suytingwan/models", "max_stars_repo_head_hexsha": "ccdbfe77d071cc19b55fb9f4b738912e35d982ef", "max_stars_repo_licenses": ["Apache-2.0"],...
[STATEMENT] lemma HMA_isDiagonal_Mod_Type[transfer_rule]: "(Mod_Type_Connect.HMA_M ===> (=)) isDiagonal_mat (isDiagonal::('a::{zero}^'n::{mod_type}^'m::{mod_type} => bool))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (Mod_Type_Connect.HMA_M ===> (=)) isDiagonal_mat isDiagonal [PROOF STEP] proof (intro rel_fun...
{"llama_tokens": 5614, "file": "Smith_Normal_Form_Admits_SNF_From_Diagonal_Iff_Bezout_Ring", "length": 60}
# coding=utf-8 from __future__ import absolute_import, print_function import time import argparse import os import sys import torch torch.manual_seed(0) import numpy as np np.random.seed(0) import torch.utils.data from torch.backends import cudnn from torch.autograd import Variable import glob import models import loss...
{"hexsha": "4c4710494773995e36332912d2e1ea41834ad361", "size": 12946, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "xuefeicao/UDML_SS", "max_stars_repo_head_hexsha": "6d130b088effbd4342c0446f246519bf99d4634e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_sta...
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2014 Olga Diamanti <olga.diam@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://moz...
{"hexsha": "a953be31ccc6940a148e4d06eb414a0ed8424f7e", "size": 26667, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "include/igl/angle_bound_frame_fields.cpp", "max_stars_repo_name": "rushmash/libwetcloth", "max_stars_repo_head_hexsha": "24f16481c68952c3d2a91acd6e3b74eb091b66bc", "max_stars_repo_licenses": ["BSD-...
#Simple Linear Regression #import libraries import numpy as np import pandas as pd import matplotlib.pyplot as plt #Read data dataset = pd.read_csv('Salary_Data.csv') x = dataset.iloc[:,:-1].values y = dataset.iloc[:,1].values #Splitting data from sklearn.model_selection import train_test_split X_train, X_test, Y_tr...
{"hexsha": "1a51675820cd6eec5c073494813b3dd559fb02d0", "size": 1266, "ext": "py", "lang": "Python", "max_stars_repo_path": "ML A-Z/2. Regression/Simple_Linear_Regression.py", "max_stars_repo_name": "Shaon2221/Learning-and-Experimenting_Data-Science", "max_stars_repo_head_hexsha": "817a402158c1cf5d77ce2ea92b3e91470851de...
\section{Functions} % (fold) \label{sec:functions} \begin{frame}\frametitle{Simple example} \framesubtitle{} \emph{Example:} Suppose we want to find the circumference of a circle with radius 2.5. We could write \codeblock{code/functions_radius0.py} \end{frame} \begin{frame}\frametitle{Functions} ...
{"hexsha": "22089920561af8fbd00ee45267e4009bb48287ef", "size": 7947, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "lectures/tex/functions.tex", "max_stars_repo_name": "naskoch/python_course", "max_stars_repo_head_hexsha": "84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from time import time import torch import numpy as np from sklearn.metrics import accuracy_score, mean_squared_error from config.BERT_QS.const import TOKENIZER, MODEL, DEVICE from config.BERT_QS.datapath import RESOURCE_TEST_PATH from models.BERT_QS.evaluate_model import evaluate_model from utils.set_seed import set_se...
{"hexsha": "c5c367c1b72622c81d7639f8a5731a43de1e1dc6", "size": 1755, "ext": "py", "lang": "Python", "max_stars_repo_path": "{{ cookiecutter.repo_name }}/src/models/BERT_QS/calc_test_accuracy.py", "max_stars_repo_name": "reiven-c-t/cookiecutter-data-science", "max_stars_repo_head_hexsha": "33b9ba631128e3269ad3199e41f69d...
import unittest # make sure a __init__.py file exist in the import folder from astropy.io import fits from astropy.table import Table from fermitool.fermitool import * # requires setup.sh to run # import fits file data_path = os.environ["SOURCE_ROOT"] + '/data/gll_psc_v21.fit' try: # does it exists? If yes with fi...
{"hexsha": "8fa00ce6ce0dd638a27ec09274a3abf8d39c2532", "size": 3559, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_fermitool.py", "max_stars_repo_name": "micmes/SourceClassifier", "max_stars_repo_head_hexsha": "c08316d243ea1bf02b667f4f1eb45e198c59f9ea", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
#!/usr/bin/python3 ## Copyright (c) 2018 Idiap Research Institute, http://www.idiap.ch/ ## Written by S. Pavankumar Dubagunta <pavankumar [dot] dubagunta [at] idiap [dot] ch> ## and Mathew Magimai Doss <mathew [at] idiap [dot] ch> ## ## This file is part of RawSpeechClassification. ## ## RawSpeechClassification is f...
{"hexsha": "1771b51a0f9a42177da2a3cd02ebcabbc7c7ee4d", "size": 2568, "ext": "py", "lang": "Python", "max_stars_repo_path": "SpeakerDependent/rawCNN_Pipeline/test.py", "max_stars_repo_name": "Tilak-96/ML-proj2-SER-task", "max_stars_repo_head_hexsha": "50166a08f573dc504bbb6b4aac4d6e17146d57ce", "max_stars_repo_licenses":...
\title{Home} \subsection{A library for probabilistic modeling, inference, and criticism.} Edward is a Python library for probabilistic modeling, inference, and criticism. It is a testbed for fast experimentation and research with probabilistic models, ranging from classical hierarchical models on small data sets to c...
{"hexsha": "3f5a487627fc6341f4b4f6029fbb68874e3e4c56", "size": 4372, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/tex/index.tex", "max_stars_repo_name": "zhangyewu/edward", "max_stars_repo_head_hexsha": "8ec452eb0a3801df8bda984796034a9e945faec7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
#include <atomic> #include <cmath> #include <cstdlib> #include <future> #include <limits> #include <list> #include <memory> #include <sstream> #include <string> #include <vector> #include <boost/optional.hpp> #include <boost/thread/shared_mutex.hpp> #include <gtest/gtest.h> #include "test_functional_common.hpp" #includ...
{"hexsha": "c5f8bbfa0cdf643ac78f16aa12c09fc6ac0c7e4b", "size": 31051, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/ka/test_functional.cpp", "max_stars_repo_name": "yumilceh/libqi", "max_stars_repo_head_hexsha": "f094bcad506bcfd5a8dcfa7688cbcce864b0765b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
[STATEMENT] lemma mirror_elem_inj_on: "finite I \<Longrightarrow> inj_on (\<lambda>x. mirror_elem x I) I" [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite I \<Longrightarrow> inj_on (\<lambda>x. mirror_elem x I) I [PROOF STEP] unfolding mirror_elem_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite I ...
{"llama_tokens": 203, "file": "List-Infinite_CommonSet_SetIntervalCut", "length": 2}
"""Test utils.dataframe. """ import unittest import numpy as np from .. import dataframe as df class TestArrayToDataFrame(unittest.TestCase): """Test array_to_dataframe function. """ def setUp(self): """Sets up the two convertable arrays. """ self.dat1 = np.empty(shape=(0, )) ...
{"hexsha": "a3007fe770972981e4099cb4cf95e928c6f8bffb", "size": 899, "ext": "py", "lang": "Python", "max_stars_repo_path": "patches/utils/test/dataframe.py", "max_stars_repo_name": "sflippl/patches", "max_stars_repo_head_hexsha": "c19889e676e231af44669a01c61854e9e5791227", "max_stars_repo_licenses": ["MIT"], "max_stars_...
[STATEMENT] lemma optimize_matches_a_simplers: assumes "simple_ruleset rs" and "\<forall>a m. a = Accept \<or> a = Drop \<longrightarrow> matches \<gamma> (f a m) a = matches \<gamma> m a" shows "approximating_bigstep_fun \<gamma> p (optimize_matches_a f rs) s = approximating_bigstep_fun \<gamma> p rs s" [PROOF STA...
{"llama_tokens": 9966, "file": "Iptables_Semantics_Semantics_Ternary_Semantics_Ternary", "length": 19}
Require Import Hask.Prelude. (* Require Import Hask.Control.Iso. *) Require Import Hask.Control.Monad. Generalizable All Variables. Set Primitive Projections. Set Universe Polymorphism. Unset Transparent Obligations. Set Asymmetric Patterns. Inductive LogicT (M : Type -> Type) `{Monad M} (A : Type) := LogicT_ : for...
{"author": "jwiegley", "repo": "coq-haskell", "sha": "56a185af5767177d410113a03bd765135e07c9ca", "save_path": "github-repos/coq/jwiegley-coq-haskell", "path": "github-repos/coq/jwiegley-coq-haskell/coq-haskell-56a185af5767177d410113a03bd765135e07c9ca/src/Control/Monad/Trans/LogicT.v"}
import numpy as np from skmultiflow.drift_detection import ADWIN def demo(): """ _test_adwin This demo will insert data into an ADWIN object when will display in which indexes change was detected. The data stream is simulated as a sequence of randomly generated 0's and 1's. Then the da...
{"hexsha": "50544d6492a573fa16980d28c79017be5446877a", "size": 885, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/skmultiflow/demos/_test_adwin.py", "max_stars_repo_name": "AndreFCruz/scikit-multiflow", "max_stars_repo_head_hexsha": "c4dbbb70d4ed839d95a18ca799f073ac9ff9ba49", "max_stars_repo_licenses": ["B...
from flask import Flask, render_template, url_for, request from sklearn.feature_extraction.text import CountVectorizer from sklearn.naive_bayes import MultinomialNB from sklearn.externals import joblib import io import numpy as np # Import Numpy for data statistical analysis import matplotlib.pyplot as plt #...
{"hexsha": "07fb17c34fb58e0f105962229a95f8d13079b280", "size": 948, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "Piterbrito/Stat-gram--InstagramMicroservice", "max_stars_repo_head_hexsha": "f9d2066987d20a826854cdbc85f8081ef3781112", "max_stars_repo_licenses": ["MIT"], "max_sta...
#IGE (Indirect genetic effects) = SGE (Social genetic effects). IEE = SEE. #the potential presence of NAs in input phenotype, covs, cages etc means that in this code we introduce two sets of animals (not discussed in the paper): #focal animals, defined as having phenotype, covs (if covs are provided), cage and kinship...
{"hexsha": "58390614a4093b98bbfb035f407a979752b9bd86", "size": 22363, "ext": "py", "lang": "Python", "max_stars_repo_path": "limix_legacy/modules/dirIndirVD_commented_forDistrib.py", "max_stars_repo_name": "michoel-lab/limix-legacy", "max_stars_repo_head_hexsha": "cd6c9887a2c411372beeddde3a86979b2aa21837", "max_stars_r...
import numpy as np class MnistDataset: def __init__(self, images, labels, batch_size, transforms=None): self.batch_size = batch_size self.transforms = transforms # Load images self.images = images # Load labels self.labels = labels self.length = int(np.cei...
{"hexsha": "aeddc2124d63eb532e001274a30171851ebc079e", "size": 1678, "ext": "py", "lang": "Python", "max_stars_repo_path": "numpy_mnist/mnist_dataset.py", "max_stars_repo_name": "tillaczel/numpy_mnist", "max_stars_repo_head_hexsha": "e70890bd5f9ec875315ae476bedcb65fb4486a76", "max_stars_repo_licenses": ["MIT"], "max_st...
# 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": "b8d2ef5d085230027137f91af02c24d74a9d5451", "size": 11295, "ext": "py", "lang": "Python", "max_stars_repo_path": "discussion/pathfinder/pathfinder.py", "max_stars_repo_name": "jakee417/probability-1", "max_stars_repo_head_hexsha": "ae7117f37ac441bc7a888167ea23e5e620c5bcde", "max_stars_repo_licenses": ["Apach...
from typing import List, Tuple, Union import numpy as np import torch import pytorch_lightning as pl def calc_area(bbox: np.ndarray): return (bbox[2] - bbox[0]) * (bbox[3] - bbox[1]) def calc_bbox_overlap_union_iou(pred: np.ndarray or None, teacher: np.ndarray) -> Tuple[float, float, float]: """ :para...
{"hexsha": "790ae1cd5f1909b3ea05f4bc1e22db416ad39314", "size": 13230, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepext_with_lightning/metrics/object_detection.py", "max_stars_repo_name": "pei223/deepext_with_lightning", "max_stars_repo_head_hexsha": "e40ac19844a05864f803431d8ef4a534286a0950", "max_stars_r...
import csv import numpy as np class GroupRows: staticmethod def group_rows(data, keep_complete_header, number_of_groups): groups = [None]*number_of_groups np_unique = np.unique(data[keep_complete_header]) min_per_fold = len(np_unique)//number_of_groups for i in range(0,numb...
{"hexsha": "a87aec358b8dd9ceba4857cb2f71e8d3ad0043a3", "size": 556, "ext": "py", "lang": "Python", "max_stars_repo_path": "GroupRows.py", "max_stars_repo_name": "ebbaberg/MovingFiles", "max_stars_repo_head_hexsha": "77a10e2e85b6f315a685c5a6bd092fc3fb90b727", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": 1,...
Require Export Functor. Arguments Compose_Functors {_} {_} {_} _ _. Arguments fmap {_} {_} _ {_} {_} _. Arguments fobj {_} {_} _ _. Check fobj. Class NaturalTransformation (C D: Category) (F : Functor C D) (G : Functor C D): Type := mk_nt { trans ...
{"author": "ekiciburak", "repo": "ComparisonTheorem-MacLane", "sha": "f1a5b0e35554c7115fc0dba32d550dfa0121d07a", "save_path": "github-repos/coq/ekiciburak-ComparisonTheorem-MacLane", "path": "github-repos/coq/ekiciburak-ComparisonTheorem-MacLane/ComparisonTheorem-MacLane-f1a5b0e35554c7115fc0dba32d550dfa0121d07a/Natural...
subroutine get_bin_size(nsize, wld, mode) use types use dfcomm implicit none include 'common.ifopbl' integer mode, i integer, intent(out) :: nsize real(kind=dp), intent(out) :: wld(mode) if (ifkbin ) then call alloc_wave(0, 12) else print*, 'Somthing went wrong with the frequency gri...
{"hexsha": "6470150a697ae1122340f17e076fce37ec613035", "size": 703, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/mpsa.binsize.f90", "max_stars_repo_name": "rtagirov/mps_atlas", "max_stars_repo_head_hexsha": "5eef3b620e60016b713cd414a51c48e842d8f6d9", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
from normalization import Normalization import scipy as sp from scipy import linalg class Pca: def __init__(self, data): self._normalization = Normalization(data) normalized_data = self._normalization.normalized_dataset() data_matrix = sp.matrix(normalized_data) m = data_matrix.sh...
{"hexsha": "bce2782376597d52767887747106a7043f0725e2", "size": 1457, "ext": "py", "lang": "Python", "max_stars_repo_path": "hw3/references/Pca-Image-Compression/my_pca.py", "max_stars_repo_name": "ardihikaru/mlsp", "max_stars_repo_head_hexsha": "db38972bcceac7b95808132457c4de9170546c9d", "max_stars_repo_licenses": ["Ap...
import wandb import numpy as np import sys learning_rates = list( np.around( np.array( [np.linspace(0, 1, 10, endpoint=False)[1:] / 10 ** i for i in range(1, 6)] ).flatten(), decimals=6, ).tolist() ) ent_rate = list( np.around( np.array( [np.linspace...
{"hexsha": "41a1044a8a586c342e212f3b812c9ebc494ecd12", "size": 1305, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/run_sweep.py", "max_stars_repo_name": "alomrani/CORL", "max_stars_repo_head_hexsha": "42cad2991762dbe396fd2e6592707a997671c662", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9, "...
import numpy as np from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.patches import FancyArrowPatch from mpl_toolkits.mplot3d import proj3d class Arrow3D(FancyArrowPatch): """ From https://stackoverflow.com/a/22867877. """ def __init__(self, xs, ys, zs, *arg...
{"hexsha": "c78b4b07bb6b45ecafb1518401504751edf7178f", "size": 4291, "ext": "py", "lang": "Python", "max_stars_repo_path": "tex/figures/scattering.py", "max_stars_repo_name": "rodluger/starrynight", "max_stars_repo_head_hexsha": "d3f015e466621189cb271d4d18b538430b14a557", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#!/usr/bin/env python3 import sys import os.path from os import path import time import pandas as pd import geopandas as gpd import numpy as np import networkx as nx from QUANT.PublicTransportNetwork import PublicTransportNetwork ################################################################################ # Globa...
{"hexsha": "c5f6ff274793c4ced3ffb337a5391e68a2f77b83", "size": 8376, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "maptube/Harmony", "max_stars_repo_head_hexsha": "6b253e79c64bee544a20c5b9e36427b70964674f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star...
[STATEMENT] lemma ipl_map_tree[simp]: "ipl (map_tree f t) = ipl t" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ipl (map_tree f t) = ipl t [PROOF STEP] by (induction t) auto
{"llama_tokens": 83, "file": "Treaps_Random_Treap", "length": 1}
x1 = [3, 9, 18, 30, 91] y1 = [1.01, 1.204, 1.54, 1.81, 2.12] c1 = Curve(x1, y1) x2 = [5, 12, 18, 30, 125, 291] y2 = [1.01, 1.204, 1.54, 1.81, 2.12, 7.436] clog = Curve(x2, y2, logx=true, logy=true) clogy = Curve(x1, y1, logy=true) c0 = Curve([3], [5.5]) # curve with single point # equality c2 = Curve(c1) c3 = Curve(...
{"hexsha": "2e185f5f0007c7e3e7f7179c70a1f4fb13ba6045", "size": 3865, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_curves.jl", "max_stars_repo_name": "lungben/Curves.jl", "max_stars_repo_head_hexsha": "dc61375a6d2a3d32ad68e5c2db35b3053e1ade6e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10...
import numpy as np from PIL import Image, ImageDraw # input - image as numpy aray and rectangles on image, Normalized - each value in (0,1) # output - image with drawn rects as numpy array def draw_image_rects(image, rects, is_normalized=False): image_to_show = image.copy() rects_to_show = [] ...
{"hexsha": "5efa1e8e529ce9df5f23b5b4745383d336bb7685", "size": 2292, "ext": "py", "lang": "Python", "max_stars_repo_path": "visual.py", "max_stars_repo_name": "evasilyev/PGD-ObjDetector", "max_stars_repo_head_hexsha": "47043f7bdc656d983dd94528e52809ae97a537fd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
C*********************************************************************** C Module: xcasepl.f C C Copyright (C) 2011 Mark Drela C C This program is free software; you can redistribute it and/or modify C it under the terms of the GNU General Public License as published by C the Free Software Foundation...
{"hexsha": "4188f7497d733241a991f8e5590fd1a763fd1eed", "size": 20437, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "third_party/xrotor/src/xcasepl.f", "max_stars_repo_name": "leozz37/makani", "max_stars_repo_head_hexsha": "c94d5c2b600b98002f932e80a313a06b9285cc1b", "max_stars_repo_licenses": ["Apache-2.0"], "m...
## 2. The Empirical Probability ## p_tail = 44 / 100 p_six = 28 / 200 p_odd = 102/ 200 print(p_tail) print(p_six) print(p_odd) ## 3. Probability as Relative Frequency ## p_heads_1 = 1 - (162/300) percentage_1 = p_heads_1 * 100 p_heads_2 = 1 - (2450/5000) percentage_2 = p_heads_2 * 100 print(percentage_1) print(per...
{"hexsha": "55f1d0d1ca7bcc4d8de1f22dc5e1d3c46f201264", "size": 1216, "ext": "py", "lang": "Python", "max_stars_repo_path": "5. Probability and Statistics/probability-fundamentals/Estimating Probabilities-377.py", "max_stars_repo_name": "bibekuchiha/dataquest", "max_stars_repo_head_hexsha": "c7d8a2966fe2eee864442a59d643...
# encoding: utf-8 # Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
{"hexsha": "c37ebb5aef8e36753480cf3b8e773b9bdb7a6d1a", "size": 16212, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_composers.py", "max_stars_repo_name": "hsadeghidw/dwave-hybrid", "max_stars_repo_head_hexsha": "e667035b5623f122813795d433a40db6e520ff66", "max_stars_repo_licenses": ["Apache-2.0"], "m...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 2 11:24:28 2019 @author: qinayan """ #https://www.pythonforbeginners.com/files/reading-and-writing-files-in-python #https://stackoverflow.com/questions/899103/writing-a-list-to-a-file-with-python import numpy as np ho = 0.135#0.2 # 1/m B_...
{"hexsha": "ae7ac12c0ba5eebe059715d057b7671f3474ca6d", "size": 865, "ext": "py", "lang": "Python", "max_stars_repo_path": "module_st/write_into_text.py", "max_stars_repo_name": "Qinayan/Soil-thickness", "max_stars_repo_head_hexsha": "23f110d663dcd9f25593b2d10dec47ff78b19643", "max_stars_repo_licenses": ["Apache-2.0"], ...
# -*- coding: utf-8 -*- """ Created on Thu Oct 1 10:23:38 2020 @author: tobias.grab """ import sys sys.path.append('/usr/local/lib/python2.7/site-packages') import cv2 import numpy as np import matplotlib.pyplot as plt if __name__ == "__main__": alg="surf" if alg=="sift": ftAlg = c...
{"hexsha": "083c96498f7646bce6f28547bc2aba6087d7be55", "size": 2220, "ext": "py", "lang": "Python", "max_stars_repo_path": "student-projects/fall-2020/OST-Imaging-and-Matching-Plastic/mvp/MatchingVisualization.py", "max_stars_repo_name": "UCBerkeley-SCET/DataX-Berkeley", "max_stars_repo_head_hexsha": "f912d22c838b511d3...
##################################### # Database/tsql.py ##################################### # Description: # * Objects related to interacting # with SQL database that uses T-SQL # as SQL flavor language. from Database.columnattributes import ColumnAttributesGenerator from itertools import combinations from numba im...
{"hexsha": "fa40a3e2aea9db025c2bca3da995e44bc56bc034", "size": 22012, "ext": "py", "lang": "Python", "max_stars_repo_path": "DynamicETLDashboard/DynamicETL_Dashboard/Database/tsql.py", "max_stars_repo_name": "BRutan/DynamicETLDashboard", "max_stars_repo_head_hexsha": "8a40e6f51e53f084d6103ba41cd675916505652f", "max_sta...
// This file is adapted almost verbative where possible from // the boost asio async http example // // async_client.cpp // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENS...
{"hexsha": "85b9d3ee5f7c1113506046e243663a025f0393c1", "size": 5075, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Example2.cpp", "max_stars_repo_name": "jbandela/cpp_async_await", "max_stars_repo_head_hexsha": "0c76cf886c574855db728fa81884720730f8a8e8", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count":...
# This file is a part of Julia. License is MIT: http://julialang.org/license function message(c::GitCommit, raw::Bool=false) local msg_ptr::Cstring msg_ptr = raw? ccall((:git_commit_message_raw, :libgit2), Cstring, (Ptr{Void},), c.ptr) : ccall((:git_commit_message, :libgit2), Cstring, (Ptr{V...
{"hexsha": "9ecc102cab1d1640c20f1b30bb0b884b0ec8f3ac", "size": 3015, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "base/libgit2/commit.jl", "max_stars_repo_name": "habemus-papadum/julia", "max_stars_repo_head_hexsha": "581a034dd6c5b027d64f624f97242e07ea3d613b", "max_stars_repo_licenses": ["Zlib"], "max_stars_co...
/* * Copyright 2022 HEAVY.AI, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
{"hexsha": "eb46ce256fc0f7284d1cac3500eb7e0362b21dab", "size": 4381, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Embedded/EmbeddedDbFSITest.cpp", "max_stars_repo_name": "omnisci/mapd-core", "max_stars_repo_head_hexsha": "cde582ebc3edba3fb86bacefa5bd9b3418a367b4", "max_stars_repo_licenses": ["Apache-2.0"], "max...
subroutine timcrl !*********************************************************************** ! Copyright, 1993, 2004, The Regents of the University of California. ! This program was prepared by the Regents of the University of ! California at Los Alamos National Laboratory (the University) under ! contract...
{"hexsha": "668d86a98de1013d162b3ba1d32067c2b60b64ee", "size": 14628, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/timcrl.f", "max_stars_repo_name": "satkarra/FEHM", "max_stars_repo_head_hexsha": "5d8d8811bf283fcca0a8a2a1479f442d95371968", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 24...
from typing import Any import pandas as pd import numpy as np def values_are_same(val1: Any, val2: Any, tolerance: float) -> bool: """ Compares whether values are the same for grading purposes. Converts arrays and series to lists. Uses a tolerance to allow for float/rounding errors. :param val1: ...
{"hexsha": "38dc79f44bc01c9a9cfe4fddb05b8471847237e4", "size": 1150, "ext": "py", "lang": "Python", "max_stars_repo_path": "fin_model_course/gradetools/py/execute2/compare.py", "max_stars_repo_name": "whoopnip/fin-model-course", "max_stars_repo_head_hexsha": "e6c5ae313bba601c4aca0f334818b61cc0393118", "max_stars_repo_l...
#ifndef BLUB_CORE_NONCOPYABLE_HPP #define BLUB_CORE_NONCOPYABLE_HPP #include <boost/noncopyable.hpp> namespace blub { class noncopyable : public boost::noncopyable { }; } #endif // NONCOPYABLE_HPP
{"hexsha": "7c0bdc1769234c8d0dfdbd4065af6a320f3b9082", "size": 216, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "modules/core/source/blub/core/noncopyable.hpp", "max_stars_repo_name": "qwertzui11/voxelTerrain", "max_stars_repo_head_hexsha": "05038fb261893dd044ae82fab96b7708ea5ed623", "max_stars_repo_licenses": ...
(* Exercise 104 *) Require Import BenB. Variables A B C D : Prop. (* de Morgan's conjunction law inverse variant *) Theorem exercise_104 : (A \/ B) -> ~(~A /\ ~B). Proof. imp_i a1. neg_i (1=1) a2. dis_e (A \/ B) a3 a3. hyp a1. neg_e (A). con_e1 (~B). hyp a2. hyp a3. neg_e (B). con_e2 (~A). hyp a2. hyp a3. lin_solv...
{"author": "KiOui", "repo": "total5", "sha": "b47117bc43a775b525813af56d54350394c22356", "save_path": "github-repos/coq/KiOui-total5", "path": "github-repos/coq/KiOui-total5/total5-b47117bc43a775b525813af56d54350394c22356/html/Uitwerkingen/BB/Coq/Taak13/Taak13_prop104.v"}
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) import os from pprint import pprint import argh import numpy as np from chemreac.serialization import load from chemreac.integrate import run """ Demo of chemical reaction diffusion system. """ # A -> ...
{"hexsha": "94610a413a0156f59209ca8cfab6310f9cfb90f3", "size": 2117, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/four_species_inhomogeneous.py", "max_stars_repo_name": "bjodah/chemreac", "max_stars_repo_head_hexsha": "dbe38a10cf6b88e66192bcc998721b61aabbd9dc", "max_stars_repo_licenses": ["BSD-2-Clau...
[STATEMENT] lemma isLim_supr: assumes f: "i \<in> Field r" and l: "isLim i" shows "i = supr (underS i)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. i = local.supr (local.underS i) [PROOF STEP] proof(rule equals_supr) [PROOF STATE] proof (state) goal (4 subgoals): 1. local.underS i \<subseteq> Field r 2. i \<in>...
{"llama_tokens": 2519, "file": null, "length": 29}
from itertools import product import re import numpy as np def day22(inp, part2=False): all_coords = [] all_states = [] for row in inp.splitlines(): state, rest = row.split() coords = [ sorted(map(int, axis.split('..'))) for axis in re.sub('[xyz]=', '', rest).split...
{"hexsha": "b715315641c104f690d2761720cc9d2d25baa0da", "size": 6098, "ext": "py", "lang": "Python", "max_stars_repo_path": "day22.py", "max_stars_repo_name": "adeak/AoC2021", "max_stars_repo_head_hexsha": "f389ffdfe469d1ba411e9586b2691f9fb6cbfae1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_re...
#-*- encoding:utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import os import math import networkx as nx import numpy as np import sys try: reload(sys) sys.setdefaultencoding('utf-8') except: pass sentence_delimiters = ['?', '!', ...
{"hexsha": "6004f23ac90022dc8f4655f52b762adaacbeb62d", "size": 5753, "ext": "py", "lang": "Python", "max_stars_repo_path": "textrank4zh/util.py", "max_stars_repo_name": "yanzhelee/TextRank4ZH", "max_stars_repo_head_hexsha": "e0336c8e0d53e1414394ce8fccda6ff9ecb1a720", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
[STATEMENT] lemma id_measure_preserving: "(\<lambda>x. x) \<in> measure_preserving M M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<lambda>x. x) \<in> measure_preserving M M [PROOF STEP] unfolding measure_preserving_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<lambda>x. x) \<in> {f \<in> M \<righ...
{"llama_tokens": 183, "file": "Ergodic_Theory_Measure_Preserving_Transformations", "length": 2}
import torch import numpy as np from network import NTGAN import scipy.io as sio import os import h5py from torch.autograd import Variable import matplotlib.pyplot as plt def load_nlf(info, img_id): nlf = {} nlf_h5 = info[info["nlf"][0][img_id]] nlf["a"] = nlf_h5["a"][0][0] nlf["b"] = nl...
{"hexsha": "e26bd2aa00677b9bac3d6f9d66674782aee9d5ce", "size": 4525, "ext": "py", "lang": "Python", "max_stars_repo_path": "DND_eval.py", "max_stars_repo_name": "matt45m/NTGAN-Learning-Blind-Image-Denoising-Without-Clean-Reference", "max_stars_repo_head_hexsha": "cc5691b18de542e6061eb88e4399b1c6d8bb0d77", "max_stars_re...
import numpy as np import matplotlib.mlab as mlab import matplotlib.pyplot as plt # For fitting a gaussian curve. from scipy.stats import norm def plot(data, fig_w=15, fig_h=9): plt.figure(figsize=(fig_w, fig_h)) plt.grid() _ = plt.plot(data, 'x', linestyle='-') def plot_multiple(data...
{"hexsha": "41345aa35007a69bd6cadde1244f4ce57710fc94", "size": 5368, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotting_helpers.py", "max_stars_repo_name": "rosskidson/python_utils", "max_stars_repo_head_hexsha": "59b59081136bcdb911eb5a80f0219d811ee379b3", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
[STATEMENT] lemma esssup_AE_mono: "f \<in> borel_measurable M \<Longrightarrow> AE x in M. f x \<le> g x \<Longrightarrow> esssup M f \<le> esssup M g" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>f \<in> borel_measurable M; AE x in M. f x \<le> g x\<rbrakk> \<Longrightarrow> esssup M f \<le> esssup M g [...
{"llama_tokens": 154, "file": null, "length": 1}
import numpy import doctest def wer(r, h): """ Source: https://martin-thoma.com/word-error-rate-calculation/ Calculation of WER with Levenshtein distance. Works only for iterables up to 254 elements (uint8). O(nm) time ans space complexity. Parameters ---------- r : list h : list...
{"hexsha": "86810288704c1bdc3cf2b84aed95644e6da4dfaa", "size": 1371, "ext": "py", "lang": "Python", "max_stars_repo_path": "lipnet/utils/wer.py", "max_stars_repo_name": "dimaxano/LipNet", "max_stars_repo_head_hexsha": "5990b0a0a5331ccbc2c110dfcbbf1b08e1704d19", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 560...
# Non Linear Controller ```python %matplotlib inline %config InlineBackend.figure_format = 'retina' %load_ext autoreload %autoreload 2 import numpy as np import math from math import sin, cos import matplotlib.pyplot as plt import matplotlib.pylab as pylab from drone import Drone2D import trajectories import si...
{"hexsha": "7e4927b18cd565f20d4efb16a54e94a4bc45c7e8", "size": 571480, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "jupyter_notebooks/3_Controls/3_ControlArchitecture/Non-Linear Controller.ipynb", "max_stars_repo_name": "miker2/FCND-udacity", "max_stars_repo_head_hexsha": "35d8248b3bb17a04279b65b...
import LeanUtils.Div import Mathlib.Tactic.Ring /- Parity : functions and theorems related to parity -/ namespace Nat def even (a : Nat) : Prop := a % 2 = 0 def odd (a : Nat) : Prop := a % 2 = 1 theorem even_rewrite {a : Nat} : even a ↔ ∃ (n : Nat), a = 2 * n := Iff.intro (by intro h ...
{"author": "Augustindou", "repo": "natural2lean-lean-project-template", "sha": "62c1d7cf8b2f0cbffd84f240c3e2cd89b55f3c03", "save_path": "github-repos/lean/Augustindou-natural2lean-lean-project-template", "path": "github-repos/lean/Augustindou-natural2lean-lean-project-template/natural2lean-lean-project-template-62c1d7c...
[STATEMENT] lemma three_covers_pers: \<comment> \<open>alias Old Good Lemma\<close> assumes "w = v \<cdot> t" and "w = r' \<cdot> v\<^sup>@Suc j \<cdot> t'" and "w = r \<cdot> v" and "r' <s r" and "t' <p t" shows "period w (\<^bold>|t\<^bold>| - \<^bold>|t'\<^bold>|)" and "period w (\<^bold>|r\<^bold>| - \<^bol...
{"llama_tokens": 6622, "file": "Combinatorics_Words_Equations_Basic", "length": 42}
# -*- coding: utf-8 -*- """ =============== AOTF instrument =============== This class (aa_aotf.py) is the model to connect to the AOTF using the controller aa_mod18012.py The model is similar to the controller, but it adds specific functionalities such as units with Pint and some calibrations. * **Wavelength calib...
{"hexsha": "6d0ff4d4a9a837dd00126b71a6b16ab5eb7bcbf1", "size": 13286, "ext": "py", "lang": "Python", "max_stars_repo_path": "hyperion/instrument/polarization/aa_aotf.py", "max_stars_repo_name": "caldarolamartin/hyperion", "max_stars_repo_head_hexsha": "19d6d2041f5029cd33da86c095d76e19ce89fcac", "max_stars_repo_licenses...
% ******************************* Thesis Declaration *************************** \begin{declaration} % I hereby declare that except where specific reference is made to the work of % others, the contents of this dissertation are original and have not been % submitted in whole or in part for consideration for any oth...
{"hexsha": "f5ef3f87e848794c41ddd4853bd9b832d6ecda10", "size": 1407, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "masters-thesis/Declaration/declaration.tex", "max_stars_repo_name": "gergely-flamich/miracle-compression", "max_stars_repo_head_hexsha": "7bee78f47982dda123343d25ead9de3c8bce17f5", "max_stars_repo_l...
import numpy as np import torch import torch.nn as nn import gym from copy import deepcopy from ...common import ( ReplayBuffer, get_model, save_params, load_params, get_env_properties, set_seeds, venv, ) from typing import Tuple, Union, Dict, Optional, Any class TD3: """ Twin Del...
{"hexsha": "3a171725834bf9656aa92cfbc0ae6379fab3581d", "size": 12902, "ext": "py", "lang": "Python", "max_stars_repo_path": "genrl/deep/agents/td3/td3.py", "max_stars_repo_name": "infinitemugen/genrl", "max_stars_repo_head_hexsha": "602587417ce167380c90a726764a3efa4643dc38", "max_stars_repo_licenses": ["MIT"], "max_sta...
# -*- coding: utf-8 -*- # from datetime import datetime import sys import pathlib import numpy as np import math from numpy.core.defchararray import center # このソースのあるディレクトリの絶対パスを取得 current_dir = pathlib.Path(__file__).resolve().parent # モジュールのあるパスを追加 sys.path.append(str(current_dir) + '/../') sys.path.append(str(curren...
{"hexsha": "e1b518d31f46430454354a76cd5fdb916ff27413", "size": 14124, "ext": "py", "lang": "Python", "max_stars_repo_path": "crumb/Carpet.py", "max_stars_repo_name": "miu200521358/trace_model_replace", "max_stars_repo_head_hexsha": "d7ceb2a34db7772f725b30cb2ba016218ed38559", "max_stars_repo_licenses": ["MIT"], "max_sta...
from numpy import fft import pyaudio import numpy as np import wave from scipy.fftpack import fft import matplotlib.pyplot as plt class Mic: def __init__(self,CHANNELS=1,nCHUNK=4,RATE = 44100): self.CHUNK = 1024 * nCHUNK self.FORMAT = pyaudio.paInt16 self.RATE = RATE self.CHANNEL...
{"hexsha": "e9e923e22058588bac5704e436adaf512ed19432", "size": 3416, "ext": "py", "lang": "Python", "max_stars_repo_path": "record.py", "max_stars_repo_name": "Yossef-Dawoad/Recwpy", "max_stars_repo_head_hexsha": "b6c03316050e75c4b6b406aa9d16023e221a2093", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_...
%!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \chapter{The Amlantis Language Syntax Summary} \label{sec:syntax} % TBD: extract all syntaxes in here
{"hexsha": "7236f20cfc75b9937dee298d0ab295b4ce9359f4", "size": 162, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/0.10/SyntaxSummary.tex", "max_stars_repo_name": "amlantis-lang/gear-doc", "max_stars_repo_head_hexsha": "ba6913ec3a4fdd57c1dfa9ec03d966bf5a42c632", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np from .trading_env import TradingEnv, Actions, Positions class StocksEnv(TradingEnv): def __init__(self, df, window_size, frame_bound, max_loss=None, hold_penalty_ticks=None): assert len(frame_bound) == 2 self.frame_bound = frame_bound super().__init__(df, window_size, ...
{"hexsha": "6c10697078f8efde5b327994e267510df1634438", "size": 2568, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym_yotrading/envs/stocks_env.py", "max_stars_repo_name": "vyorick/gym-anytrading", "max_stars_repo_head_hexsha": "99d8219438e76011c714d2e49de67aed535648b3", "max_stars_repo_licenses": ["MIT"], "m...
/- Copyright (c) 2020 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel, Scott Morrison -/ import ring_theory.ideal.quotient import ring_theory.principal_ideal_domain /-! # Invariant basis number property > THIS FILE IS SYNCHRONIZED WITH MAT...
{"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/src/linear_algebra/invariant_basis_number.lean"...
using DirectTrajectoryOptimization const DTO = DirectTrajectoryOptimization function point_foot_quadruped_dyn(model, env, h, y, x, u, w) # dimensions nq = model.nq nu = model.nu # configurations q1⁻ = x[1:nq] q2⁻ = x[nq .+ (1:nq)] q2⁺ = y[1:nq] q3⁺ = y[nq .+ (1:nq)] # control ...
{"hexsha": "6f7bae68abbc2896fc6f801232fcf7518413bf46", "size": 3548, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/point_foot_quadruped/reference/trajopt_model.jl", "max_stars_repo_name": "mcx/ContactImplicitMPC.jl", "max_stars_repo_head_hexsha": "da35f66c27de44aca49cb099d4195489b892167b", "max_stars_r...
import time import numpy as np import torch from utils import * from params import * from reconstruction import * import scipy import cv2 import skimage.measure from itertools import compress def lpf_detection(holo,mask,erode_size=20, dilate_size=60, threshold=10, A_min = 1, show_plot=False): # mask for low pass f...
{"hexsha": "c65aaa05bb4387f9c320d085a83f6b92ab4fc58b", "size": 2665, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/detection.py", "max_stars_repo_name": "emma-d-cotter/Hologram-Processing", "max_stars_repo_head_hexsha": "df364f6fde3d188a8e8f43ea75028f31e5559427", "max_stars_repo_licenses": ["MIT"], "max_s...
# --- # title: Displaying Images # author: "[William Thompson](https://github.com/sefffal)" # cover: assets/displaying-images.png # --- # We'll start by downloading a sample image. If you have an image stored locally, # you would skip this step. using AstroImages AstroImages.set_clims!(Percent(99.5)) #src AstroImages...
{"hexsha": "85b71ba989dd41b9851ed4de97539a96ce9a9d2f", "size": 1838, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/examples/basics/displaying.jl", "max_stars_repo_name": "sefffal/AstroImages.jl", "max_stars_repo_head_hexsha": "e9a5d0a204aa81201db2942201a7a3087d9d7a27", "max_stars_repo_licenses": ["MIT"], "...
PROGRAM run_parareal_openmp USE parareal_openmp, only: InitializePararealOpenMP, FinalizePararealOpenMP, PararealOpenMP USE params, only : Nx, Ny, Nz, dx, dy, dz, nu, N_coarse, N_fine, Niter, Tend, do_io, be_verbose, ReadParameter IMPLICIT NONE DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:) :: Q ! -- CODE: -- CA...
{"hexsha": "de454f967d9fb626dbf081fbf974dbf2fa35d24e", "size": 708, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/run_parareal_openmp.f90", "max_stars_repo_name": "Parallel-in-Time/PararealF90", "max_stars_repo_head_hexsha": "a8318a79b92465a8a3cf775cc7fd096ff0494529", "max_stars_repo_licenses": ["BSD-2-C...