text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# Copyright 2018-2020 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://aws.amazon.com/apache2.0/ # # or in the 'license' fil...
{"hexsha": "3f7036d4a856a91f6eeb370adf8ca5cb1924ae5d", "size": 4954, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/unit/test_server.py", "max_stars_repo_name": "wiltonwu/sagemaker-containers", "max_stars_repo_head_hexsha": "8ece6809f1af6c32a95dc5330ac29c48d34ed12d", "max_stars_repo_licenses": ["Apache-2.0...
\chapter{Theoretical Background} \section{Basics in Modelling Light in Computer Graphics} \subsection{Radiometry} One purpose of Computer Graphics is to simulate the interaction of light with a surface and how a real-world observer, such as a human eye, will perceive this. These visual sensations of an eye are modelled...
{"hexsha": "7e53cde6557f38a17d8d510a5da1b837bc3c9049", "size": 45172, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "document/Source/Chapters/theoretical_background.tex", "max_stars_repo_name": "simplay/Bachelor-Thesis", "max_stars_repo_head_hexsha": "ef450c5420b768b2a1fd84c9ad768f34db12fc88", "max_stars_repo_lic...
classdef NonSeqEvtsState < matlab.mixin.SetGet %NonSeqEvtsState Summary of this class goes here % Detailed explanation goes here properties nonSeqEvts LaunchVehicleNonSeqEvents event LaunchVehicleEvent end methods function obj = NonSeqEvtsState(event, nonSeqEvts) ...
{"author": "Arrowstar", "repo": "ksptot", "sha": "2b414440d3b167ba2294f56dafce0f465c07f982", "save_path": "github-repos/MATLAB/Arrowstar-ksptot", "path": "github-repos/MATLAB/Arrowstar-ksptot/ksptot-2b414440d3b167ba2294f56dafce0f465c07f982/helper_methods/ksptot_lvd/classes/StateLog/@NonSeqEvtsState/NonSeqEvtsState.m"}
from PIL import Image import numpy as np from matplotlib import pyplot as plt BLOCK_SIZE = 4 ### read image ### img = Image.open('test_B.bmp') # color image img = np.array(img).astype(np.float32) / 256 print(img.shape, img.dtype) row,col=img.shape[:2] data=[] for i in range(0,row,BLOCK_SIZE): for j in range(0...
{"hexsha": "176d6cec5d325f9d5113c23368e2ce50e192fe32", "size": 1455, "ext": "py", "lang": "Python", "max_stars_repo_path": "digitmedia/2 compress/imgtest.py", "max_stars_repo_name": "fffasttime/cs_misc", "max_stars_repo_head_hexsha": "abff0dcaa840d07e2d948c50d9a9e53996c744fb", "max_stars_repo_licenses": ["MIT"], "max_s...
import os import argparse import warnings import numpy as np import torch from torch import nn import torchvision.transforms as transforms from torch.utils.data import DataLoader from torchvision.datasets import MNIST from tqdm import tqdm class Generator(nn.Module): """Generator structure from InfoGAN...
{"hexsha": "dc26338c761280465e0c0f119159be4ec053448f", "size": 8676, "ext": "py", "lang": "Python", "max_stars_repo_path": "main_infogan.py", "max_stars_repo_name": "elingaard/infogan-mnist", "max_stars_repo_head_hexsha": "fc50097b7b416400d00c48286c2de9c3a5190eef", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy as np from keras.layers import Input, Embedding, SpatialDropout1D, Bidirectional, LSTM, Flatten, Concatenate, Dense from keras.initializers import glorot_normal, orthogonal from keras.models import Model from sklearn.model_selection import StratifiedKFold from sklearn import utils from common.nn.element...
{"hexsha": "c7d7f9a5c164b8c1385129880be6f55e81a22851", "size": 7653, "ext": "py", "lang": "Python", "max_stars_repo_path": "quora/sequence_models.py", "max_stars_repo_name": "CC0210/jads_kaggle", "max_stars_repo_head_hexsha": "6897a43426b7a54325e5301ced9e714d79541c4a", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import unittest import torch import torch.nn as nn import torch.optim import numpy as np import FrEIA.modules as Fm import FrEIA.framework as Ff def F_conv(cin, cout): '''Simple convolutional subnetwork''' net = nn.Sequential(nn.Conv2d(cin, 32, 3, padding=1), nn.ReLU(), ...
{"hexsha": "2cb1542a8a5f2f78712107cd107b1ce838a94454", "size": 5356, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_conditioning.py", "max_stars_repo_name": "RussellALA/FrEIA", "max_stars_repo_head_hexsha": "f7a9fd469741fcab7912425047bf9a3965876512", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
! ******************************************************************************************************************************** ! ! cpl_comp_rokocn.f90 ! rokgem interface rokd compositional integrator ! ****************************************************************************************************************...
{"hexsha": "e90b334b9e70aea9b5a23d9996ac2274067602bf", "size": 2872, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "genie-rokgem/src/fortran/cpl_comp_rokocn.f90", "max_stars_repo_name": "JUNPENGZ/cgenie.muffin", "max_stars_repo_head_hexsha": "43bc8dc025428a5141866d762129b2cfaf1345ed", "max_stars_repo_licenses...
# This is barely modified from Kivy tutorials: # https://kivy.org/doc/stable/tutorials/pong.html # ...to integrate serial input from the MSP430FR5994 from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import ( NumericProperty, ReferenceListProperty, ObjectProperty ) from kivy.vec...
{"hexsha": "a69cd2dec9ff226f5a3cf2663f00a9c4e81ec583", "size": 5301, "ext": "py", "lang": "Python", "max_stars_repo_path": "lab4/pong/main.py", "max_stars_repo_name": "EvansTDingwiza/ce346-code", "max_stars_repo_head_hexsha": "b938463d4a6d25e0a017aedbf4f50977adc88f40", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import json import os import random from argparse import ArgumentParser import cv2 import keras.backend as K import numpy as np from keras import Input, Model, metrics from keras.callbacks import Callback, TensorBoard from keras.layers import Conv2D, Flatten, Dense, Lambda, Reshape, Conv2DTranspose from sonicrl.envir...
{"hexsha": "24d73cf05ee1988a9e74d8066bf02d61c91a6307", "size": 7210, "ext": "py", "lang": "Python", "max_stars_repo_path": "sonicrl/worldmodel/autoencoder.py", "max_stars_repo_name": "bharris47/sonic-rl", "max_stars_repo_head_hexsha": "5a819e92299f7eeaa9853b4991c9829603752bf6", "max_stars_repo_licenses": ["MIT"], "max_...
from typing import List, Dict, Tuple, Callable import numpy as np import pytest def static_test(f: Callable, l_tests: List[Dict[str, Tuple]], key_in: str = 'Input', key_out: str = 'Output'): """Validates the 'f' function on the list of tests 'l_tests' Parameters -------------------- f...
{"hexsha": "cac0f8b5054dd09652366846e06eda59042eaeae", "size": 1167, "ext": "py", "lang": "Python", "max_stars_repo_path": "covidxpert/utils/test_utils.py", "max_stars_repo_name": "LucaCappelletti94/covidxpert", "max_stars_repo_head_hexsha": "8adda25f3d6fb648607c0f8af7d3ff54b42c59fb", "max_stars_repo_licenses": ["MIT"]...
Require Import rt.util.all. Require Import rt.model.arrival.basic.task. From mathcomp Require Import ssreflect ssrbool ssrnat eqtype seq. Module ConcreteTask. Import SporadicTaskset. Section Defs. (* Definition of a concrete task. *) Record concrete_task := { task_id: nat; (* for uniquen...
{"author": "cd-public", "repo": "rt-proofs", "sha": "ebef0b65460fe009c51f638fe2b459f16a6d1dd5", "save_path": "github-repos/coq/cd-public-rt-proofs", "path": "github-repos/coq/cd-public-rt-proofs/rt-proofs-ebef0b65460fe009c51f638fe2b459f16a6d1dd5/implementation/uni/susp/dynamic/task.v"}
from sklearn.datasets import fetch_lfw_people import numpy as np import pdb MALENESS_THRESHOLD = 0 # threshold at which the person is classified as a male MIN_FACES = 5 TRAIN_CUT = 0.75 print("Fetching people with at least " + str(MIN_FACES) + " pictures.") lfw_people = fetch_lfw_people(color=True, min_faces_per_per...
{"hexsha": "7d2228ed17ca5af8e5f4bcfba05b8bb1d578ccb7", "size": 1379, "ext": "py", "lang": "Python", "max_stars_repo_path": "ML/Pytorch/data/lfw/parse_lfw_maleness.py", "max_stars_repo_name": "DistributedML/Biscotti", "max_stars_repo_head_hexsha": "dfba71b3924e1bafd2ab2545881fb741193f224e", "max_stars_repo_licenses": ["...
# -*- coding: utf-8 -*- """ Created on Fri Jun 19 22:52:36 2020 @author: Woody """ from model import Model from agent import Agent from algorithm import PolicyGradient import gym import numpy as np import os from parl.utils import logger def run_episode(env, agent): obs_list, action_list, reward_list = [], [],...
{"hexsha": "0c972a37f8cbb8bfc355a5b5d778962b75250753", "size": 3481, "ext": "py", "lang": "Python", "max_stars_repo_path": "results/pg/train_pg.py", "max_stars_repo_name": "star2dust/parl-tutorials", "max_stars_repo_head_hexsha": "a7bae8b9a8968b7cad77a04f104f1c846eb4ddf2", "max_stars_repo_licenses": ["MIT"], "max_stars...
include("censored.jl") include("cross_validate.jl") include("precision_at_k.jl") include("simple_glrms.jl") #include("fit_rdataset.jl")
{"hexsha": "f321a716cd48caeec7660660067c526171aab22f", "size": 135, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/runexamples.jl", "max_stars_repo_name": "heyi19931225/Lowrankmodels", "max_stars_repo_head_hexsha": "b87cadec54dd0e431c0b901ae405dcc490bdc79a", "max_stars_repo_licenses": ["MIT"], "max_star...
! the initilization module, used to initialize the phase field data ! Created by Z. Guo on Jan 17, 2014 ! Last modified ib Jan 22, 2014 module init_phi_module use multifab_module use ml_layout_module use define_bc_module use multifab_physbc_module use multifab_fill_ghost_module !use ml_restriction_module ...
{"hexsha": "4e8f957d82796804e4438530cdedc42d3077d9c3", "size": 33877, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Work/FLOW_PHASEFIELD/init_phi.f90", "max_stars_repo_name": "Marsfish1981/HPC-Phase_Field", "max_stars_repo_head_hexsha": "80a6b367cb6395541150ea68ab9dd3802f37850b", "max_stars_repo_licenses": [...
# stdlib from functools import lru_cache from typing import Dict # third party from autodp import dp_bank from autodp import fdp_bank from autodp.autodp_core import Mechanism import numpy as np @lru_cache(maxsize=None) def _individual_RDP_gaussian( sigma: float, value: float, L: float, alpha: float ) -> float: ...
{"hexsha": "e87011da3841abc315e22906bde74485e41a1fa8", "size": 3894, "ext": "py", "lang": "Python", "max_stars_repo_path": "packages/syft/src/syft/core/adp/idp_gaussian_mechanism.py", "max_stars_repo_name": "callezenwaka/PySyft", "max_stars_repo_head_hexsha": "2545c302441cfe727ec095c4f9aa136bff02be32", "max_stars_repo_...
# Main waveform class location # Copyright (C) 2020 Michael L. Katz, Alvin J.K. Chua, Niels Warburton, Scott A. Hughes # # 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 ...
{"hexsha": "be7b77f6e62a95a80db9fac8e2ae6aab92a0b4ad", "size": 28545, "ext": "py", "lang": "Python", "max_stars_repo_path": "FastEMRIWaveforms/few/waveform.py", "max_stars_repo_name": "basuparth/ICERM_Workshop", "max_stars_repo_head_hexsha": "ebabce680fc87e90ff1de30246dcda9beb384bb4", "max_stars_repo_licenses": ["MIT"]...
import io import math import pdb import timeit from quantities import mV, ms, s, V import sciunit from neo import AnalogSignal import neuronunit.capabilities as cap import numpy as np from .base import * import quantities as qt from quantities import mV, ms, s, V import matplotlib as mpl # try: # import asciiplotli...
{"hexsha": "92e8f3ce05be7c7693ee18f892651c5172b269ff", "size": 18687, "ext": "py", "lang": "Python", "max_stars_repo_path": "jithub/models/backends/neuron_hh.py", "max_stars_repo_name": "russelljjarvis/numba_reduced_neuronal_models", "max_stars_repo_head_hexsha": "bc500aefab267a1a1eaf2a1d8dac83da676d7ee6", "max_stars_r...
'''Collection of terms that form loss functionals Author: Hwan Goh, Oden Institute, Austin, Texas 2020 ''' import numpy as np import tensorflow as tf import pdb #Equivalent of keyboard in MATLAB, just add "pdb.set_trace()" ############################################################################### # ...
{"hexsha": "f31c2caa4c3fb72373b0df5131eb8cb21f222a02", "size": 6600, "ext": "py", "lang": "Python", "max_stars_repo_path": "codes/src/utils_training/functionals.py", "max_stars_repo_name": "hwangoh/uq-vae", "max_stars_repo_head_hexsha": "382548e6f6dd7f9d72feff0e0752beec871db348", "max_stars_repo_licenses": ["MIT"], "ma...
import os import torch import numpy as np import librosa as la from utils import listDir, tick, tock FRAMES_PER_SAMPLE: int = 336 # number of frames per sample HOP_LENGTH: int = 42 # number of frames to hop, to get to next sample # number of samples to extract from a performance SAMPLES_PER_PERFORMANCE: int = 120 #...
{"hexsha": "6f6515c0ca8544426648f1f4dcae3b9af008fedc", "size": 3610, "ext": "py", "lang": "Python", "max_stars_repo_path": "comparing-rnn-params/model/dataset.py", "max_stars_repo_name": "pasinducw/scs-4224-fyp", "max_stars_repo_head_hexsha": "753dd2cc6db84bcb9823a24ce5f495d94f55b162", "max_stars_repo_licenses": ["MIT"...
#pragma once #include <memory> #include <iterator> #include <cstddef> #include <gsl/gsl> namespace dr { /// \brief round `s` up to the nearest multiple of n template<typename T> T round_up(T s, unsigned int n) { return ((s + n - 1) / n) * n; } template<typename T, typename Allocator = std::allocator<T>> struct gap_...
{"hexsha": "30128633a412da2b11f1833ec52d0b0e2c142bc9", "size": 17324, "ext": "h", "lang": "C", "max_stars_repo_path": "include/gap_buffer.h", "max_stars_repo_name": "lie-yan/gapbuffer", "max_stars_repo_head_hexsha": "b6b3d621430029d989ebed8a672eee769c214ea5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2.0, ...
""" inputfile Abstract type for all kinds of input files """ abstract type inputfile end """ Inputconstants = new(lx, ly, maxruntime, dumping, gravity, γ, δ, kbt) Struct containing input parameters. Contains `.lx` lattice points in x-direction, `.ly` lattice points in y-direction. Other fields are `.maxrun...
{"hexsha": "3404f78641c7fb9a981a3eff91f25d5f79cd2762", "size": 4538, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/readinput.jl", "max_stars_repo_name": "Zitzeronion/JuSwalbe", "max_stars_repo_head_hexsha": "eb0aca0eabe327d4f9ca5756b4fc5b0e4fb2876b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
import os import json import numpy as np try: import cv2 except: pass from copy import deepcopy from tqdm import tqdm from transformers import BertTokenizer, LayoutLMTokenizer import matplotlib.pyplot as plt import matplotlib.patches as patches from public.data_provider.doc2dial import load_tocr, load_doc from...
{"hexsha": "e62ab32977f188ca54fb1a9d8f4b42e8aa026cc1", "size": 13450, "ext": "py", "lang": "Python", "max_stars_repo_path": "public/data_provider/ocr.py", "max_stars_repo_name": "Coldog2333/DGDS", "max_stars_repo_head_hexsha": "7c9b6904ab1d86fe2b430f01a3b583609bc095e2", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
clf reset; echo on % This script demonstrates the use of the RSOM. clc; % load the example dissimilarity data load exampleDissimilarity.mat; % display the eigenvalue spectrum [V, D] = eig(Dissim); eVals = diag(D); figure; bar(eVals); pause % Strike any key to continues... clc; % init RSOM sMap = rsom_lininit(D...
{"author": "ilarinieminen", "repo": "SOM-Toolbox", "sha": "f2597abc1ae33c2060e0443d49e854011ff21831", "save_path": "github-repos/MATLAB/ilarinieminen-SOM-Toolbox", "path": "github-repos/MATLAB/ilarinieminen-SOM-Toolbox/SOM-Toolbox-f2597abc1ae33c2060e0443d49e854011ff21831/contrib/rsom/rsom_demo.m"}
import numpy as np from sklearn import datasets # 设置数据集 n_samples = 1500 noisy_circles = datasets.make_circles(n_samples=n_samples, factor=0.5, noise=0.05) noisy_moons = datasets.make_moons(n_samples=n_samples, noise=0.05) blobs = datasets.make_blobs(n_samples=n_samples, random_state=8) no_structure = np.random.rand(n...
{"hexsha": "4a9d2b400b46b60ed4abaeb38252abe352f4c7f0", "size": 605, "ext": "py", "lang": "Python", "max_stars_repo_path": "Dataset/toy_dataset/cluster_toy_dataset.py", "max_stars_repo_name": "pengchenyu111/PaperCodeReplication", "max_stars_repo_head_hexsha": "7b8681654e25b7d707f4b4d7ebcfb85ffc0fd52a", "max_stars_repo_l...
import sys sys.path.insert(0, 'data') import pandas as pd import numpy as np from matplotlib import pyplot import collections from sklearn.model_selection import train_test_split, cross_val_score, RepeatedStratifiedKFold from sklearn.metrics import roc_curve, roc_auc_score, precision_recall_curve, f1_score, auc, accura...
{"hexsha": "2e371fe7480f7424a8e659d1c39521a5472d37ee", "size": 19594, "ext": "py", "lang": "Python", "max_stars_repo_path": "advanced-ml.py", "max_stars_repo_name": "skouras-io/advanced-ml", "max_stars_repo_head_hexsha": "68cfaa3edb9592b8183f607f9ff61628fdb0c2cc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
theory SimplyTypedLambdaCalculus imports Main begin type_synonym var = string no_notation Set.member ("(_/ \<in> _)" [51, 51] 50) datatype type = TUnit | TApp type type ("_ \<rightarrow> _") datatype expr = Unit | Var var | Abs var type expr | App expr expr (* it is important to choose a list here, s...
{"author": "ThreeFx", "repo": "toy-examples", "sha": "b687b0c48742d01a1839f71068f51fcc026aad34", "save_path": "github-repos/isabelle/ThreeFx-toy-examples", "path": "github-repos/isabelle/ThreeFx-toy-examples/toy-examples-b687b0c48742d01a1839f71068f51fcc026aad34/SimplyTypedLambdaCalculus.thy"}
""" MultiComplexMat implements a wrapper for any objects (reals, np.arrays and sparse matrices) which can have multiple imaginary like units. E.g. rules i*i = -1, j*j = -1 but i*j = j*i will not simplify further. The MultiComplexMat overloads all common numerical operations: +,-,*,@ etc. such that these rules are...
{"hexsha": "5ebc854b1e159abedaf0bda958a78d32355fd444", "size": 15380, "ext": "py", "lang": "Python", "max_stars_repo_path": "multicomplexmat.py", "max_stars_repo_name": "Ehtycs/modeling-spork", "max_stars_repo_head_hexsha": "9aeb8ce5f69f7456feb872744c07341c2966de33", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import tensorflow as tf from Transformer import MHA from Transformer.TransformerEncoder import TransformerEncoder from Transformer.TransformerDecoder import TransformerDecoder from tensorflow.keras.layers import Input, Dense from tensorflow.keras.models import Model from Transformer.TransformerCore import Get_Custom...
{"hexsha": "d7fd0567a8d6c8dec65c9507876f3cc93d6e2236", "size": 6103, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests.py", "max_stars_repo_name": "antoniorv6/Transformer-Keras", "max_stars_repo_head_hexsha": "9566f4211f92922a668977e72dbb72b722d4de5e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# -*- coding: utf-8 -*- from sklearn.model_selection import train_test_split from sklearn.metrics import roc_curve, roc_auc_score, confusion_matrix import matplotlib.pyplot as plt import pandas as pd import numpy as np import itertools import re def data_load_home_credit(path): """ To load dataset from the di...
{"hexsha": "73e021f7572832485684ffd424767ae891476b53", "size": 4229, "ext": "py", "lang": "Python", "max_stars_repo_path": "home_credit/common.py", "max_stars_repo_name": "ismaeelnawaz/msds19029_thesis", "max_stars_repo_head_hexsha": "83eac1aa22105404d0551bfa49be5b3e960a6aa2", "max_stars_repo_licenses": ["MIT"], "max_s...
""" Copyright 2019 Samsung SDS Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law ...
{"hexsha": "e5846c27474b5bc85798194321dd09efcdbd7f52", "size": 4053, "ext": "py", "lang": "Python", "max_stars_repo_path": "function/python/brightics/function/regression/test/random_forest_regression_test.py", "max_stars_repo_name": "parkjh80/studio", "max_stars_repo_head_hexsha": "6d8d8384272e5e1b2838b12e5557272a19408...
# -*- coding: utf-8 -*- """ Created on Fri Aug 9 16:07:58 2019 @author: Yaqiong Su """ import numpy as np import pandas as pd import linecache as lc f1 = open('POSCAR','rb') f2 = open('head','wb') f3 = open('direct','wb') f4 = open('lattice','wb') i = 0 while True: line = f1.readline() i...
{"hexsha": "42cebeaede80a4cf61d0ca0345c7374f090ccc8b", "size": 1600, "ext": "py", "lang": "Python", "max_stars_repo_path": "coordinate.py", "max_stars_repo_name": "YaqiongSu/transformation-between-direct-and-cartesian-coordinate-VASP", "max_stars_repo_head_hexsha": "30109019681af8ffa7f6d2ddaef909cc4c7c854b", "max_stars...
! Last change: HO 27 May 2000 11:47 pm MODULE mpeg IMPLICIT NONE PUBLIC TYPE:: mpeg_parameters INTEGER :: mtype INTEGER :: layer INTEGER :: ibit_rate INTEGER :: isample_rate INTEGER :: ipsychoacoustic INTEGER :: iemphasis INTEGER :: ipadding INTEGER :: icrc INTEGER :: mode INTEGER :: iextension INTE...
{"hexsha": "ce8c2609fbff2aa6bee56dd702cbe13da70ea371", "size": 1447, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "mpeg.f90", "max_stars_repo_name": "cure-honey/uzura2", "max_stars_repo_head_hexsha": "2ab63fa966daa7e5331fcd3f33be4417bd6222ec", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_st...
""" routines to compute derivatives of spherical functions """ import numpy as np def d_r_dx(x, y): """ derivative of r with respect to x :param x: :param y: :return: """ return x / np.sqrt(x**2 + y**2) def d_r_dy(x, y): """ :param x: :param y: :return: """ retur...
{"hexsha": "9d4f232e2f067c59df83436b583a50c8d541175b", "size": 951, "ext": "py", "lang": "Python", "max_stars_repo_path": "astrofunc/LensingProfiles/calc_util.py", "max_stars_repo_name": "LBJ-Wade/astrofunc_lensing_profile", "max_stars_repo_head_hexsha": "d2223705bc44d07575a5e93291375ab8e69ebfa8", "max_stars_repo_licen...
\section{Privacy Preserving Voting} \todo{ consider the liquid democracy requirement that individual voters' votes remain private, while delegates' votes are public. This can be achieved by blinding the votes but still allowing a final tally. }
{"hexsha": "e8c4582913cf11594d15d0546d074579e7657b28", "size": 244, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "papers/working-document/privacy.tex", "max_stars_repo_name": "MitchellTesla/decentralized-software-updates", "max_stars_repo_head_hexsha": "89f5873f82c0ff438e2cd3fff83cc030a46e29da", "max_stars_repo_...
A popular snack to munch while watching Movies.
{"hexsha": "90dbd3b81388c99694558415ab008926279ad162", "size": 50, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Popcorn.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
#include <boost/mpl/aux_/preprocessed/no_ttp/quote.hpp>
{"hexsha": "165ad44d5f598b55102ff9a60f3a25e222a372f3", "size": 56, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_mpl_aux__preprocessed_no_ttp_quote.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_license...
## GeomUtils.jl --- constructs for geometry export distance, anglespan, dihedral export centroid, RMSD """ distance(a, b) -> Real Calculate Euclidean distance from `a` to `b`. """ distance(a, b) = norm(a-b) """ anglespan(a, b, c) ∈ [0, π] Calculate smaller angle between two vectors ``AB`` and ``BC`` meetin...
{"hexsha": "b9239d18d4c5d5b8d73e21c6af3bb55e7adc0613", "size": 2295, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/GeomUtils.jl", "max_stars_repo_name": "bldamalla/ProtStructs.jl", "max_stars_repo_head_hexsha": "98f73e61d123b8f319c597368f00b4b83a416d62", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python import cv2 import numpy as np import rospy import math from cv_bridge import CvBridge, CvBridgeError from sensor_msgs.msg import CompressedImage, Image def crop_line_image(image_raw): OK = 20 CK = 20 hough_thresh = 220 hough_min_line = 100 hough_max_gap = 100 col = 100 ...
{"hexsha": "690ab22d21b21af36e00cf2f29db39b1878daf86", "size": 2851, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/crop_row_follow.py", "max_stars_repo_name": "sonyccd/crop_row_follow", "max_stars_repo_head_hexsha": "26ee58804d0b569608da4b825c3b14c227cfd245", "max_stars_repo_licenses": ["BSD-3-Clause"]...
"Split a subspace into two" split(ss::UInt64) = hash((ss, 0)), hash((ss, 1))
{"hexsha": "b8150b2996449861ec57bacc2f51d1cb1d5bfc6d", "size": 76, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "OmegaCore/src/space/subspace.jl", "max_stars_repo_name": "zenna/expect", "max_stars_repo_head_hexsha": "48bd661df410777eeb8940876a5cc8817eed2ac5", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
\chapter{Abstract} Here goes the abstract, a summary of your thesis work. You may add some keyword at the end that clearly identify the research field of the thesis. The abstract should not contain any reference to related works. \paragraph{Keywords} keyword1; keyword2; keyword3
{"hexsha": "b6922dacf4724bc1a551a989ac732888642af9ec", "size": 282, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Chapters/Abstract.tex", "max_stars_repo_name": "ste7en/master-thesis-template-polimi", "max_stars_repo_head_hexsha": "b56d8dd68cf80061d92e9cf783248b31ecbae0d1", "max_stars_repo_licenses": ["MIT"], "m...
\section*{Publication Data} \textcopyright Copyright The Rexx Language Association, 2011-\splice{java TexYear}\\ All original material in this publication is published under the Creative Commons - Share Alike 3.0 License as stated at \url{http://creativecommons.org/licenses/by-nc-sa/3.0/us/legalcode}.\\[0.5cm] The re...
{"hexsha": "166bce9afbbc3866201228c2d0bf6079ce923928", "size": 775, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "documentation/boilerplate/bookmeta.tex", "max_stars_repo_name": "RexxLA/NetRexx", "max_stars_repo_head_hexsha": "ec27b6e3f908fbc50cb6dc54696daea68ae59103", "max_stars_repo_licenses": ["ICU"], "max_st...
import numpy as np from hw2 import Transform, Translation, Rotation, Base from hw3 import Quaternion, link, symLink import matplotlib.pyplot as plt from simulation import Simulation import sympy from pprint import pprint from gradient import gradientVariable, forwardVariable # exit() print("Q1") t01 = Transform(rot=R...
{"hexsha": "16441702e9b3fe3112f4bf9f5ae6866d423023ba", "size": 2482, "ext": "py", "lang": "Python", "max_stars_repo_path": "midterm.py", "max_stars_repo_name": "linnil1/2020Robotics", "max_stars_repo_head_hexsha": "fdb18abe020f7123b5112dac9b49deb51850f054", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
# Copyright 2018-2019 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": "1d05117bc5e3068029200857ca3898be613dc137", "size": 1873, "ext": "py", "lang": "Python", "max_stars_repo_path": "pennylane/about.py", "max_stars_repo_name": "InduManimaran/pennylane", "max_stars_repo_head_hexsha": "375d25acc7bd2e6d5243b5273958b26513c33189", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
<!-- dom:TITLE: Demo - 3D Poisson's equation --> # Demo - 3D Poisson's equation <!-- dom:AUTHOR: Mikael Mortensen Email:mikaem@math.uio.no at Department of Mathematics, University of Oslo. --> <!-- Author: --> **Mikael Mortensen** (email: `mikaem@math.uio.no`), Department of Mathematics, University of Oslo. Date: **...
{"hexsha": "d49b96fa656fc77c983bbd0174c000bb6fdb73c0", "size": 38890, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "content/poisson3d.ipynb", "max_stars_repo_name": "mikaem/shenfun-demos", "max_stars_repo_head_hexsha": "c2ad13d62866e0812068673fdb6a7ef68ecfb7f2", "max_stars_repo_licenses": ["BSD-2-...
$\newcommand{\xv}{\mathbf{x}} \newcommand{\wv}{\mathbf{w}} \newcommand{\vv}{\mathbf{v}} \newcommand{\yv}{\mathbf{y}} \newcommand{\zv}{\mathbf{z}} \newcommand{\av}{\mathbf{a}} \newcommand{\Chi}{\mathcal{X}} \newcommand{\R}{\rm I\!R} \newcommand{\sign}{\text{sign}} \newcommand{\Tm}{\mathbf{T}} \newcommand{\Xm}{...
{"hexsha": "6f81f00dced9be42e450c3bc18375b2726e81e57", "size": 356271, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "reading_assignments/questions/7_Note-NonlinearLogReg.ipynb", "max_stars_repo_name": "biqar/Fall-2020-ITCS-8156-MachineLearning", "max_stars_repo_head_hexsha": "ce14609327e5fa13f7af7...
*DECK D9ATN1 DOUBLE PRECISION FUNCTION D9ATN1 (X) C***BEGIN PROLOGUE D9ATN1 C***SUBSIDIARY C***PURPOSE Evaluate DATAN(X) from first order relative accuracy so C that DATAN(X) = X + X**3*D9ATN1(X). C***LIBRARY SLATEC (FNLIB) C***CATEGORY C4A C***TYPE DOUBLE PRECISION (R9ATN1-S, D9ATN1-D) C***K...
{"hexsha": "8f64e14b7a7a9280df8f0dd49b419822efc203ba", "size": 5371, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "slatec/src/d9atn1.f", "max_stars_repo_name": "andremirt/v_cond", "max_stars_repo_head_hexsha": "6b5c364d7cd4243686488b2bd4318be3927e07ea", "max_stars_repo_licenses": ["Unlicense"], "max_stars_coun...
from math import log, sqrt, floor from typing import List import numpy as np from scipy import integrate from scipy.signal import argrelextrema from cell_models import protocols, trace from cell_models.current_models import ExperimentalArtefactsThesis from cell_models.protocols import VoltageClampProtocol class CellM...
{"hexsha": "2946b50c5b6bea7c4c3629d161fe3b46c991fd9e", "size": 24351, "ext": "py", "lang": "Python", "max_stars_repo_path": "cell_models/cell_model.py", "max_stars_repo_name": "Christini-Lab/cell-models", "max_stars_repo_head_hexsha": "a2a4b2b8678e3846b77b48c93eb1df080281490e", "max_stars_repo_licenses": ["MIT"], "max_...
# To add a new cell, type '# %%' # To add a new markdown cell, type '# %% [markdown]' # %% import os from datetime import datetime from IPython.core.display import ProgressBar import numpy as np import pandas as pd from gql import gql, Client, AIOHTTPTransport import asyncio TOP = 100 TOKEN = "bearer " + os.getenv(...
{"hexsha": "9a884625895381c9903a18d692d86f46caa92fdb", "size": 5502, "ext": "py", "lang": "Python", "max_stars_repo_path": "contributions.py", "max_stars_repo_name": "oleksis/github-cuba", "max_stars_repo_head_hexsha": "bbb2aa4b52cdcaa74bff0532a627dc715f65ead5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import logging import numpy as np from astropy import units as u from astropy.coordinates import Angle from regions import PixCoord from gammapy.datasets import SpectrumDatasetOnOff from gammapy.maps import RegionGeom, RegionNDMap, WcsNDMap from gammapy.ut...
{"hexsha": "425772fbbd1c9b1b3fd0dbf9f290487b5c9d2560", "size": 12881, "ext": "py", "lang": "Python", "max_stars_repo_path": "gammapy/makers/background/reflected.py", "max_stars_repo_name": "kabartay/gammapy", "max_stars_repo_head_hexsha": "015206d2418b1d254f1c9d3ea819ab0c5ece99e9", "max_stars_repo_licenses": ["BSD-3-Cl...
import cv2 import numpy as np import time import autopy import mediapipe as mp import math import wx import threading thread = None # noinspection PyAttributeOutsideInit,PyShadowingNames class TraceThread(threading.Thread): def __init__(self, *args, **keywords): threading.Thread.__init__(self, *args, **ke...
{"hexsha": "a643643c8e2ae4cea1d63084d87f425fb8fc3a45", "size": 11116, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/MouseCTRL.py", "max_stars_repo_name": "MouseCTRL/MouseCTRL", "max_stars_repo_head_hexsha": "920c6b99c6729b41a34af77d47936c8893bf46f3", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
import os import sys import numpy as np import cv2 def parse_csv_annotations(filepath, num_classes=60): """ Extract annotations from the csv file from one epoch produced in main.py :param filepath: path of the csv file :param num_classes: number of classes used :return: return a list[dict] of rec...
{"hexsha": "573fb427365bf7981c7d389afc31dec9b2e7f5d0", "size": 8903, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/visualize.py", "max_stars_repo_name": "AlexandreDh/ACAR-Net", "max_stars_repo_head_hexsha": "db28009388512e31cb6ff8e86725dc9b026886b6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
! { dg-do compile } ! PR fortran/41940 integer, allocatable :: a TYPE :: x integer, allocatable :: a END TYPE TYPE (x) :: y allocate(a(4)) ! { dg-error "Shape specification for allocatable scalar" } allocate(y%a(4)) ! { dg-error "Shape specification for allocatable scalar" } end
{"hexsha": "0fa9ce1fce9c2d8ea2e4b2bbf956c80ace473e15", "size": 291, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/allocate_scalar_with_shape.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_...
// embeddedprolog.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <stdexcept> #include <utility> #include <boost/any.hpp> #include <vector> #include <boost/regex.hpp> #include <boost/variant.hpp> #include <boost/variant/recursive_variant.hpp> #include <boost/intrusiv...
{"hexsha": "460488a3572d776eb49dc07376a823d20a335f91", "size": 64754, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "embeddedprolog.cpp", "max_stars_repo_name": "differentprogramming/logic_in_cpp", "max_stars_repo_head_hexsha": "f0ccf8d9a5108ff358c5cec189357205534b23ce", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/usr/bin/env python from __future__ import division from sklearn.cross_validation import StratifiedKFold from sklearn.datasets import load_svmlight_file from sklearn.grid_search import GridSearchCV from sklearn.metrics import log_loss import argparse import logging import numpy as np import os import time import x...
{"hexsha": "72e863a2f3b5ad6ff90852fde12c27baeca5e926", "size": 2522, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/train_predict_esb_xg_grid_colsub.py", "max_stars_repo_name": "drivendata/countable-care-3rd-place", "max_stars_repo_head_hexsha": "d1bba2f09ba0196cc3f35d2a41ea93bfbc4086a2", "max_stars_repo_li...
!! SRN 04502674 !! !! WRONG RESULT FROM POLYMORPHIC POINTER ASSIGNMENT !! !! This example shows that the polymorphic pointer assignment !! is being done incorrectly, giving either wrong results or !! a segfault. This occurs for version 19.1 and is a regression !! from 18 and 19.0. !! !! $ ifort --version !! ifort (IFOR...
{"hexsha": "d40dc463aba4c3f3616d7c87e10c60253067f4c4", "size": 2009, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "intel-bugs/intel-20200125.f90", "max_stars_repo_name": "dhnza/fortran-compiler-tests", "max_stars_repo_head_hexsha": "f60d1c2a6e67153fa92f5653e0a3df771d5ed5bb", "max_stars_repo_licenses": ["MIT"...
""" The algorithms based on centered aligmnent proposed in C. Cortes, M. Mohri, and A. Rostamizadeh, "Algorithms for Learning Kernels Based on Centered Alignment," J. Mach. Learn. Res., vol. 13, pp. 795-828, Mar. 2012. Given :math:`p` kernel matrices :math:`\mathbf{K}_1, \mathbf{K}_2, ..., \mathbf{K}_p`, centered ker...
{"hexsha": "88465c2608963df3004cc629e9554548399a2562", "size": 7739, "ext": "py", "lang": "Python", "max_stars_repo_path": "Project_Health/src/mklaren/mkl/alignf.py", "max_stars_repo_name": "Anonymous633671/STABILIZER", "max_stars_repo_head_hexsha": "5a1ab8099a2d75ace7e053afc78055f1f4d359c0", "max_stars_repo_licenses":...
# Copyright 2014, Jerome Fung, Rebecca W. Perry, Thomas G. Dimiduk # # flyvbjerg_petersen_std_err 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 (at your option) any l...
{"hexsha": "3001ecd252c6cc31aa3cc86326266420171eace6", "size": 5967, "ext": "py", "lang": "Python", "max_stars_repo_path": "US/diffusivity/2_fblockavg/flyvbjerg_petersen_std_err.py", "max_stars_repo_name": "vtlim/permeability", "max_stars_repo_head_hexsha": "56c9379b82ab586e76224937b72397011fd6acc0", "max_stars_repo_li...
#!/usr/bin/env python from funlib.show.neuroglancer import add_layer import argparse import daisy import glob import neuroglancer import os import webbrowser import numpy as np import zarr parser = argparse.ArgumentParser() parser.add_argument( '--file', '-f', type=str, action='append', help="The ...
{"hexsha": "f782ab579af857f8f3720eea3f0a98c731407db6", "size": 6061, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/visualize.py", "max_stars_repo_name": "rhoadesScholar/daisy", "max_stars_repo_head_hexsha": "78cdd2ed0d67647a6602fb53cc952214450f3753", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
#------------------------------------------------------------------------------- # Author: Lukasz Janyst <lukasz@jany.st> # Date: 14.06.2017 #------------------------------------------------------------------------------- import random import cv2 import argparse import sys,os import os.path as ops sys.path.append(o...
{"hexsha": "16163245957ed80e038d66fae7a617d41e12981d", "size": 3629, "ext": "py", "lang": "Python", "max_stars_repo_path": "split_train_test_data_ubuntu.py", "max_stars_repo_name": "ivo-gilles/breast-cancer-classification", "max_stars_repo_head_hexsha": "eb79275ac281d0340ede5d21e3d4a1116d612ddd", "max_stars_repo_licens...
from preprocess.removeOutliers import remove_outliers from preprocess.scale import scale from preprocess.pca import pca import numpy as np def pre_process(arr, test, y=[]): test = test.to_numpy() arr = arr.to_numpy() arr, y = remove_outliers(arr, y) #arr, test = pca(arr, test) arr, test = scale(...
{"hexsha": "ddfd4866b689364311d5e0ce7c2036a2fed6a34a", "size": 357, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocess/index.py", "max_stars_repo_name": "ahmedgaafer/pattern-project", "max_stars_repo_head_hexsha": "b20cd9b0c3c62ef761fa6d2969ea3d7133e40632", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#include <iostream> #include <Eigen/Dense> void gramSchmidtOrthogonalization(Eigen::MatrixXd &matrix,Eigen::MatrixXd &orthonormalMatrix) { /* In this method you make every column perpendicular to it's previous columns, here if a and b are representation vector of two columns, c=b-((b.a)/|a|).a ^ ...
{"hexsha": "4827f06fe844f4826a12fe584c7c179c64f364b5", "size": 2541, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/gram_schmidt_orthogonalization.cpp", "max_stars_repo_name": "behnamasadi/Mastering_Eigen", "max_stars_repo_head_hexsha": "99edbc819c89a4805b777eef69044a1658d96206", "max_stars_repo_licenses": ["...
# -*- coding: utf-8 -*- # © 2017-2019, ETH Zurich, Institut für Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """ Defines inline calculations to automatically get an initial window guess. """ import numpy as np from aiida import orm from aiida.engine import calcfunction from .._calcfunctions import ...
{"hexsha": "2772c7ea847bd52038ef11a6b0883c9ca33939b3", "size": 3023, "ext": "py", "lang": "Python", "max_stars_repo_path": "aiida_tbextraction/energy_windows/auto_guess.py", "max_stars_repo_name": "DanielMarchand/aiida-tbextraction", "max_stars_repo_head_hexsha": "6f9513c0c16ef0874aeb5801481287f233277620", "max_stars_r...
using MPI using ClimateMachine using Logging using ClimateMachine.Mesh.Topologies using ClimateMachine.Mesh.Grids using ClimateMachine.DGmethods using ClimateMachine.DGmethods.NumericalFluxes using ClimateMachine.MPIStateArrays using ClimateMachine.LowStorageRungeKuttaMethod using LinearAlgebra using ClimateMachine.Gen...
{"hexsha": "33cc2a70407efac916ef6715b6ed1e4a5e0328c3", "size": 693, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "tutorials/topo.jl", "max_stars_repo_name": "ChrisRackauckas/ClimateMachine.jl", "max_stars_repo_head_hexsha": "195bdaa323086c67a7aa4d1b5d99612f077ff3fe", "max_stars_repo_licenses": ["Apache-2.0"], "...
module cube_to_vtk_c_binding ! Usage: ! Reference: ! http://fortranwiki.org/fortran/show/c_interface_module use iso_c_binding use c_f_string_c_binding, only : c_f_string use asflowf_cube_to_vtk, only : cube_to_vtk implicit none contains subroutine c_cube_to_vtk(cube_fi...
{"hexsha": "6caf56ae30f4f93ded874bc4003e32074762a35f", "size": 811, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "fortran/atomsciflowf/c_binding/cube_to_vtk_c_binding.f90", "max_stars_repo_name": "DeqiTang/pymatflow", "max_stars_repo_head_hexsha": "bd8776feb40ecef0e6704ee898d9f42ded3b0186", "max_stars_repo_l...
import unittest import numpy as np import tensorflow as tf import tf_encrypted as tfe from tf_encrypted.layers.activation import Relu class TestRelu(unittest.TestCase): def setUp(self): tf.reset_default_graph() def test_forward(self): input_shape = [2, 2, 2, 50] input_relu = np.rand...
{"hexsha": "fbb435cae931769aa12d19aab95ee1c12290fc4b", "size": 1238, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_relu.py", "max_stars_repo_name": "robert-wagner/tf-encrypted", "max_stars_repo_head_hexsha": "d2cb60d68f263dfd5da46dbac55b8858d701bc47", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
#include "Gui.h" #include "mycq.hpp" #include <Windows.h> #include "MyJson.h" #include "Update.h" //#include <regex> #include <boost/regex.hpp> #include <nana/gui.hpp> #include <nana/gui/widgets/button.hpp> #include <nana/gui/widgets/checkbox.hpp> #include <nana/gui/widgets/combox.hpp> #include <nana/gui/widgets/gr...
{"hexsha": "0e33101ac5411560a650236cdd6cf35b688694df", "size": 65648, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/gui.cpp", "max_stars_repo_name": "zhaoguoqingit/GroupMonitor", "max_stars_repo_head_hexsha": "26d250048dd8c1a20fd1849e616ada6ea9996464", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8...
[STATEMENT] lemma degree_pderiv_le: "degree (pderiv f) \<le> degree f - 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. degree (pderiv f) \<le> degree f - 1 [PROOF STEP] proof (rule ccontr) [PROOF STATE] proof (state) goal (1 subgoal): 1. \<not> degree (pderiv f) \<le> degree f - 1 \<Longrightarrow> False [PROOF ...
{"llama_tokens": 1541, "file": "Polynomial_Interpolation_Missing_Polynomial", "length": 19}
struct QuickMDP{ID,S,A,D<:NamedTuple} <: MDP{S,A} data::D end """ QuickMDP(gen::Function, [id]; kwargs...) Construct a generative MDP model with the function `gen` and keyword arguments. `gen` should take three arguments: a state, an action, and a random number generator. It should return a `NamedTuple` with...
{"hexsha": "e6633ee66c7d2644e2a9a80262cebebd2da9832e", "size": 8114, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/quick.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/QuickPOMDPs.jl-8af83fb2-a731-493c-9049-9e19dbce6165", "max_stars_repo_head_hexsha": "3e1ce5ef3d1c8da474dc0b2b685e66ea7403058f",...
@doc doc""" GraphManifoldType This type represents the type of data on the graph that the [`GraphManifold`](@ref) represents. """ abstract type GraphManifoldType end @doc doc""" EdgeManifoldManifold <: GraphManifoldType A type for a [`GraphManifold`](@ref) where the data is given on the edges. """ struct Edg...
{"hexsha": "1f49dbed5a9845472a01692ecb389f98afd27a19", "size": 7286, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/manifolds/GraphManifold.jl", "max_stars_repo_name": "manuelweisser/Manifolds.jl", "max_stars_repo_head_hexsha": "07f889a290ece01569c6c53bb0c96a5608923a0c", "max_stars_repo_licenses": ["MIT"], "...
# -*- coding: utf-8 -*- from __future__ import division, print_function __all__ = ["IntegratedLimbDarkOp"] import theano from theano import gof import theano.tensor as tt from .base_op import StarryBaseOp class IntegratedLimbDarkOp(StarryBaseOp): params_type = gof.ParamsType( tol=theano.scalar.float6...
{"hexsha": "cc4890424359e922e3ed9c226308dddcc50678ba", "size": 2974, "ext": "py", "lang": "Python", "max_stars_repo_path": "exoplanet/theano_ops/starry/integrated_limbdark.py", "max_stars_repo_name": "exowanderer/exoplanet", "max_stars_repo_head_hexsha": "dfd4859525ca574f1936de7b683951c35c292586", "max_stars_repo_licen...
import matplotlib matplotlib.use('Agg') import numpy as np import scipy.stats import matplotlib.pylab as plt import os import sys from .context import vfe from .context import config import pdb np.random.seed(42) # We first define several utility functions def kink_true(x): fx = np.zeros(x.shape) for t in ran...
{"hexsha": "5890d5e238d799e32b4fc3db64cede2b2b021fb0", "size": 4276, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/gpssm_vfe_examples.py", "max_stars_repo_name": "MattAshman/geepee", "max_stars_repo_head_hexsha": "ae71998579cb80e160f7ea5eb5adfa1c937fb90a", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/python3 # coding:utf-8 from flask import render_template,json,jsonify,request from app import app import base64 import tensorflow as tf import numpy as np import tensorflow.contrib.slim as slim import pickle from PIL import Image,ImageFont, ImageDraw __global_times = 0 __chinese_word_count = 3755 # 常见汉字...
{"hexsha": "060efe2544b9bdd047ccb62863ce6544fb3de599", "size": 6881, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/views.py", "max_stars_repo_name": "Stevenchooo/tensorflow-master", "max_stars_repo_head_hexsha": "1b7ee0fdcfd166cbbfabbbcf801cda56d8faca4e", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
function gen_player(model, number) if model == "uniform" # generate n uniformly spread over a given range elseif model == "random" # generate randomly according to given distribution end end
{"hexsha": "61b8f59ef6008626bff1fe2101136f41ac007d00", "size": 231, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Generation/PlayerGen.jl", "max_stars_repo_name": "JuliaTagBot/RatPack.jl", "max_stars_repo_head_hexsha": "44d5735c1bbfaa97b12d3f418b0e1c4b967da1df", "max_stars_repo_licenses": ["MIT"], "max_star...
# encoding=utf-8 """ Created on 17:25 2018/11/13 @author: Jindong Wang """ import numpy as np import scipy.io import bob.learn import bob.learn.linear import bob.math from sklearn.neighbors import KNeighborsClassifier class GFK: def __init__(self, Xs, Ys, Xt, Yt, dim=20): ''' Init func ...
{"hexsha": "22e7a5de13cd31a59f8e25ae67ee2d7468179b3f", "size": 6710, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/traditional/GFK/GFK.py", "max_stars_repo_name": "HyoKong/TransferLearning", "max_stars_repo_head_hexsha": "ae8c7104ca40705bc2437bdbc34483c46509ff57", "max_stars_repo_licenses": ["MIT"], "max_...
#!/usr/bin/env python # -*- coding: utf-8 -*- import math import os import pickle import re import time import warnings import cc3d import ants import numpy as np import scipy import scipy.io as spio from matplotlib import pyplot as plt from scipy import ndimage from skimage.measure import regionprops from sklearn.de...
{"hexsha": "bd715ed80229ab9ba1fe0cd87433acc274b8c3a5", "size": 40819, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/preprocLeadCT.py", "max_stars_repo_name": "dpedrosac/cDBS", "max_stars_repo_head_hexsha": "75ddb6a37a6f3b25f428005afc4e882bf31b09bf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
"""Main script to execute simulation (and inference).""" import argparse from datetime import datetime from pathlib import Path import numpy as np import pandas as pd from forecast.protocol.simulation_steps import sorting_and_sequencing from forecast.util.simulation import Simulation def parse_args(): """Parse ...
{"hexsha": "aa35ab80bd05cbd4b26a9a8e21a508667fbd8ece", "size": 3185, "ext": "py", "lang": "Python", "max_stars_repo_path": "forecast/run_simulation.py", "max_stars_repo_name": "Pierre-Aurelien/forecast", "max_stars_repo_head_hexsha": "d19c62bc7313c62836699bba2246afd0e79f1b53", "max_stars_repo_licenses": ["MIT"], "max_s...
""" cifar-10 dataset, with support for random labels """ import numpy as np import torch import torchvision.datasets as datasets class CIFAR10RandomLabels(datasets.CIFAR10): """CIFAR10 dataset, with support for randomly corrupt labels. Params ------ corrupt_prob: float Default 0.0. The probability of a l...
{"hexsha": "35164f6889ebcf8f52932a006c748ed82be1edd5", "size": 3493, "ext": "py", "lang": "Python", "max_stars_repo_path": "cifar10_data.py", "max_stars_repo_name": "huweiATgithub/fitting-random", "max_stars_repo_head_hexsha": "e5527f3c75cc19807c8cbd25790d99d48aed7e2c", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#include "tool/container/mapbox_vector_tile.hpp" #include <protozero/pbf_writer.hpp> #include <protozero/varint.hpp> #include <boost/assert.hpp> #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wsign-conversion" #include <boost/geometry.hpp> #include <b...
{"hexsha": "65758dac181e5aa02fd349ea4d5ee880dc12fa95", "size": 13508, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/tool/container/mapbox_vector_tile.cpp", "max_stars_repo_name": "mapbox/nepomuk", "max_stars_repo_head_hexsha": "8771482edb9b16bb0f5a152c15681c57eb3bb6b6", "max_stars_repo_licenses": ["MIT"], "m...
export TensorMesh3D, getTensorMesh3D export getCellCenteredGrid, getNodalGrid, getFaceGrids, getEdgeGrids export getCellCenteredAxes, getNodalAxes,getBoundaryNodes export getVolume, getVolumeInv, getFaceArea, getFaceAreaInv, getLength, getLengthInv """ mutable struct jInv.Mesh.TensorMesh3D <: AbstractTensorMesh F...
{"hexsha": "23566e23ce4e0c870bacbcef1fae6d1e0ab90137", "size": 11649, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Mesh/tensor.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/jInv.jl-3dacf901-f8cd-5544-86ed-7a705f85c244", "max_stars_repo_head_hexsha": "2e7305f231a29bd8e1e803b82cc2bc8e9b7a205a",...
# -*-coding:utf-8-*- import sys sys.path.append('.') import tensorflow as tf import tensorflow.contrib.slim as slim import time import numpy as np import cv2 from lib.dataset.dataietr import DataIter from lib.core.model.net.pruned_ssd import DSFD from mac_config import config as cfg from lib.helper.l...
{"hexsha": "7c6053ad852b1a1a7fe78b14192fd02d64f51b55", "size": 20740, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/core/base_trainer/mac_net_work.py", "max_stars_repo_name": "airacid/pruned-face-detector", "max_stars_repo_head_hexsha": "ef587e274ccf87633af653694890eb6712d6b3eb", "max_stars_repo_licenses":...
from DSPbox import MFCC import scipy.io.wavfile as wav import numpy as np import librosa rate, signal = wav.read('./Observation.wav') obser = MFCC(signal, rate) result = [] for i in range(5): rate, signal = wav.read('./{:d}.wav'.format(i+1)) compare = MFCC(signal, rate) d = np.zeros((len(obser)+1, len(comp...
{"hexsha": "7812175b4f8bfa2665340fb47d9aabe1ed398ae7", "size": 855, "ext": "py", "lang": "Python", "max_stars_repo_path": "HW16/HW16.py", "max_stars_repo_name": "JasonLiTW/assignment-speech-recognition", "max_stars_repo_head_hexsha": "794907a417d054477812c1f50695312601eae929", "max_stars_repo_licenses": ["MIT"], "max_s...
"""Custom Transform """ from typing import Optional, Union, Tuple import numpy as np from PIL import Image import torch import torch.nn as nn from torchvision.transforms import functional as F class Compose(object): def __init__(self, transforms): self.transforms = transforms def __call__(self, img,...
{"hexsha": "4e8f097e5ac4c7cb0044cc4b37048a6a342e97d0", "size": 3807, "ext": "py", "lang": "Python", "max_stars_repo_path": "yolo/data/transforms/transforms.py", "max_stars_repo_name": "DavianYang/yolo.ai", "max_stars_repo_head_hexsha": "0856d4f1e84428667046ee27270ff1bf742e658a", "max_stars_repo_licenses": ["MIT"], "max...
\documentclass[full]{subfiles} \ifthenelse{\value{singlefile} = 1} {\title{SUBJECT -- Lecture 1} \date{31st July 2013}} {} \begin{document}\ifthenelse{\value{singlefile} = 1}{\maketitle}{\chapter{Lecture 1}} \section*{Subject} \end{document}
{"hexsha": "1c5ef1998c64401500f553f4645a45e40662e7ec", "size": 245, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "LectureNotes/Lecture1.tex", "max_stars_repo_name": "harrisony/uni-latex-template", "max_stars_repo_head_hexsha": "b7051ee69743c5923d426b6e5a8132d409f17844", "max_stars_repo_licenses": ["Unlicense"], ...
from numpy import linspace, sin from chaco.api import ArrayPlotData, Plot from chaco.tools.api import PanTool, ZoomTool, DragZoom from enable.component_editor import ComponentEditor from traits.api import HasTraits, Instance, List from traitsui.api import Item, View, CheckListEditor class ToolChooserExample(HasTrait...
{"hexsha": "16c79b50472f65f244dde738a7fc74ac85bc99b1", "size": 1779, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/tutorials/scipy2008/tool_chooser.py", "max_stars_repo_name": "martinRenou/chaco", "max_stars_repo_head_hexsha": "1888da3ecee89f9b2d11900cda9333b32fc5e89a", "max_stars_repo_licenses": ["BS...
#!/usr/bin/python # Author: Srikanth Malla # Date: 28 Aug, 2020 # project lidar points in top view image import matplotlib.pyplot as plt import numpy as np import glob from joblib import Parallel, delayed import multiprocessing def lidar_top_view(lidar_file): lidar_points = np.load(lidar_file) fig = plt.figure(f...
{"hexsha": "546ccae43bd90b6d6af028f3bf2c69adfdab00f7", "size": 2186, "ext": "py", "lang": "Python", "max_stars_repo_path": "top_view_lidar.py", "max_stars_repo_name": "srikanthmalla/waymo_data_utils", "max_stars_repo_head_hexsha": "26588bb2cfc04dd1034d122ae8b14d3c2b3920c6", "max_stars_repo_licenses": ["MIT"], "max_star...
from sklearn.ensemble import RandomForestClassifier from sklearn.naive_bayes import BernoulliNB, MultinomialNB, GaussianNB from sklearn.tree import DecisionTreeClassifier from __future__ import division import matplotlib.pyplot as plt import numpy as np from sklearn.cross_validation import KFold from sklearn.ensemble ...
{"hexsha": "dc8aa13eea7f7ac5abd2535aec196da176f8a5e3", "size": 1704, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/features/build_features.py", "max_stars_repo_name": "satishkt/lending_club_classifier", "max_stars_repo_head_hexsha": "0b09d7dc7ff2dd998afe5ead5486e8156bc559f7", "max_stars_repo_licenses": ["F...
from pathlib import Path import cv2 import numpy as np from tqdm import tqdm pascal_classes_id = { 1: 'aeroplane', 2: 'bicycle', 4: 'boat', 5: 'bottle', 6: 'bus', 7: 'car', 9: 'chair', 11: 'diningtable', 14: 'motorbike', 18: 'sofa', 19: 'train', 20: 'tvmonitor' } def ...
{"hexsha": "42bd08c69de8b389d98c47941d07e61d16860faa", "size": 3565, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/pascal3d/preprocess_VOC_hariharan_masks.py", "max_stars_repo_name": "aimagelab/MCMR", "max_stars_repo_head_hexsha": "eb3556bffebc734c19e7f3e39dcf018ba28c63b3", "max_stars_repo_licenses": ...
r""" Emulator -------------- Precomputed synthetic spectral models are awesome but imperfect and rigid. Here we clone the most prominent spectral lines and continuum appearance of synthetic spectral models to turn them into tunable, flexible, semi-empirical models. We can ultimately learn the properties of the pre-c...
{"hexsha": "df4bdfcd40a3ed719aad6f61ec6bf165c82eeea5", "size": 17470, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/blase/emulator.py", "max_stars_repo_name": "gully/blase", "max_stars_repo_head_hexsha": "1f7f4b2cf77bd4a5d0e4591b4fd3581d7c0bfe25", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "...
from csv_parser import Parser import random a = Parser('transport_data.csv') a.open() dots = a.get_data() zero = [] first = [] second = [] q = [] for dot in dots: if dot.label == '0': zero.append(dot) if dot.label == '1': first.append(dot) if dot.label == '2': second.append(dot) ...
{"hexsha": "5418f3b83eb7b149b25090adfd2c34b6e11ad277", "size": 3493, "ext": "py", "lang": "Python", "max_stars_repo_path": "transport_data_analis/neural_network.py", "max_stars_repo_name": "levkovalenko/pm_task_2018", "max_stars_repo_head_hexsha": "8bffa5327dc59b1640d922c4faa7381eb4255ead", "max_stars_repo_licenses": [...
# Illustrate einstein summation # https://rockt.github.io/2018/04/30/einsum # https://docs.scipy.org/doc/numpy/reference/generated/numpy.einsum.html import superimport import numpy as np np.random.seed(42) a = np.arange(3) b = np.arange(3) A = np.arange(6).reshape(2,3) B = np.arange(15).reshape(3,5) S = np.arange(9)...
{"hexsha": "0a88c90e645debd1e52822284b20b674cca52104", "size": 5388, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/einsum_demo.py", "max_stars_repo_name": "vipavlovic/pyprobml", "max_stars_repo_head_hexsha": "59a2edc682d0163955db5e2f27491ad772b60141", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Forecasting with quadratic model The quadratic (non-linear) regression model explores a linear relationship between the forecast variabl...
{"hexsha": "db6568b9fbce199ac9c6f919d451f4cc2259265b", "size": 6019, "ext": "py", "lang": "Python", "max_stars_repo_path": "kats/models/quadratic_model.py", "max_stars_repo_name": "utkucanaytac/Kats", "max_stars_repo_head_hexsha": "9781615750a2f3b49f16cccf335b5c29fdfd181a", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import matplotlib.pyplot as plt import stan_utils as stan from mpl_utils import (mpl_style, common_limits) plt.style.use(mpl_style) def generate_data(N, M, D, scales=None, seed=None): """ Generate some toy data to play with. Here we assume all :math:`N` stars have been observed by al...
{"hexsha": "a873e6e776032792b2aee21f0ea9cce795362399", "size": 3657, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "andycasey/uber-chemi-cal", "max_stars_repo_head_hexsha": "8fc3cfbf7b54145779b1635496426c5473cedb56", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
""" Functions and methods for creating ancillary quality control variables and filters (masks) which can be used with various corrections routines in ACT. """ import numpy as np import xarray as xr import dask from act.qc import qctests, comparison_tests @xr.register_dataset_accessor('qcfilter') class QCFilter(qct...
{"hexsha": "6b3a80fc6fa0d9a2ddfa98b2a6a0d2109d799776", "size": 38882, "ext": "py", "lang": "Python", "max_stars_repo_path": "act/qc/qcfilter.py", "max_stars_repo_name": "zssherman/ACT", "max_stars_repo_head_hexsha": "db87008aa6649d3d21b79ae97ea0f11d7f1f1935", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun...
##python practice file from __future__ import print_function import numpy as np import matplotlib.pyplot as plt from astropy.visualization import astropy_mpl_style plt.style.use(astropy_mpl_style) import astropy.units as u from astropy.time import Time from astropy.coordinates import SkyCoord, EarthLocation, AltAz impo...
{"hexsha": "48e859e9885fad690fe3e4a45089af694cef3624", "size": 2622, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/samedec.py", "max_stars_repo_name": "luciencd/starhopper", "max_stars_repo_head_hexsha": "564eae99bc770b143855312d583bbeaaad676ff1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
# -*- coding: utf-8 -*- import numpy as np from pyam.logger import logger from pyam.utils import isstr, cast_years_to_int # %% def fill_series(x, year): """Returns the value of a timeseries (indexed over years) for a year by linear interpolation. Parameters ---------- x: pandas.Series a...
{"hexsha": "c4c932f56e3e16447c8c262809ff6b5b214dde01", "size": 4360, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyam/timeseries.py", "max_stars_repo_name": "khaeru/pyam", "max_stars_repo_head_hexsha": "c91551d753c739316fca7dae043d4605211e05cc", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": n...
[STATEMENT] lemma finter_transfer [transfer_rule]: assumes "bi_unique A" shows "(rel_fset A ===> rel_fset A ===> rel_fset A) finter finter" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (rel_fset A ===> rel_fset A ===> rel_fset A) (|\<inter>|) (|\<inter>|) [PROOF STEP] using assms [PROOF STATE] proof (prove) us...
{"llama_tokens": 506, "file": null, "length": 4}
struct LayerNotFoundException <: Exception var::String end function Base.showerror(io::IO, e::LayerNotFoundException) println(io, typeof(e), ": ", e.var) end
{"hexsha": "6ad20ba4b48e4b5b0936b69511564c6ba81872e1", "size": 166, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/exceptions.jl", "max_stars_repo_name": "quatrix/HTTP.jl", "max_stars_repo_head_hexsha": "657dbf9a5d1d87e6e085158a5a053553fcaed032", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
"""Tests ring polymer contraction. Copyright (C) 2013, Joshua More and Michele Ceriotti 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 (at your option) any later...
{"hexsha": "ad9556fbea41f9e72ba5fd5bdd1baefb08fe4297", "size": 3843, "ext": "py", "lang": "Python", "max_stars_repo_path": "lammps-master/tools/i-pi/ipi/tests/test_contraction.py", "max_stars_repo_name": "rajkubp020/helloword", "max_stars_repo_head_hexsha": "4bd22691de24b30a0f5b73821c35a7ac0666b034", "max_stars_repo_li...