text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# -*- coding: utf-8 -*- """ Created on Tue Jan 19 22:25:29 2021 @author: milin """ #importing all the libraires import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.ensemble import RandomForestRegressor fr...
{"hexsha": "9fb5d90b7f42f41158379dbada5c8f57a69d0a41", "size": 1586, "ext": "py", "lang": "Python", "max_stars_repo_path": "Model_Building/DA model building.py", "max_stars_repo_name": "shrutijain0/Data-Analyst-Salary", "max_stars_repo_head_hexsha": "092877509663f89c7b642fd75d0403ce74f2a5a8", "max_stars_repo_licenses":...
#-*-coding: UTF-8-*- #################################################################################### """ successfully executed in python 3.6 """ #################################################################################### import numpy as np import os import math import copy from Statistic import ...
{"hexsha": "cd73e86ae3cb7bce2086fd3aa6eb6e97671d48e4", "size": 8982, "ext": "py", "lang": "Python", "max_stars_repo_path": "WuImprovedBaselineCorrection.py", "max_stars_repo_name": "Junjun1guo/improvedWuBaselineCorrection", "max_stars_repo_head_hexsha": "06d2dee77b7fe4cbe746140500f1ededd5ceedf0", "max_stars_repo_licens...
import sys import argparse import numpy as np import tensorflow as tf from tensorflow.keras.preprocessing.text import tokenizer_from_json from tensorflow.keras.preprocessing.sequence import pad_sequences from tensorflow.keras.models import Model from tensorflow.keras.models import load_model from parsecorpus import r...
{"hexsha": "72db81d199630854403be458e8d31a6d8651e8ed", "size": 1847, "ext": "py", "lang": "Python", "max_stars_repo_path": "gen_sentences.py", "max_stars_repo_name": "hhmaia/textgen-tensorflow", "max_stars_repo_head_hexsha": "45bcfca89f7e9c74a19d7d5d1e35bc0951cd6e14", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Functions for data collection # mymean(a) = isempty(a) ? missing : mean(a) mymean(a) = isempty(a) ? 0.0 : mean(a) mystd(a) = isempty(a) ? 0.0 : std(a) mymedian(a) = isempty(a) ? 0.0 : median(a) mysum(a) = isempty(a) ? 0.0 : sum(a) """ knowledge output of the researcher given the problems it has worked on and their ...
{"hexsha": "3aff41bb525682dc41b5790dd7ac4f36ad379ca6", "size": 2149, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/data_collection.jl", "max_stars_repo_name": "kavir1698/Science_ABM.jl", "max_stars_repo_head_hexsha": "6a5ea8d723a62ac85b4e992ea957f61240318431", "max_stars_repo_licenses": ["MIT"], "max_stars_...
/- Copyright (c) 2015, 2017 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Robert Y. Lewis, Johannes Hölzl, Mario Carneiro, Sébastien Gouëzel ! This file was ported from Lean 3 source module topology.metric_space.basic ! leanprover-commun...
{"author": "leanprover-community", "repo": "mathlib3port", "sha": "62505aa236c58c8559783b16d33e30df3daa54f4", "save_path": "github-repos/lean/leanprover-community-mathlib3port", "path": "github-repos/lean/leanprover-community-mathlib3port/mathlib3port-62505aa236c58c8559783b16d33e30df3daa54f4/Mathbin/Topology/MetricSpac...
#!/usr/bin/env python """ Simple binning search algorithm """ __author__ = "Keith Bechtol" # Python libraries import sys import os import glob import yaml from matplotlib import mlab import numpy as np import healpy as hp import astropy.io.fits as pyfits import fitsio as fits # Ugali libraries import ugali.utils.heal...
{"hexsha": "6f9ab445feebb29977309fc341e15bf474e51aae", "size": 11334, "ext": "py", "lang": "Python", "max_stars_repo_path": "simple/search_algorithm.py", "max_stars_repo_name": "sidneymau/simple", "max_stars_repo_head_hexsha": "df1fb1d8cfdbf6f4964a6554072b56609baf5245", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# python3 # # Copyright 2019 The TensorFlow 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
{"hexsha": "4f07e34d603aba5f754bb143214a9376e542d7b3", "size": 6346, "ext": "py", "lang": "Python", "max_stars_repo_path": "sensor.py", "max_stars_repo_name": "cfreeman/hota-alinta", "max_stars_repo_head_hexsha": "70f07a853800bf051e17a51e099b9d8069a35561", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": nu...
import os import uuid import pathlib import numpy as np import torch import baselines.methods.bulkandcut as bnc from baselines.problems import get_flowers from baselines.problems import flowers from baselines.problems import get_fashion from baselines.problems import fashion from baselines import save_experiment def...
{"hexsha": "39c015ef8fcd8acf4e510c018713769fdb72bf2f", "size": 2227, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/bulkandcut.py", "max_stars_repo_name": "serizba/multi-obj-baselines", "max_stars_repo_head_hexsha": "b5c97b8009ed32f0eb9a08454cf0d4c6620a2286", "max_stars_repo_licenses": ["Apache-2.0"], ...
[STATEMENT] lemma (in node_histories) prefix_elem_to_carriers: assumes "xs prefix of i" and "x \<in> set xs" shows "x \<in> set (history i)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<in> set (history i) [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: xs prefix of i x \<in> set x...
{"llama_tokens": 186, "file": "CRDT_Network", "length": 2}
import sys import numpy as np import tensorflow from tensorflow.keras.models import Model def openset_predict(model: Model, X_test: np.ndarray) -> np.ndarray: predictions = model.predict(X_test) openset_predictions = predict_on_threshold(predictions) return openset_predictions def predict_on_threshold(...
{"hexsha": "aa4c7a4942ceade8b16f3b1d847b0cb285ac9aad", "size": 1338, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo.py", "max_stars_repo_name": "Machine-Listeners-Valencia/fsl_osr_dataset_baseline", "max_stars_repo_head_hexsha": "06c99e2e715be550ac0c85c5c1e4f713228d5450", "max_stars_repo_licenses": ["MIT"]...
"Symbolic integration via external software" from sage.symbolic.expression import Expression from sage.symbolic.ring import SR def maxima_integrator(expression, v, a=None, b=None): """ sage: from sage.symbolic.integration.external import maxima_integrator sage: maxima_integrator(sin(x), x) ...
{"hexsha": "481ee9c01dee266af872e46c2f0c6eb48ee14ea5", "size": 4452, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage/symbolic/integration/external.py", "max_stars_repo_name": "switzel/sage", "max_stars_repo_head_hexsha": "7eb8510dacf61b691664cd8f1d2e75e5d473e5a0", "max_stars_repo_licenses": ["BSL-1.0"],...
from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report import matplotlib.pyplot as plt from matplotlib.patches import Patch import matplotlib.gridspec as gridspec import scipy.io as scio import numpy as np from minisom import MiniSom import math import torch fro...
{"hexsha": "53fb0d5bb337e2d154b060ab83e345f0e9031057", "size": 7846, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "KGTKD/EE7207", "max_stars_repo_head_hexsha": "8fde6310aba96b58631f1652e2c32663d621a0d3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_r...
# Copyright 2021 Franklin Siqueira. # SPDX-License-Identifier: Apache-2.0 ''' Created on Jul 12, 2019 @author: franklincarrilho ''' from pandas_datareader import data from dateutil.relativedelta import relativedelta import datetime from datetime import date, time import yfinance as yf import numpy as np # import matp...
{"hexsha": "f0c9e1098b78d9cc62b981fb9e7164b9eeb50c77", "size": 6863, "ext": "py", "lang": "Python", "max_stars_repo_path": "app18/stocks.py", "max_stars_repo_name": "Franklin-Siqueira/Python-Generic-lLab", "max_stars_repo_head_hexsha": "c56208d14196b4ed2046ecf604c2b535fbdcf2c9", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python # -*- coding: utf8 -*- """Combine Normalized DRACS Specta. Script that take one imput parameter which is the path to the normobs directory Needs functions/modules to get the filenames, export to a fits tablefile, change fits hdr """ import argparse import fnmatch import os import time import I...
{"hexsha": "87c727d692217e620b8c0cce1036fa61c75bdc7b", "size": 7398, "ext": "py", "lang": "Python", "max_stars_repo_path": "octotribble/Combine_nod_spectra.py", "max_stars_repo_name": "jason-neal/equanimous-octo-tribble", "max_stars_repo_head_hexsha": "a8788909331034725afe38ae96c83584b17c9fbd", "max_stars_repo_licenses...
[STATEMENT] lemma lzip_trans'_fusion [stream_fusion]: "lunstream' (lzip_trans' g h) (sg, sh, None) = lzip (lunstream' g sg) (lunstream' h sh)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lunstream' (lzip_trans' g h) (sg, sh, None) = lzip (lunstream' g sg) (lunstream' h sh) [PROOF STEP] by transfer(rule lzip_tra...
{"llama_tokens": 146, "file": "Stream_Fusion_Code_Stream_Fusion_LList", "length": 1}
import os, sys, inspect # realpath() with make your script run, even if you symlink it :) cmd_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile( inspect.currentframe() ))[0]) + "/../fdasrsf") if cmd_folder not in sys.path: sys.path.insert(0, cmd_folder) import h5py import numpy as np import cu...
{"hexsha": "5871bf8695c1c4040fdef8f368a02902a0ee5194", "size": 1332, "ext": "py", "lang": "Python", "max_stars_repo_path": "debug/test_oc_mlogit.py", "max_stars_repo_name": "gitter-badger/fdasrsf_python", "max_stars_repo_head_hexsha": "f59bd74b570662c17a1a042556d4887e6a75fa3e", "max_stars_repo_licenses": ["BSD-3-Clause...
""" Euler deconvolution methods for potential fields. **Implementations** * :class:`~fatiando.gravmag.euler.Classic`: The classic 3D solution to Euler's equation for potential fields (Reid et al., 1990). Runs on the whole dataset. **Solution selection procedures** * :class:`~fatiando.gravmag.euler.ExpandingWindow...
{"hexsha": "5aaf66dee3f45b9f24381861c9d5c83ce909e39d", "size": 8902, "ext": "py", "lang": "Python", "max_stars_repo_path": "fatiando/gravmag/euler.py", "max_stars_repo_name": "silky/fatiando", "max_stars_repo_head_hexsha": "5041c6b29758a5e73e9d7b2b906fa5e493fd9aba", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
/* * Copyright 2021 Assured Information Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
{"hexsha": "73fab73a3e7a6b941335aa35d8352965d3828099", "size": 2998, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/windows/libraries/ws2_32/functions/WSASendTo.cc", "max_stars_repo_name": "srpape/IntroVirt", "max_stars_repo_head_hexsha": "fe553221c40b8ef71f06e79c9d54d9e123a06c89", "max_stars_repo_licenses": [...
import numpy as np import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func import datetime as dt import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_en...
{"hexsha": "0a220d1d87b201fe8a15abc2cc0ac24145bde64c", "size": 4423, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "alalufcan/sqlalchemy-challenge", "max_stars_repo_head_hexsha": "0f0644ef763d67a7013ed0e470c9cbb9ed25890d", "max_stars_repo_licenses": ["ADSL"], "max_stars_count": ...
# -*- coding: utf-8 -*- """ Created on Sun Jun 24 11:45:06 2018 Administrator """ import cv2 import numpy as np o = cv2.imread(r'../image/contours.bmp') gray = cv2.cvtColor(o,cv2.COLOR_BGR2GRAY) ret, binary = cv2.threshold(gray,127,255,cv2.THRESH_BINARY) image,contours, hierarchy = cv2.findContours(binary,cv2.RETR...
{"hexsha": "6f53669ea3a38d8e44f3aa1b99d4c340acc28156", "size": 502, "ext": "py", "lang": "Python", "max_stars_repo_path": "py_simple/13.\u56fe\u50cf\u8f6e\u5ed3/13.1.1\u56fe\u50cf\u8f6e\u5ed3.py", "max_stars_repo_name": "ztfmars/OpenCV_Tutorial", "max_stars_repo_head_hexsha": "2c9cf57f469dfec2aca8356f59f7473e5a506988",...
# -*- coding: utf-8 -*- # Author: Hao Chun Chang <changhaochun84@gmail.comm> # # LIME: Local Interpretable Model-agnostic Explanations # # Ref: # 1. https://arxiv.org/abs/1602.04938 # 2. https://github.com/marcotcr/lime from functools import partial import numpy as np import scipy as sp from sklearn.linear_model impo...
{"hexsha": "d767b4ab6bb85f4106dc0205ef8c98f1c9d5bf94", "size": 16511, "ext": "py", "lang": "Python", "max_stars_repo_path": "interpret/LIME.py", "max_stars_repo_name": "haochunchang/explain-ECG-diagnosis", "max_stars_repo_head_hexsha": "6799ad38a71e2392192919d123548bdce5059541", "max_stars_repo_licenses": ["MIT"], "max...
function _fatal_err(f::Function, gwt::GWTask) try; f() catch err _printerr(err) _print_eotask(gwt) _flush() if is_worker_mode(gwt) _up_task_status!(gwt, _GW_TASK_ERROR_STATUS) # TODO: del proc reg end exit() end end function _expr_...
{"hexsha": "3a31f92936c76aa6941412885349ab7597cdc9a7", "size": 1727, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Tasks/utils.jl", "max_stars_repo_name": "josePereiro/GitWorkers", "max_stars_repo_head_hexsha": "1228521db61f601ee8a21dcfa2a8b1f2b8517587", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python2 """ bittrex_autotrader.py Bittrex currency exchange autotrading script in a nutshell. Copyright 2017, Marc S. Brooks (https://mbrooks.info) Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php Dependencies: humanfriendly numpy requests N...
{"hexsha": "f97cf6938ccf3420e98ab5c4638abd63ebf13d8d", "size": 25492, "ext": "py", "lang": "Python", "max_stars_repo_path": "bittrex_autotrader.py", "max_stars_repo_name": "Daiwv/bittrex_autotrader", "max_stars_repo_head_hexsha": "d4d6ba78c23e3b6edf2f52bf190077356f0573f0", "max_stars_repo_licenses": ["MIT"], "max_stars...
import random from PIL import Image import torch from torchvision import transforms import torch.nn as nn import numpy as np class GaussianBlur(object): """Blur a single image on CPU. """ def __init__(self, kernel_size, sigma_min=0.1, sigma_max=2.0): radius = kernel_size // 2 kernel_size...
{"hexsha": "c7eeae71679c4e378ec00d45803f2a6593d77b3f", "size": 2453, "ext": "py", "lang": "Python", "max_stars_repo_path": "augment/gaussian_blur.py", "max_stars_repo_name": "merlinarer/scrl", "max_stars_repo_head_hexsha": "f5bc426ed6eef130d44dd3a5609dc0772da59613", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
# -*- coding: utf-8 -*- """ Created on Fri Mar 4 10:58:22 2022 @author: sarangbhagwat A module with examples of task-based unit process specifications. """ import numpy as np import biosteam as bst import thermosteam as tmo from thermosteam import Stream from biosteam.process_tools import BoundedNumericalSpecifica...
{"hexsha": "eb78becc6d4d6dac6afae08c269b0c4b16708345", "size": 5643, "ext": "py", "lang": "Python", "max_stars_repo_path": "BioSTEAM 2.x.x/biorefineries/make_a_biorefinery/example_process_specifications.py", "max_stars_repo_name": "yoelcortes/Bioindustrial-Complex", "max_stars_repo_head_hexsha": "d39edfec88e443ef7a6221...
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Floris van Doorn, Gabriel Ebner, Yury Kudryashov -/ import data.nat.enat import order.conditionally_complete_lattice /-! # Conditionally complete linear order structur...
{"author": "jjaassoonn", "repo": "projective_space", "sha": "11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce", "save_path": "github-repos/lean/jjaassoonn-projective_space", "path": "github-repos/lean/jjaassoonn-projective_space/projective_space-11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce/src/data/nat/lattice.lean"}
import numpy as np import pytest from imitation.data import types from imitation.data.buffer import Buffer, ReplayBuffer def _fill_chunk(start, chunk_len, sample_shape, dtype=np.float): fill_vals = np.arange(start, start + chunk_len, dtype=dtype) fill_vals = np.reshape(fill_vals, (-1,) + (1,) * len(sample_sh...
{"hexsha": "655f5f4af9c7a3d7c7cdb210129c9fa52c714af6", "size": 8946, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_buffer.py", "max_stars_repo_name": "bbrito/imitation-1", "max_stars_repo_head_hexsha": "c1c1f01ce7a141a501238adcdffa73fe8acceb73", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import re import sys import nltk import string import math import numpy as np import seaborn as sns import pandas as pd import matplotlib import matplotlib.pyplot as plt from matplotlib.colors import LogNorm import sklearn from sklearn.model_selection import cross_val_predict, KFold from sklearn.metrics import classifi...
{"hexsha": "29166acfe8a979fbf9d4968f127d1f1c8b6ed6dc", "size": 15139, "ext": "py", "lang": "Python", "max_stars_repo_path": "AutomaticStructuring/CRF Baseline/CRF_training_testing_baseline.py", "max_stars_repo_name": "ShreyasiPathak/AutomaticStructuringBreastCancerReports", "max_stars_repo_head_hexsha": "a7e109b515e99f...
import numpy as np import copy from scipy.stats import entropy from scipy.special import logsumexp from numpy.random import choice from scipy.special import softmax #from scipy.stats import entropy #import LinkedList as LL #class LinkedList(object): # def __init__(self, head=None): # self.head = head ...
{"hexsha": "e05d70f3991a5597e03a64e9351014fcca7d8279", "size": 13342, "ext": "py", "lang": "Python", "max_stars_repo_path": "figure5/MethodsTrueData_M.py", "max_stars_repo_name": "QianLab/WMOCU_AL", "max_stars_repo_head_hexsha": "b8f095366e731a730ba6e043a7fa57ef66510a33", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# Automatically adapted for numpy.oldnumeric Jul 23, 2007 by # taken from Pmv/measureCommands.py def torsion(x1, x2, x3, x4): """ Compute the torsion angle between x1, x2, x3, x4. All coordinates are cartesian; result is in degrees. Raises a ValueError if angle is not defined. """ from math i...
{"hexsha": "a4a12df7bddd6e774632ca4a99d6ee9a98ece2cb", "size": 1474, "ext": "py", "lang": "Python", "max_stars_repo_path": "mgl_tools/mglutil/math/torsion.py", "max_stars_repo_name": "mesoscope/cellpack", "max_stars_repo_head_hexsha": "ec6b736fc706c1fae16392befa814b5337a3a692", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma tm_ntcf_arrows_in_cf_arrows[cat_map_cs_intros]: assumes "\<NN> \<in>\<^sub>\<circ> tm_ntcf_arrows \<alpha> \<AA> \<BB>" shows "\<NN> \<in>\<^sub>\<circ> ntcf_arrows \<alpha> \<AA> \<BB>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<NN> \<in>\<^sub>\<circ> ntcf_arrows \<alpha> \<AA> \<BB> [P...
{"llama_tokens": 308, "file": "CZH_Elementary_Categories_czh_ecategories_CZH_DG_FUNCT", "length": 2}
# -*- coding: utf-8 -*- """ Collection of tools for writing formatted text to files. """ import numpy as np from pyyeti import ytools def getith(i, args, fncs): """ Return list with i'th value from each input, typically called by :func:`vecwrite`. Parameters ---------- i : integer Sp...
{"hexsha": "0c2ac1e16c3a2e2c73f049eb0c91be9038465e23", "size": 12367, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyyeti/writer.py", "max_stars_repo_name": "twmacro/pyye", "max_stars_repo_head_hexsha": "c4febd44be836bd87368da13c1fb0cf82838b687", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":...
#! /usr/bin/env python from operator import is_ from random import randint import gym from gym import spaces from gym.spaces import space from typing import Union from stable_baselines3.common.env_checker import check_env import yaml from rl_agent.utils.observation_collector import ObservationCollector from rl_agent.ut...
{"hexsha": "2f39a885692e51d3a1deb63bedba8645800c4703", "size": 7741, "ext": "py", "lang": "Python", "max_stars_repo_path": "navigation/arena_local_planner/learning_based/arena_local_planner_drl/rl_agent/envs/flatland_gym_env.py", "max_stars_repo_name": "kilinmao/sarl_star", "max_stars_repo_head_hexsha": "dde9bb2b690c70...
""" see: get_sorted_connected_regions input a 3D mask numpy array, output a dict, with key 1, 2, 3, ... (int), which conforms to the ranking of the volume of the connected component. The value of the dict is lists of locations like {1: [(x1, y1, z1), (x2, y2, z2), ...], ...} """ import numpy as np import Tool_Functions...
{"hexsha": "523fe12cd2f7be941300025c3595ab62035390bc", "size": 24271, "ext": "py", "lang": "Python", "max_stars_repo_path": "Analysis/connect_region_detect.py", "max_stars_repo_name": "LongxiZhou/DLPE-method", "max_stars_repo_head_hexsha": "ed20abc91e27423c7ff677a009cfd99314730217", "max_stars_repo_licenses": ["BSD-3-C...
import sys count = 0; total = 0 data = sys.stdin.read().splitlines() for i in range(len(data)) : val = int(data[i],16) if (val >= 555555 and val <= 777777) : total += 1 count += 1 print(float(total/count)) #print(val) #print(type(val)) #print(count) #print(total) #print(val) #print(data[0]) """ i...
{"hexsha": "b2123c225bea4aedea7ae6132698b1894870f2d6", "size": 1985, "ext": "py", "lang": "Python", "max_stars_repo_path": "unsorted.py", "max_stars_repo_name": "TotallyNotTito/concurrency", "max_stars_repo_head_hexsha": "151bbabe4daac1b1e72e75fdbe2724d0863cc4a9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
""" Given annotations, segment images to extract lines, words, and letters. """ # Copyright (c) 2017 Ben Zimmer. All rights reserved. import cv2 import numpy as np from handwriting import geom VISUALIZE = False def extract_line_image(line, image, px_above, px_below): """extract line annotation image slic...
{"hexsha": "b954e5b28c4a01dd605113033f6e1ae7caaf02fe", "size": 2551, "ext": "py", "lang": "Python", "max_stars_repo_path": "handwriting/extract.py", "max_stars_repo_name": "bdzimmer/handwriting", "max_stars_repo_head_hexsha": "eaa22c12a7a3210bbbee67b3d35ab0bb50bb38ad", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
""" Created on Sun Feb 2 13:28:48 2020 @author: matias """ import numpy as np from scipy.interpolate import interp1d from scipy.constants import c as c_luz #metros/segundos c_luz_km = c_luz/1000 import sys import os from os.path import join as osjoin from pc_path import definir_path path_git, path_datos_global = def...
{"hexsha": "7a93ceb60ea7904e68011f4548b0bf2c1931a204", "size": 4820, "ext": "py", "lang": "Python", "max_stars_repo_path": "Software/Funcionales/funciones_alternativos_odintsov.py", "max_stars_repo_name": "matiasleize/tesis_licenciatura", "max_stars_repo_head_hexsha": "5df6e341314583702b466b8ed7977d410f0ee457", "max_st...
using SparseArrays using LinearAlgebra using UnicodePlots include("diagonal_sbp.jl") # flatten tuples to arrays flatten_tuples(x) = reshape(collect(Iterators.flatten(x)), length(x[1]), length(x)) ⊗(A,B) = kron(A, B) const BC_DIRICHLET = 1 const BC_NEUMANN = 2 const BC_LOC...
{"hexsha": "f98678ee3621e376107a90ba196d3a574d32a0af", "size": 29954, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "global_curved.jl", "max_stars_repo_name": "brittany-erickson/HybridSBP", "max_stars_repo_head_hexsha": "29dc9fe084c561ea0c4007e5097baf456fd86462", "max_stars_repo_licenses": ["Unlicense"], "max_st...
from __future__ import print_function import argparse import os import shutil import time import random import cv2 import imageio import utils import numpy as np import pickle import scipy.misc import skimage import skimage.io import torch import torch.nn as nn import torch.backends.cudnn as cudnn import torch.opt...
{"hexsha": "400b81c22567e5ff7eac76f589dc30d9f4ea62ab", "size": 22431, "ext": "py", "lang": "Python", "max_stars_repo_path": "references/video_classification/test_mem_online.py", "max_stars_repo_name": "ajabri/vision", "max_stars_repo_head_hexsha": "f69847cc761937891be77e1780bc4ddea46dbe68", "max_stars_repo_licenses": [...
# Packages import pandas as pd import numpy as np import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import seaborn as sns from pprint import pprint import argparse # Functions def plotHeatmap(data, fname, xlabs, ylabs): cm = "hot_r" fig = plt.figure(figsize=(3*len(xlabs), len(ylabs))) sns.set(...
{"hexsha": "8baaff9ed23d7a12dc3625e93b607f2ef7e794f8", "size": 4012, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotLDSC_2.py", "max_stars_repo_name": "mwoodbri/ldsc_wdl", "max_stars_repo_head_hexsha": "b9497b9cdd23c990f8003adde368e852d2349a0c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
#! /usr/bin/env python3 # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
{"hexsha": "753fbb9d1d798b0d0862d6ee620ff4357d93d8fd", "size": 5729, "ext": "py", "lang": "Python", "max_stars_repo_path": "difflogic/envs/graph/graph.py", "max_stars_repo_name": "isabella232/neural-logic-machines", "max_stars_repo_head_hexsha": "3f8a8966c54d13d2658c77c03793a9a98a283e22", "max_stars_repo_licenses": ["A...
// // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) // // 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) // // Official repository: https://github.com/boostorg/beast // // Test that header ...
{"hexsha": "21a5fecb415781caacf6de3e7dc55606e330557c", "size": 1867, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/beast/core/dynamic_buffer_ref.cpp", "max_stars_repo_name": "DokuEnterprise/boost", "max_stars_repo_head_hexsha": "f2dc8be896eabd5f5da18d3b78abec2f5a04d4e5", "max_stars_repo_licenses": ["BSL-1.0...
module Niancat include("Users.jl") include("Http.jl") include("Gameface.jl") include("Languages.jl") include("Formatters.jl") include("Persistence.jl") include("Scores.jl") include("GameServiceImpl.jl") include("Instances.jl") module Games include("Games/NiancatGames.jl") end include("service.jl") end # module
{"hexsha": "9d2db918d0aeb5ad5c894e44c8b6394ab41be900", "size": 316, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Niancat.jl", "max_stars_repo_name": "erikedin/Niancat.jl", "max_stars_repo_head_hexsha": "e5c94bbbc957dae1a9896dadf285cd7e900dde7b", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
import numpy as np from time import clock from pygeonet_rasterio import * from pygeonet_plot import * # Skeleton by thresholding one grid measure e.g. flow or curvature def compute_skeleton_by_single_threshold(inputArray, threshold): skeletonArray = np.zeros((inputArray.shape)) skeletonArray[np.where...
{"hexsha": "d54f14f065df4435923284eb08dcf3efe8981afa", "size": 3451, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygeonet_skeleton_definition.py", "max_stars_repo_name": "uva-hydroinformatics/wetland_identification", "max_stars_repo_head_hexsha": "21b797eec1f4babe5c4fb53441bc256385dc2094", "max_stars_repo_li...
(* This file is generated by Why3's Coq driver *) (* Beware! Only edit allowed sections below *) Require Import BuiltIn. Require BuiltIn. Require HighOrd. Require int.Int. Require int.Abs. Require int.MinMax. Require int.EuclideanDivision. Require real.Real. Require map.Map. Axiom set : forall (a:Type), Type. Param...
{"author": "Heim-AI", "repo": "qbricks.github.io", "sha": "0aed52b81eab137cb3dde15d02ed59a36e532247", "save_path": "github-repos/coq/Heim-AI-qbricks.github.io", "path": "github-repos/coq/Heim-AI-qbricks.github.io/qbricks.github.io-0aed52b81eab137cb3dde15d02ed59a36e532247/Case_studies/deutsch-jozsa/deutschmnjozsa_Deutsc...
# -*- coding: utf-8 -*- r""" A Francy Widget for the Jupyter Notebook. AUTHORS :: Odile Bénassy """ from ipywidgets import register from ipywidgets.widgets.widget_string import Text from traitlets import Any try: from .francy_adapter import FrancyAdapter except: from francy_adapter import FrancyAdapter #...
{"hexsha": "5bf9c5a3f19420b36edc7a550ed4ad333ca97e21", "size": 7370, "ext": "py", "lang": "Python", "max_stars_repo_path": "francy_widget/francy_widget.py", "max_stars_repo_name": "zerline/sage-francy", "max_stars_repo_head_hexsha": "876419b73788e2e635bea2c2d4c49866e6cf8fc4", "max_stars_repo_licenses": ["BSL-1.0"], "ma...
import torch import random import numpy as np class GeneratorData(object): def __init__(self, training_data_path, tokens=None, start_token='<', end_token='>', max_len=120, use_cuda=None, **kwargs): super(GeneratorData, self).__init__() if 'cols_to_read' not in kwargs: ...
{"hexsha": "feae7a81cc113cda5939af74bee054c649a7d587", "size": 4037, "ext": "py", "lang": "Python", "max_stars_repo_path": "ml_models/files/util_funcs.py", "max_stars_repo_name": "joeym-09/Synbiolic", "max_stars_repo_head_hexsha": "8a81e362b40b8497124318b42439df8c0e560adf", "max_stars_repo_licenses": ["MIT"], "max_star...
""" Utility functions related to concat """ import numpy as np import pandas.core.common as com import pandas.tslib as tslib from pandas import compat from pandas.compat import map def get_dtype_kinds(l): """ Parameters ---------- l : list of arrays Returns ------- a set of kinds that ex...
{"hexsha": "53db9ddf79a5c277d004ba0f8f22512c4bc9949a", "size": 12481, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandas/types/concat.py", "max_stars_repo_name": "ranaroussi/pandas", "max_stars_repo_head_hexsha": "8f8d75d315f5a61bbf2060ff821bff9b282a1582", "max_stars_repo_licenses": ["PSF-2.0", "Apache-2.0",...
// Copyright (c) 2019 Graphcore Ltd. All rights reserved. #define BOOST_TEST_MODULE ScatterTest #include <poplibs_support/TestDevice.hpp> #include <iostream> #include <boost/test/unit_test.hpp> #include <poplar/Engine.hpp> #include <popops/ElementWise.hpp> #include <popops/Scatter.hpp> #include <popops/codelets.hpp>...
{"hexsha": "6665f3b1ec124d81c8051e4c6421b5a652432460", "size": 3128, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/popops/ScatterUpdateTest.cpp", "max_stars_repo_name": "graphcore/poplibs", "max_stars_repo_head_hexsha": "3fe5a3ecafe995eddb72675d1b4a7af8a622009e", "max_stars_repo_licenses": ["MIT"], "max_st...
// Copyright (c) 2018-present Baidu, Inc. 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 require...
{"hexsha": "80c7a81cebe88680b1c2df0722aee29b62599f9c", "size": 47670, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/meta_server/cluster_manager.cpp", "max_stars_repo_name": "lvxinup/BaikalDB", "max_stars_repo_head_hexsha": "e1ca1e273156e64fd0c3aef047d6d9b639be0c7b", "max_stars_repo_licenses": ["Apache-2.0"],...
# Create by Packetsss # Personal use is allowed # Commercial use is prohibited r""" USAGE: python .\utils\plot.py --log-dir "path/to/log """ import argparse import numpy as np import pandas as pd from matplotlib import pyplot as plt from typing import Callable, List, Optional, Tuple from stable_baselines3.common.mo...
{"hexsha": "c7e5a6480f073f80efdc6a9b52328dd3861c8425", "size": 5942, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python Tutorial Reinforcement Learning/9_muzero/games/utils/plot.py", "max_stars_repo_name": "PaulPan00/donkey_wrapper", "max_stars_repo_head_hexsha": "a03cf0f42f65625fbce792b06c98acd153c5d6c8", "...
/- Copyright (c) 2021 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import data.set.pointwise.smul import group_theory.submonoid.membership import order.well_founded_set /-! # Pointwise instances on `submonoid`s and `add_submonoid`s > THI...
{"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/group_theory/submonoid/pointwise.lean"}
[STATEMENT] lemma aform_val_msum_aform: assumes "degree_aform f \<le> n" shows "aform_val e (msum_aform n f g) = aform_val e f + aform_val (\<lambda>i. e (i + n)) g" [PROOF STATE] proof (prove) goal (1 subgoal): 1. aform_val e (msum_aform n f g) = aform_val e f + aform_val (\<lambda>i. e (i + n)) g [PROOF STEP] us...
{"llama_tokens": 263, "file": "Affine_Arithmetic_Affine_Form", "length": 2}
''' We replicate the structure of an MA(q) model with a neural network here, simulate a simple AR(1) processs and fit said model to it. ''' from __future__ import print_function import numpy as np from neuralforecast.models import NeuralMA from neuralforecast.data_generator import arma_sample np.random.seed(337) sam...
{"hexsha": "74c468371a3d430353e7110282f7ae34879814ed", "size": 508, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ma.py", "max_stars_repo_name": "maxpumperla/neuralforecast", "max_stars_repo_head_hexsha": "61d730a28454f89843defb823430daee2ff64912", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# -*- coding: utf-8 -*- """ Created on Mon Jan 20 22:02:27 2020 @author: Yuri Frequcnsies in [radians/s] """ import numpy as np import math from math import pi from math import tan from math import sin def timetofreqspectrumFun(Wpars, Freqs, modelting, Pars): # y = np.zeros([len(Freqs),2]) ...
{"hexsha": "12f52d0e81da62647612ecf92314e98ff16934d7", "size": 2237, "ext": "py", "lang": "Python", "max_stars_repo_path": "timetofreqspectrumFun.py", "max_stars_repo_name": "yu-efremov/ViscoIndent", "max_stars_repo_head_hexsha": "b9658509fdf9ed232cf682cb554f668572735e4d", "max_stars_repo_licenses": ["MIT"], "max_stars...
import data.nat.basic import .ch01_basics open basics (evenb oddb sub_two leb) open nat (add mul) namespace poly /- Inductive boollist : Type := | bool_nil | bool_cons (b : bool) (l : boollist). -/ inductive boollist : Type | bool_nil | bool_cons (b : bool) (l : boollist) /- Inductive list (X:Type) : Type := ...
{"author": "michens", "repo": "learn-lean", "sha": "f38fc342780ddff5a164a18e5482163dea506ccd", "save_path": "github-repos/lean/michens-learn-lean", "path": "github-repos/lean/michens-learn-lean/learn-lean-f38fc342780ddff5a164a18e5482163dea506ccd/sf/v1/ch04_poly.lean"}
"""Summary """ import os import yaml import getopt import sys import time import numpy as np from tensorflow.keras import backend as K from action_predict_attention import action_prediction # from new_model import NewModel, HybridModel, MultiRNN3D, MultiRNN3D_MATT from jaad_data import JAAD # if use PIE data: from pi...
{"hexsha": "366a36ed3a4af883221962fa01cc1641c6ee9918", "size": 7896, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_test_attention.py", "max_stars_repo_name": "sgt390/Pedestrian_Crossing_Intention_Prediction", "max_stars_repo_head_hexsha": "ef1a956ae603b8d042253a225744a88bf07c30a4", "max_stars_repo_licens...
""" Author: Shraey Bhatia Date: October 2016 File: train_svm_model.py This file is to generate the trained svm model. You can specify your own datset. By default will take our dataset. Note a trained svm model for our datset is already in place in model_run/support_files. You will need bin...
{"hexsha": "c4b1f2d9f4c52c5520675cde0e755054080e01b6", "size": 9060, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_svm_model.py", "max_stars_repo_name": "wpfjtmwls/CookieMonster", "max_stars_repo_head_hexsha": "2215d20d4fcf9482d988eb89dbb4d998794aae7b", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import pytest import numpy as np import numpy.testing as npt import toppra as ta import toppra.constraint as constraint from toppra.constants import JACC_MAXU @pytest.fixture(params=[1, 2, 6], name='acceleration_pc_data') def create_acceleration_pc_fixtures(request): """ Parameterized Acceleration path constraint...
{"hexsha": "c0621f529421cb16b4eb7d116b58c8dc2538902b", "size": 2945, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/constraint/test_joint_acceleration.py", "max_stars_repo_name": "mrunaljsarvaiya/toppra", "max_stars_repo_head_hexsha": "468d81d23f37fdee06ea1aa3f1d445d747fad7f6", "max_stars_repo_licenses": ...
/* * Copyright (C) 2019, Xilinx Inc - All rights reserved * Xilinx Resource Manger U30 Encoder Plugin * * Licensed under the Apache License, Version 2.0 (the "License"). You may * not use this file except in compliance with the License. A copy of the * License is ...
{"hexsha": "ba6424bda07a81ce50e790d5c8462ec4cccecc1b", "size": 2474, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "codec-encoder-xrm-plg-u30.hpp", "max_stars_repo_name": "Xilinx/codec-encoder-xrm-plg-u30", "max_stars_repo_head_hexsha": "fcba0e2ca5125760212f2a22b3039911d7a61c15", "max_stars_repo_licenses": ["Apac...
import torch import torch.nn as nn from torch.autograd import Variable import numpy as np from torch.nn import functional as F from Relation_batch import * # Recurrent neural network (many-to-many) class RNN(nn.Module): def __init__(self, input_size, hidden_size, num_layers, num_classes, batch=4, df=64, dk=32, Nr...
{"hexsha": "7bc1a789f4f3bce72d2767d42a0cfd1f20593745", "size": 5697, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/model_ST.py", "max_stars_repo_name": "weiyi1991/UA_Concurrent", "max_stars_repo_head_hexsha": "11238c778c60095abf326800d6e6a13a643bf071", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from vbhmm.hmm.vbhmm import VBHMM import numpy as np import matplotlib.pyplot as plt from time import time import sys sys.path.append('.') # data = np.load('vbhmm/data/hmm_data.npz') # labels, obs = data['labels'], data['obs'] # obs = [obs] data = np.load('vbhmm/data/params.npz', allow_pickle=True) sigs, mus, obs, la...
{"hexsha": "bf377b730e709f5b1e838c3a023ce3a7b9c6aa69", "size": 1439, "ext": "py", "lang": "Python", "max_stars_repo_path": "sds_bayesian_numpy/tests/test_vbhmm.py", "max_stars_repo_name": "thlautenschlaeger/sds", "max_stars_repo_head_hexsha": "710e7c6b1b15afd0476b6f0f60c03415571bebeb", "max_stars_repo_licenses": ["MIT"...
C C real*4 function ct_standard( rgb, ci, cimin, cimax ) C ---------------------------------------------------- C C Function defining an standard colour-scale. C C defining: C x = (ci-cimin)/(cimax-cimin) C then: C red = sin(power(red)*x)**2, C green = sin(power(g...
{"hexsha": "4326ebb85a638053a72fcba507d68c19a24cd188", "size": 606, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "graphic_lib/ct_standard.f", "max_stars_repo_name": "CavendishAstrophysics/anmap", "max_stars_repo_head_hexsha": "efb611d7f80a3d14dc55e46cd01e8a622f6fd294", "max_stars_repo_licenses": ["BSD-3-Clause...
import numpy as np import pandas as pd # adding path to GPR_for_IM directory in order to import relevant scripts import sys sys.path.append('../') import pk_tools as pk def test_pk_perp_run(): #### Loading data #### data = pd.read_pickle('../Data/data.pkl') HI_data = data.beam.HI #### ...
{"hexsha": "bdb2e5e73e748a671d15ad7c1db53e29c5abd225", "size": 1326, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_pk_perp.py", "max_stars_repo_name": "LBJ-Wade/gpr4im", "max_stars_repo_head_hexsha": "c1ea849b4af7807cd3928b86b3692bd272e6f7d3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4...
# Note that this will erase your nvidia cache, ~/.nv/ComputeCache This may or may not be an undesirable side-effect for you. For example, cutorch will take 1-2 minutes or so to start after this cache has been emptied. from __future__ import print_function, division import time import string import random import nump...
{"hexsha": "a74e6b79d71bd419696ad6fe959e8732e782e60d", "size": 6967, "ext": "py", "lang": "Python", "max_stars_repo_path": "gpuexperiments/old/optimization_shortcutting.py", "max_stars_repo_name": "hughperkins/gpu-experiments", "max_stars_repo_head_hexsha": "3e5064e45682494be97190558807672b602f1c76", "max_stars_repo_li...
using Performance using BenchmarkTools using Test @testset "structs" begin ## ## https://docs.julialang.org/en/v1/manual/performance-tips/#Type-declarations ## # Unfortunately, this problem is not Revise-friendly. You'll have to restart your # Julia session when you make substantive changes to the ...
{"hexsha": "756ecfb5c685663d4469de16d8530f98af7357d7", "size": 1376, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/structs.jl", "max_stars_repo_name": "nlaird/Performance.jl", "max_stars_repo_head_hexsha": "16b222fd1df7c5055ed6285377cca91aefb5a75b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 24...
import numpy as np from .VariableUnitTest import VariableUnitTest from gwlfe import enums from gwlfe.Input.WaterBudget import Grow class TestGrow(VariableUnitTest): def test_Grow(self): z = self.z np.testing.assert_array_almost_equal( Grow.Grow_f(z.Grow_0), Grow.Grow(z.Gr...
{"hexsha": "07fac60a1108b0531ebcae83d1c68792a9d88d66", "size": 362, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/unittests/test_Grow.py", "max_stars_repo_name": "rajadain/gwlf-e", "max_stars_repo_head_hexsha": "ba2fb9dbc08a3d7a4ced4b83b6f0f1307814e2a3", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import socket import cv2 import numpy as np soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)#ソケットオブジェクト作成 soc.connect(("127.0.0.1", 9001))#サーバー側のipと使用するポート(ポートはサーバーと同じにする。) print("接続完了") while(1): data = soc.recv(921600)#引数は下記注意点参照 data = np.fromstring(data, dtype=np.uint8)#バイトデータ→ndarray変換 dat...
{"hexsha": "2cef898029950deee6b17cd7778cdbe152859009", "size": 598, "ext": "py", "lang": "Python", "max_stars_repo_path": "sample/imageClient.py", "max_stars_repo_name": "jettom/JtSpider", "max_stars_repo_head_hexsha": "7e2cb32415ca5d439b117c0277a7f7b2b27fa0bf", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
module SemiLattice where open import Prelude open import PartialOrder as PO import Chain private module IsSemiLat {A : Set}(po : PartialOrder A)(_⊓_ : A -> A -> A) where private open module PO = PartialOrder po record IsSemiLattice : Set where field ⊓-lbL : forall {x y} -> (x ⊓ y) ≤ x ⊓-lb...
{"hexsha": "1b05377a3f6d6dbe285aa9616964f13937efaea6", "size": 2992, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "examples/outdated-and-incorrect/lattice/SemiLattice.agda", "max_stars_repo_name": "asr/agda-kanso", "max_stars_repo_head_hexsha": "aa10ae6a29dc79964fe9dec2de07b9df28b61ed5", "max_stars_repo_licens...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from compas.geometry import Frame from compas.geometry import Transformation from pytest import fixture from pytest import raises from compas_mobile_robot_reloc.xforms import _coerce_cg_xform from compas_mobil...
{"hexsha": "eb4536a35751d2640337c692452d427542fd411b", "size": 2088, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_xforms.py", "max_stars_repo_name": "gramaziokohler/total_station_robot_localization", "max_stars_repo_head_hexsha": "aa4baa070d4d93a8058a0286615580ed8f95567f", "max_stars_repo_licenses"...
[STATEMENT] lemma fpxs_val_compose_power [simp]: assumes "r > 0" shows "fpxs_val (fpxs_compose_power f r) = fpxs_val f * r" [PROOF STATE] proof (prove) goal (1 subgoal): 1. fpxs_val (fpxs_compose_power f r) = fpxs_val f * r [PROOF STEP] proof (cases "f = 0") [PROOF STATE] proof (state) goal (2 subgoals): 1. f =...
{"llama_tokens": 1507, "file": "Formal_Puiseux_Series_Formal_Puiseux_Series", "length": 16}
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function """ sick, the spectroscopic inference crank. """ __author__ = "Andy Casey <arc@ast.cam.ac.uk>" import argparse import cPickle as pickle import logging import os from glob import glob import numpy as np import yaml import json impo...
{"hexsha": "67876cf2ba5aafdb10785604c89ff72908fd5a7b", "size": 24078, "ext": "py", "lang": "Python", "max_stars_repo_path": "sick/clis/run.py", "max_stars_repo_name": "andycasey/sick", "max_stars_repo_head_hexsha": "6c37686182794c4cafea45abf7062b30b789b1a2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "ma...
import logging from typing import List, Dict, Tuple, Optional, Any import numpy as np OUT_RECALL = 0.9 OUT_PRECISION = 0.8 logger = logging.getLogger(__name__) def span_to_label(tokens: List[str], labeled_spans: Dict[Tuple[int, int], Any]) -> List[str]: """ Convert label spans to :par...
{"hexsha": "a329702d3804a4ae4099468f2112006961098f28", "size": 7968, "ext": "py", "lang": "Python", "max_stars_repo_path": "wrench/seq_labelmodel/chmm_src/Src/DataAssist.py", "max_stars_repo_name": "Stranger469/ARS2", "max_stars_repo_head_hexsha": "b6d62b66997180abe01b676d5359c20daa42b7ad", "max_stars_repo_licenses": [...
import numpy as np class MeanShift: def __init__(self, radius=2): self.radius = radius def fit(self, data): centroids = self.initialize_starting_centroids(data) self.centroids = self.make_centroids(centroids, data) def initialize_starting_centroids(self, data): centroids ...
{"hexsha": "3da7fc4300dabd09ec4c470043ea127780e60a3b", "size": 2450, "ext": "py", "lang": "Python", "max_stars_repo_path": "EyePatterns/clustering_algorithms/custom_mean_shift.py", "max_stars_repo_name": "Sale1996/Pattern-detection-of-eye-tracking-scanpaths", "max_stars_repo_head_hexsha": "15c832f26dce98bb95445f9f39f45...
\section{Blockchain}\label{sec:blockchain} Recently, cryptocurrency has attracted extensive attention from both the industry and the academy. Bitcoin, often called the first cryptocurrency, had massive success, with the capital market coming to \$ 10 billion in 2016 \cite{coindesk}. Blockchain is the central mechanism...
{"hexsha": "9e273b7131db099296131a5ea0d6f68b19392364", "size": 6665, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/2_THEORETICAL_BACKGROUND/sections/3_blockchain.tex", "max_stars_repo_name": "juniorug/Master-thesis", "max_stars_repo_head_hexsha": "c7e7e1da620ea717619c058c170db46cee8e9970", "max_stars_re...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from __future__ import division import numpy as np from testing import * from pyecs import * from pycompupipe.other import Event from pycompupipe.components import ( GuiManager,GuiElement, Selectable, FetchMouseCallbacksWhileSelected, ...
{"hexsha": "d79ae7298f57b746be26a896aacc84e656c77dc0", "size": 2826, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/components/gui/interaction/test_draggable.py", "max_stars_repo_name": "xaedes/PyCompuPipe", "max_stars_repo_head_hexsha": "c5243a875bb007fc67b02e1ed08b1d62b6ddc483", "max_stars_repo_licenses...
/** * @copyright Copyright 2018 The J-PET Framework 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 find a copy of the License in the LICENCE file. * * Unless required by applicable la...
{"hexsha": "499cde6a5c66bda7897b0aeccb7736e32e520ff5", "size": 5996, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/Core/JPetGeomMapping/JPetGeomMappingTest.cpp", "max_stars_repo_name": "BlurredChoise/j-pet-framework", "max_stars_repo_head_hexsha": "f6728e027fae2b6ac0bdf274141254689894aa08", "max_stars_repo...
import json import pickle import fire import matplotlib.image as mpimg import numpy as np from cidan.LSSC.functions.data_manipulation import load_tif_stack, \ reshape_to_2d_over_time from cidan.TimeTrace.spatial_temporal_denoising import calculate_spatial_time_denoising from plotting_functions import time_graph ...
{"hexsha": "d8ec230b31f6f84f10c2433358cc3757a9d2645a", "size": 3795, "ext": "py", "lang": "Python", "max_stars_repo_path": "explorations/time_trace_extract_test.py", "max_stars_repo_name": "Mishne-Lab/cidan", "max_stars_repo_head_hexsha": "3f579b6d5a49e17690e9aa07dfb60d3e8c05e681", "max_stars_repo_licenses": ["MIT"], "...
""" file management, copying etc. """ import inspect import json import os from shutil import copyfile import matplotlib import matplotlib.pyplot as plt import numpy as np from stable_baselines3.common.monitor import load_results from .utils import plot_curves, ts2xy def write_env_config(destination_directory, vec_...
{"hexsha": "5bbc9bb822f6005406b9ea69ac9af3d687e2f443", "size": 4950, "ext": "py", "lang": "Python", "max_stars_repo_path": "quadruped_spring/utils/file_utils.py", "max_stars_repo_name": "francescovezzi/quadruped_spring", "max_stars_repo_head_hexsha": "23848496ac7a4508e8a0f527e961c7956fd12f95", "max_stars_repo_licenses"...
""" This code is a extension version of KNNGraph + SEAL, which aims to incorporate metric learning to compute the distance while constructing the KNN Graph. """ import torch import torch_geometric.nn from torch.nn import BCEWithLogitsLoss import torch.nn.functional as F from torch_geometric import seed_everythi...
{"hexsha": "c7a1fbb29dda1afa1e3e96778dc4252ada0fcefc", "size": 13839, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/MLKG+SEAL.py", "max_stars_repo_name": "BishengLi0327/Topology-Restoration-Based-on-GNN", "max_stars_repo_head_hexsha": "99ede7abbab1ce06f094d79ad18e58f30fc7fc4b", "max_stars_repo_licenses": ...
#redirect Howard Johnson Hotel
{"hexsha": "e971b23d852c380d0a4014e9824726e41d1e2fc7", "size": 31, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Howard_Johnson_Inn.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import logging import numpy as np import reagent.core.types as rlt import torch import torch.nn as nn from reagent.core.dataclasses import field from reagent.model_utils.seq2slate_utils import Seq2SlateMode from reagent.mode...
{"hexsha": "bb160253d88f19e38a1dbf160a3d6d513b1143b7", "size": 6103, "ext": "py", "lang": "Python", "max_stars_repo_path": "reagent/training/ranking/seq2slate_attn_trainer.py", "max_stars_repo_name": "dmitryvinn/ReAgent", "max_stars_repo_head_hexsha": "f98825b9d021ec353a1f9087840a05fea259bf42", "max_stars_repo_licenses...
# -*- coding: utf-8 -*- """ Created on Thu Jul 19 19:16:33 2018 @author: solis Funciones que realizan en análisis de una serie temporal (piezométrica) en puntos que tienen definidos umbrales de referencia """ import log_file as lf FLOAT_PRECISION = 'float64' file_xml_ini = 'piezo_CTH.xml' def ...
{"hexsha": "878749daf60cca15d211b55236d92ef40afb5681", "size": 10176, "ext": "py", "lang": "Python", "max_stars_repo_path": "piezo_CTH.py", "max_stars_repo_name": "solisgb/PIEZO-THRESHOLDS", "max_stars_repo_head_hexsha": "2c7c5f296a8c58b8e36c93940774e7626f96664e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
using DataFrames using KernelDensity KWArgT = Union{Dict, NamedTuple, Nothing} update_args(args::Union{Dict, NamedTuple}, update::Nothing) = args update_args(args::Union{Dict, NamedTuple}, update::Union{Dict, NamedTuple}) = merge([Dict{Symbol, Any}(zip(keys(d), values(d))) for d in (args, update)]...) estimate_d...
{"hexsha": "0be7dc376bb541fafa53082ea4fa9d9c42ba3e81", "size": 10556, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utils/utils.jl", "max_stars_repo_name": "YinuoJin/Baysor", "max_stars_repo_head_hexsha": "a7ee9bd8e38c6c572dcd20f0dc0bbd6591c87d37", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
from hydroDL import kPath, utils from hydroDL.app import waterQuality from hydroDL.master import basins from hydroDL.data import usgs, gageII, gridMET, ntn from hydroDL.master import slurm from hydroDL.post import axplot, figplot import numpy as np import matplotlib.pyplot as plt import os import pandas as pd codeLst...
{"hexsha": "8621f72b881f76404f35e7b49d0aaeecc013cb63", "size": 2454, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/waterQual/stableSites/sbW/box_WRTDS.py", "max_stars_repo_name": "fkwai/geolearn", "max_stars_repo_head_hexsha": "30cb4353d22af5020a48100d07ab04f465a315b0", "max_stars_repo_licenses": ["MIT"], ...
#! /usr/bin/env python import numpy as np import json,cv2,os,time,glob,copy,re from color import * def cv2ver(): major = cv2.__version__.split('.')[0] return int(major) class ImageSource: EmptyData = { "frames": [], "input_file": "" } EmptyFrame = { "frame_...
{"hexsha": "e0dd2cc0d901b131fa572cfaee8c71565d83b128", "size": 12336, "ext": "py", "lang": "Python", "max_stars_repo_path": "plugins/flask/annotator/ImageSource.py", "max_stars_repo_name": "readicculus/VIAME", "max_stars_repo_head_hexsha": "3e65fa4ec9139f73f8f9f4b3c0f1b18ba6209733", "max_stars_repo_licenses": ["BSD-3-C...
''' Created on Jun 12, 2013 Modelled upon LpdFemDataReceiver.py @author: ckd27546 ''' from lpd.gui.data_containers import LpdImageContainer, LpdFrameContainer import os, sys, time, socket import numpy as np from PyQt4 import QtCore # Import HDF5 Library; Disable its use if library not installed on PC try: ...
{"hexsha": "60744495de15159bac1949bb1b658b41d4e381fc", "size": 20180, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/lpd/tests/redundant_files/uni_receive.py", "max_stars_repo_name": "stfc-aeg/lpd-detector", "max_stars_repo_head_hexsha": "7bc0d9700a3d3992a4541f05e1434aba0d056dcc", "max_stars_repo_licenses":...
import os import sys import re import contextlib import numpy as np import cv2 import easygui from imgphon import imgphon def interface(windowName, canvas, tp, frame_index, file_name, result_dict, clicks_list, working_dir, sort_fn, label_num_constr: int, ext): output_imgs_dir = "output_imgs" with contextlib...
{"hexsha": "d58bb3b7f9587a8c566562d2b699946903ae2b94", "size": 4119, "ext": "py", "lang": "Python", "max_stars_repo_path": "imgphon/handlabel.py", "max_stars_repo_name": "shunjiewang/imgphon", "max_stars_repo_head_hexsha": "b7d82c1dde39a332191e40dc87e88248ac300b4c", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_sta...
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Description # ============================================================================== # # This file contains functions reltated to input handling. This code was # adapted from the on in TextUserInterfaces.jl. # # # # # # # # ...
{"hexsha": "fa2df1f752ecc08106db08e3e37cc41f672fa2dc", "size": 4722, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/input/input.jl", "max_stars_repo_name": "TheCedarPrince/TerminalPager.jl", "max_stars_repo_head_hexsha": "a94d727d20310076697ceb7b18c6dccf9e85363f", "max_stars_repo_licenses": ["MIT"], "max_sta...
# Copyright (C) 2020-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 """Federated averaging module.""" from .interface import AggregationFunctionInterface import numpy as np def weighted_average(tensors, weights): """Compute average.""" return np.average(tensors, weights=weights, axis=0) clas...
{"hexsha": "e7ab596b4d5965ab6cfcebaaa076ed76fb25c861", "size": 1058, "ext": "py", "lang": "Python", "max_stars_repo_path": "openfl/component/aggregation_functions/weighted_average.py", "max_stars_repo_name": "walteriviera/openfl", "max_stars_repo_head_hexsha": "1f5d6e7b7131dd519baf51ecdb9ab29de0e9308b", "max_stars_repo...
import numpy as np import pandas as pd import niimpy.preprocessing.survey df1 = pd.DataFrame( {"time": ['2019-01-01']*3 + ['2019-01-02']*3 + ['2019-01-03']*3, "answer": [0, 1, 2, 3, 4, 5, 6, 7, np.nan], "id": ["S1_1", "S1_2", "S1_3"] * 3, }) df1['time'] = pd.to_datetime(df1['time']) d...
{"hexsha": "8c649104623eebd00db9b5a20d04b77faf3637c9", "size": 1263, "ext": "py", "lang": "Python", "max_stars_repo_path": "niimpy/preprocessing/test_survey.py", "max_stars_repo_name": "lnknguyen/niimpy", "max_stars_repo_head_hexsha": "2aebd1d59b0b7562103128d5eaff90f20091f6fd", "max_stars_repo_licenses": ["MIT"], "max_...
program make_starmask use fieldinfo_ use sub_ implicit none ! idum: set arbitrary value for initial seed for ran2 integer :: idum=-152103 ! inf: input file of shear distribution ! outf: mask field [1:ni,1:nj](real) ! outf2: flag data describing which data is masked or not [1:ntot] (logical*1)...
{"hexsha": "3ad747248029785d7f6ba4ae5137be24ef1d484d", "size": 6549, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "starmask.f90", "max_stars_repo_name": "chiaki-hikage/pseudoCl_flatsky", "max_stars_repo_head_hexsha": "9bcef43a78346d4062756f9798ec0cf66fd61e5f", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
from easydict import EasyDict as edict import numpy as np __C = edict() cfg = __C __C.TRAIN = edict() __C.IMG_WIDTH = 300 __C.IMG_HEIGHT = 300 __C.IMG_CHANNEL = 3 __C.CLASS_NUM = 21 __C.BACKGROUND_ID = 0 # training settings __C.TRAIN.LEARNING_RATE = 0.001 / 4 __C.TRAIN.MOMENTUM = 0.9 __C.TRAIN.BATCH_SIZE = 32 __C.T...
{"hexsha": "318b9ae6798be4855b9fdabdee85f690eb3139bc", "size": 2573, "ext": "py", "lang": "Python", "max_stars_repo_path": "Demo/linux/ssd/models/vgg_ssd_net/config/pascal_voc_conf.py", "max_stars_repo_name": "daming-lu/Mobile", "max_stars_repo_head_hexsha": "849dbd3cd9076102d509ef054b8b3da72ed608a2", "max_stars_repo_l...
@testset "LinkedList" begin @testset "l1" begin l = list([1,2,3]...) @test length(l) == 3 @test head(l) == 1 @test head(tail(l)) == 2 end end
{"hexsha": "aa72bfa7b1d23f4f27e868fb6e42b0c40a723057", "size": 184, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_list.jl", "max_stars_repo_name": "swairshah/DataStructs.jl", "max_stars_repo_head_hexsha": "7f4503bd2d2557ff5d6868e93dec3661eba347ea", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np def join_1d_np(): print("Concetante 1-D Arrays") arr1 = np.array([1, 2, 3]) arr2 = np.array([4, 5, 6]) print("First Array") print(arr1) print("second Array") print(arr2) arr = np.concatenate((arr1, arr2)) print("Array after concetenate") print(arr) def join_2d...
{"hexsha": "5cb99172774c1e2caca99c5db5d580610e6cf482", "size": 1993, "ext": "py", "lang": "Python", "max_stars_repo_path": "Numpy/10_Join_Numpy.py", "max_stars_repo_name": "ajeyln/W3_School_Python_Coding", "max_stars_repo_head_hexsha": "cfc598d5d0e96072303846b07b5c2b6f11d72690", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np import matplotlib.pyplot as mp import matplotlib.cm as mpcm import matplotlib.colors as mpc import scipy.stats as ss # plotting settings lw = 1.5 mp.rc('font', family = 'serif') mp.rcParams['text.latex.preamble'] = [r'\boldmath'] mp.rcParams['axes.linewidth'] = lw mp.rcParams['lines.linewidth'] = lw...
{"hexsha": "8373339dd9a549bf7c7f2156eb693bffea51c85a", "size": 6207, "ext": "py", "lang": "Python", "max_stars_repo_path": "gw_grb_h_0_ppd_summaries.py", "max_stars_repo_name": "KamshatTazhenova/hh0", "max_stars_repo_head_hexsha": "c71845056c5a108cb95654b1a1012d63034541c2", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma add_canc1: "D x y \<Longrightarrow> rquot (x \<cdot> y) x = y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. D x y \<Longrightarrow> rquot (x \<oplus> y) x = y [PROOF STEP] using rquot_prop [PROOF STATE] proof (prove) using this: D ?x ?z \<and> ?y = ?x \<oplus> ?z \<Longrightarrow> ?z = rquot ?y ?...
{"llama_tokens": 177, "file": "PSemigroupsConvolution_Partial_Semigroups", "length": 2}
export ElectronSite, electronSites struct ElectronSite <: Site s::Index ElectronSite(I::Index) = new(I) end ElectronSite(n::Int) = ElectronSite(Index(4,"Site,Electron,n=$n")) function electronSites(N::Int;kwargs...)::SiteSet sites = SiteSet(N) for n=1:N set(sites,n,ElectronSite(n)) end return s...
{"hexsha": "0918b7c337fd475a1e566afb8a43ae1c23bf4b6c", "size": 2629, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/physics/sitesets/electron.jl", "max_stars_repo_name": "Roger-luo/ITensors.jl", "max_stars_repo_head_hexsha": "8b3d7fca9cd0856d8119f5d712b675b023d563a1", "max_stars_repo_licenses": ["Apache-2.0"...
import pickle import numpy as np import os.path class MNIST: def __init__(self): self.dataset = {} self.path = os.path.dirname(os.path.abspath(__file__)) def _load_img(self, filename): with open(filename, 'rb') as file: data = np.frombuffer(file.read(), np.uint8, offset=16)...
{"hexsha": "e0e6273c98237521544de244a611a3f8c0a82806", "size": 2748, "ext": "py", "lang": "Python", "max_stars_repo_path": "agent/data/MNIST/mnist.py", "max_stars_repo_name": "kashu98/Deep-Agent", "max_stars_repo_head_hexsha": "04dc5f8d1dc6963f1bf075cd3e67dcb39784a861", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np def aggregate_loss_dict(agg_loss_dict): mean_vals = {} for output in agg_loss_dict: for key in output: mean_vals[key] = mean_vals.setdefault(key, []) + [output[key]] for key in mean_vals: if len(mean_vals[key]) > 0: mean_vals[key] = sum(mean_vals[key]) / len(mean_vals[key]) else: ...
{"hexsha": "678806c7c4c8b4272a7e144636aa8a89e4d0008c", "size": 741, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/train_utils.py", "max_stars_repo_name": "thienquang199x/SAM", "max_stars_repo_head_hexsha": "c18ab4eee23ee5196d772b5f57d6bf6e2708b262", "max_stars_repo_licenses": ["Apache-2.0", "BSD-2-Clause...