text
stringlengths
0
27.1M
meta
dict
#!/usr/bin/env Rscript f1="./sheet1.csv"; f2="./sheet2.csv"; f3="./sheet3.csv"; res1 = read.csv(f1, sep=',',header=TRUE); res2 = read.csv(f2, sep=',',header=TRUE); res3 = read.csv(f3, sep=',',header=TRUE); img_xlab = "log2(fold_change)"; img_ylab = "-log10(p.Value)"; p1="./image1.pdf"; p2="./image2.pdf"; p3="./im...
{ "alphanum_fraction": 0.6591111111, "author": null, "avg_line_length": 32.1428571429, "converted": null, "ext": "r", "file": null, "hexsha": "97704df09ff2eb2462e6c5a291a8533501d1827e", "include": null, "lang": "R", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_cou...
import numpy as np import matplotlib.pyplot as plt #import katfile from matplotlib.backends.backend_pdf import PdfPages import optparse import katholog import os def radial_data(data,annulus_width=1,working_mask=None,x=None,y=None,rmax=None): """ r = radial_data(data,annulus_width,working_mask,x,y) A ...
{ "alphanum_fraction": 0.6214563187, "author": null, "avg_line_length": 38.167192429, "converted": null, "ext": "py", "file": null, "hexsha": "0a24e5035746bf0b114a8d24719d42ff7b3b8e41", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import torch from torch.nn import functional as F from mmdet3d.ops import Voxelization from mmdet.models import DETECTORS from .. import builder from .two_stage import TwoStage3DDetector from .voxelnet import Fusion import numpy as np @DETECTORS.register_module() class PartA2(TwoStage3DDetector): r"""Part-A2 det...
{ "alphanum_fraction": 0.5683386549, "author": null, "avg_line_length": 38.6812749004, "converted": null, "ext": "py", "file": null, "hexsha": "997b5b29c353c02bcd7aadc927f950d1b642b9f6", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
From Coqprime Require Import PocklingtonRefl. Local Open Scope positive_scope. Lemma primo76: prime 201471189889-> prime 39488365236169. Proof. intro H. apply (Pocklington_refl (Ell_certif 39488365236169 196 ((201471189889,1)::nil) 0 3584 8 64) ((Proof_certif ...
{ "alphanum_fraction": null, "author": "mukeshtiwari", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_ma...
""" Export function for the JEOL field-emission gun electron probe microanalyser (EPMA) using "probe for EPMA". """ import csv import numpy as np import pandas as pd from pathlib import Path def write_pos( df, filepath=Path("./exportedpoints.pos"), encoding="cp1252", z=10.7, **kwargs ): """ Export an data...
{ "alphanum_fraction": 0.5262857143, "author": null, "avg_line_length": 25, "converted": null, "ext": "py", "file": null, "hexsha": "edc7292ba5088326a1778d02ffedfa73dd05497d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
""" Script to show how the COVID-19 cases in the US are changing over time. Plot shows the new daily confirmed cases and is sorted by number of new cases. To run: `python us_cases.py` """ import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from statsmodels.nonpar...
{ "alphanum_fraction": 0.6571651699, "author": null, "avg_line_length": 31.2317073171, "converted": null, "ext": "py", "file": null, "hexsha": "02c3d182be71663e74df0dcc7babe11b701cc935", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import sympy as sp import vorpy.linalg def test_scalar_cross_product_tensor_symbolically (): scalar_cross_product_tensor = vorpy.linalg.scalar_cross_product_tensor(dtype=sp.Integer) u = np.array(sp.var('u_0,u_1')) v = np.array(sp.var('v_0,v_1')) # The awkward `[()]` notation on the l...
{ "alphanum_fraction": 0.7137203166, "author": null, "avg_line_length": 47.375, "converted": null, "ext": "py", "file": null, "hexsha": "4e0fe310a991b0a6a04a18e60900eedbee423528", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_coun...
# _____ ______ _____ # / ____/ /\ | ____ | __ \ # | | / \ | |__ | |__) | Caer - Modern Computer Vision # | | / /\ \ | __| | _ / Languages: Python, C, C++, Cuda # | |___ / ____ \ | |____ | | \ \ http://github.com/jasmcaus/caer # \_____\/_/ \_ \______ |_| \_\ # Lic...
{ "alphanum_fraction": 0.6109640832, "author": null, "avg_line_length": 31.1176470588, "converted": null, "ext": "py", "file": null, "hexsha": "8a5f583c4f7fcd68f942be3d9d01258b292898cc", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
ITensors.itensor(A::ITensor) = A # Insert missing diagonal blocks function insert_diag_blocks!(T::Tensor) for b in eachdiagblock(T) blockT = blockview(T, b) if isnothing(blockT) # Block was not found in the list, insert it insertblock!(T, b) end end end insert_diag_blocks!(T::ITensor) = in...
{ "alphanum_fraction": 0.6590234691, "author": null, "avg_line_length": 28.0833333333, "converted": null, "ext": "jl", "file": null, "hexsha": "b7bbd0b32278f9837911a256495d201dd87b9945", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
[STATEMENT] lemma PO_l2_inv8 [iff]: "reach l2 \<subseteq> l2_inv8" [PROOF STATE] proof (prove) goal (1 subgoal): 1. reach l2 \<subseteq> l2_inv8 [PROOF STEP] by (rule_tac J="l2_inv1 \<inter> l2_inv3" in inv_rule_incr) (auto)
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Key_Agreement_Strong_Adversaries_pfslvl2", "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 106, "mathlib_filename": null, "max_forks_count": null, "max_f...
using Documenter, SparseRegression makedocs( format = Documenter.HTML(), sitename = "SparseRegression.jl", authors = "Josh Day", clean = true, pages = [ "index.md", "usage.md", "algorithms.md" ] ) deploydocs( repo = "github.com/joshday/SparseRegression.jl.git", )
{ "alphanum_fraction": 0.59375, "author": null, "avg_line_length": 17.7777777778, "converted": null, "ext": "jl", "file": null, "hexsha": "9b8f74cca7243d54d8a8838577fbbb30f17292e0", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_cou...
from data import common from data.sr import dataclass import numpy as np from PIL import Image _parent_class = dataclass.SRData class Demo(_parent_class): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) @staticmethod def get_kwargs(cfg, train=False): kwargs = _par...
{ "alphanum_fraction": 0.6064301552, "author": null, "avg_line_length": 25.7714285714, "converted": null, "ext": "py", "file": null, "hexsha": "ff6e1332653f4847d17165988282c8c135420897", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import streamlit as st import pandas as pd import numpy as np import json from matplotlib import pyplot as plt from matplotlib.backends.backend_agg import RendererAgg import logging import sys logging.basicConfig(level=logging.DEBUG) _lock = RendererAgg.lock sys.path.append('../src/') sys.path.append('..') sys.path....
{ "alphanum_fraction": 0.6073873874, "author": null, "avg_line_length": 32.4561403509, "converted": null, "ext": "py", "file": null, "hexsha": "d50f007b29126007a51b185be002176f7052f133", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
""" Test cases for the regi0.geographic.outliers.find_value_outliers function. """ import numpy as np import pandas as pd from regi0.geographic.outliers import find_value_outliers def test_iqr(records): result = find_value_outliers( records, "scientificName", "minimumElevationInMeters", method="iqr" ...
{ "alphanum_fraction": 0.42, "author": null, "avg_line_length": 20.1657458564, "converted": null, "ext": "py", "file": null, "hexsha": "760c1b671279934e12c0ec04df37f9e6485603ce", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
import math import os import textwrap from functools import partial from multiprocessing import Pool, Manager from os.path import join import matplotlib matplotlib.use('Agg') import numpy as np import seaborn as sns sns.set() from tqdm import tqdm import argparse from config import MovieQAPath from data.data_loader ...
{ "alphanum_fraction": 0.6110133266, "author": null, "avg_line_length": 34.2844827586, "converted": null, "ext": "py", "file": null, "hexsha": "c8fc30a47fc53e09a0e20ce970b00303cfd85092", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
/** * Copyright (c) 2018, University Osnabrück * 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 li...
{ "alphanum_fraction": 0.6934453384, "author": null, "avg_line_length": 30.7345454545, "converted": null, "ext": "hpp", "file": null, "hexsha": "3df103d5ec723f7d269e5b21f5c1c945a7b31979", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
# -*- coding: utf-8 -*- import sys import os import numpy as np import imgfileutils as imf from aicsimageio import AICSImage, imread import progressbar import shutil from apeer_ometiff_library import io, omexmlClass import tifffile import itertools as it """ def update5dstack(image5d, image2d, dimst...
{ "alphanum_fraction": 0.5362195812, "author": null, "avg_line_length": 34.6470588235, "converted": null, "ext": "py", "file": null, "hexsha": "c5309214badfbfb1fea8ee6df9e7a6cd0920b88e", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma doctor_optimal_match_unique: assumes "doctor_optimal_match ds X" assumes "doctor_optimal_match ds Y" shows "X = Y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. X = Y [PROOF STEP] proof(rule iffD2[OF set_eq_iff, rule_format]) [PROOF STATE] proof (state) goal (1 subgoal): 1. \<And>x. (x \<in...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Stable_Matching_Contracts", "hexsha": null, "include": null, "lang": null, "length": 7, "llama_tokens": 932, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks...
/- Copyright (c) 2020 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Author(s): Simon Hudon -/ import Mathlib.PrePort import Mathlib.Lean3Lib.init.default import Mathlib.testing.slim_check.sampleable import Mathlib.PostPort universes l v u_1 u u_2 namespace Math...
{ "alphanum_fraction": null, "author": "AurelienSaue", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_ma...
# Build a neural network for approximate Q learning import gym import numpy as np import pandas as pd import matplotlib.pyplot as plt import tensorflow as tf import keras import keras.layers as L def get_action(state, epsilon=0): """ sample actions with epsilon-greedy policy recap: with p = epsilon pick ...
{ "alphanum_fraction": 0.6874391431, "author": null, "avg_line_length": 35.1111111111, "converted": null, "ext": "py", "file": null, "hexsha": "a3107c6d9c9903dce7f4a7bdb21b64d5db20c380", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import os import shutil import glob import json import argparse import numpy as np from transformations_np import TransformationSpherical, Transformation3D from tqdm import tqdm if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--src', required=True, hel...
{ "alphanum_fraction": 0.5311004785, "author": null, "avg_line_length": 45.1891891892, "converted": null, "ext": "py", "file": null, "hexsha": "52b1636679522a0b92297ec8c19feced5ca40527", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
// Luaponte library // Copyright (c) 2012 Peter Colberg // Luaponte is based on Luabind, a library, inspired by and similar to // Boost.Python, that helps you create bindings between C++ and Lua, // Copyright (c) 2003-2010 Daniel Wallin and Arvid Norberg. // Use, modification and distribution is subject to the Boost...
{ "alphanum_fraction": 0.6778370145, "author": null, "avg_line_length": 24.7735849057, "converted": null, "ext": "hpp", "file": null, "hexsha": "ad977b39ea8dff6964951549355517e421b07896", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
subroutine sub () print *, "output string ..." end subroutine sub end
{ "alphanum_fraction": 0.6712328767, "author": null, "avg_line_length": 14.6, "converted": null, "ext": "f90", "file": null, "hexsha": "1afb1e0dac3f7e507891055390206bea59c91631", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_coun...
import cupy as cp from model.utils.nms import non_maximum_suppression from model.utils.loc2bbox_gpu import loc2bbox from torch.utils.dlpack import to_dlpack from torch.utils.dlpack import from_dlpack class ProposalCreator: def __init__(self, parent_model, nms_thresh=0.7, ...
{ "alphanum_fraction": 0.5826771654, "author": null, "avg_line_length": 32.1971830986, "converted": null, "ext": "py", "file": null, "hexsha": "df05e1dad811f42e31eaf4dc99f968da363f6f48", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import logging import yaml from pathlib import Path import astropy.units as u from astropy.coordinates import SkyCoord, Angle from regions import CircleSkyRegion from gammapy.analysis import Analysis, AnalysisConfig from gammapy.maps import MapAxis from gammapy.modeling import Fit from gammapy.data import DataStore fro...
{ "alphanum_fraction": 0.6041838417, "author": null, "avg_line_length": 30.1366459627, "converted": null, "ext": "py", "file": null, "hexsha": "ded9909b954f87930f7fdd0eef9ffd314069414b", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
"""need to refactor with common backend interface""" from __future__ import annotations import ast import functools import os import typing from typing_extensions import TypedDict import ctc.config from ctc import binary from ctc import directory from ctc import spec from ctc import rpc from ctc.toolbox import backe...
{ "alphanum_fraction": 0.6492625987, "author": null, "avg_line_length": 31.7228381375, "converted": null, "ext": "py", "file": null, "hexsha": "a5562bc3c22191a61d0f153535538ac3875acc39", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#!/usr/bin/python # DQN implementation of https://github.com/matthiasplappert/keras-rl for Keras # was used with epsilon-greedy per-episode decay policy. import numpy as np import gym from gym import wrappers from tfinterface.utils import get_run from tfinterface.reinforcement import DQN, ExpandedStateEnv import rand...
{ "alphanum_fraction": 0.6990033223, "author": null, "avg_line_length": 23.8888888889, "converted": null, "ext": "py", "file": null, "hexsha": "7a0446bd1f46369e61a80f9012348734f7488ae2", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma heap_upds_ok_upd: "heap_upds_ok (\<Gamma>, Upd x # S) \<Longrightarrow> x \<notin> domA \<Gamma> \<and> x \<notin> upds S" [PROOF STATE] proof (prove) goal (1 subgoal): 1. heap_upds_ok (\<Gamma>, Upd x # S) \<Longrightarrow> x \<notin> domA \<Gamma> \<and> x \<notin> upds S [PROOF STEP] by auto
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Call_Arity_SestoftConf", "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 129, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_ev...
import numpy as np from .sysEngVals import SysEngVals __all__ = ['m5_flat_sed', 'm5_scale'] def m5_scale(expTime, nexp, airmass, FWHMeff, musky, darkSkyMag, Cm, dCm_infinity, kAtm, tauCloud=0, baseExpTime=15): """ Return m5 (scaled) value for all filters. Parameters ---------- expTime :...
{ "alphanum_fraction": 0.661341853, "author": null, "avg_line_length": 42.4406779661, "converted": null, "ext": "py", "file": null, "hexsha": "624e00add82e70b7b646f00bc28ea37d83f2c31b", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
from fastapi import FastAPI, WebSocket import asyncio import numpy as np app = FastAPI() @app.websocket("/pressureTaps") # This is where the serial sensor data integrates to the Streamlit app using websockets async def websocket_endpoint(websocket: WebSocket): await websocket.accept() while True...
{ "alphanum_fraction": 0.652173913, "author": null, "avg_line_length": 25.4210526316, "converted": null, "ext": "py", "file": null, "hexsha": "fc34532bbd5eefee0ea5d24f7c551a95f8fc9ce2", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
@testset "Data" begin @test artificialIn_SAR_image(2) == 2 * π * ones(2, 2) @test artificial_S1_slope_signal(20, 0.0) == repeat([-π / 2], 20) @test ismissing(artificial_S1_signal(-1.0)) @test ismissing(artificial_S1_signal(2.0)) @test artificial_S1_signal(2) == [-3 * π / 4, -3 * π / 4] # for ...
{ "alphanum_fraction": 0.6470092671, "author": null, "avg_line_length": 37.09375, "converted": null, "ext": "jl", "file": null, "hexsha": "815de23bdc3509dc3ec0261ff97bd166c2fec1b7", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_cou...
import csv import numpy as np import torch import matplotlib.pyplot as plt color_bar = ['black', 'red', 'blue', 'green', 'brown', 'yellow', 'cyan', 'magenta'] def TrainHistoryPlot(his, his_label, save_name, title, axis_name, save = True): #history must be input as list[0]: iter or epoch #and otehr of history...
{ "alphanum_fraction": 0.6355460385, "author": null, "avg_line_length": 33.8405797101, "converted": null, "ext": "py", "file": null, "hexsha": "3ed243b281562ca4905d4db58f20f5f678fd8b2f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
{ "alphanum_fraction": 0.6558248632, "author": null, "avg_line_length": 32.6275510204, "converted": null, "ext": "py", "file": null, "hexsha": "9c69cf57cb3582ca7ee3c6d1e960b7cbae6a0da3", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma len_space_left: "left (space ts v c) \<le> right (ext v) \<longrightarrow> left (len v ts c) \<ge> left (space ts v c)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. left (space ts v c) \<le> right (ext v) \<longrightarrow> left (space ts v c) \<le> left (len v ts c) [PROOF STEP] proof [PROOF S...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Hybrid_Multi_Lane_Spatial_Logic_Length", "hexsha": null, "include": null, "lang": null, "length": 25, "llama_tokens": 2836, "mathlib_filename": null, "max_forks_count": null, "max_f...
function [dx,dy]= centered_gradient(input,dx,dy, nx,ny) dx = zeros(1,round(nx*ny*+nx)); dy = zeros(1,round(nx*ny*+nx)); nx = round(nx); ny = round(ny); size(input); for i = 1:ny-1 for j = 1: nx-1 k = round(i * nx + j); if(nx+k < length(input)) dx(k) = 0.5*(input(k+1) - inpu...
{ "alphanum_fraction": null, "author": "zhangqianqianQQ", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event...
{-# OPTIONS --without-K --rewriting #-} open import lib.Base open import lib.PathFunctor open import lib.PathGroupoid open import lib.Equivalence {- Structural lemmas about paths over paths The lemmas here have the form [↓-something-in] : introduction rule for the something [↓-something-out] : elimination rule for...
{ "alphanum_fraction": 0.4413413039, "author": null, "avg_line_length": 34.6472491909, "converted": null, "ext": "agda", "file": null, "hexsha": "1a276be7495fc14b1af17d24bcd328f9920e6f95", "include": null, "lang": "Agda", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import networkx as nx import numpy as np import tensorflow as tf from keras import Input from keras import backend as K from keras.models import Model from matplotlib import pyplot as plt from skimage import segmentation, color, filters from skimage.color import rgb2gray, gray2rgb from skimage.filters import sobel from...
{ "alphanum_fraction": 0.6376106195, "author": null, "avg_line_length": 31.9811320755, "converted": null, "ext": "py", "file": null, "hexsha": "65c8e103cc734279f494cb1f0dce85fba8190293", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
"""Classification using random forest.""" import logging import pickle import numpy as np from sklearn.ensemble import RandomForestClassifier logger = logging.getLogger(__name__) class RandomForest: """Train or classify using a RandomForest model.""" def __init__(self, num_features, model=None): """...
{ "alphanum_fraction": 0.6272653061, "author": null, "avg_line_length": 36.8975903614, "converted": null, "ext": "py", "file": null, "hexsha": "00fd43fe8cb0ed869dc7154a98997ca2f36c5693", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import pandas as pd from ..base import sim_aux_rdash, MatchingResult from ..sim_measures import sim_zero_one def _score_min(rdash, aux, sim_scalar): return sim_aux_rdash(rdash, aux, sim_scalar).min(axis=1) def algorithm1a(rdash, aux, sim_scalar=sim_zero_one, a...
{ "alphanum_fraction": 0.667844523, "author": null, "avg_line_length": 27.3870967742, "converted": null, "ext": "py", "file": null, "hexsha": "39ca6b549a9a98bc2175b736c3f630e9ff01862d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
SUBROUTINE POLY_OPNF ( nop, lunp, outfil, iret ) C************************************************************************ C* POLY_OPNF * C* * C* This subroutine opens a Common Alerting Protocol (CAP) file. The * C* naming format: YYMMDDHH_cc_nn.xml, where cc is the center name, * C* nn nth polygon. ...
{ "alphanum_fraction": 0.4762808349, "author": null, "avg_line_length": 29.8301886792, "converted": null, "ext": "f", "file": null, "hexsha": "ceea14743e182bdb8e5ec589d94a25ae39eb2887", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# Copyright 2018 The TensorFlow 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...
{ "alphanum_fraction": 0.6806895906, "author": null, "avg_line_length": 39.5296296296, "converted": null, "ext": "py", "file": null, "hexsha": "b948615235f2b7ec215e78569caa6c0bbad16a6d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# Copyright (c) 2018 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...
{ "alphanum_fraction": 0.5834786399, "author": null, "avg_line_length": 38.5546218487, "converted": null, "ext": "py", "file": null, "hexsha": "8ad11d76f683d556f05cafc3251acc942efef72f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
\chapter{Conclusion} The aim of our research was to apply deep learning techniques to a WF environment to automatically extract fingerprints from a variable-length trace. We do in fact show that this is possible by introducing a novel approach to perform the attack, together with two deep learning models, namely a \te...
{ "alphanum_fraction": 0.8143660753, "author": null, "avg_line_length": 103.8651685393, "converted": null, "ext": "tex", "file": null, "hexsha": "89b73be46ef483ac5322547e32a69d0404d65215", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
[STATEMENT] lemma imethds_norec: "\<lbrakk>iface G md = Some i; ws_prog G; table_of (imethods i) sig = Some mh\<rbrakk> \<Longrightarrow> (md, mh) \<in> imethds G md sig" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>iface G md = Some i; ws_prog G; table_of (imethods i) sig = Some mh\<rbrakk> \<Longr...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": 7, "llama_tokens": 1159, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": ...
""" Analytic functions for this test are defined in "analytic_filter.ipynb" in the development/ directory. """ from hmf.density_field import filters import numpy as np from numpy import sin, cos, pi import warnings import pytest # Need to do the following to catch repeated warnings. warnings.simplefilter("always", Us...
{ "alphanum_fraction": 0.439708561, "author": null, "avg_line_length": 27.7272727273, "converted": null, "ext": "py", "file": null, "hexsha": "9c5c7e9707d556e07fc850419336ea3ddef028d0", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
[STATEMENT] lemma result_costD': assumes "result f_c = f \<and> cost f_c \<le> b" "f_c = (a,c)" shows "a = f" "c \<le> b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. a = f &&& c \<le> b [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: result f_c = f \<and> cost f_c \<le> b f_c = (a, c) goal (...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "LLL_Basis_Reduction_Cost", "hexsha": null, "include": null, "lang": null, "length": 2, "llama_tokens": 190, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_...
//================================================================================================== /*! @file @copyright 2016 NumScale SAS @copyright 2016 J.T. Lapreste Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) ...
{ "alphanum_fraction": 0.4839905629, "author": null, "avg_line_length": 35.7469879518, "converted": null, "ext": "hpp", "file": null, "hexsha": "157655fa2be2a4fc67f0df918bf875333422f2b0", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
"""UNIT TESTS for the experimetn result maniupaltio python -m unittest test_Result """ from commonLib.DBManager import DB from stats import Result, Histogram, NumericStats, NumericList import numpy as np import os import unittest class TestResult(unittest.TestCase): def setUp(self): self._db ...
{ "alphanum_fraction": 0.555086423, "author": null, "avg_line_length": 37.5198019802, "converted": null, "ext": "py", "file": null, "hexsha": "8bbb1bd2e25cf6d52d295d61dd9d71aa255c54ca", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import sys import time import numpy as np import openml from autogluon_benchmark.tasks import task_loader, task_utils from openml.exceptions import OpenMLServerException sys.path.append('../') def get_dataset(task): X, y, _, _ = task.get_dataset().get_data(task.target_name) return X, y if __name__ == '__m...
{ "alphanum_fraction": 0.594488189, "author": null, "avg_line_length": 29.6333333333, "converted": null, "ext": "py", "file": null, "hexsha": "4e414c42e039880b638a79a60f9379012a9bbb3d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
""" Generic helpers for LLVM code generation. """ from __future__ import print_function, division, absolute_import import collections from contextlib import contextmanager import functools from llvmlite import ir from . import utils, config, types bool_t = ir.IntType(1) int8_t = ir.IntType(8) int32_t = ir.IntType...
{ "alphanum_fraction": 0.6217880776, "author": null, "avg_line_length": 31.5063176895, "converted": null, "ext": "py", "file": null, "hexsha": "6f6a540379a14969580f478d53b898587468901f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
/- Stalk of rings on basis. https://stacks.math.columbia.edu/tag/007L (just says that the category of rings is a type of algebraic structure) -/ import to_mathlib.opens import topology.basic import sheaves.stalk_on_basis import sheaves.presheaf_of_rings_on_basis universe u open topological_space names...
{ "alphanum_fraction": null, "author": "ramonfmir", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_d...
#!/usr/bin/env python3 import os import sys import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from optparse import OptionParser from matplotlib.ticker import NullFormatter # Usage: python3 genotypes_hwe_vs_maf.py -o output_file_prefix -e plink_hardy_file -f plink_afreq_file ...
{ "alphanum_fraction": 0.6840962547, "author": null, "avg_line_length": 40.0507246377, "converted": null, "ext": "py", "file": null, "hexsha": "19a884eb2c50cf0a9e0c4c7f11c5646c795a10e7", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import pandas as pd from matplotlib import pyplot as plt def generate_colours(df, column, cmap_name): # TODO: they get generated a little different than what pandas does automatically labels = np.sort(df[column].unique()) cmap = plt.get_cmap(cmap_name) colours = cmap(np.linspace(0,1...
{ "alphanum_fraction": 0.6409495549, "author": null, "avg_line_length": 31.3488372093, "converted": null, "ext": "py", "file": null, "hexsha": "8f517e54dcbe1939d84f92545cb1b2edc806dcad", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
"""Power spectrum plotting functions. Notes ----- This file contains functions for plotting power spectra, that take in data directly. """ from inspect import isfunction from itertools import repeat, cycle import numpy as np from scipy.stats import sem from fooof.core.modutils import safe_import, check_dependency f...
{ "alphanum_fraction": 0.6618884797, "author": null, "avg_line_length": 38.9948717949, "converted": null, "ext": "py", "file": null, "hexsha": "c68acc69832badc8df555ef98e487364da9beb77", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
""" Train a VAE model used to filter and enhance 3d points """ import json from datetime import datetime import matplotlib import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from tqdm import tqdm import cameras import data_utils import viz from top_vae_...
{ "alphanum_fraction": 0.5923769772, "author": null, "avg_line_length": 34.8812260536, "converted": null, "ext": "py", "file": null, "hexsha": "8501f01e66c97f9651f364dccf505f8d4342a6a2", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# -*- coding:utf-8 -*- """ ------------------------------------------------------------------------------- Project Name : ESEP File Name : interpolate.py Start Date : 2022-03-25 05:26...
{ "alphanum_fraction": 0.5130861505, "author": null, "avg_line_length": 32.1754385965, "converted": null, "ext": "py", "file": null, "hexsha": "1b6217ef04555a850deabec5af5d7c5406f27e81", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# coding: utf-8 """Interatomic potential dataset for property of HDNNP. """ import numpy as np from hdnnpy.dataset.property.property_dataset_base import PropertyDatasetBase class InteratomicPotentialDataset(PropertyDatasetBase): """Interatomic potential dataset for property of HDNNP. """ PROPERTIES = ['ene...
{ "alphanum_fraction": 0.5902735562, "author": null, "avg_line_length": 35.376344086, "converted": null, "ext": "py", "file": null, "hexsha": "b607148f6201bed9d7bfbf4cf3c3a059670e1e38", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
# Copyright (c) 2020 PHYTEC Messtechnik GmbH # SPDX-License-Identifier: Apache-2.0 import os import time import cv2 import tflite_runtime.interpreter as tflite import numpy as np import json import concurrent.futures class Ai: def __init__(self, model_path, embeddings_path, modeltype='quant'): self.mode...
{ "alphanum_fraction": 0.5294201861, "author": null, "avg_line_length": 36.9576719577, "converted": null, "ext": "py", "file": null, "hexsha": "07336979b13bbc7af68942dae0d4e3df6a45051d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma Mertens_convergent: "convergent (\<lambda>n::nat. \<MM> n - ln n)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. convergent (\<lambda>x. \<MM> (real x) - ln (real x)) [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. convergent (\<lambda>x. \<MM> (real x) - ln (real x)) [PROOF...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Prime_Number_Theorem_Prime_Number_Theorem", "hexsha": null, "include": null, "lang": null, "length": 13, "llama_tokens": 1216, "mathlib_filename": null, "max_forks_count": null, "ma...
from __future__ import absolute_import from __future__ import division from tiny_faces.tiny_fd import TinyFacesDetector import sys import cv2 import os import os.path as ops import numpy as np import json import argparse from manage_data.get_density_map import interpolate_scale from manage_data.utils import mkdir_i...
{ "alphanum_fraction": 0.6798018949, "author": null, "avg_line_length": 45.0873786408, "converted": null, "ext": "py", "file": null, "hexsha": "8477a5ea6a52f2119b4396dd0be436f2ef36784a", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
""" Module to fit the electronic charge density of closed shell molecules obtained by self-consistent siesta calculations with Gaussian functionsi HOW TO ------- 1) run get_data() 2) run get_atom_pos() 3) run add_core_density() 4) run fit_poly() """ import sys import nu...
{ "alphanum_fraction": 0.5926261027, "author": null, "avg_line_length": 31.5035629454, "converted": null, "ext": "py", "file": null, "hexsha": "fa024d2568ff0385378f6b44ce16d2e52bafa176", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
(** Here we define the signature for the coherent 2-groups. A coherent 2-group has a unit, a multiplication, and an inverse operation. The inverse laws are witnessed up to adjoint equivalence while associativity and unitality are witnessed as in a monoidal category. For more details, see: - https://ncatlab.org/nlab/sh...
{ "alphanum_fraction": null, "author": "UniMath", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_dat...
classdef PTKDensityInterpolation < PTKPlugin % PTKDensityInterpolation. Plugin for interpolating density values to a % different voxel size % % This is a plugin for the Pulmonary Toolkit. Plugins can be run using % the gui, or through the interfaces provided by the Pulmonary Toolkit. % ...
{ "alphanum_fraction": null, "author": "tomdoel", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_dat...
import matplotlib.pyplot as plt from scipy.io import wavfile import os from pydub import AudioSegment # Calculate and plot spectrogram for a wav audio file def graph_spectrogram(wav_file, sec=10): rate, data = get_wav_info(wav_file) nfft = 200 # Length of each window segment fs = 8000 # Sampling frequencie...
{ "alphanum_fraction": 0.675, "author": null, "avg_line_length": 34.4186046512, "converted": null, "ext": "py", "file": null, "hexsha": "e6fb4a308c961bfe3364fa9e6c640df351b09e19", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_coun...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. #...
{ "alphanum_fraction": 0.587332542, "author": null, "avg_line_length": 25.7510917031, "converted": null, "ext": "py", "file": null, "hexsha": "77938824221fd4238cf2dc5afcd6c9d2c8c5d8c6", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
[STATEMENT] lemma tranclp_unfold [code]: "tranclp r a b \<longleftrightarrow> (a, b) \<in> trancl {(x, y). r x y}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. r\<^sup>+\<^sup>+ a b = ((a, b) \<in> {(x, y). r x y}\<^sup>+) [PROOF STEP] by (simp add: trancl_def)
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 129, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": n...
//---------------------------------------------------------------------------// //! //! \file tstNormalDistribution.cpp //! \author Alex Robinson //! \brief Normal distribution unit tests. //! //---------------------------------------------------------------------------// // Std Lib Includes #include <iostream> //...
{ "alphanum_fraction": 0.6394717985, "author": null, "avg_line_length": 42.4370112945, "converted": null, "ext": "cpp", "file": null, "hexsha": "b34d468447a66c25707825f0ded9f1a38afc0d9a", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
#!/usr/bin/env python from pyquil.api import QVMConnection from pyquil.quil import Program as P from pyquil.gates import H from functools import reduce from numpy import average from numpy import ceil from numpy import log from numpy import std import argparse class QDice: def __init__(self): self.qvm ...
{ "alphanum_fraction": 0.6170212766, "author": null, "avg_line_length": 28.2, "converted": null, "ext": "py", "file": null, "hexsha": "9af50ed195f1c52054d9580bfd288ef97940b5b8", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count"...
using Plots include("src/FluidQueues.jl") include("model_def.jl") h(t) = (t>0.0) ? FluidQueues.hitting_times_cdf(model,t,1.0,2.0) : zeros(2,4) tvec = 0.0:0.1:3 cdfs = zeros(length(tvec),4) for (c,t) in enumerate(tvec) h_mat = h(t) cdfs[c,:] = h_mat[3:6] end plot(tvec,cdfs)
{ "alphanum_fraction": 0.6548042705, "author": null, "avg_line_length": 25.5454545455, "converted": null, "ext": "jl", "file": null, "hexsha": "b979a8e58320860e1f3ecf6b2609c1e2dea992c2", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import numpy as np import logging import sys from fvcore.transforms.transform import ( HFlipTransform, NoOpTransform, VFlipTransform, ) from PIL import Image from detectron2.data import transforms as T class ResizeShortestEdge(T.Augmentation): """ Scale the shorter edge to the given size, with a ...
{ "alphanum_fraction": 0.5952980688, "author": null, "avg_line_length": 36.0909090909, "converted": null, "ext": "py", "file": null, "hexsha": "f36528bc4cc69651e34f53681107fe408c3df74c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#include <vector> #include <string> #include <utility> #include <map> #include <boost/shared_ptr.hpp> #ifndef HEADER_B #define HEADER_B #include "A.hpp" enum testB { BB, BBB }; class Bklass : public A_second { public: // int i_; // from parent class Bklass(int i): A_second(i) { }; B...
{ "alphanum_fraction": 0.5736677116, "author": null, "avg_line_length": 17.7222222222, "converted": null, "ext": "hpp", "file": null, "hexsha": "1675ccb36aa630488160d40351a29b993deef59d", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
import streamlit as st import numpy as np from PIL import Image from detectron2 import model_zoo from detectron2.config import get_cfg from detectron2.utils.visualizer import Visualizer from detectron2.engine import DefaultPredictor from detectron2.data import MetadataCatalog # https://en.wikipedia.org/wiki/YUV#SDTV_w...
{ "alphanum_fraction": 0.6991025035, "author": null, "avg_line_length": 39.2037037037, "converted": null, "ext": "py", "file": null, "hexsha": "007550deef116806f4dc17a677311e580b7a1244", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
! mimic NWChem tgt_sd_t_s1_1 kernel ! RL: do not redefine simd clause to be schedule(static, 1) ! RL: make the schedule clause usage be explicit implicit integer (a-z) l1 = 1; l2 = 1; l3 = 1; l4 = 1; l5 = 1; l6 = 1; u1 = 24; u2 = 24; u3 = 24; u4 = 24; u5 = 24; u6 = 24; call tgt_sd_t_s1_1(l1,l2,l3,l4,l5,l6, u1,...
{ "alphanum_fraction": 0.5763052209, "author": null, "avg_line_length": 22.1333333333, "converted": null, "ext": "f90", "file": null, "hexsha": "dc9392db449392194738161bf6684d1652acc438", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_f...
# # # Copyright (C) University of Melbourne 2012 # # # #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...
{ "alphanum_fraction": 0.6522902039, "author": null, "avg_line_length": 38.8441558442, "converted": null, "ext": "py", "file": null, "hexsha": "1a6a8d6193f12ffada44f72b2de62496fb4aa56b", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import torch import numpy as np from torch.autograd import Variable import torch.nn.functional as F def sampler(faces, verts, n, bypass=False,sigma = 0.0): """Sample n verts given tri-mesh. :Parameters: faces : batch_size * face_num * 3 The faces of the mesh, start from 1. verts : batch_size * vert_num *...
{ "alphanum_fraction": 0.6217280272, "author": null, "avg_line_length": 42.9132420091, "converted": null, "ext": "py", "file": null, "hexsha": "eaba677bf063947108e4c81c2b89f6ca80961575", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#!/usr/bin/env python3 # # BSD 3-Clause License # # This file is part of the Basalt project. # https://gitlab.com/VladyslavUsenko/basalt.git # # Copyright (c) 2019-2021, Vladyslav Usenko and Nikolaus Demmel. # All rights reserved. # import argparse import json import numpy as np from scipy.spatial.transform import Ro...
{ "alphanum_fraction": 0.6126230457, "author": null, "avg_line_length": 32.2803738318, "converted": null, "ext": "py", "file": null, "hexsha": "5d76fbdd726ae08c61bcce471d0c015a225d8517", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import cv2 import numpy as np import copy # 画像のトリミングとかできるならここでやる def preprocessing(img, top=0, bottom=-1, left=0, right=-1): h, w, c = img.shape if bottom == -1: bottom = h if right == -1: right = w # 投入部分をトリミングする方針に変更 # return crop_img(img) return [img[top:bottom, left:right, :]] def crop_img(im...
{ "alphanum_fraction": 0.6445086705, "author": null, "avg_line_length": 26.6153846154, "converted": null, "ext": "py", "file": null, "hexsha": "7335450bbcb90e1ce83f5a99b691553699975969", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
################################################################################ # # Morphism types # ################################################################################ morphism_type(::Type{T}, ::Type{S}) where {R, T <: AbsAlgAss{R}, S <: AbsAlgAss{R}} = AbsAlgAssMor{T, S, Generic.Mat{R}} morphism_type...
{ "alphanum_fraction": 0.5301416049, "author": null, "avg_line_length": 25.9568261377, "converted": null, "ext": "jl", "file": null, "hexsha": "080f14ec1a6f1b29aefd751b8a72ebeac3436fbb", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
from PIL import ImageTk import PIL.Image import tkinter as tk import tkinter.messagebox from tkinter import * from tkinter.ttk import * from time import strftime from datetime import datetime as dt import datetime import pandas as pd import pytz from timezonefinder import TimezoneFinder from geopy.geocoders...
{ "alphanum_fraction": 0.5298210259, "author": null, "avg_line_length": 50.3405797101, "converted": null, "ext": "py", "file": null, "hexsha": "f0c7c81152c2394b61cf17f42e6d16e1cc590077", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
from numpy import pi, exp def _comp_point_coordinate(self): """Compute the point coordinates needed to plot the Slot. Parameters ---------- self : SlotM18 A SlotM18 object Returns ------- point_dict: dict A dict of the slot coordinates """ Rbo = self.get_Rbo() ...
{ "alphanum_fraction": 0.551143201, "author": null, "avg_line_length": 21.3076923077, "converted": null, "ext": "py", "file": null, "hexsha": "c74747a9d9e59355e2a6369815ed4b8265a463f1", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import numpy as np from importlib import import_module from TexasHoldem import Card, Hand, Deck, Player, Game def test_game(): cash = 10 ai_name = 'AI.DefaultTexasHoldemAI' n_players = 5 names = np.random.choice(Player.names, n_players, replace=False) players = [Player(ai=import_module(ai_name).Te...
{ "alphanum_fraction": 0.6398891967, "author": null, "avg_line_length": 31.8529411765, "converted": null, "ext": "py", "file": null, "hexsha": "6d899177804b4fd8d9f29c636982c57f7ca16214", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
''' The trade algorithm for WealthSimple Assignment Author: Jinhua Wang License MIT For simplicity purposes, this file assumes stock prices follows Brownian Motion, and we only trade SP500. ''' import numpy as np class TradeData: ''' Soure of the trade data to simplify matters, assume that only SP500 is traded ...
{ "alphanum_fraction": 0.7017988346, "author": null, "avg_line_length": 30.5968992248, "converted": null, "ext": "py", "file": null, "hexsha": "dde1a05f4a0639f9edfc2cb67354f4f73a1e116f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# # Copyright 2017 Scott A Dixon # # 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 t...
{ "alphanum_fraction": 0.5538461538, "author": null, "avg_line_length": 38.6138613861, "converted": null, "ext": "py", "file": null, "hexsha": "8940e437dd1725425f01032224830105fd951726", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import generators as ge def question(n): print(f'{n}. ' + ge.QHA[f'q{n}']) def hint(n): print(ge.QHA[f'h{n}']) def answer(n): print(ge.QHA[f'a{n}']) def pick(): n = np.random.randint(1, 100) question(n)
{ "alphanum_fraction": 0.5657370518, "author": null, "avg_line_length": 11.9523809524, "converted": null, "ext": "py", "file": null, "hexsha": "01ec48a74ea50936be3271e024fba8ac406c3eb9", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
mutable struct Input graph::DiGraph weights::Array{Float64,2} ndds::Array{Int64,1} max_cycle_length::Int64 max_chain_length::Int64 solver_instance::Any time_param::String time_factor::Float64 start_time::Float64 function Input( graph::DiGraph, weights::Array{Floa...
{ "alphanum_fraction": 0.6523929471, "author": null, "avg_line_length": 28.3571428571, "converted": null, "ext": "jl", "file": null, "hexsha": "d0eee4522674a648c4db305ff6269c52c34ad370", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import matplotlib.pyplot as plt import numpy as np #Plot e scatter fig = plt.figure() ax1 = fig.add_subplot(1, 2, 1) ax1.plot(np.random.randn(50), color='red') ax2 = fig.add_subplot(1, 2, 2) ax2.scatter(np.arange(50), np.random.randn(50)) plt.show()
{ "alphanum_fraction": 0.6819923372, "author": null, "avg_line_length": 23.7272727273, "converted": null, "ext": "py", "file": null, "hexsha": "97fa024aa5ab16817a8da346e8c0ab6b3ea08269", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#include <iostream> #include <fstream> #include <vector> #include <string> #include <algorithm> #include <iterator> #include <string.h> #include <boost/tokenizer.hpp> #define DATA_FOLDERS_PATH_FORMAT "../location_001_dataset_%03d/" #define FILE_FORMAT "location_001_ivdata_%03d.txt" struct event { publ...
{ "alphanum_fraction": 0.5557025668, "author": null, "avg_line_length": 26.8014184397, "converted": null, "ext": "cpp", "file": null, "hexsha": "bf24f2066e6ac5fa4996e5930cecc27fe389d3d0", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
#include <gtest/gtest.h> #include "scheme/actor/Atom.hh" #include "ligand_factory.hh" #include "scheme/util/SimpleArray.hh" #include <iterator> // std::back_inserter #include <fstream> #include <boost/foreach.hpp> namespace scheme { namespace chemical { namespace test { using std::cout; using std::endl; TEST(l...
{ "alphanum_fraction": 0.6301059002, "author": null, "avg_line_length": 51.6983240223, "converted": null, "ext": "cc", "file": null, "hexsha": "e8ebee43dae19cc789d2fdb41ad5b85308b87cf9", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_...
import networkx.algorithms.tree.tests.test_mst import pytest from graphscope.nx.utils.compat import import_as_graphscope_nx from graphscope.nx.utils.compat import with_graphscope_nx_context import_as_graphscope_nx(networkx.algorithms.tree.tests.test_mst, decorators=pytest.mark.usefixtures("gra...
{ "alphanum_fraction": 0.7590149516, "author": null, "avg_line_length": 25.8409090909, "converted": null, "ext": "py", "file": null, "hexsha": "cf1b4cb6a834868760dd530a3d10b58d04a7c3c4", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
from torch import nn import numpy as np import torch from utils import ( add_device, get_logger, ) logger = get_logger() def train(model, dataloader, input_key, target_key, optimizer, loss_func, device=torch.device('cpu')): train_loss = 0.0 for step, data in enumerate(dataloader): ...
{ "alphanum_fraction": 0.5295876003, "author": null, "avg_line_length": 33.6405959032, "converted": null, "ext": "py", "file": null, "hexsha": "a4ee4c10df61d3eadc29442a375ee5a3fb32e8dc", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Aug 19 15:23:20 2020 @author: grat05 """ import sys import os sys.path.append(os.path.abspath( os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir))) #from iNa_models import Koval_ina, OHaraRudy_INa import atr...
{ "alphanum_fraction": 0.6125702606, "author": null, "avg_line_length": 36.9245283019, "converted": null, "ext": "py", "file": null, "hexsha": "e55d356affd234b574eaebb673611e43c5353b32", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
From Tweetnacl Require Import Libs.Export. Open Scope Z. Definition set_xor (i:Z) := Z.lnot (i - 1). Lemma set_xor_0 : set_xor 0 = 0. Proof. reflexivity. Qed. Lemma set_xor_1 : set_xor 1 = -1. Proof. reflexivity. Qed. Lemma land_0 : forall i, Z.land 0 i = 0. Proof. intro. go. Qed. Lemma land_minus_1 : forall i, Z...
{ "alphanum_fraction": null, "author": "ildyria", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_dat...
#= ###################################################### model structs ###################################################### =# mutable struct ElementRaw{T1<:Integer, T2<:AbstractFloat} node1::T1 node2::T1 com::Point2D{T2} nvec::Point2D{T2} area::T2 end struct Element{T1<:Integer, T2<:AbstractF...
{ "alphanum_fraction": 0.5644504749, "author": null, "avg_line_length": 30.5127388535, "converted": null, "ext": "jl", "file": null, "hexsha": "7fda341f24cb627c644b449aa4df20e31d28b365", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
(*<*) (* * Copyright 2015, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) *) theory Noninterference imports Global_Invariants_Lemmas Local_Invariants_L...
{ "alphanum_fraction": null, "author": "isabelle-prover", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event...
import numpy as np import torch from collections import defaultdict #ops = ['~', '^', '+', '*', '<', '>'] ops = ['~', '+', '>'] symb2nary = { '0' : 0, '1' : 0, '~' : 1, '+' : 2, '>' : 3 } class NAryBooleanExpLang(object): def __init__(self, n = 3, p = 0.5): assert n <= 3 self.n = n self....
{ "alphanum_fraction": 0.6182242991, "author": null, "avg_line_length": 24.8837209302, "converted": null, "ext": "py", "file": null, "hexsha": "51bd5a9a51c083544b00aac66c24bded6ae3dc59", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np if __name__ =="__main__": xx = np.array([[0.1, 0.2, 0.3, 0.4], [0.5, 0.6, 0.7, 0.8], [0.8, 0.6, 0.3, 0.4], [0.8, 0.6, 0.7, 0.8], [0.8, 0.8, 0.8, 0.4], [0.1, 0.6, 0.7, 0.8], [0.1, 0.2, 0....
{ "alphanum_fraction": 0.2713815789, "author": null, "avg_line_length": 32, "converted": null, "ext": "py", "file": null, "hexsha": "8142aabe95c7abbe5d41840421797be452f485aa", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
# Fixed point classification in 2D using DrWatson @quickactivate "NonlinearDynamicsTextbook" include(srcdir("style.jl")) using DynamicalSystems, PyPlot, Random alleigs = [] fig, axs = subplots(2,3; figsize = (figx, 2figy)) ax = gca() xgrid = -5:0.05:5 ygrid = xgrid ux = zeros(length(xgrid), length(ygrid)) uy = copy(ux...
{ "alphanum_fraction": 0.5735628451, "author": null, "avg_line_length": 26.093220339, "converted": null, "ext": "jl", "file": null, "hexsha": "b46d56acdb842a6e816e2b86f61a81288d74bc91", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
""" to do... """ import numpy as np import torch from torch.utils.tensorboard import SummaryWriter import argparse import gym
{ "alphanum_fraction": 0.7698412698, "author": null, "avg_line_length": 14, "converted": null, "ext": "py", "file": null, "hexsha": "efa9896724ef807dc63a0fd8be351172f44137be", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
```julia using DifferentialEquations using Plots ``` Consider the simple reaction: \begin{align} A &\longleftrightarrow B\\ B &\longleftrightarrow C\\ \end{align} Both are elementary steps that occur in the liquid phase, and we will consider it in a few different solvent environments. ```julia gammaA(XA, X...
{ "alphanum_fraction": 0.6840439426, "author": null, "avg_line_length": 177.4727830309, "converted": true, "ext": "ipynb", "file": null, "hexsha": "d0e383c262941cb3bae976cf83a378ee1a70408c", "include": null, "lang": "Jupyter Notebook", "length": null, "llama_tokens": null, "mathlib_filename": nu...
# -*- coding: utf-8 -*- """ Automatic Colour Conversion Graph ================================= Defines the automatic colour conversion graph objects: - :func:`colour.describe_conversion_path` - :func:`colour.convert` """ import inspect import numpy as np import textwrap from collections import namedtuple from c...
{ "alphanum_fraction": 0.6218056051, "author": null, "avg_line_length": 36.8734817814, "converted": null, "ext": "py", "file": null, "hexsha": "684f723472e6f76e8338d05fa36abd34349dfd13", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...