text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
const USE_GPU = false # Use GPU? If this is set false, then no GPU needs to be available using ParallelStencil using ParallelStencil.FiniteDifferences2D @static if USE_GPU @init_parallel_stencil(CUDA, Float64, 2) macro pow(args...) esc(:(CUDA.pow($(args...)))) end macro tanh(args...) esc(:(CUDA.tanh($(arg...
{"hexsha": "e7a6e4f1149f7af2fc08fe5519b23784d3ac74bb", "size": 11629, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "miniapps/HydroMech2D.jl", "max_stars_repo_name": "deconvolution/ParallelStencil.jl", "max_stars_repo_head_hexsha": "58dddae5ba46053fa4a942e2a271422d97f6013e", "max_stars_repo_licenses": ["BSD-3-Cl...
# phylo/manipulation.jl # ===================== # # Types and methods for phylogenetic trees. # # Part of the Bio.Phylo module. # # This file contains methods for manipulating the structure of phylogenies. # # This file is a part of BioJulia. License is MIT: https://github.com/BioJulia/Bio.jl/blob/master/LICENSE.md ...
{"hexsha": "df8136eca19d035feef2b6c6373f6543ef6f6c87", "size": 2152, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/manipulation.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Phylogenies.jl-875022e3-a016-506a-99d3-0712b6c7904b", "max_stars_repo_head_hexsha": "1eaa2d838ed3eba02a8a51608771e82f144...
""" Nanocar Avogadro 2 plug-in - LAMMPS setup. Write LAMMPs simulation input files. Author: Kutay B. Sezginel Date: November 2018 """ import os import sys import json import argparse from angstrom import Molecule import numpy as np import periodictable from lammps_writer import write_data_file, write_input_file FF_L...
{"hexsha": "49e8724de2a16d55b63eebb815f331b54f246b57", "size": 4333, "ext": "py", "lang": "Python", "max_stars_repo_path": "lammps_setup.py", "max_stars_repo_name": "mss1451/nanocar-avogadro", "max_stars_repo_head_hexsha": "429a14482a6768da2cecd3ef2546318791516dec", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
import pandas as pd from todoist.api import TodoistAPI import os import sys import numpy as np import datetime def create_api(): try: token = os.environ['TODOIST_TOKEN'] except KeyError: sys.stderr.write("TODOIST_* environment variable not set\n") sys.exit(1) api = TodoistAPI(token...
{"hexsha": "a4555ab06cd28bdca18b01cc2b1deee6f7203bc4", "size": 5045, "ext": "py", "lang": "Python", "max_stars_repo_path": "todoist_functions.py", "max_stars_repo_name": "ElvinOuyang/todoist-history-analytics", "max_stars_repo_head_hexsha": "f3eb9629c84e3878af39524e8e5694bd3c743973", "max_stars_repo_licenses": ["MIT"],...
import numpy as np import tensorflow as tf from pre_processing import get_data X_test, y_test, X_train, y_train = get_data() print(X_test.shape) print(y_test.shape) print(X_train.shape) print(y_train.shape) x_in = tf.placeholder(tf.float32, [None, 22, 1000], name="input_x") y_real = tf.placeholder(tf.int32, [None], ...
{"hexsha": "75e4936c56f865ac94dc7f264bc68964de318fab", "size": 2157, "ext": "py", "lang": "Python", "max_stars_repo_path": "vanilla_cnn.py", "max_stars_repo_name": "charliezjw/Neural-Signal-Decoder", "max_stars_repo_head_hexsha": "fb0df09ba0314724c7c90141bd47cc8fb0201b7a", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" Methods to simplify making routine / standard plots. """ import numpy as np import copy import matplotlib import matplotlib.pyplot as plt import matplotlib.colors as colors import astropy.units as u from astropy.visualization.wcsaxes import WCSAxes from astropy.coordinates import SkyCoord # simply importing sunp...
{"hexsha": "cf8087c810bdfe7149bd892e0b3bcdb54b694589", "size": 14422, "ext": "py", "lang": "Python", "max_stars_repo_path": "chmap/utilities/plotting/euv_fits_plotting.py", "max_stars_repo_name": "predsci/CHD", "max_stars_repo_head_hexsha": "35f29d1b62861f4ffed57b38d18689b282664bcf", "max_stars_repo_licenses": ["Apache...
-- --------------------------------------------------------------------- -- Ejercicio. Demostrar que el rango de la función exponencial es el -- conjunto de los números positivos, -- ---------------------------------------------------------------------- import analysis.special_functions.exp_log open set real example...
{"author": "jaalonso", "repo": "Matematicas_en_Lean", "sha": "c44e23d87665cb4aa00c813c6bfb3c41ebc83aa8", "save_path": "github-repos/lean/jaalonso-Matematicas_en_Lean", "path": "github-repos/lean/jaalonso-Matematicas_en_Lean/Matematicas_en_Lean-c44e23d87665cb4aa00c813c6bfb3c41ebc83aa8/src/Conjuntos/Rango_de_la_exponenci...
#!/usr/bin/python # -*- coding: utf-8 -*- # Otetaan tarvittavat kirjastot mukaan. import numpy as np import math import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State from flask import Flask import dash_daq as daq import os # Perustetaa...
{"hexsha": "c33ae25a0a610ec03ee5d73ce1f4325ee410b6bc", "size": 15119, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "tuopouk/solidautoilu", "max_stars_repo_head_hexsha": "c8eba706e6ea04c2958c728d14cc88bd0d47582a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
import numpy as np from pyscf import lo from pyscf.tools import molden, cubegen from functools import reduce from math import sqrt from pydmfet import tools from pydmfet.qcwrap.pyscf_rks_ao import rks_ao class proj_embed: def __init__(self, mf_full, cluster, Ne_env = None, loc_method = 'PM', pop_method = 'meta_lo...
{"hexsha": "227252aea738b3bfb593a9a8776dddc62224d8c2", "size": 4259, "ext": "py", "lang": "Python", "max_stars_repo_path": "pydmfet/proj_ao/proj_embed.py", "max_stars_repo_name": "fishjojo/pydmfe", "max_stars_repo_head_hexsha": "93cfc655314933d3531b5733521a1f95a044f6cb", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
/* * Copyright (c) 2017 Lech Kulina * * This file is part of the Realms Of Steel. * For conditions of distribution and use, see copyright details in the LICENSE file. */ #include <boost/bind.hpp> #include <boost/range.hpp> #include <Application/Logger.h> #include "OpenGLErrors.h" #include "OpenGLIndexBuffer.h" st...
{"hexsha": "b157dcfd0c5c3bc562ac0664ae2f811fca83908a", "size": 3980, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "engine/source/graphics/OpenGLIndexBuffer.cpp", "max_stars_repo_name": "lechkulina/RealmsOfSteel", "max_stars_repo_head_hexsha": "adeb53295abfa236a273c2641f3f9f4d4c6110e1", "max_stars_repo_licenses":...
# Upbit Open API # # ## REST API for Upbit Exchange - Base URL: [https://api.upbit.com] - Official Upbit API Documents: [https://docs.upbit.com] - Official Support email: [open-api@upbit.com] # # OpenAPI spec version: 1.0.0 # Contact: ujhin942@gmail.com # Generated by: https://github.com/swagger-api/swagger-codegen.gi...
{"hexsha": "b19f24c1d47be50ed952a5bf875fc05d1b134790", "size": 9901, "ext": "r", "lang": "R", "max_stars_repo_path": "swg_generated/r/R/CandleDays.r", "max_stars_repo_name": "Reclusive-Trader/upbit-client", "max_stars_repo_head_hexsha": "ca1fb02c9d4e22f6d726baf30a455a235ce0324a", "max_stars_repo_licenses": ["MIT"], "ma...
// // Copyright (c) 2021 Vinnie Falco (vinnie dot falco at gmail dot com) // // 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) // // Official repository: https://github.com/boostorg/beast // #ifndef BOOST_HTTP_PROTO_...
{"hexsha": "cbb6e7fef3bbe4beb437704a2ac035ee2bb41403", "size": 3979, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/http_proto/impl/headers_view.hpp", "max_stars_repo_name": "vinniefalco/http_proto", "max_stars_repo_head_hexsha": "05e124a35d6b1d6addabf2875ebcc4a444d9ec3f", "max_stars_repo_licenses":...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Plots Figure 13.5 which illustrates Hüurzeler and Künsch's method for using CRN (common random numbers) when evaluating the log-likelihood function. See Chapter 13 (MLE) for more details. Note: takes less than one minute. """ from __future__ import division, print_...
{"hexsha": "9eedd1d9c3018d471d2c1301dd4677c7e3764100", "size": 2283, "ext": "py", "lang": "Python", "max_stars_repo_path": "book/mle/hurzeler_kunsch.py", "max_stars_repo_name": "jonjonw/particles", "max_stars_repo_head_hexsha": "95dfe311e3a2a615fbdfdffa6492cd4391c152ad", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#ifdef STAND_ALONE # define BOOST_TEST_MODULE Main #else #ifndef _WIN32 # define BOOST_TEST_MODULE Assembler #endif #endif #include <boost/test/unit_test.hpp> #include "assembler_tests.h" BOOST_FIXTURE_TEST_SUITE( AssemblerTestSuite, AssemblerFixture ) BOOST_AUTO_TEST_CASE( DummyTest ) { // TODO } BOOST_AUTO_...
{"hexsha": "72075cc06e73d2e6af385933f6b359e59fd2676b", "size": 337, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/AssemblerTests/assembler_tests.cpp", "max_stars_repo_name": "faouellet/CHIP-16", "max_stars_repo_head_hexsha": "f85aed30d849052ac057092b124321953de80db6", "max_stars_repo_licenses": ["BSD-3-Claus...
[STATEMENT] lemma bernoulli_1 [simp]: "bernoulli 1 = -1/2" [PROOF STATE] proof (prove) goal (1 subgoal): 1. bernoulli 1 = - 1 / 2 [PROOF STEP] by (simp add: bernoulli_Suc)
{"llama_tokens": 86, "file": "Bernoulli_Bernoulli", "length": 1}
import spglib import numpy as np def irreducible_kpoints(structure, kpoints): """use spglib to compute number of irreducible k-points. Keyword arguments: structure -- aiida structure object kpoints -- aiida kpoint object Returns: nr -- number of irreducible k-points mapping -- spglib ...
{"hexsha": "70e562053e228ecf2520bdf351510a6ffbb8195d", "size": 1070, "ext": "py", "lang": "Python", "max_stars_repo_path": "aiida_sirius/helpers/kpoints.py", "max_stars_repo_name": "simonpintarelli/aiida-sirius", "max_stars_repo_head_hexsha": "5dc968cc4a98a5d0b018f54c4c7023b2a2682795", "max_stars_repo_licenses": ["MIT"...
export BallOnPlate """ BallOnPlate The single-axis ball on a plate system example with a single actuator. This system is a 2-state 1-input discrete-time system with bounds on both the states and the inputs. This example is from Section 9.6 of [1]. [1] S. Richter, ‘Computational complexity certification of gra...
{"hexsha": "20d882bec81ad34f4d3238a4de5faa98be6272b8", "size": 1154, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/benchmarks/ballOnPlate.jl", "max_stars_repo_name": "imciner2/ControlBenchmarks.jl", "max_stars_repo_head_hexsha": "f11f4a98bd8ab2923771b72e7f0d4c60302207c8", "max_stars_repo_licenses": ["MIT"],...
import numpy as np import torch from tqdm import tqdm import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import pickle import matplotlib.pyplot as plt import matplotlib.cm as cm from copy import deepcopy from tensorboardX import SummaryWriter import os import cProfile def plot_re...
{"hexsha": "638303071d60a72f36e3b040ad65ad08928940eb", "size": 14899, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch/HMC/hmc_sampler.py", "max_stars_repo_name": "andrewfoongyk/cs230-code-examples", "max_stars_repo_head_hexsha": "8e12aa3414bdada6ec6002bedf919a6816ba237c", "max_stars_repo_licenses": ["MIT...
from typing import Dict from typing import List import numpy as np import pandas as pd import pytest from etna.analysis.feature_relevance import StatisticsRelevanceTable from etna.datasets import TSDataset from etna.datasets import generate_ar_df from etna.datasets import generate_periodic_df from etna.transforms.gal...
{"hexsha": "08fdb04013d927c6798a466f66db41ff0d0fa70b", "size": 21905, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_transforms/test_gale_shapley.py", "max_stars_repo_name": "Carlosbogo/etna", "max_stars_repo_head_hexsha": "b6210f0e79ee92aa9ae8ff4fcfb267be9fb7cc94", "max_stars_repo_licenses": ["Apach...
#encoding=utf-8 import os import json import argparse import numpy as np import torch import torch.nn as nn from typing import NamedTuple from transformers import AdamW, get_linear_schedule_with_warmup from dataset import MyCLVCGTokenizer from models import Config as ModelConfig from models import ...
{"hexsha": "26c15e0db5d82a9e23c14a9241b1561db082d9ab", "size": 6440, "ext": "py", "lang": "Python", "max_stars_repo_path": "pretrain.py", "max_stars_repo_name": "zengzh72/CMVCG", "max_stars_repo_head_hexsha": "d8e308882c8d6af9c402d6c917afea6440d7a2d3", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null,...
# BLS_QCEW.py (flowsa) # !/usr/bin/env python3 # coding=utf-8 ''' Pulls Quarterly Census of Employment and Wages data in NAICS from Bureau of Labor Statistics Writes out to various FlowBySector class files for these data items EMP = Number of employees, Class = Employment PAYANN = Annual payroll ($1,000), Class = Money...
{"hexsha": "c2b9d741113511fc4629b53ac1bbc49fd7e88271", "size": 8118, "ext": "py", "lang": "Python", "max_stars_repo_path": "flowsa/BLS_QCEW.py", "max_stars_repo_name": "ealonso-mfa/flowsa", "max_stars_repo_head_hexsha": "d3ccc98a39bacdf23c4bbf090041626286fd7116", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count...
[STATEMENT] lemma delete_edges_correct: "FiniteGraph.delete_edges (list_graph_to_graph G) (set E) = list_graph_to_graph (delete_edges G E)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. FiniteGraph.delete_edges (list_graph_to_graph G) (set E) = list_graph_to_graph (FiniteListGraph.delete_edges G E) [PROOF STEP]...
{"llama_tokens": 354, "file": "Network_Security_Policy_Verification_Lib_FiniteListGraph", "length": 2}
/***************************************************************************** * * File: sssp_gold.cpp * Author: Alex Stivala * Created: February 2011 * * $Id: sssp_gold.cpp 668 2011-09-08 04:40:08Z astivala $ * * Get single-source shortest path on CPU for verification. * Uses Dijkstra's algorithm from th...
{"hexsha": "4f373c449a7c27a0ba82c21990b612d27bff9787", "size": 3141, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "trunk/cuda_sssp_double/sssp_gold.cpp", "max_stars_repo_name": "stivalaa/traffic_assignment", "max_stars_repo_head_hexsha": "45378558af73feeaf9e6491612c93dba042cb5ec", "max_stars_repo_licenses": ["MI...
""" Code for training deep CNNs. Takes the model name of the model to train and runs for the desired number of epochs. Measures training and validation accuracy and stores this data to be graphed later. Implements adaptive learning rate. """ import torch import torchvision import torch.nn as nn import torch.opti...
{"hexsha": "c303106042238abe7c89a4bf65f2aaabfe31e312", "size": 7351, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/train/train.py", "max_stars_repo_name": "cdmacfadyen/classify-modality", "max_stars_repo_head_hexsha": "fe4dadbd3a52a59e51c192a6cb16bacf394f4473", "max_stars_repo_licenses": ["MIT"], "max_star...
import unittest import numpy as np from pyorick import * # pyorick exposes only intended APIs # non-APIs which must be exposed for testing from pyorick import Message, YorickVar, YorickHold, YorickVarCall from pyorick import (ID_EOL, ID_EVAL, ID_EXEC, ID_GETVAR, ID_SETVAR, ID_FUNCALL, ID_SUBCALL...
{"hexsha": "b72f35f2d499d31979a90d7183658dee1bb24b52", "size": 16711, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyorick/test_pyorick.py", "max_stars_repo_name": "trmwzm/pyorick", "max_stars_repo_head_hexsha": "d16af9e0856920d74ea38db2fe9c951e26d765ba", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star...
module SPCSpectra using Dates export SPC mutable struct SPC data::Vector{Tuple{Vector{<:Number}, Vector{Float32}}} # xdata can be Float64 if calculated from range specs zdata::Vector{Float32} xlabel::String ylabel::String zlabel::String experimenttype::String timestamp::DateTime param...
{"hexsha": "35af6129594621edf11675c290ce45bb5006f5cf", "size": 11801, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/SPCSpectra.jl", "max_stars_repo_name": "hhaensel/SPCSpectra.jl", "max_stars_repo_head_hexsha": "e9cc0bfae3f5507983dfd0e512c1b92e20bd4529", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
from matplotlib.patches import _Style, FancyArrowPatch from matplotlib.transforms import IdentityTransform from matplotlib.path import Path import numpy as np class _FancyAxislineStyle(object): class SimpleArrow(FancyArrowPatch): """ The artist class that will be returned for SimpleArrow style. ...
{"hexsha": "7c9c0a9711b65fcb85ef6fa15731f54ae487ad1b", "size": 5107, "ext": "py", "lang": "Python", "max_stars_repo_path": "PythonAPI/carissma_project/lib/python3.5/site-packages/mpl_toolkits/axisartist/axisline_style.py", "max_stars_repo_name": "AbdulHoffmann/carla_carissma", "max_stars_repo_head_hexsha": "8d382769ffa...
function M = xfm_read(fname) % M = xfm_read(fname) % % xfm_read.m % % Original Author: Bruce Fischl % CVS Revision Info: % $Author: nicks $ % $Date: 2011/03/02 00:04:13 $ % $Revision: 1.4 $ % % Copyright © 2011 The General Hospital Corporation (Boston, MA) "MGH" % % Terms and conditions for use, reproduction...
{"author": "vistalab", "repo": "vistasoft", "sha": "7f0102c696c091c858233340cc7e1ab02f064d4c", "save_path": "github-repos/MATLAB/vistalab-vistasoft", "path": "github-repos/MATLAB/vistalab-vistasoft/vistasoft-7f0102c696c091c858233340cc7e1ab02f064d4c/external/freesurfer/xfm_read.m"}
[STATEMENT] lemma det_linear_rows_sum: assumes fS: "finite S" and a: "a \<in> {0..<n} \<rightarrow> S \<rightarrow> carrier_vec n" shows "det (mat\<^sub>r n n (\<lambda> i. finsum_vec TYPE('a :: comm_ring_1) n (a i) S)) = sum (\<lambda>f. det (mat\<^sub>r n n (\<lambda> i. a i (f i)))) {f. (\<forall>i\<i...
{"llama_tokens": 1673, "file": "Jordan_Normal_Form_Determinant", "length": 11}
# -*- coding: utf-8 -*- """ BasicWorm, WormPartition, JSON_Serializer Credit to Christopher R. Wagner at http://robotfantastic.org/serializing-python-data-to-json-some-edge-cases.html for the following six functions: isnamedtuple serialize restore data_to_json json_to_data nested_equal """ import numpy as np import ...
{"hexsha": "8a16521c64451b06ae01c0293d0fd203c1fc9597", "size": 24726, "ext": "py", "lang": "Python", "max_stars_repo_path": "open_worm_analysis_toolbox/prefeatures/basic_worm.py", "max_stars_repo_name": "suzil/open-worm-analysis-toolbox", "max_stars_repo_head_hexsha": "ea1d3cddcefb6724e3d531cbced32092ac431411", "max_st...
def ConvertBaselineJson(siteUuidList): userUuidCards = pd.DataFrame() for siteUuid in tqdm(siteUuidList): SiteuserUuidCards = GetBaselineJson([siteUuid]) if len(SiteuserUuidCards) == 0: continue columns = [col for col in SiteuserUuidCards if col.startswith('cardIds')] ...
{"hexsha": "30be711dbf3a72312c7ac5452375723749dae101", "size": 15037, "ext": "py", "lang": "Python", "max_stars_repo_path": "sample/helpers/helpers.py", "max_stars_repo_name": "aeorfei/aggregate-incremental", "max_stars_repo_head_hexsha": "aa63b6139d8edc335d6d789ff1a3eabea1ae33e5", "max_stars_repo_licenses": ["BSD-2-Cl...
theory T72 imports Main begin lemma "( (\<forall> x::nat. \<forall> y::nat. meet(x, y) = meet(y, x)) & (\<forall> x::nat. \<forall> y::nat. join(x, y) = join(y, x)) & (\<forall> x::nat. \<forall> y::nat. \<forall> z::nat. meet(x, meet(y, z)) = meet(meet(x, y), z)) & (\<forall> x::nat. \<forall> y::nat. \<forall> z::nat...
{"author": "inpefess", "repo": "residuated-binars", "sha": "330aaa51b6dbcaa06f8a6d15fe17c1ce58ae2a59", "save_path": "github-repos/isabelle/inpefess-residuated-binars", "path": "github-repos/isabelle/inpefess-residuated-binars/residuated-binars-330aaa51b6dbcaa06f8a6d15fe17c1ce58ae2a59/involution/task4/T72.thy"}
from .models import movies, meansize import numpy as np import pandas as pd x = [] vectors = {} y = [] ms = {} def jaccard_sim(x, y): if len(x) == len(y): inter = np.logical_and(x,y) union = np.logical_or(x,y) similarity = inter.sum()/ float(union.sum()) # print similarity return similar...
{"hexsha": "7b67fa27d85fd16b5ccefcacf688f4e98003b7d7", "size": 1355, "ext": "py", "lang": "Python", "max_stars_repo_path": "maps/recommendation.py", "max_stars_repo_name": "OrangeKing/pyRecommender", "max_stars_repo_head_hexsha": "b572c6cf0e4efe6e78f0b42c27316b26206689cd", "max_stars_repo_licenses": ["MIT"], "max_stars...
from OkDatabase import OkDatabase from Database import Database from InstagramDatabase import InstagramDatabase import numpy as np import numpy.lib.recfunctions as recfunctions class OkInitializer(object): def add_friends_by_link(self, user_id, reference): if ('ok.ru/profile/' in reference): u...
{"hexsha": "b2ed2e6b7618040122f175cc1672d5efc8746a65", "size": 4218, "ext": "py", "lang": "Python", "max_stars_repo_path": "OkInitializer.py", "max_stars_repo_name": "vanavski/vk_inst_ok_mutual_friends", "max_stars_repo_head_hexsha": "6e8e1ff52222656af6186148977d6e0972ac789e", "max_stars_repo_licenses": ["Apache-2.0"],...
```python import holoviews as hv hv.extension('bokeh') hv.opts.defaults(hv.opts.Curve(width=500), hv.opts.Image(width=500, colorbar=True, cmap='Viridis')) ``` ```python import numpy as np import scipy.signal import scipy.fft from IPython.display import Audio ``` # Análisis de señales no estacionari...
{"hexsha": "acf1df2a22d1303e03211cb43638a1b17cd497a0", "size": 24264, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "lectures/unit2/lecture1.ipynb", "max_stars_repo_name": "phuijse/UACH-INFO183", "max_stars_repo_head_hexsha": "0e1b6bef0bd80cda2753bd11e62016268f2de638", "max_stars_repo_licenses": ["...
mutable struct Tree{T} value::T lchild::Nullable{Tree{T}} rchild::Nullable{Tree{T}} end function replaceall!(t::Tree{T}, v::T) where T t.value = v isnull(lchild) || replaceall(get(lchild), v) isnull(rchild) || replaceall(get(rchild), v) return t end
{"hexsha": "0af70095a881310b09bdc4ca797dc566d92e694c", "size": 279, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "lang/Julia/parametric-polymorphism.jl", "max_stars_repo_name": "ethansaxenian/RosettaDecode", "max_stars_repo_head_hexsha": "8ea1a42a5f792280b50193ad47545d14ee371fb7", "max_stars_repo_licenses": ["M...
import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.metrics import roc_auc_score import timeit from sklearn.linear_model import Ridge from efficient_learning.model import * FILE = 'data/movie_reviews_use.pkl' ### load data def load_data(): df = pd.read_pickle(FI...
{"hexsha": "0d1d99799ac5871d76284ca3962673bde5d3a8bc", "size": 2413, "ext": "py", "lang": "Python", "max_stars_repo_path": "bench_speed.py", "max_stars_repo_name": "tkanchin/adaptive_reg_active_learning", "max_stars_repo_head_hexsha": "2526eace737a372a3e196cbe2c3f40afa62d2304", "max_stars_repo_licenses": ["MIT"], "max_...
From mathcomp Require Import all_ssreflect. Require Import Util Types Term Typing. Lemma typed_rename M G t T : typed M G t T -> forall G' r, (forall d x, nth d G x = nth d G' (r x)) -> typed M G' (rename r t) T. Proof. induction 1 => /= ? ? Hnth; eauto. - apply /typed_var => // ?. by rewrite -Hnth H. ...
{"author": "fetburner", "repo": "type-infer", "sha": "11192dd3f7385e98a33cb58ee53a47f882533618", "save_path": "github-repos/coq/fetburner-type-infer", "path": "github-repos/coq/fetburner-type-infer/type-infer-11192dd3f7385e98a33cb58ee53a47f882533618/theories/TypeSafety.v"}
from __future__ import absolute_import, division, print_function from ctd import DataFrame, derive_cnv, lp_filter from ctd.utilities import Path import numpy as np import pytest data_path = Path(__file__).parent.joinpath('data') @pytest.fixture def load_spiked_ctd(name): return DataFrame.from_cnv(data_path....
{"hexsha": "2c69ddb397ab4f3edd8eee74573a627ced8f713e", "size": 2288, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_processing.py", "max_stars_repo_name": "brorfred/python-ctd", "max_stars_repo_head_hexsha": "86e039ec1ab406283713d2bab8ef47dce1905d9c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
"""Use Wordshoal model to estimate ideology from Senate speeches. Wordshoal [1] fits speeches in two stages. First, for speaker i at debate t, the count of word j is denoted by y_{ijt} and is distributed: y_{ijt} ~ Pois(exp(nu_{it} + lambda_{jt} + chi_{it} * b_{jt})), where psi_{it} is the ideal point for debate t...
{"hexsha": "7b045b3690750bddb8d30d382de39193ef8bdfe3", "size": 30366, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_comparison/wordshoal.py", "max_stars_repo_name": "n-longuetmarx/tbip", "max_stars_repo_head_hexsha": "c6f137167aec8075c2ae98183cdf4c5e7dbc700a", "max_stars_repo_licenses": ["MIT"], "max_sta...
import datetime import warnings import numpy as np from estimagic.differentiation.derivatives import first_derivative from estimagic.exceptions import get_traceback from estimagic.logging.database_utilities import append_row from estimagic.utilities import hash_array DERIVATIVE_ERROR_MESSAGE = ( "Error during de...
{"hexsha": "831bf2d514bd14abaa184ece9260db339d2e0da6", "size": 19039, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/estimagic/optimization/internal_criterion_template.py", "max_stars_repo_name": "OpenSourceEconomics/estimagic", "max_stars_repo_head_hexsha": "85163b4cdc601d60d654c6ca1f42b9db17a130a3", "max_...
# stolen from http://nbviewer.jupyter.org/github/BVLC/caffe/blob/master/examples/brewing-logreg.ipynb import time start_time = time.time() import os caffe_home = os.environ['CAFFE_HOME'] import sys sys.path.insert(0, os.path.join(caffe_home, 'python')) import caffe import h5py import numpy as np import pickle import...
{"hexsha": "605f10445c9bf8973333b9ba12185eeae43df359", "size": 5525, "ext": "py", "lang": "Python", "max_stars_repo_path": "classification/mnlr.py", "max_stars_repo_name": "joshrule/matlab-utils", "max_stars_repo_head_hexsha": "8780791dd42d4afa3b7a3c2884ec42fae3f8face", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# 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, # distribute, sublicense, and/or sell copi...
{"hexsha": "9c459b3b9bae85c4a3a9072edb40e0c9cf816be3", "size": 21443, "ext": "py", "lang": "Python", "max_stars_repo_path": "dnet/network.py", "max_stars_repo_name": "ZiiCee/dnet", "max_stars_repo_head_hexsha": "2777ef76a6f74142652ef6ca1b89f6a45f2b57f6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_st...
# stdlib imports from collections import OrderedDict from xml.dom import minidom import sys from urllib.request import urlopen import warnings from datetime import datetime import os.path import json # third party imports import numpy as np import pandas as pd from obspy.io.quakeml.core import Unpickler from obspy.cli...
{"hexsha": "eae627e1b33a0a6378837947c05a364fb23acd01", "size": 32916, "ext": "py", "lang": "Python", "max_stars_repo_path": "libcomcat/dataframes.py", "max_stars_repo_name": "NLTGit/libcomcat", "max_stars_repo_head_hexsha": "82b5517bd7e5461a8effd6e50b18ada05a912b71", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars...
# -*- coding: utf-8 -*- """ Created on Sat Mar 27 19:14:01 2021 Figure 3.2: The comparison of the shrinkage parameter, MSE and Riemannian dist- ance for Ledoit-Wolf shrinkage and grid search. """ from matplotlib import pyplot as plt import numpy as np from pyriemann.utils.distance import distanc...
{"hexsha": "b6b49e875e003e98c06ce5ea6416064467cfcfe7", "size": 11337, "ext": "py", "lang": "Python", "max_stars_repo_path": "figures/figure_3_2.py", "max_stars_repo_name": "Racemuis/epoch-based-covariance-estimates", "max_stars_repo_head_hexsha": "9ae2faba05c043031bfdb69c6937492d18c7db1e", "max_stars_repo_licenses": ["...
Require Import Setoid. Require Import Statement. Definition fn { T U V : Type } (P : T >> U) (Q : U >> V) : T >> V := fun s s' => (exists sx, P s sx /\ Q sx s') /\ (forall sx, P s sx -> exists s', Q sx s'). Notation "P ⊟ Q" := (fn P Q) (at level 90, right associativity, format "P ⊟ Q"). Theorem assoc : forall {...
{"author": "bsall", "repo": "AMToPR-ICFEM-2019", "sha": "980d6d6ef5c9ad72a6b2cbd4fa549bc4705f0bed", "save_path": "github-repos/coq/bsall-AMToPR-ICFEM-2019", "path": "github-repos/coq/bsall-AMToPR-ICFEM-2019/AMToPR-ICFEM-2019-980d6d6ef5c9ad72a6b2cbd4fa549bc4705f0bed/src/theory/DemonicComposition.v"}
from __future__ import absolute_import from __future__ import division from __future__ import print_function from functools import partial import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np import tflib as tl conv = partial(slim.conv2d, activation_fn=None) dconv = partial(slim.conv2d_t...
{"hexsha": "67ebb1549897a7ffdc95bf0afbef64276c05164b", "size": 6818, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models.py", "max_stars_repo_name": "zj10/PGA", "max_stars_repo_head_hexsha": "aa908554925540f8c79c5228cde7fb306fe8868a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 25, "max_stars_r...
section "Affine Sets" theory Affine imports Linear_Algebra begin lemma if_smult: "(if P then x else (y::real)) *\<^sub>R v = (if P then x *\<^sub>R v else y *\<^sub>R v)" by (fact if_distrib) lemma sum_delta_notmem: assumes "x \<notin> s" shows "sum (\<lambda>y. if (y = x) then P x else Q y) s = sum Q s" a...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/Analysis/Affine.thy"}
""" DCMotor ======= """ import time import RPi.GPIO as GPIO Motor_A_EN = 4 Motor_B_EN = 17 Motor_A_Pin1 = 26 Motor_A_Pin2 = 21 Motor_B_Pin1 = 27 Motor_B_Pin2 = 18 forward = 0 backward = 1 pwm_A = 0 pwm_B = 0 class DCMotor: """DC 모터를 제어합니다.""" def __init__(self): """DC 모터 GPIO를 연결...
{"hexsha": "40c0239583c820a3e4d71d9272d204e7cdb76d9f", "size": 7718, "ext": "py", "lang": "Python", "max_stars_repo_path": "openpibo/picar_lib.py", "max_stars_repo_name": "hong-jinpyo/x-openpibo", "max_stars_repo_head_hexsha": "f785ec2a539786c5ae87057d383fff711fff5566", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[STATEMENT] lemma eqvt_at_apply'': assumes "eqvt_at f x" shows "(p \<bullet> f) (p \<bullet> x) = f (p \<bullet> x)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (p \<bullet> f) (p \<bullet> x) = f (p \<bullet> x) [PROOF STEP] by (metis (opaque_lifting, no_types) assms eqvt_at_def permute_fun_def permute_minus...
{"llama_tokens": 145, "file": "Launchbury_Nominal-Utils", "length": 1}
/** * Copyright (c) 2015 Carnegie Mellon University, Daniel Maturana <dimatura@cmu.edu> * * For License information please see the LICENSE file in the root directory. * */ #ifndef RAYCASTING_HPP_OLVFBMND #define RAYCASTING_HPP_OLVFBMND #include <Eigen/Core> #include <pcl_util/point_types.hpp> #include "scroll...
{"hexsha": "c04c8227ac13f1676239e8322bf0eb6138e00d12", "size": 7774, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/scrollgrid/raycasting.hpp", "max_stars_repo_name": "castacks/scrollgrid", "max_stars_repo_head_hexsha": "710324173907a182eb688effcf1c9ec998ade1e0", "max_stars_repo_licenses": ["BSD-3-Clause"...
#include <iostream> #include <string> #include <vector> #include <boost/foreach.hpp> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> class Test { public: Test() throw() : integer_(40) { } void save(boost::property_tree::ptree& tree, std::st...
{"hexsha": "cb8bf97ef1cb403c7f233ee5a33e5563c7719d2f", "size": 2257, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "c++/boost/PropertyTree/Write.cpp", "max_stars_repo_name": "taku-xhift/labo", "max_stars_repo_head_hexsha": "89dc28fdb602c7992c6f31920714225f83a11218", "max_stars_repo_licenses": ["MIT"], "max_stars_...
!> @brief Test the parallel distribution of a mesh's points. ! !> @description A mesh of size N should have its points distributed in parallel such that !! \f$\sum_p n_p = N\f$. program test_mesh_point_distribution use testing_lib use mesh_utils, only : build_square_mesh implicit none type(ccs...
{"hexsha": "fbf2c85be739d62712bc185f54e108f51c9a8bd5", "size": 1948, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/mesh/test_mesh_point_distribution.f90", "max_stars_repo_name": "asimovpp/asimov-ccs", "max_stars_repo_head_hexsha": "f8624d418fb847d104f8e753a21326e7026277fd", "max_stars_repo_licenses": [...
import scipy as sp import scipy.optimize as optimize from scipy.optimize import Bounds, LinearConstraint from math import sqrt, pi, sin, cos import numpy as np N = 400 def S(p): val = 0 n = len(p) a = [0.0] + list(p) """ for k in range(1, n+1): val += (1-sin(a[k])) * (cos(a[k-1]) - cos(a[k...
{"hexsha": "9481fac2314a3ea410b6b00a1d69e9def215ec21", "size": 2459, "ext": "py", "lang": "Python", "max_stars_repo_path": "working/problem392.py", "max_stars_repo_name": "takekoputa/project-euler", "max_stars_repo_head_hexsha": "6f434be429bd26f5d0f84f5ab0f5fa2bd677c790", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import random import math import numpy as np from scipy.stats import unitary_group from collections import Counter from qlazy import QState, DensOp def random_qstate(qnum): # random pure state dim = 2**qnum vec = np.array([0.0]*dim) vec[0] = 1.0 mat = unitary_group.rvs(dim) vec = np.dot(mat, vec)...
{"hexsha": "e9944eb4f492fdaff96488a0584f01190f1be107", "size": 2696, "ext": "py", "lang": "Python", "max_stars_repo_path": "example/py/Entropy/entropy2.py", "max_stars_repo_name": "samn33/qlazy", "max_stars_repo_head_hexsha": "b215febfec0a3b8192e57a20ec85f14576745a89", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
#!/usr/bin/env python import numpy as np from roboticstoolbox.robot.ERobot import ERobot from spatialmath import SE3 class FrankieOmni(ERobot): """ Class that imports an Omnidirectional Frankie URDF model ``FrankieOmni()`` is a class which imports a FrankieOmni robot definition from a URDF file. Th...
{"hexsha": "ed75cfbccdcef3b9f303f489e383e5cceb795874", "size": 2215, "ext": "py", "lang": "Python", "max_stars_repo_path": "roboticstoolbox/models/URDF/FrankieOmni.py", "max_stars_repo_name": "tassos/robotics-toolbox-python", "max_stars_repo_head_hexsha": "51aa8bbb3663a7c815f9880d538d61e7c85bc470", "max_stars_repo_lice...
From Hammer Require Import Hammer. Require Export Decidable. Require Export NAxioms. Require Import NZProperties. Module NBaseProp (Import N : NAxiomsMiniSig'). Include NZProp N. Theorem neq_succ_0 : forall n, S n ~= 0. Proof. hammer_hook "NBase" "NBase.NBaseProp.neq_succ_0". intros n EQ. assert (EQ' ...
{"author": "lukaszcz", "repo": "coqhammer-eval", "sha": "e7a30119c1470623125728006fd1299641192a60", "save_path": "github-repos/coq/lukaszcz-coqhammer-eval", "path": "github-repos/coq/lukaszcz-coqhammer-eval/coqhammer-eval-e7a30119c1470623125728006fd1299641192a60/stdlib/Numbers/Natural/Abstract/NBase.v"}
import os import sys import cv2 import time import h5py import numpy as np import scipy.io as sio from fastkde import fastKDE from matplotlib.path import Path from matplotlib.figure import Figure from mpl_toolkits.axes_grid1.axes_divider import make_axes_locatable from matplotlib.backends.backend_qt5agg import FigureCa...
{"hexsha": "3f2efc0abb5d530cff3d28c7de5ed10307ed5f0b", "size": 35383, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/signal_recognition.py", "max_stars_repo_name": "research-team/memrisitve-spinal-cord", "max_stars_repo_head_hexsha": "20c3c26757b7ff8fdffb846728093d386c564797", "max_stars_repo_licenses"...
import numpy as np from numpy.random import uniform def next_batch(): """ Modify this function to ingest your data and returns it. :return: (inputs, targets). Could be a python generator. """ x = np.expand_dims(uniform(size=32), axis=1) y = np.expand_dims(np.expand_dims(np.mean(x), axis=0), ax...
{"hexsha": "ca9880cc8433e3289e77d103b7459cf9ca519bf6", "size": 368, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_reader.py", "max_stars_repo_name": "philipperemy/wavenet", "max_stars_repo_head_hexsha": "a10bb3cdf924df5b77a56c56e70c853c1e614327", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 21, ...
import unittest from sotodlib.core import metadata import os import time import numpy as np # Global Announcement: I know, but I hate slow tests. example = None class TestDetDb(unittest.TestCase): def setUp(self): global example if example is None: print('Creating example database......
{"hexsha": "1638100d6f81cc0dbcbdc96232fa85b6cd624fc2", "size": 3319, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_detdb.py", "max_stars_repo_name": "tskisner/sotodlib", "max_stars_repo_head_hexsha": "9b80171129ea312bc7a61ce5c37d6abfbb3d5be9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
module Data.Strong.Array.Fusion import Data.Strong.Array import Language.Reflection -- import public Language.Reflection.Pretty -- import public Language.Reflection.Syntax -- import public Language.Reflection.Types -- -- import public Text.PrettyPrint.Prettyprinter -- -- -- import Generics.Derive %language ElabRef...
{"hexsha": "e31322111a3a04a03fc25e7381913870f40636ce", "size": 8609, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "src/Data/Strong/Array/Fusion.idr", "max_stars_repo_name": "MarcelineVQ/sarray", "max_stars_repo_head_hexsha": "e7728a9b89396ef6241318be9f82c45577969c8c", "max_stars_repo_licenses": ["CC0-1.0"], "m...
import sys, getopt, io import requests import json, csv import urllib.request import plotext as ptt import uniplot as uni import numpy as np from datetime import datetime import matplotlib.pyplot as plt import matplotlib.dates as dts from matplotlib.dates import DateFormatter class My_DcTracker_Class(): """NAME...
{"hexsha": "9ac1fd32c22e0573efbe95eb7361da9c63ca7c1f", "size": 2739, "ext": "py", "lang": "Python", "max_stars_repo_path": "distata/class_tracker.py", "max_stars_repo_name": "onshoremanover/dist", "max_stars_repo_head_hexsha": "96a52b23e6e651d6d6b73614c73a5aa0d0c4bd14", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np from helpers import remove_callback_dir, make_callback_dir, save_array from core import ToxicComments, ToxicModel, prepare def run(): # Load data and build model batch_size = 10000 n_features = 100 tc = ToxicComments('tcc/data/train.csv', batch_size=batch_size) model = ToxicM...
{"hexsha": "65ef8d2b56d6604114426e5ba2776ccad05c0aea", "size": 1098, "ext": "py", "lang": "Python", "max_stars_repo_path": "tcc/main.py", "max_stars_repo_name": "mctrjalloh/jigsai-tcc-challenge", "max_stars_repo_head_hexsha": "4ea9e7bef9586a789df4b6dbe76b7c11084cf719", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_...
[STATEMENT] lemma wcode_erase2_via_move [simp]: "wcode_right_move ires rs (b, Bk # list) \<Longrightarrow> wcode_erase2 ires rs (Bk # b, list)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. wcode_right_move ires rs (b, Bk # list) \<Longrightarrow> wcode_erase2 ires rs (Bk # b, list) [PROOF STEP] by (auto simp:wcod...
{"llama_tokens": 143, "file": "Universal_Turing_Machine_UTM", "length": 1}
export ## Types CompositeQSystem, Control, Dissipation, Field, Interaction, ParametricInteraction, QSystem, ## Methods dim, label, lowering, number, raising, strength, X abstract QSystem label(q::QSystem) = q.labe...
{"hexsha": "08dd2316236f5de49c185c08c8059ad17910eb36", "size": 1231, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/base-types.jl", "max_stars_repo_name": "silky/QSimulator.jl", "max_stars_repo_head_hexsha": "ceb112b062acacfda7c2375309f572e1d844f44d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
""" Author Hugues Evaluate the effectiveness of the features obtained by different feature reduction algorithms. This script is essentially a series of for loops, and it is long (a few hours) """ if __name__ == '__main__': # this is used to launch the file from anywhere import sys sys.path.append("..") import ...
{"hexsha": "b08f3a3dac116c8bb6cc3a1568e7839868f6221f", "size": 12324, "ext": "py", "lang": "Python", "max_stars_repo_path": "similarity/projection_same_sensors.py", "max_stars_repo_name": "HuguesMoreau/Sensors_similariy", "max_stars_repo_head_hexsha": "4b8592049c83b03a11f5c57fab247290ee29b8f5", "max_stars_repo_licenses...
''' Notices: Copyright 2018 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S. Code. All Other Rights Reserved. Disclaimers No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ...
{"hexsha": "d409bface5f763133bc45e1bdc02e225a38ae916", "size": 18765, "ext": "py", "lang": "Python", "max_stars_repo_path": "smcpy/smc/smc_sampler.py", "max_stars_repo_name": "omunroe-com/seqmontecarlosampwpython", "max_stars_repo_head_hexsha": "d64cb1683a2d9954cb05544427af9c85f14f1c6e", "max_stars_repo_licenses": ["NA...
-- --------------------------------------------------------------------- -- Ejercicio. Demostrar que en los anillos -- a * 0 = 0 -- ---------------------------------------------------------------------- import algebra.ring namespace my_ring variables {R : Type*} [ring R] variable (a : R) -- 1ª demostración -- =...
{"author": "jaalonso", "repo": "Matematicas_en_Lean", "sha": "c44e23d87665cb4aa00c813c6bfb3c41ebc83aa8", "save_path": "github-repos/lean/jaalonso-Matematicas_en_Lean", "path": "github-repos/lean/jaalonso-Matematicas_en_Lean/Matematicas_en_Lean-c44e23d87665cb4aa00c813c6bfb3c41ebc83aa8/src/Basicos/mul_zero.lean"}
import numpy as np import matplotlib.pyplot as plt import pdb plt.ion() plt.axis('off') plt.axis('equal') x1, x2, x3 = 0.0, 1.0, 0.5 y1, y2, y3 = 0.0, 0.0, np.sqrt(3)/2 plt.plot([x1, x2], [y1, y2], lw=4, zorder=1) plt.plot([x2, x3], [y2, y3], lw=4, zorder=1) plt.plot([x3, x1], [y3, y1], lw=4, zorder=1) c1 = (89/255,...
{"hexsha": "307e642eab5311708be92632f9c192c3b1001b20", "size": 1004, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/logo.py", "max_stars_repo_name": "Quantum-Many-Body/QuantumLattices.jl", "max_stars_repo_head_hexsha": "203034b5281887811028484e24ce5a5ea9556185", "max_stars_repo_licenses": ["Apache-2.0"], "...
import numpy as np from vcnn import vCNN import os, random import tensorflow as tf import argparse class BatchLoader(object): def __init__(self, data_dir, batch_size): self._data = np.load(os.path.join(data_dir, 'data.npy')) self._labels = np.load(os.path.join(data_dir, 'labels.npy')) self....
{"hexsha": "920510aa48471a840b5fda3275f7591836f84a21", "size": 3449, "ext": "py", "lang": "Python", "max_stars_repo_path": "shape_recognition/train.py", "max_stars_repo_name": "ys1998/tactile-shape-recognition", "max_stars_repo_head_hexsha": "b5ab6f1cdf04ff23e14b467a590533e7ee740b52", "max_stars_repo_licenses": ["MIT"]...
# -*- coding:utf-8 -*- import numpy as np import pandas as pd from scipy import stats from scipy.signal import periodogram from statsmodels.api import add_constant, OLS from statsmodels.tsa.seasonal import STL from statsmodels.tsa.stattools import acf, pacf from statsmodels.tsa.holtwinters import ExponentialSmoothing ...
{"hexsha": "a333afcefecb52113ca1a1be48f891f35f50c63f", "size": 17227, "ext": "py", "lang": "Python", "max_stars_repo_path": "hyperts/framework/meta_learning/tsfeatures.py", "max_stars_repo_name": "DataCanvasIO/HyperTS", "max_stars_repo_head_hexsha": "b2560daf8f08748691e7bd9efd14cc5f881186a3", "max_stars_repo_licenses":...
# --- Do not remove these libs --- from freqtrade.strategy.interface import IStrategy from pandas import DataFrame, Series import talib.abstract as ta import freqtrade.vendor.qtpylib.indicators as qtpylib import numpy as np from freqtrade.strategy import DecimalParameter, IntParameter from datetime import datetime, tim...
{"hexsha": "f28db6dfe82ba3fd116bdfb90fa9b83aaf09c580", "size": 17715, "ext": "py", "lang": "Python", "max_stars_repo_path": "BBRSITV.py", "max_stars_repo_name": "ketzah/freqtrade-stuff", "max_stars_repo_head_hexsha": "786f1e7cdea930dc7bfc4fe926e8a9629514e27d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 60, ...
# %matplotlib notebook import pandas as pd import numpy as np import seaborn as sns sns.set(color_codes=True) from sklearn import preprocessing # from imblearn.over_sampling import SMOTE from imblearn.over_sampling import SMOTE,RandomOverSampler from sklearn.model_selection import train_test_split from sklearn.ensembl...
{"hexsha": "ea6d99e5e3938af4d57e23888c7da98f350d333e", "size": 31423, "ext": "py", "lang": "Python", "max_stars_repo_path": "Web-Interfaces/singleCellVisBokeh2.py", "max_stars_repo_name": "broadinstitute/SingleCell_Morphological_Analysis", "max_stars_repo_head_hexsha": "b3685af5ba4ba12e8c767e03bb99c860bfba545c", "max_s...
import numpy as np def strong_selection_weak_mutation(fitness1, fitness2): """Strong selection, weak mutation model.""" sij = (fitness2 - fitness1) / fitness1 if sij < 0: sij = 0 return 1 - np.exp(-sij)
{"hexsha": "897706af8f12b49a056bf450bd1d251a5d3d1dd9", "size": 228, "ext": "py", "lang": "Python", "max_stars_repo_path": "gpgraph/models.py", "max_stars_repo_name": "lgoldbach/gpgraph", "max_stars_repo_head_hexsha": "f57d98b3cd02083fb4f0f0330ff3222e7e6e584c", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count"...
OneonOne Tutoring and Educational Mapping provides oneonone tutoring in a supervised environment for all grade levels and all subjects. They offer assistance with homework, school projects, and test preparation. They also offer college planning services, SAT prep, curriculum planning, major/career selection, college ...
{"hexsha": "290fb3134939d327ef9ed596c7bab387dc592bff", "size": 1896, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/One-on-One_Tutoring_and_Educational_Mapping.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licen...
[STATEMENT] lemma reachable_disconnect_netmap [elim]: assumes "s \<in> reachable (pnet np n) TT" and "(s, disconnect(i, i'), s') \<in> trans (pnet np n)" shows "netmap s' = netmap s" [PROOF STATE] proof (prove) goal (1 subgoal): 1. netmap s' = netmap s [PROOF STEP] using assms [PROOF STATE] proof (prove) u...
{"llama_tokens": 8716, "file": "AWN_Pnet", "length": 41}
from sklearn.svm import SVC import numpy as np class SVMNoneLinear: def __init__(self, c, kernel, degree=3, gamma='auto', decision_function_shape='ovr'): ''' :param c: :param kernel: :param degree: :param gamma: :param decision_function_shape: ''' ...
{"hexsha": "98a27fa95d94bf48720910e7f7c4c8c265af349f", "size": 2288, "ext": "py", "lang": "Python", "max_stars_repo_path": "CVPipelines/SVMNoneLinear.py", "max_stars_repo_name": "houhashv/ComputerVisionTask1", "max_stars_repo_head_hexsha": "72647c1d3f3e720ecfc08d5506a9563909e0b5cb", "max_stars_repo_licenses": ["Apache-...
import cv2 import numpy as np from datetime import datetime, timedelta def get_black_background(): return np.zeros((500, 500)) start_time = datetime.strptime("2019-01-01", "%Y-%m-%d") # Можете выбрать любую дату end_time = start_time + timedelta(days=1) def convert_time_to_string(dt): return f"{dt.hour}:{dt...
{"hexsha": "f1f49058309f97f9490b89409eaa07c100d49dd8", "size": 975, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/generators/generate_time_images.py", "max_stars_repo_name": "Sehin/teleg-upd-photo", "max_stars_repo_head_hexsha": "1e5c817cadd5652697ed97dc2d2aa70d84b3f17b", "max_stars_repo_licenses": ["Apach...
import numpy as np import skimage import skimage.io import skimage.morphology import numba def to_uint8(img): return np.clip(img, 0, 255).astype(np.uint8) def laplacian(img): return (np.roll(img, 1, 0) + np.roll(img, -1, 0) + np.roll(img, 1, 1) + np.roll(img, -1, 1) - 4 * img) def ...
{"hexsha": "eefa7176b6115fe0faadce0a936f22e444d10c70", "size": 1949, "ext": "py", "lang": "Python", "max_stars_repo_path": "basic_example.py", "max_stars_repo_name": "Apollo-18/poie", "max_stars_repo_head_hexsha": "242c64cf4bfbb8667aa858a3b298529299fa36bc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import pandas as pd import numpy as np import seaborn as sns from lightfm.evaluation import precision_at_k, recall_at_k def model_perf_plots(df): """Function to plot model performance metrics. Args: df (pa...
{"hexsha": "2256df53bb3697f9b6cdaf8d1aa162e0530c4b8a", "size": 9363, "ext": "py", "lang": "Python", "max_stars_repo_path": "recommenders/models/lightfm/lightfm_utils.py", "max_stars_repo_name": "enowy/Recommenders", "max_stars_repo_head_hexsha": "60033231b9167438032843c23158c0c776856e0e", "max_stars_repo_licenses": ["M...
// Boost.Geometry // Copyright (c) 2021, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html #ifndef BOOST_GEOMETRY_STRATEGIES_DISTANCE_GEOGRAPHIC_HPP #define BOOST_G...
{"hexsha": "4c9aadd91e210beb6464a4c8df4c6e5f95aa6d61", "size": 9409, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/geometry/strategies/distance/geographic.hpp", "max_stars_repo_name": "pranavgo/RRT", "max_stars_repo_head_hexsha": "87148c3ddb91600f4e74f00ffa8af14b54689aa4", "max_stars_repo_licenses": ["MIT"...
import warnings from pyvista._version import __version__ from pyvista.plotting import * from pyvista.utilities import * from pyvista.core import * # Per contract with Sphinx-Gallery, this method must be availabe at top level from pyvista.utilities.sphinx_gallery import _get_sg_image_scraper import numpy as np import s...
{"hexsha": "8a663d2fb5d13b1033e6d8bd900d2e40d369d68c", "size": 2601, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyvista/__init__.py", "max_stars_repo_name": "imsodin/pyvista", "max_stars_repo_head_hexsha": "af3bd7dc7b5b8551b732f6e6fa74f6675027469c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
"""Return the product of array elements over a given axis.""" from __future__ import annotations from typing import Any, Optional, Sequence, Union import numpy import numpy.typing import numpoly from ..baseclass import ndpoly, PolyLike from ..dispatch import implements @implements(numpy.prod, numpy.product) def pro...
{"hexsha": "35b269775df3486662fdcdd606e46910284ef2e9", "size": 4263, "ext": "py", "lang": "Python", "max_stars_repo_path": "numpoly/array_function/prod.py", "max_stars_repo_name": "jonathf/npoly", "max_stars_repo_head_hexsha": "9df4bd2a3b134e8a196e24389c0ad84c26da9662", "max_stars_repo_licenses": ["BSD-2-Clause"], "max...
import numpy as np from PIL import Image import os import glob from tqdm import tqdm from ISR.models import RDN, RRDN ''' ============================================================================ ''' #model = RRDN(weights='gans') model = RDN(weights='psnr-small') data_path = 'data' data_clean_path = 'data_clean' ...
{"hexsha": "722399bccceaff420099a151a04c01924bc077c1", "size": 1111, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/predict_gen_image.py", "max_stars_repo_name": "Darkshadow9799/Super-Resolution", "max_stars_repo_head_hexsha": "f9840f7905584c8a2fa6c79df5a1ee76f935a37e", "max_stars_repo_licenses": ["MIT"...
import numpy as np import matplotlib.pyplot as plt import sys sys.setrecursionlimit(10000) delta = 0.001 def logiMap(x,r): return x*r*(1-x) def logisMap(x,r): if r >= 4: return 'Complete' plt.plot(r,x,'o',color='b',markersize=1) plt.draw() plt.pause(0.0001) r += delta ...
{"hexsha": "b9e65b504f58919fa8961308f26412adb177729b", "size": 382, "ext": "py", "lang": "Python", "max_stars_repo_path": "reccurLogiMap.py", "max_stars_repo_name": "solothinker/miniature-octo-broccoli", "max_stars_repo_head_hexsha": "4f09139a42e603908009a6114d8c6ef5df03bdad", "max_stars_repo_licenses": ["MIT"], "max_s...
```python import sympy as sym from sympy.polys import subresultants_qq_zz sym.init_printing() ``` The Bezout matrix is a special square matrix associated with two polynomials, introduced by Sylvester (1853) and Cayley (1857) and named after Étienne Bézout. Bézoutian may also refer to the determinant of this matrix, w...
{"hexsha": "158feba0ef191febc900bb157cc02842e4aa8932", "size": 74443, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "examples/notebooks/Bezout_Dixon_resultant.ipynb", "max_stars_repo_name": "utkarshdeorah/sympy", "max_stars_repo_head_hexsha": "dcdf59bbc6b13ddbc329431adf72fcee294b6389", "max_stars_r...
! { dg-do run } ! ! PR fortran/65792 ! The evaluation of the argument in the call to new_prt_spec2 ! failed to properly initialize the comp component. ! While the array contents were properly copied, the array bounds remained ! uninitialized. ! ! Contributed by Dominique D'Humieres <dominiq@lps.ens.fr> program main ...
{"hexsha": "a50d6965cabb317b5e064fd83bf7a6c78065a78c", "size": 1588, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "msp430-gcc-tics/msp430-gcc-7.3.1.24-source-full/gcc/gcc/testsuite/gfortran.dg/derived_constructor_comps_5.f90", "max_stars_repo_name": "TUDSSL/TICS", "max_stars_repo_head_hexsha": "575ed1b34403b...
using Colors include("helpers/listing.jl") isinstalled(pkg) = try Pkg.installed(pkg) != nothing catch e false end function main(window) push!(window.assets, "widgets") push!(window.assets, "codemirror") push!(window.assets, "tex") vbox( title(3, "Typography"), vskip(1em), md"E...
{"hexsha": "252bbd1323ccdd67aacb445c6ac68f6793a2df92", "size": 7025, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/user-guide/theme.jl", "max_stars_repo_name": "JuliaPackageMirrors/Escher.jl", "max_stars_repo_head_hexsha": "72c0f85c0908b1d08c47ebe75ef045462220a197", "max_stars_repo_licenses": ["MIT"], ...
[STATEMENT] lemma map_of_eqI: assumes set_eq: "set (map fst xs) = set (map fst ys)" assumes map_eq: "\<forall>k\<in>set (map fst xs). map_of xs k = map_of ys k" shows "map_of xs = map_of ys" [PROOF STATE] proof (prove) goal (1 subgoal): 1. map_of xs = map_of ys [PROOF STEP] proof (rule ext) [PROOF STATE] proof (...
{"llama_tokens": 1997, "file": null, "length": 27}
# python3 # pylint: disable=g-bad-file-header # Copyright 2021 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org...
{"hexsha": "2c6b3ce6fd66b80ec0efd682295c243a0cbeb127", "size": 2702, "ext": "py", "lang": "Python", "max_stars_repo_path": "neural_testbed/generative/nt_kernels_test.py", "max_stars_repo_name": "SamuelGabriel/neural_testbed", "max_stars_repo_head_hexsha": "cc2e3de49c29f29852c8cd5885ab54fb6e664e2e", "max_stars_repo_lice...
/* * 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": "2c7b5f0bc9943ffc8e53626fb839ee0e78cbacd8", "size": 5081, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "game/PowerGenComponent.cpp", "max_stars_repo_name": "Sheph/TriggerTime", "max_stars_repo_head_hexsha": "9265dee6a178e43bf7365e3aa2f7f2ca22df074f", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_s...
function [mopt, vopt, avals, mvals, vvals] = ... scimat_optimal_intersecting_plane(scimat, m0, v0, params) % SCIMAT_OPTIMAL_INTERSECTING_PLANE Optimise intersection plane for SCIMAT % segmentation mask. % % [MOPT, VOPT, AVALS, MVALS, VVALS] = ... % scimat_optimal_intersecting_plane(SCIMAT, M0, V0, PARAMS) % %...
{"author": "vigente", "repo": "gerardus", "sha": "4d7c5195b826967781f1bb967872410e66b7cd3d", "save_path": "github-repos/MATLAB/vigente-gerardus", "path": "github-repos/MATLAB/vigente-gerardus/gerardus-4d7c5195b826967781f1bb967872410e66b7cd3d/matlab/FiltersToolbox/scimat_optimal_intersecting_plane.m"}
import Dyno filename = joinpath(rootdir,"examples","rbc.mod") model_data = Dyno.modfile_parser(filename) # print(model_data)
{"hexsha": "a283b94af05eafb4c22d6a5863abc7ad25b3f835", "size": 128, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_model_import.jl", "max_stars_repo_name": "JuliaTagBot/Dyno.jl", "max_stars_repo_head_hexsha": "4e3f89c27418f16debe791eb0c1c1e78c89f7848", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from TwoDimLookup_motor import TwoDimLookup_motor from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from scipy import interpolate import numpy as np ### Input Parameters # C_F = 27000 # Cornering stiffness front / Schräglaufsteifigkeit vorne [N/rad] - Is already for two wheels ! # C_R = ...
{"hexsha": "98241ad4baa33294d1ccb68f952b1b1217195b7e", "size": 10405, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/GG_ESB.py", "max_stars_repo_name": "CB1204/LapSimulation", "max_stars_repo_head_hexsha": "7d7f7c43a6bc3db3dbf02050d939da3f17647c2c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, ...
[STATEMENT] lemma the_cat_parallel_Comp_app_\<bb>F[cat_parallel_cs_simps]: assumes "g = \<bb>" and "f \<in>\<^sub>\<circ> F" shows "g \<circ>\<^sub>A\<^bsub>\<Up>\<^sub>C \<aa> \<bb> F\<^esub> f = f" [PROOF STATE] proof (prove) goal (1 subgoal): 1. g \<circ>\<^sub>A\<^bsub>\<Up>\<^sub>C \<aa> \<bb> F\<^esub> f = f...
{"llama_tokens": 1001, "file": "CZH_Elementary_Categories_czh_ecategories_CZH_ECAT_Parallel", "length": 9}
import matplotlib import numpy as np import matplotlib.pyplot as plt np.random.seed(19680) mv = 10 sigma = 15 x = mv + sigma * np.random.randn(437) num_bins = 58 fig, ax = plt.subplots() n, bins,patches = ax.hist(x, num_bins, density = 1) y = ((1/(np.sqrt(-0.5*(np.pi)*sigma))* np.exp(-0.5*(1/sigma*(bins -mv)))**2...
{"hexsha": "0ada0aac2c632f50a77aed1e3db635df27e2a7b5", "size": 439, "ext": "py", "lang": "Python", "max_stars_repo_path": "hiktogram/App/hiktogram.py", "max_stars_repo_name": "GitLuisG/Mineria_de_Datos-histogramExample", "max_stars_repo_head_hexsha": "17345f73dd29d575990732fe52851079b8077dfc", "max_stars_repo_licenses"...
import tensorflow as tf import numpy as np import menpo.io as mio import menpo import scipy import functools from pathlib import Path from scipy.io import loadmat from menpo.image import Image from menpo.shape import PointCloud from menpo.transform import Translation import sys from ... import utils ResizeMethod = t...
{"hexsha": "5a80162fdb1a0f435a3536c110279e2307b3c58a", "size": 23182, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepmachine/data/provider/resolvers.py", "max_stars_repo_name": "yuxiang-zhou/deepmachine", "max_stars_repo_head_hexsha": "b8a64354f7d37664172ef79a66b1fc0a9fa0f493", "max_stars_repo_licenses": ["...
import serial import time import numpy as np import pandas as pd read_char_num = 7 # don't modify this # can take user input no_of_data_points = 20 delay_time_sec = 1 serial_port = "/dev/cu.usbmodem14101" serial_baud = 9600 sensor_data, data_points = [], [] # define empty lists ser = serial.Serial(serial_port, ser...
{"hexsha": "b8a36df063fc6523580cde0c49d42dc4f247cd94", "size": 944, "ext": "py", "lang": "Python", "max_stars_repo_path": "module2/read_serial_data.py", "max_stars_repo_name": "debjyotich/iot_class", "max_stars_repo_head_hexsha": "dca1287bcf86deac743e7a6333576a5e95f6b58c", "max_stars_repo_licenses": ["MIT"], "max_stars...
''' Created on Feb 21, 2017 @author: Ba1 ''' import argparse import sys from os import listdir, getcwd, makedirs from os.path import join, isfile, isdir, basename, dirname, abspath, expanduser import subprocess from Bio import SeqIO import pandas as pd import re from scripts.pyGFA import parseGFA from scripts.coords2g...
{"hexsha": "f4e4816f1b5f047b6d60fc9d327d67e6c139e347", "size": 53714, "ext": "py", "lang": "Python", "max_stars_repo_path": "rscaffolder.py", "max_stars_repo_name": "ba1/RScaffolder", "max_stars_repo_head_hexsha": "89a9e7894c0e279a4de813689bc38728fcadd77c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max...
#!/usr/bin/python # -*- coding: utf-8 -*- from abra.config import DEFAULT_ALPHA from abra.stats import Samples, RateComparison from abra.inference.frequentist.results import FrequentistTestResults from abra.inference import FrequentistProcedure import numpy as np from scipy.stats import norm class RatesRatio(Frequent...
{"hexsha": "f4ce2b48d251b495499839f4f05e7b1a9b3a86ba", "size": 4934, "ext": "py", "lang": "Python", "max_stars_repo_path": "abra/inference/frequentist/rates.py", "max_stars_repo_name": "quizlet/abracadabra", "max_stars_repo_head_hexsha": "eda599bd02f14b96efdc521f53132d93c9100ede", "max_stars_repo_licenses": ["MIT"], "m...