text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# This code is written by Sunita Nayak at BigVision LLC. It is based on the OpenCV project. It is subject to the license terms in the LICENSE file found in this distribution and at http://opencv.org/license.html # Usage example: python3 augmented_reality_with_aruco.py --image=test.jpg # python3 aug...
{"hexsha": "31da7a673b40ef9c5ff689595fa802b3eff8af2d", "size": 5489, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/playground/arucoAR.py", "max_stars_repo_name": "manavjain99/oscar_buggy", "max_stars_repo_head_hexsha": "b5dab0848f8667c9515bcfb078730cd0c4060000", "max_stars_repo_licenses": ["MIT"], "max_st...
/** \file \author Datta Ramadasan //============================================================================== // Copyright 2015 INSTITUT PASCAL UMR 6602 CNRS/Univ. Clermont II // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE.txt or ...
{"hexsha": "d5eaf23a5088be447e9619f8c9c025bef6655ada", "size": 4152, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/libv/lma/lm/trait/use_estimator.hpp", "max_stars_repo_name": "bezout/LMA", "max_stars_repo_head_hexsha": "9555e41eed5f44690c5f6e3ea2d22d520ff1a9d2", "max_stars_repo_licenses": ["BSL-1.0"], "max_...
import sys sys.path.append("./models") import numpy as np import torch from datasets.VNRiceDataset import VNRiceDataset from models.TransformerEncoder import TransformerEncoder from models.multi_scale_resnet import MSResNet from models.TempCNN import TempCNN from models.rnn import RNN from datasets.ConcatDataset impo...
{"hexsha": "698bba5b7804837ae48b6714c357825e331c53a6", "size": 10216, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/train.py", "max_stars_repo_name": "Pratyush1991/crop-type-mapping", "max_stars_repo_head_hexsha": "d9d99ec92c3a090ec5576f9e46c89dfcc6f50cf3", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
% test for ti quicunx name = 'turbulence'; name = 'lena'; n = 256; M = load_image(name); M = rescale( crop(M,n) ); Jmax = log2(n)-1; Jmin = Jmax-5; % boundary conditions options.bound = 'per'; options.bound = 'sym'; % vanishing moments vm = 6; options.primal_vm = vm; options.dual_vm = vm; % transform disp('Computing...
{"author": "gpeyre", "repo": "matlab-toolboxes", "sha": "0cd622c988cda6f63f64d35cd7bd096fa578e5c6", "save_path": "github-repos/MATLAB/gpeyre-matlab-toolboxes", "path": "github-repos/MATLAB/gpeyre-matlab-toolboxes/matlab-toolboxes-0cd622c988cda6f63f64d35cd7bd096fa578e5c6/toolbox_wavelets/tests/test_quincunx_ti.m"}
import numpy as np from PIL import Image import glob import torch from torch.utils.data.dataset import Dataset import torchvision.transforms as transforms class FairFaceDataset(Dataset): def __init__(self, folder_path, dimensions): """ Args: folder_path (string): path to image folder ...
{"hexsha": "10eac2687199ba2a90d991bacd3cd91e3f864cf0", "size": 1240, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset/fairface_dataset.py", "max_stars_repo_name": "Asap7772/DeepCriminalize", "max_stars_repo_head_hexsha": "c171c6ce6e87e126e6e2b0ed1d9709ee7d0ce667", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma higher_pderiv_0 [simp]: "(pderiv ^^ n) 0 = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (pderiv ^^ n) 0 = 0 [PROOF STEP] by (induction n) simp_all
{"llama_tokens": 85, "file": "E_Transcendental_E_Transcendental", "length": 1}
struct FluidParams eta2d :: Float64 # length scale introduced by difference in viscosity of of surface fluid and external fluids end abstract type Object end
{"hexsha": "f9c764dba0802372ff882b309938cb62cda95c9f", "size": 163, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "physics/fluid.jl", "max_stars_repo_name": "sarthakbagaria/curved-membrane-fluid-dynamics", "max_stars_repo_head_hexsha": "6b6223c89011a179595a39656a4f866816dffc8c", "max_stars_repo_licenses": ["MIT"...
import argparse, time, os, pickle import numpy as np import dgl import torch import torch.optim as optim from models import LANDER from dataset import LanderDataset from utils import evaluation, decode, build_next_level, stop_iterating ########### # ArgParser parser = argparse.ArgumentParser() # Dataset parser.add_...
{"hexsha": "149d58336f468e4f5ce292bab15d1f7cb28f5a23", "size": 4086, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/pytorch/hilander/test.py", "max_stars_repo_name": "ketyi/dgl", "max_stars_repo_head_hexsha": "a1b859c29b63a673c148d13231a49504740e0e01", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
from typing import Tuple import tensorflow as tf import tensorflow.keras as keras import numpy as np # Build the actual model to run class ActorCritic(keras.Model): def __init__ (self, num_actions, num_hidden_units): """ Builds an actor critic network Args: num_actions: Num...
{"hexsha": "5cc1f0cffff7b19b7e088d33b8db56f980b41908", "size": 1718, "ext": "py", "lang": "Python", "max_stars_repo_path": "ActorCriticNetwork/ActorCritic.py", "max_stars_repo_name": "esslushy/actor-critic-ml-practice", "max_stars_repo_head_hexsha": "1a49b8a3ea5cc92f26a290fa7b032c126e00a3f0", "max_stars_repo_licenses":...
line5 help! world order line 4 help! world order line 3 help! world order line 2 help! world order line 1 help! world order
{"hexsha": "578a44b6b21c0200af43fa88a0d6d22c4984bef6", "size": 124, "ext": "r", "lang": "R", "max_stars_repo_path": "bin/ed/test/g1.r", "max_stars_repo_name": "lambdaxymox/DragonFlyBSD", "max_stars_repo_head_hexsha": "6379cf2998a4a073c65b12d99e62988a375b4598", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
open methanol.xyz bond 1.55 %hybridize 0 SP2 model GAFF thermostat ANDERSEN energy minimize 0.0001 0.00001 40000 1000 min.xyz energy heat 300 50 400 0.01 0.01 0.0001 0.00001 0.3 heat.xyz temperature energy prod 0.0001 0.0001 300 .3 500000 1000 prod.xyz
{"hexsha": "efca66b77e0904f3871f6202d7c29bbf3f6072b1", "size": 254, "ext": "r", "lang": "R", "max_stars_repo_path": "examples/methanol/script.r", "max_stars_repo_name": "ThatPerson/MolecularDynamics", "max_stars_repo_head_hexsha": "967a9db20528f1c4806b46445df17464525f4a2e", "max_stars_repo_licenses": ["MIT"], "max_star...
import time import edgeiq import cv2 import numpy as np """ detect objects edges based on thermal detection """ def main(): fps = edgeiq.FPS() try: with edgeiq.WebcamVideoStream(cam=1) as video_stream, \ edgeiq.Streamer() as streamer: # Allow Webcam to warm up ...
{"hexsha": "680fe6a1ae7bd6b37aaf783f6742fa8dc7b80b25", "size": 1404, "ext": "py", "lang": "Python", "max_stars_repo_path": "thermal-edges/app.py", "max_stars_repo_name": "alwaysai/thermal-imaging", "max_stars_repo_head_hexsha": "70a2d0b337c29b762a4dbce19309ab0dfae77a38", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
import subprocess import sys def install(package): subprocess.check_call([sys.executable, "-m", "pip", "install", package]) #source activate py36-udify-direct #python biasCDA/biasCDA/e2e-scripts/step1-stanza-conllu.py ##subprocess.call(["source activate", "py36-udify-direct"]) ##install('stanza') import stanza #...
{"hexsha": "72b7c240e8787f14ab68869af19a84f1b52ed3a5", "size": 7076, "ext": "py", "lang": "Python", "max_stars_repo_path": "e2e-scripts/step1-stanza-conllu.py", "max_stars_repo_name": "talktovishal/biasCDA", "max_stars_repo_head_hexsha": "270e4bdda72b12018f9a803b3e5c9e4476990011", "max_stars_repo_licenses": ["MIT"], "m...
# Copyright 2019 Pascal Audet # # This file is part of RfPy. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mod...
{"hexsha": "44fedf54f7fa7cd9a00d0778620363c6afebb669", "size": 6760, "ext": "py", "lang": "Python", "max_stars_repo_path": "obstools/orient/options.py", "max_stars_repo_name": "wbythewood/OBStools", "max_stars_repo_head_hexsha": "1ce1e39aeb4200bb3120735bef27b77c3d52c956", "max_stars_repo_licenses": ["MIT"], "max_stars_...
! @Copyright 2007 Kristjan Haule module RealBubble ! ############################### ! # Computing real axis Bubble # ! ############################### IMPLICIT NONE REAL*8, allocatable :: Ome(:) REAL*8, allocatable :: chi0r0(:,:,:) INTEGER :: norb, nOme CONTAINS SUBROUTINE RealBubble__Init__() ...
{"hexsha": "1747b03d5fff52f729fe7729b468684b472c2272", "size": 10881, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/magnetSusc/dmft_bubble/dmft_real_bubble.f90", "max_stars_repo_name": "dmft-wien2k/dmft-wien2k-v2", "max_stars_repo_head_hexsha": "83481be27e8a9ff14b9635d6cc1cd9d96f053487", "max_stars_repo_...
import os import random import numpy as np import torch from einops import repeat def expand_to_batch(tensor, desired_size): tile = desired_size // tensor.shape[0] return repeat(tensor, 'b ... -> (b tile) ...', tile=tile) def init_random_seed(seed, gpu=False): random.seed(seed) np.random.seed(seed)...
{"hexsha": "ff294275fdb68b6eba02e56a43280ed7fefa1da6", "size": 526, "ext": "py", "lang": "Python", "max_stars_repo_path": "self_attention_cv/common.py", "max_stars_repo_name": "MooseMouse/self-attention-cv", "max_stars_repo_head_hexsha": "867e7b1f08bf838c29770e43b7746b2a945d75e3", "max_stars_repo_licenses": ["MIT"], "m...
module libnpcf use iso_c_binding private public :: npcf include "ganpcf_cdef.f90" type npcf private type(c_ptr) :: ptr contains #ifdef __GNUC__ procedure :: delete => delete_npcf_polymorph #else final :: delete_npcf #endif proce...
{"hexsha": "9620e454741d61c0a4bb71b6799ff8904a807663", "size": 4131, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "source/ganpcf_mod.f90", "max_stars_repo_name": "dpearson1983/ganpcf", "max_stars_repo_head_hexsha": "d75fddfb094045a81916ffed10fec19d96b6d52e", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
/* * ping_pong_fiber_test.cpp * * Created on: Mar 25, 2017 * Author: zmij */ #ifndef WITH_BOOST_FIBERS #define WITH_BOOST_FIBERS #endif #include <gtest/gtest.h> #include <test/ping_pong.hpp> #include <wire/core/connector.hpp> #include <wire/core/connection.hpp> #include "sparring/sparring_test.hpp" #inclu...
{"hexsha": "371f9a9f07ebf1d224a6a73a464b17c7a5b118f9", "size": 6868, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/connector/ping_pong_fiber_test.cpp", "max_stars_repo_name": "zmij/wire", "max_stars_repo_head_hexsha": "9981eb9ea182fc49ef7243eed26b9d37be70a395", "max_stars_repo_licenses": ["Artistic-2.0"], "...
import tensorflow as tf import numpy as np import os from PIL import Image filename = 'model.pb' labels_filename = 'labels.txt' graph_def = tf.GraphDef() labels = [] # Import the TF graph with tf.gfile.FastGFile(filename, 'rb') as f: graph_def.ParseFromString(f.read()) tf.import_graph_def(graph_def, name=''...
{"hexsha": "e0e42e26904a9aacb1ec0b0994ba0b2d7c2222fd", "size": 1527, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lab-02/source/inference.py", "max_stars_repo_name": "alexandergg/Cognitive-Services-AI-Labs", "max_stars_repo_head_hexsha": "e1e0aef5e9a4ad43144f2ba8003d29d587f6bf4c", "max_stars_repo_licenses": [...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' import numpy as np import typing def algae(relative_humidity: typing.List[float], temperature: typing.List[float], material_name, porosity, roughness, total_pore_area): """ UNIVPM Algae Model Currently a dummy function! :param relativ...
{"hexsha": "593a19f940fc0de9ce0bf0c512b23cfc156370cd", "size": 9472, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_process/algae_script/algae_model.py", "max_stars_repo_name": "ribuild/delphin_6_automation", "max_stars_repo_head_hexsha": "12024381fc1042b46314c55d88b6349229ea33b7", "max_stars_repo_licenses...
// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) // (C) Copyright 2004-2007 Jonathan Turkanis // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) // See http://www.boost.org/libs/iostreams for d...
{"hexsha": "ad4ae05d7cddbf471e20e839d8f3119185f77ae0", "size": 4902, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ios/Pods/boost-for-react-native/boost/iostreams/device/array.hpp", "max_stars_repo_name": "rudylee/expo", "max_stars_repo_head_hexsha": "b3e65a7a5b205f14a3eb6cd6fa8d13c8d663b1cc", "max_stars_repo_li...
subroutine foo(d) real(kind=8) :: d print *, d end subroutine foo program test call foo(0.01d0) end program
{"hexsha": "92bc813c9a7f9847c965be852777a8d34862479e", "size": 115, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/mlir_out_tests/const_arg.f90", "max_stars_repo_name": "clementval/fc", "max_stars_repo_head_hexsha": "a5b444963c1b46e4eb34d938d992836d718010f7", "max_stars_repo_licenses": ["BSD-2-Clause"], ...
# https://www.kaggle.com/maniyar2jaimin/interactive-plotly-guide-to-pca-lda-t-sne # PCA (Principal Component Analysis), # LDA ( Linear Discriminant Analysis) and # TSNE ( T-Distributed Stochastic Neighbour Embedding) import numpy as np import pandas as pd df = pd.read_csv('https://covid.ourworldindata.org/data/owi...
{"hexsha": "ccb28f561b826bfeedc96a195b2de1cee7593e71", "size": 6523, "ext": "py", "lang": "Python", "max_stars_repo_path": "30DayChartChallenge/20210415-multivariate.py", "max_stars_repo_name": "vivekparasharr/Challenges-and-Competitions", "max_stars_repo_head_hexsha": "c99d67838a0bb14762d5f4be4993dbcce6fe0c5a", "max_s...
import numpy as np import torch from torch import nn from torch import optim import matplotlib.pyplot as plt from torchvision import datasets, transforms, models import torch.nn.functional as F from collections import OrderedDict import json import argparse import os from image_processing import transform_image from mo...
{"hexsha": "a5ad751eec191766b5151790886e0d93113e6f97", "size": 5073, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "ryahollands99/Udacity-AI-Programming-Final-Project", "max_stars_repo_head_hexsha": "936dcddf72385c15e37a360a713f2c59e7b183de", "max_stars_repo_licenses": ["MIT"]...
"""This module tests the PauliGate class.""" from __future__ import annotations import numpy as np import pytest from hypothesis import given from hypothesis.strategies import floats from hypothesis.strategies import integers from bqskit.ir.gates import IdentityGate from bqskit.ir.gates import PauliGate from bqskit.i...
{"hexsha": "3c98b4d92c6fde1af6165b51067ec1f98324512a", "size": 3221, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/ir/gates/parameterized/test_pauli.py", "max_stars_repo_name": "jkalloor3/bqskit", "max_stars_repo_head_hexsha": "ad34a6eae3c0e62d2bd960cd4cd841ba8e845811", "max_stars_repo_licenses": ["BSD-3...
import torch import torch.nn as nn from torch.nn import init import functools from torch.autograd import Variable from torch.optim import lr_scheduler import numpy as np import h5py from .EDSR_models.rcan import RCAN from .RegreClass import * from .weights_init import * def get_norm_layer(norm_type='instance'): i...
{"hexsha": "269859d73eeb9450502983887a3dd5d4988d4aa2", "size": 8630, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/networks.py", "max_stars_repo_name": "YilinLiu97/MR_Fingerprinting", "max_stars_repo_head_hexsha": "dbcfc85352c58f7a9027f2f4e02674ff85e59681", "max_stars_repo_licenses": ["MIT"], "max_stars...
#pragma once #include <vector> #include <Eigen/Dense> #include "Utils/IO/IOUtilities.hpp" class TVRParameter { public: double swing_time; Eigen::Vector2d des_loc; Eigen::Vector3d stance_foot_loc; bool b_positive_sidestep; double yaw_angle; }; class TVROutput { public: double time_modif...
{"hexsha": "c0d79be7ce5701a46ea814ad48f8ab15656793c3", "size": 2485, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "PnC/PlannerSet/LIPMPlanner/TVRPlanner.hpp", "max_stars_repo_name": "shbang91/PnC", "max_stars_repo_head_hexsha": "880cbbcf96a48a93a0ab646634781e4f112a71f6", "max_stars_repo_licenses": ["MIT"], "max_...
import os import random from glob import glob import numpy as np import cv2 import matplotlib.pyplot as plt from Udacity_self_driving_car_challenge_4.image_processing.calibration import camera_cal, found_chessboard, read_camera_cal_file from Udacity_self_driving_car_challenge_4.image_processing.edge_detection import ...
{"hexsha": "bb60ef9946f9dd26727e16e9ffd39d96849119d1", "size": 7805, "ext": "py", "lang": "Python", "max_stars_repo_path": "Advanced_Lane_Lines.py", "max_stars_repo_name": "KUASWoodyLIN/Udacity_self_driving_car_challenge_4", "max_stars_repo_head_hexsha": "36ca5ed50f74c49645b43ffcab1b27055540d8e5", "max_stars_repo_licen...
# # File: gofALAAM.py # Author: Alex Stivala # Created: May 2020 # """ALAAM goodness-of-fit by simulating from estimated parameters, and comparing observed statistics to statistics of simulated outcome vectors, including statistics not included in the estimated model. The ALAAM is described in: G. Darag...
{"hexsha": "88bb2587525150e12f720590556461a8265b25f5", "size": 3692, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/gofALAAM.py", "max_stars_repo_name": "stivalaa/ALAAMEE", "max_stars_repo_head_hexsha": "30147b4227488dca07ab48812aa98ab68df79f4f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 11,...
#!/usr/bin/env python """ Abstract class representing a HIAS AI OpenVINO Model. Represents a HIAS AI OpenVINO Model. HIAS AI OpenVINO Models are used by AI Agents to process incoming data. MIT License Copyright (c) 2021 Asociación de Investigacion en Inteligencia Artificial Para la Leucemia Peter Moss Permission is...
{"hexsha": "59a0f0dc32674ae84999a6265fdc33a88caac7af", "size": 7908, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules/model_openvino.py", "max_stars_repo_name": "AdamMiltonBarker/hias-all-oneapi-classifier", "max_stars_repo_head_hexsha": "7afdbcde0941b287df2e153d64e14d06f2341aa2", "max_stars_repo_licenses...
@testset "test BasisMatrices.lookup" begin table1 = [1.0, 4.0] table2 = [1.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0] x = [0.5, 1.0, 1.5, 4.0, 5.5] x2 = [0.5, 2.0] @test BasisMatrices.lookup(table1, x, 0) == [0, 1, 1, 2, 2] @test BasisMatrices.lookup(table1, x, 1) == [1, 1, 1, 2,...
{"hexsha": "a2a86edf848f9aaa2f70db12a1b724a50404652c", "size": 6345, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/util.jl", "max_stars_repo_name": "magerton/BasisMatrices.jl", "max_stars_repo_head_hexsha": "093925e67c2452a1f2da872571aff84d93cfac2d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
Load LFindLoad. From lfind Require Import LFind. Unset Printing Notations. Set Printing Implicit. From QuickChick Require Import QuickChick. Inductive natural : Type := Succ : natural -> natural | Zero : natural. Derive Show for natural. Derive Arbitrary for natural. Instance Dec_Eq_natural : Dec_Eq natural. Proof. ...
{"author": "ana-brendel", "repo": "coq-benchmarks", "sha": "78b9ca2993b0fb579d814ed17e63c6859e79681c", "save_path": "github-repos/coq/ana-brendel-coq-benchmarks", "path": "github-repos/coq/ana-brendel-coq-benchmarks/coq-benchmarks-78b9ca2993b0fb579d814ed17e63c6859e79681c/modifications/quickchick_fails/test110_goal10/lf...
import numpy as np import scipy.sparse as ss import logging import time import warnings from .feature_selection import get_significant_genes from .feature_selection import calculate_minmax warnings.simplefilter("ignore") logging.basicConfig(format='%(process)d - %(levelname)s : %(asctime)s - %(message)s', level=logg...
{"hexsha": "1551ac1a6a79309991708839cd5a99e957a025cb", "size": 6263, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycdr/pycdr.py", "max_stars_repo_name": "wlchin/pycdr", "max_stars_repo_head_hexsha": "96e64a05f1b84fd01fbb003d3256e297d6492df4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
#!/usr/bin/env python3 import asyncio import logging import tempfile import argparse import sys import numpy as np from aiocron import crontab from pyppeteer import launch from PIL import Image # Import the waveshare folder (containing the waveshare display drivers) without refactoring it to a module # find the laste...
{"hexsha": "010d0528448d03acfc88213403071719f148841b", "size": 5052, "ext": "py", "lang": "Python", "max_stars_repo_path": "show_image.py", "max_stars_repo_name": "lhoggatt17/rpi-magicmirror-eink", "max_stars_repo_head_hexsha": "2a47a257c9a4ca0d5af63c7f27406b1c8a73c4c9", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
/* * The MIT License (MIT) * * Copyright (c) 2018 Sylko Olzscher * */ #include "test-async-005.h" #include <iostream> #include <boost/test/unit_test.hpp> #include <cyng/async/mux.h> #include <cyng/io/io_chrono.hpp> #include <iomanip> #include <atomic> #include <fstream> // unit_test --run_test=ASYNC/async_005...
{"hexsha": "87023745adcca2d4a1bd6d3de185027722fff1d9", "size": 1391, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/unit-test/src/test-async-005.cpp", "max_stars_repo_name": "solosTec/cyng", "max_stars_repo_head_hexsha": "3862a6b7a2b536d1f00fef20700e64170772dcff", "max_stars_repo_licenses": ["MIT"], "max_sta...
from typing import Callable, List, Union import numpy as np from numpy import argsort, ceil, exp, mod, zeros from numpy.random import geometric, rand, randint, randn from ..search_space import SearchSpace from ..solution import Solution from ..utils import dynamic_penalty, handle_box_constraint __author__ = "Hao Wan...
{"hexsha": "5b47355b857ec0c865c5569289af8bdee20cc68c", "size": 13254, "ext": "py", "lang": "Python", "max_stars_repo_path": "bayes_optim/acquisition_optim/mies.py", "max_stars_repo_name": "zdanial/Bayesian-Optimization", "max_stars_repo_head_hexsha": "a4779e992da15d21fa3fc425293cfb1f2621f81f", "max_stars_repo_licenses"...
import face_recognition from torch.utils.data import Dataset from facenet_pytorch.models.mtcnn import MTCNN from PIL import Image import cv2 from typing import List from collections import OrderedDict from abc import ABC, abstractmethod import os import numpy as np from retinaface.pre_trained_models import get_model im...
{"hexsha": "8ab7f1ff677b4be796a741940d7c087a44b0e0ed", "size": 3652, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing/face_detector.py", "max_stars_repo_name": "windysavage/dfdc_deepfake_challenge", "max_stars_repo_head_hexsha": "d10b54cf933282366157a031954b046d87d57009", "max_stars_repo_licenses": ...
// Copyright Louis Dionne 2013-2016 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #include <boost/hana/assert.hpp> #include <boost/hana/core/tag_of.hpp> #include <boost/hana/ext/std/integral_constant.hpp> #include <boost/...
{"hexsha": "5d9624412d03adac260aca847b96a908bcd41d23", "size": 6087, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "3rdParty/boost/1.62.0/libs/hana/test/ext/std/integral_constant.cpp", "max_stars_repo_name": "sita1999/arangodb", "max_stars_repo_head_hexsha": "6a4f462fa209010cd064f99e63d85ce1d432c500", "max_stars_...
# Copyright (c) 2020 DeNA Co., Ltd. # Licensed under The MIT License [see LICENSE for details] # agent classes import random import numpy as np from .util import softmax, get_action_code, get_random_action class RandomAgent: def reset(self, env, show=False): pass def action(self, env, player, sho...
{"hexsha": "0728cb8c10fcf93b5a73c48167f6c549ecc06573", "size": 3505, "ext": "py", "lang": "Python", "max_stars_repo_path": "HandyRL/handyrl/agent.py", "max_stars_repo_name": "Fkaneko/kaggle_lux_ai", "max_stars_repo_head_hexsha": "cc2e7ad88b8817cb96e081061e363e357831e132", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# -*- coding: utf-8 -*- """ run file for neural walker @author: hongyuan """ import pickle import time import numpy import theano from theano import sandbox import theano.tensor as tensor import os import scipy.io from collections import defaultdict from theano.tensor.shared_randomstreams import RandomStreams import ...
{"hexsha": "21428b40f271f5639df03ea68f63cd0cfb89a526", "size": 1327, "ext": "py", "lang": "Python", "max_stars_repo_path": "check_results.py", "max_stars_repo_name": "jam-world/hongyuan_code", "max_stars_repo_head_hexsha": "8bfb6872fdb4cbe6742d6df4ec5942fb2d9fc87f", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
[STATEMENT] lemma Diff_triv_mset: "M \<inter># N = {#} \<Longrightarrow> M - N = M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. M \<inter># N = {#} \<Longrightarrow> M - N = M [PROOF STEP] by (metis diff_intersect_left_idem diff_zero)
{"llama_tokens": 103, "file": "Nested_Multisets_Ordinals_Multiset_More", "length": 1}
import numpy as np import pandas as pd pd.options.mode.chained_assignment = None from src.utility.config import Config, Option from pipeline import SentimentAnalyzer evaluate_exp_name = "exp-p1-2.1" evaluate_fe_option = "bert" evaluate_clf_option = "bert" config = Config(evaluate_exp_name) option = Option(evaluate_fe...
{"hexsha": "ffc99a7d04f36d824d883e7fcde16de44ef3f7ff", "size": 811, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluate.py", "max_stars_repo_name": "William9923/IF4072-SentimentClassification", "max_stars_repo_head_hexsha": "5e22a6da418056955243c310bab0382e4683b781", "max_stars_repo_licenses": ["MIT"], "max...
# -*- coding: utf-8 -*- """ Created on Sun May 24 11:05:18 2020 @author: Nicolai """ import sys sys.path.append("../../testbed/pde0A/") import CiPde0A as pde0A sys.path.append("../../testbed/pde0B/") import CiPde0B as pde0B sys.path.append("../../testbed/pde1/") import CiPde1 as pde1 sys.path.append("../../testbed/pd...
{"hexsha": "7eef58c3d9077143ab5b1ba05979b954596eecab", "size": 8884, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/experiments/experiment_0/experiment_0_time.py", "max_stars_repo_name": "nicolai-schwartze/Masterthesis", "max_stars_repo_head_hexsha": "7857af20c6b233901ab3cedc325bd64704111e16", "max_stars_r...
// Andrew Naplavkov #ifndef BARK_DB_SLIPPY_LAYERS_HPP #define BARK_DB_SLIPPY_LAYERS_HPP #include <bark/db/provider.hpp> #include <bark/db/slippy/detail/arcgis.hpp> #include <bark/db/slippy/detail/bing.hpp> #include <bark/db/slippy/detail/cartodb.hpp> #include <bark/db/slippy/detail/double_gis.hpp> #include <bark/db/s...
{"hexsha": "8b4190d4c4e7d0d86e53eda262eacaa101d8fe72", "size": 1772, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "db/slippy/detail/layers.hpp", "max_stars_repo_name": "storm-ptr/bark", "max_stars_repo_head_hexsha": "e4cd481183aba72ec6cf996eff3ac144c88b79b6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import io import zipfile import matplotlib.pyplot as plt import networkx as nx import urllib.request as urllib from zipfile import ZipFile import pandas as pd def football(): print('Loading football network...') url = "http://websensors.net.br/projects/biased-deep-walk/football.zip" sock = urllib.urlopen(url) ...
{"hexsha": "b34cefa67819d17d2b57a099814143603008c223", "size": 7284, "ext": "py", "lang": "Python", "max_stars_repo_path": "bdw/load_networks.py", "max_stars_repo_name": "rmarcacini/bdw", "max_stars_repo_head_hexsha": "55adc880b5dd4621ed48c94a6e084a90be571bd6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ...
""" Generate samples with GPT-2 and filter out those that are likely to be memorized samples from the training set. """ import logging logging.basicConfig(level='ERROR') import argparse import numpy as np from pprint import pprint import sys import torch import zlib from transformers import AutoTokenizer, AutoModelFo...
{"hexsha": "584a44ebd4d557844aa021d72c4149f95e153099", "size": 7416, "ext": "py", "lang": "Python", "max_stars_repo_path": "extraction.py", "max_stars_repo_name": "puffy310/LM_Memorization", "max_stars_repo_head_hexsha": "fc607352cd4b5db3bdcd0d764d20d475e9029ed4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from __future__ import print_function import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt plt.rcParams["font.family"] = "serif" plt.rcParams["mathtext.fontset"] = "cm" #plt.rcParams["mathtext.fontset"] = "dejavuserif" from orphics import maps,io,cosmology,mpi,stats from pixell import enmap,curvedsky...
{"hexsha": "c6569f74de73b149458adf0e9f10186bd933a906", "size": 3754, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/investigate_sims.py", "max_stars_repo_name": "ACTCollaboration/tilec", "max_stars_repo_head_hexsha": "11ed8d027ad6ffac09b3e291a047f33e97673f14", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
# Estimators. function estimator1(R::Float64, beta::Float64, int::Integrator, s::State{P,D,A,N}) where {P,D,A,N} function estim() result = 2.0 / R # 1 / nm dxdr = 0.5 .* normalize(com_disp(CN1, CN2, CJ, s)) for a in 1:A for d in 1:D for j in...
{"hexsha": "51e6cf1bbe742ba931e8400727ae7a94e62f19f3", "size": 1536, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/estimator.jl", "max_stars_repo_name": "0/WaterMeanMeanForce.jl", "max_stars_repo_head_hexsha": "a10068ecce6456bc57215cce8e60cd6976cae608", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
### Analyze object sizes ### import json import numpy as np import matplotlib.pyplot as plt import seaborn as sns from collections import defaultdict from collections import Counter data = json.load(open('/BS/rshetty-wrk/archive00/data/cocoDataStuff/datasetBoxAnn.json','r')) catid2attr = {} select_attr_list = set(['pe...
{"hexsha": "1fa0d3224a6b4e6d297257dfd8e02599a8e86302", "size": 35131, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/miscCode.py", "max_stars_repo_name": "baudm/adversarial-object-removal", "max_stars_repo_head_hexsha": "2ad7caa0d0ffdb3fbe5fa59c66edd4e77e3557ed", "max_stars_repo_licenses": ["MIT"], "max_s...
import random, math from collections import deque, namedtuple import itertools import numpy as np import gym from gym import error, spaces, utils from gym.utils import seeding import matplotlib import matplotlib.pyplot as plt matplotlib.use('Agg') def generate_random_point_on_circle(radius=0.1): """ # usin...
{"hexsha": "ffdb2267c7bd788700a3a3a183ecd1446fb5613c", "size": 7850, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym-added-environments/gym-synthetic2Dplane/gym_synthetic2Dplane/envs/synthetic2Dplane_env_backup.py", "max_stars_repo_name": "azarafrooz/corgail", "max_stars_repo_head_hexsha": "a1e6084054084fab9...
import sys from glob import glob from os import path from pathlib import Path from unittest import TestCase from PIL import Image from numpy import array sys.path.append("..") from src.solver.captcha import get_captcha_text class TestCaptcha(TestCase): def test_captcha(self): cwd = Path(__file__).paren...
{"hexsha": "12ff7ae6b3f558f8d02c8e8982f308cfdaf280c0", "size": 782, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_tesseract.py", "max_stars_repo_name": "mt-hack/nptu-auto-checkin", "max_stars_repo_head_hexsha": "65597630629eb3bb7b7efac7419cd7229f7467d7", "max_stars_repo_licenses": ["MIT"], "max_star...
import os import functools as fun import itertools as it import collections as coll import re import numpy as np from scipy import ndimage as nd from skimage import io from scipy.stats.mstats import mquantiles as quantiles from skimage import morphology as skmorph, filter as imfilter import skimage.filter.rank as rank ...
{"hexsha": "afa96043fa776acd0fcf81791d70530109ae10ad", "size": 18721, "ext": "py", "lang": "Python", "max_stars_repo_path": "husc/preprocess.py", "max_stars_repo_name": "gitter-badger/husc", "max_stars_repo_head_hexsha": "6e7ae2879caef304de7bfb77f19f99d5308ca256", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
import numpy as np #import pandas as pd import matplotlib # import seaborn as sns import matplotlib.pyplot as plt names = "LR SVM CNN LSTM BERT".split(" ") colors = ['tab:gray', 'tab:green','tab:orange', 'tab:red', 'tab:blue', 'orange' ] patterns = ('--', '\\', '////', '\\\\', '\\\\', '\\\\', '.', '*')...
{"hexsha": "cbd7a2b9373878ddd24d74d27416d1d31cd8b675", "size": 8564, "ext": "py", "lang": "Python", "max_stars_repo_path": "appendix/auc_accuracy/xl_plot.py", "max_stars_repo_name": "rit-git/tagging", "max_stars_repo_head_hexsha": "b075ce1553492be7088026b67f525a529bf03770", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import torch import random import numpy as np from PIL import Image, ImageOps, ImageFilter class Normalize(object): """Normalize a tensor image with mean and standard deviation. Args: mean (tuple): means for each channel. std (tuple): standard deviations for each channel. """ def __ini...
{"hexsha": "e05c33be05d74c291614f0a51d80fa37aa90439a", "size": 1728, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataloaders/custom_transforms_test.py", "max_stars_repo_name": "SteveSZF/Traffic-Lane-Detection", "max_stars_repo_head_hexsha": "8217808178cdf2d655d02632eb71c543d39f5258", "max_stars_repo_licenses...
"""This is how I made the digits_of_pi.txt file because I wanted to go a little further than the book did.""" # Install using pipinstall mpmath from mpmath import mp import os THIS_FOLDER = os.path.dirname(os.path.abspath(__file__)) filename = os.path.join(THIS_FOLDER, "pi_digits.txt") # Set the number of digits of p...
{"hexsha": "1077c3d2fff72a0b2604d5719751971d9b2f46ec", "size": 839, "ext": "py", "lang": "Python", "max_stars_repo_path": "Jupyter/PythonCrashCourse2ndEdition/ch10_files/generate_pi.py", "max_stars_repo_name": "awakun/LearningPython", "max_stars_repo_head_hexsha": "578f9290c8065df37ade49abe4b0ab4e6b35a1bd", "max_stars_...
import code import sys import argparse import os import time import json import shutil import cv2 import numpy as np import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torch.optim.lr_scheduler as lrsched from Network ...
{"hexsha": "c7900cabe8d091ef40eb948f083291759e014ebc", "size": 5560, "ext": "py", "lang": "Python", "max_stars_repo_path": "L2/TrainingController.py", "max_stars_repo_name": "derangedhk417/ML-Lessons", "max_stars_repo_head_hexsha": "3433e3fa6324791b74771fcfd8a6c5361ba69c53", "max_stars_repo_licenses": ["MIT"], "max_sta...
# %% import pandas as pd import numpy as np import matplotlib.pyplot as plt import sys sys.path.append("../shared") from analytic_tools import fractal_latent_heat_alex from wednesdaySPEED import simulation # %% tau = 9 pi_2_vals = [0.0, 0.1, 0.2, 0.3, 0.5] plt.figure(figsize=(10,5)) for i, val in enumerate(pi_2_va...
{"hexsha": "7324471ad5f7eb701c44cc42ce5e268c8586c20c", "size": 2844, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/james/OTHER/entropy_test.py", "max_stars_repo_name": "charelF/ComplexSystems", "max_stars_repo_head_hexsha": "3efc9b577ec777fcecbd5248bbbaf77b7d90fc65", "max_stars_repo_licenses": ["MIT"], "m...
# coding: utf-8 # In[1]: import pandas as pd import gensim import os import collections import smart_open import random import numpy as np # In[2]: df = pd.read_csv(open('library.corr','rU'), encoding='utf8',header=None, engine='c',delimiter=',', error_bad_lines=False, low_memory=False, index_col=None) # In[3]:...
{"hexsha": "caf947a8cefa3cf1ba838be28b84034afbc96160", "size": 848, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc2vec.py", "max_stars_repo_name": "Skeftical/Research-Paper-Recommender", "max_stars_repo_head_hexsha": "14f676f54627bf7f834f594787b17fc52d3530d4", "max_stars_repo_licenses": ["MIT"], "max_stars_...
[STATEMENT] lemma in_outs_rpv [iff]: "out \<in> outs'_rpv rpv \<longleftrightarrow> (\<exists>input. out \<in> outs'_gpv (rpv input))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (out \<in> outs'_rpv rpv) = (\<exists>input. out \<in> outs'_gpv (rpv input)) [PROOF STEP] by(simp add: outs'_rpv_def)
{"llama_tokens": 135, "file": "CryptHOL_Generative_Probabilistic_Value", "length": 1}
import pickle import numpy as np import cf_recommender as cf import similarity_functions as sf import movie_reviews_compiler as mrc path = '../data/' def run_test_top_k(cosine=True,k=10): '''compute the predictions for masked values in the testing set (user review vectors) using the training set (critic review matri...
{"hexsha": "2be8cfe203783df00627c55aa54172eb2f784462", "size": 2656, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/test_data_top_k.py", "max_stars_repo_name": "alaw1290/CS591B1", "max_stars_repo_head_hexsha": "57e9a3425e84405f1bfff76cc14e14e4501acc1e", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
//================================================================================================== /*! @file @Copyright 2016 Numscale SAS @copyright 2016 J.T.Lapreste Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_...
{"hexsha": "7c1f797fe477f756aaf4c666d7fa3ef8b385a2f2", "size": 2556, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/simd/arch/x86/sse4_1/simd/function/max.hpp", "max_stars_repo_name": "yaeldarmon/boost.simd", "max_stars_repo_head_hexsha": "561316cc54bdc6353ca78f3b6d7e9120acd11144", "max_stars_repo_l...
MODULE Euler_CharacteristicDecompositionModule_NonRelativistic_TABLE USE KindModule, ONLY: & DP, & Zero, & Half, & One USE GeometryFieldsModule, ONLY: & nGF, & iGF_Gm_dd_11, & iGF_Gm_dd_22, & iGF_Gm_dd_33 USE UnitsModule, ONLY: & Gram, & Centimeter USE FluidFieldsModule,...
{"hexsha": "bf0d1dcf04821f73041f51971be2166463e1537b", "size": 18599, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Modules/Euler/Euler_CharacteristicDecompositionModule_NonRelativistic_TABLE.f90", "max_stars_repo_name": "srichers/thornado", "max_stars_repo_head_hexsha": "bc6666cbf9ae8b39b1ba5feffac80303c2b1...
"""Minimum jerk trajectory.""" import numpy as np from .base import PointToPointMovement from .data._minimum_jerk import generate_minimum_jerk class MinimumJerkTrajectory(PointToPointMovement): """Precomputed point to point movement with minimum jerk. Parameters ---------- n_dims : int State ...
{"hexsha": "183072fccb2a7a806b23652b48413b0e0c4a3189", "size": 1771, "ext": "py", "lang": "Python", "max_stars_repo_path": "movement_primitives/minimum_jerk_trajectory.py", "max_stars_repo_name": "maotto/movement_primitives", "max_stars_repo_head_hexsha": "b79c78a5a0667cc24a26b7b6cc64a5762d8f4dd4", "max_stars_repo_lice...
/- Copyright (c) 2018 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Mario Carneiro, Simon Hudon, Alex Keizer -/ import Qpf.MathlibPort.Fin2 import Qpf.Util.HEq -- import Mathlib universe u v w abbrev DVec {n : Nat} (αs : Fin2 n → Type ...
{"author": "alexkeizer", "repo": "qpf4", "sha": "980f97425b9d5a5e3897073df33794192b3b3124", "save_path": "github-repos/lean/alexkeizer-qpf4", "path": "github-repos/lean/alexkeizer-qpf4/qpf4-980f97425b9d5a5e3897073df33794192b3b3124/Qpf/Util/Vec.lean"}
import sys import numpy as np from matplotlib import pyplot as plt sys.path.append("../../") from spook import SpookPosL1 from spook.utils import normalizedATA np.random.seed(1996) Na = 17 Nb = 9 Ns = 10000 Ng = 11 A = np.random.rand(Ns, Na) * 50 Xtrue = np.zeros((Na, Nb)) bb, aa = np.meshgrid(np.arange(Nb), np.ara...
{"hexsha": "da972869f01f1df2a8777bd38ba34e3e3ba8845d", "size": 1177, "ext": "py", "lang": "Python", "max_stars_repo_path": "spook/unittest/testPreNorm.py", "max_stars_repo_name": "congzlwag/spook", "max_stars_repo_head_hexsha": "0c728086b811ce829c6226e0a9a10a350772ec15", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#!/usr/bin/env python from setuptools import setup from setuptools import Extension import numpy short_desc = "Package for evaluating the NRSur7dq2 surrogate model" long_desc = \ """ NRSur7dq2 is a surrogate model for gravitational waves from numerical relativity simulations of binary black hole mergers. It is descri...
{"hexsha": "4d9ae7e413b14d0620e5106d7cecae562a35a11c", "size": 1536, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup.py", "max_stars_repo_name": "jblackma/NRSur7dq2", "max_stars_repo_head_hexsha": "fd2383f5a49f180598af25dd5ea2994dccfab2f0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "max_sta...
import numpy as np import matrix import tkinter as tk from PIL import Image, ImageTk class MyApp(tk.Tk): def __init__(self): super().__init__() self.geometry("600x400+10+10") self.bind('<Button-1>', self.callback) game = matrix.create_field(12,8) matrix.rand_array(game,15) ...
{"hexsha": "18cbc25fd89bd90868b841105c2e18893c7d77b1", "size": 925, "ext": "py", "lang": "Python", "max_stars_repo_path": "form.py", "max_stars_repo_name": "rvgorod122/pointer", "max_stars_repo_head_hexsha": "99bb95e6b75bc5de3a35f4b8a2d300dd6294292c", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": null, "...
using Ejemplo using Test @testset "Ejemplo.jl" begin @test f_xy(1,5) == 6# Write your tests here. end
{"hexsha": "dd6b051524fbeb0f9d1adf2c28fbd53e3745cbe3", "size": 107, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "EdwardAngelino/Ejemplo.jl", "max_stars_repo_head_hexsha": "e59cd0c957eefbbd5259190fd30e6cb34c4660c2", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#pragma once #include "AxisString.hpp" #include "SymbolTable.hpp" #include <boost/spirit/include/qi.hpp> #include <list> #include "foundation/definitions/AxisInputLanguage.hpp" #include "services/language/primitives/OrExpressionParser.hpp" #include "services/language/primitives/GeneralExpressionParser.hpp" namespace a...
{"hexsha": "8f252e2fe7afede74c087403a1349df08483e0ec", "size": 4359, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "Axis.Core/application/parsing/preprocessing/ExistenceExpressionParser.hpp", "max_stars_repo_name": "renato-yuzup/axis-fem", "max_stars_repo_head_hexsha": "2e8d325eb9c8e99285f513b4c1218ef53eb0ab22", ...
import os import os.path as osp from argparse import ArgumentParser import mmcv import numpy as np from xtcocotools.coco import COCO from mmpose.apis import (inference_pose_lifter_model, inference_top_down_pose_model, vis_3d_pose_result) from mmpose.apis.inference import init_pose_model from ...
{"hexsha": "730622c3f850fe3e700ed8a94f3e5c67de944aed", "size": 9999, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo/body3d_two_stage_img_demo.py", "max_stars_repo_name": "jlgzb/mmpose", "max_stars_repo_head_hexsha": "0ecf06e3580f141f6ab44645768a0d6d8ba48383", "max_stars_repo_licenses": ["Apache-2.0"], "max...
\section{\module{hmac} --- Keyed-Hashing for Message Authentication} \declaremodule{standard}{hmac} \modulesynopsis{Keyed-Hashing for Message Authentication (HMAC) implementation for Python.} \moduleauthor{Gerhard H{\"a}ring}{ghaering@users.sourceforge.net} \sectionauthor{Gerhard H{\"a}ring}{g...
{"hexsha": "1d49417853ceb34813d8057fc02ef05b2278eac8", "size": 1879, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Doc/lib/libhmac.tex", "max_stars_repo_name": "deadsnakes/python2.4", "max_stars_repo_head_hexsha": "f493d5415b662e99a73d017bcafe2148c5bc8fb5", "max_stars_repo_licenses": ["PSF-2.0"], "max_stars_coun...
#!/usr/bin/env python3 # bagus@ep.its.ac.id, # changelog: # 2019-04-16: init code from avec # 2019-07-02: modify to extract 10039 iemocap data import numpy as np import os import time import ntpath import pickle feature_type = 'egemaps' exe_opensmile = '~/opensmile-2.3.0/bin/linux_x64_standalone_static/SMILExtract' ...
{"hexsha": "7a11d41cac91c0bb07d08d9d442bce352c67fc54", "size": 2096, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/extract_feature/save_egemaps_10039-pc.py", "max_stars_repo_name": "bagustris/dimensional-ser", "max_stars_repo_head_hexsha": "ce9bfae1d962b3581dd7022e4f145429615e2771", "max_stars_repo_licens...
from __future__ import division import itertools import logging import numpy as np import time import cv2 as cv import sys import tqdm from scipy import stats def exhaustive_search_block_matching(reference_img, search_img, block_size=16, max_search_range=16, norm='l1', verbose...
{"hexsha": "d49ff39603ca028cce74d8e8eed29aed89f2925d", "size": 12021, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/optical_flow.py", "max_stars_repo_name": "mcv-m6-video/mcv-m6-2018-team5", "max_stars_repo_head_hexsha": "bb7ee72a06ce021bab751c8e8773ec128170b524", "max_stars_repo_licenses": ["MIT"], "max...
using Cairo using Rsvg abstract type AbstractGraphics <: AbstractResource end mutable struct Texture{T} <: AbstractGraphics ptr::Ptr{T} width::Int height::Int center_x::Int center_y::Int end function Texture(render_ptr::Ptr{SDL.Renderer}, sdl_surface::Ptr{SDL.Surface}; halign = 0.5, valign = 0.5)...
{"hexsha": "a85cdfcdfbb8f1e739c0567989734607b85d1f59", "size": 2740, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/texture.jl", "max_stars_repo_name": "freemin7/Gloria.jl", "max_stars_repo_head_hexsha": "35ab01e48c19e414320b2bb2800a9cbd57e86075", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 42, "m...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of the Kramers-Kronig Calculator software package. # # Copyright (c) 2013 Benjamin Watts, Daniel J. Lauk # # The software is licensed under the terms of the zlib/libpng license. # For details see LICENSE.txt import kkcalc as kk import numpy as np impor...
{"hexsha": "66493732f5f10b7673a567dc6ee63eb7118b7ba5", "size": 1414, "ext": "py", "lang": "Python", "max_stars_repo_path": "example/example.py", "max_stars_repo_name": "dschick/kkcalc", "max_stars_repo_head_hexsha": "9218d557fb3217ff1339dcc81230380e2cc0059b", "max_stars_repo_licenses": ["Zlib"], "max_stars_count": null...
#!/usr/bin/env python '''Testing for tracking.py @author: Zach Hafen @contact: zachary.h.hafen@gmail.com @status: Development ''' import copy import mock import numpy as np import numpy.testing as npt import pytest import unittest import unyt import galaxy_dive.read_data.ahf as read_ahf import galaxy_dive.analyze_da...
{"hexsha": "10f57350fb7b26cf453486ea9ad46dcf88ba8301", "size": 54829, "ext": "py", "lang": "Python", "max_stars_repo_path": "galaxy_dive/tests/test_galaxy_linker/test_linker.py", "max_stars_repo_name": "zhafen/galaxy-dive", "max_stars_repo_head_hexsha": "e1127da25d10f699b3ada01b1b4635255f4f3917", "max_stars_repo_licens...
/*****************************************************************************/ /* Copyright (c) 2017, Aleksandrs Ecins */ /* All rights reserved. */ /* */ ...
{"hexsha": "02c7ebf358a27fbf5a7813e90a74a15f55c13473", "size": 9022, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "utilities/graph/min_cut.hpp", "max_stars_repo_name": "Cznielsen/symseg", "max_stars_repo_head_hexsha": "b1c1e1e2f21f6a3d8b65e4f68d3516bc0bbbf06e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
import numpy as np from layers.base import Layer class Output(Layer): def __init__(self, input_layers, output_shape, loss_function=None, learning_rate=0.1): super().__init__(input_layers, output_shape) self.loss_function = loss_function self.cur_y_true = None self.learning_rate = l...
{"hexsha": "051900c2ab26a6db2fae2e94a6048f0db0789230", "size": 1099, "ext": "py", "lang": "Python", "max_stars_repo_path": "layers/output.py", "max_stars_repo_name": "WallFacer5/ArtifIdiot", "max_stars_repo_head_hexsha": "698aac564901f64138b1e6287ab1996792a8f2fa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# Information Retrieval in High Dimensional Data ## Lab #6, 23.11.2017 ## Principal Component Analysis ### Task 1 In this task we will once again work with the MNIST training set as provided on Moodle. Chose three digit classes, e.g. 1, 2 and 3 and load N=1000 images from each of the clsses to the workspace. Store t...
{"hexsha": "0cf86713f443311e6980a06107baf12f561c033f", "size": 37081, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "information-retrieval-exercises/lab06.ipynb", "max_stars_repo_name": "achmart/inforet", "max_stars_repo_head_hexsha": "3596ff971207728a42b335e71608b0b96e241228", "max_stars_repo_lice...
################################################################## # Match two patterns in one two-pattern image # Works for color images only # # Copyright (c) 2017 Alexey Yastrebov # MIT License, see LICENSE file. ################################################################## #coding=cp1251 from keras....
{"hexsha": "e52e633efc095d22e93630767e43fde1b80f5149", "size": 1509, "ext": "py", "lang": "Python", "max_stars_repo_path": "classifier/match_patterns.py", "max_stars_repo_name": "a-yastrebov/keratools", "max_stars_repo_head_hexsha": "6a20564174e11e0a8430edc052b60f3acca2b732", "max_stars_repo_licenses": ["MIT"], "max_st...
from mod_copeland_yateesh import sample_complexity args = {} # args['heuristic'] = 'random' args['heuristic'] = 'greedy' # args['heuristic'] = 'mod_dcb' args['n_voters'] = 4639 args['alpha'] = 0.05 args['seed'] = 42 args['ques_limit'] = 5 args['gamma'] = 0.5 args['probs'] = [0.05, 0.1, 0.2, 0.4] q_limits = [1, 2, 3, ...
{"hexsha": "40a0ac9ef1f0942324ba2dd8c8677bdc56cbdcb2", "size": 3525, "ext": "py", "lang": "Python", "max_stars_repo_path": "cswor/runner_us_data.py", "max_stars_repo_name": "satvikmashkaria/CS748_project", "max_stars_repo_head_hexsha": "57185b6a467e638d6db96cf1c7d3dbe8d6bf5032", "max_stars_repo_licenses": ["BSD-3-Claus...
from contextlib import contextmanager from typing import Tuple import numpy as np import scipy.sparse as sp @contextmanager def random_state_context(seed: int): state = np.random.get_state() try: np.random.seed(seed) yield finally: np.random.set_state(state) def with_cliques( ...
{"hexsha": "d92c3e021641a226137786a5342b693d51c519a6", "size": 3103, "ext": "py", "lang": "Python", "max_stars_repo_path": "gud/anomolies.py", "max_stars_repo_name": "jackd/gud", "max_stars_repo_head_hexsha": "7bd4befca53fa5a6b9d14a60e11d0898ade78267", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null,...
# google imports # standard library imports import sys import copy import pickle import os from collections import Counter from io import BytesIO from zipfile import ZipFile import copy import pickle from math import ceil import importlib import urllib.request # math imports from matplotlib import pyplot as plt impor...
{"hexsha": "a41e0939fa40849de09879bb18a2ace11e3c95ba", "size": 37272, "ext": "py", "lang": "Python", "max_stars_repo_path": "jowilder_utils.py", "max_stars_repo_name": "fielddaylab/OGDUtils", "max_stars_repo_head_hexsha": "7f8252cafb0783f706db5adebf167d2edf069d00", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
"""Read pkl files created by process_*_catalog.py and *_ML.py and make plots of chromatic biases as functions of redshift, both before and after photometric corrections are estimated. Run `python plot_bias.py --help` for a list of command line options. """ import cPickle from argparse import ArgumentParser import nu...
{"hexsha": "d490ea85277b4207f2cd60d40b9482e8b2f3cd2c", "size": 24733, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/analytic/catalog/plot_bias_panel.py", "max_stars_repo_name": "DarkEnergyScienceCollaboration/chroma", "max_stars_repo_head_hexsha": "64fc123a065334b307654f29b3bea52885b46ec8", "max_stars_repo...
program test_ewald2 ! This test compares lattice energy 'eew' calculated from the Ewald summation ! against the energy calculated using the Madelung constant for various lattice ! constants L. The agreement is essentially to machine precision. ! Similar to test_ewald, but here we the diagonal Na atom is moved by 3/8 ...
{"hexsha": "7e5f456ade68d8c38a7899bf7ed161c24e4a7ac1", "size": 5302, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/tests/test_ewald2.f90", "max_stars_repo_name": "certik/hfsolver", "max_stars_repo_head_hexsha": "b4c50c1979fb7e468b1852b144ba756f5a51788d", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_...
#!/usr/bin/python # coding=utf-8 # Copyright 2016-2019 Angelo Ziletti # # 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...
{"hexsha": "edc73565f43a66ea14e152a2fcf0bf5fc3fe1881", "size": 2569, "ext": "py", "lang": "Python", "max_stars_repo_path": "ai4materials/descriptors/diffraction1d.py", "max_stars_repo_name": "hpleva/ai4materials", "max_stars_repo_head_hexsha": "5b5548f4fbfd4751cd1f9d57cedaa1e1d7ca04b2", "max_stars_repo_licenses": ["Apa...
import numpy as np import pandas as pd import xarray as xr def istat_deaths_to_pandas(path): istat = pd.read_csv(path, encoding="8859", na_values="n.d.", dtype={"GE": str}) # make a date index from GE def ge2month_day(x): return f"{x[:2]}-{x[2:]}" month_day = istat["GE"].map(ge2month_day).va...
{"hexsha": "08fa4f3d8c2484a9c0197f48167adb6018f2835d", "size": 2089, "ext": "py", "lang": "Python", "max_stars_repo_path": "xpop/data/italy.py", "max_stars_repo_name": "alexamici/xpop", "max_stars_repo_head_hexsha": "940f935dfd125d5d51ab7b71a281196c55b29da4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
import Pkg; Pkg.activate(joinpath(@__DIR__, "../../../../../")) using Distributions using PyPlot """ Paper: Bayesian inference for finite mixtures of univariate and multivariate skew-normal and skew-t distributions, Biostatistics 2010. skew (delta): a real number in (-1, 1) """ function rand_skewnormal(loc, sca...
{"hexsha": "d57867463fd6192147031c96695cf7aca8c38ee7", "size": 740, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "runs/sim-study/configs/test-sim-6-7-19/notebook/scripts/sketch-data-gen.jl", "max_stars_repo_name": "luiarthur/CytofRepFAM.jl", "max_stars_repo_head_hexsha": "1f997d1620d74861c5bde5559ebdd1e6c449b9e...
###################### ##### ROSENBROOK ##### ###################### function rosenbrook1() model = Model() @variable(model, x) @variable(model, y) @NLobjective(model, Min, (2.0 - x)^2 + 100 * (y - x^2)^2) return model end function test_rosenbrook1(solver) @testset "test_rosenbrook1" begin ...
{"hexsha": "ce39a147d36cf8a2f4bbd531da89deeb74babd38", "size": 10840, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/problems.jl", "max_stars_repo_name": "ohinder/OnePhase.jl", "max_stars_repo_head_hexsha": "386f4c09ec43b3cb1d41d711bbb7b0bab097015c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 21...
import numpy as np from bokeh.plotting import figure, show from bio_rtd import pdf, uo # Define inlet profiles. t = np.linspace(0, 10, 201) # time c_in = np.ones([1, t.size]) # concentration (constant) f = np.ones_like(t) * 3.5 # flow rate # Define unit operation. ft_uo = uo.fc_uo.FlowThrough( t=t, uo_id="ft_e...
{"hexsha": "622f1010f51f3369eaaef4ba1644437882692cf5", "size": 762, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/documentation/tutorial_1d.py", "max_stars_repo_name": "open-biotech/bio-rtd", "max_stars_repo_head_hexsha": "c3e2cf4d7d646bda719e5fc6f694a1cae0e412c0", "max_stars_repo_licenses": ["MIT"], ...
struct Quadrotor2DArm{I, T} <: Model{I, T} n::Int m::Int d::Int # body lb # length mb # mass Jb # inertia # link 1 l1 lc1 m1 J1 # link l2 lc2 m2 J2 g # gravity end function kinematics(model::Quadrotor2DArm, q) @SVector [q[1] + mod...
{"hexsha": "19fc81e0f4ced912f09dc3e833b4ed8847fcdcd8", "size": 1370, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "models/quadrotor2D_arm.jl", "max_stars_repo_name": "jmichaux/motion_planning", "max_stars_repo_head_hexsha": "9a36f394261ff11ca8325d8a5e9d8a79f18b2744", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma lift_resumption_bind: "lift_resumption (r \<bind> f) = lift_resumption r \<bind> lift_resumption \<circ> f" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lift_resumption (r \<bind> f) = lift_resumption r \<bind> lift_resumption \<circ> f [PROOF STEP] by(coinduction arbitrary: r rule: gpv.coinduct_...
{"llama_tokens": 164, "file": "CryptHOL_Generative_Probabilistic_Value", "length": 1}
from flask import Flask, render_template, request import json import plotly import time #import pandas as pd import numpy as np from plotly import graph_objects as go import os app = Flask(__name__) app.debug = False datapath = os.path.join('..',"data") statusfile = os.path.join(datapath,"statusfile.txt") def modifyl...
{"hexsha": "68f085e7a13a697ab6e1d62131b07a4e3dc7fefd", "size": 3675, "ext": "py", "lang": "Python", "max_stars_repo_path": "flaskapp/testapp.py", "max_stars_repo_name": "dr3y/biomassSensorPy", "max_stars_repo_head_hexsha": "3b86af0b0811a39973b5da592ad19bbd35444c70", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
""" Stacked area plot for 1D arrays inspired by Douglas Y'barbo's stackoverflow answer: https://stackoverflow.com/q/2225995/ (https://stackoverflow.com/users/66549/doug) """ import numpy as np from matplotlib import _api __all__ = ['stackplot'] def stackplot(axes, x, *args, labels=()...
{"hexsha": "58c9b4fde5c0ffc23970031cef4426cd61c9ddda", "size": 4268, "ext": "py", "lang": "Python", "max_stars_repo_path": "venv/Lib/site-packages/matplotlib/stackplot.py", "max_stars_repo_name": "arnoyu-hub/COMP0016miemie", "max_stars_repo_head_hexsha": "59af664dcf190eab4f93cefb8471908717415fea", "max_stars_repo_licen...
import tkinter as tk import tkinter.ttk as ttk import numpy as np from ..functions import dp, pdd from ..resources.language import Text from .measurement_import import GetType class RadCalc: def __init__(self, filepath, parent): self.filepath = filepath self.parent = parent self.filenam...
{"hexsha": "b8c8e117af7c0256e03aeebdb1fb30fbb88bbd3d", "size": 1898, "ext": "py", "lang": "Python", "max_stars_repo_path": "topasgraphsim/src/classes/radcalc_import.py", "max_stars_repo_name": "sebasj13/topasgraphsim", "max_stars_repo_head_hexsha": "6027c7c098b319159c32108dd4ec63f4b44e8676", "max_stars_repo_licenses": ...
#!/usr/bin/env python import os, re import networkx as NX import matplotlib.pyplot as PLT import numpy, scipy from numpy import random, array, triu, linalg from scipy.sparse.linalg import eigs from draggableNode import DraggableNode from graph import Graph class GraphCoOccurrence(Graph): def __init__(self, par...
{"hexsha": "e689575723f58294acf79e89836ee1e93c0aa597", "size": 9564, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/graphCoOccurrence.py", "max_stars_repo_name": "fdesjardins/nara-stepbrowser", "max_stars_repo_head_hexsha": "27703717e0e5a69fe16d3df3ba285d22b56595cb", "max_stars_repo_licenses": ["MIT"], "max...
\documentclass{article} \usepackage{epic} \usepackage{eepic} \title{Efficient Planning In Simple Cases:\\ Lessons From The Blocks World} \author{Bart Massey} \date{June 12, 1995} \newcommand{\sbw}{{\em primitive-blocks-world}} \newcommand{\astar}{{$\mbox{A}^{\!\mbox{\tt *}}$}} \newcommand{\idastar}{{$\mbox{IDA}^{\!...
{"hexsha": "d9dcea60f173f22ba0c268ec310b98824e6da06f", "size": 15375, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/fastplan/fastplan.tex", "max_stars_repo_name": "BartMassey/blocks", "max_stars_repo_head_hexsha": "6dbb39186595b6e2b80c9a5dcd616056f6cb3117", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Copyright 2020 Magic Leap, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing...
{"hexsha": "48cf0552e77f2ed1d55c24d9b9e1f689eeed1bfc", "size": 10265, "ext": "py", "lang": "Python", "max_stars_repo_path": "inference.py", "max_stars_repo_name": "fuy34/indoorMVS", "max_stars_repo_head_hexsha": "440ba357de50d47e5868e6009bc608f8bcb9e9f6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1,...
# -*- coding: utf-8 -*- """ We'd like to know a bit more about the dose we inflict on the patient. This script is used to calculate said dose based on the x-ray spectra that we will be able to set (see Source-Specifications). """ from __future__ import division # fix integer division from optparse import OptionParse...
{"hexsha": "03fd3059180732229a1fb98f061254002823eb50", "size": 10870, "ext": "py", "lang": "Python", "max_stars_repo_path": "DoseCalculation.py", "max_stars_repo_name": "habi/GlobalDiagnostiX", "max_stars_repo_head_hexsha": "5171ccee3c8a8ccc7f0b82d52d7fdac327e8d7c7", "max_stars_repo_licenses": ["Unlicense"], "max_stars...
import mlflow import os.path import plotly.express as px import pandas as pd import numpy as np import matplotlib.pyplot as plt from src.visualization.plot import track_plot, plot from src.substitute_dynamic_symbols import run, lambdify from IPython.display import display from os import stat from sklearn.metrics import...
{"hexsha": "0ec4a0e67cf9d16b198fd7a0bd705bab1db4eec1", "size": 12006, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/result.py", "max_stars_repo_name": "martinlarsalbert/wPCC", "max_stars_repo_head_hexsha": "16e0d4cc850d503247916c9f5bd9f0ddb07f8930", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...