text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
#!/usr/bin/env python # -*- coding: utf-8 -*- ## ## discrete_puzzl.py ## ## R.Hanai 2011.15. - ## from numpy import * import operator import time # unit vectors exs = [array([1,0,0]),array([-1,0,0])] eys = [array([0,1,0]),array([0,-1,0])] ezs = [array([0,0,1]),array([0,0,-1])] # piece原点: 3^3=27通り def make_poss(): ...
{"hexsha": "56a35e62851060948804ab59af13e2eb6e29c9f9", "size": 4582, "ext": "py", "lang": "Python", "max_stars_repo_path": "iv_scenario/src/discrete_puzzle.py", "max_stars_repo_name": "ryhanai/iv-plan-hironx", "max_stars_repo_head_hexsha": "2f89293a55df4608cb35e6a9676db97b9e486e7d", "max_stars_repo_licenses": ["BSD-3-C...
[STATEMENT] lemma rel_gpv_lift_spmf2: "rel_gpv A B gpv (lift_spmf q) \<longleftrightarrow> (\<exists>p. gpv = lift_spmf p \<and> rel_spmf A p q)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. rel_gpv A B gpv (lift_spmf q) = (\<exists>p. gpv = lift_spmf p \<and> rel_spmf A p q) [PROOF STEP] by(subst gpv.rel_flip[sym...
{"llama_tokens": 199, "file": "CryptHOL_Generative_Probabilistic_Value", "length": 1}
"""Utility functions for dealing with vertical coordinates.""" import logging import numpy as np import xarray as xr from .._constants import GRAV_EARTH from ..var import Var from .. import internal_names def to_radians(arr, is_delta=False): """Force data with units either degrees or radians to be radians.""" ...
{"hexsha": "bb5ea66bd4dcc35093df898e25638f482539db1a", "size": 11880, "ext": "py", "lang": "Python", "max_stars_repo_path": "aospy/utils/vertcoord.py", "max_stars_repo_name": "spencerahill/aospy", "max_stars_repo_head_hexsha": "6c8df45705927476e140df903bcb88e5abadae22", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import tempfile import pytest from hypothesis import given import astropy.units as u import sunpy.net.dataretriever.sources.goes as goes from sunpy.net import Fido from sunpy.net import attrs as a from sunpy.net.dataretriever.client import QueryResponse from sunpy.net.tests.strategies import time_attr from sunpy.tim...
{"hexsha": "82dbd6d4c69f752462e04e4c69edd1bf4e97e3de", "size": 9516, "ext": "py", "lang": "Python", "max_stars_repo_path": "sunpy/net/dataretriever/sources/tests/test_goes_suvi.py", "max_stars_repo_name": "jmason86/sunpy", "max_stars_repo_head_hexsha": "d3339ca999d79c53ac984f4d3215b6dbefbeb734", "max_stars_repo_license...
# Copyright (c) 2021. yoshida-lab. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. import re import numpy as np from pymatgen.core import Element from pymatgen.analysis.local_env import VoronoiNN from xenonpy.descriptor.base import BaseDes...
{"hexsha": "7db52d2420d9f4b3782f374b8fc5e281f0812c59", "size": 12500, "ext": "py", "lang": "Python", "max_stars_repo_path": "xenonpy/descriptor/structure.py", "max_stars_repo_name": "mori0711/XenonPy", "max_stars_repo_head_hexsha": "e36ca0ea112b45ee629cd980c88e80cd6c96c514", "max_stars_repo_licenses": ["BSD-3-Clause"],...
#! /usr/bin/env python from obspy.core.stream import Stream from numpy.testing import assert_equal from geomagio.algorithm import Algorithm def test_algorithm_process(): """Algorithm_test.test_algorithm_process() confirms that algorithm.process returns an obspy.core.stream object """ algorithm = Algo...
{"hexsha": "986a1512a3b061f551470c051e7ef7cb1126293a", "size": 978, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/algorithm_test/Algorithm_test.py", "max_stars_repo_name": "usgs/geomag-algorithms", "max_stars_repo_head_hexsha": "a83a0e36bed9307828e37b9130c25dbc26dd1bc9", "max_stars_repo_licenses": ["CC0-1...
```python from sympy import init_session init_session() ``` IPython console for SymPy 1.5.1 (Python 3.6.10-64-bit) (ground types: gmpy) These commands were executed: >>> from __future__ import division >>> from sympy import * >>> x, y, z, t = symbols('x y z t') >>> k, m, n = symbols('k m n...
{"hexsha": "db4a1c887cb9b0b0ba5017c4f1b98281869d54aa", "size": 42048, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "notebooks/GTO_integrals/.ipynb_checkpoints/GTO_1D_S-checkpoint.ipynb", "max_stars_repo_name": "tsommerfeld/L2-methods_for_resonances", "max_stars_repo_head_hexsha": "acba48bfede415af...
import numpy as np import torch.nn as nn import vsffdnet.basicblock as B import torch """ # -------------------------------------------- # FFDNet (15 or 12 conv layers) # -------------------------------------------- Reference: @article{zhang2018ffdnet, title={FFDNet: Toward a fast and flexible solution for CNN-based...
{"hexsha": "81121be00ca7deb50c351f0346ff75db787743fa", "size": 2595, "ext": "py", "lang": "Python", "max_stars_repo_path": "vsffdnet/network_ffdnet.py", "max_stars_repo_name": "NSQY/vs-ffdnet", "max_stars_repo_head_hexsha": "e770853e55840f4b4682ea5687d6a5b8d335f0eb", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
! ! Assemble_FTS_TauProfile ! ! Program to assemble the individual TauProfile datafiles into a single ! datafile for an FTS sensor. ! ! ! FILES ACCESSED: ! Input: - Sensor TauProfile netCDF data files for each profile and ! each molecule set. ! ! Output: - TauProfile netCDF data file combin...
{"hexsha": "afa2eededa40dd0b087014118a24962e8138cb52", "size": 15732, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/TauProd/Infrared/Assemble_FTS_TauProfile/Assemble_FTS_TauProfile.f90", "max_stars_repo_name": "hsbadr/crtm", "max_stars_repo_head_hexsha": "bfeb9955637f361fc69fa0b7af0e8d92d40718b1", "max_s...
\section{\module{subprocess} --- Subprocess management} \declaremodule{standard}{subprocess} \modulesynopsis{Subprocess management.} \moduleauthor{Peter \AA strand}{astrand@lysator.liu.se} \sectionauthor{Peter \AA strand}{astrand@lysator.liu.se} \versionadded{2.4} The \module{subprocess} module allows you to spawn n...
{"hexsha": "509f283f6c32cdcbe5fe2ced84882549d79827cd", "size": 13403, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Doc/lib/libsubprocess.tex", "max_stars_repo_name": "deadsnakes/python2.5", "max_stars_repo_head_hexsha": "d5dbcd8556f1e45094bd383b50727e248d9de1bf", "max_stars_repo_licenses": ["PSF-2.0"], "max_sta...
import numpy as np from keras.models import Model from keras.optimizers import Adam from keras.layers import Input, Conv2D, UpSampling2D, Dense, Flatten, Reshape from keras.layers.advanced_activations import LeakyReLU from keras.datasets import mnist from utils import dataIterator, sample_images from tqdm import tqdm ...
{"hexsha": "06fe3a6155f3e22374337b417377cf200c869320", "size": 4689, "ext": "py", "lang": "Python", "max_stars_repo_path": "Keras/DCGAN.py", "max_stars_repo_name": "yotamin/GAN", "max_stars_repo_head_hexsha": "b12068c944a6d9e301d99ebbef844ec71e6d9182", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_star...
open import Everything {- open import Oscar.Prelude open import Oscar.Class.HasEquivalence open import Oscar.Class.Symmetrical open import Oscar.Data.Term open import Oscar.Data.Substitunction open import Oscar.Data.Surjcollation open import Oscar.Data.Surjextenscollation open import Oscar.Data.Proposequality import ...
{"hexsha": "cb97bdeaf8356b7b980a769a243a1b4d0801f371", "size": 1732, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "archive/agda-3/src/Test/SymmetricalSubstitunction.agda", "max_stars_repo_name": "m0davis/oscar", "max_stars_repo_head_hexsha": "52e1cdbdee54d9a8eaee04ee518a0d7f61d25afb", "max_stars_repo_licenses"...
\documentclass[12pt]{article} \include{preamble} \title{Math 341 / 650 Spring 2020 \\ Midterm Examination One} \author{Professor Adam Kapelner} \date{Thursday, February 27, 2020} \begin{document} \maketitle \noindent Full Name \line(1,0){410} \thispagestyle{empty} \section*{Code of Academic Integrity} \footnote...
{"hexsha": "c3ae6c943c1611f553383f5fd837d0ed1ee8bf27", "size": 9167, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "exams/midterm1/midterm1.tex", "max_stars_repo_name": "kapelner/QC_Math_341_Spring_2020", "max_stars_repo_head_hexsha": "ee25c45f90d707a0e04eae432ea930af93480529", "max_stars_repo_licenses": ["MIT"],...
import pyhanabi from rl_env import Agent from random import randint import numpy as np import copy class ProbAgent(Agent): """Agent that applies a simple heuristic.""" def __init__(self, config, *args, **kwargs): """Initialize the agent.""" self.config = config # Extract max info tokens or set defaul...
{"hexsha": "dc6eb196f6d780f55f8a776aad976632d457cef8", "size": 7740, "ext": "py", "lang": "Python", "max_stars_repo_path": "prob_based_agent.py", "max_stars_repo_name": "mwalton/hanabi-aaai20", "max_stars_repo_head_hexsha": "fa39a82c4845c233ed0b5e41370a0e1eaff3b0f9", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
""" CrystalNets Module for automatic reckognition of crystal net topologies. To use as an executable, run the source file in a shell: ```bash julia --project=$(normpath(@__DIR__, "..")) $(@__FILE__) ``` Otherwise, as a module, to try to reckognize the net underlying a crystal given in a chemical file format called...
{"hexsha": "98074a02fcfea8280a593f3bbd753f5b955a7646", "size": 1818, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/CrystalNets.jl", "max_stars_repo_name": "kjappelbaum/CrystalNets.jl", "max_stars_repo_head_hexsha": "a3ea0c02ad2125503b155dce1ec1499d842070ac", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# Face filters (Snapchat like) using OpenCV # @author:- Webwares @2020 import cv2 import sys import logging as log import datetime as dt from time import sleep import numpy as np import os import subprocess cascPath = "haarcascade_frontalface_default.xml" # for face detection if not os.path.exists(cascPath): su...
{"hexsha": "71ab8db66512393d36b912810db06acff09faf7e", "size": 3637, "ext": "py", "lang": "Python", "max_stars_repo_path": "snapchat.py", "max_stars_repo_name": "webwares/snapchat", "max_stars_repo_head_hexsha": "1b90d2de66a7acd36052b7ab7cb3fe0528ead506", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
[STATEMENT] lemma (in cf_scospan) the_cf_scospan_ArrMap_app_\<bb>[cat_ss_cs_simps]: assumes "f = \<bb>\<^sub>S\<^sub>S" shows "\<langle>\<aa>\<rightarrow>\<gg>\<rightarrow>\<oo>\<leftarrow>\<ff>\<leftarrow>\<bb>\<rangle>\<^sub>C\<^sub>F\<^bsub>\<CC>\<^esub>\<lparr>ArrMap\<rparr>\<lparr>f\<rparr> = \<CC>\<lparr>CId\...
{"llama_tokens": 705, "file": "CZH_Elementary_Categories_czh_ecategories_CZH_ECAT_SS", "length": 2}
#ASSUMES DATA WITH THROTTLING, NO DECOR STALL import os import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np class Cycle_Dump: stat = None supply_current = None supply_voltage = None def __init__(self, stats): self.stats = stats self.stats.readli...
{"hexsha": "d9de92d3f470460cdc3e3e6132d50f9b3ffe9e77", "size": 2979, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/jimmy_plot/deprecated/supply_curr+volt_over_time.py", "max_stars_repo_name": "JimmyZhang12/predict-T", "max_stars_repo_head_hexsha": "8ae818b0791104de20633ce91e6d633cda7445b3", "max_stars_r...
# -*- coding: utf-8 -*- import argparse import inspect import math import numpy as np import os from pprint import pprint import sys # add parent directory to sys path to import relative modules currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentd...
{"hexsha": "2f6e6843c220eddc3fc955a146b36e8d772aaf8c", "size": 2513, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/grid.py", "max_stars_repo_name": "skratchdot/media-tools", "max_stars_repo_head_hexsha": "bca0c683fb637aeefda1c49454a118f809047d97", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 13...
"""Classes for creating and augmenting Octrees""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import random import numpy as np from ocnn.dataset.data_processor import DataProcessor from ocnn.octree._octree import Octree from ocnn.octree._octree import...
{"hexsha": "d8fa3614417ccaf439c31ea74c5da278582f67cc", "size": 1847, "ext": "py", "lang": "Python", "max_stars_repo_path": "ocnn/octree/python/ocnn/octree/octree_processor.py", "max_stars_repo_name": "FrozenSilent/O-CNN", "max_stars_repo_head_hexsha": "9527cd7670856229dfc3281bc05d2077a0553ec3", "max_stars_repo_licenses...
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # MODEL POM - Princeton Ocean Model # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # # # ROUTINE: Profq # # DESCRIPTION # # ...
{"hexsha": "0cd8ca23284f257a9d4002157f1f6b449b2c2262", "size": 9597, "ext": "py", "lang": "Python", "max_stars_repo_path": "BFM17_POM1D_VrsFnl/src/pom/phys/profq1d.py", "max_stars_repo_name": "kyleniemeyer/pyPOM1D", "max_stars_repo_head_hexsha": "4eeb1ca16abe07d039c634f2338ebac395692362", "max_stars_repo_licenses": ["B...
import argparse import numpy as np from sta663_project_lda.visualization.demo_topics import topic_viz class LDASVI(object): def __init__(self, datadir, K, alpha0=None, gamma0=None, MB=256, kappa=0.5, tau0=256, eps=1e-3): self.wordcnt_mat = np.load(datadir) # word-count matrix self....
{"hexsha": "d071ce4899ff1329f18e0657afdc4a2362c786c1", "size": 4238, "ext": "py", "lang": "Python", "max_stars_repo_path": "sta663_project_lda/algorithms/lda_svi.py", "max_stars_repo_name": "haofuml/sta663_project_lda", "max_stars_repo_head_hexsha": "d9d0253f61996fef48e9909aecf583e70e318aff", "max_stars_repo_licenses":...
[STATEMENT] lemma subst_poly_scaleRat: "subst_poly \<sigma> (r *R p) = r *R (subst_poly \<sigma> p)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. subst_poly \<sigma> (r *R p) = r *R subst_poly \<sigma> p [PROOF STEP] by (rule linear_poly_eqI, unfold valuate_scaleRat valuate_subst_poly, simp)
{"llama_tokens": 122, "file": "Farkas_Farkas", "length": 1}
import re import numpy as np def clean(rows): """Cleans JSON file for each race. rows is a list of dictionaries. """ rows = map(handle_missing, rows) rows = map(process_rider, rows) return rows def handle_missing(row): """Removes the Place column from a row if result was a DNF/DNP/DQ. """ ...
{"hexsha": "4abc7b1a6fcda1b1fb8af3e6369691201367475d", "size": 1184, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocess.py", "max_stars_repo_name": "physinet/road-results", "max_stars_repo_head_hexsha": "a55d9a54f9fc7b6e854de30777762df717d39d97", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, ...
/* * Copyright 2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
{"hexsha": "742ccc0d27c7e2d8c5a8418d7c1d95b1fce54432", "size": 4853, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "thrift/lib/cpp2/test/HeaderClientChannelHttpTest.cpp", "max_stars_repo_name": "project-zerus/fbthrift", "max_stars_repo_head_hexsha": "fc092e2b645def21482c1772250a97a7cd003cee", "max_stars_repo_lice...
# -*- coding: utf-8 -*- from __future__ import division import numpy as np from scipy.stats import distributions __all__ = ('Prior', 'UniformPrior', 'ExpPrior', 'InvGammaPrior', 'BetaPrior', 'LogPrior') class Prior(object): """ Convenience class for handling prior distributions. Prior objects c...
{"hexsha": "4e3abf328c8f671bca7e608462a83cb3fcbc4d55", "size": 4322, "ext": "py", "lang": "Python", "max_stars_repo_path": "mtd/priors.py", "max_stars_repo_name": "jbernhard/mtd", "max_stars_repo_head_hexsha": "6326fdb44f071311ace7862371e658d609f43d08", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_sta...
Require Import Coq.Classes.Morphisms. Require Import Coq.Classes.RelationClasses. Require Import Logic.lib.Ensembles_ext. Require Import Logic.GeneralLogic.Base. Require Import Logic.GeneralLogic.ProofTheory.TheoryOfSequentCalculus. Require Import Logic.MinimumLogic.Syntax. Local Open Scope logic_base. Local Open Scop...
{"author": "QinxiangCao", "repo": "LOGIC", "sha": "d1476d57345c87447ea500b3d5ea99ee6d0f6863", "save_path": "github-repos/coq/QinxiangCao-LOGIC", "path": "github-repos/coq/QinxiangCao-LOGIC/LOGIC-d1476d57345c87447ea500b3d5ea99ee6d0f6863/MinimumLogic/ProofTheory/TheoryOfSequentCalculus.v"}
Probabilistic Programming ===== and Bayesian Methods for Hackers ======== ##### Version 0.1 `Original content created by Cam Davidson-Pilon` `Ported to Python 3 and PyMC3 by Max Margenot (@clean_utensils) and Thomas Wiecki (@twiecki) at Quantopian (@quantopian)` ___ Welcome to *Bayesian Methods for Hackers*. The ...
{"hexsha": "cb82f53deed0467a015d6609b77ff2818b7325f7", "size": 359770, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb", "max_stars_repo_name": "jeremymiller00/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers", "max_stars_repo_head_hexsha"...
""" lvmspec.sky ============ Utility functions to compute a sky model and subtract it. """ import numpy as np from lvmspec.resolution import Resolution from lvmspec.linalg import cholesky_solve from lvmspec.linalg import cholesky_solve_and_invert from lvmspec.linalg import spline_fit from lvmutil.log import get_logg...
{"hexsha": "b5ddfc7a58617b51521fba2b92a9687c3eebfffb", "size": 13479, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/lvmspec/sky.py", "max_stars_repo_name": "sdss/lvmspec", "max_stars_repo_head_hexsha": "befd6991537c4947fdf63ca262937f2bb845148f", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
import networkx as nx def get_neighbors(G, v): neighbors = list() for n in G.neighbors(v): weight = 1 try: weight = G[v][n]['weight'] except Exception as ex: print(ex, 'Hier') finally: neighbors.append((n, weight)) return neighbors def ...
{"hexsha": "1360ba258d67ad26628450818ad726336b2301b1", "size": 2882, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dijkstra_original.py", "max_stars_repo_name": "philippzabka/resilionator", "max_stars_repo_head_hexsha": "a51d38eec73bdb3fed3646a0234dc39308309273", "max_stars_repo_licenses": ["BSD-3-Clause"]...
import argparse import logging import math import os from collections import Counter from typing import Iterable, Iterator, NamedTuple, Tuple import cv2 import librosa import numpy as np import optuna import pandas as pd import torch import torch.nn as nn from efficientnet_pytorch import EfficientNet from sklearn imp...
{"hexsha": "fdac6c95c134e101ffe886ec723da7a7e341121c", "size": 7324, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/train_model.py", "max_stars_repo_name": "karmatarap/capstone_project", "max_stars_repo_head_hexsha": "16f2b60be9634efec772c7dffb6efb90c37880ec", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np from nibabel.affines import from_matvec from nibabel.eulerangles import euler2mat from ..patched import obliquity def test_obliquity(): """Check the calculation of inclination of an affine axes.""" from math import pi aligned = np.diag([2.0, 2.0, 2.3, 1.0]) aligned[:-1, -1] = [-10, -...
{"hexsha": "f76293f7cf7a8e881c640a84378b82e308a196e4", "size": 639, "ext": "py", "lang": "Python", "max_stars_repo_path": "nitransforms/tests/test_affines.py", "max_stars_repo_name": "mgxd/nitransforms", "max_stars_repo_head_hexsha": "a922f3cb8ee1df5b484f617c34e1816a726e54e0", "max_stars_repo_licenses": ["MIT"], "max_s...
Load LFindLoad. From lfind Require Import LFind. Require Import Arith. From adtind Require Import goal49. Require Import Extraction. Extract Inductive nat => nat [ "(O)" "S" ]. Extract Inductive list => list [ "Nil" "Cons" ]. Definition lfind_example_1 := ( false). Definition lfind_example_2...
{"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_goal49_theorem0_158_eqb_refl/lfind_extr...
import numpy as np from catboost import Pool, CatBoostClassifier from catboost.utils import read_cd from gbdt_uncertainty.data import process_classification_dataset from gbdt_uncertainty.assessment import prr_class, ood_detect, nll_class from gbdt_uncertainty.uncertainty import entropy_of_expected_class, expected_...
{"hexsha": "e0d88e57eb435df59c2bb629273f86b7ebefc302", "size": 14638, "ext": "py", "lang": "Python", "max_stars_repo_path": "aggregate_results_classification.py", "max_stars_repo_name": "yandex-research/GBDT-uncertainty", "max_stars_repo_head_hexsha": "339264ee82c1ec2b22d4200d3b9c18fcce56bb0d", "max_stars_repo_licenses...
# ****************************************************************************** # Copyright 2014-2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
{"hexsha": "46267768f4bcd3f0b219748b978c0cf1355ee310", "size": 24885, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_mergebroadcast_layer.py", "max_stars_repo_name": "rsketine/neon", "max_stars_repo_head_hexsha": "a10f90546d2ddae68c3671f59ba9b513158a91f1", "max_stars_repo_licenses": ["Apache-2.0"], "...
[STATEMENT] theorem winding_number_cindex_pathE: fixes g::"real \<Rightarrow> complex" assumes "finite_ReZ_segments g z" and "valid_path g" "z \<notin> path_image g" and loop: "pathfinish g = pathstart g" shows "winding_number g z = - cindex_pathE g z / 2" [PROOF STATE] proof (prove) goal (1 subgoal): 1. win...
{"llama_tokens": 55223, "file": "Winding_Number_Eval_Cauchy_Index_Theorem", "length": 623}
import random import numpy as np def _lstsq_vector(A, b, constraints=None): """Minimize || A*x - b || subject to equality constraints x_i = c_i. Let A be a matrix of shape (m, n) and b a vector of length m. This function solves the minimization problem || A*x - b || for x, subject to 0 <= r <= n equ...
{"hexsha": "7c734063e137328a553aa2f23b3ef080c43c60d6", "size": 4771, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/cocktail/utils.py", "max_stars_repo_name": "marcromani/nica-nmf", "max_stars_repo_head_hexsha": "0a83fd2d1b90d0715929496a7a646c434120f296", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
module SafeFlagPrimTrustMe where open import Agda.Builtin.Equality open import Agda.Builtin.TrustMe
{"hexsha": "694748867df72877104d8d5c7a74d7f114e53ede", "size": 101, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Fail/SafeFlagPrimTrustMe.agda", "max_stars_repo_name": "bennn/agda", "max_stars_repo_head_hexsha": "f77b563d328513138d6c88bf0a3e350a9b91f8ed", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
from __future__ import division import numpy as np from sklearn.svm import SVC from scipy.special import expit import copy from scipy.stats import norm from background_check import BackgroundCheck class OcDecomposition(object): def __init__(self, base_estimator=BackgroundCheck(), normalization=...
{"hexsha": "1181b6d93dd53d8b5a57092c1a20f57a6658ed1c", "size": 4953, "ext": "py", "lang": "Python", "max_stars_repo_path": "cwc/models/oc_decomposition.py", "max_stars_repo_name": "perellonieto/background_check", "max_stars_repo_head_hexsha": "a5b6549a62be276c7199e87e78a94a64af688ab9", "max_stars_repo_licenses": ["MIT"...
### run using 'marc' conda env ### import pandas as pd import numpy as np import pickle # original ADMISSIONS df = pd.read_pickle('/project/M-ABeICU176709/ABeICU/data/ADMISSIONS.pickle', compression = 'zip') adm_original = len(df['ADMISSION_ID'].unique()) pt_original = len(df['PATIENT_ID'].unique()) print('original no...
{"hexsha": "97d85ac719d9639d2d41b5734e9dc85380ccab47", "size": 9579, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/revision/12_supplemental_3.py", "max_stars_repo_name": "data-intelligence-for-health-lab/delirium_prediction", "max_stars_repo_head_hexsha": "a0a25819ef6c98e32563b4e3b986c1a26fc30ed7", "max_s...
"""configurator class allows to load any python file by its filename and store the contents in a namespace namespace elements are accessible throught both key access or member acess""" import runpy from os import path from collections import OrderedDict from weakref import WeakKeyDictionary import numpy meta = WeakK...
{"hexsha": "518997b15048ea4e603eabc100276f64915a3e0d", "size": 13652, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylib/gna/configurator.py", "max_stars_repo_name": "gnafit/gna", "max_stars_repo_head_hexsha": "c1a58dac11783342c97a2da1b19c97b85bce0394", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5...
""" insert_location(ex::Expr, location) Insert a symbolic representation of `location` into the arguments of an `expression`. Used in the `@at` macro for specifying the location of an `AbstractOperation`. """ function insert_location!(ex::Expr, location) if ex.head === :call && ex.args[1] ∈ operators ...
{"hexsha": "7dd87f464360bd40b953a47df4dc7b8e6cccb833", "size": 961, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/AbstractOperations/at.jl", "max_stars_repo_name": "ascheinb/Oceananigans.jl", "max_stars_repo_head_hexsha": "52bfeb09e3562f639deb32b8807f32a88e3a1cfa", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np from .abstruct import Channel from ..util import pishifts class DepolarizingChannel(Channel): def __init__(self, n, p, seed=None): super().__init__(n, seed) if not isinstance(p, (list, np.ndarray)): p = [p] self.param_len = len(p) self._channel_parame...
{"hexsha": "8b758d736699a3b89ce194e0ebe3696c95c2474d", "size": 5731, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyqecc/channel/channel.py", "max_stars_repo_name": "shim98a/pyqecc", "max_stars_repo_head_hexsha": "69965b4cab947718bf42adfaf79f63b25da61f66", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# -*- coding: utf-8 -*- """ Created on Wed Jan 29 11:34:48 2020 @author: roume """ import os, cv2 import numpy as np import matplotlib as plot from skimage.measure import label, regionprops from scipy.special import expit as sigmoid # used for numerical stability inputPath = 'C:/Users/roume/PycharmProjects/ECE276A_P...
{"hexsha": "bdb951f06959d17340bf2f4be5aea7fbad654db2", "size": 1777, "ext": "py", "lang": "Python", "max_stars_repo_path": "pr1_code/stop_sign_test_imgs.py", "max_stars_repo_name": "roumenguha/Stop_Sign_Detection_Redux", "max_stars_repo_head_hexsha": "30e00b9a2726b81a531a5d51e007272c9b207171", "max_stars_repo_licenses"...
import os import torch import torch.nn as nn from torch.utils.data import Dataset from sklearn.datasets import make_spd_matrix from sklearn.covariance import empirical_covariance from sklearn.metrics import mean_squared_error from torch.utils.data import DataLoader import numpy as np from synthetic import train_nn from...
{"hexsha": "a2bc36165b2a8d929b6b36b9802511ed4fc804fe", "size": 3692, "ext": "py", "lang": "Python", "max_stars_repo_path": "synthetic_moments_ridge.py", "max_stars_repo_name": "veronicatozzo/distribution-network", "max_stars_repo_head_hexsha": "585a3294f09ade975d921e28576c24007e5a41de", "max_stars_repo_licenses": ["MIT...
# -*- coding: utf-8 -*- """ Created on Tue Sep 11 02:15:26 2018 @author: AshwinAmbal Description:The code below is used to extract 'k' similar location for a given location based on the tf, df or idf values as specified in the sample inputs file. """ import xml.etree.ElementTree as ET import pandas as pd from scipy...
{"hexsha": "0249cc3ab41c3d7c20e088bbfbb9e8cb237aeab2", "size": 3122, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code/Tasks/Task_3.py", "max_stars_repo_name": "ajayguna-96/Finding-Similarity-between-Vector-Models-of-images-using-Similarity-Scores", "max_stars_repo_head_hexsha": "c957024ed3be75e2e6bbe6ea790e2...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
{"hexsha": "7277394ffd0b908ebcb766a8095d4b73aa4fa763", "size": 3581, "ext": "py", "lang": "Python", "max_stars_repo_path": "moonlight/staves/staff_processor_test.py", "max_stars_repo_name": "lithomas1/moonlight", "max_stars_repo_head_hexsha": "cd22d6f47bbcf043a0027e91d342ae25dfc8a30a", "max_stars_repo_licenses": ["Apac...
import os import unittest import aspecd.exceptions import numpy as np import trepr.exceptions import trepr.processing import trepr.dataset ROOTPATH = os.path.split(os.path.abspath(__file__))[0] class TestPretriggerOffsetCompensation(unittest.TestCase): def setUp(self): self.processing = trepr.processin...
{"hexsha": "0ffd498e451d84afc9042e69ea316d38cda7ea11", "size": 6347, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_processing.py", "max_stars_repo_name": "tillbiskup/trepr", "max_stars_repo_head_hexsha": "4d24cb9ce5b89bfd3f9ee2016c8c493c4d76ea7f", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_st...
# -*- coding: utf-8 -*- """ Dataset for Mask R-CNN Configurations and data loading code for COCO format. @author: Mattia Brusamento """ import os import sys import time import numpy as np import json # Download and install the Python coco tools from https://github.com/waleedka/coco # That's a fork from the original...
{"hexsha": "1c1c7b0585a19297352558b99758edbabe1b30bc", "size": 5703, "ext": "py", "lang": "Python", "max_stars_repo_path": "materials_trash_detector/trash_dataset.py", "max_stars_repo_name": "Waste-NANDO/Mask_RCNN", "max_stars_repo_head_hexsha": "272fbeba35e62ce3a6772c9c70e62da9fcb4a40e", "max_stars_repo_licenses": ["M...
import nose import unittest import numpy as np from pandas import Series, date_range import pandas.util.testing as tm from pandas.tseries.util import pivot_annual, isleapyear class TestPivotAnnual(unittest.TestCase): """ New pandas of scikits.timeseries pivot_annual """ def test_daily(self): ...
{"hexsha": "02a98858ed80852066036098cbeae6e252364d1f", "size": 1713, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandas/tseries/tests/test_util.py", "max_stars_repo_name": "breisfeld/pandas", "max_stars_repo_head_hexsha": "f1fd50bb8e7603042fe93e01e862766673e33450", "max_stars_repo_licenses": ["BSD-3-Clause"]...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Apr 17 15:11:05 2020 @author: mlampert """ import os import copy import pandas import numpy as np import pickle import flap import flap_nstx thisdir = os.path.dirname(os.path.realpath(__file__)) fn = os.path.join(thisdir,'../flap_nstx.cfg') flap.co...
{"hexsha": "f3fc8d525f1c173731fc48ad09ca613915c4089c", "size": 22881, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/plot_elm_properties_vs_energy_drop.py", "max_stars_repo_name": "fusion-flap/flap_nstx_gpi", "max_stars_repo_head_hexsha": "cf7d4bdecea8fd7434f8f7eb64e1a7b13fc0f759", "max_stars_repo_lice...
#!/usr/bin/env python import numpy from numpy.random import RandomState from sklearn.datasets import make_friedman1 from sklearn.model_selection import train_test_split from typing import Union from backprop.network import Network _demo_problem_num_train_samples: int = 1000 _demo_problem_num_test_samples: int = 100 ...
{"hexsha": "a1cb9d20eceefda48810b2d69f5413ec1438b335", "size": 2907, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/backprop/backprop_demo.py", "max_stars_repo_name": "TedBrookings/backprop", "max_stars_repo_head_hexsha": "36c09b43e3c81f8506e806ede1435a0144d2f792", "max_stars_repo_licenses": ["Apache-2.0"],...
{-# OPTIONS --without-K #-} module PiG where import Level as L open import Data.Empty open import Data.Unit open import Data.Sum open import Data.Product open import Data.Nat open import Function open import Relation.Binary.PropositionalEquality open import Relation.Binary -----------------------------...
{"hexsha": "7e6281c0965cd8b17efa592abbe1101351f9a784", "size": 4722, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "PiG.agda", "max_stars_repo_name": "JacquesCarette/pi-dual", "max_stars_repo_head_hexsha": "003835484facfde0b770bc2b3d781b42b76184c1", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count"...
using PowerModelsReliability using PowerModels using InfrastructureModels using Ipopt using Mosek using Juniper using Cbc using CPLEX using Gurobi using JuMP using SCS scs = JuMP.with_optimizer(SCS.Optimizer, max_iters=100000) ipopt = JuMP.with_optimizer(Ipopt.Optimizer, tol=1e-6, print_level=0) cplex = JuMP.with_opt...
{"hexsha": "a6016f962d8eb6f5b2b1375e9d6802101d80cf9f", "size": 3001, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/model/test_scopf.jl", "max_stars_repo_name": "frederikgeth/PowerModelsReliability.jl", "max_stars_repo_head_hexsha": "a3b53c5f93134e159cd1e1beac39b2e5a4a0c7ba", "max_stars_repo_licenses": ["BS...
from datetime import datetime from pdb import set_trace from time import time import numpy as np import tensorflow as tf import torch from deep_lagrangian_networks.replay_memory import PyTorchReplayMemory from deep_lagrangian_networks.utils import init_env, load_dataset from DeLaN_tensorflow_ddq import DeepLagrangian...
{"hexsha": "4d80374c194805c4f534405be607264b61660ba9", "size": 6314, "ext": "py", "lang": "Python", "max_stars_repo_path": "DeLaN_train_ddq.py", "max_stars_repo_name": "BolunDai0216/deep_lagrangian_networks", "max_stars_repo_head_hexsha": "18fdc324669026b8bccccde94929bce0e068919c", "max_stars_repo_licenses": ["MIT"], "...
import signal import sys import time import thread import numpy as np from minicps.devices import PLC class BasePLC(PLC): # Pulls a fresh value from the local DB and updates the local CPPPO def send_system_state(self): values = [] # Send sensor values (may have gaussian noise) for tag...
{"hexsha": "4f754fe705d9e269882faa188b0ac05adb7f1af9", "size": 1906, "ext": "py", "lang": "Python", "max_stars_repo_path": "dhalsim/python2/basePLC.py", "max_stars_repo_name": "afmurillo/WadiTwin", "max_stars_repo_head_hexsha": "80e2e260a99c02f93aa0a45c9037eef07a70a2f2", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np import pandas as pd emails = pd.read_csv('./emails.csv') #emails[:10] def process_email(text): text = text.lower() return list(set(text.split())) emails['words'] = emails['text'].apply(process_email) num_emails = len(emails) num_spam = sum(emails['spam']) print("Number of emails:", num_emai...
{"hexsha": "ae89283f8f7255747f942a2bc60036846b7a9041", "size": 1992, "ext": "py", "lang": "Python", "max_stars_repo_path": "NaiveBayes.py", "max_stars_repo_name": "abhishekloni01/AIML-Lab-Termworks", "max_stars_repo_head_hexsha": "253a2ed8cb056281267acfe4c7e559b4cadd790a", "max_stars_repo_licenses": ["CC0-1.0"], "max_s...
# coding: utf-8 # In[1]: import sklearn.mixture as mix import scipy as sp import numpy as np import copy ''' num:データの個数 dim:データの特徴量次元 state = {'FEATURE', 'LABEL', 'CLUSTER', 'SCORE', 'GM'}:ディクショナリ feature:選択した特徴量を表すリスト label:データをクラスタリングした際のラベル clusters:データをいくつのクラスタに分類するか。Boumanのアルゴリズムによって求める。 score:評価値 ''' def sc...
{"hexsha": "6b1b89aebbf93f57d181b0d23f0c8b29be11c4b5", "size": 14928, "ext": "py", "lang": "Python", "max_stars_repo_path": "feature_selection/FSSEM.py", "max_stars_repo_name": "Harmoware/Harmoware-SEC", "max_stars_repo_head_hexsha": "828e05116fee3804096ff6c89e211c03a0e98ac5", "max_stars_repo_licenses": ["Apache-2.0"],...
import os from data.base_dataset import BaseDataset, get_params, get_transform from data.image_folder import make_dataset from PIL import Image import numpy as np class AlignedDataset(BaseDataset): """A dataset class for paired image dataset. It assumes that the directory '/path/to/data/train' contains image...
{"hexsha": "29779f3225a87f2baf94553233060af232203f72", "size": 3855, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/aligned_dataset.py", "max_stars_repo_name": "laurencebho/pytorch-CycleGAN-and-pix2pix", "max_stars_repo_head_hexsha": "5539ea60645ccba0c76ab543d471512c20887d5c", "max_stars_repo_licenses": ["...
"""Import tasks for the Pan-STARRS Survey for Transients """ import csv import os from astropy.time import Time as astrotime from astrocats.catalog.utils import make_date_string, pbar def do_psst(catalog): task_str = catalog.get_current_task_str() # 2016arXiv160204156S file_path = os.path.join( ...
{"hexsha": "9674137fa65388718cdaa8e36ae7534cecc798a8", "size": 3382, "ext": "py", "lang": "Python", "max_stars_repo_path": "tasks/psst.py", "max_stars_repo_name": "astrocatalogs/tidaldisruptions", "max_stars_repo_head_hexsha": "87558308b09c4d08a20dec141e438ccbcddb491b", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
## Isentropic Vortex > WORK IN PROGRESS !!! In this example we are going to solve the Euler equations for an isentropic two-dimensional vortex in a full-periodic square domain. Since the problem is not diffusive, the expected behavior is for the vortex to be convected unchanged forever. This is a useful example for ...
{"hexsha": "91b6bd0fa34d1860632f1377a4d474f0347c3312", "size": 91632, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "examples/06_vortex2d.ipynb", "max_stars_repo_name": "smatkovi/nangs", "max_stars_repo_head_hexsha": "b9ab6f32fe3632d9ee403f197742cc203670217d", "max_stars_repo_licenses": ["Apache-2....
from absl import app from absl import flags import os import re import numpy as np import string import tensorflow as tf from tensorflow import keras from pprint import pprint from read_dbpedia import load_dbpedia from read_imdb import load_imdb from read_trec_50 import load_trec_50 from read_trec_6 import load_trec_...
{"hexsha": "1de9af6c10190e47035fc23608da296d49bd1e7d", "size": 9977, "ext": "py", "lang": "Python", "max_stars_repo_path": "defences/dp/classification/cnn-keras.py", "max_stars_repo_name": "JunW15/AdvMT", "max_stars_repo_head_hexsha": "4ec727199a810cd0b153c2d465b9660641e0f3f1", "max_stars_repo_licenses": ["MIT"], "max_...
""" Calculates daily zonal-mean yt of a given surface variable for an aquaplanet simulation """ import numpy as np import xarray as xr from ds21grl.misc import get_dim_exp from ds21grl.read_aqua import read_yt_zm_sfc_daily from ds21grl.write_data import write_yt_zm_sfc_daily from...
{"hexsha": "97c03a61ae27f90af7b681381916c374eaf1704d", "size": 1072, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/processing/12.0-calc-yt-zm-sfc-daily-aqua.py", "max_stars_repo_name": "edunnsigouin/ds21grl", "max_stars_repo_head_hexsha": "b6544cbc97529943da86e48a437ce68dc00e0f82", "max_stars_repo_license...
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2015-2016 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to d...
{"hexsha": "9259d88114ce626cee9ab9e489eaf741cdc609c5", "size": 14468, "ext": "py", "lang": "Python", "max_stars_repo_path": "xsocs/gui/process/FitWidget.py", "max_stars_repo_name": "omserta/xsocs", "max_stars_repo_head_hexsha": "5e1cf1352233498c48f0566e0b819e18373e95e5", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
""" Models for causal set graphs. Available methods: minkowski_interval(N, D) de_sitter_interval(N, D, eta_0, eta_1) causal_set_graph(R, p) """ # Copyright (C) 2016 by # James Clough <james.clough91@gmail.com> # All rights reserved. # BSD license. __author__ = "\n".join(["James Clough (james.clough91@gm...
{"hexsha": "7d40a25450e27be1232e321dc8440f942735e73b", "size": 6024, "ext": "py", "lang": "Python", "max_stars_repo_path": "dagology/generators/causal_set.py", "max_stars_repo_name": "JamesClough/dagology", "max_stars_repo_head_hexsha": "5421fd0ad439e70a61d0408eb1cacebaa403f671", "max_stars_repo_licenses": ["MIT"], "ma...
''' This is a sample class for a model. You may choose to use it as-is or make any changes to it. This has been provided just to give you an idea of how to structure your model class. ''' import cv2 import numpy as np import os from openvino.inference_engine import IECore,IENetwork,IEPlugin class FaceDetectionModel: ...
{"hexsha": "fbb6d2622f351da3ee625bbc1a24da833688b544", "size": 3274, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/face_detection.py", "max_stars_repo_name": "DhruvKinger/Pointer-Controller", "max_stars_repo_head_hexsha": "ba82623987cdc6f4748e761743f207b154db95dd", "max_stars_repo_licenses": ["MIT"], "max_...
""" Copyright 2021 Max-Planck-Gesellschaft Code author: Jan Achterhold, jan.achterhold@tuebingen.mpg.de Embodied Vision Group, Max Planck Institute for Intelligent Systems, Tübingen This source code is licensed under the MIT license found in the LICENSE.md file in the root directory of this source tree or at https://o...
{"hexsha": "38c8ef6c63406a773f2e81190dbbb116bb7ce916", "size": 5862, "ext": "py", "lang": "Python", "max_stars_repo_path": "context_exploration/evaluation/quadrant_pendulum_evaluation.py", "max_stars_repo_name": "EmbodiedVision/explorethecontext", "max_stars_repo_head_hexsha": "d4bd0d4af980de16ede642c987878a55e089f736"...
(* This Isabelle theory is produced using the TIP tool offered at the following website: https://github.com/tip-org/tools This file was originally provided as part of TIP benchmark at the following website: https://github.com/tip-org/benchmarks Yutaka Nagashima at CIIRC, CTU changed the TIP output th...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/UR/TIP/TIP15/TIP15/TIP_sort_nat_ISortPermutes.thy"}
!========================================================================== elemental subroutine gsw_specvol_second_derivatives_wrt_enthalpy (sa, ct, & p, v_sa_sa, v_sa_h, v_h_h, iflag) ! ========================================================================= ! ! Calculates ...
{"hexsha": "1a63b500144698ceaa192280556ba30d7af31244", "size": 3535, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "MOM6-interface/MOM6/pkg/GSW-Fortran/toolbox/gsw_specvol_second_derivatives_wrt_enthalpy.f90", "max_stars_repo_name": "minsukji/ci-debug", "max_stars_repo_head_hexsha": "3e8bbbe6652b702b61d289661...
function p = hexagon_shape_2d ( angle ) %*****************************************************************************80 % %% HEXAGON_SHAPE_2D returns points on the unit regular hexagon in 2D. % % Diagram: % % 120_____60 % / \ % 180/ \0 % \ / % \_____/ % 240 300 % ...
{"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/geometry/hexagon_shape_2d.m"}
import warnings, logging, sys from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers import Conv2D, MaxPooling2D from keras.utils import np_utils from keras.models import model_from_json import pickle import numpy as np import matplotlib.pyplot as plt import ...
{"hexsha": "4ad9049daa7bef929a189b4d1555c2781267cf0f", "size": 9368, "ext": "py", "lang": "Python", "max_stars_repo_path": "MNIST/RobustnessTest.py", "max_stars_repo_name": "matthewwicker/StatisticalGuarenteesForBNNs", "max_stars_repo_head_hexsha": "1f585636c152b8489e331641c743ff628c2b7cc7", "max_stars_repo_licenses": ...
import numpy as np class Transform: """ Positional data for an object, Magnebot, body part, etc. """ def __init__(self, position: np.array, rotation: np.array, forward: np.array): """ :param position: The position vector of the object as a numpy array. :param rotation: The rot...
{"hexsha": "d4c823a8bde45ea8c34e59f11709e32811830ecd", "size": 1209, "ext": "py", "lang": "Python", "max_stars_repo_path": "magnebot/transform.py", "max_stars_repo_name": "neuroailab/magnebot", "max_stars_repo_head_hexsha": "3f537fcd95685efeadf7200208a310a4c6a2f10c", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
cc ------------ dpmjet3.4 - authors: S.Roesler, R.Engel, J.Ranft ------- cc -------- phojet1.12-40 - authors: S.Roesler, R.Engel, J.Ranft ------- cc - oct'13 ------- cc ----------- pythia-6.4 - authors: Torbjorn Sjostrand, Lund'10 ------- cc -------------------------...
{"hexsha": "7005f2f086d353baaa983d9e44f4f94921625702", "size": 10804, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/pythia/pyinit.f", "max_stars_repo_name": "pzhristov/DPMJET", "max_stars_repo_head_hexsha": "946e001290ca5ece608d7e5d1bfc7311cda7ebaa", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
module PointCloud using jInv.Mesh using jInv.Utils using jInv.InverseSolve using ShapeReconstructionPaLS.Utils using ShapeReconstructionPaLS.ParamLevelSet using MAT using SparseArrays using Distributed import jInv.ForwardShare.getData import jInv.ForwardShare.getSensTMatVec import jInv.ForwardShare.getSensMatVec import...
{"hexsha": "715f19ff0f7466674fbebb1a58874618b4bd1576", "size": 2965, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PointCloud/PointCloud.jl", "max_stars_repo_name": "BGUCompSci/ShapeReconstructionPaLS", "max_stars_repo_head_hexsha": "725cfa2a2ab357b4f2ed564eb2227158efc07f7f", "max_stars_repo_licenses": ["MI...
## Automatically adapted for numpy.oldnumeric Jun 27, 2008 by -c # # Copyright (C) 2000-2008 greg Landrum # """ Training algorithms for feed-forward neural nets Unless noted otherwise, algorithms and notation are taken from: "Artificial Neural Networks: Theory and Applications", Dan W. Patterson, Prentice H...
{"hexsha": "0459edcf8046da769d854385ea4a34ecdd7ae4a9", "size": 8146, "ext": "py", "lang": "Python", "max_stars_repo_path": "rdkit/ML/Neural/Trainers.py", "max_stars_repo_name": "darkreactions/rdkit", "max_stars_repo_head_hexsha": "0c388029c1f9386d832f6c321e59a11589c373d8", "max_stars_repo_licenses": ["PostgreSQL"], "ma...
\documentclass[]{article} %opening \title{Learning neural Question Answering Systems for Low-resource Langauges} \author{C.W, R.H} \usepackage{graphicx} \begin{document} \begin{titlepage} % Suppresses headers and footers on the title page \centering % Centre everything on the title page %---------------------...
{"hexsha": "ecde47e087ae6a9bc12ea6e158fa68a5fd6eb5d1", "size": 76381, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ideas/thesis.tex", "max_stars_repo_name": "Mithrillion/BiQA", "max_stars_repo_head_hexsha": "f61bea95521f5b2ffd838aa60aecaad568de6564", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
import math from scipy.special import logsumexp def logsumexp_list(lst): while len(lst)>1: a = lst.pop(0) b = lst.pop(0) c = b + math.log10(math.exp(a - b) + 1) lst.insert(0,c) return lst[0] def forward(X): K = 2 F0_1 = [] F0_2 = [] E = [[1/6,1/6,1/6,1/6,1/6,1/6...
{"hexsha": "813ab8a321d21fb5863ce98b2ff1093adbdf4c4f", "size": 2114, "ext": "py", "lang": "Python", "max_stars_repo_path": "bio-info/bioinfo_6.py", "max_stars_repo_name": "kyamada101/Python", "max_stars_repo_head_hexsha": "a9be850b1818fb4784cb84e86b20cf2c61784e38", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
"""This class is used whenever a security evaluation job is requested. It creates the security evaluation job starting from the parameters of the request.""" import bisect import os from typing import List, Union import numpy as np import torch from .classification.attack_classification import AttackClassification, S...
{"hexsha": "547b411f84459cdc55c4e1e86a633f08597522ed", "size": 12171, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/adv/evaluation_manager.py", "max_stars_repo_name": "pralab/pandavision", "max_stars_repo_head_hexsha": "7a76f333127d5cbdf5a0af5a202cec50a2041c6d", "max_stars_repo_licenses": ["MIT"], "max_sta...
\documentclass[a4paper,11pt]{article} \title{Example 3} \author{My name} \date{2011-01-05} \begin{document} \maketitle \section{What's here} This is our second document. It contains two paragraphs. The first line of a paragraph will be indented, but not when it follows a heading. % Here’s a comme...
{"hexsha": "629f4001369e7f5114054ea0c293c06cef5fe52f", "size": 415, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Chapter02/9867_02_22.tex", "max_stars_repo_name": "eagleqian/LaTeX-Beginner-s-Guide", "max_stars_repo_head_hexsha": "49f6c9c8e0c9f7a6554e720c8a82978a5f5d1042", "max_stars_repo_licenses": ["MIT"], "ma...
From mathcomp Require Import ssreflect. From Category.Base Require Import Logic Category Functor NatTran. From Category.Instances Require Import NatTranComp FunctorCategory Product.ProductCategory. Set Universe Polymorphism. (* Currying *) Module Currying. Section Currying. Context {C D E : Category}. Var...
{"author": "k27c8ff627uxz", "repo": "category_theory", "sha": "d5568b2ba04120a4f0e5bc7f2d61297c3cf42b9e", "save_path": "github-repos/coq/k27c8ff627uxz-category_theory", "path": "github-repos/coq/k27c8ff627uxz-category_theory/category_theory-d5568b2ba04120a4f0e5bc7f2d61297c3cf42b9e/src/Instances/Product/FunctorCurrying....
#default implementation @impl begin struct ScoreGetLogScore end function get_log_score(sf::Score{I}, i::I)::AbstractFloat where {I} return log(get_score(sf, i)) end end
{"hexsha": "b043e16e03b2e8fc4c1352d3e602c0b096265d24", "size": 190, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/sfuncs/score/score.jl", "max_stars_repo_name": "p2t2/Scruff.jl", "max_stars_repo_head_hexsha": "e6d42e1c9bb427f33d01f443ebaf3ef243fa0bde", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
import argparse import os import re import cv2 import fnmatch import numpy as np from sift import SIFT from surf import SURF from vlad import VLAD from vgg import VGG from superpoint import SuperPointLocalFeature from pca_global_descriptor import PCAGlobalDescriptor def parse_args(): parser = argparse.ArgumentPar...
{"hexsha": "47307138e6af5ba3ceaab7e6fe709f76d6426a84", "size": 5646, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval.py", "max_stars_repo_name": "osmr/imgret", "max_stars_repo_head_hexsha": "28ac6461de815e37539f1893c29d4af6d1c1647d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 17, "max_stars_repo...
Require Import ucos_include. Open Scope code_scope. Open Scope Z_scope. Open Scope int_scope. Lemma rh_tcbls_mqls_p_getmsg_hold: forall mqls tcbls ct a v vl qmax wl, RH_TCBList_ECBList_P mqls tcbls ct -> EcbMod.get mqls a = Some (absmsgq (v:: vl) qmax, wl) -> RH_TCBList_ECBList_P (EcbMod.set ...
{"author": "brightfu", "repo": "CertiuCOS2", "sha": "1b7e588056a23bc32a9e442a240de3002b16eefb", "save_path": "github-repos/coq/brightfu-CertiuCOS2", "path": "github-repos/coq/brightfu-CertiuCOS2/CertiuCOS2-1b7e588056a23bc32a9e442a240de3002b16eefb/coqimp/certiucos/ucos_lib/OSQAcceptPure.v"}
import numpy as np import scipy.misc import scipy.signal import neurokit2 as nk import os from sklearn import preprocessing import pandas as pd from numpy import genfromtxt import pandas as pd import matplotlib.pyplot as plt # import timesynth as ts from neurokit2.misc import NeuroKitWarning, listify from itertools i...
{"hexsha": "8296f804769685c4b1a3dd7cd47b323717c49980", "size": 9565, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate_synth_signal.py", "max_stars_repo_name": "akazako1/CollinsLab_ScrunchingAnalysis", "max_stars_repo_head_hexsha": "91509671fdada9b59f0e3e027b989afc53e5d45d", "max_stars_repo_licenses": ["M...
# Define server logic to read selected file ---- server <- function(input, output,session) { #install.packages("readtext") library("readtext") create_readData_file<-"D:/RWebProject/ShinyApp-ver1/ver03/readData.txt" algorithm_file_path<-"D:/RWebProject/ShinyApp-ver1/ver03/action.R" create_Result_file...
{"hexsha": "c2a3185711a673734e0211be60f371bfe51272b3", "size": 3511, "ext": "r", "lang": "R", "max_stars_repo_path": "fakeNewsFrontEnd/server.r", "max_stars_repo_name": "ShiMarinho/MachineLearning-FakeNews", "max_stars_repo_head_hexsha": "e20d983923deb1380ba231177fe8131d60dfe506", "max_stars_repo_licenses": ["MIT"], "m...
"""BERT embedding.""" import argparse import io import logging import os import numpy as np import mxnet as mx from mxnet.gluon.data import DataLoader import gluonnlp from gluonnlp.data import BERTTokenizer, BERTSentenceTransform from gluonnlp.base import get_home_dir try: from data.embedding import BertEmbeddi...
{"hexsha": "728b885e51c7e363e4a86a6d138390dd19416a5a", "size": 9631, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/bert/embedding.py", "max_stars_repo_name": "faramarzmunshi/gluon-nlp", "max_stars_repo_head_hexsha": "218661c71b62b025d636975d2e71a0a4c2ea9f76", "max_stars_repo_licenses": ["Apache-2.0"], ...
""" Title: Random forest digital twin template Authors: Blagoj Delipetrev, Mattia Santoro, Nicholas Spadaro Date created: 2020/11/09 Last modified: 2020/11/09 Description: Templates for creation and execution through the VLAB on DestinationEarth VirtualCloud of random forest based digital twins. Version: 0.1 """...
{"hexsha": "fd4a7c53c9a875541d694c347b0957ad8b539412", "size": 9301, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "snicholas/RandomForestDT", "max_stars_repo_head_hexsha": "f8fd1d181e27592f5b4d15c9906d250081b1fd02", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
import math from typing import Optional, Union, List, Type import numpy as np import torch import torch.multiprocessing from falkon.sparse.sparse_tensor import SparseTensor __all__ = ( "select_dim_over_nm", "select_dim_over_nd", "select_dim_over_nm_v2", "calc_gpu_block_sizes", "choose_fn", "...
{"hexsha": "dc6721abfb41ecc54bdd719b71ebb745bd1f4d36", "size": 6964, "ext": "py", "lang": "Python", "max_stars_repo_path": "falkon/utils/helpers.py", "max_stars_repo_name": "Akatsuki96/falkon", "max_stars_repo_head_hexsha": "380ffc2fdd831955255f5ead297f0e729b1af147", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
## --- test Interpolations.jl # Interpolation @test linterp1(1:10, 1:10, 5.5) == 5.5 @test linterp1(1:10, collect(1:10.), 3:7) == 3:7 @test linterp1(1:10,21:30,5:0.5:6) == [25.0, 25.5, 26.0] @test linterp1s(10:-1:1,21:30,5:0.5:6) == [26.0, 25.5, 25.0] @test linterp_at_index(1:100,10) == 10 ...
{"hexsha": "91d94bc17301020a9968e8b82360017b54ba7f1c", "size": 1037, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/testInterpolations.jl", "max_stars_repo_name": "brenhinkeller/StatGeochemBase", "max_stars_repo_head_hexsha": "ead6e2c124191b43de7a3aecd49479bdd6512599", "max_stars_repo_licenses": ["MIT"], "m...
SST_PATH = "/Users/ccolley/Documents/Research/SparseSymmetricTensors.jl/src/SparseSymmetricTensors.jl" # local path #SST_PATH = "/homes/ccolley/Documents/Software/SparseSymmetricTensors.jl/src/SparseSymmetricTensors.jl" #Nilpotent path include(SST_PATH) using Main.SparseSymmetricTensors #============================...
{"hexsha": "f5da7e40eee7976c5a29fbd198d815ed95254310", "size": 18825, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/SparseSymmetricTensorCode.jl", "max_stars_repo_name": "chuckcol/LambdaTAME", "max_stars_repo_head_hexsha": "5c2192270def06a078cc4821c52b7905b937c0fa", "max_stars_repo_licenses": ["MIT"], "max_...
import random from typing import Dict, List, Optional, Tuple, Union import networkx import networkx as nx import numpy as np import pandas as pd from ipycytoscape import CytoscapeWidget import halerium.core as hal def show_hal_graph(g: hal.Graph) -> CytoscapeWidget: deps = dependencies_from_hal_graph(g) retu...
{"hexsha": "cb8e599c2d0d4c8395a72a32e900426f2ed176fd", "size": 7095, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils.py", "max_stars_repo_name": "Magier/HalGA", "max_stars_repo_head_hexsha": "db560ab219824f0e0556450becc9226d3b4949f3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
from sympy.combinatorics import Permutation from sympy.core import Basic from sympy.combinatorics.permutations import perm_af_mul, \ _new_from_array_form, perm_af_commutes_with, perm_af_invert, perm_af_muln from random import randrange, choice from sympy.functions.combinatorial.factorials import factorial from math im...
{"hexsha": "825ac29f5bb69200474bb3b9fd3cd72d174a5c3e", "size": 115660, "ext": "py", "lang": "Python", "max_stars_repo_path": "sympy/combinatorics/perm_groups.py", "max_stars_repo_name": "sn6uv/sympy", "max_stars_repo_head_hexsha": "5b149c2f72847e4785c65358b09d99b29f101dd5", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
import torch import numpy as np def compute_gradient(x): # compute gradients of deformation fields x =[u, v] # x: deformation field with 2 channels as x- and y- dimensional displacements # du/dx = (u(x+1)-u(x-1)/2 bsize, csize, height, width = x.size() xw = torch.cat((torch.zeros(bsize, csize, hei...
{"hexsha": "4be183fdd9bfd705cddfdcba77aa521dad1c5ba1", "size": 1361, "ext": "py", "lang": "Python", "max_stars_repo_path": "util.py", "max_stars_repo_name": "cq615/Biomechanics-informed-motion-tracking", "max_stars_repo_head_hexsha": "e01419b31d67a87fc410292f253f05afe7935f7d", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np from collections import defaultdict np.random.seed(7) class Agent: def __init__(self, nA=6, alpha = 0.5, gamma = 0.85, start_epsilon = 1): """ Initialize agent. Params ====== - nA (int): number of actions available to the agent - alpha (float): step-siz...
{"hexsha": "2936149721c975f0bf53936471c266984e358257", "size": 2566, "ext": "py", "lang": "Python", "max_stars_repo_path": "p_lab-taxi/Sarsamax/agent.py", "max_stars_repo_name": "and-buk/Udacity-DRLND", "max_stars_repo_head_hexsha": "c796137734e8d848da37a2f9be38f2fb1fdc176d", "max_stars_repo_licenses": ["MIT"], "max_st...
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
{"hexsha": "c47da064cd6a32c4460f9f84f1423c42f043b843", "size": 5005, "ext": "py", "lang": "Python", "max_stars_repo_path": "neon/datasets/cifar10.py", "max_stars_repo_name": "kashif/neon", "max_stars_repo_head_hexsha": "d4d8ed498ee826b67f5fda1746d2d65c8ce613d2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
""" Generate molecular conformations from atomic pairwise distance matrices. """ import itertools import numpy as np import os from rdkit import Chem from rdkit.Chem import AllChem # noinspection PyPackageRequirements from tap import Tap class Args(Tap): """ System arguments. """ data_...
{"hexsha": "5a36c523730318f94015acf76991d88b91da2fd4", "size": 2194, "ext": "py", "lang": "Python", "max_stars_repo_path": "conformation/distmat_to_conf.py", "max_stars_repo_name": "ks8/conformation", "max_stars_repo_head_hexsha": "f470849d5b7b90dc5a65bab8a536de1d57c1021a", "max_stars_repo_licenses": ["MIT"], "max_star...
# -*- coding: utf-8 -*- """ Es 7 QR piu stabile R è maggiorata dalla radice di n + max di aij """ import numpy as np import numpy.linalg as npl import scipy.linalg as sci import funzioni_Sistemi_lineari as fz import matplotlib.pyplot as plt def Hankel(n): A = np.zeros((n,n), dtype = float) for ...
{"hexsha": "1744286c1a2b415c9f0075292d2299477f0cd975", "size": 1270, "ext": "py", "lang": "Python", "max_stars_repo_path": "sistemi_lineari/esercizi/Test7.py", "max_stars_repo_name": "luigi-borriello00/Metodi_SIUMerici", "max_stars_repo_head_hexsha": "cf1407c0ad432a49a96dcd08303213e48723c57a", "max_stars_repo_licenses"...
def mapc2p(xc,yc): """ specifies the mapping to curvilinear coordinates -- should be consistent with mapc2p.f """ from numpy import abs xp = xc + (abs(yc+.2)+ .8)/2 yp = yc return xp,yp
{"hexsha": "e6b3fd15d7224f6bd0ada4ea35a459796902d08f", "size": 218, "ext": "py", "lang": "Python", "max_stars_repo_path": "book/chap23/acoustics/mapc2p.py", "max_stars_repo_name": "geoflows/geoclaw-4.x", "max_stars_repo_head_hexsha": "c8879d25405017b38392aa3b1ea422ff3e3604ea", "max_stars_repo_licenses": ["BSD-3-Clause"...
#!/usr/bin/python import pickle from rdkit import Chem import os,re,glob,sys import numpy as np import math from rdkit.Chem import AllChem, rdmolops from rdkit.Chem.Descriptors import MolWt from xyz2mol import xyz2mol import sys import numpy as np np.set_printoptions(threshold=sys.maxsize) import subprocess import ...
{"hexsha": "9f8de001a096c3d79267f2c8ba407494d538a305", "size": 33549, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycbh/utils.py", "max_stars_repo_name": "colliner/pyCBH", "max_stars_repo_head_hexsha": "29fb86d81cf45a343cb8e7e071d183bf74bb1c21", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
# Routines for an unstructured mesh that is contained in a hierarchical, rectangularly # partitioned mesh data structure mutable struct HierarchicalRectangularlyPartitionedMesh name::String rect::Rectangle_2D mesh::Ref{UnstructuredMesh_2D} parent::Ref{HierarchicalRectangularlyPartitionedMesh} childr...
{"hexsha": "9dd7ed9b20e917afefe5cf46ba7887ce5bde7d4e", "size": 14368, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/mesh/HierarchicalRectangularlyPartitionedMesh.jl", "max_stars_repo_name": "KyleVaughn/MOCNeutronTransport", "max_stars_repo_head_hexsha": "6de0f5987c2b37c3c3039d073b63c223ff6cd5f7", "max_stars...