text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
from os import path, makedirs from shutil import rmtree from datetime import datetime, timedelta import platform import pandas as pd import numpy as np import requests from tinydb import TinyDB, Query import pytest import publicAPI.forecast_utils as forecast_utils import publicAPI.exceptions as exceptions import help...
{"hexsha": "e3cb3ebec22097cceb6548c63c20131d8ff6f362", "size": 8906, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_forecast_utils.py", "max_stars_repo_name": "EVEprosper/ProsperAPI", "max_stars_repo_head_hexsha": "2d25b9210d32ca777204b1dddb56848d7075dd85", "max_stars_repo_licenses": ["MIT"], "max_st...
\documentclass[a4paper,11pt]{jctvcdoc} \usepackage{geometry}[2010/02/12] \usepackage{hyperref} \hypersetup{colorlinks=true} \usepackage{color,soul} \usepackage[position=bottom]{subfig} \captionsetup[subfloat]{position=top} \usepackage{multirow} \usepackage{dcolumn} \newcolumntype{.}{D{.}{.}{-1}} \usepackage{colortbl...
{"hexsha": "7c6b8917b113786bfb9016620ed4353bc771d7ce", "size": 58874, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/software-manual.tex", "max_stars_repo_name": "pargles/HM-12.0", "max_stars_repo_head_hexsha": "787b9c0c559d11e939f0d9fcd8f50387ca4ae5fa", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
import xarray as xr import numpy as np import dask.bag as db import dask.array as da from time import time from scipy.interpolate import LinearNDInterpolator from ..core import Instrument, Model from .attenuation import calc_radar_atm_attenuation from .psd import calc_mu_lambda from ..core.instrument import ureg, quan...
{"hexsha": "0a5c69706d7949713bdbb39757af37c8ecba5896", "size": 47710, "ext": "py", "lang": "Python", "max_stars_repo_path": "emc2/simulator/radar_moments.py", "max_stars_repo_name": "columncolab/EMC2", "max_stars_repo_head_hexsha": "19dc8e25ebf477e1ad632d9e2d91692dcd80d3e4", "max_stars_repo_licenses": ["BSD-3-Clause"],...
#!/usr/bin/env python import argparse import gzip import re import sys from collections import Counter from functools import partial from itertools import zip_longest import faiss import networkx as nx import numpy as np from chinese_whispers import chinese_whispers, aggregate_clusters from gensim.models import Keyed...
{"hexsha": "3744a57a84991dd6606cc931be9d593a42805115", "size": 3498, "ext": "py", "lang": "Python", "max_stars_repo_path": "trihosg.py", "max_stars_repo_name": "uhh-lt/triframes", "max_stars_repo_head_hexsha": "1e87ad99d03055f652701ea2f8fea88a1786210d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9, "max_sta...
import cv2 import numpy as np import torch from detectron2.checkpoint import DetectionCheckpointer from detectron2.data import MetadataCatalog from detectron2.data import transforms as T from detectron2.modeling import build_model from detectron2.utils.visualizer import ColorMode, GenericMask, Visualizer, _create_text...
{"hexsha": "ed4e23b45720df872261c073a9e55f41611299cb", "size": 4426, "ext": "py", "lang": "Python", "max_stars_repo_path": "projects/IFC/demo/clip/predictor.py", "max_stars_repo_name": "sukjunhwang/IFC", "max_stars_repo_head_hexsha": "fb2ee4571dba4700eab3b52f10e147225b763e2a", "max_stars_repo_licenses": ["Apache-2.0"],...
from warnings import warn from numpy import asarray from scipy.sparse import isspmatrix_csc, isspmatrix_csr, isspmatrix, \ SparseEfficiencyWarning, csc_matrix import _superlu noScikit = False try: import scikits.umfpack as umfpack except ImportError: import umfpack noScikit = True isUmfpack = ha...
{"hexsha": "73f3633ae2601e8a929e9c04a5a32dee8a647646", "size": 9090, "ext": "py", "lang": "Python", "max_stars_repo_path": "scipy/sparse/linalg/dsolve/linsolve.py", "max_stars_repo_name": "mandli/scipy", "max_stars_repo_head_hexsha": "ce90df2874c39595ef69a586a3e7fdd9cb9b6f48", "max_stars_repo_licenses": ["BSD-3-Clause"...
#!/usr/bin/env python import numpy as np from scipy.spatial.distance import pdist, squareform ### For matlab interface # scipy.io.loadmat and scipy.io.savemat # Create the following array where each row is a point in 2D space: # [[0 1] # [1 0] # [2 0]] x = np.array([[0, 1], [1, 0], [2, 0]]) print x # Compute the...
{"hexsha": "ffeac8ee9e821b822e7f19bd551d0c69e8bc5870", "size": 630, "ext": "py", "lang": "Python", "max_stars_repo_path": "cnn_python_tutorial/numpy/mat_sci.py", "max_stars_repo_name": "DeercoderPractice/python", "max_stars_repo_head_hexsha": "4a32cc8922f47baea390e8167e34f185f67ae0fd", "max_stars_repo_licenses": ["MIT"...
from sympy import * from sympy.solvers.solveset import linsolve p0 = Symbol("p0", real=True) p1 = Symbol("p1", real=True) p2 = Symbol("p2", real=True) p3 = Symbol("p3", real=True) p4 = Symbol("p4", real=True) p5 = Symbol("p5", real=True) m = { 1: sympify("1 - 2 * 9 ** (-n) + (162 / 43) * (11 / 81) ** n + (96 / 4...
{"hexsha": "5d7bcc2f7fe0a8890f77f95c082936e0541a67bd", "size": 1105, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/hermann5_distribution.py", "max_stars_repo_name": "mmsbrggr/polar", "max_stars_repo_head_hexsha": "34348baf6992232e47cee7a4d56b5a96567c50b8", "max_stars_repo_licenses": ["MIT"], "max_stars...
"""@author: Bryan Silverthorn <bcs@cargo-cult.org>""" import os.path import csv import numpy import sklearn import condor import borg import borg.experiments.simulate_runs logger = borg.get_logger(__name__, default_level = "INFO") def simulate_run(run, maker, all_data, train_mask, test_mask, instances, independent, ...
{"hexsha": "535b13a09704e36ecc7e3745c34855aa0d9c81f8", "size": 4571, "ext": "py", "lang": "Python", "max_stars_repo_path": "borg/experiments/simulate_iid.py", "max_stars_repo_name": "borg-project/borg", "max_stars_repo_head_hexsha": "5140cff6c96de365b2eba9f07b7fc606b4b16c1b", "max_stars_repo_licenses": ["MIT"], "max_st...
function [airway_mapped_image, airway_tree_root] = PTKMapAirwayCentrelineToImage(centreline_results, airway_image) % PTKMapAirwayCentrelineToImage. % % % % % Licence % ------- % Part of the TD Pulmonary Toolkit. https://github.com/tomdoel/pulmonarytoolkit % Author: To...
{"author": "tomdoel", "repo": "pulmonarytoolkit", "sha": "09688a006d548fb85795df0338d1ed4f4a010fb9", "save_path": "github-repos/MATLAB/tomdoel-pulmonarytoolkit", "path": "github-repos/MATLAB/tomdoel-pulmonarytoolkit/pulmonarytoolkit-09688a006d548fb85795df0338d1ed4f4a010fb9/Library/Airways/PTKMapAirwayCentrelineToImage....
# -*- coding: utf-8 -*- """ This module contains various tools used within Markov modeling / segmentation. :author: Jean-Baptiste Courbot - www.jb-courbot.fr :date: Feb 23, 2018 """ import numpy as np from numpy import cos def phi_theta(a,b): """ Weighting function to account for orientation in Ising models....
{"hexsha": "89e2c44d37b394df9ebc1024d9266492e0756909", "size": 5115, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/fields_tools.py", "max_stars_repo_name": "courbot/otmf", "max_stars_repo_head_hexsha": "22015bb067c49c6b24645a4c0136bac2a7d40e95", "max_stars_repo_licenses": ["CECILL-B"], "max_stars_count": n...
#include <string> #include <iostream> #include <algorithm> #include <boost/lambda/lambda.hpp> #include <boost/lambda/casts.hpp> #include <ctime> #include <cstdlib> using namespace boost::lambda ; struct MyRandomizer { char operator( )( ) { return static_cast<char>( rand( ) % 256 ) ; } } ; std::string dele...
{"hexsha": "cfb93ad5385ef760ba711c63c6a0ec4d33d5b842", "size": 1710, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "lang/C++/strip-control-codes-and-extended-characters-from-a-string.cpp", "max_stars_repo_name": "ethansaxenian/RosettaDecode", "max_stars_repo_head_hexsha": "8ea1a42a5f792280b50193ad47545d14ee371fb7...
import numpy as np from scipy.sparse import csc_matrix, diags from scipy.sparse.linalg import splu DOUBLE_EPS = 1e-14 SIZING_EPS = 1e-6 MIN_EDGE_LENGTH = 1e-2 MAX_RADIUS = 0.5 def axial_stiffness_matrix(L, A, E): K = np.ones((2, 2)) K[0, 1] = -1.0 K[1, 0] = -1.0 L = max(L, MIN_EDGE_LENGTH) # nasty t...
{"hexsha": "685cfcded88d532ca3d7dd06352223f5c1cafca7", "size": 10880, "ext": "py", "lang": "Python", "max_stars_repo_path": "04/utils/analysis.py", "max_stars_repo_name": "danhaive/4.453x-resources", "max_stars_repo_head_hexsha": "789bcbac426bee12102fb7788f5b54dfa2773752", "max_stars_repo_licenses": ["MIT"], "max_stars...
# -*- coding: utf-8 -*- import random import gym import numpy as np from stable_baselines3.common.env_checker import check_env from plan_opt.demand import Demand from plan_opt.envs.rampup2 import LEGAL_CHANGES def env_health(config, env=None, first_step=False, random_steps=0, verbose=0): if env is None: ...
{"hexsha": "a488215e8a64f7ffd04efa413f1750c6ca019ce8", "size": 2223, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plan_opt/env_health.py", "max_stars_repo_name": "sebas-seck/plan-opt", "max_stars_repo_head_hexsha": "bf95edc2c3609aea7572887097be0f2f75e19216", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# Created by rahman at 14:51 2020-03-05 using PyCharm import os import random import pandas as pd import scipy from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier, AdaBoostClassifier from sklearn.linear_model import LogisticRegression city = 'ny' #'ny' DATAPATH = '../data/' + city + "/" ...
{"hexsha": "872c3164b902b3c7e37aee45754fc82e7de2e325", "size": 5341, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/shared_tools/utils.py", "max_stars_repo_name": "tahleen-rahman/all2friends", "max_stars_repo_head_hexsha": "156ba257677def409661e8b68ccdfb1e896ba721", "max_stars_repo_licenses": ["Apache-2.0"]...
import numpy as np # try to import numba # or define dummy decorator try: from numba import autojit except: def autojit(func): return func # util functions for network simulation def smooth_trace(trace, scale): scale = int(scale) if scale == 1 or scale == 0: return trace slen = int(...
{"hexsha": "f773d57aa74b4992ccc7a738ae5e36925acad880", "size": 1310, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/brian2/utils_net.py", "max_stars_repo_name": "caglorithm/stimulus_neural_populations", "max_stars_repo_head_hexsha": "58567901bed6f6bc17fc2975435138c33bb6be66", "max_stars_repo_licenses": [...
[STATEMENT] lemma exL_exMap_lem: fixes f :: "Label -~> sterm" and lz :: "Label -~> sterm" and f' :: "Label -~> sterm" assumes "dom f = dom lz" and "dom f' = dom f" shows "\<forall>L1 L2. finite L1 \<longrightarrow> (\<forall>l\<in>dom f. \<forall>s p. s \<notin> L1 \<and> p \<notin> L1 \<and> s \<no...
{"llama_tokens": 83677, "file": "Locally-Nameless-Sigma_Sigma_ParRed", "length": 111}
[STATEMENT] lemma tensor_lookup: assumes "\<And>is. is \<lhd> dims A \<Longrightarrow> lookup A is = e is" shows "tensor_from_lookup (dims A) e = A" [PROOF STATE] proof (prove) goal (1 subgoal): 1. tensor_from_lookup (dims A) e = A [PROOF STEP] using tensor_lookup_base lookup_def length_vec tensor_from_lookup_def [PRO...
{"llama_tokens": 316, "file": "Deep_Learning_Tensor", "length": 2}
import os import uuid from shutil import copytree from tempfile import gettempdir from uuid import uuid4 from os.path import join import sys from unittest import TestCase from aequilibrae import Project from aequilibrae.paths import path_computation, Graph from aequilibrae.paths.results import PathResults from aequili...
{"hexsha": "dbf6f07019c57530fe12105bb3e09e622e936b7a", "size": 7120, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/aequilibrae/paths/test_pathResults.py", "max_stars_repo_name": "Art-Ev/aequilibrae", "max_stars_repo_head_hexsha": "9f438278e09c875717779bfcc99bf7ba75ed1372", "max_stars_repo_licenses": ["MI...
import cv2 import numpy as np from scipy import ndimage import os # https://docs.opencv.org/3.4.1/d7/d4d/tutorial_py_thresholding.html th = 127 max_val = 255 # for color do not forget to convert BGR to RBG import cv2 cameraCapture = cv2.VideoCapture(0) fps = 30 size = (int(cameraCapture.get(cv2.CAP_PROP_FRAME_WID...
{"hexsha": "383b20b37551e82d4643debb4540cedfe3c59f4a", "size": 1186, "ext": "py", "lang": "Python", "max_stars_repo_path": "introduction/13_camera_thresholding.py", "max_stars_repo_name": "Tenjin0/python-opencv-base", "max_stars_repo_head_hexsha": "b9732f24de688547b6d45b9d796d0ff458902874", "max_stars_repo_licenses": [...
import unicornhat as uh import time import colorsys import math from random import randint import numpy uh.set_layout(uh.PHAT) uh.rotation(90) uh.brightness(0.4) width,height=uh.get_shape() ### Many of these were created by pimoroni and can be found here: https://github.com/pimoroni/unicorn-hat/tree/master/examples #...
{"hexsha": "90f58957954e4db4ce72c15edc9fdaa07e9d5e02", "size": 33034, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/party.py", "max_stars_repo_name": "heckseven/partypi", "max_stars_repo_head_hexsha": "b3e827325b0b8411a881bcbb68dca3d4c4055e85", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
import json import os.path from metric.bleu import moses_multi_bleu import glob as glob import numpy as np import jsonlines from tabulate import tabulate from tqdm import tqdm def compute_prf_SMD(gold, pred, global_entity_list):#, kb_plain=None): # local_kb_word = [k[0] for k in kb_plain] TP, FP, FN = 0, 0, 0 ...
{"hexsha": "39c13f897040e3a68ceefd8d9593307b0bfbf279", "size": 3174, "ext": "py", "lang": "Python", "max_stars_repo_path": "metric/smd_scorer.py", "max_stars_repo_name": "andreamad8/FSB", "max_stars_repo_head_hexsha": "a81593590189fa5ad1cc37c5857f974effd9750a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 53,...
[STATEMENT] lemma hyps_for_collect: "fset (hyps_for n p) = {h . hyps n h = Some p}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. fset (hyps_for n p) = {h. hyps n h = Some p} [PROOF STEP] by auto
{"llama_tokens": 93, "file": "Incredible_Proof_Machine_Incredible_Signatures", "length": 1}
import numpy as np import cv2 as cv from matplotlib import pyplot as plt import os import os.path import time prototypes = [] MAX_PROTOTYPES=20 lowe_ratio = 1.0 imgs = [] confidence_threshold = 0.7 durability = 0.01 Choice = True LearnNewPrototypes = False start_imgs_fns = [] start_imgs_fns.append("station2.jpg") star...
{"hexsha": "29513135b5a3c22ec217216b6ea2aac7af040f16", "size": 6670, "ext": "py", "lang": "Python", "max_stars_repo_path": "Orb.py", "max_stars_repo_name": "PtrMan/21V1", "max_stars_repo_head_hexsha": "fbac4deb5bec3a5e50b81e1e91c4a8a9820d6aaa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo_s...
# (c) 2011, 2012 Georgia Tech Research Corporation # This source code is released under the New BSD license. Please see # http://wiki.quantsoftware.org/index.php?title=QSTK_License # for license details. # # Created on Month day, Year # # @author: Vishal Shekhar # @contact: mailvishalshekhar@gmail.com # @summary: ML A...
{"hexsha": "532a202153bf90aa81ad63a7632fe46256be3aed", "size": 2321, "ext": "py", "lang": "Python", "max_stars_repo_path": "QSTK/qstklearn/mldiagnostics.py", "max_stars_repo_name": "romanbsd/QuantSoftwareToolkit", "max_stars_repo_head_hexsha": "6b7e15fa3c0ba483a30674ff5acf30c77b91b877", "max_stars_repo_licenses": ["BSD...
import dlib import numpy as np import face_recognition_models import dlib.cuda as cuda class FaceRec(): def __init__(self, gpu): cuda.set_device(gpu) face_detector = dlib.get_frontal_face_detector() predictor_68_point_model = face_recognition_models.pose_predictor_model_location() ...
{"hexsha": "5ab147f71240458c49fcec350c8d83f03cbab22d", "size": 2684, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocess/src/libs/facerec.py", "max_stars_repo_name": "dropitlikecross/looking-to-listen", "max_stars_repo_head_hexsha": "bd2e4b272a4ee1424cf3077870886748c42c6a0c", "max_stars_repo_licenses": ["...
import netsquid as ns import numpy as np import matplotlib.pyplot as plt from qkd.networks import TwoPartyNetwork from qkd.protocols.bb84 import KeySenderProtocol as BB84Sender, KeyReceiverProtocol as BB84Receiver from qkd.protocols.e91 import KeySenderProtocol as E91Sender, KeyReceiverProtocol as E91Receiver from qkd...
{"hexsha": "b768bb9ab5f20d2d4f3fee0412d4331b89b4ac43", "size": 9200, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_simulations/run_sim.py", "max_stars_repo_name": "stephendiadamo/qkd_error_recon", "max_stars_repo_head_hexsha": "cb21f4764ab4bd3dad4db7f0d61164d2457731c5", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np import pandas as pd import itertools as it __version__ = 0.1 class Frame(): """ Creates a `kadro.Frame` object out of a `pandas.DataFrame` object. Will ignore index. Datastructure is immutable but reference to `pandas.DataFrame` is always kept. <pre>Example: import numpy as np ...
{"hexsha": "4e95b2da6a9199a4084b0f14adee6cf8aba3d7c8", "size": 11827, "ext": "py", "lang": "Python", "max_stars_repo_path": "kadro/Frame.py", "max_stars_repo_name": "koaning/kadro", "max_stars_repo_head_hexsha": "cbf993e5142d1ade26ac5922d7d15784d56b3db6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 13, "max_...
import pandas as pd from scipy.stats import beta, norm from scattertext.termranking.OncePerDocFrequencyRanker import OncePerDocFrequencyRanker from scattertext.termscoring.CorpusBasedTermScorer import CorpusBasedTermScorer class BetaPosterior(CorpusBasedTermScorer): ''' Beta Posterior Scoring. Code adapted f...
{"hexsha": "a5f6a5ff15152f301187cd830a49c1a2de568e21", "size": 3888, "ext": "py", "lang": "Python", "max_stars_repo_path": "scattertext/termscoring/BetaPosterior.py", "max_stars_repo_name": "shettyprithvi/scattertext", "max_stars_repo_head_hexsha": "a15613b6feef3ddc56c03aadb8e1e629d28a427d", "max_stars_repo_licenses": ...
import numpy as np import torch from torch import nn, optim from torch.utils.data import DataLoader from torchvision import datasets from tqdm import tqdm from pixelsnail import PixelSNAIL def train(epoch, loader, model, optimizer, device): loader = tqdm(loader) criterion = nn.CrossEntropyLoss() for i,...
{"hexsha": "5d5af244159bf5a614ce9d0553ca94e37ce00f00", "size": 1605, "ext": "py", "lang": "Python", "max_stars_repo_path": "pixelsnail_cifar.py", "max_stars_repo_name": "eyalbetzalel/vq-vae-2-pytorch", "max_stars_repo_head_hexsha": "464c683e5049377cba7101156542168d068cf507", "max_stars_repo_licenses": ["MIT"], "max_sta...
//================================================================================================== /*! @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_1_0.txt) ...
{"hexsha": "9f1c391754116fa0455ebe2b21ef550f6fe87d13", "size": 1312, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/simd/function/if_zero_else_one.hpp", "max_stars_repo_name": "yaeldarmon/boost.simd", "max_stars_repo_head_hexsha": "561316cc54bdc6353ca78f3b6d7e9120acd11144", "max_stars_repo_licenses"...
""" IndicatorSOS1Bridge{T,S<:MOI.AbstractScalarSet} The `IndicatorSOS1Bridge` replaces an indicator constraint of the following form: ``z \\in \\mathbb{B}, z == 1 \\implies f(x) \\in S`` with a SOS1 constraint: ``z \\in \\mathbb{B}, slack \\text{ free}, f(x) + slack \\in S, SOS1(slack, z)``. """ struct IndicatorSO...
{"hexsha": "0a067a7e00b453f9185a5dbc761c82c3285ae652", "size": 5067, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Bridges/Constraint/indicator_sos.jl", "max_stars_repo_name": "manuelbb-upb/MathOptInterface.jl", "max_stars_repo_head_hexsha": "54b6bcb723acb2b2d79584e2f27ea56fd4c7777c", "max_stars_repo_licens...
import cv2 as cv import numpy as np import matplotlib.pyplot as plt import os import math def undesired_objects(image): image = image.astype('uint8') nb_components, output, stats, centroids = cv.connectedComponentsWithStats(image, connectivity=4) sizes = stats[:, -1] max_label = 1 max_...
{"hexsha": "dfa1e9010884230981ab22df339c7bef3f05a71e", "size": 1987, "ext": "py", "lang": "Python", "max_stars_repo_path": "Helpers/connectedcomponents.py", "max_stars_repo_name": "AsianZeus/Digitalizing-Prescription-Image", "max_stars_repo_head_hexsha": "3e102e5fd5a6e8427153ae57c94a698b0abc06a6", "max_stars_repo_licen...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np from numpy.testing import assert_allclose from astropy.tests.helper import pytest from ...utils.testing import requires_dependency from ...utils.random im...
{"hexsha": "de9b6d05dd7f9cf02259b4fff3a7faeed38956c4", "size": 3448, "ext": "py", "lang": "Python", "max_stars_repo_path": "gammapy/stats/tests/test_fit_statistics.py", "max_stars_repo_name": "grburgess/gammapy", "max_stars_repo_head_hexsha": "609e460698caca7223afeef5e71826c7b32728d1", "max_stars_repo_licenses": ["BSD-...
[STATEMENT] lemma secureTT_iff_secure': "Orig.secureTT \<longleftrightarrow> Prime.secure" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Orig.secureTT = secure [PROOF STEP] proof [PROOF STATE] proof (state) goal (2 subgoals): 1. Orig.secureTT \<Longrightarrow> secure 2. secure \<Longrightarrow> Orig.secureTT [PRO...
{"llama_tokens": 3629, "file": "Bounded_Deducibility_Security_BD_Security_Triggers", "length": 34}
! { dg-do compile } ! { dg-options "-std=f2003" } program a implicit none integer n, m(3,3) integer(kind=8) k integer, allocatable :: i(:), j(:) real, allocatable :: x(:) n = 42 m = n k = 1_8 allocate(i(4), source=42, source=n) ! { dg-error "Redundant SOURCE tag found" } allocate(integer(4) :: ...
{"hexsha": "ee6c3635912dbe8d2805cf2779f1c6f0ca98c3f0", "size": 744, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/allocate_alloc_opt_4.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_...
import pyrender import os import trimesh import numpy as np import cv2 import os import torch from scipy.spatial.transform import Rotation as R os.environ['PYOPENGL_PLATFORM'] = 'egl' def to_homo(rotation, translation): transform = np.eye(4) transform[:3, :3] = rotation transform[:3, 3] = translation ...
{"hexsha": "3a4dc6e029a35e3d0c046bf603883d099d674367", "size": 8167, "ext": "py", "lang": "Python", "max_stars_repo_path": "render_swisscube.py", "max_stars_repo_name": "Komod0D/eccv18-rgb_pose_refinement", "max_stars_repo_head_hexsha": "1662e044e806b5d7d8fc0d09fd6f0da333dba663", "max_stars_repo_licenses": ["MIT"], "ma...
[STATEMENT] lemma sources_sinks_aux: "sources_aux I D U xs = sinks_aux (I\<inverse>) D U (rev xs)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. sources_aux I D U xs = sinks_aux (I\<inverse>) D U (rev xs) [PROOF STEP] by (induction xs, simp_all)
{"llama_tokens": 107, "file": "Noninterference_Ipurge_Unwinding_IpurgeUnwinding", "length": 1}
// -*- mode: c++; indent-tabs-mode: nil; -*- // // Copyright (c) 2009-2013 Illumina, Inc. // // This software is provided under the terms and conditions of the // Illumina Open Source Software License 1. // // You should have received a copy of the Illumina Open Source // Software License 1 along with this program. If ...
{"hexsha": "5ac574749208f6dad00a719f278868733c239f44", "size": 3756, "ext": "hh", "lang": "C++", "max_stars_repo_path": "isaac_variant_caller/src/lib/strelka/position_somatic_snv.hh", "max_stars_repo_name": "sequencing/isaac_variant_caller", "max_stars_repo_head_hexsha": "ed24e20b097ee04629f61014d3b81a6ea902c66b", "max...
/- Copyright (c) 2020 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import measure_theory.measure.measure_space import measure_theory.measure.regular import topology.opens import topology.compacts /-! # Contents In this file we ...
{"author": "jjaassoonn", "repo": "projective_space", "sha": "11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce", "save_path": "github-repos/lean/jjaassoonn-projective_space", "path": "github-repos/lean/jjaassoonn-projective_space/projective_space-11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce/src/measure_theory/measure/content.lean"}
from numpy import array import numpy as np import pandas as pd import plotly.express as px import plotly.graph_objects as go import random, math, copy, statistics from IPython.display import clear_output from time import sleep import matplotlib.pyplot as plt random.seed(1) def F6(x,y): return 0.5 - (((...
{"hexsha": "617339213e7168f5a457fcfee6fd167dcf081071", "size": 5692, "ext": "py", "lang": "Python", "max_stars_repo_path": "pso_f6_mod.py", "max_stars_repo_name": "CaioMM/f6_mod", "max_stars_repo_head_hexsha": "34f5a0fbc8f24d62a6b593939fa1b7296a8384dd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
"""Plot survey and synthetic matrices for France, Japan, and Shanghai, China as shown in figure 3.""" import numpy as np import pandas as pd import matplotlib as mplt import matplotlib.pyplot as plt import matplotlib.colors as colors import matplotlib.cm as cm import matplotlib.font_manager as font_manager import matpl...
{"hexsha": "9cdc6ec6e0758085fbf33008de8e3b7e53b43251", "size": 6496, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis_results/scripts/fig_3b.py", "max_stars_repo_name": "DongxiaW/mixing-patterns", "max_stars_repo_head_hexsha": "e841a934b826ecc98bf443026c32e7c6b7aa75bc", "max_stars_repo_licenses": ["Apach...
#!/usr/bin/env python """ DataProcParams class for importing, working with, and storing data processing parameters (e.g., PINGU's V5 processing). """ from __future__ import absolute_import, division from collections import Mapping, OrderedDict, Sequence from copy import deepcopy from itertools import izip import os...
{"hexsha": "786f7e771f19ff4a5844458dcc442f8c09f38215", "size": 25724, "ext": "py", "lang": "Python", "max_stars_repo_path": "pisa/utils/data_proc_params.py", "max_stars_repo_name": "torkjellsdatter/pisa", "max_stars_repo_head_hexsha": "7b26b0ac40c873a87786286acfd1c96abf724a99", "max_stars_repo_licenses": ["Apache-2.0"]...
[STATEMENT] lemma "implc_get_offending_flows [ACL_not_with] \<lparr> nodesL = [''A'', ''B'', ''C''], edgesL = [(''B'', ''A''), (''B'', ''C''), (''A'', ''B'')] \<rparr> = [[(''B'', ''C'')], [(''A'', ''B'')]]" [PROOF STATE] proof (prove) goal (1 subgoal): 1. implc_get_offending_flows [ACL_not_with] \<lparr>no...
{"llama_tokens": 246, "file": "Network_Security_Policy_Verification_Examples_Impl_List_Playground_ChairNetwork_statefulpolicy_example", "length": 1}
#!/usr/bin/env python3 import astropy.time import astropy.coordinates locUK608 = astropy.coordinates.EarthLocation.from_geodetic(lat=51.143833512, lon=-1.433500703, height=176.028) # UK608 LBA locIE613 = astropy.coordinates.EarthLocation.from_geocentric(3801633.528060000, -529021.899396000, 5076997.185, unit='m') # I...
{"hexsha": "4f8f16615caad5c78c00a0a90264992bc9606b86", "size": 1170, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/lst.py", "max_stars_repo_name": "griffinfoster/artemis", "max_stars_repo_head_hexsha": "bf445b7d2dc9127676503a4efd633d3492e6139a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
# -*- coding: utf-8 -*- """ somasnakes =========== Original package is adjusted for soma detection by donghaozhang and siqiliu. This soma submodule can be used for soma detection only, but this submodule is currently embedded in rivuletpy. The soma mask can be generate by setting its corresponding argument. Soma detec...
{"hexsha": "6a6240e4845befc3c4d0d115b447c4d47fcf80b2", "size": 24264, "ext": "py", "lang": "Python", "max_stars_repo_path": "rivuletpy/soma.py", "max_stars_repo_name": "holiday01/rivuletpy", "max_stars_repo_head_hexsha": "4adf06cbe5a16d34eb1d27df80ff658073484457", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Jeremy Avigad, Minchao Wu, Mario Carneiro ! This file was ported from Lean 3 source module data.finset.basic ! leanprover-community/mathlib commit 68cc421841...
{"author": "leanprover-community", "repo": "mathlib3port", "sha": "62505aa236c58c8559783b16d33e30df3daa54f4", "save_path": "github-repos/lean/leanprover-community-mathlib3port", "path": "github-repos/lean/leanprover-community-mathlib3port/mathlib3port-62505aa236c58c8559783b16d33e30df3daa54f4/Mathbin/Data/Finset/Basic.l...
import collections import itertools import jax.numpy as np from jax import jit import numpy.random as rnd import numpy import mdp.search_spaces as search_spaces def onehot(x, N): return np.eye(N)[x] def entropy(p): return -np.sum(np.log(p+1e-8) * p) def sigmoid(x): return 1/(1+np.exp(-x)) def softmax(...
{"hexsha": "cf28613d94b294f2ea778de9e2ea1df9921fecde", "size": 6974, "ext": "py", "lang": "Python", "max_stars_repo_path": "mdp/utils.py", "max_stars_repo_name": "act65/mdps", "max_stars_repo_head_hexsha": "59f35467baa83b953ccdac5290acfcc31f33fd28", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star...
!Author Huang Yihan !This is the main program of this homework !1.read inputs !2.read resonance table !3.calculate Program main use input_mod use table_mod use calculate_mod implicit none call read_inputs call res_table_init call U8_xs_init call H1_xs_init call calculat...
{"hexsha": "21af554bd53690dc8dfc72713fcb91744a46b348", "size": 411, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/main.f90", "max_stars_repo_name": "Huang-Yihan/Recentyl-Physicals-homework", "max_stars_repo_head_hexsha": "5569fa99987bf97982dbc4ac10faf45d5f3ce62b", "max_stars_repo_licenses": ["MIT"], "max...
lemma {u} FOIL {R : Type u} [ring R] : ∀ a b c d : R, (a + b) * (c + d) = a*c + a*d + b*c + b*d := by { intros, rw [left_distrib, right_distrib, right_distrib], ac_refl } lemma {u} FOIL_neg_square {R : Type u} [comm_ring R] : ∀ a b : R, (a - b) * (a - b) = a*a + (-(a*b)+ -(a*b)) + b*b := by { intros, rw sub_eq_add_neg...
{"author": "Shamrock-Frost", "repo": "FormalComplexAnalysis", "sha": "3cac79d9b603b1edf7df1bc7e948c74eb86a2cc0", "save_path": "github-repos/lean/Shamrock-Frost-FormalComplexAnalysis", "path": "github-repos/lean/Shamrock-Frost-FormalComplexAnalysis/FormalComplexAnalysis-3cac79d9b603b1edf7df1bc7e948c74eb86a2cc0/algebra.l...
(* Title: HOL/HOLCF/IOA/Seq.thy Author: Olaf Müller *) section \<open>Partial, Finite and Infinite Sequences (lazy lists), modeled as domain\<close> theory Seq imports HOLCF begin default_sort pcpo domain (unsafe) 'a seq = nil ("nil") | cons (HD :: 'a) (lazy TL :: "'a seq") (infixr "##" 65) inducti...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/HOLCF/IOA/Seq.thy"}
#Author : Zoumpekas Athanasios #codename : thzou import os import numpy as np import pandas as pd import pickle import quandl import datetime import time import matplotlib.pyplot as plt import seaborn as sns; sns.set() import sys import io from itertools import product import warnings from plotly import tools import ...
{"hexsha": "3bb36b49c612f1750363628f6edd4b7cc219e495", "size": 5753, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_scripts/data_acquisition.py", "max_stars_repo_name": "thzou/crypto_analysis", "max_stars_repo_head_hexsha": "7eb4f4c988e4d5a94d36ed61a002041e44d72c10", "max_stars_repo_licenses": ["MIT"], "...
import argparse, random, sys, os # import librosa import numpy as np import soundfile def main(args): y, sr = soundfile.read(args.filename, always_2d=True) print(f"File loaded with y {y.shape}, sr = {sr}") # multichannel if y.shape[1] > 1: y = y.mean(axis=1, keepdims=True) print(f"File...
{"hexsha": "8cd26954f74e2432d71f478e52c6c3f1b3207b0b", "size": 1552, "ext": "py", "lang": "Python", "max_stars_repo_path": "playground/audio_slicer.py", "max_stars_repo_name": "x75/smp_audio", "max_stars_repo_head_hexsha": "6e293d6419132e34e38efde90efb58cabb9c623b", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
(************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *) (* \VV/ **************************************************************) (* // * Th...
{"author": "mattam82", "repo": "Coq-misc", "sha": "60bc3cbe72083f4fa1aa759914936e4fa3d6b42e", "save_path": "github-repos/coq/mattam82-Coq-misc", "path": "github-repos/coq/mattam82-Coq-misc/Coq-misc-60bc3cbe72083f4fa1aa759914936e4fa3d6b42e/plugins/setoid_ring/Ring2_tac.v"}
import logging import numpy as np import os try: import matplotlib.pyplot as plt from matplotlib import gridspec is_matplotlib = True except: is_matplotlib = False from pystella.util.phys_var import phys logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) __author__ = 'bakl' eve_el...
{"hexsha": "7ab7519fe6f9117ac1ad56dbbd92861e31bd11c6", "size": 41252, "ext": "py", "lang": "Python", "max_stars_repo_path": "pystella/model/sn_eve.py", "max_stars_repo_name": "cradesto/pystella", "max_stars_repo_head_hexsha": "f6f44ed12d9648585a52a09e15d494daa4c70c59", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#-*-coding:utf-8-*- import numpy as np def coarse_forecast(SimRes, Bath, idx_list, lowlim, highlim): ''' Takes wave height from coarse forecast, crops at lowlim bathymetry value and forecasts using Green's Law to highlim. SimRes: Coarse Grid simulation results Bath: Coarse Grid Bathymetry idx_list: Index List of s...
{"hexsha": "064e0ad8c2fd3eee46194771690c4374420b9b13", "size": 2399, "ext": "py", "lang": "Python", "max_stars_repo_path": "transfer_function/src/coarse_forecast.py", "max_stars_repo_name": "DanGiles/Localised-Tsunami-Response", "max_stars_repo_head_hexsha": "33b041c94b55aec66b7940d3979e9e4f788cd702", "max_stars_repo_l...
import numpy as np import tensorflow as tf from stable_baselines.common.tf_layers import linear from tensorflow.python.ops import math_ops from gym import spaces class ProbabilityDistribution(object): def __init__(self): super(ProbabilityDistribution, self).__init__() def flatparam(self): ra...
{"hexsha": "7488eabde4b2ee9ad1d32e477efd51215fc13424", "size": 13016, "ext": "py", "lang": "Python", "max_stars_repo_path": "stable_baselines/common/distributions.py", "max_stars_repo_name": "emadboctorx/stable-baselines", "max_stars_repo_head_hexsha": "9bce185538e8bf69836371286e23919fd85eec64", "max_stars_repo_license...
import numpy as np import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import inf_def def main(): inf_net = inf_def.InferenceNetwork() targets = tf.placeholder(tf.float32, [None, 10]) correct_prediction = tf.equal(tf.argmax(inf_net.logits, 1), tf.argmax(targets, 1)) accu...
{"hexsha": "82f8851a05eb881ff55df5cbf5bbfb6911119946", "size": 768, "ext": "py", "lang": "Python", "max_stars_repo_path": "commons/mnist/inf/test_inf_net.py", "max_stars_repo_name": "hamedhaghighi/Usupervised_Image_Restoration", "max_stars_repo_head_hexsha": "a3fefbf54891b9e984987fe15bd6b434b59fec3c", "max_stars_repo_l...
# # unfished # add_theme(:ggplot2_base, # bglegend = _invisible, # fg = :white, # fglegend = _invisible, # fgguide = :black) # # add_theme(:ggplot2, # base = :ggplot2_base, # bginside = :lightgray, # fg = :lightgray, # fgtext = :gray, # fg...
{"hexsha": "c071fe6a1793cf3e06d71b9a581dae400929bcd6", "size": 891, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ggplot2.jl", "max_stars_repo_name": "greimel/PlotThemes.jl", "max_stars_repo_head_hexsha": "8e7f69e05369f570ffdcb125144b46f754b92d05", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
#include <boost/intrusive/list.hpp>
{"hexsha": "3781a4261a26b4a86a9eae1397afa18273d9d79c", "size": 36, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_intrusive_list.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1.0"], "ma...
#!/usr/bin/python -u import numpy as np import os, sys, random import cv2 from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers import Convolution2D, MaxPooling2D from keras.utils import np_utils from keras import backend as K from keras.models import load_m...
{"hexsha": "11eda219f5512cb86e70c99cabf59941692357d5", "size": 4584, "ext": "py", "lang": "Python", "max_stars_repo_path": "keras_train.py", "max_stars_repo_name": "mashgin/basic_deep_learning_keras", "max_stars_repo_head_hexsha": "4d6597c29ee9e929f7e4b17e146266fbdcf848a6", "max_stars_repo_licenses": ["MIT"], "max_star...
# Copyright (c) 2021-2022, NVIDIA CORPORATION. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
{"hexsha": "7cec56e1c798fc354c776f88e311e342be5d47e8", "size": 1803, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/cugraph-pytorch/cugraph-local/data_loader/read_cora.py", "max_stars_repo_name": "wangxiaoyunNV/dgl", "max_stars_repo_head_hexsha": "abcf92cdee4c571b72e9347595e8b8f158ff66d4", "max_stars_r...
@testset "ch04_sim02" begin xlim = [-5.0, 5.0] ylim = [-5.0, 5.0] world = World(xlim, ylim) circlings = Array{Agent,1}(undef, 0) robots = Array{RealRobot,1}(undef, 0) for i = 1:10 circling = Agent(0.2, 10.0 / 180 * pi) robot = RealRobot([0.0, 0.0, 0.0], circling, noth...
{"hexsha": "e64a7b70515c37399b7148c269ea7e389d35a2cf", "size": 9564, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/ch04_test.jl", "max_stars_repo_name": "soblin/JuliaProbo", "max_stars_repo_head_hexsha": "bb206e19dd350af7f82b90e7c5062e5a088eff2d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
\section{Intermediate Language}~\label{sec:il} Each prover first translates the Copilot specification into an intermediate representation best suited for model checking. Two representations are available : \begin{itemize} \item The \textbf{IL} format : a list of quantifier-free equations over integer sequences, i...
{"hexsha": "deda03ca042cc519ede7c46b769a6c65a8c69af0", "size": 33522, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "co-kind-report/IL.tex", "max_stars_repo_name": "Copilot-Language/copilot-discussion", "max_stars_repo_head_hexsha": "caccad918b23dae991095344a845827ddccd6047", "max_stars_repo_licenses": ["BSD-3-Cl...
(* Copyright 2021 (C) Mihails Milehins *) section\<open>Simple semicategories\<close> theory CZH_SMC_Simple imports CZH_DG_Simple CZH_SMC_NTSMCF begin subsection\<open>Background\<close> text\<open> The section presents a variety of simple semicategories, such as the empty semicategory \<open>0\<close>...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/CZH_Foundatio...
#!/usr/bin/env python #------------------------------------------------------------------------------- # Copyright 2019 Pivotal Software 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 ...
{"hexsha": "4c51d992304c0daab3a140d65867d8cb5107e8fc", "size": 12608, "ext": "py", "lang": "Python", "max_stars_repo_path": "RTS4MADlib/samples/CreditCardTransactionGenerator/transactionGenerator.py", "max_stars_repo_name": "pivotal/Realtime-scoring-for-MADlib", "max_stars_repo_head_hexsha": "4ed6500bdd3422c3d090d8c6c6...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function import os import requests from numpy import testing as npt from astropy.tests.helper import pytest from astropy.table import Table import astropy.coordinates as coord import astropy.units as u from ...exceptions impo...
{"hexsha": "91bb00fc01a33b363a273f6e3b54bfeba82876d3", "size": 10110, "ext": "py", "lang": "Python", "max_stars_repo_path": "astroquery/ned/tests/test_ned.py", "max_stars_repo_name": "hamogu/astroquery", "max_stars_repo_head_hexsha": "9a2d1a2ecc4dbfafa6a39cf7a180bcf831a6266a", "max_stars_repo_licenses": ["BSD-3-Clause"...
from dolfin import * # @UnusedWildImport import logging import numpy as np logging.getLogger('FFC').setLevel(logging.warnings) logging.basicConfig(level=logging.DEBUG) logging.getLogger('UFL').setLevel(logging.warnings) set_log_level(WARNING) def kl(y, N, order=1): deg = order mesh = UnitSquareMesh(int(N), in...
{"hexsha": "4248c56cd0bf1ef03712df9325ce0828b110508f", "size": 2247, "ext": "py", "lang": "Python", "max_stars_repo_path": "smolyak/applications/pde/kl.py", "max_stars_repo_name": "mbaudin47/smolyak", "max_stars_repo_head_hexsha": "c12d7cbae57d9b1cf2e026547b78bcd9c8d63a6c", "max_stars_repo_licenses": ["MIT"], "max_star...
using ControlBenchmarks using ControlSystems benchmarkProb = controlbenchmark( JonesMorari() ) @test ControlSystems.nstates( benchmarkProb.sys ) == 4 @test ControlSystems.ninputs( benchmarkProb.sys ) == 2
{"hexsha": "6532e32e4da0aa34c6fb63f16ca3f51ace5dd29b", "size": 207, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/benchmarks/jonesMorari.jl", "max_stars_repo_name": "imciner2/ControlBenchmarks.jl", "max_stars_repo_head_hexsha": "f11f4a98bd8ab2923771b72e7f0d4c60302207c8", "max_stars_repo_licenses": ["MIT"],...
import torch import os import argparse import numpy as np import sys sys.path.append('./') from pipelines import config from pipelines.utils.point_utils import read_point_ply parser = argparse.ArgumentParser(description='Extract meshes from occupancy process.') parser.add_argument('--config', default='configs/lig/lig_...
{"hexsha": "6472385358bc1c46afc0f566ed1ad6ca79ae58a5", "size": 3313, "ext": "py", "lang": "Python", "max_stars_repo_path": "main/run_lig.py", "max_stars_repo_name": "wnbzhao/Local-Implicit-Grid-Pytorch", "max_stars_repo_head_hexsha": "d45da37beda52653f0066f9ba0f0500c54402e13", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy import pickle from tensorflow.python.framework import dtypes from sklearn.model_selection import train_test_split import tensorflow as tf from enum import Enum import scipy.ndimage import scipy.misc from sklearn.utils import shuffle class TrafficDataProvider(object): """ provide data to neural ne...
{"hexsha": "1247c724e4a13c7e240a8b423429cf4cd01cd03b", "size": 9579, "ext": "py", "lang": "Python", "max_stars_repo_path": "traffic/traffic_data.py", "max_stars_repo_name": "JamesLuoau/Traffic-Sign-Recognition-with-Deep-Learning-CNN", "max_stars_repo_head_hexsha": "e73a892a17db71121861b746861d57643d34ea30", "max_stars_...
#!/usr/bin/env python import tensorflow as tf from tensorflow.python.ops import control_flow_ops import numpy as np import network slim = tf.contrib.slim import os import json import cv2 import signal import sys class Inferer: def __init__(self, model_num): model_name = str(model_num) log_folder =...
{"hexsha": "94a82be4f453680103ce86fa486955ca721ad2b9", "size": 2131, "ext": "py", "lang": "Python", "max_stars_repo_path": "ros_workspace/src/deep_segmentation/src/inferer.py", "max_stars_repo_name": "NVIDIA-Jetson/Foursee-Navigation", "max_stars_repo_head_hexsha": "673b4a8bcf5774cf23d2564bada68709d28c850e", "max_stars...
%---------------------------------------------------------------------------------------- % VARIOUS REQUIRED PACKAGES %---------------------------------------------------------------------------------------- \usepackage{titlesec} % Allows customization of titles \usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,h...
{"hexsha": "52305bea64ac3ac0ddd2d29ee58e8ee00a2f691a", "size": 16911, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "usr/src/uts/common/io/qede/579xx/drivers/ecore/documentation/structure.tex", "max_stars_repo_name": "AsahiOS/gate", "max_stars_repo_head_hexsha": "283d47da4e17a5871d9d575e7ffb81e8f6c52e51", "max_st...
function keep(varargin); %KEEP keeps the caller workspace variables of your choice and clear the rest. % Its usage is just like "clear" but only for variables. % % Xiaoning (David) Yang xyang@lanl.gov 1998 % Revision based on comments from Michael McPartland, % michael@gaitalf.mgh.harvard.edu,...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/181-keep/keep.m"}
import math import numpy as np from itertools import chain import load_subjects as ls # Given a list X, returns a list of changepoints def get_changepoints(X): return X[:-1] != X[1:] # Construct numpy array from jagged data by filling ends of short rows with NaNs def jagged_to_numpy(jagged): aligned = np.ones((le...
{"hexsha": "13a18f70287406317fca507d451a086a2908f71a", "size": 10479, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis_code/util.py", "max_stars_repo_name": "sss1/behavioral_eyetracking", "max_stars_repo_head_hexsha": "945268e564b9e9031be0afb40054d6ab35059633", "max_stars_repo_licenses": ["CC-BY-4.0"], "...
""" Import libraries """ import math import matplotlib.pyplot as plt import keras import pandas as pd import numpy as np import getopt from decimal import Decimal from keras.models import Model from keras.layers import LSTM from keras.layers import * from sklearn.preprocessing import MinMaxScaler import os import rando...
{"hexsha": "24f24056aebd19d8a9539d8a9e9e35e0336216c6", "size": 5055, "ext": "py", "lang": "Python", "max_stars_repo_path": "Convolutional_autoencoder/reduce.py", "max_stars_repo_name": "EPantelaios/LSTM-Neural-Networks", "max_stars_repo_head_hexsha": "fc0490a79a237f12d56d52d9b33585c79d15d9ce", "max_stars_repo_licenses"...
from collections import defaultdict import tensorflow_hub as hub import cv2 from matplotlib import pyplot as plt from matplotlib import patches from pathlib import Path import numpy as np label_map = { 1: "person", 2: "bicycle", 3: "car", 4: "motorcycle", 5: "airplane", 6: "bus", 7: "train", 8:...
{"hexsha": "4f7a2cedd4f60ebb2e5d4d8405a992429397767f", "size": 4084, "ext": "py", "lang": "Python", "max_stars_repo_path": "question3/main.py", "max_stars_repo_name": "wechat-haibei/3D-deeplearning-processing", "max_stars_repo_head_hexsha": "9acf5900b24e29b03cb358c992d3d1e429288279", "max_stars_repo_licenses": ["MIT"],...
const ignorefirst = 10 # cm const bigturn = π/3 # 60° # const smallturn = π/93 # 60° const s = 500 const Point = SVector{2, Float64} point(::Missing) = missing point(x::Instantaneous)= Point(x.data[1], x.data[2]) point(x::Point) = x _getv(spl, k) = SVector{2, Float64}(derivative(spl, k)) function gettpindex(spl, ks...
{"hexsha": "f7ebbc166036c16d487c3682e1fab1f276829033", "size": 2726, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/track.jl", "max_stars_repo_name": "yakir12/DungBase.jl", "max_stars_repo_head_hexsha": "1144c221d8e3552e1d4bfac23059f2ed61688959", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
.SH "Installing \*(PN" .PP .II installation To install \*(PN on your system, following the directions in the appropriate sub-section: either for the VAX, or for the Intel development system. .Sh "Installing \*(PN on the VAX" .PP To install \*(PN on the VAX, do the following: .nr l1 0 \*i Create a directory in which the...
{"hexsha": "ee2c1279e078a029b5f0b496f229d6bbeaf36c85", "size": 3161, "ext": "r", "lang": "R", "max_stars_repo_path": "doc/mwc/doc/mwc/text/isisinstall.r", "max_stars_repo_name": "gspu/Coherent", "max_stars_repo_head_hexsha": "299bea1bb52a4dcc42a06eabd5b476fce77013ef", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
import pandas as pd import numpy as np import os from sklearn.metrics import * results_directory = '/sb-personal/cvqa/results/c2vqa-verbs-results-final' output_directory = '/sb-personal/cvqa/src/c2vqa-verbs/analysis' output_joined_file = os.path.join(output_directory, "all_models_test_results.csv") if os.path.exists...
{"hexsha": "65a721719034cbf82de5983f99f50dbdf11f9ea6", "size": 2935, "ext": "py", "lang": "Python", "max_stars_repo_path": "c2vqa-verbs/analysis/relevance-example-results.py", "max_stars_repo_name": "andeeptoor/qar-qae", "max_stars_repo_head_hexsha": "60d61b0c6b5686dda471c727227cee2cc365f836", "max_stars_repo_licenses"...
import os import numpy as np from nobos_commons.data_structures.constants.dataset_part import DatasetPart from nobos_commons.data_structures.dimension import ImageSize from nobos_commons.utils.file_helper import get_create_path from nobos_torch_lib.datasets.action_recognition_datasets.ehpi_dataset import NormalizeEhpi...
{"hexsha": "d33c4f0cc31943aaa298a35c28cecd64171894e4", "size": 4367, "ext": "py", "lang": "Python", "max_stars_repo_path": "ehpi_action_recognition/paper_reproduction_code/evaluations/lstm/test_its_journal_2019.py", "max_stars_repo_name": "steuwe/ehpi_action_recognition", "max_stars_repo_head_hexsha": "4318e82e541c9b42...
# -*- coding: utf-8 -*- """ This module contains the Branch class (one branch of the tree) and the Nodes class """ import numpy as np from multiprocessing.dummy import Pool as ThreadPool from scipy.spatial import cKDTree pool = ThreadPool(16) class Branch: """Class that contains a branch of the fractal tree ...
{"hexsha": "c5d77e22cf5d73077f91c367ba1ecd410952cca7", "size": 10545, "ext": "py", "lang": "Python", "max_stars_repo_path": "Branch3D.py", "max_stars_repo_name": "adsche/fractal-tree", "max_stars_repo_head_hexsha": "9d33a91cbdcdbad40b082a1b936e5cb133a8892a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 16, "m...
[STATEMENT] lemma finite_is_class: "finite {C. is_class P C}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite {C. is_class P C} [PROOF STEP] (*<*) [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite {C. is_class P C} [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. finite {C. is_clas...
{"llama_tokens": 435, "file": "JinjaDCI_Common_Decl", "length": 7}
export ode_order_lowering function lower_varname(var::Variable, idv, order) order == 0 && return var name = Symbol(var.name, :_, string(idv.name)^order) return Variable(name; known = var.known) end function ode_order_lowering(sys::ODESystem) eqs_lowered, _ = ode_order_lowering(sys.eqs, sys.iv) OD...
{"hexsha": "8dcbc12758f313def6f171760cf2afa10f9a3e1d", "size": 1515, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/systems/diffeqs/first_order_transform.jl", "max_stars_repo_name": "shashi/ModelingToolkit.jl", "max_stars_repo_head_hexsha": "600ea214f19ed5b9d8c5d355e15e7ff4d9e9115b", "max_stars_repo_licenses...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ different transformation functions in a neural network synthetic classifiaction problem possibility to restrain information python 3.7.7 numpy 1.19.2 scikit-learn 0.24.1 tensorflow 2.0.0 keras 2.3.1 matplitlib 3.3.2 author: adrienne bohlmann """ import numpy as np ...
{"hexsha": "c56006cb37616bee24e30821ee280943df5b49ed", "size": 9070, "ext": "py", "lang": "Python", "max_stars_repo_path": "synth_classifiaction_NN_transform.py", "max_stars_repo_name": "adriennebohlmann/synthPlay", "max_stars_repo_head_hexsha": "1496119348369fe5d1485f37f632ef2e3e7623e6", "max_stars_repo_licenses": ["C...
% SPDX-License-Identifier: MIT % Copyright (c) 2017-2020 Forschungszentrum Juelich GmbH % This code is licensed under MIT license (see the LICENSE file for details) % \documentclass[ t, % align text inside frame to t=top, b=bottom, c=center 10pt, % 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 20pt available as text font asp...
{"hexsha": "a4c298e52fec0255418591dd6c35ae38ff6d5801", "size": 6499, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tutorial/tutorial.tex", "max_stars_repo_name": "SFKV/Hackathon-Talks", "max_stars_repo_head_hexsha": "ca7040b8877e934ad030bd5d29fa7d449120706c", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
/* bst/gsl_bst_avl.h * * Copyright (C) 2018 Patrick Alken * * 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 the License, or (at * your option) any later version. * ...
{"hexsha": "6560777ce27a479a16e81f1842ea1e9d67cf318d", "size": 2461, "ext": "h", "lang": "C", "max_stars_repo_path": "include/gsl/gsl_bst_avl.h", "max_stars_repo_name": "vinej/sml", "max_stars_repo_head_hexsha": "115c007926ca80d51a37cdf887b5252338d8bc8d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
\section{Use of Recursive Functions} \begin{lstlisting}[language=Haskell] module ProgExercises.FS_2019_ProgExer03Prob_V01 where -- Develop some functions using recursion over lists. -- Higher-order functions are not required yet. toBeImplemented = undefined --delDups deletes duplicates from a list testDelDups =...
{"hexsha": "5c4e4ccdfe230ab8babd60dabaa91edfed8ca0de", "size": 3023, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "TSM_AdvPrPa/Excercises/Haskell/06_RecursiveFunctions.tex", "max_stars_repo_name": "nortismo/mse-documentations", "max_stars_repo_head_hexsha": "cc67637785237d630f077a863edcd5f49aa52b59", "max_stars_...
import pandas as pd pd.options.mode.chained_assignment = None from pkg_resources import parse_version import warnings from ete3 import NCBITaxa import numpy as np import argparse import tarfile import re import math # Helper function to import tables def safely_read_csv(path, **kwargs): try: return pd.rea...
{"hexsha": "6beb3bd75e5066b6b53e5f18534ba109b21c4b3c", "size": 5972, "ext": "py", "lang": "Python", "max_stars_repo_path": "blast/taxonomy/wrapper.py", "max_stars_repo_name": "avilab/vs-wrappers", "max_stars_repo_head_hexsha": "65524b3566969da7909e0d08c423b6eecadea039", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#================================AxionFuncs.py=================================# # Written by C. O'Hare # Contains: # Functions for calculating Solar Axion fluxes for photon & electron coupling # Functions for calculating X-ray spectra in a haloscope # Functions to smear X-ray spectra by an angular resolution # Script ...
{"hexsha": "4bc77d7318342c7d906e522b5cd4ed33bf434843", "size": 7611, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/AxionFuncs.py", "max_stars_repo_name": "cajohare/IAXOmass", "max_stars_repo_head_hexsha": "978306f2a504f5f05562a4f5fcecf55b789e8289", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2,...
\begin{publications} \section*{已发表论文} \begin{enumerate} \item \textbf{Xuda~Zhou}, Zidong~Du, Shijin~Zhang, Lei~Zhang, Huiying~Lan, Shaoli~Liu, Ling~Li, Qi~Guo, Tianshi~Chen, Yunji~Chen: Addressing Sparsity in Deep Neural Networks. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2018. \...
{"hexsha": "67f650a18cb36e036fa8ae0791b0b6f9f0d8bbaf", "size": 598, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/publications.tex", "max_stars_repo_name": "ustcanycall/graduate", "max_stars_repo_head_hexsha": "4c92658dfd4069b3697b1590a0b2b9b61ef35019", "max_stars_repo_licenses": ["LPPL-1.3c"], "max_sta...
import numpy as np import matplotlib.pyplot as plt t = np.linspace(0, 2 * np.pi, 150) x1, y1 = np.cos(t), np.sin(t) x2, y2 = 2 * x1, 2 * y1 colors = ['darkred', 'darkgreen'] fig, ax = plt.subplots() ax.plot(x1, y1, color=colors[0], label='Inner', linewidth=3) ax.plot(x2, y2, color=colors[1], label='Outer', linewidth...
{"hexsha": "2dda7635941960c988c96a63a49aba3f21b24b63", "size": 383, "ext": "py", "lang": "Python", "max_stars_repo_path": "anatomy-of-matplotlib-scipyconf-2018/solutions/4.1-legends_and_scaling.py", "max_stars_repo_name": "dlimpid/np-mpl-pd-nims-moderator-2019-04", "max_stars_repo_head_hexsha": "7b48116d9e4449e05b46b5f...
# -*- coding: utf-8 -*- """ Objective: create an airfoil with a leading edge restriction, same upper length restriction, othogonal upper spars and constant thicknesses in four places Created on Mon Oct 17 10:36:34 2016 @author: Pedro """ from __future__ import print_function import os import math import n...
{"hexsha": "7cec37a6ddd26682a094b85c93c0b04c7e4024ca", "size": 26018, "ext": "py", "lang": "Python", "max_stars_repo_path": "aeropy/morphing/twist_3D.py", "max_stars_repo_name": "belac626/AeroPy", "max_stars_repo_head_hexsha": "4f045306427e08b742237b7393ce9602f1072d60", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
function scan_data = rdprfile(ufilename,plotmode,verbose) %RDPRFILE Reads data from a profilometer data file % % DATA = RDPRFILE(UFILENAME,VERBOSE) % % RDPRFILE examines the header in a profilometer data file and attempts to % determine the type of data file. If a supported type is found, it then % uses the appropria...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/15096-rd-scripts/rd_scripts_v13/rdprfile.m"}
[STATEMENT] lemma Nil_rsp2 [quot_respect]: shows "(list_all2 (\<approx>) OOO (\<approx>)) Nil Nil" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (list_all2 (\<approx>) OOO (\<approx>)) [] [] [PROOF STEP] by (rule compose_list_refl, rule list_eq_equivp)
{"llama_tokens": 107, "file": null, "length": 1}
from __future__ import division import numpy as np from numpy.core.numeric import NaN from scipy.signal import spectrogram from . import timbral_util import tensorflow as tf import tensorflow.keras.backend as K def timbral_depth(fname, fs=0, dev_output=False, phase_correction=False, clip_output=False, threshold_db=-6...
{"hexsha": "e14f3935b4de13c3295b4569aa280e76768370a9", "size": 31467, "ext": "py", "lang": "Python", "max_stars_repo_path": "timbral_models/Timbral_Depth.py", "max_stars_repo_name": "ALavault/tf_timbral_models", "max_stars_repo_head_hexsha": "302923f48e4bb09d7aaa3197758cd7764ac71d47", "max_stars_repo_licenses": ["Apach...
[STATEMENT] lemma hd_reach_all_if_nfwd_app_fwd: "\<lbrakk>\<not>forward_arcs (y#xs); forward_arcs (y#ys@xs); x \<in> set (y#ys@xs)\<rbrakk> \<Longrightarrow> hd (rev (y#ys@xs)) \<rightarrow>\<^sup>*\<^bsub>T\<^esub> x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>\<not> forward_arcs (y # xs); forwar...
{"llama_tokens": 498, "file": "Query_Optimization_IKKBZ_Examples", "length": 2}
import torch import torch.nn.functional as F from torch import nn import numpy as np from torch.optim.lr_scheduler import CosineAnnealingLR class BiC(nn.Module): def __init__(self, lr, scheduling, lr_decay_factor, weight_decay, batch_size, epochs): super(BiC, self).__init__() self.beta = torch.nn....
{"hexsha": "1e1bc81b0252fee832ffe5c3966d78728bd575af", "size": 5074, "ext": "py", "lang": "Python", "max_stars_repo_path": "inclearn/convnet/imbalance.py", "max_stars_repo_name": "Danden1/DER-ClassIL.pytorch", "max_stars_repo_head_hexsha": "66ccdb45890d3da335f4dcb841160cbea8719c15", "max_stars_repo_licenses": ["MIT"], ...
#!/usr/bin/python # -*- coding: utf-8 -*- """ ... """ import urllib2 import time import csv, cStringIO import numpy as np import matplotlib.pyplot as plt log_file = "Yun_Log_BatteryDisCharging.log" fmt_print = "%s, %14.3f, %9.3f s, %9.3f s, %9.3f V, %9.3f A, %9.3f Ohm, %9.3f W, %9.3f mAh, %9.3f J" fmt_write = "%s,...
{"hexsha": "4a8ffa657c652841fe438e788c361f49c6e34f6c", "size": 3989, "ext": "py", "lang": "Python", "max_stars_repo_path": "Yun_Log_BatteryDisCharging/Yun_Log_BatteryDisCharging.py", "max_stars_repo_name": "drtrigon/sketchbook", "max_stars_repo_head_hexsha": "fa58bf767cce2537c86e5ce1638771a164a5b118", "max_stars_repo_l...
\documentclass[letterpaper,10pt]{article} \usepackage[margin=2cm]{geometry} \usepackage{graphicx} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{multicol} \usepackage{listings} \usepackage{color} \definecolor{mygreen}{rgb}{0,0.6,0} \definecolor{mygray}{rgb}{0.5,0.5,0.5} \definecolor{mymau...
{"hexsha": "43c29213f84471efdd405ffdd14fbf9119f6f008", "size": 12331, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "18794_Pattern_Recognition_Theory/Homeworks/HW2/document.tex", "max_stars_repo_name": "MengwenHe-CMU/Courses", "max_stars_repo_head_hexsha": "6cd9a9469b573ff76f70ceff6a0aa6103f7cdf3e", "max_stars_re...