text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
\documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{listings} \usepackage{amsfonts} \usepackage[utf8]{inputenc} \usepackage{listings} \usepackage{hyperref} \usepackage{float} \usepackage{color} \usepackage{url} \usepackage{amsmath} \definecolor{backcolour}{rgb}{0.96,0.96,0.96} \d...
{"hexsha": "42ff5f0b7c142a086c0adee8994ef0193c89877d", "size": 4904, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "a5/answers.tex", "max_stars_repo_name": "EllaDing/nlp-with-deep-learning", "max_stars_repo_head_hexsha": "783a238830bafddc3bd35dca614f9b0d2dbdfc53", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np import os import tflearn import tensorflow as tf import random import pickle import nltk from pymongo import MongoClient from nltk.stem.lancaster import LancasterStemmer # import our chat-bot intents data from mongo MONGO_HOST = os.environ.get("MONGO_HOST") MONGO_PORT = os.environ.get("MONGO_PORT") ...
{"hexsha": "632788f40811eba6381ec7339e0cc139c345a2e2", "size": 2918, "ext": "py", "lang": "Python", "max_stars_repo_path": "nlp/training.py", "max_stars_repo_name": "gary-ai/gary-docker", "max_stars_repo_head_hexsha": "5c6e7c4aa06a1bee38fc868612d1df3eed2bc3e4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
#!/usr/bin/python # Copyright (c) 2014, Blind Motion Project # All rights reserved. import csv import sys import datetime from optparse import OptionParser from datetime import timedelta from scipy.interpolate import interp1d ACC_KEY = '1' GYR_KEY = '4' ACC_KEY_INT = 1 GYR_KEY_INT = 4 GEO_KEY = 'geo' TIME_KEY = 'time...
{"hexsha": "17163be14baba8fec0bf41e388d1b752fb5c6eec", "size": 7620, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_prepaire/generate_events.py", "max_stars_repo_name": "blindmotion/detector", "max_stars_repo_head_hexsha": "e833896ef0f78f5b9672e24ffd7062c7ffec783a", "max_stars_repo_licenses": ["BSD-3-Claus...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
{"hexsha": "9879afc76fc1c85105721101190681b7fe098acb", "size": 11068, "ext": "py", "lang": "Python", "max_stars_repo_path": "snerg/snerg/baking.py", "max_stars_repo_name": "pedersor/google-research", "max_stars_repo_head_hexsha": "6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
# MIT License # # Copyright (c) 2020 Didan Deng # # 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, modify, merge, p...
{"hexsha": "84fa00891e2aea6afdcc0d5141e25f34cb691d67", "size": 6799, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/compare_all.py", "max_stars_repo_name": "wtomin/SteerablePyramid_Torch_TF_Numpy", "max_stars_repo_head_hexsha": "bb805b736b874567f61f7f23d8a104575729f86e", "max_stars_repo_licenses": ["MI...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2019 Primoz Ravbar UCSB # Licensed under BSD 2-Clause [see LICENSE for details] # Written by Primoz Ravbar """ Modified on Sat Oct 5 10:02:58 2019 @author: Augusto Escalante """ import numpy as np import matplotlib.pyplot as plt import os import pickle i...
{"hexsha": "6b1518cc014ed1cdb7ffab7a1b544401ce203ce4", "size": 1781, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualize_ST3C_images.py", "max_stars_repo_name": "auesro/ABRS", "max_stars_repo_head_hexsha": "980ec3e225021a6d1566d51fe0e3a03443233d9f", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c...
# download the NMRData repository at https://github.com/AI4DBiological-Systems/NMRData import NMRDataSetup using FFTW import PyPlot import BSON PyPlot.close("all") fig_num = 1 PyPlot.matplotlib["rcParams"][:update](["font.size" => 22, "font.family" => "serif"]) # creates the save path if it doesn't exist. functio...
{"hexsha": "db08b21b0d9a5c0e0c41946d98409e5edc26fff5", "size": 4852, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/batch_load_experiments.jl", "max_stars_repo_name": "AI4DBiological-Systems/NMRDataSetup.jl", "max_stars_repo_head_hexsha": "aba4854ac0557dea5f9c5b3fa1ab9ec517ee0e91", "max_stars_repo_licen...
#!/usr/bin/env python # coding: utf-8 # # Begrenzen des Datasets auf 1000 # # Dieses Notebook begrenzt jede Klasse auf 1000. # Klassen > 1000 werden auf 1000 beschränkt, dafür wird erst nach timestamp sortiert, anschliessend jedes xte Element gewählt. # Klassen < 1000 werden auf 1000 augmented und anschliessend überzä...
{"hexsha": "f48a424164d1be0989cc56c42fc51c76c17ddfec", "size": 7005, "ext": "py", "lang": "Python", "max_stars_repo_path": "example-scripts/preprocessing_lokiDataset_deepLearning_step1_classSize.py", "max_stars_repo_name": "o2a-data/o2a-data-ml", "max_stars_repo_head_hexsha": "61ca97e25890e65ba35175f65493ed358a847d7b",...
[STATEMENT] lemma quality_increases_msg_fresh [elim]: assumes qinc: "\<forall>j. quality_increases (\<sigma> j) (\<sigma>' j)" and "msg_fresh \<sigma> m" shows "msg_fresh \<sigma>' m" [PROOF STATE] proof (prove) goal (1 subgoal): 1. msg_fresh \<sigma>' m [PROOF STEP] using assms(2) [PROOF STATE] proof (pro...
{"llama_tokens": 14506, "file": "AODV_Quality_Increases", "length": 79}
import networkx as nx import copy import pylab import numpy as np import time import itertools def debug(str): #print(str) pass def MIN_FDIST(): return np.sqrt(2)/2 class Config: FuelCapacity=2 class Location(): def __init__(self, id, x, y,al=1,be=0): self.id=id ...
{"hexsha": "2e849ea6c765d6f782c433bfbc43e765e67feae7", "size": 44193, "ext": "py", "lang": "Python", "max_stars_repo_path": "frouting.py", "max_stars_repo_name": "lilj999/FuelAwareRouting", "max_stars_repo_head_hexsha": "d635b30ca6020dc815fb80ecc310c2010086e444", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pandas as pd from datetime import datetime, timedelta import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.ticker as tck import matplotlib.font_manager as fm from mpl_toolkits.basemap import Basemap, addcyclic, ...
{"hexsha": "edaa6cf69e47a1b438b5e8c1a3c17f2062c8e622", "size": 13363, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tesis_GOES_PorcPixelNubado.py", "max_stars_repo_name": "cmcuervol/Estefania", "max_stars_repo_head_hexsha": "13b564261dfc786b93c77fbc442a568018f87cc9", "max_stars_repo_licenses": ["MIT"], "max_st...
# Copyright (C) 2020 Tsuda Laboratory # # 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, modify, merge, publish, d...
{"hexsha": "78a74e0d8922a7e992e54f9e13bf17bc4f07613a", "size": 6830, "ext": "py", "lang": "Python", "max_stars_repo_path": "ver-python2.7/PrefInt/visuallization.py", "max_stars_repo_name": "sxl324/PrefInt", "max_stars_repo_head_hexsha": "9a307dcf84b1c071f413e87e8bd572d3ae9bbcd2", "max_stars_repo_licenses": ["MIT"], "ma...
import spacy from utils import load_jsonl import numpy as np import annoy # import faiss from annoy import AnnoyIndex import random if False: f = 7 t = AnnoyIndex(f) # Length of item vector that will be indexed for i in range(1000): v = [random.gauss(0, 1) for z in range(f)] t.add_item(i, ...
{"hexsha": "e73c7ff24da57be6cf99a5af6e99635234184e35", "size": 3294, "ext": "py", "lang": "Python", "max_stars_repo_path": "narrow.py", "max_stars_repo_name": "peterwilliams97/ToneRanger", "max_stars_repo_head_hexsha": "61ab8b5a96bbf3f82b8e6a07e470831189afff8c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
module Interpolation Base.Experimental.@optlevel 3 export AbstractInterpolation export AbstractInterpolation1D, AbstractInterpolation2D export AbstractLinearInterpolation, AbstractBilinearInterpolation export NoInterpolation export LinearInterpolation, BilinearInterpolation export AbstractInterp1DOrNone, AbstractInte...
{"hexsha": "33d7acf868469644359b7023670795ddf2fdc369", "size": 4277, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Interpolation.jl", "max_stars_repo_name": "HomodyneCT/MartaCT.jl", "max_stars_repo_head_hexsha": "090fce88c91b79a4a8326589faee6cd2f869456e", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
//============================================================================== // // (c) Copyright, 2013 University Corporation for Atmospheric Research (UCAR). // All rights reserved. // Do not copy or distribute without authorization. // // File: $RCSfile: rwx_vector_collection_nc.cc,v $ // ...
{"hexsha": "945e966f4eb885bc016a1e1fbf7d1efcbb446605", "size": 15247, "ext": "cc", "lang": "C++", "max_stars_repo_path": "libs/rwx/rwx_vector_collection_nc.cc", "max_stars_repo_name": "OSADP/Pikalert-Vehicle-Data-Translator-", "max_stars_repo_head_hexsha": "295da604408f6f13af0301b55476a81311459386", "max_stars_repo_lic...
import numpy as np import matplotlib.pyplot as plt import datetime from qutip import Qobj, identity, sigmax, sigmay, sigmaz, sigmam, tensor from qutip.superoperator import liouvillian, sprepost from qutip.qip.operations import cnot, cr import qutip.logging_utils as logging logger = logging.get_logger() #Set this to Non...
{"hexsha": "e82d93b446ac8040e549e125ffce4e8438b80fcb", "size": 5235, "ext": "py", "lang": "Python", "max_stars_repo_path": "cr_gate_lindbladian.py", "max_stars_repo_name": "esm-qiskit21/qutip", "max_stars_repo_head_hexsha": "fe0d45a28343a36457f9b6f140842d35ab578b1a", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
Wine into Water is a wine tasting and silent auction fundraiser with live music, appetizers, raffles, exhibits, and more. It supports water and sanitation projects in developing communities, and is hosted by Engineers Without Borders at UC Davis. Second Annual Event Sunday, April 14th, 2013 International House 10 ...
{"hexsha": "7e5349c84570bb7376e9d006f671a4a6ac74bd05", "size": 1098, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Wine_into_Water.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np def Zeros(inp): return np.zeros(inp) def AlphaRandom(inp, alpha=0.01): """ Random weight initialization with multiplication by constant alpha. """ return np.random.randn(inp)*alpha def RandomNormal(inp): """ Random normally distributed weight initialization. """ ...
{"hexsha": "cfc03db564af5bfab92951df9b07702b80e5a82c", "size": 1438, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules/initialization.py", "max_stars_repo_name": "khknopp/langur-python", "max_stars_repo_head_hexsha": "45ed8324a5229466cb9535a3b74e68be1b32ee36", "max_stars_repo_licenses": ["MIT"], "max_stars...
@testset "Constraint" begin @testset "bound constraints" begin let bounds = [-10.0 10.0; 2.4 8.2; 0 3.4], r = [-11, 10.0, 1.23] bounce_back!(r, [-5.3, 0, 0], bounds) @test -10 <= r[1] <= -5.3 && 0 <= r[2] <= 8.2 && r[3] == 1.23 end end end
{"hexsha": "f9fa091dcac8448ab559906ffa2b0f9f156ed54b", "size": 288, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/constraint_test.jl", "max_stars_repo_name": "ShuhuaGao/DifferentialEvolution.jl", "max_stars_repo_head_hexsha": "bb8de3bcb7f6f2c2748b880329ec508802dc128d", "max_stars_repo_licenses": ["MIT"], "...
"""Module for ML Algorithms""" import json import pandas as pd import numpy as np import pickle from sklearn.metrics.pairwise import cosine_similarity def nmf_recommender(user_input, no_of_recommendations, path = ""): user_input_cleaned={} for i in user_input: if (user_input[i] != "Rate the game....
{"hexsha": "5e4ebf31108cc94cf54c92aea86c9aec2f9f363b", "size": 2649, "ext": "py", "lang": "Python", "max_stars_repo_path": "flask_app/ml_models.py", "max_stars_repo_name": "Ruebe92/BoredLameRecommender", "max_stars_repo_head_hexsha": "ff6b1070359442ca9155641170ed2193fd637e67", "max_stars_repo_licenses": ["MIT"], "max_s...
""" Matplotlib Animation Example author: Jake Vanderplas email: vanderplas@astro.washington.edu website: http://jakevdp.github.com license: BSD Please feel free to use and modify this, but keep the above information. Thanks! """ import numpy as np from matplotlib import pyplot as plt from matplotlib import animation ...
{"hexsha": "d6a74a02b867616d01aa61d268adced93939845c", "size": 2140, "ext": "py", "lang": "Python", "max_stars_repo_path": "raster_demo.py", "max_stars_repo_name": "pure-water/RastDemo", "max_stars_repo_head_hexsha": "abf0512b1b9cc5ec3b8ab91160ba1d4b8d3ee715", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
from typing import Optional, Tuple import numpy as np from .metrics import sdr_loss, sdr, bss_eval_sources def si_sdr_loss( est: np.ndarray, ref: np.ndarray, zero_mean: Optional[bool] = False, clamp_db: Optional[float] = None, pairwise: Optional[bool] = False, ) -> np.ndarray: return sdr_loss...
{"hexsha": "81cd774236afa4e57a45a9b4b3f45006bbe4180f", "size": 5919, "ext": "py", "lang": "Python", "max_stars_repo_path": "fast_bss_eval/numpy/scale_invariant.py", "max_stars_repo_name": "fakufaku/fast_bss_eval", "max_stars_repo_head_hexsha": "6e8a9a99aa7947c8075bc216fa007ef391e97f66", "max_stars_repo_licenses": ["MIT...
import keras.layers as kl from keras.engine.topology import Layer import tensorflow as tf from concise.utils.helper import get_from_module from concise.layers import SplineWeight1D from keras.models import Model, Sequential import numpy as np import gin @gin.configurable class GlobalAvgPoolFCN: def __init__(self...
{"hexsha": "5a7d3be0f9b9543c7ed21194383e7306ac380141", "size": 8605, "ext": "py", "lang": "Python", "max_stars_repo_path": "bpnet/layers.py", "max_stars_repo_name": "mlweilert/bpnet", "max_stars_repo_head_hexsha": "dcc9e8d805f9de774ae9dcc62c20504915be614f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 93, "ma...
import torch import torch import torch.nn as nn import functools from torch.autograd import Variable import numpy as np import torch.nn.init as init def weights_init(m): classname = m.__class__.__name__ if classname.find('Conv') != -1: ##m.weight.data.normal_(0.0, 0.02) init.kaiming_uniform_(m.w...
{"hexsha": "138f60779b7a125182861c97df0e4a6000a0f9ab", "size": 3207, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/Encoder.py", "max_stars_repo_name": "Caoang327/GAN_Compression", "max_stars_repo_head_hexsha": "6cfdd771de58c7b90bbe39d99d9dfcaeb2591c02", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import datetime class Shifter(dict): def __init__(self, name, df_runs, shifts, **kwargs): self["name"] = name self["df_runs"] = df_runs self["shifts"] = shifts self["daytime_time"] = kwargs.pop("daytime_time", {"morning":"06:30:00", ...
{"hexsha": "63d6f7fd6045f39440877c8f1069eaf9781b5c5b", "size": 7658, "ext": "py", "lang": "Python", "max_stars_repo_path": "shiftsummary/__init__.py", "max_stars_repo_name": "Kecksdose/shiftsum", "max_stars_repo_head_hexsha": "b5d6c6cde84601e1e92a9354fd9bf8ee08ca6d7e", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Apr 1 12:46:24 2020 """ #%% import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from datascrape import data #%% st = pd.DataFrame(data) st.set_index(['state', 'date']) #%% st.sort_values(by=['positive'], ascend...
{"hexsha": "7bb6c9aa81927946c5813dca86a6db20f7f5a0a2", "size": 356, "ext": "py", "lang": "Python", "max_stars_repo_path": "graphs.py", "max_stars_repo_name": "labray24/Covid-US", "max_stars_repo_head_hexsha": "c22d7457d10a4fd073c7520be60a3b3387e69d66", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": null, ...
SUBROUTINE HISTGM(XORIG,YORIG,BARWID,VALUES,ISTART,ISTOP) C C ------------------------------------------------ C ROUTINE NO. ( 81) VERSION (A8.8) 14:JUL:88 C ------------------------------------------------ C C THIS DRAWS A HISTOGRAM OF A GIVEN SET OF VALUES. C ...
{"hexsha": "92282d0aaa7e9388707fde50ef20522d03549703", "size": 3945, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/lib/histgm.f", "max_stars_repo_name": "ZedThree/GHOST", "max_stars_repo_head_hexsha": "cba30b43bdcc73fb87cff0724337a7d3a1bd7812", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
#' communiter. #' #' @name communiter #' @docType package NULL
{"hexsha": "a140cfc0608e69f3bd3c833b4ab506bbaf8c12ed", "size": 63, "ext": "r", "lang": "R", "max_stars_repo_path": "R/communiter-package.r", "max_stars_repo_name": "davharris/communiter", "max_stars_repo_head_hexsha": "50dcedbf59dfd53d3b38c43d5e619b2c9a0eed47", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
############################################################################### # apogee.spec.window: routines for dealing with the individual element windows ############################################################################### import os, os.path import numpy from apogee.tools.read import modelspecOnApStarWa...
{"hexsha": "c30598224cbf0ba09e0a017f20fbae485473f217", "size": 9323, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/jobovy/apogee/apogee/spec/window.py", "max_stars_repo_name": "dnidever/apogee", "max_stars_repo_head_hexsha": "83ad7496a0b4193df9e2c01b06dc36cb879ea6c1", "max_stars_repo_licenses": ["BSD-3-...
# encoding: utf8 """ From Softmax to Sparsemax: A Sparse Model of Attention and Multi-Label Classification. André F. T. Martins, Ramón Fernandez Astudillo In: Proc. of ICML 2016, https://arxiv.org/abs/1602.02068 """ from __future__ import division import numpy as np import torch from torch import nn from .base impor...
{"hexsha": "ce06da82b90098f11273aea52f992d57e950b5d4", "size": 1443, "ext": "py", "lang": "Python", "max_stars_repo_path": "torchsparseattn/sparsemax.py", "max_stars_repo_name": "dhruvdcoder/sparse-structured-attention", "max_stars_repo_head_hexsha": "6b9d2703014d4ec17899ac0e153a57f5cc36b950", "max_stars_repo_licenses"...
from __future__ import print_function from os import stat import os.path as ops from typing import Union import numpy as np import cv2 import time from scipy.special import expit import tensorrt as trt # import cuda functions import pycuda.autoinit import pycuda.driver as cuda def _aspectaware_resize_padding(image,...
{"hexsha": "71a02c4c292c5cbb6bfdf0d21134c6b1f0aad759", "size": 20753, "ext": "py", "lang": "Python", "max_stars_repo_path": "unittest_yolov5_head.py", "max_stars_repo_name": "HtutLynn/alto_unittests", "max_stars_repo_head_hexsha": "f741b14ee47508a21af2554d4604463466713b58", "max_stars_repo_licenses": ["MIT"], "max_star...
function M=json2mat(J) %JSON2MAT converts a javscript data object (JSON) into a Matlab structure % using s recursive approach. J can also be a file name. % %Example: lala=json2mat('{lele:2,lili:4,lolo:[1,2,{lulu:5,bubu:[[1,2],[3,4],[5,6]]}]}') % notice lala.lolo{3}.bubu is read as a 2D matrix. % % Jon...
{"author": "covartech", "repo": "PRT", "sha": "4305e612af048e7dbf3d9392efc7436db125b1fc", "save_path": "github-repos/MATLAB/covartech-PRT", "path": "github-repos/MATLAB/covartech-PRT/PRT-4305e612af048e7dbf3d9392efc7436db125b1fc/+prtExternal/+json/json2mat.m"}
""" Very useful librray """ import numpy as np class MeshLoader: def __init__(self, params): """Only list in list, without оборачиваетелй numpy # mesh_alpha = np.arange(10) # mesh_beta = np.arange(10) # for k,z in enumerate(MeshLoader([[0.1,0.2,0.3],['a','b']])): # print(z) """ self.p...
{"hexsha": "dbd46b3f5b35d08f75e84781a709ef69f1a4e61a", "size": 1890, "ext": "py", "lang": "Python", "max_stars_repo_path": "tsad/useful/iterators.py", "max_stars_repo_name": "waico/DL-anomaly-detection", "max_stars_repo_head_hexsha": "c69eeecfd3376e6e3544ab34e36d6360dbebeb94", "max_stars_repo_licenses": ["BSD-3-Clause"...
import logging import tempfile import zipfile from enum import Enum from pathlib import Path import numpy as np from PIL import Image from scipy.io import loadmat from . import download from .enums import Split logger = logging.getLogger(__name__) class MPII: FOLDER_NAME = "mpii_human_pose_v1" IMG_URL = "h...
{"hexsha": "4fe3dc25c1ed0728c056dd9bd3fd1d02c543f447", "size": 1235, "ext": "py", "lang": "Python", "max_stars_repo_path": "torch_keypoints/datasets/mpii.py", "max_stars_repo_name": "latkins/torch_keypoints", "max_stars_repo_head_hexsha": "7e0ad2618cef18a80eb6cf96acf624b6f67e3d51", "max_stars_repo_licenses": ["MIT"], "...
from abc import ABC, abstractmethod import numpy as np import pandas as pd from hdmf.common.table import DynamicTable from pynwb import ProcessingModule from src.bsl_python.utils import flatten_dict def build_dataframe(nwb_file): spike_times = [] unit_indices = [] electrodes = [] all_units = nwb_fil...
{"hexsha": "5837c95e5ccdb48dc39fc9170fc27f309cdd7d3c", "size": 4062, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/bsl_python/preprocessing/experiments/experiment.py", "max_stars_repo_name": "Rechenmann-Data-EIRL/BSLPy", "max_stars_repo_head_hexsha": "45f037d00c7f171bc5f63784e181f82eb909c8c4", "max_stars_r...
# # Bessel function # An Bessel function of the first kind of order ``\nu`` can be computed using Taylor expansion # ```math # J_\nu(z) = \sum\limits_{n=0}^{\infty} \frac{(z/2)^\nu}{\Gamma(k+1)\Gamma(k+\nu+1)} (-z^2/4)^{n} # ``` # where ``\Gamma(n) = (n-1)!`` is the Gamma function. One can compute the accumulated...
{"hexsha": "c336f0c92ff72730349aacc977fd5c3b64f5e597", "size": 5736, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/besselj.jl", "max_stars_repo_name": "johnnychen94/NiLang.jl", "max_stars_repo_head_hexsha": "81fbe77d1f499003153857be8367de2024c797a5", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
from sympy import symbols, diff, exp, sqrt, factor, Symbol, printing, simplify, acos, sin, cos, pretty_print x, y, z, r, k, theta, phi = symbols('x y z r k theta phi') r = sqrt(x*x+y*y+z*z) theta = acos(z/r) R = Symbol('r') def associatedLaguerre(X, p, q): if q==0: return 1 elif q==1: ...
{"hexsha": "f7d7a26a1e53312a26d93c33e0360a78da6d02a0", "size": 3550, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/generateHydrogenOrbitals.py", "max_stars_repo_name": "evenmn/VMaChine", "max_stars_repo_head_hexsha": "f38de342d95c25eb22a4a61260b3fa47f92d9174", "max_stars_repo_licenses": ["MIT"], "max_s...
using LinearAlgebra eye(n) = Matrix{Float64}(I, n, n) function gaussnewton(x0, f, tol=1e-6, maxit = 100) alpha = 1.0e-4 it = 1 xc = x0 fc, jac, gc = f(xc) n_f = 1 n_g = 1 n_h = 0 while norm(gc) > tol && it < maxit dc = (jac'*jac)\gc lambda = 1.0 xt = xc - lambda*...
{"hexsha": "13985d49197314723b94dbf1162c2abffa1cb6ef", "size": 2325, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/datafitting.jl", "max_stars_repo_name": "hessianguo/NumericalMethod.jl", "max_stars_repo_head_hexsha": "bd6c00a88c8168e39b2ba1894466a6b6f6e24984", "max_stars_repo_licenses": ["MIT"], "max_stars...
// Boost.Geometry (aka GGL, Generic Geometry Library) // Unit Test // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. // This file was modified by Oracle on 2020. // Modifications copyri...
{"hexsha": "b40b14fe44ad56431cb8da9ea94766d5872711e5", "size": 3813, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/geometries/segment.cpp", "max_stars_repo_name": "jkerkela/geometry", "max_stars_repo_head_hexsha": "4034ac88b214da0eab8943172eff0f1200b0a6cc", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars...
from matplotlib.pyplot import * from numpy import array from raysect.primitive import Sphere, Box, Cylinder, Union, Intersect, Subtract from raysect.optical import World, translate, rotate, Point3D, d65_white, InterpolatedSF from raysect.optical.observer import OrthographicCamera from raysect.optical.material.emitte...
{"hexsha": "a1449e63cf17739174493fc7e152ff0e281b5659", "size": 2805, "ext": "py", "lang": "Python", "max_stars_repo_path": "demos/observers/orthographic.py", "max_stars_repo_name": "Gjacquenot/source", "max_stars_repo_head_hexsha": "5f9b86bbb44c25b5096d637d65e41e257a9bda3c", "max_stars_repo_licenses": ["BSD-3-Clause"],...
\section{Floquet theory} Since we describe the lifetime of an electron in certain Landau level using conventianal perturbation theeory, now we can apply the Floquet theory to identify the difference of these methods. \noindent First we need to identify the \textit{quasienergies} and periodic \textit{Floquet modes} fo...
{"hexsha": "270e5a892681c93968132bb244a34612ce98df0c", "size": 15473, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "theory/sec_03.tex", "max_stars_repo_name": "KosalaHerath/magnetic-2DEG-conductivity", "max_stars_repo_head_hexsha": "91c5df1b018579b4b9c91d84f2d60ee482a001de", "max_stars_repo_licenses": ["MIT"], "...
#include <boost/compute/algorithm/rotate.hpp>
{"hexsha": "0d8307aaed8b9d1f0851b5a42f3515d8632c4219", "size": 46, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_compute_algorithm_rotate.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-...
import atexit import logging as l import sys import numpy as np from argparse import ArgumentParser from enum import Enum from pathlib import Path from time import sleep, time import RPi.GPIO as GPIO from marcs.CubeSolver.logger import log, set_log_level from marcs.CubeSolver.stepper import Stepper from marcs.RubiksCu...
{"hexsha": "0b4e884ae67d9f63040406b341cec383ecb0da56", "size": 13116, "ext": "py", "lang": "Python", "max_stars_repo_path": "solver.py", "max_stars_repo_name": "SebastienLavoie/CubeSolver", "max_stars_repo_head_hexsha": "7f55a905708718e0ed83b6548003922269255224", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
[STATEMENT] lemma eqvtI[eqvt]: fixes P :: pi and Q :: pi and perm :: "name prm" assumes "P \<approx>\<^sup>s Q" shows "(perm \<bullet> P) \<approx>\<^sup>s (perm \<bullet> Q)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. perm \<bullet> P \<approx>\<^sup>s perm \<bullet> Q [PROOF STEP] using assms [...
{"llama_tokens": 202, "file": "Pi_Calculus_Weak_Early_Bisim_Subst", "length": 2}
# Aliev_Panfilov_2D_plot_sequence_v1.jl # ===================================== u.p. 5.8.21 / 5.9.21 # Aliev-Panfilov model # load data and plot sequence with phase singularities using DrWatson @quickactivate "NonlinearDynamicsTextbook" include(srcdir("style.jl")) using DynamicalSystems, PyPlot, OrdinaryDiffEq usi...
{"hexsha": "7d9edb125112b6986e1519116007ba53a627525c", "size": 1640, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "figure_generation/11/11.8_plot.jl", "max_stars_repo_name": "JuliaDynamics/NonlinearDynamicsTextbook", "max_stars_repo_head_hexsha": "bfae8cf867f458f00151da089332f2ce3bea5dd0", "max_stars_repo_licen...
from Stream.IPStream import IPStream from Stream.TransportStream import TransportStream import numpy from scipy.stats import stats class StreamAnalyzer: def do(self, stream, operation): pass
{"hexsha": "a9067e82b44518155f303eee33623266cdc578ed", "size": 207, "ext": "py", "lang": "Python", "max_stars_repo_path": "Core/StreamAnalyzer.py", "max_stars_repo_name": "SeuSQ/SimpleShark", "max_stars_repo_head_hexsha": "a7da2aa26b3e6f67f160008c0a19078ccfd3ab98", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
""" Copyright (C) 2018-2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
{"hexsha": "8a6339bc0b824d0b3f664bec440895ab261f8251", "size": 60252, "ext": "py", "lang": "Python", "max_stars_repo_path": "model-optimizer/mo/middle/passes/fusing/fuse_linear_seq_test.py", "max_stars_repo_name": "calvinfeng/openvino", "max_stars_repo_head_hexsha": "11f591c16852637506b1b40d083b450e56d0c8ac", "max_star...
# -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import urllib.request import numpy as np import tensorflow as tf import scipy import spacy print() iris_training = "i...
{"hexsha": "a0a35a8a25ab038067c90bb8c8e2093d50e67b63", "size": 1038, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/NLP/DL/dl_sample.py", "max_stars_repo_name": "vbsteja/code", "max_stars_repo_head_hexsha": "0c8f4dc579f5de21b6c55fe6e65c3c8eb5473687", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
from mpi4py import MPI import time import torch import torch.distributed as dist import numpy as np import deepspeed from deepspeed.runtime.comm.mpi import MpiBackend # Configure wall clock timer from deepspeed.utils.timer import SynchronizedWallClockTimer from statistics import mean timers = SynchronizedWallClockT...
{"hexsha": "6017ec873c21f8e076a257800e703cc4364f4119", "size": 2150, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/onebit/test_mpi_perf.py", "max_stars_repo_name": "ConnollyLeon/DeepSpeed", "max_stars_repo_head_hexsha": "2d84d1c185ef0345eaf43a7240d61b33eda43497", "max_stars_repo_licenses": ["MIT"], "max_...
Maveric is a UC Davis graduate (with degrees in English and Psychology), a former California Aggie arts writer, and a Delta Lambda Phi alumnus. Friends call him Mav and know him for is sardonic humor, great sense of style, affectionate nature, and sweet moves on the dance floor. He moved out of town in April 2006 but...
{"hexsha": "75e6e3c7b3a1a90ca909d09705b509c1fdc1c5e0", "size": 352, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Maveric_Vu.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import os import numpy as np import json import EggNet import EggNet.Reader from util import perform_real_quant, init_network_from_weights, plot_confusion_matrix, evaluate_network_full, \ quant2float, init_fake_network_from_weights, read_np_keras, \ init_quant_network_from_weights def quant_to_int(x, b, f):...
{"hexsha": "f8e3ffb6416cd8cde12dd1220bf0a65b8406e346", "size": 9413, "ext": "py", "lang": "Python", "max_stars_repo_path": "net/quantize.py", "max_stars_repo_name": "marbleton/FPGA_MNIST", "max_stars_repo_head_hexsha": "4b4a30e0adca35de9adcad7b3fec08c516260790", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7,...
import spacy import re import numpy as np from sklearn.base import TransformerMixin from html.parser import HTMLParser import dill import sys, os nlp = spacy.load("en_core_web_sm", parser=False, entity=False) class SpacyTokenTransformer(TransformerMixin): __symbols = set("!$%^&*()_+|~-=`{}[]:\";'<>?,./-") d...
{"hexsha": "62b881252637c8423436e0b1e40a0b4e61fef28a", "size": 2567, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/models/sklearn_spacy_text/ml_utils.py", "max_stars_repo_name": "juldou/seldon-core", "max_stars_repo_head_hexsha": "34021ee3ead41c729ff57efd1964ab3f0d37861e", "max_stars_repo_licenses": [...
import tensorflow as tf from tensorflow.python.ops import control_flow_ops from tensorflow.python.ops import math_ops import matplotlib.pyplot as plt import os import sys import numpy as np from utils import montage_tf, get_variables_to_train, assign_from_checkpoint_fn, remove_missing, weights_montage from constant...
{"hexsha": "13147ad998e12e617e0e2cb138a90b7a0e6cc12b", "size": 9344, "ext": "py", "lang": "Python", "max_stars_repo_path": "train/AlexNet_NN_search.py", "max_stars_repo_name": "SimuJenni/Correspondences", "max_stars_repo_head_hexsha": "384c0272e438ad3e7c936f5ae78fe6154b188c54", "max_stars_repo_licenses": ["MIT"], "max_...
#################################################################### # Copyright (c) 2019 Nobuyuki Umetani # # # # This source code is licensed under the MIT license found in the # # LICENSE file in the root directory of this...
{"hexsha": "f96fa0d88898a4f4712ab0ee122cdd0df830ab22", "size": 10151, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyDelFEM2/msh.py", "max_stars_repo_name": "stnoh/pydelfem2", "max_stars_repo_head_hexsha": "40224736dda9576a39d2b5a753a1ca1e4f906299", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "m...
# -*- coding: utf-8 -*- # # Copyright 2018 isobar. All Rights Reserved. # # Usage: # python teeth-whitening.py pic.jpg # import os import sys import argparse import cv2 import dlib import numpy as np from skimage import io from PIL import Image from scipy.spatial import distance import IsobarImg DEBUG = False ...
{"hexsha": "236d75bfba66c5a6021c55f43297133cb8cd1b13", "size": 6918, "ext": "py", "lang": "Python", "max_stars_repo_path": "teeth-whitening.py", "max_stars_repo_name": "wwwins/TeethWhitening", "max_stars_repo_head_hexsha": "b9b19bfccdc3a27813b24772038153da7db8133d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np import pylab as plt np.random.seed(17) plt.rc('font', size=8) nproblem = 8 # magic nstudent = 150 # magic problems = [r"""\begin{problem} (From Problem Set 3) In the Galaxy rest frame, Alpha Centauri is 4.4 light-years away from us. My friend travels at $0.5\,c$ (relative to this frame) from us to A...
{"hexsha": "f3fac0a9841d8b17919a55a5615fcfbffb9c22a6", "size": 2317, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/make_exam3.py", "max_stars_repo_name": "davidwhogg/EinsteinsUniverse", "max_stars_repo_head_hexsha": "91babed322a5985a45ec827c030564cacbd49354", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import torch from torch import nn import numpy as np from music21 import midi from music21 import converter from music21 import note, stream, duration, tempo class MidiDataset(torch.utils.data.Dataset): def __init__(self, path, subset='train', n_bars=2, n_steps_per_bar=16): self.n_bars=n_...
{"hexsha": "2db67cb05431aca629a4ab7b6c46a18716500dac", "size": 2856, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/utils.py", "max_stars_repo_name": "yeong35/musegan", "max_stars_repo_head_hexsha": "5a226fe246bb85f4d91317908a2fe413cde8ca56", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_s...
from deep_sort.deep_sort import nn_matching from deep_sort.deep_sort.tracker import Tracker from deep_sort.application_util.preprocessing import non_max_suppression from deep_sort.deep_sort.detection import Detection import numpy as np class deepsort_rbc(): def __init__(self): self.metric = nn_matching....
{"hexsha": "4d3e1eac061485a16974368cf494d7b8394840e5", "size": 2339, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepsort.py", "max_stars_repo_name": "jvech/DeepSort_Yolo", "max_stars_repo_head_hexsha": "16ce856f7b56a9fa8d660fad7d2dc086c26152b2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max...
# -------------- # Import packages import numpy as np import pandas as pd from scipy.stats import mode # code starts here path = pd.read_csv(path) bank = pd.DataFrame(path) print(bank.head()) categorical_var = bank.select_dtypes(include='object') print(categorical_var.head()) numerical_var = bank.select_dtypes(i...
{"hexsha": "cfc56821ff557dd3807cdf6f37e4e6fecee7e8ae", "size": 1662, "ext": "py", "lang": "Python", "max_stars_repo_path": "Guided-Project-:-Loan-Approval-Analysis/code.py", "max_stars_repo_name": "HarshBedmutha/ga-learner-dsmp-repo", "max_stars_repo_head_hexsha": "acce0db9952700288a58ceee66fd173b5662ca1a", "max_stars_...
#!/usr/bin/env python # coding: utf-8 # In[1]: ''' Student_name: Reddivinod Reddy Student_ID : 21244404 github link for repo: https://github.com/Reddivinod/ARC.git ''' #!/usr/bin/python import os, sys import json import numpy as np import re ### YOUR CODE HERE: write at least three functions which solve ### speci...
{"hexsha": "f8187917e007a005c76b9671c756a8bce5737faa", "size": 7777, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/manual_solve.py", "max_stars_repo_name": "Reddivinod/ARC", "max_stars_repo_head_hexsha": "e00e9b8c22982bbc7b889a214d2742c9cd84c1d0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
import numpy as np import pandas as pd from ..punctuation_count import PunctuationCount from ..utils import PrimitiveT, find_applicable_primitives, valid_dfs class TestPunctuationCount(PrimitiveT): primitive = PunctuationCount def test_punctuation(self): x = pd.Series(['This is a test file.', ...
{"hexsha": "3ff653f084b00c9b5a37c1e1b9130fe06f5c1720", "size": 1654, "ext": "py", "lang": "Python", "max_stars_repo_path": "nlp_primitives/tests/test_punctuation_count.py", "max_stars_repo_name": "mikewcasale/nlp_primitives", "max_stars_repo_head_hexsha": "e42ff518f78fe2398c156e559b6d0fe222fd5cdd", "max_stars_repo_lice...
// $Id$ /*********************************************************************** Moses - factored phrase-based language decoder Copyright (c) 2006 University of Edinburgh All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following con...
{"hexsha": "fe703a57ad42310b7d3935fdcafb938eb5818b26", "size": 6620, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/decoder-phrasebased/src/native/decoder/moses/IOWrapper.cpp", "max_stars_repo_name": "ugermann/MMT", "max_stars_repo_head_hexsha": "715ad16b4467f44c8103e16165261d1391a69fb8", "max_stars_repo_lice...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import math from gv_tools.util.visual import draw_regions import argparse from gv_tools.tracking.tracking_region import TrackingRegion from gv_tools.util.text i...
{"hexsha": "5bccebedc040bf6dc85d4a00069ab4787033db9f", "size": 4886, "ext": "py", "lang": "Python", "max_stars_repo_path": "mot.py", "max_stars_repo_name": "xuehaouwa/pysot", "max_stars_repo_head_hexsha": "091c8ce2f63233f84505d2d7e45241bfaa5441f4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "ma...
""" A few convenience methods for quickly extracting/changing data in netCDFs """ import os from datetime import datetime import numpy as np from netCDF4 import Dataset from netCDF4 import num2date import netCDF4.utils import netcdftime import uuid # import netCDF4_utils, netcdftime # these make cx_freeze work import p...
{"hexsha": "26ad2f3e6c49c1a9a0db6ffb9e30295a78fa6665", "size": 26824, "ext": "py", "lang": "Python", "max_stars_repo_path": "netCDF_Utils/nc.py", "max_stars_repo_name": "shape87/WaveLab", "max_stars_repo_head_hexsha": "70eb6299dbceafacf95f2298ba469bb53881e7ec", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
[STATEMENT] lemma Sup_pres_Inf_pres: fixes f :: "'a::complete_boolean_algebra_alt_with_dual \<Rightarrow> 'b::complete_boolean_algebra_alt_with_dual" shows "(Sup_pres f) = (Inf_pres (\<partial>\<^sub>F f))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Sup_pres f = Inf_pres (\<partial>\<^sub>F f) [PROOF STEP] ...
{"llama_tokens": 143, "file": "Transformer_Semantics_Sup_Inf_Preserving_Transformers", "length": 1}
""" Test the basic example found in the README """ import numpy as np import reclab def test_basic_example(): """ Test the basic example in the READMe """ n_users = 1000 n_topics = 10 n_items = 20 env = reclab.make( 'topics-dynamic-v1', num_topics=n_topics, num_user...
{"hexsha": "1edf9537a7b483bff645ec337de01e69601f5bb2", "size": 858, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_simple_example.py", "max_stars_repo_name": "lematt1991/RecLab", "max_stars_repo_head_hexsha": "7ba212ac2ae346fb6dfeec232eef652d7f26e193", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
"""Example of computing precision recall curve """ #%% import matplotlib.pyplot as plt import numpy as np import sklearn.metrics as skm y_true = np.array([0, 0, 0, 0, 0, 1, 1, 1]) y_score = np.array([0.1, 0.4, 0.35, 0.7, 0.2, 0.3, 0.6, 0.8]) # tresholding, above 0.4 y_pred = (y_score>=0.4).astype(int) print(y_pred...
{"hexsha": "b87067603f6b205ecaa64e03f4a4e6b7f342d7e8", "size": 1642, "ext": "py", "lang": "Python", "max_stars_repo_path": "metrics/precision_recall_curve.py", "max_stars_repo_name": "ksopyla/scikit-learn-tutorial", "max_stars_repo_head_hexsha": "3a1a3df1fc39dcb8da5eec65b0297b28788b6a25", "max_stars_repo_licenses": ["M...
#!/usr/bin/env python """ Created by howie.hu at 2021/4/25. Description:数据加载工具类,参考:https://github.com/mhjabreel/CharCNN 感谢 Changelog: all notable changes to this file will be documented """ import numpy as np import pandas as pd class DataUtils: """ 此类用于加载原始数据 """ def __init__( s...
{"hexsha": "2ef830df881b8385a77ce172724d9a0b3d8fc307", "size": 4844, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/classifier/model_lib/char_cnn/data_utils.py", "max_stars_repo_name": "LeslieLeung/2c", "max_stars_repo_head_hexsha": "6b3a17cd614833e536b90ee130427d4cc538c1db", "max_stars_repo_licenses": ["Ap...
import numpy as np from text_selection.kld.kld_iterator import is_valid_counts_or_weights # region empty def test_s0_empty__returns_true(): counts = np.array([], dtype=np.int32) result = is_valid_counts_or_weights(counts, axis=0) assert result def test_s0x0_empty__returns_true(): counts = np.empty(shape=(0,...
{"hexsha": "8855172d0d6966a0d378cf6d1df6ff14b39b853a", "size": 3717, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/text_selection_tests/kld/kld_iterator_py/test_is_valid_counts_or_weights.py", "max_stars_repo_name": "stefantaubert/text-selection", "max_stars_repo_head_hexsha": "4b3b49005cbeb2e9212ed94686d8...
"""Q-Learning using Bellman Equation to solve a Reinforcement Learning problem. @author Victor I. Afolabi Artificial Intelligence & Software Engineer. Email: javafolabi@gmail.com | victor.afolabi@zephyrtel.com GitHub: https://github.com/victor-iyiola @project File: q_learning.py Cr...
{"hexsha": "41745c7cb82b5aabc1ebb92800cf03013ca1c2ed", "size": 6105, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl/policy/q_learning.py", "max_stars_repo_name": "victor-iyiola/deep-RL", "max_stars_repo_head_hexsha": "91f614676d375d9938976392dcff5eba933693ca", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma single_leadsETo_I: "(\<And>x. x \<in> A ==> F \<in> {x} leadsTo[CC] B) \<Longrightarrow> F \<in> A leadsTo[CC] B" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>x. x \<in> A \<Longrightarrow> F \<in> {x} leadsTo[CC] B) \<Longrightarrow> F \<in> A leadsTo[CC] B [PROOF STEP] by (subst UN_...
{"llama_tokens": 154, "file": null, "length": 1}
_throw_table_error() = throw(ArgumentError("Please specify the column that contains the targets explicitly, or provide a target-extraction-function as first parameter. see parameter 'f' in ?targets.")) # required data container interface LearnBase.nobs(dt::AbstractDataFrame) = DataFrames.nrow(dt) LearnBase.getobs(dt::...
{"hexsha": "a0ab5fc0937522f5c161a274bce3a3f06f89dea8", "size": 2125, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/datapattern.jl", "max_stars_repo_name": "ppalmes/MLDataUtils.jl", "max_stars_repo_head_hexsha": "d2bfa0eefd44ede1976d4931f792a8f5e314a686", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy as np sourcefile1 = ["./src/mqc/el_prop/el_propagator.pyx", "./src/mqc/el_prop/rk4.c"] sourcefile2 = ["./src/mqc/el_prop/el_propagator_xf.pyx", "./src/mqc/el_prop/rk4_xf.c"] sourcefile3 = ["....
{"hexsha": "5819fd7c7edc1e4f838d4c8ccf3f3ae055ec15b3", "size": 914, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup.py", "max_stars_repo_name": "hkimaf/unixmd", "max_stars_repo_head_hexsha": "616634c720d0589fd600e3268afab9da957e18bb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9, "max_stars_rep...
*--#[ log: * $Id: ffxd0h.f,v 1.6 1996/01/22 13:33:49 gj Exp $ * $Log: ffxd0h.f,v $ c Revision 1.6 1996/01/22 13:33:49 gj c Added the word 'error' to print statements in ffxuvw that u,v,w were wrong c c Revision 1.5 1995/12/08 10:48:32 gj c Changed xloss to xlosn to prevent spurious error messages. c c Revision 1....
{"hexsha": "fc6c62bf41e3a19b0438b356d0e4c02602cfdd0e", "size": 25859, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MCFM-JHUGen/QCDLoop/ff/ffxd0h.f", "max_stars_repo_name": "tmartini/JHUGen", "max_stars_repo_head_hexsha": "80da31668d7b7eb5b02bb4cac435562c45075d24", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import numpy import numpy.linalg def distance_sum(inputs, references): """Sum of all distances between inputs and references Each element should be in a row! """ norms = numpy.zeros(inputs.shape[0]) for i in xrange(references.shape[0]): norms += numpy.apply_along_axis(numpy.linalg.norm, 1...
{"hexsha": "955351f42a772eb848c0ae2b75d5d28ba1ff2a00", "size": 3033, "ext": "py", "lang": "Python", "max_stars_repo_path": "mir3/lib/knn.py", "max_stars_repo_name": "pymir3/pymir3", "max_stars_repo_head_hexsha": "c1bcca66a5ef1ff0ebd6373e3820e72dee6b0b70", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12, "max_...
[STATEMENT] lemma ma_plus: "(real_of r1 + real_of r2) = (if ma_compatible r1 r2 then real_of (ma_plus r1 r2) else Code.abort (STR ''different base'') (\<lambda> _. real_of r1 + real_of r2))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. real_of r1 + real_of r2 = (if ma_compatible r1 r2 then real_of (ma_pl...
{"llama_tokens": 198, "file": "Real_Impl_Real_Impl", "length": 1}
__precompile__() module PointClouds import Base: show, keys, haskey, getindex, setindex!, vcat, length, endof import NearestNeighbors: knn, inrange using NearestNeighbors using StaticArrays export PointCloud, # Point cloud data access positions, normals, # Spatial indexing knn, ...
{"hexsha": "4672a501db93513a6cbf3b5195a1002fe3a43f78", "size": 443, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PointClouds.jl", "max_stars_repo_name": "FugroRoames/PointClouds.jl", "max_stars_repo_head_hexsha": "da034e5aef5cadbd34e3dc6b9371d4b93a36dd71", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from typing import Tuple import numpy as np from numpy import cos, pi, sin, sqrt import pp from pp.component import Component @pp.cell def ellipse( radii: Tuple[float, float] = (10.0, 5.0), angle_resolution: float = 2.5, layer: Tuple[int, int] = pp.LAYER.WG, ) -> Component: """Generate an ellipse ge...
{"hexsha": "b20b9dae674f714961822b5e8460a2e06d7d4d7d", "size": 1343, "ext": "py", "lang": "Python", "max_stars_repo_path": "pp/components/ellipse.py", "max_stars_repo_name": "flaport/gdsfactory", "max_stars_repo_head_hexsha": "1f2e844c1fe27b9c6340e2d51500fd3358fa16e5", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from joblib import load from Preprocess.Tensor import processReynoldsStress, getBarycentricMapData, expandSymmetricTensor, contractSymmetricTensor,makeRealizable import time as t import numpy as np import pickle import os """ User Inputs, Anything Can Be Changed Here """ # Name of the flow case in both ML and test ml_...
{"hexsha": "18eff4dbdac3cdef7d4ca1c6eac2f2c683345348", "size": 13562, "ext": "py", "lang": "Python", "max_stars_repo_path": "Predict_RANS_Cluster.py", "max_stars_repo_name": "YuyangL/TurbulenceMachineLearning", "max_stars_repo_head_hexsha": "63fab542d61856df00ef176abe044cb80fdaa077", "max_stars_repo_licenses": ["MIT"],...
\documentclass[11pt]{article} \usepackage{graphicx} \usepackage{amssymb} \usepackage{multicol} \usepackage{epstopdf} \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png} \textwidth = 6.5 in \textheight = 9 in \oddsidemargin = 0.0 in \evensidemargin = 0.0 in \topmargin = 0.0 in \headhe...
{"hexsha": "4a415ed8eabddf974da033ef20d89a3403142210", "size": 3821, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "SplitDMD_KS-master/FEM code/kuramoto_1d.tex", "max_stars_repo_name": "jovanzigic/SplitDMD_KS", "max_stars_repo_head_hexsha": "ddfe2eb81ffcda58837e3e7fe63476ff578b8bf4", "max_stars_repo_licenses": ["...
#!/usr/bin/env python # Part of the psychopy_ext library # Copyright 2010-2015 Jonas Kubilius # The program is distributed under the terms of the GNU General Public License, # either version 3 of the License, or (at your option) any later version. """ A library of simple models of vision Simple usage:: import g...
{"hexsha": "cad9300bf802af6fcd78f5b8ab77e42d387898e9", "size": 88036, "ext": "py", "lang": "Python", "max_stars_repo_path": "psychopy_ext/models.py", "max_stars_repo_name": "qbilius/psychopy_ext", "max_stars_repo_head_hexsha": "1bde931f59eea95f73a4d7b635e7e98aed9ee0dd", "max_stars_repo_licenses": ["PSF-2.0"], "max_star...
# Implmenting a Stacked Autoencoder # Importing libraries import numpy as np # used for working with arrays import pandas as pd # import dataset, and create training and test set import torch # import PyTorch import torch.nn as nn # implement neural networks import torch.nn.parallel # # used for parallel computatio...
{"hexsha": "34c5f0bead465f5f8f4bd7e9f6c0c9d571a68404", "size": 11394, "ext": "py", "lang": "Python", "max_stars_repo_path": "built_ae.py", "max_stars_repo_name": "rikardsaqe/Movie-Recommendation-Tools", "max_stars_repo_head_hexsha": "6f0d7f95732807b7d8d4eefaa1a1053595526731", "max_stars_repo_licenses": ["MIT"], "max_st...
/- Copyright (c) 2018 Mario Carneiro and Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro and Kevin Buzzard -/ import order.order_iso import tactic.tidy import linear_algebra.subtype_module import linear_algebra.quotient_module import linea...
{"author": "khoek", "repo": "mathlib-tidy", "sha": "866afa6ab597c47f1b72e8fe2b82b97fff5b980f", "save_path": "github-repos/lean/khoek-mathlib-tidy", "path": "github-repos/lean/khoek-mathlib-tidy/mathlib-tidy-866afa6ab597c47f1b72e8fe2b82b97fff5b980f/linear_algebra/submodule.lean"}
#ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED #define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // bind/placeholders.hpp - _N definitions // // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. // Copyr...
{"hexsha": "d115e9c948de72e3020867de438c0d3d728eee2e", "size": 1957, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost/bind/placeholders.hpp", "max_stars_repo_name": "Liastre/uri", "max_stars_repo_head_hexsha": "f5a701d19e3dd9cec950dcc70f6a42f0d9151f89", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_c...
using Replay instructions = """ println("julia -q") """ replay(instructions, cmd="-q")
{"hexsha": "c34311a19402f8a8b5a65a8a463c7bc0165630a0", "size": 89, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/quietmode/app.jl", "max_stars_repo_name": "AtelierArith/Replay.jl", "max_stars_repo_head_hexsha": "fc1652434fa5270c4199784704120a7a9e2923ff", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
################################################################################ # The Neural Network (NN) based Speech Synthesis System # https://svn.ecdf.ed.ac.uk/repo/inf/dnn_tts/ # # Centre for Speech Technology Research # University of Edinburgh, UK # ...
{"hexsha": "e279c8babc57ef502bb9b9d5d662a1c19d56426b", "size": 9663, "ext": "py", "lang": "Python", "max_stars_repo_path": "cute/common/vocoder.py", "max_stars_repo_name": "bbepoch/TTS", "max_stars_repo_head_hexsha": "b573e611958c0984d761cae215a2f8c1f0b05109", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
/* * Copyright (c) 2014, Stanislav Vorobiov * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of ...
{"hexsha": "249c4389fd1d44b5e4d6bb423e940717f792d85a", "size": 5125, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "game/PlasmaComponent.cpp", "max_stars_repo_name": "Sheph/TriggerTime", "max_stars_repo_head_hexsha": "9265dee6a178e43bf7365e3aa2f7f2ca22df074f", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_sta...
[STATEMENT] lemma widen_NT_Class [simp]: "G \<turnstile> T \<preceq> NT \<Longrightarrow> G \<turnstile> T \<preceq> Class D" [PROOF STATE] proof (prove) goal (1 subgoal): 1. G \<turnstile> T \<preceq> NT \<Longrightarrow> G \<turnstile> T \<preceq> Class D [PROOF STEP] by (ind_cases "G \<turnstile> T \<preceq> NT", ...
{"llama_tokens": 136, "file": null, "length": 1}
/* @copyright Louis Dionne 2014 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #include <boost/hana/ext/boost/mpl/list.hpp> #include <boost/hana/detail/assert.hpp> #include <boost/mpl/list.hpp> using namespace boost::hana;...
{"hexsha": "948b873d03cfb831e577240b36edfbefd5a53fac", "size": 912, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/ext/boost/mpl/list/comparable/equal.cpp", "max_stars_repo_name": "rbock/hana", "max_stars_repo_head_hexsha": "2b76377f91a5ebe037dea444e4eaabba6498d3a8", "max_stars_repo_licenses": ["BSL-1.0"], "...
import os import subprocess import numpy as np filter_number = {'u':'0','g':'1','r':'2','i':'3','z':'4','Y':'5'} def encode_obshistid(atm, telescope, sensor, wavelength, filter_name, seed): mode = 0 if atm: mode += 1 if telescope: mode += 2 if sensor: mode += 4 mode_digit ...
{"hexsha": "dab77bd970d1f63655d8941a856f2294110de7f4", "size": 3165, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/phosim/validate/monochromatic_seeing/submit_job.py", "max_stars_repo_name": "DarkEnergyScienceCollaboration/chroma", "max_stars_repo_head_hexsha": "64fc123a065334b307654f29b3bea52885b46ec8", "...
import tkinter as tk import vlc import os import cv2 import HandTracking as ht import math import numpy as np import sys import time import platform if sys.version_info[0] < 3: import Tkinter as Tk from Tkinter import * from Tkinter.filedialog import askopenfilename else: import tkinter as Tk fro...
{"hexsha": "f96b46981f5c5b8cbbc7e9bfed420a570c5b1375", "size": 7793, "ext": "py", "lang": "Python", "max_stars_repo_path": "tkinter_gesture_class.py", "max_stars_repo_name": "dhruvak99/GBVC", "max_stars_repo_head_hexsha": "dc6267b858a28208ca9d1dd32886491a0197ec07", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torchvision from torchsort import soft_rank from .vits import vit_tiny, vit_small, vit_base, Head class ResNetNoPool(torchvision.models.ResNet): def __init__(self, *args, **kwargs): super().__init__(*args, **kwar...
{"hexsha": "56ad45d81674202b31be2d34cdd61c36bd4cc298", "size": 17411, "ext": "py", "lang": "Python", "max_stars_repo_path": "patch_game/builder.py", "max_stars_repo_name": "kampta/PatchGame", "max_stars_repo_head_hexsha": "12411e3202643217dd47a3590c413e95e960f1fc", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
from math import gamma import numpy as np from numba import njit as jit @jit def hyp2f1b(x): """Hypergeometric function 2F1(3, 1, 5/2, x), see [Battin]. .. todo:: Add more information about this function Notes ----- More information about hypergeometric function can be checked at ht...
{"hexsha": "822fc280aeb9edb6c1dc67ded04ec7011695ff50", "size": 1912, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/poliastro/_math/special.py", "max_stars_repo_name": "DhruvJ22/poliastro", "max_stars_repo_head_hexsha": "ac5fafc6d054b2c545e111e5a6aa32259998074a", "max_stars_repo_licenses": ["MIT"], "max_sta...
c c ----------------------------------------------------- c subroutine valout (lst, lend, time, nvar, naux) c use amr_module use geoclaw_module, only: rho use multilayer_module, only: num_layers implicit double precision (a-h,o-z) character(len=10) :: fname1, fname2, fname3, fname4 ...
{"hexsha": "5c3d3feb34f2f41a4b2fe5e30c2fda59e683a4ed", "size": 11244, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/2d/shallow/multilayer/valout.f", "max_stars_repo_name": "dlgeorge/geoclaw", "max_stars_repo_head_hexsha": "2b4ce9b1ba2532fe3ac38ee7c05297eb61e45bd1", "max_stars_repo_licenses": ["BSD-3-Clause...
# %% # things we need for NLP import nltk from nltk.stem.lancaster import LancasterStemmer stemmer = LancasterStemmer() import pickle import pandas as pd import numpy as np #import tensorflow as tf import tensorflow.compat.v1 as tf import random # %% from tensorflow.keras.models import Sequential, Model from tensorflow...
{"hexsha": "7f5f5bb12f61c2154db41c50c75aef21dbab0cb7", "size": 4620, "ext": "py", "lang": "Python", "max_stars_repo_path": "start_cmd.py", "max_stars_repo_name": "abheeshtroy/Musoassist-Chatbot", "max_stars_repo_head_hexsha": "0acdc60a273436c2385e68453b0a9411a85e60e2", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
# --- # jupyter: # jupytext: # formats: ipynb,py:light # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.3.4 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # + from sklearn.datasets...
{"hexsha": "f207050cae0d3a10b1eee7486781a7bb21a025ea", "size": 7166, "ext": "py", "lang": "Python", "max_stars_repo_path": "z_xgboost_aki_tesing_w0.py", "max_stars_repo_name": "sxinger/xgboost", "max_stars_repo_head_hexsha": "779e8dd305c857c64edfd6b4a6f87a51986b9211", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
# Loading dependencies import os import numpy as np import matplotlib.pyplot as plt from .BaseLCA import BaseLCA class LCA(BaseLCA): def __init__(self, **params): super().__init__(**params) '''The first monte carlo analyzer in GIAMS This module conducts life cycle analysis with the help of a simulator ...
{"hexsha": "716a0fc570c43c7983016662aaca85b8cf31b2fe", "size": 8456, "ext": "py", "lang": "Python", "max_stars_repo_path": "LifeCycleAnalyzer/LCA.py", "max_stars_repo_name": "vd1371/GIAMS", "max_stars_repo_head_hexsha": "dd6551f344b8d0377131d4496846eb5d03b6189c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
#include <boost/range.hpp> #include <boost/range/irange.hpp> #include <boost/range/adaptors.hpp> #include <boost/phoenix.hpp> #include <boost/detail/lightweight_test.hpp> using namespace boost::phoenix::arg_names; using namespace boost::adaptors; int foo() { return 5; } int main() { BOOST_TEST((*boost::begin(bo...
{"hexsha": "2a6d39ec12094d813e716f26bb2e3b16d7332565", "size": 398, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "boost/libs/phoenix/test/regression/bug5626.cpp", "max_stars_repo_name": "randolphwong/mcsema", "max_stars_repo_head_hexsha": "eb5b376736e7f57ff0a61f7e4e5a436bbb874720", "max_stars_repo_licenses": ["B...
# pylint: skip-file import sys import mxnet as mx import numpy as np import tempfile import random import string def test_recordio(): frec = tempfile.mktemp() N = 255 writer = mx.recordio.MXRecordIO(frec, 'w') for i in range(N): if sys.version_info[0] < 3: writer.write(str(chr(i)))...
{"hexsha": "f4489bdfe6411c3eea1858d1c8edc48b496ffb4a", "size": 2031, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/python/unittest/test_recordio.py", "max_stars_repo_name": "axbaretto/mxnet", "max_stars_repo_head_hexsha": "5f593885356ff6d14f5519fa18e79b944beb51cd", "max_stars_repo_licenses": ["Apache-2.0...
""" This is super! ============== """ super import numpy as np np.sin @np.vectorize def vectorized(x): pass
{"hexsha": "fdd290e2fa96606f86bcd72d6289e467933b83f7", "size": 115, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/sphinx-tree/examples/refs.py", "max_stars_repo_name": "anntzer/sphinx-exhibit", "max_stars_repo_head_hexsha": "5bdb0c41ef5bde3aea72b48e5aebe292696c53c1", "max_stars_repo_licenses": ["MIT"], "...