text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import numpy as np import sklearn.metrics as skm import torch from metal.utils import arraylike_to_numpy, pred_to_prob def accuracy_score(gold, pred, ignore_in_gold=[], ignore_in_pred=[]): """ Calculate (micro) accuracy. Args: gold: A 1d array-like of gold labels pred: A 1d array-like of ...
{"hexsha": "b49035a8353ca56026fa5e534df6eea4c84a01c1", "size": 7304, "ext": "py", "lang": "Python", "max_stars_repo_path": "metal/metrics.py", "max_stars_repo_name": "dliangsta/metal", "max_stars_repo_head_hexsha": "49c568e33b36f5e0887bd977dca936b7def02ad7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
''' ======================== Spot movie ======================== Make a movie of star spots. ''' import numpy as np from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import matplotlib.gridspec as gridspec from matplotlib.colors import LightSource from matp...
{"hexsha": "95cd517a0a6925ed1ff79cedd0d021f82acb443d", "size": 8168, "ext": "py", "lang": "Python", "max_stars_repo_path": "spot_movie.py", "max_stars_repo_name": "RuthAngus/astro-viz", "max_stars_repo_head_hexsha": "d49de667cff6d22a1b049fd2268ed9255d9f7dbd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import re import os import cv2 import time import numpy as np import tensorflow as tf import pytesseract pytesseract.pytesseract.tesseract_cmd = r'C:\\Program Files\\Tesseract-OCR\\tesseract.exe' from object_detection.utils import label_map_util from object_detection.utils import visualization_utils as viz_utils from t...
{"hexsha": "803b56cc55ee57b2293be2f37ee8dbfd12070447", "size": 3521, "ext": "py", "lang": "Python", "max_stars_repo_path": "functions.py", "max_stars_repo_name": "Sahil-Chavan/Automatic_License_Plate_Recognition", "max_stars_repo_head_hexsha": "5eaceb9406ca78f48da081bc4775a5f09efa744b", "max_stars_repo_licenses": ["MIT...
""" Filename: analyze_results.py Authors: Jason Youn - jyoun@ucdavis.edu Description: To-do: """ import os import argparse import numpy as np import logging as log import matplotlib.pyplot as plt from pathlib import Path from parse_data import ParseData from sklearn.preprocessing import label_binarize from sklearn....
{"hexsha": "83bcf1e4a7e475c46b979d83117a47361cf3bb9a", "size": 7115, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyze_results.py", "max_stars_repo_name": "IBPA/Cascade", "max_stars_repo_head_hexsha": "fd4288defc7388a39d86f84cc3f5350d624da8a2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
[STATEMENT] lemma finite_is_class: "finite {C. is_class G C}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite {C. is_class G C} [PROOF STEP] apply (fold dom_def) [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite (dom (class G)) [PROOF STEP] apply (rule_tac finite_dom_map_of) [PROOF STATE] proof (prove) ...
{"llama_tokens": 158, "file": null, "length": 3}
import tkinter as tk from tkinter import ttk from typing import Callable, List, Tuple from utils.tk.AlphaValueCountSliderFrame import DEFAULT_NUMBER_OF_ALPHA_VALUES, AlphaValueCountSliderFrame from utils.tk.CustomDialog import CustomDialog import numpy as np # number of alpha values, voting method name {Borda or Cope...
{"hexsha": "698ba1d3817f69f65bce343a519c37f91e97c0d4", "size": 2171, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/tk/BordaAggregatorOptionsDialog.py", "max_stars_repo_name": "jakub-tomczak/ror-gui", "max_stars_repo_head_hexsha": "a4b6c8dd081fd845e255063d4bafe086e738e63f", "max_stars_repo_licenses": ["MI...
from http.server import HTTPServer, BaseHTTPRequestHandler import cgi from datetime import datetime import hashlib import json import numpy as np from biobert_ner.run_ner import BioBERT, FLAGS from convert import pubtator2dict_list, pubtator_biocxml2dict_list, \ get_pub_annotation, get_pubtator from normalize impo...
{"hexsha": "63ee571181be0dbc0c85c6cbd3fe4af72e6f5a5f", "size": 27455, "ext": "py", "lang": "Python", "max_stars_repo_path": "server.py", "max_stars_repo_name": "BaptistG/bern", "max_stars_repo_head_hexsha": "cff2e24ea19eed98b1c19ef30223324f41436319", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": 1, "m...
from typing import Optional, Tuple, Dict import numpy as np from my_ml.model._split_data_fast import _split_data class Node: def __init__( self, threshold: float = None, feature_j: int = None, leaf: bool = True, value: Optional[int] = None, ): """ Node...
{"hexsha": "6e79f9eb43e629097924cc6818a42c7ee992fd2d", "size": 12217, "ext": "py", "lang": "Python", "max_stars_repo_path": "my_ml/model/decision_tree.py", "max_stars_repo_name": "big-c-note/my_ml_from_scratch", "max_stars_repo_head_hexsha": "7da54282f736b163bb82058b037755bf97c9d7b9", "max_stars_repo_licenses": ["MIT"]...
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2017, Bielefeld University * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the followin...
{"hexsha": "cb1c17bb4687bba049b6c9f9c2c868dc63893918", "size": 42263, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "core/src/container.cpp", "max_stars_repo_name": "mvieth/moveit_task_constructor", "max_stars_repo_head_hexsha": "a590cde1287cc29defa308d8a81e765819d97206", "max_stars_repo_licenses": ["BSD-3-Clause...
import cv2 import numpy as np from keras.models import load_model import time import sys def web_cam(face_detector,model,src=0,vid_rec = False): """ Function for recognizing emotions in real time. Change src = 1, if you are using external camera as a source of image. """ cap = cv2.VideoCapture...
{"hexsha": "db3ba632028c43ae3548bc42f8dbf98c66e565cb", "size": 5922, "ext": "py", "lang": "Python", "max_stars_repo_path": "realtime.py", "max_stars_repo_name": "Toulik-Das/Facial-Expression-Recognition", "max_stars_repo_head_hexsha": "aafc7e47ccb6b6474fdd8405ef77ff8f60b8e4dd", "max_stars_repo_licenses": ["MIT"], "max_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import argparse import numpy as np norm = np.linalg.norm dot = np.dot cross = np.cross from scipy.interpolate import make_interp_spline, BSpline import matplotlib as mpl mpl.use('Agg') #silent mode from matplotlib import pyplot as plt from ase.io import read...
{"hexsha": "7cccee1d190cba28bf979c0fcdf8841642b02263", "size": 2962, "ext": "py", "lang": "Python", "max_stars_repo_path": "vasp/plot_mass_density.py", "max_stars_repo_name": "hsulab/DailyScripts", "max_stars_repo_head_hexsha": "26b03cfb721fd66f39c86df50d2ec5866e651d6e", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
\section{Introduction} \label{intro} The modules in this manual are available on the Apple Macintosh only. Aside from the modules described here there are also interfaces to various MacOS toolboxes, which are currently not extensively described. The toolboxes for which modules exist are: \module{AE} (Apple Events), \...
{"hexsha": "50688acf32e7bff015daabab9feae8ded8cb0dbe", "size": 3450, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Doc/mac/libmac.tex", "max_stars_repo_name": "1byte2bytes/cpython", "max_stars_repo_head_hexsha": "7fbaeb819ca7b20dca048217ff585ec195e999ec", "max_stars_repo_licenses": ["Unlicense", "TCL", "DOC", "A...
import numpy as np from sklearn.decomposition import PCA import networkx as nx from itertools import combinations import math import random class TSP_EucTransformer: def __init__(self) -> None: pass def load_TSP_from_nx(self, g): return np.array([g.nodes[k]['coord'] for k in g.nodes()]) ...
{"hexsha": "2a2cdc090ca184c1d331b04ac8f0a3fb3d2f374f", "size": 12614, "ext": "py", "lang": "Python", "max_stars_repo_path": "py_utils/TSP_transformer.py", "max_stars_repo_name": "dschaub95/FINDER-TSP", "max_stars_repo_head_hexsha": "d69ee6a954aac317b717622a9c0744e3f2827c64", "max_stars_repo_licenses": ["MIT"], "max_sta...
import logging import math import os import time import cv2 import django import numpy as np from dl import common from tradition.matcher.matcher import Matcher os.environ.setdefault("DJANGO_SETTINGS_MODULE", "main.settings") django.setup() from goods.models import ExportAction from django.conf import settings impo...
{"hexsha": "2ffa02235395108057145e0162597968fe4f91c9", "size": 11294, "ext": "py", "lang": "Python", "max_stars_repo_path": "dl/dataset/create_goods_data.py", "max_stars_repo_name": "huachao2017/goodsdl", "max_stars_repo_head_hexsha": "3616d53b90696a97a5d56a064e2a14d484b821d7", "max_stars_repo_licenses": ["Apache-2.0"]...
import os import sys import arcpy import traceback import math import numpy import Utils from scipy.spatial.distance import cdist def execute(in_hydrolines, hydro_field, in_counterparts, count_field, deviation, out_table): coords_hydro = Utils.get_coordinates(in_hydrolines) coords_count = Utils.get_coordinate...
{"hexsha": "80e80ae32be48e93731a852f476ce5af2ee1d0d0", "size": 2760, "ext": "py", "lang": "Python", "max_stars_repo_path": "LineDistances.py", "max_stars_repo_name": "tsamsonov/generalize-dem", "max_stars_repo_head_hexsha": "4e180944cd3488654240d47464cf8a0b8a7bc640", "max_stars_repo_licenses": ["Python-2.0", "OLDAP-2.7...
import cv2 import numpy as np from hypothesis import given from hypothesis.extra.numpy import arrays as h_arrays from hypothesis.strategies import integers as h_int from iglovikov_helper_functions.utils.mask_utils import ( binary_mask2coco, coco_rle_decode, coco_rle_encode, kaggle2coco, kaggle_rle_...
{"hexsha": "a4fd69a904cdf67966ed35425d684f84b1ed317a", "size": 9653, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_mask_utils.py", "max_stars_repo_name": "AIChuY/iglovikov_helper_functions", "max_stars_repo_head_hexsha": "46383c7a8b0f8dbdbf7907e119b6c2417877ad33", "max_stars_repo_licenses": ["MIT"],...
#MIT License # #Copyright (c) 2017 Willian Fuks # #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, publi...
{"hexsha": "f6caf5c633669ec14eb85d5df9db69f507507918", "size": 11174, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/system/spark_jobs/test_top_seller.py", "max_stars_repo_name": "WillianFuks/PySpark-RecSys", "max_stars_repo_head_hexsha": "756c8ce420143ac2483d8e6f959df4019a5479ee", "max_stars_repo_license...
# Authors: Xin Han <xinhan197@gmail.com> # Xichen Tang <xichentang2021@163.com> # Supported by Ye Zhu <ye.zhu@deakin.edu.au> # License: BSD 3 clause import numbers from warnings import warn import numpy as np from sklearn.base import BaseEstimator, OutlierMixin from sklearn.metrics import euclidean_...
{"hexsha": "6909ed7f815c1dbcc6c8a2aacff5baa534bca4b6", "size": 10127, "ext": "py", "lang": "Python", "max_stars_repo_path": "inne/_inne.py", "max_stars_repo_name": "xhan97/inne", "max_stars_repo_head_hexsha": "eb76204b27311b11e6121894f8b63572df65641b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": nul...
import numpy as np from numpy.random import random from scipy import interpolate # samples from poisson process with intensity mu. def homogenous_poisson(mu, t_previous): u = np.random.uniform(0, 1) t = t_previous - (np.log(1 - u) / mu) return t def thinning_T(start, intensity, lambda_max, T): n = 0...
{"hexsha": "57aade25bffdd54444fc323e10d0ef535ee2a81d", "size": 1974, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sampling_utils.py", "max_stars_repo_name": "douxiaotian/counterfactual-tpp", "max_stars_repo_head_hexsha": "605f250d888b39ef100dfba14d4522c088a80c3a", "max_stars_repo_licenses": ["MIT"], "max_...
subroutine qzhes(nm,n,a,b,matz,z) c integer i,j,k,l,n,lb,l1,nm,nk1,nm1,nm2 double precision a(nm,n),b(nm,n),z(nm,n) double precision r,s,t,u1,u2,v1,v2,rho logical matz c c this subroutine is the first step of the qz algorithm c for solving generalized matrix eigenvalue problems, c ...
{"hexsha": "1b97d793374cec4361152bf76e28648c5954b1e0", "size": 5247, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/fea/Source/mathops/qzhes.f", "max_stars_repo_name": "ananthsridharan/vtol_sizing", "max_stars_repo_head_hexsha": "3f754e1bd3cebdb5b5c68c8a2d84c47be1df2f02", "max_stars_repo_licenses": ["MIT"],...
# -*- coding:utf-8 -*- # By tostq <tostq216@163.com> # 博客: blog.csdn.net/tostq from hmmlearn.hmm import MultinomialHMM import numpy as np import hmm dice_num = 3 x_num = 8 dice_hmm = hmm.DiscreteHMM(3, 8) dice_hmm.start_prob = np.ones(3)/3.0 dice_hmm.transmat_prob = np.ones((3,3))/3.0 dice_hmm.emission_prob = np.array...
{"hexsha": "0bbc6cc0ba578da50b8f2adf1722083bf18dbf67", "size": 1011, "ext": "py", "lang": "Python", "max_stars_repo_path": "Common_Algorithms/HMM/Dice_01.py", "max_stars_repo_name": "xrick/WolfNLP", "max_stars_repo_head_hexsha": "ff59be5a180813e7127c7eaf52db2478c20e8431", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from __future__ import print_function from future.utils import iteritems import pytest import xarray as xr import numpy as np from xarray.testing import assert_allclose, assert_equal from xgcm.autogenerate import generate_axis, generate_grid_ds, \ _parse_boundary_params, _parse_position, \ _position_to_relati...
{"hexsha": "79ef475eff8d94ce382901718b350159bf299cd6", "size": 14414, "ext": "py", "lang": "Python", "max_stars_repo_path": "xgcm/test/test_autogenerate.py", "max_stars_repo_name": "roxyboy/xgcm", "max_stars_repo_head_hexsha": "6ec73e1ddfe08c8c2828ff6ffd39464300f7ed89", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
function pass = test_roots08( pref ) % Check that the marching squares and Bezoutian agree with each other. if ( nargin < 1 ) pref = chebfunpref; end tol = 1e3 * pref.cheb2Prefs.chebfun2eps; j = 1; %% f = chebfun2(@(x,y)sin(10*x-y/10)); g = chebfun2(@(x,y)cos(3*x.*y)); r1 = roots([f;g],'ms'); r2 = roots([f...
{"author": "chebfun", "repo": "chebfun", "sha": "8c49396a55e46ddd57a1d108c6a8f32e37536d54", "save_path": "github-repos/MATLAB/chebfun-chebfun", "path": "github-repos/MATLAB/chebfun-chebfun/chebfun-8c49396a55e46ddd57a1d108c6a8f32e37536d54/tests/chebfun2v/test_roots08.m"}
import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt import numpy as np import random import torch true_w = [2, -3.4] true_b = 4.2 num_inputs = 2 # 生成数据集 def generate_dataset(true_w, true_b): num_examples = 1000 features = torch.tensor(np.random.normal(0, 1, (num_examples, num_inputs))...
{"hexsha": "d9c5c1a6b1d0cfb903c7c02bfd3a475ce0b4d936", "size": 2306, "ext": "py", "lang": "Python", "max_stars_repo_path": "d2l/3_linear_regression_raw.py", "max_stars_repo_name": "wdxtub/deep-learning-note", "max_stars_repo_head_hexsha": "47b83a039b80d4757e0436d5cbd2fa3037de3904", "max_stars_repo_licenses": ["MIT"], "...
import numpy as np import copy, os, math, time from collections import defaultdict from collections.abc import Iterable import torch from torch import nn, optim from torch.distributions import Categorical from torchvision.transforms import transforms from AdapAug.data import get_dataloaders, Augmentation from AdapAug.t...
{"hexsha": "507659354875b30ab42b5b3f650652d9ed94266d", "size": 17265, "ext": "py", "lang": "Python", "max_stars_repo_path": "AdapAug/group_assign.py", "max_stars_repo_name": "yongsu-bloo/AdapAug", "max_stars_repo_head_hexsha": "074793f9e34c2d4968f7e863198bcb316be55da4", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#include "bufferdrawcall.h" #include "primitivetopology.h" #include "typeutils.h" #include <boost/core/ignore_unused.hpp> // boost::ignore_unused NAMESPACE_BEGIN(sway) NAMESPACE_BEGIN(gl) /*! * \brief * Переводит тип топологии (режим отображение примитива) в GL. */ GLenum BufferDrawCall::translateTopologyToGLen...
{"hexsha": "e2156910d7e19c9b9a7f834f14415839b7aa09d9", "size": 2333, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/gl/bufferdrawcall.cpp", "max_stars_repo_name": "timcogames/Sway.Framework", "max_stars_repo_head_hexsha": "e59c3ddaaafd849fa683e8d99ec0cd297c3806dc", "max_stars_repo_licenses": ["MIT"], "max_sta...
myTestRule { *status_original = $status; $status = *status_original + 1; *status_updated = $status; if (*status_original != *status_updated) { failmsg(-1, "\$status variable explicily changed inside rule"); } } INPUT null OUTPUT ruleExecOut
{"hexsha": "1431f8e07dd13842ba1b05a07a622b704f23a396", "size": 270, "ext": "r", "lang": "R", "max_stars_repo_path": "iRODS/clients/icommands/test/rules3.0/ruleTestChangeSessionVar.r", "max_stars_repo_name": "iychoi/cyverse-irods", "max_stars_repo_head_hexsha": "0070b8677a82e763f1d940ae6537b1c8839a628a", "max_stars_repo...
[STATEMENT] lemma conv_abscissa_add_le: "conv_abscissa (f + g :: 'a :: dirichlet_series fds) \<le> max (conv_abscissa f) (conv_abscissa g)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. conv_abscissa (f + g) \<le> max (conv_abscissa f) (conv_abscissa g) [PROOF STEP] by (rule conv_abscissa_leI_weak) (auto intro!: ...
{"llama_tokens": 159, "file": "Dirichlet_Series_Dirichlet_Series_Analysis", "length": 1}
import os import time import argparse import importlib import tensorflow as tf import tensorflow.contrib as tc from visualize import * from scipy.misc import imsave class WassersteinGAN(object): def __init__(self, g_net, d_net, x_sampler, z_sampler, data, model): self.model = model self.data = da...
{"hexsha": "f7ef8c32245a7a2db8e133a764b981d932f0453c", "size": 4668, "ext": "py", "lang": "Python", "max_stars_repo_path": "wgan.py", "max_stars_repo_name": "hamiz-ahmed/Wasserstein-GAN", "max_stars_repo_head_hexsha": "f8f813569715229954b5dced12b830c07c547ce1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
#!/usr/bin/env python3 """ The script runs experiments to compare the performance of ALBL and other active learning algorithms. """ import copy import os import numpy as np import matplotlib.pyplot as plt try: from sklearn.model_selection import train_test_split except ImportError: from sklearn.cross_validati...
{"hexsha": "35fbddd6bb1a8e3d6c4683488129446da58b08a6", "size": 5414, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/albl_plot.py", "max_stars_repo_name": "afedyukova/libact", "max_stars_repo_head_hexsha": "947f92d42690bfae758180e8809ccd5252e656df", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star...
\section{inc1}
{"hexsha": "d599f42a0b51a0e53173d71eaf27b9f021874fc8", "size": 15, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "spec/fixtures/master-tex-finder/multiple-masters/inc1.tex", "max_stars_repo_name": "harmsk/atom-make-latex", "max_stars_repo_head_hexsha": "353e5c34b225795f3e96b3b7ef8a9142f63dd920", "max_stars_repo_l...
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
{"hexsha": "bc7ca07ba8e83afc03be97cfb29de8d4dd6d4532", "size": 7039, "ext": "py", "lang": "Python", "max_stars_repo_path": "oneflow/python/onnx/util.py", "max_stars_repo_name": "wanghongsheng01/framework_enflame", "max_stars_repo_head_hexsha": "debf613e05e3f5ea8084c3e79b60d0dd9e349526", "max_stars_repo_licenses": ["Apa...
import numpy as np from PIL import Image import paddle import paddle.vision.transforms as T paddle.set_device('cpu') def crop(image, region): # region: [i, j, h, w] cropped_image = T.crop(image, *region) return cropped_image class CenterCrop(): def __init__(self, size): self.size = size ...
{"hexsha": "4432d1f1e1bec20502c18f8aee848887e1f5035e", "size": 1534, "ext": "py", "lang": "Python", "max_stars_repo_path": "edu/class4/transforms.py", "max_stars_repo_name": "h1063135843/PaddleViT", "max_stars_repo_head_hexsha": "6f150b82d801b082cc7af09af396bfe2f6bf9987", "max_stars_repo_licenses": ["Apache-2.0"], "max...
import os from io import BytesIO import socket import numpy as np from loadit.misc import humansize from loadit.read_results import tables_in_pch, ResultsTable import logging log = logging.getLogger() def send_tables(connection, files, tables_specs): ignored_tables = set() for i, file in enumerate(files): ...
{"hexsha": "9f82fc28b867bb72c5c528b478a9ff1f392d1232", "size": 1717, "ext": "py", "lang": "Python", "max_stars_repo_path": "loadit/connection_tools.py", "max_stars_repo_name": "alvarosanz/loadit", "max_stars_repo_head_hexsha": "dee6b68397040a3c16d9a83ee6cbbadbfd5bff76", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# this file is for every temperature/redshift/blackbody related function import numpy as np import imageio as spm #accretion disk log temperature profile (R^{-3/4}) LOGSHIFT = 0.823959216501 # 3/4 log(3) def disktemp(sqrR,logT0): # sqrR is an array of R^2 # logT0 is log temperature (K) of accretion disk at I...
{"hexsha": "7cf422e3f09cda53b4fadaceceaf3aea1c8df37b", "size": 1069, "ext": "py", "lang": "Python", "max_stars_repo_path": "Starless/blackbody.py", "max_stars_repo_name": "IsaacW4/Advanced-GR", "max_stars_repo_head_hexsha": "0351c368321b1a2375e2d328347f79b513be4c08", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
/* * Copyright (c) 2017, Respective Authors. * * The MIT License * * 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 us...
{"hexsha": "d56df89baa8dc3bf09ac7063984bbffe37291f8c", "size": 15210, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "libraries/chain/include/eos/chain/chain_controller.hpp", "max_stars_repo_name": "kimziv/eos", "max_stars_repo_head_hexsha": "27281caffb4dccce766226adbe3dfdd047470168", "max_stars_repo_licenses": ["...
Load LFindLoad. From lfind Require Import LFind. From QuickChick Require Import QuickChick. From adtind Require Import goal33. Derive Show for natural. Derive Arbitrary for natural. Instance Dec_Eq_natural : Dec_Eq natural. Proof. dec_eq. Qed. Lemma conj11eqsynthconj3 : fo...
{"author": "yalhessi", "repo": "lemmaranker", "sha": "53bc2ad63ad7faba0d7fc9af4e1e34216173574a", "save_path": "github-repos/coq/yalhessi-lemmaranker", "path": "github-repos/coq/yalhessi-lemmaranker/lemmaranker-53bc2ad63ad7faba0d7fc9af4e1e34216173574a/benchmark/clam/_lfind_clam_lf_goal33_distrib_100_plus_assoc/lfindconj...
import numpy as np from keras.optimizers import SGD from ..agent import Agent __all__ = [ 'ZeroAgent', ] # tag::branch_struct[] class Branch: def __init__(self, prior): self.prior = prior self.visit_count = 0 self.total_value = 0.0 # end::branch_struct[] # tag::node_class_defn[] cl...
{"hexsha": "c0a5233b41043ff62c2050c5390890a704416665", "size": 6056, "ext": "py", "lang": "Python", "max_stars_repo_path": "go/dlgo/zero/agent.py", "max_stars_repo_name": "huynq55/alpha-zero-general", "max_stars_repo_head_hexsha": "7c7b8a9a09b79178157ec6b6d379a071c9f0994a", "max_stars_repo_licenses": ["MIT"], "max_star...
import taichi as ti import math import time import numpy as np from plyfile import PlyData, PlyElement import os import utils from engine.mpm_solver import MPMSolver import argparse def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('-s', '--show', ...
{"hexsha": "a1f60a5fd187a7796e9ca3cfa6b9643571507eb1", "size": 6048, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo/demo_quantized_simulation_letters.py", "max_stars_repo_name": "victoriacity/taichi_elements", "max_stars_repo_head_hexsha": "31feb3219a519528531858b5a095732195723bf2", "max_stars_repo_license...
[STATEMENT] lemma Comp1: "\<lbrakk>secure c1; secure c2\<rbrakk> \<Longrightarrow> secure (Comp c1 c2)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>secure c1; secure c2\<rbrakk> \<Longrightarrow> secure (Comp c1 c2) [PROOF STEP] apply (simp only: secure_def Sem_def) [PROOF STATE] proof (prove) goal (1 su...
{"llama_tokens": 8568, "file": "SIFPL_VS_OBJ", "length": 27}
{-# LANGUAGE MagicHash, CPP, UnboxedTuples, BangPatterns, FlexibleContexts #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Packed.Internal.Vector -- Copyright : (c) Alberto Ruiz 2007 -- License : GPL-style -- -- Maintainer : Alberto Ruiz <aruiz@um....
{"hexsha": "5892e67a66a35b547da3b2af58a25a63aa1e7b0a", "size": 18349, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "benchmarks/hmatrix-0.15.0.1/lib/Data/Packed/Internal/Vector.hs", "max_stars_repo_name": "curiousleo/liquidhaskell", "max_stars_repo_head_hexsha": "a265c044159480b3ddedbbf4982736a33ec8872c", "max...
module ComplexPhasePortrait using Reactive, IntervalSets, RecipesBase import AbstractPlotting import Images import Colors import Colors: RGB, HSL import AbstractPlotting: plot!, Scene, AbstractScene, ScenePlot export portrait, PTproper, PTcgrid, PTstepphase, PTstepmod, phaseplot export (..) abstract type Portr...
{"hexsha": "381cb9f0e56448a880157ed167bae999fd18345a", "size": 5665, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ComplexPhasePortrait.jl", "max_stars_repo_name": "JuliaTagBot/ComplexPhasePortrait.jl", "max_stars_repo_head_hexsha": "7c78c270460d2f24d3778a2782ad2d71f24de821", "max_stars_repo_licenses": ["MI...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # intControler.py # # Part of MARK II project. For informations about license, please # see file /LICENSE . # # author: Vladislav Mlejnecký # email: v.mlejnecky@seznam.cz from memitem import memitem import numpy, sys class intControler(memitem): def __init__(self...
{"hexsha": "27fd111ce762d30151c5e2adea1c3059dd729e96", "size": 2264, "ext": "py", "lang": "Python", "max_stars_repo_path": "toolchain/m2tools/src/emulator/cpu/intControler.py", "max_stars_repo_name": "VladisM/MARK_II-SoC", "max_stars_repo_head_hexsha": "58a441675729d4036b503c2a4743fd181daaf5af", "max_stars_repo_license...
[STATEMENT] lemma (in Order) BNTr7_10:"\<lbrakk>S_inductive_set D; f \<in> carrier D \<rightarrow> carrier D; a \<in> carrier D; \<forall>x\<in>carrier D. x \<preceq> (f x); W \<in> WWa D f a; Sup D W \<notin> W\<rbrakk> \<Longrightarrow> \<not> ExPre (Iod D (insert (Sup D W) W)) (Sup D W)" [PROO...
{"llama_tokens": 21142, "file": "Group-Ring-Module_Algebra2", "length": 38}
import numpy as np import paddle.fluid as fluid import sys import math from time import time class NeuMF(object): def net(self, inputs, num_users, num_items, latent_dim, layers = [64,32,16,8]): num_layer = len(layers) #Number of layers in the MLP MF_Embedding_User = fluid.embeddin...
{"hexsha": "5330e2789d05d3ea61f50ef67054ae23166a9c2f", "size": 3740, "ext": "py", "lang": "Python", "max_stars_repo_path": "PaddleRec/ncf/neumf.py", "max_stars_repo_name": "suytingwan/models", "max_stars_repo_head_hexsha": "ccdbfe77d071cc19b55fb9f4b738912e35d982ef", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
using MarketData facts("TimeVector construction") do context("TimeVectors are constructed") do @fact true --> true end end
{"hexsha": "7cdbd52c0bc32942273b716fa7aadaa4d8914f31", "size": 141, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/timevector.jl", "max_stars_repo_name": "milktrader/TimeVectors.jl", "max_stars_repo_head_hexsha": "98426863fe3f8e534ff0199ce60ca8cb7e11fcde", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import collections import copy import math import random from pathlib import Path import numpy as np import torch import torch.nn.functional as F import torch.optim as optim from torch.utils.tensorboard import SummaryWriter from tqdm import tqdm class ReplayMemory(): def __init__(self, memory_size): self...
{"hexsha": "12f1cdaf3cc346c33d28c491031461acdb6b53c8", "size": 11710, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/learning_network/dqn_trainer.py", "max_stars_repo_name": "kingsleykuan/moral-driving-agent", "max_stars_repo_head_hexsha": "43fcb8b7f1dc403842a477dfa8f9b92b99fbb912", "max_stars_repo_licenses...
{-# OPTIONS --cubical --safe #-} module Cubical.Data.SumFin.Base where open import Cubical.Foundations.Prelude open import Cubical.Data.Empty using (⊥; ⊥-elim) public open import Cubical.Data.Unit using (tt) renaming (Unit to ⊤) public open import Cubical.Data.Sum using (_⊎_; inl; inr) public open import Cubical.Dat...
{"hexsha": "9df85e0e61a1b1355fcf4123a6f9f0afec58abf8", "size": 1282, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Cubical/Data/SumFin/Base.agda", "max_stars_repo_name": "limemloh/cubical", "max_stars_repo_head_hexsha": "df4ef7edffd1c1deb3d4ff342c7178e9901c44f1", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np import random import cv2 as cv from random import choice import math import matplotlib.pyplot as plt def draw_gt(im,gt=None,savefig_path='./',clip_box=None): dpi = 80.0 figsize = (im.shape[1]/dpi, im.shape[0]/dpi) fig = plt.figure(frameon=False, figsize=figsize, dpi=dpi) ax...
{"hexsha": "0e5a15133025cb9f10038ba3c739ae3692a7cc63", "size": 13842, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytracking-master/ltr/dataset/generate_vedio.py", "max_stars_repo_name": "wsumel/AMMC", "max_stars_repo_head_hexsha": "ef101878b4a97f07984186ea09146348c0526fa6", "max_stars_repo_licenses": ["Apac...
{-# OPTIONS --cubical --safe #-} module Cubical.Structures.Everything where open import Cubical.Structures.Pointed public open import Cubical.Structures.InftyMagma public open import Cubical.Structures.Monoid public open import Cubical.Structures.Queue public open import Cubical.Structures.TypeEqvTo public
{"hexsha": "1896bd25e99bf749dfc3cdc646040e1978b196c4", "size": 310, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Cubical/Structures/Everything.agda", "max_stars_repo_name": "borsiemir/cubical", "max_stars_repo_head_hexsha": "cefeb3669ffdaea7b88ae0e9dd258378418819ca", "max_stars_repo_licenses": ["MIT"], "max_s...
(* Title: HOL/Algebra/Solvable_Groups.thy Author: Paulo Emílio de Vilhena *) theory Solvable_Groups imports Generated_Groups begin section \<open>Solvable Groups\<close> subsection \<open>Definitions\<close> inductive solvable_seq :: "('a, 'b) monoid_scheme \<Rightarrow> 'a set \<Rightarrow> bo...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/Algebra/Solvable_Groups.thy"}
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' WARNINGS: 1. This is much much slower than pcl! 2. Open3d.Visualizer() currently doesn't have a function of "destroy_geometry", something similar to the "removePointCloud" in pcl. I'm manually copy new_point_cloud's content to the one for visualization { def ...
{"hexsha": "daada737457b412885880bc8c9c991bb6d2feb9d", "size": 2731, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_ros/sub_cloud_and_display_by_open3d.py", "max_stars_repo_name": "lachlanchumbley/3D-Scanner-by-Baxter", "max_stars_repo_head_hexsha": "61803b31f986252e8590763a747205562108e633", "max_stars_re...
# MIT License # # Copyright (c) 2021 Pierre-Yves Taunay # # 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, modif...
{"hexsha": "a9955846721b94c6b94d57147317404b04602540", "size": 7201, "ext": "py", "lang": "Python", "max_stars_repo_path": "article/4_discussion/theoretical-fit_xvalidated-selection.py", "max_stars_repo_name": "pytaunay/total-pressure-cathodes-controlling-mechanisms", "max_stars_repo_head_hexsha": "fa4889d70096efc16acf...
#!/usr/bin/env julia # Given some model parameters, plot the channel maps and # integrated spectrum using ArgParse s = ArgParseSettings() @add_arg_table s begin "--config" help = "a YAML configuration file" default = "config.yaml" end parsed_args = parse_args(ARGS, s) import YAML config = YAML.load(ope...
{"hexsha": "9e4e857b8e5a9cc63415bde939357ca25b5d45b8", "size": 3180, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/plot_tausurf.jl", "max_stars_repo_name": "elnjensen/DiskJockey", "max_stars_repo_head_hexsha": "ef618d27c2aff9b0540b0e00035b9a4dbfea1968", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
/* Copyright (c) 2012, Julian Straub <jstraub@csail.mit.edu> * Licensed under the MIT license. See LICENSE.txt or * http://www.opensource.org/licenses/mit-license.php */ #pragma once #include <hdp_var.hpp> #include <hdp_var_base_py.hpp> #include <assert.h> #include <stddef.h> #include <stdint.h> #include <typeinf...
{"hexsha": "f40f5e0e7699cad1d129f93e3a5a74f04a0c6a7b", "size": 3657, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/hdp_var_py.hpp", "max_stars_repo_name": "jstraub/bnp", "max_stars_repo_head_hexsha": "11cd28b49e9cf1db96f349181aff57a17672b6a4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12.0, ...
# Test methods with long descriptive names can omit docstrings # pylint: disable=missing-docstring import time import unittest import numpy as np from AnyQt.QtCore import QEvent, QPoint, Qt from AnyQt.QtGui import QMouseEvent from Orange.data import ( Table, DiscreteVariable, Domain, ContinuousVariab...
{"hexsha": "6a695badaa14fc1a542909a3ef746182c9db5286", "size": 15904, "ext": "py", "lang": "Python", "max_stars_repo_path": "orange3/Orange/widgets/visualize/tests/test_owmosaic.py", "max_stars_repo_name": "rgschmitz1/BioDepot-workflow-builder", "max_stars_repo_head_hexsha": "f74d904eeaf91ec52ec9b703d9fb38e9064e5a66", ...
[STATEMENT] lemma Maclaurin_all_lt: fixes x :: real assumes INIT1: "diff 0 = f" and INIT2: "0 < n" and INIT3: "x \<noteq> 0" and DERIV: "\<forall>m x. DERIV (diff m) x :> diff(Suc m) x" shows "\<exists>t. 0 < \<bar>t\<bar> \<and> \<bar>t\<bar> < \<bar>x\<bar> \<and> f x = (\<Sum>m<n. (diff m 0 /...
{"llama_tokens": 5530, "file": null, "length": 34}
import numpy as np from sklearn.base import ClassifierMixin, RegressorMixin from ngboost.ngboost import NGBoost class NGBRegressor(NGBoost, RegressorMixin): """NGBoost for regression with Sklean API.""" pass class NGBClassifier(NGBoost, ClassifierMixin): """NGBoost for classification with Sklean API. ...
{"hexsha": "7c1283763bb7cb80ea67ff492f244766dfe390c2", "size": 534, "ext": "py", "lang": "Python", "max_stars_repo_path": "ngboost/sklearn_api.py", "max_stars_repo_name": "kryptonite0/ngboost", "max_stars_repo_head_hexsha": "63edbf86de68a46dac601b50562d1ffa4a408f74", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
# -*- coding: utf-8 -*- """ Created on Sat Feb 20 09:51:24 2021 @author: ryanar """ import os import random import numpy as np import pandas as pd import tensorflow as tf from pprint import pprint from pylab import plt, mpl plt.style.use('seaborn') from keras.preprocessing.sequence import TimeseriesGenerator from k...
{"hexsha": "3e7be51552cf496a8aa7d756019967c053053f1c", "size": 1864, "ext": "py", "lang": "Python", "max_stars_repo_path": "stock_analysis/stock_neuralnetwork.py", "max_stars_repo_name": "RyanArnasonML/stock-analysis", "max_stars_repo_head_hexsha": "a5c79d9c438f095dc370f2db4e4780356cdc5d01", "max_stars_repo_licenses": ...
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt train_df = pd.read_csv('train.csv', index_col=0) test_df = pd.read_csv('test.csv', index_col=0) # step 2: 合并数据 # fig = plt.figure() train_df.head() prices = pd.DataFrame({"price":train_df["SalePrice"], "log(price + 1)":np....
{"hexsha": "796310d32a336ce01c4dfe0cb6f9bdf419d179bb", "size": 777, "ext": "py", "lang": "Python", "max_stars_repo_path": "kaggle/house/house.py", "max_stars_repo_name": "xiabodan/learning", "max_stars_repo_head_hexsha": "16282ffd554a5b5a721a5002361de0c8e725ad79", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
from random import randrange, uniform import numpy as np from numpy import sin, sqrt, cumsum import matplotlib.pyplot as plt class SyntheticData: def __init__(self): dt = 0.01 max = 70 self.t = np.linspace(0, max, max / dt) accX_var_best = 0.0005 # meters / second ^ 2 ac...
{"hexsha": "bacbcff077df43575797e002a4dc447097ed9ebe", "size": 2479, "ext": "py", "lang": "Python", "max_stars_repo_path": "generator_synthetic_data.py", "max_stars_repo_name": "mihaigalos/DrivingKalman", "max_stars_repo_head_hexsha": "c6bff74d1c7cd1994fe941a5a95a3a0e260c00d1", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma (in infinite_cts_filtration) fixes X::"nat \<Rightarrow> bool stream \<Rightarrow> ('b::t2_space)" assumes "borel_adapt_stoch_proc F X" and "r\<in> range (proj_stoch_proc X n)" shows stream_space_single_set: "stream_space_single (proj_stoch_proc X n) r \<in> sets (stream_space borel)" and stream_s...
{"llama_tokens": 2141, "file": "DiscretePricing_Infinite_Coin_Toss_Space", "length": 14}
# -*- coding: utf-8 -*- # ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 Ahmet Bakan # # 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 th...
{"hexsha": "5a797c97bd6e75186c9822bf494d3775855da0a3", "size": 11319, "ext": "py", "lang": "Python", "max_stars_repo_path": "prody/trajectory/trajbase.py", "max_stars_repo_name": "gokceneraslan/ProDy", "max_stars_repo_head_hexsha": "74d40c372c53bd68f5e9f9c47b991b2e2b1b9f27", "max_stars_repo_licenses": ["NCSA"], "max_st...
/* Copyright (c) 2005-2019, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
{"hexsha": "708d136f069af95215b0f43a7e3c0866e2ce5f7f", "size": 6493, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "crypt/src/cell/cycle/AbstractWntOdeBasedCellCycleModel.hpp", "max_stars_repo_name": "AvciRecep/chaste_2019", "max_stars_repo_head_hexsha": "1d46cdac647820d5c5030f8a9ea3a1019f6651c1", "max_stars_repo...
[STATEMENT] lemma state_ok_init: "\<lbrakk> wf_java_prog G; (x, h, l)::\<preceq>(env_of_jmb G C S); is_class G dynT; method (G, dynT) (mn, pTs) = Some (md, rT, pns, lvars, blk, res); list_all2 (conf G h) pvs pTs; G,h \<turnstile> a' ::\<preceq> Class md\<rbrakk> \<Longrightarrow> (np a' x, h, init_vars lv...
{"llama_tokens": 10527, "file": null, "length": 12}
import numpy as np from trescope import Trescope from trescope.config import GraphConfig from trescope.toolbox import simpleDisplayOutputs def plot_graph(): Trescope().initialize(True, simpleDisplayOutputs(1, 3)) (Trescope() .selectOutput(0) .plotGraph( vertex=np.array([[255, 0, 0, 0xf...
{"hexsha": "210e3a3dccd521396f02c1f137e5c1774ff4e9f2", "size": 982, "ext": "py", "lang": "Python", "max_stars_repo_path": "Trescope4Python/example/src/example_plot_graph.py", "max_stars_repo_name": "aaabbb2021/Trescope", "max_stars_repo_head_hexsha": "629dd526572b4883608fd12cc06738b0e83fe775", "max_stars_repo_licenses"...
\documentclass{article} \usepackage{fullpage} \usepackage{nopageno} \usepackage{amsmath} \usepackage{amssymb} \allowdisplaybreaks \newcommand{\abs}[1]{\left\lvert #1 \right\rvert} \begin{document} \title{Notes} \date{January 31, 2014} \maketitle \section*{homework} due on feb 7. \subsection*{hw 6} lesson 5 number 3, ...
{"hexsha": "6b173f64c6585523a74e8979e3a2c5e2cf3f165b", "size": 3547, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "partial differential equations/pde-notes-2014-01-31.tex", "max_stars_repo_name": "ylixir/school", "max_stars_repo_head_hexsha": "66d433f2090b6396c8dd2a53a733c25dbe7bc90f", "max_stars_repo_licenses":...
import numpy as np import os import io # import for server from flask import Flask, render_template, request, Response, send_file, jsonify from queue import Queue, Empty import threading import time # import for model from transformers import AutoTokenizer, AutoModelWithLMHead, top_k_top_p_filtering from torch.nn imp...
{"hexsha": "1b51dd6e4c6739d381e9eb43ec055f699275f818", "size": 4919, "ext": "py", "lang": "Python", "max_stars_repo_path": "server.py", "max_stars_repo_name": "gmlee329/gpt2_tweet", "max_stars_repo_head_hexsha": "7b5bc699cc74bb7586007a3333ff4427e2dd5110", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nu...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import os import shutil import pandas as pd import numpy as np from tempfile import TemporaryDirectory from fclib.dataset.ojdata import download_ojdata, complete_and_fill_df, _gen_split_indices, split_train_test # data file that will be create...
{"hexsha": "74e0e7a5e73859ed6ba0e403fb52711301cca7a6", "size": 3447, "ext": "py", "lang": "Python", "max_stars_repo_path": "fclib/tests/test_ojdata.py", "max_stars_repo_name": "barrosm/forecasting", "max_stars_repo_head_hexsha": "86b421b71826b92e47c3e3cb6cdcbf7ff4a63b90", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# Message digest constants from mbedtls_md_type_t enum in md.h @enum(MDKind, MD_NONE=0, MD_MD2, MD_MD4, MD_MD5, MD_SHA1, MD_SHA224, MD_SHA256, MD_SHA384, MD_SHA) type MDInfo data::Ptr{Void} end type MD{IsHMAC} <: IO data::Ptr{Void} info::MDInfo fu...
{"hexsha": "af627308444323a581e02147965837d076fc585b", "size": 5752, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/md.jl", "max_stars_repo_name": "joshbode/MbedTLS.jl", "max_stars_repo_head_hexsha": "4a923291d3eab091fe85eba6a7f521500e1e8870", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nul...
theory Chapter5 imports "~~/src/HOL/IMP/ASM" begin (* Exercise 5.1. Give a readable, structured proof of the following lemma: *) lemma assumes T : "\<forall> x y. T x y \<or> T y x" and A: "\<forall> x y. A x y \<and> A y x \<longrightarrow> x = y" and TA: "\<forall> x y. T x y \<longrightarrow> A x y" and "A x y" ...
{"author": "rasheedja", "repo": "concrete-semantics", "sha": "65997b65adccf690f076a79291aa643e2d1a9d43", "save_path": "github-repos/isabelle/rasheedja-concrete-semantics", "path": "github-repos/isabelle/rasheedja-concrete-semantics/concrete-semantics-65997b65adccf690f076a79291aa643e2d1a9d43/Chapter5.thy"}
[STATEMENT] lemma summable_countable_complex: fixes f :: \<open>'a \<Rightarrow> complex\<close> assumes \<open>f summable_on A\<close> shows \<open>countable {x\<in>A. f x \<noteq> 0}\<close> [PROOF STATE] proof (prove) goal (1 subgoal): 1. countable {x \<in> A. f x \<noteq> 0} [PROOF STEP] using abs_summable_c...
{"llama_tokens": 277, "file": null, "length": 2}
#****************** # MODULE DOCSTRING #****************** """ LOMAP: Graph generation ===== Alchemical free energy calculations hold increasing promise as an aid to drug discovery efforts. However, applications of these techniques in discovery projects have been relatively few, partly because of the difficulty of...
{"hexsha": "868338083fafd2d181c6a81625007ff021652a7d", "size": 39722, "ext": "py", "lang": "Python", "max_stars_repo_path": "lomap/graphgen.py", "max_stars_repo_name": "ppxasjsm/Lomap", "max_stars_repo_head_hexsha": "f960c1bcd3caca1bc008e93a36880a8fe35bf1cf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
"""Keras models modules.""" from keras.models import Sequential, load_model from keras.layers import Dense from sklearn.metrics import classification_report from keras import optimizers import numpy as np from keras.layers import Activation, Convolution2D, Dropout, Input, Flatten from keras.layers import AveragePoolin...
{"hexsha": "4e4c34fc120fb45b655a69ec7f120534804b7e7a", "size": 9049, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lib/models.py", "max_stars_repo_name": "Yepikae/fee", "max_stars_repo_head_hexsha": "36f885ffc718aa92eff97020e315769aaaaeed55", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars...
# -*- coding: utf-8 -*- import os import numpy as np import tensorflow as tf class Preprocessing: def __init__(self): filename = '../glove.6B.50d.txt' # Load Glove pretrained vocabulary embedding_vocabulary = self.load_glove(filename) vocab_size = len(embedding_vocabulary) ...
{"hexsha": "cf4e0f54fbaa6a6975d3e5dff84eeeae25538cb6", "size": 2084, "ext": "py", "lang": "Python", "max_stars_repo_path": "WiSe17-18/preprocessing/load_data_glove.py", "max_stars_repo_name": "buraktekin/nn_german_pos_tagger", "max_stars_repo_head_hexsha": "da9a611b4ba58da7d7ada3d440299bdf7bb17536", "max_stars_repo_lic...
// GMTL is (C) Copyright 2001-2010 by Allen Bierbaum // Distributed under the GNU Lesser General Public License 2.1 with an // addendum covering inlined code. (See accompanying files LICENSE and // LICENSE.addendum or http://www.gnu.org/copyleft/lesser.txt) // Includes =================================================...
{"hexsha": "59566fba99d867c975d2c1ab4dc7c6ac0ac74801", "size": 1854, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "gmtl-0.6.1/python/src/gmtl/_gmtl_EulerAngleOps_h.cpp", "max_stars_repo_name": "Glitch0011/QuadTree-Example", "max_stars_repo_head_hexsha": "3558c999f68475bc98b8fa33b0f6d14076c9ec48", "max_stars_repo...
from typing import Tuple import numpy as np import copy def prevent_zeros(value): """ this ensures that the value does not contain zeros. it can be used to prevent division by zero. :param value: scalar or array-like :return: value without zeros """ if np.isscalar(value): return...
{"hexsha": "68aa18c6fe9668907f063c956b29ad2939f04952", "size": 3727, "ext": "py", "lang": "Python", "max_stars_repo_path": "datamodels/processing/shape.py", "max_stars_repo_name": "aleksapand/timeseriesmodeling", "max_stars_repo_head_hexsha": "3a0c4e3bab7b7919f322dee79f11b3855885fff2", "max_stars_repo_licenses": ["MIT"...
# Copyright 2020, The TensorFlow 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 or agreed t...
{"hexsha": "eb672c3c6cff8447a097c34a40254e307dbe542d", "size": 8113, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_privacy/privacy/membership_inference_attack/models_test.py", "max_stars_repo_name": "jagielski/privacy", "max_stars_repo_head_hexsha": "e468af41dd11176f3f04eabc42cf5574b904784a", "max_s...
import torch from torch.utils.data import Dataset, DataLoader import torch.multiprocessing as mp import glob from .load_manta_data import loadMantaFile import numpy as np class FluidNetDataset(Dataset): """Fluid Net dataset.""" def __init__(self, conf, prefix, save_dt, preprocess=False, resume=False, pr_n_thr...
{"hexsha": "bf35f8e402daf96ebb013e6c4ac87e2676f5c266", "size": 7663, "ext": "py", "lang": "Python", "max_stars_repo_path": "neural_models/dataset_managers/dataset.py", "max_stars_repo_name": "ajupatatero/neurasim", "max_stars_repo_head_hexsha": "c1d3f8163a7389b06a13e453daa98ad5157d9b2e", "max_stars_repo_licenses": ["MI...
#include <boost/spirit/include/classic_dynamic.hpp>
{"hexsha": "9237bb38ff43c4ad3121afc94365d40014165d53", "size": 52, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_spirit_include_classic_dynamic.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ...
using ..Continuations: AbstractContinuationProblem, AbstractContinuationSolver, AbstractContinuationCache, as, SweepSetup, ContinuationSweep, ContinuationSolution, ContinuationCache, ContinuationOptions, ContinuationSolver, residual_jacobian! using ..BifurcationsBase: timekind, Continuous, Discrete imp...
{"hexsha": "99ac943cb1b881cbb7c8f0a5669d768a441ea9e0", "size": 3636, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/codim2lc/solver.jl", "max_stars_repo_name": "jhardenberg/Bifurcations.jl", "max_stars_repo_head_hexsha": "cc1bfe55389efdfa0c4e6a817707c235afe1aea8", "max_stars_repo_licenses": ["MIT"], "max_sta...
[GOAL] α : Type u_1 Γ₀ : Type u_2 inst✝ : LinearOrderedCommGroupWithZero Γ₀ γ γ₁ γ₂ : Γ₀ l : Filter α f : α → Γ₀ ⊢ 𝓝 0 = ⨅ (γ : Γ₀) (_ : γ ≠ 0), 𝓟 (Iio γ) [PROOFSTEP] rw [nhds_eq_update, update_same] [GOAL] α : Type u_1 Γ₀ : Type u_2 inst✝ : LinearOrderedCommGroupWithZero Γ₀ γ γ₁ γ₂ : Γ₀ l : Filter α f : α → Γ₀ ⊢ Has...
{"mathlib_filename": "Mathlib.Topology.Algebra.WithZeroTopology", "llama_tokens": 6977}
--- ### Help guide Suppose we want to plot the function $f(x)=x^2+2$ in the interval $x\in[0,1]$. The following code should do it: ```python import matplotlib.pyplot as plt import numpy as np import math x = np.linspace(0,1,100) plt.plot(x,x**2+2) plt.show() ``` Suppose now that you want to plot the same curve as...
{"hexsha": "ba42671d9a1789ab0446f54e3e5a68d5b692753d", "size": 115730, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "math-in-python/Taylor and Riemann Zeta Series.ipynb", "max_stars_repo_name": "kapuragam/everyday-python", "max_stars_repo_head_hexsha": "61603eb31fceabea0f1d749274702dc32dc5bcae", "...
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
{"hexsha": "7ca7c8c7e94e21a65f6a651b6b26822e3f795359", "size": 23054, "ext": "py", "lang": "Python", "max_stars_repo_path": "qutip/tests/test_correlation.py", "max_stars_repo_name": "dweigand/qutip", "max_stars_repo_head_hexsha": "b57d5e4b4846880e894afa390c62f4d095c642e1", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
This Orange and Blue House is really kewl. It is very close B line bus stop and a park next to the elementary school. Comments 20050612 18:07:16 nbsp Woo! Im from the 323 also! NiareeHopelian
{"hexsha": "c5bac1dbdfee41f389dbcc7472bf85b0b5bb1974", "size": 195, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/MinervaCelesteCardona.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_sta...
/* ============================================================================ nRex ============================================================================ Copyright (C) 2016 Tobias Rausch This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as...
{"hexsha": "4e5fd64500fb1c6733fe84d8c06da7f4f860f3f8", "size": 17811, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/nRex.cpp", "max_stars_repo_name": "tobiasrausch/nRex", "max_stars_repo_head_hexsha": "b767aa290eb0093c07f3d45f64cf69b8b84f2b9c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4.0, "max...
import pandas as pd import numpy as np from keras.models import Sequential from keras.layers import Dense,Activation from keras.wrappers.scikit_learn import KerasClassifier from keras.utils import np_utils from sklearn.model_selection import cross_val_score,train_test_split from sklearn.model_selection import KFold fro...
{"hexsha": "1037d4fe08e16f0bb767fabad509409a956ac634", "size": 1692, "ext": "py", "lang": "Python", "max_stars_repo_path": "NN2.py", "max_stars_repo_name": "amrkh97/Arabic-OCR-Using-Python", "max_stars_repo_head_hexsha": "832fcd2be93369ebccfbcbb451a97d29a7946360", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
[STATEMENT] lemma return_time_implicit_functionE: fixes s::"'a::euclidean_space \<Rightarrow> real" assumes rt: "returns_to {x \<in> S. s x = 0} x" (is "returns_to ?P _") assumes cS: "closed S" assumes Ds: "\<And>x. (s has_derivative blinfun_apply (Ds x)) (at x)" assumes DsC: "\<And>x. isCont Ds x" assumes ...
{"llama_tokens": 69222, "file": "Ordinary_Differential_Equations_IVP_Poincare_Map", "length": 229}
# -*- coding: utf-8 -*- """ MPLD3 Plugin to convert a NetworkX graph to a force layout Copyright (C) 2016 Dheepak Krishnamurthy """ import mpld3 from networkx.readwrite.json_graph import node_link_data class NetworkXD3ForceLayout(mpld3.plugins.PluginBase): """A NetworkX to D3 Force Layout Plugin""" JAVASCRI...
{"hexsha": "cb569dd531e08ce5576f4295ec61288879fd78ef", "size": 11233, "ext": "py", "lang": "Python", "max_stars_repo_path": "psst/plot/plotmpld3.py", "max_stars_repo_name": "ayadabd000/psst", "max_stars_repo_head_hexsha": "8c116fb7afd183881ecc605e017dffc87cdc49e6", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
"""Utility code to help with testing """ import base64 import json import numpy as np import os def _json_numpy_obj_hook(dct): """ Decodes a previously encoded numpy ndarray with proper shape and dtype :param dct: (dict) json encoded ndarray :return: (ndarray) if input was an encoded ndarray ""...
{"hexsha": "b53607e26dba6d2527bbf3991eae8dc0b10234b9", "size": 903, "ext": "py", "lang": "Python", "max_stars_repo_path": "quasielasticbayes/testing.py", "max_stars_repo_name": "mantidproject/quasielasticbayes", "max_stars_repo_head_hexsha": "016bdf9c6f9b9dc9cb71f5658b4244d7945e3238", "max_stars_repo_licenses": ["BSD-3...
using ReachabilityAnalysis, SparseArrays Dict([ "opts" => Dict(:T=>20.0, :alg=>GLGM06(δ=5e-3)), "X0" => Hyperrectangle(spzeros(28), sparsevec(1:8, fill(0.1, 8), 28)), "info" => Dict( "name" => "helicopter", "dim" => 28, "linear" => true, "continuous" => true, "domai...
{"hexsha": "19e8c2f085eeb1a7ea5f8f9b7c9dd8d6c160c7d6", "size": 1523, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/models/helicopter/helicopter_meta.jl", "max_stars_repo_name": "mforets/ReachabilityLibrary", "max_stars_repo_head_hexsha": "4beac279a071debb0765e415e583d4ab906db762", "max_stars_repo_licenses":...
[STATEMENT] lemma nprv_mono: assumes "nprv G \<phi>" and "F \<subseteq> fmla" "finite F" "G \<subseteq> F" "\<phi> \<in> fmla" shows "nprv F \<phi>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. nprv F \<phi> [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: nprv G \<phi> F \<subseteq> fmla finite F ...
{"llama_tokens": 321, "file": "Syntax_Independent_Logic_Natural_Deduction", "length": 3}
# -*- coding: utf-8 -*- # ''' Epidemiological models used for fitting/analyzing data. Derived classes have increasing ability to handle variable parameters which may be optimized. At this point, most capable is class ̀SEIRYOpt3`. ''' __author__ = 'Alain Lichnewsky' __license__ = 'MIT License' __version__ = '1.1' ...
{"hexsha": "7fa4285be8ab99238e560111625d386a4c009763", "size": 9153, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/lib/epidemioModels.py", "max_stars_repo_name": "AlainLich/COVID-Data", "max_stars_repo_head_hexsha": "43d7f950c86270bfe411af8bc899464f0599f48e", "max_stars_repo_licenses": ["MIT"], "max_sta...
include("../utils/point.jl") include("../utils/utils.jl") include("../utils/algorithms.jl") include("TwoPlayerGame.jl") include("AbreuSannikov.jl") using PlotlyJS # Examples of intersection function test1 = [Point(0.0, 0.0), Point(1.0, 0.1), Point(1.0, 1.0), Point(0.0, 1.0), Point(0.0, 0.0)] test2 = [Point(0...
{"hexsha": "b8c855804fc15cb612558281c947f3669c378de0", "size": 1035, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Examples/intersect_example.jl", "max_stars_repo_name": "cc7768/repeatedgames", "max_stars_repo_head_hexsha": "3841f6f9df9cb8f5206cf3a39fa281eaa27c7dac", "max_stars_repo_licenses": ["MIT"], "max_sta...
#! -*- coding: utf-8 -*- """ [client] python3 client.py --help """ #--------------------------------- # モジュールのインポート #--------------------------------- import sys import time import argparse import socket import numpy as np import cv2 #--------------------------------- # 定数定義 #---------------------------------...
{"hexsha": "7633df0f79cf9a7bc54b4c389c3bef5bdf7375a0", "size": 3658, "ext": "py", "lang": "Python", "max_stars_repo_path": "client.py", "max_stars_repo_name": "ryoma-jp/006.Python-Socket", "max_stars_repo_head_hexsha": "14c994351df40295248ee0724d5de34a18139bc6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
""" Trajectory visualizer and heatmap. """ from typing import Dict, List, Tuple import numpy as np from rlpy.tools import plt Point = np.ndarray _N_ROW_COLS = { 1: {"nrows": 1, "ncols": 1}, 2: {"nrows": 1, "ncols": 2}, 3: {"nrows": 2, "ncols": 2}, 4: {"nrows": 2, "ncols": 2}, 5: {"nrows": 2, "nc...
{"hexsha": "bca96833ddbff9458e9f7dad0ce72c68a8d3b94b", "size": 5313, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/vis_utils.py", "max_stars_repo_name": "kngwyu/infomax-option-critic", "max_stars_repo_head_hexsha": "9d907c041c1d0280db9b23eb2fdf9e0033e33bf3", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
from typing import Iterable, Dict import numpy as np from geopy.distance import great_circle import constants from utils import file class Proximity: def __init__(self, n_items: int): self.n_items = n_items self.distances = np.zeros(shape=(n_items, n_items)) self.distance_calculator = gre...
{"hexsha": "64d59782ee7b55a7f15f762e61b26b822aed9692", "size": 3753, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/proximity.py", "max_stars_repo_name": "dballesteros7/master-thesis-2015", "max_stars_repo_head_hexsha": "8c0bf9a6eef172fc8167a30780ae0666f8ea2d88", "max_stars_repo_licenses": ["MIT"], "...
#!/usr/bin/env python import numpy as np from spt3g import core from spt3g.maps import HealpixSkyMap # Simple in-place operators m = HealpixSkyMap(64) m[15] = 10 assert(m.ringsparse) m *= 5 m /= 25 assert(m[15] == 2) assert(m.ringsparse) assert(m[16] == 0) assert((-m).ringsparse) assert((-m)[15] == -2) m += 3 m -=...
{"hexsha": "f0fa1423dce7364c5c4e30307ac62eafdb4c1f60", "size": 3247, "ext": "py", "lang": "Python", "max_stars_repo_path": "maps/tests/healpixskymap_operators.py", "max_stars_repo_name": "tskisner/spt3g_software", "max_stars_repo_head_hexsha": "bf4ba191506842477490c6d2300caeafee5fe93d", "max_stars_repo_licenses": ["BSD...
[STATEMENT] lemma fold_graph_insertE_aux: "fold_graph f z B y \<Longrightarrow> a \<in> B \<Longrightarrow> z\<in>A \<Longrightarrow> B \<subseteq> A \<Longrightarrow> \<exists>y'. y = f a y' \<and> fold_graph f z (B - {a}) y' \<and> y' \<in> A" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>fold_gra...
{"llama_tokens": 6639, "file": "Jordan_Normal_Form_Missing_VectorSpace", "length": 61}
''' Original generate anchor script https://github.com/AlexeyAB/darknet/blob/master/scripts/gen_anchors.py ''' import numpy as np def compute_ious(boxes, clusters): ''' computer IoUs between N boxes and k clusters boxes:[N,2],2[w,h] clusters:[k,2],2:[w,h] ''' boxes_area = boxes[:, 0] * boxes[...
{"hexsha": "16ad6e7e89e7632b75fab84cfb91eabb274a3808", "size": 6500, "ext": "py", "lang": "Python", "max_stars_repo_path": "simpleAICV/detection/yolov3_anchor_cluster.py", "max_stars_repo_name": "zgcr/pytorch-ImageNet-CIFAR-COCO-voc-training", "max_stars_repo_head_hexsha": "c5878df46ac874097d1a5076a81cd7d41630fb98", "m...