text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
# Allocates a new output array and run [`downsample!`](@ref).
function downsample(a::AbstractMatrix, aggregator, scale)
downsample!(initdownsample(a, scale), a, aggregator, scale)
end
# Downsamples matrix `a` to another matrix `out` of the correct size.
# - `aggregator` is a function such as `mean` or `sum` that ... | {"hexsha": "d87867610122098425cbad4df36105273cd034d9", "size": 1255, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/downsampling.jl", "max_stars_repo_name": "rafaqz/Dispersal.jl", "max_stars_repo_head_hexsha": "9c03aca80b3ca7bf00901eaa0641dcd06f4f04a9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
[STATEMENT]
lemma NewInitThrowReds:
assumes nDone: "\<nexists>sfs. shp s C = Some (sfs, Done)"
and cls_C: "is_class P C"
and INIT_steps: "P \<turnstile> \<langle>INIT C ([C],False) \<leftarrow> unit,s,False\<rangle> \<rightarrow>* \<langle>throw a,s',b'\<rangle>"
shows "P \<turnstile> \<langle>new C,s,False\<rangle... | {"llama_tokens": 1836, "file": "JinjaDCI_J_Equivalence", "length": 15} |
import os
import yaml
import pgl
import time
import copy
import numpy as np
import os.path as osp
from pgl.utils.logger import log
from pgl.graph import Graph
from pgl import graph_kernel
from pgl.sampling.custom import subgraph
from ogb.lsc import MAG240MDataset, MAG240MEvaluator
import time
from tqdm import tqdm
cl... | {"hexsha": "a3fcaaa39cb8f783ae494a330b1e857c0c37654b", "size": 10701, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/kddcup2021/MAG240M/r_unimp/dataset/sage_all_data.py", "max_stars_repo_name": "zbmain/PGL", "max_stars_repo_head_hexsha": "dbded6a1543248b0a33c05eb476ddc513401a774", "max_stars_repo_licen... |
import torch
import torch.nn as nn
import numpy as np
import transformer.Constants as Constants
from transformer.Layers import FFTBlock
from text.symbols import symbols
def get_sinusoid_encoding_table(n_position, d_hid, padding_idx=None):
""" Sinusoid position encoding table """
def cal_angle(position, hid_... | {"hexsha": "f6ee083b8006cfa6e1c4f4087b839c0b3b0e7747", "size": 5119, "ext": "py", "lang": "Python", "max_stars_repo_path": "transformer/Models.py", "max_stars_repo_name": "andrewgolman/YSDA_PracticalDS_Synthesis", "max_stars_repo_head_hexsha": "24d370f13a09dd387de0f0c8be9d7fa0dd06e2b1", "max_stars_repo_licenses": ["MIT... |
"""
Benchmark: robust synthetic control.
Implementation taken from:
https://github.com/SucreRouge/synth_control
"""
from __future__ import division
import numpy as np
from numpy.linalg import inv, norm
from sklearn import linear_model
# singular value thresholding
def threshold_test(X, mu=1):
# enforce data ma... | {"hexsha": "bf61c3bffb8445c727d81ddf606e8f1a6860d5cb", "size": 6063, "ext": "py", "lang": "Python", "max_stars_repo_path": "synth_functions.py", "max_stars_repo_name": "ZhaozhiQIAN/SyncTwin-NeurIPS-2021", "max_stars_repo_head_hexsha": "78eff91d0287c7f1f66c76ca24834c7d1029ad3b", "max_stars_repo_licenses": ["MIT"], "max_... |
C *********************************************************
C * *
C * TEST NUMBER: 09.01.09.02/02 *
C * TEST TITLE : Error 402 handled by system *
C * *
C * PHIGS V... | {"hexsha": "402a4184263364ad1f3dae02e6694f80c29b0f40", "size": 578, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "third_party/Phigs/PVT/PVT_fort/09/01/09/02/p02.f", "max_stars_repo_name": "n1ckfg/Telidon", "max_stars_repo_head_hexsha": "f4e2c693ec7d67245974b73a602d5d40df6a6d69", "max_stars_repo_licenses": ["MI... |
import json
import matplotlib
import numpy
import matplotlib.pyplot as plt
jslists=[]
with open('C:/Users/yz18514/detectron2/Faster_RCNN_HPB/output/metrics.json', 'r') as in_file:
for jsonObj in in_file:
jslist = json.loads(jsonObj)
jslists.append(jslist)
data_time=[]
cls_accuracy=[]... | {"hexsha": "586046dd8c6579105c34955ba4e03a87c4b8b378", "size": 849, "ext": "py", "lang": "Python", "max_stars_repo_path": "Mask_RCNN/Faster_RCNN_HPB/graph.py", "max_stars_repo_name": "pkasten/Chiral-molecule-detection", "max_stars_repo_head_hexsha": "fdeac581484b2b058eff863e2b5cd49b217fc4f5", "max_stars_repo_licenses":... |
import numpy as np
import pytest
import autogalaxy as ag
from autoarray.inversion import inversions
from autogalaxy.mock.mock import MockLightProfile
class MockFitImaging:
def __init__(self, model_images_of_galaxies):
self.model_images_of_galaxies = model_images_of_galaxies
class TestLik... | {"hexsha": "6224f05c9b87a6326d4639762453cef928d652bb", "size": 31132, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_autogalaxy/fit/test_fit_interferometer.py", "max_stars_repo_name": "jonathanfrawley/PyAutoGalaxy", "max_stars_repo_head_hexsha": "55fb44f22ce5490318378dc31596c887d0d2e29b", "max_stars_repo_l... |
import re
import os
import pandas as pd
import numpy as np
import pickle as pkl
from nltk.corpus import stopwords
from nltk.tokenize import RegexpTokenizer
from nltk import word_tokenize
from nltk.stem import WordNetLemmatizer
from sklearn.utils import resample
from sklearn.utils import shuffle
from variables import *... | {"hexsha": "3207c284a2028fbd49c645e58917771ea28bbcc5", "size": 6652, "ext": "py", "lang": "Python", "max_stars_repo_path": "Pytroch Glove Embedding Model/util.py", "max_stars_repo_name": "Zuu97/Sentiment-Analysis-with-PyTroch", "max_stars_repo_head_hexsha": "a501a7e1d11b89b7b51c4d09b95b0dde9ae045fc", "max_stars_repo_li... |
[STATEMENT]
lemma (in Corps) ring_n_eSum_K_eSum:"\<lbrakk>distinct_pds K n P;
\<forall>j \<le> m. f j \<in> carrier (O\<^bsub>K P n\<^esub>)\<rbrakk> \<Longrightarrow> nsum (O\<^bsub>K P n\<^esub>) f m = nsum K f m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>distinct_pds K n P; \<forall>j\<le>m. ... | {"llama_tokens": 266, "file": "Valuation_Valuation2", "length": 2} |
"""
Google Cloud APIs
"""
module GoogleCloud
export
Credentials, AnonymousCredentials, JSONCredentials, MetadataCredentials, GoogleSession, authorize,
set_session!, get_session
export
iam, storage, secrets, compute, container, pubsub, logging, datastore
export
KeyStore, commit!, fetch!, sync!, clearcac... | {"hexsha": "fd0e491ac45ea5fddd5b4d0969dc095e0573a907", "size": 807, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/GoogleCloud.jl", "max_stars_repo_name": "Picnic-Score/GoogleCloud.jl", "max_stars_repo_head_hexsha": "9f39073ede4ea5deed40b4bd1a963c28b7a4773f", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
#include <stan/math/rev.hpp>
#include <gtest/gtest.h>
#include <boost/numeric/odeint.hpp>
#include <test/unit/math/rev/functor/util_rk45.hpp>
#include <test/unit/math/prim/functor/harmonic_oscillator.hpp>
#include <test/unit/math/prim/functor/forced_harmonic_oscillator.hpp>
#include <test/unit/math/prim/functor/lorenz.... | {"hexsha": "1847bc7bb8d2a637987b393b2b754d19c54e63bd", "size": 8884, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/unit/math/rev/functor/integrate_ode_rk45_rev_test.cpp", "max_stars_repo_name": "bayesmix-dev/math", "max_stars_repo_head_hexsha": "3616f7195adc95ef8e719a2af845d61102bc9272", "max_stars_repo_lic... |
# ------------------------------------------------------------------------------
# Description:
# Author: benedikt.strahm@ilek.uni-stuttgart.de
# Created: 2020-09-22
# Execution: Import functions / collections (from folder.file import func)
# -------------------------------------------------------------... | {"hexsha": "4fd28348d368ac994191884f1491bb70577ca016", "size": 9947, "ext": "py", "lang": "Python", "max_stars_repo_path": "modelProp.py", "max_stars_repo_name": "BeneStrahm/WindTunnelPostprocessing", "max_stars_repo_head_hexsha": "238cb9c0eb78e786d84740194c8e63811ace418e", "max_stars_repo_licenses": ["MIT"], "max_star... |
from teachablehub import config
from uplink import (
post,
retry,
args,
Query,
Body,
json,
response_handler
)
from .base import BaseTeachableHubConsumer, raise_for_status
from .errors import MissingTeachableError
import numpy as np
from json import loads, dumps, JSONEncoder
class NumpyEnco... | {"hexsha": "e0d9eef339f4d8b3127228ba0bbe723c54aba742", "size": 2776, "ext": "py", "lang": "Python", "max_stars_repo_path": "teachablehub/clients/prediction_api.py", "max_stars_repo_name": "teachablehub/python-sdk", "max_stars_repo_head_hexsha": "9e90f677a71d19e90b1c1ce03617c162e5ececeb", "max_stars_repo_licenses": ["MI... |
'''20211201 calculate (Vector) stats from csv spectra, by class..
input: csv
* spectra fields are identified by ending in nm
input: field label of class..(e.g. cluster_label, fuel_type, etc)..
...spectra with the same label are given the same color and same key in legend'''
import os
import sys
import csv
import matp... | {"hexsha": "e397cfa91dbc851afe85e450fc710dcb1c93de7b", "size": 6709, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/csv_spectra_class_stats.py", "max_stars_repo_name": "breadcrumbbuilds/bcws-psu-research", "max_stars_repo_head_hexsha": "e541ffc050807186160a6b8d7cc6ac78fc9f3ddc", "max_stars_repo_licenses": ["... |
import math
from copy import deepcopy
from functools import partial
from typing import (Any, Callable, List, Optional, Tuple, Union)
import numpy as np
from fedot.core.composer.composing_history import ComposingHistory
from fedot.core.composer.constraint import constraint_function
from fedot.core.composer.optimisers.... | {"hexsha": "17afadcc54017e2d32a46d11e2cc6f82b70cbd7f", "size": 19348, "ext": "py", "lang": "Python", "max_stars_repo_path": "fedot/core/composer/optimisers/gp_comp/gp_optimiser.py", "max_stars_repo_name": "Kwentar/FEDOT", "max_stars_repo_head_hexsha": "97a561698c0aa006aa627fc56965a0bc251a4ed8", "max_stars_repo_licenses... |
import os # File and path handling
import numpy
import copy
from ..image import *
from ..helpers import *
from .pipeline import Pipeline
from .step import Step
class Step_Smoothing(Step):
""" Smooth an image. """
def __init__(self, mode="gaussian", sigma=0):
Step.__init__(self, "Smoot... | {"hexsha": "829d7601c9a0b933f20768a74d6e82a95a9f0c20", "size": 1170, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctsimu/processing/smoothing.py", "max_stars_repo_name": "BAMresearch/ctsimu-toolbox", "max_stars_repo_head_hexsha": "2329fe0bba8a89061430649c043c70c58835a435", "max_stars_repo_licenses": ["Apache-... |
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import *
import logging
import pandas as pd
import pymongo
import itertools
import em... | {"hexsha": "ed87828661356bdd4518efe2b82201c2cbba1072", "size": 19466, "ext": "py", "lang": "Python", "max_stars_repo_path": "emission/storage/timeseries/builtin_timeseries.py", "max_stars_repo_name": "tarunrkk/e-mission-server", "max_stars_repo_head_hexsha": "9989ee56b423d2473fe55c09bd4ebc43ac8d1fa2", "max_stars_repo_l... |
import os
import numpy as np
from qutip.interpolate import Cubic_Spline
_cython_path = os.path.dirname(os.path.abspath(__file__)).replace("\\", "/")
_include_string = "'"+_cython_path+"/complex_math.pxi'"
__all__ = ['Codegen']
class Codegen():
"""
Class for generating cython code files at runtime.
"""
... | {"hexsha": "e01d57a2dfa44d0df64180f383b1aa3d84fcf29f", "size": 15820, "ext": "py", "lang": "Python", "max_stars_repo_path": "qutip/cy/codegen.py", "max_stars_repo_name": "camponogaraviera/qutip", "max_stars_repo_head_hexsha": "1b1f6dffcb3ab97f11b8c6114293e09f378d2e8f", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_... |
#!/usr/bin python
# Copyright 2021 Gregory Ditzler
#
# 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, modi... | {"hexsha": "c476d0ef00baafc96c71fd0d2ad53273c89cbd57", "size": 14967, "ext": "py", "lang": "Python", "max_stars_repo_path": "runexp.py", "max_stars_repo_name": "srish01/AFS-Filter_Based", "max_stars_repo_head_hexsha": "7edcff098292c08028346e83951a1252b94354bf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
import astropy
from astropy import units as u
from astropy.cosmology import Planck15
import numpy as np
from scipy.special import sici
import warnings
from .core import Profile
from .helpers.decorators import array, inMpc
from .helpers.lensing import BaseLensing
from .helpers.spherical import mass_from_radius, radius_... | {"hexsha": "1603334a4ed050ae0fe5d0d7fe50a4a234170221", "size": 14161, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/profiley/nfw.py", "max_stars_repo_name": "cristobal-sifon/profiley", "max_stars_repo_head_hexsha": "84de1316d8422d417401538f71af512c55714023", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
using LinearAlgebra: cross
mutable struct Scanner
position::Union{Vector{Int}, Nothing}
beacons::Vector{Vector{Int}}
Scanner() = new(nothing, Vector{Int}[])
Scanner(position, beacons) = new(position, beacons)
end
copy(scanner::Scanner) = Scanner(scanner.position, scanner.beacons)
islocated(scanner::S... | {"hexsha": "8c8242f5aa7c0b5cebe15a72da7d6259cce9e9b7", "size": 4146, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "day19/solve.jl", "max_stars_repo_name": "nsgrantham/advent-of-code-2021", "max_stars_repo_head_hexsha": "d43d86fae014bbe72dc21283650d69d0cecb7691", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
// Copyright (c) 2016-2019 Duality Blockchain Solutions Developers
// Copyright (c) 2014-2017 The Dash Core Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "servicenode.h"
#include "activeservicenode.h"
... | {"hexsha": "0c8d1713126c35af09fbc703eb22a2e194602d77", "size": 41800, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/servicenode.cpp", "max_stars_repo_name": "Ankh-Trust/credit-core", "max_stars_repo_head_hexsha": "fa6fd67bdc9846cc40ee24f9a64e610e634b9356", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import pickle
from pprint import PrettyPrinter
pp = PrettyPrinter()
import matplotlib.dates as dates
import matplotlib.pyplot as plt
from collections import Counter
#load dataset - run cagedata.py
with open('cagewatched.pickle', 'rb') as handle:
b = pickle.load(handle)
count = 0
tmin = 0
timeRem = 0
valcount=0
... | {"hexsha": "6df864acd38c9ffe04e186113b537362246eaabb", "size": 6045, "ext": "py", "lang": "Python", "max_stars_repo_path": "cage_burndown.py", "max_stars_repo_name": "brahbby/Cam3r0np03", "max_stars_repo_head_hexsha": "0d0ba46a99e1032203ec6aac836be0f569b8745b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
# =============================================================================
# Copyright 2020 NVIDIA. All Rights Reserved.
# Copyright 2018 The Google AI Language Team Authors and
# The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in co... | {"hexsha": "e6795c14b28930992c189264da46fe50aedc2d9f", "size": 9705, "ext": "py", "lang": "Python", "max_stars_repo_path": "nemo/collections/nlp/data/datasets/joint_intent_slot_dataset/joint_intent_slot_dataset.py", "max_stars_repo_name": "ParikhKadam/NeMo", "max_stars_repo_head_hexsha": "ee11f7c4666d410d91f9da33c61f48... |
\section{\module{posix} ---
The most common \POSIX{} system calls}
\declaremodule{builtin}{posix}
\platform{Unix}
\modulesynopsis{The most common \POSIX{} system calls (normally used
via module \module{os}).}
This module provides access to operating system functionality that is
standardized by the C Stand... | {"hexsha": "c3348939e426fed60415f915cc155cfeb04fec67", "size": 3893, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Doc/lib/libposix.tex", "max_stars_repo_name": "1byte2bytes/cpython", "max_stars_repo_head_hexsha": "7fbaeb819ca7b20dca048217ff585ec195e999ec", "max_stars_repo_licenses": ["Unlicense", "TCL", "DOC", ... |
Init.function<-function(dir=data.path)
{
SMS.control<<-read.FLSMS.control(dir=dir,file='sms.dat')
sp.names<<-SMS.control@species.names
nsp<<-SMS.control@no.species
for (ii in (1:nsp)) if (SMS.control@species.info[ii,'predator']!=2) {first.VPA<<-ii; break;} #first VPA species number
for (ii in (1:nsp)) if (SM... | {"hexsha": "b4d352218eb3eeb28f992625fa0e37b8bb8972bb", "size": 477, "ext": "r", "lang": "R", "max_stars_repo_path": "SMS_R_prog/function/init_function.r", "max_stars_repo_name": "ices-eg/wg_WGSAM", "max_stars_repo_head_hexsha": "d5f93c431d1ec6c2fb1f3929f63cd9e636fc258a", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
[STATEMENT]
lemma binomial_code [code]:
"n choose k =
(if k > n then 0
else if 2 * k > n then n choose (n - k)
else (fold_atLeastAtMost_nat (*) (n - k + 1) n 1 div fact k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. n choose k = (if n < k then 0 else if n < 2 * k then n choose (n - k) else... | {"llama_tokens": 1446, "file": null, "length": 14} |
"""
image_parser.py
run inference on a single image
author : nakmuaycoder
date : 10/2021
"""
import numpy as np
import torch
import torchvision.transforms as transforms
import PIL.Image
import cv2
import torch2trt
from trt_pose_tools.model import load_optz, get_parse_objects
class ImageParser:
"""
ImagePars... | {"hexsha": "ad0863e61cc3e708f40a4f240634c7dcb4e3964b", "size": 3725, "ext": "py", "lang": "Python", "max_stars_repo_path": "trt_pose_tools/parser/image_parser.py", "max_stars_repo_name": "nakmuaycoder/trt_pose_tools", "max_stars_repo_head_hexsha": "229091899068a360cb28afa6dc5d3e4a1ed7bc81", "max_stars_repo_licenses": [... |
[STATEMENT]
lemma ground_subst_apply:
assumes "ground t"
shows "t \<cdot> \<sigma> = t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. t \<cdot> \<sigma> = t
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. t \<cdot> \<sigma> = t
[PROOF STEP]
have "t = t \<cdot> Var"
[PROOF STATE]
proof (pr... | {"llama_tokens": 566, "file": "Knuth_Bendix_Order_Term_Aux", "length": 10} |
import argparse
import math
import logging
import numpy as np
import matplotlib.pyplot as plt
import torch
import torch.distributed as dist
from torch.utils.data import DataLoader
from dataset import create_dataset
from model import MODEL_NAMES, create_model
from helper import setup_default_logging
parser = argpars... | {"hexsha": "e62472756f525b69748643125b3d6b5611b1278b", "size": 6490, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/6.FairFaceClassifier/inference.py", "max_stars_repo_name": "QWERDF007/LearningDL", "max_stars_repo_head_hexsha": "22b12d380bced0e3840f4ba9a9caac5faff993e1", "max_stars_repo_licenses": ["MIT"]... |
__all__ = ["yuenbt", "pb2gen", "linconb", "rmmcppb",
"lindepbt", "bootdpci", "ydbt", "tmcppb", "l2drmci"]
import numpy as np
import pandas as pd
from scipy.stats import trim_mean
from hypothesize.utilities import yuend, trimse, lincon, trimparts, trimpartt, pandas_to_arrays, \
con1way, con2way, bptdpsi,... | {"hexsha": "02ad25c3e523e01cf8e1f84b4d76e44d4982ce14", "size": 38783, "ext": "py", "lang": "Python", "max_stars_repo_path": "hypothesize/compare_groups_with_single_factor/_compare_groups_with_single_factor.py", "max_stars_repo_name": "bwettimz/hypothesize", "max_stars_repo_head_hexsha": "56d75ade8cd2341542a770d05ebead3... |
import numpy as np
import argparse
import json
import os
# Function copy from video2tfrecords.py
def split_equal(ids: list, duration: list, num: int, min_duration: int = 256):
sort = sorted(zip(duration, ids))[::-1]
ids_split = [[] for i in range(num)]
duration_spit = [[] for i in range(num)]
durati... | {"hexsha": "507b99293a91e512206d47eb47654bcef819f152", "size": 2769, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/split_video_json.py", "max_stars_repo_name": "Ziems/OBST", "max_stars_repo_head_hexsha": "e31f460616d8bc29931f069843e4f94b7f38e260", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars... |
c
c
c =====================================================
subroutine rpt2(ixy,maxm,meqn,mwaves,mbc,mx,
& ql,qr,aux1,aux2,aux3,
& imp,asdq,bmasdq,bpasdq)
c =====================================================
implicit double precision (a-h,o-z)
c
c #... | {"hexsha": "7d5f939590ed98436a77f4a72cae19a2bdf91a85", "size": 1499, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "doc/sphinx/example-acoustics-2d/rpt2ac.f", "max_stars_repo_name": "geoflows/geoclaw-4.x", "max_stars_repo_head_hexsha": "c8879d25405017b38392aa3b1ea422ff3e3604ea", "max_stars_repo_licenses": ["BSD... |
# Copyright 2018
#
# Yaojie Liu, Amin Jourabloo, Xiaoming Liu, Michigan State University
#
# All Rights Reserved.
#
# This research is based upon work supported by the Office of the Director of
# National Intelligence (ODNI), Intelligence Advanced Research Projects Activity
# (IARPA), via IARPA R&D Contract No. 201... | {"hexsha": "bed17d17e45ab00d093b734c6b10f4b004b8aa15", "size": 2512, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/config.py", "max_stars_repo_name": "umitkacar/Kaggle-DeepFakes", "max_stars_repo_head_hexsha": "3e84a3eff4697e527f2324b9716adfb208a7be62", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
from slam.dataset.rosbag_dataset import _with_rosbag
if _with_rosbag:
from slam.dataset.rosbag_dataset import RosbagConfig, RosbagDataset
"""
UrbanLoco Dataset (cf https://advdataset2019.wixsite.com/urbanloco/data-collection-platforma)
The dataset consists of a set of 11 rosbags containing multiple da... | {"hexsha": "0a9c0ca542213f70f221f4e86a1cbc28cc8fcbb0", "size": 26663, "ext": "py", "lang": "Python", "max_stars_repo_path": "slam/dataset/urban_loco_dataset.py", "max_stars_repo_name": "Pandinosaurus/pyLiDAR-SLAM", "max_stars_repo_head_hexsha": "1baa21a67bd32f144f8e17583251ac777f81345e", "max_stars_repo_licenses": ["MI... |
#!/usr/bin/env python
# coding=utf-8
import os
import random
import numpy as np
class DataConfig():
base_dir='/data/dataset/'
dict_dir=base_dir+'dict/'
py2id_dict=dict_dir+'py2id_dict.txt'
hz2id_dict=dict_dir+'hz2id_dict.txt'
py2hz_dict=dict_dir+'py2hz_dict.txt'
py2hz_dir=base_dir+'pinyin2hanzi... | {"hexsha": "cc107a4d81a12ac6cc15513a5815ac990aadc0fc", "size": 3446, "ext": "py", "lang": "Python", "max_stars_repo_path": "self_model/DataCBHG.py", "max_stars_repo_name": "GangTimes/ChineseASR", "max_stars_repo_head_hexsha": "2678055ca90da2178193e2153f0adbc1d8966ed6", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
function cummomentplot(obj,tabgrouptag)
%CUMMOMENTPLOT plot the Cumulative Moment into the specified tab group
Tags.xs = 'CumMom xs contextmenu';
Tags.bg = 'CumMom bg contextmenu';
Tags.line = 'CumMom line contextmenu';
Tags.ax = 'CumMom axes';
myTab = findOrCreateTab(obj.fig, obj... | {"author": "CelsoReyes", "repo": "zmap7", "sha": "3895fcb3ca3073608abe22ca71960eb082fd0d9a", "save_path": "github-repos/MATLAB/CelsoReyes-zmap7", "path": "github-repos/MATLAB/CelsoReyes-zmap7/zmap7-3895fcb3ca3073608abe22ca71960eb082fd0d9a/src/@ZmapMainWindow/cummomentplot.m"} |
import numpy as np
import matplotlib.pyplot as plt
imh = 0
ctr = 1
iph = 2
bc_type = 0
class Face:
def __init__(self, area : float,
centroid : np.array,
normal : np.array,
neighbor = -1) -> None:
self.area = area
self.cent... | {"hexsha": "421f92701c7c87de5adfef3147d8d63edb397681", "size": 3696, "ext": "py", "lang": "Python", "max_stars_repo_path": "RadHydro/RadSolver/Doc_RadSolver/Protocodes/Diffusion1.py", "max_stars_repo_name": "Naktakala/rad_hydro", "max_stars_repo_head_hexsha": "7562499340522d56a94ff04a46beb32dc78cb6e4", "max_stars_repo_... |
"""
@abstractmethod
Macro used in generic functions that must be overloaded by derived types.
"""
macro abstractmethod()
quote
error("This function belongs to an interface definition and cannot be used.")
end
end
"""
@notimplemented
@notimplemented "Error message"
Macro used to raise an error, w... | {"hexsha": "32f5caac66a0297027bd68154017ef87205dbdac", "size": 1020, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Helpers/Macros.jl", "max_stars_repo_name": "barche/Gridap.jl", "max_stars_repo_head_hexsha": "70325414653cf0b9822770b150fb082d1a0a5f78", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
import model_theory.substructures
import model_theory.bundled
--OUTPUT 1
theorem overflow {L : first_order.language} {F : L.Theory} (h : ∀ n : ℕ, ∃ (m : F.Model) [mfin : fintype m], n ≤ @fintype.card m mfin) : ∃ (M : F.Model), infinite M :=
begin
have h1 : ∀ n : ℕ, ∃ (m : F.Model) [mfin : fintype m], n ≤ @fintype.c... | {"author": "ayush1801", "repo": "Autoformalisation_benchmarks", "sha": "51e1e942a0314a46684f2521b95b6b091c536051", "save_path": "github-repos/lean/ayush1801-Autoformalisation_benchmarks", "path": "github-repos/lean/ayush1801-Autoformalisation_benchmarks/Autoformalisation_benchmarks-51e1e942a0314a46684f2521b95b6b091c536... |
module DreamStars
using ..Ahorn, Maple
placements = Maple.DreamStars
function Ahorn.canFgBg(effect::Maple.DreamStars)
return true, true
end
end | {"hexsha": "e83200afef3896be098ac21f5cf6c74d4e5a220b", "size": 151, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/effects/dreamstars.jl", "max_stars_repo_name": "kingW3/Ahorn", "max_stars_repo_head_hexsha": "a064bf0a953620415ea6eb8b0d610c8c606b2b05", "max_stars_repo_licenses": ["FSFAP"], "max_stars_count": ... |
# Solving vertex cover with a quantum annealer
The problem of vertex cover is, given an undirected graph $G = (V, E)$, colour the smallest amount of vertices such that each edge $e \in E$ is connected to a coloured vertex.
This notebooks works through the process of creating a random graph, translating to an optimiza... | {"hexsha": "269e15dbd63116b4c521a64b0e0ac8fff41fca84", "size": 8481, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "04-annealing-applications/Vertex-Cover.ipynb", "max_stars_repo_name": "glassnotes/Intro-QC-TRIUMF", "max_stars_repo_head_hexsha": "1b54a7fd9795ff5a8541c9a99fdb75365cbd113a", "max_star... |
# Run `train_gp.py train_idxs.npz` : Trains an exact GP on the entire list of
# indices in `train_idxs.npz`. If there are multiple rows it is flattened and
# the training is done on the entire dataset.
# This also generates a new file `predictive_means_and_vars_iter{i}.npy`
import numpy as np
np.random.seed(1)
| {"hexsha": "032f40efad17ab230dff13dd1bbaa725d8a66ef6", "size": 317, "ext": "py", "lang": "Python", "max_stars_repo_path": "mfgp/task2/train_gp.py", "max_stars_repo_name": "kunalghosh/Multi_Fidelity_Prediction_GP", "max_stars_repo_head_hexsha": "c858554f5c1f0c4aafa12cf7c441bd2d56b115f5", "max_stars_repo_licenses": ["BSD... |
import numpy as np
from pyquil.experiment._memory import (merge_memory_map_lists,
pauli_term_to_preparation_memory_map,
pauli_term_to_measurement_memory_map)
from pyquil.paulis import sX, sY
def test_merge_memory_map_lists():
mml = [{'... | {"hexsha": "585741916b6669016a7d202737575a5697b4331b", "size": 1373, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyquil/experiment/tests/test_memory.py", "max_stars_repo_name": "kalzoo/pyquil", "max_stars_repo_head_hexsha": "f37d55acb906a02c0f3320ee3990e9051ee64145", "max_stars_repo_licenses": ["Apache-2.0"]... |
__author__ = 'Elahe'
import numpy as np
import ephem
from operator import attrgetter
def eval_init_state(fields, suggestion, manual = False): # TODO Feasibility of the initial field needs to be checked
if manual:
return suggestion
else:
#build a vector of all altitudes at t start
... | {"hexsha": "5684b64045d358a82cf40faca6027c981c2b0fe5", "size": 15004, "ext": "py", "lang": "Python", "max_stars_repo_path": "calculations.py", "max_stars_repo_name": "elahesadatnaghib/FB-Scheduler-v2", "max_stars_repo_head_hexsha": "6cd01df0ff1e67057a5425a4473f3220f73bbd62", "max_stars_repo_licenses": ["MIT"], "max_sta... |
%
% $Id$
%
\label{sec:sample}
\section{Water SCF calculation and geometry optimization in a 6-31g basis}
\label{sec:sample1}
The input file in section \ref{sec:getstart} performs a geometry optimization
in a single task. A single point SCF energy calculation is performed and then
restarted to perform the optimization ... | {"hexsha": "83ed0d8f09619ff0a438fb857231b416cd5ad3de", "size": 5515, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/user/sample.tex", "max_stars_repo_name": "dinisAbranches/nwchem", "max_stars_repo_head_hexsha": "21cb07ff634475600ab687882652b823cad8c0cd", "max_stars_repo_licenses": ["ECL-2.0"], "max_stars_cou... |
import numpy as np
import matplotlib.pyplot as plt
import os
import pickle as pkl
import h5py
mayflypath = '/home/az396/project/mayfly'
dataset_date = '210621'
dataset_name = 'mf1'
h5file = h5py.File(os.path.join(mayflypath, f'data/datasets/{dataset_date}_{dataset_name}.h5'), 'r')
keys = np.array(list(h5file['sign... | {"hexsha": "cd4d847e7bc37c3a8eae61c2aaa7368e4cc7aa61", "size": 1001, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/scripts/2156_check_templates.py", "max_stars_repo_name": "zieglerad/mayfly", "max_stars_repo_head_hexsha": "7a4c4dcc211d6a9ea69c26c9ad06cb17e6598720", "max_stars_repo_licenses": ["MIT"], "max... |
# -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import, unicode_literals
import os
import numpy as np
import h5py
from ...core.io.hdf_utils import create_indexed_group, write_main_dataset, write_simple_attrs, Dimension, \
write_ind_val_dsets
from ...core.io.translator import Tran... | {"hexsha": "a2c0f806ad32df3e41bb9068cbd342759d891f61", "size": 6376, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycroscopy/io/translators/nanonis.py", "max_stars_repo_name": "ealopez/pycroscopy", "max_stars_repo_head_hexsha": "9f7c0543b67eaa0668296295fc5f492360c130a0", "max_stars_repo_licenses": ["MIT"], "m... |
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable... | {"hexsha": "86ea64c3fe2624b7cf3659cc72d83821f301e96c", "size": 9195, "ext": "py", "lang": "Python", "max_stars_repo_path": "PaddleCV/video/train_dist.py", "max_stars_repo_name": "danleifeng/models", "max_stars_repo_head_hexsha": "b87761f8100a545e0015046dd55d886ce90c190e", "max_stars_repo_licenses": ["Apache-2.0"], "max... |
from operator import concat
import numpy as np
import torch
import torch.nn as nn
from torch.nn import init
from torch.autograd import Variable
from scipy.special import factorial2
from torch.nn import functional as F
from typing import Optional, Any
from torch import Tensor
# from torch import linalg as LA
import math... | {"hexsha": "4ba53bbde644a6cd752e835005adc253a0e9cd0e", "size": 3062, "ext": "py", "lang": "Python", "max_stars_repo_path": "poly_bn/model/slaf.py", "max_stars_repo_name": "jyp4rk/sam", "max_stars_repo_head_hexsha": "93d3827a35870728f597e69c3672d50b00550eba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
# encoding: utf-8
# pylint: disable=C0103
# pylint: disable=too-many-arguments
"""
Features
========
Accentuation features
---------------------
.. autosummary::
:toctree: generated/
accentuation_feature
feature_normalization
feature_time_quantize
Feature maps
------------
.. autosummary::
:toctr... | {"hexsha": "c4cca2d9cb6cb371e6c583aa64a0bb9e3803b0b4", "size": 22680, "ext": "py", "lang": "Python", "max_stars_repo_path": "carat/features.py", "max_stars_repo_name": "giovana-morais/carat", "max_stars_repo_head_hexsha": "982af4dde63e8560ccc9120f3767f1420a545b67", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
[STATEMENT]
lemma merge_in_verts: "x \<in> merging_points \<Longrightarrow> x \<in> verts G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. x \<in> merging_points \<Longrightarrow> x \<in> verts G
[PROOF STEP]
unfolding merging_points_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. x \<in> {x. \<exists>y\<in>a... | {"llama_tokens": 190, "file": "Query_Optimization_Graph_Additions", "length": 2} |
classdef TestPCTSignatures
%TestPCTSignatures
methods (Static)
function test_1
img = imread(fullfile(mexopencv.root(),'test','books_left.jpg'));
pct = cv.PCTSignatures();
sig = pct.computeSignature(img);
validateattributes(sig, {'numeric'}, {'2d', 'size'... | {"author": "kyamagu", "repo": "mexopencv", "sha": "d29007b2a484d0fd92e6e941dc5fd4750014fa6a", "save_path": "github-repos/MATLAB/kyamagu-mexopencv", "path": "github-repos/MATLAB/kyamagu-mexopencv/mexopencv-d29007b2a484d0fd92e6e941dc5fd4750014fa6a/opencv_contrib/test/unit_tests/TestPCTSignatures.m"} |
%-------------------------
% Resume in Latex
% Author : Sourabh Bajaj
% Website: https://github.com/sb2nov/resume
% License : MIT
%------------------------
\documentclass[letterpaper,11pt]{article}
\usepackage{latexsym}
\usepackage[empty]{fullpage}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage[usenames,dvip... | {"hexsha": "f22f736f92f31349962184a85fc56bafd73d6fb1", "size": 6749, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "TuyenNNT-CV.tex", "max_stars_repo_name": "tuyen-nnt/myResume", "max_stars_repo_head_hexsha": "4cd17881e43cdacd00e395e73c8095c2d97fbc24", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
import os
import numpy as np
import subprocess
import torch
from decimal import Decimal
from utils import read_image, cvt2Lab, upsample, cvt2rgb
def format_e(n):
a = '%E' % n
return a.split('E')[0].rstrip('0').rstrip('.') + 'E' + a.split('E')[1]
class ConvNet(torch.nn.Module):
"""convolutional network ... | {"hexsha": "8de5fa79a94165d5201b4b359cd521de722a4f34", "size": 8796, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/train.py", "max_stars_repo_name": "cetinsamet/image-colorization", "max_stars_repo_head_hexsha": "077268835b918d9a0281c10dad768864b61fe8c1", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
"""
Module of coupling laws for hyperbolic equations.
"""
from typing import Dict, Tuple
import numpy as np
import scipy.sparse as sps
import porepy as pp
import porepy.numerics.interface_laws.abstract_interface_law
module_sections = ["numerics"]
class UpwindCoupling(
porepy.numerics.interface_laws.abstract_in... | {"hexsha": "4e974247d6b0d3d524f5465e4b26a09d7c9eaa35", "size": 13372, "ext": "py", "lang": "Python", "max_stars_repo_path": "ad_related/hyperbolic_interface_laws.py", "max_stars_repo_name": "taj004/porepy_lab", "max_stars_repo_head_hexsha": "2461aa547fafcb7a111d0ade1bbdf302f46c67ab", "max_stars_repo_licenses": ["MIT"],... |
from timemachines.skaters.mrln.merlioninclusion import using_merlion
if using_merlion:
import numpy as np
import pandas as pd
from typing import List
from merlion.utils.time_series import TimeSeries
from merlion.models.forecast.prophet import Prophet, ProphetConfig
from merlion.models.forecast.... | {"hexsha": "bb9756034d89eb7492b64fee4bd1de3c64ce9713", "size": 3934, "ext": "py", "lang": "Python", "max_stars_repo_path": "timemachines/skaters/mrln/merlionwrappers.py", "max_stars_repo_name": "iklasky/timemachines", "max_stars_repo_head_hexsha": "1820fa9453d31d4daaeff75274a935c7455febe3", "max_stars_repo_licenses": [... |
\chapter{Shape-from-Shading}
\label{ch:sfs}
ASP provides a tool, named \texttt{sfs}, that can improve the level of
detail of DEMs created by ASP or any other source using
\textit{shape-from-shading} (SfS). The tool takes as input one or more
camera images, a DEM at roughly the same resolution as the images, and
return... | {"hexsha": "1673d673103dafb0995dae21db815621bf10a3f5", "size": 30437, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/book/sfs.tex", "max_stars_repo_name": "fenglang12345/asp20", "max_stars_repo_head_hexsha": "565894567b58ecb72385e7bb698e318a734bed5a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou... |
import os
import pickle
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.preprocessing import MultiLabelBinarizer
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.svm import SVC
from wordcloud import WordCloud
# Constants
ENERGY = ['coa... | {"hexsha": "6202dcf80067022ec69b9b811f405820f4421fd1", "size": 3073, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis_energy.py", "max_stars_repo_name": "abcjamesjordan/twitter_energy_analysis", "max_stars_repo_head_hexsha": "957d6e0f3edbe6865e55fbc5881b360de73660c3", "max_stars_repo_licenses": ["MIT"], ... |
import torch
from torch.utils.data import Dataset
import numpy as np
from scipy import io
from path import Path
import h5py
import cv2
import glob
class NYUDataset(Dataset):
def __init__(self, path, transforms=None, scale=1, scale2=2, extra=50000):
self.transforms = transforms
self.scale = scale
... | {"hexsha": "6bc64a149f99ae8bcbcc8e9f8c6ea30bd1948659", "size": 7218, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utils/Datasets.py", "max_stars_repo_name": "shirgur/UnsupervisedDepthFromFocus", "max_stars_repo_head_hexsha": "d41bc08a290623be8a96fa177ea769a7ef742dc2", "max_stars_repo_licenses": ["MIT"], "max_... |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"hexsha": "b9ee97f530e431cd63c9db05d5c2a1ee5bb2e51a", "size": 10518, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf3d/datasets/utils/image_features.py", "max_stars_repo_name": "gunpowder78/google-research", "max_stars_repo_head_hexsha": "d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5", "max_stars_repo_licenses": ... |
#define BOOST_TEST_MODULE EffectiveSampleSizeTestSuite
#include <boost/test/included/unit_test.hpp>
#include <Eigen/Core>
#include <Eigen/Sparse>
#include <vector>
#include <hops/hops.hpp>
BOOST_AUTO_TEST_SUITE(EffectiveSampleSizeTestSuite)
BOOST_AUTO_TEST_CASE(ComputeOneDimSingleChain) {
// evaluated usi... | {"hexsha": "b271eecd84b34718c2cf7c7697a1046a4daec9a3", "size": 5916, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/Statistics/EffectiveSampleSizeTestSuite.cpp", "max_stars_repo_name": "modsim/hops", "max_stars_repo_head_hexsha": "4285dd75a07dd844295440a0756b3ba25f5819ac", "max_stars_repo_licenses": ["MIT"]... |
Require Import CodeDeps.
Require Import Ident.
Local Open Scope Z_scope.
Definition _base := 1%positive.
Definition _g := 2%positive.
Definition _i := 3%positive.
Definition _par_base := 4%positive.
Definition _ret := 5%positive.
Definition _size := 6%positive.
Definition _val := 7%positive.
Definition _valid := 8%po... | {"author": "columbia", "repo": "osdi-paper196-ae", "sha": "6df8f9e5b7b1e508a22327fd4a8c0c9be6c56496", "save_path": "github-repos/coq/columbia-osdi-paper196-ae", "path": "github-repos/coq/columbia-osdi-paper196-ae/osdi-paper196-ae-6df8f9e5b7b1e508a22327fd4a8c0c9be6c56496/proof/RmiAux/Code/validate_realm_params.v"} |
#include "modules/io/command.h"
#include "modules/io/utils.h"
#include "modules/io/make_unique.h"
#include "modules/io/log.h"
#include "modules/io/mem_io.h"
#include <boost/filesystem.hpp>
#include <future>
#include <cstdio>
#include <cerrno>
#include <cstring>
#include <unistd.h>
#include <sys/wait.h>
namespace ex... | {"hexsha": "6b42b281e529e621bd476ccdb6a84c3fff62353e", "size": 9128, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "modules/io/command.cpp", "max_stars_repo_name": "spiralgenetics/biograph", "max_stars_repo_head_hexsha": "33c78278ce673e885f38435384f9578bfbf9cdb8", "max_stars_repo_licenses": ["BSD-2-Clause"], "max... |
from __future__ import division as __division__
import numpy as __np__
import matplotlib.pyplot as __plt__
# Wavelength related functions
def add(Lens,wl):
Lens.wavelength_list.append(wl)
Lens.wavelength_list.sort()
| {"hexsha": "2fd6f13e1d16ac7d9cf5d29db239d6e820eb9e40", "size": 229, "ext": "py", "lang": "Python", "max_stars_repo_path": "opticspy/ray_tracing/wavelength.py", "max_stars_repo_name": "Graylien/opticspy", "max_stars_repo_head_hexsha": "5235e306f02ed212cc9ae4dcd5529a4c98252a7b", "max_stars_repo_licenses": ["MIT"], "max_s... |
import math
import logging
import numpy as np
from transformers.models.gpt2.modeling_gpt2 import GPT2Model, GPT2Config
from transformers import BertModel, T5Model
import torch
import torch.nn as nn
from torch.nn import functional as F
logger = logging.getLogger(__name__)
class modelConfig:
embed_pdrop = 0.1
q... | {"hexsha": "e7e03b91e2a97b78b3f3dc0e7351b4bc60089002", "size": 8254, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/DTI_model.py", "max_stars_repo_name": "mhmdsabry/ResLM", "max_stars_repo_head_hexsha": "f7aed9c0b16599076b4998448ea23e1f89afa461", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
import cv2
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import requests
import sys
def image_resize(image, width=None, height=None, inter=cv2.INTER_AREA):
dim = None
(h, w) = image.shape[:2]
if width is None and height is None:
return image
if width is None:
... | {"hexsha": "b13df2800ba8df98678e7170b9306a951ff0e29c", "size": 7219, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "tamnguyenvan/small_object_detection", "max_stars_repo_head_hexsha": "526ba8be016dd4781ce45c43848f0dac3924a0ee", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
from pandas import DataFrame, Series
import scipy.sparse as sparse
from sqlalchemy.sql import bindparam, select
from .features import get_span_feats
from .models import GoldLabel, GoldLabelKey, Label, LabelKey, Feature, FeatureKey, Candidate
from .models.meta import new_sessionmaker
from .udf import UDF, UDFRunner
fro... | {"hexsha": "b63e06a61811a73cd6d4d79b17586c2aa592cb5e", "size": 14907, "ext": "py", "lang": "Python", "max_stars_repo_path": "snorkel/annotations.py", "max_stars_repo_name": "jmbanda/snorkelBioMed", "max_stars_repo_head_hexsha": "db26600326d1ef34129d1c35d2d618b62be2dcf3", "max_stars_repo_licenses": ["Apache-2.0"], "max_... |
# group individual replicas into sequences of 3-replicas
# Zilin Song, 22 AUG 2021
#
from re import X
import numpy, iomisc
nrep = 50
npath = 200
seqlen = 3
nseq_per_path = nrep - seqlen + 1
for sysname in ['toho_amp', 'toho_cex']:
for pathname in ['r1ae', 'r2ae']:
x, xlbl, pid = iomisc.load_x(sysname... | {"hexsha": "2c29b2fd645fd944b4d38b9b7dcfcaee42a08525", "size": 1629, "ext": "py", "lang": "Python", "max_stars_repo_path": "2.datasets/4.conclude_ds/ds_conclude.py", "max_stars_repo_name": "smutaogroup/bcig_toho", "max_stars_repo_head_hexsha": "ef769ecc0c9249c0596141c2aa1d4e409d45cf62", "max_stars_repo_licenses": ["MIT... |
HANSARD REVISE * NUMERO 134
Le mercredi 7 octobre 1998
LA JOURNEE INTERNATIONALE DE LA FEMME RURALE
M. Guy St-Julien
LA MARCHE SACREE POUR LA GUERISON
M. Robert D. Nault
LA MARCHE SACREE POUR LA GUERISON
LE FESTIVAL INTERNATIONAL DU CANARD DES CANTONS DE L'EST
Le tres hon. Jean Chretien
Le tres hon. Jean Chret... | {"hexsha": "e5d3d7c64dd8671823b3e1e8f55fd80057775f38", "size": 78541, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "data/Hansard/Training/hansard.36.1.house.debates.134.f", "max_stars_repo_name": "j1ai/Canadian_Hansards_Neural_Machine_Translation", "max_stars_repo_head_hexsha": "554666a89090fc1b1d1fb83601a2e9d... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some properties about signs
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Sign.Properties where
open import Algebra
open import Data.Em... | {"hexsha": "2491515a382409ee6a46138677da2ea8db5429ce", "size": 3521, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/asset/agda-stdlib-1.0/Data/Sign/Properties.agda", "max_stars_repo_name": "omega12345/agda-mode", "max_stars_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_stars_repo_lice... |
from itertools import combinations
from collections import defaultdict
from scipy.stats import pearsonr
from tqdm import tqdm
from prody import parsePDB, fetchPDB, confProDy
from collections import OrderedDict
from difflib import SequenceMatcher
from src.utils import PAD_SS, to_one_letter, BACKBONE
from src.utils.prof... | {"hexsha": "5205fe444e40601902fac4b8d92a03afd552d6e0", "size": 14131, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils/data_utils.py", "max_stars_repo_name": "yotamfr/gomut", "max_stars_repo_head_hexsha": "10c5dd55e37a2c2da545426ffa3b728d1af97768", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
from pathlib import Path
import shutil
from audio_utils import peak_norm
import os
from numpy.core.defchararray import partition
import numpy as np
import random
from itertools import repeat
from scipy import stats
import soundfile as sf
from glob import glob
from matplotlib import pyplot as plt
import ... | {"hexsha": "fc645d8859f4a7449516ee39ef14fe4a05d0a5a0", "size": 23416, "ext": "py", "lang": "Python", "max_stars_repo_path": "compile_dataset.py", "max_stars_repo_name": "darius522/dnr-utils", "max_stars_repo_head_hexsha": "93d47e4de4e6c91c516e1b500872a115a6f6bf40", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
from .calculate_dependencies import *
from .calculate_base import calculate_base
from time import time
from sklearn import metrics
from sklearn.cluster import MiniBatchKMeans, KMeans
import scipy.spatial.distance
class calculate_clustering(calculate_base):
# heatmap
def calculate_heatmap(self,data_I,row_labe... | {"hexsha": "c5b1b2e9a1575fd10a360171370f155e62c8c9de", "size": 7394, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_statistics/calculate_clustering.py", "max_stars_repo_name": "dmccloskey/python_statistics", "max_stars_repo_head_hexsha": "150ca2baedd00281ec5af5aff94fc90b5a1e1e4f", "max_stars_repo_license... |
#!/usr/bin/python
import optparse
import sys
import os
import math
import matplotlib.pyplot as plt
from matplotlib import cm, axes
import numpy as np
parser = optparse.OptionParser(description='Search for artifacts in secondary electron emission data.', usage='usage: %prog filename')
(options, args) = parser.parse_... | {"hexsha": "b9cb995509ced1ea1488ce7dbdd87e3f0e0dbb5e", "size": 1182, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/shadowgrapher.py", "max_stars_repo_name": "quells/ElectronDensityIntegration", "max_stars_repo_head_hexsha": "75dfc1a6992d7640a0dab32ae15554246eb56c17", "max_stars_repo_licenses": ["MIT"], ... |
!##############################################################################
!# Tutorial 001a: Hello world
!##############################################################################
module tutorial001a
! Include basic Feat-2 modules
use fsystem
use genoutput
use storage
use spatialdiscretisation
... | {"hexsha": "32e12791a3ea35e428e1e27bd99d42937d89237e", "size": 2602, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tutorials/tutorial01/src/tutorial001a.f90", "max_stars_repo_name": "trmcnealy/Featflow2", "max_stars_repo_head_hexsha": "4af17507bc2d80396bf8ea85c9e30e9e4d2383df", "max_stars_repo_licenses": ["I... |
#include <cctbx/boost_python/flex_fwd.h>
#include <cctbx/hendrickson_lattman.h>
#include <cctbx/error.h>
#include <scitbx/array_family/boost_python/flex_wrapper.h>
#include <scitbx/serialization/single_buffered.h>
#include <boost/python/args.hpp>
#include <boost/python/make_constructor.hpp>
namespace scitbx { namespa... | {"hexsha": "ed7cdcc18a723ba03204cfe232932d0f32f7f3c9", "size": 6066, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cctbx/array_family/boost_python/flex_hendrickson_lattman.cpp", "max_stars_repo_name": "rimmartin/cctbx_project", "max_stars_repo_head_hexsha": "644090f9432d9afc22cfb542fc3ab78ca8e15e5d", "max_stars_... |
import logging
import ctypes
from collections import deque, namedtuple
import numpy as np
import nokov.nokovsdk as nokovsdk
import basis.robot_math as rm
import modeling.geometric_model as gm
import modeling.model_collection as mc
MarkerDataFrame = namedtuple("MarkerDataFrame", ["frame_id", "time_stamp", "marker_set... | {"hexsha": "5fa9d98a8e9c29fb1741a8f4c2e2ba86df1bccc5", "size": 11961, "ext": "py", "lang": "Python", "max_stars_repo_path": "drivers/nokov/nokov_client.py", "max_stars_repo_name": "chenhaox/wrs", "max_stars_repo_head_hexsha": "c16ce81d07da962119bd7edac6165b6df0d5b53a", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
function Initi_model_struct(H::T,Hc::T,N::T,Wf::T,B::T,αf::T,β₁::T,β₂::T,
Nₛ::T,rₘ::T,a_Jmax::T,b_Jmax::T,i::T,Kₓₗ₀::T) where {T<:Float64}
cons = Constants()
env = EnvironmentStruct()
kinetic = PhotoKineticRates()
photo = PhotoPar(kinetic,env.Tₐ)
hydPar = HydraulicsPar(;Kₓₗ₀=Kₓₗ₀,i=i)
t... | {"hexsha": "d6f311dd84a652874b27c8f1b563572027598789", "size": 9380, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Script/test_model_data.jl", "max_stars_repo_name": "PeterFransson/CCPH_Project", "max_stars_repo_head_hexsha": "7034b26ab0a0c494022b15e315d74bcf59a94756", "max_stars_repo_licenses": ["MIT"], "max_s... |
import os
import tqdm
import numpy as np
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchtext.data import Dataset, Field
from torchtext.data.metrics import bleu_score
from torchtext.data.iterator import BucketIterator
from nmt.conf... | {"hexsha": "9dd213b1f85275a2972b612cc8f4db99c1916ba2", "size": 19239, "ext": "py", "lang": "Python", "max_stars_repo_path": "nmt/train/trainer.py", "max_stars_repo_name": "dksifoua/NMT", "max_stars_repo_head_hexsha": "a651d5f957868ab4879d028060fdbec3e09263cb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "... |
C$ Procedure CONVBT ( Convert Kernel file from binary to text )
SUBROUTINE CONVBT ( BINFIL, TXTFIL )
C$ Abstract
C
C Convert a SPICE binary file to an equivalent text file format.
C
C NOTE: This routine is currently for use ONLY with the SPACIT
C utility program. Use it at your own risk.
C
C$... | {"hexsha": "0513093e4e31624d608d5e76a45e0ed321a03b0a", "size": 13629, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "source/nasa_f/convbt.f", "max_stars_repo_name": "agforero/FTFramework", "max_stars_repo_head_hexsha": "6caf0bc7bae8dc54a62da62df37e852625f0427d", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
\chapter{Characterization of CUDA kernels}\label{chap:characterization}
\section{Introduction}
\label{sec:IntroGPU}
\lettrine[findent=2pt]{\textbf{G}}{}PUs initially had only graphical function, but their potential as co-processors and accelerators was quickly perceived and new computing platforms evolved to support an... | {"hexsha": "34ce01baa70e195d17e509a4e97e105e862d3694", "size": 2776, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/thesis/chapters/characterization.tex", "max_stars_repo_name": "marcosamaris/svm-gpuperf", "max_stars_repo_head_hexsha": "35b81711089273c775f143ecaeadae03ebf5910a", "max_stars_repo_licenses": ["... |
"""Kernel density estimation via diffusion for 1-dimensional data."""
__license__ = 'MIT'
########################################
# Dependencies #
########################################
import numpy as np
import sys
from numpy import pi as π
from scipy.optimize import brentq
... | {"hexsha": "f8c5b6adde6b49e2e2dd98a70040bcb8ac513fa7", "size": 6105, "ext": "py", "lang": "Python", "max_stars_repo_path": "kde_diffusion/kde1d.py", "max_stars_repo_name": "dkhokhlov/KDE-diffusion", "max_stars_repo_head_hexsha": "ac72fd48ffb0a3be42f4074ae16ae21f2ce10cae", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
##########################
# Imports
##########################
from typing import List
import cv2
import numpy as np
##########################
# Function
##########################
def compute_keypoints(img: np.array, kpt_stride: int, kpt_sizes: List[int]) -> List[cv2.KeyPoint]:
"""Computes evenly-spaced k... | {"hexsha": "b3ed770f45e4ff962d8a79570ed496a3cef02773", "size": 983, "ext": "py", "lang": "Python", "max_stars_repo_path": "few_shots_clf/utils/compute_keypoints.py", "max_stars_repo_name": "delmalih/few-shots-classification", "max_stars_repo_head_hexsha": "8b06ff673882fd0d8b99cd705e5e5fab0ec93fb3", "max_stars_repo_lice... |
import os
import torch
import random
import pickle
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as mcolors
from argparse import ArgumentParser
from utils.misc import *
from model.platooning import *
from settings.platooning import *
from architecture.default import *
parser = ArgumentPa... | {"hexsha": "6a6e8490520c48d691210e1393fe0587d0379ce3", "size": 6341, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plotter_platooning.py", "max_stars_repo_name": "ginevracoal/adversarialGAN", "max_stars_repo_head_hexsha": "7a38e037a5ddbbe0bb4daed35fcb0e6fbf9b311e", "max_stars_repo_licenses": ["CC-BY-4.0"],... |
import numpy as np
from labscript_devices import runviewer_parser
from labscript import IntermediateDevice, AnalogOut, DigitalOut, AnalogIn, bitfield, config, LabscriptError, set_passed_properties
import labscript_utils.h5_lock, h5py
import labscript_utils.properties
class NIBoard(IntermediateDevice):
description ... | {"hexsha": "8f1b35921a93107d7aa5b758b6a4568260fc1014", "size": 9303, "ext": "py", "lang": "Python", "max_stars_repo_path": "labscript_devices/NIBoard.py", "max_stars_repo_name": "specialforcea/labscript_suite", "max_stars_repo_head_hexsha": "a4ad5255207cced671990fff94647b1625aa0049", "max_stars_repo_licenses": ["BSD-2-... |
context("Network bootstrap")
# rn(list=ls())
# library(microbenchmark)
# library(netdiffuseR)
#
# set.seed(1231)
# g <- rgraph_ba(t=1e2, m=2)
# index <- sample(1:nnodes(g), nnodes(g), TRUE)
# E <- g@x
# g <- g[index,index]
#
# microbenchmark(
# R = netdiffuseR:::bootnet_fillselfR(g, index, E),
# Cpp = netdiffuse... | {"hexsha": "9f8c74eb1d870819f0c75f13c43d64625b9c957c", "size": 3728, "ext": "r", "lang": "R", "max_stars_repo_path": "tests/testthat/test-bootnet.r", "max_stars_repo_name": "USCCANA/netdiffuseR", "max_stars_repo_head_hexsha": "4cda66a4381c2df3ee2d738f6c97ac0b2916a5c4", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
from __future__ import print_function, division
from keras.datasets import mnist
from keras.layers import Input, Dense, Reshape, Flatten, Dropout, multiply
from keras.layers import BatchNormalization, Activation, Embedding, ZeroPadding2D
from keras.layers.advanced_activations import LeakyReLU
from keras.layers.c... | {"hexsha": "3c18ebd7bf22c8b3d12a50c58c8f98dc365000cb", "size": 5967, "ext": "py", "lang": "Python", "max_stars_repo_path": "cgan/cgan.py", "max_stars_repo_name": "xwshi/GAN-keras", "max_stars_repo_head_hexsha": "4202becb86185c57bd770443d7e6a044119e87d1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 197, "max_... |
import numpy as np
from numpy.testing import (assert_array_equal, assert_almost_equal,
assert_array_almost_equal, assert_equal, assert_)
from pynverse import inversefunc
def test_inversefunc_infinite():
accuracy = 2
cube = (lambda x: x**3)
invfunc = inversefunc(cube)
yval =... | {"hexsha": "0b33cd747ae6e1879c6c0182076bf9d5755c0013", "size": 3804, "ext": "py", "lang": "Python", "max_stars_repo_path": "pynverse/tests/test_inverse.py", "max_stars_repo_name": "lupify/pynverse", "max_stars_repo_head_hexsha": "b943b49a0a398a00d4e712f492721f3dfa77ed52", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import scipy.misc
import numpy as np
def fractal_dimension(Z):
# Only for 2d image
assert(len(Z.shape) == 2)
def boxcount(Z, k):
S = np.add.reduceat(
np.add.reduceat(Z, np.arange(0, Z.shape[0], k), axis=0),
np.arange(0, Z.shape[1], k), axis=1)
... | {"hexsha": "b342c060aa30f289b40b3e78d008ea8a4443c2bf", "size": 1209, "ext": "py", "lang": "Python", "max_stars_repo_path": "M2_Artery_vein/FD_cal.py", "max_stars_repo_name": "rmaphoh/AutoMorph", "max_stars_repo_head_hexsha": "0c82ce322c6cd8bd80f06bbd85c5c2542e534cb8", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | {"hexsha": "f79eb27435cc954cebde4357c1d946a320f4ed75", "size": 4895, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/compiler/tests/while_test.py", "max_stars_repo_name": "tianyapiaozi/tensorflow", "max_stars_repo_head_hexsha": "fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a", "max_stars_repo_licenses": ["A... |
(* Title: HOL/HOLCF/Library/Bool_Discrete.thy
Author: Brian Huffman
*)
section \<open>Discrete cpo instance for booleans\<close>
theory Bool_Discrete
imports HOLCF
begin
text \<open>Discrete cpo instance for \<^typ>\<open>bool\<close>.\<close>
instantiation bool :: discrete_cpo
begin
definition below... | {"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/HOLCF/Library/Bool_Discrete.thy"} |
# Tests related to ModelConstructors and making sure
# its code related to parameters work w/DSGE.jl
# subspecs
function sstest(m::AnSchorfheide)
# Change all the fields of an unfixed parameter
m <= parameter(:ι_w, 0.000, (0.0, .9999), (0.0,0.9999), ModelConstructors.Untransformed(), Normal(0.0,1.0), fixed=fa... | {"hexsha": "dafe680c71c87454d06a1ca5ad9bb518d736b84c", "size": 5090, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/parameters.jl", "max_stars_repo_name": "FRBNY-DSGE/DSGE.jl", "max_stars_repo_head_hexsha": "45c26624ec225d6d355219cde71638f6171694ad", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c... |
#! /usr/bin/env python3
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | {"hexsha": "7caaa9ffd5a2fb9ca45b79e7eb8a07356f37f793", "size": 5822, "ext": "py", "lang": "Python", "max_stars_repo_path": "open/Dell/code/ssd-mobilenet/tensorrt/infer.py", "max_stars_repo_name": "ctuning/inference_results_v1.1", "max_stars_repo_head_hexsha": "d9176eca28fcf6d7a05ccb97994362a76a1eb5ab", "max_stars_repo_... |
import numpy as np
import os
from random import shuffle
datasets_dir = './../data/'
def one_hot(x,n):
if type(x) == list:
x = np.array(x)
x = x.flatten()
o_h = np.zeros((len(x),n))
o_h[np.arange(len(x)),x] = 1
return o_h
def mnist(ntrain=60000,ntest=10000,onehot=True):
ntrain=np.array(ntrain).astype(int).s... | {"hexsha": "78e74ab110d94c6516104012ed887badd152a66c", "size": 1602, "ext": "py", "lang": "Python", "max_stars_repo_path": "theano-rfnn/mnist_loader.py", "max_stars_repo_name": "jhja/RFNN", "max_stars_repo_head_hexsha": "a63641d6e584df743a5e0a9efaf41911f057a977", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5... |
from __future__ import division
from __future__ import absolute_import
from builtins import zip
from builtins import range
from past.utils import old_div
from builtins import object
from nose.tools import (assert_equal, assert_not_equal, raises,
assert_almost_equal, assert_true, assert_in,
... | {"hexsha": "d2063568c60b3426a656d90e71f87da2a84c9ae6", "size": 10233, "ext": "py", "lang": "Python", "max_stars_repo_path": "openpathsampling/tests/test_reactive_flux_analysis.py", "max_stars_repo_name": "bolhuis/openpathsampling", "max_stars_repo_head_hexsha": "4a12af0ee1143cdbc272b10a8c7cbea735566ce1", "max_stars_rep... |
import logging
import types
import numpy as np
import westpa
from westpa import extloader
from westpa.yamlcfg import check_bool, ConfigItemMissing
from westext.stringmethod import WESTStringMethod, DefaultStringMethod
from westpa.binning import VoronoiBinMapper
log = logging.getLogger(__name__)
class StringDriver... | {"hexsha": "e0accd59fc0909a39018d36cfd9f10309d702ead", "size": 9341, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/westpa/westext/stringmethod/string_driver.py", "max_stars_repo_name": "jdrusso/westpa_test", "max_stars_repo_head_hexsha": "3383b59a5a6ec5401415e74eb5a7fc61e4b3abbc", "max_stars_repo_licenses"... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
import numpy as np
from graphdot.linalg.spectral import pinvh
@pytest.mark.parametrize('seed', [0, 51, 125, 125120, 9681859])
@pytest.mark.parametrize('sigma', np.logspace(-2, 1, 11))
@pytest.mark.parametrize('mode', ['truncate', 'clamp'])
def test_pinvh(see... | {"hexsha": "15e4d10f1779a3f6e857c7fd982be5f039035bd0", "size": 902, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/linalg/test_spectral.py", "max_stars_repo_name": "yhtang/GraphDot", "max_stars_repo_head_hexsha": "3d5ed4fbb2f6912052baa42780b436da76979691", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"], ... |
//test 2 in julia
function a()
x = 1
while < x 4 do
x + = x 1
end
print(x)
end | {"hexsha": "1643329b8474b63bc1c523efd42ea027f3735297", "size": 84, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Test-Files/Test2.jl", "max_stars_repo_name": "tylerholmes/Interpreter", "max_stars_repo_head_hexsha": "da80f4d3e29b45e94069c76e2999d35ee7db04f7", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.