text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
#include "common.hpp" #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> #include <boost/optional.hpp> #include <sys/stat.h> #include <sys/syscall.h> #include <unistd.h> #ifndef STATX_TYPE // Debian 10: sys/stat.h declares STATX_TYPE etc, linux/stat.h would cause conflict // Ubuntu 18: sys/stat....
{"hexsha": "49843d0a178233269d2f41810df46aa1cc65ebb0", "size": 9459, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "file-server.cpp", "max_stars_repo_name": "yoursunny/ndn6-tools", "max_stars_repo_head_hexsha": "b23cfc50b9bc5afd8a2db85d91b5ac05315f33a6", "max_stars_repo_licenses": ["0BSD"], "max_stars_count": 2.0...
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the FRM-II # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # th...
{"hexsha": "a17861a38e6251763e0877ba65958ed94ed3f239", "size": 18689, "ext": "py", "lang": "Python", "max_stars_repo_path": "nicos_mlz/toftof/devices/datasinks/elements.py", "max_stars_repo_name": "ebadkamil/nicos", "max_stars_repo_head_hexsha": "0355a970d627aae170c93292f08f95759c97f3b5", "max_stars_repo_licenses": ["C...
from __future__ import unicode_literals import numpy as np import liteasr.utils.kaldiio.python_wave as wave def read_wav(fd, return_size=False): wd = wave.open(fd) rate = wd.getframerate() nchannels = wd.getnchannels() nbytes = wd.getsampwidth() if nbytes == 1: # 8bit-PCM is unsigned ...
{"hexsha": "73f5bba30abfe61f1603192bb0ab009ae74bfa91", "size": 1394, "ext": "py", "lang": "Python", "max_stars_repo_path": "liteasr/utils/kaldiio/wavio.py", "max_stars_repo_name": "Nazukixv/LiteASR", "max_stars_repo_head_hexsha": "8ee0ef2139acc7c9185b7fecc4b0283f31499830", "max_stars_repo_licenses": ["MIT"], "max_stars...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Built-in imports import warnings # 3rd party imports import numpy as np import xarray as xr __author__ = "Louis Richard" __email__ = "louisr@irfu.se" __copyright__ = "Copyright 2020-2021" __license__ = "MIT" __version__ = "2.3.7" __status__ = "Prototype" def feeps_sp...
{"hexsha": "edfa77222dfec1a6d43326faf03a60487f7e9dbb", "size": 1502, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyrfu/mms/feeps_spin_avg.py", "max_stars_repo_name": "ablotekar/irfu-python", "max_stars_repo_head_hexsha": "740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e", "max_stars_repo_licenses": ["MIT"], "max_sta...
import cv2 import os import pickle from os.path import join, exists import handsegment as hs import argparse import numpy as np from tqdm import tqdm from config import * hc = [] def convert(gesture_folder, target_folder): if not exists('./'+target_folder): os.makedirs(target_folder) gestures ...
{"hexsha": "95f461b15386f71672e21b8e168e20cc6290a5fe", "size": 3176, "ext": "py", "lang": "Python", "max_stars_repo_path": "video-to-frame.py", "max_stars_repo_name": "ZawszeBaka/hand-sign-lang-recog", "max_stars_repo_head_hexsha": "64f76bb37189466b1e479e644ba6ca797f2dc7f5", "max_stars_repo_licenses": ["MIT"], "max_sta...
// test suite for Quaternion class #include <cmath> #include <vector> #include <Eigen/Dense> #include <Eigen/Geometry> #include <gtest/gtest.h> #include <isce3/core/DenseMatrix.h> #include <isce3/core/EulerAngles.h> #include <isce3/core/Quaternion.h> #include <isce3/core/Vector.h> using namespace isce3::core; struc...
{"hexsha": "0802d5b1bd5a922a0f4c921c88c52664a373e8af", "size": 9701, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/cxx/isce3/core/attitude/quaternion_euler.cpp", "max_stars_repo_name": "isce3-testing/isce3-circleci-poc", "max_stars_repo_head_hexsha": "ec1dfb6019bcdc7afb7beee7be0fa0ce3f3b87b3", "max_stars_r...
import numpy as np import torch import os from torch.autograd import Variable from .base_model import BaseModel import sys # import pytorch_DIW_scratch import dain.MegaDepth.pytorch_DIW_scratch as pytorch_DIW_scratch class HGModel(BaseModel): def name(self): return 'HGModel' def __init__(self, opt,pre...
{"hexsha": "fc814d1daa027dbb523393fdb6ed82bdf8d5863c", "size": 5962, "ext": "py", "lang": "Python", "max_stars_repo_path": "dain/MegaDepth/models/HG_model.py", "max_stars_repo_name": "myungsub/meta-interpolation", "max_stars_repo_head_hexsha": "f7afee9d1786f67e6f548c2734f91858f803c5dc", "max_stars_repo_licenses": ["MIT...
{-# OPTIONS --without-K --safe #-} -- Monoidal natural transformations between lax and strong symmetric -- monoidal functors. -- -- NOTE. Symmetric monoidal natural transformations are really just -- monoidal natural transformations that happen to go between -- symmetric monoidal functors. No additional conditions ar...
{"hexsha": "1d32d9db34a34c51095ee8befdebe03e9810ef6b", "size": 6919, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/Categories/NaturalTransformation/Monoidal/Symmetric.agda", "max_stars_repo_name": "sstucki/agda-categories", "max_stars_repo_head_hexsha": "602ed2ae05dd449d77fc299c07a1cdd02ee5b823", "max_star...
!============================================================================ ! CALCULO DE LA ENERGIA DE UNA DE LAS PARTICULAS DE LA CELDA ! ! Autor: Martin Alejandro Paredes Sosa !============================================================================ Subroutine EnergyPart(Rx1, Ry1, i, V) Use cte Implicit Non...
{"hexsha": "8ed53dcdd249316f4b0c2cf9739a78d2b3387d4b", "size": 1151, "ext": "f03", "lang": "FORTRAN", "max_stars_repo_path": "Portafolio_II/Comentarios/EnergyPartHD.f03", "max_stars_repo_name": "maps16/DesExpII", "max_stars_repo_head_hexsha": "d9d12b445e0fe86e32fce028be4f5b8bcfd2391f", "max_stars_repo_licenses": ["MIT"...
[STATEMENT] lemma local_state_rel: assumes "(s', s) \<in> vi_rel" shows "(\<lparr> local_state_impl.variables = s' \<rparr>, \<lparr> local_state.variables = s \<rparr>) \<in> local_state_rel" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<lparr>local_state_impl.variables = s'\<rparr>, \<lparr>local_state.var...
{"llama_tokens": 523, "file": "CAVA_LTL_Modelchecker_CAVA_Impl", "length": 3}
import numpy as np import pandas as pd import re import math from sklearn.base import TransformerMixin from sklearn.preprocessing import MinMaxScaler from ua_parser import user_agent_parser class LogTransformer(TransformerMixin): def __init__(self): self.df_ix = pd.read_csv('datasets/TEHRAN-IX_Public_Tra...
{"hexsha": "2dbb5699500aa5777ab1793e7ad3d4a9dd197381", "size": 9287, "ext": "py", "lang": "Python", "max_stars_repo_path": "log_transformer.py", "max_stars_repo_name": "zivdar001matin/web-crawler-detection", "max_stars_repo_head_hexsha": "3f42b8cf168c678dc4177aba0a9b2c07141f7604", "max_stars_repo_licenses": ["MIT"], "m...
import numpy as np from pyscf import gto, df import scipy.linalg from scipy.linalg import cho_factor, cho_solve from mldftdat.pyscf_utils import * LDA_FACTOR = - 3.0 / 4.0 * (3.0 / np.pi)**(1.0/3) GG_SMUL = 1.0 GG_AMUL = 1.0 GG_AMIN = 1.0 / 18 ###################### # Exchange baselines # ###################### de...
{"hexsha": "3fc224fb2c3d2d8f15b49af7abd4ecdd4dd41feb", "size": 20231, "ext": "py", "lang": "Python", "max_stars_repo_path": "mldftdat/density.py", "max_stars_repo_name": "mir-group/CiderPress", "max_stars_repo_head_hexsha": "bf2b3536e6bd7432645c18dce5a745d63bc9df59", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" Integration tests for the full HSR / PCA pipeline. """ # ----------------------------------------------------------------------------- # IMPORTS # ----------------------------------------------------------------------------- from pathlib import Path from typing import Dict import json from _pytest.tmpdir import...
{"hexsha": "815474d17e7ef207e0a779b5208aeea72394d933", "size": 17182, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/integration/test_integration.py", "max_stars_repo_name": "timothygebhard/hsr4hci", "max_stars_repo_head_hexsha": "0b38c26fac2fee9e564a9ab981fca715d5577e1e", "max_stars_repo_licenses": ["BSD...
[STATEMENT] lemma rGamma_zeros: "(\<lambda>z. rGamma z / (z + of_nat n)) \<midarrow> (- of_nat n) \<rightarrow> ((-1)^n * fact n :: 'a :: Gamma)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<lambda>z. rGamma z / (z + of_nat n)) \<midarrow>- of_nat n\<rightarrow> (- (1::'a)) ^ n * fact n [PROOF STEP] proof (su...
{"llama_tokens": 1445, "file": null, "length": 11}
# Copyright 2020 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
{"hexsha": "e8dfcf16d7d27c5d944d67c0acff17d0f8ce5ef5", "size": 3589, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_probability/python/internal/callable_util_test.py", "max_stars_repo_name": "NeelGhoshal/probability", "max_stars_repo_head_hexsha": "45ed841e3cff6cdc7cd1b2d96dd874d9070318f7", "max_star...
from collections import deque import numpy as np from . import BaseGraph, to_adjacency_matrix, to_undirected, to_unweighted def build_residual_graph(graph): # only edges matter # assume no multiedges residual_graph = to_undirected(to_unweighted(graph)) assert residual_graph.order() > 0 capacity ...
{"hexsha": "7c5fb76e743725d4887fe553fa39ac55cb4b25a4", "size": 2759, "ext": "py", "lang": "Python", "max_stars_repo_path": "algorithms/graph/maxflow.py", "max_stars_repo_name": "vadimadr/python-algorithms", "max_stars_repo_head_hexsha": "a9716308ccf9ebf54d7472da4700b5acffbea547", "max_stars_repo_licenses": ["MIT"], "ma...
import numpy as np inputfile = open('day-11/day11_input.txt', 'r') # inputfile = open('day-11/day11_input_ex.txt', 'r') def getMatrix(inputfile): array = [] with inputfile as f: for line in f.readlines(): row = list(map(int, line.strip())) array.append(row) return np.array(a...
{"hexsha": "a1baa824ee112077d2e1d924c1fe682a88952d4b", "size": 2114, "ext": "py", "lang": "Python", "max_stars_repo_path": "day-11/day11.py", "max_stars_repo_name": "RomyBos/advent-of-code-2021", "max_stars_repo_head_hexsha": "d615555bf33603342fa4d2f3911b03390d396e89", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
function fixargs(args::Vector{Any}, stub::Any) n = length(args) data = Array{Any}(uninitialized, n) na = BitArray(uninitialized, n) for i in 1:n if args[i] == :missing || args[i] == :NA data[i] = stub na[i] = true else data[i] = args[i] na[...
{"hexsha": "ab16ea5b9a746aa2d1671cddbb5528139638004a", "size": 4157, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/literals.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/DataArrays.jl-0fe7c1db-08c2-54a3-a222-6d1d3b7a471a", "max_stars_repo_head_hexsha": "cf088503f3e740f36248cc8eb94847591013c43a...
C From hvq package (FMNR). Proton, photon and electron PDFs are kept C PDFs from 1999 onwards taken from P. Nason code C----------------------------------------------------------------------- C------- START STRUCTURE FUNCTION SECTION ------------------------------- C-----------------------------------------------------...
{"hexsha": "e5cf2a6da42101653b718a08f2d558582bc45617", "size": 452018, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "examples/First_Project/mg_processes/signal1/MCatNLO/srcCommon/mcatnlo_libofpdf.f", "max_stars_repo_name": "JaySandesara/madminer", "max_stars_repo_head_hexsha": "c5fcb9fbbd5d70f7a07114e4ea6afc4e...
MODULE inm_df IMPLICIT none SAVE TYPE df_type REAL(8), POINTER :: & df_mb_time(:), df_wb_time(:) REAL(4), POINTER :: & df_mb_data(:,:), df_wb_data(:,:) END TYPE END MODULE inm_df
{"hexsha": "d913daa2561f71c459b088d4609d1d119a76c3a8", "size": 255, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "third_party/universal-ctags/ctags/Units/parser-fortran.r/array-spec.f90.d/input.f90", "max_stars_repo_name": "f110/wing", "max_stars_repo_head_hexsha": "31b259f723b57a6481252a4b8b717fcee6b01ff4",...
from general_gan_bound_discogan import GeneralGANBound from dataset import * from torch.autograd import Variable import torch import numpy as np class GeneralGANBound_distancegan(GeneralGANBound): def distance(self, A, B): return torch.mean(torch.abs(A - B)) def get_individual_distance_loss(self, A_...
{"hexsha": "f4aaa5dc3a639db1dc337cf03677da06927aef7c", "size": 10738, "ext": "py", "lang": "Python", "max_stars_repo_path": "discogan_arch/general_gan_bound_distancegan.py", "max_stars_repo_name": "sagiebenaim/gan_bound", "max_stars_repo_head_hexsha": "e94797c8a5bd85a30455a5f20344e3705a7a1e33", "max_stars_repo_licenses...
import tactic import data.set.finite import for_mathlib /- # Building topological spaces in Lean -/ /- First a little setup, we will be making definitions involving the real numbers, the theory of which is not computable, and we'll use sets. -/ noncomputable theory open set /- Definition of a topological space -/ @...
{"author": "mmasdeu", "repo": "barcelonaleanseminar", "sha": "140478080f6680ea5e3ce61e6523272e7e12219f", "save_path": "github-repos/lean/mmasdeu-barcelonaleanseminar", "path": "github-repos/lean/mmasdeu-barcelonaleanseminar/barcelonaleanseminar-140478080f6680ea5e3ce61e6523272e7e12219f/src/topologia.lean"}
import pandas as pd import scanpy as sc from pathlib import Path from scipy.stats import zscore import json #--------------------------------------------------------- z=2.5 min_avg=0.1 f_rss='./out/a02_preserve_00_pp/rss.csv' f_ada='./raw/count/h5ad/concat_merged.h5ad' fd_out='./out/a02_preserve_01_hm-pp' #--------...
{"hexsha": "042f5701549e967c7b092f426b4827cab5e12f21", "size": 2990, "ext": "py", "lang": "Python", "max_stars_repo_path": "a02_preserve_01_hm-pp.py", "max_stars_repo_name": "Hoa-Lab/2021_Menieres", "max_stars_repo_head_hexsha": "2fc8a814a9b1883dd8c17b5d2cd6058f47f7fd4e", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from threading import Thread #import dask import chocolate as choco import time import numpy as np, pandas as pd import subprocess import sqlite3 import click from submit_hpc.job_generator import assemble_run_torque import time import pysnooper #from dask.distributed import Client, as_completed from methylcapsnet.methy...
{"hexsha": "cde2ef17f207232afefc762facd2751fed7eda5f", "size": 17566, "ext": "py", "lang": "Python", "max_stars_repo_path": "methylcapsnet/.ipynb_checkpoints/hyperparameter_job-checkpoint.py", "max_stars_repo_name": "Christensen-Lab-Dartmouth/MethylCapsNet", "max_stars_repo_head_hexsha": "17b6b19809c5e1984de804eb34cc74...
#!/usr/bin/python import networkx as nx INGRAPH="tgen.webclient.graphml.xml" OUTGRAPH="tgen.edited.webclient.graphml.xml" LOGLEVEL="debug" def main(): print "reading graph..." G = nx.read_graphml(INGRAPH) print "editing loglevel attribute..." for n in G.nodes(): if n == 'start': ...
{"hexsha": "46641ca214614f538f850c686d286696b3912744", "size": 452, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tools/tgen_add_loglevel.py", "max_stars_repo_name": "sweisgerber-dev/shadow", "max_stars_repo_head_hexsha": "36bf449d52697c8a093c0b163a93bb05c1b28ac1", "max_stars_repo_licenses": ["BSD-3-Clause...
#include <string> #include "dbinterface_CachedEntity.h" #include <boost/thread/mutex.hpp> #include <boost/thread/lock_guard.hpp> #include "dbtypes/dbtype_Entity.h" #include "dbinterface_EntityRef.h" #include "dbinterface_EntityRefCounter.h" #include "logging/log_Logger.h" namespace mutgos { namespace dbinterface {...
{"hexsha": "34e978a7b36868a976f9099a55e922e691027c29", "size": 3174, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/dbinterface/dbinterface_CachedEntity.cpp", "max_stars_repo_name": "hyena/mutgos_server", "max_stars_repo_head_hexsha": "855c154be840f70c3b878fabde23d2148ad028b3", "max_stars_repo_licenses": ["MI...
# ellipses_draw.py # split from ellipsesk JAB 8/20/11 import os import numpy as num import wx from wx import xrc import codedir from params_057 import params import imagesk_057 from ellipsesk_057 import TargetList DEBUG = False import motmot.wxvideo.wxvideo as wxvideo ZOOM_RSRC_FILE = os.path.join(codedir.codedir...
{"hexsha": "64bccbd5c30cbb42250b9400e885770f2018bf02", "size": 12319, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/ellipses_draw_057.py", "max_stars_repo_name": "johnabender/ctrax-tmp", "max_stars_repo_head_hexsha": "3e326ca9d00472dff0dbaea6528f349a5225ad90", "max_stars_repo_licenses": ["Unlicense"], ...
// Copyright 2011 Daniel James. // 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) #include "./config.hpp" #ifdef BOOST_HASH_TEST_STD_INCLUDES # include <functional> #else # include <boost/container_hash...
{"hexsha": "8b15ec32cc71bf872dbb7f022781f75fdb0f2b3e", "size": 1658, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "REDSI_1160929_1161573/boost_1_67_0/libs/container_hash/test/hash_type_index_test.cpp", "max_stars_repo_name": "Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo", "max_stars_repo_head_hexsha": "eb0f7ef64e18...
# CUDA_VISIBLE_DEVICES='0' python age.py import argparse import struct import time import sys import os import numpy as np print 'numpy ' + np.__version__ np.set_printoptions(threshold='nan') np.set_printoptions(linewidth=250) np.set_printoptions(formatter={'float': '{:12.8f}'.format, 'int': '{:4d}'.format}) import ten...
{"hexsha": "ed8caa12fdab5871b68f5f7d46db8975633b69a9", "size": 6060, "ext": "py", "lang": "Python", "max_stars_repo_path": "mnist/age.py", "max_stars_repo_name": "mattliston/examples", "max_stars_repo_head_hexsha": "222172ce8fab247adada2fe1ca14a2ed33f3b5b3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
# MIT License # # Copyright (c) 2016 AppleFairy # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, p...
{"hexsha": "890884485357c54ff4311df38648ea017f9a6f4a", "size": 5872, "ext": "py", "lang": "Python", "max_stars_repo_path": "framework_study/kaggle/DigitRecognizer/mnist_cnn.py", "max_stars_repo_name": "zqyjixiang/machinelearning", "max_stars_repo_head_hexsha": "3f1c18861c2fd888cf03cddd923c240a0816f161", "max_stars_repo...
using Blue using Test
{"hexsha": "8d95517773d89f6ab6299dfbce9ff300468f301f", "size": 23, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "vchuravy/Blue.jl", "max_stars_repo_head_hexsha": "beed121629f6448c271e2aac097c69b55dc921d0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "max_...
from . import extraction as ex from sqlalchemy.engine import Engine, ResultProxy from sqlalchemy.schema import MetaData, Table, Column, ForeignKeyConstraint, UniqueConstraint, PrimaryKeyConstraint from sqlalchemy.sql.expression import select, and_, func, alias, text, tablesample from sqlalchemy.types import _Binary, CL...
{"hexsha": "ac33ecccbfc9e60fe6dbe80ac2d11c30a2cf20d4", "size": 39977, "ext": "py", "lang": "Python", "max_stars_repo_path": "eddytools/schema.py", "max_stars_repo_name": "fyndalf/eddytools", "max_stars_repo_head_hexsha": "004dc484d303723307b39cd7f7569ddfd762c800", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
""" Purpose: This file is used for testing the cycle gan model made in task 1. Usage: python test.py <model_type> <file_name> model_type: could either be 1 or 2 1 - specficies the model to convert a cat/dog to human. 2 - specifices the model to c...
{"hexsha": "b4d055536ee98ebb1e9a721fee684d66051b9cb1", "size": 1690, "ext": "py", "lang": "Python", "max_stars_repo_path": "task-1/test.py", "max_stars_repo_name": "runnily/keras-examples", "max_stars_repo_head_hexsha": "b5637bd15a73e3766d76c7cf4dd77aab9ac75191", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
#!/usr/bin/python import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression def get_X(df, users, m): X_data = df.loc[ (df.userId.isin(users)) & (df.movieId > 1) & (df.movieId <= m), ["userId", "movieId", "rating"], ].to_numpy() ...
{"hexsha": "32ccc9852deda9bb4df0fef74e616ff9acd56258", "size": 1944, "ext": "py", "lang": "Python", "max_stars_repo_path": "list5/task1.py", "max_stars_repo_name": "luk9400/python-kurs", "max_stars_repo_head_hexsha": "8978176be1c28d886707f1150a8843720bd83929", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
using NPZ using CodecZlib using Random """ Represents an `Iterable` dataset with the following fields: # Fields - `dataset::Dict{Symbol, Any}`: representation of the dataset as a Dictionary with style as `style`. - `epochs::Vector{Int}`: list of epochs loaded. - `repo::String`: the repository from which the dataset i...
{"hexsha": "53e65c4364e4a551451fbdb24fa8c2d081afcb18", "size": 6326, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ReinforcementLearningDatasets/src/atari/atari_dataset.jl", "max_stars_repo_name": "corail-research/ReinforcementLearning.jl", "max_stars_repo_head_hexsha": "e2c46731fc9f7813fd932db9871772836639...
from data.classification_datasets import * from models.networks import * import random import scipy.linalg as linalg import sys import numpy as np image_size = 512 batch_size = 40 transform = transforms.Compose( [transforms.ToPILImage(), transforms.Resize([image_size, image_size]), transforms.ToTensor()...
{"hexsha": "2f025f13b439d6f3f2d89dbabeee1a9221dec850", "size": 2953, "ext": "py", "lang": "Python", "max_stars_repo_path": "pix2pix/pytorch-CycleGAN-and-pix2pix/inception_score.py", "max_stars_repo_name": "lodykas/SatelliteImageGeneration", "max_stars_repo_head_hexsha": "4724a386ba9bf8787529fc100e1cc47d4a76139b", "max_...
from datetime import datetime import logging import os from urllib.request import urlopen from PIL import Image import tensorflow as tf import numpy as np import math import pandas as pd import gc from tensorflow.keras.models import load_model from .azure_blob import DirectoryClient MAIN_DIR...
{"hexsha": "beb16a7628a6030bd7ee1b004817b10af29ba229", "size": 5442, "ext": "py", "lang": "Python", "max_stars_repo_path": "classify/retile.py", "max_stars_repo_name": "nmeister/web-mangrove-ml", "max_stars_repo_head_hexsha": "9f5f67dbbd682d88701ade38517b51208e501a27", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# coding=utf-8 import numpy as np import scipy.sparse as sparse from hyperg.hyperg import HyperG from hyperg.utils import print_log, init_label_matrix def cross_diffusion_infer(hg_list, y, iter, log=True): """ cross diffusion from the "Cross Diffusion on Multi-hypergraph for Multi-modal 3D Object Recognition...
{"hexsha": "ad3ce92cbe343400a7fde9dd2e4b38290e09a678", "size": 1611, "ext": "py", "lang": "Python", "max_stars_repo_path": "hyperg/learning/classification/diffusion.py", "max_stars_repo_name": "iMoonLab/THU-HyperG", "max_stars_repo_head_hexsha": "3b826c692c567672fa87dce1fa8dcfea555737e5", "max_stars_repo_licenses": ["M...
[STATEMENT] lemma cauchyI: "(\<And>r. 0 < r \<Longrightarrow> \<exists>k. \<forall>m\<ge>k. \<forall>n\<ge>k. \<bar>X m - X n\<bar> < r) \<Longrightarrow> cauchy X" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>r. 0 < r \<Longrightarrow> \<exists>k. \<forall>m\<ge>k. \<forall>n\<ge>k. \<bar>X m - X n\<bar> <...
{"llama_tokens": 297, "file": null, "length": 2}
# reads from meta-object / metadata-xml and generates json file for the # use of codex processor import os import glob import warnings import xmltodict from aicspylibczi import CziFile import numpy as np import json import yaml import lxml from lxml import etree from typing import Union import shutil from datetime imp...
{"hexsha": "3fc125fa43c0b2cc8727a2e21c3d9a6e3d050951", "size": 16431, "ext": "py", "lang": "Python", "max_stars_repo_path": "czi2codex/generate_metadata_json.py", "max_stars_repo_name": "erikadudki/czi2codex", "max_stars_repo_head_hexsha": "ee0752c7f95b4dff4ea51d0b125a33dfe2175ed4", "max_stars_repo_licenses": ["Apache-...
# Lint as: python3 # Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
{"hexsha": "2f3a5e26029b7a1caebdb93510e7389c090c4ff8", "size": 6211, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf_quant_finance/models/hjm/calibration_test.py", "max_stars_repo_name": "withshubh/tf-quant-finance", "max_stars_repo_head_hexsha": "53cff5edb6c090356f4890233f4f1768c60c23bf", "max_stars_repo_lic...
import pymongo import pandas as pd import numpy as np from sklearn.metrics import pairwise_distances def createCategorical(df): #create a column for each day_of_week categories = ["Apparels","Automobile","Beauty and Personal Care","Education","Electronics","Entertainment","Fitness & Gym","Food","Health","Kids"...
{"hexsha": "34589a61ba049b2d7f8aadd1ed7fe6c3cfd5a02c", "size": 2730, "ext": "py", "lang": "Python", "max_stars_repo_path": "Backend/recommendation_script/recommendations.py", "max_stars_repo_name": "Serkantouch/InfluenceMarketingApp", "max_stars_repo_head_hexsha": "7059fa6502aaea935412c143a4bb9c6cc4a5b39b", "max_stars_...
""" Copyright MIT and Harvey Mudd College MIT License Summer 2020 Lab GRAND PRIX """ ######################################################################################## # Imports ######################################################################################## import sys import cv2 as cv import numpy as n...
{"hexsha": "491b0481196a3b835c1be2128f62507d5320752d", "size": 5943, "ext": "py", "lang": "Python", "max_stars_repo_path": "grandprix.py", "max_stars_repo_name": "apanas9246/GRANDPRIX", "max_stars_repo_head_hexsha": "36ea938607f9ea0b413d08f2fb2949f023c598a0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
function get_size(obj::BoundarySizeVisitor) return jcall(obj, "getSize", jdouble, ()) end function visit_internal_node(obj::BoundarySizeVisitor, arg0::BSPTree) return jcall(obj, "visitInternalNode", void, (BSPTree,), arg0) end function visit_leaf_node(obj::BoundarySizeVisitor, arg0::BSPTree) return jcall(...
{"hexsha": "98b7b8ff248ef6938ecf6f7f69748536f15b103a", "size": 514, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "gen/HipparchusWrapper/GeometryWrapper/PartitioningWrapper/boundary_size_visitor.jl", "max_stars_repo_name": "JuliaAstrodynamics/Orekit.jl", "max_stars_repo_head_hexsha": "e2dd3d8b2085dcbb1d2c75471da...
/* matrix/gsl_matrix_uint.h * * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of t...
{"hexsha": "d6de1b3644fc5b136826c61372c883823bde02a0", "size": 13949, "ext": "h", "lang": "C", "max_stars_repo_path": "vendor/gsl/gsl/gsl_matrix_uint.h", "max_stars_repo_name": "mgreter/astrometrylib", "max_stars_repo_head_hexsha": "ef4d4539a537ab49329b77648aac893d2b4ad318", "max_stars_repo_licenses": ["BSD-3-Clause"],...
import numpy as np import pandas as pd import pytest from sklearn import cluster, datasets, decomposition from sklearn import preprocessing as prep from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.pipeline import make_pipeline from sklearn.utils.validation import check_is_fitted from cluster_op...
{"hexsha": "2608718540eff10111fd43a054a660fbd33205a5", "size": 4838, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests.py", "max_stars_repo_name": "ndgigliotti/cluster-optimizer", "max_stars_repo_head_hexsha": "40505493ba2e9a2352c5c759d1b2d61c1bc72fe7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
Set Warnings "-notation-overridden". Require Import Category.Lib. Require Export Category.Theory.Isomorphism. Require Export Category.Theory.Natural.Transformation. Require Export Category.Theory.Adjunction. Require Import Category.Functor.Opposite. Generalizable All Variables. Set Primitive Projections. Set Universe...
{"author": "agumonkey", "repo": "cats", "sha": "9f12c5090c2a75fe14eb72c1a806723e38dbb03c", "save_path": "github-repos/coq/agumonkey-cats", "path": "github-repos/coq/agumonkey-cats/cats-9f12c5090c2a75fe14eb72c1a806723e38dbb03c/coq/category-theory/Adjunction/Opposite.v"}
SUBROUTINE SHADER (XCS,YCS,NCS,IAI,IAG,NAI) C C This version of SHADER shades the polygon whose edge is defined by C the points ((XCS(I),YCS(I)),I=1,NCS) if and only, relative to edge C group 3, its area identifier is a 1. The package SOFTFILL is used C to do the shading. C INTEGER IAI, IAG, NCS, NAI ...
{"hexsha": "dfb69f49548f12d2e921c590402a03f1ba9e830a", "size": 1125, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/shader.f", "max_stars_repo_name": "jhaoli/shallow_spectral", "max_stars_repo_head_hexsha": "a2580f9baad596a56efaaae20b80e1bd543c2502", "max_stars_repo_licenses": ["NetCDF"], "max_stars_count":...
r""" An interface to Anders Buch's Littlewood-Richardson Calculator ``lrcalc`` The "Littlewood-Richardson Calculator" is a C library for fast computation of Littlewood-Richardson (LR) coefficients and products of Schubert polynomials. It handles single LR coefficients, products of and coproducts of Schur functions, sk...
{"hexsha": "b541bfacd89088e7a68d86708fd24e2e1ccb10fc", "size": 16943, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage/libs/lrcalc/lrcalc.py", "max_stars_repo_name": "UCD4IDS/sage", "max_stars_repo_head_hexsha": "43474c96d533fd396fe29fe0782d44dc7f5164f7", "max_stars_repo_licenses": ["BSL-1.0"], "max_star...
struct UNIQUACParam <: EoSParam a::PairParam{Float64} r::SingleParam{Float64} q::SingleParam{Float64} q_p::SingleParam{Float64} Mw::SingleParam{Float64} end abstract type UNIQUACModel <: ActivityModel end struct UNIQUAC{c<:EoSModel} <: UNIQUACModel components::Array{String,1} icomponents::...
{"hexsha": "c864aa09cd0302174412f2c0ca24052e622c6ea3", "size": 1847, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/models/eos/Activity/UNIQUAC/UNIQUAC.jl", "max_stars_repo_name": "lucpaoli/Clapeyron.jl", "max_stars_repo_head_hexsha": "c683650fee1a6ad35fe0f7c2264cac5bbddb3078", "max_stars_repo_licenses": ["M...
import matplotlib.pyplot as plt import numpy as np import torch from torch import nn from torch import tensor from torch import optim import torch.nn.functional as F from torch.autograd import Variable from torchvision import datasets, transforms import torchvision.models as models from collections import OrderedDict i...
{"hexsha": "a4782fb66a6826637fcdcbeddbde3f287656df77", "size": 1698, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict.py", "max_stars_repo_name": "ritwik1233/Image_Classifier", "max_stars_repo_head_hexsha": "1543d02d98290eec03be8071160c39c131681651", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
(* * Copyright 2014, General Dynamics C4 Systems * * SPDX-License-Identifier: GPL-2.0-only *) theory Tcb_R imports CNodeInv_R begin context begin interpretation Arch . (*FIXME: arch_split*) lemma setNextPCs_corres: "corres dc (tcb_at t and invs) (tcb_at' t and invs') (as_user t (setNextPC v)) (asU...
{"author": "NICTA", "repo": "l4v", "sha": "3c3514fe99082f7b6a6fb8445b8dfc592ff7f02b", "save_path": "github-repos/isabelle/NICTA-l4v", "path": "github-repos/isabelle/NICTA-l4v/l4v-3c3514fe99082f7b6a6fb8445b8dfc592ff7f02b/proof/refine/X64/Tcb_R.thy"}
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 import copy import importlib.resources import json import logging import os import platform import random import tempfile import time import cv2 import networkx as nx import numpy as np from ai2thor.build import arch...
{"hexsha": "9f4475d087d66fd2979ed54ead7b398e70d21d8e", "size": 141488, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/teach/simulators/simulator_THOR.py", "max_stars_repo_name": "alexa/teach", "max_stars_repo_head_hexsha": "974b3f1013e1cacc4b21d6eb65e84a1d33f82c18", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma map_length_ci: "(map (length \<circ> (\<lambda>(xa, y). ci (layout_of xs @ [length_of x]) xa y)) (tpairs_of xs)) = (map (length \<circ> (\<lambda>(x, y). ci (layout_of xs) x y)) (tpairs_of xs)) " [PROOF STATE] proof (prove) goal (1 subgoal): 1. map (length \<circ> (\<lambda>(xa, y). ci (layout_o...
{"llama_tokens": 441, "file": "Universal_Turing_Machine_Abacus", "length": 4}
import argparse import sys import csv import os import numpy as np import matplotlib.pyplot as plt import tensorflow as tf FLAGS = None BATCH = 8000 Gs = 2 # num of dynamic dims Gin= 2 # num of input signal dims TIMESTEP = 0.25 time_points = 200 def Hill_model(x,b,K,links): # x, current input and state [BATCH,Gin+...
{"hexsha": "6b669fee605431243ac6ad81c5e56b685731f3bf", "size": 5144, "ext": "py", "lang": "Python", "max_stars_repo_path": "fig3-4_controlled_oscillation/fig3d-f_HF_enumeration/4edges/dyn_2020_4_HE_G2_v2.py", "max_stars_repo_name": "sjx93/rnn_for_gene_network_2020", "max_stars_repo_head_hexsha": "d2e16d836f353219236607...
import datetime import json import os import pathlib import tempfile from unittest import mock import numpy as np import pandas as pd import pytest from etna.datasets import TSDataset from etna.loggers import LocalFileLogger from etna.loggers import S3FileLogger from etna.loggers import tslogger from etna.metrics imp...
{"hexsha": "731dc60b1fe6ef31e58319ba4b324b407b1eaadd", "size": 14949, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_loggers/test_file_logger.py", "max_stars_repo_name": "bve81/etna", "max_stars_repo_head_hexsha": "5ef9223ce9c03b4e475ab4277cd2a1d4fde065be", "max_stars_repo_licenses": ["Apache-2.0"], ...
! This test checks lowering of worksharing-loop construct with ordered clause. ! RUN: bbc -fopenmp -emit-fir %s -o - | FileCheck %s ! This checks lowering ordered clause specified without parameter subroutine wsloop_ordered_no_para() integer :: a(10), i ! CHECK: omp.wsloop ordered(0) for (%{{.*}}) : i32 = (%{{.*}...
{"hexsha": "7548d7a597228a29ab2a2cdd719ab6a8debde72e", "size": 995, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "flang/test/Lower/OpenMP/omp-wsloop-ordered.f90", "max_stars_repo_name": "ornata/llvm-project", "max_stars_repo_head_hexsha": "494913b8b4e4bce0b3525e5569d8e486e82b9a52", "max_stars_repo_licenses":...
# -*- coding: utf-8 -*- """ Created on Fri Jan 28 10:45:22 2022 @author: eric1 """ import numpy as np from build_directories import check_if_exists from build_directories import create_dir from build_directories import transfer_data_from_hpf5 # CAMGIAN_DATASET_ROOT data_path='C:/Users/eric1/testing_dataset_...
{"hexsha": "93076abd9a23f1379330aa9a15898f58561b9406", "size": 577, "ext": "py", "lang": "Python", "max_stars_repo_path": "convert_dataset.py", "max_stars_repo_name": "EricCurl/second.pytorch", "max_stars_repo_head_hexsha": "975122651bd0ab607a617316b36fe9e409c8d0a1", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
"""Defines the unit tests for the :mod:`colour.io.luts.operator` module.""" import numpy as np import textwrap import unittest from colour.io.luts import AbstractLUTSequenceOperator, LUTOperatorMatrix from colour.utilities import tstack, zeros __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour D...
{"hexsha": "0a1dc54771cf4c736728ca770a37e0c9c6a0a5b1", "size": 7647, "ext": "py", "lang": "Python", "max_stars_repo_path": "colour/io/luts/tests/test_operator.py", "max_stars_repo_name": "aurelienpierre/colour", "max_stars_repo_head_hexsha": "3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47", "max_stars_repo_licenses": ["BSD-3...
from opentopodata import backend import rasterio import pytest import numpy as np from unittest.mock import patch from opentopodata import config ETOPO1_GEOTIFF_PATH = "tests/data/datasets/test-etopo1-resampled-1deg/ETOPO1_Ice_g_geotiff.resampled-1deg.tif" ETOPO1_DATASET_NAME = "test-dataset" ETOPO1_RESAMPLED_DATASE...
{"hexsha": "b6e39d12c81ba039feccf7baa58db6c37466c1b4", "size": 11947, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_backend.py", "max_stars_repo_name": "ajnisbet/opentopodata.org", "max_stars_repo_head_hexsha": "99d1d16816d33932524b7a28bb080ea35e3d99d4", "max_stars_repo_licenses": ["MIT"], "max_star...
# type: ignore __all__ = [ "plotyy", "figtoolset", "getscribecontextmenu", "getobj", "scribeeventhandler", "setscribecontextmenu", "putdowntext", "gtext", "scribetextdlg", "doresize", "prepdrag", "scriberestoresavefcns", "zoom", "scribeclearmode", "domymenu",...
{"hexsha": "3fce57d4964a0ce253965c723aa6fb69e1b90bf3", "size": 4069, "ext": "py", "lang": "Python", "max_stars_repo_path": "mat2py/core/graph2d.py", "max_stars_repo_name": "mat2py/mat2py", "max_stars_repo_head_hexsha": "2776fbe9ca4ad2aaa3eac6aa79d17747a9ec24a8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
# -*- coding: utf-8 -*- """ Created on Sat May 19 22:13:46 2018 @author: Shreyans """ import pandas as pd import numpy as np import glob extension = 'csv' result = [i for i in glob.glob('*.{}'.format(extension))] data= [] for item in result: df = pd.read_csv(item) df.drop('Image_name', inplace = True, axis...
{"hexsha": "8ed5334f87b68b80ead52d88f7a3db6c60fa899c", "size": 920, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/wt_average_vote.py", "max_stars_repo_name": "jasoriya/HackerEarth-DL-3-Challenge", "max_stars_repo_head_hexsha": "b1bd5b3955913327408541ef4b14c260b9014593", "max_stars_repo_licenses": ["MIT"], ...
# Standard library import os # Third-party import numpy as np import matplotlib.pyplot as plt from astropy.visualization import make_lupton_rgb from astropy import units as u from astropy.io import fits # Project import artpop from artpop.util import embed_slices # load matplotlib style plt.style.use(artpop.jpg_styl...
{"hexsha": "fbbfc249ef003f2147c8d84a54f8ab64bb036af6", "size": 5683, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/figure_8_greco_and_danieli.py", "max_stars_repo_name": "ArtificialStellarPopulations/artpop-paper-figures", "max_stars_repo_head_hexsha": "7391dcb97b18400cd51763c3fc3659e21dc872e9", "max_s...
""" Tests for the itol plotting utilities in `cassiopeia.plotting.itol_utilities`. Currently, this testing module does not test the actual uploading / exporting of trees due to difficulties in mock authenticating on the iTOL side. """ import os import unittest import shutil import tempfile import networkx as nx impo...
{"hexsha": "0bba36dacf786dc74a2ba8da90e2b6c6add817a6", "size": 10591, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/plotting_tests/itol_plotting_test.py", "max_stars_repo_name": "YosefLab/Cassiopeia", "max_stars_repo_head_hexsha": "3002617a00e1281ef073a6f17b6dd55c3337bdad", "max_stars_repo_licenses": ["MI...
#include <boost/fusion/adapted/std_array/std_array_iterator.hpp>
{"hexsha": "7de58e7bd805691d4133f01321f451b5722bd3ab", "size": 65, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_fusion_adapted_std_array_std_array_iterator.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_rep...
#include "Value.h" #include "ConfigBase.h" #include <boost/algorithm/string.hpp> #include <boost/current_function.hpp> #include <boost/lambda/lambda.hpp> #include <boost/spirit/include/qi.hpp> #include <macgyver/Exception.h> #include <macgyver/StringConversion.h> #include <macgyver/TimeParser.h> #include <macgyver/Type...
{"hexsha": "cae10a969f4b709388fa531625e783c0ef0dd1f9", "size": 25802, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "spine/Value.cpp", "max_stars_repo_name": "fmidev/smartmet-library-spine", "max_stars_repo_head_hexsha": "f770171149fdaa78c5b7c7ba463218a9fd63bd68", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
\subsubsection{Simulation} \paragraph{Algorithm 1: Force Calculation Between Two Bodies} This equation can be used to calculate the gravitational force exerted by two masses on x and y components without the need to use the trigonometric functions. $$\begin{bmatrix} F_x \\ F_y \end{bmatrix} = \frac{GmM}{r^3} \begin{bm...
{"hexsha": "0546b89366e26cc4c096d44809f504577ffba829", "size": 12866, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/tex/sections/design/algorithms.tex", "max_stars_repo_name": "btheobald/compa2", "max_stars_repo_head_hexsha": "aa9d5b966fb4c6a4e836e481d9df1bd297de3140", "max_stars_repo_licenses": ["MIT"], "ma...
import numpy as np import logging, sys from math import ceil, floor, log2 from scipy.interpolate import interp1d import scipy.sparse.linalg import scipy.sparse from msemu.fixed import Fixed, WidthFormat class PwlTable: def __init__(self, pwls, high_bits_fmt, low_bits_fmt, addr_offset_int, offset_point_fmt, slope...
{"hexsha": "6a9bd2aa47e8ea5355bf513d209ca2195666c71e", "size": 8995, "ext": "py", "lang": "Python", "max_stars_repo_path": "msemu/pwl.py", "max_stars_repo_name": "sgherbst/msemu", "max_stars_repo_head_hexsha": "a99f1380c707d34ddc4554b09db50c6d24605838", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_sta...
[STATEMENT] lemma len_faces_sum: "|faces g| = |finals g| + |nonFinals g|" [PROOF STATE] proof (prove) goal (1 subgoal): 1. |faces g| = |finals g| + |nonFinals g| [PROOF STEP] by(simp add:finals_def nonFinals_def sum_length_filter_compl)
{"llama_tokens": 104, "file": "Flyspeck-Tame_GraphProps", "length": 1}
[STATEMENT] lemma (in pre_digraph) sccs_altdef2: "sccs = {H. max_subgraph strongly_connected H}" (is "?L = ?R") [PROOF STATE] proof (prove) goal (1 subgoal): 1. sccs = {H. max_subgraph strongly_connected H} [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. sccs = {H. max_subgraph strongly_connec...
{"llama_tokens": 4075, "file": "Graph_Theory_Digraph_Component", "length": 52}
#define BOOST_TEST_MODULE application #include <boost/test/unit_test.hpp> #include <bunsan/application.hpp> #include <boost/optional/optional_io.hpp> namespace b = bunsan; namespace ba = bunsan::application; BOOST_AUTO_TEST_SUITE(application) BOOST_AUTO_TEST_SUITE(application) struct reg_mock { static const boo...
{"hexsha": "4f13bd97cfe74595b2347c73727a2e5aff9f3768", "size": 2981, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "bunsan/common/tests/application.cpp", "max_stars_repo_name": "bacsorg/bacs", "max_stars_repo_head_hexsha": "2b52feb9efc805655cdf7829cf77ee028d567969", "max_stars_repo_licenses": ["Apache-2.0"], "max...
i=3 j=0 do i=i,5 j = j+i end do do i=3,i j = j+i end do if (i.ne.7) call abort() print *, i,j end
{"hexsha": "6b0c2f3b3a980ebf394f29dd672e59404aefbc26", "size": 179, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "tools-src/gnu/gcc/gcc/testsuite/g77.f-torture/execute/971102-1.f", "max_stars_repo_name": "enfoTek/tomato.linksys.e2000.nvram-mod", "max_stars_repo_head_hexsha": "2ce3a5217def49d6df7348522e2bfda702...
[STATEMENT] lemma proj1_pmf: assumes "p>0" "p<1" shows "Proj1_pmf (Sum_pmf p Da Db) = Da" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Proj1_pmf (Sum_pmf p Da Db) = Da [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. Proj1_pmf (Sum_pmf p Da Db) = Da [PROOF STEP] have kl: "\<And>e. pmf (map_p...
{"llama_tokens": 4712, "file": "List_Update_Prob_Theory", "length": 33}
# -*- coding: utf-8 -*- import numpy as np import tensorflow as tf from tensorflow.python.ops import array_ops import pdb # ----------------------------------------------------- # Bounding box computation # ----------------------------------------------------- def bbox_resize(bbox_ref,bbox,name=None): """Resi...
{"hexsha": "75ca74c699688996aa959458c035c22b2a7b254a", "size": 3630, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "RyanWangZf/ILSVRC2015_VID_operation", "max_stars_repo_head_hexsha": "370c800434205f4a17443df69952b8db127ff931", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 22 04:03:50 2021 @author: kavya """ import scipy.misc from skimage.transform import resize import matplotlib from keras.models import load_model import matplotlib.pyplot as plt import numpy as np import gradio as gr from sklearn import preproce...
{"hexsha": "f56c8d734a533de7dbc90922e4d9f6954fa85ed1", "size": 1414, "ext": "py", "lang": "Python", "max_stars_repo_path": "NN/Testing.py", "max_stars_repo_name": "anandvgeorge/PDP-Plexus", "max_stars_repo_head_hexsha": "f4d19cc39e96947e43c1a6daefd36a92baa6d6ad", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
maxdims["dmrg_1d_qns"] = 200:200:1_000 descriptions["dmrg_1d_qns"] = "DMRG, 1D S=1 Heisenberg model\nN = 100, 5 sweeps\nConserve total spin projection symmetry" function runbenchmark(::Val{:dmrg_1d_qns}; maxdim::Int, nsweeps::Int = 5, outputlevel::Int = 0, ...
{"hexsha": "40d4d8861656e12f224be734ccecc2de56a6bdb1", "size": 1293, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/bench_dmrg_1d_qns/runbenchmark.jl", "max_stars_repo_name": "ITensor/ITensorBenchmarks.jl", "max_stars_repo_head_hexsha": "12e3a1f0ff3e587fd026d22d79a00bf36668cb34", "max_stars_repo_licenses": [...
// (C) Copyright David James Pearce 2003. Permission to copy, use, // modify, sell and distribute this software is granted provided this // copyright notice appears in all copies. This software is provided // "as is" without express or implied warranty, and with no claim as // to its suitability for any purpose. // // ...
{"hexsha": "93b4f2f2eb84fb6881e75b284f82a00017688c4f", "size": 13032, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/oto-test/ordered_slist.hpp", "max_stars_repo_name": "DavePearce/DynamicTopologicalSort", "max_stars_repo_head_hexsha": "d0af58e303387327be47d644d795f9914104f669", "max_stars_repo_licenses": ["B...
#!/usr/bin/env python """Example code of DDPG on OpenAI Gym environments. For DDPG, see: https://arxiv.org/abs/1509.02971 """ from __future__ import division import argparse import collections import copy import random import gym import numpy as np import chainer from chainer import functions as F from chainer impor...
{"hexsha": "92c1a67c6ca8d953b501dd866b840eca01bd41ae", "size": 9192, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/reinforcement_learning/ddpg_pendulum.py", "max_stars_repo_name": "yuhonghong66/chainer", "max_stars_repo_head_hexsha": "15d475f54fc39587abd7264808c5e4b33782df9e", "max_stars_repo_licenses...
"""Extract features from the history of play of a game theory match between two players. Potential additionally valuable features: * Context responses * Longest Streaks * Has Cycles * More history """ from collections import defaultdict import numpy as np import axelrod as axl # mapping = {'C': 1, 'D': -1} mappin...
{"hexsha": "887d8af38897597c968657c2093850fc37b574f0", "size": 4784, "ext": "py", "lang": "Python", "max_stars_repo_path": "features.py", "max_stars_repo_name": "Axelrod-Python/NN", "max_stars_repo_head_hexsha": "84c6907d25a0dfd3bf0f8e088d3b66c16b5f8547", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_s...
import numpy as np import json import logging logger = logging.getLogger('root') def batchify(samples, batch_size): """ Batchfy samples with a batch size """ num_samples = len(samples) list_samples_batches = [] # if a sentence is too long, make itself a batch to avoid GPU OOM to_sing...
{"hexsha": "22e11c081a4a13b64cde5c197fc475084a9afe28", "size": 6203, "ext": "py", "lang": "Python", "max_stars_repo_path": "entity/utils.py", "max_stars_repo_name": "XuguangAi/PURE", "max_stars_repo_head_hexsha": "0baf12fc7a123107c1f090aba341c8cccb987083", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 476, "ma...
# simple example of a harmonic power flow execution using HarmonicPowerFlow using StatsPlots harmonics = [h for h in 1:2:101] # settings settings_c = init_settings(true, harmonics) settings_uc= init_settings(false, harmonics) # import nodes and lines from csv files net_agg1 = init_power_grid( import_nodes_from...
{"hexsha": "f867a78019db4c1c30a1e675f9cdb8ed46a6d2fc", "size": 1428, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/load_aggregation/aggregation.jl", "max_stars_repo_name": "pweigmann/HarmonicPowerFlow.jl", "max_stars_repo_head_hexsha": "7e1bc2b8acfb6cae2799d070534962d0c2f1436f", "max_stars_repo_license...
/**\file TransformTree.hpp * * This class provided stores and manages the transformation tree * * @author Javier Hidalgo Carrio et. al (see THANKS for the full Author list) * See LICENSE for the license information * */ #ifndef __ENVIRE_CORE_TRANSFORM_TREE__ #define __ENVIRE_CORE_TRANSFORM_TREE__ #include <b...
{"hexsha": "a2501bd0956fc6821db689d7413d5f91568bad41", "size": 5952, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/TransformTree.hpp", "max_stars_repo_name": "jhidalgocarrio/slam-envire_core", "max_stars_repo_head_hexsha": "4a1bc6b458989e39e4f16cab80777fdbb76cbff3", "max_stars_repo_licenses": ["BSD-2-Clause"...
# --- # jupyter: # jupytext: # formats: ipynb,jl:light # text_representation: # extension: .jl # format_name: light # format_version: '1.5' # jupytext_version: 1.11.3 # kernelspec: # display_name: Julia 1.6.0 # language: julia # name: julia-1.6 # --- # + [markdown] slide...
{"hexsha": "4c1e9c14863a08c9baaa30c3ece8f1f6ebe4772c", "size": 6469, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Workshop_Intro_Slides.jl", "max_stars_repo_name": "gaelforget/MarineEcosystemsJuliaCon2021.jl", "max_stars_repo_head_hexsha": "e2498a278b0e388f426dac861f5d3d2c2b9197cc", "max_stars_repo_license...
[STATEMENT] lemma suffix_appendI: "suffix xs ys \<Longrightarrow> suffix xs (zs @ ys)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. suffix xs ys \<Longrightarrow> suffix xs (zs @ ys) [PROOF STEP] by (auto simp add: suffix_def)
{"llama_tokens": 87, "file": null, "length": 1}
# Graph data readers and parsers for electron ID # # Mikael Mieskolainen, 2020 # m.mieskolainen@imperial.ac.uk import numpy as np import numba from tqdm import tqdm import torch from torch_geometric.data import Data import uproot_methods import icenet.algo.analytic as analytic def parse_graph_data(X, VARS, feature...
{"hexsha": "6653e9d91ad9388195e784cce22e9e2095b54e89", "size": 7332, "ext": "py", "lang": "Python", "max_stars_repo_path": "iceid/graphio.py", "max_stars_repo_name": "bainbrid/icenet", "max_stars_repo_head_hexsha": "0b261dc97451fd7f896ed27f2b90dd2668e635ca", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
#%% from matplotlib import scale import matplotlib.pyplot as plt import numpy as np from scipy import signal import pathlib import pandas as pd from pros_noisefiltering.Graph_data_container import Graph_data_container # FS=500_000 #Sampling frequency in Hz # Define function for Filter freq response #Define a func...
{"hexsha": "c04faddd5e8a050be2e6647cfb864866a51d533e", "size": 12639, "ext": "py", "lang": "Python", "max_stars_repo_path": "pypkg/pros_noisefiltering/gen_functions.py", "max_stars_repo_name": "goodvibrations32/diss.tn.filtering-wind.py", "max_stars_repo_head_hexsha": "7e5f2456554c6c73f619d5e09d3d355388662d1a", "max_st...
#!/usr/bin/env python # coding: utf-8 # # Refinery Production and Shadow Pricing # # This is a work in progress. This is a simple linear programming problem in six variables, but with four equality constraints it allows for a graphical explanation of some unusually large shadow prices for manufacturing capacity. Th...
{"hexsha": "c36656cbb13970b77acec782d83101917ead8c5d", "size": 6113, "ext": "py", "lang": "Python", "max_stars_repo_path": "_build/jupyter_execute/notebooks/05/refinery-production.py", "max_stars_repo_name": "jckantor/MO-book", "max_stars_repo_head_hexsha": "f6ead8dc06327ec5cbb7065ead8a6df0631c05fd", "max_stars_repo_li...
from typing import Callable import holoviews as hv import numpy as np import torch import umap from holoviews import opts, streams from panel.layout import Panel from torch import Tensor from torch.utils.data import DataLoader from torchvision.datasets import VisionDataset hv.extension("bokeh") def explore_latent_s...
{"hexsha": "7ec400c4bd03d4a40b0bd16bd3538644ba29b400", "size": 4959, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/visualization/latent_space.py", "max_stars_repo_name": "vitalab/deep-learning-tutorials", "max_stars_repo_head_hexsha": "c81fa1b5fc7350d3f2ff65c5a66bf66d94228b10", "max_stars_repo_licenses": [...
import autograd.numpy as np import tensorflow as tf import torch from numpy import linalg as la from numpy import random as rnd import pymanopt from examples._tools import ExampleRunner from pymanopt.manifolds import PSDFixedRank from pymanopt.solvers import TrustRegions SUPPORTED_BACKENDS = ("Autograd", "Callable",...
{"hexsha": "c1fce5796c28ca9136dea1e831dd68b25a314665", "size": 2525, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/low_rank_psd_matrix_approximation.py", "max_stars_repo_name": "captain-pool/pymanopt", "max_stars_repo_head_hexsha": "df94ab9e03b5fa3041668defe995d93b8715a6d7", "max_stars_repo_licenses":...
from colloidoscope import DeepColloid import matplotlib.pyplot as plt import numpy as np import random from tifffile import imsave from scipy import ndimage from skimage import io import trackpy as tp from numba import njit import math from concurrent.futures import ProcessPoolExecutor from tqdm import tqdm from torchv...
{"hexsha": "0b42986df59d45254abcebe5033d04c479166135", "size": 4145, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/Archive/cnr copy.py", "max_stars_repo_name": "wahabk/colloidoscope", "max_stars_repo_head_hexsha": "508918703405e07c336c0ad97cf6b3e87db311bb", "max_stars_repo_licenses": ["MIT"], "max_star...
/* * Copyright 2014 Facebook, 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...
{"hexsha": "0f5131296540c376722a4d2ea86d9f00e80b2ed3", "size": 55448, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "thrift/lib/cpp/server/example/TNonblockingServer.cpp", "max_stars_repo_name": "project-zerus/fbthrift", "max_stars_repo_head_hexsha": "fc092e2b645def21482c1772250a97a7cd003cee", "max_stars_repo_lic...
import csv import numpy as np from collections import Counter def readsvals(whichset): with open(whichset+'SpecialVals.txt') as csv_file: csv_reader = csv.reader(csv_file, delimiter=',') deltaf = next(csv_reader)[1] return deltaf dirs = ['Aug1Data','Aug2Data','JulyData'] tests = np.array([]) ...
{"hexsha": "20cd457f0c84c43bd3c3892f4ebf7984a66417b5", "size": 1190, "ext": "py", "lang": "Python", "max_stars_repo_path": "ReadErrors.py", "max_stars_repo_name": "CRZaug/NonlinearWaves", "max_stars_repo_head_hexsha": "2adfc2cc5e0c18576c6b73420a913ef1ce23000d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import argparse import os import scipy.misc import numpy as np import math from utils import process_config from model import Singleout_net from dataprovider import data_provider import cv2 import tensorflow as tf cfg= process_config('exp6//config.cfg') gene = data_provider(cfg) Color_list=[(220,20,60),(255,0,255),(13...
{"hexsha": "845d1659e341530da7daba1f144d23ffd6bdb82d", "size": 3741, "ext": "py", "lang": "Python", "max_stars_repo_path": "parser_worm_image.py", "max_stars_repo_name": "stevexiaofei/multi-worm-parser", "max_stars_repo_head_hexsha": "88c5567145dee76734d3455cdbc843bafd82bce0", "max_stars_repo_licenses": ["MIT"], "max_s...
import os import logging from torch.utils.data import Dataset, dataloader import numpy as np import yaml from im2mesh.data.transforms import gen_randrot, apply_transformation, apply_rot, totensor_inplace, NoisePairBatchIP from fmr_transforms import OnUnitCube import torch logger = logging.getLogger(__name__) # Fiel...
{"hexsha": "b801175cced5cc20c9ed553882baf4f80e60a368", "size": 12133, "ext": "py", "lang": "Python", "max_stars_repo_path": "im2mesh/data/core.py", "max_stars_repo_name": "minghanz/occupancy_networks", "max_stars_repo_head_hexsha": "b733bb28bbfe2bfc485094fdefeefc847b64eabf", "max_stars_repo_licenses": ["MIT"], "max_sta...
/******************************************************************************** * Copyright 2013 The Robotics Group, The Maersk Mc-Kinney Moller Institute, * Faculty of Engineering, University of Southern Denmark * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file exce...
{"hexsha": "5b66d8ec9fdd13cf4840b3c42c10f35135a60baa", "size": 4430, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "RobWorkSim/example/tools/src/SimulateAssembly.cpp", "max_stars_repo_name": "ZLW07/RobWork", "max_stars_repo_head_hexsha": "e713881f809d866b9a0749eeb15f6763e64044b3", "max_stars_repo_licenses": ["Apa...
subroutine read_vert_an(ar,md) character*8 ar,md character*5 fig real xcur(1000),zcur(1000) common/center/fi0,tet0 common/pi/pi,per common/dv_an/nan,anom(40,400,2),val(40,4),yan1(40),yan2(40),nnod(40) common/profile/xa0(40),ya0(40),xb0(40),yb0(40) common/keys/key_ft1_xy2 iscale=0 open(2,file='../../...
{"hexsha": "9e5f4c25200996863d9f737cb9facabfb0122f0c", "size": 3257, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "PROGRAMS/subr/synth/read_vert_an.f90", "max_stars_repo_name": "ilyasnsk/colima_lotos_2019", "max_stars_repo_head_hexsha": "d3ff4f32034e49a32560f170e980b6847b6ea9c7", "max_stars_repo_licenses": [...
# AUTOGENERATED! DO NOT EDIT! File to edit: 01_fb_scraper.ipynb (unless otherwise specified). __all__ = ['filter_post', 'extract_comments', 'FbScraper'] # Cell import pandas as pd import numpy as np import os import json import progressbar from pprint import pprint from random import randint from time import sleep fr...
{"hexsha": "4cce3a3fcd9736b858b665084848d708fe44b20f", "size": 4735, "ext": "py", "lang": "Python", "max_stars_repo_path": "scrapinghub/fb_scraper.py", "max_stars_repo_name": "MJPansa/ScrapingHub", "max_stars_repo_head_hexsha": "fd0248b924d09b6f3b4d47549cf6a049664a3d9e", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
#!/usr/bin/env python ## ## This is file `extractsagecode.py', ## generated with the docstrip utility. ## ## The original source files were: ## ## scripts.dtx (with options: `extractscript') ## ## This is a generated file. It is part of the SageTeX package. ## ## Copyright (C) 2008--2015 by Dan Drake <dr.dan.drake@g...
{"hexsha": "b291e6161f8c78c45f4031980b0bb83bb128d791", "size": 2470, "ext": "py", "lang": "Python", "max_stars_repo_path": "TeX/texmf/tex/latex/sagetex/extractsagecode.py", "max_stars_repo_name": "caleblogemann/MyProjects", "max_stars_repo_head_hexsha": "5c2ed8b31f26843c29f331460e5be6d10a3daef0", "max_stars_repo_licens...
#include <cstdlib> #include <vector> #include <string> #include <iostream> #include <boost/log/core.hpp> #include <boost/log/trivial.hpp> #include <boost/log/expressions.hpp> #include <boost/program_options.hpp> #include <boost/filesystem.hpp> #include "optimizer.h" const char* const description = R"( Burstcoin op...
{"hexsha": "c15783b7c5403eadf15d25865c7553cd0d3d4806", "size": 3813, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "optimizer/optimizer-main.cpp", "max_stars_repo_name": "Kristian-Popov/Burstcoin-OpenCL-plotter", "max_stars_repo_head_hexsha": "eb48f4d3dc41dc393321dadd30a1b58141924f4b", "max_stars_repo_licenses": ...
!======================================================================! REAL FUNCTION Dist(xA,yA,zA,xB,yB,zB) !----------------------------------------------------------------------! ! Calculates distance between two points. ! !------------------------------------------------------------...
{"hexsha": "b7d5485b0a5574202de74f10e141be6094ade0d6", "size": 806, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Library/Dist.f90", "max_stars_repo_name": "palkinev/T-FlowS-old-compressible", "max_stars_repo_head_hexsha": "7aa7219aa5526ac270b39d52ba8c12847e1d71a2", "max_stars_repo_licenses": ["MIT"], "max_s...