text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
import numpy as np
import matplotlib
import matplotlib.pylab as plt
import pandas as pd
import seaborn as sns
def plotting_Setup(sns_contex='paper',font_scale=1.5, save_dpi=150):
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_context(sns_contex,font_scale=font_scale)
... | {"hexsha": "0fd3a936186efe5da00ffec41d0c409c92762503", "size": 3462, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/common/effect_plot.py", "max_stars_repo_name": "SilasK/microbiome-analysis", "max_stars_repo_head_hexsha": "1eb50fc6acaf2ed6118abcb7465f930766d3f905", "max_stars_repo_licenses": ["MIT"], "... |
import json
import shutil
import natsort
import numpy as np
import os
import pandas as pd
import pytest
import tempfile
import xarray as xr
from pytest_cases import parametrize_with_cases
from ark.utils import test_utils, load_utils, io_utils
from toffy import normalize
import toffy.normalize_test_cases as test_case... | {"hexsha": "9bd8b3d319093ef39dba8751ff495088eac7b21a", "size": 17609, "ext": "py", "lang": "Python", "max_stars_repo_path": "toffy/normalize_test.py", "max_stars_repo_name": "angelolab/toffy", "max_stars_repo_head_hexsha": "4d6c50fe0dfbf1568ee3f9db2182a04dc9ac85c6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
import numpy as np
import cv2
from matplotlib import pyplot as plt
import PIL as Pillow
from sklearn.cluster import KMeans
class Trainer:
def __init__(self,query,x=0,y=0):
self.query = query
self.xThreshold = x
self.yThreshold = y
if type(query) is Pillow.Image.Image:
se... | {"hexsha": "8b26434f448006d4db3206c6ed0124f389c181fa", "size": 4426, "ext": "py", "lang": "Python", "max_stars_repo_path": "bot/trainer_matches.py", "max_stars_repo_name": "cashguje/DUEL-LINKS", "max_stars_repo_head_hexsha": "d7aed24a01e1f6294e92cfdb3ccfaf29c6c0f494", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import numpy as np
class AbstractEstimationMethod(object):
def __init__(self, rho_generator, rho_dim):
self.rho_generator = rho_generator
self.rho = rho_generator()
self.rho_dim = rho_dim
self.is_fit = False
def fit(self, x, z, x_dev, z_dev):
self._fit_internal(x, z, x... | {"hexsha": "ce2fb4b5cff11b156cdd986db488ed29e4a5f800", "size": 1536, "ext": "py", "lang": "Python", "max_stars_repo_path": "estimation_methods/abstract_estimation_method.py", "max_stars_repo_name": "CausalML/vmm", "max_stars_repo_head_hexsha": "89b0228107638658cb7535b1a618887796ef9d8e", "max_stars_repo_licenses": ["MIT... |
import numpy as np
import math
import random
import matplotlib.pyplot as plt
from utils import splinify, get_y_reg, get_a
nbSamples = 1000
X = np.matrix([[random.random(), 1] for x in range(nbSamples)])
Y = np.matrix([math.log(x[0].item(0)) for x in X]).transpose()
Xsplines = np.matrix([splinify(0.0, 1.0, 0.05, x[0]... | {"hexsha": "e2e749affb4a73ad12b76bcfebd8e0c9d00398ab", "size": 508, "ext": "py", "lang": "Python", "max_stars_repo_path": "linear_regression_splines_example.py", "max_stars_repo_name": "liogen/machine_learning", "max_stars_repo_head_hexsha": "616147b2c7d5ddc672d3ccdd87199f10fd6563ae", "max_stars_repo_licenses": ["MIT"]... |
//author : rescuer liao
//date : 2015-4-20
#include "robot_hardware.h"
#include <boost/make_shared.hpp>
#include <std_msgs/Float64.h>
#include <algorithm>
#include <sstream>
ExplorerHardware::ExplorerHardware(ros::NodeHandle node)
: nh_(node),
nh_private("~"),
frep_(30.0),
last_back_vice_wheel_a... | {"hexsha": "82ffc93fe69937caf5ad80358d3b5efd12a73391", "size": 20857, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "explorer_robot_hardware/src/robot_hardware.cpp", "max_stars_repo_name": "NaiveCoder1999/explorer_sc_2019", "max_stars_repo_head_hexsha": "0f1f5de6499f202b7e73075a865ee4686e5270fa", "max_stars_repo_... |
import tensorflow as tf
import tflearn
import numpy as np
import datetime
from data_utils import *
def train_model():
X_train, X_test, y_train, y_test = np.load(PREPROCESSED_DATA)
num_samples, num_timesteps, input_dim = X_train.shape
net = tflearn.input_data(shape=[None, num_timesteps, input_dim])
n... | {"hexsha": "e75497cead17722c1cdef54d9db0484bbd7a5f3d", "size": 757, "ext": "py", "lang": "Python", "max_stars_repo_path": "flask/src/pipeline_tflearn.py", "max_stars_repo_name": "Musicophilia/nga_hacks", "max_stars_repo_head_hexsha": "22ed6923aa45563e993a6c4241535cfa5018eb3e", "max_stars_repo_licenses": ["MIT"], "max_s... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
from simulariumio.data_objects.dimension_data import DimensionData
from typing import Dict, Tuple
from pathlib import Path
import numpy as np
from .dep.pyMCDS import pyMCDS
from ..trajectory_converter import TrajectoryConverter
from ..data_objects import T... | {"hexsha": "9048232521115e8b440d8897940b2b8ffa7bdd94", "size": 8390, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulariumio/physicell/physicell_converter.py", "max_stars_repo_name": "allen-cell-animated/simularium-conversion", "max_stars_repo_head_hexsha": "47ba9a5a8105cf5cd36592d859252df642b1f1f9", "max_s... |
"""運動学"""
import sympy as sy
from sympy import sqrt
#import utils
class Local:
"""ローカル座標系関連
全セクションで同一のパラメータであると仮定
"""
# モーダル同時変換行列のパラメータ
c1 = 837019575
c2 = 4133430
c3 = 32805
c4 = 486
c5 = 18
c6 = 55801305
c7 = 688905
c8 = 3645
c9 = 81
c10 = 2... | {"hexsha": "1417aa3d9d57ce79da5a1e58fb4bfa6ef8690107", "size": 14392, "ext": "py", "lang": "Python", "max_stars_repo_path": "o/soft_robot/derivation_of_kinematics/kinematics.py", "max_stars_repo_name": "YoshimitsuMatsutaIe/ctrlab2021_soudan", "max_stars_repo_head_hexsha": "7841c981e6804cc92d34715a00e7c3efce41d1d0", "ma... |
# Project: GBS Tool
# Author: Dr. Marc Mueller-Stoffels, marc@denamics.com, denamics GmbH
# Date: February 27, 2018
# License: MIT License (see LICENSE file of this package for more information)
import warnings
import numpy as np
import pandas as pd
from Analyzer.DataRetrievers.getDataSubsetsRELoadOneWeek import getD... | {"hexsha": "e121c2a603c185facead17a4f4ab0aeaebb7ad52", "size": 2132, "ext": "py", "lang": "Python", "max_stars_repo_path": "MiGRIDS/Analyzer/DataRetrievers/getDataSubsets.py", "max_stars_repo_name": "mmuellerstoffels/GBSTools", "max_stars_repo_head_hexsha": "aebd8aa6667a2284aaa16424f9b9d22ca3a2a375", "max_stars_repo_li... |
import numpy as np
def project_vertices(vertices, pose, cam, offset=0):
"""Project 3d vertices to 2d
Args
- vertices: (np.array) [N x 3] 3d vertices.
- pose: (np.array) [4 x 4] pose matrix.
- cam: (np.array) [3 x 3] camera matrix.
Returns
- projected: (np.array) [N x 2] proje... | {"hexsha": "556af023e9cfbbf4e6644006f1fed935ab921aae", "size": 1418, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "ECer23/6dpose.gendata", "max_stars_repo_head_hexsha": "8a7e7e34bb412ad4cae77ac617ac554204ab0782", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_... |
# coding: utf-8
# In[11]:
import cv2
import numpy as np
# In[12]:
a=[1,2,3]
# In[13]:
print("Hello friends,welcome 明明老师的课程 .........",29*"-","%s"%(a))
# # 从文件读取图像数据
# In[29]:
img = cv2.imread("lena.jpg")
#cv2.cvtColor()
#cv2.COLOR_BGR2RGB
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
# In[15]:
prin... | {"hexsha": "e0693706d89fddfa12e62b2bd845b35fd748285d", "size": 5252, "ext": "py", "lang": "Python", "max_stars_repo_path": "part1/part1_class_code.py", "max_stars_repo_name": "anjiang2016/IntroCV", "max_stars_repo_head_hexsha": "95f419eb2396c618c2c3402614182ebf63ca3d7e", "max_stars_repo_licenses": ["Apache-2.0"], "max_... |
''' nucleotide_alignment
Module for the representation of nucleotide alignments.
'''
import os
from typing import Iterable, Tuple
import numpy
import pyckmeans.distance
from .c_interop import encode_nucleotides
# Base encoding as used by R package ape.
# See http://ape-package.ird.fr/misc/BitLevelCodingScheme.h... | {"hexsha": "201667732588da872c75b48273fa6316bbcdf79f", "size": 11914, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyckmeans/io/nucleotide_alignment.py", "max_stars_repo_name": "TankredO/pyckmeans", "max_stars_repo_head_hexsha": "c8672b94cd75aadf6c4abc508f49107a4aedb86c", "max_stars_repo_licenses": ["MIT"], "... |
from __future__ import print_function
from __future__ import division
import pygame
import numpy as np
import config
import espControl as led
import random
matrixR = np.zeros([8, 32])
matrixG = np.zeros([8, 32])
matrixB = np.zeros([8, 32])
def map8x32to1x256(data):
output = []
for j in range(len(data[0])-1, -1, ... | {"hexsha": "b650bd9add391970bda5d7f82cc6c416dccf3704", "size": 4706, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/snake-game.py", "max_stars_repo_name": "ro-oliveira95/interactive-reactive-led-board", "max_stars_repo_head_hexsha": "3f7528688476d928bb2d48ccf2ec37a15d7e7e5a", "max_stars_repo_licenses": [... |
[STATEMENT]
lemma "[(\<^bold>\<lambda>y. (q \<^bold>\<or> \<^bold>\<not>q)) \<^bold>= (\<^bold>\<lambda>y. (p \<^bold>\<or> \<^bold>\<not>p)) in v]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. [(\<^bold>\<lambda>y. q \<^bold>\<or> \<^bold>\<not>q) \<^bold>= (\<^bold>\<lambda>y. p \<^bold>\<or> \<^bold>\<not>p) in... | {"llama_tokens": 1338, "file": "PLM_TAO_99_SanityTests", "length": 5} |
//
// test/ibstream.hpp
//
// Copyright (c) Chris Glover, 2017-2018
//
// 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)
//
#define BOOST_TEST_MODULE TestInBitstream
#include <boost/test/unit_test.hpp>
#include <boo... | {"hexsha": "bf64f15909fd1f31967e2993826816290cf0eb4c", "size": 1435, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/ibitstream.cpp", "max_stars_repo_name": "cdglove/boost.radix", "max_stars_repo_head_hexsha": "39626a1a76eb33ce9bd43b3957f1a39678943a30", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count... |
\section{Introduction} \label{sec:tendermint}
Consensus is a fundamental problem in distributed computing. It
is important because of it's role in State Machine Replication (SMR), a generic
approach for replicating services that can be modeled as a deterministic state
machine~\cite{Lam78:cacm, Sch90:survey}. The key i... | {"hexsha": "493b509e91237a16e0b7aebc4efdab90f2317a0b", "size": 8200, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "spec/consensus/consensus-paper/intro.tex", "max_stars_repo_name": "hongyuefan/tendermint", "max_stars_repo_head_hexsha": "851c0dc4f3088723c724cb01c4877ee78c3d6ffc", "max_stars_repo_licenses": ["Apac... |
# -*- coding: utf-8 -*-
import math
import pandas as pd
import xml.etree.ElementTree as ET
import matplotlib.pyplot as plt
import os.path as osp
from PIL import Image
import numpy as np
plt.rcParams['font.sans-serif'] = ['SimHei'] #用来正常显示中文标签
plt.rcParams['font.family']='sans-serif'
plt.rcParams['figure.figsize'] ... | {"hexsha": "4bb5241c3315c8cc275a43bc9af25033048af916", "size": 7169, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_ratio_square_class.py", "max_stars_repo_name": "zhujing210/zj_mmdect", "max_stars_repo_head_hexsha": "531d8bcacf864974e0ce493823c40f5b5024bdf7", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
//
// The MIT License (MIT)
//
// Copyright (c) 2019 Livox. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the ri... | {"hexsha": "550726274b0d19506c176e7d57537674f511686b", "size": 11580, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "sdk_core/src/device_discovery.cpp", "max_stars_repo_name": "JSC-NIIAS/livox_sdk", "max_stars_repo_head_hexsha": "89083e914155a8db50bd3e1dabfc55049ee0daf6", "max_stars_repo_licenses": ["BSL-1.0", "A... |
from qiskit.circuit.library import EfficientSU2
import qiskit.tools.jupyter # import handy jupyter tools for viewing backend details and monitoring job status
from qiskit import ClassicalRegister
#Same as jon
from qiskit import IBMQ
from qiskit import QuantumCircuit, execute, result, QuantumRegister, transpile
from qi... | {"hexsha": "c07f48f38e90ab61b20f390049cc9a504acd6756", "size": 17082, "ext": "py", "lang": "Python", "max_stars_repo_path": "Qiskit_helperfunctions.py", "max_stars_repo_name": "tmog123/Quantum_Assisted", "max_stars_repo_head_hexsha": "5fdee0bf0030814bdd3ce006d56436b160d70064", "max_stars_repo_licenses": ["AFL-1.1"], "m... |
from torchvision import datasets
from utils.cutout_utils import Cutout
from torchvision import transforms
from PIL import Image
import numpy as np
import torch
class StnCIFAR10(datasets.CIFAR10):
""" CIFAR 10 dataset."""
def __init__(self, tune_affine, tune_color, tune_cutout, *args, **kwargs):
supe... | {"hexsha": "65890833ef46c2b342f5e8896be74bb94a8ead5e", "size": 11554, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/cifar10.py", "max_stars_repo_name": "pomonam/Self-Tuning-Networks", "max_stars_repo_head_hexsha": "3fa949bb1da5beb2b4e7f1d07a26b819b42ad7f3", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import numpy as np
import torch
from torch.autograd import Variable
from ...support import utilities
class LaplaceDistribution:
####################################################################################################################
### Constructor:
###########################################... | {"hexsha": "0c87b43413af6ad5101306587f6efc984645bbbc", "size": 1940, "ext": "py", "lang": "Python", "max_stars_repo_path": "deformetrica/support/probability_distributions/laplace_distribution.py", "max_stars_repo_name": "fleurgaudfernau/Deformetrica_multiscale", "max_stars_repo_head_hexsha": "cb6da74fa7882821ee64ce10b3... |
import os
import time
import glob
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from .utils import get_latest_file, iterate_minibatches, check_numpy, process_in_chunks
from .nn_utils import to_one_hot
from collections import OrderedDict
from copy import deepcopy
from... | {"hexsha": "c15150f81ed7b669e8cdd79ebde1a504c38cdb2c", "size": 12469, "ext": "py", "lang": "Python", "max_stars_repo_path": "node_scenario/lib/trainer.py", "max_stars_repo_name": "WEIFZH/IPscenario", "max_stars_repo_head_hexsha": "7dff3916ea5976473c8148418a05653d9a4d2e2a", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import openpnm as op
import numpy as np
ws = op.Workspace()
proj = ws.new_project()
# ws.settings['loglevel'] = 20
# network, geometry, phase
np.random.seed(0)
net = op.network.Cubic(shape=[33, 33, 1], spacing=9e-4, project=proj)
prs = (net['pore.back'] * net['pore.right'] + net['pore.back']
* net['pore.left'... | {"hexsha": "2a910a099a4b669ab355ccfcf2808b140840b09b", "size": 2696, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/example_transient_AD.py", "max_stars_repo_name": "Jimmy-INL/OpenPNM", "max_stars_repo_head_hexsha": "1546fa1ac2204443bde916f2037fac383c5069ae", "max_stars_repo_licenses": ["MIT"], "max_sta... |
""" some utility functions"""
# import numbers
from math import log10
from typing import Sequence
import numpy as np
from magpylib._src.exceptions import MagpylibBadUserInput
LIBRARY_SOURCES = (
"Cuboid",
"Cylinder",
"CylinderSegment",
"Sphere",
"Dipole",
"Loop",
"Line",
"CustomSource... | {"hexsha": "c7031f3ff1bb1332701f6931bf1073ce2ba16e32", "size": 9802, "ext": "py", "lang": "Python", "max_stars_repo_path": "magpylib/_src/utility.py", "max_stars_repo_name": "OrtnerMichael/magPyLib", "max_stars_repo_head_hexsha": "4c7e7f56f6e0b915ec0e024c172c460fa80126e5", "max_stars_repo_licenses": ["BSD-2-Clause"], "... |
[STATEMENT]
lemma arden_var: "(\<forall>y v. y \<le> x \<cdot> y + v \<longrightarrow> y \<le> x\<^sup>\<star> \<cdot> v) \<Longrightarrow> z = x \<cdot> z + w \<Longrightarrow> z = x\<^sup>\<star> \<cdot> w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>\<forall>y v. y \<le> x \<cdot> y + v \<longrightarr... | {"llama_tokens": 198, "file": "Kleene_Algebra_Kleene_Algebra", "length": 1} |
#@' export
GameMetadata = function(url) {
tree <- htmlTreeParse(url, isURL=TRUE, useInternalNodes=TRUE)
gamemeta = list()
gamemeta[['team-visitor']] = xpathSApply(tree, paste(
"//div[contains(@class,'matchup')]",
"/child::div[contains(@class,'team away')]",
"/child::div/h3/a", sep='... | {"hexsha": "5609498bdfdb0f43aa111e750c7bb36fdd3c5ec3", "size": 2315, "ext": "r", "lang": "R", "max_stars_repo_path": "R/metadata-game.r", "max_stars_repo_name": "jericson/pbp", "max_stars_repo_head_hexsha": "2c81461092d325c30e095dd907435709df51e17a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_stars_... |
/-
WR Scott's Group Theory in Lean
Permutation Groups
-/
import .definitions
namespace permutations
variables {A M U : Type}
definition injective (f : A → A) : Prop :=
∀ x y, f x = f y → x = y
-- a permutation of a set M is a 1-1 function into M onto M
-- Sym(M) is a set of permutation of M, (f : M → M) ∈ Sym(... | {"author": "EthanJamesLew", "repo": "group-theory-lean", "sha": "7cc60f4fa895bbfcd370de06d1da97f9d86ece3b", "save_path": "github-repos/lean/EthanJamesLew-group-theory-lean", "path": "github-repos/lean/EthanJamesLew-group-theory-lean/group-theory-lean-7cc60f4fa895bbfcd370de06d1da97f9d86ece3b/src/permutations.lean"} |
import os
import torch
from torch import nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
import torch.backends.cudnn as cudnn
from tqdm import tqdm
from arcface.resnet import ResNet
from arcface.googlenet import GoogLeNet
from arcface.inception_v4 import InceptionV4
from arcface.inceptionresn... | {"hexsha": "f30b4c17054c5af54682225a504287ec9d4d5726", "size": 7471, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_arcface.py", "max_stars_repo_name": "DerryHub/the-TaobaoLive-Commodity-Identify-Competition", "max_stars_repo_head_hexsha": "7e5e5c4fbddd9949fe01810d58bd7994889c007c", "max_stars_repo_licens... |
import matplotlib.dates as plt
import numpy as np
def polyfit(dates, levels, p):
"""""""convert the history of water level into a polynomial and a shift of the time axis"""""""
if dates == [] or levels == []:
poly = np.poly1d(0)
d0 = 0.0
else:
#convert the date values to t... | {"hexsha": "5dd34a55622999d0f403d459fc86739eac4d2179", "size": 751, "ext": "py", "lang": "Python", "max_stars_repo_path": "floodsystem/analysis.py", "max_stars_repo_name": "nleacock/Lent-Computing-Coursework", "max_stars_repo_head_hexsha": "8b749fc1e579dccc9d26aa911448f435017d045c", "max_stars_repo_licenses": ["MIT"], ... |
[STATEMENT]
lemma comm:
assumes neq_l_new: "ref l \<noteq> new s t"
assumes neq_x_new: "x \<noteq> new s t"
shows "s\<langle>t\<rangle>\<langle>l:=x\<rangle> = s\<langle>l:=x\<rangle>\<langle>t\<rangle>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. s\<langle>t, l := x\<rangle> = s\<langle>l := x, t\<rangle>... | {"llama_tokens": 17358, "file": "JiveDataStoreModel_Isabelle_Store_Store", "length": 183} |
import numpy as np
def q_from_v(env, V, s, gamma=0.99):
q = np.zeros(env.nA)
for a in range(env.nA):
for prob, s_next, reward in env.MDP[s][a]:
q[a] += prob * (reward + gamma * V[s_next])
return q
def policy_evaluation(env, policy, gamma=0.99, theta=1e-8):
V = np.zeros(env.nS)
... | {"hexsha": "0b455163c581f17ae15c5a9635eb86665e726805", "size": 1772, "ext": "py", "lang": "Python", "max_stars_repo_path": "A01/main_lib.py", "max_stars_repo_name": "jun-hyeok/AAI2014-01_Reinforcement-Learning_2021Fall", "max_stars_repo_head_hexsha": "f67b374dcd84e9c39c64fdc006fd83673e948395", "max_stars_repo_licenses"... |
% pop_importegimat() - import EGI Matlab segmented file
%
% Usage:
% >> EEG = pop_importegimat(filename, srate, latpoint0);
%
% Inputs:
% filename - Matlab file name
% srate - sampling rate
% latpoint0 - latency in sample ms of stimulus presentation.
% When data files are exporte... | {"author": "PatternRecognition", "repo": "OpenBMI", "sha": "3c42e609d5b867a8e15c780df3f8b0a8b86edcb8", "save_path": "github-repos/MATLAB/PatternRecognition-OpenBMI", "path": "github-repos/MATLAB/PatternRecognition-OpenBMI/OpenBMI-3c42e609d5b867a8e15c780df3f8b0a8b86edcb8/PR_BCI_team/Team_EarEEG/ear-EEG connecting/extern... |
def test():
# Here we can either check objects created in the solution code, or the
# string value of the solution, available as __solution__. A helper for
# printing formatted messages is available as __msg__. See the testTemplate
# in the meta.json for details.
integrand_1 = lambda x : x**2
i... | {"hexsha": "822dcaf8dcb2af91dbbf030e3e59de85e74ebfbe", "size": 1097, "ext": "py", "lang": "Python", "max_stars_repo_path": "exercises/test_03_05.py", "max_stars_repo_name": "IanHawke/numerical-methods-course", "max_stars_repo_head_hexsha": "f402faa23ab5ce6a72a7b3b5bf292d5f3c18c645", "max_stars_repo_licenses": ["MIT"], ... |
#!/usr/bin/env python
"""
Background:
===========
CTD_PriSecDiff.py
Purpose:
========
Calculate the depth averaged difference between primary and secondary salinity/temperature and report statistics
History:
========
Compatibility:
==============
python >=3.6 - **Tested**
python 2.7 - may work but ... | {"hexsha": "42c3fc58d61f607581e2d309784f024b21c7c46c", "size": 2579, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctd_edit_clutils/CTD_PriSecDiff.py", "max_stars_repo_name": "shaunwbell/EcoFOCI_AtSea", "max_stars_repo_head_hexsha": "a21a8f90c0d82902f24e64db1ef3f2af51005f57", "max_stars_repo_licenses": ["MIT"]... |
# -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#change defaults for plotting
#set line width
plt.rcParams['lines.linewidth'] = 4
#set font size for titles
plt.rcParams['axes.titlesize'] = 20
#set font size for labels on axes
plt.rcParams['axes.labelsize'] = 20
#set siz... | {"hexsha": "50d3bfe73b1d6745bc92c39de0b124388a4ca3c0", "size": 3605, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/chapter 24/chapt24.py", "max_stars_repo_name": "JJGO/Intro-to-Computation-and-Programming", "max_stars_repo_head_hexsha": "35c1e736385fabb73d50db3e612b7493da46e532", "max_stars_repo_licenses"... |
christen this file l1sold.f
cut here >>>>>>>>>>>>>>>>>>
c Copyright (C) 2010 Roger Fletcher
subroutine l1sold(n,m,k,kmax,maxg,a,la,x,bl,bu,f,g,r,w,e,ls,
* alp,lp,mlp,peq,ws,lws,cws,v,nv,rgtol,ifail,iprint,nout)
implicit double precision (a-h,r-z), integer (i-q)
c This routine is a post-processor ... | {"hexsha": "dacc3f2d76296b55b7dd86e91e0cf932d912cb60", "size": 22502, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "docker/optimization/pyOpt/tags/v1.2.0/pyOpt/pyFILTERSD/source/l1sold.f", "max_stars_repo_name": "liujiamingustc/phd", "max_stars_repo_head_hexsha": "4f815a738abad43531d02ac66f5bd0d9a1def52a", "ma... |
//==================================================================================================
/*!
@file
@copyright 2016 NumScale SAS
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
//============================... | {"hexsha": "021a4ebe340388486c32982f6f1a1c464d1193e9", "size": 2743, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "third_party/boost/simd/arch/common/scalar/function/is_normal.hpp", "max_stars_repo_name": "SylvainCorlay/pythran", "max_stars_repo_head_hexsha": "908ec070d837baf77d828d01c3e35e2f4bfa2bfa", "max_star... |
#ifndef PROTOC_SERIALIZATION_DYNAMIC_HPP
#define PROTOC_SERIALIZATION_DYNAMIC_HPP
///////////////////////////////////////////////////////////////////////////////
//
// http://protoc.sourceforge.net/
//
// Copyright (C) 2013 Bjorn Reese <breese@users.sourceforge.net>
//
// Permission to use, copy, modify, and distribut... | {"hexsha": "880aa7556f12cff3ffb6eb2208a0070965d513f8", "size": 4930, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/protoc/serialization/dynamic.hpp", "max_stars_repo_name": "skyformat99/protoc", "max_stars_repo_head_hexsha": "f0a72275c92bedc8492524cb98cc24c5821c4f11", "max_stars_repo_licenses": ["BSL-1.0... |
[STATEMENT]
lemma mult_less_cancel1_hmset[simp]: "k * m < k * n \<longleftrightarrow> 0 < k \<and> m < n" for k m n :: hmultiset
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (k * m < k * n) = (0 < k \<and> m < n)
[PROOF STEP]
by (simp add: mult.commute[of k]) | {"llama_tokens": 118, "file": "Nested_Multisets_Ordinals_Syntactic_Ordinal", "length": 1} |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import codecs
import itertools
import json
import logging
import os
import pickle
import shutil
from collections import OrderedDict
from dataclasses import dataclass
from os import path
import numpy
import torch
from torch.utils.data import Dataset
from ... | {"hexsha": "0dc290c4453d8ef6b3d6412b335d6b045c6052f7", "size": 42139, "ext": "py", "lang": "Python", "max_stars_repo_path": "openkge/dataset.py", "max_stars_repo_name": "samuelbroscheit/open_knowledge_graph_embeddings", "max_stars_repo_head_hexsha": "1ce37a4261a37e357a0f4dac3ee130ff11cbea4e", "max_stars_repo_licenses":... |
Require Export prosa.analysis.facts.preemption.task.floating.
Require Export prosa.analysis.facts.preemption.rtc_threshold.job_preemptable.
(** Furthermore, we assume the task model with floating non-preemptive regions. *)
Require Import prosa.model.preemption.limited_preemptive.
Require Import prosa.model.task.preemp... | {"author": "pointoflight", "repo": "prosa", "sha": "df7246392f27f32c760022b790f8c7aca11ff215", "save_path": "github-repos/coq/pointoflight-prosa", "path": "github-repos/coq/pointoflight-prosa/prosa-df7246392f27f32c760022b790f8c7aca11ff215/analysis/facts/preemption/rtc_threshold/floating.v"} |
\documentclass[12pt,a4paper]{scrreprt}
\usepackage{fontspec}
\usepackage{mathtools}
\usepackage[english]{babel}
\usepackage{longtable,booktabs}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage{capt-of}
\usepackage[top=1in, bottom=1.25in, left=1.25in, right=1.25in]{geometry}
%\setlength{\leftskip}{25pt}
% Make ... | {"hexsha": "8b51606fe5ac0188ee22acc86f7c95dd88dd8cc5", "size": 37708, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Report.tex", "max_stars_repo_name": "dineshdb/OMCaseStudy", "max_stars_repo_head_hexsha": "6486fd267573e99044a6b96bed08bcdafe1f8356", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": nu... |
import csv
import collections
import numpy
import itertools
from copy import copy
def motifsim_elongdataoutput(keyorder,parameterlist,masterprefix,testprefix,pop_tracker,nr_strands_per_time,elongation_tracker,strand_number_dict,trials,max_strand_nr,maxStrandLength,numCells,numRounds,motif,elong,bias):
elongkeyorder... | {"hexsha": "6b87f47c64d47e70d66481efd2f687a7fc95045f", "size": 2936, "ext": "py", "lang": "Python", "max_stars_repo_path": "motifsim_elongdataoutput.py", "max_stars_repo_name": "kins912/motifsim_readable", "max_stars_repo_head_hexsha": "576ddc1b46686d9c43889609f36210fb85f07c7e", "max_stars_repo_licenses": ["MIT"], "max... |
// Copyright 2014 The CRAVE developers. All rights reserved.//
#pragma once
#include <boost/foreach.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/proto/core.hpp>
#include <boost/proto/debug.hpp>
#include <boost/proto/context/callable.hpp>
#include <boost/proto/context/null.hpp>
#include <boost/range/value_t... | {"hexsha": "d45f014f7b97379fd6aea88d0db2ec6aad7b2c14", "size": 14950, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "crave/src/crave/ir/Context.hpp", "max_stars_repo_name": "hoangmle/crave-bundle-2015-07-22", "max_stars_repo_head_hexsha": "ffe89f3752887ca2fe12a327ba6c5b25bf23d98a", "max_stars_repo_licenses": ["MI... |
import numpy as np
niter=250 #trials per worker
r_values=np.array([0.6])#cm
D_values=np.array([0.2,2.,20.,])#cm^2/s
A_values=np.array([20.25,25,39,50,56.25,100,156.25,189,250])[::-1]#cm^2
L_values=np.sqrt(A_values)#cm
kappa_values=np.array([10])#1/s
beta_values=np.array([0.01,0.05,0.1,0.5,1])#cm
num_trials_per_setting=... | {"hexsha": "cd4996f04cd4b975f95d361b6ab9c0caf3836bcc", "size": 854, "ext": "py", "lang": "Python", "max_stars_repo_path": "c/smear/src/gen_run_5.py", "max_stars_repo_name": "timtyree/bgmc", "max_stars_repo_head_hexsha": "891e003a9594be9e40c53822879421c2b8c44eed", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
import sdl2
import sdl2.ext
import colorsys
import math
from datetime import datetime
import numpy as np
DEFAULT_DELAY = 10
DEFAULT_FFT_RANGE = (-120, 0)
BAR_COLOUR = sdl2.ext.Color(100, 100, 100)
BLACK = sdl2.ext.Color(0, 0, 0)
MIN_DELAY = 1
MAX_DELAY = 100
TEXT_MARGIN = 5
CLOCK_FORMAT = "%d/%m/%y %H:%M"
c... | {"hexsha": "19f69ea596c057754cbaf233a4f69cbe02ffac5c", "size": 6977, "ext": "py", "lang": "Python", "max_stars_repo_path": "livefftsdl/visualisation.py", "max_stars_repo_name": "StephenWattam/livefftsdl", "max_stars_repo_head_hexsha": "b6708d94ce00f8124184fe2b641e708f8d7bf6cf", "max_stars_repo_licenses": ["MIT"], "max_... |
import h5py
import time
from PIL import Image
import matplotlib.pyplot as plt
from scipy.misc import imshow
import numpy
import PIL
import pygame
from pygame import surfarray
from vis.utils import utils
import cv2
from PIL import Image
camera = h5py.File("curvas_em_T_1.h5", "r")
a_group_key = list(camera.keys())[0]
... | {"hexsha": "0e93604fe85fea61a6739ea3c944d6923590aa45", "size": 1175, "ext": "py", "lang": "Python", "max_stars_repo_path": "extract-bagfiles/read_h5.py", "max_stars_repo_name": "TulioLima1502/TG", "max_stars_repo_head_hexsha": "8c54c9f0a88511447b279b752f641addd4aba09c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max... |
import uuid
from typing import TYPE_CHECKING, Tuple, Union
from torchdemon.models import (
InferenceInputData,
InferenceRequest,
InferenceResult,
Signal,
)
if TYPE_CHECKING:
from multiprocessing.connection import Connection
import numpy as np
class InferenceClient:
def __init__(self, co... | {"hexsha": "c67e7977204215689a62c023ef07b0d44112c98b", "size": 1362, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/torchdemon/inference_client.py", "max_stars_repo_name": "jacknurminen/torchdemon", "max_stars_repo_head_hexsha": "1fafc261cf4cc30efd7b1efda71252bd7a67009d", "max_stars_repo_licenses": ["MIT"],... |
% !TeX root = ../thuthesis-example.tex
% Your chapter title here
% Please make sure that the title is in CAPITALS
% All section and subsection headings, use capital letters where required
\chapter{INTRODUCTION}
\label{introduction}
This chapter gives a brief introduction about the major breakthroughs of the field of ... | {"hexsha": "15ff7f9015de6e20ff6f8cd8835be7d61a858e65", "size": 10099, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "data/chap01.tex", "max_stars_repo_name": "davide97l/master-thesis", "max_stars_repo_head_hexsha": "1627af369f754618031aea9ceb99ca044952af16", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# SVM
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.model_selection import GridSearchCV
from sklearn import svm
from sklearn.svm import SVC
from sklearn import linear_model
from sklearn.metrics import classification_report, confusion_matrix
from sklearn.externals import joblib
f... | {"hexsha": "06475781f13b75e4e21b66790d2cdec2d03bfc92", "size": 4638, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/test_features.py", "max_stars_repo_name": "richardxie1119/SCCML", "max_stars_repo_head_hexsha": "2ef5ca60762e6e99bdcde323eb619f59e068c4c1", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
#!/usr/bin/env python
# -*- coding: utf-8
"""Frequency domain transforms
"""
import numpy as np
from numpy import random
from scipy.fft import irfft, rfft
def add_discrete_phase_shifts(x: np.ndarray, p: float=0.01, m: float=0.1):
r"""Shift each frequency component with probability p by distance m*len(x).
C... | {"hexsha": "3fd67bd2bd2072aa986879713605bc83366f4b7a", "size": 8942, "ext": "py", "lang": "Python", "max_stars_repo_path": "niacin/timeseries/freq.py", "max_stars_repo_name": "deniederhut/niacin", "max_stars_repo_head_hexsha": "f79499be9f58d0ac539c8a488908d99dcc5c53de", "max_stars_repo_licenses": ["BSD-3-Clause"], "max... |
# Copyright 2017 Ben Walsh
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | {"hexsha": "35a802a738398271ecc108abb35ab92bcba59368", "size": 2703, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_edge.py", "max_stars_repo_name": "walshb/camog", "max_stars_repo_head_hexsha": "874d1209b14a7662bbd6b22886386c6c88b819c2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ... |
import scipy as sp
import numpy as np
from scipy import stats
import networkx as nx
from networkx.algorithms.traversal.depth_first_search import dfs_tree
from matplotlib import pyplot as plt
import matplotlib as mpl
import random
import matplotlib.image as mpimg
import graphviz
import imageio, json
from IPython.display... | {"hexsha": "9b2362de0e3448272e2b3606beaf853a5f4343d8", "size": 18793, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/datasets/synthetic/ds.py", "max_stars_repo_name": "afshinbigboy/imt-rl-mcmc", "max_stars_repo_head_hexsha": "4c541c32566979d527b608fbbe36a4403398ebb3", "max_stars_repo_licenses": ["MIT"], "ma... |
\chapter{Introduction}
\label{chap:introduction}
\section{Context}
The Ethereum blockchain aims to move from the current Proof of Work (\gls{pow})
consensus protocol to a Proof of Stake (\gls{pos}) one. Multiple teams are
currently researching ways to describe, and implement such a protocol. One of
these teams, lead ... | {"hexsha": "b90b01603fee137b05ccedad63e3f7647f64ee74", "size": 1338, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "02-main/ch1_introduction.tex", "max_stars_repo_name": "0xjac/MSE-2018-TM-Report", "max_stars_repo_head_hexsha": "773d9ec62a9274614288fc867e01c93380bc3c81", "max_stars_repo_licenses": ["Apache-2.0"],... |
[STATEMENT]
lemma inj_map_ds: "inj (map_ds::('a::complete_lattice \<Rightarrow> 'b::complete_lattice) \<Rightarrow> ('a downset \<Rightarrow> 'b downset))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. inj map_ds
[PROOF STEP]
by (metis (no_types, lifting) SSup_ds_inv fun.map_id0 id_comp inj_def map_ds_prop rewriteR... | {"llama_tokens": 134, "file": "Order_Lattice_Props_Representations", "length": 1} |
import cv2
from numpy import abs, median, interp
import math
from EmeraldAI.Logic.Singleton import Singleton
class CameraDistanceProcessor(object):
__metaclass__ = Singleton
def __init__(self, camID):
self.__imageWidth = 640
self.__imageHeight = 480
self.__camera = cv2.VideoCapture(c... | {"hexsha": "a14c653bef441d1e3e8236318f3291329edecf4d", "size": 1844, "ext": "py", "lang": "Python", "max_stars_repo_path": "EmeraldAI/Logic/ComputerVision/CameraDistanceProcessor.py", "max_stars_repo_name": "MaxMorgenstern/EmeraldAI", "max_stars_repo_head_hexsha": "4bbb50f94b656904c428fc28cdbb61e7353e61aa", "max_stars_... |
"""
Author: Giang Tran
Email: giangtran204896@gmail.com
Docs: https://giangtranml.github.io/ml/conv-net.html
"""
import sys, os
sys.path.append("..")
import numpy as np
from neural_network.neural_network import NeuralNetwork
from nn_components.layers import ConvLayer, ActivationLayer, PoolingLayer, FlattenLayer, FCLaye... | {"hexsha": "35d1b1f723692706059a9914fdbccdcc3a1d75ff", "size": 5977, "ext": "py", "lang": "Python", "max_stars_repo_path": "convolutional_neural_network/convolutional_neural_network.py", "max_stars_repo_name": "giangtranml/framgia-training", "max_stars_repo_head_hexsha": "c7fb343bd43b1bceb241b447ff956febb99c94a8", "max... |
import os
import os.path as op
import json
import shutil
import zipfile
import requests
from glob import glob
import numpy as np
import pandas as pd
import nibabel as nib
from scipy import ndimage
from nimare.utils import get_resource_path
def _local_max(data, affine, min_distance):
"""Find all local maxima of ... | {"hexsha": "bb3dc71b98412ea99fc2b53688c9d77d80668799", "size": 7251, "ext": "py", "lang": "Python", "max_stars_repo_path": "download_test_data.py", "max_stars_repo_name": "puckr/NiMARE", "max_stars_repo_head_hexsha": "3a3e5edd5d66048bfbe140077fc2c76ef639690f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
(* *********************************************************************)
(* *)
(* The CertiKOS Certified Kit Operating System *)
(* *)
(* The... | {"author": "npe9", "repo": "certikos", "sha": "dd2631a096523a29a2e8a3101d8a224b754ea56a", "save_path": "github-repos/coq/npe9-certikos", "path": "github-repos/coq/npe9-certikos/certikos-dd2631a096523a29a2e8a3101d8a224b754ea56a/mcertikos/layerlib/Constant.v"} |
# -*- coding: utf-8 -*-
# Decision-tree.py
import numpy as np
from functools import *
import pydotplus
import re
feature = {}
def predict_by_tree(sample, tree):
pass
def counts_by_feature_and_class(data, ft, ft_val, cls=None):
#total是个[True False]矩阵,表示满足条件的行是否存在
if cls == None:
total = data[:, ... | {"hexsha": "0cfd9aa778bb4e8509836c39fd2259edd1140aa3", "size": 17936, "ext": "py", "lang": "Python", "max_stars_repo_path": "DesicionTree.py", "max_stars_repo_name": "anribras/machine-learning", "max_stars_repo_head_hexsha": "e251671732d3bd618f5396d6a6c9be490045165e", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import errno
import json
import os
import random
import time
import numpy as np
import tensorflow as tf
from video_prediction import datasets, models
from video_prediction.variables import Var... | {"hexsha": "c9976562e69e3fb363ae418b641e1c5cc8b2685c", "size": 11407, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/evaluate_reptile.py", "max_stars_repo_name": "yenchenlin/evf-public", "max_stars_repo_head_hexsha": "7b524f1b23e15d1d43b1e9bcb7bfe8f1b43cfc49", "max_stars_repo_licenses": ["MIT"], "max_st... |
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
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)
====================================... | {"hexsha": "9a5f3ccfba4171ddc17c3c765025dce603f4a713", "size": 5018, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "windows/include/boost/spirit/home/qi/parse.hpp", "max_stars_repo_name": "jaredhoberock/gotham", "max_stars_repo_head_hexsha": "e3551cc355646530574d086d7cc2b82e41e8f798", "max_stars_repo_licenses": [... |
!==============================================================================!
subroutine Grid_Mod_Find_Cells_Faces(grid)
!------------------------------------------------------------------------------!
! Find faces surrounding each cell; needed for VOF for now. !
!-------------------------------... | {"hexsha": "a6cd2a293f2b612ae32bb53ac9a3a1ba5b2446a0", "size": 1272, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Sources/Shared/Grid_Mod/Find_Cells_Faces.f90", "max_stars_repo_name": "Dundj/Convex_Geomotry", "max_stars_repo_head_hexsha": "38507824d97270b3e4ead194a16148ff6158b59f", "max_stars_repo_licenses"... |
#!/usr/bin/env python
import os
import sys
import argparse
import traceback
import random
sys.path.insert(1, os.path.join(os.path.dirname(__file__), os.pardir))
from toollib.group import Group,UnsortedInputGrouper
from scipy.stats import anderson_ksamp
confidence = [25, 10, 5, 2.5, 1]
class ADGroup(Group):
def _... | {"hexsha": "ec908bdeb0401a827052893107f0bd4204dd3aa0", "size": 3302, "ext": "py", "lang": "Python", "max_stars_repo_path": "curve/ad_ksamp.py", "max_stars_repo_name": "scoky/data_tools", "max_stars_repo_head_hexsha": "b0a3b8db6e93b332a9ca10cae6b5830614b50a30", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "... |
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import tkinter
matplotlib.use('TkAgg')
attempts = ["ident", "hamming", "added_v1", "SMOTE"]
nets = ["cnn", "mlp"]
for net in nets:
plt.clf()
for attempt in attempts:
tmpRank = np.loadtxt("means/"+attempt+"-"+net +
... | {"hexsha": "26c45f621635dd7dfd136a4d8f2cb545d87b3ef8", "size": 784, "ext": "py", "lang": "Python", "max_stars_repo_path": "z_playground/accum_means.py", "max_stars_repo_name": "HenrikEilers/ASCAD_Data_Augmentation", "max_stars_repo_head_hexsha": "d67386af1969838d857de2d51d4b72258ec8cc37", "max_stars_repo_licenses": ["B... |
#!/usr/bin/env python
# ROS imports
import roslib, rospy
# opencv imports
import cv2
# numpy imports - basic math and matrix manipulation
import numpy as np
# imports for ROS image handling
from cv_bridge import CvBridge, CvBridgeError
from sensor_msgs.msg import Image
# message imports specific to this package
fr... | {"hexsha": "c6ea927ce52e924d8b581f2438a863aadfab1be4", "size": 5885, "ext": "py", "lang": "Python", "max_stars_repo_path": "catkin_ws/src/localization/optic_flow/nodes/optic_flow_lucas_kanade.py", "max_stars_repo_name": "emilyfy/FFAST", "max_stars_repo_head_hexsha": "93739f3691ba526a0a912544f2ff9ff481fdee9b", "max_star... |
import numpy as np
try:
import pycuda.autoinit
import pycuda.driver as drv
from pycuda.compiler import SourceModule
cuda = True
except Exception as e:
print "Cuda disabled"
print e
cuda = False
from scipy import interpolate
class Imager:
"""Describes an imager and all the parameters related to it. Contains ... | {"hexsha": "eb952a315970505de5c343479228f1e78c0b58b0", "size": 9395, "ext": "py", "lang": "Python", "max_stars_repo_path": "imager.py", "max_stars_repo_name": "FSavoy/cloud-reconstruction", "max_stars_repo_head_hexsha": "202669495017aeae08aa168ebfbf7e6c004d2ff5", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_... |
#include <fstream>
#include <sstream>
#include <boost/spirit/include/qi.hpp>
#include <OpenVolumeMesh/FileManager/FileManager.hh>
#include "MeshGenerator.hpp"
#include "Grammars/Tetmesh.hpp"
#include "Grammars/Netgen.hpp"
void printUsage() {
std::cerr << "You need to specify a format and a source file to conve... | {"hexsha": "db08b565e86166a9093616dffa3e49677aa1fe73", "size": 2700, "ext": "cc", "lang": "C++", "max_stars_repo_path": "extern/OpenVolumeMesh/src/FileConverter/ovm_converter.cc", "max_stars_repo_name": "msraig/CE-PolyCube", "max_stars_repo_head_hexsha": "e46aff6e0594b711735118bfa902a91bc3d392ca", "max_stars_repo_licen... |
import os, sys
import numpy as np
import argparse
import datetime
import time
import torch
from torch.autograd import Variable
from model import cnn
from dataset import data
parser = argparse.ArgumentParser(description='Extract features from dataset using desired CNN')
parser.add_argument('--dataset-root', action="s... | {"hexsha": "c16eea60d520b5ee1e6647b193abe0dfcfe20a34", "size": 2945, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/extract_features.py", "max_stars_repo_name": "UCSB-VRL/action_recognition", "max_stars_repo_head_hexsha": "ec735c79263e0258ba30ecbd9f5091997a137fc5", "max_stars_repo_licenses": ["MIT"], "max_... |
import numpy as np
import mxnet as mx
from autogluon.core.utils import *
from .dataset import *
from autogluon.mxnet.task.classifier import Classifier
from autogluon.core import AutoGluonObject
__all__ = ['TextClassificationPredictor']
from ..utils import try_import_gluonnlp
class TextClassificationPredictor(Classi... | {"hexsha": "1c6a135db9206dcc4ee0691480eb5bed3780b09f", "size": 4892, "ext": "py", "lang": "Python", "max_stars_repo_path": "text/src/autogluon/text/text_classification/predictor.py", "max_stars_repo_name": "mseeger/autogluon-1", "max_stars_repo_head_hexsha": "e8d82363ce07fd8e3087bcdd2d71c6f6bd8fd7a0", "max_stars_repo_l... |
def transform_scalars(dataset):
"""Downsample volume by a factor of 2"""
from tomviz import utils
import scipy.ndimage
import numpy as np
array = utils.get_array(dataset)
# Downsample the dataset x2 using order 1 spline (linear)
# Calculate out array shape
zoom = (0.5, 0.5, 0.5)
r... | {"hexsha": "09774ebd0ab7edcf88398ca0a48ba7652c977110", "size": 1240, "ext": "py", "lang": "Python", "max_stars_repo_path": "tomviz/python/BinVolumeByTwo.py", "max_stars_repo_name": "sukhsung/tomviz", "max_stars_repo_head_hexsha": "b5ab44440be94476093206672e527c54098b58c7", "max_stars_repo_licenses": ["BSD-3-Clause"], "... |
import h5py
import os
import numpy as np
from skimage import io
import imageio
dataset_dir = 'data/PIOD'
train_lst = f'{dataset_dir}/Augmentation/train_pari_320x320.lst'
test_lst = f'{dataset_dir}/Augmentation/test.lst'
h5_label_dir = f'{dataset_dir}/Augmentation/Aug_HDF5EdgeOriLabel'
image_dir = f'{dataset_dir}/Augme... | {"hexsha": "a12a7412ef495e83e210b439aeca6ee9a4fe0039", "size": 1920, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/labels_h5file2png.py", "max_stars_repo_name": "fengpanhe/MT-ORL", "max_stars_repo_head_hexsha": "a3e54a2597ebadbeda259815b7e42f2b65c28170", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
# Augment a null progress meter which disables it
import ProgressMeter.next!
struct NullProgress <: ProgressMeter.AbstractProgress
NullProgress()=new()
end
next!(::NullProgress) = nothing
# Function which is essentially min(1, exp(p_ - p)), but handles
# exceptional cases gracefully
@inline function _accept_prob... | {"hexsha": "5ee7a3364c49c64365b4718300c37c7800ecb255", "size": 604, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/common.jl", "max_stars_repo_name": "mvihola/AdaptiveParticleMCMC.jl", "max_stars_repo_head_hexsha": "7d6197d541b98816ba51ba47020c1872112217b2", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
#!/usr/bin/env python
import roslib
# import roslib.packages
# roslib.load_manifest('rep_cmd_vel')
from roslib import scriptutil
import sys, select, termios, tty
import os
import rospy
from math import *
from sensor_msgs.msg import Image, LaserScan
from geometry_msgs.msg import Point32
from geometry_msgs.msg import Poi... | {"hexsha": "188d3aa50bf291de4fda106ce58a8f4a732d0f72", "size": 29359, "ext": "py", "lang": "Python", "max_stars_repo_path": "multi_tracker/nodes/dock_detection_v9.py", "max_stars_repo_name": "nhattruongpham/ROS_experiment", "max_stars_repo_head_hexsha": "738411ec44e2ed3018a215778242218cafecc6f7", "max_stars_repo_licens... |
# %%
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import cm
from gp_fits.fit_gps import get_coords
import pystan
# %%
import pickle
gpr = pickle.load(open('gp_fits/gp_regression.pkl', 'rb'))
# %%
df = pd.read_csv('data/Rep11_MOB_24.csv', index_col=0)
sample_info = get_coor... | {"hexsha": "ab24b66d6d4926fb152d0b02363e0e301543b985", "size": 1474, "ext": "py", "lang": "Python", "max_stars_repo_path": "gp_fits/pystan_version.py", "max_stars_repo_name": "jiangfuqing/SpatialDE", "max_stars_repo_head_hexsha": "cb5deb8c24e7c98c77672784b43cef41b2f24d99", "max_stars_repo_licenses": ["MIT"], "max_stars... |
"""
Simulator of graphons
Reference:
Chan, Stanley, and Edoardo Airoldi.
"A consistent histogram estimator for exchangeable graph models."
In International Conference on Machine Learning, pp. 208-216. 2014.
"""
import cv2
import matplotlib.pyplot as plt
import numpy as np
import ot
from typing import List
def synth... | {"hexsha": "568f04faaba1675499e3664804e95ccf67d78992", "size": 5211, "ext": "py", "lang": "Python", "max_stars_repo_path": "methods/simulator.py", "max_stars_repo_name": "HongtengXu/SGWB-Graphon", "max_stars_repo_head_hexsha": "8c1ff78ceacd45ebd2384bd98bd6a5aeb9149550", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
"""
obsOCO2_defn.py
Copyright 2016 University of Melbourne.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to ... | {"hexsha": "eb0c01679588894dee7d969a8b2942e806c905cb", "size": 5970, "ext": "py", "lang": "Python", "max_stars_repo_path": "obs_preprocess/obsOCO2_defn.py", "max_stars_repo_name": "steven-thomas/py4dvar", "max_stars_repo_head_hexsha": "9e4bdf257e11ee4eb6f65407afc46e372c7990ce", "max_stars_repo_licenses": ["Apache-2.0"]... |
#!/usr/bin/python3
import sys
import copy
import numpy as np
import libs.data as data
import libs.fitness as fitness
import libs.statistics as statistics
import libs.operators as operators
import libs.selection as selection
import libs.individual as individual
import libs.best_individual as best_individual
try:
p... | {"hexsha": "0db43ac2feda8b7dfde924123ace966761a19d7c", "size": 2394, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/symbolic_regression.py", "max_stars_repo_name": "ronaldpereira/symbolic-regression", "max_stars_repo_head_hexsha": "6896865e27d66403c86ecd53a11f0fa12ce7fe6a", "max_stars_repo_licenses": ["MIT"... |
(* HEADER
Jacob Adley
Verified implementation of Leftist-Min-Heap
http://typeocaml.com/2015/03/12/heap-leftist-heap/
*)
(* Arguments ... : simpl never. *)
(* IMPORTS *)
(*From VFA *)Require Import Perm.
(*From QuickChick Require Import QuickChick.*)
Require Import Coq.Logic.FunctionalExtensionality.
(* --- ... | {"author": "jtadley", "repo": "Coq", "sha": "a3311688118f1bc5e36503886b1517ecc30477a0", "save_path": "github-repos/coq/jtadley-Coq", "path": "github-repos/coq/jtadley-Coq/Coq-a3311688118f1bc5e36503886b1517ecc30477a0/Heap0.v"} |
from math import ceil
from sage.all import ZZ
from sage.all import sqrt
def factorize(n, r_p, r_q):
"""
Recovers the prime factors from a modulus using the Ghafar-Ariffin-Asbullah attack.
More information: Ghafar AHA. et al., "A New LSB Attack on Special-Structured RSA Primes"
:param n: the modulus
... | {"hexsha": "73269a7b2b5539de2f85d2fb469595f228724df6", "size": 975, "ext": "py", "lang": "Python", "max_stars_repo_path": "factorization/gaa.py", "max_stars_repo_name": "kanhavishva/crypto-attacks", "max_stars_repo_head_hexsha": "ab3b17cb880f8592bc266f0a991e606786c8d875", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
""" Unit tests for Fourier transform processors
"""
import logging
import unittest
from functools import partial
import numpy
from astropy import units as u
from astropy.coordinates import SkyCoord
from astropy.wcs.utils import pixel_to_skycoord
from arl.data.polarisation import PolarisationFrame
from arl.image.ope... | {"hexsha": "c5045a520de8d433ed64a5a69542e788f3beb0e9", "size": 17812, "ext": "py", "lang": "Python", "max_stars_repo_path": "arl-python/tests/test_imaging.py", "max_stars_repo_name": "Song655/arlo", "max_stars_repo_head_hexsha": "cee1613d4a2b2e1263da9d5b4b9930eef569509c", "max_stars_repo_licenses": ["Apache-2.0"], "max... |
@testset "laguerre" begin
@test all(
laguerrel(n, α, x) ≈ laguerre(n, α)(x)
for n in 0:100, α in 0:100, x in -20:0.1:20
)
end
| {"hexsha": "ad9cf527533c640fc9e6143868f83ab2881ca7e9", "size": 150, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/polynomial.jl", "max_stars_repo_name": "meerkat321/QuantumStateBase.jl", "max_stars_repo_head_hexsha": "476506f342cba0102832d25e1d36a2afdc61aa65", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# -*- coding: utf-8 -*-
"""
Image input-output functions.
Created on Thu Apr 19 22:00:00 2018
Author: Prasun Roy | CVPRU-ISICAL (http://www.isical.ac.in/~cvpr)
GitHub: https://github.com/prasunroy/cvutils
"""
# imports
import cv2
import numpy
import os
import requests
from .validation import imvalidate
# reads an ... | {"hexsha": "67265a3d58d9b1a1b97f708a88d778066eb27a96", "size": 2984, "ext": "py", "lang": "Python", "max_stars_repo_path": "cvutils/io.py", "max_stars_repo_name": "prasunroy/cvutils", "max_stars_repo_head_hexsha": "849bae085da1706a3fc51e67a8c0ec85cef04db0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "max... |
# NOTE: This script is generally to be called by $CANDLE/wrappers/analysis/plot_node_usage.sh
# Import relevant modules
import numpy as np
import sys
import matplotlib.pyplot as plt
# Read in the arguments to this script: the temporary text file that holds the timing information, the figure size to create, and the di... | {"hexsha": "92f9f720d7e899fe33a9e68ea5a1185352f41383", "size": 1632, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/plot_node_usage.py", "max_stars_repo_name": "fnlcr-bids-sdsi/candle-wrappers", "max_stars_repo_head_hexsha": "9745e18b346e29513e2dcc35430ae75de7bd6af6", "max_stars_repo_licenses": ["MIT"]... |
"""Module for handling TLE reading and writing
.. code-block:: text
ISS (ZARYA)
1 25544U 98067A 08264.51782528 -.00002182 00000-0 -11606-4 0 2927
2 25544 51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537
First Line
1 01–01 Line number ... | {"hexsha": "4081436de7266bde05ba4027f230fae8e60dd95f", "size": 11372, "ext": "py", "lang": "Python", "max_stars_repo_path": "beyond/io/tle.py", "max_stars_repo_name": "priyatharsan/beyond", "max_stars_repo_head_hexsha": "1061b870407d316d43e4d1351a7ec026629685ae", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
"""
Log-normal distribution
-----------------------
The parameters mu and sigma are the mean and standard deviation
of the underlying normal distribution. These are not the same
parameters as used in `scipy.stats.lognorm`.
"""
import mpmath
__all__ = ['pdf', 'logpdf', 'cdf', 'sf', 'invcdf', 'invsf', 'mle', 'mom']
... | {"hexsha": "2fd87445d0ff39c6b9656c37b17b7334f399ec91", "size": 3071, "ext": "py", "lang": "Python", "max_stars_repo_path": "mpsci/distributions/lognormal.py", "max_stars_repo_name": "WarrenWeckesser/mpsci", "max_stars_repo_head_hexsha": "675f0f3b76700529558a3bae2a1b2ca09552233b", "max_stars_repo_licenses": ["BSD-2-Clau... |
[STATEMENT]
lemma l3_lkr_after_refines_lkr_after:
"{R23s} l2_lkr_after A, l3_lkr_after A {>R23s}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. {R23s} l2_lkr_after A, l3_lkr_after A {> R23s}
[PROOF STEP]
apply (auto simp add: PO_rhoare_defs R23s_defs)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<And>b y. (... | {"llama_tokens": 378, "file": "Key_Agreement_Strong_Adversaries_pfslvl3", "length": 3} |
#
# Copyright (c) 2017 Intel Corporation
# SPDX-License-Identifier: BSD-2-Clause
#
from __future__ import print_function, division, absolute_import
import types as pytypes # avoid confusion with numba.types
import numpy
from numba import ir, analysis, types, config
from numba.ir_utils import (mk_unique_var, replace_v... | {"hexsha": "07d3b8983615eb188cf372ce5fbae91e011b6d07", "size": 35810, "ext": "py", "lang": "Python", "max_stars_repo_path": "numba/array_analysis.py", "max_stars_repo_name": "EnjoyLifeFund/py36pkgs", "max_stars_repo_head_hexsha": "0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2", "max_stars_repo_licenses": ["MIT", "BSD-2-Clau... |
import os
from path import Path
root = str(Path(os.path.abspath(os.path.dirname(__file__))).parent)
import supply_chain_mapping.data_cleaning_and_processing as dc
import pandas as pd
import numpy as np
import networkx as nx
import random
random.seed(1)
def get_networks(complete_data=None, directed=True, sample_p... | {"hexsha": "6737fe9300f02ca533997a7fa5e01fbf43c4d22e", "size": 2517, "ext": "py", "lang": "Python", "max_stars_repo_path": "supply_chain_mapping/network_analysis.py", "max_stars_repo_name": "losDaniel/supply-chain-vulnerability", "max_stars_repo_head_hexsha": "5c27e9c3d1dcc834c5ef5a3605826b59f0e02a79", "max_stars_repo_... |
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
VERSION = '1.0.4'
class numpy_build_options(build_ext):
"""We can't important numpy directly because it's not ready yet."""
def finalize_options(self):
build_ext.finalize_options(self)
# Prevent numpy fr... | {"hexsha": "fad742b868bd428356e2b894073a8ab0c2f3b061", "size": 1887, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup.py", "max_stars_repo_name": "zkbt/spyffi", "max_stars_repo_head_hexsha": "2d6e40b9fdf6074b1bd732be38a7a29985292781", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo... |
module BitSAD
using LinearAlgebra
using DataStructures
using Random: MersenneTwister
using Setfield
using Ghost
using MacroTools: @capture
using LightGraphs, MetaGraphs
using Base: @kwdef
using Artifacts, LazyArtifacts
export AbstractBitstream
export SBit, SBitstream
# export DBit, DBitstream
export pos, neg
export d... | {"hexsha": "d5fcc354954dec984dbac09bc76a550b14aa258f", "size": 1814, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/BitSAD.jl", "max_stars_repo_name": "UW-PHARM/BitSAD.jl", "max_stars_repo_head_hexsha": "37ab94bc86ce16514405f8f0d50ccb23434b653c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max... |
program ut_massadj
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! NASA/GSFC, Data Assimilation Office, Code 910.3, GEOS/DAS !
!-----------------------------------------------------------------------
!BOP
!
! !ROUTINE: ut_massadj: Ensure analysis does not change dry mass
!
... | {"hexsha": "e465b66d76d978157a8961cadfd7452032b3357d", "size": 6651, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "GMAO_transf/ut_massadj.f90", "max_stars_repo_name": "GEOS-ESM/GMAO_Shared", "max_stars_repo_head_hexsha": "022af23abbc7883891006b57379be96d9a50df23", "max_stars_repo_licenses": ["NASA-1.3", "ECL... |
import tensorflow as tf
import numpy as np
import layers2 as L
L.set_gpu('0')
import modeleag as M
IMG_SIZE = 128
AGE_CATEGORY = 10
Z_DIM = 50
class EncoderNet(M.Model):
def initialize(self):
# should modify the network structure for better training
self.c1 = M.ConvLayer(5, 64, stride=2, activation=M.PARAM_R... | {"hexsha": "4da0dc9fdb5ca7f3d697c7de0cafdac5d3161840", "size": 6759, "ext": "py", "lang": "Python", "max_stars_repo_path": "example/FaceAging/network.py", "max_stars_repo_name": "ddddwee1/SULT", "max_stars_repo_head_hexsha": "0ff31b602d20dd8bc5cf4a6f4f5bc193d636e784", "max_stars_repo_licenses": ["WTFPL"], "max_stars_co... |
! Module for chaboche_norton
! Functions generated with AceGen and collected by make_acegen_mods.py
module acegen_mod
use smsutility
implicit none
private
public dRdX1
public dRdX2
public dRdX3
public dRdX4
public RF1
public RF2
public RF3
public RF4
contains
SUBROUTINE dRdX1(x,props,xold,strial,dt,dRdX)
IMPLICIT N... | {"hexsha": "6e989007d45af40956acdb984e2ed8228728c8d8", "size": 119472, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "models/GenSmallStrain/src/chaboche_norton_acegen_mod.f90", "max_stars_repo_name": "kengwit/MaterialModels", "max_stars_repo_head_hexsha": "97de48a2f3ba8f2d605b892a6e0603c9b3feb42c", "max_stars... |
from rllab.misc import ext
from rllab.misc import logger
from rllab.core.serializable import Serializable
import time
import lasagne.updates
import theano
import pyprind
import numpy as np
import multiprocessing as mp
from sandbox.ex2.parallel_trpo.simple_container import SimpleContainer
class ParallelFirstOrderOpti... | {"hexsha": "d54f94166ded737988997629917740382f1bba52", "size": 10114, "ext": "py", "lang": "Python", "max_stars_repo_path": "sandbox/ex2/parallel_trpo/first_order_optimizer.py", "max_stars_repo_name": "sokol1412/rllab_hierarchical_rl", "max_stars_repo_head_hexsha": "6d46c02e32c3d7e9ac55d753d6a3823ff86c5a57", "max_stars... |
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <iostream>
using namespace std;
using namespace boost;
boost::mutex io_mutex;
boost::condition_variable_any test_condition;
void test(int num)
{
for... | {"hexsha": "fe389806970ab128d72f67ceeb6413e7664aa90b", "size": 1392, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cpp/boost/condition.cpp", "max_stars_repo_name": "hackin-zhao/interesting_code", "max_stars_repo_head_hexsha": "25fecb716f5c8f9143ec2824bbf8996b347ce8a9", "max_stars_repo_licenses": ["MIT"], "max_st... |
import os
import sys
import numpy as np
from datetime import datetime, timedelta
from tools_AIP import read_obs_grads, read_nc_topo, read_mask_full, read_obs_grads_latlon, read_fcst_grads, read_nc_lonlat, dist, get_cfeature, setup_grids_cartopy, prep_proj_multi_cartopy, read_ga_grads_all, read_ga_grads_dbz
import matp... | {"hexsha": "915a72ac7811781e66b15f5e42af86fa32a32156", "size": 15066, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/4p_ainc_var.py", "max_stars_repo_name": "takumihonda/AIP_realtime", "max_stars_repo_head_hexsha": "03d6cf3e1405c21b73bf2923cb6914aeb6f3634d", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# --------------
# Importing header files
import numpy as np
import warnings
warnings.filterwarnings('ignore')
#New record
new_record=[[50, 9, 4, 1, 0, 0, 40, 0]]
#Reading file
data = np.genfromtxt(path, delimiter=",", skip_header=1)
#Code starts here
print(data.shape)
census = np.concatenate([d... | {"hexsha": "a98e7dd59899fe820cc9a4c9a9add211054143ef", "size": 1253, "ext": "py", "lang": "Python", "max_stars_repo_path": "Task-np1/code.py", "max_stars_repo_name": "dhanushnayak/greyatom-python-for-data-science", "max_stars_repo_head_hexsha": "8bcdd24d0fb9c84330608c3ddad4f506f5d61a1b", "max_stars_repo_licenses": ["MI... |
import numpy as np
def temperature(T, settings, t):
return T * settings.alpha**t # Exponential decay
def acceptance_probability(es, en, T):
if en < es:
return 1.
else:
return np.exp(-(en - es) / T) # Kirkpatrick et. al, MH
def simulated_annealing(problem, settings):
# TODO vectorize f... | {"hexsha": "ed836075bd8382eb5cce5356ff43f5ce6fc63907", "size": 751, "ext": "py", "lang": "Python", "max_stars_repo_path": "solutions/simulated_annealing.py", "max_stars_repo_name": "LSaldyt/tsp", "max_stars_repo_head_hexsha": "f5cd9b2aaadca57b6dfdf39e33e0c73c11975462", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.