text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Example for commanding robot to specific gripper pose
"""
import time
import numpy as np
from pyrobot import Robot
def main():
# Exa... | {"hexsha": "72ba8c836b1e0bc6700f2ab7797f6532bc97f0c1", "size": 1263, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ur5/ee_pose_control.py", "max_stars_repo_name": "gujralsanyam22/pyrobot", "max_stars_repo_head_hexsha": "a0448714857b684d8b280f710e9304988524d2e0", "max_stars_repo_licenses": ["MIT"], "ma... |
//
// Copyright 2012 Christian Henning
//
// 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
//
#ifndef BOOST_GIL_IO_MAKE_READER_HPP
#define BOOST_GIL_IO_MAKE_READER_HPP
#include <boost/gil/detail/mp11.hpp>
#include <... | {"hexsha": "24112bb19c05497d07abf2f219ba3376a83bd4a6", "size": 4624, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/gil/io/make_reader.hpp", "max_stars_repo_name": "sdebionne/gil-reformated", "max_stars_repo_head_hexsha": "7065d600d7f84d9ef2ed4df9862c596ff7e8a8c2", "max_stars_repo_licenses": ["BSL-1... |
[STATEMENT]
lemma val_update_rightmost_neq_None: "val t \<noteq> None \<Longrightarrow> val (update_rightmost f t) \<noteq> None"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. val t \<noteq> None \<Longrightarrow> val (update_rightmost f t) \<noteq> None
[PROOF STEP]
by (cases t) auto | {"llama_tokens": 106, "file": "Sliding_Window_Algorithm_SWA", "length": 1} |
import numpy as np
from keras.datasets import cifar10, mnist
from keras.utils import np_utils
def load_cifar_data(one_hot=True, scale1=True):
(X_train, Y_train), (X_test, Y_test) = cifar10.load_data()
if one_hot:
Y_train = np_utils.to_categorical(Y_train, 10)
Y_test = np_utils.to_categorical(... | {"hexsha": "e0dc4f835734d7ee6335cf3f669e2b6a13c04e98", "size": 2327, "ext": "py", "lang": "Python", "max_stars_repo_path": "project_utils.py", "max_stars_repo_name": "KieranXWang/HRS", "max_stars_repo_head_hexsha": "3999cd036ee9da59f4d82619bd540e93d5258f7c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "ma... |
# *********************************************************************************
# REopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions a... | {"hexsha": "4742d31f100eaa9da5120eb728fe3fa45f7d1957", "size": 5108, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/core/pv.jl", "max_stars_repo_name": "NLaws/REoptLite", "max_stars_repo_head_hexsha": "f15cec8512aa5c6fc03c4bded6d9f7caa50155a1", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": ... |
import os
import pickle
import numpy as np
import tmap as tm
from annoy import AnnoyIndex
from faerun import Faerun
from scipy.spatial.distance import cosine as cosine_distance
import matplotlib.pyplot as plt
CFG_TMAP = tm.LayoutConfiguration()
CFG_TMAP.k = 50
CFG_TMAP.kc = 50
CFG_TMAP.sl_scaling_min = 1.0
CFG_TMAP.sl... | {"hexsha": "feba4fdd0115f0d52d56c63c92c6a52a2a7dde29", "size": 2009, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/visualisation/create_schneider_tmap.py", "max_stars_repo_name": "reymond-group/drfp", "max_stars_repo_head_hexsha": "921f476f9c4a37d1bce08ae6de5abb1b1589dbbb", "max_stars_repo_licenses": [... |
import numpy as np
from numpy.lib.function_base import append
import pandas as pd
from tkinter import *
import math
import time
import os
from numpy.core.fromnumeric import size
from pandas.core.arrays.sparse import dtype
size_of_board = 600
"""
initialization of sudoku class based on Tic-Toc-Toe game from
MIT Lic... | {"hexsha": "ebd75ff3da2379cff013566d203f622a1cbcea00", "size": 5705, "ext": "py", "lang": "Python", "max_stars_repo_path": "ML-sudoku.py", "max_stars_repo_name": "loufin/ML-Sudoku", "max_stars_repo_head_hexsha": "aaa0dd441f609f1d9f90a662e4f009cae4098245", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": null,... |
"""
nodes that provide updates for shared variables
"""
import abc
import six
import numpy as np
import theano
import theano.tensor as T
from .. import core
from .. import inits
@core.register_node("update_scale")
class UpdateScaleNode(core.Wrapper1NodeImpl):
"""
scales updates from above the tree by multi... | {"hexsha": "e22af5711160cb5812a39249d0c2c6b832152116", "size": 24639, "ext": "py", "lang": "Python", "max_stars_repo_path": "u24_lymphocyte/third_party/treeano/nodes/updates.py", "max_stars_repo_name": "ALSM-PhD/quip_classification", "max_stars_repo_head_hexsha": "7347bfaa5cf11ae2d7a528fbcc43322a12c795d3", "max_stars_r... |
import d2l.torch
import numpy as np
import torch.nn as nn
import torch
from torchvision import datasets
from torchvision import transforms
from torch.utils import data
import matplotlib.pyplot as plt
def NINBlock(inChannel, outChannel, kernelSize, stride, padding):
blk = [nn.Conv2d(inChannel, outChannel, (kernelS... | {"hexsha": "0ba01594ebe99baeecd47034c6ad6657229421e8", "size": 2909, "ext": "py", "lang": "Python", "max_stars_repo_path": "cv/classification/classicNets/NIN.py", "max_stars_repo_name": "XingJinming-real/DL", "max_stars_repo_head_hexsha": "9c793338a60b663ab3cdc702dc73617156b4ae93", "max_stars_repo_licenses": ["MIT"], "... |
# GTSIM for 2 indicators (facies)
from sys import *
from geo import *
from numpy import *
from scipy import *
from python_property import *
from gaussian_cdf import *
import os
def pseudo_gaussian_transform(prop, tk_prop):
pg_prop = prop.clone()
for i in xrange(tk_prop.size()):
if (pg_prop.get_at(i)... | {"hexsha": "1e53e28697ec19366aa269645f4e186fef2dc1a1", "size": 3089, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sample-scripts/gtsim.py", "max_stars_repo_name": "hpgl/hpgl", "max_stars_repo_head_hexsha": "72d8c4113c242295de740513093f5779c94ba84a", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_... |
# PROGRAMMER: Pascal Kolleth
# DATE CREATED: 01.01.2019
# PURPOSE: The script contains several functions that support <train.py> and <predict.py>
# and are not directly related to the deep learning process. Particularly, the
# functions support processing the inputs and outputs.
# Import all necessar... | {"hexsha": "679590c57f3c0140cbf2393a0c598118a867ee01", "size": 5411, "ext": "py", "lang": "Python", "max_stars_repo_path": "project_02_-_flower_image_classifier/utility_fun.py", "max_stars_repo_name": "kollepas/ai_programming_with_python", "max_stars_repo_head_hexsha": "3ad4c26c3eac9d54e47a3ce020bb54fb7a7d197c", "max_s... |
[STATEMENT]
lemma (in nrules) compile_complete:
assumes "rs \<turnstile>\<^sub>n t \<longrightarrow> t'" "closed t"
shows "compile (consts_of rs) \<turnstile>\<^sub>i nterm_to_pterm t \<longrightarrow> nterm_to_pterm t'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. compile (consts_of rs) \<turnstile>\<^sub>i n... | {"llama_tokens": 17978, "file": "CakeML_Codegen_Rewriting_Rewriting_Pterm_Elim", "length": 92} |
import numpy as np
import cv2
def noiseSP(img, frac_k, noise_type):
shape=img.shape
n=shape[0]*shape[1]
k=int(n*frac_k)
loc=np.unravel_index(np.random.choice(n,k, replace=False),shape)
if noise_type ==0:
img[loc]=0
elif noise_type ==1:
img[loc]=255
elif noise_type ==2:... | {"hexsha": "4b426662063bca7b6dcf414bcf30a45eb0c68c48", "size": 3352, "ext": "py", "lang": "Python", "max_stars_repo_path": "img/imglib.py", "max_stars_repo_name": "purushottamkar/apis", "max_stars_repo_head_hexsha": "945e747ea16aa10f314beb90e1f3eadacb6b0a53", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
#' @export
box::use(
methods[...],
stats[...],
graphics[...],
grDevices[...],
utils[...]
)
| {"hexsha": "98dbbe9fd1599e21e619e85d9d816e72a98bfa7b", "size": 111, "ext": "r", "lang": "R", "max_stars_repo_path": "inst/mod/r/core.r", "max_stars_repo_name": "klmr/box", "max_stars_repo_head_hexsha": "9b0b517fb9521aaf6b3a46ee8750649c1a696940", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 341, "max_stars_rep... |
import os
import cv2
import torch
import numpy as np
import random
import math
from torch.utils.data import Dataset, DataLoader
from pycocotools.coco import COCO
import torch.nn.functional as F
from torchvision import transforms
from PIL import Image, ImageEnhance, ImageOps
COCO_CLASSES = [
"person",
"bicycle"... | {"hexsha": "d0358392fce91b3590f6c12826db0c2eb36f8df1", "size": 26972, "ext": "py", "lang": "Python", "max_stars_repo_path": "public/detection/dataset/cocodataset.py", "max_stars_repo_name": "sbisdog/multi_task", "max_stars_repo_head_hexsha": "63f5236649dd344f1582eba0ff630a635b045be8", "max_stars_repo_licenses": ["Apach... |
import torch
import torch.nn as nn
from scipy import signal
import numpy as np
from data import get_data, prep
from torch.autograd import Variable
from network import *
import glob
import argparse
import time
parser = argparse.ArgumentParser()
parser.add_argument('--n_epochs', type=int, default=1000, help='number of e... | {"hexsha": "04a8e212b1caeb6eee29b82814ca8023d89c46d1", "size": 3637, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "capepoint/SHMnet", "max_stars_repo_head_hexsha": "c57e610dc393dc766c5b10f551b360e52cb2d5ca", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 8, "ma... |
import torch
import matplotlib.pyplot as plt
from matplotlib.pyplot import cm
import h5py
import os
from glob import glob
from patch_manager import StridedRollingPatches2D, StridedPatches2D, NoPatches2D
from utils import squeeze_repr
import torch.utils.data as torch_data
import numpy as np
from transforms import RndAug... | {"hexsha": "83bc563c6437ff975bcda5fccacb45dbaf9be8f0", "size": 2888, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/spg_dset_no_inp_patch.py", "max_stars_repo_name": "paulhfu/unsup_pix_embed", "max_stars_repo_head_hexsha": "fcfc319f81942ba73ef54bd96e26225d52e8c054", "max_stars_repo_licenses": ["MIT"], "max... |
# -*- encoding: utf-8 -*-
"""
@Comment :
@Time : 2020/1/13 11:56
@Author : yxnchen
"""
#%% load Karate Club data
from networkx import read_edgelist,set_node_attributes, to_numpy_matrix
from pandas import read_csv, Series
from numpy import array
def loadKarateClub():
nw = read_edgelist('karate.edgelist',... | {"hexsha": "7e5362c72a0e63c80bd35d407114d535d97ee820", "size": 2314, "ext": "py", "lang": "Python", "max_stars_repo_path": "2_GCNClassification.py", "max_stars_repo_name": "yxnchen/GCN-tutorial", "max_stars_repo_head_hexsha": "c21a9f6b54fcd124f1ffab1e74ee1ebd35ff5632", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
"""
============================================================
Figure and Color Control using Check boxes and Radio Buttons
============================================================
This example shows how to use the CheckBox UI API. We will demonstrate how to
create a cube, sphere, cone and arrow and control its ... | {"hexsha": "2ca6e7f6ba2a3f82642e18a86fabf4945432e920", "size": 4725, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/tutorials/02_ui/viz_check_boxes.py", "max_stars_repo_name": "iamansoni/fury", "max_stars_repo_head_hexsha": "2e7971a176c2540e10a9a6da861097583d08cb4a", "max_stars_repo_licenses": ["BSD-3-Clau... |
@doc """
CenteredDifference{N}(n, order, step, len, [coeff_func])
CenteredDifference{N}(n, order, steps, len, [coeff_func])
See also: [`UpwindDifference`](@ref)
"""
CenteredDifference
@doc """
calculate_weights(n::Int, x₀::Real, x::Vector)
Return a vector `c` such that `c⋅f.(x)` approximates ``f^{(n)}(x... | {"hexsha": "d2ef73efeab8189cc8d409a69bdfe5d3f95cb40f", "size": 8206, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/docstrings.jl", "max_stars_repo_name": "briochemc/DiffEqOperators.jl", "max_stars_repo_head_hexsha": "a94114887f6d1b543bd83c5c08d0f72e61213685", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
//////////////////////////////////////////////////////////////////////////////
// (C) Copyright John Maddock 2000.
// (C) Copyright Ion Gaztanaga 2005-2015.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
/... | {"hexsha": "c8bc74a18aecdcfc17e20f5e44887f1ada2a02ef", "size": 44634, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/move/detail/type_traits.hpp", "max_stars_repo_name": "enfold/relstorage", "max_stars_repo_head_hexsha": "9fcd526b537cb6537cc2ae33154b63096550f210", "max_stars_repo_licenses": ["ZPL-2.... |
"""
File: swap_mutation.py
Created by ngocjr7 on 2020-10-05 21:38
Description:
"""
from __future__ import absolute_import
from geneticpython.models.int_individual import IntIndividual
from geneticpython.core.operators.mutation.mutation import Mutation
from geneticpython.utils.validation import check_random_state
fr... | {"hexsha": "b6e72dd3764627d096609a4f9a8d63e45b6ff43e", "size": 1513, "ext": "py", "lang": "Python", "max_stars_repo_path": "geneticpython/core/operators/mutation/swap_mutation.py", "max_stars_repo_name": "ngocjr7/geneticpython", "max_stars_repo_head_hexsha": "4b4157523ce13b3da56cef61282cb0a984cd317b", "max_stars_repo_l... |
function disp(F)
%DISP Display a CHEBFUN2V.
%
% See also DISPLAY.
% Copyright 2017 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.
loose = strcmp(get(0,'FormatSpacing'),'loose');
% Compact version
if ( isempty( F ) )
fprintf('empty chebfun2v\n')
... | {"author": "chebfun", "repo": "chebfun", "sha": "8c49396a55e46ddd57a1d108c6a8f32e37536d54", "save_path": "github-repos/MATLAB/chebfun-chebfun", "path": "github-repos/MATLAB/chebfun-chebfun/chebfun-8c49396a55e46ddd57a1d108c6a8f32e37536d54/@chebfun2v/disp.m"} |
!-----------------------------------------------------------------------
subroutine sub_HSMAC(ustg,vstg,pcnt)
!-----------------------------------------------------------------------
use mod_variables,only : imax,jmax,imx1,jmx1,dx,divmax,itrp,divg,iblk,dt
implicit none
!
!-------------------------------------... | {"hexsha": "4c94696cf747f8a919ad3b73ab063ee766f81ae0", "size": 3005, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/sub_hsmac.f90", "max_stars_repo_name": "DAE-Code/NS2D_EnKF", "max_stars_repo_head_hexsha": "bae47eb9f771d07dbd0d814c03cf4759ffc7c819", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# Test imports
import numpy as np
import pandas as pd
import lightgbm as lgb
from bedrock_client.bedrock.analyzer.model_analyzer import ModelAnalyzer
from bedrock_client.bedrock.analyzer import ModelTypes
from bedrock_client.bedrock.api import BedrockApi
from bedrock_client.bedrock.metrics.service import ModelMonitorin... | {"hexsha": "47441abac0481dc36adb52f87b3f1c29f71c5720", "size": 508, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test.py", "max_stars_repo_name": "basisai/docker-workload", "max_stars_repo_head_hexsha": "390517708f06cbe8edcfb5ea1e5f713924ff372f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun... |
# SPDX-License-Identifier: Apache-2.0
import numpy as np # type: ignore
import onnx
from ..base import Base
from . import expect
def topk_sorted_implementation(X, k, axis, largest): # type: ignore
sorted_indices = np.argsort(X, axis=axis)
sorted_values = np.sort(X, axis=axis)
if largest:
sorte... | {"hexsha": "c4f64e29835f6a58551c14e2fcc50d5547287ba2", "size": 3234, "ext": "py", "lang": "Python", "max_stars_repo_path": "onnx/backend/test/case/node/topk.py", "max_stars_repo_name": "justinchuby/onnx", "max_stars_repo_head_hexsha": "805ae1e634697e37b43701e585c9c253a29ce076", "max_stars_repo_licenses": ["Apache-2.0"]... |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Tests for the matmul dataset."""
import re
from copy import deepcopy
from itertools import islice
from pathlib import Path
import gym
impor... | {"hexsha": "6907494b58c5022586a0f141a6250215ff3581c4", "size": 2164, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/mlir/datasets/matmul_test.py", "max_stars_repo_name": "thecoblack/CompilerGym", "max_stars_repo_head_hexsha": "ade54e2f1829cf41722decb0942a4d6fd3102c2c", "max_stars_repo_licenses": ["MIT"], ... |
"""
Copyright (c) Facebook, Inc. and its affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
"""
import pathlib
import os
import re
import random
import numpy as np
import pdb
import logging
from collections import defaultdict
import ism... | {"hexsha": "b96f20b29151fd65ea9d32355fd093103169f4ac", "size": 10330, "ext": "py", "lang": "Python", "max_stars_repo_path": "banding_removal/fastmri/data/mri_data.py", "max_stars_repo_name": "Gaskell-1206/fastMRI", "max_stars_repo_head_hexsha": "1b6d1f9020bc9209afa65ef9b9f2f3fa3348901c", "max_stars_repo_licenses": ["MI... |
import json
import mmap
import pickle
import numpy as np
from common_structs.ungrounded_graph import UngroundedNode, UngroundedEdge, UngroundedGraph
from common_structs.grounded_graph import GrounedGraph, GroundedNode, GroundedEdge
from common_structs.structure import Structure
def read_structure_file(structure_file... | {"hexsha": "a661905b6032676e41075a15b97ddea3807bfdf5", "size": 20198, "ext": "py", "lang": "Python", "max_stars_repo_path": "kbcqa/common/hand_files.py", "max_stars_repo_name": "nju-websoft/SkeletonKBQA", "max_stars_repo_head_hexsha": "8cf2e697830ef09dca40692e7d254b61f9ffdf8d", "max_stars_repo_licenses": ["Apache-2.0"]... |
[STATEMENT]
lemma "(i::int) <= \<bar>i\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. i \<le> \<bar>i\<bar>
[PROOF STEP]
by linarith | {"llama_tokens": 66, "file": null, "length": 1} |
cutoff%!TEX root = /Users/stevenmartell/Documents/CURRENT PROJECTS/iSCAM-trunk/fba/BC-herring-2011/WRITEUP/BCHerring2011.tex
\section{Introduction}
The objectives of this section of the report are: (1) present the data used in the 2011 assessment, (2) provide a summary overview of the integrated statistical catch-ag... | {"hexsha": "c242bccf0277fe577884f46c3354882bbc4963e4", "size": 4955, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "fba/BC-herring-2011/WRITEUP/PART2/Introduction.tex", "max_stars_repo_name": "krHolt/iSCAM", "max_stars_repo_head_hexsha": "b6e1f1b5c3f81e1860a983cbafd18221d365fdb6", "max_stars_repo_licenses": ["Unl... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import random
import warnings
import numpy as np
import pandas as pd
import networkx as nx
from tqdm import tqdm
import _pickle as cPickle
from datetime import datetime
from gensim.models import Word2Vec
warnings.filterwarnings('ignore')
class deepWalk(object):
def __i... | {"hexsha": "6ca6caea0c6dc6b0bea53bb751b1916d3f4a837b", "size": 3700, "ext": "py", "lang": "Python", "max_stars_repo_path": "OffLine/deepWalk.py", "max_stars_repo_name": "RecSysProject/News-RecSys", "max_stars_repo_head_hexsha": "bd7ab047e5de2397146a223e0d19069389bd5a20", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
%XMLDEMO3 Demonstrate how to convert an XMLtree in a simple structure
%
% Description
% This script demonstrates the use of the xmltree class to
% convert an XMLtree (when possible) in a simple structure.
% This can only be performed when the XML file is simple enough
% (one element cannot have more than one ... | {"author": "buzsakilab", "repo": "buzcode", "sha": "2d700a38b3c2a860ad1333be90f14d7a37a72815", "save_path": "github-repos/MATLAB/buzsakilab-buzcode", "path": "github-repos/MATLAB/buzsakilab-buzcode/buzcode-2d700a38b3c2a860ad1333be90f14d7a37a72815/externalPackages/xmltree-2.0/xmldemo3.m"} |
from Tkinter import *
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.autograd as autograd
from torch.autograd import Variable
master = Tk()
goal = 0
var_goal = StringVar()
GAMMA = 0.9
last_state = Variable(torch.Tensor([0,0])).unsqueeze... | {"hexsha": "90c627337dcd0b67d8be93afcf7703daff1e7699", "size": 3018, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/sarsa.py", "max_stars_repo_name": "alexis-jacq/signals", "max_stars_repo_head_hexsha": "3c960e125ed5265dfc9cd3278df948f3c846a5dd", "max_stars_repo_licenses": ["0BSD"], "max_stars_count": 1, ... |
[STATEMENT]
lemma (in euclidean_space) bchoice_Basis_iff:
fixes P :: "'a \<Rightarrow> real \<Rightarrow> bool"
shows "(\<forall>i\<in>Basis. \<exists>x\<in>A. P i x) \<longleftrightarrow> (\<exists>x. \<forall>i\<in>Basis. inner x i \<in> A \<and> P i (inner x i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1.... | {"llama_tokens": 208, "file": null, "length": 1} |
#!/usr/bin/python3
import sys
import argparse
import time
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import SpanSelector
import matplotlib
def createParser():
parser = argparse.ArgumentParser(description=r'Plotting data from *dat files.',
epilog=... | {"hexsha": "c2d6f09a0e582124f47fb19b0faa92f8b6692366", "size": 9878, "ext": "py", "lang": "Python", "max_stars_repo_path": "dnavplot.py", "max_stars_repo_name": "semargol/dnavplot", "max_stars_repo_head_hexsha": "bc07a6c25504873fc29018002b8d0a180453be61", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
############configure the corresponding corner sequences here, you should match you simulation corners in the Simulator script#################################################
##############################################################################################... | {"hexsha": "e9c12d14422bd51204a7b31d52ed9863264390b7", "size": 2060, "ext": "py", "lang": "Python", "max_stars_repo_path": "device modeing/Ioff_formater_v0.5.py", "max_stars_repo_name": "RichardNeverGiveup/data_analysis_for_CMOS", "max_stars_repo_head_hexsha": "62a289bd3367b5d3a9ce9ba7f71e920706eafa4b", "max_stars_repo... |
import cv2
import numpy as np
from PIL import ImageGrab
points = (0,0)
def click(event,x,y,flags,param):
global points
if event == cv2.EVENT_LBUTTONDOWN:
points = (x, y)
def set_top_left():
"""
Get the top left corner of screenshot
Press q to contuniue
"""
global points
c... | {"hexsha": "cbd4768753e4a36be75365bd9f70764455c38f56", "size": 1433, "ext": "py", "lang": "Python", "max_stars_repo_path": "autog/utils.py", "max_stars_repo_name": "at-eam/AutoDeepG-Bot", "max_stars_repo_head_hexsha": "2fbd83bd29581319c52bc6a7ce2ec5543f8f682c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, ... |
import flask
from flask import Flask, render_template, request, redirect, url_for
import numpy as np
import base64
import os
import secrets
import argparse
import yaml
import chainer
from chainercv.transforms import resize
from PIL import Image
from scipy.ndimage.filters import gaussian_filter
import source.yaml_util... | {"hexsha": "6b428dceec31f2b2fef5f1cab43a272f082a3d3a", "size": 4822, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo_spatial_translation.py", "max_stars_repo_name": "takerum/neural-collage", "max_stars_repo_head_hexsha": "c83bdb276f9c20f99f959c23bc8d4fcfd072d162", "max_stars_repo_licenses": ["MIT"], "max_st... |
[STATEMENT]
lemma resAct:
fixes x :: name
and \<alpha> :: act
and P :: ccs
assumes "x \<sharp> \<alpha>"
shows "\<lparr>\<nu>x\<rparr>(\<alpha>.(P)) \<sim> \<alpha>.(\<lparr>\<nu>x\<rparr>P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lparr>\<nu>x\<rparr>\<alpha>.P \<sim> \<alpha>.(\<lparr>\<nu... | {"llama_tokens": 1206, "file": "CCS_Strong_Bisim_SC", "length": 7} |
#include <boost/units/physical_dimensions.hpp>
| {"hexsha": "b35e7d63689a3cb5835c245b03c1d6ad606accd9", "size": 47, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_units_physical_dimensions.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL... |
! Copyright (C) 2021 Nguyen Ngoc Sang, <https://github.com/SangVn>
!*************************************************!
! https://www.facebook.com/VnCFD !
! https://vncfdgroup.wordpress.com !
!*************************************************!
!compiler: python3 -m numpy.f2py -c functi... | {"hexsha": "5699851ef7672f4934aaf67c2e1e0d6574f2bd53", "size": 22036, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "lib/fluxes.f95", "max_stars_repo_name": "SangVn/VnCFD_2.21.5", "max_stars_repo_head_hexsha": "dc1c604e2e2121e57b2af4af235965ce27af1d57", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7... |
subroutine dr_read_salt
use hydrograph_module
use dr_module
use input_file_module
use organic_mineral_mass_module
use constituent_mass_module
use maximum_data_module
character (len=80) :: titldum, header
integer :: eof, imax, ob1, ob2
logical :: i_exist... | {"hexsha": "31dd6fc1af26c9cce998823204ea751d05008e43", "size": 2376, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/data/program_analysis/multifile_multimod/mfmm_02/dr_read_salt.f90", "max_stars_repo_name": "mikiec84/delphi", "max_stars_repo_head_hexsha": "2e517f21e76e334c7dfb14325d25879ddf26d10d", "max... |
import OpenPNM as op
import scipy as sp
mgr = op.Base.Workspace()
mgr.loglevel = 60
class OrdinaryPercolationTest:
def setup_class(self):
self.net = op.Network.Cubic(shape=[5, 5, 5])
self.geo = op.Geometry.Toray090(network=self.net,
pores=self.net.Ps,
... | {"hexsha": "3ad42ccc922cf06d2f16ca9f4a84ade98018958a", "size": 1529, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/unit/Algorithms/OrdinaryPercolationTest.py", "max_stars_repo_name": "thirtywang/OpenPNM", "max_stars_repo_head_hexsha": "e55ee7ae69a8be3e2b0e6bf24c9ff92b6d24e16a", "max_stars_repo_licenses": ... |
# Copyright 2021 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | {"hexsha": "44e3a6abedc974fbfa0514140d7e89a09d5f3fd9", "size": 4146, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_probability/python/internal/custom_gradient_test.py", "max_stars_repo_name": "PavanKishore21/probability", "max_stars_repo_head_hexsha": "4bad1b796b0e6ed2959205915d42788817620c4c", "max... |
# Sim.jl
export simGPMTD!, simGPMTD_full!, forecast_sim!;
function simGPMTD!(n::Int, nburn::Int, intercept::InterceptNormal,
mixcomps::Vector{MixComponentNormal},
λ::Vector{T}) where T <: Real
L = length(mixcomps)
y = zeros(Float64, n + nburn + L)
ζvec = zeros(Int, n + nburn + L)
y[1:L] = sqr... | {"hexsha": "008edaf8d6e6a36a9ddbc150ada60c19805fdacf", "size": 7423, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Sim.jl", "max_stars_repo_name": "mheiner/GPMTD.jl", "max_stars_repo_head_hexsha": "8c7e5359a27a684f078bda2c13889794c5e8d84b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s... |
import random
import numpy as np
INPUT_DIM = 4
OUT_DIM = 3
H_DIM = 10
def relu(t):
return np.maximum(t, 0)
def softmax(t):
out = np.exp(t)
return out / np.sum(out)
def softmax_batch(t):
out = np.exp(t)
return out / np.sum(out, axis=1, keepdims=True)
def sparse_cross_entropy(z, y):
return -n... | {"hexsha": "c3062c4ffca11de615dc3e0047a48e1b787500ae", "size": 2669, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "dkorobchenko-nv/nn-python", "max_stars_repo_head_hexsha": "c5535736300270bf8250c6ddc8f3ac561fd8b52b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "... |
import pathlib
import nibabel as nib
import numpy as np
import shutil
import sys
def read_nii(filename: pathlib.Path) -> np.ndarray:
nii = nib.load(str(filename))
return nii.get_fdata()
def main():
masks_folder = pathlib.Path("datasets/masks/nii/").absolute()
images_folder = pathlib.Path("datasets/im... | {"hexsha": "b8d704fdcce61dc29f926fd3ed9f6ab5a265e420", "size": 990, "ext": "py", "lang": "Python", "max_stars_repo_path": "check_sizes.py", "max_stars_repo_name": "tfmoraes/deep_heart_torch", "max_stars_repo_head_hexsha": "4168ce01d600e69baf82c752a3e57af86861b6ea", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
import tensorflow as tf
import numpy as np
import pickle
import os
from datetime import datetime
import tensorflow_model.model as tf_model
CIFAR10_DATASET_FOLDER_PATH = os.path.join('data', 'cifar-10-batches-py')
SAVE_MODEL_PATH = 'tensorflow_model/checkpoints/'
MEAN = np.array([125.306918046875, 122.950394140625, 11... | {"hexsha": "fb2cbab88d987f1e751ba9848de9df321f906c59", "size": 3194, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_model/train.py", "max_stars_repo_name": "danielhavir/baseline-convnet", "max_stars_repo_head_hexsha": "97437174d67dfc7a645a0f88cd6939a2c71539bd", "max_stars_repo_licenses": ["MIT"], "ma... |
#TypeDefs
const UniformDict = Dict{Symbol,Any}
const SymAnyDict = Dict{Symbol,Any}
const EmptyNamedTuple = NamedTuple{(),Tuple{}}
const VecOrT{T} = Union{Vector{T},T}
# Gapped Arrays are used in systems
abstract type RenderPassKind end
abstract type RenderTargetKind end
abstract type AbstractGlimpseMes... | {"hexsha": "a8f387084ceecf8613d0bf98ffd03232336a6685", "size": 1225, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/types.jl", "max_stars_repo_name": "louisponet/GLider.jl", "max_stars_repo_head_hexsha": "7fd5bf167f000079829dbb64ad9204d0e107f418", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10, "m... |
[STATEMENT]
lemma bcontfun\<^sub>N_space:
"space\<^sub>N bcontfun\<^sub>N = bcontfun"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. space\<^sub>N bcontfun\<^sub>N = bcontfun
[PROOF STEP]
using bcontfun\<^sub>N(1)
[PROOF STATE]
proof (prove)
using this:
eNorm bcontfun\<^sub>N ?f = (if ?f \<in> bcontfun then ennrea... | {"llama_tokens": 268, "file": "Lp_Functional_Spaces", "length": 2} |
import numpy
import wave
class Audiostream(object):
def __init__(self, volume_prio=1):
self.volume_prio = volume_prio
def get_data(self, frame_count, channels, width, rate):
return "".join(["\x00"]*frames*self.channels*self.width)
def get_volume_priority(self)... | {"hexsha": "f70582e58b5ad8dd04398cbdb1c24db03fe3139a", "size": 1746, "ext": "py", "lang": "Python", "max_stars_repo_path": "audiostream.py", "max_stars_repo_name": "ITNano/soundserver", "max_stars_repo_head_hexsha": "b84cbfd821987ad8af72a6c2677caa0b949abff6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
#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... | {"hexsha": "76ef4031a6c9546499584cdae2adc8a797aa4933", "size": 6668, "ext": "py", "lang": "Python", "max_stars_repo_path": "PaddleCV/rrpn/utility.py", "max_stars_repo_name": "weiwei1115/models", "max_stars_repo_head_hexsha": "e2c96c5f64b1dc8f0d5d9aa121300b87150e11e3", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
[STATEMENT]
lemma load_sub1_low_equal:
assumes a1: "low_equal s1 s2 \<and>
(fst instr = load_store_type LDSB \<or>
fst instr = load_store_type LDUB \<or>
fst instr = load_store_type LDUH \<or>
fst instr = load_store_type LD \<or>
fst instr = load_store_type LDD) \<and>
t1 = snd (fst (load_sub1 instr rd 0 s1)) \<and> ... | {"llama_tokens": 43925, "file": "SPARCv8_SparcModel_MMU_Sparc_Properties", "length": 38} |
"""
$(TYPEDEF)
Options for using SymbolicRegression.jl within the `solve` function.
Automatically creates [`Options`](https://astroautomata.com/SymbolicRegression.jl/stable/api/#Options) with the given specification.
Sorts the operators stored in `functions` into unary and binary operators on conversion.
# Fields
$(... | {"hexsha": "6aed02c4c4fb7c174051de611e1dd9c1ff596b1d", "size": 3642, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/symbolic_regression/symbolic_regression.jl", "max_stars_repo_name": "JuliaDiffEq/DataDrivenDiffEq.jl", "max_stars_repo_head_hexsha": "27f5537d2d04719b80f5785531b2b02e27a8208f", "max_stars_repo_... |
import urllib.request
import cv2
import numpy as np
def mobile_camera(ip_address):
if ip_address.endswith("/"):
ip = ip_address+"shot.jpg"
else:
ip = ip_address+"/"+"shot.jpg"
url = ip
while True:
im_array = np.array(bytearray(urllib.request.urlopen(url).read()), dtyp... | {"hexsha": "45147718e510bfa987e5b505622849178c954a34", "size": 517, "ext": "py", "lang": "Python", "max_stars_repo_path": "mobile_camera/mobile_camera.py", "max_stars_repo_name": "saminmustakim/Mobile-Camera", "max_stars_repo_head_hexsha": "1d3b7cd2f226186b800659402408d0ef93800bd3", "max_stars_repo_licenses": ["MIT"], ... |
% !TEX root = main.tex
% !TEX spellcheck = en-US
%\section{Preliminaries}
\iffalse
\paragraph{Notation.} %Let $\ppt$ denote probabilistic polynomial-time and $\secpar \in \NN$ be the
%security parameter. %All adversaries are stateful.
For a PPT algorithm $\adv$,
%let
%$\image (\adv)$ be the image of $\adv$ (the set... | {"hexsha": "1df2ec5c366ece64991d9cd78ad7b781ddb3d06b", "size": 12741, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "EPRINT/preliminaries.tex", "max_stars_repo_name": "clearmatics/research-plonkext", "max_stars_repo_head_hexsha": "7da7fa2b6aa17142ef8393ace6aa532f3cfd12b4", "max_stars_repo_licenses": ["CC-BY-4.0"]... |
import random
from typing import List
from skimage.util import random_noise
from PIL import Image
import numpy as np
def cal_new_size(im_h, im_w, min_size, max_size):
# horizontal or vertical
if max(im_h, im_w) > max_size:
ratio = max_size / max(im_h, im_w)
return round(ratio * im_h), round(ra... | {"hexsha": "bc6ae9dd651f2965107bae78ed3bf67b3f7fa225", "size": 2008, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocess/util.py", "max_stars_repo_name": "andreamatt/DM-Count", "max_stars_repo_head_hexsha": "48ac9faebf7e4591cbaaae353b17037f22cdd544", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import glob
import os
import numpy as np
from PIL import Image
from PIL import ImageOps
import random
import pprint
import shutil
import argparse
import camera
TRAIN_TARGET_DIR = './datasets'
FRAMERATE = 15
LABEL_SET = ['left', 'right', 'up', 'down', 'center', 'double_blink']
CHANNEL = 3
INPUT_DIM = 64
def record(ca... | {"hexsha": "f5709151cfab0f52bdeca75190e1859ca96ff751", "size": 2335, "ext": "py", "lang": "Python", "max_stars_repo_path": "classifier/calibrate.py", "max_stars_repo_name": "nxphi47/eye_gesture_app_wth", "max_stars_repo_head_hexsha": "1fce0f0e76c6e1bbdc555d8f4affe3234f102a59", "max_stars_repo_licenses": ["MIT"], "max_s... |
import xarray as xr
import rioxarray
import glob
import os
import numpy as np
import requests
import geopandas as gpd
import fiona
from pathlib import Path
import tarfile
def open_rasterio_lsr(path):
"""Reads in a Landsat surface reflectance band and correctly assigns the band metadata.
Args:
path (st... | {"hexsha": "3c556f7feda391b8a4d0a3d1c72dd6dea54a5b74", "size": 2519, "ext": "py", "lang": "Python", "max_stars_repo_path": "cropmask/io_utils.py", "max_stars_repo_name": "ecohydro/CropMask_RCNN", "max_stars_repo_head_hexsha": "4657ed1d103acb37dc974aa6af2f0d3a3398e987", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
# -*- coding: utf-8 -*-
"""
Copyright (c) 2020 Patryk Orzechowski | Epistasis Lab | University of Pennsylvania
DIGEN was developed at the University of Pennsylvania by Patryk Orzechowski (patryk.orzechowski@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and a... | {"hexsha": "be3915f30df5e650674fb9f7cbbfd12ee1def161", "size": 23688, "ext": "py", "lang": "Python", "max_stars_repo_path": "digen/benchmark.py", "max_stars_repo_name": "EpistasisLab/digen", "max_stars_repo_head_hexsha": "bb88a067f8a68da54506cca1a2d406b1fe5323c7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
#!/usr/bin/env python
# coding=utf-8
from __future__ import print_function
import numpy as np
import pickle as pickle
import scipy
import matplotlib.pyplot as plt
import combo
import time
num = 0
def load_data():
A = np.loadtxt('../kl_data/descriptor.dat')
print('A.shape为:')
print(A.shape)
X = A
... | {"hexsha": "e56e1c1984d4f79cd1cbd529b41965ec4d0e6685", "size": 9228, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/grain_bound/bayesOptimization/interactive/bo_kl_interactive_first.py", "max_stars_repo_name": "zhangkunliang/BayesOptimization", "max_stars_repo_head_hexsha": "6d78c9e9f96239b0dbb85650a0d... |
open import Prelude
open import Nat
open import core
open import contexts
open import disjointness
-- this module contains lemmas and properties about the holes-disjoint
-- judgement that double check that it acts as we would expect
module holes-disjoint-checks where
-- these lemmas are all structurally recursive ... | {"hexsha": "ca811d3e7677e2896aa1f74de6d61365432a0575", "size": 11040, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "holes-disjoint-checks.agda", "max_stars_repo_name": "hazelgrove/hazelnut-dynamics-agda", "max_stars_repo_head_hexsha": "229dfb06ea51ebe91cb3b1c973c2f2792e66797c", "max_stars_repo_licenses": ["MIT... |
# -*- coding: utf-8 -*-
from __future__ import annotations
__all__ = ["QuasisepSolver"]
from typing import Any, Optional
import jax
import jax.numpy as jnp
import numpy as np
from tinygp.helpers import JAXArray, dataclass
from tinygp.kernels.base import Kernel
from tinygp.noise import Noise
from tinygp.solvers.qua... | {"hexsha": "01c23442bae9b2544f5fb5054e7eec3874ea4c1c", "size": 4202, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tinygp/solvers/quasisep/solver.py", "max_stars_repo_name": "theorashid/tinygp", "max_stars_repo_head_hexsha": "992eb3db76587c62a27330835f91541b00acde8f", "max_stars_repo_licenses": ["MIT"], "m... |
#Julia implementation of "load_network" function
type NNet
file::AbstractString
weights::Array{Any,1}
biases::Array{Any,1}
symmetric::Int32
numLayers::Int32
inputSize::Int32
outputSize::Int32
maxLayerSize::Int32
layerSizes::Array{Int32,1}
mins::Array{Float64,1}
maxes::Ar... | {"hexsha": "7e1f486ca9a7b0026fc064dabbe85c16cf6df5ef", "size": 6035, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/nnet_calculations.jl", "max_stars_repo_name": "kjulian3/PolicyViz.jl", "max_stars_repo_head_hexsha": "60468ce74be79f07f3dd2b523b471540d212b522", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
module AISC360_16
export e3
function e3(Fe, Fy, Ag, ASDorLRFD)
if ASDorLRFD==0
StrengthFactor=1/1.80
elseif ASDorLRFD==1
StrengthFactor=0.85
else
StrengthFactor=1.0 #to just get nominal strength
end
if Fy/Fe <= 2.25
Fcr = 0.658^(Fy/Fe) * Fy
elseif λc > 2.25
... | {"hexsha": "6aa2aada83587641b43e73c92fdf1f25b560d6e9", "size": 441, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/AISC360_16.jl", "max_stars_repo_name": "runtosolve/StructuresKit.jl", "max_stars_repo_head_hexsha": "cc5d78a39f2391e52f91ab85cd93328e83e12508", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
#!/usr/bin/env python
# coding: utf-8
# In[ ]:
import pandas as pd
import numpy as np
# from datetime import datetime
import matplotlib.pyplot as plt
from sklearn.model_selection import KFold
from sklearn.feature_selection import RFECV
import lightgbm as lgb
from sklearn.metrics import roc_auc_score
from sklearn.pre... | {"hexsha": "6fc1a731e44c019e3fcb330146bb04a0fcab55ee", "size": 5345, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/recursive feature elimination.py", "max_stars_repo_name": "karin0018/Kaggle-IEEE-CIS-Fraud-Detection", "max_stars_repo_head_hexsha": "239ad35bc2a1772dd9bb46f99963d0dbea27970b", "max_stars_rep... |
SUBROUTINE zsetpr6 (IFLTAB, CFLG, CSTR, INUMB)
C
C
C Sets Items in the Permanent section of a DSS file
C This routine is to be called only by DSSUTL and
C internal DSS subroutines
C
C Written by Bill Charley at HEC, January 1990.
C
C
INTEGER IFLTAB(*)
CHARACTER CFLAG*4, CFLG*(*), CSTR*... | {"hexsha": "97d2b261c2bf851a865ba92c84afb28fa99d2bbf", "size": 1305, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "heclib/heclib_f/src/zsetpr6.f", "max_stars_repo_name": "HydrologicEngineeringCenter/heclib", "max_stars_repo_head_hexsha": "dd3111ee2a8d0c80b88d21bd529991f154fec40a", "max_stars_repo_licenses": ["... |
! Generated by TAPENADE (INRIA, Ecuador team)
! tapenade 3.x
!
! Differentiation of rhow in forward (tangent) mode:
! variations of useful results: rhow
! with respect to varying inputs: p t
! MIT License
!
! Copyright (c) 2020 SHEMAT-Suite
!
! Permission is hereby granted, free of charge, to any per... | {"hexsha": "9a38a03e51187150a4994e4f241b2662287fd5db", "size": 4750, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "props/basc/g_tap/pres/rhow_ftl.f90", "max_stars_repo_name": "arielthomas1/SHEMAT-Suite-Open", "max_stars_repo_head_hexsha": "f46bd3f8a9a24faea9fc7e48ea9ea88438e20d78", "max_stars_repo_licenses":... |
import bz2
import os
import pickle
import pytest
import torch
import numpy as np
from genric import molecule_representation as mr
from genric import molecule_edit as me
from genric.molecule_representation import _implementation_python as imp_py
try:
from genric.genric_extensions import molecule_representation as... | {"hexsha": "4f9aba588a44bce0903c48b7392a79f6de348ac5", "size": 8948, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/tests/test_molecule_representation.py", "max_stars_repo_name": "wendazhou/reversible-inductive-construction", "max_stars_repo_head_hexsha": "14815d1b5ef5a35a569c0793888bc5548acd64be", "max_st... |
import numpy as np
import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
except RuntimeError as e:
print(e)
tf.keras.backend.set_floatx('float64')
# state_ratio_model = V... | {"hexsha": "314e32cc09bdb092f57e755ef45e171d23e6a04d", "size": 20818, "ext": "py", "lang": "Python", "max_stars_repo_path": "_density/.ipynb_checkpoints/omega_SA-checkpoint.py", "max_stars_repo_name": "RunzheStat/TROPE", "max_stars_repo_head_hexsha": "ac704b1fcb422f0e9e7b2e1b16d3c8b1812560f1", "max_stars_repo_licenses"... |
// test write tiles to json file
// Yang Yu (gnayuy@gmail.com)
// g++ -std=c++11 -o jwritefiles jwritefiles.cpp -L/usr/local/lib -lcpprest -lboost_filesystem -lboost_system -lboost_chrono -lboost_thread -lboost_random -lboost_regex -lssl -lcrypto
#include "metainfo.h"
#include <boost/filesystem.hpp>
using namespace ... | {"hexsha": "92eb90e2e74573847292fd72decfaf9c344d3456", "size": 4741, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/json/jwritefiles.cpp", "max_stars_repo_name": "gnayuy/dataManagement", "max_stars_repo_head_hexsha": "74ee61d0412e0d68fc02f2efed0794208d0493f5", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma... |
function _info(
model::Optimizer,
c::MOI.ConstraintIndex{MOI.VectorAffineFunction{Float64},<:MOI.Indicator},
)
if haskey(model.indicator_constraint_info, c.value)
return model.indicator_constraint_info[c.value]
end
return throw(MOI.InvalidIndex(c))
end
function MOI.supports_constraint(
... | {"hexsha": "c2518511660c797103cd1a5cbcc561065b97b107", "size": 5960, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/MOI_wrapper/MOI_indicator_constraint.jl", "max_stars_repo_name": "simonbowly/Gurobi.jl", "max_stars_repo_head_hexsha": "c071cec9d0c595182a6cf0acdd9cdbc1ec1151fa", "max_stars_repo_licenses": ["M... |
import os
import sys
sys.path.append("..")
import numpy as np
import tensorflow as tf
# from octrees import *
from libs import *
class Octree2ColTest(tf.test.TestCase):
def initialize(self):
self.depth = 1
self.channel= 3
# self.octree = octree_batch(get_one_octree('octree_1'))
self.octree = octre... | {"hexsha": "76376f2bf361b90dc59bb229e5aed4ccb7d105be", "size": 3158, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/test/test_octree2col.py", "max_stars_repo_name": "pauldinh/O-CNN", "max_stars_repo_head_hexsha": "fecefd92b559bdfe94a3983b2b010645167c41a1", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import numpy as np
from si.util.scale import StandardScaler
from copy import copy
def EVD(X, n_components):
# calculating the covariance matrix of the mean-centered data.
cov_mat = np.cov(X, rowvar=False) # Não sei se é F ou T
# Calculating Eigenvalues and Eigenvectors of the covariance matrix
eigen_... | {"hexsha": "80252af4ad9692ca8e4f2553b594a565050842e2", "size": 1841, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/si/unsupervised/PCA.py", "max_stars_repo_name": "ALex99-bot/SIB", "max_stars_repo_head_hexsha": "fe2bbc6ebdd39fcab8a93937d688adaee1243da3", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Lists made up entirely of unique elements (propositional equality)
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.Relation.Unary.Uni... | {"hexsha": "4bb5f79aaf064e3746f58d0cf6dadb9cd7a15611", "size": 652, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "agda-stdlib/src/Data/List/Relation/Unary/Unique/Propositional.agda", "max_stars_repo_name": "DreamLinuxer/popl21-artifact", "max_stars_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933",... |
"""
Topics related to the realsense2_camera.realsense2_camera_node node:
/accel/imu_info
/color/camera_info
/color/image_raw
/depth/camera_info
/depth/image_rect_raw
/extrinsics/depth_to_color
/extrinsics/depth_to_infra1
/extrinsics/depth_to_infra2
/gyro/imu_info
/imu
/infra1/camera_info
/infra1/image_rect_raw
/infra2/... | {"hexsha": "b6b8200f0151039a588d584242a826ce46ef1493", "size": 2313, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ros2/bwo/bwo/object_detector_node.py", "max_stars_repo_name": "SaltyHash/BWO", "max_stars_repo_head_hexsha": "1b57569e6024fa7b7b23dce8ce7e3a408b89b792", "max_stars_repo_licenses": ["MIT"], "ma... |
"""Test for eigen.py."""
import unittest
import numpy
from numpy.testing import assert_array_almost_equal
from axelrod.eigen import _normalise, principal_eigenvector
class FunctionCases(unittest.TestCase):
def test_identity_matrices(self):
for size in range(2, 6):
mat = numpy.identity(size... | {"hexsha": "36f0bf5b91bcacb055ba766b7b9b69b405c1792c", "size": 1989, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/test_eigen.py", "max_stars_repo_name": "DPros/Axelrod", "max_stars_repo_head_hexsha": "70cc1efaa85b810041095029a520232f83016652", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
/* 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": "fd8b8ab299b7fcca25af7336e73bef8d15dba353", "size": 142541, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "proto/tests/test_proto_fe.cpp", "max_stars_repo_name": "Yi-Tseng/PI", "max_stars_repo_head_hexsha": "45ff43b0ce4df48702846950bead9c0c2935ebc5", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
# Mixture properties
Let's consider a mixture of two gases, and evaluate how the different approaches to approximating mixture properties perform.
We have a mixture of methane (CH$_4$) and butane (C$_4$H$_{10}$), in a container of volume 0.241 m$^3$. If the mixture is at 238°C, calculate the pressure. The container i... | {"hexsha": "793c32577e94358e20d9bc19d612724513e055e2", "size": 13011, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "content/mixtures/mixtures.ipynb", "max_stars_repo_name": "msb002/computational-thermo", "max_stars_repo_head_hexsha": "9302288217a36e0ce29e320688a3f574921909a5", "max_stars_repo_lice... |
# MIT License
# Copyright (c) [2020] [Pierre Ablin and Hugo Richard]
# 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, c... | {"hexsha": "727741499337b848a7b5b0ddfaed75c025619da9", "size": 7027, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/multiviewica/test_groupica.py", "max_stars_repo_name": "rflperry/mvlearn", "max_stars_repo_head_hexsha": "8db0f63a0a811d7458aa0bd6b187f9f551241927", "max_stars_repo_licenses": ["MIT"], "max_... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue May 19 08:43:15 2020
@author: SungJun Won
This code is written based on WEC-sim.
wonsungjun0000@gmail.com
"""
import unittest
import numpy as np
import scipy.io as sio
import os
from bodyclass import BodyClass
global cwd # set current directory as ... | {"hexsha": "8ed74f50aaadd26f5ff335bf14aa29adf6dc3c83", "size": 74304, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_objects/test_bodyclass/test.py", "max_stars_repo_name": "THREDgroup/WEC-Sim-Python", "max_stars_repo_head_hexsha": "c04ef42724cbf72419713970bf9ae63658a4d1b3", "max_stars_repo_licenses"... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from LibMTL.weighting.abstract_weighting import AbsWeighting
class UW(AbsWeighting):
r"""Uncertainty Weights (UW).
This method is proposed in `Multi-Task Learning Using Uncertainty to Weigh Losses for Scene Geometry and... | {"hexsha": "3c625db8b79492740f6f81bd89c3d418089ba996", "size": 906, "ext": "py", "lang": "Python", "max_stars_repo_path": "LibMTL/weighting/UW.py", "max_stars_repo_name": "median-research-group/LibMTL", "max_stars_repo_head_hexsha": "b0937ff59429a7cfbca66fe6bc3385258c2d6461", "max_stars_repo_licenses": ["MIT"], "max_st... |
from sklearn import datasets
from sklearn.datasets import fetch_mldata
import numpy as np
def filteredMnist():
print("Fetching the dataset...")
digits = fetch_mldata('MNIST original', data_home=".\\")
# contains many 2 dimensional array of pixel values which represents digits
images = digits.data
# contains la... | {"hexsha": "fad3c37006b8f2efb713d010f13dbf225ae120f5", "size": 833, "ext": "py", "lang": "Python", "max_stars_repo_path": "filteredMnist.py", "max_stars_repo_name": "tanvirtin/Hopfield-Network", "max_stars_repo_head_hexsha": "edb5d2959bea5d874a2e39a831ff17b542390f4c", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
"""
@author: mweigert
A basic wrapper class around pyopencl.cl__array
"""
from __future__ import absolute_import, print_function
import numpy as np
import pyopencl.array as cl_array
import pyopencl as cl
from gputools import get_device
from gputools.core.oclprogram import OCLProgram
import pyopencl.clmath as cl_ma... | {"hexsha": "7356b3be0d4f13c222f33ea8cf50be835329cb8b", "size": 11328, "ext": "py", "lang": "Python", "max_stars_repo_path": "gputools/core/ocltypes.py", "max_stars_repo_name": "ncianeo/gputools", "max_stars_repo_head_hexsha": "6dca11ff5520d9a0c9453a7c712133e13c391572", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_... |
(* Exercise: 1 star (nandb) *)
Definition nandb (b1 : bool) (b2 : bool) : bool :=
match b1 with
| false => true
| true => negb b2
end.
Example test_nandb1: (nandb true false) = true.
Proof. reflexivity. Qed.
Example test_nandb2: (nandb false false) = true.
Proof. reflexivity. Qed.
Example test_nandb3: (nan... | {"author": "mkolosick", "repo": "Software-Foundations-Exercises", "sha": "5f0f4d2653ff6118aef58c6953b6ba0f102e3516", "save_path": "github-repos/coq/mkolosick-Software-Foundations-Exercises", "path": "github-repos/coq/mkolosick-Software-Foundations-Exercises/Software-Foundations-Exercises-5f0f4d2653ff6118aef58c6953b6ba0... |
import itertools
import logging
import numpy as np
import pytest
from mpmath import mp
from qecsim import paulitools as pt
from qecsim.models.color import Color666Code, Color666MPSDecoder
from qecsim.models.generic import BiasedDepolarizingErrorModel, DepolarizingErrorModel
def _is_close(a, b, rtol=1e-05, atol=1e-0... | {"hexsha": "5d0f4bf7f18da35dcccdbbbddf50da1f17e9be1e", "size": 11976, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/models/test_color666_mps_decoder.py", "max_stars_repo_name": "dua-arpit/qecsim", "max_stars_repo_head_hexsha": "70ded606a653fd96d517e07fbba15d9b755df752", "max_stars_repo_licenses": ["BSD-3... |
#!/usr/bin/env python
from __future__ import division
import numpy as np
import cv2
import argparse
__author__ = "David Soto"
'''
Script to play a video through ROS, a webcam, or a video file
and display visual information about the colors in the video
in the RGB, HSV, and LAB colorspaces.
Usage:
rosrun mil_vision c... | {"hexsha": "4b694f5b9fcde3ee6766304800cb9ebfd4d76bc1", "size": 6239, "ext": "py", "lang": "Python", "max_stars_repo_path": "perception/mil_vision/ros_tools/colorspaces.py", "max_stars_repo_name": "marcgabe15/mil_common", "max_stars_repo_head_hexsha": "75fd308365f4b2754874add917e0a0151b39b924", "max_stars_repo_licenses"... |
"""
Rule Based Approach
Not complete, if the solution is not unique or 2 rules doesn't come with unique
choice, it doesn't work
"""
from leetcode_tester import Tester
from typing import Optional, List, Tuple
import copy
def isValidSudoku(board: List[List[str]]) -> bool:
rows = [0 for _ in range(9)]
cols = [... | {"hexsha": "30933c394c36edde9f2f7175fbf98b1c34d8a3d8", "size": 6385, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/0037_rule_based.py", "max_stars_repo_name": "garywei944/LeetCode", "max_stars_repo_head_hexsha": "77453b6e3329f3309ad61fe578cb7b608317ba1b", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
[STATEMENT]
lemma distinguish_from_set_establishes_convergence :
assumes "observable M1"
and "observable M2"
and "minimal M1"
and "minimal M2"
and "size_r M1 \<le> m"
and "size M2 \<le> m"
and "inputs M2 = inputs M1"
and "outputs M2 = outputs M1"
and "is_state_cover_ass... | {"llama_tokens": 11179, "file": "FSM_Tests_EquivalenceTesting_Intermediate_Implementations", "length": 47} |
#!/usr/bin/env python
import sys, logging, json, os, time, types, threading
import os.path as op
import numpy
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("pyFAI")
from PyQt4 import QtCore, QtGui, uic
from PyQt4.QtCore import SIGNAL
import pyFAI, fabio
from pyFAI.opencl import ocl
from pyFAI.util... | {"hexsha": "dab4821a82174a6a444025846ba25aa94e505e87", "size": 22089, "ext": "py", "lang": "Python", "max_stars_repo_path": "sandbox/test_integrate_ui.py", "max_stars_repo_name": "yugangzhang/pyFAI", "max_stars_repo_head_hexsha": "e0453b279dac1f165f637e2a2ed1d4ddf57d31ba", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import os
import os.path as op
import pandas as pd
import numpy as np
def clean(file, out_dir=op.abspath('data')):
RATING_COLS = {'rating_attribute': 'attribute', 'session_name': 'session_condition',
'number_str': 'session_order', 'stim_file': 'image',
'pre_rating_scale.resp... | {"hexsha": "ec70ea380267e6231daffc0c7ed558c651d68817", "size": 2731, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyses/clean_output_exp.py", "max_stars_repo_name": "FEED-UvA/pilot_RL", "max_stars_repo_head_hexsha": "1d455aa02f66c8a78149c54f4f336ac50ba77006", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
from operator import matmul
from os import stat
from matplotlib import image
import numpy as np
import cv2 # OpenCV
import math
from matplotlib import pyplot as plt
import os
from scipy.signal import convolve2d
class KLT:
def __init__(self):
return
def get_sim_warp(self, dx, dy, alpha_deg, lamda):
... | {"hexsha": "c68982643c4fe92f51bc1950b1b1614789a7faa7", "size": 10472, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/algo/klt.py", "max_stars_repo_name": "nicholaspalomo/VisionAlgosCourseETHZ", "max_stars_repo_head_hexsha": "dfaa442a274a3ded15833a44a60a012b4fd27654", "max_stars_repo_licenses": ["MIT"], "m... |
#include "OxLM.h"
#include <boost/archive/binary_iarchive.hpp>
#include <boost/archive/binary_oarchive.hpp>
#include <boost/filesystem.hpp>
#include <boost/functional/hash.hpp>
#include "moses/FactorCollection.h"
#include "moses/InputType.h"
#include "moses/TranslationTask.h"
using namespace std;
using namespace oxl... | {"hexsha": "789f96dd7cebd6a963432ddf1806d95f303dbfc4", "size": 5793, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "model/mosesdecoder/moses/LM/oxlm/OxLM.cpp", "max_stars_repo_name": "saeedesm/UNMT_AH", "max_stars_repo_head_hexsha": "cc171bf66933b5c0ad8a0ab87e57f7364312a7df", "max_stars_repo_licenses": ["Apache-2... |
#module load python/2.7
import os
from subprocess import call
import numpy as np
from scipy.stats import norm, nbinom
################################################################################################
### read 2d array
def read2d_array(filename,dtype_used):
import numpy as np
data=open(filename,'r')
d... | {"hexsha": "81eeeb3d53a8af4f57379717d28b867bc6951dd2", "size": 14759, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_pipe/bin/s3norm_1mk.py", "max_stars_repo_name": "guanjue/S3V2_IDEAS_ESMP", "max_stars_repo_head_hexsha": "c0b1720344aefbdc257c02ceb70b9fc06e52b4b0", "max_stars_repo_licenses": ["MIT"], "ma... |
(************************************************************************)
(* v * The Coq Proof Assistant / The Coq Development Team *)
(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *)
(* \VV/ **************************************************************)
(* // * Th... | {"author": "mattam82", "repo": "Coq-misc", "sha": "60bc3cbe72083f4fa1aa759914936e4fa3d6b42e", "save_path": "github-repos/coq/mattam82-Coq-misc", "path": "github-repos/coq/mattam82-Coq-misc/Coq-misc-60bc3cbe72083f4fa1aa759914936e4fa3d6b42e/theories/Wellfounded/Wellfounded.v"} |
from copy import deepcopy
import json
import matplotlib.pyplot as plt
from src.inpainting.inpaint import train, generate
import numpy as np
import os
def inpaint_samples(mode):
if not os.path.exists('inpaint_runs'):
os.mkdir('inpaint_runs')
with open(f'data/anns.json', 'r') as f:
data_map = json... | {"hexsha": "ce18044de9e79654bf11ce9fd1b53da9e312f6f4", "size": 2270, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/inpainting/inpaint_scalebars.py", "max_stars_repo_name": "tldr-group/GAN-boilerplate", "max_stars_repo_head_hexsha": "2b4080a6d61c28bebe4592ace2664f1460342082", "max_stars_repo_licenses": ["MI... |
"Parse numpy-style docstrings"
"""
Based on code from numpy, which is:
Copyright (c) 2005-2022, NumPy Developers.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code mu... | {"hexsha": "b01c1f02a1612aaba7cd4950e1c96d4b8f9b04d5", "size": 8687, "ext": "py", "lang": "Python", "max_stars_repo_path": "fastcore/docscrape.py", "max_stars_repo_name": "warner-benjamin/fastcore", "max_stars_repo_head_hexsha": "a1605cda8f2e3a85849106381be06805f1b5f865", "max_stars_repo_licenses": ["Apache-2.0"], "max... |
import random as rnd
from copy import copy
from importlib import reload
import numpy as np
from sklearn.metrics import make_scorer
from sklearn.model_selection import cross_val_score
class AddDelWrapper(object):
"""
Creates add-del feature wrapper
Parameters
----------
estimator:... | {"hexsha": "f4377aaa9f64bbebde75261a4ac7b1b5dce2c8df", "size": 6947, "ext": "py", "lang": "Python", "max_stars_repo_path": "ITMO_FS/wrappers/deterministic/AddDelWrapper.py", "max_stars_repo_name": "18756/ITMO_FS", "max_stars_repo_head_hexsha": "d0465c61b15264812b3455194e8b9eea93b3f550", "max_stars_repo_licenses": ["BSD... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'remoteQt.ui'
#
# Created by: PyQt5 UI code generator 5.10.1
#
# WARNING! All changes made in this file will be lost!
import PyQt5
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtGui import QPixmap, QImage
from PyQt5.QtCore import QT... | {"hexsha": "574a762fab170fa3bd63a7fd84d5051a1e4a8a9a", "size": 14505, "ext": "py", "lang": "Python", "max_stars_repo_path": "ControlServer/remoteQt.py", "max_stars_repo_name": "lujmoarf/AutonomousCar", "max_stars_repo_head_hexsha": "1b8dd7a1dba72ba8b71224f9adf05f91f06c8224", "max_stars_repo_licenses": ["Apache-2.0"], "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.