text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
from __future__ import print_function, division
import os
on_rtd = os.environ.get('READTHEDOCS') == 'True'
if not on_rtd:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from scipy.interpolate import UnivariateSpline as interpolate
from scipy.integrate import quad
else:
... | {"hexsha": "e142df527cedee13693c444ab925b7ed50da420e", "size": 5615, "ext": "py", "lang": "Python", "max_stars_repo_path": "vespa/stars/contrastcurve.py", "max_stars_repo_name": "Li-Yangyang/VESPA", "max_stars_repo_head_hexsha": "91b29a3707e2a4eebaab46002acb3cd831825c5f", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
using Logging
using Random
"Return a random index to be filled from the garden mask."
function randomindex(mask::Matrix{Bool})::Int
while true
i = rand(1:length(mask))
if mask[i]
return i
end
end
end
"Swap to the elements corresponding to the two provided indices."
function... | {"hexsha": "343ed8ed4574aa2a3c74a5bd48bd29d1693a407a", "size": 3115, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/mcmc.jl", "max_stars_repo_name": "dlozeve/GardenOptim", "max_stars_repo_head_hexsha": "1c82d1716aea120d26f9988edea5a9b4e62dffe0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
exp(π) - π
# Solve x^2 + 5x + 6 = 0 using the quadratic formula (real arithmetics)
# Coefficients a,b,c in ax^2 + bx + c = 0
a = 1
b = 5
c = 6
# The quadratic formula
d = sqrt(b^2 - 4*a*c)
r1 = (-b - d) / 2a
r2 = (-b + d) / 2a
println("The roots are ", r1, " and ", r2)
function myfunc(x,y)
x + y
end
myfunc(1,2... | {"hexsha": "909f49efd4cba4cf2265164ee7cbd4dfcbf8d204", "size": 845, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "textbook/_build/jupyter_execute/content/Introduction/Functions.jl", "max_stars_repo_name": "NoseKnowsAll/NoseKnowsAll.github.io", "max_stars_repo_head_hexsha": "b2cff3e33cc2087770fb4aecb38b7925ad8d6... |
[STATEMENT]
lemma PiE_eq_iff:
"Pi\<^sub>E I F = Pi\<^sub>E I F' \<longleftrightarrow> (\<forall>i\<in>I. F i = F' i) \<or> ((\<exists>i\<in>I. F i = {}) \<and> (\<exists>i\<in>I. F' i = {}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (Pi\<^sub>E I F = Pi\<^sub>E I F') = ((\<forall>i\<in>I. F i = F' i) \<or> (... | {"llama_tokens": 2818, "file": null, "length": 17} |
import numpy as np
import pytest
from pytest import approx
from desdeov2.problem.Constraint import (
ConstraintError,
ScalarConstraint,
constraint_function_factory,
)
@pytest.fixture
def objective_vector_1():
return np.array([1.0, 5.0, 10.0])
@pytest.fixture
def decision_vector_1():
return np.a... | {"hexsha": "e0a276929d6b48814daa16fb1b3abb5ffa127c5a", "size": 4761, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/problem/test_constraint.py", "max_stars_repo_name": "gialmisi/DESDEOv2", "max_stars_repo_head_hexsha": "0eeb4687d2e539845ab86a5018ff99b92e4ca5cf", "max_stars_repo_licenses": ["MIT"], "max_st... |
"""
scc(di_ei, di_ej, scc_init::SCCInit)
Compute to which strongly connected component each vertex belongs.
`di_ei` and `di_ej` describe the edges such that the k-th component of di_ei and k-th component
of `di_ej` form an edge i.e `di_ei = [1, 1, 2]` and `di_ej = [3, 4, 3]` =>
those three edges (1, 3), (1, 4)... | {"hexsha": "55033aa045cb9330ece83f08ec596b939f098ec0", "size": 3276, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/constraints/all_different/scc.jl", "max_stars_repo_name": "Azzaare/ConstraintSolver.jl", "max_stars_repo_head_hexsha": "feec0320d9c26e16c2ced59bf11877ac7141ce8a", "max_stars_repo_licenses": ["M... |
# Author - K.G. Abeywardena
# Date - 29/01/2020
import sys
import numpy as np
import matplotlib.pyplot as plt
from scipy.linalg import eigh
import matplotlib
plt.style.use('classic')
#Function for creating the Hamiltonian matrix
def Hamiltonian(N, dx, potential, h_bar, mass):
"""
This ... | {"hexsha": "b23dea736bc58043d076e8a44943d35d791fa7b4", "size": 10133, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python_scripts/Schrodinger-Solver-1D.py", "max_stars_repo_name": "Kalana304/Schrodinger-s-Wave-Equation---NumericalSolution", "max_stars_repo_head_hexsha": "f9f1fd7be055b4f850cdce6e1fd1b34fb4eeca... |
# coding: utf-8
# Copyright (c) 2021 AkaiKKRteam.
# Distributed under the terms of the Apache License, Version 2.0.
import shutil
from pymatgen.core.sites import PeriodicSite
from pymatgen.core import Structure
from pymatgen.analysis.structure_matcher import StructureMatcher
import json
from pymatgen.symmetry.analy... | {"hexsha": "2281c1db764c4ecb2874422fcdf39511609d9a3f", "size": 26601, "ext": "py", "lang": "Python", "max_stars_repo_path": "library/PyAkaiKKR/pyakaikkr/CompareCifKkr.py", "max_stars_repo_name": "AkaiKKRteam/AkaiKKRPythonUtil", "max_stars_repo_head_hexsha": "be716747de83c9f1787b6ac1c9a61ef725a643dd", "max_stars_repo_li... |
library(ggplot2)
m = 1 #rotation order
phi = seq(0,2*pi,length.out = 100)
r = seq(0,1,length.out = 50)
real_filter = function(r,phi,m)exp(-r^2)*cos(phi*m)
img_filter = function(r,phi,m)exp(-r^2)*sin(phi*m)
df = expand.grid(phi = phi, r = r)
df$real_filter = real_filter(df$r,df$phi,m)
df$img_filter = img_filter(... | {"hexsha": "9f1f6ec4122f1bb9c84ee809c29675dc0e1c6b5a", "size": 1758, "ext": "r", "lang": "R", "max_stars_repo_path": "project/proof-of-concept/harmonic_filters.r", "max_stars_repo_name": "amorehead/Equivariant-GNNs", "max_stars_repo_head_hexsha": "4e81136242a4c8905b0e5fc39be5f704a42cc5e1", "max_stars_repo_licenses": ["... |
\section{Conclusions}
\label{sec:conclusions}
In this work we showed the implementation of a bot for botnets with centralized C\&C layer. The developed bot is fundamentally thought for testing and educational showcase, but it is actually ready to interact with a real web controller.
The implemented architecture makes ... | {"hexsha": "5981dfe99c6fa92db0374fe9888d25cb20a9678f", "size": 468, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "botnet/sec/conclusions.tex", "max_stars_repo_name": "gmarciani/research", "max_stars_repo_head_hexsha": "7cc526fe7cd9916ceaf8285c4e4bc4dce4028537", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
from typing import Dict, List
import numpy as np
def _extract_batch_length(preds: Dict[str, np.ndarray]) -> int:
"""Extracts batch length of predictions."""
batch_length = None
for key, value in preds.items():
batch_length = batch_length or value.shape[0]
if value.shape[0] != batch_lengt... | {"hexsha": "1356136d76ab0b3e15e7fabb67e26264953c836b", "size": 721, "ext": "py", "lang": "Python", "max_stars_repo_path": "expats/common/tensor.py", "max_stars_repo_name": "octanove/expats", "max_stars_repo_head_hexsha": "fd06a50b4c38505135c075b47df0b84003c51ab3", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c... |
MODULE ED_SPARSE_MATRIX !THIS VERSION CONTAINS ONLY DBLE ELEMENT: (SYMMETRIC MATRIX)
USE SF_IOTOOLS, only: str,free_unit
USE SF_CONSTANTS, only: zero
#ifdef _MPI
USE SF_MPI
USE MPI
#endif
implicit none
private
type sparse_row_csr
integer :: size !actual
c... | {"hexsha": "9f3880f7a5ff2f066fb6bf6da9e5a8c5b6ea86e1", "size": 23989, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "ED_SPARSE_MATRIX.f90", "max_stars_repo_name": "QcmPlab/CDMFT-LANC-ED", "max_stars_repo_head_hexsha": "e76127efc4eb5552f474828be6b6dceca5abef09", "max_stars_repo_licenses": ["FSFAP"], "max_stars... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 22 21:50:45 2018
@author: amajidsinar
"""
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 20 23:30:12 2018
@author: amajidsinar
"""
import numpy as np
class Knn():
def __init__(self, k, dist='euc'):
avDist ... | {"hexsha": "f69a8f652b848fe8393199a957c31e0204a448ac", "size": 2721, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/KnnClassifier-OOP-Tensor.py", "max_stars_repo_name": "python-itb/knn-from-scratch", "max_stars_repo_head_hexsha": "dbc6fb53cffb245a76d35b9ff85ac8cb21877ca8", "max_stars_repo_licenses": ["MIT"]... |
using CartesianGP
using Base.Test
# ZERO
@test ZERO.func() == 0
# ONE
@test ONE.func() == typemax(BitString)
# AND
@test AND.func([ZERO.func(), ZERO.func()]...) == ZERO.func()
@test AND.func([ONE.func(), ZERO.func()]...) == ZERO.func()
@test AND.func([ZERO.func(), ONE.func()]...) == ZERO.func()
@test AND.func([ON... | {"hexsha": "fa8f017d1244ab1ae71acc4fe6a9d8e01a897c37", "size": 948, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Func.jl", "max_stars_repo_name": "glesica/CartesianGP.jl", "max_stars_repo_head_hexsha": "e74bc164c9ae59a9318ebe6ec9aa99306d23131e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "m... |
[STATEMENT]
theorem ll_001:
"t \<in> {20 .. 20} \<longrightarrow>
(s, x1, x2, x3, x4, x5, x6, x7) \<in>
{(0, 1.19, 1.04, 1.49, 2.39, 0.99, 0.09, 0.44) ..
(0, 1.21, 1.06, 1.51, 2.41, 1.01, 0.11, 0.46)} \<longrightarrow>
t \<in> ll.existence_ivl0 (s, x1, x2, x3, x4, x5, x6, x7) \<and>
ll.flow0 (s, x1... | {"llama_tokens": 861, "file": "Ordinary_Differential_Equations_Ex_ARCH_COMP_Examples_ARCH_COMP", "length": 1} |
Subroutine cgssor3(rhs,sol,n,m,nx)
!
! Solves via PCG with SSOR preconditioner.
! Uses sparse implementation on space grid.
!
implicit none
real*8 rhs(n,m)
real*8 sol(n,m)
real,dimension (0:nx+1,0:nx+1,1:m):: u,p,q,r,rhat
real,dimension (0:nx+1) :: x,y
real,dimension (1:m+1... | {"hexsha": "10d00725c276b6a933b495fe39b2284735bb2c2e", "size": 2134, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/cgssor3.f", "max_stars_repo_name": "imohame/LabCode", "max_stars_repo_head_hexsha": "b7fca6e58f6c26917ff4a8862ab473da282d027d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
from pdb import set_trace as T
import torch
from torch import nn, optim
from torch.nn import functional as F
from torch.nn.parameter import Parameter
from torch.autograd import Variable
from torch.distributions import Categorical
import numpy as np
import time
#Same padded (odd k)
def Conv2d(fIn, fOut, k, stride=1):
... | {"hexsha": "7d38f72895165b26af0bc83eb3f4a8ba511c2856", "size": 2932, "ext": "py", "lang": "Python", "max_stars_repo_path": "jsuarez/tools/GPUTest.py", "max_stars_repo_name": "jarbus/neural-mmo", "max_stars_repo_head_hexsha": "7ad02fab50f2781c0a71f7d2afd10c1503110736", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
## -------->> [[file:../nstandr.src.org::*cockburn_combabbrev][cockburn_combabbrev:1]]
##' Collapses single character sequences
##'
##' @param x Object (table or vector)
##' @param wrap_in_spaces Whether to wrap strings in spaces before processing because the algorithm assumes assumes that each string begins and ends ... | {"hexsha": "3196f475f277e782ccf78f888ca3eea2b9177947", "size": 23383, "ext": "r", "lang": "R", "max_stars_repo_path": "R/cockburn.r", "max_stars_repo_name": "stasvlasov/nstandr", "max_stars_repo_head_hexsha": "2cd418ccd2d11a45b1166a5ae7a54d9590debdc9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s... |
'''
Derived from: https://github.com/jonasrothfuss/ProMP/blob/master/meta_policy_search/envs/mujoco_envs/ant_rand_goal.py
However, the task is actually different. We are asking the ant to navigate to points on the perimeter
of the circle, not inside the circle.
'''
import numpy as np
from collections import OrderedDict... | {"hexsha": "372938f5fc70b018363fc4b68e45a2248ebc31e0", "size": 20230, "ext": "py", "lang": "Python", "max_stars_repo_path": "rlkit/envs/ant_rand_goal.py", "max_stars_repo_name": "yifan-you-37/rl_swiss", "max_stars_repo_head_hexsha": "8b0ee7caa5c1fa93860916004cf4fd970667764f", "max_stars_repo_licenses": ["MIT"], "max_st... |
from BPTK_Py import Agent, Event
import numpy as np
class MovingPerson(Agent):
STATES = ["HEALTHY", "INFECTED_LIGHT", "INFECTED_HARD", "DEAD", "RECOVERED"]
MOVING_LIST = [[0, 0], [0, -1], [0, 1], [-1, 0], [1, 0], [1, -1], [1, 1], [-1, 1], [-1, -1]]
def initialize(self):
self.state = np.random.choi... | {"hexsha": "a9e364b4718f7db8eeede114ce0b6329c49e3808", "size": 4097, "ext": "py", "lang": "Python", "max_stars_repo_path": "abm/src/agents/moving_person.py", "max_stars_repo_name": "transentis/sim-covid-19", "max_stars_repo_head_hexsha": "7a4da7c3c7fa75f1df94c223b74211449b46eba3", "max_stars_repo_licenses": ["MIT"], "m... |
[STATEMENT]
lemma fin_cut_same_Cons[simp]: "fin_cut_same x (y # xs) =
(if fin_cut_same x xs = [] then if x = y then [] else [y] else y # fin_cut_same x xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. fin_cut_same x (y # xs) = (if fin_cut_same x xs = [] then if x = y then [] else [y] else y # fin_cut_same x xs)... | {"llama_tokens": 3144, "file": "MSO_Regex_Equivalence_Pi_Regular_Operators", "length": 13} |
import pandas as pd
import numpy as np
import torch
from tqdm import tqdm
from rdkit import Chem
from rdkit.Chem import AllChem
from torch.utils.data import DataLoader, Dataset
#from mordred import Calculator, descriptors, TopoPSA,Weight, CarbonTypes,SLogP, MoeType
from rdkit import Chem
from tqdm import tqdm
from rdki... | {"hexsha": "108736d26134643a3a65d20ccf3305fb5da1e0ec", "size": 10202, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/framework/neural_npfp/neural_npfp/utils.py", "max_stars_repo_name": "ersilia-os/eos6tg8", "max_stars_repo_head_hexsha": "10c0d532b789ef922bb53469584b97ba6c335be3", "max_stars_repo_licenses"... |
import pytest
import numpy as np
import inspect
import random
from graphgraph import operators as op
class LaplacianConstraintError(RuntimeError):
pass
class LaplacianConstraints:
def __init__(self, in_matrix):
self.in_matrix = in_matrix
self.validate()
def is_symmetric(self):
i... | {"hexsha": "084e0b48b9c82bb6fb98bee6b3bc4637303c175a", "size": 2432, "ext": "py", "lang": "Python", "max_stars_repo_path": "graphgraph/tests/test_operators.py", "max_stars_repo_name": "mirca/graphgraph.py", "max_stars_repo_head_hexsha": "68b29a2dfeae1654db85a3b03c51ce4798c6608d", "max_stars_repo_licenses": ["MIT"], "ma... |
import logging
import os
import random
import traceback
from datetime import date
from pathlib import Path
from typing import Optional, Union
import numpy as np
import requests
import torch
import torch.nn as nn
from rxnebm.model import FF, G2E, S2E, model_utils
def setup_paths(
load_trained: Optional[bool] = Fal... | {"hexsha": "1644ce8ddc33292e0d60eb657d2f546326ca2ba2", "size": 4338, "ext": "py", "lang": "Python", "max_stars_repo_path": "rxnebm/experiment/expt_utils.py", "max_stars_repo_name": "coleygroup/rxn-ebm", "max_stars_repo_head_hexsha": "8480822d0d8ad74e46edf693ad1cdc787291f422", "max_stars_repo_licenses": ["MIT"], "max_st... |
module concurrency_api
use :: event_module, only : event
use :: event_handler_module, only : event_handler
use :: stream_module, only : stream
use :: stream_handler_module, only : stream_handler
use :: dependency_manager_module, only : dependency_manager
use :: abstract_concurrency_factory_modul... | {"hexsha": "3394713ab51a6d8d44efa56d6da204e6227fec95", "size": 1217, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/modules/concurrency_api/concurrency_api.f90", "max_stars_repo_name": "cheshyre/ntcl-data", "max_stars_repo_head_hexsha": "bd7b982c81b1611b32b7c2d4500154cd97a0fd30", "max_stars_repo_licenses"... |
'''
Basic test installation is working
'''
import collections
import numpy as np
import pytest
from OscopeBootstrap import SyntheticDataset
from OscopeBootstrap.oscope_tf import bootstrap_hypothesis_test
DataParameters = collections.namedtuple('DataParameters', 'ngroups NG N G noiselevel')
@pytest.fixture
def data... | {"hexsha": "1b63826d74558f3d72b7b8ccc81ddb501173d517", "size": 1467, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_basics.py", "max_stars_repo_name": "alexisboukouvalas/OscoNet", "max_stars_repo_head_hexsha": "f100d1ccfe8f7dad050a3082773a4b6383a4994a", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
# Boltzmann Machines
Why use a generative model rather than the more well known discriminative deep neural networks (DNN)?
* Discriminitave methods have several limitations: They are mainly supervised learning methods, thus requiring labeled data. And there are tasks they cannot accomplish, like drawing new examples... | {"hexsha": "ab62a8d84a4aa9f3239d7c0399208ccaed023515", "size": 105965, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "doc/LectureNotes/boltzmannmachines.ipynb", "max_stars_repo_name": "Schoyen/ComputationalPhysics2", "max_stars_repo_head_hexsha": "9cf10ffb2557cc73c4e6bab060d53690ee39426f", "max_sta... |
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------------
# 文件目的:演示通过岭回归算法来控制过拟合
# 创建日期:2018/2/3
# -------------------------------------------------------------------------
from math import sqrt
import matplotlib.pyplot as plt
import numpy as np
from sklearn import linear_mod... | {"hexsha": "f80517a9c6d0ad887b68f2342085f09ef5224614", "size": 3070, "ext": "py", "lang": "Python", "max_stars_repo_path": "bk/pa/03/ridgeWine.py", "max_stars_repo_name": "oraocp/pystat", "max_stars_repo_head_hexsha": "c01384683a289e667990ebc25e74ab287ffc14af", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun... |
// introduces boost::barrier to make multiple threads wait at a specific point
#define BOOST_THREAD_VERSION 4
#include <boost/thread.hpp>
#include <boost/thread/synchronized_value.hpp> // include required
#include <boost/asio.hpp>
#include <string>
#include <sstream>
#include <iostream>
#include <functional>
std::stri... | {"hexsha": "de1c3be033d64faa25e817db506e3388b9856682", "size": 2053, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "45_barrier.cpp", "max_stars_repo_name": "BorisSchaeling/Boost.Thread-examples", "max_stars_repo_head_hexsha": "82b25a45c676cbbc0ec6707ec88d99f13d32143e", "max_stars_repo_licenses": ["BSL-1.0"], "max... |
import os
import sys
import logging
import datetime
import warnings
import pickle
from shutil import copyfile
import numpy as np
from preprocessing import load_scramble_data
from parameter_parser import Parameters
from algorithms.decision_tree import DecisionTree
from algorithms.random_forest import RandomForest
from... | {"hexsha": "36ded32f96577ab75b77093802ea461b0dd006a3", "size": 18340, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "nonproliferation/mimosas", "max_stars_repo_head_hexsha": "40b68de164c68928df9f4b1ad42ee0629a3c3d8b", "max_stars_repo_licenses": ["BSD-4-Clause-UC"], "max_stars_c... |
# Make data using sklearn
import numpy as np
from sklearn.datasets import make_blobs
points, y = make_blobs(n_samples=20, centers=3, n_features=2, random_state=0)
# Compute HDBSCAN* in parallel using our algorithm
from pyhdbscan import HDBSCAN
dendro = HDBSCAN(points, 3) # minPts = 3
# Visualize dendrogram using ... | {"hexsha": "290364bb83f055dca827ad831d35b026ea2b5dea", "size": 541, "ext": "py", "lang": "Python", "max_stars_repo_path": "pybindings/example.py", "max_stars_repo_name": "wangyiqiu/hdbscan", "max_stars_repo_head_hexsha": "0f21522a4d34db040dd0cd6c6506ad39ed6f2a9e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import pandas as pd
import os as os
import sqlite3
import matplotlib.pyplot as plt
import re
import time
import numpy
try:
from ladybug.sql import SQLiteResult
from ladybug.datacollection import HourlyContinuousCollection, \
MonthlyCollection, DailyCollection
except ImportError as e:
raise ImportEr... | {"hexsha": "a56b109a75681baa236497f826cdbcdff609b633", "size": 13091, "ext": "py", "lang": "Python", "max_stars_repo_path": "Passive/Passive_Results_Reader.py", "max_stars_repo_name": "JTHOMRAMBOLL/Bruntwood_V1", "max_stars_repo_head_hexsha": "2fdd7190d92535267cbcb9b36c559ce6deb5841b", "max_stars_repo_licenses": ["MIT"... |
FUNCTION GATAN2 (ARG1, ARG2)
C
C ARC TANGENT ARG1/ARG2
C
REAL*8 DATAN2,ARG1,ARG2
C
GATAN2 = DATAN2 (ARG1,ARG2)
RETURN
END
| {"hexsha": "648a5a208ee26130ea1617523ac745670fcb9994", "size": 156, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/PIPS/validation/ArrayResizing/fpppp/gatan2.f", "max_stars_repo_name": "DVSR1966/par4all", "max_stars_repo_head_hexsha": "86b33ca9da736e832b568c5637a2381f360f1996", "max_stars_repo_licenses... |
using CodecXz
using TranscodingStreams
using Test
@testset "Xz Codec" begin
codec = XzCompressor()
@test codec isa XzCompressor
@test occursin(r"^(CodecXz\.)?XzCompressor\(level=\d, check=\d+\)$", sprint(show, codec))
@test CodecXz.initialize(codec) === nothing
@test CodecXz.finalize(codec) === not... | {"hexsha": "8491e1f89b7f39abe4ed03856030cc3c0a6e6826", "size": 1708, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "UnofficialJuliaMirror/CodecXz.jl-ba30903b-d9e8-5048-a5ec-d1f5b0d4b47b", "max_stars_repo_head_hexsha": "55579aa6e0587eb911c734da37752e0a851cd528", "max_sta... |
import numpy as np
import pandas as pd
import datetime as dt
from sklearn import preprocessing
class DataUtil(object):
#
# This class contains data specific information.
# It does the following:
# - Read data from file
# - Normalise it
# - Split it into train, dev (validation) and test
#... | {"hexsha": "486eb56dcf6b3c06c6b9861c7e059aea61452d00", "size": 6622, "ext": "py", "lang": "Python", "max_stars_repo_path": "DSANet/datautil.py", "max_stars_repo_name": "ps789/multivariate-deep-learning", "max_stars_repo_head_hexsha": "aa09b1419dffc34cf2ee8b6ee00d7ecbe4d0d6e6", "max_stars_repo_licenses": ["MIT"], "max_s... |
# Import the usual libraries
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import coron_wg
from tqdm.auto import trange, tqdm
filt, mask, pupil = ('F335M', 'MASK335R', 'CIRCLYOT')
import os
# Update output directories
coron_wg.fig_dir = coron_wg.base_dir + 'output_M335R/'
coron_wg.c... | {"hexsha": "407239c50988a3f443c65b96234813ec886b3e96", "size": 895, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/Commissioning/CoronWG/run_sims_requirements.py", "max_stars_repo_name": "JarronL/pyNRC", "max_stars_repo_head_hexsha": "0354f0635dd4c5391ca3a769fa9e5ead83661c30", "max_stars_repo_licenses... |
"""
This part of code is the DQN brain, which is a brain of the agent.
All decisions are made in here.
Using Tensorflow to build the neural network.
View more on my tutorial page: https://morvanzhou.github.io/tutorials/
Using:
Tensorflow: 1.0
gym: 0.7.3
"""
import numpy as np
import pandas as pd
import tensorflow as... | {"hexsha": "1651023a5b526bdaedd0374551579005e2f41027", "size": 12001, "ext": "py", "lang": "Python", "max_stars_repo_path": "RL_brain.py", "max_stars_repo_name": "xiangzhang1015/adaptiveeegclassification", "max_stars_repo_head_hexsha": "57573e1411b2984d20dc4fe54e39cb5742fb2638", "max_stars_repo_licenses": ["MIT"], "max... |
# -*- coding: utf-8 -*-
"""
-------------------------------------------------------------------------------
Authors: Parshan Pakiman | https://parshanpakiman.github.io/
Selva Nadarajah | https://selvan.people.uic.edu/
Licensing Information: The MIT License
------... | {"hexsha": "eb7d5c676f371f65392c2cc9623df5cd4229049f", "size": 16517, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "Self-guided-Approximate-Linear-Programs/Self-guided-ALPs-and-Related-Benchmarks", "max_stars_repo_head_hexsha": "5dd2b4a10fd9a4be3aa2456c70a2045f935bb63b", "max... |
\chapter{Background}
\ifpdf
\graphicspath{{Chapter2/Figs/Raster/}{Chapter2/Figs/PDF/}{Chapter2/Figs/}}
\else
\graphicspath{{Chapter2/Figs/Vector/}{Chapter2/Figs/}}
\fi
The goal of this chapter is to provide only the necessary background in
recurrent neural networks and generative probabilistic sequence modell... | {"hexsha": "5675d9ce803fd16ba7b44d63e3c1371611d42be0", "size": 19606, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Chapter2/chapter2.tex", "max_stars_repo_name": "feynmanliang/bachbot-thesis", "max_stars_repo_head_hexsha": "08abadd3d5f4960d8c40f48c0e46622aa507bf4b", "max_stars_repo_licenses": ["MIT"], "max_star... |
# From stockcharts.com:
#
# Interpretation
#
# The Aroon indicators fluctuate above/below a centerline (50) and
# are bound between 0 and 100. These three levels are important for
# interpretation. At its most basic, the bulls have the edge when
# Aroon-Up is above 50 and Aroon-Down is below 50. This indicates a
# grea... | {"hexsha": "7fb8ee81562a2b4829c645a3144c27cc441e9c97", "size": 5783, "ext": "py", "lang": "Python", "max_stars_repo_path": "tradingtools/technicals/indicators/Aroon.py", "max_stars_repo_name": "innes213/TradingTools", "max_stars_repo_head_hexsha": "85f9d15d38824f61af26ff060457fceb965f11ce", "max_stars_repo_licenses": [... |
@testset "matmul" begin
using NeuralAttentionlib.Matmul
function matmul_test(x, y, s)
cx = x isa CollapsedDimArray ? collapseddim(x) : x
cy = y isa CollapsedDimArray ? collapseddim(y) : y
return matmul(x, y, s) ≈ batched_mul(cx, cy) .* s
end
uwcs(x) = size(unwrap_collapse(x))
... | {"hexsha": "af83477d233ed3220d79eeec7a4ffa5d8527e06d", "size": 7640, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/matmul.jl", "max_stars_repo_name": "foldfelis/NeuralAttentionlib.jl", "max_stars_repo_head_hexsha": "52cb258807c9b8d308e14db0f99ec0d3492607c9", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
#ifndef UTILS_H
#define UTILS_H
#include <boost/dynamic_bitset.hpp>
bool is_match(boost::dynamic_bitset<> r1, boost::dynamic_bitset<> r2);
boost::dynamic_bitset<> intersection(boost::dynamic_bitset<> r1, boost::dynamic_bitset<> r2);
bool is_zero(boost::dynamic_bitset<> r1);
#endif
| {"hexsha": "4d767bbc496bb30d1eaba25ac5102cf650521b48", "size": 285, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "cmodule/utils.hpp", "max_stars_repo_name": "ymktw/SDNProbe", "max_stars_repo_head_hexsha": "46dee9737951012dc378f4d71675844402093569", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 3.... |
import numpy as np
import pickle
lexicon = []
with open('ptb.txt','r') as f:
contents = f.readlines()
for l in contents[:len(contents)]:
all_words=l.split()
lexicon += list(all_words)
lexicon = list(set(lexicon));
print(lexicon)
vocb_size=len(lexicon)+1
print('vocb_size', vocb_size... | {"hexsha": "98a8a8a9b2991fa2d5e162300e834da5e1906655", "size": 2856, "ext": "py", "lang": "Python", "max_stars_repo_path": "dicn.py", "max_stars_repo_name": "pratz4u/anagram", "max_stars_repo_head_hexsha": "9289ef57028b494328784789fd3c986bb1d06a90", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "m... |
# -*- coding: utf-8 -*-
"""Bank.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1tMPdw2KcPL1QKwzoieGUrpqLRXAWg0Uf
"""
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
df = pd.read_csv('bank.csv', delimiter = ';', quoting ... | {"hexsha": "2486b0a22f5df70e59a2dd4402fe9d16a5508bc2", "size": 2870, "ext": "py", "lang": "Python", "max_stars_repo_path": "bank.py", "max_stars_repo_name": "The-SocialLion/Bank-Marketing-prediction-using-ANN", "max_stars_repo_head_hexsha": "a240d3eacc1ffd7c1640a3414db53d0dab7d3a8e", "max_stars_repo_licenses": ["Apache... |
(* Title: HOL/Library/Uprod.thy
Author: Andreas Lochbihler, ETH Zurich *)
section \<open>Unordered pairs\<close>
theory Uprod imports Main begin
typedef ('a, 'b) commute = "{f :: 'a \<Rightarrow> 'a \<Rightarrow> 'b. \<forall>x y. f x y = f y x}"
morphisms apply_commute Abs_commute
by auto
setup_lifting type... | {"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/Library/Uprod.thy"} |
import gi
import time
import math
import cairo
import numpy
gi.require_version('Gtk', '3.0') # noqa
gi.require_version('Gio', '2.0') # noqa
gi.require_version('GLib', '2.0') # noqa
gi.require_version('Wnck', '3.0') # noqa
gi.require_version('GdkPixbuf', '2.0') # noqa
from PIL import Image
from threading import ... | {"hexsha": "f931078340acd5a0b03113d9744862991ae55439", "size": 6014, "ext": "py", "lang": "Python", "max_stars_repo_path": "dock.py", "max_stars_repo_name": "Team-Diffusion/diffusion-dock", "max_stars_repo_head_hexsha": "9ae6c12ba82ab86392bb544a5a01bbf2c03cfc8b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
import numpy as np
from pyraf import iraf
from pyraf.iraf import kepler
'''
Useful functions for Kepler light curve processing
Use this with the program 'makelc.py'
Originally by Jean McKeever
Edited and improved by Meredith Rawls
'''
# calculate orbital phase
# times must be a list of observation times in the same un... | {"hexsha": "2c9220dbfde66eef7cdc24410685f09d9949bf06", "size": 5357, "ext": "py", "lang": "Python", "max_stars_repo_path": "lc_functions.py", "max_stars_repo_name": "mrawls/kepler-makelc", "max_stars_repo_head_hexsha": "72a929b04d1c71bb5e854b96a9901544f681ed86", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,... |
from __future__ import print_function
import argparse
import os
import sys
import random
import math
import shutil
import numbers
import numpy as np
import torch
import torch.nn.parallel
import torch.optim as optim
import torch.optim.lr_scheduler as lr_scheduler
import torch.utils.data
from torch.utils.tensorboard i... | {"hexsha": "67802072b5996788df4d44c78ca5d9f2c38da67c", "size": 26683, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/points_to_surf_train.py", "max_stars_repo_name": "paulguerrero/points2surf", "max_stars_repo_head_hexsha": "fbe409215d221a3023bcc9762b71826ea523ef85", "max_stars_repo_licenses": ["MIT"], "... |
#!/Users/james/miniconda3/envs/selva_tf/bin/python
import os,sys
import numpy as np
import cooler
def getBins(coolfile):
binsInfo = {}
chroms = coolfile.chroms()["name"][:]
print("DEBUG: \n",chroms)
print("DEBUG coolfile.bins.keys():\n",coolfile.bins().keys())
print("DEBUG coolfile.bins()[chrom]:... | {"hexsha": "b60028948845bd33c7211b9822de41a6df886b23", "size": 2501, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/cooler/test1.py", "max_stars_repo_name": "jdurbin/sandbox", "max_stars_repo_head_hexsha": "ee982f7386ae02c5937dbaee867710b5cd2cc71b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
from kaggle_environments.envs.hungry_geese.hungry_geese import Observation, Configuration, Action, row_col
from kaggle_environments import evaluate, make, utils
import numpy as np
actions = np.array(["EAST", "SOUTH", "NORTH", "WEST"])
opp_actions = {'EAST': 'WEST', 'WEST': 'EAST', 'NORTH':'SOUTH', 'SOUTH':'NORTH'}
# ... | {"hexsha": "1456d735a91fe33d7dbfb26cbcecb4eeeccb0096", "size": 1019, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/1.0-bgc-Tutorial.py", "max_stars_repo_name": "BrunoGomesCoelho/Eat-Move-Learn", "max_stars_repo_head_hexsha": "d3bbe6062100205590d52c083339edaddd791da4", "max_stars_repo_licenses": ["RSA... |
import os
import scipy.misc
import numpy as np
from model import DCGAN
from utils import pp, visualize, to_json, show_all_variables, generate_random_images, encode, generate_image_from_seed, generate_walk_in_latent_space, generate_continuous_random_interps, generate_continuous_interps_from_json, generate_single_value_... | {"hexsha": "ae9eb56d1b20d88567166b6280c5e8cae03e9834", "size": 8301, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "hyeminchocho/DCGAN-tensorflow", "max_stars_repo_head_hexsha": "3dce578865b8fad11532a28990f0814f2bcc9e98", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
import tensorflow as tf
import tensorflow.contrib.slim as slim
import numpy as np
import math
import sys
from generator_network import *
from discriminator_network import *
from common import *
def gen_image_processing(gan_out):
# Scale image values from [-1, 1] to [0, 1] (TanH -> TF float32 image ranges)
img... | {"hexsha": "a7589aa7817a3bc3103b4685dcdfaa48d6a88c75", "size": 11034, "ext": "py", "lang": "Python", "max_stars_repo_path": "generative-waifu-network/waifunet.py", "max_stars_repo_name": "stmobo/Machine-Learning", "max_stars_repo_head_hexsha": "83f69c7afb0a4bc1dc94482b8d23805e8ab2acde", "max_stars_repo_licenses": ["MIT... |
import numpy as np
import tensorflow as tf
from keras.models import Sequential
from keras.layers import Dense, Conv2D, Dropout, Flatten, MaxPooling2D
import matplotlib.pyplot as plt
from keras.datasets import mnist
from keras.utils import np_utils
from keras.utils import to_categorical
from keras import backend as K
c... | {"hexsha": "95a4fde93a7258600ff050e3f6aa9ea0303fbfe9", "size": 3055, "ext": "py", "lang": "Python", "max_stars_repo_path": "controller/digit_recoganise_controller.py", "max_stars_repo_name": "smarth06/Smart_Sudoku", "max_stars_repo_head_hexsha": "0ce87e749fda6c44e4a459f3d5ec030a42c09cb7", "max_stars_repo_licenses": ["M... |
[STATEMENT]
lemma generate_valid_stateful_policy_IFSACS_2_noIFS_noACSsideeffects_imp_fullgraph:
assumes validReqs: "valid_reqs M"
and wfG: "wf_graph G"
and high_level_policy_valid: "all_security_requirements_fulfilled M G"
and edgesList: "(set edgesList) = edges G"
and ... | {"llama_tokens": 3063, "file": "Network_Security_Policy_Verification_TopoS_Stateful_Policy_Algorithm", "length": 23} |
using ASTModels
using Continuables
@expr a b c
d = a + b
e = c*d
# TODO build continuation macro @cont to automatically create the other method version, both for function(cont, ...) for f(cont, ) = as well as for cont not being the first one
| {"hexsha": "b094d9705774f0b581a06ec1a7f019cd5b3ad79d", "size": 244, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/develop.jl", "max_stars_repo_name": "schlichtanders/ASTModels.jl", "max_stars_repo_head_hexsha": "47207a687f5f81a59d375be3eeba17b9a38d178a", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_st... |
[STATEMENT]
lemma integrable_inner_left[simp, intro]:
"(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. f x \<bullet> c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (c \<noteq> (0::'a) \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. f x \... | {"llama_tokens": 222, "file": null, "length": 2} |
import argparse
import numpy as np
import dynamics
import plot
import random_matrix
import sample_point
parser = argparse.ArgumentParser(description='molnet example')
parser.add_argument('--seed', '-s', type=int,
help='random seed', default=0)
parser.add_argument('--node-size', '-N', type=int,
... | {"hexsha": "aa66ab2b71dabd53b63aad8239141e580a35d946", "size": 1952, "ext": "py", "lang": "Python", "max_stars_repo_path": "gnn_dynamics/main.py", "max_stars_repo_name": "delta2323/gnn-asymptotics", "max_stars_repo_head_hexsha": "0246e29df9b64f49b2b4bd929e3e3393eadbb0d7", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
"""Contains functions for coordinate transformations."""
import math
import numpy as np
import pandas as pd
from weldx import util
from weldx.transformations.types import types_timeindex
__all__ = [
"build_time_index",
"is_orthogonal",
"is_orthogonal_matrix",
"normalize",
"orientation_point_plan... | {"hexsha": "fbc08b0250fd1dad6d7ca2ca3ce5c27e42a4f301", "size": 7040, "ext": "py", "lang": "Python", "max_stars_repo_path": "weldx/transformations/util.py", "max_stars_repo_name": "marscher/weldx", "max_stars_repo_head_hexsha": "a5debd8af957009b12fd366589fed1aa41f78176", "max_stars_repo_licenses": ["BSD-3-Clause"], "max... |
import numpy as np
def main():
f_name = './output/adjacency/neur_adj_100_400_{0}.dat'
c = np.zeros(30)
for i in range(0, len(c)):
data = np.loadtxt(f_name.format(i))
d_sum = np.sum(data)
d_dim = data.shape[0]
c[i]=(d_sum/d_dim)
print(c, np.mean(c))
if __name__ == '__main__':
main()
| {"hexsha": "589efd6398af1156fe1f9b2d9447b3d0cd28676f", "size": 303, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualisation/adjacency/connect.py", "max_stars_repo_name": "sproberts92/neuron-model", "max_stars_repo_head_hexsha": "3c11b3749da876f4008131c977cfa22158825b74", "max_stars_repo_licenses": ["MIT"],... |
#include <iostream>
#include <fstream>
#include <cmath>
#include <string>
#include <Eigen/Core>
#include <Eigen/Dense>
using namespace Eigen;
class Interpolation {
public:
// input:
static constexpr int POINT_LIMIT = 30; // Maximum size of input point set
int n; // Number of input points
float x[POINT_LIMIT], y[... | {"hexsha": "48585a6b431402e01f0d72dab7f4b828fec63bec", "size": 5715, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "homeworks/HW1/interpolation.cpp", "max_stars_repo_name": "g1n0st/GAMES102", "max_stars_repo_head_hexsha": "44a8cf9db102109c8fd15c8dc06aa6ad1519a5eb", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
function value = daub2_condition ( n )
%*****************************************************************************80
%
%% DAUB2_DETERMINANT returns the L1 condition of the DAUB2 matrix.
%
% Licensing:
%
% This code is distributed under the GNU LGPL license.
%
% Modified:
%
% 25 January 2015
%
% Author:
%
%... | {"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/test_mat/daub2_condition.m"} |
/*=============================================================================
Copyright (c) 2010-2016 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprig
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
===... | {"hexsha": "ee30e4bebfd786e93141df802e774223092efffd", "size": 2003, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "sprig/policy/detail/policies_unique_check_impl.hpp", "max_stars_repo_name": "bolero-MURAKAMI/Sprig", "max_stars_repo_head_hexsha": "51ce4db4f4d093dee659a136f47249e4fe91fc7a", "max_stars_repo_license... |
############
# Starring #
############
function stargazers(repo; options...)
results, page_data = gh_get_paged_json("/repos/$(name(repo))/stargazers"; options...)
return map(Owner, results), page_data
end
function starred(user; options...)
results, page_data = gh_get_paged_json("/users/$(name(user))/starr... | {"hexsha": "dbdac00b4aee24938c59c3ca92649ccf64c35247", "size": 1100, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/activity/activity.jl", "max_stars_repo_name": "JuliaPackageMirrors/GitHub.jl", "max_stars_repo_head_hexsha": "74aedaab2f0c1a64e396b6ff0442dbcfd0f037ab", "max_stars_repo_licenses": ["MIT"], "max... |
"""
@author Mayank Mittal, Jingzhou Liu
@email mittalma@ethz.ch, jingzhou.liu@mail.utoronto.ca
@brief Implementation of Spidey robot in Isaac Sim.
"""
# python
import os
import numpy as np
import scipy.spatial.transform as tf
from typing import Optional
# omniverse
from pxr import Usd, UsdGeom, Gf, Seman... | {"hexsha": "f0e96a3d86cbf40e50a4bc16144529bc81d9d5be", "size": 17186, "ext": "py", "lang": "Python", "max_stars_repo_path": "spidey_simulation/spidey_py/spidey_python/omniverse/robot/spidey_robot.py", "max_stars_repo_name": "JasonJZLiu/Spidey-Quadruped", "max_stars_repo_head_hexsha": "74c1817f997b354bae4fffd2728f2cc949... |
[STATEMENT]
lemma ine_ins_neg1:
assumes "\<not> ine P m"
and "exprChannel x m"
shows "x \<notin> ins P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. x \<notin> ins P
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<not> ine P m
exprChannel x m
goal (1 subgoal):
1. x \<notin> ins P
[P... | {"llama_tokens": 158, "file": "CryptoBasedCompositionalProperties_Secrecy", "length": 2} |
import numpy as np
from scipy.integrate import simps
for i in range(1,4):
a = np.loadtxt(f"ezrho{i}.out")
ir_max = 501
val = a[:ir_max,0]
r = a[:ir_max,1]
a2 = simps(val, r)
print(a2)
| {"hexsha": "bf5ce98b62f79b1c625c6c559252662f60c2dcc5", "size": 212, "ext": "py", "lang": "Python", "max_stars_repo_path": "Test/Unit/eval_p2.py", "max_stars_repo_name": "pmu2022/lsms", "max_stars_repo_head_hexsha": "3c5f266812cad0b6d570bef9f5abb590d044ef92", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count... |
import numpy
import matplotlib as mplt
__all__ = ['lineplot']
def lineplot(vertices, indices, linewidths=1):
"""Plot 2D line segments"""
vertices = numpy.asarray(vertices)
indices = numpy.asarray(indices)
#3d tensor [segment index][vertex index][x/y value]
lines = vertices[numpy.ravel(indices... | {"hexsha": "41bee8481ded4d242004d2bcded88a43ef1dd774", "size": 563, "ext": "py", "lang": "Python", "max_stars_repo_path": "Examples/CoarseFineSplitting/draw.py", "max_stars_repo_name": "pombreda/pyamg", "max_stars_repo_head_hexsha": "ecd464de4d16e16bc905d84df181025ddf3c1958", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
import os
import argparse
import json
import numpy as np
import torch
import torch.nn as nn
import pickle
from util import rescale, find_max_epoch, print_size, sampling, calc_diffusion_hyperparams, AverageMeter
from util_fastdpmv2 import fast_sampling_function_v2
torch_version = torch.__version__
if torch_version =... | {"hexsha": "833ed468c1a0dcf1a5d2d54a752581cbe08c6f91", "size": 19759, "ext": "py", "lang": "Python", "max_stars_repo_path": "pointnet2/completion_eval.py", "max_stars_repo_name": "ZhaoyangLyu/Point_Diffusion_Refinement", "max_stars_repo_head_hexsha": "857fcd176dcc9c1a93a9fec27390502fa6c9e29d", "max_stars_repo_licenses"... |
#!/opt/anaconda3/envs/py27/bin/python
# -*- coding: UTF-8 -*-
import cgi, os, sys
import cgitb; cgitb.enable()
from pandas import *
import numpy as np
import twd97
from pyproj import Proj
import tempfile as tf
Latitude_Pole, Longitude_Pole = 23.61000, 120.9900
Xcent, Ycent = twd97.fromwgs84(Latitude_Pole, Longitude_P... | {"hexsha": "e5b3ef9072d0e90d1284da0a53562cf790520499", "size": 2601, "ext": "py", "lang": "Python", "max_stars_repo_path": "utilities/CGI-pythons/save_trjMarble.py", "max_stars_repo_name": "sinotec2/Focus-on-Air-Quality", "max_stars_repo_head_hexsha": "eac84651eaf6300a16f25a4d76b97a7f53454035", "max_stars_repo_licenses... |
module fractdata
implicit double precision(a-h,o-z)
parameter(nsmall=140)
parameter(ncomp=10)
parameter(maxdouble=50)
parameter(maxfamily=50)
save
character*80 icomm
character*2 sym(91)
character*80 inputformat
character*20 ititle
dimension numb(9... | {"hexsha": "1c6c864855312ecc35b293eabf89a2d52438090a", "size": 1473, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/solventcharges/fractdata.f90", "max_stars_repo_name": "mickcollins/SMFA", "max_stars_repo_head_hexsha": "2a730ffc879991460c614d25e3dab566b805b379", "max_stars_repo_licenses": ["DOC"], "max_s... |
/*! \file deleter.h
\brief gsl_interp_accelとgsl_splineのデリータを宣言・定義したヘッダファイル
Copyright © 2015 @dc1394 All Rights Reserved.
This software is released under the BSD 2-Clause License.
*/
#ifndef _DELETER_H_
#define _DELETER_H_
#pragma once
#include <gsl/gsl_errno.h>
#include <gsl/gsl_spline.h>
namespace g... | {"hexsha": "0bab56f063e03d45b799af313d5c2ec04be8b12b", "size": 811, "ext": "h", "lang": "C", "max_stars_repo_path": "getdata/deleter.h", "max_stars_repo_name": "dc1394/SchracVisualize", "max_stars_repo_head_hexsha": "0ac49e883a4f9b92a48d224350f3d1967a1dbfe7", "max_stars_repo_licenses": ["Intel", "X11", "OLDAP-2.2.1", "... |
#
# Copyright (C) 2020 IBM. All Rights Reserved.
#
# See LICENSE.txt file in the root directory
# of this source tree for licensing information.
#
import random
from math import cos, isnan, pi, sin, sqrt
from typing import Dict, Optional, Tuple
import numpy as np
import portion
import torch
from PIL import Image
imp... | {"hexsha": "e16732fe998891bbe7d6ac071bb39e1fab05bc19", "size": 24666, "ext": "py", "lang": "Python", "max_stars_repo_path": "vsrl/rl/envs/pm_goal_finding.py", "max_stars_repo_name": "nrfulton/vsrl-framework", "max_stars_repo_head_hexsha": "c778824b3285e3e994a4c5846c7b1c2ac03c669b", "max_stars_repo_licenses": ["MIT"], "... |
c***CALCF**********************
subroutine calcF(option,iwell,iprod)
implicit none
include 'cdparams.fh'
include 'cdrange.fh'
include 'cdrates.fh'
include 'cdlimfit.fh'
include 'cdffunc.fh'
c local variables
character*8 option
integer it,ip,iw... | {"hexsha": "daa4122554fe9c76d4c961837ca0bf51452b7ae8", "size": 6340, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "source/deprecated/chemdis/src/cdfouts.f", "max_stars_repo_name": "sean-v8/RMG-Java", "max_stars_repo_head_hexsha": "e284bb6b14f06690da157da33dab4a86d55f50d0", "max_stars_repo_licenses": ["MIT"], "... |
"""
Basic Equations for Solid Mechanics
###################################
References
----------
.. [Gray2001] J. P. Gray et al., "SPH elastic dynamics", Computer Methods
in Applied Mechanics and Engineering, 190 (2001), pp 6641 - 6662.
"""
from pysph.sph.equation import Equation
from pysph.sph.scheme import Sch... | {"hexsha": "8ac26c86dd2b41386e238cae048263bc0edca06d", "size": 20170, "ext": "py", "lang": "Python", "max_stars_repo_path": "pysph/sph/solid_mech/basic.py", "max_stars_repo_name": "nauaneed/pysph", "max_stars_repo_head_hexsha": "9cb9a859934939307c65a25cbf73e4ecc83fea4a", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma... |
#ifndef ASYNC_SOCKET_BASE_HXX
#define ASYNC_SOCKET_BASE_HXX
#include <deque>
#include <asio.hpp>
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/enable_shared_from_this.hpp>
#include "DataBuffer.hxx"
#include "StunTuple.hxx"
#define RECEIVE_BUFFER_SIZE 4096 // ?slg? should we shrink this to s... | {"hexsha": "fc4336b49a55f27e15070b7f1addf434e9920cc2", "size": 7403, "ext": "hxx", "lang": "C++", "max_stars_repo_path": "reTurn/AsyncSocketBase.hxx", "max_stars_repo_name": "dulton/reSipServer", "max_stars_repo_head_hexsha": "ac4241df81c1e3eef2e678271ffef4dda1fc6747", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
cdis
cdis Open Source License/Disclaimer, Forecast Systems Laboratory
cdis NOAA/OAR/FSL, 325 Broadway Boulder, CO 80305
cdis
cdis This software is distributed under the Open Source Definition,
cdis which may be found at http://www.opensource.org/osd.html.
cdis
cdis In particular, redistributio... | {"hexsha": "fa2687301d3e5c98380a08b044807e9a40b3c140", "size": 101934, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/lib/goesinav/gimloc.f", "max_stars_repo_name": "maxinye/laps-mirror", "max_stars_repo_head_hexsha": "b3f7c08273299a9e19b2187f96bd3eee6e0aa01b", "max_stars_repo_licenses": ["Intel", "Unlicens... |
# This file is part of astro_metadata_translator.
#
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (http://www.lsst.org).
# See the LICENSE file at the top-level directory of this distribution
# for details of code ownership.
#
# Use of this source code... | {"hexsha": "3f022c58757d62266987e017043a6aedc6e7dcf3", "size": 5369, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/astro_metadata_translator/properties.py", "max_stars_repo_name": "HyperSuprime-Cam/astro_metadata_translator", "max_stars_repo_head_hexsha": "b976306e3e6fb85232cc838a145475ae8f16ca31", "max... |
import DataStore
testStore : DataStore (SString .+. SString .+. SInt)
testStore = addToStore ("Mercury", "Mariner 10", 1974) $
addToStore ("Venus", "Venera", 1961) $
addToStore ("Uranus", "Voyager 2", 1986) $
addToStore ("Pluto", "New Horizons", 2015) $
empty
listItems ... | {"hexsha": "8ab31022f95d4a1f5e44b76d087450e01ea7be46", "size": 963, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "idris2/tests/typedd-book/chapter10/TestStore.idr", "max_stars_repo_name": "Qqwy/Idris2-Erlang", "max_stars_repo_head_hexsha": "945f9c12d315d73bfda2d441bc5f9f20696b5066", "max_stars_repo_licenses": ... |
import pandas as pd
import numpy as np
import schedule as sc
def find_similars_days(f_list,s_list):
list_days=[]
for i in f_list:
for j in s_list:
if i==j:
result=True
list_days.append(i)
#return result
return list_days
def find_similars_ho... | {"hexsha": "93bcaf02bc710ec9840d2a822862f63d95dc71b2", "size": 4319, "ext": "py", "lang": "Python", "max_stars_repo_path": "client.py", "max_stars_repo_name": "Eugenemdk/schedule-practices-algorithm", "max_stars_repo_head_hexsha": "b852b7afd38f6e58501be80b8617d63385f2c43b", "max_stars_repo_licenses": ["BSD-2-Clause"], ... |
from analysis.patterns_in_bio_data import bio_data_runs
import numpy as np
from matplotlib import pylab as plt
from analysis.functions import bio_process
# importing the list of all runs of the bio data from the function 'bio_data_runs'
bio_runs = bio_data_runs()
# calculating the mean value of all runs
mean_data = l... | {"hexsha": "16a121a33688f837bbeb62ff85172e3f5408370d", "size": 2799, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/trapezium.py", "max_stars_repo_name": "KseniiaKarpova/memristive-spinal-cord", "max_stars_repo_head_hexsha": "15be4aea80ede6315b9bf4ea76eec17b900f31e4", "max_stars_repo_licenses": ["MIT"]... |
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 20 15:12:49 2016
@author: uzivatel
"""
import numpy as np
import scipy
from functools import partial
from copy import deepcopy
from .general import Coordinate,Grid
from ...General.UnitsManager import PositionUnitsManaged,position_units
from ...General.types ... | {"hexsha": "57d33c109f584c7fde6ff3246ab70608819e9834", "size": 33797, "ext": "py", "lang": "Python", "max_stars_repo_path": "QChemTool/QuantumChem/Classes/density.py", "max_stars_repo_name": "slamavl/QChemTool", "max_stars_repo_head_hexsha": "b6b17adf6cfa8ac1db47acba93aab1ee49c1be47", "max_stars_repo_licenses": ["MIT"]... |
#!/usr/bin/env python
#
# -------------------------------------------------------------------------------------
#
# Copyright (c) 2016, ytirahc, www.mobiledevtrek.com
# All rights reserved. Copyright holder cannot be held liable for any damages.
#
# Distributed under the Apache License (ASL).
# http://www.ap... | {"hexsha": "f75d45f9c5d0de212de2f63603282d3ba1993815", "size": 5864, "ext": "py", "lang": "Python", "max_stars_repo_path": "posts/032016/BatchProcessingOpenCV.py", "max_stars_repo_name": "ytirahc/mobile-dev-trek", "max_stars_repo_head_hexsha": "336602fbc6f91776b6a3e8b845dc2c87d5f4e592", "max_stars_repo_licenses": ["Apa... |
[STATEMENT]
lemma has_distinguishing_Eq: "has_distinguishing (Eq (V v) (L l)) G \<Longrightarrow> \<exists>l'. (Eq (V v) (L l')) \<in> set G \<and> l \<noteq> l'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. has_distinguishing (Eq (V v) (L l)) G \<Longrightarrow> \<exists>l'. Eq (V v) (L l') \<in> set G \<and> l \... | {"llama_tokens": 7771, "file": "Extended_Finite_State_Machine_Inference_heuristics_Least_Upper_Bound", "length": 12} |
""" Lucy richardson deconvolution
based on code from Martin Weigert's gputools
"""
import os
import numpy as np
from gputools import OCLArray, OCLProgram, get_device
from gputools import convolve, fft_convolve, fft, fft_plan
from gputools import OCLElementwiseKernel
from typing import Optional, Callable
im... | {"hexsha": "392844e95e07ac91f4c3b51f017354822479243f", "size": 3639, "ext": "py", "lang": "Python", "max_stars_repo_path": "lls_dd/deconv_gputools.py", "max_stars_repo_name": "VolkerH/Lattice_Lightsheet_Deskew_Deconv", "max_stars_repo_head_hexsha": "83aa17bf44eb140fd79c42e2790a3240a518d189", "max_stars_repo_licenses": ... |
\section{Task Planning (Jim)}
The task planner in this work is based on the framework introduced in \cite{HKG2009}.
A reactive robot task specification is expressed in LTL formulas.
Then the specification is automatically transformed to a correct-by-construction discrete controller.
At last, the controller is continuou... | {"hexsha": "9b715d1f7cc731181a8e43000925296d96012b81", "size": 3056, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "proposal/highlevel.tex", "max_stars_repo_name": "jimjing/MAndM", "max_stars_repo_head_hexsha": "efd6581851814ace386cc59285d6290ea096630b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
import os
import json
import torch
import lib.utils.data as torchdata
import cv2
from torchvision import transforms
from scipy.misc import imread, imresize
import numpy as np
# Round x to the nearest multiple of p and x' >= x
def round2nearest_multiple(x, p):
return ((x - 1) // p + 1) * p
class TrainDataset(torch... | {"hexsha": "315254f2897e16a44659671b7f00feb0ea920bc7", "size": 12921, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset.py", "max_stars_repo_name": "gitunit/semantic-segmentation-pytorch", "max_stars_repo_head_hexsha": "601a2d09dae0d942ee0c9a6c7f00d4885ea4561b", "max_stars_repo_licenses": ["MIT"], "max_sta... |
export Metadata, Metadata!, rename!, delete!
import Base.==
const metadata_folder_name = ".metadata"
const max_lock_retries = 100
const metadata_lock = "metadata.lck"
metadatadir(args...) = projectdir(metadata_folder_name, args...)
mutable struct Metadata <: AbstractDict{String, Any}
path::String
mtime::Flo... | {"hexsha": "4a98e73f591b62f4be3c45489d2b5e9561610d58", "size": 4888, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Metadata.jl", "max_stars_repo_name": "sebastianpech/DrWatsonSim", "max_stars_repo_head_hexsha": "3a78e1a0171c45b2e206c26cf535c813a84a2a31", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
#
# Copyright (c) 2020 The rlutils authors
#
# This source code is licensed under an MIT license found in the LICENSE file in the root directory of this project.
#
import unittest
class TestVi(unittest.TestCase):
'''
Test rlutils.algorithm.vi.
'''
def _get_test_mdp(self):
import numpy as np
... | {"hexsha": "a18f5d6b17930fe0810690d7e2d79d01c8aca5c2", "size": 2442, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/algorithm/test_vi.py", "max_stars_repo_name": "lucaslehnert/rlutils", "max_stars_repo_head_hexsha": "77597f0596ff907c3dcae131a2fb51971949e634", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# Tests of this file not covered in other tests
@testset "dual_model_variables.jl" begin
@testset "push_to_dual_obj_aff_terms!" begin
primal_model = soc1_test()
dual_obj_affine_terms = Dict{VI,Float64}()
list = MOI.get(
primal_model,
MOI.ListOfConstraintIndices{VVF,MO... | {"hexsha": "78afb37a8779e2f42b979fcbf20a9a72cd98d76e", "size": 1300, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Tests/test_dual_model_variables.jl", "max_stars_repo_name": "JuliaOpt/Dualization.jl", "max_stars_repo_head_hexsha": "b9d25819677ced58cac0374df797cd5586830ad5", "max_stars_repo_licenses": ["MI... |
\name{loadPrice}
\alias{loadPrice}
\title{Load price from github}
\description{
Load stock(s) price from github
}
\usage{
loadPrice(...)
}
\arguments{
\item{...}{one or more ticker string(s)}
}
\examples{
## load a ticker data
loadPrice('MWG')
## load multiple tickers
loadPrice('VN30', 'FPT', 'VCB')
}
\keyword{loa... | {"hexsha": "a69193bd129696fc3d24dea9d6d4f3d0d21d6a02", "size": 328, "ext": "rd", "lang": "R", "max_stars_repo_path": "man/price.rd", "max_stars_repo_name": "algo-stocks/rdatavn", "max_stars_repo_head_hexsha": "b0318b4eead44351fba6132d91c66cd0ab410916", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s... |
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib as mpl
import sys
sys.path.append('./')
from util import constants
aspect = {
'size': 6.5,
'font_scale': 2.5,
'labels': False,
'ratio': 1.625,
}
models = ['ngram', 'lstm']
sns.set(style="whi... | {"hexsha": "345570a9df72f42d18be8b2d7c242afa1a8761a5", "size": 2856, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualization_layer/plot_artificial_scatter.py", "max_stars_repo_name": "tpimentelms/phonotactic-complexity", "max_stars_repo_head_hexsha": "70d0a9e45943096d7640eaf7277033e3920408c9", "max_stars_r... |
# Script to run through the files and fit the zero-inflated negative binomial distrubution
using Plots, Distributions, DelimitedFiles, Base.Printf
include("Utils.jl")
import Main.Utils
gr()
# Set some parameters
spread = 0.95
folder = "Chains/"
Files = readdir(folder)
# Make a stats variable to be writtten to a file... | {"hexsha": "7ce692de174df51641462b9b51f3870c58f9e2d4", "size": 1431, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Stats.jl", "max_stars_repo_name": "rdbrackston/tx-analysis", "max_stars_repo_head_hexsha": "7a58767723b60d7d4997f1a0f9f1b18ed3d3e8f7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max... |
# coding=utf-8
# Copyright 2020 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
# Copyright 2020 Kalpesh Krishna.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with t... | {"hexsha": "86fe06a6a40286aa73c1e8068ea0d10843fea5da", "size": 21419, "ext": "py", "lang": "Python", "max_stars_repo_path": "style_paraphrase/run_lm_finetuning.py", "max_stars_repo_name": "bmtm/style-transfer-paraphrase", "max_stars_repo_head_hexsha": "ffc46ce4481b6d85a9704eeeddebb82331a38638", "max_stars_repo_licenses... |
#!/usr/bin/env python3
import numpy as np
from keras import backend as K
def mean_gaussian_negative_log_likelihood(y_true, y_pred):
nll = 0.5 * np.log(2 * np.pi) + 0.5 * K.square(y_pred - y_true)
axis = tuple(range(1, len(K.int_shape(y_true))))
return K.mean(K.sum(nll, axis=axis), axis=-1)
| {"hexsha": "ba34cb4cb5de401debbf36ff36ddecd8b1ad148b", "size": 307, "ext": "py", "lang": "Python", "max_stars_repo_path": "vaegan/losses.py", "max_stars_repo_name": "enisimsar/vaegan-shoes-keras", "max_stars_repo_head_hexsha": "d775a60d42a2c80e8ecc9bc3bfc321ca5010bc0e", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import numpy as np
import os
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction import DictVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import classification_report, f1_score
import scipy.stats
import utils
__author__ = "Chris... | {"hexsha": "91caef76c417ec6e59d47b3413ae7663a7ab1acb", "size": 14479, "ext": "py", "lang": "Python", "max_stars_repo_path": "sst.py", "max_stars_repo_name": "klaudia-kantor/cs224u", "max_stars_repo_head_hexsha": "dd7e79052338555d86ed427c12270065fdf065ef", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 11... |
# -*- coding: utf-8 -*-
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
__author__ = ["Markus Löning"]
import numpy as np
import pandas as pd
import pytest
from pytest import raises
from sktime.forecasting.base import ForecastingHorizon
from sktime.forecasting.base._fh import DELEGATED_METHOD... | {"hexsha": "7ccb1d7f2e1a13bd86ca4959b1bb037d8df4fe14", "size": 4251, "ext": "py", "lang": "Python", "max_stars_repo_path": "sktime/forecasting/base/tests/test_fh.py", "max_stars_repo_name": "alwinw/sktime", "max_stars_repo_head_hexsha": "a6f17bd586df6bbc8e6c783f08eda4c30d2353f9", "max_stars_repo_licenses": ["BSD-3-Clau... |
# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by appl... | {"hexsha": "ac3c9b2aca86adcea446f0f315ff4040635f32c7", "size": 6490, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/python/kaolin/io/test_render.py", "max_stars_repo_name": "priyasundaresan/kaolin", "max_stars_repo_head_hexsha": "ddae34ba5f09bffc4368c29bc50491c5ece797d4", "max_stars_repo_licenses": ["ECL-... |
program testburn
use bl_types
use network
use eos_module
implicit none
real(kind=dp_t) :: dens, temp, pres, entr
real(kind=dp_t), dimension(nspec) :: Xin
integer :: ic12, io16, img24
logical :: do_diag
call network_init()
call eos_init(gamma_in=5.0d0/3.0d0)
do_diag = .false.
ic12 = net... | {"hexsha": "3310967f39e76d3ff3288fe819e8a036fecae9ee", "size": 5509, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Microphysics/EOS/gamma_law_general/test/testeos.f90", "max_stars_repo_name": "sailoridy/MAESTRO", "max_stars_repo_head_hexsha": "f957d148d2028324a2a1076be244f73dad63fd67", "max_stars_repo_licens... |
import os
import numpy as np
import pickle
import tensorflow as tf
from Configuration import FLAGS
from Data_Process import Data_Process
from Caption_Model import Caption_Model
# from Activity_Model import Activity_Model
def train_models():
data_process = Data_Process(FLAGS)
# 1. Data process for lstm_caption
pr... | {"hexsha": "d7c6cfd0008deca3e3a967eaf8bddfeb1c6a3d62", "size": 1047, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/main.py", "max_stars_repo_name": "xincoder/SBGAR", "max_stars_repo_head_hexsha": "3b4e4bce1b1d160533f4e3904e46a5c08be680c7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_sta... |
import numpy as np
import scipy.interpolate
############ P5 Tridiag solver
class TriDiag:
def __init__(self, a, d, b, n=None):
if n is None:
n = len(d)
self.n = n
self.a = np.asarray(a)
self.b = np.asarray(b)
self.d = np.asarray(d)
def mult(self, x):
... | {"hexsha": "ba50bce309c45fee8485a8e7cab1883ba0dcf1b5", "size": 4825, "ext": "py", "lang": "Python", "max_stars_repo_path": "numerical_eqs/interp/spline/functions.py", "max_stars_repo_name": "alienbrett/numerical-eqs-collection", "max_stars_repo_head_hexsha": "23619bf379d53ce0facb63be08ee6a3902d404d5", "max_stars_repo_l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.