text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
{"hexsha": "c4b5a7596ae94a0ba04ff1fc2f3f534cac43fee0", "size": 2587, "ext": "py", "lang": "Python", "max_stars_repo_path": "integration-tests/test_psql_parity.py", "max_stars_repo_name": "urbanlogiq/arrow-datafusion", "max_stars_repo_head_hexsha": "05d5f01fa8ec7bf9baa3aa632ccedb914d0b49a2", "max_stars_repo_licenses": [...
program alocate_test use write_in_file, only: write_iteration use nr_module, only: four1, gasdev, ran1 implicit none real, dimension(:, :), allocatable :: array real, dimension(4) :: a = (/0.0, 0.0, 0.0, 0.0/) real :: random_num integer :: err, idum_num allocate(array(0:4, 0:2), stat=err) if (err /...
{"hexsha": "9c01167ad483e2cd1a14f99898ba8dcc162e5a2d", "size": 633, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "bin/allocate_test.f90", "max_stars_repo_name": "heyfaraday/FORTCMB", "max_stars_repo_head_hexsha": "56366423546ca73e876eda58dc8a01a25e640098", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# Copyright (C) 2004-2018 by # All rights reserved. # MIT license. # # Author: Vadim Ivlev # Some functions to show tree graphs. # Can be used both in standalone programs # and in `jupyther` nonebooks. # Preconditions # ------------- # The folowing libraries should be installed # `matplotlib, networkx, grap...
{"hexsha": "801db46dafa9ea5dfafec77fbd22aab1393c0de0", "size": 5137, "ext": "py", "lang": "Python", "max_stars_repo_path": "showtree.py", "max_stars_repo_name": "vadim-ivlev/show-tree", "max_stars_repo_head_hexsha": "b2e133f223be903c7d1b0cdfb23af7b3e7925cf4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
from tqdm import tqdm import time import copy from dataload import get_cifar,get_test_loader_cifar from general_utils import test_data_evaluation from KD_Loss import kd_loss import numpy as np import torch from torch import nn from DML_Loss import dml_loss_function import pdb criterion = nn.CrossEntropyLoss() def tra...
{"hexsha": "31e80f2ad7e41c73094e2ea98efe6d84d4bddb62", "size": 34074, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_funcs.py", "max_stars_repo_name": "srinivasraodaru/Distilling-Knowledge-via-Intermediate-Classifiers", "max_stars_repo_head_hexsha": "9bddcd90c5d776e5afa78c3c3da4acd46970c70d", "max_stars_r...
""" This recipe evaluates an oracle ideal ratio mask on the mix_clean and min subset in the WHAM dataset using phase sensitive spectrum approximation. Output of this script for psa: ┌────────────────────┬────────────────────┬────────────────────┐ │ │ OVERALL (N = 6000) │ │ ╞════...
{"hexsha": "9c73c8aa436db494b71c5596bc147f9170ea895f", "size": 3223, "ext": "py", "lang": "Python", "max_stars_repo_path": "recipes/wham/ideal_ratio_mask.py", "max_stars_repo_name": "ZhaoJY1/nussl", "max_stars_repo_head_hexsha": "57aabeabca3b2e75849e1659a522e3c2f77e9172", "max_stars_repo_licenses": ["MIT"], "max_stars_...
Subroutine chkin1(l, i1, i2, i3, t, tmin, nc) Implicit Double Precision (A-H, O-Z) Save itest = 0 Do i = i1 - 1, i1 + 1 Do j = i2 - 1, i2 + 1 Do k = i3 - 1, i3 + 1 If (i>=1 .And. i<=10 .And. j>=1 .And. j<=10 .And. k>=1 .And. k<=10) Then Call chkcel(l, i, j, k, t, tmin, nc) ...
{"hexsha": "b36386ba41b1a61bb8ff5a0bdb5030986b79698c", "size": 584, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/chkin1.f90", "max_stars_repo_name": "xiaohaijin/AMPT", "max_stars_repo_head_hexsha": "90c7a1ab4dc04a092e64af759d53e22f6fea5b02", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max...
#include "libheader.hpp" #include <boost/program_options.hpp> #include <iostream> using namespace std; int main(int argc, char** argv) { namespace po = boost::program_options; po::options_description generalOptions("Genral options"); generalOptions.add_options() ("help,h", "Print help message") ...
{"hexsha": "f699702bafded8b35e52b417372ca7e3bcbef40d", "size": 1314, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "make/simpliest-make/program/main.cpp", "max_stars_repo_name": "DAlexis/example-build-systems-workshop", "max_stars_repo_head_hexsha": "f5b25d33d9059a2e0addc461e86a3b43a5c3806f", "max_stars_repo_lice...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Things that don't belong anywhere else """ import hashlib import os import shutil import errno from datetime import datetime from collections import Counter import numpy as np import torch import torch.nn as nn def make_weights_for_balanced...
{"hexsha": "98f6d7f4370e01420147b74926574232369b83f6", "size": 5173, "ext": "py", "lang": "Python", "max_stars_repo_path": "domainbed/lib/misc.py", "max_stars_repo_name": "zhaoxin94/swad", "max_stars_repo_head_hexsha": "df9213cf5946d9b357dbd9363565fe0eabe50951", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 63...
[STATEMENT] lemma in_set_vwalk_arcs_append2: assumes nonempty: "p \<noteq> []" "q \<noteq> []" assumes disj: "x \<in> set (vwalk_arcs p) \<or> x = (last p, hd q) \<or> x \<in> set (vwalk_arcs q)" shows "x \<in> set (vwalk_arcs (p @ q))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<in> set (vwalk_arcs...
{"llama_tokens": 851, "file": "Graph_Theory_Vertex_Walk", "length": 7}
""" Set of scripts intended to link SVs to genes by rules based on gains and losses of regulatory elements caused by TAD disruptions The idea is that we first make a 'neighborhood' in which all regulatory elements are assigned to genes (regulator set). These are the regulatory elements within the TAD of the gene, a...
{"hexsha": "91217e12c1d0f0a55094f01878bf7af34b637495", "size": 5076, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/linkSVsGenes/main.py", "max_stars_repo_name": "UMCUGenetics/svMIL", "max_stars_repo_head_hexsha": "b17f9b34702aac976dd5e233cb4e1ce051d19bbf", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
\chapter{Fonts} \RCSID$Id: ch05.tex,v 1.1 2002/08/23 14:58:46 nwalsh Exp $ \label{chap:fonts} \ifincludechapter\else\endinput\fi All of the common \TeX\ macro packages use the \idx{Computer Modern fonts}\index{fonts}\index{tex@\TeX!fonts}\index{fonts!Computer Modern} by default. In fact, the Computer Modern fonts...
{"hexsha": "130af6c64b46ba4c6854237d1268574b8cf0c415", "size": 95004, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/ch05.tex", "max_stars_repo_name": "d277/MakingTeXWork", "max_stars_repo_head_hexsha": "1d5bed9ab9f5e078a78d0ed0dbaddc0cf4829777", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 2...
/** * Copyright 2012 JDSU * Purpose: Implementation of the stack & layer manager interface. */ #include <boost/foreach.hpp> #include "loader/stack_layer_manager.h" #include "loader/stack_parser.h" #include "loader/protocol_parser.h" #include "loader/protocol_cfg.h" #include "loader/loader_logger.h" StackLayerManag...
{"hexsha": "92bc8a3335e7b3917af170b9dab262045322701d", "size": 5399, "ext": "cc", "lang": "C++", "max_stars_repo_path": "project/c++/mri/src/decode/loader/src/stack_layer_manager.cc", "max_stars_repo_name": "jia57196/code41", "max_stars_repo_head_hexsha": "df611f84592afd453ccb2d22a7ad999ddb68d028", "max_stars_repo_lice...
import tomviz.operators class PeronaMalikAnisotropicDiffusion(tomviz.operators.CancelableOperator): def transform(self, dataset, conductance=1.0, iterations=100, timestep=0.0625): """This filter performs anisotropic diffusion on an image using the classic Perona-Malik, gradient ...
{"hexsha": "4206b97418d21682cdb20241e7ec5dca72c571fe", "size": 2567, "ext": "py", "lang": "Python", "max_stars_repo_path": "tomviz/python/PeronaMalikAnisotropicDiffusion.py", "max_stars_repo_name": "sankhesh/tomviz", "max_stars_repo_head_hexsha": "7116f4eb75b30534a24462f4ddfb1694fe41c308", "max_stars_repo_licenses": ["...
import os import pytest import numpy as np import numpy.testing as nt import xgeo from xgeo.crs import XCRS import xarray as xr here = os.path.dirname(__file__) datapath = os.path.join(here, "data") zones_shp = os.path.join(datapath, "zones.shp") zones_geojson = os.path.join(datapath, "zones.geojson") @pytest.fixt...
{"hexsha": "b5bd2c81d59ec36488e1911777405b61ba51fd09", "size": 4874, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_raster.py", "max_stars_repo_name": "Geosynopsis/xgeo", "max_stars_repo_head_hexsha": "e0818a11abeadc6035dad93f838d6d49cf4bfe95", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
import numpy as np from sklearn.metrics import accuracy_score from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import Normalizer from sklearn.svm import SVC import pickle data = np.load("data/syna_embeddings.npz") X_train, y_train, X_val, y_val = data["arr_0"], data["arr_1"], data["arr_2"], d...
{"hexsha": "3bb8aae4843384950226127a99b5510928237491", "size": 1009, "ext": "py", "lang": "Python", "max_stars_repo_path": "svm_classifier.py", "max_stars_repo_name": "countrymarmot/testFacenet", "max_stars_repo_head_hexsha": "92e966930d931d41ab3bb49928b7de2034c3ac62", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
using Test using QuantumLattices.Prerequisites.VectorSpaces using QuantumLattices.Interfaces: dimension, rank import QuantumLattices.Prerequisites.VectorSpaces: shape, ndimshape import QuantumLattices.Prerequisites.Traits: contentnames, getcontent struct SimpleVectorSpace{B, N} <: EnumerativeVectorSpace{B} sorted...
{"hexsha": "6da42662d20b8270af920073d86f57c139f58974", "size": 4429, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Prerequisites/VectorSpaces.jl", "max_stars_repo_name": "Quantum-Many-Body/QuantumLattices.jl", "max_stars_repo_head_hexsha": "203034b5281887811028484e24ce5a5ea9556185", "max_stars_repo_license...
# -------------------------------------------------------- # SiamMask # Licensed under The MIT License # Written by Qiang Wang (wangqiang2015 at ia.ac.cn) # -------------------------------------------------------- import numpy as np import math from masking.utils.bbox_helper import center2corner, corner2center class ...
{"hexsha": "9c63369a1c93caf1ecb32953a00cefbd0cd2461e", "size": 3228, "ext": "py", "lang": "Python", "max_stars_repo_path": "masking/utils/anchors.py", "max_stars_repo_name": "Ayonveig/Video-Object-Removal", "max_stars_repo_head_hexsha": "c05f7036f5e51a03b9a0f5d1e0b669545f00bd06", "max_stars_repo_licenses": ["MIT"], "ma...
from qutip.solver.options import SolverOdeOptions from qutip.solver.sesolve import SeSolver from qutip.solver.mesolve import MeSolver from qutip.solver.solver_base import Solver import qutip import numpy as np from numpy.testing import assert_allclose import pytest class TestIntegratorCte(): _analytical_se = lamb...
{"hexsha": "80af242a7bb7f87aedcf5d078c7a6f8fb7815999", "size": 3986, "ext": "py", "lang": "Python", "max_stars_repo_path": "qutip/tests/solver/test_integrator.py", "max_stars_repo_name": "jakelishman/qutip", "max_stars_repo_head_hexsha": "fbb7fad5bc205910228db622d90601c82db45e4b", "max_stars_repo_licenses": ["BSD-3-Cla...
# Copyright 2017-2021 QuantRocket LLC - 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 applicabl...
{"hexsha": "f25f71f3dd682d83274bf23262a8737ab35a0299", "size": 20397, "ext": "py", "lang": "Python", "max_stars_repo_path": "moonshot/strategies/ml.py", "max_stars_repo_name": "windblood/moonshot", "max_stars_repo_head_hexsha": "d79cf26e7fb5ce3fcb34060771ea4992e19dc46a", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
using Graphs function create_graph(start_node, end_node) @assert length(start_node)==length(end_node) no_node = max(maximum(start_node), maximum(end_node)) no_arc = length(start_node) graph = simple_inclist(no_node) for i=1:no_arc add_edge!(graph, start_node[i], end_node[i]) end r...
{"hexsha": "9fe1979487199c4fb8d7c72bb7b72ae2e2b6d53f", "size": 3556, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Julia_files/tap_MSA_multi_class.jl", "max_stars_repo_name": "jingzbu/InverseVITraffic", "max_stars_repo_head_hexsha": "c0d33d91bdd3c014147d58866c1a2b99fb8a9608", "max_stars_repo_licenses": ["MIT"],...
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq. From mathcomp Require Import choice fintype finfun bigop prime binomial. (********...
{"author": "math-comp", "repo": "math-comp", "sha": "e39f9173b484f2e8e7f69f746a619dcc8f3abc1b", "save_path": "github-repos/coq/math-comp-math-comp", "path": "github-repos/coq/math-comp-math-comp/math-comp-e39f9173b484f2e8e7f69f746a619dcc8f3abc1b/mathcomp/algebra/ssralg.v"}
(** This file is part of the Coquelicot formalization of real analysis in Coq: http://coquelicot.saclay.inria.fr/ Copyright (C) 2011-2015 Sylvie Boldo #<br /># Copyright (C) 2011-2015 Catherine Lelay #<br /># Copyright (C) 2011-2017 Guillaume Melquiond This library is free software; you can redistribute it and/or mod...
{"author": "jtassarotti", "repo": "coquelicot-ext", "sha": "1c11715037fdd4e15de6491bfdb9f923209ddb63", "save_path": "github-repos/coq/jtassarotti-coquelicot-ext", "path": "github-repos/coq/jtassarotti-coquelicot-ext/coquelicot-ext-1c11715037fdd4e15de6491bfdb9f923209ddb63/theories/Hierarchy.v"}
####################################### # Input Example :: # python hotspot_predict.py -lat 11.05 -long 76.1 -rad 0.2 -hpts 5 ####################################### import pandas as pd from sklearn.preprocessing import MinMaxScaler import numpy as np import math from tensorflow.keras.models import Sequential from ten...
{"hexsha": "61bd7f10067cd1d2a3d137f34c266a6cb0594cf5", "size": 4961, "ext": "py", "lang": "Python", "max_stars_repo_path": "Hotspot_Prediction(MAP)/hotspot_predict.py", "max_stars_repo_name": "chandran-jr/Reubus", "max_stars_repo_head_hexsha": "eca2cc5926b567524355b4b2b3c1e0d69785e6ff", "max_stars_repo_licenses": ["MIT...
import chainer.functions as F import chainer.links as L from chainer import Variable, Chain import numpy as np __all__ = [ 'AffineTransform', ] class AffineTransform(Chain): def __init__(self, *in_sizes: int, out_size: int, nonlinear=F.tanh, nobias: bool = False, initialW=None, initial_bias=...
{"hexsha": "2924f8c5c2bfffa9cf86f04239c65439bb167693", "size": 1080, "ext": "py", "lang": "Python", "max_stars_repo_path": "vapour/links/connections/affine_transform.py", "max_stars_repo_name": "speedcell4/vapour", "max_stars_repo_head_hexsha": "c00b9b8fffddf0b134bec3ebb26d961e0468194a", "max_stars_repo_licenses": ["MI...
# import system module import sys # import some PyQt5 modules from PyQt5.QtWidgets import QApplication, QWidget from PyQt5.QtGui import QImage, QPixmap, QColor from PyQt5.QtCore import QTimer # import Opencv modules import cv2 import numpy as np import math from handGUI import * class MainWindow(QWidget): # cla...
{"hexsha": "81b53ffcc0f325abf309cf7c19d6b6eae82b04ef", "size": 7953, "ext": "py", "lang": "Python", "max_stars_repo_path": "gui/handHandler.py", "max_stars_repo_name": "Johan809/P3-ML", "max_stars_repo_head_hexsha": "ffdc92a452eb9b8ac203bf51d79324eca3d6e0cf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
import numpy as np import time, os, math, operator, statistics, sys import tensorflow as tf from random import Random class Sample(object): def __init__(self, id, image, true_label): # image id self.id = id # image pixels self.image = image # image true label ...
{"hexsha": "6f4614028a3262b6d05f93ba6d56d202035ad2a9", "size": 675, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/structure/sample.py", "max_stars_repo_name": "songhwanjun/Coteaching", "max_stars_repo_head_hexsha": "3fc8fee7f44b0cc8e61bbfb650284e9c9462e6ee", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
''' this is EMU^r (recursive computation of expected marginal utility) algorithm of Bhattacharjee et.al REFERENCES: Bhattacharjee, K.S., Singh, H.K., Ryan, M., Ray, T.: Bridging the gap: Manyobjective optimization and informed decision-making. IEEE Trans. Evolutionary Computation 21(5), 813{820 (2017) ''' import ...
{"hexsha": "26673e93752c6735e06f54085b6e2480270a4c8c", "size": 10056, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/algorithms/EMUr.py", "max_stars_repo_name": "COLA-Laboratory/kpi", "max_stars_repo_head_hexsha": "c4bb23e6302e17c37d1c4419c849a1cf24b0fb84", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
[STATEMENT] lemma snapshot_produces_marker: assumes "trace init t final" and "~ has_snapshotted (S t i) p" and "has_snapshotted (S t (Suc i)) p" and "channel cid = Some (p, q)" shows "Marker : set (msgs (S t (Suc i)) cid) \<or> has_snapshotted (S t i) q" [PROOF STATE] proof (prove) goal (1 subgo...
{"llama_tokens": 10334, "file": "Chandy_Lamport_Snapshot", "length": 51}
import os import tensorflow as tf import numpy as np from math import sqrt, pow def plot_sgd(x,y, name = "SGD"): import plotly.plotly as py import plotly.graph_objs as go #data = [] data = [go.Scatter(x = x, y = y, name = name)] layout = go.Layout(xaxis = dict(type = 'log', autorange = True),yaxis = dict(autorang...
{"hexsha": "6e385f97bfc12f95edbcf2033b7c59fb313f1bb0", "size": 3212, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/SGD_LR_oneMachine.py", "max_stars_repo_name": "yingcuhk/Distributed-and-Asynchronos-SGD", "max_stars_repo_head_hexsha": "f45758082d1d8e0908c9f1978a7ee607a861c21e", "max_stars_repo_licenses": [...
import os import pyfits import scipy from scipy import ndimage,optimize # Function poststamp - cuts out a postage stamp from a larger image # # Inputs: # data - full image data array # cx - x value of central pixel # cy - y value of central pixel # csize - length of one side of the postage stamp # Outpu...
{"hexsha": "4a4131535636e755ef05fb7f821183b36176c4c7", "size": 3769, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/subtract_psf.py", "max_stars_repo_name": "cdfassnacht/CodeCDF", "max_stars_repo_head_hexsha": "f4a3ed7c3a88c06de2c520c6ed858a3c8de5d703", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import os import numpy as np import matplotlib.pyplot as plt import numpy as np import seaborn as sns import pandas as pd import gzip import csv import time import argparse from utils import * from sharenet import * if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-d', '--data_dir...
{"hexsha": "3b92b8c2f127818de8b5435acb94087e76aa1c93", "size": 3417, "ext": "py", "lang": "Python", "max_stars_repo_path": "sharenet_example2.py", "max_stars_repo_name": "alexw16/sharenet", "max_stars_repo_head_hexsha": "122ce05e1adb05bce8e8f5f5c3aeceae2e56b303", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
\documentclass[twoside]{homework} \usepackage{dsfont} \usepackage{graphicx} \usepackage{listings} \usepackage{amsmath} \usepackage{bm} \usepackage{xcolor} \lstset{ rulesepcolor= \color{gray}, %代码块边框颜色 breaklines=true, %代码过长则换行 numbers=left, %行号在左侧显示 numberstyle= \small,%行号字体 %keywordstyle= \colo...
{"hexsha": "7dd92a621e28e000e0a117f98e283b4cdf84d1bd", "size": 43121, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Homework/HW1/StaLearning-HW1/UNI_HW#.tex", "max_stars_repo_name": "Zhuoyue-Xing/STAT-LRNING-BIOL-INFO-SYST", "max_stars_repo_head_hexsha": "dfc1fe0cb36c71d5a2ffb44961f2abbe9fe3e7b2", "max_stars_rep...
import math import time import numpy as np import pandas as pd import torch from tqdm.contrib import tenumerate from millipede import CountLikelihoodSampler, NormalLikelihoodSampler from .containers import SimpleSampleContainer, StreamingSampleContainer from .util import namespace_to_numpy def populate_alpha_beta_...
{"hexsha": "c26af06b18a37ffbac81f32fd9311e22d44c3a4f", "size": 42519, "ext": "py", "lang": "Python", "max_stars_repo_path": "millipede/selection.py", "max_stars_repo_name": "broadinstitute/millipede", "max_stars_repo_head_hexsha": "4b6a61027e559a6953fabee138b074afc4164489", "max_stars_repo_licenses": ["Apache-2.0"], "m...
#ifndef IRODS_AUTHENTICATION_PLUGIN_FRAMEWORK_HPP #define IRODS_AUTHENTICATION_PLUGIN_FRAMEWORK_HPP #include "irods/authCheck.h" #include "irods/authPluginRequest.h" #include "irods/authRequest.h" #include "irods/authResponse.h" #include "irods/authenticate.h" #include "irods/irods_auth_constants.hpp" #include "irods/...
{"hexsha": "67f35d366efb8860d1c0da4a88e722be3fa9328f", "size": 4968, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "lib/core/include/irods/authentication_plugin_framework.hpp", "max_stars_repo_name": "aghsmith/irods", "max_stars_repo_head_hexsha": "31d48a47a4942df688da94b30aa8a5b5210261bb", "max_stars_repo_licens...
import numpy as np import pandas as pd from .constants import * from .functions import * def calculate_daily_aqi(data, column_names): ''' calculate_daily_aqi funcion data: a pandas dataframe column_names: names of factor columns insequence of ['SO2', 'NO2', 'PM10', 'CO', 'O3', 'O3_8H', 'PM_25'] ...
{"hexsha": "ff6495d27973749f768df2eb118c4953f31a228b", "size": 3297, "ext": "py", "lang": "Python", "max_stars_repo_path": "cnemc_calculator/calculate_aqi.py", "max_stars_repo_name": "coeusite/cnemc_calculator", "max_stars_repo_head_hexsha": "7874940adb38bcdf684e9032f55de10adfa10345", "max_stars_repo_licenses": ["MIT"]...
from dnc.envs.base import KMeansEnv import numpy as np from rllab.core.serializable import Serializable from rllab.envs.base import Step from rllab.misc.overrides import overrides from rllab.misc import logger import os.path as osp raise NotImplementedError('This is taken from DNC repo and needs to be made to work ...
{"hexsha": "7c0d04fda1fd15210ef29409725f042f177f9073", "size": 5284, "ext": "py", "lang": "Python", "max_stars_repo_path": "rlkit/envs/lob.py", "max_stars_repo_name": "yifan-you-37/rl_swiss", "max_stars_repo_head_hexsha": "8b0ee7caa5c1fa93860916004cf4fd970667764f", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
// // Created by michel on 11-02-21. // #include "test-helper.h" #include <boost/mpl/list.hpp> #include <org-simple/util/LockfreeRingBuffer.h> using namespace boost::unit_test; using namespace org::simple::util; enum class WriteMethod { WRITE, RESET, RESET_COUNT }; struct AbstractRingBufferTester { virtual size_...
{"hexsha": "1bed16304af0449b71e472f4bf70379700fa8a2b", "size": 8542, "ext": "cc", "lang": "C++", "max_stars_repo_path": "test/util/LockFreeRingBufferTests.cc", "max_stars_repo_name": "emmef/org-simple-util", "max_stars_repo_head_hexsha": "80c7ad1c1241ce37c8a312ba1e990ffd5a2db619", "max_stars_repo_licenses": ["Apache-2....
(* Title: HOL/Isar_Examples/Basic_Logic.thy Author: Makarius Basic propositional and quantifier reasoning. *) section \<open>Basic logical reasoning\<close> theory Basic_Logic imports Main begin subsection \<open>Pure backward reasoning\<close> text \<open> In order to get a first idea of how Is...
{"author": "zchn", "repo": "isabelle-practice", "sha": "1c6de196ca011593faeed229808e65c9bfeb659e", "save_path": "github-repos/isabelle/zchn-isabelle-practice", "path": "github-repos/isabelle/zchn-isabelle-practice/isabelle-practice-1c6de196ca011593faeed229808e65c9bfeb659e/examples/src/HOL/Isar_Examples/Basic_Logic.thy"...
// This file is part of PoseEstimation. // This file is a modified version of p3p.m <http://rpg.ifi.uzh.ch/software_datasets.html>, // see 3-Clause BSD license below. // Copyright (c) 2021, Eijiro Shibusawa <phd_kimberlite@yahoo.co.jp> // All rights reserved. // // Redistribution and use in source and binary forms, wit...
{"hexsha": "3a48c4abd77e6592ce83164eef649840966c1748", "size": 11512, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/P3P.hpp", "max_stars_repo_name": "eshibusawa/PoseEstimation", "max_stars_repo_head_hexsha": "7eca2b21673b2cd42f40c1f05d4f67ee89bdc279", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c...
function [ a, ipvt, info ] = dchdc ( a, lda, p, ipvt, job ) %*****************************************************************************80 % %% DCHDC computes the Cholesky decomposition of a positive definite matrix. % % Discussion: % % A pivoting option allows the user to estimate the condition of a % positi...
{"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/linpack_d/dchdc.m"}
import pandas as pd import numpy as np import plotly.plotly as py import plotly.graph_objs as go #to read a csv df = pd.read_csv('./asset/lecture_data.txt', sep='\t') print(df.head())
{"hexsha": "42dd0c1505a579ab5b255972112f8bf1400b692c", "size": 186, "ext": "py", "lang": "Python", "max_stars_repo_path": "Learning/learnPandas.py", "max_stars_repo_name": "suryaavala/17s1-cs9318", "max_stars_repo_head_hexsha": "fdfa84a5f3330d189af213d670479c65d6c60a28", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np import integrator import gravity from ephemerides import ephemerides import csv import time from plot import plotter, anim_plotter import math class body_differentials(integrator.differential_equation): def __init__(self, masses, *args, **kwargs): super().__init__() if len(masses...
{"hexsha": "a91a65550bbd2a24be1e5798294e66dfec5df06a", "size": 10807, "ext": "py", "lang": "Python", "max_stars_repo_path": "nBody.py", "max_stars_repo_name": "ForrestHurley/nBodySystem", "max_stars_repo_head_hexsha": "72e77665f5e181811a111872debd50eb9b263fa2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
module MSC export removeMSC, gapFillMSC, getMSC, getMedSC using ..Cubes using ..DAT using ..Proc import Statistics: quantile! function removeMSC(aout,ain,NpY::Integer,tmsc,tnmsc) #Start loop through all other variables fillmsc(1,tmsc,tnmsc,ain,NpY) subtractMSC(tmsc,ain,aout,NpY) nothing end """ re...
{"hexsha": "52631693c0c7f04c7aae8e8e31c9a442fabaede7", "size": 3850, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Proc/MSC.jl", "max_stars_repo_name": "Balinus/ESDL.jl", "max_stars_repo_head_hexsha": "7262fb0b9e8e0f18ba13a6ba65077bc652bccb29", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
{"hexsha": "36bffcc7f2ad371b5f7d1f80f214a67c995af16f", "size": 17123, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/fluid/dataloader/dataset.py", "max_stars_repo_name": "DevilCarp/Paddle", "max_stars_repo_head_hexsha": "04325d2cbefb029a4478bdc069d3279cd566ac6a", "max_stars_repo_licenses": ["Apach...
! { dg-do compile } ! { dg-options "-std=legacy" } ! ! Tests the fix for PR28600 in which the declaration for the ! character length n, would be given the DECL_CONTEXT of 'gee' ! thus causing an ICE. ! ! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> ! subroutine bar(s, n) integer n character s*(n) ...
{"hexsha": "c8f804465b7c5da676e08be1a49fb29205ade0d8", "size": 450, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/assumed_charlen_function_4.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_...
MODULE empRel !1. Johnson (1966): B-V logTeff relation !2. Jordi+ (2010): G_BP-G_RP logTeff relation DOUBLE PRECISION, DIMENSION(4,2), PARAMETER :: cJ=reshape((/ 0.D0, 0.D0, -0.234D0, 3.908D0, & & -0.316D0, 0.709D0, -0.654D0, 3.999D0 /), & & (/4,2/)) DOUBLE PRECISION :: DTeJ=0.02 !error ...
{"hexsha": "33c518cc3e16aad4ea4b0d5fb7d150a2e03ea906", "size": 3043, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "empRel.f90", "max_stars_repo_name": "Bonfanti88/MCMCI", "max_stars_repo_head_hexsha": "9dcc1745896ed2e1fc023ad19475d09cce2ee518", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_s...
# # Copyright The NOMAD Authors. # # This file is part of NOMAD. # See https://nomad-lab.eu for further info. # # 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/lic...
{"hexsha": "69fc2c7fb89f9957f133f53b1d25f61449a2a3b6", "size": 124369, "ext": "py", "lang": "Python", "max_stars_repo_path": "vaspparser/metainfo/vasp_incars.py", "max_stars_repo_name": "nomad-coe/nomad-parser-vasp", "max_stars_repo_head_hexsha": "080e74e84c645aa018527da7d14d903893b279c5", "max_stars_repo_licenses": ["...
C @(#)ipf_intfce.f 20.4 11/11/97 subroutine ipf_intfce (string, value) character string *(*) integer value C This subroutine provides an single but limited variable c interface to IPF without recourse to IPF common data blocks. include 'ipfinc/parametr.inc' include '...
{"hexsha": "56de05fda8734a93153618323f7f7990a34fef4e", "size": 1049, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/ipf_intfce.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
import numpy as np import random, math A=np.array(([2, 4, 0, 0], [3, 5, 1, 0], [0, 6, 2, 0], [5, 7, 0, 1], [6, 8, 4, 2], [0, 9, 5, 3], [8, 0, 0, 4], [9, 0, 7, 5], [0, 0, 8, 6])) L=3 N=L**2 E=-2*N def Nbr(n, k): return A.T[n-1, k-1] sigma=[random.choice([1, -1]) for i in rang...
{"hexsha": "6f2daaae54ab4f6016e8f2ff693c94f7a02acba3", "size": 939, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter 5/markov-spin-glass.py", "max_stars_repo_name": "indrag49/Computational-Stat-Mech", "max_stars_repo_head_hexsha": "0877f54a0245fce815f03478f4fb219fd6314951", "max_stars_repo_licenses": ["MI...
using AccelerationBenchmark, DataFrames, CSV, Optim, LineSearches, CUTEst, JLD const run_tests_more = true # Run the Moré et al. tests from the O-ACCEL paper const run_tests_cutest = true # Run CUTEst tests const savejld = true const savecsv = true function lstests() lsm = MoreThuente() lsh = HagerZhang() ...
{"hexsha": "b21b13b2d1ffc3cb63a1f4b6e526ef12fb979d4b", "size": 2523, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "benchmark/lbfgsscale/runtests.jl", "max_stars_repo_name": "anriseth/AccelerationBenchmark.jl", "max_stars_repo_head_hexsha": "3f01e013b7635a37dd99ea144b22e23db7716c9f", "max_stars_repo_licenses": [...
import pandas as pd import numpy as np from typing import List, Optional import matplotlib.pyplot as plt import warnings warnings.filterwarnings("ignore") class Indices: """ Price Technical Indicators """ def __init__( self, df: pd.DataFrame, date_col: str = "date", price_col: str = "price" ...
{"hexsha": "76c87daecb5131b4444cae117e3946dd71c61b60", "size": 14399, "ext": "py", "lang": "Python", "max_stars_repo_path": "PriceIndices/price_indicators.py", "max_stars_repo_name": "dc-aichara/Price-Indices", "max_stars_repo_head_hexsha": "31159417b5ee79d051dea0f68600f1f2f3745eda", "max_stars_repo_licenses": ["MIT"],...
[STATEMENT] lemma darcs_mset_elem: "x \<in># darcs_mset (Node r xs) \<Longrightarrow> \<exists>(t,e) \<in> fset xs. x \<in># darcs_mset t \<or> x = e" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<in># darcs_mset (Node r xs) \<Longrightarrow> \<exists>(t, e)\<in>fset xs. x \<in># darcs_mset t \<or> x = e [PRO...
{"llama_tokens": 286, "file": "Query_Optimization_Dtree", "length": 2}
SUBROUTINE formtb(pb,km,g) ! ! This subroutine assembles an unsymmetrical band matrix pb from ! element constituent matrices km. ! IMPLICIT NONE INTEGER,PARAMETER::iwp=SELECTED_REAL_KIND(15) REAL(iwp),INTENT(IN)::km(:,:) INTEGER,INTENT(IN)::g(:) REAL(iwp),INTENT(OUT)::pb(:,:) INTEGER::i,j,idof,icd,iw idof=SIZE(k...
{"hexsha": "1f2f214b4a14a4df528dc9c6f5b0640038a1fd73", "size": 562, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "main/formtb.f90", "max_stars_repo_name": "cunyizju/Programming-FEM-5th-Fortran", "max_stars_repo_head_hexsha": "7740d381c0871c7e860aee8a19c467bd97a4cf45", "max_stars_repo_licenses": ["MIT"], "max...
import healpy as hp from scipy.integrate import trapz from scipy.integrate import simps from astropy import constants as const import numpy as np from astropy import units as u def kappa_prefactor(H0, om0, length_unit='Mpc'): """ Gives prefactor (3 H_0^2 Om0)/2 :param H0: Hubble parameter with astropy un...
{"hexsha": "001f1d1b7d2c6265e1e9b2bba6d502b4b95dc1f8", "size": 8395, "ext": "py", "lang": "Python", "max_stars_repo_path": "bornraytrace/lensing.py", "max_stars_repo_name": "NiallJeffrey/BornRaytrace", "max_stars_repo_head_hexsha": "cb07ed78d206563243ace6e9015804e87c6513e5", "max_stars_repo_licenses": ["MIT"], "max_sta...
export UserKNN """ UserKNN( data::DataAccessor, k::Int, normalize::Bool=false ) [User-based CF using the Pearson correlation](https://dl.acm.org/citation.cfm?id=312682). `k` represents number of neighbors, and `normalize` specifies if weighted sum of neighbors' rating is normalized. T...
{"hexsha": "46023817735e9aedbf4648cbf0b842f8d4d28025", "size": 3911, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/model/user_knn.jl", "max_stars_repo_name": "takuti/Recommendation.jl", "max_stars_repo_head_hexsha": "551019ea415efd609edc137f72bf15f0cb436ce8", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# Base model struct Base.@kwdef mutable struct guessing{T <: AbstractFloat} <: IRTmodel a::AbstractVector{T} = [0.0] d::AbstractVector{T} = [0.0] c::AbstractVector{T} = [0.0] group::Vector{Int64} = [1] fixed::Bool = false estc::Bool = true end function _distribute!(new, old::guessing) old.a...
{"hexsha": "51615d0014c3bc803d46b109a6a07d8477d3c451", "size": 2333, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/IRTmodels/guessing.jl", "max_stars_repo_name": "takuizum/irtfun.jl", "max_stars_repo_head_hexsha": "326555ca78fcfee5d0894e3b5dd0dc261059d4c0", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import numpy as np import torch from util.reservoir_w_cur_replay_buffer import Reservoir_with_Cur_Replay_Memory import random import matplotlib.pyplot as plt s_c = torch.load("forward_curiosity") a_c = torch.load("inverse_curiosity") mul = 1000 change_var_at = [0, 100, 150, 350] change_var_at = [change_var_at[i]*mul ...
{"hexsha": "5cb38e57b09a44c99f52b454c81d7b94029d8abc", "size": 1944, "ext": "py", "lang": "Python", "max_stars_repo_path": "additional_test/Test_Filters/test_time_fun.py", "max_stars_repo_name": "punk95/Continual-Learning-With-Curiosity", "max_stars_repo_head_hexsha": "af0c507040e1352beb8740b6b3a7849417fc879a", "max_st...
import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button #setup the plotting area fig, ax = plt.subplots() plt.subplots_adjust(left=0.15, bottom=0.35) # Here we start with initial parameters hard coded x0 = 5 v0 = 0 F0 = 1 m = 1 w0 = 1 #Then we start initial dafault values fo...
{"hexsha": "3d843ae0b7e7166c7e7df2989ed4ca981efbf92f", "size": 2316, "ext": "py", "lang": "Python", "max_stars_repo_path": "slider_force.py", "max_stars_repo_name": "drjenncash/MechanicsInteractives", "max_stars_repo_head_hexsha": "6d2756de6d24beaa6c93396a4a975c055b103121", "max_stars_repo_licenses": ["MIT"], "max_star...
#include <ros/package.h> #include <pcl/io/pcd_io.h> #include <boost/filesystem.hpp> #include <camera_calibration_parsers/parse_ini.h> #include <Eigen/Core> #include <pcl/common/common.h> #include <pcl/common/transforms.h> #include <tf_conversions/tf_eigen.h> #include <boost/algorithm/string/split.hpp> #include <string>...
{"hexsha": "f84ad8a6ec46ae028495cc14482b85f8ce24b73f", "size": 9660, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "apc_object_perception/apc_capture/src/tote_features_exe.cpp", "max_stars_repo_name": "warehouse-picking-automation-challenges/nimbro_picking", "max_stars_repo_head_hexsha": "857eee602beea9eebee45bbb...
[STATEMENT] lemma prime_gauss_int_norm_squareD: fixes z :: gauss_int assumes "prime z" "gauss_int_norm z = p ^ 2" shows "prime p \<and> z = of_nat p" [PROOF STATE] proof (prove) goal (1 subgoal): 1. prime p \<and> z = of_nat p [PROOF STEP] using assms(1) [PROOF STATE] proof (prove) using this: prime z goal (1...
{"llama_tokens": 2944, "file": "Gaussian_Integers_Gaussian_Integers", "length": 24}
Require Import bf_stack bf bf_semantics. Require Import Lists.Streams. Inductive ae : Set := | Int : nat -> ae | Plus : ae -> ae -> ae | Minus : ae -> ae -> ae | Mult : ae -> ae -> ae. Coercion Int : nat >-> ae. Notation "a + b" := (Plus a b) : ae_scope. Notation "a - b" := (Minus a b) : ae_scope. Notation "a * b" :=...
{"author": "reynir", "repo": "Brainfuck", "sha": "13c1ea7bf376b36f94a542deaadbb7f5d2e2f0db", "save_path": "github-repos/coq/reynir-Brainfuck", "path": "github-repos/coq/reynir-Brainfuck/Brainfuck-13c1ea7bf376b36f94a542deaadbb7f5d2e2f0db/ae_compiler.v"}
import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import scipy.optimize import multiprocessing as mp import copy import pickle import gasdynamics as gd from heat_flux import heat_flux from plug_nozzle_angelino import plug_nozzle import MOC import MOC_its ## NASA CEA CONSTAN...
{"hexsha": "ed27c67dec7a2a63d6ae2070743c91b9a3444102", "size": 12128, "ext": "py", "lang": "Python", "max_stars_repo_path": "animations_py/animation_1_trunc.py", "max_stars_repo_name": "coursekevin/AerospikeDesign", "max_stars_repo_head_hexsha": "2385e53fa6af51fb09b8f1280cbb052e7a5c7aea", "max_stars_repo_licenses": ["M...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Inverse kinematics with the Kuka robot where the goal is to follow a moving sphere. The inverse kinematics is performed using priority tasks and constraints, which are optimized using Quadratic Programming (QP). """ import numpy as np import time import pyrobolearn as ...
{"hexsha": "e516b7ad70fdaf88cf20bd20932775fc3087516d", "size": 2566, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyrobolearn/priorities/ik.py", "max_stars_repo_name": "Pandinosaurus/pyrobolearn", "max_stars_repo_head_hexsha": "9cd7c060723fda7d2779fa255ac998c2c82b8436", "max_stars_repo_licenses": ["Apache-2.0...
import itertools import numpy as np from scipy import stats from pycircstat import var def convolve_dirac_gauss(t, trial, sigma=1.): """ Convolves event series represented as time points of Dirac deltas with the pdf of a Gaussian :param t: time points at which the convolution will be computed :pa...
{"hexsha": "7d0488e93ffbbf6cea44317ca380d7c4b2e04e71", "size": 2662, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycircstat/event_series.py", "max_stars_repo_name": "hoechenberger/pycircstat", "max_stars_repo_head_hexsha": "53d2efdf54c394fd9ecff8d47eaae165c1458fb0", "max_stars_repo_licenses": ["MIT"], "max_s...
[STATEMENT] lemma head_\<omega>_of_nat[simp]: "head_\<omega> (of_nat n) = (if n = 0 then 0 else 1)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. head_\<omega> (of_nat n) = (if n = 0 then 0 else 1) [PROOF STEP] unfolding head_\<omega>_def one_hmultiset_def of_nat_hmset [PROOF STATE] proof (prove) goal (1 subgoal): ...
{"llama_tokens": 230, "file": "Nested_Multisets_Ordinals_Syntactic_Ordinal", "length": 2}
import sys from itertools import count import cv2 import gym_super_mario_bros from gym.wrappers import Monitor from gym_super_mario_bros.actions import SIMPLE_MOVEMENT, COMPLEX_MOVEMENT, RIGHT_ONLY from nes_py.wrappers import JoypadSpace import matplotlib.pyplot as plt import numpy as np import torch from Policy_Gra...
{"hexsha": "24b470541ada044ebb3828958e1ec443ac17ecef", "size": 5143, "ext": "py", "lang": "Python", "max_stars_repo_path": "Policy_Gradient/policy_main.py", "max_stars_repo_name": "KailashDN/Deep_Reinforcement_Learning_Gym", "max_stars_repo_head_hexsha": "1ecbb54baad93e41c16af7505e2d407a40326da7", "max_stars_repo_licen...
# File: base.py # File Created: Thursday, 14th March 2019 4:08:16 pm # Author: Steven Atkinson (212726320@ge.com) import abc from time import time import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from tqdm import tqdm import torch from torch.utils.data import Ten...
{"hexsha": "db6d95044b3fee4acd91b21d1af38862f5f8262e", "size": 4449, "ext": "py", "lang": "Python", "max_stars_repo_path": "pirate/models/base.py", "max_stars_repo_name": "212726320/PIRATE-1", "max_stars_repo_head_hexsha": "eac2d090286e0a5c13be4829259ea12cbda2f75c", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python # -*- coding: utf-8 -*- import rospy from representation import Env import tf import time from simulation.srv import EnvGen, EnvGenResponse from simulation.srv import GoalInfo, GoalInfoResponse from simulation.srv import StairInfo, StairInfoResponse import render import numpy as np class EnvGene...
{"hexsha": "2d143d269595f02afd6a139939f24be003493292", "size": 6484, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulation/scripts/env_generation/env_gen_services.py", "max_stars_repo_name": "gwaxG/robot_ws", "max_stars_repo_head_hexsha": "ec8c85cc3b5e7262bba881bf96f4213f5403b8b5", "max_stars_repo_licenses"...
# Copyright 2020 Paul Melis (paul.melis@surf.nl) # # 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 a...
{"hexsha": "bad3863fb792b4e004b31e5edb80e99be229ed8c", "size": 7167, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "catmull-clark.jl", "max_stars_repo_name": "paulmelis/blender-julia-test", "max_stars_repo_head_hexsha": "1abd241182eb82f79a196b4f158daab9a8905af0", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
using Gadfly set_default_plot_size(6inch, 6inch) z = rand(1:8,100) plot(x=rand(100), y=rand(100), shape=z, Geom.point, Scale.shape_discrete(levels=sort(unique(z))))
{"hexsha": "3eeceacb77ade483751ef7f83123f436a0a204ce", "size": 171, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/testscripts/point_shape_numerical.jl", "max_stars_repo_name": "MrVPlusOne/Gadfly.jl", "max_stars_repo_head_hexsha": "a565b732ab8cd90b9f4fe83cd7d146856bb136da", "max_stars_repo_licenses": ["MIT"...
[STATEMENT] lemma span_induct' [consumes 1, case_names base step]: assumes "p \<in> span B" and "P 0" and "\<And>a q p. a \<in> span B \<Longrightarrow> P a \<Longrightarrow> p \<in> B \<Longrightarrow> q \<noteq> 0 \<Longrightarrow> P (a + q *s p)" shows "P p" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ...
{"llama_tokens": 2597, "file": "Polynomials_More_Modules", "length": 33}
[STATEMENT] lemma nodes_\<alpha>g_aux: "invar g \<Longrightarrow> nodes (\<alpha>g g) = \<alpha>nodes_aux g" [PROOF STATE] proof (prove) goal (1 subgoal): 1. invar g \<Longrightarrow> nodes (\<alpha>g g) = \<alpha>nodes_aux g [PROOF STEP] unfolding \<alpha>g_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. invar ...
{"llama_tokens": 297, "file": "Prim_Dijkstra_Simple_Undirected_Graph_Impl", "length": 3}
''' Classes ------- LearnAlg Defines some generic routines for * saving global parameters * assessing convergence * printing progress updates to stdout * recording run-time ''' import numpy as np import time import logging import os import sys import scipy.io import learnalg.ElapsedT...
{"hexsha": "4f90d0f142711257c9e17c18e1d3813e5b2ef992", "size": 19925, "ext": "py", "lang": "Python", "max_stars_repo_path": "bnpy/learnalg/LearnAlg.py", "max_stars_repo_name": "zhaottcrystal/bnpy", "max_stars_repo_head_hexsha": "0195a0228e9e698799e52a6dfa1d051e82b43fd0", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
""" Stores all of the terms used inside the VPT2 representations """ import itertools import numpy as np, functools as fp, itertools as ip, time, enum from McUtils.Numputils import SparseArray, levi_cevita3, vec_tensordot, vec_outer from McUtils.Data import UnitsData from McUtils.Scaffolding import Logger, NullLogger...
{"hexsha": "13700928886a30b7890d8a1e854c5be7a7ef025c", "size": 119889, "ext": "py", "lang": "Python", "max_stars_repo_path": "Psience/VPT2/Terms.py", "max_stars_repo_name": "McCoyGroup/Coordinerds", "max_stars_repo_head_hexsha": "058a4f5b29f157e499cec3c8f2da8b216f0210ef", "max_stars_repo_licenses": ["MIT"], "max_stars_...
module linear_solve implicit none public :: lu_decomposition public :: lu_back_substitution public :: lu_inverse public :: imaxloc interface lu_decomposition module procedure lu_decomposition_real module procedure lu_decomposition_complex end interface interface lu_back_substitution m...
{"hexsha": "48ab212fc4aa3c65e26dac3a024cde2465f3d615", "size": 6429, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/utils/linear_solve.f90", "max_stars_repo_name": "SStroteich/stella-1", "max_stars_repo_head_hexsha": "104556a07b9736e7c28e6f1bf2f799384732f38b", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma subst_typ'_rename_tvar_bind_fv: assumes "y \<notin> fst ` fv t" assumes "(b, S) \<notin> tvs t" assumes "(b, S) \<notin> tvsT \<tau>" shows "bind_fv (y, subst_typ [((a,S), Tv b S)] \<tau>) (subst_typ' [((a,S), Tv b S)] (subst_term [((x, \<tau>), Fv y \<tau>)] t)) = subst_typ' [((a,S), ...
{"llama_tokens": 678, "file": "Metalogic_ProofChecker_Logic", "length": 2}
#! /usr/bin/env python import numpy as np from scipy.sparse.linalg import LinearOperator from dimredu.lib.randomized_svd import randomized_svd def sparseSVDUpdate(X, U, E, VT): """Compute a fast SVD decomposition. The is computes the SVD update of a matrix formed from the sum of a sparse matrix :math:`X...
{"hexsha": "e7190db0e21077e46db5a405e2486fe3c4cbeca7", "size": 2950, "ext": "py", "lang": "Python", "max_stars_repo_path": "dimredu/lib/sparseSVDUpdate.py", "max_stars_repo_name": "Marissa4/RPyCA", "max_stars_repo_head_hexsha": "e3c229361a4cd9ddd53accc5541b7c8b5f8939e0", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np from numpy import sqrt import scipy.constants as cs import datproc.print as dpr ## General output = __name__ == '__main__' ## Data lda_mfr = 532.0 * cs.nano d_lda_mfr = 1.0 * cs.nano s1 = np.array([0.0000, 0.3010, 0.6000, 0.9010, 1.2010]) * cs.milli d_s1 = np.array([0.0010, 0.0010, 0.0010, 0.0010...
{"hexsha": "1086a515130ba835eb0d882cec1928050939dd90", "size": 1171, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/interferometer/wavelength.py", "max_stars_repo_name": "jackerschott/AP21", "max_stars_repo_head_hexsha": "8f49b3c4901e50770b1df05fa6470d45e469258a", "max_stars_repo_licenses": ["MIT"],...
[STATEMENT] lemma idempotent_dual: "idempotent x \<longleftrightarrow> idempotent (x\<^sup>d)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. idempotent x = idempotent (x\<^sup>d) [PROOF STEP] using dual_involutive idempotent_transitive_dense transitive_iff_dense_dual [PROOF STATE] proof (prove) using this: ?x\<^s...
{"llama_tokens": 223, "file": "Correctness_Algebras_Lattice_Ordered_Semirings", "length": 2}
#include "hg_intersect.h" #include <vector> #ifndef HAVE_OLD_CPP # include <unordered_map> #else # include <tr1/unordered_map> namespace std { using std::tr1::unordered_map; } #endif #include "fast_lexical_cast.hpp" #include <boost/functional/hash.hpp> #include "verbose.h" #include "tdict.h" #include "hg.h" #include ...
{"hexsha": "02f5a401f0f456ad3964cea333c4c466b1a9346f", "size": 5183, "ext": "cc", "lang": "C++", "max_stars_repo_path": "decoder/hg_intersect.cc", "max_stars_repo_name": "kho/cdec", "max_stars_repo_head_hexsha": "d88186af251ecae60974b20395ce75807bfdda35", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL", "Apache-2.0"], ...
""" Tensor Transforms ~~~~~~~~~~~~~~~~~ """ from skimage import transform as _sktransform import numpy as np import torch as _torch class Resize: """ Resize transform """ def __init__(self, output_size: int): assert isinstance(output_size, (int, tuple)) self.output_size = output_size def ...
{"hexsha": "cfca4b232c2234b2ae3cf6ad3e9fa4b1ac3aef7c", "size": 1342, "ext": "py", "lang": "Python", "max_stars_repo_path": "transforms.py", "max_stars_repo_name": "vidakDK/U-2-Net", "max_stars_repo_head_hexsha": "bd1f2d11b45ab5514418c25c0a763faf370667e0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nu...
using Lava: IFeature mutable struct TestFeature <: IFeature mOnInstanceCreatedCalled mBeforeInstanceDestruction mOnLogicalDeviceCreated mOnPhysicalDeviceSelected mBeforeDeviceDestructionCalled function TestFeature() this = new() this.mOnInstanceCreatedCalled = false thi...
{"hexsha": "4521f14565573987e5c4f79177ab124223e23ff0", "size": 1472, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/TestFeature.jl", "max_stars_repo_name": "gcmiao/Lava.jl", "max_stars_repo_head_hexsha": "fb9656944c63a9612927867cef9b0d0b33fe5f24", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
import numpy as np from os import path import pytest from autoconf import conf import autofit as af import autolens as al from autolens import exc directory = path.dirname(path.realpath(__file__)) class TestAnalysisAbstract: pass class TestAnalysisDataset: def test__use_border__determin...
{"hexsha": "9f8051d238a0d46f04978b5bb205106ab26a5aef", "size": 3912, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_autolens/lens/model/test_analysis.py", "max_stars_repo_name": "Jammy2211/PyAutoLens", "max_stars_repo_head_hexsha": "728100a3bf13f89f35030724aa08593ab44e65eb", "max_stars_repo_licenses": ["MI...
import os, sys sys.path.append(os.getcwd()) import time import tflib as lib import tflib.save_images import tflib.mnist import tflib.cifar10 import tflib.plot import tflib.inception_score import os import numpy as np import torch import torchvision from torch import nn from torch import autograd from torch import o...
{"hexsha": "f79b90a01e11bdbd12695d80862f24f45a0c970e", "size": 10960, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch/examples/wgan-gp/gandag_cifar10.py", "max_stars_repo_name": "sutd-visual-computing-group/dag-gans", "max_stars_repo_head_hexsha": "68a76153650df6de2a6919a93a2d3b98ca6407e6", "max_stars_re...
[STATEMENT] lemma subst_lconsts_empty_subst[simp]: "subst_lconsts empty_subst = {}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. subst_lconsts empty_subst = {} [PROOF STEP] by (metis empty_subst_spec)
{"llama_tokens": 83, "file": "Incredible_Proof_Machine_Abstract_Formula", "length": 1}
class IntPair: """ A pair of unordered hashable integers. Use this class for dictionary keys. ```python import numpy as np from tdw.int_pair import IntPair id_0 = 0 pos_0 = np.array([0, 1, 0]) id_1 = 1 pos_1 = np.array([-2, 2.5, 0.8]) # Start a dictionary of distances between o...
{"hexsha": "c74ef696ac92427dc016f7dfb3c6c764293472c1", "size": 1209, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/tdw/int_pair.py", "max_stars_repo_name": "felixbinder/tdw", "max_stars_repo_head_hexsha": "eb2b00b74b9fcf8ef2dcba1baa62424640c520b1", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars...
import sys sys.path.insert(0,'../../../deeplab-public-ver2/python') import caffe import leveldb import numpy as np from caffe.proto import caffe_pb2 import csv import cv2 # Wei Yang 2015-08-19 # Source # Read LevelDB/LMDB # ================== # http://research.beenfrog.com/code/2015/03/28/read-leveldb-lmdb-f...
{"hexsha": "f71076ba0db1bec326551e5faa965b228c3a02be", "size": 1296, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/resnet_model/read_lmdb.py", "max_stars_repo_name": "Granular-data/cloudless", "max_stars_repo_head_hexsha": "e45d93b48b8e668a8a6cea6fab51d59f389591a8", "max_stars_repo_licenses": ["Apache-2.0"...
""" The purpose of this file is to create a usable class out of the lane detection scripts that Juan Carlos wrote, and integrate it with the DRIVR system. I) IMAGE READING II) LSD ALGORITHM III) SCANNING OF THE IMAGE AND DETECTION OF ROAD MARK SIGNATURE IV) ELIMINATION OF WHITE ROAD MARK DUPLICATES V) MERGING ALL WHIT...
{"hexsha": "6c747a3599549bd9a13ac1d5615073717a269148", "size": 13086, "ext": "py", "lang": "Python", "max_stars_repo_path": "lane_detector.py", "max_stars_repo_name": "syeda27/MonoRARP", "max_stars_repo_head_hexsha": "71415d9fc71bc636ac1f5de1a90f033b4e519538", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "...
import pytorch_lightning as pl import torch import tqdm import json import os import re import numpy as np import pickle from typing import Sequence, Union from torchvision import transforms import glob from PIL import Image class PixivDataset(torch.utils.data.Dataset): def __init__(self, dataset_path: str, size:...
{"hexsha": "e2fe9e2eccc66da51acd58072e0a3f481be6f5b7", "size": 1928, "ext": "py", "lang": "Python", "max_stars_repo_path": "lemon/datasets/pixiv_dataset.py", "max_stars_repo_name": "lemon-chat/LemonAvatar", "max_stars_repo_head_hexsha": "d8c5bc10c04af49bd12217f5de11a6f9ceaeb55f", "max_stars_repo_licenses": ["MIT"], "ma...
using JLD2, Attitude, MATLAB, SatelliteDynamics, Dierckx # include ksfunctions.jl include(joinpath(dirname(dirname(@__FILE__)),"ks_functions.jl")) @load "rate_control_transfers/112_day_transfer.jld2" X U dscale = 1e7 # m tscale = 20000 # s uscale = 10000.0 dt = 4e-2 t_days,t_hist = get_time_transfer(X,dt,tscale) r...
{"hexsha": "5b2d7f3dc93e3aafc05e975d81ae48051a2e1952", "size": 7224, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "plotting_scripts/100_day_plot.jl", "max_stars_repo_name": "RoboticExplorationLab/KSLowThrust", "max_stars_repo_head_hexsha": "ba14ab1c9990e50caf41382a3b313e284111cffb", "max_stars_repo_licenses": [...
from datetime import timedelta from time import time import warnings from gdbn.dbn import buildDBN from gdbn import activationFunctions import numpy as np from sklearn.base import BaseEstimator from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import OneHotEncoder warnings.warn("""\ The nolear...
{"hexsha": "0eee38462a6960daf6396b6176669d3f717049e9", "size": 16726, "ext": "py", "lang": "Python", "max_stars_repo_path": "nolearn/dbn.py", "max_stars_repo_name": "KEVINYZY/nolearn", "max_stars_repo_head_hexsha": "342915012081f31bb88f69daa8857fd2f4e15a1d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 968, "...
import numpy as np import heapq class Node: def __init__(self, data, dim, left=None, right=None): self.data = data self.dim = dim self.left = left self.right = right def __str__(self): return str(self.data) __repr__ = __str__ class KNN: def __init__(self, da...
{"hexsha": "528c4491d8b025bc7c91299ec883e172133b6922", "size": 2116, "ext": "py", "lang": "Python", "max_stars_repo_path": "machine_learning/algorithms/knn.py", "max_stars_repo_name": "z-yin/Leetcode-learning", "max_stars_repo_head_hexsha": "e84c2fb067b767ed5f24d8736274c7ebce5dc00e", "max_stars_repo_licenses": ["MIT"],...
using FEASTSolver using LinearAlgebra using DelimitedFiles using SparseArrays N = 100 # A = spdiagm(-1 => fill(-1.0, 99), 0 => fill(2.0, 100), 1 => fill(-1.0, 99)) A = diagm(-1 => fill(-1.0, N-1), 0 => fill(1.0, N), 1 => fill(1.0, N-1), 2 => fill(1.0, N-2), 3 => fill(1.0, N-3)) # B = diagm(-1 => fill(-1.0, N-1), 0 => ...
{"hexsha": "0e3ba354a30d63fc69ca1d9927fdab806124e8e6", "size": 1296, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/non_hermitian.jl", "max_stars_repo_name": "rleegates/FEASTSolver.jl", "max_stars_repo_head_hexsha": "1f226df0ea72ae3cb2eca782439ae672e8488a85", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#!/usr/bin/env python # coding=utf-8 import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim import lr_scheduler import torchvision from torchvision import datasets, models, transforms from torch.autograd import Variable import numpy as np import time import os im...
{"hexsha": "c8a20fa57f0741fde54a0dcc8aefb1c47aeb90ba", "size": 3838, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils_incremental/compute_confusion_matrix.py", "max_stars_repo_name": "chrysts/geodesic_continual_learning", "max_stars_repo_head_hexsha": "8a5ba6310541f2643660ebc8b66c304ffd392fd9", "max_stars_r...
# IMPORT LIBRARIES import warnings warnings.filterwarnings("ignore") import datetime as dt import pandas as pd import numpy as np pd.options.mode.chained_assignment = None pd.set_option('chained_assignment', None) import plotly.express as px import plotly.graph_objects as go import dash_auth, dash from dash import d...
{"hexsha": "b6e0ce3a506cdca5b25e347da4c51ecee01aa8b6", "size": 17275, "ext": "py", "lang": "Python", "max_stars_repo_path": "Dashboard/app.py", "max_stars_repo_name": "briangodwinlim/Data-Science", "max_stars_repo_head_hexsha": "7e8992eb6121c4a2f3e2fefb43a4d2a2a3dbee60", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
data Vect : Nat -> Type -> Type where Nil : Vect Z a (::) : a -> Vect k a -> Vect (S k) a Show a => Show (Vect n a) where show xs = "[" ++ showV xs ++ "]" where showV : forall n . Vect n a -> String showV [] = "" showV [x] = show x showV (x :: xs) = show x ++ ", " ++ showV xs f...
{"hexsha": "0d116fca82b1deb9392ce33e36df7ffba6db5eff", "size": 739, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "tests/chez/chez005/Filter.idr", "max_stars_repo_name": "boxfire/rapid", "max_stars_repo_head_hexsha": "91f012caad854dc454cef0375b49bcf9e1af20c7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
[STATEMENT] lemma semilat_le_err_plus_Err [simp]: "\<lbrakk> x \<in> err A; semilat(err A, le r, f) \<rbrakk> \<Longrightarrow> x +_f Err = Err" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>x \<in> err A; semilat (err A, le r, f)\<rbrakk> \<Longrightarrow> x \<squnion>\<^bsub>f\<^esub> Err = Err [PROOF ...
{"llama_tokens": 205, "file": null, "length": 1}
#= This file is part of the replication code for: Hasenzagl, T., Pellegrino, F., Reichlin, L., & Ricco, G. (2020). A Model of the Fed's View on Inflation. Please cite the paper if you are using any part of the code for academic work (including, but not limited to, conference and peer-reviewed papers). =# function ex_b...
{"hexsha": "7f0d49b8ab3a89009cfab18f0373c1e6f4da5816", "size": 1025, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "code/Metropolis-Within-Gibbs/subroutines/extra/ex_blkdiag.jl", "max_stars_repo_name": "thasenzagl/replication-hasenzagl-et-al-2020", "max_stars_repo_head_hexsha": "86a873a77cc63f1f14309254997421b99...
\chapter{Introduction}% \label{chap:intro} \section{Motivation}% \label{sec:intro:motivation} Computer technology is one of the most influential inventions in human history and a central driving force behind innovation in the \nth{20} and early \nth{21} centuries. It was indispensable for several scientific and techn...
{"hexsha": "9f2a5cd40e2d9955a2f1bebad27e8078978b2e80", "size": 32423, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapter1-introduction.tex", "max_stars_repo_name": "abusse/phd-thesis", "max_stars_repo_head_hexsha": "b693b1d001925311151fc53fdcd687ace0b20cae", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_star...
\chapter{Introduction} \label{Introduction} Differential equations, ordinary or partial, allow modeling phenomena that evolve with respect to space and time. They are commonly used to describe the propagation of sound or heat and appear frequently in models related to electrostatics, electrodynamics, fluid dynamics, ...
{"hexsha": "39fd63679e32e9ca2493e79e869e2cce462fbe5c", "size": 6533, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/introduction/Introduction.tex", "max_stars_repo_name": "alanmatzumiya/Maestria", "max_stars_repo_head_hexsha": "c5e2a019312fb8f9bc193b04b07b7815e6ed4032", "max_stars_repo_licenses": ["MIT"], "m...