text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
#include <boost/bind.hpp>
#include <ros/ros.h>
#include <ros/console.h>
#include <geometry_msgs/PoseStamped.h>
#include <mavros_msgs/State.h>
#include <limits.h>
#include <unistd.h>
#include "mavros_autonomy.h"
ros::Publisher _local_pos_pub;
mavros_msgs::State _curr_state;
TimeoutMutex _pose_mutex;
void vislam_pose... | {"hexsha": "9558a01bcef479c79911a5d3ce5151e67372b05e", "size": 3789, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "ros/snapdragon_mavros_autonomy/mavros_autonomy.cpp", "max_stars_repo_name": "han-so1omon/snapdragon_simple_autonomy", "max_stars_repo_head_hexsha": "59ff88567ed5a2141f002bb8f4d6504d1435306d", "max_s... |
# Markdown Cell
## Sub heading
This is just a paragraph.
```python
# code cell
name = "Jonathan"
```
```python
```
# Tips and Tricks
A markdown cell lets you do many _useful things_.
```python
# Add this to python2 code to make life easier -- safe to use in python3 as well.
from __future__ import absolute_im... | {"hexsha": "9bce162074391ada62efafe31d97ead436669410", "size": 84280, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "notebooks/01-Tips-and-tricks.ipynb", "max_stars_repo_name": "ddeloss/jupyter-tips-and-tricks", "max_stars_repo_head_hexsha": "e47d5e5d07d2b9c9ba0b0f8101e8416ae7dd7cbf", "max_stars_re... |
"""
Copyright 2019 Christos Diou
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, software
dist... | {"hexsha": "deb401baab46016182e7bad71fa74ae4e8c0fcb3", "size": 56316, "ext": "py", "lang": "Python", "max_stars_repo_path": "eeris_nilm/algorithms/livehart.py", "max_stars_repo_name": "eeris-nilm/eeris_nilm", "max_stars_repo_head_hexsha": "57e17970234a22c355d6e037bcb58fc3a67dc1f1", "max_stars_repo_licenses": ["Apache-2... |
import autograd.numpy as np
import tensorflow as tf
import torch
from numpy import linalg as la
from numpy import random as rnd
import pymanopt
from examples._tools import ExampleRunner
from pymanopt.manifolds import Euclidean
from pymanopt.solvers import TrustRegions
SUPPORTED_BACKENDS = ("Autograd", "Callable", "P... | {"hexsha": "157f9e74c72747d08f56d2d78cc715c067d87026", "size": 2686, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/multiple_linear_regression.py", "max_stars_repo_name": "captain-pool/pymanopt", "max_stars_repo_head_hexsha": "df94ab9e03b5fa3041668defe995d93b8715a6d7", "max_stars_repo_licenses": ["BSD-... |
# -*- coding: utf-8 -*-
import unittest
import numpy as np
from glassure.gui.controller.glassure import GlassureController
from glassure.tests.gui_tests.utility import click_checkbox, set_widget_text, QtTest, prepare_file_loading
class ExtrapolationWidgetTest(QtTest):
def setUp(self):
self.controller =... | {"hexsha": "26fa3351620b38bd7a9e5a4e40e3c1ddd20ac040", "size": 3926, "ext": "py", "lang": "Python", "max_stars_repo_path": "glassure/tests/gui_tests/test_extrapolation.py", "max_stars_repo_name": "saransh13/Glassure", "max_stars_repo_head_hexsha": "4e686d26073f55f9c6ffe5dbeed90e20dd3afd01", "max_stars_repo_licenses": [... |
using Plots, Distributions, Random; pyplot()
Random.seed!(0)
n = 2000
data = rand(Normal(),n)
l, m = minimum(data), maximum(data)
delta = 0.3;
bins = [(x,x+delta) for x in l:delta:m-delta]
if last(bins)[2] < m
push!(bins,(last(bins)[2],m))
end
L = length(bins)
inBin(x,j) = first(bins[j]) <= x && x < last(bins[... | {"hexsha": "6eb8c00a12c4862a9e78ea3b0522f8eb79f8c601", "size": 783, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "4_chapter/manualHistogram.jl", "max_stars_repo_name": "Yoshinobu-Ishizaki/StatsWithJuliaBook", "max_stars_repo_head_hexsha": "4c704e96d87b91e680122a6b6fa2d2083c70ea88", "max_stars_repo_licenses": ["... |
from collections import Counter
import weakref
import numpy
import pytest
from grunnur.adapter_base import APIID
from grunnur import Queue, MultiQueue, Program, Array, Context, Buffer
import grunnur.dtypes as dtypes
from grunnur.virtual_alloc import extract_dependencies, TrivialManager, ZeroOffsetManager
def mock_f... | {"hexsha": "86a7f3231d57786cdc622f6eb79449b82b5f1f07", "size": 7513, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_virtual_alloc.py", "max_stars_repo_name": "fjarri/grunnur", "max_stars_repo_head_hexsha": "5eea8ec408e431f43a59780cdf8be2f441a9ebb5", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import cobra
from cobra.flux_analysis.loopless import add_loopless, loopless_solution
from cobra.flux_analysis import pfba
from cobra.flux_analysis import single_gene_deletion
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
import seaborn as sb
import numpy as np
import pandas as... | {"hexsha": "ab321c80dd07ff1366f75a8f5a6f5a68375738af", "size": 3892, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/manipulation.py", "max_stars_repo_name": "Spherotob/iJL208", "max_stars_repo_head_hexsha": "3a0e878963f46742cc9c973327dd24028f67a4d3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 28 20:34:58 2019
@author: kenneth
"""
import numpy as np
class Perceptron(object):
def __init__(self, activation = False, norm = None, lamda = None):
self.activation = activation
self.norm = norm
self.lamda = lamda
... | {"hexsha": "5d2efff62460823d2a9b0364f324be0bc2eb9a4e", "size": 19368, "ext": "py", "lang": "Python", "max_stars_repo_path": "CLASSIFICATION/PERCEPTRON/Perceptron.py", "max_stars_repo_name": "algostatml/SUPERVISED-ML", "max_stars_repo_head_hexsha": "d4a1fa2e5f89986a7d6f97af07ac0886f2807a89", "max_stars_repo_licenses": [... |
/-
Copyright (c) 2017 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
import Mathlib.PrePort
import Mathlib.Lean3Lib.init.default
import Mathlib.Lean3Lib.data.rbtree.find
import Mathlib.Lean3Lib.data.rbtree.insert
import Mathl... | {"author": "AurelienSaue", "repo": "Mathlib4_auto", "sha": "590df64109b08190abe22358fabc3eae000943f2", "save_path": "github-repos/lean/AurelienSaue-Mathlib4_auto", "path": "github-repos/lean/AurelienSaue-Mathlib4_auto/Mathlib4_auto-590df64109b08190abe22358fabc3eae000943f2/Mathlib/Lean3Lib/data/rbtree/main_auto.lean"} |
import os
import time
import copy
import logging
import numpy as np
import torch
from torch.autograd import Variable
from torch.nn import functional as F
import torchvision.utils as vutils
from torchvision.utils import save_image
from evaluate import *
def load_ckpt(checkpoint_fpath, model, optimizer):
checkpoin... | {"hexsha": "1f36bfce238167b5b9add13c7560537b097717a1", "size": 5253, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "XiaoyuanGuo/CVAD", "max_stars_repo_head_hexsha": "68f4ac9e3306d78f7620d4cf0bb43521394165be", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_stars... |
from PIL import ImageFile, Image
ImageFile.LOAD_TRUNCATED_IMAGES = True
Image.MAX_IMAGE_PIXELS = 800000000000
import torch
import torchvision
import torch.nn as nn
from libs.Loader import Dataset
import os
import pickle
import numpy as np
from sklearn.decomposition import PCA
from sklearn.manifold import TSNE
from li... | {"hexsha": "0cb119ce2228282c46eb3bf82c27cde3d24bfea4", "size": 4245, "ext": "py", "lang": "Python", "max_stars_repo_path": "FeatureExtractor.py", "max_stars_repo_name": "emedinac/UnderstandingSA", "max_stars_repo_head_hexsha": "a234631e99f2979396fef9e24f54865e63147ef4", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
#include <boost/test/unit_test.hpp>
#include "tags_common.hpp"
namespace get_contents_tests {
using namespace scorum;
using namespace scorum::tags;
struct tags_get_contents_fixture : public database_fixture::tags_fixture
{
tags_get_contents_fixture() = default;
struct content_query_wrapper : public api::co... | {"hexsha": "28914b5a1292191773bab5e13e4699c6a070553e", "size": 3539, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/chain_tests/plugins/tags/get_contents_tests.cpp", "max_stars_repo_name": "scorum/scorum", "max_stars_repo_head_hexsha": "1da00651f2fa14bcf8292da34e1cbee06250ae78", "max_stars_repo_licenses": [... |
"""
test_models_ps_21cm.py
Author: Jordan Mirocha
Affiliation: McGill University
Created on: Wed 16 Dec 2020 16:16:41 EST
Description:
"""
import pytest
import micro21cm
import numpy as np
@pytest.mark.parametrize('use_mcfit,', [(True,), (False,)])
def test(use_mcfit):
model = micro21cm.BubbleModel(use_mcfit=... | {"hexsha": "a72b72b48a2bbaa34478b1b008fa26c8cd4dd785", "size": 1124, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_models_ps_21cm.py", "max_stars_repo_name": "mirochaj/micro21cm", "max_stars_repo_head_hexsha": "d5a576718967a4c82fcb2f23b03696c2ead75de3", "max_stars_repo_licenses": ["MIT"], "max_stars... |
"""
Full implementation ready to go
"""
import numpy as np
from scipy import stats
from abc import ABCMeta, abstractmethod
import logging
from copy import deepcopy
__author__ = 'Michal Kononenko'
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
class AbstractDistribution(object):
__metaclass__ = ABC... | {"hexsha": "9d956e3df23b3021d86f1635e234c929c1e6019c", "size": 6042, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/smc.py", "max_stars_repo_name": "MichalKononenko/T1MachineLearning", "max_stars_repo_head_hexsha": "5eb91aa465825b067d3e5a7c69115fc9b7545e76", "max_stars_repo_licenses": ["MIT"], "max_stars... |
#! /Users/vonderlinden2/anaconda/bin/python
# -*- coding: utf-8 -*-
"""
Created on Feb 14 2017
@author: Jens von der Linden
Read processed measurements
and write to unstructured vtk files files.
The processed measurements are magnetic field, density, temperature
and Mach number.
Mach number is calculated directly fro... | {"hexsha": "d93589ff1354586fe25c061d8f04ad19914d5e8f", "size": 6991, "ext": "py", "lang": "Python", "max_stars_repo_path": "write_measurements_to_unstructured_grid.py", "max_stars_repo_name": "jensv/relative_canonical_helicity_tools", "max_stars_repo_head_hexsha": "51dc408b5d547c3122b77b0058eab32a3fca2d4c", "max_stars_... |
import numpy as np
def generate_samples(dynmod, measmod, initrv, times):
"""Samples true states and observations at pre-determined timesteps "times" for a
state space model.
Parameters
----------
dynmod : statespace.Transition
Transition model describing the prior dynamics.
measmod : ... | {"hexsha": "c4e311c98e312cdf6d057d4b231e5453cf60c8d4", "size": 1774, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/probnum/statespace/generate_samples.py", "max_stars_repo_name": "feimeng93/probnum", "max_stars_repo_head_hexsha": "4e46273c0157d26b9be2a7a415ccf69a3691ec22", "max_stars_repo_licenses": ["MIT"... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module tests some of the methods related to the ``ECSV``
reader/writer.
Requires `pyyaml <http://pyyaml.org/>`_ to be installed.
"""
import os
import copy
import sys
from io import StringIO
import pytest
import numpy as np
from ....table impor... | {"hexsha": "76e26652dc2dd4e6351fea028382fb97bb8cf064", "size": 14258, "ext": "py", "lang": "Python", "max_stars_repo_path": "astropy/io/ascii/tests/test_ecsv.py", "max_stars_repo_name": "Nicolopes/astropy", "max_stars_repo_head_hexsha": "8134d4f8d92f84d88f719a50bfd19c657402d1dc", "max_stars_repo_licenses": ["BSD-3-Clau... |
from .model import Model
import numpy as np
import time
def softmax(x):
r"""Compute softmax values for each sets of scores in $x$.
Args:
x (numpy.ndarray): Input vector to compute softmax
Returns:
numpy.ndarray: softmax(x)
"""
e_x = np.exp(x - np.max(x))
return e_x / e_x.sum(... | {"hexsha": "1c26703f2498874be5b6aa829a2761e6c44b98d8", "size": 1419, "ext": "py", "lang": "Python", "max_stars_repo_path": "raylink/algorithms/demo/policy.py", "max_stars_repo_name": "bytedance/raylink", "max_stars_repo_head_hexsha": "cd83a4377fede1ac645037df567010f2ddac5a69", "max_stars_repo_licenses": ["Apache-2.0"],... |
import re
import numpy as np
import pandas as pd
FREQUENCY_COLUMN_NAME = 'f[Hz]'
UTILIZATION_COLUMN_NAME = 'U_HB[-]'
H_GAP_COLUMN_NAME = 'h_gap[m]'
H_GAP_MM_COLUMN_NAME = 'h_gap[mm]'
HEIGHT_COLUMN_NAME = 'H[m]'
WIDTH_COLUMN_NAME = 'W[m]'
LENGTH_COLUMN_NAME = 'L[m]'
NR_COLUMN_NAME = 'N_reg[-]'
COOLING_CAPACITY_COLUMN_N... | {"hexsha": "aefbc9d8a421611aea52bf0ddff6c08700378dbd", "size": 2906, "ext": "py", "lang": "Python", "max_stars_repo_path": "regsim/process.py", "max_stars_repo_name": "GabrielNandi/Gabriel-Garcia-Nandi", "max_stars_repo_head_hexsha": "22a9c36d3186739cae6a50f1cc4cb55fdb7f34ee", "max_stars_repo_licenses": ["Apache-2.0"],... |
from vic import lib as vic_lib
import numpy as np
from scipy.interpolate import interp1d
def test_linear_interp():
n = 10
x = np.arange(n, dtype=np.float)
y = np.arange(n, dtype=np.float)
new_x = np.arange(n, dtype=np.float) + 0.5
f = interp1d(x, y, bounds_error=False, fill_value='extrapolate')
... | {"hexsha": "521f61d021c0675b5c1b3ccd17b0e503106b806a", "size": 585, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/vic_run/test_modify_Ksat.py", "max_stars_repo_name": "lingyunan0510/VIC", "max_stars_repo_head_hexsha": "dbc00a813b5df5a88027d1dc57a7805e9a464436", "max_stars_repo_licenses": ["MIT"], "m... |
using POMDPs
#using RLESUtils, Observers
import Base: getindex, setindex!, haskey
# State node in the search tree
type StateNode
n::Array{Int64,1} # number of visits at the node for each action
Q::Array{Reward,1} # estimated value for each action
action_map::Vector{Action} # for converting action idxs to action ... | {"hexsha": "513b0f5231dee1f0c15a4a1172ff01a8d4e0d1ea", "size": 7847, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "modules/GBMCTS/src/vanilla.jl", "max_stars_repo_name": "sisl/ExprSearch", "max_stars_repo_head_hexsha": "f143bbb84e1e11a70170085df81eb45ca5cecfa1", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
#------------------------------
# functions to simulate data
#------------------------------
function generate_xs(n, p, true_u0, sol_group1, sol_group2; t_start=1.5, t_end=10, maxntps = 10, dt=0.1, σ_var=0.1, σ_ind=0.5)
# (1) generate artifical group labels
groups = zeros(n)
groups[randperm(n)[1:Int(floo... | {"hexsha": "677f4283aa781101576292f36448fc054be2d35c", "size": 3923, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/simulation.jl", "max_stars_repo_name": "maren-ha/DeepDynamicModelingWithJust2TimePoints", "max_stars_repo_head_hexsha": "4a41b0e553fd64d4cd89fa3a5fe97479be06874c", "max_stars_repo_licenses": ["... |
```python
# This cell is for the Google Colaboratory
# https://stackoverflow.com/a/63519730
if 'google.colab' in str(get_ipython()):
# https://colab.research.google.com/notebooks/io.ipynb
import google.colab.drive as gcdrive
# may need to visit a link for the Google Colab authorization code
gcdrive.mount("/cont... | {"hexsha": "0a2bd69bfb61b9542fae8fb20fab19ad2ac6f5f9", "size": 18729, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "60_linear_algebra_2/100_Systems_of_Linear_Equations.ipynb", "max_stars_repo_name": "kangwonlee/2109eca-nmisp-template", "max_stars_repo_head_hexsha": "2e078870757fa06222df62d0ff8f4f4... |
#!/usr/bin/env python
"""
Gets segment information for a lot of data, saves it to a table, also makes
power spectra of each GTI (averaging segments in there). Uses GTIs from
make_GTIs.ipynb in the same directory.
How to call at the command line:
python quicklook_segments.py
or to see how long it runs, type:
time pyth... | {"hexsha": "236d1323ddffa300960c429be1961ef50f63e556", "size": 20272, "ext": "py", "lang": "Python", "max_stars_repo_path": "quicklook_segments.py", "max_stars_repo_name": "abigailStev/NICER_exploration", "max_stars_repo_head_hexsha": "1c93f68f7321ab6460dcb066bdf096a0e4fb778d", "max_stars_repo_licenses": ["MIT"], "max_... |
# Code adapted from https://github.com/sleepokay/mnist-flask-app
## imports required to make the system run
from flask import Flask, render_template, request
from scipy.misc import imsave , imread, imresize
import numpy as np
import keras.models
import re
import base64
# creates an instance of the flask app
app = Fl... | {"hexsha": "aa1f19d953a529d8e4b094d5411232bc4d479dc8", "size": 2138, "ext": "py", "lang": "Python", "max_stars_repo_path": "run.py", "max_stars_repo_name": "gtonra89/Python-digit-image-Recognizer-", "max_stars_repo_head_hexsha": "5dee3f1fc886403776755591213b7f1890b707c3", "max_stars_repo_licenses": ["Apache-2.0"], "max... |
from math import ceil
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import scipy.signal as signal
from matplotlib.ticker import MaxNLocator
from matplotlib.colors import CenteredNorm, Normalize
from matplotlib.patches import Patch
from sklearn.decomposition import PCA
from sklearn.prepro... | {"hexsha": "679dbf6aae73d95e7f49f672d62e4773f297f8ae", "size": 16097, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules/pca_clustering.py", "max_stars_repo_name": "solita/ivves-machine-spraak", "max_stars_repo_head_hexsha": "76af3244dc03d02344a771b9931f8c4dea13aa9d", "max_stars_repo_licenses": ["MIT"], "ma... |
[STATEMENT]
lemma obj_sumE: "\<lbrakk>\<forall>x. s = Inl x \<longrightarrow> P; \<forall>x. s = Inr x \<longrightarrow> P\<rbrakk> \<Longrightarrow> P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>\<forall>x. s = Inl x \<longrightarrow> P; \<forall>x. s = Inr x \<longrightarrow> P\<rbrakk> \<Longrightarr... | {"llama_tokens": 135, "file": null, "length": 1} |
C =====================================================================
C pgm: SH3TZ0 .. Get time zone adjustment and related hour number
C
C use: CALL SH3TZ0(KHAR,KHPOS,IHR,IMN,ISE)
C
C i/o: KHAR ...... last buffer char obtained - CHAR*1
C i/o: KHPOS ..... last char loc: 2=eol,1=err-eol,0=eof,neg=err - INT
C ... | {"hexsha": "6d1162cb32d08160167cc2ed3f531bca72ab7ed6", "size": 3693, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "extlibs/OHSHEF/sh3tz0.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars... |
# -*- coding: utf-8 -*-
# Soohwan Kim, Seyoung Bae, Cheolhwang Won.
# @ArXiv : KoSpeech: Open-Source Toolkit for End-to-End Korean Speech Recognition
# This source code is licensed under the Apache 2.0 License license found in the
# LICENSE file in the root directory of this source tree.
import torch
import torch.nn a... | {"hexsha": "0ee06441615e600c5276afdf8277555b9788371c", "size": 10415, "ext": "py", "lang": "Python", "max_stars_repo_path": "kospeech/model_builder.py", "max_stars_repo_name": "hasangchun/KoSpeech", "max_stars_repo_head_hexsha": "effca485e09028ea1dd733acec721c4031292ec3", "max_stars_repo_licenses": ["Apache-2.0"], "max... |
Road Rides
The Davis Bike Loop
The Davis Bike Loop is a winding path that takes you in a tour around large portions of Davis.
Historic Davis Bike Tour
View Davis architectural history from the seat of your bicycle. This tour passes by 26 of Davis landmarks, including Davis Community Church, the DresbachHuntBo... | {"hexsha": "39a2967712bc8905187f2de1447bf64103416b96", "size": 32030, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Bicycle_Rides.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
function y = isnan(X)
% True for Not-a-Number for symbolic arrays.
% ISNAN(X) returns an array that contains 1's where
% the elements of X are symbolic NaN's and 0's where they are not.
% For example, ISNAN(sym([pi NaN Inf -Inf])) is [0 1 0 0].
%
% For any X, exactly one of ISFINITE(X), ... | {"author": "ayonga", "repo": "frost-dev", "sha": "e5dc0624d834520872bfa588dd3eda5643da71de", "save_path": "github-repos/MATLAB/ayonga-frost-dev", "path": "github-repos/MATLAB/ayonga-frost-dev/frost-dev-e5dc0624d834520872bfa588dd3eda5643da71de/matlab/symbolic/@SymExpression/isnan.m"} |
import numpy as np
import pandas as pd
from src.models.env.env import Env
from src.models.manipulations.approximations import ApproximateData
from src.metrics.metrics import Metrics
import logging
logger = logging.getLogger(__name__)
class KMeansEnv(Env):
def __init__(self, solar, onshore, load, solar_df, onsh... | {"hexsha": "fad8b895ee195bb5534c76f97bdcb75fec2057de", "size": 2823, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/env/k_means_env.py", "max_stars_repo_name": "alexanderkell/temporal_granularity", "max_stars_repo_head_hexsha": "f29b294beb360d8d66c6fedf78bbf9ae84055b24", "max_stars_repo_licenses": ["... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import print_function, division
from astropy.tests.helper import pytest
from ..accumulate import accumulate
import numpy as np
import numpy.ma as ma
def test_invalid_types():
data = np.zeros((10,), dtype=[('wlen', float), ('flux', fl... | {"hexsha": "b5be488f4fea95bc2185adfba1ca225e4f9277f4", "size": 10471, "ext": "py", "lang": "Python", "max_stars_repo_path": "speclite/tests/test_accumulate.py", "max_stars_repo_name": "segasai/speclite", "max_stars_repo_head_hexsha": "48ac1bbb0b0b13b0f905cde57ba5e518d190584b", "max_stars_repo_licenses": ["BSD-3-Clause"... |
import numpy as np
import random
import tensorflow as tf
import itertools
from QNetwork import QNetwork
from Experiment_Env import Experiment_Env
from GlobalConstants import MAX_ACTIONS, N_ELEMENTS, MAX_STEPS, TUPLE_SIZE
from Utility_Func import *
from ExperienceBuffer import ExperienceBuffer
#Some training variables... | {"hexsha": "ad6308a6b2e64fa29087cdfb2aad5c47e474f992", "size": 8625, "ext": "py", "lang": "Python", "max_stars_repo_path": "Train.py", "max_stars_repo_name": "aditya02acharya/William-s-Visual-Search", "max_stars_repo_head_hexsha": "b2ad7c637a0d61e5023d71463b690edfadbd99c3", "max_stars_repo_licenses": ["MIT"], "max_star... |
Applied Physics is a majors major offered by the UC Davis Physics physics department. There are six concentrations to choose from: Computational Physics, Chemical Physics, Materials Science, Physical Oceanography, Atmospheric Physics, and Geophysics. Many of these may be similar to other UC Davis majors, but are ai... | {"hexsha": "e18f5e25ec2776c962ba847ac49a8fd908267ce4", "size": 533, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Applied_Physics.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import random
import os
import numpy as np
from typing import List, Tuple, Dict, Set, Optional
def print_grid(grid: list):
for row in grid:
row_str = " ".join([str(el) for el in row])
print(row_str)
def txt_to_grid(file_name, simple_layout=False, use_curr_workspace=False):
if use_curr_works... | {"hexsha": "b4218dec081e0b2622ee22a70d73be226664e965", "size": 4686, "ext": "py", "lang": "Python", "max_stars_repo_path": "Benchmark/Warehouse.py", "max_stars_repo_name": "SimonRosen173/MultiAgentPathFinding", "max_stars_repo_head_hexsha": "1bd247dad83e08356af95a96f48d0c41c9fce9d6", "max_stars_repo_licenses": ["MIT"],... |
"""Code for using projection-operator methods
.. module:: projector_method.py
:synopsis: Code for using projection-operator methods.
.. moduleauthor:: Jonathan Gross <jarthurgross@gmail.com>
"""
import numpy as np
import pysme.matrix_form as mf
class CompositeState(list):
'''Composite state class... | {"hexsha": "a28d3788e9e4643c1e12e86d0040e73904fd5438", "size": 4478, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pysme/projector_method.py", "max_stars_repo_name": "eliegenois/pysme", "max_stars_repo_head_hexsha": "29342b86c2616c9dd08872af1b1c53e66b2087db", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
'''
Created on Mar 25, 2018
@author: ywz
'''
import tensorflow as tf
from layers import conv2d, dense
class QNetwork:
def __init__(self, input_shape=(84, 84, 4), n_outputs=4,
network_type='cnn', scope='q_network'):
self.width = input_shape[0]
self.height = input_sh... | {"hexsha": "18f931544f6726933a339785920ffeedcf754b3f", "size": 5228, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter03/q_network.py", "max_stars_repo_name": "jvstinian/Python-Reinforcement-Learning-Projects", "max_stars_repo_head_hexsha": "6c97c68351fc4af426cb5c3583d75aebfabac8aa", "max_stars_repo_licens... |
import random
import torch
from torch.utils.data import Dataset
import torchvision.transforms as transforms
from torch.utils.data import sampler
import six
import sys
from PIL import Image
import numpy as np
class lmdbDataset(Dataset):
"""
New Dataloader Test Class
"""
def __init__(self, rootfile... | {"hexsha": "7d34755efb473aca952d12915fbeb129df4a63c0", "size": 3069, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/dataset.py", "max_stars_repo_name": "gstechgeek/MORAN_v2", "max_stars_repo_head_hexsha": "886ad1fc83958767ef7e6a7dd64e7ced24b277d7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2,... |
% Manual text by Jaap Vermeulen
\section{Built-in Module \sectcode{fcntl}}
\bimodindex{fcntl}
\indexii{\UNIX{}}{file control}
\indexii{\UNIX{}}{I/O control}
This module performs file control and I/O control on file descriptors.
It is an interface to the \dfn{fcntl()} and \dfn{ioctl()} \UNIX{} routines.
File descriptor... | {"hexsha": "3a51ce1c6e55d6b1285951b9b014416813cae46b", "size": 2990, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Doc/libfcntl.tex", "max_stars_repo_name": "AtjonTV/Python-1.4", "max_stars_repo_head_hexsha": "2a80562c5a163490f444181cb75ca1b3089759ec", "max_stars_repo_licenses": ["Unlicense", "TCL", "DOC", "AAL"... |
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 28 20:25:26 2020
@author: smrak@bu.edu
"""
from gpstec import gpstec
from datetime import datetime
import numpy as np
from typing import Union
from scipy.interpolate import griddata
from scipy.spatial import Delaunay
import matplotlib.pyplot as plt
def interpolateTEC(im... | {"hexsha": "6e4976e6812db8ca6f107d7310cc05e2c2b44290", "size": 3023, "ext": "py", "lang": "Python", "max_stars_repo_path": "tecinterp.py", "max_stars_repo_name": "aldebaran1/gpstec", "max_stars_repo_head_hexsha": "e8d0e38d89a1399741a63c0aa1f8e5ccf7ada9ba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
'''
Example script for constructing a 3-layer deep denoising autoencoder
using the Keras API.
'''
from absl import flags
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from pyrsostf.data import MNIST
flags.DEFINE_integer("autoencoder1_size", 500, help="Size of the autoencoder hidden layer")... | {"hexsha": "faecba6a479801eff20d7315c167f8b6237f333a", "size": 6678, "ext": "py", "lang": "Python", "max_stars_repo_path": "autoencoders/mnist_keras_stacked_denoising_autoencoder.py", "max_stars_repo_name": "Pyrsos/tensorflow_tutorials", "max_stars_repo_head_hexsha": "4da4a11fd5b9567cca5d2c93dfd8a6267b975c51", "max_sta... |
(*<*)
theory AOT_NaturalNumbers
imports AOT_PossibleWorlds AOT_ExtendedRelationComprehension
abbrevs one-to-one = \<open>\<^sub>1\<^sub>-\<^sub>1\<close>
and onto = \<open>\<^sub>o\<^sub>n\<^sub>t\<^sub>o\<close>
begin
(*>*)
section\<open>Natural Numbers\<close>
AOT_define CorrelatesOneToOne :: \<open>\<ta... | {"author": "ekpyron", "repo": "AOT", "sha": "3f66d0dc05933b01a70936ee63228dac8e3a118a", "save_path": "github-repos/isabelle/ekpyron-AOT", "path": "github-repos/isabelle/ekpyron-AOT/AOT-3f66d0dc05933b01a70936ee63228dac8e3a118a/AOT_NaturalNumbers.thy"} |
import matplotlib.pyplot as plt
import numpy as np;
import time
from pylab import *
from drawnow import drawnow, figure
from filterpy.discrete_bayes import normalize
from filterpy.discrete_bayes import predict
from filterpy.discrete_bayes import update
from scipy.ndimage import measurements
import filterpy.stats as st... | {"hexsha": "1252f46593037b801340ac703060a334091504e9", "size": 5339, "ext": "py", "lang": "Python", "max_stars_repo_path": "backend/prog-hist/backend/src/code/proghist/LDAModelExample.py", "max_stars_repo_name": "halilagin/d3studies", "max_stars_repo_head_hexsha": "fbcf50a845cd17bcb469a428afce9854b1b63971", "max_stars_... |
import tensorflow as tf
import numpy as np
import random
sess = tf.InteractiveSession()
bits = 32
def to_bits(num):
out = []
for _ in range(bits):
out.append(num & 1)
num >>= 1
return np.array(out[::-1])
def add_batch(elements):
x = []
y = []
for _ in range(elements):
... | {"hexsha": "e027e4018c3593dec4beb080e6d81e52a61ef8ec", "size": 1927, "ext": "py", "lang": "Python", "max_stars_repo_path": "add.py", "max_stars_repo_name": "isaacg1/learn-to-add", "max_stars_repo_head_hexsha": "2d9d6b582cd5e11b5a7662093df33117c7bb5285", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_... |
/*
* MIT License
*
* Copyright (c) 2020 Robert Grupp
*
* 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 rights
* to use, copy, mod... | {"hexsha": "c2765ff4cad2b2866b512c0a82c59df573654b8b", "size": 2703, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "lib/opencl/xregOpenCLSys.cpp", "max_stars_repo_name": "rg2/xreg", "max_stars_repo_head_hexsha": "c06440d7995f8a441420e311bb7b6524452843d3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 30.... |
# Copyright 2022 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | {"hexsha": "4028e39957653c8b85bce1c38765f08435bf6271", "size": 7426, "ext": "py", "lang": "Python", "max_stars_repo_path": "cirq-core/cirq/transformers/analytical_decompositions/two_qubit_to_fsim_test.py", "max_stars_repo_name": "Nexuscompute/Cirq", "max_stars_repo_head_hexsha": "640ef8f82d6a56ec95361388ce7976e096cca90... |
import numpy as np
import gin
@gin.configurable
def softmax(x):
"""Compute softmax values for each sets of scores in x."""
e_x = np.exp(x - np.max(x, axis=-2, keepdims=True))
return e_x / e_x.sum(axis=-2, keepdims=True)
def mean(x):
return sum(x) / len(x)
| {"hexsha": "6063966eb08466a9a4175f9c7666a152bdf1e3b7", "size": 276, "ext": "py", "lang": "Python", "max_stars_repo_path": "bpnet/functions.py", "max_stars_repo_name": "mlweilert/bpnet", "max_stars_repo_head_hexsha": "dcc9e8d805f9de774ae9dcc62c20504915be614f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 93, "... |
from __future__ import print_function, division
import numpy as np
import sys
def system_vars_gpaw(self, calc, label="gpaw", chdir='.', **kvargs):
"""
Initialise system variables with gpaw inputs:
Input parameters:
-----------------
calc: GPAW object
kvargs: optional arguments, need a list of... | {"hexsha": "1bf6ae178f598509603c2469d3672da12adcb382", "size": 2081, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyscf/nao/m_system_vars_gpaw.py", "max_stars_repo_name": "KMCzajkowski/pyscf", "max_stars_repo_head_hexsha": "e8af41d910cc0d3963655120c0b689590ad978e7", "max_stars_repo_licenses": ["BSD-2-Clause"]... |
#! /usr/bin/env python
"""
Python wrapper to execute c++ tSNE implementation
for more information on tSNE, go to :
http://ticc.uvt.nl/~lvdrmaaten/Laurens_van_der_Maaten/t-SNE.html
HOW TO USE
Just call the method calc_tsne(dataMatrix)
Created by Philippe Hamel
hamelphi@iro.umontreal.ca
October 24th 2008
"""
from stru... | {"hexsha": "f7c19a7a4742e6430e4437f4f326ccc80e0d2127", "size": 3253, "ext": "py", "lang": "Python", "max_stars_repo_path": "tsne.py", "max_stars_repo_name": "victorfica/utils", "max_stars_repo_head_hexsha": "b61935a860838a0e70afde7c9ecf2c68f51a2c4b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_stars_... |
#mandatory imports
import logging as log
import os
#script imports
import json
import pickle
import nltk
import numpy as np
from nltk.corpus import stopwords
from nltk.stem import LancasterStemmer
from nltk.stem import RSLPStemmer
from core.connection.mongodb import MongoDB
from dotenv import load_dotenv
... | {"hexsha": "7fe630620426197c5b640bf0180ce38f0800465a", "size": 3187, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/generate_pickle.py", "max_stars_repo_name": "davidsonmizael/lisa-talks", "max_stars_repo_head_hexsha": "beb76b34a5def7f30bcbc0357a1d47ad0879a502", "max_stars_repo_licenses": ["MIT"], "max_... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: CAM-resnet.py
import cv2
import sys
import argparse
import numpy as np
import os
import multiprocessing
import tensorflow as tf
from tensorpack import *
from tensorpack.dataflow import dataset
from tensorpack.tfutils import optimizer, gradproc
from tensorpack.tfu... | {"hexsha": "0a60d726ebb5a8b99fea711e83527adbe7aaaa2e", "size": 5641, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/Saliency/CAM-resnet.py", "max_stars_repo_name": "thuzhf/tensorpack", "max_stars_repo_head_hexsha": "83ef7d05d0a16f82d86323c4e2f9b5d14870affa", "max_stars_repo_licenses": ["Apache-2.0"], "... |
import numpy as np
import pandas as pd
def normalize_address(raw_address):
for c in ["'", ",", "°", "•", "`", '"', "‘", "-"]:
raw_address = raw_address.replace(c, "")
raw_address = raw_address.lower()
if "<" in raw_address:
prefix = raw_address[:raw_address.index("<")].strip()
if ... | {"hexsha": "3dd9ebc4586aa371670b1b60e1588b62b948d13f", "size": 3572, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/outputCsvs.py", "max_stars_repo_name": "benhamner/hillary-clinton-emails", "max_stars_repo_head_hexsha": "b7bbe29f3fb9e6c300824308b3139afa433e96a5", "max_stars_repo_licenses": ["MIT"], "ma... |
import numpy as np
from mushroom_rl.algorithms.policy_search.policy_gradient import PolicyGradient
class eNAC(PolicyGradient):
"""
Episodic Natural Actor Critic algorithm.
"A Survey on Policy Search for Robotics", Deisenroth M. P., Neumann G.,
Peters J. 2013.
"""
def __init__(self, mdp_info,... | {"hexsha": "7cd844a3ee1baef176a24e241be7b7891a1a7b1a", "size": 1722, "ext": "py", "lang": "Python", "max_stars_repo_path": "mushroom_rl/algorithms/policy_search/policy_gradient/enac.py", "max_stars_repo_name": "jacarvalho/mushroom-rl", "max_stars_repo_head_hexsha": "ba0a62454d771a1d3cacbec1ea9d71535f476b31", "max_stars... |
# Copyright 2020 Huawei Technologies Co., Ltd
#
# 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 a... | {"hexsha": "7f8b21fd146b78286cb8c2f2a31c2f69e42ed5b7", "size": 5179, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_zoo/research/audio/fcn-4/eval.py", "max_stars_repo_name": "GuoSuiming/mindspore", "max_stars_repo_head_hexsha": "48afc4cfa53d970c0b20eedfb46e039db2a133d5", "max_stars_repo_licenses": ["Apach... |
! --------------------------- BEGIN TRIM_C -----------------------
subroutine trim_c(cstr, nchar)
! strips leading and trailing blanks from cstr, returning the
! result in cstr, which is now nchar characters in length
! Strip off tabs also.
! Here is a sample use in constructing a column header, filled... | {"hexsha": "d3a59dbd3209cb047c15691bb27e795f4eecc797", "size": 2386, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "bbp/src/usgs/fas/trim_c.for", "max_stars_repo_name": "ZhangHCFJEA/bbp", "max_stars_repo_head_hexsha": "33bd999cf8d719c49f9a904872c62f02eb5850d1", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma... |
begin
# Test matrix multiplication
N = 20
A = rand(N,N)
B = rand(N,N)
C = rand(N,N)
D = rand(N,N)
a = rand(N)
b = rand(N)
c = rand(N)
d = rand(N)
@et res_et = (A+B+C+D)*(C+D)
res_native = (A+B+C+D)*(C+D)
@test res_et == res_native
#t... | {"hexsha": "46a8948663d5099f7b094a240d3f2bf92519cb20", "size": 470, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/special_cases_tests.jl", "max_stars_repo_name": "tjolsen/ExpressionTemplates.jl", "max_stars_repo_head_hexsha": "79ccfd308a00562ca3b8870228d6772835928412", "max_stars_repo_licenses": ["MIT"], "... |
>Note: Controversy text has been moved to WalMart/Controversy<
WalMart (often called Wally World) is that other big box store that isnt considered as nice as Target and is http://www.cockeyed.com/citizen/target/walmart_versus_target01.html slightly cheaper for nonedible products. However, in March of 2011, several ... | {"hexsha": "b36c60ea151a6b01758c996ef1e8f517fdf46f3b", "size": 15106, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Wal-Mart.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
[STATEMENT]
lemma pi_dom[icf_proper_iteratorI]:
assumes P: "proper_it it it'"
shows "proper_it (map_iterator_dom it)
(map_iterator_dom it')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. proper_it (map_iterator_dom it) (map_iterator_dom it')
[PROOF STEP]
unfolding proper_it_def
[PROOF STATE]
proof (p... | {"llama_tokens": 307, "file": "Collections_Iterator_Proper_Iterator", "length": 3} |
from .rankingEvaluator import RankingEvaluator
from .positiveNegativeEvaluator import PositiveNegativeEvaluator
import numpy as np
class RecallAtK(RankingEvaluator,PositiveNegativeEvaluator):
def __init__(self, ratingMatrix, rankingMatrix, positiveThreshold, k):
# Run both parent's constructor
Ran... | {"hexsha": "2058d6b8e2b8b4a269a53ecc56d347544735fdaa", "size": 2468, "ext": "py", "lang": "Python", "max_stars_repo_path": "sclrecommender/evaluator/recallAtK.py", "max_stars_repo_name": "wezteoh/Bandit_Recommendation", "max_stars_repo_head_hexsha": "a326e4d1d082e1a2113fe739bc343fb45b0b8a4a", "max_stars_repo_licenses":... |
[STATEMENT]
lemma perp_cong:
assumes "A \<noteq> B" and
"A \<noteq> P" and
"A B Perp P A" and
"A B Perp R B" and
"Cong A P B R" and
"Col A B X" and
"Bet P X R"
shows "Cong A R P B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Cong A R P B
[PROOF STEP]
using Perp_cases assms(1) assms(2) ... | {"llama_tokens": 493, "file": "IsaGeoCoq_Tarski_Neutral", "length": 2} |
import re
from weakref import WeakKeyDictionary
import numpy as np
metric_dict = {
'Exa': 1e18,
'Peta': 1e15,
'Tera': 1e12,
'Giga': 1e9,
'Mega': 1e6,
'Kilo': 1e3,
'Hecto': 1e2,
'Deca': 1e1,
None: 1,
'Deci': 1e-1,
'Centi': 1e-2,
'Milli': 1e-3,
'Micro': 1e-6,
'N... | {"hexsha": "dead7e7bf7da62c627cfacd485e5616fef5cea65", "size": 17883, "ext": "py", "lang": "Python", "max_stars_repo_path": "ai4water/et/converter.py", "max_stars_repo_name": "moonson619/AI4Water-1", "max_stars_repo_head_hexsha": "285d46824502b6a787e42570b72432f4f6acf45e", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import pathlib
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from prophet import Prophet
from sklearn import metrics
def get_prophet_data(stock_path):
with open(stock_path, 'r', encoding='utf-8') as f:
df = pd.read_json(f.read(), orient='records')
print(df)
# rename
... | {"hexsha": "ed5a43debce813c9af88c2feddc3a0e8739095e7", "size": 5469, "ext": "py", "lang": "Python", "max_stars_repo_path": "poc/fb_prophet_tr_ts_val.py", "max_stars_repo_name": "zmcx16/stock-forecast", "max_stars_repo_head_hexsha": "c4ffcbc4215e135776fbb4d5ff384b069b7e631c", "max_stars_repo_licenses": ["MIT"], "max_sta... |
module LinearInterp
"""
linear interpolation without the hot air
I really need this function, and honestly I don't care that much
about its speed or flexibility. I just need sth that works for my
BL formulation
"""
struct Interp1D
x::Vector{Real}
y::Vector{Real}
m::Vector{Real}
b::Vector{Real}
end
"""
... | {"hexsha": "e6cfc9dbdd01d4f823421164b8c379d28c7c8d8f", "size": 1361, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "tools/tools.jl", "max_stars_repo_name": "simulkade/peteng", "max_stars_repo_head_hexsha": "470baf49db56e8e4055fac5a14d7272cf333a6a6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_... |
import geopyspark
import numpy
from pyspark.sql import SparkSession
from pyrasterframes import *
from pyrasterframes.rasterfunctions import *
conf = geopyspark.geopyspark_conf(appName="POC")
session = SparkSession.builder.config(conf=conf).getOrCreate().withRasterFrames()
uri = "file:/data/workspace/geotrellis-lan... | {"hexsha": "85e3fe9083f83564615379c58c65fe74e96494b6", "size": 844, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/read-geotrellis.py", "max_stars_repo_name": "jdenisgiguere/rasterframes-proof-of-concept", "max_stars_repo_head_hexsha": "78a604290d3213dad81aff1c4aa2b6be6990f3fb", "max_stars_repo_licenses"... |
#!/usr/bin/env python3
import cv2
import numpy as np
from matplotlib import pyplot as plt
# Load image
pieces = cv2.imread('./pieces.jpeg')
pieces_bw = cv2.cvtColor(pieces, cv2.COLOR_BGR2GRAY)
# Show image
fig, axs = plt.subplots(1, 1)
pieces_ax = axs[0]
pieces_ax.imshow(pieces_bw, 'gray')
plt.show()
| {"hexsha": "dc2ef3df905bed68c1c7fc9e6e056dfb2b3944af", "size": 307, "ext": "py", "lang": "Python", "max_stars_repo_path": "solve.py", "max_stars_repo_name": "Noah-Huppert/puzzle-solver", "max_stars_repo_head_hexsha": "3a5a04c7ecf978ddaeba50259148970eb5a5c121", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
# Copyright (c) 2016-present, Facebook, 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 law or agreed... | {"hexsha": "3d774c4ec35108b172bde5fb3a0d94beb09ec13f", "size": 3235, "ext": "py", "lang": "Python", "max_stars_repo_path": "caffe2/python/operator_test/sparse_to_dense_mask_op_test.py", "max_stars_repo_name": "BroadDong/Caffe_2", "max_stars_repo_head_hexsha": "c1a636983dc84a960d6abe150c996234d6f6278c", "max_stars_repo_... |
/* Copyright 2003-2008 Joaquin M Lopez Munoz.
* 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)
*
* See http://www.boost.org/libs/multi_index for library home page.
*/
#ifndef BOOST_MULTI_INDEX_DETAIL_I... | {"hexsha": "43e6052b7b3d4feeb4a5e3a220a6ff89028b98f4", "size": 617, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "third-party/boost/include/boost/multi_index/detail/invariant_assert.hpp", "max_stars_repo_name": "multiprecision/samegame", "max_stars_repo_head_hexsha": "bde520a737bce10a3c3538a3a2d98e7f7f00d1c2", "... |
#include "SchematLib/Algorithms/MapSimplificationPipeline.h"
#include <boost/property_tree/ptree.hpp>
#include "SchematLib/MapSimplification/BboxFaceMerge.h"
#include "SchematLib/MapSimplification/RemoveFaceTendrils.h"
namespace SchematLib::Algorithms {
Models::NT MapSimplificationPipeline::maxBboxAxis() const
... | {"hexsha": "b49e50fff3852065c388269fcb9fdcf9db70a734", "size": 19306, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Algorithms/MapSimplificationPipeline.cpp", "max_stars_repo_name": "tue-alga/CoordinatedSchematization", "max_stars_repo_head_hexsha": "9ffc292c946498d56f7938a86628adba534a9085", "max_stars_repo... |
'''Auxilary tools for working with rate models.'''
import pandas as pd
from scipy.stats import norm
def compute_margin(stderr, confint=0.95):
'''Compute margin of error from standard error
Paramters
---------
stderr: The standard error of a prediction
confint: The desired confidence interval
... | {"hexsha": "706c6d7113c1eab7d57f1f3464659d9b148b95e0", "size": 907, "ext": "py", "lang": "Python", "max_stars_repo_path": "mortgage_forecasts/utils.py", "max_stars_repo_name": "JiaxiangBU/mortgage_forecasts", "max_stars_repo_head_hexsha": "6c83692361e17d9f89fffc937ca35e88865eba4d", "max_stars_repo_licenses": ["MIT"], "... |
'''
# This is an 80 character line #
We want to simulate soft spheres pushing through a stationary HCP wall
'''
# Initial imports
import sys
import os
sys.path.append('/Users/kolbt/Desktop/compiled/hoomd-blue/build')
import hoomd
from hoomd import md
from hoomd import d... | {"hexsha": "1595d58fcfff9d4ee418dff65bd04f2a8f444669", "size": 4335, "ext": "py", "lang": "Python", "max_stars_repo_path": "initialization_routines/hcpWall.py", "max_stars_repo_name": "kolbt/whingdingdilly", "max_stars_repo_head_hexsha": "4c17b594ebc583750fe7565d6414f08678ea7882", "max_stars_repo_licenses": ["BSD-3-Cla... |
! Ensure arguments -D and -U work as expected.
! REQUIRES: new-flang-driver
!--------------------------
! FLANG DRIVER (flang-new)
!--------------------------
! RUN: %flang-new -E %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED
! RUN: %flang-new -E -DX=A %s 2>&1 | FileCheck %s --check-prefix=DEFINED
! RUN: %flang-n... | {"hexsha": "694f7676eeb115456a22aace8c8fd40273dc2f4b", "size": 1200, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "flang/test/Flang-Driver/macro-def-undef.f90", "max_stars_repo_name": "Machiry/checkedc-clang", "max_stars_repo_head_hexsha": "ab9360d8be0a737cb5e09051f3a0051adc4b3e47", "max_stars_repo_licenses"... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Author: _defined
@Time: 2019/8/12 19:02
@Description:
"""
import os
import time
import tensorflow as tf
import numpy as np
from tensorflow.python.ops.ctc_ops import (ctc_loss, ctc_beam_search_decoder)
from settings import (config, DataMode)
from DataLoader import D... | {"hexsha": "fdb5d16c9fc93fa58d0b65aa8f25f1522922e3b8", "size": 7679, "ext": "py", "lang": "Python", "max_stars_repo_path": "training.py", "max_stars_repo_name": "Times125/break_captcha", "max_stars_repo_head_hexsha": "9ab16d1d7737630786039d07caec308bdb8a26d9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 13, ... |
"""Implementation of multiple proximal operators for TV-L1, Graph-Net, etc.
"""
# Author: DOHMATOB Elvis Dopgima,
# VAROQUAUX Gael,
# GRAMFORT Alexandre,
# License: simplified BSD
from math import sqrt
import numpy as np
from .objective_functions import _tv_l1_from_gradient, _div_id, _gradient_id
de... | {"hexsha": "8586d6b4bf1fe3a8a21cb062edcb12f026553cef", "size": 10820, "ext": "py", "lang": "Python", "max_stars_repo_path": "nilearn/decoding/proximal_operators.py", "max_stars_repo_name": "ctw/nilearn", "max_stars_repo_head_hexsha": "932eee9c69cd8fbf40ee6af5cee77f8f93b25da3", "max_stars_repo_licenses": ["BSD-2-Clause"... |
from scipy.integrate import ode
import matplotlib.pyplot as plt
from models import *
from parameters import *
rho_x = 0
rho_y = 0
params = delta_L, gamma_L_X, n_y, theta_L_X, eta_x, omega_x, m_x, delta_x, delta_y, rho_x, rho_y, r_X
# simulation parameters
t_end = 1500
N = t_end
# Y = L_A, a, b, N_A
Y0 = np.zeros... | {"hexsha": "a8d84317de2cf9ac1ebc41a7f2714249064ce201", "size": 948, "ext": "py", "lang": "Python", "max_stars_repo_path": "cblb/run_ode_model_not.py", "max_stars_repo_name": "jbyte23/CBLBs", "max_stars_repo_head_hexsha": "e51ff7e03a7027aa9abaa17bdf290741318b9614", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import numpy as np
import pandas as pd
games = pd.read_csv(
"vgsales.csv",
sep=',',
header=0
)
print(games.shape)
games.head()
| {"hexsha": "499bd9b8d2ba4043aedb5bf1614bc2b1099cd302", "size": 140, "ext": "py", "lang": "Python", "max_stars_repo_path": "aulas/aula6NumpyPandas/testandoPandas.py", "max_stars_repo_name": "mferoc/Uniprojecao-Topicos-Avancados-em-Analise-e-Desenvolvimento-de-Sistemas", "max_stars_repo_head_hexsha": "41aec22c7e9f402bd60... |
[STATEMENT]
lemma subelem_set_of_high:
"\<And> p. \<lbrakk> x \<in> set_of t; x \<noteq> Null; high x \<noteq> Null; Dag p low high t \<rbrakk>
\<Longrightarrow> (high x) \<in> set_of t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<And>p. \<lbrakk>x \<in> set_of t; x \<noteq> Null; high x \<noteq> Null; Dag p... | {"llama_tokens": 10851, "file": "BDD_General", "length": 84} |
'''
========================================================================================================
Copyright 2017, by the California Institute of Technology. ALL RIGHTS RESERVED.
United States Government Sponsorship acknowledged. Any commercial use must be negotiated with the Office of Technology
Transfer at ... | {"hexsha": "5d4d543857a1b5521574da1adb78fcf28e6ee8ab", "size": 24972, "ext": "py", "lang": "Python", "max_stars_repo_path": "Henosis/server.py", "max_stars_repo_name": "vc1492a/henosis", "max_stars_repo_head_hexsha": "78acc320742775e6a5e5a0460646b9148944f85c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count... |
import numpy as np
import matplotlib.pyplot as plt
from scipy.io import wavfile
rate_h,hstrain=wavfile.read(r'H1_Strain.wav','rb')
rate_l,lstrain=wavfile.read(r'L1_Strain.wav',"rb")
reftime,ref_H1=np.genfromtxt('wf_template.txt').transpose()
htime_interval=1/rate_h
ltime_interval=1/rate_l
htime_len=hstrain.shape[0]/... | {"hexsha": "5c53bd09f099478702fcda68a95f1dba367bae86", "size": 1054, "ext": "py", "lang": "Python", "max_stars_repo_path": "mooc_ex/DataVisual/\u5f15\u529b\u6ce2/stress wave.py", "max_stars_repo_name": "ds17/reptiles", "max_stars_repo_head_hexsha": "99418624ae4b7548bf4dc1ea834e8c75a47a0557", "max_stars_repo_licenses": ... |
# weekly_temp_elec_use_correlation.py
import matplotlib.pyplot as plt
import pandas as pd
import sqlalchemy
import numpy as np
import matplotlib.units as munits
import matplotlib.dates as mdates
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
from matplotlib.offset... | {"hexsha": "82a6a5e0cd80600fbb854c6e49470e685ee2e90e", "size": 1595, "ext": "py", "lang": "Python", "max_stars_repo_path": "weekly_temp_elec_use_correlation_2020_after.py", "max_stars_repo_name": "johnzastrow/weather", "max_stars_repo_head_hexsha": "e0fc6e973d8fcb1d8cd31bf95c3e232fbfee8b03", "max_stars_repo_licenses": ... |
Subroutine isco7(i, j, allok, tm, t1, t2)
Implicit Double Precision (A-H, O-Z)
Parameter (maxptn=400001)
Common /para2/xmp, xmu, alpha, rscut2, cutof2
Common /para5/iconfg, iordsc
Common /prec2/gx(maxptn), gy(maxptn), gz(maxptn), ft(maxptn), px(maxptn), py(maxptn), pz(maxptn), e(maxptn), xmass(maxptn), ityp(m... | {"hexsha": "8168086249d6ba3b0ed87a58fb40a30c4aae473f", "size": 2980, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/isco7.f90", "max_stars_repo_name": "xiaohaijin/AMPT", "max_stars_repo_head_hexsha": "90c7a1ab4dc04a092e64af759d53e22f6fea5b02", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max... |
import numpy as np
from mpi4py import MPI
from .mpi_vector import DofDistributionMPI, KronVectorMPI
def test_dot():
N = 9
M = 13
comm = MPI.COMM_WORLD
dofs_distr = DofDistributionMPI(comm, N, M)
vec = KronVectorMPI(dofs_distr)
x_glob = None
if dofs_distr.rank == 0:
x_glob = np.ara... | {"hexsha": "e6d228df5560640255c940f3fb2a6ac5734d0913", "size": 1379, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/mpi_vector_test.py", "max_stars_repo_name": "Jannertje/spacetime-fullgrid-parallel", "max_stars_repo_head_hexsha": "76e3580daa469beb3af6662cf5c4a94da260e126", "max_stars_repo_licenses": ["M... |
from slfpy import SLF
import numpy as np
def test_slfpy():
slf1=SLF() # Create new Selafin file with a square grid
slf1.writeSLF("demo1.slf") # Write new Selafin file
slf2=SLF("demo1.slf") # Write new Selafin file
np.testing.assert_almost_equal(slf1.MESHX,slf2.MESHX,decimal=6)
n... | {"hexsha": "550bf9778b1a06528c86dbbb76bf0de44b5af076", "size": 725, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_slfpy.py", "max_stars_repo_name": "Julien-Cousineau/slf-py", "max_stars_repo_head_hexsha": "a89dde9ee68982630a5cf7b79a5934b37cbae655", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import scipy as sp
from sys import path
path.insert(0, '/home/thais/dev/alveus/') # needed to import alveus
path.insert(0, '/home/oem/Documents/Code/2018/Projects/ESN/alveus/') # needed to import alveus
from alveus.data.generators.MackeyGlassGe... | {"hexsha": "1604dea731162b55b62ba264296f0ddf1a249c69", "size": 9634, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/todo/testDHEsnStacked.py", "max_stars_repo_name": "levifussell/Alveus", "max_stars_repo_head_hexsha": "730f06d39dfd3f761cfecc4cc2834d79a11f3845", "max_stars_repo_licenses": ["MIT"], "m... |
% lsdescent;
% check descent condition
%
cont=max(alist==0); % condition for continue
if cont,
[fbest,i]=min(flist);
if alist(i)<0,
if alist(i)>=4*alist(i+1), cont=0; end;
elseif alist(i)>0,
if alist(i)<4*alist(i-1), cont=0; end;
else
if i==1, fbest=flist(2);
elseif i==s, fbest=flist(... | {"author": "lacerbi", "repo": "optimviz", "sha": "2cc41c19ffeaaa9a23239f53d80691cf3599357d", "save_path": "github-repos/MATLAB/lacerbi-optimviz", "path": "github-repos/MATLAB/lacerbi-optimviz/optimviz-2cc41c19ffeaaa9a23239f53d80691cf3599357d/utils/mcs/gls/lsdescent.m"} |
import torch
from torch import nn
from torch import optim
from torch.utils.data import DataLoader
from torchvision import datasets, transforms
import numpy as np
from sklearn import metrics
class Net(nn.Module):
def __init__(self):
nn.Module.__init__(self)
self.features = nn.Sequential(nn.Conv2d(3... | {"hexsha": "45cfd4e4b5f82b86ec0bbba321fc45c143d3e40e", "size": 4702, "ext": "py", "lang": "Python", "max_stars_repo_path": "temp/temp_1.py", "max_stars_repo_name": "bosskwei/naive_ssd", "max_stars_repo_head_hexsha": "cdaf61f75674be2a9d7babbb8953d1b367505512", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
\subsubsection*{PowerStack}
\paragraph{Overview}
Power remains a critical constraint for Exascale. As we design supercomputers at larger scales, power becomes an expensive and limited resource. Inefficient management of power leads to added operational costs as well as low scientific throughput. Although hardware adv... | {"hexsha": "b98c70a3bb105418280fd4cba3b3c91898c9db0e", "size": 8463, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "projects/2.3.1-PMR/2.3.1.19-Argo-PowerSteering/powerstack.tex", "max_stars_repo_name": "Franckcappello/ECP-ST-CAR-PUBLIC", "max_stars_repo_head_hexsha": "9563f23b335c3cda19a239a1a8e9086bb682a2c3", "... |
import os
import os.path
import numpy as np
import matplotlib.pyplot as plt
from itertools import product
def get_log_seed(log_path):
with open(log_path) as f:
log = f.readlines()
seed = 0
for line in log:
if line.startswith('seed'):
seed = int(line.split('=')[-1])
... | {"hexsha": "cb3b43ff66cde52d9e6ff0cce295aaaf082b22f2", "size": 8785, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/process_offline_learning.py", "max_stars_repo_name": "architsakhadeo/Offline-Hyperparameter-Tuning-for-RL", "max_stars_repo_head_hexsha": "94b8f205b12f0cc59ae8e19b2e6099f34be929d6", "max_s... |
function lintlintpragma(ex::Expr, ctx::LintContext)
if length(ex.args) >= 2 && isa(ex.args[2], AbstractString)
m = match(r"^((Print)|(Info)|(Warn)|(Error)) ((type)|(me)|(version)) +(.+)"s, ex.args[2])
if m != nothing
action = m.captures[1]
infotype = m.captures[6]
... | {"hexsha": "9341b6454339e3c36bc9bb5fb4b34e44bec796a6", "size": 1995, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/pragma.jl", "max_stars_repo_name": "adamslc/Lint.jl", "max_stars_repo_head_hexsha": "40fa35123944844de8350094f6e733097a0252b3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max... |
import logging
import numpy as np
import torch
from pybnn import DNGO
from torch.distributions import Normal
import nni.parameter_expressions as parameter_expressions
from nni import ClassArgsValidator
from nni.common.hpo_utils import validate_search_space
from nni.tuner import Tuner
_logger = logging.getLogger(__na... | {"hexsha": "58ceecfcd932b3f4e94631537eebb36b696bdbad", "size": 4797, "ext": "py", "lang": "Python", "max_stars_repo_path": "nni/algorithms/hpo/dngo_tuner.py", "max_stars_repo_name": "Markus92/nni", "max_stars_repo_head_hexsha": "2641c7343f4b411b002bea4f5648941268194ed7", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
character(kind=1,len=4),dimension(10) :: c,d
end
| {"hexsha": "7a012a32b7b9f061149c22cdf4c992da480a63ed", "size": 49, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/identity/input/char.f90", "max_stars_repo_name": "xevolver/xevxml", "max_stars_repo_head_hexsha": "267e35898203d53b495c70956ac58396fd5e3edc", "max_stars_repo_licenses": ["Unlicense"], "max_st... |
import numpy as np
from insider.indicators.base import BaseMixin
from insider.constants import MOVING_COLS, HIGH_LOW_COLS, ADTM_COLS
class PriceIndicatorMixin(BaseMixin):
"""Moving Indicator Mixin (移动指标混合)"""
def ma(self, n=5):
"""Moving Average Calculation (移动平均值计算)"""
df_ma = self._df.loc[... | {"hexsha": "e9fd0e247e4645423356ccbd3a59f8ae805687c8", "size": 10680, "ext": "py", "lang": "Python", "max_stars_repo_path": "insider/indicators/price.py", "max_stars_repo_name": "charlesdong1991/StockInsider", "max_stars_repo_head_hexsha": "e58f62feab889c27ebd42573980a1ab5fdd03ff6", "max_stars_repo_licenses": ["MIT"], ... |
"""
Copyright (c) 2018-2019 Intel Corporation
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 i... | {"hexsha": "241afb0d08318f381cb256d167e44f5bc9743629", "size": 4376, "ext": "py", "lang": "Python", "max_stars_repo_path": "model-optimizer/extensions/middle/SliceConverter.py", "max_stars_repo_name": "zhoub/dldt", "max_stars_repo_head_hexsha": "e42c01cf6e1d3aefa55e2c5df91f1054daddc575", "max_stars_repo_licenses": ["Ap... |
\section{Introduction}
\label{sec:orgdbcc5cd}
Stories are designed to elicit emotional responses and to engage their
audience. Modern adventure games, particularly those defined by game
developer Telltale Games, have evolved the traditional puzzle-focused
story game closer to the types of experiences found in televisio... | {"hexsha": "bfae75e5570fe460f61accfd4fb68db33f6a7841", "size": 45990, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "papers/chi2018/paper.tex", "max_stars_repo_name": "lucidbard/TWAU-Data", "max_stars_repo_head_hexsha": "a476e776a8ccad67a709df2c61c315c948a92d10", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
*DECK DREORT
SUBROUTINE DREORT (NCOMP, Y, YP, YHP, NIV, W, S, P, IP, STOWA,
+ IFLAG)
C***BEGIN PROLOGUE DREORT
C***SUBSIDIARY
C***PURPOSE Subsidiary to DBVSUP
C***LIBRARY SLATEC
C***TYPE DOUBLE PRECISION (REORT-S, DREORT-D)
C***AUTHOR Watts, H. A., (SNLA)
C***DESCRIPTION
C
C *********************... | {"hexsha": "0fd28f7cfbe0c861870a9226ea2a8ef64022efd0", "size": 8468, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "slatec/src/dreort.f", "max_stars_repo_name": "andremirt/v_cond", "max_stars_repo_head_hexsha": "6b5c364d7cd4243686488b2bd4318be3927e07ea", "max_stars_repo_licenses": ["Unlicense"], "max_stars_coun... |
"""
This `OCIM2` module is used to load the OCIM2 matrices and grid for use in AIBECS.
!!! tip
To load the default OCIM2 matrix and grid, do
```
julia> grd, T = OCIM2.load()
```
But you can also load the other matrices by specifying which version you want, e.g.,
```
julia> grd, T = OCIM2.lo... | {"hexsha": "d7654174d3afa7c98feed1a2e6706119b12fa0aa", "size": 5808, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/OCIM2.jl", "max_stars_repo_name": "seamanticscience/AIBECS.jl", "max_stars_repo_head_hexsha": "ff64544aa637a7324f513be697897384efbec4e6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
## Project: Simple4All - June 2013 - www.simple4all.org
## Contact: Oliver Watts - owatts@staffmail.ed.ac.uk
## Contact: Antti Suni - Antti.Suni@helsinki.fi
#
# The processors in this module integrate machine learning models
# implemented in scikit-learn (http://scikit-... | {"hexsha": "d362e1517bfd99ea262330a052beaacb5e190f4c", "size": 7586, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/processors/SKLProcessors.py", "max_stars_repo_name": "cadia-lvl/Ossian", "max_stars_repo_head_hexsha": "1a4e49083249d36624e342ffae1e653a7ed12c28", "max_stars_repo_licenses": ["Apache-2.0"]... |
using TestImages, FixedPointNumbers, Colors, AxisArrays
using Test
img = testimage("cameraman")
@test isa(img, Matrix{Gray{N0f8}})
img = testimage("mri-stack")
@test isa(img, AxisArray)
@test map(step, axisvalues(img)) == (1,1,5)
@test_nowarn testimage("c")
@test_throws ArgumentError testimage("nonexistence.png")
@te... | {"hexsha": "d58e65dd8c9a832e7aaedaa7420e3ef09b7d51a3", "size": 396, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "Cody-G/TestImages.jl", "max_stars_repo_head_hexsha": "8323388f4015737d95962cd5e72f9952c25e4259", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
[STATEMENT]
lemma continuous_map_of_fst:
"continuous_map (prod_topology X Y) Z (f \<circ> fst) \<longleftrightarrow> topspace Y = {} \<or> continuous_map X Z f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)
[PROOF... | {"llama_tokens": 1062, "file": null, "length": 11} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.