text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import numpy as np def normalize(mat): """ Normalize a matrix along the axis 1. :param np.ndarray mat: Matrix to normalize. :return np.ndarray: Normalized matrix. """ if len(mat.shape) == 1: summed = mat.sum() if summed == 0: return np.zeros_like(mat) return...
{"hexsha": "85533e03c6995d269dccbb6e833ea499d83a4bd9", "size": 3922, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/math_util.py", "max_stars_repo_name": "hiaoxui/D2T_Grounding", "max_stars_repo_head_hexsha": "4c46f8a8d2867712399ac7c0e7f7f34ef911a69a", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
from preprocess import * from pyspark.ml.classification import RandomForestClassifier from pyspark.sql.functions import col, when, concat_ws from pyspark.ml.feature import StringIndexer, VectorAssembler from pyspark.ml.regression import LinearRegression import pandas as pd from sklearn.model_selection import train_test...
{"hexsha": "4c323fe45d3f0e2a3a3c961ef775feba1540f38d", "size": 4124, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlPrep.py", "max_stars_repo_name": "JonathanSolvesProblems/Soen-471-Project", "max_stars_repo_head_hexsha": "f9039df455a3a150a0211bd0241f1ae611ac3a28", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) BaseDetection, Inc. and its affiliates. All Rights Reserved from typing import Dict import numpy as np import torch import torch.nn.functional as F from torch import nn from cvpods.layers import Conv2d, ConvTranspose2d, ShapeSpec class FCNHead(nn.Modu...
{"hexsha": "c44a46240388ba33d5ec1b76c5575e58de7054af", "size": 5180, "ext": "py", "lang": "Python", "max_stars_repo_path": "cvpods/modeling/meta_arch/fcn.py", "max_stars_repo_name": "reinforcementdriving/cvpods", "max_stars_repo_head_hexsha": "32d98b74745020be035a0e20337ad934201615c4", "max_stars_repo_licenses": ["Apac...
#!/usr/bin/env python3 """ Grid features extraction script. """ import argparse import os import torch import tqdm from fvcore.common.file_io import PathManager from detectron2.checkpoint import DetectionCheckpointer from detectron2.config import get_cfg from detectron2.engine import default_setup from detectron2.eva...
{"hexsha": "7c62e1ba59e97f238e09a86895f6c890c24d960e", "size": 5819, "ext": "py", "lang": "Python", "max_stars_repo_path": "CLIP-ViL-Direct/vqa/pythia_clip_grid_feature.py", "max_stars_repo_name": "HermannLiang/CLIP-ViL", "max_stars_repo_head_hexsha": "49c28bc5ece1aacfcbfd9c8810db70663ca0516a", "max_stars_repo_licenses...
# Taylor problem 1.39 last revised: 07-Jan-2019 by Dick Furnstahl [furnstahl.1@osu.edu] The goal of this notebook is to practice Python while considering some visualizations of problem 1.39 to see how they might help check the results, interpret the behavior, or suggest new ideas on how to extend the problem. Sugges...
{"hexsha": "323c92de84f17124f78bed782413edf9f93d87eb", "size": 605785, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "2020_week_1/Taylor_problem_1.39.ipynb", "max_stars_repo_name": "CLima86/Physics_5300_CDL", "max_stars_repo_head_hexsha": "d9e8ee0861d408a85b4be3adfc97e98afb4a1149", "max_stars_repo_...
from bootstrapping import bootstrap import numpy as np import matplotlib.pyplot as plt # generate 10,000 standard normal variables sample = np.random.randn(10000) # Run the bootstrap algorithm. Do 50,000 random resamplings and then calculate # the standard deviation for each one. bootstrap_values = bootstrap(sample,...
{"hexsha": "ad1f3fba828217e8cc54168a934612cf982265c8", "size": 640, "ext": "py", "lang": "Python", "max_stars_repo_path": "bootstrap_test.py", "max_stars_repo_name": "ananswam/bootstrapping", "max_stars_repo_head_hexsha": "3dd412917751b4ea9295311881fe79851a9552b1", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#ifndef _INCLUDED_UBLAS_VECTOR_HPP_ #define _INCLUDED_UBLAS_VECTOR_HPP_ #include <boost/serialization/list.hpp> #include <boost/serialization/string.hpp> #include <boost/serialization/version.hpp> #include <boost/serialization/split_free.hpp> #include <boost/numeric/ublas/vector.hpp> namespace boost { namespace ser...
{"hexsha": "3d083c36a47c071d5d8fbb7e3ff831f89616f1b4", "size": 1282, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost_ext/ublas_vector.hpp", "max_stars_repo_name": "ahmadia/hypermesh", "max_stars_repo_head_hexsha": "c694d634a8493c94be39488b85aacc2d1b8884e7", "max_stars_repo_licenses": ["MIT"], "max_st...
c------------------------------------------------------------------ c Computes double covariance or correlation matrix c------------------------------------------------------------------ C NCLFORTSTART subroutine dcovarxy(x,y,xmsg,ymsg,cxy,n,m,lag,ncrit,iopt) implicit none c ...
{"hexsha": "0b367a2b93c245f089035ed2108ee24931ff3a79", "size": 1841, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ni/src/lib/nfpfort/covcorm_xy_matrix_ncl.f", "max_stars_repo_name": "tenomoto/ncl", "max_stars_repo_head_hexsha": "a87114a689a1566e9aa03d85bcf6dc7325b47633", "max_stars_repo_licenses": ["Apache-2....
""" pretty(doc) Pretty print the parsed HTML `doc`. """ function pretty(doc) io = IOBuffer() print(io, doc; pretty=true) return String(take!(io)) end function map!(f::Function, doc::HTMLDocument) for elem in PreOrderDFS(doc.root) if elem isa HTMLElement # Changing elem directly...
{"hexsha": "3beb1f72d3f705acbc0593824c089cc4e99d1d34", "size": 3347, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/select.jl", "max_stars_repo_name": "rikhuijzer/Skann.jl", "max_stars_repo_head_hexsha": "3e5cb898b5ab360fd7982aeffe794d62b09c575f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9, "ma...
import os import numpy as np import cv2 from . import find_tools as ft # noinspection PyArgumentList hog = cv2.HOGDescriptor((32, 64), (16, 16), (8, 8), (8, 8), 9, 1, 4, 0, 0.2, 0, 64) def find_right_lung_hog(image): hog.setSVMDetector( np.loadtxt(os.path.dirname(__file__) + os.sep + "right_lung_hog.np",...
{"hexsha": "314742ef9a8fe02b44e26dfa8b3383f9be9f1af8", "size": 745, "ext": "py", "lang": "Python", "max_stars_repo_path": "lungs_finder/hog_finder.py", "max_stars_repo_name": "ggalal/lungs-finder", "max_stars_repo_head_hexsha": "d31e20a88f1de3c9b62025dc2875b01f7806f4d9", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
# Copyright (c) 2019 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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 # #...
{"hexsha": "139f048cc9a43f5f55994932c3564dbf92494c5e", "size": 35077, "ext": "py", "lang": "Python", "max_stars_repo_path": "pcg_gazebo/generators/creators.py", "max_stars_repo_name": "TForce1/pcg_gazebo", "max_stars_repo_head_hexsha": "9ff88016b7b6903236484958ca7c6ed9f8ffb346", "max_stars_repo_licenses": ["ECL-2.0", "...
import itertools import numpy as np from game import Grid, Game from config import * config = Base() def get_grid(tiles, directions): g = Grid(config.SIZE) g.tiles = tiles.copy() for direction in directions: g.run(direction) g.add_random_tile() return g.tiles def printf(tiles): ...
{"hexsha": "7b85e5dd64f8a2f31f942c379355d398b6597db4", "size": 7745, "ext": "py", "lang": "Python", "max_stars_repo_path": "01 VacantHusky-2048GameAutoMovePython/2048python/ai.py", "max_stars_repo_name": "Guleixibian2009/Game-Collection", "max_stars_repo_head_hexsha": "1d8997b3ab0ea38958ed67dab7132bc89d467644", "max_st...
import numpy as np import time from collections import Counter class Vocabulary(object): UNK = '<unk>' def __init__(self, offset=0, unk=True): self.word_to_ind = {} self.ind_to_word = {} self.word_count = Counter() self.size = 0 self.offset = offset self.specia...
{"hexsha": "b11d7392633e1034d8a976c1b27f00a171ae588d", "size": 2811, "ext": "py", "lang": "Python", "max_stars_repo_path": "cocoa_folder/cocoa/model/vocab.py", "max_stars_repo_name": "s-akanksha/DialoGraph_ICLR21", "max_stars_repo_head_hexsha": "d5bbc10b2623c9f84d21a99a5e54e7dcfdfb1bcc", "max_stars_repo_licenses": ["Ap...
/** * Copyright (C) 2014 MongoDB Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be usefu...
{"hexsha": "5a5f9798299f445e66894af43d4228e9689e84ac", "size": 19322, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/mongo/db/commands/pubsub_commands.cpp", "max_stars_repo_name": "EshaMaharishi/pubsub-1", "max_stars_repo_head_hexsha": "13cb194078ed39b00ea623db0d87df8e153e7981", "max_stars_repo_licenses": ["A...
import numpy as np from numpy.linalg import inv from basics.base_agent import BaseAgent class LinUCBAgent(BaseAgent): def __init__(self): super().__init__() self.name = "LinUCB" def agent_init(self, agent_info=None): if agent_info is None: agent_info = {} self....
{"hexsha": "39ce44ecbbdd78c4fedb80695d28731a901711de", "size": 7750, "ext": "py", "lang": "Python", "max_stars_repo_path": "CMAB/LinUCB.py", "max_stars_repo_name": "RecoHut-Stanzas/S873634", "max_stars_repo_head_hexsha": "ae67db296ada7ab31d77c51d048254c7c028620e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
[STATEMENT] lemma is_min2_Empty[simp]: "\<not>is_min2 x {}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> is_min2 x {} [PROOF STEP] by (auto simp: is_min2_def)
{"llama_tokens": 79, "file": "Priority_Search_Trees_PST_General", "length": 1}
#include "plugins/lasso3d/lasso3d.h" #include <QDebug> #include <QEvent> #include <QKeyEvent> #include <QAction> #include <QGLShaderProgram> #include <QGLBuffer> #include <QTabWidget> #include <QApplication> #include <QToolBar> #include <QVBoxLayout> #include <QDoubleSpinBox> #include <QLabel> #include <QSpacerItem> #i...
{"hexsha": "c6e3dc9154f6aba9b0ab679f2a557678287199f3", "size": 7280, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/plugins/lasso3d/lasso3d.cpp", "max_stars_repo_name": "circlingthesun/cloudclean", "max_stars_repo_head_hexsha": "4b9496bc3b52143c35f0ad83ee68bbc5e8aa32d5", "max_stars_repo_licenses": ["MIT"], "m...
# -*- coding:utf8 -*- """ This module contains visualization tools for uesgraphs """ import networkx as nx import matplotlib import matplotlib.pyplot as plt from matplotlib.pylab import mpl from matplotlib.collections import LineCollection from matplotlib import gridspec from mpl_toolkits.axes_grid1 import make_axes_l...
{"hexsha": "9735fd9e83b2812107e4a8aa0406c98c02dcf095", "size": 63342, "ext": "py", "lang": "Python", "max_stars_repo_path": "uesgraphs/visuals.py", "max_stars_repo_name": "RWTH-EBC/uesgraphs", "max_stars_repo_head_hexsha": "498fc57cd251dc93f51279275a965d77775e68b8", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/python3 # https://matplotlib.org/examples/pylab_examples/contourf_demo.html import numpy as np from matplotlib import gridspec import matplotlib.pyplot as plt import matplotlib.patches as patches from matplotlib.colors import LogNorm from skimage.measure import block_reduce from astropy.io import fits # Eve...
{"hexsha": "c2a303cf1965fe7cc009f60143d217c0cd799314", "size": 12030, "ext": "py", "lang": "Python", "max_stars_repo_path": "Na_im.py", "max_stars_repo_name": "jpmorgen/IoIO", "max_stars_repo_head_hexsha": "c22523d77bc38162cabf3ddb6d7446e4005864e8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_r...
""" File: pfb_peek.py USAGE: python pfb_peek.py <pfb_file> DESCRIPTION: Peeks into a parflow .pfb file and display a summary of the file. This prints to stdout a summary of the .pfb file. It prints the file header from the first 64 bytes. Then prints the subgrid headers of ...
{"hexsha": "c9a032f13373fdf2a1956d31ec997bbd5aefda12", "size": 5901, "ext": "py", "lang": "Python", "max_stars_repo_path": "pf_xarray/tests/pfb_peek.py", "max_stars_repo_name": "wh3248/pf-xarray", "max_stars_repo_head_hexsha": "f971e0c3e9962958fcf807e45d2623a0784cba8c", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import sys sys.path.append('../../') import unittest import numpy as np from qwopt.compiler.parser import GraphParser class GraphParserTest(unittest.TestCase): def test_dim(self): test_mat = [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]] gparser = GraphParser(test_mat) gdim = gp...
{"hexsha": "345402cd4eaf1f6b4774927650a2338be5593007", "size": 2260, "ext": "py", "lang": "Python", "max_stars_repo_path": "qwopt/test/parser_test.py", "max_stars_repo_name": "Chibikuri/qwopt", "max_stars_repo_head_hexsha": "e65549db83142af4c6b63cce9f55050ee87fb27a", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
import matplotlib.pyplot as plt import numpy as np # add noise to y axis to avoid overlapping def rand_jitter(arr): # "Range" = (max(arr) - min(arr)) nosie = .01 * (max(arr) - min(arr)) return arr + np.random.randn(len(arr)) # https://stackoverflow.com/questions/4383571/importing-files-from-different-fo...
{"hexsha": "c9371075add54ebd67285a385122202297f68547", "size": 4360, "ext": "py", "lang": "Python", "max_stars_repo_path": "jb/rand_jitter.py", "max_stars_repo_name": "james-w-balcomb/kaggle--home-credit-default-risk", "max_stars_repo_head_hexsha": "b8346ba1640c42daf8457588f7fadd81ded74b8f", "max_stars_repo_licenses": ...
# vs_circuit_solver.py # версия 0.1 # язык Python # # программа подбора значений R,C для вариантов электронной схемы # исходя из моделирования подобной схемы в ngspice # поставляется без всякой оптимизации, ибо имеет целью установление методики # расчета таких вещей и определения границ применимости этой методики # # ...
{"hexsha": "3dadbecacffb0a124c3eb501a4f9e43915d34fb7", "size": 37787, "ext": "py", "lang": "Python", "max_stars_repo_path": "vs_circuit_solver/vs_circuit_solver.py", "max_stars_repo_name": "EPC-MSU/VS-circuit-solver", "max_stars_repo_head_hexsha": "7d877dcc6b5aed5919c8f0833fc003a7fa651bc5", "max_stars_repo_licenses": [...
import argparse import os, sys import torch import torch.nn as nn import torch.optim as optim import torch.backends.cudnn as cudnn import torchvision from torchvision import transforms from PIL import Image import numpy as np from tqdm import tqdm from sklearn.cluster import KMeans from scipy.stats import ortho_group ...
{"hexsha": "43d1043317898b4642b6c414573dc3fda193df8f", "size": 8685, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/trainMyPCL.py", "max_stars_repo_name": "Crazy-Jack/SpatialExpGeneCluster", "max_stars_repo_head_hexsha": "9e57c308d1c577a936a2358d0641c65b8130034f", "max_stars_repo_licenses": ["MIT"], "max_st...
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2019, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
{"hexsha": "d16d855fd4f368cdc0850dd99146f277d3de54b0", "size": 34558, "ext": "py", "lang": "Python", "max_stars_repo_path": "TrainingExtensions/tensorflow/src/python/aimet_tensorflow/cross_layer_equalization.py", "max_stars_repo_name": "quic-bharathr/aimet", "max_stars_repo_head_hexsha": "363308217dca3fc52644bdda31e69e...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Concrete.Records open import LibraBFT.Concrete.System op...
{"hexsha": "8e071ba4b8532447d7491e3c8f57d7223e714738", "size": 33911, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/LibraBFT/Impl/Properties/VotesOnce.agda", "max_stars_repo_name": "LaudateCorpus1/bft-consensus-agda", "max_stars_repo_head_hexsha": "a4674fc473f2457fd3fe5123af48253cfb2404ef", "max_stars_repo...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 Jinsong Liu <jinsongliu@utexas.edu> # # Distributed under terms of the GNU-License license. """ """ import sys sys.path.append('/Users/jinsongliu/Box Sync/Dissertation_UT/OMAE2018/UQ_FOWT') import os import csv import numpy as np i...
{"hexsha": "e3986cbd3e554174173aebd1f7b070c8e465d657", "size": 7445, "ext": "py", "lang": "Python", "max_stars_repo_path": "uqra/uqplot/MUSEPlot.py", "max_stars_repo_name": "Jinsongl/UQRA", "max_stars_repo_head_hexsha": "09c7042f8c35a262a942224e2367540b5fd2b077", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_...
using Documenter push!(LOAD_PATH, "../../src") using Stipple, Stipple.Elements, Stipple.Layout, Stipple.Typography makedocs( sitename = "Stipple - data dashboards and reactive UIs for Julia", format = Documenter.HTML(prettyurls = false), pages = [ "Home" => "index.md", "Stipple API" => [...
{"hexsha": "a5ab07072505141a1a3a0d2c94acfe2f7d21e264", "size": 627, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "jeremiedb/Stipple.jl", "max_stars_repo_head_hexsha": "4dafaa54219a9b837db7e040f3121acd64c94351", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max...
// // Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BEAST_UNIT_TEST_SUITE_LIST_HPP #define BEAST_UNIT_TEST_SUITE_LIST_HPP #i...
{"hexsha": "41526a2d052b21144b3ac98a4ea9a772a2eb866c", "size": 1801, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/beast/extras/beast/unit_test/suite_list.hpp", "max_stars_repo_name": "sneh19337/rippled", "max_stars_repo_head_hexsha": "442205bdf270d26f0936f7ece5f03bcc952a6a8b", "max_stars_repo_licenses": ["B...
import os import collections import logging import yaml import torch import torchvision import numpy as np from skimage import io from mathtools import utils, torchutils, metrics logger = logging.getLogger(__name__) class ImageClassifier(torch.nn.Module): def __init__( self, out_dim, f...
{"hexsha": "cf3c54d80000970785cbe2afd0152ec47f67db98", "size": 11183, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/predict_video_pytorch.py", "max_stars_repo_name": "jd-jones/kinemparse", "max_stars_repo_head_hexsha": "279a9989981aa2a0eef1e46e5d02833f51ae352d", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python ''' @package prototype.coverage.record_set @file prototype/coverage/record_set.py @author David Stuebe @author Tim Giguere @brief https://confluence.oceanobservatories.org/display/CIDev/R2+Construction+Data+Model ''' import numpy class IterableExpression(dict): """ This class should i...
{"hexsha": "b6edb32c18309b46b1810fb3975458e41115c34e", "size": 864, "ext": "py", "lang": "Python", "max_stars_repo_path": "prototype/coverage/iterable_expression.py", "max_stars_repo_name": "ooici/pyon", "max_stars_repo_head_hexsha": "122c629290d27f32f2f41dafd5c12469295e8acf", "max_stars_repo_licenses": ["BSD-2-Clause"...
# -*- coding: utf-8 -*- ''' Smooth Component (1) This module contains the class for the convex heuristic for a piecewise linear function. A piecewise constant function has a sparse second-order difference; many changes in slope are exactly zero and a small number of them can be large. A convex approximation of this p...
{"hexsha": "e9ffa5f5816e1e31dd03642d2627e6c0bfba438a", "size": 7717, "ext": "py", "lang": "Python", "max_stars_repo_path": "osd/classes/norm1_second.py", "max_stars_repo_name": "bmeyers/optimal-signal-decomposition", "max_stars_repo_head_hexsha": "14376d38e3b2965e0ccdaf4a8a1c3683697c146c", "max_stars_repo_licenses": ["...
# -*- coding: utf-8 -*- """ Author: @gabvaztor StartDate: 04/03/2017 This file contains the next information: - Libraries to import with installation comment and reason. - Data Mining Algorithm. - Sets (train,validation and test) information. - ANN Arquitectures. - A lot of utils methods which you'...
{"hexsha": "a2ac16b7fcb5012ddf3099913435e1b50c79b433", "size": 6557, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/projects/German_Signal/TFBooster_.py", "max_stars_repo_name": "Gabvaztor/TFBoost__", "max_stars_repo_head_hexsha": "a37b906f5cb47becc3275def8282ff395d06ef45", "max_stars_repo_licenses": ["Apac...
function conv(path::String) data = [] lines = open(readlines, path) lines = map(chomp, lines) for i = 1:length(lines) line = lines[i] if isempty(line) push!(data, "") continue end items = split(line, " ") word = String(items[1]) tag...
{"hexsha": "e503653a62fd26612543194267244c7c15dc4256", "size": 1848, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "ner/preprocess/convert.jl", "max_stars_repo_name": "hshindo/Merlin-Examples", "max_stars_repo_head_hexsha": "a12fd471d5271b99f6d9680d8c768661dca1ea31", "max_stars_repo_licenses": ["MIT"], "max_star...
From mathcomp Require Import all_ssreflect. From AUChain Require Import BlockTree Blocks Messages Parameters LocalState StateMonad. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. (** * Protocol Execution plan for each party pr. round: ...
{"author": "AU-COBRA", "repo": "PoS-NSB", "sha": "8cb62e382f17626150a4b75e44af4d270474d3e7", "save_path": "github-repos/coq/AU-COBRA-PoS-NSB", "path": "github-repos/coq/AU-COBRA-PoS-NSB/PoS-NSB-8cb62e382f17626150a4b75e44af4d270474d3e7/Protocol/Protocol.v"}
import numpy as np PARADIGM = np.array([['A','B','C','D','E','F'], ['G','H','I','J','K','L'], ['M','N','O','P','Q','R'], ['S','T','U','V','W','X'], ['Y','Z','1','2','3','4'], ['5','6','7','8','9','_']]) ...
{"hexsha": "9fc891d646f710bf2f8261d773a08d5d48c208cb", "size": 324, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/paradigm.py", "max_stars_repo_name": "Yuchen-Wang-SH/Electroencephalography-EEG-Signal-Classification-using-Deep-Learning", "max_stars_repo_head_hexsha": "55a3100182b7b5340ada375d46dd9ca0a...
"""GLUT replacement for the original checker.py demonstration code Note: Has no navigation code ATM. """ # This is statement is required by the build system to query build info if __name__ == '__build__': raise Exception __version__='$Revision: 1.1.1.1 $'[11:-2] __date__ = '$Date: 2007/02/15 19:25:11 $'[6:-2] imp...
{"hexsha": "4d0bbd301381536d05fe0c47cbb92376ca2b8f79", "size": 2898, "ext": "py", "lang": "Python", "max_stars_repo_path": "002-pyopengl/PyOpenGL-Demo-3.0.1b1/PyOpenGL-Demo/GLUT/tom/checker.py", "max_stars_repo_name": "lhl/vrdev", "max_stars_repo_head_hexsha": "fc1a9af2b51d159c99c8779349ef3392a70ed9ed", "max_stars_repo...
""" Molecular depiction features. """ __author__ = "Steven Kearnes" __copyright__ = "Copyright 2014, Stanford University" __license__ = "BSD 3-clause" import io import numpy as np from PIL import Image def load(string): """ Load an image from a file or binary string. Parameters ---------- strin...
{"hexsha": "cd41912b76e50ca23b14445c3e70b7206375b683", "size": 2243, "ext": "py", "lang": "Python", "max_stars_repo_path": "vs_utils/utils/image_utils.py", "max_stars_repo_name": "rbharath/pande-gas", "max_stars_repo_head_hexsha": "7a947d087ba2dd77c4bbbb89b604cf83acdff5f3", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
[STATEMENT] lemma gc_W_empty_invL[intro]: notes fun_upd_apply[simp] shows "\<lbrace> handshake_invL \<^bold>\<and> obj_fields_marked_invL \<^bold>\<and> gc_W_empty_invL \<^bold>\<and> LSTP valid_W_inv \<rbrace> gc \<lbrace> gc_W_empty_invL \<rbrace>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbr...
{"llama_tokens": 4532, "file": "ConcurrentGC_Noninterference", "length": 12}
[STATEMENT] lemma Standard_hnorm [simp]: "x \<in> Standard \<Longrightarrow> hnorm x \<in> Standard" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<in> Standard \<Longrightarrow> hnorm x \<in> Standard [PROOF STEP] by (simp add: hnorm_def)
{"llama_tokens": 88, "file": null, "length": 1}
/* * Copyright (c) 2015, The Regents of the University of California (Regents). * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the a...
{"hexsha": "4e0dda356be6e1642fed0d731292b8eae84367bf", "size": 3059, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/test_rotation.cpp", "max_stars_repo_name": "jamesdsmith/berkeley_sfm", "max_stars_repo_head_hexsha": "de3ae6b104602c006d939b1f3da8c497b86d39ff", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
using DEBTrait, Test el = "C4H9NO2" chemFormBiom = [1, 1.8, 0.2, 0.5, 0, 0, 0] chemical_composition = DEBTrait.ThermoStoichWizard.extract_composition(el) # CHNOSP @test chemical_composition == [4,9,1,2,0,0] stoich_electron_donor = DEBTrait.ThermoStoichWizard.get_stoich_electron_donor(el) @test stoich_electron_donor ...
{"hexsha": "12b781547ff7bc3c7c90a15dd990d2ab2623c8c5", "size": 1080, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_ThermoStoichWizard.jl", "max_stars_repo_name": "giannamars/DEBTrait.jl", "max_stars_repo_head_hexsha": "3ce3dae8224f8226f727d43c5f2a05bd94c9a93f", "max_stars_repo_licenses": ["MIT"], "max...
\documentclass{article} \title{AATOM - An Agent-based Airport Terminal Operations Model Simulator} \author{Stef Janssen \\\href{mailto:s.a.m.janssen@tudelft.nl}{\textit{s.a.m.janssen@tudelft.nl}} \\\textit{Delft University of Technology} } \date{September 2017} \usepackage{natbib} \usepackage{graphicx} \usepackage{l...
{"hexsha": "0491d8ff766c3ff67c16777228c170a29d2ad77b", "size": 22969, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Tutorials/Tutorial.tex", "max_stars_repo_name": "StefJanssen/SeRiMa-ABM", "max_stars_repo_head_hexsha": "3fdf9f64037b1684b23a4c91323ca38589d86524", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import numpy as np from .base import BaseOptimizer class GradientDescent(BaseOptimizer): def __init__(self, trainable_layers): super(GradientDescent, self).__init__(trainable_layers) def initialize(self): pass def update(self, learning_rate, w_grads, b_grads, step): for layer in...
{"hexsha": "6a4b81d58886a1237147a5f7ebf04637a8c627d3", "size": 4237, "ext": "py", "lang": "Python", "max_stars_repo_path": "mini_keras/optimizer.py", "max_stars_repo_name": "Deep-Alchemy/Mini-Keras", "max_stars_repo_head_hexsha": "07aeb129c2530d39dc4dcea139c6fba72268d535", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" A Stage to load data from a CSV datarelease format file into a PISA pi ContainerSet """ from __future__ import absolute_import, print_function, division import numpy as np import pandas as pd from pisa import FTYPE from pisa.core.pi_stage import PiStage from pisa.utils.profiler import profile from pisa.core.cont...
{"hexsha": "5d3f670055807c9067dd675aed247aa7a90448dd", "size": 2473, "ext": "py", "lang": "Python", "max_stars_repo_path": "pisa/stages/data/csv_data_hist.py", "max_stars_repo_name": "wym109/pisa", "max_stars_repo_head_hexsha": "696803320f577d241651df900726b76a770d072a", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
module remesh_smoothing_examples using FinEtools using FinEtools.MeshExportModule using FinEtools.TetRemeshingModule function remesh1() L= 0.3; W = 0.3; a = 0.15; nL=46; nW=46; na=36; fens,fes = T4block(a,L,W,nL,nW,na,:a); t = deepcopy(connasarray(fes)); v = deepcopy(fens.xyz); tm...
{"hexsha": "22838fb3207beba5336e7a0d690ccc80c8b7237f", "size": 2554, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/meshing/remesh_smoothing_examples.jl", "max_stars_repo_name": "KristofferC/FinEtools.jl", "max_stars_repo_head_hexsha": "b0ce27e6a8aa63d1057307bcf36919239b1f3279", "max_stars_repo_licenses...
classdef Residuals < Exportable %--- * --. --- --. .--. ... * --------------------------------------------- % ___ ___ ___ % __ _ ___ / __| _ | __| % / _` / _ \ (_ | _|__ \ % \__, \___/\___|_| |___/ % |___/ v 1.0RC1 % %------------------...
{"author": "goGPS-Project", "repo": "goGPS_MATLAB", "sha": "30644df61d2459e3347ac5f3e31b71d9f69f4b01", "save_path": "github-repos/MATLAB/goGPS-Project-goGPS_MATLAB", "path": "github-repos/MATLAB/goGPS-Project-goGPS_MATLAB/goGPS_MATLAB-30644df61d2459e3347ac5f3e31b71d9f69f4b01/source/obj/Residuals.m"}
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Aug 25 08:41:10 2017 @author: Yann Roussel and Tuan Bui Edited by: Emine Topcu on Sep 2021 """ from collections import Counter import Const import json import matplotlib.image as mpimg import numpy as np # Import pandas for data saving import pandas as...
{"hexsha": "5b083aa8f51809567ad97b0924bb9bbe878a002d", "size": 14699, "ext": "py", "lang": "Python", "max_stars_repo_path": "Zebrafish spinal locomotor circuit/Version 2/Util.py", "max_stars_repo_name": "Bui-lab/Code", "max_stars_repo_head_hexsha": "6ce5972a4bd0c059ab167522ab1d945f3b0f5707", "max_stars_repo_licenses": ...
#!/usr/bin/env python #import numpy as np import boards import rules def print_initial_state(grid): print("-"*50) print("initial board:") grid.print_found() grid.print_statistics() print("-"*50) def print_end_state(grid): print("-"*50) print("remaining candidates:") grid.print_candida...
{"hexsha": "50cd08a3524cf56cee70dec23c3e0437ed3a5574", "size": 1518, "ext": "py", "lang": "Python", "max_stars_repo_path": "solver.py", "max_stars_repo_name": "christiana/sudoku_solver", "max_stars_repo_head_hexsha": "5066cbba736dc07f465f20e6509542ac729651ad", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_cou...
from pathlib import Path from functools import partial import joblib import torch import numpy as np import pandas as pd import sentencepiece as spm from tqdm import tqdm from sklearn.model_selection import StratifiedShuffleSplit from helperbot import setup_differential_learning_rates, freeze_layers from helperbot.lr_...
{"hexsha": "7ccdc14dfcfb7feb20e9841253e85275da2a3e81", "size": 8503, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/sentiment_analysis/douban_sentiment.py", "max_stars_repo_name": "ceshine/modern_chinese_nlp", "max_stars_repo_head_hexsha": "e1d5941f381431ac114f440472d3e0f976437777", "max_stars_repo_lice...
[STATEMENT] lemma hequiv_names: \<open>hequiv H i j \<Longrightarrow> i \<in> names H\<close> [PROOF STATE] proof (prove) goal (1 subgoal): 1. hequiv H i j \<Longrightarrow> i \<in> names H [PROOF STEP] unfolding hequiv_def names_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. Nom j at i in' H \<Longrightarrow> ...
{"llama_tokens": 170, "file": "Hybrid_Logic_Hybrid_Logic", "length": 2}
import os.path as osp PATH_TO_ROOT = osp.join(osp.dirname(osp.realpath(__file__)), '..', '..', '..') import sys sys.path.append(PATH_TO_ROOT) import pickle import time import numpy as np import torch from torch.utils.tensorboard import SummaryWriter from torch.optim.lr_scheduler import StepLR from models.pointnet.src.u...
{"hexsha": "cbbecb922401274e31912c3ad07cb8e5c2af2c9e", "size": 9507, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/segmentation/PointNet/run_pointnet_segmentation.py", "max_stars_repo_name": "devskroy1/ForkedBrainSurfaceTK", "max_stars_repo_head_hexsha": "774035ab5eae6c0a40eb96eab43d489d3f722eaa", "max...
import csv import re import math import matplotlib.pyplot as plt import numpy as np import sys sys.path.append("..") # adds higher directory to python modules path from LoaderPACK.Loader import testload_5min import torch val_load_file = testload_5min(path = "/home/tyson/data_cutoff/val_model_data", ...
{"hexsha": "0eb4a6950491efd4f36f490786fae22677822ca1", "size": 775, "ext": "py", "lang": "Python", "max_stars_repo_path": "Testing loader/.ipynb_checkpoints/test-loader-checkpoint.py", "max_stars_repo_name": "marctimjen/Artefact-Rejection", "max_stars_repo_head_hexsha": "4e850d172fa8c08ba1776c46e760484673d7e7ad", "max_...
import os from abc import ABC, abstractmethod import numpy as np import torch import torch.optim as opt from sklearn import metrics from torch import nn from classifiers import Net device = torch.device("cuda" if torch.cuda.is_available() else "cpu") class Classifier(nn.Module): def __init__(self, model=Net, n...
{"hexsha": "30c67cedabba0c6d6f2623f024540297443b81e2", "size": 6369, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/base_models.py", "max_stars_repo_name": "jbr-ai-labs/PU-OC", "max_stars_repo_head_hexsha": "4030a67353594d864a2a9482dd3f5d206cbd28ae", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
// $Id$ /*********************************************************************** Moses - factored phrase-based, hierarchical and syntactic language decoder Copyright (C) 2009 Hieu Hoang This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License...
{"hexsha": "c232c9bc37d5eba61e2fd51944c13fbc7441710a", "size": 10654, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "model/mosesdecoder/OnDiskPt/TargetPhrase.cpp", "max_stars_repo_name": "saeedesm/UNMT_AH", "max_stars_repo_head_hexsha": "cc171bf66933b5c0ad8a0ab87e57f7364312a7df", "max_stars_repo_licenses": ["Apac...
import numpy as np import cv2 import csv # Hyper Parameters L = 2 # Read the csv file. csv_reader = csv.reader(open('./data/passingevents.csv')) # The first match.(First match and self passing only.) passing_list = [row for row in csv_reader if row[1] == 'Huskies'] passing_cnt = len(passing_list) # Analyzing the da...
{"hexsha": "4aa7761e7d91bac1af65faad25f65dca49a5a970", "size": 2024, "ext": "py", "lang": "Python", "max_stars_repo_path": "problem1_solve1.py", "max_stars_repo_name": "ligongzzz/MCM2020_Code", "max_stars_repo_head_hexsha": "7e5e6f9a6b09b3eb7e21774535c977ba6e974d79", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import requests from clint.textui import progress import urllib2 from bs4 import BeautifulSoup import threading import pafy import time import sys from pathlib import Path import os import vlc import nltk from nltk.stem.lancaster import LancasterStemmer import json import numpy as np from pydub import AudioSegment from...
{"hexsha": "b70fde4beb3000907f788d149128b36275952240", "size": 15382, "ext": "py", "lang": "Python", "max_stars_repo_path": "tv_download.py", "max_stars_repo_name": "pmitra96/multi-threaded-downloader", "max_stars_repo_head_hexsha": "0b879cd05cf588ec497e3762456bdfd5678d00d9", "max_stars_repo_licenses": ["MIT"], "max_st...
! Copyright 2021 Ivan Pribec ! SPDX-License-Identifier: Apache-2.0 !> Semi-implicit Runge-Kutta method of third order !> !> This is a modernized version of the code originally given in !> !> Villadsen, J., & Michelsen, M. L. (1978). Solution of differential !> equation models by polynomial approximation. Prentice-...
{"hexsha": "c95e7bf3659e5ddf66f78fb3e6d46c82ee0ec7ee", "size": 8095, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/stiff3_solver.f90", "max_stars_repo_name": "awvwgk/stiff3", "max_stars_repo_head_hexsha": "7ed7379e1a20d229848fddec62453602216c2074", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
''' multilabel_confusion_matrix.py Run MATCH with PeTaL data. Last modified on 23 July 2021. DESCRIPTION multilabel_confusion_matrix.py plots multilabel confusion matrices based on the data in MATCH/PeTaL/results. In a multilabel confusion matrix, the rows correspond to ...
{"hexsha": "52115071b8b8ca4d0375c7a75165c8a3646d5b38", "size": 8978, "ext": "py", "lang": "Python", "max_stars_repo_path": "auto-labeler/MATCH/analysis/multilabel_confusion_matrix.py", "max_stars_repo_name": "nasa-petal/PeTaL-labeller", "max_stars_repo_head_hexsha": "b68d534c8c9f026860ce7fe869eef4c16fe35505", "max_star...
(* Some results about real numbers *) From intuitionism Require Import lib set seq spr fan func classic choice. From intuitionism Require Import bcp bar. (* Describing intervals of real numbers as binary sequences -------------------------------------------------------- We can describe the real numbers in [a_0, b_0] ...
{"author": "bergwerf", "repo": "intuitionism", "sha": "581ac55e8a5382d3f35cf8f9b09accb9b5f89ae8", "save_path": "github-repos/coq/bergwerf-intuitionism", "path": "github-repos/coq/bergwerf-intuitionism/intuitionism-581ac55e8a5382d3f35cf8f9b09accb9b5f89ae8/reals.v"}
import keras from keras.preprocessing.image import ImageDataGenerator from keras.datasets import cifar100,mnist,cifar10,fashion_mnist from scipy.io import loadmat import numpy as onp #original numpy import jax.numpy as jnp #jax numpy import itertools #import custom_datasets # TODO: Setup this function to take in a s...
{"hexsha": "48ae7516a75cb185f899718420d9eae5cc7c8cce", "size": 8739, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate_data.py", "max_stars_repo_name": "anonymous-code-submission/ICML2021_anon_code_submission", "max_stars_repo_head_hexsha": "0c6b57c6170dd763e400e32392ce946ff6a86dfd", "max_stars_repo_licen...
""" @file @brief Shape object. """ import numpy class BaseDimensionShape: """ Base class to @see cl DimensionObject, @see cl ShapeOperator, @see cl ShapeObject. """ def to_string(self, use_x=True): """ Converts the object into a string. """ raise NotImplementedErro...
{"hexsha": "d223d40bfc40a1d73ae541b43f2d86c830d70e77", "size": 29965, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlprodict/onnxrt/shape_object.py", "max_stars_repo_name": "xadupre/mlprodict", "max_stars_repo_head_hexsha": "f82c8a26a60104948c67849b1c4af95ca812c153", "max_stars_repo_licenses": ["MIT"], "max_s...
\section{Efficient Implementation on ARM8} \label{sec:arm} We show that our semantics compiles efficiently to \armeight{} \cite{deacon-git,DBLP:journals/pacmpl/PulteFDFSS18}. With one exception, we use the translation strategy of \citet{DBLP:journals/pacmpl/PodkopaevLV19}, which was extended to SC access by \citet[\t...
{"hexsha": "52fc31ffdc222e480786eb6a26f666bfe524b9c7", "size": 21155, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "corrigendum/short.tex", "max_stars_repo_name": "chicago-relaxed-memory/memory-model", "max_stars_repo_head_hexsha": "fd606fdb6a04685d9bb0bee61a5641e4623b10be", "max_stars_repo_licenses": ["CC-BY-4....
import matplotlib.pyplot as plt import numpy as np import pandas as pd import os plt.rcParams['font.sans-serif'] = 'SimHei' plt.rcParams['axes.unicode_minus'] = False def make_a_figure(): data = np.arange(10) p = plt.figure(figsize=(8, 6)) plt.title('line') plt.xlabel('X') plt.xlabel('Y') plt.xlim(0, 5) ...
{"hexsha": "7b6bf9498441da99c2443512ac8f8a33f5c41cdd", "size": 3091, "ext": "py", "lang": "Python", "max_stars_repo_path": "11_data_science/matplotlib/test_pyplot.py", "max_stars_repo_name": "edgardeng/python-advance-interview", "max_stars_repo_head_hexsha": "59fd7bee8e871acdc7fdfecf2a110db840c47ebb", "max_stars_repo_l...
// // Created by David Oberacker on 2019-07-31. // #include <string> #include <map> #include <queue> #include <boost/dynamic_bitset.hpp> #include "common/common.hpp" struct Node { uint8_t Symbol; bool IsLeaf; int64_t Left; int64_t Right; }; uint8_t decodeByte(boost::dynamic_bitset<> data, int64_t* o...
{"hexsha": "68a7f4cdf45bf66a465c7d4210dde3b9320bea23", "size": 2302, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/common/decoder.cpp", "max_stars_repo_name": "Oberacda/BorderlandsSaveEditor", "max_stars_repo_head_hexsha": "b959dc2c872f2a2ed4cc516c644b58f1f4425925", "max_stars_repo_licenses": ["MIT"], "max_s...
import tensorflow as tf import numpy as np import json from layers import Dense class SimpleRNN(object): def __init__(self,rnn_cell,overstructure,seq_len=5,feature_len=28,learning_rate=0.001,use_rnn_cell=True): self._rnn_cell = rnn_cell self._overstructure = overstructure self.learning_rate = learning_rate s...
{"hexsha": "2be597f5336bbc2877204bd1284387f0792203fa", "size": 3508, "ext": "py", "lang": "Python", "max_stars_repo_path": "rnn_net.py", "max_stars_repo_name": "Rufaim/Filtering-Clouds", "max_stars_repo_head_hexsha": "5703884a55f449ed737a3350d5276e29a69372f2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
using FastMarching using Images using FileIO function maze() Float64.(channelview(img)) img = load(joinpath(Pkg.dir("FastMarching"),"examples/images/maze.png")) end maze()
{"hexsha": "3ed961c19d2dd45caf7c8c3deeb7fe0ba00a4123", "size": 178, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/maze.jl", "max_stars_repo_name": "jgoldfar/FastMarching.jl", "max_stars_repo_head_hexsha": "ecd9bbb5b5b1120ca9e4fb88f36af679017d93c3", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star...
import logging import os import torch import torch.nn.functional as F from functools import partial from torch import nn, einsum import collections.abc as container_abcs import numpy as np from einops import rearrange, repeat from einops.layers.torch import Rearrange from timm.models.layers import DropPath, trunc_norm...
{"hexsha": "6fa12aae615259dbcd8917a61f4dffd8c5db0c1c", "size": 22590, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/cvt_v4_transformer.py", "max_stars_repo_name": "rahulmangalampalli/esvit", "max_stars_repo_head_hexsha": "5caf6e36b088ae2e7aaa4100b307eec991078e3e", "max_stars_repo_licenses": ["MIT"], "ma...
import torch.nn as nn import torch import numpy as np class GLU(nn.Module): def __init__(self): super(GLU, self).__init__() # Custom Implementation because the Voice Conversion Cycle GAN # paper assumes GLU won't reduce the dimension of tensor by 2. def forward(self, input): r...
{"hexsha": "8224bdce03dfd49ea932f7b8bb72e7ee99a26b98", "size": 17354, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_GLU.py", "max_stars_repo_name": "astricks/Voice-Conversion-GAN", "max_stars_repo_head_hexsha": "4ba2dc91a299413286c3976416442d54a08ec298", "max_stars_repo_licenses": ["Unlicense"], "max_sta...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: chengdicao """ import tensorflow as tf import os import numpy as np from tqdm import tqdm import argparse from lib.utils import load_list, cosine_decay_lr, get_label_matrix, get_cosine_distance_matrix, get_rank_matrix from lib.metrics import mean_average_pre...
{"hexsha": "39510ace0f2b806c82ee4d770564015794c9ef66", "size": 7756, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "DiDiDoes/MulKINet", "max_stars_repo_head_hexsha": "9afb7c56e25b8c4dd8425139eb907912eb1f880f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_star...
The Tree of Peace was planted to the west of Mrak Hall on May 12^th^, 1984. It is a valley oaks valley oak that was planted in recognition of Native American Culture Days Native American Cultural Days by Chief Jake Swamp, an Iroquois Elder. May the dream of the Peacemakera world without warone day come true.
{"hexsha": "d5f1f3673175d8f9fd3a3f66e4392da10fbd180c", "size": 315, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/The_Tree_of_Peace.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
""" this file is build based on the code found in evaluate_suffix_and_remaining_time.py here the beam search (with breath-first-search) is implemented, to find compliant prediction Author: Anton Yeshchenko """ from __future__ import division import csv import os.path import time from queue import PriorityQueue from ...
{"hexsha": "90d4a0c3d32659fdf8443c0a1ccce0732e210241", "size": 12243, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/evaluation/inference_algorithms/baseline_2_cf.py", "max_stars_repo_name": "stebranchi/Incremental-predictive-monitoring-python3", "max_stars_repo_head_hexsha": "114b080df4afa0653ce03d8eb0059c...
import numpy as np import pandas as pd from scipy import linalg import scipy as sp import matplotlib.pylab as plt from scipy import sparse try: from firedrake import * from firedrake.assemble import allocate_matrix, \ create_assembly_callable except ImportError: import_type = "fenics" try: from ...
{"hexsha": "63740c9b892b391ae2fdcfb911069f5243b5d310", "size": 5926, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/Stokes/Stokes_infsup.py", "max_stars_repo_name": "ralna/ElementSchur", "max_stars_repo_head_hexsha": "840f111a10dc80ab2367222c4a5b257e6e37af8b", "max_stars_repo_licenses": ["BSD-2-Clause"...
import numpy as np from lib.lif import LIF, ParamsLIF, LSM, ParamsLSM, LSM_const n = 2 # Number of neurons q = 100 # Number of LSM neurons x_input = 2 # Constant input alpha1 = 10 # Cost function params alpha2 = 30 # Cost function params tau_s = 0.020 # Time scal...
{"hexsha": "070a883e0c2d6a2991026e0dd5ca3448d781e54b", "size": 6109, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/learningbeta_fixedx_sweepw_banana.py", "max_stars_repo_name": "benlansdell/deep-rdd", "max_stars_repo_head_hexsha": "2f1443aa9800d0e0f3a4ce9051c1b8b9ed8c2ae9", "max_stars_repo_licenses": [...
// Copyright (c) 2014-2015 DiMS dev-team // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "init.h" #ifdef WIN32 #define MIN_CORE_FILEDESCRIPTORS 0 #else #define MIN_CORE_FILEDESCRIPTORS 150 #endif #if defined(HAVE_...
{"hexsha": "c5475e9830b14a8edfd77f561692196f5187b866", "size": 27471, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/monitor/init.cpp", "max_stars_repo_name": "salarii/dims", "max_stars_repo_head_hexsha": "b8008c49edd10a9ca50923b89e3b469c342d9cee", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0, "...
""" This code is modified from Hengyuan Hu's repository. https://github.com/hengyuan-hu/bottom-up-attention-vqa Reads in a tsv file with pre-trained bottom up attention features and stores it in HDF5 format. Also store {image_id: feature_idx} as a pickle file. Hierarchy of HDF5 file: { 'image_features': num_images...
{"hexsha": "c668783dad78c64f8cfe41eb15a5879ecf5a33f1", "size": 3910, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/detection_features_converter_target.py", "max_stars_repo_name": "Shaobo-Xu/ban-vqa", "max_stars_repo_head_hexsha": "9b2f2a2acc91c542b80b756aed23fbb380e69f3a", "max_stars_repo_licenses": ["MI...
import collections import itertools import json import os import shutil from copy import deepcopy import click import joblib import numpy as np import pandas as pd import torch from ceem import logger, utils from ceem.dynamics import * from ceem.learner import * from ceem.opt_criteria import * from ceem.ceem import C...
{"hexsha": "6f16fb2439b55242329646607ebece817d18c27f", "size": 5089, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/lorenz/convergence_experiment_pem.py", "max_stars_repo_name": "sisl/CEEM", "max_stars_repo_head_hexsha": "6154587fe3cdb92e8b7f70eedb1262caa1553cc8", "max_stars_repo_licenses": ["MIT"],...
/* // Copyright (c) 2020 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...
{"hexsha": "0634328701a932def82619510ead97cd39c00d2a", "size": 5850, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "redfish-core/include/event_service_manager.hpp", "max_stars_repo_name": "ztai-goog/bmcweb", "max_stars_repo_head_hexsha": "881e50b775fcccbc447fc39f40671574e0fa4157", "max_stars_repo_licenses": ["Apa...
import numpy as np import pdb def running_cost(sys, x, u, xf_current): """ :param sys: system from gym environment this stores the :param x: state trajectory :param u: control trajectory :return: gradients and Hessians of the loss function with respect to states and controls """ xf = np.s...
{"hexsha": "83c6e05b00d4371dec9d931da9c99ce25ca62d22", "size": 4735, "ext": "py", "lang": "Python", "max_stars_repo_path": "ddp/mpc_ddp_functions_circlequad.py", "max_stars_repo_name": "rebeccali/ese650-project", "max_stars_repo_head_hexsha": "0d96ff707384e67afdfb0ff259d5629257b0a78b", "max_stars_repo_licenses": ["MIT"...
from __future__ import print_function import os from argparse import ArgumentParser import numpy as np from sklearn.decomposition import PCA from sklearn.preprocessing import StandardScaler if __name__ == '__main__': parser = ArgumentParser("") parser.add_argument("feats", help="Path to the npy features.") ...
{"hexsha": "b844e3f1daf05c31ab6d47c5b357a7c583f02cf8", "size": 1299, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing/pca.py", "max_stars_repo_name": "enricovian/GraphSAGE", "max_stars_repo_head_hexsha": "0cdda29dbc075fb8f3441c15638d1b06de992a57", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import os, json, copy, pickle import numpy as np import pandas as pd from collections import defaultdict from scipy import stats from utils.metrics import Metrics # this dir contains CLINC and SNIPS partial fewshot experiments # EXPERIMENTS_DIR = "/path/to/partial-fewshot/savedir/" # this dir contains CLINC, SNIPS, ...
{"hexsha": "b12d598b8283cda1183706ce5c88e929611e1602", "size": 15822, "ext": "py", "lang": "Python", "max_stars_repo_path": "runners/compile_results.py", "max_stars_repo_name": "ElementAI/data-augmentation-with-llms", "max_stars_repo_head_hexsha": "23673ab55cfb72295468e92ae58d0906f5dc7b05", "max_stars_repo_licenses": [...
""" NETALIGNMR ---------- solve the network alignment problem with Klau's algorithm """ function netalignmr(S::SparseMatrixCSC{Int64,Int64},w::Vector{Float64}, a::Int64,b::Int64,li::Vector{Int64},lj::Vector{Int64}, gamma::Float64,stepm::Int64,rtype::Int64,maxiter::Int...
{"hexsha": "78b16e16c3cad7668a6c4e9313fbf3ba9a4af903", "size": 5233, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/netalignmr.jl", "max_stars_repo_name": "nassarhuda/NetworkAlign", "max_stars_repo_head_hexsha": "2f1e2501b9c2fbb7dc97ae95da8fa3f1de503d45", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np import os import galsim ## Compute lensed ellipticities from shear and convergence def calc_lensed_ellipticity_1(es1, es2, gamma1, gamma2, kappa): gamma = gamma1 + gamma2*1j # shear (as a complex number) es = es1 + es2*1j # intrinsic ellipticity (as a complex number) g = gamma / (1.0 ...
{"hexsha": "50c3ac8e23146f3d3c40a945a8ec354d68a7287f", "size": 4891, "ext": "py", "lang": "Python", "max_stars_repo_path": "script/generate_noiseless.py", "max_stars_repo_name": "BastienArcelin/dc2_img_generation", "max_stars_repo_head_hexsha": "e3b84625afcd6a3127c98246841a9f5825c1262a", "max_stars_repo_licenses": ["BS...
import sympy from typing import List, Union import logging def test_homogeneity(exprs: Union[List[sympy.And], sympy.Matrix], vars: List[sympy.Symbol], trigger=None): """ Tests whether dynamics are homogeneous. If so, return also the homogeneity degree. @param exprs: List of sympy expressions representing t...
{"hexsha": "d37ecad824b0c72b770927eb87abb1e69c42fe74", "size": 4926, "ext": "py", "lang": "Python", "max_stars_repo_path": "ETCetera/util/homogeneous.py", "max_stars_repo_name": "ggleizer/ETCetera", "max_stars_repo_head_hexsha": "8fa9f3c82fd1944507a0c02d52a236244821f3ca", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# -*- coding: utf-8 -*- import numpy as np from functools import lru_cache from .base import Predictor from ..base import Property from ..functions import gauss2sigma, unscented_transform from ..types.prediction import GaussianStatePrediction from ..types.state import State class KalmanPredictor(Predictor): """...
{"hexsha": "905ebc5b7b1c3e6e8417021dc86d756202fa9414", "size": 15584, "ext": "py", "lang": "Python", "max_stars_repo_path": "stonesoup/predictor/kalman.py", "max_stars_repo_name": "GSORF/Stone-Soup", "max_stars_repo_head_hexsha": "0aa730929fa6a1630a5279516c3377867e49b9b9", "max_stars_repo_licenses": ["MIT"], "max_stars...
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np print_freq = 5 v1 = [0.34208, 0.23126, 0.20223, 0.18834, 0.18191, 0.17678, 0.17864, 0.17478, 0.17649, 0.17908, 0.17846, 0.18053, 0.20251, 0.18986, 0.18758, 0.1906, 0.19082, 0.19142] # v2 = [] v3 = [0.32738, 0.28121, 0.2635, 0.26...
{"hexsha": "8d3af9d82d908b38163f9fd536b5adc4238d2b19", "size": 1734, "ext": "py", "lang": "Python", "max_stars_repo_path": "exp4/exp4_plot.py", "max_stars_repo_name": "Haunter17/MIR_SU17", "max_stars_repo_head_hexsha": "0eaefb8cab78ca896c1ed0074892c296110eb161", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import gym import numpy as np from rlkit.envs.pygame import pnp_util from rlkit.torch.sets import set_creation from multiworld.envs.pygame import PickAndPlaceEnv from rlkit.envs.images import EnvRenderer from multiworld import register_all_envs def main(): register_all_envs() # env = PickAndPlaceEnv( # ...
{"hexsha": "94ab34deb8ddb077c0b92a0956d4ea33688d3579", "size": 1949, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/vitchyr/goal_distribution/representation_learning/set_creation/pygame_create_imgs.py", "max_stars_repo_name": "Asap7772/railrl_evalsawyer", "max_stars_repo_head_hexsha": "baba8ce634d32...
//================================================================================================= // Copyright (c) 2013, Johannes Meyer, TU Darmstadt // All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are...
{"hexsha": "7f2037f24aa3e4d797c2e9a74ca9fbd1ea50e689", "size": 14663, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Source Files/hector_quadrotor_tutorial/src/hector_quadrotor/hector_quadrotor_controller/src/twist_controller.cpp", "max_stars_repo_name": "AntoineHX/OMPL_Planning", "max_stars_repo_head_hexsha": "6...
[STATEMENT] lemma rot_circle_cube_is_type_II: shows "typeII_twoCube rot_circle_cube" [PROOF STATE] proof (prove) goal (1 subgoal): 1. typeII_twoCube rot_circle_cube [PROOF STEP] using d_gt_0 swap_typeI_is_typeII circle_cube_is_type_I [PROOF STATE] proof (prove) using this: 0 < d typeI_twoCube ?C \<Longrightarrow> ty...
{"llama_tokens": 226, "file": "Green_CircExample", "length": 2}
# Copyright (c) 2013: Joey Huchette and contributors # # Use of this source code is governed by an MIT-style license that can be found # in the LICENSE.md file or at https://opensource.org/licenses/MIT. using CPLEX using Test @testset "MathOptInterface Tests" begin for file in readdir("MathOptInterface") ...
{"hexsha": "2c62595b9bf9a5a36968ce153dfb7ef3786d15df", "size": 376, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "JuliaOpt/CPLEX.jl", "max_stars_repo_head_hexsha": "e2f15e06b767b33941dce62873a048d18e6a844f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 52, "m...
(* Title: Imperative_HOL_Time/Array_Time.thy Author: Maximilian P. L. Haslbeck & Bohua Zhan, TU Muenchen *) section \<open>Monadic arrays\<close> text \<open>This theory is an adaptation of \<open>HOL/Imperative_HOL/Array.thy\<close>, adding time bookkeeping.\<close> theory Array_Time imports Heap_Time...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/Van_Emde_Boas...
@testset "independent" begin x = MOInput([rand(5) for _ in 1:4], 3) y = MOInput([rand(5) for _ in 1:4], 3) k = IndependentMOKernel(GaussianKernel()) @test k isa IndependentMOKernel @test k isa MOKernel @test k isa Kernel @test k.kernel isa Kernel @test k(x[2], y[2]) isa Real @test ...
{"hexsha": "354b207f300afcb2af381dfa19b90f259b7592a4", "size": 656, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/mokernels/independent.jl", "max_stars_repo_name": "simonschoelly/KernelFunctions.jl", "max_stars_repo_head_hexsha": "600df21de4465c50a0bb73be344a9bf95e6212f6", "max_stars_repo_licenses": ["MIT"...
import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import threading import time import tools import webbrowser def tb_view(model, logdir=None, cmd=None): """Visualises a :model: in TensorBoard. (That is, everything in the model's Graph, which may actually be much larger than the model ...
{"hexsha": "6061c66786b9ca3d5b4c0672861641ec238c2263", "size": 3191, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/visualise.py", "max_stars_repo_name": "patrick-kidger/ktools", "max_stars_repo_head_hexsha": "9b31ed348ce011781576a1e194c9126e2937982f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
import numpy as np import matplotlib.pyplot as plt import time import _pickle as cPickle # Function used for loading the CIFAR10 dataset def unpickle(file): with open(file, 'rb') as fo: dict = cPickle.load(fo) return dict # Compute the softmax function of the output def softmax(y): max_of_rows = ...
{"hexsha": "c04700abe7e0f1c03dc65060f3481c69759df459", "size": 15095, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "A-Katopodis/Neural-Network-Implemenation", "max_stars_repo_head_hexsha": "4e28f695fba57c63aa9e3d5b7ac6036a341d97d5", "max_stars_repo_licenses": ["Apache-2.0"], "...
"""Makes a .joblib file containing the trained model """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import time import numpy as np import logging import tensorflow as tf from tensorflow.python.platform import app, flags from clev...
{"hexsha": "5760177d740faa35d2226dbb5d0220d82127d270", "size": 2017, "ext": "py", "lang": "Python", "max_stars_repo_path": "cleverhans_v3.1.0/cleverhans/model_zoo/madry_lab_challenges/make_cifar10_joblib.py", "max_stars_repo_name": "xu-weizhen/cleverhans", "max_stars_repo_head_hexsha": "c83898f5c6e6077ba6f3057dce9adcc4...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Oct 7 18:32:28 2019 @author: stayal0ne """ import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.preprocessing import Imputer, LabelEncoder, OneHotEncoder, StandardScaler from sklearn.model_selection import train_test_spl...
{"hexsha": "fe918f3bcf2aba5ac6e6b76bd24f4c3412be5e05", "size": 4351, "ext": "py", "lang": "Python", "max_stars_repo_path": "research_extension/slope.py", "max_stars_repo_name": "zelzhan/Linear-algebra-with-python", "max_stars_repo_head_hexsha": "a58042c9f29f67aafcd2c1c4c1300a0e9223a650", "max_stars_repo_licenses": ["MI...
""" Tools to perform analyses by shuffling in time, as in Landau & Fries (2012) and Fiebelkorn et al. (2013). """ import os import yaml import numpy as np import statsmodels.api as sm from statsmodels.stats.multitest import multipletests from .utils import avg_repeated_timepoints, dft # Load the details of the behavi...
{"hexsha": "32eaa0a294af2308ff208fed9c050fd370b31fec", "size": 8526, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis_methods/shuff_time.py", "max_stars_repo_name": "gbrookshire/simulated_rhythmic_sampling", "max_stars_repo_head_hexsha": "5c9ed507847a75dbe38d10d78b54441ae83f5831", "max_stars_repo_license...
import numpy as np import random from sklearn.metrics import mean_squared_error from sklearn.neural_network import MLPClassifier def one_hot_generator(length): a = [] for i in range(0, length): i = random.randint(0, 7) a.append(i) output = np.eye(8)[a] return output n_...
{"hexsha": "52fe2e5fc023e7af3c88139db0ec3389ea064a1a", "size": 1197, "ext": "py", "lang": "Python", "max_stars_repo_path": "MachineLearning/hw3_q1_sklearn/once.py", "max_stars_repo_name": "SeanSyue/SklearnReferences", "max_stars_repo_head_hexsha": "a2770a7108947877e772f3525bc915c5de4114bb", "max_stars_repo_licenses": [...
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2017, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
{"hexsha": "3cb16290451e0fd7452feb771084663d9cd501ba", "size": 16119, "ext": "py", "lang": "Python", "max_stars_repo_path": "q2_diversity/tests/test_alpha.py", "max_stars_repo_name": "gregcaporaso/q2-diversity", "max_stars_repo_head_hexsha": "3b03b4c1e47b2893668f14c91612507e4864c34e", "max_stars_repo_licenses": ["BSD-3...
import os import torch import numpy as np from torch.utils.data import Dataset, DataLoader import pickle from pdb import set_trace as stop from dataloaders.data_utils import get_unk_mask_indices,image_loader class VGDataset(torch.utils.data.Dataset): def __init__(self, img_dir, img_list, image_transform,label_pat...
{"hexsha": "b5d38d32aa3118d60d96b05b3789be42697bca7e", "size": 1489, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataloaders/vg500_dataset.py", "max_stars_repo_name": "sorrowyn/C-Tran", "max_stars_repo_head_hexsha": "236d785952c59210e6812b4ad5ee12bab585ce4c", "max_stars_repo_licenses": ["MIT"], "max_stars_co...