text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
#/////////////////////////////////////// #// File Name: bic.jl #// Author: Haruki Nishimura (hnishimura@stanford.edu) #// Date Created: 2021/02/25 #// Description: Buffered Input Cells and Related Functions for Benchmarking #/////////////////////////////////////// import Convex: Variable, norm, minimize, dot, solve! u...
{"hexsha": "9121d077b2c08b1e5fe6542f9bf2180d0159620f", "size": 12819, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/bic.jl", "max_stars_repo_name": "StanfordMSL/RiskSensitiveSAC.jl", "max_stars_repo_head_hexsha": "64664b05ea160d5532643d24586176f8112b0c58", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np # choose 1: B a = np.arange(60.).reshape(3, 4, 5) print(np.arange(60.).reshape(3, 4, 5)) b = np.sum(a, axis=0, keepdims=True) print(b) print(b.shape) c = np.sum(a, axis=0) print(c) print(c.shape) # choose 2: A # choose 3: A # choose 4: A # choose 5: C
{"hexsha": "16f73a0ef01f2a3d56601915dbd064462d7e0bea", "size": 276, "ext": "py", "lang": "Python", "max_stars_repo_path": "hw1/choose.py", "max_stars_repo_name": "BobAnkh/MaC", "max_stars_repo_head_hexsha": "f43c75576ea5af35e4c67f593627cbe1d479648e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_stars_...
import pytest import numpy as np from alphacsc.update_d_multi import prox_uv, prox_d from alphacsc.utils import check_random_state, construct_X_multi from alphacsc.utils.compute_constants import compute_ztz, compute_ztX from alphacsc.loss_and_gradient import compute_objective N_TRIALS, N_CHANNELS, N_TIMES = 2, 3, 10...
{"hexsha": "c02ac972593195eb822720db6e6cf85a0606c2db", "size": 2842, "ext": "py", "lang": "Python", "max_stars_repo_path": "alphacsc/tests/conftest.py", "max_stars_repo_name": "bmalezieux/alphacsc", "max_stars_repo_head_hexsha": "8cb578217a30f722ddc116c5037ff8f182e4ca64", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
\section{Work Experience} \renewcommand{\arraystretch}{0.85}% Tighter \begin{tabular}{r|p{13cm}} \textsc{Jan '17 - Current} & Software Engineer, \textbf{Adobe Systems}, San Jose\\ & \small{Working on building Adobe offer manager which is a tool which powers sales to target enterprises with products from Adobe - drivin...
{"hexsha": "9252817da131c01443569653cdce5af03f948254", "size": 2934, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Work.tex", "max_stars_repo_name": "alseambusher/Resume", "max_stars_repo_head_hexsha": "c69f22afe350ef0fd72d33a90c9e3b72a07a10a4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_star...
[STATEMENT] lemma pathfinish_linepath[simp]: "pathfinish (linepath a b) = b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. pathfinish (linepath a b) = b [PROOF STEP] unfolding pathfinish_def linepath_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. (1 - 1) *\<^sub>R a + 1 *\<^sub>R b = b [PROOF STEP] by auto
{"llama_tokens": 142, "file": null, "length": 2}
# -*- coding: utf-8 -*- import os from math import ceil from typing import Any, Dict, List, Union import h5py import nibabel as nib import numpy as np import torch import tqdm from dipy.io.stateful_tractogram import Space from dipy.io.streamline import load_tractogram from dipy.tracking.streamline import length as sle...
{"hexsha": "e295862b995482d0094bd707b54e0dcbed9540c7", "size": 15703, "ext": "py", "lang": "Python", "max_stars_repo_path": "dwi_ml/tracking/tracker_abstract.py", "max_stars_repo_name": "jhlegarreta/dwi_ml", "max_stars_repo_head_hexsha": "f07327a5ac772f5d9569c1d24ef3c42511e8c874", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri May 15 17:33:57 2020 @author: chris """ import numpy as np from . import ta def mmul_ta_signature(arg, mxdim): """Given a TablArray or np.ndarray, return a TablArray""" if hasattr(arg, 'ts') and hasattr(arg, 'base'): # arg is TablArr...
{"hexsha": "c7898303cd926d1feb174dfad8a1b3ade81db92a", "size": 868, "ext": "py", "lang": "Python", "max_stars_repo_path": "tablarray/mmul_sig.py", "max_stars_repo_name": "chriscannon9001/tablarray", "max_stars_repo_head_hexsha": "f07530f84a8c86abe996cdb999233ed9bb8edf7e", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
import numpy as np def initial_place_on_circumference(distances): num_vertices = distances.shape[0] longest_distance = np.max(distances) should_split_in_two = num_vertices > 10 if should_split_in_two: positions = _place_on_circumference( [longest_distance / 2, longest_distance * ...
{"hexsha": "78162558052c6e121c168f1c7b6165b537ea5023", "size": 1612, "ext": "py", "lang": "Python", "max_stars_repo_path": "mapel/main/embedding/initial_positions.py", "max_stars_repo_name": "kaszperro/mapel", "max_stars_repo_head_hexsha": "d4e6486ee97f5d5a5a737c581ba3f9f874ebcef3", "max_stars_repo_licenses": ["MIT"], ...
""" ``` binarize!(UnimodalRosin(), img) ``` Binarizes the unimodal image passed into the `img` parameter into background (`Gray(0)`) pixels, and foreground (`Gray(1)`) pixels using Rosin's algorithm. # Arguments ## `img` An `AbstractGray` image which is to be binarized into background (`Gray(0)`) and foreground (`Gr...
{"hexsha": "76041affeca5e700aaec15614feb9e533e900059", "size": 2025, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/unimodal.jl", "max_stars_repo_name": "bellascalzi1/ImageBinarization.jl", "max_stars_repo_head_hexsha": "43011cd85eff0fefcaadb14f517eb75160c7d5e5", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/env python3 # # This example first sets up a simple runaway scenario, which is # then passed to a DREAM.ConvergenceScan object. The convergence # scan is configured to apply to the most relevant resolution # parameters for this scenario. We will use the runaway rate as # a measure of convergence, and we will...
{"hexsha": "eaf16bbaef511ddb2cd99db78fb3f4b627d809bb", "size": 5667, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/fluxlimiter/plotscan.py", "max_stars_repo_name": "chalmersplasmatheory/DREAM", "max_stars_repo_head_hexsha": "715637ada94f5e35db16f23c2fd49bb7401f4a27", "max_stars_repo_licenses": ["MIT"]...
// Copyright 2014 Renato Tegon Forti // // 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) #ifndef BOOST_APPLICATION_HPP #define BOOST_APPLICATION_HPP /// \file boost/application.hpp /// \brief Includes all the he...
{"hexsha": "054c3e096a6f7f2acdaba803683ebf59fce92cb4", "size": 1017, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "threadpool_boost_dir/application.hpp", "max_stars_repo_name": "eduherminio/boost_1_62_0", "max_stars_repo_head_hexsha": "0d8a8e4286a87a9b5d63907118fa83d866c9fab9", "max_stars_repo_licenses": ["BSL-1...
MODULE surf_db USE param_db,ONLY: mnam IMPLICIT NONE SAVE ! Derived type for the list containing surface definition TYPE srf_seg !surface segment INTEGER(kind=4):: nodes(4) !connectivities LOGICAL :: frees !.TRUE. if a free side TYPE(srf_se...
{"hexsha": "6e220642f716444e42b328f0ceb754493e0cef7f", "size": 10542, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/mainp/surf_db.f90", "max_stars_repo_name": "jerebenitez/IFE-simpact-openfoam", "max_stars_repo_head_hexsha": "2dbcbf3195b22fca1c80ad0da6b3822b6cad5cdf", "max_stars_repo_licenses": ["MIT"], ...
#!/usr/bin/python import numpy as np import unittest from kursl import KurslMethod QUICK_TEST = False class TestKurslMethod(unittest.TestCase): def test_default_init(self): kursl = KurslMethod() self.assertEqual(kursl.nH, 1) self.assertEqual(kursl.max_osc, -1) self.assertEqual(k...
{"hexsha": "431f31bb89e668b10a130506e37dc97e0191b60d", "size": 12369, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_kursl_method.py", "max_stars_repo_name": "laszukdawid/KurSL", "max_stars_repo_head_hexsha": "2d7427a71d01f1599c2626da2359f9e495fa4d7e", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
/**---------------------------------------------------------------------------- Copyright (c) 2015-, UT-Battelle LLC All rights reserved. Authors: Jay Jay Billings, Phil Evans, Alex McCaskey Author Contact: Phil Evans, evanspg@ornl.gov Redistribution and use in source and binary forms, with or without modification, a...
{"hexsha": "14daaab61599edffe9f8732a505ac16477aed621", "size": 5051, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "keyTransferClient/libcurlUtil/tests/KeyServiceTest.cpp", "max_stars_repo_name": "jdbonior21/TASQC", "max_stars_repo_head_hexsha": "bad514d556cc74136a15ea37dbfa8fc93e2aef55", "max_stars_repo_licenses...
''' The io module provides standard helper functions to load images from disk ''' import logging import os import numpy as np from cv2 import imread, imdecode, IMREAD_COLOR import requests from skimage import transform from arcus.ml.images import conversion from arcus.ml import dataframes as adf from io import BytesIO...
{"hexsha": "36ce9daf1884983e9dd5d6cc220d749de9dcbfac", "size": 8166, "ext": "py", "lang": "Python", "max_stars_repo_path": "arcus/ml/images/io.py", "max_stars_repo_name": "judepereira/arcus.ml", "max_stars_repo_head_hexsha": "3fdbe6a581018daeac1afb26f0eb21a1294bb28e", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# set up ODE, get the derivatives function Balances(t,y,dataDictionary) # correct for negatives idx_small = findall(y.<0) y[idx_small] .= 0.0 # load data from data dictionary rnx_species = dataDictionary["rnx_species_array"] mRNA_species = dataDictionary["mRNA_species_array"] protein_species = dataDicti...
{"hexsha": "a11eabe7bf7fe1c33f0c4e79cf79994c8f1a87da", "size": 2168, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "example/kiauto/Balances.jl", "max_stars_repo_name": "ZZP12/SEML.jl", "max_stars_repo_head_hexsha": "f8f280c496478f8fc64071061758aac3dbf80e7a", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
""" Train an agent to solve the One-Mass-Oscillator environment using Parameter-Exploring Policy Gradients. """ import numpy as np from pyrado.algorithms.pepg import PEPG from pyrado.environment_wrappers.action_normalization import ActNormWrapper from pyrado.environments.pysim.one_mass_oscillator import OneMassOscilla...
{"hexsha": "795e3ee4e97d22d8b97c3c7c37f6844128f47560", "size": 1686, "ext": "py", "lang": "Python", "max_stars_repo_path": "Pyrado/scripts/training/omo_pepg.py", "max_stars_repo_name": "jacarvalho/SimuRLacra", "max_stars_repo_head_hexsha": "a6c982862e2ab39a9f65d1c09aa59d9a8b7ac6c5", "max_stars_repo_licenses": ["BSD-3-C...
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
{"hexsha": "82ebece1bddb8318971209439bcc922d1e87d13c", "size": 51303, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/st/auto_monad/test_auto_monad.py", "max_stars_repo_name": "ZLkanyo009/mindspore", "max_stars_repo_head_hexsha": "0a6ed86bb443ed233504fa7eee931a24637d50bb", "max_stars_repo_licenses": ["Apac...
""" Library Simulation model Copyright (c) 2020 Yashovardhan Dhanania. 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, m...
{"hexsha": "c6a944bbc4f3eec1b2c20b990174e7c59049e2b1", "size": 19841, "ext": "py", "lang": "Python", "max_stars_repo_path": "library.py", "max_stars_repo_name": "yashovardhan99/Process-Simulations", "max_stars_repo_head_hexsha": "1b2feed58966c4a5f33aae6c83b296bb4320bc27", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from azureml.core import Workspace print("\nimported Workspace\n") from azureml.core.compute import ComputeTarget, AmlCompute print("\nimported ComputeTarget, AmlCompute\n") from azureml.core.compute_target import ComputeTargetException print("\nimported ComputeTargetException\n") from azureml.core.runconfig ...
{"hexsha": "cf6524934247ef9e3e709644aac6a8134bb16003", "size": 1673, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/import_test.py", "max_stars_repo_name": "dg1223/model_interpretability", "max_stars_repo_head_hexsha": "bb8cb85a043f0f4af35ad463dcb6eeb27d292792", "max_stars_repo_licenses": ["Apache-2.0"]...
import os import warnings warnings.filterwarnings("ignore") import argparse import numpy as np from imageio import imread, imsave import shutil try: from googletrans import Translator googletrans_ok = True except ImportError as e: googletrans_ok = False import torch import torchvision import torch.nn.func...
{"hexsha": "07bbf5f862bba8dabf0837326c17e99c114b4a53", "size": 13052, "ext": "py", "lang": "Python", "max_stars_repo_path": "clip_fft.py", "max_stars_repo_name": "vsewall/aphantasia", "max_stars_repo_head_hexsha": "f1e6297dd3412c4798531766b966c104775db62e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max...
import pandas as pd import numpy as np from collections import defaultdict, Counter import json from Bio import SeqIO from .prediction_class import * import os import shutil class AggregateAllEpitopes: def __init__(self, input_file, output_file): self.input_file = input_file self.output_file = outp...
{"hexsha": "bfe0e46965fb346cfdc2c3bc617c986622237754", "size": 23522, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/aggregate_all_epitopes.py", "max_stars_repo_name": "atwollam/pVACtools", "max_stars_repo_head_hexsha": "f516d5cf03b6041313705b2d8b65172e17f15dd4", "max_stars_repo_licenses": ["BSD-3-Clause-Cl...
""" FLIP metric functions """ ################################################################################# # Copyright (c) 2020-2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the followin...
{"hexsha": "83f94f338adffcfd52c7efdc79692eb9e7248c7e", "size": 30833, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/flip_api.py", "max_stars_repo_name": "inversepixel/flip", "max_stars_repo_head_hexsha": "60b81da20d19641197892cc7195cb70647eb7205", "max_stars_repo_licenses": ["MIT", "BSD-3-Clause"], "max...
#include "pwnode.h" #include "pwconnector.h" #include "pwendpoint.h" #include "pwareascene.h" #include "qutil/qutil.h" #include <QFrame> #include <QVBoxLayout> #include <QEvent> #include <QTimer> #include <QDebug> #include <boost/cast.hpp> class PwNodePrivate { Q_DECLARE_PUBLIC(PwNode); PwNodePrivate(PwNode *p) :...
{"hexsha": "63d35cb318998ec3e6a60f5e2ef5e53ef274b63a", "size": 4720, "ext": "cc", "lang": "C++", "max_stars_repo_path": "sources/patchwork/pwnode.cc", "max_stars_repo_name": "jpcima/patchwork", "max_stars_repo_head_hexsha": "3a7bde127102ebcc2b8bfed5861caddd0243cef0", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
(** * lset: finite sets represented as lists *) (** This module is used quite intensively, as finite sets are pervasives (free variables, summations, partial derivatives...): We implement finite sets as simple lists, without any additional structure: this allows for very simple operations and specificatio...
{"author": "damien-pous", "repo": "relation-algebra", "sha": "13b99896782e449c7ca3910e48e18427517c8135", "save_path": "github-repos/coq/damien-pous-relation-algebra", "path": "github-repos/coq/damien-pous-relation-algebra/relation-algebra-13b99896782e449c7ca3910e48e18427517c8135/theories/lset.v"}
import pandas as pd import numpy as np import requests from flask import Flask, request, jsonify from sklearn.feature_extraction.text import CountVectorizer from sklearn.metrics.pairwise import cosine_similarity movies = pd.read_csv('Final_MovieData.csv') # api= http://www.omdbapi.com/?apikey=fc796b50&i=tt0371746 # f...
{"hexsha": "d1433cc11a86be0feb362c453d68fd6dacbd42f0", "size": 4479, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "Karan757/Movie-Recommendation-System", "max_stars_repo_head_hexsha": "0807f98ebc8e8aec71e1b1029d107f34f22ac128", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
/* Copyright (c) 2006-2015, Arvid Norberg All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and ...
{"hexsha": "e906b2334956627e2c226a015be520e80431bda4", "size": 38976, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/kademlia/node.cpp", "max_stars_repo_name": "john-peterson/libtorrent", "max_stars_repo_head_hexsha": "94d6e06c9712b8e40666190c6b3cf07c0fcc88d8", "max_stars_repo_licenses": ["BSL-1.0", "BSD-3-Cl...
# Copyright (c) SenseTime. All Rights Reserved. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import cv2 import numpy as np import torch from pysot.core.config import cfg class BaseTracker(object): """ Base t...
{"hexsha": "be148e0c6167b73ee40142f6fd7488f58c52553d", "size": 3307, "ext": "py", "lang": "Python", "max_stars_repo_path": "pysot/tracker/base_tracker.py", "max_stars_repo_name": "justimyhxu/pysot", "max_stars_repo_head_hexsha": "c5010066cc5c89b26ebcbcd9fee9f7b5dfc1614c", "max_stars_repo_licenses": ["Apache-2.0"], "max...
import cv2 import os import numpy as np ''' 1. 水平垂直翻转 2. 高斯噪声 3. 45°旋转 4. 昏暗 ''' # 添加高斯噪声 def gaussian_noise(img, mean=0, sigma=0.1): ''' 此函数用将产生的高斯噪声加到图片上 均值为0,是保证图像的亮度不会有变化,而方差大小则决定了高斯噪声的强度。 方差/标准差越大,噪声越强。 传入参数: img : 原图 mean : 均值...
{"hexsha": "b45fc66488d0ba08ec76e333a5de42cf86d89957", "size": 3137, "ext": "py", "lang": "Python", "max_stars_repo_path": "image enhancement.py", "max_stars_repo_name": "zongyinliu/image-enhancement", "max_stars_repo_head_hexsha": "6e110940c2b963bd85872c314475605f29207701", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt from mrfmap_ros.GVDBPyModules import gvdb_params import yaml import pdb plt.style.use('seaborn-muted') plt.rcParams.update({'font.size': 12}) dtype = np.float32 config_dir = '../../config/' main_dir = '/home/icoderaven/bagfiles/' didx = 1 resolu...
{"hexsha": "859f7e66b5b4657002578d0f67eb9f72714fbe8d", "size": 3023, "ext": "py", "lang": "Python", "max_stars_repo_path": "nodes/dataset_evaluation/rss_plot_timings.py", "max_stars_repo_name": "mrfmap/mrfmap_ros", "max_stars_repo_head_hexsha": "8c1e108860ff297f39591d97f8f8ce2937b29a51", "max_stars_repo_licenses": ["BS...
#!/usr/bin/env python """ This file runs all of the statistical analyses used for this research project """ import pandas as pd import scipy.stats as stats import matplotlib.pyplot as plt import matplotlib.lines as mlines df = pd.read_csv("survey-results-filtered-coded.csv", delimiter=",") def respondent_background(...
{"hexsha": "18631923235f20419d3568a453723e62f5a0d85b", "size": 9271, "ext": "py", "lang": "Python", "max_stars_repo_path": "survey-results/stats.py", "max_stars_repo_name": "turnrye/learning-rapidly-changing-frameworks", "max_stars_repo_head_hexsha": "cfe3d7f593da68e1f679385d47b934e9db8218d0", "max_stars_repo_licenses"...
""" Proposed methods for "Optimal Control of Boolean Control Networks with Discounted Cost: An Efficient Approach based on Deterministic Markov Decision Process" (1) Value iteration (2) Madani's algorithm """ from typing import Iterable, Tuple, List, Union, Dict, Callable import networkx as nx from operator import item...
{"hexsha": "e1b7e581a624656d622cf5d2b13aaa51ae4c8332", "size": 8448, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/algorithm/proposed.py", "max_stars_repo_name": "ShuhuaGao/bcn_opt_dc", "max_stars_repo_head_hexsha": "93234f6b799670bc80daf83794c51841f1a24715", "max_stars_repo_licenses": ["MIT"], "max_stars...
input = open("../inputs/day01.txt") do f read(f, String) end function parseInput(inp::String)::Array{Int64,1} [parse(Int64, ln) for ln in split(inp, "\n")] end function main() set = parseInput(input) for a in set for b in set c = 2020 - a - b if c in set ...
{"hexsha": "2b9d4ceb57e32084e19a29d951d2ac71a291b29b", "size": 477, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "julia/day01.jl", "max_stars_repo_name": "kolmodin/advent-of-code-2020", "max_stars_repo_head_hexsha": "fc4328cbe2a0e0692eb0de78ac52364f48d5037f", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
""" More plotting examples ---------------------- Here some examples to showcase several plotting scenarios. """ ############################################################################## # Import import numpy as np import matplotlib.pyplot as plt from probeinterface import Probe, ProbeGroup from probeinterfac...
{"hexsha": "c54a78f91e22cb857c5a472511e41495dbfb20a9", "size": 2748, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ex_08_more_plotting_examples.py", "max_stars_repo_name": "samuelgarcia/probeinterface", "max_stars_repo_head_hexsha": "526c19131ba0dbbf267658bd9135edb08408e062", "max_stars_repo_licenses"...
import numpy as np import keras import tensorflow as tf import time from keras.models import Sequential,Model from keras.layers import Input,Dense,LSTM,Embedding,Conv1D,MaxPooling1D from keras.layers import Flatten,Dropout,Concatenate,Lambda,Multiply,Reshape,Dot,Bidirectional import keras.backend as K from keras.utils ...
{"hexsha": "f28cac423efb221b76e764501aed69bd844b78a3", "size": 21282, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/bert.py", "max_stars_repo_name": "aiainui/label_confusion_learning", "max_stars_repo_head_hexsha": "d11c6b9bebc65d9eb436f038da6c0aeac2486c95", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import os,sys,inspect import tensorflow as tf import time from datetime import datetime import re import hickle as hkl import os.path as osp from glob import glob import sklearn.metrics as metrics from input import Dataset import globals as g_ os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" currentd...
{"hexsha": "29a9fa30271643a6dc909be1f36031a3643d0556", "size": 8897, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "cepiross/MVCNN-TensorFlow", "max_stars_repo_head_hexsha": "83864e696f70267e091c24601cd562b987d34665", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
""" Functions for comparing and visualizing model performance """ import os import sys import pdb import pandas as pd import numpy as np import matplotlib import logging import json from collections import OrderedDict from atomsci.ddm.utils import datastore_functions as dsf from atomsci.ddm.pipeline import mlmt_clien...
{"hexsha": "8524313e39f73d2d4daf6df79da095c645f890b7", "size": 55766, "ext": "py", "lang": "Python", "max_stars_repo_path": "atomsci/ddm/pipeline/compare_models.py", "max_stars_repo_name": "truatpasteurdotfr/AMPL", "max_stars_repo_head_hexsha": "0295d56166632647b194e7221eab315bac74dfe0", "max_stars_repo_licenses": ["MI...
#!/bin/env/python # -*- encoding: utf-8 -*- """ """ from __future__ import print_function, division import numpy as np import datetime import time import ray import time import zmq from ray_streaming.queues.inmemory_queue import InMemoryQueue @ray.remote class ZMQServer(object): def __init__(self, server, qu...
{"hexsha": "1e40a37f8c99adeb7db7183eff45b6f73f9cb0d5", "size": 1505, "ext": "py", "lang": "Python", "max_stars_repo_path": "sqdn/queues/zmq_queue.py", "max_stars_repo_name": "gndctrl2mjrtm/sqdn", "max_stars_repo_head_hexsha": "847759d3bb96ef2574e74d747213f441373322db", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
[STATEMENT] lemma analyzed_if_all_analyzed_in: assumes M: "\<forall>t \<in> M. analyzed_in t M" shows "analyzed M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. analyzed M [PROOF STEP] proof (unfold analyzed_def, intro allI iffI) [PROOF STATE] proof (state) goal (2 subgoals): 1. \<And>t. M \<turnstile> t \<Lon...
{"llama_tokens": 5403, "file": "Stateful_Protocol_Composition_and_Typing_Intruder_Deduction", "length": 27}
[STATEMENT] lemma l3_obs_iagreement_Resp [iff]: "oreach l3 \<subseteq> l3_iagreement_Resp" [PROOF STATE] proof (prove) goal (1 subgoal): 1. oreach l3 \<subseteq> l2_iagreement_Resp [PROOF STEP] apply (rule external_invariant_translation [OF l2_obs_iagreement_Resp _ l3_implements_l2]) [PROOF STATE] proof (pro...
{"llama_tokens": 246, "file": "Key_Agreement_Strong_Adversaries_dhlvl3", "length": 3}
import sys,os import shutil import glob import numpy as np import math from collections import defaultdict,Counter from pbcore.io.align.CmpH5IO import * from pbcore.io import openIndexedAlignmentFile import pysam import logging import subprocess import random import copy from operator import itemgetter import CCS_align...
{"hexsha": "f3fffa904623691e386f06945d758942cc46d003", "size": 28481, "ext": "py", "lang": "Python", "max_stars_repo_path": "smalr/parse_mol_aligns.py", "max_stars_repo_name": "jbeaulaurier/SMALR", "max_stars_repo_head_hexsha": "28943974f30c5aa356df075abd9831f816576013", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
""" Testing AB test functions for means testing whether base python functions are equivalent to statsmodels ones """ import numpy as np import classical.means as means import classical.workout.means as workout import pytest np.random.seed(0) def test_mean_conf_interval(): sample1 = np.random.normal(50, 1, ...
{"hexsha": "c6e5ecba39fc3ed34b410f1d0506c0505cab257f", "size": 2179, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tests/classical/test_mean_funcs.py", "max_stars_repo_name": "nazlysabbour1/stats-toolkit-python", "max_stars_repo_head_hexsha": "6046285f3930e29ca6f862f4b49fae23da3de7ba", "max_stars_repo_lice...
\documentclass[10pt,a4paper]{article} \usepackage[margin=3cm]{geometry} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{hyperref} \author{Team B -- Manoja Kumar Das, Ondrej Mosnáček, Mmabatho Idah Masemene} \title{PV204 project -- Key m...
{"hexsha": "221c8929c46e45f400e6a7c960855b6c212f9d4b", "size": 6930, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/report-design/report.tex", "max_stars_repo_name": "javacard-FOSS-applets/cryptsetup-javacard", "max_stars_repo_head_hexsha": "46f1d0103ec72077c16db8a716ff233630330756", "max_stars_repo_licenses...
! -------------------------------------------------------------------- ! ! Copyright (C) 2015 Rocco Meli ! ! This program is free software: you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation, either version 3 of the License, or ! (...
{"hexsha": "fff83fbe09e6f60c4bc37f136a5b09e3d0c0fb75", "size": 6311, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Fortran90/HF.f90", "max_stars_repo_name": "RMeli/Hartree-Fock", "max_stars_repo_head_hexsha": "dda0102ab2a88f3f2f666c2479a858140505ea60", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
import glob import json import os import pickle import cv2 as cv import numpy as np from tqdm import tqdm def calibrate_chessboards(chessboards: list, visualize: bool = False): finder_criteria = cv.CALIB_CB_ADAPTIVE_THRESH + cv.CALIB_CB_NORMALIZE_IMAGE total_obj_points, total_image_points = [], [] total_...
{"hexsha": "d38162b3e82a4c5dd20033fdd2b912a08aa4fc60", "size": 4842, "ext": "py", "lang": "Python", "max_stars_repo_path": "calibration.py", "max_stars_repo_name": "rudyn2/visual-odometry", "max_stars_repo_head_hexsha": "1ee37ac6669e1429461f23ccc02d5ae9a349409c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import rospy,rosbag from sensor_msgs.msg import PointCloud2 import sensor_msgs.point_cloud2 as pc2 import numpy as np import matplotlib.pyplot as plt truck_length = 0.43 # 0.41(!!!) 0.43 def optimize_pcl( model_pcl,optimizd_bag_name): fig = plt.figure() N = model_pcl.header.seq gen_pcl = pc2.read...
{"hexsha": "d05efe5e10931fa31239c8f3e8683620aeffbb04", "size": 7765, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/scan_data/scripts/cal_volume.py", "max_stars_repo_name": "xuyongzhi/scan_volume", "max_stars_repo_head_hexsha": "c6813b4ea1decf28ba1b62d79a16a6311643fb89", "max_stars_repo_licenses": ["MIT"], ...
module IndirectArrays export IndirectArray """ IndirectArray(index, values) creates an array `A` where the values are looked up in the value table, `values`, using the `index`. Concretely, `A[i,j] = values[index[i,j]]`. """ immutable IndirectArray{T,N,I<:Integer} <: AbstractArray{T,N} index::Array{I,N} ...
{"hexsha": "934a495925e6dc6442b624b0db3150474ddfacbf", "size": 1378, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/IndirectArrays.jl", "max_stars_repo_name": "JuliaPackageMirrors/IndirectArrays.jl", "max_stars_repo_head_hexsha": "2df3132107d8e9d7e42c3249669e3f2d729fde84", "max_stars_repo_licenses": ["MIT"],...
"""Linear least squares with bound constraints on independent variables.""" from __future__ import division, print_function, absolute_import import numpy as np from numpy.linalg import norm, lstsq from scipy.sparse import issparse, csr_matrix from scipy.sparse.linalg import LinearOperator, lsmr from scipy.optim...
{"hexsha": "679b626379438eb0d9e8c9dfe22fde3f51f33563", "size": 12960, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/Python27/Lib/site-packages/scipy/optimize/_lsq/lsq_linear.py", "max_stars_repo_name": "lefevre-fraser/openmeta-mms", "max_stars_repo_head_hexsha": "08f3115e76498df1f8d70641d71f5c52cab4ce5f", ...
#include "gdb_packet.h" #include <algorithm> #include <boost/algorithm/string.hpp> #include <cstdint> #include "util/logging.h" static constexpr char kPacketLeader = '$'; static constexpr char kPacketTrailer = '#'; static constexpr char kPacketEscapeChar = '}'; static constexpr char kEscapeCharacterSet[] = {kPacketE...
{"hexsha": "3c0ffea9aac052400f18a8a83efb9a57974f12a3", "size": 4123, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/gdb/gdb_packet.cpp", "max_stars_repo_name": "abaire/xbdm_gdb_bridge", "max_stars_repo_head_hexsha": "06440896f1f2863cd81cedd3e2bcae1efc32f286", "max_stars_repo_licenses": ["Unlicense"], "max_sta...
/* * Copyright (c) 2016-2018 Nicholas Corgan (n.corgan@gmail.com) * * Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt * or copy at http://opensource.org/licenses/MIT) */ #ifndef INCLUDED_PKMN_MISC_COMMON_HPP #define INCLUDED_PKMN_MISC_COMMON_HPP #include <pkmn/config.hpp> #include <pkm...
{"hexsha": "5ccbfef54bb15cb6fb27ca20115ec4a530a6aa2f", "size": 3356, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "lib/utils/misc.hpp", "max_stars_repo_name": "ncorgan/libpkmn", "max_stars_repo_head_hexsha": "c683bf8b85b03eef74a132b5cfdce9be0969d523", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4.0, "...
import numpy as np from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.model_selection import train_test_split from util import Util class FeatureExtractor(object): LABEL_SEPRATOR = "@@@@" LABEL_POSITIVE = "POS" LABEL_NEGATIV...
{"hexsha": "9ffddbe4150fa19d5b260c478687281712bf4e8d", "size": 1550, "ext": "py", "lang": "Python", "max_stars_repo_path": "ml/extractor.py", "max_stars_repo_name": "ruiyangio/ml-sentiment", "max_stars_repo_head_hexsha": "2fd69d1289faa700b0298ec3dbce47eafe40b756", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np import json from collections import defaultdict import geocoder from sklearn.cluster import KMeans from sklearn.metrics import pairwise_distances_argmin_min from scipy.spatial.distance import cdist from prepar...
{"hexsha": "32e3e55cf5b98518354640fbdc483f1c2960369e", "size": 2338, "ext": "py", "lang": "Python", "max_stars_repo_path": "correlation.py", "max_stars_repo_name": "sgongar/test", "max_stars_repo_head_hexsha": "de27b7af3a063bdb36e4ff7b669c1a3def2a8aa7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null...
[STATEMENT] lemma stream_all_iff[iff]: "stream_all P s \<longleftrightarrow> Ball (sset s) P" [PROOF STATE] proof (prove) goal (1 subgoal): 1. stream_all P s = Ball (sset s) P [PROOF STEP] unfolding stream_all_def sset_range [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<forall>p. P (s !! p)) = Ball (range ((!!)...
{"llama_tokens": 147, "file": null, "length": 2}
# %% # Ensemble Forecasting of Previously Trained Ensemble Lookback Models # Over Categories Defined using Different Criteria # Ehsan Moradi, Ph.D. Candidate # %% # Import required libraries import pandas as pd import numpy as np import pickle import os from scipy.stats.mstats import trimmed_mean, winsorize from sklea...
{"hexsha": "75d89285875322d5e21227aea4ca2c6c67434de5", "size": 4209, "ext": "py", "lang": "Python", "max_stars_repo_path": "model-ensemble-category-predict.py", "max_stars_repo_name": "esnmrdi/phd", "max_stars_repo_head_hexsha": "2eede68a52e3e9c5931cad55dc6989c14f2e5d5b", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import torch import numpy as np import re RE_PARSE_RATIO = re.compile('Mismatched elements: (\d+) \/ (\d+)') def testcase_automator(testcase, configs): print('Running testcase: {} ...'.format(testcase.__name__)) for name, vals in configs.items(): print('\tTesting along {} ...'.format(name)) for val in va...
{"hexsha": "ad734e724495c3380fd814bc64d0a91e00a38b80", "size": 1231, "ext": "py", "lang": "Python", "max_stars_repo_path": "hfta/ops/utils.py", "max_stars_repo_name": "UofT-EcoSystem/hfta", "max_stars_repo_head_hexsha": "3ecde20363570b65f4f9656ff3204fe31f2ddcc0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
Mark Champagne was the ASUCD Business Manager business manager of ASUCD for 32 years. What this means was that he is the highest ranking university employee in ASUCD. (http://asucd.ucdavis.edu/government/businessmanager.html official webpage) Mark managed business operations since 1979 for ASUCD, and offered both ad...
{"hexsha": "701d0e896c7707d7f98f7b0350aca72ac948fce5", "size": 3244, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Mark_Champagne.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# Program name: OpenADAS_to_JSON/json_database/setup_fortran_programs.py # Author: Thomas Body # Author email: tajb500@york.ac.uk # Date of creation: 12 July 2017 # # This program is copied from setup.py from cfe316/atomic, with a slight modification to # make Python3 compatible (changed .iteritems() to .items()) # ...
{"hexsha": "82bafb0f31c66bf948e34e71baf38ebafd68ac9f", "size": 2987, "ext": "py", "lang": "Python", "max_stars_repo_path": "json_database/setup_fortran_programs.py", "max_stars_repo_name": "TBody/OpenADAS_to_JSON", "max_stars_repo_head_hexsha": "5450df052b36c6564050a2c4b6c79280939ed947", "max_stars_repo_licenses": ["MI...
from utils import csv_to_df, df_to_csv import pandas as pd import numpy as np from pathlib import Path from sklearn.cluster import AgglomerativeClustering import sklearn from sklearn.linear_model import LogisticRegression from vectorizer import vectorize #----------------------------------------------------------------...
{"hexsha": "c4215a2c623637715139175934965f4fb73f08a9", "size": 10875, "ext": "py", "lang": "Python", "max_stars_repo_path": "make_textSubmission.py", "max_stars_repo_name": "uhh-lt/semeval2019-hhmm", "max_stars_repo_head_hexsha": "b746b0fb8ab3b957d399276cb354e950f0ef30ed", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import numpy as np class clusterer: @staticmethod def fit_ancient_data(path_centers): return np.load(path_centers)
{"hexsha": "1ad88cbb44b413279d8a72ae3324561dda58f7d5", "size": 120, "ext": "py", "lang": "Python", "max_stars_repo_path": "web_api/Ai_writer/Clusterer.py", "max_stars_repo_name": "Nagisa-sys/WriterIdentification", "max_stars_repo_head_hexsha": "9fcc0f75e6685e64abb99bdc469755c24dc9802e", "max_stars_repo_licenses": ["MIT...
(** Generated by coq-of-ocaml *) Require Import OCaml.OCaml. Local Set Primitive Projections. Local Open Scope string_scope. Local Open Scope Z_scope. Local Open Scope type_scope. Import ListNotations. Unset Positivity Checking. Unset Guard Checking. Inductive nat : Set := | O : nat | S : nat -> nat. Inductive natu...
{"author": "yalhessi", "repo": "lemmaranker", "sha": "53bc2ad63ad7faba0d7fc9af4e1e34216173574a", "save_path": "github-repos/coq/yalhessi-lemmaranker", "path": "github-repos/coq/yalhessi-lemmaranker/lemmaranker-53bc2ad63ad7faba0d7fc9af4e1e34216173574a/benchmark/clam/_lfind_clam_lf_goal33_mult_succ_82_plus_succ/goal33con...
\documentclass[12pt]{article} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \usepackage{url} \usepackage{graphicx} \usepackage{makeidx} \usepackage{alltt} \input{macros} \makeindex \title{CPSA Primer} \author{John D.~Ramsdell\qquad Joshua D.~Guttman\\ The MITRE Corporation} \begin{document} \maketitl...
{"hexsha": "8134deb5c3edab9eae886ad0ecb549317b0b038b", "size": 53536, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "nofib/fibon/Hackage/Cpsa/doc/cpsaprimer.tex", "max_stars_repo_name": "AntonXue/ghc-8.2.2-base-dumper", "max_stars_repo_head_hexsha": "02cb9dd92a5e209ec775ed940f73a7f8eb3508a1", "max_stars_repo_lice...
import os import sys import argparse import numpy as np import matplotlib.pylab as plt from validate import calibrate from sklearn import linear_model as lm parser = argparse.ArgumentParser(description='PyTorch DML') parser.add_argument('--att', type=str, required=True, help='path to scores with a...
{"hexsha": "43ad64206f9946fa1db51f89e79d0fbc2723fc11", "size": 2366, "ext": "py", "lang": "Python", "max_stars_repo_path": "swapping.py", "max_stars_repo_name": "twuilliam/bias-gzsl", "max_stars_repo_head_hexsha": "4471481bae0f571273c92efe6e428c59a2f5ce2b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "max...
import numpy as np import matplotlib.pyplot as plt import pandas as pd #################### def ld_to_dl(ld): dl = {} for i, d in enumerate(ld): for key in d.keys(): value = d[key] if i == 0: dl[key] = [value] else: dl[key].append(v...
{"hexsha": "e7fcbad4fd5e58800269c2e774ffe099155f4a62", "size": 1156, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plot/pandas/pandas_test3.py", "max_stars_repo_name": "bcrafton/speed_read", "max_stars_repo_head_hexsha": "3e9c0c873e49e4948a216aae14ec0d4654d1a62c", "max_stars_repo_licenses": ["MIT"], "max_s...
# This source code is from theano_alexnet repository at # https://github.com/uoguelph-mlrg/theano_alexnet # Copyright (c) 2014, Weiguang Ding, Ruoyan Wang, Fei Mao and Graham Taylor # This source code is licensed under a BSD license found in the # 3rd-party-licenses.txt file in the root directory of this source tree. ...
{"hexsha": "f6f202b3b1c3397be7b35c13911386d8e6f9b793", "size": 7601, "ext": "py", "lang": "Python", "max_stars_repo_path": "theano/alexnet/alex_net.py", "max_stars_repo_name": "DL-Benchmarks/DL-Benchmarks", "max_stars_repo_head_hexsha": "86db33854f64245b0dd55b92e9a8eed6403f6c58", "max_stars_repo_licenses": ["MIT", "BSD...
!***************************************************************************** !* * !* Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 * !* * !* ...
{"hexsha": "1aa8a052a54cfaef93a27d620630474328bd1eae", "size": 17107, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "source/openmpmpibench_Fortran/parallelEnvironment.f90", "max_stars_repo_name": "OMPI-X/epcc-mixedmode-benchmark", "max_stars_repo_head_hexsha": "91877d8f32becc0af999a8ca38c9f0b3d2d1d47b", "max_...
\section{Work Timeline} \label{sec:concrete strategy} \subsection{Overview} The work of adding a feature to a codebase is a fairly concrete process. In theory writing some code for VST is just a type-heavy type of programming. The issue is that there was a decent learning curve to trying to understand the Coq languag...
{"hexsha": "e58a13f222457a0c8f60687f434c9d0aeaee2bbf", "size": 4465, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/3-work.tex", "max_stars_repo_name": "Jmw150/Coq-VST-DLC", "max_stars_repo_head_hexsha": "1af793083d71d87bc7023d35638c785685d424e7", "max_stars_repo_licenses": ["FTL"], "max_stars_count": null, "...
import numpy as np import mpnum as mp from scipy.linalg import eigh def isdiag(M): """ Returns True, if the matrix M is population. Else False """ return np.all(M == np.diag(np.diagonal(M))) def purify(rho): """ Purifies a quantum state represented by the density matrix rho of dimens...
{"hexsha": "99ea507fb0ae59c4e16242a52200ba94c6ef9b97", "size": 2092, "ext": "py", "lang": "Python", "max_stars_repo_path": "tmps/utils/purify.py", "max_stars_repo_name": "fhoeb/py-tmps", "max_stars_repo_head_hexsha": "b7eced582acb4042815a775090a59f569975e3be", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
\documentclass[12pt]{article} \usepackage[margin=1in]{geometry} \usepackage{enumerate} \usepackage{color} \begin{document} \title{Project Plan\\ Interactive Visualizations in Mathematica \\ Spring 2021} \author{Faculty Mentor: A.J. Hildebrand \\ Project Leader: Efstathios Konstantinos Chrontsios Garitsis \\ IGL ...
{"hexsha": "054266d695b8b2f029169cbd01a1cf11b8ae81b6", "size": 1296, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "IGL_Interactive_Visualizations_Spring2021_ProjectPlan.tex", "max_stars_repo_name": "adiswami14/exponential-random-walks", "max_stars_repo_head_hexsha": "fcc0340409afdd71f16fec4e93cd9280f13af33e", "m...
# -*- coding: utf-8 -*- from __future__ import division, print_function import pytest import numpy as np from itertools import product from my_emcee import moves from .test_proposal import _test_normal, _test_uniform __all__ = ["test_normal_gaussian", "test_uniform_gaussian", "test_normal_gaussian_nd"] ...
{"hexsha": "7c1e5d27082a55ac922c0fc0356b9533bd2c065d", "size": 2074, "ext": "py", "lang": "Python", "max_stars_repo_path": "my_emcee/tests/integration/test_gaussian.py", "max_stars_repo_name": "s-ilic/emcee", "max_stars_repo_head_hexsha": "2d6dc5f0e298dfabbdf7460bccc81c1ef1053b5e", "max_stars_repo_licenses": ["MIT"], "...
import numpy as np import math def get_tensor_size(tensor): """Calculate the number of elements in tensor, assuming first dim is None.""" return int(np.prod(tensor.get_shape()[1:]))
{"hexsha": "a17668b4207028405f593ec2f96175d7f9f7c7ce", "size": 191, "ext": "py", "lang": "Python", "max_stars_repo_path": "builder/helper.py", "max_stars_repo_name": "JarnoRFB/GENNN", "max_stars_repo_head_hexsha": "65cffbfc9ece602c38874f40ece4e42582044ae5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max...
import os import torch from torch.autograd import Variable import numpy as np import cv2 if torch.cuda.is_available(): torch.set_default_tensor_type('torch.cuda.FloatTensor') import sys sys.path.append(".") from ssd_indirect_direct import build_ssd import argparse parser = argparse.ArgumentParser( descriptio...
{"hexsha": "bdaa63a78a8c4dd289c456d63c1ac8cb707b5ee4", "size": 6207, "ext": "py", "lang": "Python", "max_stars_repo_path": "run.py", "max_stars_repo_name": "chensonglu/LPD-indirect-direct", "max_stars_repo_head_hexsha": "28a407e07150c42da9f62029a4184002fe427c42", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import os from logging import Logger import functools import numpy as np import torch from torch.utils.data import Dataset from MCQ import Consts from MCQ.datasets.utils import fvecs_read, ivecs_read class SiftLike(Dataset): def __init__(self, dataset: str = "SIFT/1M", logger: Logger = None, fileType="npy"): ...
{"hexsha": "ea44f9699d635e7f61e13e0b69346f4c7c0fb727", "size": 2952, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/MCQ/datasets/SiftLike.py", "max_stars_repo_name": "dreinq/DeepQ", "max_stars_repo_head_hexsha": "abb6d8b492f802fefbc0095e8719377dc708069c", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
from salishsea_tools import (nc_tools,viz_tools,geo_tools,tidetools) from matplotlib import animation import matplotlib.pyplot as plt import netCDF4 as nc import numpy as np from glob import glob import os import datetime def results_dataset(period, grid, results_dir): """Return the results dataset for period (e....
{"hexsha": "726593ba6118a13abc32eaff35aaccb06601a462", "size": 1296, "ext": "py", "lang": "Python", "max_stars_repo_path": "jie/SWC/Animation.py", "max_stars_repo_name": "SalishSeaCast/analysis-jie", "max_stars_repo_head_hexsha": "17cf0009bfa296c9d42cb799dd6ac03bce0a2791", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
from __future__ import print_function from sklearn import datasets from terminaltables import AsciiTable import sys import os import math import copy import pandas as pd import matplotlib.pyplot as plt import numpy as np import progressbar # Import helper functions from mlfromscratch.utils.data_manipulation import tra...
{"hexsha": "93ccd011dbcb394d265f6cd6adef13466f020010", "size": 8583, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlfromscratch/supervised_learning/neural_network.py", "max_stars_repo_name": "mmderakhshani/ML-From-Scratch", "max_stars_repo_head_hexsha": "4593ffbb64399ed9eaf4921d6c0d5430d81ec1cb", "max_stars_r...
#!/usr/bin/env python # usage: norm.py <filename> # calculates norm of cube file from asetk.format.cube import Cube import asetk.atomistic.constants as constants import numpy as np import argparse # Define command line parser parser = argparse.ArgumentParser( description='Calculates norm of Gaussian cube file.') ...
{"hexsha": "e01e6f28bf11861e7935938f9434bdbdfac2c03f", "size": 689, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/cube-norm.py", "max_stars_repo_name": "ltalirz/asetk", "max_stars_repo_head_hexsha": "bdb31934a5eb49d601e492fc98078d27f5dd2ebd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 18, "...
from PIL import Image from io import BytesIO import numpy as np import torch from torchvision import transforms def load_image(img_path, max_size, shape=None): ''' Load and convert the image, make sure that it is less than max_size pixels in the x-y dims, resize and normalize it. ''' ...
{"hexsha": "a1389700c32cd1e2e990decebbefaa5ee5c9647f", "size": 2757, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils.py", "max_stars_repo_name": "Johanna-Seif/style-transfer", "max_stars_repo_head_hexsha": "0db964d8d11402588d00443b1507063da7d8b54f", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import glob import cv2 import numpy as np import tqdm colors = [[128, 64, 128], [244, 35, 232], [70, 70, 70], [102, 102, 156], [190, 153, 153], [153, 153, 153], [250, 170, 30], [220, 220, 0], [107, 142, 35], [152, 251, 152], [70, 130, 180]...
{"hexsha": "ed4578065997738e33b7f63bb2800bb8c4512351", "size": 1142, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/translate_labels.py", "max_stars_repo_name": "Shathe/SemiSeg-Contrastive", "max_stars_repo_head_hexsha": "dc53c6da64f91c1ebce320f6e2ce3cc9f3df7414", "max_stars_repo_licenses": ["Apache-2.0"]...
from typing import Optional, Tuple import torch import time from tqdm import tqdm import numpy as np from gpytorch.likelihoods.gaussian_likelihood import GaussianLikelihood from gpytorch.constraints import Positive from jumbo.nn.models import Model from jumbo.acq.acq import ( UpperConfidenceBoundWithAuxModel, MF...
{"hexsha": "98dbaa63585ae80642461c00604b4aadb959a56e", "size": 11100, "ext": "py", "lang": "Python", "max_stars_repo_path": "jumbo/bo/loop.py", "max_stars_repo_name": "kouroshHakha/jumbo", "max_stars_repo_head_hexsha": "c2f41448ed99fd1276d5ee799abb8a8b3b39bc57", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C FFTPACK 5.0 C Copyright (C) 1995-2004, Scientific Computing Division, C University Corporation for Atmospheric Research C Licensed under the GNU General Public License (GPL) C C Authors: Paul N. Swarztrauber and Richard A. Valent C ...
{"hexsha": "c72aef1859b001815a3e721ec46bdf8e76a0d725", "size": 1619, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "external/fftpack5_dp/r1f2kf.f", "max_stars_repo_name": "tenomoto/ncl", "max_stars_repo_head_hexsha": "a87114a689a1566e9aa03d85bcf6dc7325b47633", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import pandas as pd import plotly.graph_objects as go import csv import os from scipy.signal import savgol_filter from LESO.plotly_extension import thesis_default_styling # read csv from ETM and convert into correct unit with open(os.path.join(os.path.dirname(__file__), 'cablepool_price_kea_31ch4_85co2.csv'), newline=...
{"hexsha": "2da3cc55224e0f0d651266258240e53d126e9fa9", "size": 2929, "ext": "py", "lang": "Python", "max_stars_repo_path": "thesis scripts/experiments/cablepool/model/cablepool_dynamic_price_analysis.py", "max_stars_repo_name": "thesethtruth/WB-thesis-model", "max_stars_repo_head_hexsha": "f786d15fa446e8c089431853a82aa...
# This file is part of Kpax3. License is MIT. function test_mcmc_gibbs_init() ifile = "data/read_proper_aa.fasta" ofile = "../build/test" settings = Kpax3.KSettings(ifile, ofile, maxclust=3, maxunit=1) data = UInt8[0 0 0 0 0 1; 1 1 1 1 1 0; 0 0 1 0 1 1; 1 1 0 1 0 ...
{"hexsha": "47fa1a1b786dc71da08f288a249cb8209c926cc5", "size": 24492, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/mcmc/gibbs.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Kpax3.jl-ad72c4b6-2990-538c-bd38-e122d63d24d9", "max_stars_repo_head_hexsha": "343ef11a2f58b5a01642a6a7c9ae77f4e7e5fad0"...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function import tensorflow as tf import numpy as np from niftynet.layer.base_layer import TrainableLayer class GenericGAN(TrainableLayer): def __init__(self, generator, discriminator, name='generic_GAN'): self._generator=generator self...
{"hexsha": "61c091692399abbf59ba4298a5217a4f26b91bef", "size": 7756, "ext": "py", "lang": "Python", "max_stars_repo_path": "niftynet/network/simple_gan.py", "max_stars_repo_name": "amh28/NIF", "max_stars_repo_head_hexsha": "92a2f447738224fb10b83fa60c78a35e0c25ac34", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
#specific stuff for sp4 theory
{"hexsha": "5b6f1795e6444a3a365122926584331dfbec2f0b", "size": 31, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/theories/sp4.jl", "max_stars_repo_name": "briederer/LatSpec.jl", "max_stars_repo_head_hexsha": "0160bac1a5d58095b8890dcecc54cd640b443d1d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
{"hexsha": "f45266e49038392a06a11520d10543d5397b95e9", "size": 18070, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/gluonts/transform/feature.py", "max_stars_repo_name": "PascalIversen/gluon-ts", "max_stars_repo_head_hexsha": "cb6b5145b94f942f7803383a70813363f6953509", "max_stars_repo_licenses": ["Apache-2...
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- # Adapt from -> # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # ------------------------------------------------------...
{"hexsha": "4e1c4abfe2c789fdb181483df5055f4bbd1c6148", "size": 3107, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaltool/reval_voc.py", "max_stars_repo_name": "tijeni1977/TIB-Net", "max_stars_repo_head_hexsha": "58bffe2071c91da1e49cb7f8311714acc9b36e93", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np _LOG_SIM = -1 # set to -1 for no log class Constant(): def __init__(self, sim_size=1000): self._FIREBALL_RANK = 12 self._FROSTBOLT_TALENTED = False self._FROSTBOLT_RANK = 11 self._INCINERATE = True self._DMF = False self._SIMPLE_SPELL = False...
{"hexsha": "47022a473ba8241705e599d30f9b706e0b547d5a", "size": 10879, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/constants.py", "max_stars_repo_name": "namreeb/fire-mage-simulation", "max_stars_repo_head_hexsha": "1e04d27a23a98ccae78a1518c6db36e237b63993", "max_stars_repo_licenses": ["Apache-2.0"], "max...
import gaptrain as gt from gaptrain.log import logger import gaptrain.exceptions as ex from autode.input_output import xyz_file_to_atoms from autode.atoms import Atom from multiprocessing import Pool from copy import deepcopy from time import time import numpy as np import os class Configuration: @property d...
{"hexsha": "3ef36ab4f9d1c1ce612a4c2b605f513ffee282bf", "size": 30854, "ext": "py", "lang": "Python", "max_stars_repo_path": "gaptrain/configurations.py", "max_stars_repo_name": "t-young31/gap-train", "max_stars_repo_head_hexsha": "864574abe20cc6072376e7c36ffb2ee1635e74e3", "max_stars_repo_licenses": ["MIT"], "max_stars...
import cv2 import math from tkinter import * import pyautogui import time import numpy as np import matplotlib.pyplot as plt import win32api, win32con import keyboard CHARACTER_POSITION = None CAPTURE_AREA = [None, None] QUIT = False # We loop in-game until this is set to True. def terminate_program(): global QU...
{"hexsha": "b310a8ff2438d7ebf820ad6b7161d9fc27413c8e", "size": 2797, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "automatingisfun/SnSBlock", "max_stars_repo_head_hexsha": "8e16b60d84a12a26cf82511b1f46f68cbd0aad54", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
import pandas as pd import numpy as np from sklearn.ensemble import RandomForestClassifier from sklearn.feature_extraction.text import CountVectorizer from sklearn.cross_validation import train_test_split from sklearn import metrics from sklearn.linear_model import SGDClassifier from sklearn import linear_model from sk...
{"hexsha": "0e583170305d0c1406383ce82f53cb7d8b0f743c", "size": 819, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/machine-learning/Python/prediction-data.py", "max_stars_repo_name": "Jasmine-Feldmann/pollstradomus", "max_stars_repo_head_hexsha": "6c9281a56e751f37a38d61812d321980f960f411", "max_stars_repo_l...
[STATEMENT] lemma countable_image_inj_on: "countable (f ` A) \<Longrightarrow> inj_on f A \<Longrightarrow> countable A" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>countable (f ` A); inj_on f A\<rbrakk> \<Longrightarrow> countable A [PROOF STEP] by (metis countable_image the_inv_into_onto)
{"llama_tokens": 116, "file": null, "length": 1}
# This example shows how to run PU21 metrics on HDR images import HDRutils import os import pu21_metric import torch import scipy.ndimage as ndimage import numpy as np import cv2 # in python I_ref = HDRutils.imread( os.path.join("..","matlab","examples",'nancy_church.hdr' )) I_ref = torch.tensor(I_ref) print(I_ref.me...
{"hexsha": "42ff2c4ce3960285fa18ae6b20594470f1469b72", "size": 1966, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch/examples.py", "max_stars_repo_name": "Fireronin/pu21", "max_stars_repo_head_hexsha": "975e3e0beba530567220c3e0e774f5c15bdcad0e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
# Imports --------------------------------------------------------------------- # Python import argparse import joblib import yaml import os.path as osp from collections import defaultdict import joblib # PyTorch import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable fro...
{"hexsha": "e32c74182765ecaa09b92334e77bed13acb7b0f7", "size": 7882, "ext": "py", "lang": "Python", "max_stars_repo_path": "gen_models/train_conv_rnn.py", "max_stars_repo_name": "yifan-you-37/rl_swiss", "max_stars_repo_head_hexsha": "8b0ee7caa5c1fa93860916004cf4fd970667764f", "max_stars_repo_licenses": ["MIT"], "max_st...
""" """ from pspy import pspy_utils, so_dict, so_map, sph_tools, so_mcm, so_spectra, so_mpi import numpy as np import sys import data_analysis_utils import time from pixell import curvedsky, powspec d = so_dict.so_dict() d.read_from_file(sys.argv[1]) surveys = d["surveys"] lmax = d["lmax"] niter = d["niter"] type =...
{"hexsha": "d843816b7343309dd4267634308a16e8bad85989", "size": 8676, "ext": "py", "lang": "Python", "max_stars_repo_path": "project/data_analysis/python/mc_get_spectra.py", "max_stars_repo_name": "earosenberg/PSpipe", "max_stars_repo_head_hexsha": "e49d8df9bbd27ec23955c8c90638e72c9d17b5d4", "max_stars_repo_licenses": [...
# Copyright 2018-2021 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
{"hexsha": "c492b1233177e1c80776fdd6bdc2940552c0ccc6", "size": 19507, "ext": "py", "lang": "Python", "max_stars_repo_path": "pennylane/ops/qubit/matrix_ops.py", "max_stars_repo_name": "MoritzWillmann/pennylane", "max_stars_repo_head_hexsha": "2b07d22cfcc6406ba28e5c647062340b240a4ee5", "max_stars_repo_licenses": ["Apach...
C Moving sub2 before sub1 changes the result: C Result with sub1 code first: C 1 2 203 C 11 22 233 C 263 C 21 42 1263 C Result with sub2 code first: C 1 2 3 C 11 22 33 C ...
{"hexsha": "00cd1b5f0d2bf0b5ba5b1052b0e90fdf281a10be", "size": 796, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "fable/test/valid/data_26.f", "max_stars_repo_name": "rimmartin/cctbx_project", "max_stars_repo_head_hexsha": "644090f9432d9afc22cfb542fc3ab78ca8e15e5d", "max_stars_repo_licenses": ["BSD-3-Clause-LB...
[STATEMENT] lemma [simp]: "hidden xs i \<Longrightarrow> hidden (xs@[x]) i" [PROOF STATE] proof (prove) goal (1 subgoal): 1. hidden xs i \<Longrightarrow> hidden (xs @ [x]) i [PROOF STEP] by(auto simp add:hidden_def nth_append)
{"llama_tokens": 86, "file": "Jinja_Compiler_Hidden", "length": 1}
Require Export Lambda.Util.Basic Init.Nat. From Equations Require Export Equations. (** De Bruijn syntax of terms. *) Inductive term (S : Set) : Set := | sort (s : S) | ident (x : nat) | app (A B : term S) | abs (A B : term S) | pi (A B : term S). Arguments sort {_}. Arguments ident {_}. Arguments app {_}. Arguments...
{"author": "rudynicolop", "repo": "Lambda-Calculi-Coq", "sha": "8349d61a706210462986f4b4bb2dc8844cd9037f", "save_path": "github-repos/coq/rudynicolop-Lambda-Calculi-Coq", "path": "github-repos/coq/rudynicolop-Lambda-Calculi-Coq/Lambda-Calculi-Coq-8349d61a706210462986f4b4bb2dc8844cd9037f/lib/PTS/Syntax.v"}
/** * Copyright (C) JoyStream - All Rights Reserved * Unauthorized copying of this file, via any medium is strictly prohibited * Proprietary and confidential * Written by Bedeho Mender <bedeho.mender@gmail.com>, January 12 2017 */ #ifndef JOYSTREAM_NODE_PLUGIN_HPP #define JOYSTREAM_NODE_PLUGIN_HPP #include "libt...
{"hexsha": "2bfd49b2ffd8113732d87de232ee3f6725a82371", "size": 1689, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/Plugin.hpp", "max_stars_repo_name": "JoystreamClassic/joystream-node", "max_stars_repo_head_hexsha": "2450382bb937abdd959b460791c25f2d8f127168", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
function CPT = CPD_to_CPT(CPD) % CPD_TO_CPT Convert the tabular_decision_node to a CPT % CPT = CPD_to_CPT(CPD) CPT = CPD.CPT;
{"author": "bayesnet", "repo": "bnt", "sha": "bebba5f437b4e1e29169f0f3669df59fb5392e62", "save_path": "github-repos/MATLAB/bayesnet-bnt", "path": "github-repos/MATLAB/bayesnet-bnt/bnt-bebba5f437b4e1e29169f0f3669df59fb5392e62/BNT/CPDs/@tabular_decision_node/CPD_to_CPT.m"}
import os import time from os.path import expanduser import sys import pprint from numbers import Number import math import gym import numpy as np import pybullet import pybullet_data import moviepy.editor as mpy from gym import spaces from gym.utils import seeding from skimage.transform import rescale from . import ...
{"hexsha": "4c2c2a934149f4da020c728fb2367aeb1e1011c0", "size": 22838, "ext": "py", "lang": "Python", "max_stars_repo_path": "softlearning/environments/gym/locobot/locobot_interface.py", "max_stars_repo_name": "charlesjsun/ReLMM", "max_stars_repo_head_hexsha": "b63cd69f5b4d5fddc5988a9478632a171ceef59a", "max_stars_repo_...