text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
/* The file is part of Snowman decompiler. */ /* See doc/licenses.asciidoc for the licensing information. */ // // SmartDec decompiler - SmartDec is a native code to C/C++ decompiler // Copyright (C) 2015 Alexander Chernov, Katerina Troshina, Yegor Derevenets, // Alexander Fokin, Sergey Levin, Leonid Tsvetkov // // Th...
{"hexsha": "7e7b66fd4b9521609cb2f2d3c8f6bbf963176f04", "size": 9048, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/nc/core/irgen/IRGenerator.cpp", "max_stars_repo_name": "treadstoneproject/tracethreat_nrml", "max_stars_repo_head_hexsha": "bcf666b01c20f7da4234fed018dad3b2cf4d3d28", "max_stars_repo_licenses": ...
(* author:wzh *) (* then = from this *) (* hence = from his have *) (* thus = from this show *) theory Exercise5 imports Main begin (* Exercise 5.1 *) lemma assumes T: "\<forall> x y. T x y \<or> T y x" and A: "\<forall> x y. A x y \<and> A y x \<longrightarrow> x = y" and TA: "\<forall> x y. T x y \<longright...
{"author": "yogurt-shadow", "repo": "Isar_Exercise", "sha": "27658bff434e0845a23aeb310eeb971e4fc20b98", "save_path": "github-repos/isabelle/yogurt-shadow-Isar_Exercise", "path": "github-repos/isabelle/yogurt-shadow-Isar_Exercise/Isar_Exercise-27658bff434e0845a23aeb310eeb971e4fc20b98/Exercise5.thy"}
from util.data.data import Data, flatten, merge_on_column # TODO: Test for file that has a type digression happen on a line # with empty strings in it. This caused a crash [2019-12-17]. # TODO: Test data with no names getting other data added in place, # should overwrite the names! # Some tests for ...
{"hexsha": "9d8847af3a842439f65722a5b77489b38c1e6f14", "size": 21002, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/data/test.py", "max_stars_repo_name": "tchlux/util", "max_stars_repo_head_hexsha": "eff37464c7e913377398025adf76b057f9630b35", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_...
# Course URL: # https://deeplearningcourses.com/c/natural-language-processing-with-deep-learning-in-python # https://udemy.com/natural-language-processing-with-deep-learning-in-python import numpy as np import matplotlib.pyplot as plt import os import sys sys.path.append(os.path.abspath('..')) from hmm_class.hmmd_scal...
{"hexsha": "2131811a8f77bbbfb3c25b4cfbfd8dd29cccc2af", "size": 2259, "ext": "py", "lang": "Python", "max_stars_repo_path": "machine_learning_examples/nlp_class2/pos_hmm.py", "max_stars_repo_name": "austinburks/nlp-udemy", "max_stars_repo_head_hexsha": "2e2ddb39b22a057448666c5069b1bdda7a4318c3", "max_stars_repo_licenses...
#!/usr/bin/env python import glob import numpy as np import instance_occlsegm_lib import chainer_mask_rcnn as mrcnn import contrib def main(): class_names = contrib.core.get_class_names() bboxes_, labels_, masks_ = None, None, None json_files = sorted(glob.glob('*.json')) for json_file in json_f...
{"hexsha": "b522d380fa5189610460ab887c52cb13d7a2bcd4", "size": 1849, "ext": "py", "lang": "Python", "max_stars_repo_path": "demos/instance_occlsegm/examples/synthetic2d/arc2017_occlusion_dataset/annotation_view_annotations.py", "max_stars_repo_name": "pazeshun/jsk_apc", "max_stars_repo_head_hexsha": "0ff42000ad5992f8a3...
import argparse import logging import multiprocessing import os import pickle import time from functools import partial import h5py import numpy as np import pandas as pd import tensorflow as tf from tqdm import tqdm from data_reader import DataReader_mseed_array, DataReader_pred from model import ModelConfig, UNet f...
{"hexsha": "e6bbde5d6757e0cc6a8582a46647fa5c9919405f", "size": 7661, "ext": "py", "lang": "Python", "max_stars_repo_path": "phasenet/predict.py", "max_stars_repo_name": "AI4Earth/PhaseNet", "max_stars_repo_head_hexsha": "ca9e29f634fd2b53ab2da67f5a9152a546f77cfb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# -*- coding: utf-8 -*- import numpy as np eps = np.finfo(float).eps def infnorm(x): return np.linalg.norm(x, np.inf) def scaled_tol(n): tol = 5e1*eps if n < 20 else np.log(n)**2.5*eps return tol # bespoke test generators def infNormLessThanTol(a, b, tol): def asserter(self): self.assertLes...
{"hexsha": "fe892cee2ccc30f11228f46da09d378347ae470a", "size": 1253, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/utilities.py", "max_stars_repo_name": "tschm/chebpy", "max_stars_repo_head_hexsha": "7248249a75ed65bfc0ea9d711986c3c9c51278a0", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
import os import argparse import streamlit as st import time import numpy as np from astropy.table import QTable import astropy.units as u import numpy as np import pandas as pd import altair as alt # for rendering plots from vega import VegaLite from json import loads from pathlib import Path from specutils import S...
{"hexsha": "fa32683c6948c3ba36a0a6bfda7e214575d6acc3", "size": 6073, "ext": "py", "lang": "Python", "max_stars_repo_path": "use_cases/Streamlit/plotting_demo.py", "max_stars_repo_name": "einshoe/ssv-examples", "max_stars_repo_head_hexsha": "5bdf430c21ba3048e0dee7bfc0b6790143d6bec5", "max_stars_repo_licenses": ["MIT"], ...
import torch import numpy as np import pdb class PatchAttacker: def __init__(self, model, mean, std, kwargs): std = torch.tensor(std) mean = torch.tensor(mean) self.epsilon = kwargs["epsilon"] / std self.steps = kwargs["steps"] self.step_size = kwargs["step_size"] / std ...
{"hexsha": "b292278edbe85e5f3045bcff6fe45ff10d394210", "size": 4693, "ext": "py", "lang": "Python", "max_stars_repo_path": "attacks/patch_attacker.py", "max_stars_repo_name": "Ping-C/certifiedpatchdefense", "max_stars_repo_head_hexsha": "f1dbb7e399c320413c17e1412d2fb0ee0d6c812a", "max_stars_repo_licenses": ["BSD-2-Clau...
(* Title: HOL/Library/Extended_Nonnegative_Real.thy Author: Johannes Hölzl *) subsection \<open>The type of non-negative extended real numbers\<close> theory Extended_Nonnegative_Real imports Extended_Real Indicator_Function begin lemma ereal_ineq_diff_add: assumes "b \<noteq> (-\<infinity>::ereal)...
{"author": "SEL4PROJ", "repo": "jormungand", "sha": "bad97f9817b4034cd705cd295a1f86af880a7631", "save_path": "github-repos/isabelle/SEL4PROJ-jormungand", "path": "github-repos/isabelle/SEL4PROJ-jormungand/jormungand-bad97f9817b4034cd705cd295a1f86af880a7631/case_study/isabelle/src/HOL/Library/Extended_Nonnegative_Real.t...
import requests import time from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By # Enforce incognito mode chrome_options = webdriver.ChromeOptions...
{"hexsha": "9e811d8fb6e64d6f2a2c00fb2ec249c9b7159c21", "size": 11752, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/NHL_summary_data_pull_functions.py", "max_stars_repo_name": "justinjoliver/NHL-Analytics", "max_stars_repo_head_hexsha": "b369ec0716a2f32f9cdc6539d894a38455c7ab09", "max_stars_repo_licenses":...
import json import itertools from typing import Optional from collections import defaultdict import numpy as np from _jsonnet import evaluate_file as jsonnet_evaluate_file from nltk.stem.snowball import SnowballStemmer from scipy.special import expit from sklearn.cluster import AgglomerativeClustering, DBSCAN from skl...
{"hexsha": "a596311b15fd109ef6db837c6ffb196c677e8221", "size": 11521, "ext": "py", "lang": "Python", "max_stars_repo_path": "purano/clusterer/clusterer.py", "max_stars_repo_name": "IlyaGusev/purano", "max_stars_repo_head_hexsha": "07234a55e8c80d1e9d8aeb8197c58e36dd26da54", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import dash import dash_core_components as dcc import dash_html_components as html import plotly.offline as po import plotly.graph_objs as go import dash_table import numpy as np import pandas as pd import base64 import io plot_layout=html.Div(className='nav-div',children=[ html.Nav(className='nav', ...
{"hexsha": "9178eed8a77c55dbb031c1a6cf5e1b93e172315f", "size": 2430, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_data.py", "max_stars_repo_name": "lgkartik/graphvidz", "max_stars_repo_head_hexsha": "f3e5febef641017d0fd5697695ce4d6f30ae78bd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
import torch from torch.autograd import Variable import numpy as np from org.archive.eval.metric import rele_gain from org.archive.utils.pytorch.pt_extensions import Power """ Extended torch functions """ power = Power.apply def tor_stable_softmax_bp(histogram, base=None): max_v, _ = torch.max(histogram, dim=...
{"hexsha": "83a2baa350635ddbbe8c4dd203476a5f1e00cb83", "size": 9441, "ext": "py", "lang": "Python", "max_stars_repo_path": "org/archive/ranking/listwise/wassrank/wasserstein_cost_mat.py", "max_stars_repo_name": "arita37/ptl2r.github.io", "max_stars_repo_head_hexsha": "6bd716c189e54df985062e22926c2d680cac8a8b", "max_sta...
import png import numpy as np import sys import time import os import struct import socket import select import random import tensorflow as tf import time import datetime """ encapsulate network communication, client side """ def recvall(sock, n): # Helper function to recv n bytes or return None if EOF is hit ...
{"hexsha": "674ca4857bf7e6a84b936a8a344a9529e105c9a4", "size": 11996, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyutil/envClient.py", "max_stars_repo_name": "alex-krull/DeepSPM-mirror", "max_stars_repo_head_hexsha": "6bdd8593f47f1cc0b7811f3a0163ac9196275d7f", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "redundancygroupdistribution.h" #include <vespa/vespalib/util/exceptions.h> #include <vespa/vespalib/text/stringtokenizer.h> #include <boost/lexical_cast.hpp> #include <algorithm> namespace ...
{"hexsha": "6ac521a0f0128020ddd2202cff00fad3348428eb", "size": 5138, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "vdslib/src/vespa/vdslib/distribution/redundancygroupdistribution.cpp", "max_stars_repo_name": "gsmcwhirter/vespa", "max_stars_repo_head_hexsha": "afe876252b56b5a30735865047d7392958835f6a", "max_star...
(* * Copyright (C) 2014 NICTA * All rights reserved. *) (* Author: David Cock - David.Cock@nicta.com.au *) header "Loops" theory LoopExamples imports "../pGCL" begin text {* Reasoning about loops in pGCL is mostly familiar, in particular in the use of invariants. Proving termination for truly probabilistic loops...
{"author": "Josh-Tilles", "repo": "AFP", "sha": "f4bf1d502bde2a3469d482b62c531f1c3af3e881", "save_path": "github-repos/isabelle/Josh-Tilles-AFP", "path": "github-repos/isabelle/Josh-Tilles-AFP/AFP-f4bf1d502bde2a3469d482b62c531f1c3af3e881/thys/pGCL/Tutorial/LoopExamples.thy"}
#================================================================= # Load Libraries #================================================================= import pandas as pd import numpy as np #================================================================================== # Helpers #=================================...
{"hexsha": "6f1cef5a42eee6eab219e00214ee78618892aa7e", "size": 2072, "ext": "py", "lang": "Python", "max_stars_repo_path": "AWS/stylometry_tokenPL/metrics.py", "max_stars_repo_name": "wcex1994/EssAI", "max_stars_repo_head_hexsha": "968f07d06f4d49a1538fb56fe505f13ff5f6fa8e", "max_stars_repo_licenses": ["MIT"], "max_star...
im_path = 'screen-test-rgb.jpg' import cv2 # pip install ? im_cv = cv2.imread(im_path) im_rgb = cv2.cvtColor(im_cv, cv2.COLOR_BGR2RGB) print(type(im_cv), im_cv.shape) from matplotlib.image import imread # im_matplotlib = imread(im_path) print(type(im_matplotlib), im_matplotlib.shape) import skimage print(skimage.__...
{"hexsha": "4fb8760dee749a2a5851f5d7afa91762ab8fa80c", "size": 737, "ext": "py", "lang": "Python", "max_stars_repo_path": "image/test_imread.py", "max_stars_repo_name": "miroslavradojevic/python-snippets", "max_stars_repo_head_hexsha": "753e1c15dc077d3bcf5de4fd5d3a675daf0da27c", "max_stars_repo_licenses": ["MIT"], "max...
################################################################# # This file defines the abstract distribution type # AbstractDistribution: the abstract super type for the transition and observation distributions # DiscreteDistribution: discrete distributions support state indexing and length functions ###############...
{"hexsha": "22bfc20ebb558e7174e125b9ab0b8ff6091a7ce6", "size": 921, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "modules/POMDPs/src/distribution.jl", "max_stars_repo_name": "sisl/ExprSearch", "max_stars_repo_head_hexsha": "f143bbb84e1e11a70170085df81eb45ca5cecfa1", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import sys import gzip import numpy as np import scipy.sparse as sparse from os import listdir import json data_dir = sys.argv[1] pass_from_gen = False pass_all = False pass_from_qual = False if len(sys.argv)>2 and sys.argv[2] == '--pass_from_gen': pass_from_gen = True ped_file = sys.argv[3] print('Genera...
{"hexsha": "8967e7289152ec6ef0ab7610208b9b57804bbc41", "size": 4295, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing/pull_pass.py", "max_stars_repo_name": "kpaskov/FamilySeqError", "max_stars_repo_head_hexsha": "d85767dea5d23c6f6908cb696dc0b6ef561d1fc7", "max_stars_repo_licenses": ["MIT"], "max_sta...
import os import sys import struct import numpy as np import pickle from automon.common_messages import messages_header_format from test_utils.stats_analysis_utils import get_period_approximation_error from test_utils.test_utils import read_config_file from experiments.visualization.plot_dimensions_stats import get_num...
{"hexsha": "a90df00e7c6c434492614938eec39d3dcfeac4fe", "size": 46584, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/visualization/plot_aws_stats.py", "max_stars_repo_name": "hsivan/automon", "max_stars_repo_head_hexsha": "222b17651533bdb2abce7de36a80156ab7b9cc21", "max_stars_repo_licenses": ["BSD-3...
import numpy as np import os import dtdata as dt import matplotlib.pyplot as plt import math import random import pprint as pp from sklearn.model_selection import train_test_split from sklearn.preprocessing import MinMaxScaler, StandardScaler from sklearn import preprocessing from sklearn.decomposition import PCA from...
{"hexsha": "4b4d50a4382b40a240d860e4d262634d68c6c334", "size": 2668, "ext": "py", "lang": "Python", "max_stars_repo_path": "lstm.py", "max_stars_repo_name": "coreyauger/daytrader-utils", "max_stars_repo_head_hexsha": "cdb5b4b7f32e75814486a8e186a8fd9b35dfd8a7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import gin import ray import time import numpy as np from torch.utils.data import DataLoader from .. import datasets @gin.configurable('dataloader', blacklist=['dataset']) def initialize_dataloader(dataset, batch_size=8, shuffle=True, num_workers=0): return DataLoader(dataset, batch_size=batch_size, ...
{"hexsha": "8018e188f6157791fedf6cfd7036e6b0d3a968e0", "size": 1871, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/data.py", "max_stars_repo_name": "princeton-vl/selfstudy", "max_stars_repo_head_hexsha": "d18ab26c11843557ee75aaccf6ccb63de85b397c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
# -*- coding: utf-8 -*- import unittest import numpy as np from nelson_siegel_svensson import NelsonSiegelSvenssonCurve class TestNelsonSiegelSvenssonCurveImplementation(unittest.TestCase): '''Tests for Nelson-Siegel-Svensson curve implementation.''' def setUp(self): self.y = NelsonSiegelSvenssonC...
{"hexsha": "f2bd204d0d96aa385d0f19927942565c164b2954", "size": 4057, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_nelson_siegel_svensson_curve_implementation.py", "max_stars_repo_name": "luphord/nelson_siegel_svensson", "max_stars_repo_head_hexsha": "e2437a9bf924d6cd54181de018ed8af8214a6055", "max_...
""" > Training pipeline for UGAN and UGAN-P models * Original paper: https://arxiv.org/pdf/1801.04011.pdf (see github.com/cameronfabbri/Underwater-Color-Correction) > Maintainer: https://github.com/xahidbuffon """ # py libs import os import sys import yaml import argparse import numpy as np from PIL import Im...
{"hexsha": "be839bf7b545745c18a35ce7cf1ddd07269e767e", "size": 6795, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyTorch/train_ugan.py", "max_stars_repo_name": "edgecm/FUnIE-GAN-1", "max_stars_repo_head_hexsha": "b8d0808bc05126294d39c1355688746e177e0dde", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
export ParticleCollisions struct ParticleCollisions dt function ParticleCollisions( p :: Particles) dt = zeros(p.n, p.n) fill!(dt, Inf) for k in 1:p.n for l in (k+1):p.n dt[k, l] = compute_dt(p, l, k) end end new( dt ) end ...
{"hexsha": "b8c479108af88245ff14fd58abe3d3329565762c", "size": 1327, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/collisions.jl", "max_stars_repo_name": "pnavaro/Uchiyama.jl", "max_stars_repo_head_hexsha": "450756b9d41e8641906cc6553a8478830d4fa0ca", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
""" hinet_downloader.py: download the hinet data based on HinetPy. """ from datetime import timedelta from glob import glob from os.path import basename, dirname, join import click import numpy as np import obspy import sh from HinetPy import Client, win32 from loguru import logger def init_client(username, password...
{"hexsha": "2857a88fd09e4c8bd00221b307bec76666b39f6b", "size": 3292, "ext": "py", "lang": "Python", "max_stars_repo_path": "seisflow/scripts/download/hinet/hinet_downloader.py", "max_stars_repo_name": "ziyixi/seisflow", "max_stars_repo_head_hexsha": "722c2445f4a5316f42bfbc8b9010d31caad4c76e", "max_stars_repo_licenses":...
# Copyright (C) 2017-2019 New York University, # University at Buffalo, # Illinois Institute of Technology. # # 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 th...
{"hexsha": "94c774f08f61b5dd11782a5e74ef7b2e1c48f673", "size": 19370, "ext": "py", "lang": "Python", "max_stars_repo_path": "vizier/engine/packages/pycell/client/dataset.py", "max_stars_repo_name": "sanchitcop19/web-api-async", "max_stars_repo_head_hexsha": "a3fff70c3b62678f3c8ef8cc07f7c9b4fe155c69", "max_stars_repo_li...
[STATEMENT] lemma subst_comp[simp]: "t \<lhd> (r \<lozenge> s) = t \<lhd> r \<lhd> s" [PROOF STATE] proof (prove) goal (1 subgoal): 1. t \<lhd> r \<lozenge> s = t \<lhd> r \<lhd> s [PROOF STEP] proof (induct t) [PROOF STATE] proof (state) goal (3 subgoals): 1. \<And>x. Var x \<lhd> r \<lozenge> s = Var x \<lhd> r \<l...
{"llama_tokens": 821, "file": null, "length": 5}
# Autogenerated wrapper script for Fontconfig_jll for i686-w64-mingw32 export fc_cache, fc_cat, fc_conflist, fc_list, fc_match, fc_pattern, fc_query, fc_scan, fc_validate, fonts_conf, libfontconfig using FreeType2_jll using Bzip2_jll using Zlib_jll using Libuuid_jll using Expat_jll JLLWrappers.@generate_wrapper_header...
{"hexsha": "9df8c4f487fd27b5a69070b1dd8062716e33e96d", "size": 2355, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/wrappers/i686-w64-mingw32.jl", "max_stars_repo_name": "JuliaBinaryWrappers/Fontconfig_jll.jl", "max_stars_repo_head_hexsha": "4a774dc6b40531890eb0cc37b09976802ac1bbf1", "max_stars_repo_licenses...
from astropy.table import Table from astropy import units as u from ..query import BaseQuery from ..utils import async_to_sync, prepend_docstr_nosections from . import conf from .utils import parse_readme __all__ = ['Hitran', 'HitranClass'] @async_to_sync class HitranClass(BaseQuery): QUERY_URL = conf.query_ur...
{"hexsha": "31b08e0e4e3ae659482c599475203c9ad133e8f3", "size": 11868, "ext": "py", "lang": "Python", "max_stars_repo_path": "astroquery/hitran/core.py", "max_stars_repo_name": "hdevillepoix/astroquery", "max_stars_repo_head_hexsha": "ce8c500c28424fe841e04741d4230b8f695ee194", "max_stars_repo_licenses": ["BSD-3-Clause"]...
theory Ex7_1 imports "~~/src/HOL/IMP/Big_Step" "~~/src/HOL/IMP/Small_Step" begin section "Chapter 7 exercises" subsection "7.1" fun assigned :: "com \<Rightarrow> vname set" where "assigned (SKIP) = {}" | "assigned (Assign vname _) = {vname}" | "assigned (Seq c0 c1) = assigned c0 \<union> assigned c1" | ...
{"author": "gittywithexcitement", "repo": "isabelle", "sha": "42c53b2797e1b14c741c316f2585449b818a8f07", "save_path": "github-repos/isabelle/gittywithexcitement-isabelle", "path": "github-repos/isabelle/gittywithexcitement-isabelle/isabelle-42c53b2797e1b14c741c316f2585449b818a8f07/Chapter 7/Ex7_1.thy"}
function levendist1(s::AbstractString, t::AbstractString) ls, lt = length(s), length(t) if ls > lt s, t = t, s ls, lt = lt, ls end dist = collect(0:ls) for (ind2, chr2) in enumerate(t) newdist = Vector{Int}(ls+1) newdist[1] = ind2 for (ind1, chr1) in enumerate...
{"hexsha": "6460f73a495c6bf1100cb6d3db0eb71e8e03d7a3", "size": 580, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "lang/Julia/levenshtein-distance-2.jl", "max_stars_repo_name": "ethansaxenian/RosettaDecode", "max_stars_repo_head_hexsha": "8ea1a42a5f792280b50193ad47545d14ee371fb7", "max_stars_repo_licenses": ["MI...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
{"hexsha": "a3c232d87e5d26d1b537c8844463203e0b84e168", "size": 18707, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/python/unittest/test_transform_layout.py", "max_stars_repo_name": "XiaoSong9905/tvm", "max_stars_repo_head_hexsha": "48940f697e15d5b50fa1f032003e6c700ae1e423", "max_stars_repo_licenses": ["...
/** Boost Logging library Author: John Torjo, www.torjo.com Copyright (C) 2007 John Torjo (see www.torjo.com for email) Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) See http://www.boos...
{"hexsha": "31d6848d48d792f07e033ea9e78e8ce4cc68137a", "size": 4289, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "third_party/boost/sandbox/libs/logging/samples/scenarios/no_levels_with_route.cpp", "max_stars_repo_name": "gbucknell/fsc-sdk", "max_stars_repo_head_hexsha": "11b7cda4eea35ec53effbe37382f4b28020cd59...
import os, sys import numpy as np import pybullet as pb import math def get_tip_targets(p, q, d): m = q t1 = p[0]-d*m[0], p[1]-d*m[3], p[2]-d*m[6] t2 = p[0]+d*m[0], p[1]+d*m[3], p[2]+d*m[6] return (t2, t1) def get_tip_targets2(p, q, d): m = q t1 = p[0]-d*m[1], p[1]-d*m[4], p[2]-d*m[7] t2 = ...
{"hexsha": "10524b68abcf0b2e55b9940c0edac4afcc01c0b7", "size": 4538, "ext": "py", "lang": "Python", "max_stars_repo_path": "ergo/pybullet/tasks/PicknPlace/PickNPlace.py", "max_stars_repo_name": "garrettkatz/poppy-simulations", "max_stars_repo_head_hexsha": "cd4d132ab6f8b4e69f2edd89662980d252a27966", "max_stars_repo_lic...
# MIT License # Copyright (c) 2019 Vincent SAMY # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, p...
{"hexsha": "3eb111000b8c7f16350a34d92c93cd258658d968", "size": 22116, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/pyTests.py", "max_stars_repo_name": "vsamy/pygen-converter", "max_stars_repo_head_hexsha": "13a4f09e93d0b0c72175453451a5c3cd1e5a55b8", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
% ---------------------------------------------------------------------------- % % Pre % Document \documentclass[10pt]{sigplanconf} % Standard \usepackage[utf8]{inputenc} % \usepackage{hyperref} \usepackage[pass,letterpaper]{geometry} \usepackage{xspace} % Custom \usepackage{config/toggles} \usepackage{config/term...
{"hexsha": "293b40e1ddd16d51e7f05d2189f5531e23be22d1", "size": 3154, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "paper.tex", "max_stars_repo_name": "richard-roberts/AOVMTA", "max_stars_repo_head_hexsha": "782abebda87d0e4e4f9a4e22333c33de7b3fd146", "max_stars_repo_licenses": ["CC-BY-3.0"], "max_stars_count": nu...
struct FastReadBuffer{V<:AbstractVector{UInt8}} <: IO data::V position::Base.RefValue{Int} # last read position end FastReadBuffer(data::AbstractVector{UInt8}) = FastReadBuffer(data, Ref(0)) FastReadBuffer() = FastReadBuffer(Vector{UInt8}()) """ setdata!(buf::FastReadBuffer, data::AbstractVector{UInt8)) ...
{"hexsha": "60507896c2076902db5119f57f7935e298bc2011", "size": 3395, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/fastreadbuffer.jl", "max_stars_repo_name": "JeffBezanson/FastIOBuffers.jl", "max_stars_repo_head_hexsha": "7924db96eb99a58058946d816e1a334cee8f61f8", "max_stars_repo_licenses": ["MIT"], "max_st...
/* * Sift.cpp * * Created on: Jan 25, 2012 * Author: lbossard */ #include "root_sift.hpp" #include <cmath> #include <glog/logging.h> #include <opencv2/imgproc/imgproc.hpp> #include <boost/shared_ptr.hpp> #include "cpp/third_party/vlfeat/vl/dsift.h" namespace vision { namespace features { struct VlFree ...
{"hexsha": "a3013479051b02d20ed2c71d1887ccb2a67ea0a5", "size": 3063, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "MEX/src/cpp/vision/features/low_level/root_sift.cpp", "max_stars_repo_name": "umariqb/3D_Pose_Estimation_CVPR2016", "max_stars_repo_head_hexsha": "83f6bf36aa68366ea8fa078eea6d91427e28503b", "max_sta...
######################################################################## # Author(s): Shubh Gupta, Ashwin Kanhere # Date: 21 September 2021 # Desc: Utility code for GNSS computations/simulations ######################################################################## import numpy as np import math im...
{"hexsha": "2c268222462c19b82b7e6d2cfa0dfef61992de17", "size": 2247, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/gnss_lib/utils.py", "max_stars_repo_name": "Stanford-NavLab/deep_gnss", "max_stars_repo_head_hexsha": "4120337f87444c64d28e0b1ff8c76c9290ba1958", "max_stars_repo_licenses": ["MIT"], "max_stars...
from collections.abc import Callable from moai.utils.arguments import ( ensure_path, ensure_choices, ) import moai.utils.color.colorize as mic import os import torch import torchvision import visdom import numpy import functools import typing import logging import cv2 log = logging.getLogger(__name__) __all...
{"hexsha": "658f431478971368f5afe45a973df2a6eaf94106", "size": 4571, "ext": "py", "lang": "Python", "max_stars_repo_path": "moai/export/local/blend2d.py", "max_stars_repo_name": "tzole1155/moai", "max_stars_repo_head_hexsha": "d1afb3aaf8ddcd7a1c98b84d6365afb846ae3180", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
import random from pathlib import Path from typing import TYPE_CHECKING, List, Optional, Tuple import numpy as np import pandas as pd import torch from torch.utils.data import DataLoader, Dataset, Subset from torchvision import transforms from .misc import RandomSampler, grouped_features_indexes, set_transform clas...
{"hexsha": "4d04b3e4a9400e861d0cf5a97fd620a7d4372a85", "size": 7702, "ext": "py", "lang": "Python", "max_stars_repo_path": "dlfairness/original_code/nifr/nifr/data/dataset_wrappers.py", "max_stars_repo_name": "lin-tan/fairness-variance", "max_stars_repo_head_hexsha": "7f6aee23160707ffe78f429e5d960022ea1c9fe4", "max_sta...
import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv('stock_sentiment.csv') import string string.punctuation def remove_punc(message): Test_punc_removed = [char for char in message if char not in string.punctuation] Test_punc_removed_join = ''.join(Test_punc_removed)...
{"hexsha": "85e184f93fab0b90c9bc19675db480ccef26a94e", "size": 1586, "ext": "py", "lang": "Python", "max_stars_repo_path": "stocks sentiment analysis using SVM.py", "max_stars_repo_name": "krishnaaxo/Stock-Market-Sentiment-Analysis-Using-AI", "max_stars_repo_head_hexsha": "9fddb3c8ab0d8bf8ee14df16daef4a94546f1ef1", "ma...
import os from typing import List, Optional, Dict from copy import copy import numpy as np import pandas as pd from cascade_at.core.log import get_loggers from cascade_at.dismod.api import DismodAPIError from cascade_at.dismod.api.dismod_io import DismodIO from cascade_at.dismod.integrand_mappings import PRIMARY_INTE...
{"hexsha": "51101d404acc437c28efec19744611d234475b68", "size": 11493, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/cascade_at/dismod/api/dismod_extractor.py", "max_stars_repo_name": "ihmeuw/cascade-at", "max_stars_repo_head_hexsha": "a5b1b5da1698163fd3bbafc6288968dd9c398096", "max_stars_repo_licenses": ["...
#!/usr/bin/env python import spartan import numpy as np import test_common from spartan.util import Assert class BuiltinTest(test_common.ClusterTest): def test_arange_shape(self): # Arange with no parameters. Assert.raises_exception(ValueError, spartan.arange) # Arange with shape and stop Assert.ra...
{"hexsha": "964f41b665ebf7af8f34a522f380a6eb6a1ea548", "size": 4255, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_builtins.py", "max_stars_repo_name": "MaggieQi/spartan", "max_stars_repo_head_hexsha": "24b9f977d0a9ae99e672bf90d80a0f22ac41d133", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
!include 'mkl_vsl.f90' MODULE korc_random USE, INTRINSIC :: iso_c_binding USE korc_types ! use mkl_vsl_type ! use mkl_vsl IMPLICIT NONE TYPE(C_PTR), DIMENSION(:), ALLOCATABLE , PRIVATE :: states TYPE(C_PTR), PRIVATE :: state ! TYPE(VSL_STREAM_STATE), PRIVATE :: stream INTERFACE TYP...
{"hexsha": "aaf0965aad286df319652b105826ce4460a1e1e2", "size": 5528, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "docs/src/korc_random.f90", "max_stars_repo_name": "ORNL-Fusion/KORC", "max_stars_repo_head_hexsha": "975fc01cdac1e922fe537e739a6b67f01c6a6431", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
Require Export P09. Theorem distr_rev : forall l1 l2 : natlist, rev (l1 ++ l2) = (rev l2) ++ (rev l1). Proof. intros l1 l2. induction l1. - simpl. rewrite -> app_nil_end. reflexivity. - simpl. rewrite -> snoc_append. rewrite -> snoc_append. rewrite -> IHl1. rewrite <- app_assoc. reflexivity. Qed.
{"author": "tinkerrobot", "repo": "Software_Foundations_Solutions2", "sha": "c88b2445a3c06bba27fb97f939a8070b0d2713e6", "save_path": "github-repos/coq/tinkerrobot-Software_Foundations_Solutions2", "path": "github-repos/coq/tinkerrobot-Software_Foundations_Solutions2/Software_Foundations_Solutions2-c88b2445a3c06bba27fb9...
// // Copyright (c) 2015-2017, Deutsches Forschungszentrum für Künstliche Intelligenz GmbH. // Copyright (c) 2015-2017, University of Bremen // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // ...
{"hexsha": "d2f03952d82b228d62fa48d0d3682f9a0b0b7595", "size": 11243, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/grid/VectorGrid.hpp", "max_stars_repo_name": "JanWehrmann/slam-maps", "max_stars_repo_head_hexsha": "c03117e9d66ec312723ad700baabc0af04f36d70", "max_stars_repo_licenses": ["BSD-2-Clause"], "max...
! { dg-do compile } ! Some CSHIFT, EOSHIFT and UNPACK conformance tests ! program main implicit none real, dimension(1) :: a1, b1, c1 real, dimension(1,1) :: a2, b2, c2 real, dimension(1,0) :: a, b, c real :: tempn(1), tempv(5) real,allocatable :: foo(:) allocate(foo(0)) tempn = 2.0 a1 = 0 a2 = 0...
{"hexsha": "423fb131516515a066f4ae42174d8afa4dc32750", "size": 1739, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/intrinsic_argument_conformance_2.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517"...
#### DONNES QUALI : ON VA REPRESENTER LA PROPORTION DE 1. #Création d'un vecteur avec toutes les commbinaisons dans l'ordre) name= c("DD","with himself","with DC","with Silur" ,"DC","with himself","with DD","with Silur" ,"Silur","with himself","with DD","with DC" ) average= sample(seq(1,10) , 12 , replace=T) number= ...
{"hexsha": "d30f56372ce8db8956a9c182560bb772749c8a80", "size": 1155, "ext": "r", "lang": "R", "max_stars_repo_path": "OLD_GALLERY_RSCRIPT/#37_number_of_observation_on_barplot.r", "max_stars_repo_name": "JedStephens/R-graph-gallery", "max_stars_repo_head_hexsha": "a7a65d2f66372ea3724cf6e930d3c4b209f44dad", "max_stars_re...
import json import random import EoN import networkx as nx import numpy as np import math from typing import Set from collections import namedtuple from .utils import find_excluded_contours_edges_PQ2, edge_transmission, allocate_budget from . import PROJECT_ROOT SIR_Tuple = namedtuple("SIR_Tuple", ["S...
{"hexsha": "354dc6706384af0cebde1b4436d43e033473744c", "size": 4974, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctrace/simulation.py", "max_stars_repo_name": "gzli929/ContactTracing", "max_stars_repo_head_hexsha": "7be34c9e2ebbd305bef9d4c2ab91beb7b23bed91", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import config import datapane as dp import logging import numpy as np import pandas as pd import plotly.express as px import plotly.graph_objs as go import streamlit as st import utils logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=l...
{"hexsha": "399ddadf5cedf528a1100665edb18646d61aa5c6", "size": 25113, "ext": "py", "lang": "Python", "max_stars_repo_path": "public_transport_hourly.py", "max_stars_repo_name": "oguzhanyediel/imm_dataviz", "max_stars_repo_head_hexsha": "10da3d9f66ddae7075ced51a662e9ab4038c583f", "max_stars_repo_licenses": ["MIT"], "max...
import json import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np from .net_utils import run_lstm, col_name_encode class AggPredictor(nn.Module): def __init__(self, N_word, N_h, N_depth, use_ca): super(AggPredictor, self).__init__() ...
{"hexsha": "73af11be05bbc51484ef4d223dd0039730b1ede3", "size": 2285, "ext": "py", "lang": "Python", "max_stars_repo_path": "sqlnet/model/modules/aggregator_predict.py", "max_stars_repo_name": "LucienCheng/sqlnet", "max_stars_repo_head_hexsha": "fa0aad37e4e27d668be0db9869c93274191dbbb8", "max_stars_repo_licenses": ["BSD...
#import dependencies from flask import Flask, jsonify import numpy as np import sqlalchemy import datetime as dt from sqlalchemy import inspect, create_engine, func from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session #Setting up Database engine = create_engine("sqlite:///Resources/hawai...
{"hexsha": "50256b80cf44b42f4e7a97092504f217b1f47f8f", "size": 4216, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "clairewkh/SQLAlchemy-Challenge", "max_stars_repo_head_hexsha": "c8ea843ea921ee738a8390050dc9cde32286405e", "max_stars_repo_licenses": ["ADSL"], "max_stars_count": ...
import time import json from pathlib import Path import argparse import matplotlib.pyplot as plt import numpy as np import pandas as pd import torch from torch import nn, optim import torch.nn.functional as F from torchvision import transforms, datasets, models from PIL import Image from workspace_utils import active...
{"hexsha": "fcffa448906172030153218926544adbf104078e", "size": 3115, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict.py", "max_stars_repo_name": "usmanzaheer1995/udacity-ai-programming-nanodegree", "max_stars_repo_head_hexsha": "50c3dcd59e5a215089c51960d269b8878690ec5c", "max_stars_repo_licenses": ["MIT"...
\chapter{The Reorder Buffer (ROB) and the Dispatch Stage}\label{chapter:rob} The ROB tracks the state of all inflight instructions in the pipeline. The role of the ROB is to provide the illusion to the programmer that his program executes in-order. After instructions are decoded and renamed, they are then dispatched...
{"hexsha": "299f0f5967e5ca3c92a4ea599fcc3783efd2350e", "size": 8610, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sections/rob.tex", "max_stars_repo_name": "ccelio/riscv-boom-doc", "max_stars_repo_head_hexsha": "c3b752d82a08b31448b1a957ed57985db86f2c83", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_coun...
import numpy as np def checkFaces(da, isBnd, coords_local): # Loops over all faces of the boundary of a domain - marking dirichlet, neumann and processor to processor boundarie ranges = da.getGhostRanges() dim = da.getDim() sizes = np.empty(dim, dtype=np.int32) for ir, r in enumerate(ranges): ...
{"hexsha": "9c1c244fda9f743e96d1a06fea5567d36aec550c", "size": 1363, "ext": "py", "lang": "Python", "max_stars_repo_path": "PETScGMsFEM/checkFaces.py", "max_stars_repo_name": "tjdodwell/PETSc-GMsFEM", "max_stars_repo_head_hexsha": "43cbc123092bf4589510f5aca0b1c0b79272226d", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma Seq_NoFaultStuckD1: assumes noabort: "\<Gamma>\<turnstile>\<langle>Seq c1 c2,s\<rangle> \<Rightarrow>\<notin>({Stuck} \<union> Fault ` F)" shows "\<Gamma>\<turnstile>\<langle>c1,s\<rangle> \<Rightarrow>\<notin>({Stuck} \<union> Fault ` F)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Gamm...
{"llama_tokens": 2950, "file": "Simpl_Semantic", "length": 38}
#!/usr/bin/env python import sys, csv from pandas import * from numpy import * # simple list of the scores of all positions position_scores = [] # map from player-game to blunderrate meanerror = {} q_error_one = {} q_error_two = {} meanecho = {} perfectrate = {} blunderrate = {} gameoutcome = {} ...
{"hexsha": "fb9b5a378b7afceb2044716d4adfddbd2a798b27", "size": 3408, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/external/repositories_2to3/137656/blundercheck-master/combine/contest_20150219a/data_prep/show_one_game.py", "max_stars_repo_name": "Keesiu/meta-kaggle", "max_stars_repo_head_hexsha": "87de73...
(* EXTRACT from HOL/ex/Primes.thy*) (*Euclid's algorithm This material now appears AFTER that of Forward.thy *) theory TPrimes imports Main begin fun gcd :: "nat \<Rightarrow> nat \<Rightarrow> nat" where "gcd m n = (if n=0 then m else gcd n (m mod n))" text {*Now in Basic.thy! @{thm[display]"dvd_def"} \rulena...
{"author": "SEL4PROJ", "repo": "jormungand", "sha": "bad97f9817b4034cd705cd295a1f86af880a7631", "save_path": "github-repos/isabelle/SEL4PROJ-jormungand", "path": "github-repos/isabelle/SEL4PROJ-jormungand/jormungand-bad97f9817b4034cd705cd295a1f86af880a7631/case_study/isabelle/src/Doc/Tutorial/Rules/TPrimes.thy"}
import cv2 import jax.numpy as jnp import numpy as np import onnx from onnx_jax.backend import run_model from onnx_jax.logger import logger def _cosin_sim(a, b): a = a.flatten() b = b.flatten() cos_sim = jnp.dot(a, b) / (jnp.linalg.norm(a) * jnp.linalg.norm(b)) return cos_sim # https://github.com/o...
{"hexsha": "8693b8ff853ffaa0a458363a547c37dc60a31795", "size": 1717, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/model/demo.py", "max_stars_repo_name": "gglin001/onnx_jax", "max_stars_repo_head_hexsha": "08e2a1181250db48f4436f6430903fc895a3a1d6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
import os import pytest import sys import numpy as np from numpy.testing import assert_allclose from pytest import raises as assert_raises from scipy.sparse.linalg._svdp import _svdp from scipy.sparse import csr_matrix, csc_matrix, coo_matrix TOLS = { np.float32: 1e-4, np.float64: 1e-8, np.complex64: 1e-4...
{"hexsha": "55ffa5bc9cc70141407b28d9a8c4f68a985ede35", "size": 6210, "ext": "py", "lang": "Python", "max_stars_repo_path": "scipy/sparse/linalg/tests/test_propack.py", "max_stars_repo_name": "jake-is-ESD-protected/scipy", "max_stars_repo_head_hexsha": "d7283ff75c218c300f372b5fdd960b987c1709a1", "max_stars_repo_licenses...
#!/usr/bin/python3 # -*- coding: utf-8 -*- ##===-----------------------------------------------------------------------------*- Python -*-===## ## ## S E R I A L B O X ## ## This file is distributed under terms of BSD license. ## See LICENSE.txt for more information. ## ##===----------...
{"hexsha": "7e193f2c4d688b4ba79aab3c143926eff739613a", "size": 1234, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/serialbox-python/sdb/sdbcore/errorlist.py", "max_stars_repo_name": "elsagermann/serialbox", "max_stars_repo_head_hexsha": "c590561d0876f3ce9a07878e4862a46003a37879", "max_stars_repo_licenses":...
#!/usr/bin/env python3 import numpy # code from StackExchange. def step(world): (wd, ht) = world.shape print("Doing a step with world shape:",wd,ht) print(repr(world)) neighbors = numpy.zeros((wd, ht), dtype='uint8') neighbors[1:] += world[:-1] neighbors[:-1] += world[1:] neighbors[:,1:] +...
{"hexsha": "e857c680ce542d367ece62e35b3802667849b457", "size": 606, "ext": "py", "lang": "Python", "max_stars_repo_path": "numpy_game_of_life.py", "max_stars_repo_name": "btolva/mh19-work", "max_stars_repo_head_hexsha": "bc9d9cd54b0eb004290efbc730baf5cb49eaa190", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
module mpimod !! NOTES: !! * Need to consider overloading routines as send_ghost and send_noghost so that !! it is more clear what the structure of the input arrays should be. use, intrinsic:: iso_fortran_env, only: stderr=>error_unit use phys_consts, only : lsp, wp use autogrid, only : grid_auto use mpi, only: mpi_...
{"hexsha": "a466398569a77db270163d1a46b81b9d2c8d5c4e", "size": 17632, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/mpimod/mpimod.in.f90", "max_stars_repo_name": "ForestClaw/gemini3d", "max_stars_repo_head_hexsha": "0487c8fad8ade7b5c9d1c2d53cdcc18a7cb8db72", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
[STATEMENT] lemma real_minus_mult_self_le [simp]: "- (u * u) \<le> x * x" for u x :: real [PROOF STATE] proof (prove) goal (1 subgoal): 1. - (u * u) \<le> x * x [PROOF STEP] by (rule order_trans [where y = 0]) auto
{"llama_tokens": 97, "file": null, "length": 1}
import cv2 import numpy as np import RLpDefinitions as definitions import RDetectPlates from RPossibleChar import RPossibleChar as PossibleChar import imutils from imutils import perspective import matplotlib.pyplot as plt GAUSSIAN_SMOOTH_FILTER_SIZE = (7, 7) ADAPTIVE_THRESH_BLOCK_SIZE = 39 ADAPTIVE_THRESH_WEIGHT =...
{"hexsha": "9018176bbb50374181189e2d7571022b94c0cec5", "size": 18382, "ext": "py", "lang": "Python", "max_stars_repo_path": "ImageProcessingProject/AllCodes_img_processing/RLpPreprocess.py", "max_stars_repo_name": "schliffen/Localazing-with-image-processing-techniques", "max_stars_repo_head_hexsha": "9f36bf2f38d15985a8...
[STATEMENT] lemma while_true_trel: assumes "\<sigma> \<dagger> b = true" shows "(\<sigma>, while b do P od) \<rightarrow>\<^sub>u (\<sigma>, P ;; while b do P od)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<sigma>, while\<^sup>\<top> b do P od) \<rightarrow>\<^sub>u (\<sigma>, P ;; while\<^sup>\<top> b do...
{"llama_tokens": 144, "file": "UTP_utp_utp_rel_opsem", "length": 1}
[STATEMENT] lemma congruence_eye [simp]: shows "congruence eye H = H" [PROOF STATE] proof (prove) goal (1 subgoal): 1. congruence eye H = H [PROOF STEP] by (cases H) (simp add: mat_adj_def mat_cnj_def)
{"llama_tokens": 89, "file": "Complex_Geometry_Matrices", "length": 1}
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # # Author: Hector Ta # # Created: 24/07/2019 # Copyright: (c) Hector Ta 2019 # Licence: <your licence> #------------------------------------------------------------------------------- impor...
{"hexsha": "99debdf03029324376fb278b7ec01c762bdc471b", "size": 2301, "ext": "py", "lang": "Python", "max_stars_repo_path": "Arduino test/Python/plotted_csv - Arduino_oneChannel.py", "max_stars_repo_name": "HectorTa1989/Reflow-soldering-oven-DAQ", "max_stars_repo_head_hexsha": "84e64a97228ef19431e38df180f803dc564290a8",...
import cv2 import numpy as np def detect(image): gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) edges = cv2.Canny(gray, 50, 150, apertureSize=3) lines = cv2.HoughLines(edges, 1, np.pi / 180, 200) for rho, theta in lines[0]: a = np.cos(theta) b = np.sin(theta) x0 = a * rho ...
{"hexsha": "9c5ce6f08366cab7591b1d42fafd64963217fd87", "size": 549, "ext": "py", "lang": "Python", "max_stars_repo_path": "je_open_cv/modules/hough_line.py", "max_stars_repo_name": "JE-Chen/Python-OPENCV-JE", "max_stars_repo_head_hexsha": "d5dd3823f0a1cfc195da66bdcbe738c9bbdfc59b", "max_stars_repo_licenses": ["MIT"], "...
theory SemanticsSnippets imports Optimizations.CanonicalizationProofs begin (*notation (latex) NoNode ("\<epsilon>") *) notation (latex) kind ("_\<llangle>_\<rrangle>") syntax (spaced_type_def output) "_constrain" :: "logic => type => logic" ("_ :: _" [4, 0] 3) text_raw \<open>\Snip{isbinary} \begin{cent...
{"author": "uqcyber", "repo": "veriopt-releases", "sha": "4ffab3c91bbd699772889dbf263bb6d2582256d7", "save_path": "github-repos/isabelle/uqcyber-veriopt-releases", "path": "github-repos/isabelle/uqcyber-veriopt-releases/veriopt-releases-4ffab3c91bbd699772889dbf263bb6d2582256d7/Papers/Semantics/SemanticsSnippets.thy"}
module KrylovMethods import Base.BLAS include("cg.jl") include("blockCG.jl") include("cgls.jl") include("bicgstb.jl") include("blockBiCGSTB.jl") include("gmres.jl") include("lanczosBidiag.jl") include("ssor.jl") include("lsqr.jl") include("lanczosTridiag.jl") include("lanczos.jl") include("minres.jl...
{"hexsha": "6e1653b0d6074b99985593fbcafff2f210f8a317", "size": 344, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/KrylovMethods.jl", "max_stars_repo_name": "JuliaPackageMirrors/KrylovMethods.jl", "max_stars_repo_head_hexsha": "964bca6c9ab389b7c5bfa33f5a9c943dc54901b8", "max_stars_repo_licenses": ["MIT"], "m...
import torch from torch import nn import scipy.sparse as sp import torch.nn.functional as F from shaDow.utils import adj_norm_sym, adj_norm_rw, coo_scipy2torch, get_deg_torch_sparse from torch_scatter import scatter from torch_geometric.nn import global_sort_pool import numpy as np import torch.nn.functional as F from...
{"hexsha": "f477dd99a471af5d5da18b05d486a2a9b415730f", "size": 30530, "ext": "py", "lang": "Python", "max_stars_repo_path": "shaDow/layers.py", "max_stars_repo_name": "yxia-fb/shaDow-GNN", "max_stars_repo_head_hexsha": "2b867011c7084d4ed1b407e29f3ee09632fcc3dc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import argparse import gym import os import sys import numpy as np from itertools import count import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable from torch.distributions import Categorical import matplotlib.pyplot as plt plt.switch_backe...
{"hexsha": "054e87e1b20a3cde12425e02bb8e66083f00efa2", "size": 14952, "ext": "py", "lang": "Python", "max_stars_repo_path": "imitation_work/a2c.py", "max_stars_repo_name": "09jvilla/CS234_gym", "max_stars_repo_head_hexsha": "ef77567eda4932b181965fa3081b00e7f57d37c8", "max_stars_repo_licenses": ["Python-2.0", "OLDAP-2.7...
@doc raw""" HeteroscedasticLikelihood(λ::T=1.0)->HeteroscedasticGaussianLikelihood ## Arguments - `λ::Real` : The maximum precision possible (this is optimized during training) --- Gaussian with heteroscedastic noise given by another gp: ```math p(y|f,g) = \mathcal{N}(y|f,(\lambda \sigma(g))^{-1}) ``` Where ...
{"hexsha": "91581927217fcd69cd476fa2f116a9c45479adf0", "size": 6105, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/likelihood/heteroscedastic.jl", "max_stars_repo_name": "theogf/AugmentedGaussianProcesses.jl", "max_stars_repo_head_hexsha": "eb5eb7f886c209a80e596ea6e0f678dd2e5f0a7b", "max_stars_repo_licenses...
#!/usr/bin/env python """ Utility functions for quickdraw project: For data preprocessing: - npy_to_df: load .npy file(s) with preprocessed drawings and turn into df - prepare_data: preprocess images and labels, turn into arrays normalise images and binarize labels and split test train For model output: ...
{"hexsha": "b5f107d30fe42f001b89e136a2d02224d3bd212e", "size": 6274, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/quickdraw_utils.py", "max_stars_repo_name": "nicole-dwenger/cdsviusal-quickdraw", "max_stars_repo_head_hexsha": "183ed7c5be2afce6baa3dbbd0d996a41bc39dff2", "max_stars_repo_licenses": ["MIT"]...
# Field class (relativistic) for OLIVE # # Class is initialized with an array of modes and amplitudes as well as corresponding metadata # # # Units # -Assume CGS units for now # import numpy as np from scipy.constants import c as c_mks c = c_mks*1.e2 class Field(object): def __init__(self, cavity): ""...
{"hexsha": "3565762b040a85aa964f56ad3863b5b0232f77cf", "size": 9783, "ext": "py", "lang": "Python", "max_stars_repo_path": "olive/fields/field.py", "max_stars_repo_name": "radiasoft/olive", "max_stars_repo_head_hexsha": "f7b80112f0fc8be0c50b6eedceccd422997081b5", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
import numpy as np import itertools np.random.seed(0) def main(): # 4.14.1 print('4.14.1') # Generator matrix for Hamming code G = np.array([ [1, 0, 1, 1], [1, 1, 0, 1], [0, 0, 0, 1], [1, 1, 1, 0], [0, 0, 1, 0], [0, 1, 0, 0], ...
{"hexsha": "5d23e50981fe17a0963731cd01d7128ee185f653", "size": 4864, "ext": "py", "lang": "Python", "max_stars_repo_path": "coding-the-matrix/error_correction_code.py", "max_stars_repo_name": "hiromakimaki/study-memo", "max_stars_repo_head_hexsha": "71700551d3d14867c0276541764ac6a3e1f11944", "max_stars_repo_licenses": ...
%!TEX root = ../main.tex \chapter{About the Author}\lipsum
{"hexsha": "401ee8411dae5b96371780f09954258fbd52a447", "size": 58, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "dirac/additional/aboutauthor.tex", "max_stars_repo_name": "rmathsphys/latex-templates", "max_stars_repo_head_hexsha": "7009f28fb1f7eafb51209182a875751d199dbe11", "max_stars_repo_licenses": ["MIT"], "m...
[STATEMENT] lemma option_assn_simps[simp]: "option_assn P None v' = \<up>(v'=None)" "option_assn P v None = \<up>(v=None)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. option_assn P None v' = \<up> (v' = None) &&& option_assn P v None = \<up> (v = None) [PROOF STEP] apply (cases v', simp_all) [PROOF STATE] pro...
{"llama_tokens": 222, "file": "Refine_Imperative_HOL_Sepref_HOL_Bindings", "length": 3}
#include <iostream> #include <vector> #include <math.h> #include <sys/utsname.h> using namespace std; #include "dae.h" #include "dom/domCOLLADA.h" #ifdef __dom150COLLADA_h__ using namespace ColladaDOM150; #endif #include <fstream> #include "yaml-cpp/yaml.h" #include <boost/foreach.hpp> #include <boost/filesystem/pat...
{"hexsha": "b5b0142561ada0946d9e5a7855b022a509f6547f", "size": 85017, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "euscollada/src/collada2eus.cpp", "max_stars_repo_name": "k-okada/jsk_model_tools", "max_stars_repo_head_hexsha": "7c191fd7b4f7c53f30662e476d2d4299ff3c3fcf", "max_stars_repo_licenses": ["BSD-3-Claus...
!! Copyright (C) Stichting Deltares, 2012-2016. !! !! This program is free software: you can redistribute it and/or modify !! it under the terms of the GNU General Public License version 3, !! as published by the Free Software Foundation. !! !! This program is distributed in the hope that it will be useful, !! b...
{"hexsha": "23992d3a84ceb2b77cb86229531a37c246d6821e", "size": 2753, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "docker/water/delft3d/tags/v6686/src/engines_gpl/waq/packages/waq_kernel/src/bloom/grazin.f", "max_stars_repo_name": "liujiamingustc/phd", "max_stars_repo_head_hexsha": "4f815a738abad43531d02ac66f5...
# -*- coding: utf-8 -*- """ Created on Mon Aug 1 14:44:28 2016 @author: poyu """ import os # SET THE GPU DEVICE os.environ["CUDA_VISIBLE_DEVICES"]="0" import numpy as np import theano import sys import lasagne import lasagne.layers.dnn from theano.tensor import TensorType def get_CNNparameters(): number_filter ...
{"hexsha": "0d40b6c1e32719fe07f2e7e8893cce4c45075b2a", "size": 13428, "ext": "py", "lang": "Python", "max_stars_repo_path": "mTOP2016_CNNFeatureExtraction.py", "max_stars_repo_name": "pykao/mTOP2016", "max_stars_repo_head_hexsha": "71e65a0de812160968195be51ee15b5fbdff904d", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import pandas as pd import csv import matplotlib.pyplot as plt import random as rnd # Read data file headers = ['x', 'y'] df = pd.read_csv('data_2.csv', names=headers) # Extracting x and y columns x = df['x'].values y = df['y'].values # Converting string to float for dt in range(0, len(x)): x[...
{"hexsha": "a773776155c3d3ab845b6333f01fd3437b0b1f4c", "size": 1676, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code/Data_2.py", "max_stars_repo_name": "namangupta98/ENPM673_HW1", "max_stars_repo_head_hexsha": "c6a6304221d8601e82bfdc33d492db5477f519d8", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
using Hecke, DelimitedFiles boundcond = ARGS[1] gtype = ARGS[2] _gtype = replace(replace(replace(replace(replace(gtype, '[' => '_'), ']' => '_'), ' ' => '_'), ',' => '_'), "__" => "_") file = "conductors_" * boundcond * "_" * _gtype; bound = fmpz(Meta.eval(Meta.parse(boundcond))) gtype = convert(Vector{Int}, Meta.e...
{"hexsha": "5ed1ab89fe934c3f36221b7dedba8beba5354a87", "size": 2078, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/FieldEnumeration/conductors_from_structure_absolute_abelian.jl", "max_stars_repo_name": "StevellM/Hecke.jl", "max_stars_repo_head_hexsha": "64938b616109da05d1e294e87b2ca3e0ad41fb8e", "max_...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # File: DepthwiseSep2D.py # Author: Julian Faraone <julian.faraone@sydney.edu.au> import numpy as np import tensorflow as tf import math from ._common import layer_register from ..utils import logger #slim allows us to combine convolutions, batch norm and relu into one f...
{"hexsha": "8b491984a8a559c5f19f32cfaf3a10bebd975ffb", "size": 2488, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorpack/models/DepthwiseSep2D.py", "max_stars_repo_name": "arassadin/SYQ", "max_stars_repo_head_hexsha": "d30e6f0053ada3ad504038698a8756425594aa22", "max_stars_repo_licenses": ["Apache-2.0"], "...
# "1HBV:A:ARG8;1HBV:B:ARG8;" #python27 -i mkLigandXML.py 1HBV_1HBV_Lig/1HBV_Lig.pdbqt -center 2.659 7.004 -7.047 -boxDim 8.0 8.0 14.0 -o test.xml ## FIXME use getopt to handl command line parameters import sys from MolKit import Read from AutoDockFR.utils import pdbqt2XML import numpy def usage(): print "*******...
{"hexsha": "7f391cd1e685428baaef456c7f40cc7d66f56d79", "size": 3503, "ext": "py", "lang": "Python", "max_stars_repo_path": "MetaScreener/external_sw/mgltools/MGLToolsPckgs/AutoDockFR/bin/mkLigandXML.py", "max_stars_repo_name": "bio-hpc/metascreener", "max_stars_repo_head_hexsha": "6900497629f601c4b6c0c37da26de58ffa2219...
# Based off https://github.com/pytorch/examples/blob/master/dcgan/main.py import argparse import os import random import numpy as np import torch import torchvision from torch.utils.tensorboard import SummaryWriter from tqdm import tqdm, trange from data.dataloaders import get_dataloader from model.dcgan import Discr...
{"hexsha": "6543271cd39912a940b8853fa2a41f4640f4aa8f", "size": 4847, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_dcgan.py", "max_stars_repo_name": "nik-sm/generator-surgery", "max_stars_repo_head_hexsha": "b4a2213a86b8faae88efce18cb129eeaf4161252", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#include <boost/multi_array/index_gen.hpp>
{"hexsha": "1c33152011c2c10f2a1d6ce9df7d91b2af84e7ed", "size": 43, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_multi_array_index_gen.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1.0...
[STATEMENT] lemma R_star: "(Ref i i)\<^sup>\<star> \<le> Ref i i" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Ref i i\<^sup>\<star> \<le> Ref i i [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. Ref i i\<^sup>\<star> \<le> Ref i i [PROOF STEP] have "H i (Ref i i) i" [PROOF STATE] proof (prov...
{"llama_tokens": 668, "file": "Hybrid_Systems_VCs_KleeneAlgebraTests_HS_VC_KAT", "length": 10}
# ============================================================================= # PC2015Masoli_model.py # # created 01 August 2017 Lungsi # # This py-file contains the class of the model. # The template of the model in the directory PC2015Masoli/ # is based on http://dx.doi.org/10.3389/fncel.2015.00047 # available in ...
{"hexsha": "1df761b07553b30e76c17441654f519c1a068eee", "size": 14017, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/cells/PC2015Masoli_model.py", "max_stars_repo_name": "appukuttan-shailesh/hbp-cerebellum-models", "max_stars_repo_head_hexsha": "b3dd9726f8473a805f2d83daf9e5239374e60eb6", "max_stars_repo_...
import sys import os sys.path = [os.path.join(os.path.dirname(__file__), "..")] + sys.path # from physt.histogram1d import Histogram1D from physt import histogram import numpy as np import pytest class TestNumpyBins: def test_nbin(self): arr = np.random.rand(100) hist = histogram(arr, bins=15) ...
{"hexsha": "91ddbb423f5cfd6696dde6b5a5414d82df0df08c", "size": 1618, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_histogram.py", "max_stars_repo_name": "marinang/physt", "max_stars_repo_head_hexsha": "6536d559dff6d70d98e66bf0711e81099aa5699c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import numpy as np import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D from tensorflow.keras.optimizers import RMSprop, Adam, SGD from tensorflow.keras.layers import LeakyReLU from tensorflow.keras.callback...
{"hexsha": "493682091ef27075d94da83188370e911d834b9c", "size": 5577, "ext": "py", "lang": "Python", "max_stars_repo_path": "tradingBot_DQN_v1/Magician.py", "max_stars_repo_name": "Skinok/AI_Framework", "max_stars_repo_head_hexsha": "3889d69e4aa68067f29285b6cb6a07f4f3886636", "max_stars_repo_licenses": ["MIT"], "max_sta...
module TimeStepping using DataStructures using JuMP using Mosek using MosekTools using Ipopt using LinearAlgebra using Revise import MathOptInterface include("moreau.jl") include("integrator.jl") export Moreau, step, set_state export Integrator, integrate end
{"hexsha": "784b4f91d581bb38555d95810456b8a00eacfe3e", "size": 264, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/TimeStepping.jl", "max_stars_repo_name": "Symplectomorphism/TimeStepping.jl", "max_stars_repo_head_hexsha": "065d3bcb8d3eb01eed76567c2affc506fb372467", "max_stars_repo_licenses": ["MIT"], "max_s...
#### All this code needs to be modified. We need to modify for LiTS. ##### Neeed to probably do some kind of from promise2012.Vnet.model_vnet3d import Vnet3dModule from promise2012.Vnet.util import convertMetaModelToPbModel import numpy as np import pandas as pd import cv2 def train(): ''' P...
{"hexsha": "f44c0b64c493788350bfc6e9346de598f409759b", "size": 2072, "ext": "py", "lang": "Python", "max_stars_repo_path": "LiTS/vnet3d_train_predict.py", "max_stars_repo_name": "Sempronius/LiTS---Liver-Tumor-Segmentation-Challenge", "max_stars_repo_head_hexsha": "1d9ccdce52d30314fd5cc9f0a351a361101bc8db", "max_stars_r...
{-# OPTIONS --cubical --no-import-sorts #-} module Number.Consequences where open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Foundations.Logic renaming (inr to inrᵖ; inl to inlᵖ) ...
{"hexsha": "d6377335b961517cdee89c6951a94ec0ffcf443e", "size": 53961, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "agda/Number/Consequences.agda", "max_stars_repo_name": "mchristianl/synthetic-reals", "max_stars_repo_head_hexsha": "10206b5c3eaef99ece5d18bf703c9e8b2371bde4", "max_stars_repo_licenses": ["MIT"],...
module TestDBCollection using SimString using Test @testset "Check single updates of DictDB using CharacterNGrams" begin db = DictDB(CharacterNGrams(3, " ")) push!(db, "foo") push!(db, "bar") push!(db, "fooo") @test db.string_collection == ["foo", "bar", "fooo"] @test db.string_size_map[5] ==...
{"hexsha": "a12c6a6c5e5d5ee60939068bffe4d82703dc75b7", "size": 4649, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test01_dictdb.jl", "max_stars_repo_name": "PyDataBlog/SimString.jl", "max_stars_repo_head_hexsha": "a76423ac68650f7f238d88be7c1f09a40863c1bc", "max_stars_repo_licenses": ["MIT"], "max_stars_co...