text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
(****************************************************************************** Mixed distributive laws distributive laws in bicategories Monads in the bicategory of comonads are the same as mixed distributive laws ******************************************************************************) Require Import UniM...
{"author": "UniMath", "repo": "UniMath", "sha": "7de5cc98a7f6718af63a429ea88d80411eca2977", "save_path": "github-repos/coq/UniMath-UniMath", "path": "github-repos/coq/UniMath-UniMath/UniMath-7de5cc98a7f6718af63a429ea88d80411eca2977/UniMath/Bicategories/Monads/MixedDistributiveLaws.v"}
\documentclass[12pt]{article} \usepackage[margin=1.1in]{geometry} \input{../../syllabi/preamble} \newcommand{\coursedept}{Math} \newcommand{\coursenumber}{342W} \newcommand{\coursenumbercrosslisted}{/ 650.03~} \newcommand{\semester}{Spring} \newcommand{\numcredits}{6} \newcommand{\lectimeandloc}{Mon and Wed 5-6:50PM ...
{"hexsha": "0b5102bc4a5bb0cb7a8d9a8bf17304412a87063f", "size": 11666, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "syllabus/syllabus.tex", "max_stars_repo_name": "jakemanthebakeman/QC_MATH_342W_Spring_2021", "max_stars_repo_head_hexsha": "494c3dd2df6fb7647d0de5cd271eb85527ef0192", "max_stars_repo_licenses": ["M...
% Copyright (c) 2019, Betsalel (Saul) Williamson, Jordan Henderson (the Authors) % All rights reserved. % % Redistribution and use in source and binary forms, with or without % modification, are permitted provided that the following conditions are met: % * Redistributions of source code must retain the above copyri...
{"hexsha": "ad84b046f1fa088ed888c9cb0f989effce2b22f4", "size": 2912, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "latex-template/examples/listings.tex", "max_stars_repo_name": "betsalel-williamson/source-2-pdf", "max_stars_repo_head_hexsha": "e2087df98814a83f1b0810dd7e809b9c2dc47b98", "max_stars_repo_licenses":...
## SCENARIO PARTITION function GAPM(Ind_old, duals; α_val = 0.) dualRange = maximum(duals)-minimum(duals) MaxDiff = α_val*dualRange # Maximum difference between scenario duals NP = maximum(Ind_old) Scenarios = [duals Ind_old collect(1:N)] Ind,NsubParts = ones(N), 1 for p in 1:NP ...
{"hexsha": "0cc7e23b6cf050de97bf335bfcadd66b1922b616", "size": 935, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/functions/GAPM.jl", "max_stars_repo_name": "gonzalez-alvaro/MultidimensionalGAPM", "max_stars_repo_head_hexsha": "605ca8f13feb189b5932ac72a77504e65bbd02c7", "max_stars_repo_licenses": ["MIT"], "...
module MesoscaleML """ func(x) Returns double the number `x` plus `1`. """ func(x) = 2x + 1 export func end # module
{"hexsha": "2c947af19558a17c75bcb2133cb4f8d3ec09320e", "size": 124, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/MesoscaleML.jl", "max_stars_repo_name": "upiterbarg/MesoscaleML.jl", "max_stars_repo_head_hexsha": "5bb7f6d3ca431c63023efc5a9951f1cc16ad5f35", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy import scipy.special import csv import datetime import os from pathlib import Path # TODO Softmax Function for Output with cross entropy cost ''' Neural network that can have n amount of layers and nodes per layer. It can also have tanh, sigmoid or relu as an activation function for the hidden layers and...
{"hexsha": "84aed9b4f414938067cf5f010300d6e454c39dff", "size": 7033, "ext": "py", "lang": "Python", "max_stars_repo_path": "library/neural_network.py", "max_stars_repo_name": "sunilson/Neural-Network-Backpropagation", "max_stars_repo_head_hexsha": "4aabbe22cb11ded7506d722c447f442862bd9494", "max_stars_repo_licenses": [...
section \<open> Circus Trace Merge \<close> theory utp_circus_traces imports "UTP1-Stateful-Failures.utp_sf_rdes" begin subsection \<open> Function Definition \<close> fun tr_par :: "'\<theta> set \<Rightarrow> '\<theta> list \<Rightarrow> '\<theta> list \<Rightarrow> '\<theta> list set" where "tr_par cs [] [] =...
{"author": "isabelle-utp", "repo": "utp-main", "sha": "27bdf3aee6d4fc00c8fe4d53283d0101857e0d41", "save_path": "github-repos/isabelle/isabelle-utp-utp-main", "path": "github-repos/isabelle/isabelle-utp-utp-main/utp-main-27bdf3aee6d4fc00c8fe4d53283d0101857e0d41/theories/circus/utp_circus_traces.thy"}
from __future__ import print_function from __future__ import division import os import gdal import shutil import numpy as np def WriteRaster(InputArray, file_name, dimension): # create the 3-band raster file dst_ds = gdal.GetDriverByName('GTiff').Create(file_name, dimension, dimension, 13, gdal.GDT_Int16) ...
{"hexsha": "d42f6551dacbfd4e65c17fce193317b65a5548cc", "size": 3573, "ext": "py", "lang": "Python", "max_stars_repo_path": "labelling/get_all_images_from_large_images.py", "max_stars_repo_name": "annusgit/forestcoverUnet", "max_stars_repo_head_hexsha": "8ba4eafc6e5d637d3b08fa20d029e25173f96074", "max_stars_repo_license...
#!/usr/bin/env python # dp2mr.py import numpy as num from dp2e import dp2e from e2mr import e2mr def dp2mr(p,t,dp,Tconvert=None): """w = dp2mr(p,t,dp,Tconvert) compute water vapor mixing ratio (g/kg) given total pressure p (mb), air temperature t (K), and dew point temperature (K). if input, Tconvert is used as ...
{"hexsha": "3f8af490e8abbde1ed80e6b1260b78ac1b9533b0", "size": 2038, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyuwphysret/common/pyfiles/atmos/dp2mr.py", "max_stars_repo_name": "graziano-giuliani/pythoncode", "max_stars_repo_head_hexsha": "4e505af5be3e32519cf4e62b85c101a63c885f77", "max_stars_repo_license...
from time import time import numpy as np from pulp import LpMaximize, LpProblem, LpStatus, lpSum, LpVariable, LpMinimize import copy from verification.utils import massage_proj, LBFs_UBFs_onReLU, LBFs_UBFs_onSigmoid, solver_log_filename, lower_bound_from_logs, my_sigmoid, discretise_sigmoid_interval, get_solver from m...
{"hexsha": "10be0758f25fe8ca578c1c52b38a4ea012472d99", "size": 10745, "ext": "py", "lang": "Python", "max_stars_repo_path": "verification/global_v.py", "max_stars_repo_name": "eliasbenussi/nn-cert-individual-fairness", "max_stars_repo_head_hexsha": "d5298902190caccb91c2762e0c9d96f98b1fbb84", "max_stars_repo_licenses": ...
#!/usr/bin/env python3 # Copyright (c) 2021 CINN 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 r...
{"hexsha": "93109edc6283e27182393dff33ac4078f331b10a", "size": 3222, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/tests/ops/test_slice_op.py", "max_stars_repo_name": "Avin0323/CINN", "max_stars_repo_head_hexsha": "093217619c821e73cec15511fa54cb0026ed0476", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
\begin{abstract} \pagenumbering{roman} \setcounter{page}{1} \paragraph{} Unstructured data like doc, pdf, accdb is lengthy to search and filter for desired information. We need to go through every file manually for finding information. It is very time consuming and frustrating. It doesn’t need to be done this way if w...
{"hexsha": "c1f9a7648749a2a4c39e5accee3d505b29b6b2a5", "size": 1352, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/assignments/final-report/abstract.tex", "max_stars_repo_name": "arks-api/arks-api", "max_stars_repo_head_hexsha": "692093762bfd855a5ad72f2b23cced34b6827baf", "max_stars_repo_licenses": ["Apache-...
import argparse import os import sys from collections import defaultdict import numpy as np from mir_eval.multipitch import evaluate as evaluate_frames from mir_eval.transcription import precision_recall_f1_overlap as evaluate_notes from mir_eval.transcription_velocity import precision_recall_f1_overlap as evaluate_no...
{"hexsha": "13f1049fef6a261e82a9e48d6ea777ac3e308784", "size": 7349, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluate.py", "max_stars_repo_name": "brianc118/onsets-and-frames", "max_stars_repo_head_hexsha": "40ae19f7c44454a7ebb7414761e718fcffa7d400", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from typing import List import luigi import sklearn import gokart import numpy as np class CalculateWordEmbedding(gokart.TaskOnKart): task_namespace = 'redshells.word_item_similarity' word_task = gokart.TaskInstanceParameter() word2item_task = gokart.TaskInstanceParameter() item2embedding_task = gok...
{"hexsha": "46311fd2ab5452c0e1e89c28612aed86c74f4dc3", "size": 2136, "ext": "py", "lang": "Python", "max_stars_repo_path": "redshells/app/word_item_similarity/calculate_word_embedding.py", "max_stars_repo_name": "mski-iksm/redshells", "max_stars_repo_head_hexsha": "1e956fed9b000ea3f6ba1c96e25d5dd953025155", "max_stars_...
from tkinter import * from tkinter import filedialog from PIL import ImageTk , Image # We need pillow to visualize image in tkinter in an easy way import cv2 from ttkbootstrap import Style from tkinter import ttk import numpy as np # 1- Color Tracking def lower_upper(color_no): # define range of blue c...
{"hexsha": "cab82ebaf7a2aa27e27a12fb78e4cae83333fc67", "size": 17867, "ext": "py", "lang": "Python", "max_stars_repo_path": "Computer-Vision/Lec-04/ImageControlPanel.py", "max_stars_repo_name": "ashme2/ElectroPi", "max_stars_repo_head_hexsha": "9c28c65613a744af8a3bd58e557536644728df30", "max_stars_repo_licenses": ["MIT...
function [ candidates, scores ] = sample_bing_windows( im, num_samples) %SAMPLE_BING_WINDOWS Will generate equaly distributed windows in space, %following Bing sizes % Bing uses 29 specific sizes, this method spread this sizes homogenously % inside the image scores = []; im_wh = [size(im, 2), size(im, 1)]; origina...
{"author": "hosang", "repo": "detection-proposals", "sha": "858368afffde5ff4028020fcb1dd4381705ccbfb", "save_path": "github-repos/MATLAB/hosang-detection-proposals", "path": "github-repos/MATLAB/hosang-detection-proposals/detection-proposals-858368afffde5ff4028020fcb1dd4381705ccbfb/baselines/sample_bing_windows.m"}
#!/usr/bin/env python #_*_coding:utf-8_*_ import sys, os, re import math import numpy as np pPath = re.sub(r'codes$', '', os.path.split(os.path.realpath(__file__))[0]) sys.path.append(pPath) from codes import readFasta def Sim(a, b): blosum62 = [ [ 4, -1, -2, -2, 0, -1, -1, 0, -2, -1, -1, -1, -1, -2, -1, 1, 0,...
{"hexsha": "bbfccc41e43df612685bc25ab362133c35b2a5a1", "size": 4591, "ext": "py", "lang": "Python", "max_stars_repo_path": "profab/utils/feature_extraction_module/iFeature/codes/KNNpeptide.py", "max_stars_repo_name": "Sametle06/PROFAB", "max_stars_repo_head_hexsha": "571b691df2c5e98df0bfc4d6335f3ecd245314fd", "max_star...
source("eaglesoft-caplan-functions.r") ## get triples res <- get.caplan.data(limit="30") ## fill in missing column names ## res <- fill.missing.caplan.columns(res) ## ## dates in res are in form "YYYY-MM-DD^^http://www.w3.org/2001/XMLSchema#date" ## ## so I need to lop off the "^^http://www.w3.org/2001/XMLSchema#dat...
{"hexsha": "e9dcac9b848eb30059b4146e38e33d0c3998347a", "size": 962, "ext": "r", "lang": "R", "max_stars_repo_path": "src/tools/eaglesoft-query-all.r", "max_stars_repo_name": "oral-health-and-disease-ontologies/OHD-ontology", "max_stars_repo_head_hexsha": "e22530f45f0bfc31ccd8e1e69aa00791328e08b7", "max_stars_repo_licen...
################################### # Routing module ################################### """ Route selector Finds a route by using a choosen mode (fastest, shortest or based on Google Distances API) and returns intersections indeces for the route **Arguments** * `start_node` : unique start node id selected for an ag...
{"hexsha": "a7f396afcf77ac7836bc1f143b67722e43056cd1", "size": 6979, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/routing_module.jl", "max_stars_repo_name": "pszufe/OpenStreetMapXSim.jl", "max_stars_repo_head_hexsha": "65fcfe6d366a4cab6cfb6f1fd3a4b0c051145f66", "max_stars_repo_licenses": ["MIT"], "max_star...
ccc By Trifon Trifonov trifon@hku.hk ccc You can modify if as you want, but please ccc do not distribute without permision. ccc This is not a final version!!! ccc The final version will be available in the Python RVMod lib ccc Trifonov et al. (in prep). implicit none real*8 PI, twopi ...
{"hexsha": "66fc0500c701c814876a6a4a261e1c71d8ebacb1", "size": 40440, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "source/latest_f/kepfit_amoeba.f", "max_stars_repo_name": "Simske/exostriker", "max_stars_repo_head_hexsha": "587b0af4c9cadb46637a4ac61a5392a596e966b1", "max_stars_repo_licenses": ["MIT"], "max_st...
#!/usr/bin/env python # Copyright (c) 2015 Andrew J. Hesford. All rights reserved. # Restrictions are listed in the LICENSE file distributed with this package. import numpy as np, os, sys, pyfftw, getopt from fwht import fwht from collections import defaultdict, OrderedDict from functools import partial, reduce im...
{"hexsha": "166be7c15f66a7558f923a566a7a6173757a164c", "size": 19358, "ext": "py", "lang": "Python", "max_stars_repo_path": "shell/fhfft.py", "max_stars_repo_name": "ahesford/habis-tools", "max_stars_repo_head_hexsha": "82f82b99fa18452697404100edcf83bd03d35abc", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c...
# Regular Python Libraries import cv2, os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # get rid of any TF warning messages import numpy as np from PIL import Image # Python GUI import PySimpleGUI as sg # Model Libraries import tensorflow as tf # Multi Image Classifier Library from Multi_Classification.Multi_Image_Class...
{"hexsha": "d963fd96da1e77a66dfd4d8e357703d68bcb7138", "size": 7012, "ext": "py", "lang": "Python", "max_stars_repo_path": "Application.py", "max_stars_repo_name": "KKanda900/UW-Pollution-Detector", "max_stars_repo_head_hexsha": "5caffb41a7f38bf003bd7e8c37b884fd30b645f7", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import matplotlib.pyplot as plt import numpy.random as rnd from matplotlib.patches import Ellipse NUM = 250 ells = [Ellipse(xy=rnd.rand(2)*10, width=rnd.rand(), height=rnd.rand(), angle=rnd.rand()*360) for i in range(NUM)] fig = plt.figure(0) ax = fig.add_subplot(111, aspect='equal') for e in ells: ax.ad...
{"hexsha": "d77e06fa86733c3b6164292916851025cf9ee6e3", "size": 472, "ext": "py", "lang": "Python", "max_stars_repo_path": "matplotlib_examples/examples_src/pylab_examples/ellipse_demo.py", "max_stars_repo_name": "xzlmark/webspider", "max_stars_repo_head_hexsha": "133c620c65aa45abea1718b0dada09618c2115bf", "max_stars_re...
# usage: # num_files h5_filenames updates import numpy as np import h5py import sys import os from tqdm import tqdm import pandas as pd from keyname import keyname as kn from fileshash import fileshash as fsh import re from collections import Counter, defaultdict from joblib import delayed, Parallel import json num_f...
{"hexsha": "9227ceffb9735d22693de8acb11db9f33cb70199", "size": 2597, "ext": "py", "lang": "Python", "max_stars_repo_path": "old/script/FractionResevoirPrep.py", "max_stars_repo_name": "schregardusc/dishtiny", "max_stars_repo_head_hexsha": "b0b1841a457a955fa4c22f36a050d91f12484f9e", "max_stars_repo_licenses": ["MIT"], "...
// Copyright (C) 2001 Jeremy Siek, Douglas Gregor, Brian Osman // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_GRAPH_ISOMORPHISM_HPP #define BOOST_GRAPH_ISOMORPHISM_HPP #include <utility> #inclu...
{"hexsha": "29f6ef2c58e72b859218ba0b71030a52fe507581", "size": 17641, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/lib/boost/graph/isomorphism.hpp", "max_stars_repo_name": "EricBoittier/vina-carb-docker", "max_stars_repo_head_hexsha": "e8730d1ef90395e3d7ed3ad00264702313b0766a", "max_stars_repo_licenses": ["...
/- Copyright (c) 2020 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison ! This file was ported from Lean 3 source module category_theory.limits.colimit_limit ! leanprover-community/mathlib commit 59382264386afdbaf1727e617f5fdda511992eb9 ! P...
{"author": "leanprover-community", "repo": "mathlib4", "sha": "b9a0a30342ca06e9817e22dbe46e75fc7f435500", "save_path": "github-repos/lean/leanprover-community-mathlib4", "path": "github-repos/lean/leanprover-community-mathlib4/mathlib4-b9a0a30342ca06e9817e22dbe46e75fc7f435500/Mathlib/CategoryTheory/Limits/ColimitLimit....
[STATEMENT] lemma [simp]: "\<forall>fs_opt. (fields P ty fs_opt) = (fields_f P ty = fs_opt)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>fs_opt. fields P ty fs_opt = (fields_f P ty = fs_opt) [PROOF STEP] apply(rule) [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<And>fs_opt. fields P ty fs_opt = (fie...
{"llama_tokens": 3001, "file": "LightweightJava_Lightweight_Java_Equivalence", "length": 24}
""" losses.py ======================= Some additional loss functions that can be called using the pipeline, some of which still to be implemented. """ import torch import numpy as np from typing import Iterable, List, Set, Tuple # from typing import Any, Callable, TypeVar, Union from torch import Tensor, einsum impor...
{"hexsha": "70d680384069f2dd5baa693a41dd0ce5f2da3a47", "size": 13147, "ext": "py", "lang": "Python", "max_stars_repo_path": "pathflowai/losses.py", "max_stars_repo_name": "sumanthratna/PathFlowAI", "max_stars_repo_head_hexsha": "70324e78da7ad9452789478b9be7cc76515ea3ab", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import pandas as pd import dask.dataframe as dd import numpy as np from itertools import combinations, permutations from multiprocessing import Pool, cpu_count def pairwise(df, operation, columns = None): """Form interactions between all pairs of numeric columns Arguments: df -- the DataFrame to run o...
{"hexsha": "5d514d7612a4aa5c9872c67a2a520164b786d19e", "size": 3739, "ext": "py", "lang": "Python", "max_stars_repo_path": "featurama/interactions/numeric.py", "max_stars_repo_name": "atomichighfive/featurama", "max_stars_repo_head_hexsha": "725481957fc56bd709bfa70e4892f8dbe6e48b0b", "max_stars_repo_licenses": ["MIT"],...
import shutil import unittest import numpy as np import discretize from SimPEG import ( utils, maps, regularization, data_misfit, optimization, inverse_problem, directives, inversion, ) from SimPEG.potential_fields import gravity np.random.seed(43) class GravInvLinProblemTest(unittes...
{"hexsha": "5a53194faed066ab0110e6870f165d3fe8b8377c", "size": 4606, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/pf/test_grav_inversion_linear.py", "max_stars_repo_name": "ElliotCheung/simpeg", "max_stars_repo_head_hexsha": "ce5bde154179ca63798a62a12787a7ec3535472c", "max_stars_repo_licenses": ["MIT"],...
# Train a new network on a data set with train.py # Basic usage: python train.py data_directory # Prints out training loss, validation loss, and validation accuracy as the network trains # Options: # Set directory to save checkpoints: python train.py data_dir --save_dir save_directory # Choose architecture: python tra...
{"hexsha": "0bc2ad2f07d2dc1257d3122b9c0e980251392bc5", "size": 8140, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "AlanACruz/aipnd-project", "max_stars_repo_head_hexsha": "e0d5dcb49865cced1a9e88f03adaf71f6d0bf1a6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
#!/usr/bin/env python # coding: utf-8 #%% global packages import mesa.batchrunner as mb import numpy as np import networkx as nx #import uuid #import pandas as pd from IPython.core.display import display import matplotlib as mpl #import matplotlib.figure as figure mpl.rc('text', usetex = True) mpl.rc('font', size = ...
{"hexsha": "97205eb9dbea4093de18794154e0423a55429b77", "size": 9845, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/model/Janosik_grid2d_batch.py", "max_stars_repo_name": "jmiszczak/matthew_reduction_game", "max_stars_repo_head_hexsha": "377c699f4ee908f8f7b84eafaf6a749149c59b81", "max_stars_repo_licenses": ...
[STATEMENT] lemma "\<forall>(x::'a::linordered_field) y. x \<noteq> y \<and> 5 * x \<le> y \<longrightarrow> 500 * x \<le> 100 * y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>x y. x \<noteq> y \<and> (5::'a) * x \<le> y \<longrightarrow> (500::'a) * x \<le> (100::'a) * y [PROOF STEP] by ferrack
{"llama_tokens": 146, "file": null, "length": 1}
import numpy as np # The Geometry and Polygon classes are adapted from # https://github.com/Oktosha/DeepSDF-explained/blob/master/deepSDF-explained.ipynb class Geometry(object): EPS = 1e-12 @staticmethod def distance_from_point_to_segment(a, b, p): res = min(np.linalg.norm(a - p), np.linalg.norm(...
{"hexsha": "5abeb5b3cb91dbebbae327440a5eb92944aaa45b", "size": 1782, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/shape.py", "max_stars_repo_name": "mintpancake/2d-sdf-net", "max_stars_repo_head_hexsha": "6170f53f7eb5fc9fe84d1a164c615f9348115958", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4,...
import flask from flask import Flask, redirect, url_for, request, render_template import tensorflow as tf import os from PIL import Image import numpy as np import base64 import io import tensorflow_hub as hub MODELS_PATH = './models/' BASE_MODEL = 'SRWNNbase.h5' srwnnModelPaht = MODELS_PATH + BASE_MODEL denoise1Mo...
{"hexsha": "50195361cb08c4bf8fd1eeaaeefd4ee6c8fab97f", "size": 4881, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "Exusai/srwnn-generator-server", "max_stars_repo_head_hexsha": "2223a0ad8a7caf6b2283073402dda632a9bea547", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
using Gridap using Gridap.Io using GridapGmsh model = GmshDiscreteModel("elasticFlag_coarse.msh") writevtk(model,"elasticFlag_coarse") fn = "elasticFlag_coarse.json" to_json_file(model,fn)
{"hexsha": "a3491586cc4dd1413d228bae88ead5aa44760fb9", "size": 192, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "models/elasticFlag_coarse.jl", "max_stars_repo_name": "gridapapps/GridapFSI.jl", "max_stars_repo_head_hexsha": "7924fccb46b7bbcd04715564559698aabf452190", "max_stars_repo_licenses": ["MIT"], "max_st...
# ------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # ----------------------------------------------------------------------...
{"hexsha": "654c9e5518d21bab19782db9bc1650ed69c69877", "size": 1415, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyStationB/libraries/StaticCharacterization/tests/test_integral.py", "max_stars_repo_name": "BrunoKM/station-b-libraries", "max_stars_repo_head_hexsha": "ea3591837e4a33f0bef789d905467754c27913b3",...
#/opt/local/bin/python3 import sys, math, re, time, os import numpy as np import numpy.random as rand import random import hashlib from copy import deepcopy #helpful resources: https://www.youtube.com/c/learnmeabitcoin/videos #Txn for transaction #BlkChn for blockchain #################################################...
{"hexsha": "bb58913ba987d29cd64a9c2ea2744314253dc281", "size": 11982, "ext": "py", "lang": "Python", "max_stars_repo_path": "bitCoinFuncs.py", "max_stars_repo_name": "Rabbitybunny/zMisc_bitCoinSim", "max_stars_repo_head_hexsha": "9ce7e9fded23778afe38a5fd00a2c13b602554a3", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#!/usr/bin/env python2.7 # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # Cadishi --- CAlculation of DIStance HIstograms # # Copyright (c) Klaus Reuter, Juergen Koefinger # See the file AUTHORS.rst for the full list o...
{"hexsha": "b089b4188098edb376c63129ef708d27f8c793c4", "size": 1759, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/scripts/plot_hdf5_data.py", "max_stars_repo_name": "bio-phys/cadishi", "max_stars_repo_head_hexsha": "b44351fcb77737c6a6da5249a0c24ee8e34f72d2", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import cv2 import numpy as np import matplotlib.pyplot as plt cmap = plt.cm.viridis def rgb2gray(rgb): return np.dot(rgb[...,:3], [0.299, 0.587, 0.114]) def convert_2d_to_3d(u, v, z, K):#将2d图像转到3d空间中 v0 = K[1][2] u0 = K[0][2] fy = K[1][1] fx = K[0][0] x = (u-u0)*z/fx y = (v-v0)*z/fy r...
{"hexsha": "c06c4e452f17a4642b2cc747e9fbbbbdccd4edfd", "size": 5344, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataloaders/pose_estimator.py", "max_stars_repo_name": "Hansry/Semi-supervised-depth-estimation", "max_stars_repo_head_hexsha": "1e8e77d9074ce8e5e2471705d843627a0111b8e0", "max_stars_repo_licenses...
import numpy as np import numpy.ma as ma def find_peak(field, comp=0, max_radius=None, min_radius=None): """Find the peak magnitude of a component in the field. Args: field ``GraspField``: The field to work on. comp int: The field component to look at. max_radius float: Ignore portion...
{"hexsha": "a628abc7a266cab97f4ec4fb372b994afedb76a7", "size": 3740, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/graspfile/analysis/grid.py", "max_stars_repo_name": "Spect4tor/python-graspfile", "max_stars_repo_head_hexsha": "b1d623c018edb5f27714b083e967d924527b7509", "max_stars_repo_licenses": ["MIT"], ...
[STATEMENT] lemma poly_compose_mult: assumes "is_poly_tuple m fs" assumes "length fs = n" assumes "f \<in> carrier (Q\<^sub>p[\<X>\<^bsub>n\<^esub>])" assumes "g \<in> carrier (Q\<^sub>p[\<X>\<^bsub>n\<^esub>])" shows "Qp_poly_comp m fs (f \<otimes>\<^bsub>Q\<^sub>p[\<X>\<^bsub>n\<^esub>]\<^esub> g) = (Qp_pol...
{"llama_tokens": 1144, "file": "Padic_Field_Padic_Field_Powers", "length": 3}
from utils.templates.func import dict_to_par def template_class(name,message,default,className,estimator): string = """ class {0}(object): def __init__(self): print("This is {1} Model") self.default ={3} def getClassName(self): return "{2}" def getLibraryName(self): retu...
{"hexsha": "ad26a94064b81da518447dfd6c84e6f260096fa2", "size": 3785, "ext": "py", "lang": "Python", "max_stars_repo_path": "fatigue/DriverFatigueness/utils/templates/template_Gen.py", "max_stars_repo_name": "jkapila/paper-codebase", "max_stars_repo_head_hexsha": "35198a924b66299cab0bf405d4f5ab54ca504be9", "max_stars_re...
import ast import json import numpy as np from methods.utils import isSquared, progressiveSustitution, regresiveSustitution def doolittle(A, b): A = ast.literal_eval(A) b = ast.literal_eval(b) n = len(A[0]) A = np.array(A).astype(float) b = np.array(b).astype(float) U = np.zeros((n...
{"hexsha": "b7255811b806d48ca5f5524b02809a39edc70ca8", "size": 1989, "ext": "py", "lang": "Python", "max_stars_repo_path": "methods/doolittle.py", "max_stars_repo_name": "eechava6/NumericalAnalysis", "max_stars_repo_head_hexsha": "1b44349fe4c5e24413c3d5faeca7d227272814ec", "max_stars_repo_licenses": ["MIT"], "max_stars...
subroutine edgeele(edge,mrng,neface,ne,bcel,n_bcel) ! Find the element index which containing part of edge and return as bcel ! edge is from 1 to 4 fro 2-D case integer edge ! edge index what to find integer mrng(neface,ne) ! boundary information integer ne ! number of element integer neface ! edge per element integer...
{"hexsha": "dc2ba949d70680613e8a27028a8ca2db6e3df505", "size": 602, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "edgeele.f90", "max_stars_repo_name": "biofluids/IFEM-archive", "max_stars_repo_head_hexsha": "ed14a3ff980251ba98e519a64fb0549d4c991744", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
module TypeDB_tutorial # Write your package code here. end
{"hexsha": "23c8e6f8c75ccef10a0b329f48b76dd0b15fd2e7", "size": 61, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/TypeDB_tutorial.jl", "max_stars_repo_name": "FrankUrbach/TypeDB_tutorial", "max_stars_repo_head_hexsha": "51937c34a8d410861313368ed0d6a4569ef3c369", "max_stars_repo_licenses": ["MIT"], "max_stars...
# -*- coding: utf-8 -*- import numpy import torch class Metric: def __init__(self, num_scales): self.num_scales = num_scales self.sum_metric = [0.0 for i in range(num_scales * 2)] self.num_update = 0 self.multiply_factor = 10000 def update(self, loss_branch): for i in...
{"hexsha": "a9b00606aafc9bd679b07d5ccd5e101b2c4707d9", "size": 1030, "ext": "py", "lang": "Python", "max_stars_repo_path": "face_detection/metric_farm/metric_default.py", "max_stars_repo_name": "CNN-NISER/lffd-pytorch", "max_stars_repo_head_hexsha": "7d6476ece79cf75c6265c89346ddac48929ce8f6", "max_stars_repo_licenses":...
from __future__ import division import cv2 import numpy as np import rtmp import analyzer import drawer import processor ## # Drangonfly - Main video analyzer # Takes a video and analyze it for features # Edmund ## capture = rtmp.captureVideo("rtmp://192.168.1.139:1935/live/edmund live=1 buffer=10") oldFrame ...
{"hexsha": "5c613fba88c18bc8e796e7fc1234fa01ba4ecfe5", "size": 5020, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "edfungus/Text-Detection-from-RTMP-Stream", "max_stars_repo_head_hexsha": "f84a9185cbf2d49a24f372687b0960fe85a0e195", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import pandas as pd from remodnav.clf import deg_per_pixel, EyegazeClassifier from neurogaze.analyze import _get_screen_x_y from neurogaze.gaze import SAMPLING_RATE def longest_stretch(df, col='left_gaze_point_on_display_area_x'): a = df[col].values m = np.concatenate(([True], np.isnan(a),...
{"hexsha": "8342b56704decee50ff659a5450e8a5dfcbd1ed0", "size": 1249, "ext": "py", "lang": "Python", "max_stars_repo_path": "neurogaze/analyze/gaze_classification.py", "max_stars_repo_name": "chrizzzlybear/neurogaze_research", "max_stars_repo_head_hexsha": "6d22a1e54b9f941333a935db4795f014fa1efe26", "max_stars_repo_lice...
import numpy as np import pytest from kiez.neighbors import HNSW, NNG, Annoy, SklearnNN rng = np.random.RandomState(2) @pytest.mark.parametrize("algo_cls", [HNSW, SklearnNN, NNG, Annoy]) def test_str_rep(algo_cls, n_samples=20, n_features=5): source = rng.rand(n_samples, n_features) algo = algo_cls() ass...
{"hexsha": "d181a3df22c5539a6556b39c75d244e2cad56453", "size": 900, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/neighbors/test_base.py", "max_stars_repo_name": "cthoyt/kiez", "max_stars_repo_head_hexsha": "25f9f103ed51d4084e10f7ac532bb24183fe3894", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
import argparse import datetime import glob import os import pickle import numpy as np import time import sys from loguru import logger import torch from torch import autograd from utils.load_synth_data import process_loaded_sequences from train_functions.train_sahp import make_model, train_eval_sahp DEFAULT_BATCH_S...
{"hexsha": "5ca9e381bb38093fdfbd289d76938189c2a7056d", "size": 10193, "ext": "py", "lang": "Python", "max_stars_repo_path": "sahp/sahp_training/main_func.py", "max_stars_repo_name": "yangalan123/anhp-andtt", "max_stars_repo_head_hexsha": "b907f3808ed2ce1616edb1bc2229993a6742cee9", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/env python # coding=utf-8 """ Fine-tuning a 🤗 Transformers model on summarization. """ import argparse import logging import math import os import random from pathlib import Path import datasets import numpy as np import torch from datasets import load_metric from torch.utils.data import DataLoader from t...
{"hexsha": "1e64159fba23e7b1ba376892c80c2d6931654b5b", "size": 27050, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_summarization_no_trainer.py", "max_stars_repo_name": "mcao516/soft-q-learning-for-text-summarization", "max_stars_repo_head_hexsha": "b06050741de444490b2534fce24f31b7f5258e52", "max_stars_rep...
# sys import os import sys import numpy as np import random import pickle # torch import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.autograd import Variable from torchvision import datasets, transforms # visualization import time class Feeder(torch.utils.data.D...
{"hexsha": "3bfaf5f25f0b8555871ea914d8a48d1ec0a2530d", "size": 2699, "ext": "py", "lang": "Python", "max_stars_repo_path": "newapproach/feeder.py", "max_stars_repo_name": "chigur/pose", "max_stars_repo_head_hexsha": "3e8ecebbc24ea59a1cb217b15a9b2a1a1de09085", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
""" """ import unittest import os.path import numpy as np import carribean from carribean.points_grid import PointsGridGraph, four_points_connectivity, eight_points_connectivity from carribean.carribean import get_best_island class PointsGridGraphTest(unittest.TestCase): """ Simple test case for the Points...
{"hexsha": "4d7867aa73b1a8cdef1a21cda31b18c782f2d093", "size": 2245, "ext": "py", "lang": "Python", "max_stars_repo_path": "carribean_test.py", "max_stars_repo_name": "areshytko/interview-challenge-2", "max_stars_repo_head_hexsha": "495b999961401d1a50f5c8216f40f3c77342e21c", "max_stars_repo_licenses": ["Apache-2.0"], "...
[STATEMENT] lemma properties_loop: assumes "mu \<le> i" shows "seq (i + j * lambda) = seq i" [PROOF STATE] proof (prove) goal (1 subgoal): 1. seq (i + j * lambda) = seq i [PROOF STEP] using P assms [PROOF STATE] proof (prove) using this: local.properties lambda mu mu \<le> i goal (1 subgoal): 1. seq (i + j * lam...
{"llama_tokens": 154, "file": "TortoiseHare_Basis", "length": 2}
\documentclass[letterpaper]{article} \usepackage{fullpage} \usepackage{nopageno} \usepackage{amsmath} \usepackage{amssymb} \usepackage{tikz} \usepackage[utf8]{luainputenc} \usepackage{aeguill} \usepackage{setspace} \tikzstyle{edge} = [fill,opacity=.5,fill opacity=.5,line cap=round, line join=round, line width=50pt] \...
{"hexsha": "b54fd5a1c425984f653b6458ba32ef63687f77b0", "size": 1629, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "graph/graph-notes-2015-03-09.tex", "max_stars_repo_name": "ylixir/school", "max_stars_repo_head_hexsha": "66d433f2090b6396c8dd2a53a733c25dbe7bc90f", "max_stars_repo_licenses": ["Unlicense"], "max_st...
[STATEMENT] lemma ta_union_der_disj_states: assumes "\<Q> \<A> |\<inter>| \<Q> \<B> = {||}" and "q |\<in>| ta_der (ta_union \<A> \<B>) t" shows "q |\<in>| ta_der \<A> t \<or> q |\<in>| ta_der \<B> t" [PROOF STATE] proof (prove) goal (1 subgoal): 1. q |\<in>| ta_der \<A> t \<or> q |\<in>| ta_der \<B> t [PROOF STEP]...
{"llama_tokens": 4560, "file": "Regular_Tree_Relations_Tree_Automata_Tree_Automata", "length": 20}
import h5py import numpy as np import logging from . import parse_as from . import color logger = logging.getLogger(__name__) def report_default(key, value): logger.info("Using default '{}': {}".format(key, value)) def apply_defaults(scene): # Note: Only set defaults for options the user would expect to ha...
{"hexsha": "7568f6f4b5aab24b6c08935794030141eb66fff7", "size": 4785, "ext": "py", "lang": "Python", "max_stars_repo_path": "gwpv/scene_configuration/defaults.py", "max_stars_repo_name": "damibabayemi/gwpv", "max_stars_repo_head_hexsha": "e6705787fc2e25b72eaef2508357b1f0b9258581", "max_stars_repo_licenses": ["MIT"], "ma...
from kapteyn import maputils import numpy from service import * fignum = 37 fig = plt.figure(figsize=figsize) frame = fig.add_axes((0.1,0.15,0.8,0.75)) title = 'WCS polyconic (PGSBOX fig.1)' rot = 30.0 *numpy.pi/180.0 header = {'NAXIS' : 2, 'NAXIS1': 512, 'NAXIS2': 512, 'CTYPE1' : 'RA---PCO', 'PC1...
{"hexsha": "7b622f849f9f912e5b64c20fc75fe2dd11fdacda", "size": 1960, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/source/EXAMPLES/allskyf37.py", "max_stars_repo_name": "kapteyn-astro/kapteyn", "max_stars_repo_head_hexsha": "f12332cfd567c7c0da40628dcfc7b297971ee636", "max_stars_repo_licenses": ["BSD-3-Clau...
include("attributes.jl") function SMD1_leader(xu, xl) r = floor(Int,length(xu)/2) p = length(xu) - r q = length(xl) - r xu1 = xu[1:p] xu2 = xu[p+1:p+r] xl1 = xl[1:q] xl2 = xl[q+1:q+r] functionValue = sum((xu1).^2) + sum((xl1).^2) + sum((xu2).^2) + sum((xu2 - tan.(xl2)).^2) ##...
{"hexsha": "57b43845d08a2d577f2a0ec05bfd05617135f9bf", "size": 15164, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Bilevel/SMD/SMD.jl", "max_stars_repo_name": "jmejia8/HardTestProblems.jl", "max_stars_repo_head_hexsha": "cde9e6c654f046fc8b9f01a434f7b213a0fab182", "max_stars_repo_licenses": ["MIT"], "max_st...
\documentclass[a4paper,11pt,leqno,fleqn]{artikel3} \usepackage[dvips]{color} %\definecolor{backgray}{gray}{0.925} %\definecolor{verylightgray}{gray}{0.95} \usepackage{fullpage, fancyvrb, amssymb, listings, url} %\usepackage[breqn, inline]{emaxima} %\usepackage[cmbase]{flexisym} %% \usepackage{breqn} %% \setkeys{breqn...
{"hexsha": "cc8f99e18627d0b27160af3ac328fbfca93c1151", "size": 28424, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "maxima/src/maxima/share/contrib/gf/gf_manual.tex", "max_stars_repo_name": "nilqed/spadlib", "max_stars_repo_head_hexsha": "d317f6abdeff4fedc24231a9a39c51c3121f3475", "max_stars_repo_licenses": ["MI...
""" ModelGrid.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Thu Dec 5 15:49:16 MST 2013 Description: For working with big model grids. Setting them up, running them, and analyzing them. """ from __future__ import print_function import os import gc import re import copy impor...
{"hexsha": "dbffb8b531b30f229661ca366ff0485594da535d", "size": 39476, "ext": "py", "lang": "Python", "max_stars_repo_path": "ares/inference/ModelGrid.py", "max_stars_repo_name": "mirochaj/ares", "max_stars_repo_head_hexsha": "b3335ad30435ee0d7f17d0110aa164a35f252d78", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
""" Created on Apr 10, 2014 @author: sstober """ import logging import os log = logging.getLogger(__name__) import numpy as np from pylearn2.utils.timing import log_timing from deepthought3.experiments.ismir2014.util import load_config from deepthought3.util.yaml_util import load_yaml_file, save_yaml_file from de...
{"hexsha": "ad60934d6a1f55fd685585f3cf1018233ab25e49", "size": 1817, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepthought3/.experiments/ismir2014/train_convnet.py", "max_stars_repo_name": "chanhakim/deepthought", "max_stars_repo_head_hexsha": "9f5dd5c7a21da51b65d6049e7a19e29fc3a072f9", "max_stars_repo_lic...
# coding: utf-8 """Module for utility functions.""" from __future__ import (print_function, division, absolute_import, unicode_literals) import math import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable def fov_to_cell_size(fov, im_size): ...
{"hexsha": "f94747e0f320e6b1da222b15aadb4b91bc735c59", "size": 6766, "ext": "py", "lang": "Python", "max_stars_repo_path": "simple_w_imager/utils.py", "max_stars_repo_name": "OxfordSKA/simple_w_imager", "max_stars_repo_head_hexsha": "465fdb813f5b2662fdd20a410fc3ce739fec1d34", "max_stars_repo_licenses": ["BSD-3-Clause"]...
# <editor-fold desc="definition and handling of parameters" # XXX defines struct for handling parameter data """ Type including data and additional information on parameters. Fields relate to what is provided in [Parameter list](@ref) and include: * `name::Symbol`: name of the parameter * `dim::Tuple`: potential dime...
{"hexsha": "15b72397db973b8a0465c99f42bb72a2f2ce33cb", "size": 20426, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/objects.jl", "max_stars_repo_name": "wookay/AnyMOD.jl", "max_stars_repo_head_hexsha": "14fdae26d6c8dd88001b2b5e4aadb468a3856b42", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
# coding: utf-8 import pandas as pd import numpy as np import scipy import scipy.sparse import sklearn import sklearn.svm import sklearn.datasets import sklearn.cross_validation import warnings warnings.filterwarnings('ignore') X, y = sklearn.datasets.load_svmlight_file('data/news20.binary') instance_ids = np.ar...
{"hexsha": "30faface74d25b023f5f24cde319c8de26252aa8", "size": 3680, "ext": "py", "lang": "Python", "max_stars_repo_path": "incremental_tsvm_news.py", "max_stars_repo_name": "CalculatedContent/tsvm", "max_stars_repo_head_hexsha": "0b59212c5dd682105dbb4be3be8a64832845cb01", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" Test cases for functions in general_utils.py -- kandasamy@cs.cmu.edu """ # pylint: disable=import-error # pylint: disable=no-member # pylint: disable=invalid-name # pylint: disable=relative-import import numpy as np from utils import general_utils from utils.base_test_class import BaseTestClass, execute_tests...
{"hexsha": "d3b8f76669994d04c782bea160e705706bebec73", "size": 5152, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/unittest_general_utils.py", "max_stars_repo_name": "lengjia/NAS_NPU", "max_stars_repo_head_hexsha": "600c05ed27c9b1ce63a5c1c4f1fc862d510cfcf0", "max_stars_repo_licenses": ["MIT"], "max_stars...
import cv2 import os import numpy as np import cPickle CVCONTOUR_APPROX_LEVEL = 2 CVCLOSE_ITR = 1 def main(): mask = cv2.imread('/Users/asafvaladarsky/Documents/pic3.png', cv2.CV_LOAD_IMAGE_GRAYSCALE) findConnectedComponents(mask) def findConnectedComponents(mask, poly1Hull0 = 1, ...
{"hexsha": "7f29fde3522f0e32eff87802469375619ffbd250", "size": 2844, "ext": "py", "lang": "Python", "max_stars_repo_path": "engine/ocr/Test2.py", "max_stars_repo_name": "hasadna/OpenPress", "max_stars_repo_head_hexsha": "7aa99ed92c6aef975f59c0295681f02211fc7ab5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import sys sys.path.append('deepv2d') import numpy as np import tensorflow as tf import matplotlib.pyplot as plt import cv2 import os import time import argparse import glob import tqdm import vis from core import config from data_stream.scannet_twoview import ScanNet from deepv2d import DeepV2D import eval_utils ...
{"hexsha": "7d67fa4fa2f02bb061b6e28f40ec84eea4731cb9", "size": 4205, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluation/eval_scannet_twoview.py", "max_stars_repo_name": "TWJianNuo/Deepv2d", "max_stars_repo_head_hexsha": "e8d9658d974fac9734ebb0a9b9ad56dbfad5c8ee", "max_stars_repo_licenses": ["BSD-3-Clause...
# -*- coding: utf-8 -*- # The class DB allows the user to create a conection with the database import calendar import csv import datetime as dt import math import os import pickle import re import warnings import dotenv import matplotlib.pyplot as plt import numpy as np import pandas as pd import psycopg2 import pym...
{"hexsha": "d261edd36c22f24da71ba06872fb1d9e82f66714", "size": 411, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/get_datasets.py", "max_stars_repo_name": "ilce-catbug/xbox-games-sales-analysis", "max_stars_repo_head_hexsha": "661a7194c73049e8a07ea3f96eafd9a09c236841", "max_stars_repo_licenses": ["MIT...
#include <btcb/node/common.hpp> #include <btcb/node/wallet.hpp> #include <btcb/secure/blockstore.hpp> #include <boost/polymorphic_cast.hpp> btcb::summation_visitor::summation_visitor (btcb::transaction const & transaction_a, btcb::block_store & store_a) : transaction (transaction_a), store (store_a) { } void btcb::s...
{"hexsha": "bb96606afda4d54b1d38411ebdcfdf95c51eda3b", "size": 7326, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "btcb/secure/blockstore.cpp", "max_stars_repo_name": "melnaquib/btcb", "max_stars_repo_head_hexsha": "f55c9867113d403118c3028d5ba11a0debcd7609", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star...
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2015. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <boost/metaparse/sequence_apply.hpp> #include <boost/metaparse/is_error.hpp> #inc...
{"hexsha": "179ba25c2230c46ec8c434cf2981776b06edc377", "size": 4330, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "REDSI_1160929_1161573/boost_1_67_0/libs/metaparse/test/sequence_apply.cpp", "max_stars_repo_name": "Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo", "max_stars_repo_head_hexsha": "eb0f7ef64e188fe871f47c2...
struct fixedIncome :> Income end
{"hexsha": "e62a9591267dbe6de0b8fe6cfe2ae9b1ab42a9a9", "size": 33, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Accounting/CrAccount/Capital/Income/fixedIncome/fixedIncome.jl", "max_stars_repo_name": "adamwillisXanax/accountingJulia", "max_stars_repo_head_hexsha": "59aea20f42c73ae2e740d3cd279828d5ad52e1fc"...
from numpy import prod from torch import einsum from torch.nn import Conv1d, Conv2d, Conv3d from torch.nn.grad import _grad_input_padding from torch.nn.functional import conv1d, conv2d, conv3d from torch.nn.functional import conv_transpose1d, conv_transpose2d, conv_transpose3d from backpack.core.derivatives.basederiva...
{"hexsha": "0a261b880de5ba8cdf8aedee728c1d1da9c62bfe", "size": 6144, "ext": "py", "lang": "Python", "max_stars_repo_path": "backpack/core/derivatives/convnd.py", "max_stars_repo_name": "maryamhgf/backpack", "max_stars_repo_head_hexsha": "63d2717656df2e0f18b3b6ee50320e82ce7358b6", "max_stars_repo_licenses": ["MIT"], "ma...
import numpy as np import matplotlib.pyplot as plt from skyfield.api import Loader, EarthSatellite, Topos # We really just want the filedialog from tkinter import tkinter as tk from tkinter import filedialog from datetime import datetime from os import path def _calculateGroundTrack(earth, satellite, timeset): ...
{"hexsha": "783a7630ce87a030398ce9cab297deb95f9560bf", "size": 1991, "ext": "py", "lang": "Python", "max_stars_repo_path": "TLEPlot.py", "max_stars_repo_name": "Uniliterally/TLEPlot", "max_stars_repo_head_hexsha": "4928eb7db2d5b7c9e37decb2f8f367c16dd02c01", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count": n...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import tensorflow as tf import numpy as np import copy from abc import ABC, abstractmethod from rl.core.function_approximators.normalizers.normalizer import Normalizer, NormalizerStd, NormalizerMax from rl.core.utils.tf_util...
{"hexsha": "52612a3d8eb311eb7831cdac9543f1b065cc2453", "size": 4201, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl/core/function_approximators/normalizers/keras_normalizer.py", "max_stars_repo_name": "gtrll/librl", "max_stars_repo_head_hexsha": "39709c3e485e232865b3e08b7211cd9d871c666a", "max_stars_repo_lic...
from typing import List, Dict, Any, Optional, Union from ..core.schemas import ANNOTATION_SCHEMA, SEGMENTATION_SCHEMA from abc import ABC, abstractmethod import numpy as np class Scene(ABC): def __init__(self): self.frames = Optional[Dict] self.cameras = {} self.lidars = {} self.r...
{"hexsha": "0071510c39abf3ec0a3fbd0e9bedc19f781b89b6", "size": 1101, "ext": "py", "lang": "Python", "max_stars_repo_path": "frames/scene.py", "max_stars_repo_name": "jacobbieker/3dml", "max_stars_repo_head_hexsha": "f4b0e49343a18b4935c1502112e7bef0ff448986", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
\documentclass{article} %%%%%% Include Packages %%%%%% \usepackage{sectsty} \usepackage{amsmath,amsfonts,amsthm,amssymb} \usepackage{fancyhdr} \usepackage{lastpage} \usepackage{setspace} \usepackage{graphicx} %%%%%% Formatting Modifications %%%%%% \usepackage[margin=2.5cm]{geometry} %% Set margins \sectionfont{\sect...
{"hexsha": "01d7ed558e1a4951a8e3992c95eb466673883d99", "size": 2829, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Spring 2013/STAT W1211 - Statistics/Homework/Homework 5/Homework 5.tex", "max_stars_repo_name": "bendrucker/columbia", "max_stars_repo_head_hexsha": "0661e729fa0c7cb792fc31a2da77f2b44874d8a1", "max_...
lemma one_add_le_self (x : mynat) : x ≤ 1 + x := begin -- rw le_iff_exists_add, use 1, rw add_comm, end
{"author": "chanha-park", "repo": "naturalNumberGame", "sha": "4e0d7100ce4575e1add92feefa38b1250431b879", "save_path": "github-repos/lean/chanha-park-naturalNumberGame", "path": "github-repos/lean/chanha-park-naturalNumberGame/naturalNumberGame-4e0d7100ce4575e1add92feefa38b1250431b879/Inequality/1.lean"}
#include "kmers/dirichlet-sampler.hpp" #include "kmers/fasta-parser.hpp" #include <Eigen/Dense> #include <Eigen/Sparse> #include <algorithm> #include <cmath> #include <fstream> #include <iostream> #include <locale> #include <stdexcept> #include <vector> int64_t num_kmers(int64_t K) { int64_t y = 1; for (int k = 0;...
{"hexsha": "2f312effe76bd1c99058700362795f92344dee7c", "size": 6152, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "kmers/src/builder.cpp", "max_stars_repo_name": "bob-carpenter/case-studies", "max_stars_repo_head_hexsha": "d9ac886989b08629f5fcedf6c9e06f3f1f1faff8", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
example (a b c : ℕ) : a + b + c = a + c + b := begin rw [add_assoc, add_comm b, ←add_assoc] end example (a b c : ℕ) : a + b + c = a + c + b := begin rw [add_assoc, add_assoc, add_comm b] end example (a b c : ℕ) : a + b + c = a + c + b := begin rw [add_assoc, add_assoc, add_comm _ b] end
{"author": "Ailrun", "repo": "Theorem_Proving_in_Lean", "sha": "2eb1b5caf93c6a5a555c79e9097cf2ba5a66cf68", "save_path": "github-repos/lean/Ailrun-Theorem_Proving_in_Lean", "path": "github-repos/lean/Ailrun-Theorem_Proving_in_Lean/Theorem_Proving_in_Lean-2eb1b5caf93c6a5a555c79e9097cf2ba5a66cf68/src/ch5/ex0605.lean"}
using Compat using Dates using Infinity using Infinity.Utils using Random using Test using TimeZones: ZonedDateTime @testset "Infinity" begin include("utils.jl") include("infinite.jl") include("infextendedreal.jl") include("infextendedtime.jl") end
{"hexsha": "0b638bbc67fac393e1357d0c4b000abf603f2309", "size": 266, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "cjdoris/Infinity.jl", "max_stars_repo_head_hexsha": "c73a7142ded9bd4bdff35b86fd3891216a47714e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12, ...
(* Title: HOL/HOLCF/One.thy Author: Oscar Slotosch *) section {* The unit domain *} theory One imports Lift begin type_synonym one = "unit lift" translations (type) "one" <= (type) "unit lift" definition ONE :: "one" where "ONE == Def ()" text {* Exhaustion and Elimination for type @{typ one} ...
{"author": "Josh-Tilles", "repo": "isabelle", "sha": "990accf749b8a6e037d25012258ecae20d59ca62", "save_path": "github-repos/isabelle/Josh-Tilles-isabelle", "path": "github-repos/isabelle/Josh-Tilles-isabelle/isabelle-990accf749b8a6e037d25012258ecae20d59ca62/src/HOL/HOLCF/One.thy"}
from __future__ import print_function from numpy import * ''' NAME host PURPOSE to get properties of host galaxies, given redshift, host galaxy type and i band magnitude of QSO INPUT: z (redshift), mQi (i band magnitude of QSO), type ("e"=early type, "l"= late type) OUTPUT: magnitude of ...
{"hexsha": "536ce49e149b6a1bf9344b4d07a84103c2ef0a58", "size": 1143, "ext": "py", "lang": "Python", "max_stars_repo_path": "om10/host.py", "max_stars_repo_name": "drphilmarshall/OM10", "max_stars_repo_head_hexsha": "009c16f0ef4e1c5f8f78c78df3c7711b7be24938", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "ma...
import spotipy import os import spotipy.util as util import matplotlib.pyplot as plt import numpy as np import pandas as pd from sklearn.preprocessing import StandardScaler from sklearn.decomposition import PCA from sklearn.cluster import KMeans import altair as alt from sklearn.preprocessing import MinMaxScaler import...
{"hexsha": "06114e9fc2eb03f89c24be8bbe8409a39ff44832", "size": 13293, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "sejaldua/spotify-ops", "max_stars_repo_head_hexsha": "a5676668734d409e1706a3bebe072c58658d469e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 42, "max_s...
#!/usr/bin/python # -*- coding: utf8 -*- """ analyse results from BluePyOpt checkpoints author: András Ecker last update: 11.2017 """ import os import sys import pickle import numpy as np import sim_evaluator import matplotlib.pyplot as plt SWBasePath = os.path.sep.join(os.path.abspath('__file__').split(os.path.sep)[:...
{"hexsha": "fe7b5c7d9f40be9f7bbba1cccdf53118b2219578", "size": 4382, "ext": "py", "lang": "Python", "max_stars_repo_path": "optimization/analyse_checkpoints.py", "max_stars_repo_name": "andrisecker/KOKI_sharp_waves", "max_stars_repo_head_hexsha": "e6375a2574559172a7036c2def177064a7b6def8", "max_stars_repo_licenses": ["...
import numpy as np import pytest from numpy.testing import assert_array_equal from six import StringIO from landlab import ( CLOSED_BOUNDARY, HexModelGrid, NetworkModelGrid, RadialModelGrid, RasterModelGrid, VoronoiDelaunayGrid, ) from landlab.grid.hex import from_dict as hex_from_dict from lan...
{"hexsha": "0ba7084200eccd8573752809f95462c6da930aa2", "size": 7332, "ext": "py", "lang": "Python", "max_stars_repo_path": "landlab/grid/tests/test_constructors.py", "max_stars_repo_name": "cctrunz/landlab", "max_stars_repo_head_hexsha": "4e4ef12f4bae82bc5194f1dcc9af8ff1a7c20939", "max_stars_repo_licenses": ["MIT"], "m...
from warnings import warn import os from multiprocessing import Pool import numpy as np from tqdm import tqdm from keras.models import Model from scipy.stats import gaussian_kde from coverage.tools.surprise_adequacy.sa_utils import * from coverage.tools.common_utils import ScoreUtils from coverage.tools....
{"hexsha": "f7d23664dc2153df5f8262e4d3aadbecbee16388", "size": 19682, "ext": "py", "lang": "Python", "max_stars_repo_path": "coverage/tools/surprise_adequacy/sa.py", "max_stars_repo_name": "anonymousprojs/ISSTA2022-study", "max_stars_repo_head_hexsha": "94cef7fc4c098c03bb08ff8865d0c1d9a5de86b2", "max_stars_repo_license...
import copy import gym import numpy as np import rlf.algos.utils as autils import rlf.rl.utils as rutils import torch import torch.nn.functional as F from rlf.algos.il.base_il import BaseILAlgo from rlf.args import str2bool from rlf.storage.base_storage import BaseStorage from tqdm import tqdm class BehavioralClonin...
{"hexsha": "f81b5de94a7d0bce5cee7b4c30afb75c153428bd", "size": 7142, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl-toolkit/rlf/algos/il/bc.py", "max_stars_repo_name": "clvrai/goal_prox_il", "max_stars_repo_head_hexsha": "7c809b2ee575a69a14997068db06f3c1f3c8bd08", "max_stars_repo_licenses": ["MIT"], "max_sta...
import pandas as pd import numpy as np import re from datetime import datetime as dt from datetime import date, timedelta # This script cleans the fetched tweets from the previous task "fetching_tweets" LOCAL_DIR = '/tmp/' def main(): # Read the csv produced by the "fetching_tweets" task tweets = pd.read_cs...
{"hexsha": "a8f5c44ce603d3c0a99d7fc7972842ba270b6bcd", "size": 1707, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_pipelines/cleaning_tweet.py", "max_stars_repo_name": "rodrigoarenas456/airflow-course", "max_stars_repo_head_hexsha": "8ffda59b8ac4cfa18b4cd614bc0f75ee18324b28", "max_stars_repo_licenses": ["...
import torch import h5py import numpy as np #from cspnet import CSPNet_p3p4p5, ConvBlock def load_conv_weights(conv, f, layer_name): w = np.asarray(f[layer_name][layer_name + '_1/kernel:0'], dtype='float32') b = np.asarray(f[layer_name][layer_name + '_1/bias:0'], dtype='float32') conv.weight = torch.nn.Par...
{"hexsha": "44fbdc6017d5bae69394f72f34be34ada35c9a61", "size": 4170, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/keras_weights_loader.py", "max_stars_repo_name": "wang-xinyu/csp.pytorch", "max_stars_repo_head_hexsha": "8d5187358c1eb0fbf7ba5f184b9afed6c2518ad3", "max_stars_repo_licenses": ["MIT"], "max_...
import numpy as np import pandas as pd import os import librosa from utilities import compute_time_consumed import time import soundfile import tqdm import sys sys.path.insert(1, os.path.join(sys.path[0], '../utils')) base_path = os.path.join(os.path.expanduser('~'), 'DCase/data/TUT-urban-acoustic-scenes-2018-developm...
{"hexsha": "026aa8e80e4f3f8910a8231abcfc1969f685b62e", "size": 4246, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/data_augmentation.py", "max_stars_repo_name": "rongxuanhong/task1", "max_stars_repo_head_hexsha": "3e3f8eaa936a73df60a93a410e369f803d302903", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
{"hexsha": "2aadb54c111d2e210d227f1fd406003b8af9a9a2", "size": 2174, "ext": "py", "lang": "Python", "max_stars_repo_path": "research/cv/EDSR/export.py", "max_stars_repo_name": "leelige/mindspore", "max_stars_repo_head_hexsha": "5199e05ba3888963473f2b07da3f7bca5b9ef6dc", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import CompactBasisFunctions: Basis, nodes, nnodes @testset "$(rpad("Basis Tests",80))" begin struct BasisTest{T} <: Basis{T} end test_basis = BasisTest{Float64}() @test_throws ErrorException basis(test_basis) @test_throws ErrorException nodes(test_basis) @test_throws ErrorException nbasis(tes...
{"hexsha": "d39594407878d7fc44c15a276e19c81d6dfcfa9a", "size": 542, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/basis_tests.jl", "max_stars_repo_name": "JuliaGNI/CompactBasisFunctions.jl", "max_stars_repo_head_hexsha": "5a76714aca25c399d0856643aff3683d8e0f103a", "max_stars_repo_licenses": ["MIT"], "max_s...
from __future__ import absolute_import, division, print_function import numpy as np import explorers from .. import tools from ..tools import chrono def astd(xs): m = np.average(xs) plus = [x-m for x in xs if x >= m] minus = [x-m for x in xs if x <= m] sigma_plus = np.std([-1*x for x in plus] + p...
{"hexsha": "29d57357ad2ce12a14d5411d27d26183a7a64799", "size": 2592, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/runs/result.py", "max_stars_repo_name": "humm/experiments", "max_stars_repo_head_hexsha": "44770110e51349cc5e2a225322f57ede4f9fdfa7", "max_stars_repo_licenses": ["OML"], "max_stars_cou...
#https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/4_Utils/save_restore_model.ipynb from __future__ import absolute_import, division, print_function import tensorflow as tf import numpy as np # MNIST dataset parameters. num_classes = 10 # 0 to 9 digits num_features = 784 # 28*28...
{"hexsha": "f6c83197c8d0bf69f07f4f4aea25dc57cbb6f6a4", "size": 4116, "ext": "py", "lang": "Python", "max_stars_repo_path": "deep_neural_networks/save_and_restore_tensorflow_models.py", "max_stars_repo_name": "parphane/udacity-self_driving_cars", "max_stars_repo_head_hexsha": "069762a5320a109ebe4f7c23997631a2998a0076", ...
#include <stan/math/rev.hpp> #include <test/unit/math/test_ad.hpp> #include <gtest/gtest.h> #include <boost/math/differentiation/finite_difference.hpp> TEST(mathMixScalFun, neg_binomial_lpmf_derivatives) { auto f = [](const int y) { return [=](const auto& alpha, const auto& beta) { return stan::math::neg_b...
{"hexsha": "a17998ded933d92b9267b26283d099ae5a55589a", "size": 858, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/unit/math/mix/prob/neg_binomial_test.cpp", "max_stars_repo_name": "LaudateCorpus1/math", "max_stars_repo_head_hexsha": "990a66b3cccd27a5fd48626360bb91093a48278b", "max_stars_repo_licenses": ["BS...
* PROGRAM RIBBON * * Program to set up input for RENDER (RASTER3D package) * to draw ribbon diagram. The RIBBON routine itself is simply * extracted from CCP FRODO. The original invoked a bspline feature * of the ps300; I have replaced this with a spline equation gotten * from Larry Andrews. Conversion from...
{"hexsha": "154e637ec48020051b1af88eb101073d45df2c0f", "size": 18299, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ribbon1.f", "max_stars_repo_name": "wkpark/raster3d", "max_stars_repo_head_hexsha": "1fc0f8e363c6c5a63a9fe64e7adeb4f2538bacb3", "max_stars_repo_licenses": ["Artistic-2.0"], "max_stars_count": nul...
[STATEMENT] lemma D_mndet1 : "D(mndet {} P) = {}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. D (mndet {} P) = {} [PROOF STEP] unfolding mndet_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. D (if {} = {} then STOP else Abs_process (\<Union>x\<in>{}. F (x \<rightarrow> P x), \<Union>x\<in>{}. D (x \<rightar...
{"llama_tokens": 168, "file": "HOL-CSP_Mndet", "length": 2}
import os import numpy as np import vipy.video import vipy.videosearch import vipy.object from vipy.util import tempjpg, tempdir, Failed, isurl, rmdir from vipy.geometry import BoundingBox import pdb from vipy.data.kinetics import Kinetics400, Kinetics600, Kinetics700 from vipy.data.activitynet import ActivityNet from ...
{"hexsha": "06905d82b034ea65d424ad564ffe13609073d408", "size": 1451, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_dataset.py", "max_stars_repo_name": "williford/vipy", "max_stars_repo_head_hexsha": "d7ce90cfa3c11363ca9e9fcb1fcea9371aa1b74d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 13,...