text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
import math
import numpy as np
from typing import Tuple
from control.config import (
dt,
wheelbase,
max_steer_angle,
look_ahead_distance,
look_ahead_gain,
)
from control.vehicle import Vehicle
from control.paths.utils import pi_2_pi
class Node:
def __init__(self, x, y, theta, speed):
... | {"hexsha": "5e3c932a951aecb8f9309dde2d0f4ca49b27e96b", "size": 4622, "ext": "py", "lang": "Python", "max_stars_repo_path": "control/trajectory.py", "max_stars_repo_name": "BrancoLab/LocomotionControl", "max_stars_repo_head_hexsha": "6dc16c29c13b31f6ad70af954a237e379ee10846", "max_stars_repo_licenses": ["MIT"], "max_sta... |
\documentclass[12pt]{article}
\usepackage{amsmath} % need for subequations
\usepackage{verbatim} % useful for program listings
\usepackage{blindtext}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{breqn}
\usepackage{systeme}
\usepackage{tabularx}
\usepackage[
singlelinecheck=false %
]{caption}... | {"hexsha": "e28881218eec87377ae7fb82981cd441680d5fb2", "size": 17915, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "laTex/biosorptionModelPaper.tex", "max_stars_repo_name": "ya-smolin/isotermAPI", "max_stars_repo_head_hexsha": "1eca962415d90be3c2435dab662af920994d375f", "max_stars_repo_licenses": ["CC0-1.0"], "m... |
{-# OPTIONS --without-K #-}
open import Type using (Type₀; Type₁)
open import Type.Identities
open import Data.Zero using (𝟘)
open import Data.One using (𝟙; 0₁)
open import Data.Two.Base using (𝟚; 0₂; 1₂)
open import Data.Product.NP using (Σ; _×_)
open import Data.Sum.NP using (_⊎_)
open import Data.Nat.Base using (... | {"hexsha": "f562f6f40c7c70a35693f1670a312eaa7a1b0586", "size": 1767, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "lib/Explore/Universe/Type.agda", "max_stars_repo_name": "crypto-agda/explore", "max_stars_repo_head_hexsha": "16bc8333503ff9c00d47d56f4ec6113b9269a43e", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
# PROGRAMMER: Lorenzo Varano
# DATE CREATED: 2020.04.10
# PURPOSE: This part of the program contains functions for build, train and save the model.
# NOTE: This file was created mainly with support of the previous task in Part 1 and 1st project - use of a pretrained classifier. Additional support material is referenced... | {"hexsha": "2466e5a052a6459e8ea370e96a7db02eaaf1208f", "size": 8211, "ext": "py", "lang": "Python", "max_stars_repo_path": "classify_images.py", "max_stars_repo_name": "lovarano/pytorch-flower-image-classifier", "max_stars_repo_head_hexsha": "502981caabe161df744198cda683af4029c95401", "max_stars_repo_licenses": ["MIT"]... |
from keras.models import model_from_json
import numpy as np
from sources.experiments.calc_charge_matrix import solvePDE
from sources.experiments.charges_generators import make_single_charge, make_n_fold_charge
from sources.pdesolver.finite_differences_method.geometry import Geometry
from sources.pdesolver.finite_diffe... | {"hexsha": "47fe192b40fee03bdfb6900c0702923dd548d252", "size": 6855, "ext": "py", "lang": "Python", "max_stars_repo_path": "sources/experiments/predict_solution.py", "max_stars_repo_name": "JohannOberleitner/pdesolver", "max_stars_repo_head_hexsha": "f01f83bde44e9f5aae424a4daa13219f986c5884", "max_stars_repo_licenses":... |
import fnmatch
import os
import numpy as np
import chess.pgn
def replace_tags(board):
board_san = board.split(" ")[0]
board_san = board_san.replace("2", "11")
board_san = board_san.replace("3", "111")
board_san = board_san.replace("4", "1111")
board_san = board_san.replace("5", "11111")
board_... | {"hexsha": "44d273bd4ce172a7a030c2d8057b359c16646b31", "size": 3024, "ext": "py", "lang": "Python", "max_stars_repo_path": "pgn-to-txt.py", "max_stars_repo_name": "Zeta36/Using-the-Google-Neural-Machine-Translation-for-chess-movement-inference-TensorFlow-", "max_stars_repo_head_hexsha": "c6db17e092fef2b134f2bff5c949937... |
module Models
export train!,
predict,
predict_response
# A model (m) must implement the following functions:
#
# train!(m, X[, y]) - train model with pattern X and a label y with it's associative
# predict(m, X) - returns the response of the model for pattern X
abstract type AbstractModel end
function train! en... | {"hexsha": "4cb30f592808d914c510132a1b84555cae1de159", "size": 811, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Models/Models.jl", "max_stars_repo_name": "RafaelFK/ramnet", "max_stars_repo_head_hexsha": "f8be800c86d12809df5e44ff0bb2bc9710ae1264", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
# -*- coding: utf-8 -*-
# Copyright 2020 The PsiZ Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | {"hexsha": "20a1d1f0caca30dc128895a420411e4c3875ed2e", "size": 2886, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/psiz/utils/matrix_comparison.py", "max_stars_repo_name": "greenfieldvision/psiz", "max_stars_repo_head_hexsha": "37068530a78e08792e827ee55cf55e627add115e", "max_stars_repo_licenses": ["Apache-... |
import sys
sys.path.append('../')
from models.savp_models import build_encoder as build_encoder_savp
from models.savp_models import encoder as encoder_savp
from models.vaegan_models import build_encoder as build_encoder_vaegan
from keras.models import load_model
from keras.optimizers import Adam
from keras.application... | {"hexsha": "52bdddd46833e03815865186b2b457a3cc3c9e07", "size": 33119, "ext": "py", "lang": "Python", "max_stars_repo_path": "training/localization.py", "max_stars_repo_name": "fjbriones/SelfSupervizedGazeControl", "max_stars_repo_head_hexsha": "d1365692079e886d4e63ae4906b263d03f94a031", "max_stars_repo_licenses": ["MIT... |
!------------------------------------------------------------------------------!
!> Numerical utilities related to PB3D operations.
!------------------------------------------------------------------------------!
module PB3D_utilities
#include <PB3D_macros.h>
use str_utilities
use messages
use num_vars, onl... | {"hexsha": "c76374f7fbf8d412b7d0317cc24a640e6e87081b", "size": 11078, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Modules/PB3D_utilities.f90", "max_stars_repo_name": "ToonWeyens/PB3D", "max_stars_repo_head_hexsha": "a7d1958c20c57387e6c9125f0d3df4b2104329e0", "max_stars_repo_licenses": ["Unlicense"], "max_s... |
import sys
import datetime
from datetime import timezone
import time
import math
import struct
import numpy as np
from PIL import Image
from gameduino_spidriver import GameduinoSPIDriver
import registers as gd3
import common
import gameduino2.prep
import gameduino2.convert
import tmxreader
TD = 86
class Renderer:
... | {"hexsha": "85dc6898d78a462fe9b009ff5c7bb1c9a9b66c46", "size": 5111, "ext": "py", "lang": "Python", "max_stars_repo_path": "loadable/grave.py", "max_stars_repo_name": "jamesbowman/py-eve", "max_stars_repo_head_hexsha": "dd2dc7cdd9c5e5ef82f84132ec9a05d989788112", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c... |
import dataclasses
from typing import Any, Callable, Optional, Sequence, TextIO
from fv3fit._shared.config import SliceConfig
from fv3fit.keras._models.shared.clip import ClipConfig
from fv3fit.keras._models.convolutional import ConvolutionalHyperparameters
from fv3fit.keras._models.shared.convolutional_network import ... | {"hexsha": "27cb9dfe11c0ec34369f48cc8b176e67ada2d937", "size": 14385, "ext": "py", "lang": "Python", "max_stars_repo_path": "external/fv3fit/tests/training/test_train.py", "max_stars_repo_name": "jacnugent/fv3net", "max_stars_repo_head_hexsha": "84958651bdd17784fdab98f87ad0d65414c03368", "max_stars_repo_licenses": ["MI... |
Jump to Timeline #Navigation Navigation
The Anderson Bank Building is built
University takes on its first female students, spring semester.
September 1st. The following hardware merchants of Yolo County announced that they will all switch to a 60 day basis for accounts charging 10% interest on all overdue accoun... | {"hexsha": "d8d9cb30c2a92145b8be18dea40a2b510f7fcf00", "size": 777, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/1914.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2012-2015 ###
### ###
### University... | {"hexsha": "d05d59ecfa4f1d28d9709e37a63f227c8c74e10a", "size": 959, "ext": "py", "lang": "Python", "max_stars_repo_path": "myPrint.py", "max_stars_repo_name": "likchuan/vtk_py", "max_stars_repo_head_hexsha": "3ab28fb951af107d1b162b4be6a80ea79dbb6dcc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_stars... |
[STATEMENT]
lemma if_intro:
"\<lbrakk> P \<Longrightarrow> A; \<not> P \<Longrightarrow> B \<rbrakk> \<Longrightarrow> if P then A else B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>P \<Longrightarrow> A; \<not> P \<Longrightarrow> B\<rbrakk> \<Longrightarrow> if P then A else B
[PROOF STEP]
by(auto) | {"llama_tokens": 116, "file": "JinjaThreads_Basic_Auxiliary", "length": 1} |
module TestDataFrames
using BangBang: append!!, push!!
using CategoricalArrays: CategoricalArray
using DataFrames: DataFrame
using Tables: Tables
using Test
@testset "push!!" begin
@testset "column: $(typeof(column)); row: $(typeof(row))" for (column, row) in [
([0], (a = 1,)),
([0], Dict(:a => 1)... | {"hexsha": "230afcfcb4558aaff084d9cb7ba103fd81c70001", "size": 2435, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_dataframes.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/BangBang.jl-198e06fe-97b7-11e9-32a5-e1d131e6ad66", "max_stars_repo_head_hexsha": "f5e54fd4cc24bf39959c74b5161d1feeac... |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2020 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | {"hexsha": "714639cc91624b5f1e1b0fdb762788c3c273c78d", "size": 19807, "ext": "py", "lang": "Python", "max_stars_repo_path": "improver_tests/generate_ancillaries/test_GenerateTopographicZoneWeights.py", "max_stars_repo_name": "pnijhara/improver", "max_stars_repo_head_hexsha": "5961a6fab9a79cd63a943eff07bf79d4e5f0ff03", ... |
import torch
import sympy
from .losses import Loss
from ..utils import get_dict_values
class MMD(Loss):
r"""
The Maximum Mean Discrepancy (MMD).
.. math::
D_{MMD^2}[p||q] = \mathbb{E}_{p(x), p(x')}[k(x, x')] + \mathbb{E}_{q(x), q(x')}[k(x, x')]
- 2\mathbb{E}_{p(x), q(x')}[k(x, x')]
... | {"hexsha": "7dd58f381d3da6f0804aa4cfa4476fed1b2c6911", "size": 4058, "ext": "py", "lang": "Python", "max_stars_repo_path": "pixyz/losses/mmd.py", "max_stars_repo_name": "MokkeMeguru/pixyz-test", "max_stars_repo_head_hexsha": "11bf4d011e8aa1e9a17d3bda8e9f81137bd519e5", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import uuid
import torch
import numpy as np
import KM_parser
tokens = KM_parser
import nltk
# from nltk import word_tokenize, sent_tokenize
uid = uuid.uuid4().hex[:6]
REVERSE_TOKEN_MAPPING = dict([(value, key) for key, value in tokens.BERT_TOKEN_MAPPING.items()])
def torch_load(load_path):
if KM_parser.use_cuda:... | {"hexsha": "98ea615a1c7fa83ed0fec15e9112f728bf09ef35", "size": 1639, "ext": "py", "lang": "Python", "max_stars_repo_path": "LAL-Parser/src_joint/absa_parser.py", "max_stars_repo_name": "minionssso/DualGCN-ABSA", "max_stars_repo_head_hexsha": "262f81002cea4b1215cef85c08aff1aafb35efab", "max_stars_repo_licenses": ["MIT"]... |
import numpy as np
import abc
class Activation(metaclass=abc.ABCMeta):
"""
Activation abstract class
"""
@abc.abstractmethod
def apply(self, x, is_training):
"""
Applying the activation function over `x`
"""
pass
@abc.abstractmethod
def backprop(self, dA_p... | {"hexsha": "f7fbda7490aea884559b813a79978c1c6ea5a0cb", "size": 2092, "ext": "py", "lang": "Python", "max_stars_repo_path": "CNN/utils/activations.py", "max_stars_repo_name": "shafzhr/SimpleConvNet", "max_stars_repo_head_hexsha": "89b669a59099743f0e115526cbc156aa22f453c3", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# %matplotlib inline
import torch
import time
from torch import nn, optim
from torch.utils.data import Dataset, DataLoader
import torchvision
from torchvision.datasets import ImageFolder
from torchvision import transforms
from torchvision import models
import os
import pickle
from PIL import Image
import numpy as np
... | {"hexsha": "cde246e41a70c18aaf70d38a81036d3e2ab04928", "size": 3356, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "lsfhuihuiff/face-recognition", "max_stars_repo_head_hexsha": "82e42da684797b379f68b4be4c2c4a918749a060", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3,... |
import numpy as np
from blmath.numerics import vx
from blmath.util.decorators import setter_property
class Polyline(object):
'''
Represent the geometry of a polygonal chain in 3-space. The
chain may be open or closed, and there are no constraints on the
geometry. For example, the chain may be simple or... | {"hexsha": "d5799f2a9701b25a9fe597a5060ecc356ef8b3e0", "size": 12753, "ext": "py", "lang": "Python", "max_stars_repo_path": "blmath/geometry/primitives/polyline.py", "max_stars_repo_name": "metabolize/blmath", "max_stars_repo_head_hexsha": "8ea8d7be60349a60ffeb08a3e34fca20ef9eb0da", "max_stars_repo_licenses": ["BSD-2-C... |
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 26 13:08:34 2017
@author: Adam
"""
from math import ceil, log, exp
import numpy as np
from numba import jit
@jit
def wf(n, l, nmax, step=0.005, rmin=0.65):
""" Use the Numerov method to find the wavefunction for state n*, l, where
n* = n - delta.
nma... | {"hexsha": "c755540ef9420e4b6811c3cf3842a0bd8a907215", "size": 3800, "ext": "py", "lang": "Python", "max_stars_repo_path": "hsfs/numerov.py", "max_stars_repo_name": "aa-morgan/helium-stark-FS", "max_stars_repo_head_hexsha": "7617c0761398dc60b69bb01c533cfa405c2a3d82", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st... |
import numpy
from numpy import ndenumerate as numpy_ndenumerate
from numpy import empty as numpy_empty
from numpy import expand_dims as numpy_expand_dims
from numpy import squeeze as numpy_squeeze
from copy import deepcopy
from .partition import Partition
from ..functions import _DEPRECATION_ERROR_METHOD
from ..d... | {"hexsha": "8a5eef5647c214d12e12cca1703d1ab77f0cbc71", "size": 23213, "ext": "py", "lang": "Python", "max_stars_repo_path": "cf/data/partitionmatrix.py", "max_stars_repo_name": "tsjackson-noaa/cf-python", "max_stars_repo_head_hexsha": "0c79ac59beb85417a1b7f398e07c4b41ac6ae0fe", "max_stars_repo_licenses": ["MIT"], "max_... |
# Despy: A discrete event simulation framework for Python
# Version 0.1
# Released under the MIT License (MIT)
# Copyright (c) 2015, Stacy Irwin
"""Despy model for a single channel queue, example 2.2.
From 'Discrete Event System Simulation, 4th ed.; Banks, Carson, Nelson,
and Nicole
"""
import despy.dp as dp
... | {"hexsha": "a5d4ceb251b877bef9768a24721285e983dd0c85", "size": 1596, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/Ex2_1_model.py", "max_stars_repo_name": "irwinsnet/DesPy", "max_stars_repo_head_hexsha": "dccf5ff08bcfde02bbef40fcd53806f4eec684ec", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2... |
#!/usr/bin/env python
# coding: utf-8
# # FormantNet Model Functions
# Functions used for defining, training, or using FormantNet models.
# In[ ]:
import tensorflow as tf
import numpy as np
import sys
import os
import glob
from FN_data import getdata
# ### Rescaling Model Output
# The **rescale_params()** funct... | {"hexsha": "3ae93f0c5c8fdceee0f875660daf7c622fd837cc", "size": 20412, "ext": "py", "lang": "Python", "max_stars_repo_path": "User/FN_model.py", "max_stars_repo_name": "NemoursResearch/FormantTracking", "max_stars_repo_head_hexsha": "7053e6add8672dc00aa70f6549d90ff935f96748", "max_stars_repo_licenses": ["MIT"], "max_sta... |
"""
This file implements print functionality for the CPU.
"""
from __future__ import print_function, absolute_import, division
from llvmlite.llvmpy.core import Type
from numba import types, typing, cgutils
from numba.targets.imputils import implement, Registry
registry = Registry()
register = registry.register
# FIX... | {"hexsha": "1deb964aac65c5a26dd85053e742a36f3b761a4a", "size": 2237, "ext": "py", "lang": "Python", "max_stars_repo_path": "numba/targets/printimpl.py", "max_stars_repo_name": "laserson/numba", "max_stars_repo_head_hexsha": "35546517b27764a9120f6dfcd82eba7f4dd858cb", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_st... |
# vim: expandtab:ts=4:sw=4
import numpy as np
import scipy.linalg
chi2inv95 = {
1: 3.8415,
2: 5.9915,
3: 7.8147,
4: 9.4877,
5: 11.070,
6: 12.592,
7: 14.067,
8: 15.507,
9: 16.919}
class KalmanFilter(object):
def __init__(self):
ndim, dt = 4, 1.
# Create Kalman... | {"hexsha": "47c3c1dcc918a7e8202c7ad1ece93d0eeb872a75", "size": 5052, "ext": "py", "lang": "Python", "max_stars_repo_path": "hailo_model_zoo/core/eval/tracking_evaluation_external/kalman_filter.py", "max_stars_repo_name": "nadaved1/hailo_model_zoo", "max_stars_repo_head_hexsha": "42b716f337dde4ec602022a34d6a07a1bbd45539... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 4 19:25:01 2018
@author: francesco
"""
import numpy as np
import time
from izi.izi import izi
import matplotlib.pyplot as plt
plt.ion()
timestart = time.process_time()
#%%
#THIS IS THE TEST data shown in Fig 1 of Blanc et al., 2015
#fluxes from H... | {"hexsha": "45824a5bdec3c2a5f337902a825a66704012539c", "size": 1563, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/test_izi.py", "max_stars_repo_name": "francbelf/python_izi", "max_stars_repo_head_hexsha": "b198a48ede79c2d06fcd40ef4d0b2883387aa6bd", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st... |
/*
*
* Copyright (c) 1998-2002
* John Maddock
*
* Use, modification and distribution are subject to 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)
*
*/
/*
* LOCATION: see http://www.boost.org for most recent versio... | {"hexsha": "1031778efbc0283f5315c2accc52253d96ff8a95", "size": 698, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "chrome/plugin/src/3rdParty/boost/libs/regex/src/instances.cpp", "max_stars_repo_name": "Faham/bric-n-brac", "max_stars_repo_head_hexsha": "c886e0855869a794700eb385171bbf5bfd595aed", "max_stars_repo_l... |
# importing libraries
import cv2
import numpy as np
import argparse
aq = argparse.ArgumentParser()
aq.add_argument('-i', '--input', required=True, help="input image path")
aq.add_argument('-o', '--output', help="path where you want to download the image")
args = vars(aq.parse_args())
# reading image
img = cv2.... | {"hexsha": "e75e12966829844f902bbfbe2ca1cdfdafa4e3f1", "size": 827, "ext": "py", "lang": "Python", "max_stars_repo_path": "Toonify/toonify-opencv.py", "max_stars_repo_name": "elishahyousaf/Awesome-Python-Scripts", "max_stars_repo_head_hexsha": "d516584517de2d94de60852f73d8f1831524fa19", "max_stars_repo_licenses": ["MIT... |
abstract type RandomSearch end
include("purerandomsearch.jl")
include("simulatedannealing.jl")
| {"hexsha": "1fef122bd856758419f0b048a625ca2d5b7c0f0a", "size": 95, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/optimize/randomsearch/randomsearch.jl", "max_stars_repo_name": "aaowens/NLSolvers.jl", "max_stars_repo_head_hexsha": "8be4390b85bf9b3631659b9d2966760bc722ed9c", "max_stars_repo_licenses": ["MIT"]... |
import numpy as np
class MeshElement(object):
def __init__(self, parentMesh, mesh_coordinate, representative_point):
if isinstance(mesh_coordinate, np.ndarray):
mesh_coordinate = tuple(mesh_coordinate)
self.mesh_coordinate = mesh_coordinate
self.x, self.y = representative_point
... | {"hexsha": "c52e48147bb92e2eb59a755d97c11b268bed4d89", "size": 3679, "ext": "py", "lang": "Python", "max_stars_repo_path": "pextant/mesh/abstractcomponents.py", "max_stars_repo_name": "nanastas-mit/pextant", "max_stars_repo_head_hexsha": "88ba0bbc4bf15f4366930ee94d4e2f27daac7dc7", "max_stars_repo_licenses": ["MIT"], "m... |
[STATEMENT]
lemma nonpos_Reals_of_real_iff [simp]: "of_real r \<in> \<real>\<^sub>\<le>\<^sub>0 \<longleftrightarrow> r \<le> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (of_real r \<in> \<real>\<^sub>\<le>\<^sub>0) = (r \<le> 0)
[PROOF STEP]
by (force simp add: nonpos_Reals_def) | {"llama_tokens": 125, "file": null, "length": 1} |
"""
This is a simple, sample application that shows how to use the renderer as a training
data source. It uses Keras. The training data is constructed from the example state batch.
In order to provide some variety to the training set we augment it: randomize the cube
rotation, perturb its position and perturb the robot... | {"hexsha": "e0c405385e8be94fbe8475335d5ae427dfd84738", "size": 7361, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/demo_keras.py", "max_stars_repo_name": "LaudateCorpus1/orrb", "max_stars_repo_head_hexsha": "1a92b3afb6cce4758b0338ac0e2cd84a22274d38", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co... |
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE Main
#include <boost/test/unit_test.hpp>
#include "global_fixture.h"
#include <memory>
#include <core/session/onnxruntime_cxx_api.h>
#include "onnx_extension.h"
GlobalConfig::GlobalConfig()
{
instance() = this;
reinforcement_learning::onnx::register_onnx_f... | {"hexsha": "31a677a4c0b9b6cde00ee7c55c6a031f81ec5897", "size": 763, "ext": "cc", "lang": "C++", "max_stars_repo_path": "unit_test/extensions/onnx/main.cc", "max_stars_repo_name": "cirvine-MSFT/reinforcement_learning", "max_stars_repo_head_hexsha": "c006b21d0a027b78d9285bf2597b503669bac82c", "max_stars_repo_licenses": [... |
# -*- coding: utf8 -*-
import numpy as np
import csv,sys
import matplotlib.pyplot as plt
import os
import matplotlib.patches as patches
from pylab import *
# run with 2 inputs, input file and output file
# for example: "python3.5 plot_picture.py case1 plotcase1.png"
text=open(sys.argv[1],'r')
row=csv.reader(text,del... | {"hexsha": "61c51e3c3b7ce33a636d5c0e3c2563aba39d486c", "size": 1433, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_test_case/plot_picture.py", "max_stars_repo_name": "amjltc295/2017Algorithm_Final_Project", "max_stars_repo_head_hexsha": "07f4b32e73b6f48a287564318c3fa05655ec69c2", "max_stars_repo_licenses"... |
import numpy as np
import numbers
def ppoints(n, a=None):
""" numpy analogue or `R`'s `ppoints` function
see details at https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/ppoints
https://docs.tibco.com/pub/enterprise-runtime-for-R/5.0.0/doc/html/Language_Reference/stats/ppoints.html
:param n: a... | {"hexsha": "00ce114df072c7fd973b25d8d109c046c1405a4b", "size": 518, "ext": "py", "lang": "Python", "max_stars_repo_path": "qqman/biostats.py", "max_stars_repo_name": "satchellhong/qqman", "max_stars_repo_head_hexsha": "465fd914ebde62e3f7cf4c54f41656fca90cabb9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ... |
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... | {"hexsha": "bf23f5efe4171342b1f7e65d6bee295a44c9a751", "size": 4931, "ext": "hxx", "lang": "C++", "max_stars_repo_path": "main/vbahelper/source/vbahelper/vbacommandbarhelper.hxx", "max_stars_repo_name": "Grosskopf/openoffice", "max_stars_repo_head_hexsha": "93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7", "max_stars_repo_lic... |
# coding: utf-8
# In[5]:
import gym
import numpy as np
import matplotlib.pyplot as plt
#get_ipython().run_line_magic('matplotlib', 'inline')
from keras import layers
from keras.layers import Input, Dense, Activation, ZeroPadding2D, BatchNormalization, Flatten, Conv2D
from keras.layers import AveragePooling2D, MaxP... | {"hexsha": "90a066a6bfdd187574fac18dd85190b06a2ce58c", "size": 14141, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/atari_keras.py", "max_stars_repo_name": "holmdk/ai_agent", "max_stars_repo_head_hexsha": "5034cbdd39c9c7d05fee4162d92f21ab0000cb6f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
import torch
import torch.nn as nn
import math
import numbers
from torch.nn import functional as F
import numpy as np
#class TVLoss(nn.Module):
# def __init__(self, tvloss_weight=0.1, p=1):
# super(TVLoss, self).__init__()
# self.tvloss_weight = tvloss_weight
# assert p in [1, 2]
# ... | {"hexsha": "0955f9e6217095e8f7a3de12956fcf4ceca66b28", "size": 718, "ext": "py", "lang": "Python", "max_stars_repo_path": "metrics/tv_loss.py", "max_stars_repo_name": "tbuikr/fastMRI", "max_stars_repo_head_hexsha": "4395380bbcddefe0bcfea76a2790e0d978009dea", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "ma... |
import torch
from torch.nn.parameter import Parameter
import numpy as np
import torch.nn as nn
from utils.cmplxBatchNorm import magnitude
from utils.polarTransforms import *
from saveNet import *
class ZReLU(nn.Module):
def __init__(self, polar=False):
super(ZReLU, self).__init__()
self.polar... | {"hexsha": "2979259de01e4a33f32a6d94b18e71c5ea59be7a", "size": 1013, "ext": "py", "lang": "Python", "max_stars_repo_path": "InLine_Implementation/Code/complexnet/zrelu.py", "max_stars_repo_name": "HMS-CardiacMR/MyoMapNet-Myocardial-Parametric-Mapping", "max_stars_repo_head_hexsha": "1e2dee8d6d1f97722eba91618462537faf9e... |
"""
This example shows the focusing of an ideal lens in 1:1 configuration
for different sources (see main program at the bottom)
The systems are:
'convergent spherical'
'divergent spherical with lens'
'plane with lens'
'Gaussian with lens'
'Hermite with lens'
... | {"hexsha": "7ae03ec65258ac0942e88f97299c999c6c93e268", "size": 16459, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/example_ideal_lens.py", "max_stars_repo_name": "PaNOSC-ViNYL/wofry", "max_stars_repo_head_hexsha": "779b5a738ee7738e959a58aafe01e7e49b03894a", "max_stars_repo_licenses": ["MIT"], "max_st... |
function F = filmStrip( I, overlap, delta, border )
% Used to display R stacks of T images as a "filmstrip".
%
% See examples below to see what is meant by "filmstrip".
%
% USAGE
% F = filmStrip( I, overlap, delta, border )
%
% INPUTS
% I - MxNxTxR or MxNx1xTxR or MxNx3xTxR array
% (of bw or co... | {"author": "zouchuhang", "repo": "LayoutNet", "sha": "95293bfb8ff787dd3b02c8a52a147a703024980f", "save_path": "github-repos/MATLAB/zouchuhang-LayoutNet", "path": "github-repos/MATLAB/zouchuhang-LayoutNet/LayoutNet-95293bfb8ff787dd3b02c8a52a147a703024980f/matlab/panoContext_code/Toolbox/SketchTokens-master/toolbox/image... |
#!/usr/bin/env python
import os
from numpy import array, linspace
from scipy.integrate import odeint
from sympy import symbols
import sympy.physics.mechanics as me
from ...system import System
from ...codegen.code import generate_ode_function
from ..shapes import Sphere
from ..visualization_frame import Visualizatio... | {"hexsha": "835c944bc529b0e52a851b8761218397b8ef828a", "size": 2047, "ext": "py", "lang": "Python", "max_stars_repo_path": "pydy/viz/tests/test_scene.py", "max_stars_repo_name": "jellysheep/pydy", "max_stars_repo_head_hexsha": "687480067a27bfd250c21a0318c049681b8c076b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max... |
// Copyright (c) 2006, Stephan Diederich
//
// This code may be used under either of the following two licences:
//
// 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... | {"hexsha": "e1fa5ad3582ae6406988971851b6c0c9cdb8bc76", "size": 20660, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "REDSI_1160929_1161573/boost_1_67_0/libs/graph/test/boykov_kolmogorov_max_flow_test.cpp", "max_stars_repo_name": "Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo", "max_stars_repo_head_hexsha": "eb0f7ef64... |
theory ThEdu imports Complex_Main
begin
theorem \<open>\<nexists>f :: nat \<Rightarrow> real. surj f\<close>
proof
assume \<open>\<exists>f :: nat \<Rightarrow> real. surj f\<close>
show False
proof -
from \<open>\<exists>f. surj f\<close> obtain f :: \<open>nat \<Rightarrow> real\<close> where \<open>surj f... | {"author": "logic-tools", "repo": "continuum", "sha": "48b227920958b92587f400a1c6194543fff478b8", "save_path": "github-repos/isabelle/logic-tools-continuum", "path": "github-repos/isabelle/logic-tools-continuum/continuum-48b227920958b92587f400a1c6194543fff478b8/ThEdu.thy"} |
//==================================================================================================
/**
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": "c19573b25b2c4a42ec661afe7491b945d2227668", "size": 2756, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "third_party/boost/simd/arch/common/simd/function/load/input_iterator.hpp", "max_stars_repo_name": "xmar/pythran", "max_stars_repo_head_hexsha": "dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592", "max_stars... |
#Retrain ResNet50 neural network model based on imagenet wheights
#python3 Model.py 4 50 "../mushroom-images/Mushrooms_with_classes/" "../mushroom-images/Mushrooms_with_classes/"
from keras.applications.resnet50 import ResNet50
#from keras.applications.mobilenet_v2 import MobileNetV2
from keras.preprocessing import i... | {"hexsha": "9621e0599858ffc4cafb4763ff4995d8e1d8598e", "size": 4898, "ext": "py", "lang": "Python", "max_stars_repo_path": "Model.py", "max_stars_repo_name": "Barbarius/mushroom-recognition", "max_stars_repo_head_hexsha": "d9ab8a988f2e0742461993af2a72d3d6d06c8bb0", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
#include <boost/graph/bandwidth.hpp>
| {"hexsha": "4ad7cec231ebbb47d17f3cf7321c8d3703e4a6ff", "size": 37, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_graph_bandwidth.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1.0"], "m... |
from subprocess import PIPE, Popen
import numpy as np
import scphylo as scp
from scphylo.external.gpps._nh2lgf import newick_to_edgelist
__author__ = "Simone Ciccolella"
__date__ = "11/30/21"
class Node:
def __init__(
self,
name,
parent,
id_node,
mutation_id,
los... | {"hexsha": "793e29da9618204c1dbed92738dec28aabcc5300", "size": 8862, "ext": "py", "lang": "Python", "max_stars_repo_path": "scphylo/external/gpps/_utils_hc.py", "max_stars_repo_name": "faridrashidi/scphylo-tools", "max_stars_repo_head_hexsha": "4574e2c015da58e59caa38e3b3e49b398c1379c1", "max_stars_repo_licenses": ["BSD... |
from functools import wraps
from pathlib import Path
from typing import Union
import numpy as np
from spikeextractors.extraction_tools import cast_start_end_frame
from tqdm import tqdm
try:
import h5py
HAVE_H5 = True
except ImportError:
HAVE_H5 = False
try:
import scipy.io as spio
HAVE_Scipy = ... | {"hexsha": "13ef02bdffeae428c725754239a795301532eb10", "size": 10080, "ext": "py", "lang": "Python", "max_stars_repo_path": "roiextractors/extraction_tools.py", "max_stars_repo_name": "cechava/roiextractors", "max_stars_repo_head_hexsha": "4a5348ce89f879eb6e068ab4640c50c42979e634", "max_stars_repo_licenses": ["BSD-3-Cl... |
"""
Module: utils.c2.C2_interpolation
Author: Meinard Müller
License: The MIT license, https://opensource.org/licenses/MIT
This file is part of the FMP Notebooks (https://www.audiolabs-erlangen.de/FMP)
"""
import numpy as np
from scipy.interpolate import interp1d
def compute_f_coef_linear(N, Fs, rho=1):
... | {"hexsha": "bb4e25404f6d35b1283d1df4bf98bfebb6f57e43", "size": 1941, "ext": "py", "lang": "Python", "max_stars_repo_path": "myller/utils/c2/c2_interpolation.py", "max_stars_repo_name": "aloaas/MIR-1", "max_stars_repo_head_hexsha": "899d7d1ff61b42a501a72a2ef00ea15244230357", "max_stars_repo_licenses": ["MIT"], "max_star... |
import json
from typing import TextIO
import numpy as np
import qiskit.providers.aer.noise as AerNoise
import qiskit.quantum_info.operators.channel as Channel
from zquantum.core.utils import (
SCHEMA_VERSION,
convert_array_to_dict,
convert_dict_to_array,
)
def save_qiskit_noise_model(noise_model: AerNois... | {"hexsha": "fc5958f96b6e04b4b8748064e87e900f71ad81be", "size": 2372, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/qeqiskit/utils.py", "max_stars_repo_name": "zapatacomputing/qe-qisk", "max_stars_repo_head_hexsha": "7b0cb0ee7dfc2e93c6b7e0198bf9703c08943cf6", "max_stars_repo_licenses": ["Apache-2.0"]... |
"""Implements the rich pattern concatenation generation process for random LTL formulas"""
# values that influence the probabilities during generation are flagged in the following code with # probability parameter
import random
from functools import reduce
import math
import numpy as np
import tgan_sr.utils.ltl_par... | {"hexsha": "44e66b2744b51622df9a12ac771ea70a5e8e11dc", "size": 9830, "ext": "py", "lang": "Python", "max_stars_repo_path": "impl/tgan_sr/data_generation/spec_patterns.py", "max_stars_repo_name": "reactive-systems/TGAN-SR", "max_stars_repo_head_hexsha": "43a5a93d0864ca77a693328cc07c8088be1f8f50", "max_stars_repo_license... |
[STATEMENT]
lemma finite_program[rule_format, intro]:
"\<forall>P cld. (\<exists>ctx ctx' fqn. find_cld_f P ctx fqn = Some (ctx', cld)) \<longrightarrow>
length (remove1 cld P) < length P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<forall>P cld. (\<exists>ctx ctx' fqn. find_cld_f P ctx fqn = Some (ctx'... | {"llama_tokens": 325, "file": "LightweightJava_Lightweight_Java_Equivalence", "length": 3} |
import numpy as np
import math
import numpy.linalg as lg
from sympy import Matrix
import random
def check_matrix(array):
"""
Function that checks whether the given matrix is invertible modulo 26.
:param array: numpy array
:return: bool
"""
if array.shape[0] == 1:
if math.gcd(array[0][0... | {"hexsha": "5135167661e10987b618a02a654863211b10a143", "size": 9017, "ext": "py", "lang": "Python", "max_stars_repo_path": "Hill cipher.py", "max_stars_repo_name": "Mythrillo/Information-Theory", "max_stars_repo_head_hexsha": "17aae28221f65a46923e63b0393fd03df07990b7", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import numpy as np
import pandas as pd
'''# base = sample_generator.instance_a_train_loader(4, 32)
rs_cols = ['user_id', 'movie_id', 'rating', 'unix_timestamp']
train_data = pd.read_csv('./ua.base', sep='\t', names=rs_cols, encoding='utf-8')
user_ids = train_data["user_id"].unique().tolist()
user2user_encoded =... | {"hexsha": "bb2d01d6e288f008faeefb192fa3f641f2d1468d", "size": 2091, "ext": "py", "lang": "Python", "max_stars_repo_path": "Data/1.py", "max_stars_repo_name": "2016312357/FL-shield", "max_stars_repo_head_hexsha": "4722427b4517659764bac0b8469d3ad6b7aea4c1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
import os
import re
import pandas as pd
import numpy as np
import warnings
from tcrsampler.sampler import TCRsampler
def _default_sampler(organism = 'human', chain = 'beta'):
assert organism in ['human', 'mouse']
assert chain in ['beta','alpha']
default_tcrsampler_generator = {
('human','beta'):
... | {"hexsha": "f05a1dbc8d0b6cbc5da3b7f80d0174983a842452", "size": 7212, "ext": "py", "lang": "Python", "max_stars_repo_path": "tcrdist/sample.py", "max_stars_repo_name": "agartland/tcrdist3", "max_stars_repo_head_hexsha": "34f8d50e7448b2bf7cf7cd9ab9a2d80759f47240", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 26... |
"""
Tests for dit.math.sampling.
"""
from __future__ import division
import pytest
import numpy as np
import dit.math.sampling as module
import dit.example_dists
from dit.exceptions import ditException
#sample(dist, size=None, rand=None, prng=None):
def test_sample1():
# Basic sample
d = dit.example_dists.... | {"hexsha": "0dd55a729fe1d087d73f7f05d3852a70e2c9c6ce", "size": 6268, "ext": "py", "lang": "Python", "max_stars_repo_path": "dit/math/tests/test_sampling.py", "max_stars_repo_name": "leoalfonso/dit", "max_stars_repo_head_hexsha": "e7d5f680b3f170091bb1e488303f4255eeb11ef4", "max_stars_repo_licenses": ["BSD-3-Clause"], "m... |
function LL = dirichlet_score_family(counts, prior)
% DIRICHLET_SCORE Compute the log marginal likelihood of a single family
% LL = dirichlet_score(counts, prior)
%
% counts(a, b, ..., z) is the number of times parent 1 = a, parent 2 = b, ..., child = z
% prior is an optional multidimensional array of the same shape as... | {"author": "bayesnet", "repo": "bnt", "sha": "bebba5f437b4e1e29169f0f3669df59fb5392e62", "save_path": "github-repos/MATLAB/bayesnet-bnt", "path": "github-repos/MATLAB/bayesnet-bnt/bnt-bebba5f437b4e1e29169f0f3669df59fb5392e62/BNT/learning/dirichlet_score_family.m"} |
""" Function computing the Power Spectrum unsing Welch's method for a listof TVB simulations in Example_Database.ipynb"""
import pandas as pd
from scipy.signal import welch
def Welch_PSD(varied_param, param_names, simulations, output):
index_PSD = pd.MultiIndex.from_tuples(varied_param, names=param_names)
PSD = p... | {"hexsha": "fe5cf2d8f7cd86e5e1a0c08d71b7bd4682991770", "size": 604, "ext": "py", "lang": "Python", "max_stars_repo_path": "fooofunit/welch_psd.py", "max_stars_repo_name": "GriffithsLab/fooof-unit", "max_stars_repo_head_hexsha": "8c0144010b27d68eb1bf044dc5d21db00d9a664b", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
/* Copyright 2013-present Barefoot Networks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | {"hexsha": "e838d9815c666d98b3c39224afc983a56633dd5e", "size": 53607, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "proto/tests/mock_switch.cpp", "max_stars_repo_name": "MaxPolovyi/PI", "max_stars_repo_head_hexsha": "ca70829e33017518cd7cc1a1f1d1d0904cd59344", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
#--------------------------------
# Name: Post_Allocation_v2.py
# Purpose: To finalize population file and bring population information back to the parcel file.
# New version to improve performance, must use python 3+
# Author: Kyle Shipley
# Created: 7/20/18
# Update: 8/23/18
# Copyright: (c) SACOG
# ArcGIS Ve... | {"hexsha": "8ddfa96ae84ce8fc25dcb9e6f6cf43270e6524e3", "size": 19780, "ext": "py", "lang": "Python", "max_stars_repo_path": "Land_Use_Prep/Post_Allocation_v2.py", "max_stars_repo_name": "SACOG/SACSIM19", "max_stars_repo_head_hexsha": "10810c55250e062caffcba4777eca60a155d66fb", "max_stars_repo_licenses": ["MIT"], "max_s... |
import os
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from scipy.io import wavfile
import torch
from pystoi import stoi
from pesq import pesq
import matlab
import matlab.engine
from Model_Classes.ci_unet_class import CI_Unet_64
from Data.dataset import extract_dataset
from Eval.rec... | {"hexsha": "ef3c55879b64d9d25eade6a136d309105a65a15b", "size": 9921, "ext": "py", "lang": "Python", "max_stars_repo_path": "main-eval.py", "max_stars_repo_name": "adamkrekorian/CI-UNet", "max_stars_repo_head_hexsha": "fab0f8806540f5d79911bd81ba54dff135f9814f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 12 14:30:12 2017
@author: danielgodinez
"""
import numpy as np
from astropy.stats import median_absolute_deviation
from scipy.integrate import quad
from scipy.cluster.hierarchy import fclusterdata
def shannon_entropy(mag, magerr):
"""Shannon entropy (Shannon et al. 1... | {"hexsha": "554908fdb4effc71ba1e244dfdd1b25d4413831e", "size": 25948, "ext": "py", "lang": "Python", "max_stars_repo_path": "ANTARES_object/features/stats_computation.py", "max_stars_repo_name": "AzNOAOTares/plasticc", "max_stars_repo_head_hexsha": "03f8995673b6f09156783d35c7d63f34729d0610", "max_stars_repo_licenses": ... |
from copy import deepcopy
from os.path import join
from typing import List, Optional, Union
import numpy as np
from fedot.core.composer.metrics import MSE
from fedot.core.data.data import InputData
from fedot.core.log import Log, default_log
from fedot.core.pipelines.pipeline import Pipeline
from fedot.core.utils imp... | {"hexsha": "c6c8a4ebc4d0725d18c1192aec0abdbad8825d91", "size": 6184, "ext": "py", "lang": "Python", "max_stars_repo_path": "fedot/sensitivity/operations_hp_sensitivity/multi_operations_sensitivity.py", "max_stars_repo_name": "rozlana-g/FEDOT", "max_stars_repo_head_hexsha": "a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c", "m... |
function solve()
x, n = [parse(Int, x) for x in split(readline())]
p = Set(parse(Int, x) for x in split(readline()))
d = 0
while true
for s in [-1, 1]
a = x + d*s
if a ∉ p
return a
end
end
d += 1
end
end
println(solve())
| {"hexsha": "c9d60048017e146443e45330c2a2cf3643c1a1a1", "size": 320, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "abc161-170/abc170/c.jl", "max_stars_repo_name": "aishikawa/atcoder-julia", "max_stars_repo_head_hexsha": "93339ea6dd954b0739b3895a5625f94433e33baf", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import pytest
from sklearn.exceptions import NotFittedError
from sklearn.model_selection import train_test_split
from test.test_utils import triplets_learners, ids_triplets_learners
from metric_learn.sklearn_shims import set_random_state
from sklearn import clone
import numpy as np
@pytest.mark.parametrize('with_pre... | {"hexsha": "0f0bf7dfdf2967a9473a67af4d86fda8dd8d2005", "size": 2786, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_triplets_classifiers.py", "max_stars_repo_name": "Spraitazz/metric-learn", "max_stars_repo_head_hexsha": "137880d9c6ce9a2b81a8af24c07d80e528f657cd", "max_stars_repo_licenses": ["MIT"], "... |
import networkx as nx
import nxviz as nv
import matplotlib.pyplot as plt
import numpy as np
from all_subj import index_to_text_file
from weighted_tracts import nodes_labels_yeo7,nodes_labels_aal3
from network_analysis.specific_functional_yeo7networks import network_id_list
atlas = 'yeo7'
network = 'sommot'
side = 'bot... | {"hexsha": "9bb170e079960394ff1d56116a829b0b9d014fe5", "size": 2296, "ext": "py", "lang": "Python", "max_stars_repo_path": "network_analysis/circular_graph.py", "max_stars_repo_name": "HilaGast/FT", "max_stars_repo_head_hexsha": "e5d3940ea585d98741bd9e42f47b9e49a4b6ee6f", "max_stars_repo_licenses": ["Apache-2.0"], "max... |
#pragma warning(push)
#pragma warning (disable : 4512) // '' : assignment operator could not be generated
#include "File/MemoryFileFactory.h"
#include "Logger/Log.h"
#include <boost/shared_ptr.hpp>
#include <sstream>
#include <string>
#pragma warning(pop)
namespace eg {
MemoryFileFactory::MemoryFileFactory(const s... | {"hexsha": "9bd4c2f81e1409af128f1098bcc1600ebdc974ee", "size": 2024, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "development/Common/Utility/source/MemoryFileFactory.cpp", "max_stars_repo_name": "eglowacki/zloty", "max_stars_repo_head_hexsha": "9c864ae0beb1ac64137a096795261768b7fc6710", "max_stars_repo_licenses... |
import queue
import numpy as np
import sounddevice as sd
from . import core
try:
import nidaqmx
import nidaqmx.stream_readers
import nidaqmx.stream_writers
except ImportError:
pass
class AudioDevice(core.Device):
"""Class for interacting with audio interfaces.
Implementation of the `~.core.D... | {"hexsha": "4af9767ef7e40e9975d04f6b9266221a345f2016", "size": 17580, "ext": "py", "lang": "Python", "max_stars_repo_path": "acoustics_hardware/devices.py", "max_stars_repo_name": "CarlAndersson/acoustics-hardware", "max_stars_repo_head_hexsha": "6fc3f151fd674e8cb0184d1eed648a4f236f4cd8", "max_stars_repo_licenses": ["M... |
[STATEMENT]
lemma \<pi>_\<theta>_bigo: "(\<lambda>x. \<pi> x - \<theta> x / ln x) \<in> O(\<lambda>x. x / ln x ^ 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<lambda>x. \<pi> x - \<theta> x / ln x) \<in> O(\<lambda>x. x / (ln x)\<^sup>2)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. ... | {"llama_tokens": 1987, "file": "Prime_Number_Theorem_Prime_Counting_Functions", "length": 18} |
# Copyright 2018 reinforce.io. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | {"hexsha": "b9d16d0e10f93e55b6d31b661b1b25e0a25386a0", "size": 6359, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorforce/contrib/openai_retro.py", "max_stars_repo_name": "zysilence/tensorforce", "max_stars_repo_head_hexsha": "7539e5dde66f3a93b881006f9b7f38c926ced21b", "max_stars_repo_licenses": ["Apache-... |
import logging, math, json, pickle, os
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.dates as mdates
from datetime import datetime
import matplotlib.patches as patches
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.gridspec as gridspec
import statistics
logger = logging.g... | {"hexsha": "07f7202ec776f1e636bd041561f8191c87b1197f", "size": 30713, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotter/agg_01_d041_lookahead_rsa_overhead.py", "max_stars_repo_name": "kit-tm/fdeval", "max_stars_repo_head_hexsha": "f6463c1c7549b8ac7fc39854e87c88d3cac858a0", "max_stars_repo_licenses": ["BSD-... |
#ifndef YASMIC_UTIL_LOAD_CRM_GRAPH
#define YASMIC_UTIL_LOAD_CRM_GRAPH
/*
* load_crm_graph.hpp
* David Gleich
* Stanford University
* 26 January 2006
*/
/**
* @file load_crm_graph.hpp
* Load a graph or matrix into a crm data structure.
*/
#include <cctype>
#include <iostream>
#include <fstream>
#include <itera... | {"hexsha": "c2cce989bac940f7d333d4dd9a642e3b4a51f971", "size": 7942, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "2A/Graphes/TPs/matlab_bgl/libmbgl/yasmic/util/load_crm_graph.hpp", "max_stars_repo_name": "anajmedd/ENSEEIHT-Projects", "max_stars_repo_head_hexsha": "e4077fe8882ae35be52e53f29a3a988a0d6f83f0", "max... |
# test_helpers.jl - Funciones de ayuda para probar los tipos de este paquete
"""
getrandomweights(T=Float32, G=218)
Función para generar pesos aleatorios
"""
function getrandomweights(T=Float32, G=218)
w = rand(T, G)
w = 100 * w / sum(w)
w
end
"""
getbasedates(vmat, startdate=Date(2000, 12))
Fun... | {"hexsha": "90c522f0720b347db19812340508d8cb1756a376", "size": 2842, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/helpers/test_helpers.jl", "max_stars_repo_name": "DIE-BG/CPIDataBase.jl", "max_stars_repo_head_hexsha": "bc541a4217d4ec30c0959238b38a494548798f39", "max_stars_repo_licenses": ["MIT"], "max_star... |
"""
Sensors provide a way for node to interact with its environment.
Sensors can also be used to satisfy algorithm prerequisites. For example
if algorithm depends on the assumption that all nodes know who their neighbors
are then nodes should be equipped with :class:`NeighborsSensor`.
Generally sensors should incorpo... | {"hexsha": "839acf4a41b9556d6d24ad1e299c7f51f008a887", "size": 5864, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymote2.1/pymote/sensor.py", "max_stars_repo_name": "chinmaydd/RouteSense", "max_stars_repo_head_hexsha": "a2088d0151be7c76d269d2c5466750423fbe9e02", "max_stars_repo_licenses": ["MIT"], "max_stars... |
"""
Rasterizing a mesh to a volumetric datastructure
"""
import os
import numpy as np
import compas.datastructures as ds
import pyvista as pv
import topogenesis as tg
__author__ = "Shervin Azadi, and Pirouz Nourian"
__copyright__ = "???"
__credits__ = ["Shervin Azadi", "Pirouz Nourian"]
__license__ = "???"
__version_... | {"hexsha": "d6740ca7ddf520c9c55dcc377621924b3b9b452c", "size": 2049, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/py/mesh_sampling_example.py", "max_stars_repo_name": "shervinazadi/topoGenesis", "max_stars_repo_head_hexsha": "5c73a5adf4afbda781540c6c08d24e2da62810b8", "max_stars_repo_licenses": ["MIT... |
C Copyright(C) 1999-2020 National Technology & Engineering Solutions
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
C NTESS, the U.S. Government retains certain rights in this software.
C
C See packages/seacas/LICENSE for details
C===================================================... | {"hexsha": "8a93e7ab7444322579105027f38d7b0bdcf728e5", "size": 5336, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/seacas/applications/explore/exp_prebn.f", "max_stars_repo_name": "jschueller/seacas", "max_stars_repo_head_hexsha": "14c34ae08b757cba43a3a03ec0f129c8a168a9d3", "max_stars_repo_licenses": ... |
import matplotlib.pyplot as plt
import numpy as np
from plotData import plotData
def visualizeBoundaryLinear(X, y, model):
"""plots a linear decision boundary
learned by the SVM and overlays the data on it
"""
w = model.coef_[0]
b = model.intercept_[0]
xp = np.linspace(min(X[:, 0]), max(X[:... | {"hexsha": "b6bd0892e3c91d0eda851f46cf588c2e06a39ee4", "size": 416, "ext": "py", "lang": "Python", "max_stars_repo_path": "ex6/visualizeBoundaryLinear.py", "max_stars_repo_name": "junwon1994/Coursera-ML", "max_stars_repo_head_hexsha": "91e96c3c14c058cd6d745a4fada1baf40d91458f", "max_stars_repo_licenses": ["MIT"], "max_... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
#######################################
# Script que permite la interpolación de los
# datos de precipitación de la NASA
# Author: Jorge Mauricio
# Email: jorge.ernesto.mauricio@gmail.com
# Date: 2018-02-01
# Version: 1.0
#######################################
"""
#!/... | {"hexsha": "1617e3de01f9f708734baabf2ad18a9ab852871c", "size": 6674, "ext": "py", "lang": "Python", "max_stars_repo_path": "algoritmos_procesamiento/algoritmo_interpolacion_datos_nasa_2014.py", "max_stars_repo_name": "jorgemauricio/proyectoGranizo", "max_stars_repo_head_hexsha": "380c8660da2775cc4ac594fcb02a1ee0f37e650... |
import os
import numpy as np
import joblib
import matplotlib.pyplot as plt
from matplotlib import animation
def save_path(samples, filename):
joblib.dump(samples, filename, compress=3)
def restore_latest_n_traj(dirname, n_path=10, max_steps=None):
assert os.path.isdir(dirname)
filenames = get_filenames... | {"hexsha": "c7ba3cf921aa7ef9c01974feffc5af12188591aa", "size": 2610, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf2rl/experiments/utils.py", "max_stars_repo_name": "MCZhi/Expert-Prior-RL", "max_stars_repo_head_hexsha": "1b2c40aa64fba66029fba50618e81eb1a8bbfde8", "max_stars_repo_licenses": ["MIT"], "max_star... |
"""
the demo which come from:
https://tensorflow.google.cn/xla/tutorials/autoclustering_xla
"""
import os
input("pid: " + str(os.getpid()) +", press enter after attached")
import numpy as np
import tensorflow as tf
#input("pid: " + str(os.getpid()) +", press enter after set breakpoints")
tf.keras.backend.clear_session... | {"hexsha": "f4f8442794fed85a9e127659a904f07b04bd7bd9", "size": 5447, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_test/cifar_xla.py", "max_stars_repo_name": "VeriSilicon/tensorflow", "max_stars_repo_head_hexsha": "18fe9ca47a88beeab02b6dccea759947c23418ce", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
Require Import SO_semantics Pred_in_SO.
Require Import Pred_is_pos_neg_SO nlist_sem_eg.
Require Import Correctness_ST.
Inductive Ip_extends (W : Set) (Ip Ip' : predicate -> W -> Prop)
(P : predicate) : Type :=
| Ip_ext : (forall (w : W), (Ip P w) -> (Ip' P w)) ->
(forall (Q : predicate), P <>... | {"author": "caitlindabrera", "repo": "Sahlqvist", "sha": "d0a755fb663a6cabc0babb691564cdf575fc8b36", "save_path": "github-repos/coq/caitlindabrera-Sahlqvist", "path": "github-repos/coq/caitlindabrera-Sahlqvist/Sahlqvist-d0a755fb663a6cabc0babb691564cdf575fc8b36/vsSahlq/coq_code/Monotonicity_SO.v"} |
import numpy as np
import pytransform3d.rotations as pr
from ._base import DMPBase, WeightParametersMixin
from ._canonical_system import canonical_system_alpha
from ._forcing_term import ForcingTerm
from ._dmp import dmp_imitate
from ._cartesian_dmp import dmp_quaternion_imitation
pps = [0, 1, 2, 7, 8, 9]
pvs = [0, 1... | {"hexsha": "bba70ef594b9d1881862ab45bb9551921f21e4d0", "size": 12158, "ext": "py", "lang": "Python", "max_stars_repo_path": "movement_primitives/dmp/_dual_cartesian_dmp.py", "max_stars_repo_name": "maotto/movement_primitives", "max_stars_repo_head_hexsha": "b79c78a5a0667cc24a26b7b6cc64a5762d8f4dd4", "max_stars_repo_lic... |
import mitsuba
import pytest
import enoki as ek
import numpy as np
def test01_ctx_construct(variant_scalar_rgb):
from mitsuba.render import BSDFContext, BSDFFlags, TransportMode
ctx = BSDFContext()
assert ctx.type_mask == +BSDFFlags.All
assert ctx.component == np.uint32(-1)
assert ctx.mode == Tran... | {"hexsha": "498b74f97cea68f54749f69dee93a43f393255bf", "size": 944, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/librender/tests/test_bsdf.py", "max_stars_repo_name": "tizian/layer-laboratory", "max_stars_repo_head_hexsha": "008cc94b76127e9eb74227fcd3d0145da8ddec30", "max_stars_repo_licenses": ["CNRI-Pyth... |
module AppliAR
import AppliSales: Order
import AppliGeneralLedger: JournalEntry
using Dates: Date, DateTime
using DataFrames
using CSV
using Serialization
export process, retrieve_unpaid_invoices, retrieve_paid_invoices, read_bank_statements, report
export UnpaidInvoice, PaidInvoice, meta, header, body, id
export P... | {"hexsha": "216e5a5738072dbf70f5a6d303edbca63a47be8b", "size": 1709, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/AppliAR.jl", "max_stars_repo_name": "rbontekoe/AppliAR.jl", "max_stars_repo_head_hexsha": "ba742a62233e9d5d21c7890640d0f8e1416383df", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
# Author: Brian Lynch
# Edited: 6/1/16
##############################################################################
import math
import numpy as np
import matplotlib.pyplot as plt
import plasma_parameters as plasma
# Plasma parameters
T_Ar = 0.025 * plasma.evjoule # eV
v_Ar = math.sqrt(T_Ar / pl... | {"hexsha": "dc30f9be0d22c80e28b37930f2388486f081acdd", "size": 2474, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/larmor_ion.py", "max_stars_repo_name": "brianrlynch85/PlasmaScaling", "max_stars_repo_head_hexsha": "a114d170193db8f482c1aecb1c06a5a078a50a1b", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import torch
import numpy as np
import os, sys
from torch.utils.data import Dataset
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
class baseline_model(nn.Module):
def __init__(self):
super(baseline_model, self).__init__()
class baseline_mlp(baseline_model):
def __... | {"hexsha": "298a7b499ced0103200702a1692bb317a0275691", "size": 605, "ext": "py", "lang": "Python", "max_stars_repo_path": "tasks/misc/speech_feature_extraction/baseline/model.py", "max_stars_repo_name": "APMplusplus/falkon", "max_stars_repo_head_hexsha": "95708ed0b28c4ec0f611446a478e9c3445eb3508", "max_stars_repo_licen... |
#include <iterator>
#include <map>
#include <string>
#include <functional>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <boost/asio.hpp>
#include <boost/fusion/adapted/std_pair.hpp>
#include <boost/optional.hpp>
#include <boost/spirit/include/qi.hpp>
#include <dirent.h>
#incl... | {"hexsha": "8835743810b6f829723b527b6d51023dc2360fb1", "size": 9927, "ext": "cc", "lang": "C++", "max_stars_repo_path": "cattleshed/src/jail.cc", "max_stars_repo_name": "tttamaki/wandbox", "max_stars_repo_head_hexsha": "1fc59ad72965ea241487a0c3bd07cc9a81db4dc3", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count"... |
# Package importation
import numpy as np
import sys
import os
from scipy import integrate
################################################################################
# INPUTS #
##################################################################... | {"hexsha": "21ca67b07bad8d43c1c497b7d2293b3b17496d09", "size": 5678, "ext": "py", "lang": "Python", "max_stars_repo_path": "cases/NSGA_joukowsky/areaCalc.py", "max_stars_repo_name": "jlobatop/GA-CFD-MO", "max_stars_repo_head_hexsha": "db03301a2ba3be48e89802a4c36b4834677493cd", "max_stars_repo_licenses": ["MIT"], "max_s... |
# Copyright 2020 DeepMind Technologies Limited.
#
# 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 ag... | {"hexsha": "ef5040f22b1808d6e92af3e500311dafc943e0d8", "size": 9749, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/moma/effectors/cartesian_4d_velocity_effector_test.py", "max_stars_repo_name": "wx-b/dm_robotics", "max_stars_repo_head_hexsha": "5d407622360ccf7f0b4b50bcee84589e2cfd0783", "max_stars_repo_lice... |
# --------------
# import packages
import warnings
warnings.filterwarnings("ignore")
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
# code starts here
df = pd.read_csv(pa... | {"hexsha": "01f66e6798ed2ac83effa6e90e79d560dea42928", "size": 3244, "ext": "py", "lang": "Python", "max_stars_repo_path": "code.py", "max_stars_repo_name": "anajikadam17/music-genre-classification", "max_stars_repo_head_hexsha": "28bd4b74b0cf9f6d02599c58167652d0ce3d386c", "max_stars_repo_licenses": ["MIT"], "max_stars... |
###################################################
### ###
### Evaluation of Robustness experiment using ###
### written by Bettina Mieth, Nico Görnitz, ###
### Marina Vidovic and Alex Gutteridge ###
### ###
###############################################... | {"hexsha": "50d019dc980b0419ed7b66d872003e5850d9b2ec", "size": 13592, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/plots/evaluate_hockley_robustness.py", "max_stars_repo_name": "nicococo/scRNA", "max_stars_repo_head_hexsha": "72999f7e8c813534b193d9c77a10068f9d489e05", "max_stars_repo_licenses": ["MIT"... |
module Rendering
export render, RenderSettings
using CuArrays, CUDAnative
using CthulhuVision.Random
using CthulhuVision.Math
using CthulhuVision.Light
using CthulhuVision.Image
using CthulhuVision.Camera
using CthulhuVision.Materials
using CthulhuVision.Triangles
using CthulhuVision.Scenes
using CthulhuVision.BVH
u... | {"hexsha": "3feed231414ef2404728cb297ac1d9c05a19c414", "size": 3246, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/rendering.jl", "max_stars_repo_name": "erikedin/CthulhuVision.jl", "max_stars_repo_head_hexsha": "95907c3a2a5bbd11f613ce762310a222f5ec32d2", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
#!/usr/bin/env python3
# Copyright (c) FIRST and other WPILib contributors.
# Open Source Software; you can modify and/or share it under the terms of
# the WPILib BSD license file in the root directory of this project.
import json
import time
import numpy as np
import sys
from cscore import CameraServer, VideoSource... | {"hexsha": "253c41f2d0813b2ddd4935a6148aeb18dadc0159", "size": 1496, "ext": "py", "lang": "Python", "max_stars_repo_path": "multiCameraServer.py", "max_stars_repo_name": "Bearbotics/Goredynn2021", "max_stars_repo_head_hexsha": "6b3a9231629344ae90c51eb7fcd69ee1c7664dbe", "max_stars_repo_licenses": ["BSD-3-Clause"], "max... |
lemma example1 (x y z : mynat) : x * y + z = x * y + z :=
begin
refl,
end
| {"author": "chanha-park", "repo": "naturalNumberGame", "sha": "4e0d7100ce4575e1add92feefa38b1250431b879", "save_path": "github-repos/lean/chanha-park-naturalNumberGame", "path": "github-repos/lean/chanha-park-naturalNumberGame/naturalNumberGame-4e0d7100ce4575e1add92feefa38b1250431b879/Tutorial/1.lean"} |
[STATEMENT]
lemma inorder_del:
"sorted(inorder t) \<Longrightarrow>
inorder(case del x t of None \<Rightarrow> t | Some t' \<Rightarrow> t') = del_list x (inorder t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Sorted_Less.sorted (inorder t) \<Longrightarrow> inorder (case del x t of None \<Rightarrow> t | So... | {"llama_tokens": 171, "file": "Root_Balanced_Tree_Root_Balanced_Tree", "length": 1} |
REP_OECD.EAR_ANNUAL_input_ANNUAL_EAR_XTLP_SEX_RT <- function (check = TRUE) {
#rm(list=setdiff(ls(), c("ilo")))
#require(ilo)
input_path <- paste0(getwd(),'/input/ANNUAL_EAR_XTLP_SEX_RT.csv')
X <- read_delim(input_path, delim = ',')
Source.Map <- read.csv('./input/maps/MapSource.csv', stringsAsF... | {"hexsha": "0ec9281236ea1fb2fd9bf1a7e43b062098e322bd", "size": 2776, "ext": "r", "lang": "R", "max_stars_repo_path": "inst/doc/do/REP_OECD.EAR_ANNUAL_functions.r", "max_stars_repo_name": "dbescond/iloData", "max_stars_repo_head_hexsha": "c4060433fd0b7025e82ca3b0a213bf00c62b2325", "max_stars_repo_licenses": ["MIT"], "ma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.