text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
r"""
Relative Number Fields
AUTHORS:
- William Stein (2004, 2005): initial version
- Steven Sivek (2006-05-12): added support for relative extensions
- William Stein (2007-09-04): major rewrite and documentation
- Robert Bradshaw (2008-10): specified embeddings into ambient fields
- Nick Alexander (2009-01): moderniz... | {"hexsha": "0a022049f02863a1c1d716e0986aa77d2d3e164d", "size": 98438, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage/rings/number_field/number_field_rel.py", "max_stars_repo_name": "UCD4IDS/sage", "max_stars_repo_head_hexsha": "43474c96d533fd396fe29fe0782d44dc7f5164f7", "max_stars_repo_licenses": ["BSL... |
/*
* MIT License
*
* Copyright (c) 2021 Toshinobu Hondo
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, ... | {"hexsha": "e9f7ca69638a5800afaaef3280a81da0b6f158c1", "size": 2190, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/pcam5c/pcam5c.hpp", "max_stars_repo_name": "qtplatz/pcam5c-tools", "max_stars_repo_head_hexsha": "0555f8a32b5d98346fc62b8b4699fb74d8c03817", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import warnings
from datetime import datetime
from typing import Tuple
import numpy as np
import pandas as pd
from dateutil.relativedelta import relativedelta
from minepy import MINE
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from ta.momentum import RSIIndicat... | {"hexsha": "a4d10816ee71b337240176a6ea761b5b4f94bb27", "size": 15244, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/preprocessor.py", "max_stars_repo_name": "napnel/UoA-thesis-s1260099", "max_stars_repo_head_hexsha": "dce954b8795c24dc8fbbacb8b7ebdfe101fc01c6", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
import torch
import torch.nn as nn
import torch.nn.functional as F
class double_conv(nn.Module):
'''(conv => BN => ReLU) * 2'''
def __init__(self, in_ch, out_ch):
super(double_conv, self).__init__()
self.conv = nn.Sequential(
nn.Conv2d(in_ch, out_ch, 3, padding=1),
nn.R... | {"hexsha": "0a7b8b894ae4573913d057721a79dc8dbe0c3f58", "size": 5456, "ext": "py", "lang": "Python", "max_stars_repo_path": "3Dface/u_net.py", "max_stars_repo_name": "ForrestPi/faceSwapProjects", "max_stars_repo_head_hexsha": "daf2649a2791a25aa541c4d6d3b7e1d6552be5d7", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
//
// visit_each_test.cpp
//
// Copyright 2014 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/visit_each.hpp>
#include <boost/core/lightweight_test.hpp>
#include <string>
struct... | {"hexsha": "d1fcc3cd2e010633c8c2bd27ea8a07dc691403b9", "size": 1045, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "console/src/boost_1_78_0/libs/core/test/visit_each_test.cpp", "max_stars_repo_name": "vany152/FilesHash", "max_stars_repo_head_hexsha": "39f282807b7f1abc56dac389e8259ee3bb557a8d", "max_stars_repo_li... |
!*****************************************************************************************
program linked_list_test
use linked_list_module
use blah_module
use key_module
implicit none
type(list) :: list_of_stuff
type(blah) :: stuff
type(blah),pointer :: s !! a pointer for re... | {"hexsha": "38361db29ea09de87a1f1fc38f775464b3e62a06", "size": 4510, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/linked_list_test.f90", "max_stars_repo_name": "jacobwilliams/flist", "max_stars_repo_head_hexsha": "6255b824d81b1f97aa48aaabe912b9af313dce49", "max_stars_repo_licenses": ["BSD-3-Clause"], ... |
from ctypes import sizeof
import multiprocessing
import threading
import socket
import time
from cupyx.distributed import _klv_utils
from cupyx.distributed import _store_actions
_DEFAULT_HOST = '127.0.0.1'
_DEFAULT_PORT = 13333
class ExceptionAwareProcess(multiprocessing.Process):
def __init__(self, *args, **k... | {"hexsha": "fad145c0f9975f773511783746214cff820d991b", "size": 4740, "ext": "py", "lang": "Python", "max_stars_repo_path": "cupyx/distributed/_store.py", "max_stars_repo_name": "twmht/cupy", "max_stars_repo_head_hexsha": "1f518ec72672ad35af59c4af9fd7243c785fdbce", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
\lab{Breadth-first Search}{Breadth-first Search}
\objective{
Shortest path problems are an important part of graph theory and network analysis.
Applications include finding the fastest way to drive between two points on a map, network routing, genealogy, automated circuit layout, and a variety of other important proble... | {"hexsha": "31747643ac21e2789581b936648ba11806eca30e", "size": 35135, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Volume2/BreadthFirstSearch/BreadthFirstSearch.tex", "max_stars_repo_name": "chrismmuir/Labs-1", "max_stars_repo_head_hexsha": "13c23611b90d73b0c2c7d275bce9808f829009f2", "max_stars_repo_licenses": ... |
# DV3D.jl
# Delaunay and Voronoi Tessellations
module DV3D
using GeometryTypes
using StaticArrays
include("predicates.jl")
include("tetrahedron.jl")
# TODO: include("dt.jl")
include("flips.jl")
# TODO: include("walk.jl")
# TODO: include("insertion.jl")
# What functions need exported for use?
#export
end
| {"hexsha": "8503480a3d1a9221f001bbc003fa30effe18d413", "size": 311, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/DV3D.jl", "max_stars_repo_name": "bdhuddleston/DV3D.jl", "max_stars_repo_head_hexsha": "bd671199864ae432621de028cb001d886131f3ce", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
#=
Annealed importance sampling (AIS) to estimate the partition function (and hence
the log-likelihood).
A nice explanation of AIS in general can be found in Goodfellow et al Deep Learning book.
Salakhutdinov et al (10.1145/1390156.1390266, http://www.cs.utoronto.ca/~rsalakhu/papers/bm.pdf)
discusses AIS for RBMs speci... | {"hexsha": "13c9590d796e6e1c1248c38f9b859d6b7dbf295e", "size": 7401, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ais.jl", "max_stars_repo_name": "cossio/RestrictedBoltzmannMachines.jl", "max_stars_repo_head_hexsha": "557193f64fcefc6ac504c43a3a683e0201024138", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import glob
import os
import pickle
from collections import OrderedDict
import numpy as np
from sklearn.ensemble import AdaBoostRegressor, GradientBoostingRegressor
from sklearn.metrics import mean_squared_error
from sklearn.svm import SVR
from skmultiflow.data import DataStream
from skmultiflow.drift_detection.adwin ... | {"hexsha": "3915294127cc4b93ba027bb199e9d60cfbc931ed", "size": 3802, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/model_evaluation.py", "max_stars_repo_name": "School-courses/covid19-forecast", "max_stars_repo_head_hexsha": "abdb350c1da6227c4da4fc4a23621933f8603dde", "max_stars_repo_licenses": ["MIT"]... |
from __future__ import annotations
from typing import List
import numpy as np
from psygnal import Signal as Psygnal
from qtpy.QtCore import QObject, Signal
from useq import MDAEvent
__all__ = [
"RamanSignaler",
"QRamanSignaler",
]
class RamanSignaler:
ramanSpectraReady = Psygnal(MDAEvent, np.ndarray, n... | {"hexsha": "6a0f21dead82cc9c41705c79e38cca52b23879ad", "size": 438, "ext": "py", "lang": "Python", "max_stars_repo_path": "raman_mda_engine/_events.py", "max_stars_repo_name": "ianhi/raman-mda-engine", "max_stars_repo_head_hexsha": "3514b261dd4739a6b71caeb6c9f447e43b9fd8a5", "max_stars_repo_licenses": ["BSD-3-Clause"],... |
#include "MetaObject/core.hpp"
#include "MetaObject/params/ParamMacros.hpp"
#include "MetaObject/params/TParamPtr.hpp"
#include "MetaObject/params/TPublisher.hpp"
#include "MetaObject/params/TSubscriberPtr.hpp"
#include "MetaObject/runtime_reflection.hpp"
#include "MetaObject/signals/TSignal.hpp"
#include "Met... | {"hexsha": "07298f8161df5a03bdedecd4dedf8665745ac9ee", "size": 7263, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "modules/params/tests/test_publisher.cpp", "max_stars_repo_name": "dtmoodie/MetaObject", "max_stars_repo_head_hexsha": "8238d143d578ff9c0c6506e7e627eca15e42369e", "max_stars_repo_licenses": ["MIT"], ... |
from pathlib import Path
import json
import numpy as np
class KodoTemplate:
def __init__(self):
self.X = None
self.y = None
self.info = None
def process(self):
raise NotImplementedError
def create_model(self):
raise NotImplementedError
def load_info... | {"hexsha": "530f002cd3161088f1bba387e5777455f260a975", "size": 545, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/template.py", "max_stars_repo_name": "DannMensah/Project-Kodo", "max_stars_repo_head_hexsha": "2bc0e8d1684d4c31d5979eb9bc72617b37cc6ccb", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
module setup_config_mod
use constants_mod
!! -------------------------------------------------------------------------- !!
!! !! Fraschetti (2010)
!! real(dp), parameter :: blast_energy = 8.402658900764704e-05
!! real(dp), parameter :: ejecta_mass = 5.0
!! real(dp), parameter :: dens0 = 0.010305080050689041
!! real(... | {"hexsha": "73d70eb23b5f948f9b401843abd14e549b5e1423", "size": 2711, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "source/setups/euler/3d/supernova/setup_config_mod.f90", "max_stars_repo_name": "jmark/nemo", "max_stars_repo_head_hexsha": "cf8a6a8bed5c54626f5e300c701b9c278fd5e0cd", "max_stars_repo_licenses": ... |
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | {"hexsha": "e6df5e8c5e9b78f1e1216cd5269faec87414f24c", "size": 1009, "ext": "py", "lang": "Python", "max_stars_repo_path": "common/utils.py", "max_stars_repo_name": "ng390/selfstudy-adversarial-robustness", "max_stars_repo_head_hexsha": "e225142564793ba7799d7e76727928f72cfb769e", "max_stars_repo_licenses": ["Apache-2.0... |
import numpy as np
import matplotlib.pyplot as plt
import sys
filename = sys.argv[1]
xy = np.loadtxt(filename)
coef = np.polyfit(xy[:,0], xy[:,1], 2)
x = np.linspace(-6, 6, 35)
y_fit = np.polyval(coef, x)
plt.plot(xy[:,0], xy[:,1], 'o', markersize=14)
plt.plot(x, y_fit, linewidth=2)
plt.show()
| {"hexsha": "12f7d797615c4c4e4fc3d4b3678c1d4c2a10b6ca", "size": 298, "ext": "py", "lang": "Python", "max_stars_repo_path": "numpy/polynomials/solution/fit.py", "max_stars_repo_name": "kahilah/hpc-python", "max_stars_repo_head_hexsha": "5d2efa08076ed2706c81ca255c7e4574c937557c", "max_stars_repo_licenses": ["MIT"], "max_s... |
function display(x)
%DISP Display TT/MPS tensor as a tensor network
%
% TTeMPS Toolbox.
% Michael Steinlechner, 2013-2016
% Questions and contact: michael.steinlechner@epfl.ch
% BSD 2-clause license, see LICENSE.txt
disp( x, inputname(1));
end
| {"author": "NicolasBoumal", "repo": "manopt", "sha": "b8b54a6af8b965f7ae572972ba0d15787427744b", "save_path": "github-repos/MATLAB/NicolasBoumal-manopt", "path": "github-repos/MATLAB/NicolasBoumal-manopt/manopt-b8b54a6af8b965f7ae572972ba0d15787427744b/manopt/manifolds/ttfixedrank/TTeMPS_1.1/@TTeMPS_op_laplace/display.m... |
import numpy as np
class ClassificationTree:
def gini_index(self, groups, classes):
"""
Calculates the gini index for the classes and the groups
"""
# Count the total instances in the group
n_instances = float(sum([len(group) for group in groups]))
gini = 0.0
for group in groups:
size = float(len(g... | {"hexsha": "d5e41c2a8cc298c1b9c9d9b6dee95cd57a2c9cae", "size": 3299, "ext": "py", "lang": "Python", "max_stars_repo_path": "cart.py", "max_stars_repo_name": "Cartmanishere/decision-tree", "max_stars_repo_head_hexsha": "544f261f26e5ec6ad59e1627d2274e74cbd3d0a9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | {"hexsha": "431a0366645617bbf78edb49d5b9d3474111fb55", "size": 10412, "ext": "py", "lang": "Python", "max_stars_repo_path": "mannequinchallenge/loaders/image_folder.py", "max_stars_repo_name": "plarr2020-team1/mannequinchallenge", "max_stars_repo_head_hexsha": "4aff68aedad8619a2ec557f9162cc9692181318c", "max_stars_repo... |
\documentclass[twocolumn]{article}
\usepackage{amsmath,cite}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{url}
\usepackage[framed,numbered,autolinebreaks,useliterate]{../common/mcode}
\graphicspath{{figures/}}
\title{SCATNET Architecture Document}
\begin{document}
\maketitle
\section{Filters}
\subse... | {"hexsha": "26f63201719df269ba172436666237e0996d9a0b", "size": 22625, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "scatnet-0.2a/doc/arch/arch.tex", "max_stars_repo_name": "sixin-zh/kymatio_wph", "max_stars_repo_head_hexsha": "237c0d2009766cf83b2145420a14d3c6e90dc983", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
from typing import Optional, Tuple, List, Union
import pandas as pd
import numpy as np
import seaborn as sns
import sklearn
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
from sklearn.preprocessing import StandardScaler
import plotly.graph_objs as go
import... | {"hexsha": "c3f3330c5800329b4b49d22205e9c83ffb7085e7", "size": 18066, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_describe/core/clustering.py", "max_stars_repo_name": "truongc2/data-describe", "max_stars_repo_head_hexsha": "ed64a34587c7997e0c8a67938c2b9de996aaac11", "max_stars_repo_licenses": ["Apache-2... |
import arkouda as ak
import numpy as np
import time
import sys
def create_blocks_scalar(row_size,size):
out = 0
#mxm_result = ak.zeros(1, dtype=np.int64)
for r in range(row_size):
for c in range(row_size):
a = ak.randint(0,10,size)
b = ak.randint(0,10,size)
mxm_... | {"hexsha": "19d093a39bac51051af2afa48fc9e5c3bd2693f4", "size": 652, "ext": "py", "lang": "Python", "max_stars_repo_path": "optimizations/triangle_count/creating_test.py", "max_stars_repo_name": "andrejjakovljevic/arkouda-optimizations", "max_stars_repo_head_hexsha": "233ea5b970cea89c853186a2f297b4bdf11d836d", "max_star... |
% MatrixUser, a multi-dimensional matrix analysis software package
% https://sourceforge.net/projects/matrixuser/
%
% The MatrixUser is a matrix analysis software package developed under Matlab
% Graphical User Interface Developing Environment (GUIDE). It features
% functions that are designed and optimized for worki... | {"author": "leoliuf", "repo": "MRiLab", "sha": "5cdcf1f7b67759700685d3a26ffeb70e55325567", "save_path": "github-repos/MATLAB/leoliuf-MRiLab", "path": "github-repos/MATLAB/leoliuf-MRiLab/MRiLab-5cdcf1f7b67759700685d3a26ffeb70e55325567/External/MatrixUser2.2/Src/Main/MU_Matrix_Display_3Plane.m"} |
'''
.. codeauthor:: David Zwicker <david.zwicker@ds.mpg.de>
'''
import numpy as np
import pytest
from ..vectorial import VectorField
from ..base import FieldBase
from ...grids import UnitGrid, CartesianGrid
from ...tools.misc import module_available
def test_vectors():
""" test some vector fields """
grid... | {"hexsha": "10e7a394e0ad63225ffcd736d1c3400927550c1d", "size": 5597, "ext": "py", "lang": "Python", "max_stars_repo_path": "pde/fields/tests/test_vectorial.py", "max_stars_repo_name": "noah-ziethen/py-pde", "max_stars_repo_head_hexsha": "b88e86439290c31284a4ac665a8e9ff34d08b494", "max_stars_repo_licenses": ["MIT"], "ma... |
import argparse
import os
import sys
import subprocess
import time
from keras.models import Model
from keras.layers import Dense,Input,BatchNormalization,Softmax,LSTM,Activation, GRU
from keras.layers import TimeDistributed, Bidirectional, Dropout, Lambda, Masking, Concatenate
import keras.utils
import keras.backend as... | {"hexsha": "3101df07c45c0abc7410dbc561e5b249b60b9870", "size": 10593, "ext": "py", "lang": "Python", "max_stars_repo_path": "multi_lc_lstm.py", "max_stars_repo_name": "akio-kobayashi/lc_lstm", "max_stars_repo_head_hexsha": "c5367518ebf56d13a29794d90061fdfb06677e3e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
# NLP written by GAMS Convert at 04/21/18 13:53:09
#
# Equation counts
# Total E G L N X C B
# 325 1 0 324 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | {"hexsha": "98a2674f6bf0f5e3f31ffc07255a0e57a2d656b7", "size": 32249, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/examples/minlplib/polygon25.py", "max_stars_repo_name": "ouyang-w-19/decogo", "max_stars_repo_head_hexsha": "52546480e49776251d4d27856e18a46f40c824a1", "max_stars_repo_licenses": ["MIT"], "... |
#include <k4a/k4a.hpp>
#include <iostream>
#include <vector>
#include <array>
#include <Eigen/Dense>
#include <Eigen/Core>
#include <opencv2/core.hpp>
#include <opencv2/core/eigen.hpp>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/registration/icp.h>
#include <pcl/filters/voxel_grid.h>
#in... | {"hexsha": "ce908d1d735e7bf064f04c44e0f4c7e80b15c201", "size": 5536, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "utils/pcl_viewer/main.cpp", "max_stars_repo_name": "LuyaooChen/k4a_capture", "max_stars_repo_head_hexsha": "275b34c42f6bf0c5bcad0618d569ca9c0805311e", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
/*
* 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 ma... | {"hexsha": "2ea0bca0f40de8626cb8cbc9f8db310e8dd44dc1", "size": 30879, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "lib/cpp/src/thrift/protocol/TPlistProtocol.cpp", "max_stars_repo_name": "xman1979/thrift-cpp-simplejson-plist-support", "max_stars_repo_head_hexsha": "8358160c1078e7a3f711b3fc4e091d878149a136", "ma... |
import torch.utils.data as data
import numpy as np
import os
import json
import cv2
from PIL import Image
import data_utils
from augmentation import crop_or_padding_to_fixed_size, rotate_instance, crop_resize_instance_v1
import random
import torch
def resize_binary_map(binary_map, size):
binary_map_tmp = []
b... | {"hexsha": "ed6073fa0542ed9d337c3706f2cde6fae42a1d06", "size": 11001, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_loader/stereobj1m_dataset.py", "max_stars_repo_name": "xingyul/stereobj-1m", "max_stars_repo_head_hexsha": "aaff28220d73595e6c72d867fa7900bdc40d6847", "max_stars_repo_licenses": ["MIT"], "ma... |
import uuid
import numpy as np
def tei(tagname):
return "{{http://www.tei-c.org/ns/1.0}}{}".format(tagname)
class Document(object):
file_name = None
content = None
groups = None
def __init__(self, file_name):
self.file_name = file_name
self.content = ""
self.groups = []
... | {"hexsha": "63df90a0c21223c2e893087648fd624361e82e6d", "size": 1814, "ext": "py", "lang": "Python", "max_stars_repo_path": "berliner_intellektuelle_preprocessing/base.py", "max_stars_repo_name": "millawell/ibiparser", "max_stars_repo_head_hexsha": "70ce1022e396a1fbe1fb2133fcd7b0277863bd6e", "max_stars_repo_licenses": [... |
\section{Crash Recovery}
\label{sec-related-crash}
Designing systems to recover safely after crashes has been the focus
of systems researchers for many years. We first describe how databases
provided crash consistency, and then explain how file systems and
applications built on top of these techniques to build crash
c... | {"hexsha": "d2e90dc4f902e81400a408db338d1c908dca708b", "size": 1126, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "lanyue_thesis/related/crash.tex", "max_stars_repo_name": "keqhe/phd_thesis", "max_stars_repo_head_hexsha": "770fc637f9b7d908f349bbbfa112cbc17d898be3", "max_stars_repo_licenses": ["Unlicense"], "max_... |
#---------------------------------------
# Deep learning for classification for contrast CT;
# Transfer learning using Google Inception V3;
#-------------------------------------------------------------------------------------------
import os
import numpy as np
import pandas as pd
import seaborn as sn
import matplotli... | {"hexsha": "1e08e73385bce99738a812b4118f900726d9a053", "size": 3071, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/go_model/exval_model.py", "max_stars_repo_name": "xmuyzz/IVContrast", "max_stars_repo_head_hexsha": "f3100e54f1808e1a796acd97ef5d23d0a2fd4f6c", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
*=======================================================================
*
* WCSLIB 4.24 - an implementation of the FITS WCS standard.
* Copyright (C) 1995-2014, Mark Calabretta
*
* This file is part of WCSLIB.
*
* WCSLIB is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser Gen... | {"hexsha": "3a8d1670ff54f363a089beafbb76b12933be71c9", "size": 11347, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/wcslib-4.24/Fortran/test/tcel1.f", "max_stars_repo_name": "kapteyn-astro/kapteyn", "max_stars_repo_head_hexsha": "f12332cfd567c7c0da40628dcfc7b297971ee636", "max_stars_repo_licenses": ["BSD-3... |
import tensorflow as tf
import numpy as np
from instance_loader import InstanceLoader
import pprint, sys, model, random, util, time, metrics, os
import training as tr
if __name__ == "__main__":
embedding_size = 64
batch_size = 32
time_steps = 32
centralities = sorted( sys.argv[1:] )
if len( centralities )... | {"hexsha": "e5cd16d1884b1afcc3502be8bbaf73f36243dcbd", "size": 5372, "ext": "py", "lang": "Python", "max_stars_repo_path": "centrality-compare/runs/RN/test_real.py", "max_stars_repo_name": "phcavelar/centrality-multitask", "max_stars_repo_head_hexsha": "2574a7408ead1398a93dd6054963cadb548a51ea", "max_stars_repo_license... |
\chapter{Psychophysiological Interactions (PPI)}
\section{Theoretical background}
Psychophysiologic interactions (PPI) model the response in one cortical area as the influence of another region and its interaction with an experimental treatment (sensory stimulus, task, etc.) \cite{ppi}. This technique is one way of e... | {"hexsha": "3720ce9fad5d4d80ed060d6cae19c5f359d7dbf5", "size": 21206, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "lib/spm5/man/ppi/ppi.tex", "max_stars_repo_name": "awangga/braindecoding", "max_stars_repo_head_hexsha": "97128a8346263c81c9ccd606cfa54b35dacd6ca1", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
#!/usr/bin/env python3
"""Pooling"""
import numpy as np
def pool(images, kernel_shape, stride, mode='max'):
"""function that performs pooling on images
Args:
images : is a numpy.ndarray with shape (m, h, w, c)
containing multiple grayscale images
m : is the number of imag... | {"hexsha": "120989869d1ace7147750cc39e560a5f6a3b8ae5", "size": 2021, "ext": "py", "lang": "Python", "max_stars_repo_path": "math/0x04-convolutions_and_pooling/6-pool.py", "max_stars_repo_name": "cbarros7/holbertonschool-machine_learning", "max_stars_repo_head_hexsha": "1edb4c253441f6319b86c9c590d1e7dd3fc32bf4", "max_st... |
import pandas as pd
import numpy as np
def test_index_equal(dfs):
df = dfs[0]
return all(np.array_equal(df.index, _df.index) for _df in dfs[1:])
def test_index_name_equal(dfs):
return len(set(df.index.name for df in dfs)) == 1
def test_columns_equal(dfs):
df = dfs[0]
return all(np.array_equal(... | {"hexsha": "4bdebf60ffa57f098fa518d5a0805f8cb3f193fa", "size": 627, "ext": "py", "lang": "Python", "max_stars_repo_path": "runpandarun/combine.py", "max_stars_repo_name": "simonwoerpel/runpandarun", "max_stars_repo_head_hexsha": "6ea5f4c7fdda92775ed87c8930442a605d005551", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.10.3
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# + nbsphinx="hidden"
# %matpl... | {"hexsha": "89c0ad610477614b6e23f031fd4c0713948d809c", "size": 13881, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/tutorials/first.py", "max_stars_repo_name": "exoplanet-dev/celerite2", "max_stars_repo_head_hexsha": "6eb1c31201f97f67e19de47a456046ee84d2ef3c", "max_stars_repo_licenses": ["MIT"], "max_star... |
import torch.nn as nn
import torch
from utils.ssd import make_vgg, make_extras, L2Norm, make_loc_conf, DBox
# import stuff
import os
import numpy as np
import time
import pandas as pd
import torch
import torch.utils.data as data
from itertools import product as product
import torch
import torch.nn as nn
import torch... | {"hexsha": "6ed6f568bf723bb1332267a89a97941e7c1740ae", "size": 9543, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/feature_piramid_network.py", "max_stars_repo_name": "kentaroy47/efficientdet.pytorch", "max_stars_repo_head_hexsha": "1df8f5dc4727cc6450a56b5cc75c157c62b3e51d", "max_stars_repo_licenses": ["... |
#!/usr/bin/env python
from datetime import date
import pandas as pd
import numpy as np
import pyflux as pf
import click
import json
import uuid
import os
from SPARQLWrapper import SPARQLWrapper, JSON
GRAPHDB_CLIENT = SPARQLWrapper("http://ec2-3-120-140-142.eu-central-1.compute.amazonaws.com:7200//repositories/crys/s... | {"hexsha": "f022d043f60267f9307d56d980b82a7c60dfbce9", "size": 4556, "ext": "py", "lang": "Python", "max_stars_repo_path": "predictions/predict.py", "max_stars_repo_name": "wade-crys/crys-backend", "max_stars_repo_head_hexsha": "521b1f99f9990c4dcc6296ab2145015847305fc2", "max_stars_repo_licenses": ["Apache-2.0"], "max_... |
"""
Janis Jacob controller (custom hardware, probably not applicable to other devices).
"""
import socket
import struct
import collections
import contextlib
import numpy as np
class JacobServer(object):
def __init__(self, addr="10.10.1.17", port=5557, single_use_socket=False):
object.__init__(self)
... | {"hexsha": "f3c862bad0f339ac68eaa815f767f95d770369e1", "size": 6932, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylablib/aux_libs/devices/Janis.py", "max_stars_repo_name": "AlexShkarin/pyLabLib-v0", "max_stars_repo_head_hexsha": "1c3c59d4bcbea4a16eee916033972ee13a7d1af6", "max_stars_repo_licenses": ["MIT"],... |
###############################################################################
# PyDial: Multi-domain Statistical Spoken Dialogue System Software
###############################################################################
#
# Copyright 2015 - 2018
# Cambridge University Engineering Department Dialogue Systems Grou... | {"hexsha": "677ce7e5e1df69497b903ac68b55052f529e1f01", "size": 21565, "ext": "py", "lang": "Python", "max_stars_repo_path": "policy/FeudalPolicy.py", "max_stars_repo_name": "Dagu9/Reinforcement-learning-SGD", "max_stars_repo_head_hexsha": "eb4a2546d6c99917b33e8cc4c210709e7d4cc15e", "max_stars_repo_licenses": ["Apache-2... |
from __future__ import division
import numpy
from PyAstronomy.pyaC import pyaErrors as PE
from PyAstronomy import pyasl
class _ZList:
"""
Calculate the projected distance between the centers of star and planet.
The resulting values will be stored in the `_zlist` attribute. Additionally,
the indices b... | {"hexsha": "1b6afc9787748faaf0da74ebb4db89778d32972b", "size": 4241, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/modelSuite/XTran/circKepZList.py", "max_stars_repo_name": "mirofedurco/PyAstronomy", "max_stars_repo_head_hexsha": "b0e5806a18bde647654e6c9de323327803722864", "max_stars_repo_licenses": ["MIT"... |
import numpy as np
import multiprocessing as mp
import tensorflow as tf
import json
import base64
import ctypes
import time
import socket
def process_handler(model, output_file, *args):
live_process = []
manager = mp.Manager()
lifetime_end = manager.Value(ctypes.c_char_p, False)
input_image_queue, out... | {"hexsha": "7648592cbe6da0b34f2e1f81f5e93a54f58aabf6", "size": 3153, "ext": "py", "lang": "Python", "max_stars_repo_path": "serve.py", "max_stars_repo_name": "MeyerAdrian/pix2pix-tensorflow", "max_stars_repo_head_hexsha": "70bb2c817ac1bad2df4ff858fd25a209ca09eb83", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
# Factorization Machine Classifier
# Copyright : yoonkt200@gmail.com
# Apache License 2.0
# =============================================================================
import time
import numpy as np
from sklearn.metrics import roc_auc_score
class FMClassifier:
"""
This Class is implementation of this paper... | {"hexsha": "90bf50035b36d65be7e7d8992933353f8265b564", "size": 8418, "ext": "py", "lang": "Python", "max_stars_repo_path": "ranker/factorization_machine.py", "max_stars_repo_name": "yoonkt200/recommender-system", "max_stars_repo_head_hexsha": "51b44d9d8a83fb8a2d245e81bb8ed3a20de6d79a", "max_stars_repo_licenses": ["MIT"... |
[STATEMENT]
lemma is_mset_setD[dest]: "is_mset_set X \<Longrightarrow> x \<in># X \<Longrightarrow> count X x = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>distinct_mset X; x \<in># X\<rbrakk> \<Longrightarrow> count X x = 1
[PROOF STEP]
unfolding is_mset_set_def
[PROOF STATE]
proof (prove)
goal (1 su... | {"llama_tokens": 195, "file": "Nested_Multisets_Ordinals_Duplicate_Free_Multiset", "length": 2} |
#!/usr/bin/env python
#Original code from swin cookies-n-code; now updated to work on DarkSage output
#To run it with csv:
#bokeh serve --allow-websocket-origin=localhost:3112 --port=3112 --port=3112 GUI_cookiesncode.py --args -csv computers.csv
#To run it directly with DarkSage output
#bokeh serve --allow-websocket-... | {"hexsha": "615eb09cf97bbf9d08a89603c4fc312111822238", "size": 21000, "ext": "py", "lang": "Python", "max_stars_repo_path": "GUI_DarkSage.py", "max_stars_repo_name": "rdzudzar/simulation_interactive", "max_stars_repo_head_hexsha": "ad7f435a99800a211444c5d46fb068658e43cf23", "max_stars_repo_licenses": ["MIT"], "max_star... |
from typing import List, Tuple
import numpy as np
from deepchem.utils.typing import RDKitAtom, RDKitBond, RDKitMol
from deepchem.feat.graph_data import GraphData
from deepchem.feat.base_classes import MolecularFeaturizer
from deepchem.utils.molecule_feature_utils import get_atom_type_one_hot
from deepchem.utils.molecu... | {"hexsha": "162ff92c9376d2cf1bbe45a3dc81d5e5bab7952b", "size": 8374, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepchem/feat/molecule_featurizers/mol_graph_conv_featurizer.py", "max_stars_repo_name": "MiloszGrabski/deepchem", "max_stars_repo_head_hexsha": "1af203724db0ecebedf87967d1009fd8973da2d6", "max_st... |
#include "utility.hpp"
#include <boost/bimap/unordered_set_of.hpp>
#include <boost/optional.hpp>
#include <iostream>
#include <libjose/jwa_ec.hpp>
#include <libjose/jwa_oct.hpp>
#include <libjose/jwa_rsa.hpp>
#include <libjose/jwk.hpp>
#include <libjose/jws.hpp>
#include <rapidjson/writer.h>
namespace JOSE {
namespace... | {"hexsha": "11e90521ad8b60b9626aa78f94598c904001e56d", "size": 11920, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/jws.cpp", "max_stars_repo_name": "ibmibmibm/libjose", "max_stars_repo_head_hexsha": "1a62bab5df60cc20d06b8c2a8e08349f8c34b8b5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2.0, "max_... |
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TASKS_DETAIL_BIND_PROCESSOR_WINDOWS_H
#define BOOST_TASKS_DETAIL_BIND_PROCESSOR_WINDOWS_H
ex... | {"hexsha": "4844d07da4197cd47d926f53006b457762e07fbc", "size": 1331, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost.task-0.4.2/boost/task/detail/bind_processor_windows.hpp", "max_stars_repo_name": "rikygege/Hornet", "max_stars_repo_head_hexsha": "8b8ebe70fbc6391f361d98b8960dfdeeca0b8ebd", "max_stars_rep... |
""" Define a class that calculates statistics for multiple sequence alignments, as well as a class that helps fit a
maximum entropy model to data. """
import numpy as np
from scipy import sparse
from .binary import binary_index_map
# noinspection SpellCheckingInspection
class Statistics(object):
def __init__(s... | {"hexsha": "ca96c6c4bc11b5444c0b585ad8a133e507cdba4d", "size": 11123, "ext": "py", "lang": "Python", "max_stars_repo_path": "statistics.py", "max_stars_repo_name": "ttesileanu/PyMulticov", "max_stars_repo_head_hexsha": "03efb92b7391f60e6d1974709c67c7770eede10d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
(**********************************************************************
Enriched monads
In this file, we define the basic notions for enriched monads. More
specifically, we define enrichments of monads and we define enriched
monads.
Contents
1. Enrichments of monads
2. Enriched monads
**********************... | {"author": "UniMath", "repo": "UniMath", "sha": "7de5cc98a7f6718af63a429ea88d80411eca2977", "save_path": "github-repos/coq/UniMath-UniMath", "path": "github-repos/coq/UniMath-UniMath/UniMath-7de5cc98a7f6718af63a429ea88d80411eca2977/UniMath/CategoryTheory/EnrichedCats/EnrichmentMonad.v"} |
#
# This file is part of the PyMeasure package.
#
# Copyright (c) 2013-2021 PyMeasure Developers
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limit... | {"hexsha": "135d89b422cb436cbd4e9c7f2775545e8f93f806", "size": 78530, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymeasure/instruments/agilent/agilentB1500.py", "max_stars_repo_name": "wehlgrundspitze/pymeasure", "max_stars_repo_head_hexsha": "ae06b961d533bd5ff188462c6bc609d6457a4c9b", "max_stars_repo_licen... |
# -*- coding: utf-8 -*-
# Author: Arthur Imbert <arthur.imbert.pro@gmail.com>
# License: BSD 3 clause
"""
Functions to model spots by fitting gaussian parameters.
"""
import warnings
import numpy as np
import bigfish.stack as stack
from scipy.special import erf
from scipy.optimize import curve_fit
# ### Referenc... | {"hexsha": "542c6cf2bc62921b4016dbb57ee803cadbeda2fa", "size": 49430, "ext": "py", "lang": "Python", "max_stars_repo_path": "bigfish/detection/spot_modeling.py", "max_stars_repo_name": "4DNucleome/big-fish", "max_stars_repo_head_hexsha": "5512b6e3274872793ef4365a6dc423c72add91f9", "max_stars_repo_licenses": ["BSD-3-Cla... |
import numpy as np
import pybullet as p
import time
import matplotlib.pyplot as plt
from cep.envs import Tiago_LeftParallelHand_Base
from cep.cep_models import cep_model_lefthandBase_taskgotoAndPathplan
import torch
from mat_animation import Plotting
joint_limit_buffers = 0.03
joint_limits = np.array([2.5, 2.5, 2.75,... | {"hexsha": "1f2299d514a49c36a783801922ca1bc802e966e7", "size": 8388, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/darias_energy_control/_test_tiago_lefthand_base_taskgotoAndpathplan.py", "max_stars_repo_name": "hjw-1014/Multi-Objective-Reactive-Motion-Planning-in-Mobile-Manipulators", "max_stars_repo_... |
#!/usr/bin/env python
from causalprob import CausalProb
from inference.training import train
from tools.structures import unpack
import jax.numpy as jnp
import numpy as np
import matplotlib.pyplot as plt
import time
if __name__ == '__main__':
dim = 1
n_obs = 1000
n_samples = 100000
from models.linea... | {"hexsha": "7c2888ca98eea11e17e004f4640a2b6563e145e9", "size": 1624, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_training.py", "max_stars_repo_name": "jimimvp/CausalProb", "max_stars_repo_head_hexsha": "900527725ad43eac258df2b16ef93fd1643deb3a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "... |
import tqdm
import numpy as np
import matplotlib.pyplot as plt
from typing import List, Tuple
from rl.agents.bandit import BanditAgent
from rl.environments.bandit import BanditEnvironment
class BanditExperiment:
"""
Args:
environment (BanditEnvironment): the bandit environment.
n_runs (int): ... | {"hexsha": "3a45bf0c243311499307e8634232fa693590cdca", "size": 1746, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl/experiments/bandit.py", "max_stars_repo_name": "dksifoua/Reinforcement-Learning", "max_stars_repo_head_hexsha": "91d63c5c60b6bd98da2d481c02061d75becaea5c", "max_stars_repo_licenses": ["Apache-2... |
import torchvision.models as models
import torch.nn as nn
from torch import optim
from torch.optim import lr_scheduler
import torch
from torch import cat
import sys
sys.path.append('Utils')
import numpy as np
'''
Jigsaw based model pre-trained with imagenet to be used as the base for Rotation SSL task
Based on contex... | {"hexsha": "ee03a739469805045e2fcbc5171c679266d11279", "size": 2325, "ext": "py", "lang": "Python", "max_stars_repo_path": "SS_pretrain/Network.py", "max_stars_repo_name": "kristinakupf/Histo_StrengthInDiversity", "max_stars_repo_head_hexsha": "1c7f6156f5a7504c03f66881301bbca264789f7e", "max_stars_repo_licenses": ["ECL... |
% This file contains the content for the Scope
\cleardoublepage
\numberedformat
\chapter{Scope and audience} % Do not modify section title
%% Modify below this line %%
The procedures described in this guide are appropriate for the creation of Input Device Transforms (IDTs) for digital still cameras or digital motion... | {"hexsha": "7ccabd13c1729e3b9377349dcaabfac602c3434e", "size": 1524, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "documents/LaTeX/P-2013-001/scope.tex", "max_stars_repo_name": "KelSolaar/aces-dev", "max_stars_repo_head_hexsha": "76ea982a988d278dd12b563602771f46a5da3b83", "max_stars_repo_licenses": ["AMPAS"], "m... |
subroutine TIMCON ( buff, &
time, &
lout )
use IO, only : buffh
implicit none
!-----------------------------------------------------------------------
! ... Dummy arguments
!------------------------------------------------------------------... | {"hexsha": "00d9a4641670785799419221425d23600345e8b5", "size": 30111, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "components/eam/chem_proc/src/cam_chempp/mozpp.subs.f", "max_stars_repo_name": "Fa-Li/E3SM", "max_stars_repo_head_hexsha": "a91995093ec6fc0dd6e50114f3c70b5fb64de0f0", "max_stars_repo_licenses": ["... |
import os
from os.path import join
import astropy.io.fits as ft
import numpy as np
import imageio
dataDir = 'D:\MeteorDataBase\ServerData\AdditionalData\mldataset\\files\ConfirmedFiles'
labelsDir = 'D:\MeteorDataBase\ServerData'
tp_new = 'new_meteors.txt'
fp_new = 'new_non_meteors.txt'
finalDir = 'C:\work_dir\meteorD... | {"hexsha": "2f7a408a84b0368deafba9538220381235c6ca13", "size": 1780, "ext": "py", "lang": "Python", "max_stars_repo_path": "Data/createExtraDataSet.py", "max_stars_repo_name": "ibrahimoa/meteor_classification", "max_stars_repo_head_hexsha": "4f6267944562f81546bf5fd5e7a5f568bd2e24a5", "max_stars_repo_licenses": ["CC0-1.... |
import argparse
import torch
import os
from solver import Solver
###############################################################################
#
# hyperparameters
#
parser = argparse.ArgumentParser()
parser.add_argument( '--nsamps_q',
type=int, default=50,
help='# of samples from variational... | {"hexsha": "72bb04ac7cfd424a9413e61700655865938cfe4d", "size": 5421, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/main4.py", "max_stars_repo_name": "seqam-lab/GPDA", "max_stars_repo_head_hexsha": "1c7b2462f41b8eeb905f0909ff5f59fd0ba94e48", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 23, "max_st... |
# -*- coding: utf-8 -*-
"""
Generators for geometric graphs.
"""
# Copyright (C) 2004-2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
from __future__ import print_function
__author__ = "\... | {"hexsha": "53cd337aad7eefeff9baba51c4f08ba7ccce5aee", "size": 11846, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/prism-fruit/Games-DQL/examples/games/car/networkx/generators/geometric.py", "max_stars_repo_name": "kushgrover/apt-vs-dift", "max_stars_repo_head_hexsha": "250f64e6c442f6018cab65ec6979d9568a8... |
#include <functional>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/common/common.hh>
#include <boost/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <ros/callback_queue.h>
#include <ros/subscribe_options.h>
#include <ignition/math.hh>
#include <ignition/math/Vector3.hh>
#i... | {"hexsha": "7eae05d68889aed8da9012d8d15a055167285990", "size": 4675, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/uav_plugins/src/control_plugin.cpp", "max_stars_repo_name": "fdcl-gwu/uav_simulator", "max_stars_repo_head_hexsha": "a31855babfe633ae326ecb36c4ff714066cdb269", "max_stars_repo_licenses": ["MIT"]... |
library(tidyverse)
#get folder directory
folder <- dirname(rstudioapi::getSourceEditorContext()$path)
data <- read.csv(file.path(folder, 'data_inputs', 'whole_database_raw.csv'))
names(data)[names(data) == 'Country'] <- 'country'
data <- data[(data$year > 2005),]
data <- select(data, year, country, Price.Paid..USD... | {"hexsha": "1956cc3c8b013f8e3e817b12a0c098a1bed70989", "size": 6404, "ext": "r", "lang": "R", "max_stars_repo_path": "vis/spectrum/process.r", "max_stars_repo_name": "edwardoughton/pytal", "max_stars_repo_head_hexsha": "69e688ebfb3f7b64a4eff60cf3603ea189c9afdf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3,... |
"""
Classifies whether next month sales are 0/20
"""
import gc
from tqdm import tqdm_notebook
import numpy as np
import pandas as pd
from catboost import CatBoostClassifier
import matplotlib.pyplot as plt
def plot_importance(model):
importances = model.get_feature_importance(prettified=True)
x = np.array(list... | {"hexsha": "b9379893b8cc2fbfa20a96819182291b91b8b4c4", "size": 5470, "ext": "py", "lang": "Python", "max_stars_repo_path": "sales_prediction/extreme_sales_classifier.py", "max_stars_repo_name": "ashesh-0/kaggle_competitions", "max_stars_repo_head_hexsha": "58e927971b6ee67583a76a5ac821430a8d0bc31a", "max_stars_repo_lice... |
// Copyright (c) 2001-2011 Joel de Guzman
// Copyright (c) 2001-2019 Hartmut Kaiser
//
// 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)
#if !defined(PHYLANX_AST_PARSER_EXPRESSION_DEF_HPP)
#define PHYLANX_AST_PAR... | {"hexsha": "d55901031376c933bed8da770262acebe5e2adaf", "size": 7929, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "phylanx/ast/parser/expression_def.hpp", "max_stars_repo_name": "NanmiaoWu/phylanx", "max_stars_repo_head_hexsha": "295b5f82cc39925a0d53e77ba3b6d02a65204535", "max_stars_repo_licenses": ["BSL-1.0"], ... |
#################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021
# by the softwar... | {"hexsha": "9a9c1c25e085d700da8641f3c20566aba0cdf116", "size": 5259, "ext": "py", "lang": "Python", "max_stars_repo_path": "idaes/surrogate/alamopy_depr/almpywriter.py", "max_stars_repo_name": "eslickj/idaes-pse", "max_stars_repo_head_hexsha": "328ed07ffb0b4d98c03e972675ea32c41dd2531a", "max_stars_repo_licenses": ["RSA... |
\documentclass{article}
\usepackage[utf8]{inputenc}
\title{Problem Set 8}
\author{Mason Ross Hayes}
\date{23 March 2020}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
\maketitle
\section{Results}
All relevant questions in PS8 should be answered implicitly by the following tabl... | {"hexsha": "3a51b01a2e44630fdf9761719a2b83787f426343", "size": 2487, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ProblemSets/PS8/PS8_Hayes.tex", "max_stars_repo_name": "masonrhayes/DScourseS20", "max_stars_repo_head_hexsha": "d3e9d8d5ca60835b586e6604aa74e3c158a06038", "max_stars_repo_licenses": ["MIT"], "max_s... |
import tensorflow as tf
import numpy as np
import os
def make_mat(path1):
"""Read folder paths to a list"""
Data_folder = sorted(os.listdir(path1))
Data_path_mat = []
for f in Data_folder:
if not f.startswith('.'):
Data_path_mat.append(path1 + '/' + f)
return(Data_path_mat)
de... | {"hexsha": "763fe879e9f00aef97c9a17d27b0be2529214f4f", "size": 3360, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "moha23/LF-DAAE", "max_stars_repo_head_hexsha": "90cf293e001f3eed27e8d6a5b9a759ed57bcad06", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 8, "ma... |
import cv2, itertools
import numpy as np
from classes.Image import Image
from classes.FilterSequence import FilterSequence
class PipelineStream():
def __init__(self, images, names, metadata):
self.images = []
for i in range(len(images)):
temp_m = metadata['training'][names[i]]
temp = Image(images... | {"hexsha": "ec23028e77798fba73fa18217d099e4c9aa107f2", "size": 2136, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/classes/PipelineStream.py", "max_stars_repo_name": "juliobguedes/ALPR-IA", "max_stars_repo_head_hexsha": "4d644e105fac9ee56603853dd452454a5880173a", "max_stars_repo_licenses": ["FTL"], "max_s... |
import pandas as pd
import re
import csv
import os
import numpy as np
#Given a string found in the block microdata field, return a list of the unique block IDs that should make up
#the string. Assumes that block IDs are numerical (with perhaps one alphabetical character as a suffix)
def parse_block_string(s) :... | {"hexsha": "9fa1cca07e45b998a2a05b84cb8fda06cac1a507", "size": 3683, "ext": "py", "lang": "Python", "max_stars_repo_path": "histcensusgis/microdata/block.py", "max_stars_repo_name": "graziul/hist-census-gis", "max_stars_repo_head_hexsha": "558bf38cd0e444b5a91133dd70c88210da3cbbc9", "max_stars_repo_licenses": ["MIT"], "... |
using Pkg, Documenter
try
using JAXTAM
catch ArgumentError
Pkg.activate(joinpath(pwd(), ".."))
using JAXTAM
end
@info "Current dir: $(pwd())"
DOCUMENTER_DEBUG=true
makedocs(
modules = [JAXTAM],
doctest = false,
clean = false,
sitename = "JAXTAM Documentation",
format = :html
)... | {"hexsha": "7953903e769881d794b5821af5a59d9291dddef8", "size": 614, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "cgutteridge/JAXTAM.jl", "max_stars_repo_head_hexsha": "61c2b8317984418206365db93c369b7e39aff075", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
# File: ops.py
# Creation: Wednesday August 19th 2020
# Author: Arthur Dujardin
# Contact: arthur.dujardin@ensg.eu
# arthurd@ifi.uio.no
# --------
# Copyright (c) 2020 Arthur Dujardin
r"""
Defines basic operations between two tensors, like addition, subtraction, dot product etc.
"""
# Basic imports
from abc... | {"hexsha": "3dfbcc92a08b008256134fe632f15b3bf457cc41", "size": 13983, "ext": "py", "lang": "Python", "max_stars_repo_path": "nets/autograd/function.py", "max_stars_repo_name": "arthurdjn/nets", "max_stars_repo_head_hexsha": "5a19a69b540cb284518d44d92380aa98d49c7d41", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import numpy as np
import gym
import gym_singlePendulum
from keras.optimizers import Adam
from rl.agents import DDPGAgent
from rl.memory import SequentialMemory
from rl.random import GaussianWhiteNoiseProcess, OrnsteinUhlenbeckProcess
from rl.callbacks import FileLogger
from keras.callbacks import ModelCheckpoint
fr... | {"hexsha": "c86db5614e0df3bfd86d353f22a6181a7cab9442", "size": 2616, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "sarbatani/Inverted_Pendulum_RL_DDPG", "max_stars_repo_head_hexsha": "7d4b0ed7de4d048ba20c339dc1f88f461475dfc5", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
using LinearAlgebra: eigvecs, diag, diagind, dot
using StatsBase: sample, Weights
using RingPolymerArrays: get_centroid
using NQCDynamics.Calculators: RingPolymerDiabaticCalculator
using NQCDynamics: RingPolymerSimulation, RingPolymers
function RingPolymerSimulation{FSSH}(atoms::Atoms{T}, model::Model, n_beads::Integ... | {"hexsha": "5a43e547355dd6204751b6ee439e8dde9cf4c2d8", "size": 2232, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/DynamicsMethods/SurfaceHoppingMethods/rpsh.jl", "max_stars_repo_name": "NQCD/NQCDynamics.jl", "max_stars_repo_head_hexsha": "bf7f0ac5105aab72972cce4cd1f313e63878f474", "max_stars_repo_licenses"... |
import os
import sys
import torch
import random
from torch import Tensor
from networks.task_heads.task_head import TaskHead, TaskConfig
from typing import Callable, List, Optional, Tuple
from functools import reduce, partial
from torch.nn import functional as F
import torch.nn as nn
import numpy as np
from... | {"hexsha": "5e146f3080eea68fbc78f7922d8a91bfb57d1fbe", "size": 10611, "ext": "py", "lang": "Python", "max_stars_repo_path": "networks/task_heads/mlm_head.py", "max_stars_repo_name": "popescuaaa/tudir", "max_stars_repo_head_hexsha": "019846d1941f09fc7dc2e1c07e33d3f3d9f184dc", "max_stars_repo_licenses": ["MIT"], "max_sta... |
"""Training and code generation gaseous and cloud FAPs."""
from functools import wraps
from itertools import product
import numpy as np
from sklearn.linear_model import Ridge
from mwrt.interpolation import atanspace
from mwrt.fap import partition_lnq, density, esat, qsat
__all__ = ["as_absorption", "generate_code"... | {"hexsha": "a03f86b2b6bb489920443de090129f248d2d0ed7", "size": 8134, "ext": "py", "lang": "Python", "max_stars_repo_path": "software/mwrt/fapgen.py", "max_stars_repo_name": "chpolste/MScAtmosphericSciences", "max_stars_repo_head_hexsha": "52918f8452b6459cf19fc43a3103f2e37215fdae", "max_stars_repo_licenses": ["MIT"], "m... |
[STATEMENT]
lemma frange_vempty[simp]: "\<R>\<^sub>\<bullet> 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<R>\<^sub>\<bullet> []\<^sub>\<circ> = []\<^sub>\<circ>
[PROOF STEP]
by auto | {"llama_tokens": 82, "file": "CZH_Foundations_czh_sets_CZH_Sets_FBRelations", "length": 1} |
import glob
import os
import re
import subprocess
import numpy as np
for L in [600, 800, 1000, 1200, 1400]:
# Make folder to save omf files
SAVE_FOLDER = 'omfs_L{}nm_t200nm'.format(L)
if os.path.exists(SAVE_FOLDER):
os.rmdir(SAVE_FOLDER)
os.mkdir(SAVE_FOLDER)
# for Bz in np.arange(0.05, 0... | {"hexsha": "9f102342a208ed24b86f8d93fd17514edce65407", "size": 1050, "ext": "py", "lang": "Python", "max_stars_repo_path": "sims/oommf/isolated_typeII_bubble_A20pJm-1_mu0Ms648e-3_field-sweep/makefile_L_B_sweep.py", "max_stars_repo_name": "davidcortesortuno/paper_biskyrmions_bubbles", "max_stars_repo_head_hexsha": "9c7f... |
# Fill a mask using watershed and skeleton segments
import os
import cv2
import numpy as np
from skimage.segmentation import watershed
from plantcv.plantcv import outputs
from plantcv.plantcv import color_palette
from plantcv.plantcv import params
from plantcv.plantcv import plot_image
from plantcv.plantcv import prin... | {"hexsha": "cb42cfdcfc1db676c045fe83bda011571277acf6", "size": 2987, "ext": "py", "lang": "Python", "max_stars_repo_path": "plantcv/plantcv/morphology/fill_segments.py", "max_stars_repo_name": "josephoregon/plant-cv", "max_stars_repo_head_hexsha": "39c0c769cab6cc633ce26e3b109897b2bd3869f7", "max_stars_repo_licenses": [... |
import numpy as np
from openmdao.api import ExplicitComponent
class MachComp(ExplicitComponent):
""" Compute the Mach number based on vehicle airspeed and local speed
of sound.
"""
def initialize(self):
self.options.declare('num_nodes', types=int)
def setup(self):
nn = self.optio... | {"hexsha": "4eca0476a1d89ada58ddc2daa545084eeec0d669", "size": 1090, "ext": "py", "lang": "Python", "max_stars_repo_path": "dymos/examples/min_time_climb/aero/mach_comp.py", "max_stars_repo_name": "naylor-b/dymos", "max_stars_repo_head_hexsha": "56ee72041056ae20c3332d060e291c4da93844b1", "max_stars_repo_licenses": ["Ap... |
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
import subprocess
from tqdm import tqdm as tqdm
N_INTERVALS = 200
x_lower_lim = 0
x_upper_lim = 1
def grienhawk(x_vec):
val_1 = 0.0
for i in range(len(x_vec)):
val_1 += x_vec[i] * x_vec[i] / 4000.0
val_2 = 1.0
... | {"hexsha": "28d8d80fbb6a111d03747882df7fd4d2c1ff757e", "size": 1598, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/experiments/real/real_func_src/jani_ronkkonen_problem_generator/test_ff.py", "max_stars_repo_name": "EtorArza/NeatPerturbHH", "max_stars_repo_head_hexsha": "557b21a3a0223296bdc9241ac4ef02acf62... |
import sys
import re
import numpy as np
from os import makedirs
from util.names import datasets, test_acc, learning_rate_per_step
from util.extract import get_data, get_expname, compile_filename
from util.names import train_H_plot
from util.names import train_maxH_plot
def register(parser):
parser.add_argument('... | {"hexsha": "0947c9528eeebbc9ca560682b714c6ca4fa5af68", "size": 8254, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/divider/plottypes/entropycurve.py", "max_stars_repo_name": "JGU-VC/activation-pattern-analysis", "max_stars_repo_head_hexsha": "14da42ad541ee4faf35d360a6e871fd44decd33d", "max_stars_repo_lice... |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Conclusion}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
| {"hexsha": "b235ad1988250439c63823380a5d060db01c130b", "size": 174, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/conclusion.tex", "max_stars_repo_name": "gerdiedoo/test-thesis", "max_stars_repo_head_hexsha": "0d9b862442780cd39731d3e7b6416fe9cc4a08aa", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
from config import version
from flask import Flask
from flask import render_template
from flask import Response
from imutils.video import VideoStream
from helpers.motion_detector import MotionDetector
from helpers.buffered_frame import BufferedFrame
import imutils
import cv2
import threading
import argparse
import time... | {"hexsha": "b9655a856b6aafb5c06ccafcb22412b28214dc63", "size": 11106, "ext": "py", "lang": "Python", "max_stars_repo_path": "stream.py", "max_stars_repo_name": "tuxtobin/motionstreamer", "max_stars_repo_head_hexsha": "2a291810de2f21be70ab4ed6bbb9bcb8e9d5a713", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
import argparse
import numpy as np
from matplotlib import pyplot as plt
from simtk.unit import *
def calc_density(N, V):
"""
Calculate the density for a given volume and number of water molecules
Parameters
----------
N : int
Number of water molecules
V : simtk.unit.Quantity
... | {"hexsha": "d317cb7afcc77a79a8e76ae246747dc2b4c66500", "size": 2961, "ext": "py", "lang": "Python", "max_stars_repo_path": "water-density/calc_density_uvt.py", "max_stars_repo_name": "essex-lab/grand-paper", "max_stars_repo_head_hexsha": "d781190d130c10e75781bbcc036d050565754e74", "max_stars_repo_licenses": ["MIT"], "m... |
from typing import Optional
import numpy as np
from scipy import stats
from statsmodels.tsa.api import STLForecast
from statsmodels.tsa.ar_model import AutoReg
from statsmodels.tsa.arima.model import ARIMA
from fedot.core.log import Log
from fedot.core.operations.evaluation.operation_implementations.data_operations.t... | {"hexsha": "729240850edac5cd8418657f0002acc9a4f8d5d5", "size": 11946, "ext": "py", "lang": "Python", "max_stars_repo_path": "fedot/core/operations/evaluation/operation_implementations/models/ts_implementations.py", "max_stars_repo_name": "bahia14/Fedot_Times_Series_Forecast", "max_stars_repo_head_hexsha": "995751068733... |
/-
Copyright (c) 2020 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-/
import algebra.big_operators.pi
import data.finsupp
/-!
# Big operators for finsupps
This file contains theorems relevant to big operators in finitely supported functions.
-... | {"author": "JLimperg", "repo": "aesop3", "sha": "a4a116f650cc7403428e72bd2e2c4cda300fe03f", "save_path": "github-repos/lean/JLimperg-aesop3", "path": "github-repos/lean/JLimperg-aesop3/aesop3-a4a116f650cc7403428e72bd2e2c4cda300fe03f/src/algebra/big_operators/finsupp.lean"} |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! EVB-QMDFF - RPMD molecular dynamics and rate constant calculations on
! black-box generated potential energy surfaces
!
! Copyright (c) 2021 by Julien Steffen (steffen@pctc.uni-kiel.de)
! Stefa... | {"hexsha": "a8242cee8b5f61e4c0691fb49501e2c4b995199a", "size": 3358, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/lm_func_mod.f90", "max_stars_repo_name": "Trebonius91/EVB-QMDFF", "max_stars_repo_head_hexsha": "8d03e1ad073becb0161b0377b630d7b65fe3c290", "max_stars_repo_licenses": ["MIT", "Unlicense"], "... |
[STATEMENT]
lemma new_document_get_M\<^sub>C\<^sub>h\<^sub>a\<^sub>r\<^sub>a\<^sub>c\<^sub>t\<^sub>e\<^sub>r\<^sub>D\<^sub>a\<^sub>t\<^sub>a:
"h \<turnstile> new_document \<rightarrow>\<^sub>h h' \<Longrightarrow> h \<turnstile> new_document \<rightarrow>\<^sub>r new_document_ptr
\<Longrightarrow> preserved (ge... | {"llama_tokens": 332, "file": "Core_DOM_common_monads_DocumentMonad", "length": 1} |
// nsgaii.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <boost/mpi.hpp>
#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include <boost/filesystem.hpp>
//#include <random>
//#include <chrono>
#include <boost/random/mers... | {"hexsha": "45f0cc816892b0d9aa46e873f3017facb63aeaab", "size": 9892, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "CPP/VSnsgaii/nsgaii/nsgaii/nsgaii.cpp", "max_stars_repo_name": "UCD-GW-Nitrate/nsgaii", "max_stars_repo_head_hexsha": "f2d985dada0850c3bd648fd38c13778ec24c3597", "max_stars_repo_licenses": ["MIT"], ... |
[STATEMENT]
lemma osig_tvsT_subset_SortsT: "snd ` tvsT T \<subseteq> SortsT T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. snd ` tvsT T \<subseteq> SortsT T
[PROOF STEP]
by (induction T) auto | {"llama_tokens": 89, "file": "Metalogic_ProofChecker_Logic", "length": 1} |
import re
import os
import sys
from configs import g_conf
import smtplib
import numpy as np
from email.mime.text import MIMEText
from PIL import Image
def static_vars(**kwargs):
def decorate(func):
for k in kwargs:
setattr(func, k, kwargs[k])
return func
return decorate
def sof... | {"hexsha": "f7edf6478a183fd5366734ce131f2953bf9bc8e4", "size": 21968, "ext": "py", "lang": "Python", "max_stars_repo_path": "coilutils/general.py", "max_stars_repo_name": "PDillis/coiltraine", "max_stars_repo_head_hexsha": "a682aa62af5f6ecb95a837d33b70d893d3d261f6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import unittest
import padertorch as pt
import numpy as np
import torch
K = pt.modules.mask_estimator.MaskKeys
class TestMaskEstimatorModel(unittest.TestCase):
# TODO: Test forward deterministic if not train
C = 4
def setUp(self):
self.model_class= pt.models.mask_estimator.MaskEstimatorModel
... | {"hexsha": "5633f9fcf6b7c9aad7bfd5d31ff896c629a07d6c", "size": 3668, "ext": "py", "lang": "Python", "max_stars_repo_path": "padertorch/contrib/jensheit/tests/test_mask_estimator.py", "max_stars_repo_name": "sibange/padertorch", "max_stars_repo_head_hexsha": "494692d877f04c66847c2943795b23aea488217d", "max_stars_repo_li... |
from django.core.exceptions import ValidationError
from django.core.mail import send_mail
from django.shortcuts import render
from django.template.loader import get_template
from rest_framework import mixins, viewsets, views
from rest_framework.decorators import (api_view, permission_classes,
... | {"hexsha": "3f5251331da1d82736c0ae8c90f7728c17ad48a0", "size": 2987, "ext": "py", "lang": "Python", "max_stars_repo_path": "django_cards/detector/views.py", "max_stars_repo_name": "hugofloter/SmartCards", "max_stars_repo_head_hexsha": "8b41524a2ae9bc30d648916ef901fe3ed24413d9", "max_stars_repo_licenses": ["MIT"], "max_... |
using Random, Distributions, MosekTools, JuMP
mutable struct GameNode
remain::Int
pwin::Array{Float64}
plose::Array{Float64}
score::Array{Int}
y::Array{Float64}
children
end
function addNode(score, remain)
N = length(score)
node = GameNode(remain, zeros(Float64, N), zeros(Float64, N), ... | {"hexsha": "ffcb80566eed453df18019a8eebac4e6173c07b7", "size": 6159, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "aidpolicy.jl", "max_stars_repo_name": "evanmunro/draft-policy", "max_stars_repo_head_hexsha": "1dc5d6b6e1ff1b2ef92e0f65e5f969f22435ece9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
import time
import scipy.io as sio
import regression as reg
n = input("Enter polynomial degree n: ")
k = input("Enter the K-fold k: ")
batch_size = input("Enter the SGD batch_size: ")
data = sio.loadmat("../HW1_Data/dataset2.mat")
x_train, x_test = data["X_trn"], data["X_tst"]
y_train, y_test = data["Y_trn"], data["Y... | {"hexsha": "eb3ff7645b88fd0f23d0f7e4c831ebf315f2496b", "size": 1183, "ext": "py", "lang": "Python", "max_stars_repo_path": "HW1/src/dataset2.py", "max_stars_repo_name": "Breezen/NEU-Machine-Learning", "max_stars_repo_head_hexsha": "ec3be058e03f0660b73162a01c7f867daa3fc759", "max_stars_repo_licenses": ["MIT"], "max_star... |
import collections
import logging
import numbers
import time
import warnings
from collections import defaultdict
from functools import partial
from typing import (
Any,
Callable,
Iterable,
List,
Optional,
Sequence,
Tuple,
TypeVar,
Union,
cast,
)
import numpy as np
from qcodes i... | {"hexsha": "7ceb66966832eb7f75b5436e85597f98b71df894", "size": 41207, "ext": "py", "lang": "Python", "max_stars_repo_path": "qcodes/instrument_drivers/american_magnetics/AMI430.py", "max_stars_repo_name": "riju-pal/QCoDeS_riju", "max_stars_repo_head_hexsha": "816e76809160e9af457f6ef6d4aca1b0dd5eea82", "max_stars_repo_l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.