text
stringlengths
0
27.1M
meta
dict
% Make the command for organizing stories % \story{name}{title}{story}{pronouns}{major}{year} \newcommand{\story}[6]{ \section*{\uppercase{\textbf{#1}}: #2} #3 \\ \textit{-#4} \\ \textit{-#5, #6} }
{ "alphanum_fraction": 0.5860465116, "author": null, "avg_line_length": 21.5, "converted": null, "ext": "tex", "file": null, "hexsha": "13d9d77f8508aaad28ed3b9b974bc446ea78c5f1", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
FUNCTION PS_TOTL ( t850, td850, t500 ) C************************************************************************ C* PS_TOTL * C* * C* This function computes the total totals index: * C* * C* TOTL = ( T850 - T500 ) + ( TD850 - T500 ) * C* * C* REAL PS_TOTL ( T850, TD850, T500 )...
{ "alphanum_fraction": 0.4537177542, "author": null, "avg_line_length": 28.652173913, "converted": null, "ext": "f", "file": null, "hexsha": "93e2534b53027c694d8ed91ed196519d36dfa9c8", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
[STATEMENT] lemma charpoly_eq: "charpoly A = Cayley_Hamilton.charpoly (from_vec A)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Cayley_Hamilton_Compatible.charpoly A = Cayley_Hamilton.charpoly (from_vec A) [PROOF STEP] unfolding charpoly_def Cayley_Hamilton.charpoly_def det_sq_matrix_eq[symmetric] X_def C_def [PR...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Echelon_Form_Cayley_Hamilton_Compatible", "hexsha": null, "include": null, "lang": null, "length": 5, "llama_tokens": 525, "mathlib_filename": null, "max_forks_count": null, "max_fo...
# (c) Tom Gaimann, 2020 # Zusammensetzung eines frequenzmodulierten Signals # Ref: https://gist.github.com/fedden/d06cd490fcceab83952619311556044a import numpy as np import matplotlib.pyplot as plt plt.rcParams.update({'font.size': 22}) f_modulator = 4 # Frequenz der Nachrichten Welle f_carrier = 40 # Frequenz der ...
{ "alphanum_fraction": 0.7228400342, "author": null, "avg_line_length": 25.9777777778, "converted": null, "ext": "py", "file": null, "hexsha": "0abc8d07dfe14b20f5b61edc9524b68b48155455", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
from ale_python_interface import ALEInterface import pygame from pygame.locals import * import numpy as np import os import scipy.ndimage as ndimage class AtariEnvironment: """ Environment for playing Atari games using ALE Interface """ def __init__(self, game_filename, **kwargs): """ Create an environmen...
{ "alphanum_fraction": 0.709851552, "author": null, "avg_line_length": 20.5833333333, "converted": null, "ext": "py", "file": null, "hexsha": "37ddd0b2cc240505d5cbabbe2f4a5f78c16e4845", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
#define BOOST_TEST_MODULE URL #include <boost/test/unit_test.hpp> #include "odil/webservices/URL.h" BOOST_AUTO_TEST_CASE(Equal) { auto const url = odil::webservices::URL::parse( "foo://example.com:8042/over/there?name=ferret#nose"); BOOST_REQUIRE(url == url); BOOST_REQUIRE(!(url != url)); } BOOST...
{ "alphanum_fraction": 0.6772648084, "author": null, "avg_line_length": 32.8, "converted": null, "ext": "cpp", "file": null, "hexsha": "de8b1aa4d3e7d73d515bb04a1e95c876a8bd4d31", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
""" struct GridPortion{Dc,Dp,G} <: Grid{Dc,Dp} parent_grid::G cell_to_parent_cell::Vector{Int32} node_to_parent_node::Vector{Int32} end """ struct GridPortion{Dc,Dp,G} <: Grid{Dc,Dp} parent_grid::G cell_to_parent_cell::Vector{Int32} node_to_parent_node::Vector{Int32} cell_to_nodes::Ta...
{ "alphanum_fraction": 0.7887284842, "author": null, "avg_line_length": 32.7454545455, "converted": null, "ext": "jl", "file": null, "hexsha": "967aa5c64a7c5b0ab2f683ac2d7cd326933deeb3", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
/* * Server.h * * Created on: 19 нояб. 2017 г. * Author: snork */ #ifndef SERVER_HPP_ #define SERVER_HPP_ #include <queue> #include <boost/asio/io_service.hpp> #include <boost/asio/strand.hpp> #include <boost/asio/ip/v6_only.hpp> #include <boost/asio/ip/tcp.hpp> #include <boost/asio/write.hpp> #include "...
{ "alphanum_fraction": 0.6614130435, "author": null, "avg_line_length": 23.2911392405, "converted": null, "ext": "hpp", "file": null, "hexsha": "12d004012a9006abe087092e902f2a7eac71793f", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
import subprocess import os import datetime import time import numpy as np """ 'Logger' intended for real-time logging from inside executors to hdfs. May be slow, so use sparingly! Looks at CONFIG["LOGS"]["hdfs_logfile"] for hdfs logfile path. Example (note the *3* fwd slashes) might be: hdfs:///tmp/logfile.txt Can...
{ "alphanum_fraction": 0.6116473616, "author": null, "avg_line_length": 42, "converted": null, "ext": "py", "file": null, "hexsha": "9d62ecc33682be9b35a63254101c3cc77e5c609f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
## Demo de for Loops ## Prof. James Hunter ## from: https://rstudio.cloud/project/1181172 ## 28 de maio de 2020 ## Baseado em Cap. 21 de Grolemund & Wickham, R for Data Science (O'Reilly) set.seed(42) df <- tibble( a = rnorm(10), b = rnorm(10), c = rnorm(10), d = rnorm(10) ) glimpse(df) s...
{ "alphanum_fraction": 0.604040404, "author": null, "avg_line_length": 18.3333333333, "converted": null, "ext": "r", "file": null, "hexsha": "cd6d9c373ff60ccd20953c746a0350d52abcd33c", "include": null, "lang": "R", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_coun...
@testset "Testing CHSF Descriptor for dc Si" begin @info("Testing CHSF Descriptor for dc Si.") using DescriptorZoo, JuLIP, Test at = bulk(:Si, cubic=true) desc = chsf(at, 6.5, n=2, l=2) chsf_ref = [10.3698237,1.4503467,-8.2118063,51.6882200,-53.0113716,69.8233316] #n=2,l=2 case chsf_now = vcat(desc[1,:]...) println(@t...
{ "alphanum_fraction": 0.7017045455, "author": null, "avg_line_length": 29.3333333333, "converted": null, "ext": "jl", "file": null, "hexsha": "967c851fed62c1dd43953a1ce847b39e9d2a2648", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
from pytest_check import check import fdm import jax from jax.config import config import jax.numpy as np import fenics import fenics_adjoint as fa import ufl from jaxfenics_adjoint import build_jax_fem_eval config.update("jax_enable_x64", True) fenics.parameters["std_out_all_processes"] = False fenics.set_log_level...
{ "alphanum_fraction": 0.6659582005, "author": null, "avg_line_length": 26.6320754717, "converted": null, "ext": "py", "file": null, "hexsha": "462e34fe362824d72778960c32b6a4dcc00477e3", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019.4.30 # @Author : FrankEl # @File : Feature_selection_demo_rt.py import matplotlib.pyplot as plt import numpy as np import scipy.io as scio from sklearn.cross_decomposition import PLSRegression from sklearn.model_selection import train_test_split from...
{ "alphanum_fraction": 0.6846814603, "author": null, "avg_line_length": 35.8205128205, "converted": null, "ext": "py", "file": null, "hexsha": "741551d00f27797476d86c3a848545a8a5489275", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
double precision function deter3(r) implicit none double precision r(3,3) c c return the determinant of a 3x3 matrix c deter3 = $ r(1,1)*(r(2,2)*r(3,3)-r(2,3)*r(3,2)) - $ r(1,2)*(r(2,1)*r(3,3)-r(2,3)*r(3,1)) + $ r(1,3)*(r(2,1)*r(3,2)-r(2,2)*r(3,1)) c end
{ "alphanum_fraction": 0.4716981132, "author": null, "avg_line_length": 24.4615384615, "converted": null, "ext": "f", "file": null, "hexsha": "6b5f41db05944622587a1d57a2cb3bb42b378da7", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# -*- coding: utf-8 -*- # Copyright (C) 2015-2017 by Brendt Wohlberg <brendt@ieee.org> # All rights reserved. BSD 3-clause License. # This file is part of the SPORCO package. Details of the copyright # and user license can be found in the 'LICENSE.txt' file distributed # with the package. """Utility functions""" from...
{ "alphanum_fraction": 0.5870279827, "author": null, "avg_line_length": 30.5751689189, "converted": null, "ext": "py", "file": null, "hexsha": "bb179cb464cfb0e59f2f01187d18f6f6ef4a59be", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
## Main function: header_analysis(text) ## input file: readme files text data ## output file: json files with categories extracted using header analysis; other text data cannot be extracted import os import glob import numpy as np import pandas as pd import matplotlib.pyplot as plt import re import string import colle...
{ "alphanum_fraction": 0.6319464649, "author": null, "avg_line_length": 40.9166666667, "converted": null, "ext": "py", "file": null, "hexsha": "f4dc9386dbdbffbe8561eb8aef85dab4e8533dd8", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
module Accounting using Compat import Compat: String import Currencies: currency using Currencies using DataStructures import Base.push! include("debitcredit.jl") include("accounts.jl") include("entries.jl") include("ledger.jl") include("reports.jl") export Split, Entry, Ledger export Asset, Liability, Equity, Reve...
{ "alphanum_fraction": 0.7759674134, "author": null, "avg_line_length": 20.4583333333, "converted": null, "ext": "jl", "file": null, "hexsha": "7ecd6e10998fdf703527c95ee76184dae1da88b8", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import matplotlib.pyplot as plt import numpy as np import seaborn as sns import pandas as pd data = pd.read_csv('mobile_cleaned.csv') data.head() ax = sns.scatterplot(x="stand_by_time", y="battery_capacity", data=data) plt.show() ax = sns.scatterplot(x = "stand_by_time", y = "battery_capacity", hue="thickness", dat...
{ "alphanum_fraction": 0.7179487179, "author": null, "avg_line_length": 22.75, "converted": null, "ext": "py", "file": null, "hexsha": "2f9ca9d66e5db8c758b289fb1815e97a0f20886b", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
# coding=utf-8 # coding=utf-8 # Copyright 2019 The RecSim 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 ap...
{ "alphanum_fraction": 0.6945978391, "author": null, "avg_line_length": 40.8333333333, "converted": null, "ext": "py", "file": null, "hexsha": "f5b9198d4584b9df0b176523564a3c576c9e9a0d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma mult_L_omega_below: "(x * L)\<^sup>\<omega> \<le> x * L" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (x * L)\<^sup>\<omega> \<le> x * L [PROOF STEP] by (metis mult_right_isotone n_L_below_L omega_slide)
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Correctness_Algebras_N_Omega_Algebras", "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 107, "mathlib_filename": null, "max_forks_count": null, "max_fork...
#include <iostream> #include <stdexcept> #include <boost/lexical_cast.hpp> #include "Tudat/Astrodynamics/BasicAstrodynamics/physicalConstants.h" #include "Tudat/Astrodynamics/BasicAstrodynamics/timeConversions.h" #include "Tudat/External/SpiceInterface/spiceInterface.h" #include "Tudat/External/SpiceInterface...
{ "alphanum_fraction": 0.7455485353, "author": null, "avg_line_length": 41.4523809524, "converted": null, "ext": "cpp", "file": null, "hexsha": "5ee05354fed2f0e9cca7226fb924665c4682367d", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
#!/usr/bin/env python3 """ Fast approximations for various trig functions """ from approx.cheby import cheby_poly, cheby_fit from utils import utils import math from matplotlib import pyplot as plt import numpy as np from typing import Callable, Union, Optional, Tuple PI = math.pi HALF_PI = 0.5 * P...
{ "alphanum_fraction": 0.6502163115, "author": null, "avg_line_length": 26.3333333333, "converted": null, "ext": "py", "file": null, "hexsha": "7df05a214fd3eaddf7f68d73e359e9bcae40579f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma map2set_finite[relator_props]: assumes "finite_map_rel (\<langle>Rk,Id\<rangle>R)" shows "finite_set_rel (\<langle>Rk\<rangle>map2set_rel R)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite_set_rel (\<langle>Rk\<rangle>map2set_rel R) [PROOF STEP] using assms [PROOF STATE] proof (prove) us...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Collections_GenCF_Gen_Gen_Map2Set", "hexsha": null, "include": null, "lang": null, "length": 3, "llama_tokens": 319, "mathlib_filename": null, "max_forks_count": null, "max_forks_re...
""" Copyright (c) 2016 Jet Propulsion Laboratory, California Institute of Technology. All rights reserved """ import sys import traceback from datetime import datetime, timedelta from multiprocessing.dummy import Pool, Manager from shapely.geometry import box import numpy as np import pytz from nexustiles.nexustiles ...
{ "alphanum_fraction": 0.5854899838, "author": null, "avg_line_length": 39.9783549784, "converted": null, "ext": "py", "file": null, "hexsha": "1518c9efe394881abddc34ca953bb6c067d0cc25", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np from scipy.stats.distributions import norm def generate_logistic(): # Number of clusters nclust = 100 # Regression coefficients beta = np.array([1, -2, 1], dtype=np.float64) # Covariate correlations r = 0.4 # Cluster effects of covariates rx = 0.5 # Within-c...
{ "alphanum_fraction": 0.4978149344, "author": null, "avg_line_length": 23.3911111111, "converted": null, "ext": "py", "file": null, "hexsha": "e0c11beb5ede3740657dcdd1cf0993e165a343c3", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
## Automatically adapted for numpy.oldnumeric Jul 23, 2007 by ############################################################################# # # Author: Alex T. GILLET # # Copyright: A. Gillet TSRI 2003 # ############################################################################# # # $Header: /opt/cvs/DejaVu2/Arrows...
{ "alphanum_fraction": 0.4826805415, "author": null, "avg_line_length": 33.641815235, "converted": null, "ext": "py", "file": null, "hexsha": "7d018f3ec5c34978661a295e5ab4f4aae70a40cc", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import http.client import json import numpy from pymongo import MongoClient import datetime import pprint from bson.objectid import ObjectId client = MongoClient('mongodb://trading:secret@127.0.0.1:27017/') trading_db = client['trading-db'] api_response_collection = trading_db['api-response-collection'] # post_id = t...
{ "alphanum_fraction": 0.7533193571, "author": null, "avg_line_length": 29.8125, "converted": null, "ext": "py", "file": null, "hexsha": "a83e03f5939eeb1d77027c937cc52417732f87ac", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_cou...
# FIXME: Import order causes error: # ImportError: dlopen: cannot load any more object with static TL # https://github.com/pytorch/pytorch/issues/2083 import torch import numpy as np import skimage.data from torchfcn.models.fcn32s import get_upsampling_weight def test_get_upsampling_weight(): src = skimage.data...
{ "alphanum_fraction": 0.646917534, "author": null, "avg_line_length": 24.0192307692, "converted": null, "ext": "py", "file": null, "hexsha": "c4f92588858e2f1837cb4d179c2a3c0ce2e06d50", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
program test1 integer I real X(100) C AND expression DO 100 I =1,N IF ((I.LT.1).AND.(I.LE.50)) THEN ELSE X(I) = 1 ENDIF 100 CONTINUE C OR expression DO 200 I =1,N IF ((1.LE.I).OR.(I.LE.50)) TH...
{ "alphanum_fraction": 0.3496732026, "author": null, "avg_line_length": 13.3043478261, "converted": null, "ext": "f", "file": null, "hexsha": "0c85d4caf9503b369f273bd463baf89d3b839554", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# -*- coding: utf-8 -*- """ Test of the population propagator """ from aloe import step from aloe import world import numpy from quantarhei.testing.feature import FeatureFileGenerator from quantarhei.testing.feature import match_number from quantarhei import TimeAxis from quantarhei import PopulationPr...
{ "alphanum_fraction": 0.6383029722, "author": null, "avg_line_length": 25.5950920245, "converted": null, "ext": "py", "file": null, "hexsha": "d47cc3620f2fe0188bb2a2071c2da94f8c6402d9", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import torch import torch.nn as nn import torch.nn.quantized as nnq from torch.quantization import QuantStub, DeQuantStub import torchvision import unittest import os from neural_compressor.adaptor import FRAMEWORKS from neural_compressor.model import MODELS from neural_compressor.adaptor.pytorch import PyTorchVersion...
{ "alphanum_fraction": 0.6811955168, "author": null, "avg_line_length": 34.5376344086, "converted": null, "ext": "py", "file": null, "hexsha": "4fbfe5cb60f25aab866c919596b8ef36b5610e69", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter from mpl_toolkits.mplot3d.axes3d import Axes3D def load_data(filename): ''' 读取数据,将其转换为np.array的形式,将x和y以元组形式返回,解包获取数据 ''' column1 = list() column2 = list() ...
{ "alphanum_fraction": 0.5781862007, "author": null, "avg_line_length": 28.1271186441, "converted": null, "ext": "py", "file": null, "hexsha": "f647c95da42357808bb2dc85d02bd8647b959baf", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#ifndef BEAST_TEST_STRING_ISTREAM_HPP #define BEAST_TEST_STRING_ISTREAM_HPP #include <beast/core/async_result.hpp> #include <beast/core/bind_handler.hpp> #include <beast/core/error.hpp> #include <beast/websocket/teardown.hpp> #include <boost/asio/buffer.hpp> #include <boost/asio/io_service.hpp> #include <boost/throw_...
{ "alphanum_fraction": 0.6051309177, "author": null, "avg_line_length": 24.0828025478, "converted": null, "ext": "hpp", "file": null, "hexsha": "230fffac93761e6c189654c15aaee5ac3ba55cfc", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
[STATEMENT] lemma row_empty:"row [] i = []" [PROOF STATE] proof (prove) goal (1 subgoal): 1. row [] i = [] [PROOF STEP] unfolding row_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. map (\<lambda>w. w ! i) [] = [] [PROOF STEP] by auto
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Matrix_Tensor_Matrix_Tensor", "hexsha": null, "include": null, "lang": null, "length": 2, "llama_tokens": 108, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_for...
#%% import tensorflow as tf import numpy as np t = tf.constant([0,1,2,1]) # %% tf.equal(t, 1) # %% tf.cast(tf.equal(t, 1), tf.int32) # %%t indices = tf.where(tf.not_equal(t, 1))
{ "alphanum_fraction": 0.6055555556, "author": null, "avg_line_length": 13.8461538462, "converted": null, "ext": "py", "file": null, "hexsha": "c275beb45a8f9428157cedf201cce21328b73ab1", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#!/usr/bin/env python3 # coding=utf-8 import matplotlib.pyplot as plt import numpy as np def f(x, y): # the height function return (1 - x / 2 + x ** 5 + y ** 3) * np.exp(-x ** 2 - y ** 2) n = 100 x = np.linspace(-3, 3, n) y = np.linspace(-3, 3, n) X, Y = np.meshgrid(x, y) # use plt.contourf to filling con...
{ "alphanum_fraction": 0.5930599369, "author": null, "avg_line_length": 21.1333333333, "converted": null, "ext": "py", "file": null, "hexsha": "7c34a7b0c2c3e77ab6acf4293c99a3a5aef01eaf", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma locally_empty [iff]: "locally P {}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. locally P {} [PROOF STEP] by (simp add: locally_def openin_subtopology)
{ "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": 69, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": nu...
# Copyright 2018 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, s...
{ "alphanum_fraction": 0.7043478261, "author": null, "avg_line_length": 35.1764705882, "converted": null, "ext": "py", "file": null, "hexsha": "544167e99d7adf89cea4802d0e0a80df0062e541", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma kc_8x7_hd: "hd kc8x7 = (1,1)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. hd kc8x7 = (1, 1) [PROOF STEP] by eval
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Knights_Tour_KnightsTour", "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 77, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_e...
import numpy as np import itertools from affordable.affordable import Affordable, get_action ACTIONS = ('np', 'up', 'dn', 'lf', 'rt', 'rs') class Shaman(Affordable): def __init__(self, ctx, name, width, height): super(Shaman, self).__init__(ctx, name) self.width = width self.height = he...
{ "alphanum_fraction": 0.4997671169, "author": null, "avg_line_length": 25.5595238095, "converted": null, "ext": "py", "file": null, "hexsha": "d229da0da73a79e606221ff0ee0e15f818d67d03", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
module SurfaceCouplingTests using Test using Gridap import Gridap: ∇ using LinearAlgebra: tr, ⋅ # Analytical functions u(x) = VectorValue( x[1]^2 + 2*x[2]^2, -x[1]^2 ) ∇u(x) = TensorValue( 2*x[1], 4*x[2], -2*x[1], zero(x[1]) ) Δu(x) = VectorValue( 6, -2 ) p(x) = x[1] + 3*x[2] ∇p(x) = VectorValue(1,3) s(x) = -Δu(x)...
{ "alphanum_fraction": 0.626691042, "author": null, "avg_line_length": 21.7063492063, "converted": null, "ext": "jl", "file": null, "hexsha": "490f958fa331db20280e7f274490e73f0792b228", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
In Chestnut Park there is a roundhouse that serves as a mini community center for the neighborhood. Sadly it is often the target of vandalism.
{ "alphanum_fraction": 0.8, "author": null, "avg_line_length": 36.25, "converted": null, "ext": "f", "file": null, "hexsha": "6bbe95273dd8147aed24e1f43b3eb4c962f282c3", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, ...
# -*- coding: utf-8 -*- # This file as well as the whole tsfresh package are licenced under the MIT licence (see the LICENCE.txt) # Maximilian Christ (maximilianchrist.com), Blue Yonder Gmbh, 2016 """ This module contains the main function to interact with tsfresh: extract features """ from __future__ import absolute_...
{ "alphanum_fraction": 0.6451168596, "author": null, "avg_line_length": 45.2884990253, "converted": null, "ext": "py", "file": null, "hexsha": "dc8f3c38bfddb59edd690015b328f2f4b1823871", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
""" Copyright (c) 2019 Intel Corporation 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 writin...
{ "alphanum_fraction": 0.6524064171, "author": null, "avg_line_length": 31.79, "converted": null, "ext": "py", "file": null, "hexsha": "704e9e9cecd582ae1edf47a94f0ec092c0ba8214", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
// // lager - library for functional interactive c++ programs // Copyright (C) 2017 Juan Pedro Bolivar Puente // // This file is part of lager. // // lager is free software: you can redistribute it and/or modify // it under the terms of the MIT License, as detailed in the LICENSE // file located at the root of this sou...
{ "alphanum_fraction": 0.3507121741, "author": null, "avg_line_length": 59.0634920635, "converted": null, "ext": "hpp", "file": null, "hexsha": "77330a380776ff1d856f2fe39bd980bdaa7e1b3b", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
export TimeDelay, ps2μm!, μm2ps! ps2μm(t::Real) = round(149.896225 * t) μm2ps(d::Real) = d / 149.896225 for f in (:ps2μm, :μm2ps) @eval begin function $(Symbol(f, !))(arr::VecI) @simd for i in eachindex(arr) @inbounds arr[i] = $f(arr[i]) end return nothi...
{ "alphanum_fraction": 0.4925690021, "author": null, "avg_line_length": 26.6603773585, "converted": null, "ext": "jl", "file": null, "hexsha": "bab9d9d73e84c86414303f65bdac7f2531f6228a", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
from __future__ import print_function, division import os from PIL import Image import numpy as np from torch.utils.data import Dataset from mypath import Path from torchvision import transforms from dataloaders import custom_transforms as tr import pandas as pd class LiverSegmentation(Dataset): """ LITS datas...
{ "alphanum_fraction": 0.5657058389, "author": null, "avg_line_length": 37.5833333333, "converted": null, "ext": "py", "file": null, "hexsha": "9b46de617bc2f1042e8f5de1e2319be5b5cb4e4e", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma inv_2 : "(\<tau> \<Turnstile> Person .allInstances@pre()->includes\<^sub>S\<^sub>e\<^sub>t(self)) \<Longrightarrow> (\<tau> \<Turnstile> inv\<^sub>P\<^sub>e\<^sub>r\<^sub>s\<^sub>o\<^sub>n\<^sub>_\<^sub>l\<^sub>a\<^sub>b\<^sub>e\<^sub>l\<^sub>A\<^sub>T\<^sub>p\<^sub>r\<^sub>e(self)) = ((\<tau> \...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Featherweight_OCL_examples_Employee_Model_Analysis_Analysis_OCL", "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 649, "mathlib_filename": null, "max_forks...
import sys import argparse from time import time import pandas as pd import numpy as np from sqlalchemy import create_engine import re from scipy import stats from nltk.tokenize import word_tokenize from nltk.stem.wordnet import WordNetLemmatizer from nltk.corpus import stopwords import spacy import en_core_web_sm ...
{ "alphanum_fraction": 0.6506719504, "author": null, "avg_line_length": 34.754491018, "converted": null, "ext": "py", "file": null, "hexsha": "41daeff2358eedaeadd8ee50f4eed4d572fd2a40", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
from __future__ import division import numpy as np from skimage.color import rgb2gray from skimage import transform from skimage import segmentation from skimage import morphology from skimage import transform from scipy.interpolate import interp1d from scipy import stats from scipy import sparse from scipy.misc import...
{ "alphanum_fraction": 0.6544163164, "author": null, "avg_line_length": 40.924, "converted": null, "ext": "py", "file": null, "hexsha": "914cd6091f00d72eddb08cfd2c26ba03e597821b", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_coun...
import numpy as np import tensorflow as tf import tensorflow_probability as tfp import Nn from utils.sth import sth from utils.tf2_utils import get_TensorSpecs, gaussian_clip_rsample, gaussian_likelihood_sum, gaussian_entropy from Algorithms.tf2algos.base.on_policy import On_Policy class PG(On_Policy): def __init...
{ "alphanum_fraction": 0.5804853042, "author": null, "avg_line_length": 44, "converted": null, "ext": "py", "file": null, "hexsha": "e6e9da3e405efe066aa78c605f9c79088f82ec4c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
''' Author: Tobi and Gundram ''' from __future__ import print_function import tensorflow as tf from tensorflow.python.ops import ctc_ops as ctc from tensorflow.python.ops import rnn_cell from tensorflow.python.ops.rnn import bidirectional_rnn from util.LoaderUtil import read_image_list, get_list_vals from random impo...
{ "alphanum_fraction": 0.6295971979, "author": null, "avg_line_length": 41.1531531532, "converted": null, "ext": "py", "file": null, "hexsha": "f3590afe3559ebb4206f52c53f81fa875960f255", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# Coefficients calculated with https://github.com/simonbyrne/Remez.jl @inline function approx_sin8(x::Union{T,Vec{<:Any,T},VecUnroll{<:Any,<:Any,T}}) where {T <: Real} # poly(x) ≈ (xʳ = sqrt(x); sin((xʳ*π)/2)/xʳ) x² = x * x c0 = T(2.2214414690791831235079404853520399592349401067725149122047990692096659312188...
{ "alphanum_fraction": 0.7663337847, "author": null, "avg_line_length": 56.2666666667, "converted": null, "ext": "jl", "file": null, "hexsha": "120ca3bd5354b15f11e31dc14e568f9337ad9f86", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import re from collections import OrderedDict import pytest import numpy as np from tests.test_commons.base import mixin_suite import plums.commons.data as data import plums.commons.data.mixin from plums.commons.data.taxonomy import Label, Taxonomy @pytest.fixture(params=('ordered-dict', 'tile-collection')) def til...
{ "alphanum_fraction": 0.510905695, "author": null, "avg_line_length": 44.8070921986, "converted": null, "ext": "py", "file": null, "hexsha": "9cb30215bfae015104ef534836513138d9e228a7", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
from sklearn.model_selection import learning_curve from sklearn.model_selection import ShuffleSplit import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.metrics import accuracy_score, recall_score, precision_score from emissions.data import load_data, clean_data def scoring_table(search...
{ "alphanum_fraction": 0.5924391507, "author": null, "avg_line_length": 45.9761904762, "converted": null, "ext": "py", "file": null, "hexsha": "03dee00fc59d03738cfc359a31f7fad262e4e525", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
""" Created on Sun Apr 15 00:39:35 2018 @author: Hrid Source: https://github.com/hridkamolbiswas/Principal-Component-Analysis-PCA-on-image-dataset/blob/master/pca.py """ import numpy as np from numpy import linalg as LA import os, os.path # np.set_printoptions(threshold=np.nan) # import cv2 from matplotlib.image impor...
{ "alphanum_fraction": 0.6211870419, "author": null, "avg_line_length": 29.9929078014, "converted": null, "ext": "py", "file": null, "hexsha": "46fd7f493f4819b104420beaf3586980c519f100", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
"""Implements ETL processing for COVID-19 datasets. It performs the following actions: 1. pull updated datasets from https://github.com/datadista/datasets 1.1. SOURCE environment variable points to a local repository path 2. read .csv data files into pandas dataframes 3. export data to JSONStat format 4. push JSON f...
{ "alphanum_fraction": 0.7173302929, "author": null, "avg_line_length": 41.2368896926, "converted": null, "ext": "py", "file": null, "hexsha": "c67b6e020a9cb88d7614a276a83a85e858749641", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma oth_class_taut_3_g[PLM]: "[(\<phi> \<^bold>\<equiv> \<psi>) \<^bold>\<equiv> (\<psi> \<^bold>\<equiv> \<phi>) in v]" [PROOF STATE] proof (prove) goal (1 subgoal): 1. [\<phi> \<^bold>\<equiv> \<psi> \<^bold>\<equiv> (\<psi> \<^bold>\<equiv> \<phi>) in v] [PROOF STEP] by PLM_solver
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "PLM_TAO_9_PLM", "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 131, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_d...
[STATEMENT] lemma ad_equiv_list_comm: "ad_equiv_list X xs ys \<Longrightarrow> ad_equiv_list X ys xs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ad_equiv_list X xs ys \<Longrightarrow> ad_equiv_list X ys xs [PROOF STEP] by (auto simp: ad_equiv_list_def) (smt (verit, del_insts) ad_equiv_pair_comm in_set_zip prod....
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Eval_FO_Ailamazyan", "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 140, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/060_callback.core.ipynb (unless otherwise specified). __all__ = ['TransformScheduler', 'ShowGraph', 'ShowGraphCallback2', 'SaveModel', 'get_lds_kernel_window', 'prepare_LDS_weights', 'WeightedPerSampleLoss', 'BatchSubsampler'] # Cell from fastai.callback.all ...
{ "alphanum_fraction": 0.6537878241, "author": null, "avg_line_length": 45.4, "converted": null, "ext": "py", "file": null, "hexsha": "f020c7b39f4a7ccce9d69cfc80ed31f16daa4255", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count"...
#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().run_line_magic('ls', '') # In[2]: import numpy as np import matplotlib.pyplot as plt # In[4]: filen = 'feooh' # In[5]: data = np.loadtxt(filen+'.ASC') # In[6]: plt.plot(data[:,0], data[:,1]) # In[7]: plt.plot(data[:,0], data[:,2]) # I...
{ "alphanum_fraction": 0.5483870968, "author": null, "avg_line_length": 7.6229508197, "converted": null, "ext": "py", "file": null, "hexsha": "23bfaaaf61eca6895507c8ef362d468b69273875", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import numpy as np from sklearn import __version__ from sklearn.utils import check_array from sklearn.utils.validation import check_is_fitted from .base import BaseFeatureLibrary from .weak_pde_library import WeakPDELibrary class GeneralizedLibrary(BaseFeatureLibrary): """Put multiple libraries into one library....
{ "alphanum_fraction": 0.6037197042, "author": null, "avg_line_length": 42.1512345679, "converted": null, "ext": "py", "file": null, "hexsha": "533cb58418a2fea55821acc4b715168104a8e734", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import time import numpy as np from matplotlib import rc rc('font', **{'family': 'sans-serif', 'sans-serif': ['Helvetica']}) rc('text', usetex=True) from pydrake.all import PiecewisePolynomial from qsim_old.simulator import QuasistaticSimulator from qsim_old.problem_definition_pinch import problem_definition from plo...
{ "alphanum_fraction": 0.6697247706, "author": null, "avg_line_length": 27.5145631068, "converted": null, "ext": "py", "file": null, "hexsha": "ef9aad3b7e5c23e12d64e61f97fcec3560a5298d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import os import subprocess import shutil import numpy as np import pandas as pd from d3m.primitives.schema_discovery import profiler from d3m.primitives.data_transformation import column_parser, extract_columns_by_semantic_types, grouping_field_compose from kf_d3m_primitives.ts_forecasting.nbeats.nbeats import NBEAT...
{ "alphanum_fraction": 0.7142980264, "author": null, "avg_line_length": 41.4392857143, "converted": null, "ext": "py", "file": null, "hexsha": "02f01c5b74c41596d19a61de253e6f358ded0391", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import onnx import numpy as np from mqbench.utils.logger import logger from .utils import ONNXGraph FAKE_QUANTIZE_OP = ['FakeQuantizeLearnablePerchannelAffine', 'FixedPerChannelAffine', 'FakeQuantizeDSQPerchannel', 'LearnablePerTensorAffine', 'FixedPerTensorAffine', 'FakeQuantizeDSQPertensor'] ...
{ "alphanum_fraction": 0.5992568637, "author": null, "avg_line_length": 52.0896057348, "converted": null, "ext": "py", "file": null, "hexsha": "451f501e6fa864748ec4c9b5d31dbb6af3f0886b", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import matplotlib.pyplot as plt import numpy as np import pandas as pd import sklearn def prepare_country_stats(_bli, _gdp): """ Prepare stats to be used in regression """ return print("yo") def run_model(): """ Method to run linear model against BLI and GDP data """ # Stats grabbed from http://stats...
{ "alphanum_fraction": 0.6864988558, "author": null, "avg_line_length": 30.488372093, "converted": null, "ext": "py", "file": null, "hexsha": "4faf26c22d0067e1e98ae49e4291a68da1872f3d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import ctypes import os import numpy as np ''' Author - Daniel J. Whiting Date modified - 10/08/2017 ''' class HRMTimeAPI(): def __init__(self): # Load DLL into memory SENSL = r'C:\Program Files (x86)\sensL\HRM-TDC\HRM_TDC DRIVERS' os.environ['PATH'] = ';'.join([SENSL, os.environ['PATH']]) self.dll = ctype...
{ "alphanum_fraction": 0.7091716749, "author": null, "avg_line_length": 37.8910891089, "converted": null, "ext": "py", "file": null, "hexsha": "0bde6dc9bdcc9cca75b7be730e0f40ffea2f3e4b", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
{-# OPTIONS --without-K --safe #-} open import Relation.Binary.Core module Definitions {a ℓ} {A : Set a} -- The underlying set (_≈_ : Rel A ℓ) -- The underlying equality where open import Algebra.Core open import Data.Product open import Algebra.Definitions Alternativeˡ : Op₂ A → Set _ Alternativeˡ _∙_ ...
{ "alphanum_fraction": 0.5373831776, "author": null, "avg_line_length": 30.2117647059, "converted": null, "ext": "agda", "file": null, "hexsha": "28d229bb6f889abfe6628d37172beb8284304026", "include": null, "lang": "Agda", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import math import re from collections import namedtuple from functools import lru_cache import numpy as np from m2cgen.ast import TOTAL_NUMBER_OF_EXPRESSIONS CachedResult = namedtuple('CachedResult', ['var_name', 'expr_result']) def get_file_content(path): return path.read_text(encoding="utf-8") @lru_cache(...
{ "alphanum_fraction": 0.7585692996, "author": null, "avg_line_length": 23.9642857143, "converted": null, "ext": "py", "file": null, "hexsha": "f6664a2662985423d036cb14338da501360ae7bf", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
using Revise using DataFrames, CSV, JDF using WeakRefStrings a[!, :stringarr] = StringArray(rand(["a", "a", "b"], size(a,1))) a[!, :cate] = categorical(a[!, :stringarr]) @time a = CSV.read("c:/data/feature_matrix_cleaned.csv"); @time savejdf("c:/data/feature_matrix_cleaned.csv.jdf", a) a = nothing @time...
{ "alphanum_fraction": 0.7029360967, "author": null, "avg_line_length": 28.95, "converted": null, "ext": "jl", "file": null, "hexsha": "f72aef969da8366f4bc9cbe7fca0f04803bbce64", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count"...
""" Training/testing/inference script for COVID-Net CT models for COVID-19 detection in CT images. """ import math import os import sys import time import cv2 import json import shutil import numpy as np from math import ceil import tensorflow as tf import matplotlib.pyplot as plt from sklearn.metrics import confusion...
{ "alphanum_fraction": 0.5053922545, "author": null, "avg_line_length": 44.825255102, "converted": null, "ext": "py", "file": null, "hexsha": "8436c63da97756ea6240395eb6227111708b4f8c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import os.path from optparse import OptionParser import results import pylab import loader import time import torch import numpy as np from descriptors import raw_gray_descriptor, hardnet_descriptor, hog_descriptor # parameters according to the paper -- class ...
{ "alphanum_fraction": 0.6112907968, "author": null, "avg_line_length": 34.586440678, "converted": null, "ext": "py", "file": null, "hexsha": "00b70dc05c33afccffe11dc7089aa01f72b6b5b1", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
################################################ ## STEP 4. Number of genes vs UMIs filter ################################################# # This filter focuses on filter cells that are far from the behaviour of the relationship between the number of genes (it measures the number of # genes in a cell that has at le...
{ "alphanum_fraction": 0.607617896, "author": null, "avg_line_length": 43.147826087, "converted": null, "ext": "r", "file": null, "hexsha": "5118f7b6c3a97ac7c37e5745cec5bc5e0dc8bfeb", "include": null, "lang": "R", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
Load LFindLoad. From lfind Require Import LFind. From adtind Require Import goal11. Require Import Extraction. Extract Inductive nat => nat [ "(O)" "S" ]. Extract Inductive list => list [ "Nil" "Cons" ]. Definition lfind_example_1 := ( Cons (Succ (Succ Zero)) (Cons Zero Nil)). Definition lfi...
{ "alphanum_fraction": null, "author": "yalhessi", "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_da...
import gym import numpy as np import cv2 import copy class Env: def __init__(self, vision=False): self.vision = vision self.W = 400 self.ACT_SCALE = 0.01 self.TL = 100 self.action_space = gym.spaces.Box(low=-1,high=1, shape=[3]) if not self.vision: self.observation_space = gym.spaces.B...
{ "alphanum_fraction": 0.6182385576, "author": null, "avg_line_length": 27.4666666667, "converted": null, "ext": "py", "file": null, "hexsha": "4f4f031ed661bfde6655d483d4a978788731da00", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np from pprint import pprint def __build_type1_(self, labelmap_file, label_col, color_col, file_col_sep): # List of class names in CS dataset (ordered) global CS_label_names # Dict of CS labels such { 1: road, 2: ....
{ "alphanum_fraction": 0.6185544293, "author": null, "avg_line_length": 34.9076923077, "converted": null, "ext": "py", "file": null, "hexsha": "f19a6c76cf278bbb5daddecd2867ee2ce77ffe40", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import cv2 import os import numpy as np initialize = True net = None def get_output_layers(net): layer_names = net.getLayerNames() output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()] return output_layers def detect_common_objects(image, confidence=0.05, nms_thresh=0.05, model='yolov...
{ "alphanum_fraction": 0.6907317073, "author": null, "avg_line_length": 23.8372093023, "converted": null, "ext": "py", "file": null, "hexsha": "817f0fd6ee01b22878a6d91f1e651744460ad0da", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma jvm_one_step1[trans]: "\<lbrakk> P \<turnstile> \<sigma> -jvm\<rightarrow>\<^sub>1 \<sigma>'; P \<turnstile> \<sigma>' -jvm\<rightarrow> \<sigma>'' \<rbrakk> \<Longrightarrow> P \<turnstile> \<sigma> -jvm\<rightarrow> \<sigma>''" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>P \<turnstil...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Jinja_JVM_JVMExec", "hexsha": null, "include": null, "lang": null, "length": 2, "llama_tokens": 315, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_m...
using RandomFunctions using Test @testset "collatz.jl" begin @test collatz_steps(10) == [5, 16, 8, 4, 2, 1] @test collatz_steps_02(10) == [5, 16, 8, 4, 2, 1] @test max_stop_time(10) == (19,9) @test max_stop_time_02(10^7) == (8400511, 685) @test max_stop_time_03(10^7) == (8400511, 685) end @testset...
{ "alphanum_fraction": 0.6054545455, "author": null, "avg_line_length": 27.5, "converted": null, "ext": "jl", "file": null, "hexsha": "a4ac142092d34730c43cfcbff7a0b1e539f381e6", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count":...
using BenchmarkTools using Distributed addprocs() @everywhere using TrajectoryOptimization @everywhere using SharedArrays # Set up problem model, obj0 = Dynamics.cartpole_analytical n,m = model.n, model.m obj = copy(obj0) obj.x0 = [0;0;0;0.] obj.xf = [0.5;pi;0;0] obj.tf = 2. u_bnd = 50 x_bnd = [0.6,Inf,Inf,Inf] obj_c...
{ "alphanum_fraction": 0.6434162063, "author": null, "avg_line_length": 25.5529411765, "converted": null, "ext": "jl", "file": null, "hexsha": "ff2b55a263c660b622e9af9ec9b7de255dc9ecc5", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import numpy as np import os from tools import * def run_stochastic(dataset, name, R, c_0=3.0, L_0=1.0, x_axe_threshold=1000, max_time=100, timestamps=[20, 20, 20, 20], show_legend=True, inner_eps=1e-7, resid_eps=1e-6, M=1): print('STOCHASTIC METHODS: \t %s, \t file: ...
{ "alphanum_fraction": 0.5556453242, "author": null, "avg_line_length": 38.9842519685, "converted": null, "ext": "py", "file": null, "hexsha": "e1e464c54ecdc7e2560e8094816912a2498eebc5", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#!/usr/bin/env python import os import numpy as np from PIL import Image from matplotlib import pyplot as plt from pyclowder.utils import CheckMessage from pyclowder.files import upload_to_dataset from pyclowder.datasets import download_metadata, upload_metadata, submit_extraction from terrautils.extractors import Te...
{ "alphanum_fraction": 0.6300278773, "author": null, "avg_line_length": 46.7162790698, "converted": null, "ext": "py", "file": null, "hexsha": "6c367a4f7adf4cc300caa41a1e43efc2012f6e1a", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
Inductive day : Type := | monday : day | tuesday : day | wednesday : day | thursday : day | friday : day | saturday : day | sunday : day. Definition next_weekday (d:day) : day := match d with | monday => tuesday | tuesday => wednesday | wednesday => thursday | thursday => friday | friday => monday | saturday => mon...
{ "alphanum_fraction": null, "author": "soumyadsanyal", "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_m...
#!/usr/bin/env python3 """A test file for matrixpng The canonical source for this package is https://github.com/finitemobius/matrixpng-py""" import matrixpng import numpy as np __author__ = "Finite Mobius, LLC" __credits__ = ["Jason R. Miller"] __license__ = "MIT" __version__ = "alpha" __maintainer__ = "Finite Mobiu...
{ "alphanum_fraction": 0.6139112903, "author": null, "avg_line_length": 24.8, "converted": null, "ext": "py", "file": null, "hexsha": "37db56dc47d3fdc8d8dd0e31a93a057cdb187de2", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count"...
/*============================================================================= Copyright (c) 2009 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================...
{ "alphanum_fraction": 0.6734386757, "author": null, "avg_line_length": 30.2045454545, "converted": null, "ext": "hpp", "file": null, "hexsha": "4ffa7e3c77c6cec1a3a270f10207501f6584db06", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
import pandas import numpy import random DIMS96 = {'rows':8,'columns':12} def create_constant_column_plate(dims: dict,sources: int): """ Generate a dataframe representing a 96-well plate that has one media ingredient per column. """ # initialize an array with one row for each well and one column for each # med...
{ "alphanum_fraction": 0.7013137558, "author": null, "avg_line_length": 32.35, "converted": null, "ext": "py", "file": null, "hexsha": "a43f20d941190f1072fec4b326e7ca0e5fb3a4f8", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
// STD headers #include <assert.h> #include <limits> #include <list> #include <string> #include <unordered_map> #include <vector> // Boost headers #include <boost/program_options.hpp> // Custom headers #include "cache_base.hpp" #include "cache_belady.hpp" #include "cache_common.hpp" #include "utils.hpp" using namesp...
{ "alphanum_fraction": 0.6406628941, "author": null, "avg_line_length": 38.9606299213, "converted": null, "ext": "cpp", "file": null, "hexsha": "fa417421158f169f7ff45a23c018c0b756cb069e", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
[STATEMENT] lemma errMOD_igSwapIGVarSTR: fixes MOD :: "('index,'bindex,'varSort,'sort,'opSym,'var,'gTerm,'gAbs)model" assumes "igVarIPresIGWls MOD" and "igSwapIGVar MOD" shows "igSwapIGVar (errMOD MOD)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. igSwapIGVar (errMOD MOD) [PROOF STEP] using assms [PROOF STATE] pro...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Binding_Syntax_Theory_Iteration", "hexsha": null, "include": null, "lang": null, "length": 2, "llama_tokens": 237, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo...
from __future__ import print_function, division # import sys,os quspin_path = os.path.join(os.getcwd(),"../../") sys.path.insert(0,quspin_path) # from quspin.operators import hamiltonian # Hamiltonians and operators from quspin.basis import spin_basis_1d # Hilbert space spin basis from quspin.tools.measurements import ...
{ "alphanum_fraction": 0.7537006579, "author": null, "avg_line_length": 33.3150684932, "converted": null, "ext": "py", "file": null, "hexsha": "ea6b2426d0c23bffbb0218019e62905cbea6d6ad", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# encoding=utf-8 import random import numpy as np import torch import torch.utils.data as data from itertools import chain import codecs import json import collections import jieba class MyDataset(data.Dataset): def __init__(self, corp, config, mode='TRAIN'): self.data_convs = [] self.data_labels ...
{ "alphanum_fraction": 0.5234895338, "author": null, "avg_line_length": 44.8426666667, "converted": null, "ext": "py", "file": null, "hexsha": "ef698612efd83527a771b1ea86437067455615b3", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
abstract type AbstractMachine end function filtrations end function (m::AbstractMachine)(y₀) forward, backward = filtrations(m, y₀) return solve(y₀, m.W, m.σ, (forward, backward)) end sum_dims(dims::Tuple) = prod(dims[1:end-2]) * sum(dims[end-1:end]) # glorot initialization, from https://github.com/FluxML/F...
{ "alphanum_fraction": 0.670526709, "author": null, "avg_line_length": 35.6933333333, "converted": null, "ext": "jl", "file": null, "hexsha": "aefbc330243006b5ed57e80994a960db6b155bae", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
# Copyright (c) 2018-present, Royal Bank of Canada and other authors. # See the AUTHORS.txt file for a list of contributors. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # from __future__ import absolute_import from __f...
{ "alphanum_fraction": 0.6384377936, "author": null, "avg_line_length": 33.7149321267, "converted": null, "ext": "py", "file": null, "hexsha": "fed15b1ba2bd8dfbd2ab7393f3b5538ab3718921", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import matplotlib.pyplot as plt X = np.linspace(-np.pi, np.pi, 256) C = np.cos(X) S = np.sin(X) plt.plot(X, C) plt.plot(X, S) plt.show()
{ "alphanum_fraction": 0.6130952381, "author": null, "avg_line_length": 15.2727272727, "converted": null, "ext": "py", "file": null, "hexsha": "8ebd64810d7de4e663dc2d41cf7fbf5059664034", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
__author__ = 'jlu96' import causal_pipeline as cp import sys import pickle import pandas as pd import geneTSmunging as gtm import os import numpy as np def get_parser(): # Parse arguments import argparse description = 'Given the baseline, per gene hyperparameter fit results, choose the best hyperparamet...
{ "alphanum_fraction": 0.6561688874, "author": null, "avg_line_length": 39.8551724138, "converted": null, "ext": "py", "file": null, "hexsha": "637dd5556beec1d73f1ecced0eabd25d6b60cfa9", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
""" MatHeatDiffModule Module for linear heat diffusion material models. """ module MatHeatDiffModule using FinEtools.FTypesModule: FInt, FFlt, FCplxFlt, FFltVec, FIntVec, FFltMat, FIntMat, FMat, FVec, FDataDict import FinEtools.MatModule: AbstractMat using FinEtools.MatrixUtilityModule: mulCAB! """ MatHeatDi...
{ "alphanum_fraction": 0.7366447985, "author": null, "avg_line_length": 34.4193548387, "converted": null, "ext": "jl", "file": null, "hexsha": "dc546d5d91545eb6f76e6aa6d7a09841f0adabd1", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import numpy as np from scipy.interpolate import InterpolatedUnivariateSpline from sklearn.mixture import GaussianMixture as GMM from .utils import fix_dim_gmm, custom_KDE class Likelihood(object): """A class for computation of the likelihood ratio. Parameters ---------- model : instance of GPRegress...
{ "alphanum_fraction": 0.5623830318, "author": null, "avg_line_length": 30.3886255924, "converted": null, "ext": "py", "file": null, "hexsha": "892b28db625a6593992cd57c79a0083ffb9f4ec6", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#!/usr/bin/env python3 # # Copyright 2019 Peifeng Yu <peifeng@umich.edu> # # This file is part of Salus # (see https://github.com/SymbioticLab/Salus). # # 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 L...
{ "alphanum_fraction": 0.6503159795, "author": null, "avg_line_length": 27.9243697479, "converted": null, "ext": "py", "file": null, "hexsha": "0951b5f0cea3f5219484532859bf0c6952aad265", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# imports import semseg_vaihingen.config as cfg from . import model_generator from . import data_io as dio import numpy as np from sklearn import metrics import keras import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap import os, re import argparse # l...
{ "alphanum_fraction": 0.6052631579, "author": null, "avg_line_length": 37.8808777429, "converted": null, "ext": "py", "file": null, "hexsha": "ed0f8fa182abcb2fd4eb926ea81a7ba0a583f81f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
%% DOS_DIR_TEST tests the DOS facility for issuing operating system commands. % % Discussion: % % DIR is a legal command on MS/DOS systems, and returns a list of the % files in the current directory. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 19 July 2006 % ...
{ "alphanum_fraction": null, "author": "johannesgerer", "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_m...
#! /usr/bin/env python """Tests for the ``preview_image`` module. Authors ------- - Johannes Sahlmann Use --- These tests can be run via the command line (omit the ``-s`` to suppress verbose output to ``stdout``): :: pytest -s test_preview_image.py """ import glob import os import pytes...
{ "alphanum_fraction": 0.6243174372, "author": null, "avg_line_length": 25.6728971963, "converted": null, "ext": "py", "file": null, "hexsha": "789d887ee9e41e5e5f63fee8c63c28bf5abbc773", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...