text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
from typing import Any, Dict, Optional, List
import os
import numpy as np
from ramachandran.geometry import protein_backbone_dihedral_angle_phi, protein_backbone_dihedral_angle_psi
from ramachandran.torsion import ResidueTorsionCollection, ResidueTorsion
from tqdm import tqdm
from multiprocessing import Pool
from funct... | {"hexsha": "37de42a4127df8a737c4a120f734794fc513b5c5", "size": 14349, "ext": "py", "lang": "Python", "max_stars_repo_path": "ramachandran/io.py", "max_stars_repo_name": "leimao/Ramachandran", "max_stars_repo_head_hexsha": "8080697cced0b33792493de8d784467734433ca5", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_... |
#! /usr/bin/env python
__author__ = 'frankhe'
import lasagne
import numpy as np
import theano
import theano.tensor as T
from updates import deepmind_rmsprop
class DeepQLearner:
def __init__(self, input_width, input_height, num_actions,
num_frames, discount, learning_rate, rho,
r... | {"hexsha": "1c676f1621c44203de1361684ec0d14e658af2fc", "size": 15005, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/q_network.py", "max_stars_repo_name": "ShibiHe/Learning-to-play-in-a-day-Optimality-Tightening", "max_stars_repo_head_hexsha": "1cce8cf94e3fe026a8d18f7e2f2ed8e709392f08", "max_stars_repo_lic... |
# Cutoff strategies for long-range interactions
export
NoCutoff,
DistanceCutoff,
ShiftedPotentialCutoff,
ShiftedForceCutoff,
CubicSplineCutoff
"""
NoCutoff()
Placeholder cutoff that does not alter forces or potentials.
"""
struct NoCutoff end
cutoff_points(::Type{NoCutoff}) = 0
force_divr_c... | {"hexsha": "39840f83036c53a30cae19f4c6a39aece8dbd097", "size": 4853, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/cutoffs.jl", "max_stars_repo_name": "chemicalfiend/Molly.jl", "max_stars_repo_head_hexsha": "561b42f30b18699902da8ee0036184929d0436cf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 41... |
using PhotoOrganizer
dry_run = false
rm_src = false
dst_root="/home/hertz/mnt/media/Pictures"
#src_dirs = String[]
#push!(src_dirs, "/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C009%5D/Samsung SD card/CameraZOOM")
#push!(src_dirs, "/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C009%5D/Samsung SD card/DCIM/Camera")
#push!... | {"hexsha": "fcef2c68ba8bf081bc29292bd53c6f77ee5082d7", "size": 1953, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/pixel.jl", "max_stars_repo_name": "GlenHertz/PhotoOrganizer.jl", "max_stars_repo_head_hexsha": "cb081e3190a3b578cf479305948b76ca68ec3cf6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
(**************************************************************)
(* Copyright Dominique Larchey-Wendling [*] *)
(* *)
(* [*] Affiliation LORIA -- CNRS *)
(***********************************************************... | {"author": "uds-psl", "repo": "coq-library-undecidability", "sha": "4547d325e8ce7a6d841fbfe5df4429ee9cb6f214", "save_path": "github-repos/coq/uds-psl-coq-library-undecidability", "path": "github-repos/coq/uds-psl-coq-library-undecidability/coq-library-undecidability-4547d325e8ce7a6d841fbfe5df4429ee9cb6f214/theories/FOL... |
using FormulationLattice
using Base.Test
let
@Literals(A, B, C, D)
cl = A ∨ ((B ∨ C) ∧ D)
formtrack = FormulaState[]
cl2 = dnf(cl, formtrack)
@test cl2 == A ∨ (B ∧ D) ∨ (C ∧ D)
end
let
@Literals(A, B, C, D)
cl = (A ∨ B) ∧ (C ∨ D)
formtrack = FormulaState[]
cl2 = dnf(cl, formtrack)
... | {"hexsha": "d156f1b784fd49371c75aa35f55a28fd69890dd5", "size": 2722, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "joehuchette/FormulationLattice.jl", "max_stars_repo_head_hexsha": "c708a36ab9d8263addd223ec7378bd99a0d0c0e4", "max_stars_repo_licenses": ["MIT"], "max_sta... |
from __future__ import absolute_import, division, print_function
from dynd import nd
import numpy as np
from pandas import DataFrame
import numpy as np
import bcolz
from blaze.expr import TableSymbol, by, TableExpr
from blaze.api.into import into
from blaze.api.table import Table
from blaze.compute import compute
impo... | {"hexsha": "6f60eda5d381566e66b278665d2ebe6466341599", "size": 3196, "ext": "py", "lang": "Python", "max_stars_repo_path": "blaze/compute/tests/test_comprehensive.py", "max_stars_repo_name": "chdoig/blaze", "max_stars_repo_head_hexsha": "caa5a497e1ca1ceb1cf585483312ff4cd74d0bda", "max_stars_repo_licenses": ["BSD-3-Clau... |
import cPickle as pickle
import sgd as optimizer
from rnn import RNN
from rntn import RNTN
from rnn2deep_dropout import RNN2Drop
from rnn2deep import RNN2
from rnn2deep_dropout_maxout import RNN2DropMaxout
import tree as tr
import time
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot... | {"hexsha": "dc2afa7cd92a75c289f6b77249f1ed5fe035576c", "size": 4002, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignment3/runNNet_dev_wvecDim.py", "max_stars_repo_name": "PDFangeltop1/cs224d", "max_stars_repo_head_hexsha": "d8450895994215280482bf6f48892f3928446c50", "max_stars_repo_licenses": ["MIT"], "ma... |
[STATEMENT]
lemma from_bool_to_bool_iff:
"w = from_bool b \<longleftrightarrow> to_bool w = b \<and> (w = 0 \<or> w = 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (w = from_bool b) = (to_bool w = b \<and> (w = 0 \<or> w = 1))
[PROOF STEP]
by (cases b) (auto simp: from_bool_def to_bool_def) | {"llama_tokens": 137, "file": "Word_Lib_More_Word_Operations", "length": 1} |
import numpy as np
from collections import Counter
import warnings
import matplotlib.pyplot as plt
from matplotlib import style
style.use('fivethirtyeight')
dataset = {'k': [[1, 2], [3, 3], [2, 5]], 'r': [[5, 6], [5, 8], [7, 7]]}
test_data = [6, 5]
def k_nearest_neighbors(data, test, k=3):
if len(data)... | {"hexsha": "8a0241a21c9af507c0fdd624e66ae23b872df89e", "size": 1196, "ext": "py", "lang": "Python", "max_stars_repo_path": "self_created_k_nearest_model.py", "max_stars_repo_name": "sahilsngh/hackthon.py", "max_stars_repo_head_hexsha": "12c75d6fe30527e7f15aab3ca4bb50d5abe9ff1d", "max_stars_repo_licenses": ["MIT"], "max... |
# This file roughly corresponds to functions documented in the
# Assignments API: https://canvas.instructure.com/doc/api/assignments
"""
Canvas.delete_assignment(c::Course, a::Assignment; kwargs...) -> Assignment
Delete the given assignment and return the former details. Return an [`Assignment`](@ref).
**Canvas ... | {"hexsha": "8baaf6ffc67dd693f1776144f273acd95e60d256", "size": 8900, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/endpoints/assignments.jl", "max_stars_repo_name": "fredrikekre/Canvas.jl", "max_stars_repo_head_hexsha": "65fd255735e01fb52e7ead4f44d430d6f7f9f14e", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import numpy as np
class TimeIntegrationScheme(object):
def __init__(self, dt, comp_model, initial_conditions):
# time step
self.dt = dt
# mass, damping and spring stiffness
self.M = comp_model[0]
self.B = comp_model[1]
self.K = comp_model[2]
# initial dis... | {"hexsha": "3ec74b7775b5e395c82cf52c1a90a22019776329", "size": 2129, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/solving_strategies/schemes/time_integration_scheme.py", "max_stars_repo_name": "JoZimmer/ParOptBeam", "max_stars_repo_head_hexsha": "50d15d8d822a2718f2932807e06c4a7e02f866a3", "max_stars_re... |
//
// Copyright 2022 DMetaSoul
//
// 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 in... | {"hexsha": "ceba8741887a4b2308eefcb5fa8cacb4f47a004c", "size": 13398, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cpp/tests/serving/arrow_plan_test.cpp", "max_stars_repo_name": "meta-soul/MetaSpore", "max_stars_repo_head_hexsha": "e6fbc12c6a3139df76c87215b16f9dba65962ec7", "max_stars_repo_licenses": ["Apache-2... |
r=0.26
https://sandbox.dams.library.ucdavis.edu/fcrepo/rest/collection/sherry-lehmann/catalogs/d70c7j/media/images/d70c7j-003/svc:tesseract/full/full/0.26/default.jpg Accept:application/hocr+xml
| {"hexsha": "f7c06ef38c3c6f24f2a9e8b41adbc62f58359675", "size": 195, "ext": "r", "lang": "R", "max_stars_repo_path": "tesseract/rotate/d70c7j-003.r", "max_stars_repo_name": "ucd-library/wine-price-extraction", "max_stars_repo_head_hexsha": "c346e48b5cda8377335b66e4a1f57c013aa06f1f", "max_stars_repo_licenses": ["MIT"], "... |
from itertools import chain
import json
import argparse
import os, sys
import time
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable as V
from datasets import *
from decoder import *
from encoder_v2 import *
from train_encoder_v2 import *
def make_parser():
parser = argpa... | {"hexsha": "4af792bb636da74ecebf317c17d8409ee69b627a", "size": 3707, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/test_seq_generation.py", "max_stars_repo_name": "chengemily/pidgin-rl", "max_stars_repo_head_hexsha": "a90b4182b37b2e88cbfd1eb7e6f102b92afc968b", "max_stars_repo_licenses": ["MIT"], "max_... |
# -*- coding: utf-8 -*-
# Library for self ABM
# Author: KPN
#------------------------------------------------------------------------------#
# Serve as repository for classes and modules
# Library will depend upon following modules:
'''
Please make sure your module libraries are up to date, this module depends upon:... | {"hexsha": "ed30253e0a00c622db21e58acc4d2c69452026e7", "size": 74464, "ext": "py", "lang": "Python", "max_stars_repo_path": "emergent/shipABM_Complexity_V13.py", "max_stars_repo_name": "knebiolo/emergent", "max_stars_repo_head_hexsha": "a6edb20c9907d4122d165eecaeeff33782d24a48", "max_stars_repo_licenses": ["MIT"], "max... |
[STATEMENT]
lemma ltl_llist_of_stream [simp]: "ltl (llist_of_stream xs) = llist_of_stream (stl xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ltl (llist_of_stream xs) = llist_of_stream (stl xs)
[PROOF STEP]
by(simp add: llist_of_stream_def) | {"llama_tokens": 112, "file": "Coinductive_Coinductive_Stream", "length": 1} |
[STATEMENT]
lemma (in domain) pdivides_imp_degree_le:
assumes "subring K R" and "p \<in> carrier (K[X])" "q \<in> carrier (K[X])" "q \<noteq> []"
shows "p pdivides q \<Longrightarrow> degree p \<le> degree q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. p pdivides q \<Longrightarrow> degree p \<le> degree q
[P... | {"llama_tokens": 1646, "file": null, "length": 20} |
Set Warnings "-notation-overridden".
Require Import Coq.Program.Basics.
Require Import Coq.Lists.List.
From Equations Require Import Equations.
Unset Equations With Funext.
Require Import Category.Lib.
Require Import Category.Theory.
Require Import Embed.Theory.Utils.
Require Import Embed.Theory.Btree.
Require Impo... | {"author": "michaeljklein", "repo": "btree-lattice-experiments", "sha": "769670d3c98591a4ddb3854feea22eae554323f5", "save_path": "github-repos/coq/michaeljklein-btree-lattice-experiments", "path": "github-repos/coq/michaeljklein-btree-lattice-experiments/btree-lattice-experiments-769670d3c98591a4ddb3854feea22eae554323f... |
double precision function HAQggvsqanal(j1,j2,j3,j4)
implicit none
include 'constants.f'
c include 'scale.f'
c include 'masses.f'
c include 'deltar.f'
C--- matrix element squared for 0 --> H + a(j1)+q(j2)+g(j3)+g(j4)
c--- implemented according to arXiv:0906.0008, Eq. (2.23)
int... | {"hexsha": "a5900c82bb5e4f6303f7627525c106baf42b2cce", "size": 1380, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MCFM-JHUGen/src/ggHggvirt/HAQggvsqanal.f", "max_stars_repo_name": "tmartini/JHUGen", "max_stars_repo_head_hexsha": "80da31668d7b7eb5b02bb4cac435562c45075d24", "max_stars_repo_licenses": ["Apache-2... |
import numpy as np
def check_intersect(p1, q1, p2, q2):
def on_segment(p, q, r):
if q[0] > np.max([p[0], r[0]]):
return False
if q[0] < np.min([p[0], r[0]]):
return False
if q[1] < np.min([p[0], r[0]]):
return False
if q[1] > np.max([p[1], r[1]]... | {"hexsha": "4e6014d191f3353525ac383a53163a9f1603a044", "size": 1143, "ext": "py", "lang": "Python", "max_stars_repo_path": "markergen/lineintersect.py", "max_stars_repo_name": "henrykrumb/polaris-marker-generator", "max_stars_repo_head_hexsha": "d2f454e7b6587fe1dce0da72bbe593e2b92186d8", "max_stars_repo_licenses": ["MI... |
"""
rivers2stratigraphy GUI -- build river stratigraphy interactively
Stratigraphic model based on LAB models, i.e., geometric channel body is
deposited in "matrix" of floodplain mud. The channel is always fixed to the
basin surface and subsidence is only control on vertical stratigraphy.
Horizontal stratigr... | {"hexsha": "e6184b2a71fdce0bbe8d2d32d23a410ab998cd62", "size": 4054, "ext": "py", "lang": "Python", "max_stars_repo_path": "rivers2stratigraphy/gui.py", "max_stars_repo_name": "amoodie/rivers2stratigraphy", "max_stars_repo_head_hexsha": "3978f0ea4bd087332ee0215f5a003d7f63152598", "max_stars_repo_licenses": ["MIT"], "ma... |
import os
import time
import matplotlib.pyplot as plt
import numpy as np
import torch
from gst_appsink_display import run_pipeline
def main(args):
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
print(f"Running inference on device: {device}")
model = torch.hub.load(... | {"hexsha": "8979cf9fac7e89353ca1358e278a6e4709879df7", "size": 2118, "ext": "py", "lang": "Python", "max_stars_repo_path": "applications/relative-depth.py", "max_stars_repo_name": "BrianOfrim/gst_pyspinsrc", "max_stars_repo_head_hexsha": "0021351d699d2b9563041828a869ce9e770d87b7", "max_stars_repo_licenses": ["MIT"], "m... |
# -*- coding: utf-8 -*-
from __future__ import print_function
import random
import time
import numpy as np
from collections import defaultdict, deque
from quoridor import Quoridor
from policy_value_net import PolicyValueNet
from mcts import MCTSPlayer
from torch.utils.tensorboard import SummaryWriter
... | {"hexsha": "25ca34da3f193474453d1a93fb7d6bf3d08ee257", "size": 13041, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_sk.py", "max_stars_repo_name": "Clarit7/AlphaZero_Quoridor", "max_stars_repo_head_hexsha": "838763ee5554a98173ae166c41ff52ecddc35424", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
$ a_1 = x $
$ a_2 = \frac{1}{2} x + \frac{\sqrt{3}}{2} y $
```python
import sympy as sp
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import RegularPolygon
import copy
from matplotlib.animation import FuncAnimation
%matplotlib notebook
```
```python
x, y = sp.symbols('x y')
a1 = x
a2... | {"hexsha": "f6a2cc00b88f68cc724cafa930013a664d65fca6", "size": 455334, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "aoc2020/python/Problem 24.ipynb", "max_stars_repo_name": "orrinjelo/AdventOfCode2020", "max_stars_repo_head_hexsha": "8a6326bb9926a812142667ee82868d4b59d28f54", "max_stars_repo_lice... |
! Copyright 2014 College of William and Mary
!
! 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... | {"hexsha": "747c18bb13eb7e8c48879c488f9a5123570d839c", "size": 13741, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/Utility/Post-Processing-Fortran/read_output10_xyt.f90", "max_stars_repo_name": "rustychris/schism", "max_stars_repo_head_hexsha": "3754530ef57b3a058906432b4a9fca4a670f395e", "max_stars_repo... |
import pickle
import re
import torch
from wafamole.models import PyTorchModelWrapper
import wafamole.models.custom.pytorch_models.utils as ut
from wafamole.utils.check import type_check
from wafamole.exceptions.models_exceptions import (
ModelNotLoadedError,
PyTorchInternalError,
)
import numpy as np
import j... | {"hexsha": "1f2f41fdea2723a929b18b42829bf8c84753f3e9", "size": 3131, "ext": "py", "lang": "Python", "max_stars_repo_path": "wafamole/models/custom/pytorch_models/example_model1.py", "max_stars_repo_name": "SANKEERTH26/waf-a-mole", "max_stars_repo_head_hexsha": "71c59aac7b2c4ee65a2bcfbf89a58e5546b9e26c", "max_stars_repo... |
import json
from pathlib import Path
import numpy as np
import tensorflow as tf
from tensorflow.keras.optimizers.schedules import *
class LiveLrSchedule(tf.keras.optimizers.schedules.LearningRateSchedule):
"""
Updates learning rate schedule based on config file during the training process.
"""
def __init__(self,... | {"hexsha": "56e987191f33e8e26cd064b638856e0d5d5ae6f8", "size": 2247, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf_livepatch_lr/livepatch_lr.py", "max_stars_repo_name": "andrewerf/tf_livepatch_lr", "max_stars_repo_head_hexsha": "b2f6a513e536e61f39bbf99a8832f4f42719854d", "max_stars_repo_licenses": ["MIT"], ... |
from __future__ import print_function
import torch
import torch.optim as optim
from data.data_loader import CreateDataLoader
import tqdm
import cv2
import yaml
from schedulers import WarmRestart, LinearDecay
import numpy as np
from models.networks import get_nets_multitask, EncoderDecoder
from models.losses import get... | {"hexsha": "d061cfdc2f935a17ba91904f28e45dc139a6ba4e", "size": 12771, "ext": "py", "lang": "Python", "max_stars_repo_path": "multi_task_train.py", "max_stars_repo_name": "t-martyniuk/DeblurGAN", "max_stars_repo_head_hexsha": "4b637bb0e19c446e7dbf63383eb5081a8c3b1804", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s... |
# Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC and
# other Shroud Project Developers.
# See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (BSD-3-Clause)
# #######################################################################
#
# Test Python API generated from ownership.y... | {"hexsha": "2bf80a02959d01e6798f8a64f901d3e0e008face", "size": 2479, "ext": "py", "lang": "Python", "max_stars_repo_path": "regression/run/ownership/python/test.py", "max_stars_repo_name": "ExternalRepositories/shroud", "max_stars_repo_head_hexsha": "86c39d2324d947d28055f9024f52cc493eb0c813", "max_stars_repo_licenses":... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import cv2
import nrrd
import numpy as np
import argparse
__author__ = 'Alessandro Delmonte'
__email__ = 'delmonte.ale92@gmail.com'
def nothing(_):
pass
def main():
filename = setup()
frames, _ = nrrd.read(filename)
frames = fram... | {"hexsha": "b12460674732bdcb249777314343f0c161e9bfa7", "size": 1666, "ext": "py", "lang": "Python", "max_stars_repo_path": "Filters/canny.py", "max_stars_repo_name": "aledelmo/3DSlicer_Plugins", "max_stars_repo_head_hexsha": "918d6ba1ae4e9d5fe2ff01f09bf51e0ffe5a6a00", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
import _thread as thread
import ast
import io
import json
import os
import sqlite3
import sys
import time
import warnings
from multiprocessing import Process
import numpy as np
import onnxruntime as rt
import torch
import torch.nn.functional as F
from PIL import Image, UnidentifiedImageError
sys.path.insert(0, os.pat... | {"hexsha": "203969e522c17d1566ac3c0faf04eebc83d3522c", "size": 3772, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepstack/intelligencelayer/shared/scene.py", "max_stars_repo_name": "OlafenwaMoses/DeepStack-1", "max_stars_repo_head_hexsha": "0315e48907c36c075da5aa558756786c0d76c1b8", "max_stars_repo_licenses... |
"""
Abstract supertype for parameters. Theses are wrappers for model parameter values and
metadata that are returned from [`params`](@ref), and used in
`getfield/setfield/getpropery/setproperty` methods and to generate the Tables.jl interface.
They are stripped from the model with [`stripparams`](@ref).
An `Abstrac... | {"hexsha": "098921e422ccbd61ba51722c6bcd02ae68724dae", "size": 3847, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/param.jl", "max_stars_repo_name": "JeffreySarnoff/ModelParameters.jl", "max_stars_repo_head_hexsha": "fa317ec04cd57d134eab1ff44004e604dee681d2", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
Require Coq.Arith.PeanoNat.
Require Import Lia.
Require Import Nat.
Import Coq.Arith.Wf_nat. (* needed for "lt_wf_ind" *)
Require Import List.
Require Import SKI.expr.
Require Import SKI.digits.
Require Import SKI.arithmetic_ops.
Require Import SKI.compile.
Require Import SKI.substitution.
Require Import SKI.church_ro... | {"author": "markisus", "repo": "coq-ski", "sha": "ef866785105d463e771a16e576faf940e832e91b", "save_path": "github-repos/coq/markisus-coq-ski", "path": "github-repos/coq/markisus-coq-ski/coq-ski-ef866785105d463e771a16e576faf940e832e91b/src/godel.v"} |
# Library
import math
import datetime
import numpy as np
# constant variable
orbit_days = 365.256363004 # Earth orbit in days
au = 149598261 # The semi-major axis of the oribital ellipse
e = 0.01671123 # Earth orbit elliptical eccentricity
solar_c = 1367 # Solar constant
def el_az_changer(time_raw, l... | {"hexsha": "cf13cc5dcd33a3b8867a6f7e28d66ce519635e3f", "size": 3087, "ext": "py", "lang": "Python", "max_stars_repo_path": "feature_preprocessor.py", "max_stars_repo_name": "CheolJ/rail_temperature_prediction_amledu", "max_stars_repo_head_hexsha": "5486c95ff43a681d326261bdc57686c1580df6bc", "max_stars_repo_licenses": [... |
import random
import torch
from matplotlib import pyplot as plt
from torch import manual_seed, cuda, backends
import numpy as np
from sklearn.metrics import confusion_matrix
import seaborn as sn
import pandas as pd
class Meter:
def __init__(self):
self.values, self.avg, self.sum, self.cnt = [], 0, 0, 0
... | {"hexsha": "856fcccefa16aeefb977da1893a75f622abf80d9", "size": 2513, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/my_utils/util.py", "max_stars_repo_name": "Dodant/Knowledge-Distillation", "max_stars_repo_head_hexsha": "fcaef389632c4f3631d47098cab5f0bcdb232201", "max_stars_repo_licenses": ["MIT"], "max_st... |
# pylint: disable=no-name-in-module
import io
import re
import inspect
from functools import wraps
from itertools import tee, chain
from tqdm import tqdm
import numpy as np
import tensorflow as tf
from tensorflow.estimator import ModeKeys # noqa
from tensorflow.train import (
BytesList,
Feature,
Features,
... | {"hexsha": "9332f6c5003ffbdbc5ef0a389b7c00f89f3f8cd7", "size": 24572, "ext": "py", "lang": "Python", "max_stars_repo_path": "tsaplay/utils/tf.py", "max_stars_repo_name": "SijanC147/Msc", "max_stars_repo_head_hexsha": "08a6ae6c8755a9a2392d441d8b84cfbb83bee0bf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
from typing import List
import numpy as np
from constants import BERLIN_ZIP_CODES
class GuestResponse:
def __init__(self,
zip_code: int,
num_adults: int,
num_kids: int,
languages: List[str],
has_vaccination: bool,
... | {"hexsha": "3c3fa1d2c829cb3229579cebe8a2979f1d075817", "size": 1500, "ext": "py", "lang": "Python", "max_stars_repo_path": "guest_response.py", "max_stars_repo_name": "eduryev/dinners_for_refugees", "max_stars_repo_head_hexsha": "dba4e1afbb0bb1521a1d127836b0be8fd4832cca", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2014 Renato Tegon Forti, Antony Polukhin
* Copyright 2015 Andrey Semashev
* Copyright 2015 Antony Polukhin
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_DLL_HPP_INCLUDED_... | {"hexsha": "8b1ecd239ca96007e7655a643caf9728aaec3d0e", "size": 6834, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "thirdparty/boost_1_67_0/boost/winapi/dll.hpp", "max_stars_repo_name": "cfsengineering/tigl", "max_stars_repo_head_hexsha": "abfbb57b82dc6beac7cde212a4cd5e0aed866db8", "max_stars_repo_licenses": ["Ap... |
"""
Plot figures from npy or logging files saved while training
================================================
*Author*: Yu Zhang, Northwestern Polytechnical University
"""
import matplotlib.pyplot as plt
import os
import numpy as np
import sys
def plot_from_npy(npyfile):
assert os.path.isfile(npyfile)
inf... | {"hexsha": "c603dc1a5c1fe970bf85ecfd0e172bd2eb5282b3", "size": 1333, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluate/plot_figure.py", "max_stars_repo_name": "zhangyuygss/WSL", "max_stars_repo_head_hexsha": "c622f606c4b6557b45cec6068713ff05cdb8962a", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star... |
using JuLIP
using JuLIP.Testing
using JuLIP: sigvol_d
using Test
using LinearAlgebra
##
h2("Testing `minimise!` with equilibration with LJ calculator to lattice")
calc = lennardjones(r0=rnn(:Al))
at = bulk(:Al, cubic=true) * 10
X0 = positions(at) |> mat
at = rattle!(at, 0.02)
set_calculator!(at, calc)
x = dofs(at)
p... | {"hexsha": "9c3a9dc21b0090667507ae892c08e8c403d88a0d", "size": 3745, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/testsolve.jl", "max_stars_repo_name": "jamesgardner1421/JuLIP.jl", "max_stars_repo_head_hexsha": "f5340580337a64d35292b91286c96d20d5c172c0", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
[STATEMENT]
lemma bouncing_ball_flow: "g < 0 \<Longrightarrow> h \<ge> 0 \<Longrightarrow>
\<^bold>{\<lambda>s. s$1 = h \<and> s$2 = 0\<^bold>}
(LOOP
((x\<acute>= f g & (\<lambda> s. s$1 \<ge> 0));
(IF (\<lambda> s. s$1 = 0) THEN (2 ::= (\<lambda>s. - s$2)) ELSE skip))
INV (\<lambda>s. 0 \<le> s$... | {"llama_tokens": 2228, "file": "Hybrid_Systems_VCs_KleeneAlgebraTests_HS_VC_KAT_Examples_rel", "length": 3} |
using ModelConstructors, HDF5, Random, JLD2, FileIO, SMC, Test
include("modelsetup.jl")
path = dirname(@__FILE__)
writing_output = false
if VERSION < v"1.5"
ver = "111"
else
ver = "150"
end
m = setup_linear_model(; regime_switching = true)
m <= Setting(:regime_switching, true, true, "rs", "") # For file outp... | {"hexsha": "a15b9911f3b8f5dff192f651229b55db7f40739a", "size": 4023, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/regime_switching_smc.jl", "max_stars_repo_name": "FRBNY-DSGE/SequentialMonteCarlo.jl", "max_stars_repo_head_hexsha": "de6c3180572bfe397917c69059fc242ba8bfb7ca", "max_stars_repo_licenses": ["BS... |
Module AssetTheory.
Require Export Coq.Lists.ListSet.
Require Export Coq.Lists.List.
Require Export Coq.Bool.Bool.
Require Export Coq.Classes.RelationClasses.
Require Export maps_def.
Import Maps.
Definition Asset : Type := T.
Definition AssetName : Type := S.
Variable a a1 a2 a3 : Asset.
Variable aSet S1 S2... | {"author": "spgroup", "repo": "theory-pl-refinement-coq", "sha": "9587dddac0d6f4792db18629fa1ea3bd3d933abe", "save_path": "github-repos/coq/spgroup-theory-pl-refinement-coq", "path": "github-repos/coq/spgroup-theory-pl-refinement-coq/theory-pl-refinement-coq-9587dddac0d6f4792db18629fa1ea3bd3d933abe/typeclass/Util/asset... |
# Resumo, Teoria e Prática - Equações Diferenciais
> Autor: Gil Miranda<br>
> Contato: gilsmneto@gmail.com<br>
> Repo: [@mirandagil](https://github.com/mirandagil/university-courses/analise-numerica-edo-2019-1)<br>
> Fontes bibliográficas:
* Rosa, R. (2017). <i>Equações Diferenciais</i>.
* Trefethen, L. & Bau, D. (1997... | {"hexsha": "a16afc86063d877a66f9236ef780fbece11260f2", "size": 61090, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "analise-numerica-edo-2019-1/.ipynb_checkpoints/EDOs-checkpoint.ipynb", "max_stars_repo_name": "mirandagil/university-courses", "max_stars_repo_head_hexsha": "e70ce5262555e84cffb13e53... |
import networkx as nx
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
def plot2d_graph(graph):
pos = nx.get_node_attributes(graph, 'pos')
c = [colors[i % (len(colors))]
for i in nx.get_node_attributes(graph, 'cluster').values()]
if c: # is set
... | {"hexsha": "c8a14f61d018fa131727e9bd20b1fbf48c3458fc", "size": 1119, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualization.py", "max_stars_repo_name": "champagneSeth/chameleon-clustering-for-python", "max_stars_repo_head_hexsha": "cf271188b28e9a7269dbb90facdc8bbf6f7274e2", "max_stars_repo_licenses": ["MI... |
from __future__ import print_function
from collections import defaultdict, Counter
import colorama
import itertools
colorama.init()
colorama.deinit()
from copy import copy
from StringIO import StringIO
from gflags import (DEFINE_list, DEFINE_float, DEFINE_bool, DEFINE_string,
DuplicateFlagError, FL... | {"hexsha": "018d527c08c32c4b4dc7afcf0482a944d122a481", "size": 48557, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/causeway/because_data/iaa/__init__.py", "max_stars_repo_name": "duncanka/causeway", "max_stars_repo_head_hexsha": "cc5e66d117ccc4e6fba710eac533c926edd7a668", "max_stars_repo_licenses": ["MIT"... |
import MacroTools
const DSL_STATIC_ANNOTATION = :static
const DSL_ARG_GRAD_ANNOTATION = :grad
const DSL_RET_GRAD_ANNOTATION = :grad
const DSL_TRACK_DIFFS_ANNOTATION = :diffs
const DSL_NO_JULIA_CACHE_ANNOTATION = :nojuliacache
struct Argument
name::Symbol
typ::Union{Symbol,Expr}
annotations::Set{Symbol}
... | {"hexsha": "f3f5bdab58f551e6f90097f6d4c59f741202ee30", "size": 3822, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/dsl/dsl.jl", "max_stars_repo_name": "ali-ramadhan/Gen", "max_stars_repo_head_hexsha": "a24877a703b9944e1a115a67270716b35fe7e8b7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": n... |
#!/usr/bin/env python2.7
import numpy as np
import subprocess
import sys
# custom imports
from mimLocator import *
from mimDrawer import *
def main():
x,y,z = 0,0,0
x = input("Get first coordinate?: ")
scriptsPopen = subprocess.Popen(["python", "forward_kinematics.py"],
... | {"hexsha": "ca6c25f51b8753af603af900b83f575b04ed3a5b", "size": 2723, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "smdth/mimLab", "max_stars_repo_head_hexsha": "78a49c17a4e103841f49cd4b880561a490682864", "max_stars_repo_licenses": ["0BSD"], "max_stars_count": null, "max_stars_... |
This singlelevel industrialstyle building was constructed with a http://dateline.ucdavis.edu/dl_detail.lasso?id6974 $5 million donation from the AnheuserBusch Foundation. It is used by Viticulture and Enology for beer brewing research. It is part of the fivebuilding Robert Mondavi Institute for Wine and Food Science c... | {"hexsha": "b1cee256a0ce4ba61d476fa0e81017e1aa15b2f0", "size": 852, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/August_A._Busch_III_Brewing_and_Food_Science_Laboratory.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars... |
'''
PID control for SISO (single input single output) system
'''
import numpy as np
class PID():
def __init__(self, pgain=0, igain=0, dgain=0,
windup=False, method='euler', dt=0.01):
self.e_intg = 0
self.e_prev = 0 # initial guess for differentiator
self.windup = windup
... | {"hexsha": "96dcc7eef8ead40c25106860c41cdffd476f00c2", "size": 1559, "ext": "py", "lang": "Python", "max_stars_repo_path": "fym/agents/PID.py", "max_stars_repo_name": "JungYT/fym", "max_stars_repo_head_hexsha": "d519c50086e3c7793b960e0326c92ed407836790", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, "max_s... |
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 2 11:00:06 2021
@author: Jose Antonio
"""
import networkx as nx
#G for test small ecore
G_test_small_ecore = nx.MultiDiGraph()
G_test_small_ecore.add_node(0, type = 'EPackage', atts = {'name':'<none>'})
G_test_small_ecore.add_node(1, type = 'EClass', atts = {'name':'<... | {"hexsha": "3cb678c32c6aaeac7f456b4836d5d0a999029dbb", "size": 27007, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/graphs4test.py", "max_stars_repo_name": "Antolin1/DMG-Python", "max_stars_repo_head_hexsha": "ba3942e13006e1a32f3fe9f1b29615311f667274", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
# Minimum spanning tree (MST) algorithms
#
# Long Le
# University of Illinois
#
import numpy as np
import matplotlib.pyplot as plt
from pqdict import minpq
class Node:
def __init__(self,x):
self.val = x
class Edge:
def __init__(self,n0,n1,w):
self.ePts = set([n0,n1]) # end points
self... | {"hexsha": "6848c2158450215e865a8d574ca8945e81297549", "size": 3078, "ext": "py", "lang": "Python", "max_stars_repo_path": "mst/mst.py", "max_stars_repo_name": "longle2718/randProbs", "max_stars_repo_head_hexsha": "f22735dd14cc31bf459aafd06367a68bac89df68", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max... |
import tensorflow as tf
from sklearn.base import BaseEstimator, ClassifierMixin
from sklearn.model_selection import KFold
from bayes_opt import BayesianOptimization
from tqdm import tqdm
from attrdict import AttrDict
from sklearn.metrics import classification_report, log_loss
import functools
import gc
import csv
impor... | {"hexsha": "902eff9c41a33e8dbd7a731efbe824aa8f5844dd", "size": 16706, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/apex_tf/mean_pool_model.py", "max_stars_repo_name": "airxiechao/gap", "max_stars_repo_head_hexsha": "1262bb7063da95011479839b4ccb4d9ed2e97020", "max_stars_repo_licenses": ["MIT"], "max_sta... |
"""
function compile(abm=SimulationFree();platform="cpu", neighbours="full", integrator = "euler", save = "RAM", debug = false, user_=true)
Function that takes an Agent and a simulation and constructs the function in charge of the evolutions of the model.
"""
function compile(abmOriginal::Union{Agent,Array{Agent}}... | {"hexsha": "9d5cb2f5fe34fb433a63623928eef53d7222311a", "size": 3193, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/model/compile.jl", "max_stars_repo_name": "gatocor/AgentBasedModels.jl", "max_stars_repo_head_hexsha": "b552cbff9e13660670782754bf25b0f334cb1e70", "max_stars_repo_licenses": ["MIT"], "max_stars... |
"""Some helper function for PyGeoHydro."""
from typing import Any, Dict
import async_retriever as ar
import defusedxml.ElementTree as etree
import numpy as np
import pandas as pd
def nlcd_helper() -> Dict[str, Any]:
"""Get legends and properties of the NLCD cover dataset.
Notes
-----
The following r... | {"hexsha": "d2f143f4e48ee68c9e72f65e023c88196e15bdc0", "size": 3188, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygeohydro/helpers.py", "max_stars_repo_name": "cheginit/hydrodata", "max_stars_repo_head_hexsha": "3c11051604b350543bf2f411e40f3479773fa190", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
SUBROUTINE MULTIMODEFLOQUETMATRIX_SP_C(ATOM__C,NM,NF,MODES_NUM,FIELDS_C,INFO)!VALUES_,ROW_INDEX_,COLUMN_,SP,INFO)
! THIS SUBROUTINE BUILDS THE MULTIMODE FLOQUET MATRIX
!ATOM_ (IN) : type of quantum system
!NM (IN) : number of modes
!NF (IN) : number of driving fields
!MODES_NUM (IN) :... | {"hexsha": "94eb5a5ecb3e55d335b07d21d34c5345a0c7ba77", "size": 5166, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/MultimodeHamiltonian_SP_C.f90", "max_stars_repo_name": "gsinuco/OPENMMF", "max_stars_repo_head_hexsha": "2cc0d0f2a4ded895c189050c38dbf2e8985e2d55", "max_stars_repo_licenses": ["CC-BY-4.0"], ... |
#Thanks to : Satwik Bhattamishra
"""
Graph Regularized NMF:
[3] Cai, D., He, X., Han, J., & Huang, T. S. (2011). Graph regularized
nonnegative matrix factorization for data representation. IEEE Transactions
on Pattern Analysis and Machine Intelligence, 33(8), 1548-1560.
"""
import numpy as np
from numpy i... | {"hexsha": "9c201f255a50e1187f19bfb5c0b2cbc910caa62c", "size": 3682, "ext": "py", "lang": "Python", "max_stars_repo_path": "GNMF_hyper_and_Graph.py", "max_stars_repo_name": "BarakeelFanseu/GRAC_CIKM", "max_stars_repo_head_hexsha": "3cbdbbb6c4902653f633c6d8f1c80f370b2938cf", "max_stars_repo_licenses": ["MIT"], "max_star... |
module Metrics
# Module for DL Metrics
export mae, mse, msle, male, r2_score, adjusted_r2_score
export binary_accuracy, confusion_matrix, categorical_accuracy, sparse_categorical, top_k_categorical, top_k_sparse_categorical, precision, recall, sensitivity, detection_rate, f_beta_score, specificity, false_alarm_rate, ... | {"hexsha": "0a19197bd624252b7c3f9e112302d6d268da8589", "size": 764, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Metrics.jl", "max_stars_repo_name": "yuehhua/Metrics.jl", "max_stars_repo_head_hexsha": "6dc6fd6155afe551dd6424debdf7f034e68acb29", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, "ma... |
// Created by xufeiwang on 21/12/19.
#include <cstdlib>
#include <iostream>
#include <RcppArmadillo.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include <ctime>
#include <vector>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <utility>
#include <armadillo>
using namespace std;
using namespace Rc... | {"hexsha": "000040ce24070e3a3148d386fa45436a46a98f74", "size": 3500, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/knots_selection.cpp", "max_stars_repo_name": "wangxf0106/vcmasf", "max_stars_repo_head_hexsha": "55f2b09a4d4d290a90d08fb12bcccf45c599bd37", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
# 허브 변환 원 검출
import cv2
import sys
import numpy as np
src = cv2.imread('HappyFish.jpg')
if src is None:
print('no img')
sys.exit()
gray = cv2.cvtColor(src, cv2.COLOR_BGR2GRAY)
# 블러링 하고 약간 디테일을 둑이면 잘됨
# 블러링을 잘해줘야 한다
blr = cv2.GaussianBlur(gray, (0,0), 1.0)
def on_trackbar(pos):
rmin = cv2.getTrackbarP... | {"hexsha": "3eb14797081a139e7f7cec24e9067ba07636c754", "size": 1151, "ext": "py", "lang": "Python", "max_stars_repo_path": "TIL/HoughCircles.py", "max_stars_repo_name": "FLY-CODE77/opencv", "max_stars_repo_head_hexsha": "5644e6c1ef43d81efb54ccde6c06f1adf000fb96", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1... |
/**
* Copyright (c) 2016, Adrien Devresse <adrien.devresse@epfl.ch>
*
* Boost Software License - Version 1.0
*
* Permission is hereby granted, free of charge, to any person or organization
* obtaining a copy of the software and accompanying documentation covered by
* this license (the "Software") to use, reprodu... | {"hexsha": "a9fe454878aef5e00c8a848d9cd7c047c6621b89", "size": 5915, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/unit/test_string.cpp", "max_stars_repo_name": "adevress/hadoken", "max_stars_repo_head_hexsha": "c501c53b14dfd256ae745d417b6417855b77ed05", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_c... |
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is d... | {"hexsha": "3273261da85a50254acb98f7866db633954a910e", "size": 56664, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "source/gameengine/GamePlayer/GPG_ghost.cpp", "max_stars_repo_name": "lordloki/upbge", "max_stars_repo_head_hexsha": "18d0f5419cc1338ecf739362afef56bd96b42cfb", "max_stars_repo_licenses": ["Naumen",... |
# coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | {"hexsha": "43557cbf71be9235bc1de260c2690dbdf4b92631", "size": 4121, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensor2tensor/models/research/glow_test.py", "max_stars_repo_name": "gonglinyuan/t2tTest", "max_stars_repo_head_hexsha": "c100fa85d581922b212b45a9fdf4f07cd1752a56", "max_stars_repo_licenses": ["Ap... |
'''
Takes a dot product in parallel.
Example usage:
$ mpirun -n 4 python.exe dot.py 1000
Assumes n is divisible by SIZE
command line arguments: n, the length of the vector to dot with itself
'''
from mpi4py import MPI
import numpy as np
from sys import argv
COMM = MPI.COMM_WORLD
RANK = COMM.Get_rank()
SIZE = CO... | {"hexsha": "7113d034faa031e77fb11ef59fc57485032265db", "size": 1010, "ext": "py", "lang": "Python", "max_stars_repo_path": "Labs/MPICollectiveCommunication/dot.py", "max_stars_repo_name": "jessicaleete/numerical_computing", "max_stars_repo_head_hexsha": "cc71f51f35ca74d00e617af3d1a0223e19fb9a68", "max_stars_repo_licens... |
\SetAPI{J-C}
\section{ambeth.merge.entityfactory.type}
\label{configuration:AmbethMergeEntityfactoryType}
\ClearAPI
Defines which IEntityFactory should be used. Has to be a fully qualified class name. If not specified a default IEntityFactory will be used. For more information see \refname{feature:EntityFactory}.
%% GE... | {"hexsha": "1ae5369dc50e9d06d55c7e3e1c20c2fbfa342482", "size": 905, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/reference-manual/tex/configuration/AmbethMergeEntityfactoryType.tex", "max_stars_repo_name": "Dennis-Koch/ambeth", "max_stars_repo_head_hexsha": "8552b210b8b37d3d8f66bdac2e094bf23c8b5fda", "max_s... |
(* Title: HOL/Auth/n_germanSymIndex_lemma_inv__29_on_rules.thy
Author: Yongjian Li and Kaiqiang Duan, State Key Lab of Computer Science, Institute of Software, Chinese Academy of Sciences
Copyright 2016 State Key Lab of Computer Science, Institute of Software, Chinese Academy of Sciences
*)
header... | {"author": "lyj238Gmail", "repo": "newParaVerifier", "sha": "5c2d49bf8e6c46c60efa53c98b0ba5c577d59618", "save_path": "github-repos/isabelle/lyj238Gmail-newParaVerifier", "path": "github-repos/isabelle/lyj238Gmail-newParaVerifier/newParaVerifier-5c2d49bf8e6c46c60efa53c98b0ba5c577d59618/examples/n_germanSymIndex/n_german... |
import logging
from pathlib import Path
import pandas as pd
import numpy as np
from sklearn.metrics import mean_squared_error
import yaml
def parse_config(config_file):
with open(config_file, "rb") as f:
config = yaml.safe_load(f)
return config
def set_logger(log_path):
"""
Read more about ... | {"hexsha": "568f6261ae524a073cbc5dad8e5c3a683f97d906", "size": 1310, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/utility.py", "max_stars_repo_name": "jdpinedaj/CFLDelays", "max_stars_repo_head_hexsha": "27c2f3d0cf39654b21dc600c3cc3f9b6b8aaeb99", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import numpy as np
import random
import torch
import torch.nn as nn
from torch.optim import Adam
from torch.distributions import Categorical
import dgl
from enviroment.ChemEnv import ChemEnv
from enviroment.Utils import selfLoop
from models import init_weights_recursive, BaseLine, CriticSqueeze
device = None
c... | {"hexsha": "48f97a51fa31a3115990e84e7db9dfee12ad76ba", "size": 15655, "ext": "py", "lang": "Python", "max_stars_repo_path": "CLEAN/PPO.py", "max_stars_repo_name": "tsteternlieb/DrugDesignThesis", "max_stars_repo_head_hexsha": "2ab00826dbfd2567db5a9054731bd7d49ff12126", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
# 이 Python 3 환경에는 많은 유용한 분석 라이브러리가 설치되어 있습니다.
# 이것은 카글/도커 이미지로 정의된다: https://github.com/kaggle/docker-python
# 예를 들어, 여기에 로드해야 할 몇 가지 유용한 패키지가 있습니다.
import os
# for dirname, _, filenames in os.walk('./1024data'):
# for filename in filenames:
# print(os.path.join(dirname, filename))
# "Save & Run All"을 사용하... | {"hexsha": "f15d1f6b50b0d1f6253721858f716691e6323aac", "size": 4827, "ext": "py", "lang": "Python", "max_stars_repo_path": "Model/predict.py", "max_stars_repo_name": "Paransaik/Capstone", "max_stars_repo_head_hexsha": "d2721dd1cac9c4b0dbdf6cb577977166af2854bb", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun... |
import pandas as pd
import numpy as np
import math
import pdb
def average(series):
a1 = sum(series)
b1 = len(series)
c1 = a1/b1
"""
print(c1)
"""
return c1
"""
implements the average of a pandas series from scratch
suggested functions:
len(list)
sum(list)
you s... | {"hexsha": "34d39185b3b5b569853fdb849ed3b8d8d7409dec", "size": 2349, "ext": "py", "lang": "Python", "max_stars_repo_path": "eda_hw.py", "max_stars_repo_name": "fanyiwen9596/applied_ds", "max_stars_repo_head_hexsha": "c30a0193dd90640db10c4640d822d4caab86bf53", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun... |
// AirMap Platform SDK
// Copyright © 2018 AirMap, Inc. 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 requir... | {"hexsha": "63558019c83b601d39bd1f550698b5f3b3f73c46", "size": 4817, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/airmap/platform/linux/xdg.cpp", "max_stars_repo_name": "YUNEEC/platform-sdk", "max_stars_repo_head_hexsha": "5670c5096087e836ecdbde38ae401cbfa7fa5fc7", "max_stars_repo_licenses": ["Apache-2.0"],... |
condition1 <= ( ( not ( ( OR_NORx and ( not '0' ) ) or ( ( not OR_NORx ) and '0' ) ) ) and ( not ( ( OR_NORy and ( not '0' ) ) or ( ( not OR_NORy ) and '0' ) ) ) );
OR_NORF1 <= ( condition1 and ( '0' ) ) or ( ( not condition1 ) and ( '1' ) );
condition2 <= ( ( not ( ( OR_NORx and ( not '0' ) ) or ( ( not OR_NORx ) and ... | {"hexsha": "5d1fa92aa05f851f3a11b43c488a52bc00a3a636", "size": 487, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "tests/v/staff.out/synthesize/or_nor.f", "max_stars_repo_name": "Deshiuu/351lab-code-copy", "max_stars_repo_head_hexsha": "4d1fdf1f119c6798332c662dee99dd29d7a01520", "max_stars_repo_licenses": ["BSD... |
from typing import Any, Optional, Tuple, Callable, overload
import numpy as np
from . import vdbfusion_pybind
class VDBVolume:
def __init__(
self,
voxel_size: float,
sdf_trunc: float,
space_carving: bool = False,
):
self._volume = vdbfusion_pybind._VDBVolume(
... | {"hexsha": "c37957af691b8102d512bf59d9dae42915f7f2c6", "size": 5289, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/vdbfusion/pybind/vdb_volume.py", "max_stars_repo_name": "saurabh1002/vdbfusion", "max_stars_repo_head_hexsha": "e5c010931ea08eeb852854092057cf65f0f8bc7a", "max_stars_repo_licenses": ["MIT"], "... |
import numpy as np
import torch
import torch.nn.functional as F
import torch.nn as nn
import sys
from torch.autograd import Variable
import math
import torch.nn.functional as F
from torchsummary import summary
POOLSIZE = 2
DROPOUT_RATE = .25
def init_weights(m):
if isinstance(m, nn.Linear):
torch.nn.ini... | {"hexsha": "e5b3cbda5517a748180c499d890b0814535723b2", "size": 6641, "ext": "py", "lang": "Python", "max_stars_repo_path": "clmr/models/preliminary_models/SeqUNetIshCorrect.py", "max_stars_repo_name": "Marcel-Velez/CLMR", "max_stars_repo_head_hexsha": "730bd9078756650a53b4c6438b29e5aeb2c15134", "max_stars_repo_licenses... |
"""
Module Basis3DHex
Includes DG core functions.
"""
module Basis3DHex
export vandermonde_3D, grad_vandermonde_3D
export nodes_3D, equi_nodes_3D, quad_nodes_3D
using Basis1D
using CommonUtils
using LinearAlgebra
"""
vandermonde_2D(N, r)
Initialize the 2D Vandermonde matrix of order N "Legendre" polynomia... | {"hexsha": "29f7127b8aaeb08e77a389b182a1b19805251cd4", "size": 2096, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Basis3DHex.jl", "max_stars_repo_name": "jlchan/ESDG-CNS", "max_stars_repo_head_hexsha": "a1ed7ef8e9c4270692ab76e938d0f5b0b44d5298", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "ma... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This software is under a BSD license. See LICENSE.txt for details.
from datatank_py.DTStructuredGrid2D import DTStructuredGrid2D, _squeeze2d
import numpy as np
class DTStructuredMesh2D(object):
"""2D structured mesh object.
This class corresponds to DataT... | {"hexsha": "ca7ffb111df9716f1bf571b4daf6b4a736e95bf4", "size": 4176, "ext": "py", "lang": "Python", "max_stars_repo_path": "datatank_py/DTStructuredMesh2D.py", "max_stars_repo_name": "amaxwell/datatank_py", "max_stars_repo_head_hexsha": "69404b23e456b23db8ef2e59b484283f40dbb9ec", "max_stars_repo_licenses": ["BSD-3-Clau... |
"""State of a Bayesian quadrature method."""
from typing import Optional, Tuple
import numpy as np
from probnum.quad._integration_measures import IntegrationMeasure
from probnum.quad.kernel_embeddings import KernelEmbedding
from probnum.randprocs.kernels import Kernel
from probnum.random_variables import Normal
# p... | {"hexsha": "8166cf50892c7b84ec03df0e0661da1335aee1f8", "size": 4241, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/probnum/quad/solvers/bq_state.py", "max_stars_repo_name": "feimeng93/probnum", "max_stars_repo_head_hexsha": "4e46273c0157d26b9be2a7a415ccf69a3691ec22", "max_stars_repo_licenses": ["MIT"], "ma... |
import LMT
variable {I} [Nonempty I] {E} [Nonempty E] [Nonempty (A I E)]
example {a1 a2 a3 : A I E} :
(((a1).write i1 (v3)).write i3 (v3)) ≠ (((a1).write i3 (v3)).write i1 (v3)) → False := by
arr
| {"author": "abdoo8080", "repo": "ar-project", "sha": "303af2d62cf8c8fe996c9670f9fe5a0cc90e5bb8", "save_path": "github-repos/lean/abdoo8080-ar-project", "path": "github-repos/lean/abdoo8080-ar-project/ar-project-303af2d62cf8c8fe996c9670f9fe5a0cc90e5bb8/Test/Lean/Test37.lean"} |
"""pymoku example: Basic Laser Lock Box
This example demonstrates how you can configure the laser lock box
instrument
(c) 2019 Liquid Instruments Pty. Ltd.
"""
from pymoku import Moku
from pymoku.instruments import LaserLockBox
from scipy import signal
def gen_butterworth(corner_frequency):
"""
Generate co... | {"hexsha": "7859bc259412f39a1da20ff907ce15d5b81305d4", "size": 1725, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/laser_lock_box_basic.py", "max_stars_repo_name": "liquidinstruments/pymoku", "max_stars_repo_head_hexsha": "a10c2516e5953722a5f5b52aec7944bec22492c2", "max_stars_repo_licenses": ["MIT"], ... |
# coding: utf-8
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department
# Distributed under the terms of "New BSD License", see the LICENSE file.
from pyiron_base._tests import PyironTestCase
from pyiron_continuum.schroedinger.potentials import SquareWell, Sinusoida... | {"hexsha": "42226f3c8b989dc454029f4c991cdae35b6e001b", "size": 1790, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/schroedinger/test_potentials.py", "max_stars_repo_name": "yangbai90/pyiron_continuum", "max_stars_repo_head_hexsha": "98c1161441cf6f66ab428f35f3c5c37aa8c15736", "max_stars_repo_licenses... |
# -*- coding: utf-8 -*-
"""
Make a simplified graph of Copenhagen (and Frederiksberg) by removing
every non-necessary interstitial nodes and discriminating roads with
protected bicycling infrastructure (or safe place) and others, based on
the criterion of bikewgrowth.
"""
import nerds_osmnx.simplification as simplifi... | {"hexsha": "e3309e7eac21df8f3067ae827fa5f0aba010d7ee", "size": 4174, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/protected_bicycling_copenhagen_simplified.py", "max_stars_repo_name": "anerv/NERDS_osmnx", "max_stars_repo_head_hexsha": "c243317b3ac518269c63d2fcec0e51f9a7af8327", "max_stars_repo_license... |
\subsection{capBAC}
\label{subsec:capbacsystem}
\section{CAPBAC (Capability Based Access Control)}
CapBAC is an access control framework designed for the Internet of Things.~\cite{hernandez2013distributed} the primary idea is to accommodate seamless integration of devices in the internet by facilitating a distributed ... | {"hexsha": "6a30ec760ffd2e6b116a1d7a718b92758137b62b", "size": 4206, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "paper/capbacsystem.tex", "max_stars_repo_name": "jtracey/cuddly-fiesta", "max_stars_repo_head_hexsha": "7725f567f6eb85f7c0940c531d21d6dbd50a8767", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
\section{File System Isolation}
Isolation is an important property in modern systems.
Various isolation techniques are proposed for different parts of the
system. Typical examples include virtual
machines~\cite{bugnion97disco,DragovicEtAl03-Xen}, Linux Containers~\cite{linux-container},
isolation kernel~\cite{Whit... | {"hexsha": "9403bf595d2e9f68c3c33c16fc6f19d9a7141389", "size": 5644, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "lanyue_thesis/related/icefs.tex", "max_stars_repo_name": "keqhe/phd_thesis", "max_stars_repo_head_hexsha": "770fc637f9b7d908f349bbbfa112cbc17d898be3", "max_stars_repo_licenses": ["Unlicense"], "max_... |
import numpy as np
import tvm
from tvm import te
# The sizes of inputs and filters
# batch = 256
# in_channel = 256
# out_channel = 512
# in_size = 14
# kernel = 3
# pad = 1
# stride = 1
batch = 4
in_channel = 3
out_channel = 64
in_size = 16
kernel = 3
pad = 0
stride = 1
# Algorithm
A = te.placeholder((in_size, in_s... | {"hexsha": "d9a146d56c89be28e68954acef2ecc47fd5b922b", "size": 4276, "ext": "py", "lang": "Python", "max_stars_repo_path": "5.tvm/tvm-conv.py", "max_stars_repo_name": "DbettKK/AmpereSparseMatmul", "max_stars_repo_head_hexsha": "25a3a053059cd86a87a278757e2de6af9e889063", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import numpy as np
def ns(x):
y = np.roll(x, 1, axis=0)
y[0, :] = 0
z = np.roll(x - y, -1, axis=0)
z[-1, :] = 0
return z
def sn(x):
y = np.roll(x, -1, axis=0)
y[-1, :] = 0
z = np.roll(y - x, 1, axis=0)
z[0, :] = 0
return z
def we(x):
y = np.roll(x, 1, axis=1)
y[:, 0... | {"hexsha": "49e65dcbe838e85062f99f70a4ff3d0f2642aeb4", "size": 782, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/analogues/gradient.py", "max_stars_repo_name": "b8raoult/analogues", "max_stars_repo_head_hexsha": "447c1b098298a93f45e754d95b6068df50a8ed1d", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
\documentclass[11pt,letterpaper]{article}
\usepackage[hmargin=0.7in,vmargin=1in,landscape]{geometry}
\usepackage[T1]{fontenc}
\usepackage{url}
\usepackage{tabularx,array,varwidth}
\setlength{\parindent}{0pt}
\begin{document}
{\LARGE Big-O Cheat Sheet} \\
Generated \today. \\
Brandon Amos <\url{http://bamos.github.io... | {"hexsha": "4946747a38992d5b775f7861bb5012cd9252bdc1", "size": 5491, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "data/2013-12-10/data.tex", "max_stars_repo_name": "dineshresearch/amaradineshkumar.github.io", "max_stars_repo_head_hexsha": "33f9506fdc3f58ee87524c3630c2d40157f685f2", "max_stars_repo_licenses": ["... |
SUBROUTINE CLATM4( ITYPE, N, NZ1, NZ2, RSIGN, AMAGN, RCOND,
$ TRIANG, IDIST, ISEED, A, LDA )
*
* -- LAPACK auxiliary test routine (version 3.0) --
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
* Courant Institute, Argonne National Lab, and Rice University
* Sept... | {"hexsha": "c539a32479fac976edebe0646be61d28b1a9c952", "size": 10042, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "old/lapack-test/lapack-timing/EIG/clatm4.f", "max_stars_repo_name": "haampie/libflame", "max_stars_repo_head_hexsha": "a6b27af9b7ef91ec2724b52c7c09b681379a3470", "max_stars_repo_licenses": ["BSD-... |
import tensorflow as tf
import numpy as np
import json
import time
import logging
import pickle as pkl
from accuracy_score import model_evaluation
def HAN_model_1(session, config, logger, restore=False):
"""Hierarhical Attention Network"""
try:
from tensorflow.contrib.rnn import GRUCell, MultiRNNCell,... | {"hexsha": "7c30a19653e9698fcc4336c7f3a8ad7081529284", "size": 9176, "ext": "py", "lang": "Python", "max_stars_repo_path": "nn_model/worker.py", "max_stars_repo_name": "heisenbugfix/GO_Evidence_Classification", "max_stars_repo_head_hexsha": "06beb1d0ec56a983394f2f07aa3e70c33e28fdb3", "max_stars_repo_licenses": ["MIT"],... |
! -----------------------------------------------------------------------------
!
! Copyright (c) 2017 Sam Cox, Roberto Sommariva
!
! This file is part of the AtChem2 software package.
!
! This file is covered by the MIT license which can be found in the file
! LICENSE.md at the top level of the AtChem2 distribution.
!... | {"hexsha": "44aedb4f281b81391c5c5ff888597992f4241bc0", "size": 4663, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/unit_tests/solar_test.f90", "max_stars_repo_name": "AlfredMayhew/AtChem2", "max_stars_repo_head_hexsha": "afc389685ac8cce7028bd52dc99984d9959b044a", "max_stars_repo_licenses": ["MIT"], "ma... |
import re
import numpy as np
import pandas as pd
import spacy
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from tqdm import tqdm
from tea import setup_logger, NEGATIVE_WORDS, POSITIVE_WORDS, CONTRACTION_MAP
from tea.text_mining i... | {"hexsha": "ebe1da8523e71169d12ec9774e06b6eba363d769", "size": 20112, "ext": "py", "lang": "Python", "max_stars_repo_path": "tea/features.py", "max_stars_repo_name": "gperakis/reviews-classifier", "max_stars_repo_head_hexsha": "18ded10d52e018136b56b934d091a39abd28a220", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
# Copyright 2021 ETH Zurich, Media Technology Center
#
# 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... | {"hexsha": "ad21715d67879dd29ef8fcbe87e014305b20fe6c", "size": 1469, "ext": "py", "lang": "Python", "max_stars_repo_path": "example_scripts/create_dummy_data.py", "max_stars_repo_name": "MTC-ETH/RecommenderSystems", "max_stars_repo_head_hexsha": "ede5aa961740348a68210f271397e1924c5f7cf6", "max_stars_repo_licenses": ["A... |
import tensorflow as tf
import numpy as np
import argparse
import os
import time
import json
from sklearn import metrics
from tqdm import tqdm
os.environ.pop('http_proxy')
os.environ.pop('https_proxy')
def train_criteo(model, cluster, task_id, nrank, args):
def get_current_shard(data):
part_size = data.sh... | {"hexsha": "fba943aeacda86e4b35267971ecead4777194123", "size": 13586, "ext": "py", "lang": "Python", "max_stars_repo_path": "pstests/tf_launch_worker.py", "max_stars_repo_name": "sj1104/Het", "max_stars_repo_head_hexsha": "81b7e9f0f593108db969fc46a1af3df74b825230", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_... |
import torch
import megengine as mge
import megengine.functional as F
import os
import numpy as np
from meg_networks import FullyConnectedLayer
in_channels = 512
w_dim = 512
# activation = 'linear'
# activation = 'lrelu'
# activation = 'relu'
# activation = 'tanh'
activation = 'sigmoid'
# activation = 'elu'
# activa... | {"hexsha": "674fd29609b8cabbf3a4497d4adfe35e6738211b", "size": 1381, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_grad/test2_01_FullyConnectedLayer_grad_2mge.py", "max_stars_repo_name": "miemie2013/ppgan", "max_stars_repo_head_hexsha": "48008d85ec6c5fa2e1469acf8507b2614fa550cc", "max_stars_repo_licenses"... |
# Copyright 2017 Google 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 in writing, ... | {"hexsha": "ad96e15cd7b3ec5fe7a7638fc6e8d986ede15ac8", "size": 5808, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulation/model.py", "max_stars_repo_name": "asi-uniovi/power-simulation", "max_stars_repo_head_hexsha": "75262c57bfc2500999d0ee1eda4150b9a64817d6", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
"""
------------------------------------
mcts_basic: Monte Carlo Tree Search.
------------------------------------
"""
import numpy as np
from controller.game_ai import GameAI
from config import Config
from view.log import log
from view.graph import Graph
class Node():
action = None
state = None
children =... | {"hexsha": "a1e22d3672b89a7967b6d06ff5e443d971e92c19", "size": 6282, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/controller/mcts_basic.py", "max_stars_repo_name": "dkfrankandersen/ITU-BSc-Thesis", "max_stars_repo_head_hexsha": "d86dab2050966a65e8b81cd57dfcc0508e280543", "max_stars_repo_licenses": ["MIT"]... |
export HContainer, add_object!
import Base: collect, delete!
"""
`HContainer` is a device for holding a collection of hyperbolic objects.
It is like a set, but we have to do a lot of work before adding a new
element because equal hyperbolic objects might differ a tiny amount and
that would mess up hashing.
+ `C = H... | {"hexsha": "9f1fbf1b9fc8ae8756933e950e9dd5e92d5f0e1b", "size": 1833, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/container.jl", "max_stars_repo_name": "switzel/HyperbolicPlane.jl", "max_stars_repo_head_hexsha": "89ba26e080b520b4f200e985f2b431b1d61ecb21", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import hypergraph as hg
import numpy as np
graph1 = hg.Graph()
with graph1.as_default():
hg.mark("abc1") << (hg.dump() << "** abc1 **")
n = hg.mark("abc2") << (hg.dump() << "** abc2 **")
idx = hg.node(lambda _: np.random.randint(0, 2))
hg.output() << (hg.select(idx) << ["abc1", "abc2"])
for _ in rang... | {"hexsha": "a646fc3c636a3a45e1eedb0ff2daafedb186cfd4", "size": 447, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/basic/select1.py", "max_stars_repo_name": "sflinter/hypergraph", "max_stars_repo_head_hexsha": "c3108ee51361d2e4b8ddc7eced1953f1548ce8d8", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def grocery(path):
"""Grocery
Grocery store sales
A dataset with 36... | {"hexsha": "7a2e1a442c1dde48fb7d5123a884ad382c154621", "size": 1638, "ext": "py", "lang": "Python", "max_stars_repo_path": "observations/r/grocery.py", "max_stars_repo_name": "hajime9652/observations", "max_stars_repo_head_hexsha": "2c8b1ac31025938cb17762e540f2f592e302d5de", "max_stars_repo_licenses": ["Apache-2.0"], "... |
from __future__ import print_function
import numpy as np
from scipy import io
from keras.models import model_from_json
#Consturct CNN model
model = model_from_json(open('srcnn_model.json').read())
#load weights
model.load_weights('srcnn_model_weights.h5')
w = model.get_weights()
for i in range(0,6,2):
w[i] = np.... | {"hexsha": "e7645c90169a994fe07141868f844ae7f88753f1", "size": 491, "ext": "py", "lang": "Python", "max_stars_repo_path": "SRCNN_train/convert/load_save.py", "max_stars_repo_name": "YapengTian/SRCNN-Keras", "max_stars_repo_head_hexsha": "017b5d3849e8de78879a7e0944a6773d6451cda6", "max_stars_repo_licenses": ["MIT"], "ma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.