text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# coding=utf-8 # Copyright 2018 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
{"hexsha": "849a5e25473fda39b1fbfb61ff57c6c0b009a856", "size": 12336, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/graph_builder.py", "max_stars_repo_name": "lc0/agents", "max_stars_repo_head_hexsha": "10e2461799cb6c294abc28def773f2bd4ad79404", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
import math import os import random import logging import copy import queue from pygame.math import Vector2 import time import numpy as np import sys parent = os.path.dirname(os.path.realpath(__file__)) sup = os.path.join(parent, 'supplements') sys.path.append(sup) import util class BaseAgent: ...
{"hexsha": "96ecb2f683d9f89d720e564416aea0985b93afa3", "size": 142542, "ext": "py", "lang": "Python", "max_stars_repo_path": "challenge_submissions/submit_766922/my_submission.py", "max_stars_repo_name": "opendilab/GoBigger-Challenge-2021", "max_stars_repo_head_hexsha": "794897e94caf15b69635dcb36eb64e1341131db9", "max_...
import pyautogui import numpy as np import cv2 import time import autoplayV2 print('-----------') current_map = '' def find_image(given_image: str): ''' See if bonus rewards symbol is on the screen. :returns: True if symbol found, false otherwise. Location of best match. ''' found ...
{"hexsha": "2784714fc70af0b83f50ca2797c3c522b96760d5", "size": 7925, "ext": "py", "lang": "Python", "max_stars_repo_path": "Autoplay/play_collection_event.py", "max_stars_repo_name": "Randy-Hodges/BTD6-Autoplay", "max_stars_repo_head_hexsha": "6d2ac9685b5f55848decc285918f8ede465c3a63", "max_stars_repo_licenses": ["MIT"...
FUNCTION K60R(J,M,K,L,R, JA) C BY JIM GRAASKAMP AND KEN KATZEN C FROM CARDS BY JM 2/22/79 k60r=ja ! Added 7/27/93 to report own old value IF (M-1)1,1,2 1 ID=0 K60R=0 GO TO 50 2 IF (ID-1)3,4,4 3 K60R=J IF (M-11)50,5,6 5 IF (K-23)51,50,50 6 IF (M-21)50,7,8 7 ...
{"hexsha": "aef5c45280a1e281bc67f8c62061814da8592e3d", "size": 579, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/strategies/k60r.f", "max_stars_repo_name": "Axelrod-Python/TourExec", "max_stars_repo_head_hexsha": "498b07394d215ce7d7df5bb7fd3aaa35eeda8317", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import torch import numpy as np from models.model_cnn import Sentiment_CNN as model_torch params_numpy=np.load('params_numpy') import pdb; pdb.set_trace()
{"hexsha": "04dce086501dcd5bb8d1ae20f9e947f481702e89", "size": 162, "ext": "py", "lang": "Python", "max_stars_repo_path": "others/cloud/sentiment_analysis/converting_scripts/convert_numpy_to_torch.py", "max_stars_repo_name": "luluseptember/inference", "max_stars_repo_head_hexsha": "acbc7b0bf288343ed81e62b69dea8afec03d6...
//---------------------------------------------------------- -*- Mode: C++ -*- // $Id$ // // Created 2008/06/11 // // Author: Sriram Rao // // Copyright 2008-2012,2016 Quantcast Corporation. All rights reserved. // // This file is part of Kosmos File System (KFS). // // Licensed under the Apache License, Version 2.0 //...
{"hexsha": "05068c3f6ce8d81775cae7d68bb48b8f478d018a", "size": 7053, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/cc/chunk/chunktrimmer_main.cc", "max_stars_repo_name": "beol/qfs", "max_stars_repo_head_hexsha": "41201cfc1ff6c081324543712d0c02074fa66326", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
import numpy as np import tensorflow as tf from tensorflow.keras.models import Model from dlf.core.registry import register_model, get_active_experiment from dlf.core.builder import build_model_wrapper from dlf.core.model import ModelWrapper from dlf.layers.centernet_detections import CenternetDetections from dlf.util...
{"hexsha": "d08794a695ec4c5fbb436154cfe58faca26eef3f", "size": 10261, "ext": "py", "lang": "Python", "max_stars_repo_path": "dlf/models/centernet.py", "max_stars_repo_name": "scheckmedia/dl-framework", "max_stars_repo_head_hexsha": "8fea39e166fda0ff8fa51696831bf5cb42f3ed10", "max_stars_repo_licenses": ["Apache-2.0"], "...
import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib import style from sklearn.metrics import max_error # fig, axes = plt.subplots() class Function(): def __init__(self,a,b,c): self.fig, self.ax = plt.subplots() self.x, self.y = [], [] self.plt ...
{"hexsha": "c0090671165a8b560227f94ffdc7237203e3bb12", "size": 982, "ext": "py", "lang": "Python", "max_stars_repo_path": "motor/test/function.py", "max_stars_repo_name": "geekincode/math_little_research", "max_stars_repo_head_hexsha": "dbd649bfe7c3e9f7b7e393f5b0b85305190eee17", "max_stars_repo_licenses": ["MIT"], "max...
from sklearn.manifold import TSNE from sklearn.decomposition import PCA import matplotlib.pyplot as plt import numpy as np import math cm = plt.cm.get_cmap('RdYlBu') a = np.load("/home/xxx/AAAI/My-ZSSBIR/tsne/danbu_Berlin_ske_em_tsne.npy") X_tsne = TSNE(learning_rate=100).fit_transform(a) Y = [] for i in range(800): ...
{"hexsha": "d36aaa367d428218b2161ef32642be47834ff42f", "size": 458, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/tsne/tsne.py", "max_stars_repo_name": "haowang1992/PCMSN", "max_stars_repo_head_hexsha": "c2467dc84a4fbea19161c31c70b72162bee1047f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
/* ============================================================================================== * * isotropic_remeshing.cpp * * Performs an isotropic remeshing of a region of a polygon mesh. Depends on CGAL * * Example Usage * ------------- * [Fnew, Vnew, Fnnew, Vnnew] = ... * isotropic_remeshing(...
{"hexsha": "b491127bd422421c67b387b5b5bf7e123e3ba69e", "size": 8159, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "external/CGAL_Code/IsotropicRemeshing/isotropic_remeshing.cpp", "max_stars_repo_name": "npmitchell/tubular", "max_stars_repo_head_hexsha": "5c33acb289f2dab13d7e8645a190b52e985ad241", "max_stars_repo...
#CS583 DATA MINING AND TEXT MINING #authors-Namaswi Chandarana(nchand22@uic.edu),Vanisre Jaiswal(vjaisw2@uic.edu) # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd print("Import") # Importing the dataset dataset = pd.read_csv('data_2_train.csv') #dataset=dataset.d...
{"hexsha": "56aac5c738b99a5a34379968747f4bfad3a092c6", "size": 17007, "ext": "py", "lang": "Python", "max_stars_repo_path": "dmtm project final.py", "max_stars_repo_name": "namaswic/Aspect-Based-Sentiment-Analysis", "max_stars_repo_head_hexsha": "4804ca97d2bd026cb3692a5a6f651c31b8ef7971", "max_stars_repo_licenses": ["M...
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Morenikeji Neri -/ import algebra.euclidean_domain.instances import ring_theory.unique_factorization_domain /-! # Principal ideal rings and principal ideal domains > THIS...
{"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/src/ring_theory/principal_ideal_domain.lean"}
function y = FourierShift2D(x, delta) % % y = FourierShift(x, [delta_x delta_y]) % % Shifts x by delta cyclically. Uses the fourier shift theorem. % % Real inputs should give real outputs. % % By Tim Hutt, 26/03/2009 % Small fix thanks to Brian Krause, 11/02/2010 % The size of the matrix. [N, M] = size(x); % FFT of o...
{"author": "aludnam", "repo": "MATLAB", "sha": "020b5cb02cc843e09a0ed689589382f18cce5e6d", "save_path": "github-repos/MATLAB/aludnam-MATLAB", "path": "github-repos/MATLAB/aludnam-MATLAB/MATLAB-020b5cb02cc843e09a0ed689589382f18cce5e6d/image_proc/FourierShift2D.m"}
from __future__ import print_function import tensorflow as tf import numpy as np import tensorflow.contrib.eager as tfe from sklearn.metrics import f1_score from tensorflow.image import resize_images from tensorflow.keras.initializers import he_normal, glorot_normal from random import choice # ########################...
{"hexsha": "a1ae3290eaada3951b95521e544216a2cdeff16f", "size": 67722, "ext": "py", "lang": "Python", "max_stars_repo_path": "annsa/model_classes.py", "max_stars_repo_name": "samgdotson/annsa", "max_stars_repo_head_hexsha": "b8e3622c5866e7cfd4595da8565f713be9618a59", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
import numpy as np arr = np.array([1, 2, 3, 4, 5]) print(arr) print(np.__version__) # checking numpy version
{"hexsha": "39a2683f47c214f49aa49e2e2fe765d31c0c9146", "size": 121, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/Numpy/numpy 2 - getting started.py", "max_stars_repo_name": "omkarsutar1255/Python-Data", "max_stars_repo_head_hexsha": "169d0c54b23d9dd5a7f1aea41ab385121c3b3c63", "max_stars_repo_licenses":...
""" Some functional programing tools. """ import numpy as np def act(F, X): """Act with functions in F on the columns of X. Create a matrix Y = [F(X1)|F(X2)|...|F(Xd)] Args: F (tuple of vectorized callables): Functions to apply over the columns of X. Each function should be vectorized, X ...
{"hexsha": "892d3d384b11e4f3060e2e33d1fa58cdb6c55a38", "size": 594, "ext": "py", "lang": "Python", "max_stars_repo_path": "rta/array_operations/functional.py", "max_stars_repo_name": "MatteoLacki/rta", "max_stars_repo_head_hexsha": "93944d6fc934126e0bb4d076c8b4213cadbe49a1", "max_stars_repo_licenses": ["BSD-2-Clause"],...
#!/usr/bin/env python3 # -*- coding: utf-8 -* # *********************************************** # @Time : 06/05/2021 00:38 # @File : camera_calibrate.py # @email : xiang.chen.17@ucl.ac.uk # @author: Xiang Chen # *********************************************** import numpy as np import cv2 def projection_matrices():...
{"hexsha": "15321a26f03dcad0853bcaff4d32e7095d72686f", "size": 2681, "ext": "py", "lang": "Python", "max_stars_repo_path": "camera_calibrate.py", "max_stars_repo_name": "rechardchen123/Crowded_analysis", "max_stars_repo_head_hexsha": "1d5cf100ab977c0c02e762e973638aaaac121fa2", "max_stars_repo_licenses": ["MIT"], "max_s...
# __all__ = ['candlestick_trades'] import numpy as np import ctypes import os def _getpath(): #return r"/Users/tim/Library/Caches/clion10/cmake/generated/c57b29e0/c57b29e0/Debug/" return r"/Users/tim/dev/signals/build" def _load_candlestick_lib(): return np.ctypeslib.load_library("libsignals", _getpath...
{"hexsha": "29c238e012c482ee31f5fe13a9ec1da637479dc8", "size": 1780, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/candlestick.py", "max_stars_repo_name": "tambu-j/signals", "max_stars_repo_head_hexsha": "9768e0c3b993d2a75cb0e6c3360197033739e9b4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
''' Derived from: https://github.com/jonasrothfuss/ProMP/blob/master/meta_policy_search/envs/mujoco_envs/ant_rand_direc_2d.py ''' import numpy as np from collections import OrderedDict from gym import utils from rlkit.envs.meta_mujoco_env import MetaMujocoEnv from rlkit.envs.meta_task_params_sampler import MetaTaskPara...
{"hexsha": "fd214ae515e021bb4036a39f0cacbda06b8071b3", "size": 8273, "ext": "py", "lang": "Python", "max_stars_repo_path": "rlkit/envs/ant_rand_direc_2d.py", "max_stars_repo_name": "yifan-you-37/rl_swiss", "max_stars_repo_head_hexsha": "8b0ee7caa5c1fa93860916004cf4fd970667764f", "max_stars_repo_licenses": ["MIT"], "max...
import pandas as pd import numpy as np from typing import * from moonlight.dataset import Dataset class ProjectionDataset(Dataset): def __init__(self): super().__init__() self.primary_keys = ["mlbamid"] self.meta_cols = ["firstname", "lastname"] self.points_col = "fg_points" ...
{"hexsha": "9e814b51afdfa468edac7e104af15b1a2d3ca93a", "size": 3793, "ext": "py", "lang": "Python", "max_stars_repo_path": "moonlight/steamer_dataset.py", "max_stars_repo_name": "brendancooley/moonlight", "max_stars_repo_head_hexsha": "487a58a6c92f5175392d18b2538b3ffb82d6e07c", "max_stars_repo_licenses": ["MIT"], "max_...
# """ # fill_and_evaluate(net, batch; batch_size, fill_batches) # Evaluate a neural network on a batch of inputs. # If `fill_batches=true`, the batch is padded with dummy inputs until # it has size `batch_size` before it is sent to the network. # This function is typically called by inference servers. # """ funct...
{"hexsha": "d45bf3b37bd9144c98a0802309f2ca0d7eb7ebfb", "size": 9902, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "MuZero/simulations.jl", "max_stars_repo_name": "michelangelo21/AlphaZero.jl", "max_stars_repo_head_hexsha": "8c6852ffd3a27dede310f8186910ddc8048b71ed", "max_stars_repo_licenses": ["MIT"], "max_star...
subroutine getptilde(nd,p) include 'constants.f' include 'npart.f' include 'ptilde.f' integer nd,i,j double precision p(mxpart,4) do j=1,4 do i=1,npart+2 p(i,j)=ptilde(nd,i,j) enddo enddo return end
{"hexsha": "4187ef61aebd3451a248accb6b368296553b2077", "size": 286, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MCFM-JHUGen/src/Need/getptilde.f", "max_stars_repo_name": "tmartini/JHUGen", "max_stars_repo_head_hexsha": "80da31668d7b7eb5b02bb4cac435562c45075d24", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
println("Hello world") # something. #new change on the main branch #something again. #just this one other thing. something added to the temp branch.
{"hexsha": "45f78624290686cd9827e5e1ee2cce101b668d5c", "size": 153, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test.jl", "max_stars_repo_name": "RodolfoBreves/testGit", "max_stars_repo_head_hexsha": "765a62a6839206c1c9abb23ff4940d726ce57ed2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
[STATEMENT] lemma split_face_empty_ram2_ram1_in_f12: "pre_split_face oldF ram1 ram2 [] \<Longrightarrow> (f12, f21) = split_face oldF ram1 ram2 [] \<Longrightarrow> (ram2, ram1) \<in> edges f12" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>pre_split_face oldF ram1 ram2 []; (f12, f21) = split_face oldF...
{"llama_tokens": 2109, "file": "Flyspeck-Tame_FaceDivisionProps", "length": 18}
[STATEMENT] lemma not_diamond_contract: "\<not> diamond(contract1)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> diamond (\<rightarrow>\<^sup>1) [PROOF STEP] unfolding diamond_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> (\<forall>x y. x \<rightarrow>\<^sup>1 y \<longrightarrow> (\<forall>y'...
{"llama_tokens": 187, "file": null, "length": 2}
import cv2 import numpy as np import os DNN_IMAGE_SIZE = (512, 512) def predict_bounding_boxes(image, weights, config, classes): width = image.shape[1] height = image.shape[0] scale = 1.0 / 255.0 # = 0.00392 # read pre-trained model and config file net = cv2.dnn.readNet(weights, config) _, ...
{"hexsha": "3d2cdb77bdddfbc07c0db74ab3d3c32ead554296", "size": 4918, "ext": "py", "lang": "Python", "max_stars_repo_path": "server/detection.py", "max_stars_repo_name": "otamajakusi/tile-score", "max_stars_repo_head_hexsha": "b1ba7549f2738d1e6b56ba6b7af54440b0b7cb75", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
{"hexsha": "839e452875d43b1483d95157706de483799a6028", "size": 10344, "ext": "py", "lang": "Python", "max_stars_repo_path": "graph_attribution/templates.py", "max_stars_repo_name": "edwardelson/graph-attribution", "max_stars_repo_head_hexsha": "021ed2a05a37e44d0a45bf2e3785735ac6959dac", "max_stars_repo_licenses": ["Apa...
[STATEMENT] lemma "\<forall>(x::real) (y::real). \<lfloor>x\<rfloor> = \<lfloor>y\<rfloor> \<longrightarrow> 0 \<le> \<bar>y - x\<bar> \<and> \<bar>y - x\<bar> \<le> 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>x y. \<lfloor>x\<rfloor> = \<lfloor>y\<rfloor> \<longrightarrow> 0 \<le> \<bar>y - x\<bar> \...
{"llama_tokens": 166, "file": null, "length": 1}
# ***************************************************************************** # Copyright (c) 2018, NVIDIA CORPORATION. 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...
{"hexsha": "b74a9d263d39839704e356fca6f0713397c35715", "size": 8889, "ext": "py", "lang": "Python", "max_stars_repo_path": "inference.py", "max_stars_repo_name": "puririshi98/TacoTron", "max_stars_repo_head_hexsha": "258a93259b343cf77f5e68e6984b507b16ecaedb", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun...
[GOAL] ι : Type u α : Type v inst✝¹ : DecidableEq α t : ι → Finset α inst✝ : Fintype ι x : ι a : α ha : ∀ (s : Finset ι), Finset.Nonempty s → s ≠ univ → card s < card (Finset.biUnion s t) s' : Finset ↑{x' | x' ≠ x} ⊢ card s' ≤ card (Finset.biUnion s' fun x' => erase (t ↑x') a) [PROOFSTEP] haveI := Classical.decEq ι [GO...
{"mathlib_filename": "Mathlib.Combinatorics.Hall.Finite", "llama_tokens": 49031}
import numpy as np import os import re from matplotlib.pylab import * from .. import dnpdata as _dnpdata def import_vna(path): ''' Import VNA data and return dnpdata object ''' x, data = import_snp(path) # Not General dnpDataObject = _dnpdata(data,[x],['f'],{}) return dnpDataObject def impor...
{"hexsha": "c5bea3d996cac9a04c6d7775f3e5677859cd5a66", "size": 1709, "ext": "py", "lang": "Python", "max_stars_repo_path": "dnplab/dnpImport/vna.py", "max_stars_repo_name": "mawenzy/DNPLab", "max_stars_repo_head_hexsha": "4de38c6f4f44d526584df0d82e16f39d5a44cb9b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
[STATEMENT] lemma countable_separating_set_linorder1: shows "\<exists>B::('a::{linorder_topology, second_countable_topology} set). countable B \<and> (\<forall>x y. x < y \<longrightarrow> (\<exists>b \<in> B. x < b \<and> b \<le> y))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<exists>B. countable B \<and> (...
{"llama_tokens": 8339, "file": null, "length": 97}
import pytest import numpy as np from kdtrees import KDTree @pytest.mark.parametrize("points_1d_delete,delete_1d, delete_1d_exp", [ ([[4],[2],[5],[3],[7],[1],[9]], np.array([3]), "[4], axis: 0, nodes: 6\n" + \ "\t[7], axis: 0, nodes: 3\n" + \ "\t\t[9], axis: 0, nodes: 1\n" + \ "\t\t\tNone\n" + "...
{"hexsha": "1f20ed0dcb6f850a9eec216115887d75770b0ef0", "size": 2557, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_kdtree_delete.py", "max_stars_repo_name": "paradoxysm/kdtrees", "max_stars_repo_head_hexsha": "dd948151d78b2e44cb0a567f32d3e1b47eaf87b5", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
function [policy, EU] = upot_to_opt_policy(pot) % UPOT_TO_OPT_POLICY Compute an optimal deterministic policy given a utility potential % [policy, EU] = upot_to_opt_policy(pot) % % policy(a,b, ..., z) = P(do z | a, b, ..), which will be a delta function % EU is the contraction of this potential, i.e., P .* U sz = pot.s...
{"author": "bayesnet", "repo": "bnt", "sha": "bebba5f437b4e1e29169f0f3669df59fb5392e62", "save_path": "github-repos/MATLAB/bayesnet-bnt", "path": "github-repos/MATLAB/bayesnet-bnt/bnt-bebba5f437b4e1e29169f0f3669df59fb5392e62/BNT/potentials/@upot/upot_to_opt_policy.m"}
import os import numpy as np import pandas as pd import cv2 import matplotlib.pyplot as plt import fnmatch from sklearn.model_selection import train_test_split from glob import glob imagePatches = glob('./IDC_regular_ps50_idx5/**/*.png',recursive = True) def multiplot(): plt.rcParams['figure.figsize'] = (10.0, 10....
{"hexsha": "f74b7fe189d63be3f9241fc1c4b06e4682fffcce", "size": 1861, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_preprocess.py", "max_stars_repo_name": "atharvamh/Predicting-IDC-in-Breast-Cancer", "max_stars_repo_head_hexsha": "b9b4dff53256042947749c0ad0ba0536e9984a5a", "max_stars_repo_licenses": ["MIT"...
c c ----------------------------------------------------------------------- c subroutine setIndices(ist,iend,ilo,ihi, & ishift,level) use amr_module implicit double precision (a-h,o-z) dimension ist(3), iend(3), ishift(3) c ::::::::::::::::::::::::::::::::::::::...
{"hexsha": "b240ef9ffb5eddeaca11472cceaa2e4cd1e4fa6a", "size": 1133, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/1d/setIndices.f", "max_stars_repo_name": "navravi/amrclaw", "max_stars_repo_head_hexsha": "727d98d243c521267c927f6fe107ba6f1155597b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
import pandas as pd import functools import numpy as np from pulp import * class OptimizationProblem: def __init__(self, client_df, fund_df, model_df, ac_len, fund_len): self.fund_list = fund_df['Fund Name'] self.ac_len = ac_len self.fund_len = fund_len self.fund_df = fund_df.ilo...
{"hexsha": "b05607118b38bea150df7f3cd49ee53267eb8edc", "size": 5607, "ext": "py", "lang": "Python", "max_stars_repo_path": "dist/scripts/poptimization.py", "max_stars_repo_name": "mephet/mkjm-backend", "max_stars_repo_head_hexsha": "839d2dd14cfe3c46455e3387d1b17a2666a519b3", "max_stars_repo_licenses": ["MIT"], "max_sta...
!------------------------------------------------------------------------------- ! Copyright (c) 2016 The University of Tokyo ! This software is released under the MIT License, see LICENSE.txt !------------------------------------------------------------------------------- !> \brief Adaptive Mesh Refinement !C !C*** !...
{"hexsha": "c54f35df7906c4b296a988705e69834f0b2d4874", "size": 1692, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "hecmw1/src/operations/adaptation/hecmw_adapt_get_new_cell_info.f90", "max_stars_repo_name": "tkoyama010/FrontISTR", "max_stars_repo_head_hexsha": "2ce1f0425b87df76261c86ddb93bb4b588f72718", "max...
[STATEMENT] lemma d_def_split [simp]: "d (x \<sqinter> nc) + d (x \<cdot> 0) = d x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. d (x \<sqinter> nc) + d (x \<cdot> (0::'a)) = d x [PROOF STEP] by (metis local.d_add_ax x_split_var)
{"llama_tokens": 115, "file": "Multirelations_C_Algebras", "length": 1}
import cv2 import random import numpy as np from PIL import Image def convert_OpenCV_to_PIL(image): return Image.fromarray(image[..., ::-1]) def convert_PIL_to_OpenCV(image): return np.asarray(image)[..., ::-1] class RandomResize: def __init__(self, min_image_size, max_image_size): self.min_imag...
{"hexsha": "feb608890d05676daac7685802cc0f25509b0326", "size": 8383, "ext": "py", "lang": "Python", "max_stars_repo_path": "CUSTOM/tools/ai/augment_utils.py", "max_stars_repo_name": "CVI-SZU/CCAM", "max_stars_repo_head_hexsha": "4149f3feff62157a03a441b7dacc6b187b7aea70", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
''' Common kernels ''' import numpy as np def linear_kernel(x, y): ''' Linear kernel is simply he dot product of the vectors x and y. ''' return np.dot(x, y) def gaussian_kernel(x, y, sigma=0.5): ''' ''' numerator = np.dot(x-y, x-y) denominator = 2*sigma*sigma return np.exp(-numerator / denominator)
{"hexsha": "b422d70f514a5a3f2184ef2191cf88ceae8a0bba", "size": 315, "ext": "py", "lang": "Python", "max_stars_repo_path": "MLib/Core/kernels.py", "max_stars_repo_name": "rvegaml/SIMLR", "max_stars_repo_head_hexsha": "5d50cd1ccd5f34bf095c499e3be2e739950a0145", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "m...
import numpy as np import tensorflow from tensorflow.keras.datasets import mnist from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout from tensorflow.keras.utils import to_categorical def NeuralNetwork(X, Y): num_classes = len(np.unique(Y)) Y_train = to_categ...
{"hexsha": "e48c2e6954e12e04eecb6bd633c7887078957ca7", "size": 1087, "ext": "py", "lang": "Python", "max_stars_repo_path": "tis/nets.py", "max_stars_repo_name": "gditzler/tis-experiment", "max_stars_repo_head_hexsha": "8972707820f4f0a0e4b9779dedf396ce31bbe5c9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
# -*- coding: utf-8 -*- """ Created on Tue Nov 6 21:40:17 2018 @author: lixinpeng """ import os, re, time, datetime, copy import random import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.optim import lr_scheduler from torch.autograd import Variable import numpy ...
{"hexsha": "49747025261a686758e00b42cfadc5e874f953f5", "size": 8792, "ext": "py", "lang": "Python", "max_stars_repo_path": "solver/solver_base_bce_adam_sklearn.py", "max_stars_repo_name": "Sampson-Lee/SIB-Net", "max_stars_repo_head_hexsha": "650399082e9237327fa38168ccfc7d48153a1db5", "max_stars_repo_licenses": ["MIT"],...
# coding=utf-8 from os.path import join import numpy import matplotlib.pyplot as plt def _get_time_info(ms): """.""" tb.open(ms, nomodify=True) times = numpy.unique(tb.getcol('TIME_CENTROID')) tb.close() time_range = [numpy.min(times), numpy.max(times)] num_times = len(times) length = time...
{"hexsha": "8080565670f5a70a7fb8c5eff954bc73b9d43c07", "size": 6437, "ext": "py", "lang": "Python", "max_stars_repo_path": "pybda/casa_scripts/plot_baseline.py", "max_stars_repo_name": "OxfordSKA/bda", "max_stars_repo_head_hexsha": "0f92bead29a26d18fddaf5eb2ecd6f6d92401c2d", "max_stars_repo_licenses": ["BSD-3-Clause"],...
using Ramnet.Encoders using Ramnet using Random using StaticArrays using ..Approximators:QDiscriminator using ..Buffers: MultiStepDynamicBuffer, add! using ..Environments mutable struct SARSADiscountedDiscriminatorAgent{AS,OS,T <: Real,O <: StaticArray{Tuple{OS},T,1},A <: Real,E <: AbstractEncoder{T}} <: AbstractAge...
{"hexsha": "bca40af33f36b7cec75e93a71dbae3292b9b7cd2", "size": 4924, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Agents/WNN/SARSADiscountedDiscriminatorAgent.jl", "max_stars_repo_name": "RafaelFK/RLWorktable.jl", "max_stars_repo_head_hexsha": "b8a5bb88fc92f604a03b5142446f7e9f18de2746", "max_stars_repo_lic...
"""Contains various graphs for building the entire model __author__ = "kvmanohar22" """ from datetime import datetime import numpy as np import os import sys import time from modules import * from utils import Dataset from utils import utils class Model(object): """Defines the base class for all models """...
{"hexsha": "49283efbaf1d268888920ea2cfb8ab3f428b3f08", "size": 40788, "ext": "py", "lang": "Python", "max_stars_repo_path": "nnet/__init__.py", "max_stars_repo_name": "ourobouros/img2imgGAN", "max_stars_repo_head_hexsha": "9556afd7f3424bf99b67ec5b42e4f82bede2ef7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
classdef edgefx % EDGEFX: Edgefunction class % Constructs edgefunctions that are based on numerous geomteric and % topographic criteria that guide the spatially variability of elemental % resolution when building a mesh. % Copyright (C) 2018 Keith Roberts & William Pringle % % T...
{"author": "CHLNDDEV", "repo": "OceanMesh2D", "sha": "56222604a5c1fe897d10c8b08cb3380ef8b43740", "save_path": "github-repos/MATLAB/CHLNDDEV-OceanMesh2D", "path": "github-repos/MATLAB/CHLNDDEV-OceanMesh2D/OceanMesh2D-56222604a5c1fe897d10c8b08cb3380ef8b43740/@edgefx/edgefx.m"}
# split into train and test set from os import listdir from xml.etree import ElementTree from numpy import expand_dims from numpy import mean from numpy import zeros from numpy import asarray from mrcnn.utils import Dataset from matplotlib import pyplot from mrcnn.visualize import display_instances from mrcnn.utils imp...
{"hexsha": "1cd3e012db261195d6fbf684d0f4c727e2f16ef1", "size": 6579, "ext": "py", "lang": "Python", "max_stars_repo_path": "rcnn_implementation.py", "max_stars_repo_name": "saipraneeth133/VoidDetection", "max_stars_repo_head_hexsha": "0d17cb9255d3f09ca97e630cb220eaa4fb0b3edf", "max_stars_repo_licenses": ["MIT"], "max_s...
using ArnoldiMethod using ArnoldiMethodTransformations using LinearAlgebra using SparseArrays using Statistics using Test N = 20 # construct fixed eval matrix in random basis @testset "generalized eigenvalue problem: " begin for i ∈ 1:500 A = rand(N,N) B = N*I + rand(ComplexF64,N,N) # fin...
{"hexsha": "3d9bd078a285eeb48b5a449c50c79783f4ec2239", "size": 953, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/generalized_eigenvalue_problem.jl", "max_stars_repo_name": "wrs28/ArnoldiMethodWrapper", "max_stars_repo_head_hexsha": "794850c332eb93e0509ef58dad85b98bdb23d6c4", "max_stars_repo_licenses": ["M...
using BenchmarkTools, BioMotifInference, BioBackgroundModels, BioSequences println(Threads.nthreads()) source_pwm = [.7 .1 .1 .1 .1 .1 .1 .7 .1 .1 .7 .1] source_pwm_2 = [.6 .1 .1 .2 .2 .1 .1 .6 .1 .2 .6 .1] sources = [(log.(source_pwm), 1),(log.(source_pwm_2), 1)] bg_scores = log.(fill(.1, (150,10000))) obs=zeros(UIn...
{"hexsha": "5257d792d5ddae6ca89c0d64465fd9a251287ac2", "size": 702, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/lh_perf.jl", "max_stars_repo_name": "mmattocks/BioMotifInference.jl", "max_stars_repo_head_hexsha": "facb261133a9903b2d414653baf0bfe8adcc24e7", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#!/usr/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2020 Daniel Schick # # 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 with...
{"hexsha": "4511607c736b5a252ede425a31bb749de4c318c8", "size": 115909, "ext": "py", "lang": "Python", "max_stars_repo_path": "udkm1Dsim/simulations/xrays.py", "max_stars_repo_name": "theodoho/udkm1Dsim", "max_stars_repo_head_hexsha": "1d2c10bc052f0b6ebb8f65c45cf8ce3f32dddddb", "max_stars_repo_licenses": ["MIT"], "max_s...
Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: * Offset * Info * Type * Sym\. *Value * Sym\. * Name * \+ * Addend 12340010 00000008 R_X86_64_RELATIVE 123400a0 12340020 00000008 R_X86_64_RELATIVE 123400a0 12340060 00000008 R_X86_64_RELATIVE 123400a0 1...
{"hexsha": "4ea93bacfccc6cbda934d929c95287e4d9456029", "size": 700, "ext": "rd", "lang": "R", "max_stars_repo_path": "tests/binutils-2.30/src/ld/testsuite/ld-x86-64/x86-64-x32-export-class.rd", "max_stars_repo_name": "sillywalk/grazz", "max_stars_repo_head_hexsha": "a0adb1a90d41ff9006d8c1476546263f728b3c83", "max_stars...
# %% import mxnet as mx from mxnet import gluon, nd from mxnet.gluon import nn import numpy as np class ELU(nn.HybridBlock): def __init__(self, alpha=1.0, **kwargs): super(ELU, self).__init__(**kwargs) self._alpha = alpha def hybrid_forward(self, F, x): return F.LeakyReLU(x, act_type=...
{"hexsha": "1e02e6494fe7b5e856310320d488d708d94e1748", "size": 3520, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/ESIM.py", "max_stars_repo_name": "fierceX/match_gluon", "max_stars_repo_head_hexsha": "23f9004439e4854d08a02d9a851bba2db82ece2d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
(* Title: HOL/Library/Z2.thy Author: Brian Huffman *) section \<open>The Field of Integers mod 2\<close> theory Z2 imports Main begin text \<open> Note that in most cases \<^typ>\<open>bool\<close> is appropriate when a binary type is needed; the type provided here, for historical reasons named \<^...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/Library/Z2.thy"}
# # Heat equation tutorial # In this tutorial, we'll be solving the [heat # equation](https://en.wikipedia.org/wiki/Heat_equation): # `` # \frac{∂ ρcT}{∂ t} + ∇ ⋅ (-α ∇ρcT) = 0 # `` # where # - `t` is time # - `α` is the thermal diffusivity # - `T` is the temperature # - `ρ` is the density # - `c` is the heat c...
{"hexsha": "7ca1c7b970cfcc0da004edfe97a884d98697a4d1", "size": 12971, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "tutorials/Land/Heat/heat_equation.jl", "max_stars_repo_name": "leios/CLIMA", "max_stars_repo_head_hexsha": "44c45eb762b8dc4c5af091079f2d65c024cb8d27", "max_stars_repo_licenses": ["Apache-2.0"], "m...
[STATEMENT] lemma rel_option_option_rel_eq[pred_set_conv]: "rel_option (\<lambda> x y. (x, y) \<in> A) = (\<lambda> f g. (f, g) \<in> \<langle>A\<rangle> option_rel)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. rel_option (\<lambda>x y. (x, y) \<in> A) = (\<lambda>f g. (f, g) \<in> \<langle>A\<rangle>option_r...
{"llama_tokens": 166, "file": "Transition_Systems_and_Automata_Basic_Refine", "length": 1}
def transformer(data): import numpy as np polynomial_action = lambda x: (1.0 + 0.0j) * np.power(x, 4.0) + (1.0 + 1.0j) * np.power(x, 2.0) configs = data["Config"].values[:, 0] + 1.0j * data["Config"].values[:, 1] action = polynomial_action(configs) data.insert(len(data.columns), ("Action","", 0), np...
{"hexsha": "13da5083a37c7889dd6ce184be844fc877f25b33", "size": 423, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulations/ComplexPolynomialModel/data/ComplexPolynomialModelComplexLangevin/raw/raw_transformer.py", "max_stars_repo_name": "statphysandml/LatticeModelImplementations", "max_stars_repo_head_hexsh...
import numpy as np import paddle,torch import time from . import Algorithm from pdb import set_trace as breakpoint # from paddleRotNet.algorithms import Algorithm # SEED=100 # torch.manual_seed(SEED) # paddle.seed(SEED) # np.random.seed(SEED) def accuracy(output, target, topk=(1,),flag='paddle'): """Computes th...
{"hexsha": "6d0cab2dcdebd254fe269c7243684c822b4c519f", "size": 6035, "ext": "py", "lang": "Python", "max_stars_repo_path": "paddleRotNet/algorithms/FeatureClassificationModel.py", "max_stars_repo_name": "HydrogenSulfate/Feature-Learning-RotNet", "max_stars_repo_head_hexsha": "5635de3c02c50174d80520e7a1e02db46bd672fd", ...
\documentclass[a4paper,12pt, notitlepage]{article} \usepackage[top=25mm,bottom=25mm,left=25mm,right=25mm]{geometry} %\usepackage{amsmath} \usepackage{graphicx} %\usepackage{epstopdf} \usepackage{listings} \usepackage{color} \usepackage{url} \usepackage{setspace} %\usepackage[square, numbers]{natbib} \usepackage{titl...
{"hexsha": "1d4675b2493a1c95b3a871196b1d70298e489ada", "size": 9949, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/GettingStarted/adjpwr.tex", "max_stars_repo_name": "devtank-ltd/devtank-dtlib", "max_stars_repo_head_hexsha": "32d354d2cb5c3b2f8838d07fb1e1d4ceb611e885", "max_stars_repo_licenses": ["MIT"], "ma...
[STATEMENT] lemma map_fst_zip_take: "map fst (zip xs ys) = take (min (length xs) (length ys)) xs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. map fst (zip xs ys) = take (min (length xs) (length ys)) xs [PROOF STEP] by (induct xs ys rule: list_induct2') simp_all
{"llama_tokens": 116, "file": null, "length": 1}
############################################################ # abstract types hierarchy # # joAbstractOperator # * joAbstractLinearOperator # * joAbstractParallelableLinearOperator # * joAbstractFosterLinearOperator # * joAbstractLinearOperatorInplace # * joAbstractSAparallelOperator # * joAbstractSAparallelToggle...
{"hexsha": "90cffed075c582edf46df8b9b6e0e8e49bd599f2", "size": 5238, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/joTypes/joAbstractTypes.jl", "max_stars_repo_name": "slimgroup/JOLI.jl", "max_stars_repo_head_hexsha": "c1f669e34353394fd9a4711dc0038cf697bc0ad3", "max_stars_repo_licenses": ["MIT"], "max_stars...
function CJS_empirical(F::Matrix,ndim::Int64,nsamples::Int64,nsteps::Int64) results = zeros(ndim,ndim) for k in 1:ndim for l in k:ndim lbound = minimum(F[:,k]) rbound = maximum(F[:,k]) #print(edf(F[:,k],rbound)) int=0.0 for u in 1:nsteps ...
{"hexsha": "918e4552f145f05fffdb9fc44d9cc30b6d4b03da", "size": 717, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/benchmark_measures.jl", "max_stars_repo_name": "niclaspopp/MultivariateDiscretization.jl", "max_stars_repo_head_hexsha": "a3f9a058319f82d8904623d86d36ac884af72b9b", "max_stars_repo_licenses": ["...
# conx - a neural network library # # Copyright (c) 2016-2017 Douglas S. Blank <dblank@cs.brynmawr.edu> # # 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 # (a...
{"hexsha": "21d5fd58eda79aaf3e862a5ff6db958052fc235e", "size": 57822, "ext": "py", "lang": "Python", "max_stars_repo_path": "conx/dataset.py", "max_stars_repo_name": "Quantitative-Big-Imaging/conx", "max_stars_repo_head_hexsha": "ef87690ef2aa1ac40700e4e0d0112228bf790d41", "max_stars_repo_licenses": ["MIT"], "max_stars_...
// // Copyright (c) 2018 CNRS // // This file is part of tsid // tsid is free software: you can redistribute it // and/or modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation, either version // 3 of the License, or (at your option) any later version. // tsid...
{"hexsha": "b8ad54990c041b270f79c5442628b6a5715a594c", "size": 2018, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/tsid/bindings/python/solvers/HQPOutput.hpp", "max_stars_repo_name": "NimaPng/tsid", "max_stars_repo_head_hexsha": "23bbc6bace4f4623c2189535e71ba63bedbc4368", "max_stars_repo_licenses": ["BSD...
#some set up import numpy as np from PIL import Image # load the test image im_path = r'gestures/circle.jpg' im = Image.open(im_path) # Read Image into Numpy Array im_input = np.asarray(im) # Reshape Input to be (3,224,224) instead of (224,224,3) tmp = np.zeros((3,224,224)) for i in range(0,224): for j in range(...
{"hexsha": "c9daf7bb6824374d9900af7dfd827584f5c290b6", "size": 1095, "ext": "py", "lang": "Python", "max_stars_repo_path": "streaming/test.py", "max_stars_repo_name": "hishamelreedy/innovatefpga-GestureRecognitionAccelerator", "max_stars_repo_head_hexsha": "576e432875f5736f71cf915187ea6b42f376089a", "max_stars_repo_lic...
from argparse import Namespace import logging import random from typing import Callable, List, Union import os from sklearn.preprocessing import StandardScaler from tensorboardX import SummaryWriter import torch import torch.nn as nn from torch.nn.utils.clip_grad import clip_grad_norm_ from torch.optim import Optimize...
{"hexsha": "b6ed772f08e64111f876dd1f9dd28ecefbbf046d", "size": 12046, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_utils.py", "max_stars_repo_name": "andy-d-palmer/chemprop", "max_stars_repo_head_hexsha": "eeb3a06c39e475bd7c9b9eb8a56b06eeaef3236e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
using NiLang, NiLang.AD @i function iexp(out!, x::T; atol::Float64=1e-14) where T @anc anc1 = zero(T) @anc anc2 = zero(T) @anc anc3 = zero(T) @anc iplus = 0 @anc expout = zero(T) out! += identity(1.0) @routine r1 begin anc1 += identity(1.0) while (value(anc1) > atol, iplus ...
{"hexsha": "18abf01825d4e593e09c8613857ecf6976e8c754", "size": 1698, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "project/iexp.jl", "max_stars_repo_name": "PallHaraldsson/NiLang.jl", "max_stars_repo_head_hexsha": "09e4c5f044ca8b02b78a4c3cb7f307a5ce35b981", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
# @Author: Billy Li <billyli> # @Date: 11-03-2021 # @Email: li000400@umn.edu # @Last modified by: billyli # @Last modified time: 11-25-2021 import sys from pathlib import Path import numpy as np from matplotlib import pyplot as plt util_dir = Path.cwd().parent.joinpath('Utility') sys.path.insert(1, str(util_d...
{"hexsha": "87cc0ad7b0a3ff4aa158bbef3b6dd24a4bdd9390", "size": 880, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/scratch/plotHits_zt.py", "max_stars_repo_name": "billy000400/Mu2e_MLTracking", "max_stars_repo_head_hexsha": "675e62d844ff8a5ccba9019e316c374c40658101", "max_stars_repo_licenses": ["MIT"], "...
import math import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from mpl_toolkits import mplot3d #%matplotlib inline import numpy as np fig = plt.figure() ax = fig.add_subplot(111, projection = '3d') #Velocity in the X direction xv = 4.5 #Velocity in the Y direction ...
{"hexsha": "0ff59679dc3f38de82ca34885e4493679f1db54b", "size": 3860, "ext": "py", "lang": "Python", "max_stars_repo_path": "Kinematics.py", "max_stars_repo_name": "Jalki/Physics-Vectors", "max_stars_repo_head_hexsha": "9c7095488e1408766f53da8596c70f7f0fcbf406", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
function spre(O::AbstractArray) N = size(O, 1) A = spdiagm( ones(ComplexF64, N) ) B = O return kron(A, B) end function spost(O::AbstractArray) N = size(O, 1) A = sparse( transpose(O) ) B = spdiagm( ones(ComplexF64, N) ) return kron(A, B) end function sprepost(A, B::AbstractArray) ...
{"hexsha": "730717bb4fe71877e5488722e3e96b1cef57abaa", "size": 1619, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/quantum_operators.jl", "max_stars_repo_name": "albertomercurio/QuPhys.jl", "max_stars_repo_head_hexsha": "f9d2027d296e0527c4997e18bd3d6af1ae01bbb7", "max_stars_repo_licenses": ["MIT"], "max_sta...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicab...
{"hexsha": "e0594681983b443fc98bcf9078cc329173da34f5", "size": 5596, "ext": "py", "lang": "Python", "max_stars_repo_path": "ERNIE-Vil/pt_finetune_meme.py", "max_stars_repo_name": "weihezhai/HatefulMemesChallenge", "max_stars_repo_head_hexsha": "04f52643c0864d1efb6c0a9c674db42764f6834c", "max_stars_repo_licenses": ["MIT...
import os import numpy as np from gym import spaces import mujoco_py from envs.gym_kuka_mujoco.envs.assets import kuka_asset_dir from envs.gym_kuka_mujoco.utils.quaternion import identity_quat, subQuat, quatAdd, mat2Quat from envs.mujoco.utils.kinematics import forwardKinSite, forwardKinJacobianSite, forwardVelKinSite...
{"hexsha": "648e596ba0c6ca3120d64a9b0f34ea154ebb1851", "size": 39208, "ext": "py", "lang": "Python", "max_stars_repo_path": "envs/gym_kuka_mujoco/controllers/iMOGVIC.py", "max_stars_repo_name": "hzm2016/assistive-gym-robosuite", "max_stars_repo_head_hexsha": "5c529f4444cc386383618bfa584341740a8468f9", "max_stars_repo_l...
#pragma once /* * Copyright (c) 2013 Aldebaran Robotics. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the COPYING file. */ #ifndef _QI_DETAILS_TRACKABLE_HXX_ #define _QI_DETAILS_TRACKABLE_HXX_ #include <boost/function.hpp> #include <boost/bind.hpp> #incl...
{"hexsha": "66d739fb48b4eafe09d638f0f81dbc5f4880c741", "size": 7041, "ext": "hxx", "lang": "C++", "max_stars_repo_path": "source/human-robot-interaction/include/ALDEBARAN/qi/details/trackable.hxx", "max_stars_repo_name": "AravinthPanch/gesture-recognition-for-human-robot-interaction", "max_stars_repo_head_hexsha": "42e...
*colib6.f C $Id: colib6.f,v 1.1.1.1 2001/04/09 08:15:53 visscher Exp $ C $Log: colib6.f,v $ C Revision 1.1.1.1 2001/04/09 08:15:53 visscher C Source and other files for MOLFDIR as distributed in 1998-2000. C C Revision 5.2.1.1 1997/07/02 11:50:06 calderon C niko_version1 C C Revision 5.2 1997/06/16 11:13:12 calde...
{"hexsha": "a131881a3fbbb15527b226a3025a74d28ac31973", "size": 22282, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "source/argosecp/cmdc/colib6.f", "max_stars_repo_name": "MOLFDIR/MOLFDIR", "max_stars_repo_head_hexsha": "e71c7ecf77ee018bbdeaa004dda04369ce02be89", "max_stars_repo_licenses": ["Apache-2.0"], "max...
import Base.merge,Base.== export merge, == """ merge(cons::Array{SeisCon,1}) Merge the elements of `con`, a vector of SeisCon objects, into one SeisCon object. """ function merge(cons::Array{SeisCon,1}) # Check similar metadata ns = get_confield(cons, :ns) dsf = get_confield(cons, :dsf) if all(...
{"hexsha": "ed54deeac063017965514d2ecd89bb8dbfceea8c", "size": 3495, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/methods/merge.jl", "max_stars_repo_name": "marclanglois/SegyIO.jl", "max_stars_repo_head_hexsha": "602eca342ea16f6b1072b8f5785afcfe68fbfc53", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Matrix Factorization class # Instantiate this object and perform matrix factorization on any sidpy dataset # Note that matrix factorization can only operate on 2D matrices. So we will automatically reshape # all datasets to be two dimensional (spatial v spectral) import sidpy import numpy as np import matplotlib.pypl...
{"hexsha": "73fd3a47ea716de7530cef02c7c291c908562cf0", "size": 2817, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycroscopy/learn/ml/matrix_factor.py", "max_stars_repo_name": "itsalexis962/pycroscopy", "max_stars_repo_head_hexsha": "8a6557408ffdc332cef102616be16e26a396532f", "max_stars_repo_licenses": ["MIT"...
# -*- coding: utf-8 -*- # # Author: Abdul-Saboor Sheikh <sheikh@tu-berlin.de) # Lincense: Academic Free License (AFL) v3.0 # # Reference: Sheikh, A. S., Shelton, J. A., & Luecke, J. # A Truncated EM Approach for Spike-and-Slab Sparse # Coding. JMLR (accepted, 2014). import numpy as np from math import pi from ...
{"hexsha": "652ee5fb60f0c9c54630ba4a3780e497a9324475", "size": 37141, "ext": "py", "lang": "Python", "max_stars_repo_path": "prosper/em/camodels/gsc_et.py", "max_stars_repo_name": "OOub/prosper", "max_stars_repo_head_hexsha": "0865c1dff85a3b5d1f32a4c20d159bbe2df94ce5", "max_stars_repo_licenses": ["AFL-3.0"], "max_stars...
import unittest import numpy as np import numpy.testing as npt from squidward import gpc, utils from squidward.kernels import distance, kernel_base # useful for debugging np.set_printoptions(suppress=True) np.random.seed(0) class ClassificationTestCase(unittest.TestCase): """Class for guassian process classific...
{"hexsha": "f1cfa05c6407ce74115cfc0ab446b5b703bffe30", "size": 11247, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/gpc_test.py", "max_stars_repo_name": "looyclark/Gaussian_Processes", "max_stars_repo_head_hexsha": "f02aa64bfbca8b3086e403a81178e6ae4702b48a", "max_stars_repo_licenses": ["MIT"], "max_stars...
#include <Eigen/Core> #include <numpy_eigen/boost_python_headers.hpp> Eigen::Matrix<float, 6, Eigen::Dynamic> test_float_6_D(const Eigen::Matrix<float, 6, Eigen::Dynamic>& M) { return M; } void export_float_6_D() { boost::python::def("test_float_6_D", test_float_6_D); }
{"hexsha": "9c0d5422e2421e32f460fa9f2b793a6a8102ad0d", "size": 272, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Schweizer-Messer/numpy_eigen/src/autogen_test_module/test_6_D_float.cpp", "max_stars_repo_name": "chengfzy/kalibr", "max_stars_repo_head_hexsha": "fe9705b380b160dc939607135f7d30efa64ea2e9", "max_star...
""" A = JopLeakyIntegration(spc; α=0.99, dim=1) `A` is Leaky integration (i.e. a running sum) along dimension `dim` of `spc::JetSpace{T,N}`. The result is scaled by `α`. """ #= From stanford: http://sep.stanford.edu/sep/prof/geelib/leakint.lop tt = 0.0 if (adj) do i = n, 1, -1 { tt ...
{"hexsha": "a6a8eed64b186e85f4e9167f117807a960dfa978", "size": 1432, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/jop_leaky_integration.jl", "max_stars_repo_name": "ChevronETC/JetPack.jl", "max_stars_repo_head_hexsha": "7b18a65344155dee4422958f54d045db354aaf6e", "max_stars_repo_licenses": ["MIT"], "max_sta...
#include <pbcopper/poa/PoaGraph.h> #include <cstddef> #include <limits> #include <sstream> #include <boost/foreach.hpp> #include <boost/graph/topological_sort.hpp> #include <boost/unordered_set.hpp> #include "PoaGraphImpl.h" #include "VectorL.h" namespace PacBio { namespace Poa { namespace detail { std::string se...
{"hexsha": "65eab20e4791b6801a73c2febbe7baea673c60a7", "size": 10823, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/poa/PoaGraphTraversals.cpp", "max_stars_repo_name": "PacificBiosciences/pbcopper", "max_stars_repo_head_hexsha": "ba98ddd79371c2218ca5110d07d5f881c995ff93", "max_stars_repo_licenses": ["BSD-3-C...
''' Written by Rebecca Ringuette, 2021 ''' from datetime import datetime, timedelta, timezone #variable name in file: [standardized variable name, descriptive term, units] model_varnames = {'Ne':['N_e','variable description',0,'SPH','sph',['time','lon','lat','radius'],'1/m**3'], 'Te':['T_e','variable...
{"hexsha": "6903febee2035b433f59ca1e90e7ef13cd780e5d", "size": 16012, "ext": "py", "lang": "Python", "max_stars_repo_path": "kamodo_ccmc/readers/iri_4D.py", "max_stars_repo_name": "EnsembleGovServices/Kamodo-ccmc-readers", "max_stars_repo_head_hexsha": "75841f7ad832997159046d4b2523e0a244316e9d", "max_stars_repo_license...
import sys import argparse import h5py import torch import numpy as np def load_sent(path): par = [] with open(path, 'r+') as f: for l in f: if l.strip() == '': continue par.append(split_par(l.rstrip())) return par def load_token(path): tokens = [] with open(path, 'r+') as f: for l in f: if l....
{"hexsha": "ad048e2428bc21538cc654f5d1fe0ff52756d259", "size": 3068, "ext": "py", "lang": "Python", "max_stars_repo_path": "get_unique_sent.py", "max_stars_repo_name": "utahnlp/layer_augmentation_qa", "max_stars_repo_head_hexsha": "a3dd2d7af6f45b2aa500ff7612f77c31fb879cf0", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import numpy as np import matplotlib.pyplot as plt import astropy.units as u from astropy.io import fits from astropy.wcs import WCS from astropy.coordinates import Angle def radius_arcsec(shape, w, ra, dec, pa, incl, incl_correction=False, cosINCL_limit=0.5): # All inputs assumed as Angle if...
{"hexsha": "644799f89f066489c308742718376acf4c87a329", "size": 1733, "ext": "py", "lang": "Python", "max_stars_repo_path": "standard/radius_projection.py", "max_stars_repo_name": "ElthaTeng/multiline-ngc3351", "max_stars_repo_head_hexsha": "3a48054d82d711f4fd7fba47ff7a0dbcf02f1be9", "max_stars_repo_licenses": ["MIT"], ...
import torch from torch import nn from modules.commons.layers import Embedding from modules.commons.nar_tts_modules import EnergyPredictor, PitchPredictor from modules.tts.commons.align_ops import expand_states from modules.tts.fs import FastSpeech from utils.audio.cwt import cwt2f0, get_lf0_cwt from utils.audio.pitch....
{"hexsha": "89ef47a9a017d8b54b108f58d3445d148f8ea44e", "size": 5355, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules/tts/fs2_orig.py", "max_stars_repo_name": "zjumml/NATSpeech", "max_stars_repo_head_hexsha": "b1cf33e336a69e8550953bf8091e1b5ac6c0608e", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import argparse import pickle from os import mkdir from os.path import join, exists from tensorflow.python.framework.errors_impl import OutOfRangeError from tqdm import tqdm from debias.datasets.dataset_utils import QuantileBatcher, build_epoch_fn from debias.datasets.squad import AnnotatedSquadLoader, load_annotated...
{"hexsha": "9a431bfb96b86606ceec7cfa2bd8a457ee12d8c1", "size": 7647, "ext": "py", "lang": "Python", "max_stars_repo_path": "debias/preprocessing/train_squad_bias.py", "max_stars_repo_name": "chrisc36/debias", "max_stars_repo_head_hexsha": "98033fd569499879ba8d0ef917b37913660f3701", "max_stars_repo_licenses": ["Apache-2...
\documentclass[12pt,a4paper]{article} \usepackage{a4wide} \usepackage{graphics} % for pdf, bitmapped graphics files \usepackage{graphicx} \usepackage{epsfig} % for postscript graphics \usepackage{subfigure} \usepackage{multirow} \usepackage{float} \usepackage{booktabs} \usepackage{amssymb} \usepackage{amsmath} \usepac...
{"hexsha": "5e0d8c01c7366891e7134ae9a89c5ccf0859dedd", "size": 14742, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report/Icra-2018.tex", "max_stars_repo_name": "iamthevastidledhitchhiker/Zentropy", "max_stars_repo_head_hexsha": "4bedfc527024559da4c84c6b5df81012dd693802", "max_stars_repo_licenses": ["MIT"], "ma...
"""Module with feature selection functions""" import numpy as np def shrink(df): x_cols_shrink = ['GEOID','year','name','population', 'poverty-rate', 'renter-occupied-households', 'pct-renter-occupied', 'median-gross-rent', 'median-household-income','median-property-value','rent-burden','pct-white'...
{"hexsha": "a55c7dd3da66724ddfd2c8f63742d352f4f733f4", "size": 6732, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_files/feature_selection.py", "max_stars_repo_name": "NicoleJaneway/dc_eviction_regression", "max_stars_repo_head_hexsha": "b14fb85139b765d3b2b88801fd96f62c4634d008", "max_stars_repo_license...
# This code is revised from voxel flow by Ziwei Liu https://github.com/liuziwei7/voxel-flow from __future__ import print_function import glob import numpy as np import os import Queue import random import threading import cv2 import pdb data_dir = './DRV/' def load_fn_example(train_id): gt_path = glob.glob(data_...
{"hexsha": "86cab1f58aa3de9b891dfd696c08017e28dde4fd", "size": 3073, "ext": "py", "lang": "Python", "max_stars_repo_path": "prefetch_queue_shuffle.py", "max_stars_repo_name": "cchen156/Seeing-Motion-in-the-Dark", "max_stars_repo_head_hexsha": "e3e81e742489f997bba30bf331c8d3fa58ddc2b0", "max_stars_repo_licenses": ["MIT"...
from multiprocessing import Pool import pickle import numpy as np from scipy.stats import poisson, binom, multivariate_normal from scipy.special import logsumexp import matplotlib.pyplot as plt def model(ndays0, offset_days, # day offset to the left n0, # the initial number of patients at day-0 ...
{"hexsha": "f09d9937117eec5f35444bc9b8e509b78b1292dd", "size": 8959, "ext": "py", "lang": "Python", "max_stars_repo_path": "oldmodels/model_emcee.py", "max_stars_repo_name": "mfkasim91/idcovid19", "max_stars_repo_head_hexsha": "3e51b16354581a4e0defc635f837f93faff26afc", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
from typing import Tuple, List, Iterable, TYPE_CHECKING from pyomo.environ import Var, ConcreteModel from .utils import flatten if TYPE_CHECKING: from .links import Link3D class VariableList: """Access pyomo variables using `variable_list[fe,cp]`, with `fe = 1..nfe`, `cp = 1..ncp` (ie, one-based) ""...
{"hexsha": "fccf62a58ca99a84ea5342a49d0283deb2e8954a", "size": 946, "ext": "py", "lang": "Python", "max_stars_repo_path": "physical_education/variable_list.py", "max_stars_repo_name": "alknemeyer/physical_education", "max_stars_repo_head_hexsha": "7bcad4111bc153a0c9c080f11a43295bd1d8c425", "max_stars_repo_licenses": ["...
import numpy as np import time import itertools def linear_surplus_confidence_matrix(B, alpha): # To construct the surplus confidence matrix, we need to operate only on the nonzero elements. # This is not possible: S = alpha * B S = B.copy() S.data = alpha * S.data return S def log_surplus_conf...
{"hexsha": "27bdf8a141f6db200f666b627dde99350d687666", "size": 5329, "ext": "py", "lang": "Python", "max_stars_repo_path": "wmf.py", "max_stars_repo_name": "eldrin/wmf", "max_stars_repo_head_hexsha": "7a4d72e47034f4289ea3c73d28886eabd6ab5762", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 79, "max_stars_repo_s...
[STATEMENT] lemma check_if: fixes s'::s and cs::branch_s and css::branch_list and v::v shows "\<Theta>; \<Phi>; B; G; \<Delta> \<turnstile> s' \<Leftarrow> \<tau> \<Longrightarrow> s' = IF (V_lit ll) THEN s1 ELSE s2 \<Longrightarrow> \<Theta> ; {||} ; GNil \<turnstile>\<^sub>w\<^sub>f \<tau> \<Longr...
{"llama_tokens": 51792, "file": "MiniSail_Safety", "length": 35}
""" Detects Cars in an image using KittiSeg. Input: Image Output: Image (with Cars plotted in Green) Utilizes: Trained KittiSeg weights. If no logdir is given, pretrained weights will be downloaded and used. Usage: python demo.py --input_image data/demo.png [--output_image output_image] [--logdir /pa...
{"hexsha": "e068e55ef3aeefaf6ba145a3469e799c1d2ea567", "size": 9058, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo.py", "max_stars_repo_name": "rgalvaomesquita/KittiSeg", "max_stars_repo_head_hexsha": "ac93c2f0f83bf84f2ba0d645f819b2bbeeeaf58d", "max_stars_repo_licenses": ["MIT-0", "MIT"], "max_stars_count...
""" ======================================================================== 01. Import data, apply MaxWell filter to MEG data, and find bad channels ======================================================================== The data are imported from the BIDS folder. If you chose to run Maxwell filter (config.use_maxw...
{"hexsha": "f4da2382b3e4d813c3ca64d7d2efa0abbb1993dc", "size": 21030, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/preprocessing/01-import_and_maxfilter.py", "max_stars_repo_name": "rob-luke/mne-bids-pipeline", "max_stars_repo_head_hexsha": "bb388fd4c2580078560de7bdfd7c1a01ead51e5a", "max_stars_repo_l...
export Dirichlet """ Description: Dirichlet factor node Multivariate: f(out, a) = Dir(out|a) = Γ(Σ_i a_i)/(Π_i Γ(a_i)) Π_i out_i^{a_i} where 'a' is a vector with every a_i > 0 Matrix variate: f(out, a) = Π_k Dir(out|a_*k) where 'a' represents a left-stochastic matrix with e...
{"hexsha": "a3e930e089da2468c5fa7b2a8ebd2ead73af74a8", "size": 6913, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/factor_nodes/dirichlet.jl", "max_stars_repo_name": "biaslab/ForneyLab.jl", "max_stars_repo_head_hexsha": "b10b7200bec8696dc2c5d96bb3a0b8e64126614e", "max_stars_repo_licenses": ["MIT"], "max_sta...
######################################## ## cfg ## ######################################## source("cfg.r") graphics.off() items = c(2:3, 5:6) limits = list(c(0.01,0.05, 0.1, 0.2, 0.4, 0.6, 0.8), c(0.01,0.05, 0.1, 0.2, 0.4, 0.6, 0.8)) cols = list(c("#ffffd9", "#c7e9b4", "#41b6c4", "#225ea8"...
{"hexsha": "3e076b3f3ce0d10fbc4e8fd944dba63c3f053b01", "size": 2825, "ext": "r", "lang": "R", "max_stars_repo_path": "plot_controls.r", "max_stars_repo_name": "douglask3/savanna_fire_feedback_test", "max_stars_repo_head_hexsha": "3c8cedcafd6b841efea6e8813ca674039336f19e", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
import numpy as np import random import numbers from collections.abc import Sequence import cv2 as cv from typing import List def _setup_angle(x): if isinstance(x, numbers.Number): if x < 0: raise ValueError("If {} is a single number, it must be positive.") x = [-x, x] else: ...
{"hexsha": "1dfc8007f5da4c7811b13e0b0d7e77191839936d", "size": 3356, "ext": "py", "lang": "Python", "max_stars_repo_path": "transforms_deprecated/randomrotation.py", "max_stars_repo_name": "edificewang/imageclassification", "max_stars_repo_head_hexsha": "c356dc5a50aa2fbe1713921fc238a710416fe966", "max_stars_repo_licens...
import os import random import numpy as np import json from reader.sheet import Sheet from type.cell.semantic_cell_type import SemanticCellType from type.block.function_block_type import FunctionBlockType from type.layout.layout_graph import LayoutGraph from type.layout.basic_edge_type import BasicEdgeType from type.ce...
{"hexsha": "f36fb8c2e285624b8ad7c18df697c76bc551dcc5", "size": 5579, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_loader/load_majid_data.py", "max_stars_repo_name": "abhinav-kumar-thakur/table-understanding", "max_stars_repo_head_hexsha": "5448e02dec87ea3974bfc118ebeace86e8918285", "max_stars_repo_licens...
# Install: pip3 install kafka-python from kafka import KafkaConsumer from sqlalchemy import create_engine from io import StringIO from kubernetes import client, config, watch from kubernetes.client.rest import ApiException import pywebhdfs.webhdfs import socket import requests import mysql.connector import pandas impor...
{"hexsha": "f7ae2a136b19c11e007961b23d8ff130a6058257", "size": 10576, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyspark_app/spark_control.py", "max_stars_repo_name": "shabaldina/Spark-and-Kafka-in-K8S", "max_stars_repo_head_hexsha": "16fd4b821889bd27e9eec18cb084e852a8dda0e8", "max_stars_repo_licenses": ["A...