text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import numpy as np import scipy from scipy.spatial import ConvexHull import matplotlib.pyplot as plt def basic_cube(): """ Cube based on ordering in program """ return np.array([ [-7.156285 , -3.80337925, -1.95817204], [-7.156285 , -3.80337925, -1.70817204], [-7.156285 , -3....
{"hexsha": "e96d4aee45de7723967f618b9e373afe3dd49741", "size": 40845, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymove/molecules/marching_cubes_lookup.py", "max_stars_repo_name": "manny405/PyMoVE", "max_stars_repo_head_hexsha": "82045fa27b3bd31f2159d3ad72dc0a373c5e7b23", "max_stars_repo_licenses": ["BSD-3-...
#!/usr/bin/python2 # This script computes every artist's Snoop Dogg Number their shortest path to Snoop Dogg by # performing a breadth-first traversal and computing the results in a single pass of the vertices. # This method can only be applied to the unweighted graph. # # This script runs in O(|E|) as far as I know. ...
{"hexsha": "d6d4963b67d8067d78bbbe32d026ae2a20bc60f7", "size": 2137, "ext": "py", "lang": "Python", "max_stars_repo_path": "compute_snoopdogg_number_bfs.py", "max_stars_repo_name": "basimr/SnoopDoggNumber", "max_stars_repo_head_hexsha": "9574ba6c611ecfac100e8dcccc87c3ec5e33ed76", "max_stars_repo_licenses": ["MIT"], "ma...
import logging import warnings import keras import keras.backend as K import numpy as np def load_model(path): return keras.models.load_model( path, custom_objects={ 'OffsetAndScale': OffsetAndScale, '_sigmoid2': _sigmoid2 } ) def simple_model(data_x, ...
{"hexsha": "ef16163d3331262ed99ec56ba6164c21d86a199c", "size": 4012, "ext": "py", "lang": "Python", "max_stars_repo_path": "keras_utils.py", "max_stars_repo_name": "SuperSourav/transliterationLangugageDetect", "max_stars_repo_head_hexsha": "df2a812ed9488daeb33b262679c4716a26e26cfb", "max_stars_repo_licenses": ["MIT"], ...
from sklearn.base import RegressorMixin from ...predictors.predictor import DL85Predictor import numpy as np from math import floor, ceil class DL85Regressor(DL85Predictor, RegressorMixin): """An optimal binary decision tree regressor. Parameters ---------- max_depth : int, default=1 Maximum d...
{"hexsha": "fd3b24209d117c4f77fe8b9662ceb76414dca280", "size": 6104, "ext": "py", "lang": "Python", "max_stars_repo_path": "dl85/supervised/regressors/regressor.py", "max_stars_repo_name": "valentinlemaire/pydl8.5", "max_stars_repo_head_hexsha": "a846f3c36bacbbe01ff87c31413342069b0cf61b", "max_stars_repo_licenses": ["M...
import numpy as np from collections import OrderedDict from rlcard.envs import Env from rlcard.games.blackjack import Game DEFAULT_GAME_CONFIG = { 'game_num_players': 1, } class BlackjackEnv(Env): ''' Blackjack Environment ''' def __init__(self, config): ''' Initialize the Blackj...
{"hexsha": "e0797a542775e26c25f5c7447276198bd122ffad", "size": 3269, "ext": "py", "lang": "Python", "max_stars_repo_path": "rlcard/envs/blackjack.py", "max_stars_repo_name": "syntaxp/rlcard", "max_stars_repo_head_hexsha": "3dbccfd9a046f0ccb0996bc2bb83969fb553d024", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
''' Defines a scalar field over a grid .. codeauthor:: David Zwicker <david.zwicker@ds.mpg.de> ''' from typing import (List, TypeVar, Iterator, Union, Optional, # @UnusedImport TYPE_CHECKING) from pathlib import Path import numpy as np from .base import DataFieldBase from ..grids import UnitGri...
{"hexsha": "9fb50e626652d8614f026e5c5f095182282b0847", "size": 7840, "ext": "py", "lang": "Python", "max_stars_repo_path": "pde/fields/scalar.py", "max_stars_repo_name": "xuanxu/py-pde", "max_stars_repo_head_hexsha": "de33d938aea8680eff872ae1b64569895662a248", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import json import numpy as np import tables import os import pandas as pd from PyQt5.QtCore import Qt from PyQt5.QtGui import QPainter, QPen from PyQt5.QtWidgets import QApplication, QMessageBox from tierpsy.gui.SWTrackerViewer_ui import Ui_SWTrackerViewer from tierpsy.gui.TrackerViewerAux import TrackerViewerAuxGUI...
{"hexsha": "dbbbcdfcc308ac5467521248c6cc9046a7149e43", "size": 10137, "ext": "py", "lang": "Python", "max_stars_repo_path": "tierpsy/gui/SWTrackerViewer.py", "max_stars_repo_name": "mgh17/tierpsy-tracker", "max_stars_repo_head_hexsha": "a18c06aa80a5fb22fd51563d82c639b520742777", "max_stars_repo_licenses": ["MIT"], "max...
''' Created on Mar 30, 2015 @author: Ming Jiang and Jean-Luc Starck CLASS FUNCTION class starlet2d() Allow to perform a starlet transform, manipulate it (visualisation, thresholding, statistics, etc), and to reconstruct. If pysap is installed, then the pysparse module shoul...
{"hexsha": "e2058dee5789f16c56bcd6cf6026ed0e0c6d19a4", "size": 35135, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycs/sparsity/sparse2d/starlet.py", "max_stars_repo_name": "sfarrens/cosmostat", "max_stars_repo_head_hexsha": "a475315cda06dca346095a1e83cb6ad23979acae", "max_stars_repo_licenses": ["MIT"], "max...
# encoding: utf-8 # ****************************************************** # Author : zzw922cn # Last modified: 2017-12-09 11:00 # Email : zzw922cn@gmail.com # Filename : ed.py # Description : Calculating edit distance for Automatic Speech Recognition # ************************************************...
{"hexsha": "a2101ef9f8dc3ebd51a8d78d58fedb1f4dea34fb", "size": 3010, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/ed.py", "max_stars_repo_name": "HanSeokhyeon/Automatic_Speech_Recognition", "max_stars_repo_head_hexsha": "73b92e7b2b12e8b43294caa8eec5727d0ffc7a47", "max_stars_repo_licenses": ["MIT"], "max...
""" MPO A finite size matrix product operator type. Keeps track of the orthogonality center. """ mutable struct MPO <: AbstractMPS data::Vector{ITensor} llim::Int rlim::Int end function MPO(A::Vector{<:ITensor}; ortho_lims::UnitRange=1:length(A)) return MPO(A, first(ortho_lims) - 1, last(ortho_lims) + 1...
{"hexsha": "e28acde1c7feb3846ab636cbdc0d313b8c6210b6", "size": 27936, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/mps/mpo.jl", "max_stars_repo_name": "LinjianMa/ITensors.jl", "max_stars_repo_head_hexsha": "579bd97f45e1723367ba569f094dd1569817b8d7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
using Wakame using Documenter DocMeta.setdocmeta!(Wakame, :DocTestSetup, :(using Wakame); recursive=true) makedocs(; modules=[Wakame], authors="Bernard Brenyah", repo="https://github.com/PyDataBlog/Wakame.jl/blob/{commit}{path}#{line}", sitename="Wakame.jl", format=Documenter.HTML(; pretty...
{"hexsha": "cbc7a54a3cf549b7f2d37c87f9418723586a7af3", "size": 585, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "PyDataBlog/Wakame.jl", "max_stars_repo_head_hexsha": "7492c73884a447a1a62101db01839b36e7c02c32", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
# Copyright 2022 The DDSP 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 or agreed to in wri...
{"hexsha": "ecaee9cd77beab7cf1ec429babfe997dfb5fbbaf", "size": 11158, "ext": "py", "lang": "Python", "max_stars_repo_path": "ddsp/spectral_ops_test.py", "max_stars_repo_name": "vvolhejn/ddsp", "max_stars_repo_head_hexsha": "f99c192473c84bbf5d083e8630bf105520ad6ad0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
\section{Developed Method} \label{sec:HomographyDevelopedMethod} Our work aimed to devise a systematic approach to select the ``best'' homography according to the proposed score function. The assumption was that there was no prior knowledge about the quality of individual markers. Here is the description of the ...
{"hexsha": "a995ec5bd85680e5de0e3b659e7d0bab88b57a0d", "size": 14322, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/chapters/homography/sections/methodology.tex", "max_stars_repo_name": "mondrasovic/phd_thesis", "max_stars_repo_head_hexsha": "68a3a6d1687ea43dc6cdfafcd5e6d9ce35f424e8", "max_stars_repo_license...
# -*- coding: utf-8 -*- # Copyright 2017 Kakao, Recommendation Team # # 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 a...
{"hexsha": "a368e1a317718b189d568011dff84f65a7e2d23a", "size": 11336, "ext": "py", "lang": "Python", "max_stars_repo_path": "classifier.py", "max_stars_repo_name": "junwoopark92/kakao_shopping_classification", "max_stars_repo_head_hexsha": "3d2669a8c946a1d810da7c0fd896ad42e0361fbe", "max_stars_repo_licenses": ["Apache-...
import numpy as np from overrides import overrides import torch from datasets.dataset_base import DatasetBase from services.arguments.ocr_quality_arguments_service import OCRQualityArgumentsService from services.process.evaluation_process_service import EvaluationProcessService from services.log_service import LogServ...
{"hexsha": "7cf418f1b9e9eead55798b30aecec42a75f6393c", "size": 1030, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/evaluation_dataset.py", "max_stars_repo_name": "ktodorov/historical-ocr", "max_stars_repo_head_hexsha": "d4d7bf0addf5ff98b7182c00ff716e79c97e050e", "max_stars_repo_licenses": ["MIT"], "ma...
import numpy as np import matplotlib.pyplot as plt from numpy import pi class Vector(object): def __init__(self,x,y,z): self.x = np.array(x) self.y = np.array(y) self.z = np.array(z) def duplicate(self): return Vector(self.x,self.y,self.z) def size(self): return...
{"hexsha": "43cfe4dc7712e7c72ed7805c92a56851746f4cc7", "size": 3115, "ext": "py", "lang": "Python", "max_stars_repo_path": "Vector.py", "max_stars_repo_name": "Yiones/raytests", "max_stars_repo_head_hexsha": "d88cc28f4775e00edaf206fb08944aae0f9a6bc7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars...
[STATEMENT] lemma powser_split_head: fixes f :: "nat \<Rightarrow> 'a::{real_normed_div_algebra,banach}" assumes "summable (\<lambda>n. f n * z ^ n)" shows "suminf (\<lambda>n. f n * z ^ n) = f 0 + suminf (\<lambda>n. f (Suc n) * z ^ n) * z" and "suminf (\<lambda>n. f (Suc n) * z ^ n) * z = suminf (\<lambda>n...
{"llama_tokens": 2191, "file": null, "length": 18}
module NewtonsMethod using ForwardDiff function newtonroot(f, fp; x0, tol=1e-7, maxiter=1000) abserror = Inf iter = 1 x = x0 while abserror > tol && iter <= maxiter x_new = x - f(x)/fp(x) iter = iter +1 abserror = abs(x_new - x) x = x_new end return x end funct...
{"hexsha": "714223a8ed0f07c0cc6004a95cae21a65847afcf", "size": 493, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/NewtonsMethod.jl", "max_stars_repo_name": "ykkan/NewtonsMethod.jl", "max_stars_repo_head_hexsha": "7cde23f25d50a3a5469492d481aad00c701a4849", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#Python3 ##--------------------------------Main file------------------------------------ ## ## Copyright (C) 2020 by Belinda Brown Ramírez (belindabrownr04@gmail.com) ## Image recognition system for diagnosis of a network switch ## ##----------------------------------------------------------------------------- ###...
{"hexsha": "6fd075585f173e86afb5d595e0854b87b3152327", "size": 11369, "ext": "py", "lang": "Python", "max_stars_repo_path": "Images_Recognition/main.py", "max_stars_repo_name": "brown9804/EIE-Project_Recognition-System_ARUBA-Switch", "max_stars_repo_head_hexsha": "45382bed52b977280a4bd4562a14b6447cd3a39e", "max_stars_r...
[STATEMENT] lemma card_nonzero:"\<lbrakk>finite A; card A \<noteq> 0\<rbrakk> \<Longrightarrow> A \<noteq> {}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>finite A; card A \<noteq> 0\<rbrakk> \<Longrightarrow> A \<noteq> {} [PROOF STEP] by (rule contrapos_pp, simp+)
{"llama_tokens": 115, "file": "Group-Ring-Module_Algebra1", "length": 1}
from __future__ import print_function import os import json import logging import numpy as np from tqdm import tqdm, trange from datetime import datetime from collections import defaultdict import _pickle as cPickle import torch as t import torch from torch.autograd import Variable ########################## # Torc...
{"hexsha": "3e464cd8f700a8e00f9088cf1018e990cf65e772", "size": 4479, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "tuyunbin/TTA_AVS", "max_stars_repo_head_hexsha": "71d7c3a8220550169e731268144ebae397f04163", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
using Base64 using Sockets function main() str_size = 131072 tries = 8192 str = repeat("a", str_size) str2 = base64encode(str) str3 = String(base64decode(str2)) notify("Julia\t$(getpid())") t = time() s_encoded = 0 for i = 1:tries s_encoded += length(base64encode(str)) ...
{"hexsha": "b3c9a614ddba57c483441870877f99068266657e", "size": 1273, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "base64/test.jl", "max_stars_repo_name": "clemenswasser/benchmarks", "max_stars_repo_head_hexsha": "d1d22c42c107ffb3ad0a7489ef1dd439c237559c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# Wang Yu, the University of Yamanashi, Japan # Oct 2, 2020 import numpy as np import os,sys DIR=os.path.dirname(os.path.dirname(__file__)) sys.path.append(DIR) from gmm import gmm from collections import namedtuple import copy class NaiveDiscreteHMM: ''' A naive HMM with discrete observation probability. '''...
{"hexsha": "ac12b925d495cb712542dd106e01c5f88d83beb9", "size": 12224, "ext": "py", "lang": "Python", "max_stars_repo_path": "hmm/hmm.py", "max_stars_repo_name": "wangyu09/asr_memo", "max_stars_repo_head_hexsha": "e51b0232a4d3f79126d151edc61cdd02c8c68680", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1,...
module Pseudospectra #= Eigenvalue and Pseudospectrum Analysis for Julia The Pseudospectra.jl package is a translation of EigTool, but no endorsement or promotion by the authors of EigTool is implied. This package is released under a BSD license, as described in the LICENSE file. Julia code and supplements Copyright...
{"hexsha": "6dedf189caaceec0f3467b2840ba3c8cead94a27", "size": 26684, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Pseudospectra.jl", "max_stars_repo_name": "csimal/Pseudospectra.jl", "max_stars_repo_head_hexsha": "1cbbdd17fb84c1bdf604d5d122778df2664ca8ca", "max_stars_repo_licenses": ["BSD-3-Clause", "MIT"...
#!/usr/bin/env python # coding: utf-8 # In[2]: get_ipython().run_line_magic('matplotlib', 'inline') import matplotlib.pyplot as plt import numpy as np import seaborn as sns; sns.set() import pandas as pd from sklearn.cluster import KMeans store_data = pd.read_csv('D:\\Datasets\\NIPS_1987-2015.csv') x = store_data....
{"hexsha": "8ca6ddd0305faf8f19a139800bff269475d67e80", "size": 1086, "ext": "py", "lang": "Python", "max_stars_repo_path": "2.1.2_clustering_between_to_first_article_and_the_last_article_(all_rows)[1].py", "max_stars_repo_name": "dianagut1987/BigData-Unsupervised-for-articles", "max_stars_repo_head_hexsha": "f3413f02b3...
SUBROUTINE MA_CGDT ( iret ) C************************************************************************ C* MA_CGDT * C* * C* This subroutine sets the report date/time using system and bulleti...
{"hexsha": "1090fd69c0d9e97f0d487a6b0b0a3c0f84b79b8a", "size": 3051, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/bridge/ma/macgdt.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
import argparse import torch import numpy as np import time as tm from torch.autograd import Variable # Compute error def compute_error(A, sA): normA = torch.sqrt(torch.sum(torch.sum(A * A, dim=1),dim=1)) error = A - torch.bmm(sA, sA) error = torch.sqrt((error * error).sum(dim=1).sum(dim=1)) / normA re...
{"hexsha": "1c10ca63b4f71d160e89276b9e430af5e3b81430", "size": 4120, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/matrix_sqrt.py", "max_stars_repo_name": "milesgray/CALAE", "max_stars_repo_head_hexsha": "a2ab2f7d9ee17cc6c24ff6ac370b0373537079ac", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
# Import general libraries import pandas as pd import numpy as np from datetime import datetime, timedelta import pprint import os # Import dash import dash import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc from dash.dependencies import Input, Output, State ...
{"hexsha": "ba4ea0b4f774332ab70abafae0eb4a0c3e719339", "size": 3815, "ext": "py", "lang": "Python", "max_stars_repo_path": "news.py", "max_stars_repo_name": "bensjx/covid-dashboard", "max_stars_repo_head_hexsha": "c4204d984719137c3cbdd224b50ced385b4f5f49", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
import matplotlib.pyplot as plt import numpy as np import wave import scipy.io.wavfile as wav from audiolazy.lazy_lpc import levinson_durbin from pip._vendor.distlib.compat import raw_input from scipy import signal import scipy as sk from audiolazy import * import audiolazy.lazy_lpc from audiolazy import lpc from sklea...
{"hexsha": "7785425bf259fb3f975125b22c835333752f6312", "size": 9356, "ext": "py", "lang": "Python", "max_stars_repo_path": "spam_code/lpc_gmm.py", "max_stars_repo_name": "chondroseto/Virtual_Assistant", "max_stars_repo_head_hexsha": "b52945d255176b711795d61da54d72000cf3561b", "max_stars_repo_licenses": ["MIT"], "max_st...
contactList{1,1} = 'title 1'; contactList{1,2} = 'author name 1'; contactList{1,3} = 'spam@email.com'; contactList{2,1} = 'title 2'; contactList{2,2} = 'author name 2'; contactList{2,3} = 'spam@email.com'; subjectLine = 'title of the emails'; bodyLine = ['Dear %s,\n',... '\n',... 'We will be organizing XXX\n',... 'S...
{"author": "jianxiongxiao", "repo": "ProfXkit", "sha": "7376c50abf5ead846247774a36be026e6f24953c", "save_path": "github-repos/MATLAB/jianxiongxiao-ProfXkit", "path": "github-repos/MATLAB/jianxiongxiao-ProfXkit/ProfXkit-7376c50abf5ead846247774a36be026e6f24953c/batchEmail.m"}
[STATEMENT] lemma project_extend_Join: "project h UNIV ((extend h F)\<squnion>G) = F\<squnion>(project h UNIV G)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. project h UNIV (extend h F \<squnion> G) = F \<squnion> project h UNIV G [PROOF STEP] apply (rule program_equalityI) [PROOF STATE] proof (prove) goal (3 sub...
{"llama_tokens": 621, "file": null, "length": 5}
macro do_while(condition, block) quote let $block while $condition $block end end end |> esc end function _reg(s, quoted_attr, attr_name) @eval begin #$get_attr_name(x) = getattr( x, $quoted_attr) #$set_attr_name(x, va...
{"hexsha": "929a935f082f013aa84a03181a344ae9115b00fe", "size": 1106, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/macros.jl", "max_stars_repo_name": "PPKFS/julia_if_old", "max_stars_repo_head_hexsha": "b46abb43aa89daf038e2f822c184c0f2c75d1b6f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max...
#pragma once #include <memory> #include <boost/asio.hpp> #include "eventReceiver.hpp" #include "serviceParamTypes.h" namespace mln::net { struct NetCommonObjects { public: NetCommonObjects(ServiceParams& svcParams) : _ioc(svcParams.ioc_) , _strand(svcParams.ioc_) , _keepAliveTimeMs(svcParams.keepAliveT...
{"hexsha": "ecf87dbb2ea6af169f8fcd557cc599d8b8f89d3c", "size": 2214, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/net/netCommonObjects.hpp", "max_stars_repo_name": "lazychase/mlnsdk", "max_stars_repo_head_hexsha": "599303c37b83c03827a3050c42aeb3af649ee968", "max_stars_repo_licenses": ["MIT"], "max_stars...
using Documenter, Query makedocs( modules = [Query], sitename = "Query.jl", pages = [ "Introduction" => "index.md", "Getting Started" => "gettingstarted.md", "Standalone Query Commands" => "standalonequerycommands.md", "LINQ Style Query Commands" => "linqquerycommands.md", "Data Sources" => "sources.md"...
{"hexsha": "cfed2a1e6129c56000b14b86654f6fec7b9fd4ef", "size": 498, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "petershintech/Query.jl", "max_stars_repo_head_hexsha": "7ab5f58ec82d51c42cf6dba7e916eee7a78a2c51", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
from automan.api import Problem, Automator, Simulation from automan.api import CondaClusterManager from matplotlib import pyplot as plt import numpy as np class Squares(Problem): def get_name(self): return 'squares' def get_commands(self): commands = [(str(i), 'python square.py %d' % i, None)...
{"hexsha": "f08c5ee1ff401ba18c615465837f85e02b692de3", "size": 1904, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/edm_conda_cluster/automate_conda.py", "max_stars_repo_name": "pypr/automan", "max_stars_repo_head_hexsha": "80619f0cb58ad1e996dc7c9ea66effecf8df5acc", "max_stars_repo_licenses": ["BSD-3-C...
library(ggplot2) library(dplyr) library(reshape2) #load data data <- read.csv("Downloads/MachineLearning-master/Example Data/PCA_Example_1.csv", stringsAsFactors=F) #change the first column format as Date data$Date = as.Date(data$Date) #transform stock data into Date Stock1 Stock2 .... Stock24 data <- reshape(data, id...
{"hexsha": "b31e0e37f7e716cec489fb841f9fb682381996a1", "size": 1712, "ext": "r", "lang": "R", "max_stars_repo_path": "R/pca.r", "max_stars_repo_name": "Hennrik/machine_learning_examples", "max_stars_repo_head_hexsha": "8263fb95aa18ae56e4dc9690d389fe8ac25c2b3a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
# -*- coding: utf-8 -*- """ Contains the definition of the SuddenDecay class. """ from __future__ import unicode_literals from __future__ import print_function import logging import numpy as np from . import SampleBasedDecay logger = logging.getLogger('decay.sudden') class SuddenDecay(SampleBasedDecay): """ ...
{"hexsha": "fff977053334258989b6ac0d6b95c314d3c3b6f4", "size": 2032, "ext": "py", "lang": "Python", "max_stars_repo_path": "decay/decays/sample/sudden.py", "max_stars_repo_name": "pyl1b/decay", "max_stars_repo_head_hexsha": "7200516455fc03351ad658af66b5cc39b2b2d50a", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
@testset "map" begin m = sprand(5, 5, 0.25) n = GBMatrix(m) @test map(UnaryOps.LOG, n)[1,1] == map(log, m)[1,1] o = map!(>, GBMatrix{Bool}(5, 5), 0.1, n) @test o[1,4] == (0.1 > m[1,4]) @test map(second, n, 1.5)[1,1] == 1.5 @test (n .* 10)[1,1] == n[1,1] * 10 # Julia will map over the en...
{"hexsha": "4dd13310e8b11ce993532cc15cb21f4b70ab0b8a", "size": 444, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/operations/map.jl", "max_stars_repo_name": "JuliaSparse/SuiteSparseGraphBLAS.jl", "max_stars_repo_head_hexsha": "73466763044fb8a8c80c92180b294c482440c2b0", "max_stars_repo_licenses": ["MIT"], "...
(* Title: Catoids Author: Georg Struth Maintainer: Georg Struth <g.struth at sheffield.ac.uk> *) section \<open>Catoids\<close> theory Catoid imports Main begin subsection \<open>Multimagmas\<close> text \<open>Multimagmas are sets equipped with multioperations. Multioperations are isomorphic to ternary relatio...
{"author": "gstruth", "repo": "catoids", "sha": "1b7c623d742bcacfecf1a60518106c31716bf2dd", "save_path": "github-repos/isabelle/gstruth-catoids", "path": "github-repos/isabelle/gstruth-catoids/catoids-1b7c623d742bcacfecf1a60518106c31716bf2dd/Catoid.thy"}
[STATEMENT] lemma mask_inj_hlp1: "inj_on (mask :: nat \<Rightarrow> 16 word) {0..16}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. inj_on mask {0..16} [PROOF STEP] proof(intro inj_onI, goal_cases) [PROOF STATE] proof (state) goal (1 subgoal): 1. \<And>x y. \<lbrakk>x \<in> {0..16}; y \<in> {0..16}; mask x = mask ...
{"llama_tokens": 1681, "file": "LOFT_LinuxRouter_OpenFlow_Translation", "length": 16}
/* test_uniform_int_distribution.cpp * * Copyright Steven Watanabe 2011 * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * $Id$ * */ #include <boost/random/uniform_int_distribution.hpp> #inclu...
{"hexsha": "227a0b31050a5a8db32daa1984dacef8fd052fd6", "size": 1232, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "REDSI_1160929_1161573/boost_1_67_0/libs/random/test/test_uniform_int_distribution.cpp", "max_stars_repo_name": "Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo", "max_stars_repo_head_hexsha": "eb0f7ef64e1...
import os import numpy as np from tqdm import tqdm import laspy import argparse from tqdm import tqdm def get_predictions(pred_file, las_file): result = np.loadtxt(pred_file) labels = result[:, 3] points = result[:, 0:3] las = laspy.create(file_version = "1.2", point_format = 3) las.x = poi...
{"hexsha": "7255ec5834cfd5b7897ebe5db8dd44d2b85b2512", "size": 1501, "ext": "py", "lang": "Python", "max_stars_repo_path": "predictions.py", "max_stars_repo_name": "BenCurran98/FugroDGCNN", "max_stars_repo_head_hexsha": "7033cc4992f975e836289cae59d4990d9edb8b6b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
from multiprocessing import Pool #parallel processing import multiprocessing as mp import structure from structure.global_constants import * from structure.cell import Tissue, BasicSpringForceNoGrowth import structure.initialisation as init import sys import os import numpy as np import libs.pd_lib_neutral as lib impo...
{"hexsha": "370f1ffde2f500968a4e3d043bee9a5dfebacc18", "size": 2726, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_files/pd_original/cluster_stats_vary_MU.py", "max_stars_repo_name": "jessiesrr/VTdyn", "max_stars_repo_head_hexsha": "6f71ef94525d95221f5bd5e5290f4df10648cd18", "max_stars_repo_licenses": ["MI...
""" Interact with the grizli AWS database """ import os import numpy as np FLAGS = {'init_lambda': 1, 'start_beams': 2, 'done_beams': 3, 'no_run_fit': 4, 'start_redshift_fit': 5, 'fit_complete': 6} COLUMNS = ['root', 'id', 'status', 'ra', 'dec', 'ninput', 'redshift', 'as_e...
{"hexsha": "aceef6e53447813622c94473a304064efa0e32fe", "size": 105785, "ext": "py", "lang": "Python", "max_stars_repo_path": "grizli/aws/db.py", "max_stars_repo_name": "jkmatharu/grizli", "max_stars_repo_head_hexsha": "7e2eb918667ac9f845d0847452a72138fc22fbcd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import logging from typing import Any, Callable, Collection, Dict, Optional, Sequence, Tuple, Union import numpy import skimage.transform import skimage.transform import torch from hylfm.utils.for_log import DuplicateLogFilter from .affine_utils import get_lf_roi_in_raw_lf, get_ls_roi from .base import Transform from...
{"hexsha": "07531758331cb9e879c4c02239b59a1c6732c1d1", "size": 10346, "ext": "py", "lang": "Python", "max_stars_repo_path": "hylfm/transforms/image.py", "max_stars_repo_name": "kreshuklab/hylfm-net", "max_stars_repo_head_hexsha": "9f1013640e40e998674b65176023367b1e978782", "max_stars_repo_licenses": ["MIT"], "max_stars...
module EMLstoic using DanaTypes using DotPlusInheritance using Reexport @reexport using ...reactors.EMLtank_basic import EMLtypes.length include("stoic/stoic_vap.jl") include("stoic/stoic_liq.jl") include("stoic/stoic_extent_vap.jl") include("stoic/stoic_extent_liq.jl") include("stoic/stoic_conv_vap.jl") inc...
{"hexsha": "bf2371eba0499bf5350be90fe8b35d59463d8dd9", "size": 355, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "JuliaEMSOModels/reactors/stoic.jl", "max_stars_repo_name": "DANA-Laboratory/EMSOModelLibrary.jl", "max_stars_repo_head_hexsha": "e28904cc1bdf8f67c6839ad35b4658dd399c0e47", "max_stars_repo_licenses":...
from __future__ import annotations import os from typing import Optional, Union import tensorflow as tf from numpy import random from GNN import GNN_metrics as mt, GNN_utils as utils from GNN.GNN import GNNnodeBased, GNNedgeBased, GNNgraphBased from GNN.LGNN import LGNN from GNN.MLP import MLP, get_inout_...
{"hexsha": "5a386c93e1d9ca1e44f62a1f5ac5e27d4d5e72d8", "size": 9273, "ext": "py", "lang": "Python", "max_stars_repo_path": "starter.py", "max_stars_repo_name": "vishalbelsare/GNN_tf_2.x", "max_stars_repo_head_hexsha": "4b6429ed58f2c0922257600a9287d5cc5a10395b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
#!/usr/bin/env python import rospy import tf from auv_msgs.msg import NavSts from uw_vs.msg import PilotRequest from geometry_msgs.msg import Pose, TwistStamped import numpy as np global TOPIC_NAV # get the vehicle simulated pose global TOPIC_POSE # publishes simulated pose on UWSim global TOPIC_CMD # get the controll...
{"hexsha": "93a56dbdb95fad0f7aed04864c4999658668f3ce", "size": 2083, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dyn_interface.py", "max_stars_repo_name": "LaboratoireCosmerTOULON/uwvs_osl", "max_stars_repo_head_hexsha": "c3d790c451d13bebc1265b5d6011655ef660232e", "max_stars_repo_licenses": ["BSD-2-Claus...
import pandas as pd import numpy as np import click import h5py import os import logging from array import array from copy import deepcopy from tqdm import tqdm from astropy.io import fits from fact.credentials import create_factdb_engine from zfits import FactFits from scipy.optimize import curve_fit from joblib imp...
{"hexsha": "857b18b35686656b46bc34d4625e565c64b6ccff", "size": 23133, "ext": "py", "lang": "Python", "max_stars_repo_path": "drs4Calibration/timelapse/drs4CalibrationTool_time.py", "max_stars_repo_name": "fact-project/DrsTemperatureCalibration", "max_stars_repo_head_hexsha": "3702ee390c16cf2c5930d4a0f24c1354d036d645", ...
#!/usr/bin/env python3 # coding: utf-8 # ------------ # # Lum Analysis # # ------------ # ### Modules # std library import os from os.path import join from collections import OrderedDict # dependencies import scipy.signal as signal import numpy as np from datetime import datetime, timedelta # custom from pupil_code...
{"hexsha": "c8628051d0dda665df699d728dd2eb6dbe349693", "size": 9897, "ext": "py", "lang": "Python", "max_stars_repo_path": "pupil_code/lum_analysis.py", "max_stars_repo_name": "pignoniG/cognitive_analysis_tool", "max_stars_repo_head_hexsha": "90568fc83493a10b567c1f957a57b3ef3a1cf69f", "max_stars_repo_licenses": ["MIT"]...
""" Draw wiring diagrams (aka string diagrams) using Graphviz. """ module GraphvizWiringDiagrams export to_graphviz import ...Doctrines: HomExpr using ...WiringDiagrams, ...WiringDiagrams.WiringDiagramSerialization import ..Graphviz import ..Graphviz: to_graphviz # Constants and data types ########################## ...
{"hexsha": "e11ece1f585272b967a97a3479ae51cb8ca14df3", "size": 11852, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/graphics/GraphvizWiringDiagrams.jl", "max_stars_repo_name": "UnofficialJuliaMirror/Catlab.jl-134e5e36-593f-5add-ad60-77f754baafbe", "max_stars_repo_head_hexsha": "b8e5e1eab26b53ec7e53c503c1dd5...
import torch import cv2 import lib.dataset_handler import lib.generate_gt_anchor import lib.tag_anchor import Net import numpy as np import os import time import random import copy def val(net, criterion, batch_num, using_cuda, logger, img_list): random_list = random.sample(img_list, batch_num) total_loss = 0...
{"hexsha": "5bcd8a8f9ad964048335dfcb35bf59fc2f9fa225", "size": 3697, "ext": "py", "lang": "Python", "max_stars_repo_path": "detector/ctpn/evaluate.py", "max_stars_repo_name": "qiu9yu/Lets_OCR", "max_stars_repo_head_hexsha": "62d68b044250d02a9d5ac8c4fbd08cec83faa0d1", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import sys import pyqtgraph as pg import datetime import time import numpy as np import logging from PyQt5.QtWidgets import QDialog from .gui.chartWindowGui import * from .pg_time_axis import DateAxisItem """ Charts are plotted using pyqtgrpah library. Data are read directly from the image list model (imageListModel...
{"hexsha": "7c6be6cf967db9ec28aef0f9a1ff9df2b29f12d7", "size": 15964, "ext": "py", "lang": "Python", "max_stars_repo_path": "astrodom/chartWindow.py", "max_stars_repo_name": "fenriques/AstroDom", "max_stars_repo_head_hexsha": "84b54d3299cf591c39b214248339a201ae8ae6ca", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import git import numpy as np import os import argparse import sys import json import torch from utils.spec_reader import SpecReader from policy_gradients import models from policy_gradients.agent import Trainer from cox.store import Store, schema_from_dict # Tee object allows for logging to both stdout and to file...
{"hexsha": "6a167e0df80b4dcc0003c7c9ed215c4ad80e5683", "size": 9699, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/run.py", "max_stars_repo_name": "tristan-ka/ppo-wmg", "max_stars_repo_head_hexsha": "e26ab78ab77cc6f42cb24e03f71a3315489478f7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
(* Title: OInvariants.thy License: BSD 2-Clause. See LICENSE. Author: Timothy Bourke *) section "Open reachability and invariance" theory OInvariants imports Invariants begin subsection "Open reachability" text \<open> By convention, the states of an open automaton are pairs. The first com...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/AWN/OInvariants.thy"}
#!/usr/bin/env python import math import average_vector from scipy import spatial # Cosine similarity calculation def getDistanceAverageEpsilonNeighborhoodAndNegative( source_word, eps_plus, eps_minus, model, np ): """ Get distance (angle by cosine similarity) between 1. epsilon-neighborhood of word ...
{"hexsha": "01e82042c5ee93417c5e64979c5ae290c413a8a8", "size": 7467, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/lib/epsilon_neighborhood.py", "max_stars_repo_name": "componavt/wcorpus.py", "max_stars_repo_head_hexsha": "4433c8de62ffb8e3c9cec6eb8a23dd64e5349700", "max_stars_repo_licenses": ["Unlicense"],...
import random import cv2 import numpy as np import math def ellipse_bbox(h, k, a, b, theta): ux = a * math.cos(theta) uy = a * math.sin(theta) vx = b * math.cos(theta + math.pi / 2) vy = b * math.sin(theta + math.pi / 2) box_halfwidth = np.ceil(math.sqrt(ux ** 2 + vx ** 2)) box_halfheight = np...
{"hexsha": "4e42172ee1b68c5e0b9d4f450dabf11fa2c6f4d1", "size": 3131, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/snow.py", "max_stars_repo_name": "LeikvollE/pytorch-superpoint", "max_stars_repo_head_hexsha": "52144a760e0cc46259e57397a5a55f0585fe6d0b", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/7/5 10:42 AM # @Author : Ject.Y # @Site : # @File : create_h5_cls.py # @Software: PyCharm # @Copyright: BSD2.0 # @Function : Genarate HDF5 data for Face classification # How to run : run import h5py, os import numpy as np import random import cv2 ...
{"hexsha": "31c5fd6fb2b0eeb00d9efaf7fa3d3a8cf33c7abf", "size": 4148, "ext": "py", "lang": "Python", "max_stars_repo_path": "train/Fstage/create_h5_cls.py", "max_stars_repo_name": "yungs2017/CNNFaceDetection", "max_stars_repo_head_hexsha": "38aa7d052beb8993bf3b5282d03d68ab8cca4439", "max_stars_repo_licenses": ["BSD-2-Cl...
function compute_derivatives(obj::ComplexOrdinaryDifferentialEquation, arg0::jdouble, arg1::Vector{JComplex}) return jcall(obj, "computeDerivatives", Vector{JComplex}, (jdouble, Vector{JComplex}), arg0, arg1) end function get_dimension(obj::ComplexOrdinaryDifferentialEquation) return jcall(obj, "getDimension",...
{"hexsha": "56a644edd3b97cff15305b767c97193058a71ca4", "size": 543, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "gen/HipparchusWrapper/OdeWrapper/complex_ordinary_differential_equation.jl", "max_stars_repo_name": "JuliaAstrodynamics/Orekit.jl", "max_stars_repo_head_hexsha": "e2dd3d8b2085dcbb1d2c75471dab42d6ddf...
# Splitting the data # December 22nd 2020 '''This script splits the data. Usage: split_data.py --clean_train_path=<clean_train_path> Options: --clean_train_path=<clean_train_path> : Relative file path for the cleaned train csv ''' import numpy as np import pandas as pd from docopt import docopt from skle...
{"hexsha": "204ce36f09338e5045f7f6c94221e81a558c78e0", "size": 1118, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/split_data.py", "max_stars_repo_name": "nphaterp/house_price_prediction", "max_stars_repo_head_hexsha": "376c9a052e5de552e431210ead548d0a5b238377", "max_stars_repo_licenses": ["MIT"], "max_sta...
From iris.proofmode Require Import proofmode. From iris.program_logic Require Import weakestpre adequacy lifting. From stdpp Require Import base. From cap_machine Require Export logrel. From cap_machine.ftlr Require Import ftlr_base. From cap_machine.rules Require Import rules_Jmp. Section fundamental. Context {Σ:gF...
{"author": "logsem", "repo": "cerise", "sha": "a578f42e55e6beafdcdde27b533db6eaaef32920", "save_path": "github-repos/coq/logsem-cerise", "path": "github-repos/coq/logsem-cerise/cerise-a578f42e55e6beafdcdde27b533db6eaaef32920/theories/ftlr/Jmp.v"}
import gym import numpy as np import matplotlib.pyplot as plt def value_iteration(): V_states = np.zeros(n_states) # init values as zero theta = 1e-8 gamma = 0.8 # TODO: implement the value iteration algorithm and return the policy # Hint: env.P[state][action] gives you tuples (p, n_state, r, is_...
{"hexsha": "3ee52a30e4f470b92f22d246f47b05171ac778ac", "size": 4143, "ext": "py", "lang": "Python", "max_stars_repo_path": "ex06-nstep/ex06-nstep.py", "max_stars_repo_name": "vijaykumarprabhu/rl-course", "max_stars_repo_head_hexsha": "cc9db0236bd1908e0fa54eae1b2fcfd609ec0ae4", "max_stars_repo_licenses": ["MIT"], "max_s...
# -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ import numpy as np import sys i = sys.argv[1] uf = sys.argv[2] size = sys.argv[3] page = sys.argv[4] latency_path = "./log/latency_" + str(i) + "_" + str(uf) + "k_" + str(size) + "_" + str(page) + "_0.log" prepare_path = ...
{"hexsha": "92853417f679d78bfa38c1ee138b4f26f189512c", "size": 999, "ext": "py", "lang": "Python", "max_stars_repo_path": "cmake-build-debug/result.py", "max_stars_repo_name": "bombework/FrequentSnapshot", "max_stars_repo_head_hexsha": "cd1266a2c7dbc44b0ab38637d1704b54175da895", "max_stars_repo_licenses": ["Apache-2.0"...
import pandas as pd import numpy as np import json import csv import matplotlib.pyplot as plt # import seaborn as sns from tqdm import tqdm from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from nltk.tokenize import sent_tokenize from nltk.stem import WordNetLemmatizer import nltk # nltk....
{"hexsha": "e6acef970b439f71bc0061f34b020b67a66415d6", "size": 2323, "ext": "py", "lang": "Python", "max_stars_repo_path": "p3.py", "max_stars_repo_name": "swarooprm/DQI", "max_stars_repo_head_hexsha": "8de54cc60e489af49d063fb6a14235b9abcc2839", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1, "max_star...
program t external a,b,c print *,'ok' end program t
{"hexsha": "314a3d957ed0bde0b4ae6e7ca2e8cbf96fd6e448", "size": 56, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/t0172r/t.f90", "max_stars_repo_name": "maddenp/ppp", "max_stars_repo_head_hexsha": "81956c0fc66ff742531817ac9028c4df940cc13e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 2...
from random import choice import numpy as np from PIL import Image from scipy.ndimage import gaussian_gradient_magnitude from wordcloud import WordCloud, ImageColorGenerator COLORMAP = 'ocean' COLORS = ( '#0F468C', '#1665CC', '#072040' ) BACKGROUND_COLOR = '#ffffff' HEIGHT = 768 WIDTH = 1536 PREFER_HORIZONTAL = 1 #...
{"hexsha": "701a0d013a4bf65357540cbbd771ece4139df880", "size": 1482, "ext": "py", "lang": "Python", "max_stars_repo_path": "wordcloud_generator/generate.py", "max_stars_repo_name": "liviakuhn/wordcloud-generator", "max_stars_repo_head_hexsha": "b0f28f57361fa7f801b9179afb5c6b2a1cd2d37c", "max_stars_repo_licenses": ["MIT...
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE UniqueIdMapTest #include <boost/test/unit_test.hpp> #include <iostream> #include "utils/UniqueIdMap.hpp" using namespace pcw; //////////////////////////////////////////////////////////////////////////////// BOOST_AUTO_TEST_CASE(UniqueIds) { UniqueIdMap<std::stri...
{"hexsha": "feeff9953bc669f1fa398da02e2a0527301fbf57", "size": 1024, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "rest/src/utils/tests/TestUniqueIdMap.cpp", "max_stars_repo_name": "cisocrgroup/pocoweb", "max_stars_repo_head_hexsha": "93546d026321744602f6ee90fd82503da56da3b7", "max_stars_repo_licenses": ["Apache...
#!/usr/bin/env python # Black-Scholes PDE solving using DGM paper # __author__ = "Abdollah Rida" # __email__ = "abdollah.rida@berkeley.edu" # Import needed packages import numpy as np import scipy.stats as spstats from __params__ import * # Black-Scholes European call price # Analytical known solution def lambd_H(...
{"hexsha": "f8f94efcbb50d5b5463569475d72e381672969f8", "size": 1378, "ext": "py", "lang": "Python", "max_stars_repo_path": "f_BS/f_BS/f_Call.py", "max_stars_repo_name": "AbdollahRida/MathFi", "max_stars_repo_head_hexsha": "bf392e76793940c477c73016f44c5192e902c6b0", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from PIL import Image import numpy as np import argparse parser = argparse.ArgumentParser(description='Generate pixel portraits from an image.') parser.add_argument('file', type=str, help='Input file.') parser.add_argument('-out', type=str, default='', help='Output file.') parser.add_argument('-compression', type=int,...
{"hexsha": "4d39902eeaf64a8217231f06d910b55e8b2f62ef", "size": 730, "ext": "py", "lang": "Python", "max_stars_repo_path": "run.py", "max_stars_repo_name": "ErikBoesen/portrify", "max_stars_repo_head_hexsha": "ab14ab6112b915364b50dd3b35c223cb79f50376", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_stars...
# Copyright 2019 The TensorFlow Probability 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 o...
{"hexsha": "f8f026f826335371632ca881609701f49c924fc5", "size": 18235, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_probability/python/util/deferred_tensor.py", "max_stars_repo_name": "chrism0dwk/probability", "max_stars_repo_head_hexsha": "ab260f15cae94c6802c2f2769fb448ad213b79cd", "max_stars_repo_...
#! /usr/bin/env python # standard library imports import argparse import textwrap import sys # NOQA importing sys so I can mock sys.argv in tests from pandashells.lib import module_checker_lib, arg_lib module_checker_lib.check_for_modules(['pandas']) from pandashells.lib import io_lib import pandas as pd import n...
{"hexsha": "3d7fcc62ce3475a6c94465402a6be948ccd05ed0", "size": 5729, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandashells/bin/p_rand.py", "max_stars_repo_name": "timgates42/pandashells", "max_stars_repo_head_hexsha": "4b565435a25ac713eeeacf28c3e5b52fe94530d8", "max_stars_repo_licenses": ["BSD-2-Clause-Fre...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % [velo2, tmax]= SINCHRONIZE(qini, qfinal, velocity) Finds a mean speed and the required % time to perform a movement between the joint coordinates qini and qfinal. % If the speed of each joint is different, the maxi...
{"author": "4rtur1t0", "repo": "ARTE", "sha": "6e836f3156bb36af63b70bd93375c8ff4ee643c4", "save_path": "github-repos/MATLAB/4rtur1t0-ARTE", "path": "github-repos/MATLAB/4rtur1t0-ARTE/ARTE-6e836f3156bb36af63b70bd93375c8ff4ee643c4/RAPID/functions/synchronize.m"}
""" Standalone script to load all bad odometers in an astropy table. This can also be used for any other google sheet by changing the id and the tab. """ import requests from astropy.table import Table URL_BASE = ('https://docs.google.com/spreadsheets/d/' '{}/gviz/tq?tqx=out:csv&sheet={}') SHEET_ID = '1gv...
{"hexsha": "8ca958cea2b5e6a969777fc6386e405ab9ffa357", "size": 586, "ext": "py", "lang": "Python", "max_stars_repo_path": "spirou/sandbox/bad_odo_list/load_bad_odo.py", "max_stars_repo_name": "njcuk9999/apero-utils", "max_stars_repo_head_hexsha": "f77de4c9123874e5bb6ed6bd03a7de3b27057402", "max_stars_repo_licenses": ["...
""" VariantMap plot Author: CY THAM Version: 1.0.0 """ import math import numpy as np import pandas as pd import plotly.graph_objects as go def VariantMap( dataframe, entries_per_batch=2500, batch_no=1, annotation=None, filter_sample=None, filter_file=None, ...
{"hexsha": "0aad4105f98e73380d24b53fa95cdd8e98a6b87e", "size": 11917, "ext": "py", "lang": "Python", "max_stars_repo_path": "dash_bio/component_factory/_variant.py", "max_stars_repo_name": "cytham/dash-bio", "max_stars_repo_head_hexsha": "331c8b3c80b5243c3cfa5261583a3595072edf15", "max_stars_repo_licenses": ["MIT"], "m...
import numpy import networkx as nx def map_step(p1, p2): u = numpy.unique(p1) splt = [p2[p1 == _u] for _u in u] counter = [numpy.unique(_s, return_counts=True) for _s in splt] counter = [_x[0][numpy.argsort(_x[1])].tolist() for _x in counter] idx = numpy.max(u) + 1 ...
{"hexsha": "9def99f7517aaa6bb25278b19cac23e5814151a4", "size": 18477, "ext": "py", "lang": "Python", "max_stars_repo_path": "white_matter/wm_recipe/p_types/ptype_tree_model.py", "max_stars_repo_name": "alex4200/Long-range-micro-connectome", "max_stars_repo_head_hexsha": "833aad78bc71e49a5059b276e65d3fef21686f9d", "max_...
// Copyright Carl Philipp Reh 2009 - 2016. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <fcppt/make_ref.hpp> #include <fcppt/noncopyable.hpp> #include <fcppt/reference_compariso...
{"hexsha": "d8bc53e30291eed631749e32d5e04d5397b876e1", "size": 2153, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/optional/map.cpp", "max_stars_repo_name": "vinzenz/fcppt", "max_stars_repo_head_hexsha": "3f8cc5babdee178a9bbd06ca3ce7ad405d19aa6a", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": n...
# -*- coding: utf-8 -*- """RegressionTorchModel Base class for model with no cell specific parameters""" import matplotlib.pyplot as plt # + import numpy as np import pandas as pd from cell2location.models.base.torch_model import TorchModel class RegressionTorchModel(TorchModel): r"""Base class for regression ...
{"hexsha": "863b6d52d93164d18b9b68bea616aaad12fb1a5b", "size": 8540, "ext": "py", "lang": "Python", "max_stars_repo_path": "cell2location/models/base/regression_torch_model.py", "max_stars_repo_name": "nadavyayon/cell2location", "max_stars_repo_head_hexsha": "54141fb85d4b0d64825dfdb6d1bf147b025c856b", "max_stars_repo_l...
"""Read, Write, and Convert between different word vector serialization formats.""" __version__ = "4.0.0" from typing import Dict, Tuple from enum import Enum import numpy as np #: A mapping of word to integer index. This index is used pull the this words #: vector from the matrix of word vectors. Vocab = Dict[str,...
{"hexsha": "e1cc2a2ad53d37b074b6a0c162feb68c71caaa9f", "size": 4012, "ext": "py", "lang": "Python", "max_stars_repo_path": "word_vectors/__init__.py", "max_stars_repo_name": "blester125/word-vectors", "max_stars_repo_head_hexsha": "4f6d8b2b6d8b87fad453a37000c6d0d236a6cb96", "max_stars_repo_licenses": ["MIT"], "max_star...
import cv2 import numpy as np import pytesseract from PIL import Image # Path of working folder on Disk src_path = "Gamer" def get_string(img_path): # Read image with opencv img = cv2.imread(img_path) # Convert to gray img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # Apply dilation a...
{"hexsha": "e2380b79d726a6eb3da7035140e365d620688224", "size": 1187, "ext": "py", "lang": "Python", "max_stars_repo_path": "untitled0.py", "max_stars_repo_name": "Vrittik/PyPiTess", "max_stars_repo_head_hexsha": "498e3a97f5148f6c85344a68d058e51465fa49ef", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nu...
program ut_dyn_ipert use m_dyn, only: dyn_init use m_dyn, only: dyn_vect use m_dyn, only: dyn_get use m_dyn, only: dyn_put use m_dyn, only: dyn_clean use m_set_eta, only: set_eta use m_mapz_pert, only: mapz_pert_set use m_mapz_pert, only: mapz_pert_interp implicit none type(dyn_vect) :: xpi ! input vector type(dyn_ve...
{"hexsha": "c96afa967972268067fe0df0018409678560e783", "size": 1610, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Shared/GMAO_hermes/ut_dyn_ipert.f90", "max_stars_repo_name": "joeylamcy/gchp", "max_stars_repo_head_hexsha": "0e1676300fc91000ecb43539cabf1f342d718fb3", "max_stars_repo_licenses": ["NCSA", "Apac...
module mod_settings use iso_fortran_env, only: wp=>real64 implicit none private public :: t_settings type t_settings integer :: length = 0 integer :: width = 0 end type t_settings end module mod_settings
{"hexsha": "6d8d463d303617074af81e5a0171ba88d19da3da", "size": 275, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/settings/mod_settings.f90", "max_stars_repo_name": "cbcoutinho/learn_dg", "max_stars_repo_head_hexsha": "b22bf91d1a0daedb6b48590c7361c3a9c3c7f371", "max_stars_repo_licenses": ["BSD-2-Clause"]...
[STATEMENT] lemma gen_in_free_hull: "x \<in> G \<Longrightarrow> x \<in> \<langle>\<BB>\<^sub>F G\<rangle>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<in> G \<Longrightarrow> x \<in> \<langle>\<BB>\<^sub>F G\<rangle> [PROOF STEP] using free_hull.free_gen_in[folded basis_gen_hull_free] [PROOF STATE] proof (pr...
{"llama_tokens": 212, "file": "Combinatorics_Words_Submonoids", "length": 2}
SUBROUTINE INVP2 (*) C C INVP2 INITIALIZES THEN CALLS EITHER SDCOMP OR DECOMP DEPENDING ON C THE OPTION SELECTED ON THE EIGR CARD C INTEGER FILEA ,FILEL ,FILEU ,SCR1 , 1 SCR2 ,SCR3 ,SCR4 ,SCR5 , 2 SR1FIL ...
{"hexsha": "3e042b8778516f409dab2dd4b092fae77d3df84c", "size": 2611, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "mis/invp2.f", "max_stars_repo_name": "ldallolio/NASTRAN-95", "max_stars_repo_head_hexsha": "6d2c175f5b53ebaec4ba2b5186f7926ef9d0ed47", "max_stars_repo_licenses": ["NASA-1.3"], "max_stars_count": 1...
# Autogenerated wrapper script for Exodus_jll for x86_64-linux-gnu export libexodus using Zlib_jll using NetCDF_jll using HDF5_jll JLLWrappers.@generate_wrapper_header("Exodus") JLLWrappers.@declare_library_product(libexodus, "libexodus.so.2") function __init__() JLLWrappers.@generate_init_header(Zlib_jll, NetCDF_...
{"hexsha": "54e65572a2a12d5bcd438ea1f8958e85a3758115", "size": 521, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/wrappers/x86_64-linux-gnu.jl", "max_stars_repo_name": "JuliaBinaryWrappers/Exodus_jll.jl", "max_stars_repo_head_hexsha": "738e0ef23ee095ae1d0818453088caf9a2151f3d", "max_stars_repo_licenses": ["...
import os import cv2 import time import numpy as np import pyautogui import matplotlib.pyplot as plt from input_feeder import InputFeeder from mouse_controller import MouseController from face_detection import Model_fd from gaze_estimation import Model_ge from facial_landmarks_detection import Model_fld from head_pose_...
{"hexsha": "df67b484bc799e1c36c9aac365dd46cca21d5596", "size": 7200, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "ojsindher/Computer-Pointer-Controller-OPENVINO", "max_stars_repo_head_hexsha": "7e6c286d0eb90005cc5fc881439f09776c31755e", "max_stars_repo_licenses": ["MIT"], "ma...
// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include <config.h> #include <cstddef> #incl...
{"hexsha": "607a395712cd205ed69d8b133100b3c8a6a71468", "size": 36166, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/bin/perfdhcp/tests/command_options_unittest.cc", "max_stars_repo_name": "nchaigne/kea", "max_stars_repo_head_hexsha": "2badfd4d9b4f2420b0e9683db5da16a3ab90dd81", "max_stars_repo_licenses": ["Apa...
from keras.layers import Dense, Dropout, Conv2D, Flatten from keras.models import Sequential from snake import NUM_CHANNELS, NUM_ACTIONS from collections import deque import random import numpy as np import keras class DQNAgent: def __init__(self, field_size, gamma, batch_size, min_replay_memory_size, replay_memo...
{"hexsha": "07fa5552af3800bd3c915959f8293a217bbbd67c", "size": 3259, "ext": "py", "lang": "Python", "max_stars_repo_path": "dqn_agent.py", "max_stars_repo_name": "choyi0521/snake-reinforcement-learning", "max_stars_repo_head_hexsha": "4881dfc163378f615654d85262901480858e5e65", "max_stars_repo_licenses": ["MIT"], "max_s...
(* Copyright (C) 2017 M.A.L. Marques This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. *) (* type: work_gga_x *) theta0 := 1.0008: theta1 := 0.1926: theta2 := 1.8962: f0...
{"hexsha": "5c6446a1796123e920f015c157fb5624e6789362", "size": 406, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "libxc-4.2.3/maple/gga_x_bayesian.mpl", "max_stars_repo_name": "rdietric/lsms", "max_stars_repo_head_hexsha": "8d0d5f01186abf9a1cc54db3f97f9934b422cf92", "max_stars_repo_licenses": ["BSD-3-Clause"],...
[STATEMENT] lemma fv_assignment_rhs_subset_fv_st'[simp]: "fv\<^sub>s\<^sub>e\<^sub>t (assignment_rhs\<^sub>s\<^sub>t S) \<subseteq> fv\<^sub>s\<^sub>t S" [PROOF STATE] proof (prove) goal (1 subgoal): 1. fv\<^sub>s\<^sub>e\<^sub>t (assignment_rhs\<^sub>s\<^sub>t S) \<subseteq> fv\<^sub>s\<^sub>t S [PROOF STEP] by (indu...
{"llama_tokens": 172, "file": "Stateful_Protocol_Composition_and_Typing_Strands_and_Constraints", "length": 1}
#ifndef CANARD_NET_OFP_DETAIL_ANY_TYPE_HPP #define CANARD_NET_OFP_DETAIL_ANY_TYPE_HPP #include <canard/net/ofp/detail/config.hpp> #include <cstddef> #include <cstdint> #include <memory> #include <type_traits> #include <utility> #include <boost/mpl/contains.hpp> #include <boost/mpl/deref.hpp> #include <boost/mpl/integ...
{"hexsha": "9f1381f82eced5938e86577444c07c94a7374b3a", "size": 7850, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/canard/net/ofp/detail/any_type.hpp", "max_stars_repo_name": "amedama41/bulb", "max_stars_repo_head_hexsha": "2e9fd8a8c35cfc2be2ecf5f747f83cf36ffbbdbb", "max_stars_repo_licenses": ["BSL-1.0"]...
from __future__ import print_function from sklearn.feature_extraction.text import CountVectorizer import argparse import logging from time import time import numpy as np import codecs from gensim import corpora, matutils from gensim.models import TfidfModel, LsiModel import os import ntpath from pathlib import Path fr...
{"hexsha": "3f33201df68c6aa4eb1eefea2e388fb52a64ff40", "size": 18061, "ext": "py", "lang": "Python", "max_stars_repo_path": "word2igf.py", "max_stars_repo_name": "iarroyof/discrimative_attributes", "max_stars_repo_head_hexsha": "1f18eddd5f114f45704d96955199ba686098d2e6", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
Require ClassicalEpsilon. Require Import Reals Psatz. From stdpp Require Import tactics. From mathcomp Require Import ssrfun ssreflect eqtype ssrbool seq fintype choice bigop. From discprob.basic Require Import base sval order monad bigop_ext nify. From discprob.prob Require Import prob countable finite stochastic_orde...
{"author": "jtassarotti", "repo": "coq-proba", "sha": "11d69b2286940ff532421252a7d9b1384c2f674a", "save_path": "github-repos/coq/jtassarotti-coq-proba", "path": "github-repos/coq/jtassarotti-coq-proba/coq-proba-11d69b2286940ff532421252a7d9b1384c2f674a/theories/monad/idxval/irrel_equiv.v"}
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Fri Jan 3 21:15:20 2020 @author: lukemcculloch """ import os import weakref try: from memory_profiler import profile MEM_PROFILE = True except: print 'please install memory_profiler' MEM_PROFILE = False # import numpy as np import matplotli...
{"hexsha": "2f25693e4278f71dafa76fac5488a105b1780180", "size": 52973, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Solvers.py", "max_stars_repo_name": "LukeMcCulloch/PyCFD", "max_stars_repo_head_hexsha": "6720e6575e25f8c274ef591d6c215de90a740935", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ...
from zoopt import Objective from zoopt import Parameter from zoopt import Dimension from zoopt import Solution import numpy as np def ackley(solution): """ Ackley function for continuous optimization """ x = solution.get_x() bias = 0.2 ave_seq = sum([(i - bias) * (i - bias) for i in x]) / len(...
{"hexsha": "ea7ff81f8cb60d89c03666e17d4fb78bb8f61527", "size": 1566, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_objective.py", "max_stars_repo_name": "HowardHu97/ZOOpt", "max_stars_repo_head_hexsha": "01568e8e6b0e65ac310d362af2da5245ac375e53", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import matplotlib.patches as mpatches import matplotlib.pyplot as plt import numpy as np def read_file(f): best_result = (-1, -1, []) ponctuations = [] with open(f, 'r') as f: for line in f.readlines(): line = line.split(',') ponct = float(line[0]) ponctuations....
{"hexsha": "1ed9b2cd2eebd5dcca1071e753c9330b946c3fc0", "size": 3296, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotter/plot.py", "max_stars_repo_name": "vitornl/pokemongo-raid", "max_stars_repo_head_hexsha": "67a35de0c67c04a0dca78a8767db4f9da8769e51", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import re import sys sys.path.append('..') import numpy as np import scipy.special import matplotlib.pyplot as plt import matplotlib.colors import palettable import pandas as pd import glob import os.path from lib import * from lib.analytical import * from lib.fitting import * def growthlaw(T, d, t0, gamma): retu...
{"hexsha": "fcecc28f19db26347d00dc4b19b4eeb85b28f91f", "size": 1744, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/model_growth_and_fluctuations/run_sampling.py", "max_stars_repo_name": "andim/paper-tcellimprint", "max_stars_repo_head_hexsha": "e89605e51014fa3f347f96bab3d3d84c2b013a2f", "max_stars_repo_li...
import pytest import numpy as np import toppra import toppra.constraint as constraint @pytest.fixture(params=[(0, 0)]) def vel_accel_robustaccel(request): "Velocity + Acceleration + Robust Acceleration constraint" dtype_a, dtype_ra = request.param vlims = np.array([[-1, 1], [-1, 2], [-1, 4]], dtype=float...
{"hexsha": "0d969f5f1fe9e35fc1bc366b139381680ea5a617", "size": 815, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/tests/solverwrapper/conftest.py", "max_stars_repo_name": "stevegolton/toppra", "max_stars_repo_head_hexsha": "846e2a7f5b87e0e1884b244b07d5fd661edcd9bd", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/env python # -*- coding: utf-8 -*- # indexhandlers.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Apr 2018 ''' These are Tornado handlers for the AJAX actions. ''' #################### ## SYSTEM IMPORTS ## #################### import logging import json from datetime import datetime import numpy as n...
{"hexsha": "e289431808d23770b07d69540d3a8581c73ba23c", "size": 19567, "ext": "py", "lang": "Python", "max_stars_repo_path": "vizinspect/frontend/actionhandlers.py", "max_stars_repo_name": "johnnygreco/viz-inspect", "max_stars_repo_head_hexsha": "3fc24e00062e28ccbc5fea70c20ed76d380a4e16", "max_stars_repo_licenses": ["MI...
# -*- coding: utf-8 -*- """ Created on Tue Mar 7 13:26:06 2017 @author: nblago """ from __future__ import print_function import datetime from astropy.io import votable import numpy as np import os import logging import warnings from astropy import units as u from astropy.coordinates import SkyCoord from astropy.tab...
{"hexsha": "3c268e4f8083266094f8b9d84282315b5a5ef55c", "size": 11999, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/photometry/QueryCatalogue.py", "max_stars_repo_name": "nblago/utils", "max_stars_repo_head_hexsha": "862a34eb9820474d1071e5ac2eec58d66d297649", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# -------------------------------------------------------------------------- # ACE1.jl: Julia implementation of the Atomic Cluster Expansion # Copyright (c) 2019 Christoph Ortner <christophortner0@gmail.com> # Licensed under ASL - see ASL.md for terms and conditions. # -------------------------------------------------...
{"hexsha": "ea20acb890681784e6783b208b8b3ec5585cbdd2", "size": 1720, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/prototypes.jl", "max_stars_repo_name": "casv2/ACE1.jl", "max_stars_repo_head_hexsha": "40d7cdfc8141193aeea4ee666b8cedb746928489", "max_stars_repo_licenses": ["RSA-MD"], "max_stars_count": null,...