text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# contains code with no dependencies, is loaded first @enum MODE::UInt8 begin ECB = 1 CBC = 2 CFB = 3 OFB = 4 CTR = 5 end global const SBOX = @SArray[ 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0...
{"hexsha": "16a996876c37023267f5d7c0aa2016c23611626c", "size": 3944, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/constants.jl", "max_stars_repo_name": "Seelengrab/AES.jl", "max_stars_repo_head_hexsha": "7af7764bb7918b91d2c495d238003649e0cc7ca3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "m...
from __future__ import print_function import argparse import io import json import os import numpy as np from keras.preprocessing.sequence import pad_sequences from tqdm import tqdm from util import get_snli_file_path, get_word2vec_file_path, ChunkDataManager def pad(x, maxlen): if len(x) <= maxlen: pa...
{"hexsha": "b6d18fcc2b01b4de7714b76d2f94dc4a329a8c5d", "size": 17314, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocess.py", "max_stars_repo_name": "MartinXPN/DIIN-in-Keras", "max_stars_repo_head_hexsha": "eba9fa442c57305bd385ff87c723ab9761baf21e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
Circle K is known for having cheap gas. Their gas is occasionally cheaper than the AM/PM Arco at Anderson Road and Russell. Its pretty much always cheaper then the other major gas station chains. They are owned by the Quebec company wiki:WikiPedia:Alimentation CoucheTard. CoucheTard means goes to bed late in French ...
{"hexsha": "88e29623fbd956faf7030194bfd150e139fa5798", "size": 7495, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Circle_K.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import numpy as np import cv2 from matplotlib import pyplot as plt def normalizeImage(img): img = img - np.min(img) img = np.round(img * 255 / np.max(img)) return np.uint8(img) def doSomething(): img = cv2.imread('Cat.jpg') b, g, r = cv2.split(img) PixelsPerWave = 10 W...
{"hexsha": "b1440dd36e4795f75d9da8f23a13ea31e94cf868", "size": 1780, "ext": "py", "lang": "Python", "max_stars_repo_path": "ClassWork/CW4/Debugging.py", "max_stars_repo_name": "haimadrian/AlgorithmsInMultimediaUsingPython", "max_stars_repo_head_hexsha": "7062e11c557588cebfd576f20b727ec273a1108d", "max_stars_repo_licens...
""" Dynamic Factor Model Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function import numpy as np from .mlemodel import MLEMixin, MLEResultsMixin try: raise ImportError from statsmodels.tsa.statespace import mlemodel, dynamic_factor except ImportError...
{"hexsha": "4a888c182840a75881a9d560a10bffa4b4fb57d0", "size": 8543, "ext": "py", "lang": "Python", "max_stars_repo_path": "dismalpy/ssm/dynamic_factor.py", "max_stars_repo_name": "dismalpy/dismalpy", "max_stars_repo_head_hexsha": "93bb317ca64971fd4d2a62e3da8dae6c2b8947fc", "max_stars_repo_licenses": ["BSD-2-Clause"], ...
# -*- coding: utf-8 -*- """ ==== slope ==== Definition: slope(data,kind=['interval','ordinal'],height,width,font_size,savename,color,title) ---- Plot slope plot Tufte Style :class:`matplotlib.figure.Figure object`. Parameters ---------- data : pandas dataFrame index indicate the categories columns indicat...
{"hexsha": "1061b9a000fd52cad05a10ddb6b86db81365092d", "size": 13575, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotSlope.py", "max_stars_repo_name": "gentrexha/university-rankings-analysis", "max_stars_repo_head_hexsha": "decf10156de6444cdfa5d1b01ba1f3dcb69c5980", "max_stars_repo_licenses": ["MIT"], "max_...
import pdb import sys import os sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../"))) from data_utils.ModelNetDataLoader import ModelNetDataLoader from data_utils.PCAModelNetDataLoader import PCAModelNetDataLoader from data_utils.ScanNetDataLoader import ScanNetDataLoader import argparse im...
{"hexsha": "5909dba449c71344944b9bd2be23907f3982af95", "size": 3984, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_analysis/con_test2npz.py", "max_stars_repo_name": "KaidongLi/pytorch-LatticePointClassifier", "max_stars_repo_head_hexsha": "5c00bb0f808a928ea57acb8a79364d62eb955cee", "max_stars_repo_license...
# -*- coding: utf-8 -*- """ Created on Sat Nov 2 11:22:41 2019 @author: R00t_5layer """ from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as np from itertools import product, combinations import random as rnd import time from collections import namedtuple ide='ID' caja = namedtuple(...
{"hexsha": "f4128d3cf17caab099679a721fc8fdb83b1f961e", "size": 3994, "ext": "py", "lang": "Python", "max_stars_repo_path": "pruebasBrandon/Parse.py", "max_stars_repo_name": "xanderMMR/TRABAJO-FINAL--COMPLEJIDAD-ALGOR-TMICA", "max_stars_repo_head_hexsha": "a69a0ef4165bb376d330143ddb6e61f531baed0d", "max_stars_repo_licen...
import PySimpleGUI as sg import numpy as np from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk import algo import random from painter import draw_plot, plt def app(): sg.theme('DarkAmber') blocks = [[sg.B('example1', key='ex1')], [sg.B('example2', key='ex2')], [sg.B('exampl...
{"hexsha": "f2781bd12637dd5661bcdac6c302c164adf20d2b", "size": 4037, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "Yarikf01/FindPointsInPolyLabOG-Fedchenko-", "max_stars_repo_head_hexsha": "67e45c2b1872d9c83ca0f5b7545bc7509d54dfed", "max_stars_repo_licenses": ["MIT"], "max_star...
% Aug 27, 2014: has 118 sections. artisynth.tex and maspack.tex have % about 28 and 23 sections, with about 375 words/sec, so we can % expect this to be around 45,000 words, or about 120 pages. \documentclass{article} % Add search paths for input files \makeatletter \def\input@path{{../}{../../}{../texinputs/}} \...
{"hexsha": "d91da995c521b7df406ba0b202da9f7245185384", "size": 12871, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/misc/creatingModels.tex", "max_stars_repo_name": "dannyhx/artisynth_core", "max_stars_repo_head_hexsha": "f82cb91e4f9d426dffd6f3a998600c82f6349d48", "max_stars_repo_licenses": ["Apache-2.0", "B...
#!/usr/bin/env python3 """ Copyright 2015 Hippos Technical Systems BV. (but borrows some code from the painting/svgviewer example of PyQt v4.x) @author: larry """ import sys, re import lxml.etree import numpy as np from collections import OrderedDict from ..share import (Share, dbg_print, QtCore, QtGui, QtWebKit, Wit...
{"hexsha": "61e9a79426bcfbbf12040749a58c12d867064d13", "size": 13611, "ext": "py", "lang": "Python", "max_stars_repo_path": "musicraft/abcraft/score.py", "max_stars_repo_name": "papahippo/abcraft", "max_stars_repo_head_hexsha": "cc967142241d8b105434ee813d317ca9bacd3500", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# coding: utf-8 # In[11]: import time import numpy as np import pandas as pd import speech_recognition as sr rlno=[] name=[] dob=[] stream=[] year=[] grade=[] # In[12]: def speechip(): r = sr.Recognizer() with sr.Microphone() as source: audio = r.listen(source) try: print("You said:...
{"hexsha": "d088268cba49627cb87499ea3df6e61d3de1f2e1", "size": 8420, "ext": "py", "lang": "Python", "max_stars_repo_path": "SRDATABASE.py", "max_stars_repo_name": "subhajournal/Speech_Database", "max_stars_repo_head_hexsha": "ca47db816cae7f4865aa93243383a8f884fbf511", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
#include <boost/intrusive_ptr.hpp> #include <boost/optional.hpp> #include <jupyter/socket_manager.hpp> #include <iostream> #include <pybind11/pybind11.h> #include <zmq_addon.hpp> //The bug related to the use of RTTI by the pybind11 library has been fixed: a //declaration should be in each translation unit. PYBIND11_DE...
{"hexsha": "88a6eacdff8010bec89c19f941651d1bfbe552a5", "size": 2168, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "services/interactive_python/jupyter/socket_manager.cpp", "max_stars_repo_name": "jinntechio/RocketJoe", "max_stars_repo_head_hexsha": "9b08a21fda1609c57b40ef8b9750897797ac815b", "max_stars_repo_lice...
import .phys.time.time import .phys.time_series.geom3d import .std.time_std import .std.geom3d_std import .phys.time_series.geom3d import data.real.basic noncomputable theory def milliseconds := (0.001) -- names not clear, inverted? def milliseconds_to_seconds := 1000 -- names not clear, inverted? def seco...
{"author": "kevinsullivan", "repo": "bug_stories", "sha": "dac1391905c66d02e62828d53d89b0b641efdf83", "save_path": "github-repos/lean/kevinsullivan-bug_stories", "path": "github-repos/lean/kevinsullivan-bug_stories/bug_stories-dac1391905c66d02e62828d53d89b0b641efdf83/src/orientation_handle_local_position_ned_formalizat...
from keras.preprocessing import image import keras.applications.resnet50 as resnet50 import numpy as np app = None def initialize_dog_detector(the_app): global app app = the_app app.config['RESNET_50_MODEL'] = resnet50.ResNet50(weights='imagenet') def path_to_tensor(img_path): # loads RGB image as ...
{"hexsha": "4d1e4f9713b73667b272d5c41483d8a89a98e904", "size": 1024, "ext": "py", "lang": "Python", "max_stars_repo_path": "web/detector/dog_detector.py", "max_stars_repo_name": "PaulNWms/dog-project", "max_stars_repo_head_hexsha": "4d70bcd39aa3ea0a8744efc42c53f031fbf63b64", "max_stars_repo_licenses": ["MIT"], "max_sta...
import numpy as np import matplotlib.pyplot as plt def collate(b): filters = ["u", "g", "r", "i", "z", "y"] all_times, all_depths = [], [] for i, f in enumerate(filters): times, depths = \ np.genfromtxt("l45b{0}_{1}_cadence.txt".format(b, f)).T all_times.append(times) a...
{"hexsha": "980767615f06f0fa5a0fdf3c265af0b1f082a458", "size": 695, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/combine_cadences.py", "max_stars_repo_name": "RuthAngus/LSST-max", "max_stars_repo_head_hexsha": "88abfa4aedd5837c9d1f1b9e17a8fd2d1713488b", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
from typing import Callable, List import equinox as eqx from jax import random import jax.numpy as jnp Array = jnp.ndarray class Sine(eqx.Module): w0: Array = eqx.static_field() def __init__(self, w0): super().__init__() self.w0 = w0 def __call__(self, x): return jnp.sin(self....
{"hexsha": "bb9f98d29ea8d5feaaa2f3f35b580a1507a32779", "size": 2274, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/lensiren/jax/nn/siren.py", "max_stars_repo_name": "AlexandreAdam/Lensing-SIREN", "max_stars_repo_head_hexsha": "8b95065a63e0dac9cac73665a39c3025676bc7a1", "max_stars_repo_licenses": ["MIT"], "...
""" Defines the KeplerFFI class that uses FFIs to model the PRF shape for a given channel and quarter. """ import os import sys import warnings import wget import numpy as np import pandas as pd import pickle import matplotlib.pyplot as plt import matplotlib.colors as colors from scipy import sparse from tqdm.auto im...
{"hexsha": "cc710493be9245798e85ebe82cfa330d1baabdb4", "size": 48555, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/kepler_apertures/KeplerFFI.py", "max_stars_repo_name": "jorgemarpa/kepler-apertures", "max_stars_repo_head_hexsha": "a9a3842016a05a57e79fd47338bef0aa354bb148", "max_stars_repo_licenses": ["MI...
"""Samples negative pairs from run.""" import argparse from utils import load_qrels, load_run import numpy as np def main(): parser = argparse.ArgumentParser() parser.add_argument('-run') parser.add_argument('-qrel') parser.add_argument('-p', type=int) parser.add_argument('-n', type=int) ...
{"hexsha": "ef7c66788463fc4b72dcc5b29d43203643002b12", "size": 2295, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessors/neg_sample_from_run.py", "max_stars_repo_name": "felipemoraes/pyNeuIR", "max_stars_repo_head_hexsha": "5256857387c8fe57d28167e42077ad1dcade1983", "max_stars_repo_licenses": ["MIT"], ...
/** * * @file qwrapper_zlantr.c * * PLASMA core_blas quark wrapper * PLASMA is a software package provided by Univ. of Tennessee, * Univ. of California Berkeley and Univ. of Colorado Denver * * @version 2.6.0 * @author Mathieu Faverge * @date 2010-11-15 * @precisions normal z -> c d s * **/ #include <la...
{"hexsha": "ad29e4db1d4448c9a1fe697b309aadc11f484905", "size": 4785, "ext": "c", "lang": "C", "max_stars_repo_path": "core_blas-qwrapper/qwrapper_zlantr.c", "max_stars_repo_name": "zhuangsc/Plasma-ompss1", "max_stars_repo_head_hexsha": "bcc99c164a256bc7df7c936b9c43afd38c12aea2", "max_stars_repo_licenses": ["BSD-3-Claus...
\subsubsection*{2018} \item {\bfseries Barr WA}. \emph{Ecomorphology}. In: Croft DA, Simpson SW, and Su DF (eds.), \emph{Methods in Paleoecology: Reconstructing Cenozoic Terrestrial Environments and Ecological Communities}. Springer (Vertebrate Paleobiology and Paleoanthropology Series), Cham, Switzerland. 339-349. \...
{"hexsha": "3bf00449519a910666315cbda45814dc3b042227", "size": 677, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "assets/CV/barr_chapters.tex", "max_stars_repo_name": "wabarr/PAPER", "max_stars_repo_head_hexsha": "5167d9ada2744c4c5a7ac693158d10136c52f94f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
#! /usr/bin/env python """ File: midterm.py Copyright (c) 2016 Chinmai Raman License: MIT Course: PHYS227 Assignment: Midterm Date: March 22, 2016 Email: raman105@mail.chapman.edu Name: Chinmai Raman Description: Midterm """ from __future__ import division import numpy as np import matplotlib.pyplot as plt def seque...
{"hexsha": "b0ad541ec8e1d6958ce58ca0eec885015c0e2f86", "size": 1816, "ext": "py", "lang": "Python", "max_stars_repo_path": "midterm.py", "max_stars_repo_name": "ChinmaiRaman/phys227-midterm", "max_stars_repo_head_hexsha": "c65a22052044799e34ec31d78827266629137636", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# Define logistic loss # Define data for logistic regression problem struct SparseLogitData{T <: Real} <: AbstractDataset{T} # Store X as sparse matrix X::AbstractSparseMatrix{T, Int} y::Vector{T} y_pred::Vector{T} # Cache values of exp(y[i] * ypred[i]) cache_σ::Vector{T} end function SparseLog...
{"hexsha": "1d3cbf02488e14337075b9768565fe30167ea91d", "size": 5348, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/logistic/sparse_logistic.jl", "max_stars_repo_name": "frapac/LogisticOptTools.jl", "max_stars_repo_head_hexsha": "dbd22ee2819786cadd5a5f9ecae692788d764a43", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np import matplotlib.pylab as plt import operator import requests import sys np.set_printoptions(threshold=sys.maxsize) f = open('urls.txt', 'r') x = list() y = list() urls = [] while True: url = f.readline().rstrip('\n') if url: urls.append(url) else: break url_len = le...
{"hexsha": "7fa4148fa2ad2e9abda5b7a514541bd0cf34e761", "size": 1220, "ext": "py", "lang": "Python", "max_stars_repo_path": "Matrix generation.py", "max_stars_repo_name": "0-Yuuki-0/MA1508", "max_stars_repo_head_hexsha": "2a608560655851f0e1318863cda3fa5055269c50", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
\chapter{Overall Description} \section{Product Perspective} \subsection{User Model} \label{subsect:usermodel} A user is represented within the application by his password and his e-mail. Some important informations about him are held by the following parameters: \begin{itemize} \item \textit{travelPass}: indicates i...
{"hexsha": "e384935681a32cac0ef00cdc510cdbac46ed5a1c", "size": 13204, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "RASD/cap2_overalldesc.tex", "max_stars_repo_name": "keyblade95/DamicoGabboliniParroni", "max_stars_repo_head_hexsha": "85a52acdefa1df6355ee05dd67240297d99356a6", "max_stars_repo_licenses": ["MIT"],...
[STATEMENT] lemma quadratic_shape2b: fixes a b c x y::"real" assumes "a < 0" assumes "x < y \<and> a*x^2 + b*x + c = 0 \<and> a*y^2 + b*y + c = 0" shows "\<And>z. (z > y \<Longrightarrow> a*z^2 + b*z + c < 0)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<And>z. y < z \<Longrightarrow> a * z\<^sup>2 + b *...
{"llama_tokens": 576, "file": "Virtual_Substitution_QE", "length": 3}
module mesh_m implicit none type boundary_condition_t character :: type ! N for Neumann, D for Dirichlet real(kind=8) :: a, b, c ! Boundary condition formulated as a+b*x+c*x^2 end type boundary_condition_t type mesh_t integer :: n_rows, n_cols, N_cp, max_iter in...
{"hexsha": "ae139d621dd952c50a05c763452ea4c520f7300a", "size": 9264, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "mesh.f95", "max_stars_repo_name": "corygoates/Flow81", "max_stars_repo_head_hexsha": "3285fcad89fc7cad5b003b7266e2ec767932d41b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_st...
from ast import parse from datetime import time from tests.test_utils import TestUtils import unittest from unittest import mock from unittest.mock import MagicMock, call, patch from command_line_app import parse_args from argparse import ArgumentTypeError from os import path import os import sys import builtins from...
{"hexsha": "547e78a26bb72f107f1744fcd21decb8c03fe43f", "size": 13493, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_parse_args.py", "max_stars_repo_name": "mjturner-matt/cmpc_time_series", "max_stars_repo_head_hexsha": "17e42d966fc91126461362b426c049d88ed03871", "max_stars_repo_licenses": ["MIT"], "...
"""Utility functions used across Emelem""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import decimal import functools import json import logging import numpy import os import parsedatetime import pytz import smtpl...
{"hexsha": "44784f21c3fa12b2a9b3dcd5ea92046ec4a37910", "size": 2699, "ext": "py", "lang": "Python", "max_stars_repo_path": "emelem/utils.py", "max_stars_repo_name": "jpoullet2000/emelem", "max_stars_repo_head_hexsha": "46f8a916b01e98e659c3f097c16d0b9181e3249a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
from __future__ import absolute_import from __future__ import division from __future__ import print_function """Tasks for RL.""" import abc import copy import itertools import random import numpy as np from six.moves import xrange from common import bf # brain coder from common import reward as r # brain coder fr...
{"hexsha": "6fee349fc35567910b01769c30f25fcaf0070c88", "size": 43028, "ext": "py", "lang": "Python", "max_stars_repo_path": "research/brain_coder/single_task/code_tasks.py", "max_stars_repo_name": "gauss-surgical/models", "max_stars_repo_head_hexsha": "625acf8c404feb9e1248e3ea93e16556a1d861fa", "max_stars_repo_licenses...
(*:maxLineLen=78:*) theory Spec imports Main Base begin chapter \<open>Specifications\<close> text \<open> The Isabelle/Isar theory format integrates specifications and proofs, with support for interactive development by continuous document editing. There is a separate document preparation system (see \chref...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/Doc/Isar_Ref/Spec.thy"}
import numpy as np import tensorflow as tf import tritonclient.http from scipy.special import softmax # setup the server endpoint and models model_name = "mnist" url = "127.0.0.1:8000" model_version = "1" batch_size = 1 # load dataset (train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist...
{"hexsha": "4ae7310285dededdb3b951d4fefb369b7e236d5a", "size": 1299, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/tf_minst/mnist_triton.py", "max_stars_repo_name": "rodrigobaron/quick-deploy", "max_stars_repo_head_hexsha": "014c0560992d340e514b2a1e617c47f173c77e77", "max_stars_repo_licenses": ["Apach...
import Mynat.Mul namespace mynat def mypow (m n : mynat) : mynat := match n with | 0 => 1 | succ n' => mymul (mypow m n') m instance : Pow mynat mynat where pow := mypow theorem pow_zero (a : mynat) : a ^ (0 : mynat) = 1 := rfl theorem pow_succ (a b : mynat) : a ^ (succ b) = a ^ b * a := rfl theorem zero_p...
{"author": "plumsirawit", "repo": "mynat", "sha": "0a6529078322c76f7460ef6dafba8367608a5163", "save_path": "github-repos/lean/plumsirawit-mynat", "path": "github-repos/lean/plumsirawit-mynat/mynat-0a6529078322c76f7460ef6dafba8367608a5163/Mynat/Pow.lean"}
""" Package: ForecastPlots fplot(x0, x1, px1, t=1:size(x0,1)+size(x1,1), args...; plt = palette([:blue,:red],max(2,size(x0,2))), kw...) Plot time series with its prediction intervals # Arguments - `x0`: Vector or Matrix with time series - `x1`: Vector of Matrix forecast for x0 - `px1`: Prediction int...
{"hexsha": "7cd2a20f15c19ccbf8084d9d2b0b66d538eedd74", "size": 1975, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/fplot.jl", "max_stars_repo_name": "viraltux/ForecastPlots.jl", "max_stars_repo_head_hexsha": "eff65f8cc61d7c97a791e933f3b38776cc0597ed", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9...
#!/usr/bin/env python # -*- coding: utf-8 -*- from shipmmg.mmg_3dof import ( Mmg3DofBasicParams, Mmg3DofManeuveringParams, simulate_mmg_3dof, get_sub_values_from_simulation_result, zigzag_test_mmg_3dof, ) from shipmmg.ship_obj_3dof import ShipObj3dof import numpy as np import pytest import os impor...
{"hexsha": "9c2355a5a0377888fef5c11bd8c200e6e7229567", "size": 11528, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_mmg_3dof.py", "max_stars_repo_name": "ShipMMG/shipmmg", "max_stars_repo_head_hexsha": "f8affed54de99f5e56a2f12ece5645bc3d429c4a", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import sounddevice as sd import soundfile as sf import itertools from numpy import ndarray # So technically I can make an equalizer out of this. But idk how. class VolumeChangeDemonstrator: def __init__(self): self.multiplier = 1 self.offset = 0 # noinspection PyTypeChecker self.a...
{"hexsha": "c241283f83b379b223be0e54941e3fbaf5f67370", "size": 1602, "ext": "py", "lang": "Python", "max_stars_repo_path": "Demo/VolumeControlDemo.py", "max_stars_repo_name": "jupiterbjy/CUIAudioPlayer", "max_stars_repo_head_hexsha": "1fa82203ff741b5700cfada5f561fb6674183006", "max_stars_repo_licenses": ["MIT"], "max_s...
# Created by Georgiy Maruzhenko on 2019-03-16. # Copyright © 2019 Georgiy Maruzhenko. All rights reserved. import numpy as np import matplotlib.pyplot as plt import math as math # Constants RODLENGTH = .3 # meters RADIUS = .01 # meters HIGHTEMP = 50 + 273.15 # Kelvin ROOMTEMP = 20 + 273.15 # Kelvi...
{"hexsha": "e3f8a45f54445d4ad0b1916b6d535d6e444ff52d", "size": 3286, "ext": "py", "lang": "Python", "max_stars_repo_path": "CodeForFinal/rod_sim.py", "max_stars_repo_name": "gmaruzhenko/ENPH_257_Assignment_4", "max_stars_repo_head_hexsha": "db9e22a00c65503019b4d58b198fab2506fd2108", "max_stars_repo_licenses": ["MIT"], ...
## 图像显示中文的问题 import matplotlib from sklearn.linear_model import BayesianRidge from sklearn.preprocessing import StandardScaler matplotlib.rcParams['axes.unicode_minus'] = False import seaborn as sns sns.set(font="Kaiti", style="ticks", font_scale=1.4) ## 导入本小节会使用到的包 import numpy as np import pandas as pd import matp...
{"hexsha": "a4ce143ff30ac778870369f9f4683b75c2abcf04", "size": 1828, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/imputer_40.py", "max_stars_repo_name": "TruthK/Informer2020", "max_stars_repo_head_hexsha": "085debb00c12418f6f51bae5609e24ee5ed5b882", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
""" Model for extracting answer sentence from the context paragraph. """ from nltk.tokenize.moses import MosesDetokenizer from tqdm import tqdm import json import numpy as np def cosine_similarity(x, y): """ Compute the cosine similarity between two vectors x and y """ return (x.dot(y)) / (np.sqrt(x.dot(x))...
{"hexsha": "4a047d042824776f74da10006c9f57769a1f634f", "size": 1433, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "LanJosh/QuestionAnswer", "max_stars_repo_head_hexsha": "38066e3268ba1a95640ae87f4066bf7223c1ad4f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
/* * This file is part of PowerDNS or dnsdist. * Copyright -- PowerDNS.COM B.V. and its contributors * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * In addition, for t...
{"hexsha": "0be93ad6780cedc73b8478fa12aa1042d1075303", "size": 10823, "ext": "cc", "lang": "C++", "max_stars_repo_path": "pdns-recursor-4.0.6/lwres.cc", "max_stars_repo_name": "hankai17/test", "max_stars_repo_head_hexsha": "8f38d999a7c6a92eac94b4d9dc8e444619d2144f", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python3 from sklearn.metrics import classification_report, accuracy_score, confusion_matrix import sys import pickle import importantWords as pre import pandas as pd from gensim.models import Doc2Vec import numpy as np from gensim.models.doc2vec import TaggedDocument def label_sentences(corpus, label_ty...
{"hexsha": "294c1327048d4081151adb5c673438f83e37abfb", "size": 1973, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_tools/yourweek.py", "max_stars_repo_name": "gabrielsimoes/your-week-nd", "max_stars_repo_head_hexsha": "ed3100ac2cb415837b03ab8d087d3b0b849e772e", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma cat_comma_ArrE[elim]: assumes "F \<in>\<^sub>\<circ> \<GG> \<^sub>C\<^sub>F\<down>\<^sub>C\<^sub>F \<HH>\<lparr>Arr\<rparr>" obtains A B where "F \<in>\<^sub>\<circ> cat_comma_Hom \<GG> \<HH> A B" and "A \<in>\<^sub>\<circ> \<GG> \<^sub>C\<^sub>F\<down>\<^sub>C\<^sub>F \<HH>\<lparr>Obj\...
{"llama_tokens": 842, "file": "CZH_Elementary_Categories_czh_ecategories_CZH_ECAT_Comma", "length": 3}
# -*- coding: utf-8 -*- """ Created on Mon Jun 11 11:32:27 2018 @author: gregz """ import glob import os.path as op import numpy as np import sys from astropy.io import fits from distutils.dir_util import mkpath from input_utils import setup_parser, set_daterange, setup_logging from utils import biweight_location fr...
{"hexsha": "959d343ceeaffdefc547ee0b7d21f17b2ce1f1a7", "size": 8360, "ext": "py", "lang": "Python", "max_stars_repo_path": "build_residuals.py", "max_stars_repo_name": "grzeimann/Panacea", "max_stars_repo_head_hexsha": "e0e9b5c64fa612659572343a47d518d8db63f2b8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
# -*- coding: utf-8 -*- """ Demonstrate use of GLLinePlotItem to draw cross-sections of a surface. """ ## Add path to library (just for examples; you do not need this) import initExample from pyqtgraph.Qt import QtCore, QtGui import pyqtgraph.opengl as gl import pyqtgraph as pg import numpy as np app = pg.mkQApp("GL...
{"hexsha": "c77034fc31c13c52cb92b70887bbb5452e5e5704", "size": 1041, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/GLLinePlotItem.py", "max_stars_repo_name": "3DAlgoLab/pyqtgraph", "max_stars_repo_head_hexsha": "53bedea724b05b5fda158946907ab881935ca865", "max_stars_repo_licenses": ["MIT"], "max_stars_...
\section{Approaches}
{"hexsha": "f8016c68718a3370b1615ce969ad372d29a0427c", "size": 21, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/paper/approaches.tex", "max_stars_repo_name": "chris-wood/yield", "max_stars_repo_head_hexsha": "61f2bf399e98bbb0bc9107cdc58ae1e18d02231c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
""" Least squares anomaly detection demo on static data. In this example, we generate some points from a 2-D Gaussian mixture, and then plot the response of the anomaly detection model across the data space given some different parameter settings. The plots show training data as black crosses, contours in blue indica...
{"hexsha": "4425d39b69f5c4e1067e51f391f2cc24ce189b8c", "size": 2937, "ext": "py", "lang": "Python", "max_stars_repo_path": "lsanomaly/notebooks/static_mix.py", "max_stars_repo_name": "lsanomaly/lsanomaly", "max_stars_repo_head_hexsha": "333027ad13a6906450bf147373d648fc9f5f50c2", "max_stars_repo_licenses": ["MIT"], "max...
import pandas as pd import numpy as np from pathlib import Path from sklearn.metrics import accuracy_score, confusion_matrix from typing import Dict from InnerEye.Common.metrics_constants import LoggingColumns from InnerEye.ML.reports.classification_report import get_labels_and_predictions_from_dataframe, LabelsAndPr...
{"hexsha": "f46e797e696f30779ec288ff02611aff142e30bd", "size": 4722, "ext": "py", "lang": "Python", "max_stars_repo_path": "InnerEye/ML/configs/reports/covid_hierarchical_model_report.py", "max_stars_repo_name": "ruiyangzhao/InnerEye-DeepLearning", "max_stars_repo_head_hexsha": "a74c8e2b8c52835df76a44ea494feacc9d82528b...
# -*- coding: utf-8 -*- """ Created on Thu Jul 23 14:46:16 2020 @author: pkk24 """ import unittest import numpy as np import pickle import os from spore import mmv_models, mmv_utils class TestMMVPsetup(unittest.TestCase): def test_signal_gen(self): N, D, k, lamTot, initSeed = 20, 1000, 3, 5, 1 ...
{"hexsha": "5ddeb351055e832014c8e9682bb9a18afead894f", "size": 5564, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_setup.py", "max_stars_repo_name": "pavankkota/SPoRe", "max_stars_repo_head_hexsha": "3062368a84130ec64bdbd7ca66de7f2b7287330e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
# This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # """Cluster Analysis. The Bio.Cluster provides commonly used clustering algorithms and was designed with the application to gene expression data in mi...
{"hexsha": "fb8bde5292487bfeb95f142e987e009d2766ac2c", "size": 27005, "ext": "py", "lang": "Python", "max_stars_repo_path": "Bio/Cluster/__init__.py", "max_stars_repo_name": "rht/biopython", "max_stars_repo_head_hexsha": "3a44496d7bd79446266a4951b7d1f64569e4a96d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
from pulse2percept.viz import (plot_argus_phosphenes, plot_argus_simulated_phosphenes) from pulse2percept.implants import ArgusI, ArgusII, AlphaAMS from pulse2percept.models import AxonMapModel, ScoreboardModel import matplotlib.pyplot as plt import numpy as np import pandas as pd import ...
{"hexsha": "2c44b1657b591e01c9ba3a4612629e79ff240583", "size": 2242, "ext": "py", "lang": "Python", "max_stars_repo_path": "pulse2percept/viz/tests/test_argus.py", "max_stars_repo_name": "narenberg/pulse2percept", "max_stars_repo_head_hexsha": "ca3aaf66672ccf3c9ee6a9a9d924184cdc6f031d", "max_stars_repo_licenses": ["BSD...
[STATEMENT] lemma derangement_enum_aux_distinct_elem: "distinct ys \<Longrightarrow> zs \<in> set (derangement_enum_aux xs ys) \<Longrightarrow> distinct zs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>distinct ys; zs \<in> set (derangement_enum_aux xs ys)\<rbrakk> \<Longrightarrow> distinct zs [PROOF ST...
{"llama_tokens": 2948, "file": "Combinatorial_Enumeration_Algorithms_Derangements_Enum", "length": 26}
from tkinter.filedialog import askopenfilename import librosa import speech_recognition as sr import numpy as np import matplotlib.pyplot as plt import cv2 from easygui import * import os from PIL import Image, ImageTk from itertools import count import string import platform arr=['a','b','c','d','e','f','g','h','i','...
{"hexsha": "3b1eeb408ce7c19e35cfbb8d376b8e5805cd8a86", "size": 2883, "ext": "py", "lang": "Python", "max_stars_repo_path": "recorded.py", "max_stars_repo_name": "Pragalbha-Patil/S-TASLC-Python", "max_stars_repo_head_hexsha": "d3d89f98cd7c2a5e8fbedccd0e40e6e15e0a8b43", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
from flucoma import fluid from flucoma.utils import get_buffer from scipy.io import wavfile from pathlib import Path import numpy as np import os test_file = Path(".") / "test" / "test_file.wav" test_file = test_file.resolve() test_buf = get_buffer(test_file) # slicers def test_transientslice(): output = fluid.tr...
{"hexsha": "316d3150c906b56bc56644fd0f388d23c1134369", "size": 4442, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_algorithms.py", "max_stars_repo_name": "jamesb93/python-flucoma", "max_stars_repo_head_hexsha": "da745160993f2e33f77c5389808efb4966ca88a2", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
from __future__ import print_function, division import tqdm import os import torch import pandas as pd import numpy as np import skimage import numpy as np import matplotlib.pyplot as plt from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils # Ignore warnings import warnings warnin...
{"hexsha": "14b8cb25b50cd5620c7cb6a2ef17ae139c61ea60", "size": 5480, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/celeba.py", "max_stars_repo_name": "johnmartinsson/adversarial-representation-learning", "max_stars_repo_head_hexsha": "86cd1489b0bdfa76bab37e313c6ab53304179f1e", "max_stars_repo_licenses...
#Monte Carlo Pricing for plain vanilla options from __future__ import division from Option import * import NMF_RND as rnd import NMF_Black_Scholes as BS import numpy as np def Monte_Carlo_Plain_Vanilla(Op, r, N, Greek=False): ''' Return the result of Monte Carlo simulation of a plain vanilla European option ...
{"hexsha": "8e4cbea595fa074ad657f04465dfa4135b0df869", "size": 1657, "ext": "py", "lang": "Python", "max_stars_repo_path": "NMF_Monte_Carlo.py", "max_stars_repo_name": "Jmaihuire/MTH_9821", "max_stars_repo_head_hexsha": "faf921ddbb2875962885ddfc75231889d0cceb3b", "max_stars_repo_licenses": ["FSFAP"], "max_stars_count":...
import os from functools import partial from io import BytesIO from IPython.display import clear_output, Image, display, HTML import numpy as np import tensorflow as tf import matplotlib.pyplot as plt plt.style.use('ggplot') import seaborn as sns import PIL.Image # TODO: 那个"左右连线"的图,换model看influence怎么变 # def compare_...
{"hexsha": "ad80b87ef107f78b29ac888efa389c79e5bfb4f4", "size": 4518, "ext": "py", "lang": "Python", "max_stars_repo_path": "influence/plot_utils.py", "max_stars_repo_name": "zedyang/46927-Project", "max_stars_repo_head_hexsha": "366693a13d8ee1daad91364640792524f4664c04", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma sorted_nmsort: "sorted (nmsort xs)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. sorted (nmsort xs) [PROOF STEP] by (auto intro: sorted_merge_all simp: nmsort_def sorted_runs)
{"llama_tokens": 84, "file": "Efficient-Mergesort_Natural_Mergesort", "length": 1}
// // Copyright (C) 2004-2018 Greg Landrum and Rational Discovery LLC // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include <RDGeneral...
{"hexsha": "b8631b93055ba0e2e819c248d318a2f042092f80", "size": 3044, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Code/GraphMol/ForceFieldHelpers/MMFF/testMultiThread.cpp", "max_stars_repo_name": "ncfirth/rdkit", "max_stars_repo_head_hexsha": "c3220f30a0369cbb70415a3bf2e4d9aa46f37e96", "max_stars_repo_licenses"...
# This is the base Simon Python Script that will work without # needing Deeplens deployment. import os #import greengrasssdk from threading import Timer import scipy import time import numpy as np import awscam import cv2 import json import requests import shutil import os import mxnet as mx from threading import Thr...
{"hexsha": "90eb1b47874aba721a667f00799dcba0ce1c5f99", "size": 15409, "ext": "py", "lang": "Python", "max_stars_repo_path": "deeplens/simonsays/simon.py", "max_stars_repo_name": "MDBox/deeplens-simon-says", "max_stars_repo_head_hexsha": "095fcaa65f733b719bda865e474f93d6e1a0329a", "max_stars_repo_licenses": ["MIT"], "ma...
!*robodoc*u* tests/test_hxir ! NAME ! test_hxir ! SYNOPSIS !$Id: test_hxir.f90 526 2018-03-25 23:44:51Z mexas $ program test_hxir ! PURPOSE ! Test cgca_hxir, a halo exchange subroutine with random order of ! remote calls. ! DESCRIPTION ! Two separate solidifications are performed, which should result...
{"hexsha": "6d3936dfc038db37637ddf2fa6f865523e5ab482", "size": 5725, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/test_hxir.f90", "max_stars_repo_name": "lcebaman/casup", "max_stars_repo_head_hexsha": "240f25f07d8ea713b9fbed9814d0ac56d0141f86", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import _init_paths import os import torch import torch.utils.data from opts import opts from models.model import create_model, load_model, save_model from models.data_parallel import DataParallel from logger ...
{"hexsha": "7b62b270ba74106481d4fb2f78170bf76fbbdd76", "size": 2199, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/latency_test_zoomed_3x3.py", "max_stars_repo_name": "nmarticorena/CenterNet", "max_stars_repo_head_hexsha": "f08477224fa14bae3fe3e4e8db26fb6ca638db2a", "max_stars_repo_licenses": ["MIT"], "max...
import os import sys sys.path.append(os.path.dirname(__file__)) import random import argparse import numpy as np import json import time from datetime import datetime from lapsolver import solve_dense import torch import torch.nn as nn import torch.nn.functional as func from torch.utils.data import Dataset, DataLoade...
{"hexsha": "8486bc1d071607b974fbe754874a0ae73e987dcb", "size": 50752, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/train.py", "max_stars_repo_name": "Peterbotliang/CenterPoint", "max_stars_repo_head_hexsha": "7f7efb15b11ec0e6fb24cc16e6f31c8a1f667324", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
from collections import defaultdict import numpy as np import random class Agent: def __init__(self, arms=10, turns=1000): self.arms = arms self.turns = turns def play(self, game): raise NotImplementedError def __repr__(self): return "Agent (Abstract Base Class)" class ...
{"hexsha": "97bb9db4060cc4bae9f34dbe83f75793215f80cd", "size": 3885, "ext": "py", "lang": "Python", "max_stars_repo_path": "agent.py", "max_stars_repo_name": "say4n/bandit.py", "max_stars_repo_head_hexsha": "39bedd17f1c953f1d320e0516b7e9289d33b8a1c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta...
(* seplog (c) AIST 2005-2013. R. Affeldt, N. Marti, et al. GNU GPLv3. *) (* seplog (c) AIST 2014-2018. R. Affeldt et al. GNU GPLv3. *) From mathcomp Require Import ssreflect ssrbool eqtype ssrnat seq. Require Import ZArith_ext ssrnat_ext. Require Import bipl seplog. Require Import topsy_hm topsy_hmAlloc_prg topsy_hmAll...
{"author": "affeldt-aist", "repo": "seplog", "sha": "b08516d34f5dedd0aafbe77d8ef270fa838e8f85", "save_path": "github-repos/coq/affeldt-aist-seplog", "path": "github-repos/coq/affeldt-aist-seplog/seplog-b08516d34f5dedd0aafbe77d8ef270fa838e8f85/seplog/topsy_hmAlloc_example.v"}
cdis Forecast Systems Laboratory cdis NOAA/OAR/ERL/FSL cdis 325 Broadway cdis Boulder, CO 80303 cdis cdis Forecast Research Division cdis Local Analysis and Prediction Branch cdis LAPS cdis cdis This software and its documentation are in the public domain and cdis are furnished "as is...
{"hexsha": "baf20b312672a42a9e076d052b5acab3fdad6832", "size": 16643, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/soil/lsm5.f", "max_stars_repo_name": "maxinye/laps-mirror", "max_stars_repo_head_hexsha": "b3f7c08273299a9e19b2187f96bd3eee6e0aa01b", "max_stars_repo_licenses": ["Intel", "Unlicense", "OLDAP-...
export guided_path_finder function _edge_generator(G::ImplicitGraph{T}, v::T, depth::Int = 1) where {T} @assert depth > 0 "Depth must be positive, argument was $depth" if depth == 1 return [(v, w) for w in G[v]] end edges = _edge_generator(G, v, depth - 1) result = Tuple{T,T}[] visit...
{"hexsha": "26aca3529c48c19dd200038c3416eae73be1af08", "size": 2652, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/guided_path_finder.jl", "max_stars_repo_name": "scheinerman/ImplicitGraphs.jl", "max_stars_repo_head_hexsha": "0cc9c163b88c13c99c1c636589dd1209e63310e1", "max_stars_repo_licenses": ["MIT"], "ma...
% !TEX program = xelatex \documentclass{resume} \pagestyle{empty} \usepackage{hyperref} \hypersetup{ colorlinks=true, linkcolor=cyan, filecolor=magenta, urlcolor=blue, } \urlstyle{same} \begin{document} \pagenumbering{gobble} % suppress displaying page number \name{MEUKAM Arnaud} \basicInfo{ \em...
{"hexsha": "85c9f9e3b2b3a6066159af796df6a481499b4511", "size": 3381, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "resume.tex", "max_stars_repo_name": "ameukam/resume", "max_stars_repo_head_hexsha": "bec444a14864d6b8f05a3631782a13ad18b590d4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star...
#define BOOST_TEST_MODULE variant #include <boost/test/included/unit_test.hpp> #include <fc/variant_object.hpp> #include <fc/exception/exception.hpp> #include <fc/crypto/base64.hpp> #include <string> using namespace fc; BOOST_AUTO_TEST_SUITE(variant_estimated_size_suite) BOOST_AUTO_TEST_CASE(null_variant_estimated_s...
{"hexsha": "8a3b0baa6a337357bbda57e6c84f7e7b0085ba25", "size": 4591, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/variant_estimated_size/test_variant_estimated_size.cpp", "max_stars_repo_name": "abitmore/mandel-fc", "max_stars_repo_head_hexsha": "9cf22cfe5976bb093528cbde500ab3bcc64dfa5a", "max_stars_repo_l...
#!/usr/bin/env python3 import sys sys.path.append("../") import plotlib import numpy import pylab import networkx import pickle fname=sys.argv[1] m_time=numpy.loadtxt(fname, delimiter=",") m_time=m_time[10:,:] m_time[m_time<0]=0.0 stim_pos=numpy.loadtxt("stim_pos.csv",delimiter=",") border1=30 border2=60 plot_len...
{"hexsha": "f8dba1a77f66a29c638d1f081291193797987f2f", "size": 809, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulation_sequence/sequence_bottleneck/plot_overlap.py", "max_stars_repo_name": "TatsuyaHaga/laplacian_associative_memory_codes", "max_stars_repo_head_hexsha": "74679a5bb6799090fe2aaf202ee6c7242e0...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/models.ipynb (unless otherwise specified). __all__ = ['ses', 'adida', 'historic_average', 'croston_classic', 'croston_sba', 'croston_optimized', 'seasonal_window_average', 'seasonal_naive', 'imapa', 'naive', 'random_walk_with_drift', 'window_average', ...
{"hexsha": "cb66d55285afe7bcabfc9f8238999b1616809c40", "size": 8011, "ext": "py", "lang": "Python", "max_stars_repo_path": "statsforecast/models.py", "max_stars_repo_name": "Nixtla/statsforecast", "max_stars_repo_head_hexsha": "cd7f9630ea3ebaa24049b859d2292bd4a9855116", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import os import math import torch import numpy as np import pandas as pd from torch.utils.data import Dataset, DataLoader from torch.nn.utils.rnn import pad_sequence def _read_file(filename, strip=False, remove_break_lines=True): with open(filename, 'r') as f: lines = [line.strip() for line in f.readlin...
{"hexsha": "73ee2fc0ea2e43085a4d0a71d690f976af4cdbb0", "size": 4830, "ext": "py", "lang": "Python", "max_stars_repo_path": "translation/custom/dataset.py", "max_stars_repo_name": "salvacarrion/mltests", "max_stars_repo_head_hexsha": "e4ac9711c1c80171f302edc88011fbe06e754490", "max_stars_repo_licenses": ["MIT"], "max_st...
""" Defines the unit tests for the :mod:`colour.models.hdr_cie_lab` module. """ import numpy as np import unittest from itertools import permutations from colour.models import XYZ_to_hdr_CIELab, hdr_CIELab_to_XYZ from colour.models.hdr_cie_lab import exponent_hdr_CIELab from colour.utilities import domain_range_scale...
{"hexsha": "b99a809e1a67221a64967dcd751d9b10bc26b778", "size": 12067, "ext": "py", "lang": "Python", "max_stars_repo_path": "colour/models/tests/test_hdr_cie_lab.py", "max_stars_repo_name": "soma2000-lang/colour", "max_stars_repo_head_hexsha": "bb7ee23ac65e09613af78bd18dd98dffb1a2904a", "max_stars_repo_licenses": ["BSD...
""" The ``discrete_allocation`` module contains the ``DiscreteAllocation`` class, which offers multiple methods to generate a discrete portfolio allocation from continuous weights. """ import numpy as np import pandas as pd import pulp def get_latest_prices(prices): """ A helper tool which retrieves the most...
{"hexsha": "1be2805b5b38882cb36c01f40f3327815e2ea944", "size": 12705, "ext": "py", "lang": "Python", "max_stars_repo_path": "pypfopt/discrete_allocation.py", "max_stars_repo_name": "sandybradley/PyPortfolioOpt", "max_stars_repo_head_hexsha": "d0407635713a43ba167f22f12d23d1eedee28384", "max_stars_repo_licenses": ["MIT"]...
[STATEMENT] lemma KoenigLemma: assumes *:"infinite (Tr::'a list set)" and **:"\<forall>i. finite{t. \<exists>t'\<in>Tr. t = take i t'}" shows "\<exists>(f::nat \<Rightarrow> 'a list). strict_mono f \<and> range f \<subseteq> {t. \<exists>t'\<in>Tr. t \<le> t'}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<e...
{"llama_tokens": 10763, "file": "HOL-CSP_Hide", "length": 95}
import optuna from keras.layers import Input, concatenate from keras.layers.core import Activation, Flatten, Reshape, Dense, Dropout from keras.layers.normalization import BatchNormalization from keras.models import Sequential from keras.models import Model import pandas as pd import numpy as np import glob import os i...
{"hexsha": "fb1ed5b09943e4b324e2b4764c9da81dbbd78b41", "size": 12475, "ext": "py", "lang": "Python", "max_stars_repo_path": "actions/src/modeler.py", "max_stars_repo_name": "ShoOgino/InferBugs", "max_stars_repo_head_hexsha": "7f8afd5616ee458fba304c402125d4fbca819b11", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import cv2 import collections from keras.models import Sequential from keras.layers.core import Dense, Activation, Dropout from keras.optimizers import SGD from keras.models import model_from_json from keras.preprocessing.image import ImageDataGenerator from sklearn import datasets from sklearn.cluster import KMeans im...
{"hexsha": "055e63836caa062cc4830215f873b705fdda2d5d", "size": 14842, "ext": "py", "lang": "Python", "max_stars_repo_path": "2_ocr/process.py", "max_stars_repo_name": "FmasterofU/soft-comp_challenges", "max_stars_repo_head_hexsha": "ea6e749d943f104c1454e514995663d3cdd46b49", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma start_sttp_resp_cons_comb [simp]: "start_sttp_resp_cons f \<Longrightarrow> start_sttp_resp (f \<box> f')" [PROOF STATE] proof (prove) goal (1 subgoal): 1. start_sttp_resp_cons f \<Longrightarrow> start_sttp_resp (f \<box> f') [PROOF STEP] by (simp add: start_sttp_resp_def)
{"llama_tokens": 121, "file": null, "length": 1}
gridSets <- function(dat,grid.size=50) { print('grid size is set for km only') dat <- dat[complete.cases(dat[,c('lon','lat')]),] xwin <- data.frame(lat=c(min(dat$lat),min(dat$lat),max(dat$lat),max(dat$lat)),lon=c(min(dat$lon),max(dat$lon),min(dat$lon),max(dat$lon))) lon.d <- vincenty(loc1=xwin[1,...
{"hexsha": "e0e0b4c79d97271bf5432d90831322687dbb1209", "size": 1034, "ext": "r", "lang": "R", "max_stars_repo_path": "R/gridSets.r", "max_stars_repo_name": "jae0/snowcrab", "max_stars_repo_head_hexsha": "b168df368b739175004275c47f5bdf6907d066d9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_r...
# -*- coding=utf-8 -*- # Kalman filter example demo in Python # 参考: # 1、卡尔曼滤波,最最容易理解的讲解.找遍网上就这篇看懂了. # https://blog.csdn.net/phker/article/details/48468591 # 2、通俗理解卡尔曼滤波及其算法实现(实例解析) # https://blog.csdn.net/tiandijun/article/details/72469471 # 3、python起步之卡尔曼滤波 # https://www.cnblogs.com/catmelo/p/4175826.html # 以下部分根据参考...
{"hexsha": "bbaf3ec034ce19422b31de2d4924b321d2a9c2a8", "size": 2570, "ext": "py", "lang": "Python", "max_stars_repo_path": "Algorithm/KalmanFilter.py", "max_stars_repo_name": "landbroken/python-learning", "max_stars_repo_head_hexsha": "48351f8e1990ca6823fdcb1ac71574542167fb11", "max_stars_repo_licenses": ["MIT"], "max_...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import sys fileDir = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(fileDir, "..")) import argparse from distutils.dir_util import mkpath import numpy as np fro...
{"hexsha": "4d2e68a98e1fff9826a7caa2000249561038dd46", "size": 2590, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/gen_embedding.py", "max_stars_repo_name": "liuzz1983/open_vision", "max_stars_repo_head_hexsha": "f346e2f789944ea590c1d263e72a6e93490bb3a0", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
from typing import List import gpbasics.global_parameters as global_param global_param.ensure_init() import tensorflow as tf from gpbasics.DataHandling import DataInput as di from gpbasics.KernelBasics import Kernel as k import gpbasics.Auxiliary.Distances as dist import numpy as np def get_ski_matrix(hyper_paramete...
{"hexsha": "b9adf8477f3147dbd5dfe0ffc2c8762fda072f39", "size": 2324, "ext": "py", "lang": "Python", "max_stars_repo_path": "main/gpbasics/Metrics/StructuredKernelInterpolation.py", "max_stars_repo_name": "Bernsai/GaussianProcessFundamentals", "max_stars_repo_head_hexsha": "43631e5161a243e7d79cf26b76bf289276f0c65a", "ma...
import numpy as np import random from scipy.stats import linregress import warnings import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt from sklearn.cluster import DBSCAN from sklearn.mixture import GaussianMixture import spikewarp as sw """ Class for managing single clustering for single cl...
{"hexsha": "adb9cd042bc5e03798e2568ac20eb33f63a5ce9c", "size": 17838, "ext": "py", "lang": "Python", "max_stars_repo_path": "spikewarp/clustering/single_clustering.py", "max_stars_repo_name": "james-isbister/spikewarp", "max_stars_repo_head_hexsha": "2de49a04649f2ca202a2830af9705f73d403a633", "max_stars_repo_licenses":...
#!/usr/bin/env python """ Utility functions. """ import cv2 import numpy as np import shapely import shapely.geometry import scipy import scipy.ndimage import skimage import skimage.draw def all_fov(simParams): """ Return all FOV and their union. """ allFOV = [] for fov in range(simParams.get_numb...
{"hexsha": "65b947abe3cd4eb2df1a553d49f260d2b0a18d11", "size": 3771, "ext": "py", "lang": "Python", "max_stars_repo_path": "mersim/util.py", "max_stars_repo_name": "HazenBabcock/MERFISH_simulator", "max_stars_repo_head_hexsha": "5eaf43b1b11c24779b89cd2818dccbfd301181a1", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
C++*************************************************************** C spec_back C Program to remove the background from a spectrum. C Fits a polynomial, and then subtract this fit C Input spectrum: image file C with flux in first line, wavelengths in second line C C Version of 26-05-94 C--***********************...
{"hexsha": "a54f441bf594df6e903af405b0895da4374b3f3b", "size": 11024, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "source/spectra/spec_back.for", "max_stars_repo_name": "jlprieur/shell_galaxies", "max_stars_repo_head_hexsha": "1dde87ef33b3c33b3a892e9ad0d642ae02ac6d9e", "max_stars_repo_licenses": ["MIT"], "m...
[STATEMENT] lemma cbelow_on_second_in: assumes "cbelow_on A ord z rel a b" shows "b \<in> A" [PROOF STATE] proof (prove) goal (1 subgoal): 1. b \<in> A [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: cbelow_on A ord z rel a b goal (1 subgoal): 1. b \<in> A [PROOF STEP] unfolding cbelow_on_def [P...
{"llama_tokens": 650, "file": "Groebner_Bases_Confluence", "length": 8}
{-# OPTIONS --cubical --safe #-} module Issue3577 where open import Agda.Primitive.Cubical renaming (primTransp to transp; primHComp to hcomp) open import Agda.Builtin.Cubical.Path open import Agda.Builtin.Sigma open import Agda.Builtin.Cubical.Sub renaming (primSubOut to ouc; Sub to _[_↦_]) refl : ∀ {l} {A : Set l}...
{"hexsha": "cb8b43a1f4cda6c5779b06097abeea695bd04f7b", "size": 895, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Fail/Issue3577.agda", "max_stars_repo_name": "shlevy/agda", "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
/* Copyright (c) 2010-2019, Delft University of Technology * All rigths reserved * * This file is part of the Tudat. Redistribution and use in source and * binary forms, with or without modification, are permitted exclusively * under the terms of the Modified BSD license. You should have received *...
{"hexsha": "88abf0f40f02ddada2261076581300ccdcb4e0d7", "size": 8963, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/src/math/quadrature/unitTestGaussianQuadrature.cpp", "max_stars_repo_name": "kimonito98/tudat", "max_stars_repo_head_hexsha": "c28f2a3e78b8492e2e054ad5e0d1f9ad785cd092", "max_stars_repo_licens...
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <fstream> #include <cassert> #include <time.h> #include <queue> //#include <boost/heap/fibonacci_heap.hpp> #include "CRS.h" using namespace std; CRS data; bool* relaxed; unsigned* totalDist; class ComparePair { public: bool operator()(pair<unsig...
{"hexsha": "6605cdd632f48a77955c3d283c4d105e29e29e1e", "size": 3346, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "MX/SSSP/C_src/sssp_dij.cpp", "max_stars_repo_name": "dzhang50/convey", "max_stars_repo_head_hexsha": "65db1667705564535a8fc433c940ce9ceab4f620", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np import numpy.random as nr import pandas as pd def simData(n=1200): """ Function to simulate the test dataset the simulated dataset in the format of Pandas's Data Frame, columns: ['x1','x2','x3','x4','x5','x6','x7','x8','y'] (xi is the covariate and 'y' is the target v...
{"hexsha": "de3ed6a2e60758dd0db80421e058c7a185a06678", "size": 1565, "ext": "py", "lang": "Python", "max_stars_repo_path": "baggingrnet/data/simulatedata.py", "max_stars_repo_name": "lspatial/baggingrnet", "max_stars_repo_head_hexsha": "6a2bb2792ee95654189e00a6c297708c4bf9967e", "max_stars_repo_licenses": ["MIT"], "max...
""" FILE: tgv3d.py AUTHOR: Paul Bartholomew DESCRIPTION: """ import numpy as np from Py4Incompact3D.postprocess.postprocess import Postprocess from Py4Incompact3D.tools.vort import calc_gradu from Py4Incompact3D.tools.vort import calc_vort from Py4Incompact3D.tools.qcrit import calc_qcrit T=20+1 def mai...
{"hexsha": "b315b812e0b31c08974aaad7fe5895a3094853e7", "size": 703, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/tgv/tgv3d.py", "max_stars_repo_name": "xcompact3d/Py4Incompact3D", "max_stars_repo_head_hexsha": "cbed209a441311082dd088db3cf28a14e89f4006", "max_stars_repo_licenses": ["Apache-2.0"], "max...
[STATEMENT] lemma lead_coeff_of_nat [simp]: "lead_coeff (of_nat n) = of_nat n" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lead_coeff (of_nat n) = of_nat n [PROOF STEP] by (simp add: of_nat_poly)
{"llama_tokens": 96, "file": null, "length": 1}
import os import xml.etree.ElementTree as ET import numpy as np import torch from pprint import PrettyPrinter import matplotlib.pyplot as plt import pandas as pd # Good formatting when printing the APs for each class and mAP pp = PrettyPrinter() device = torch.device("cuda" if torch.cuda.is_available() els...
{"hexsha": "e998d40d6f6ed1b7d0a8f9ecb2dad9df1fbecc45", "size": 16833, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluation_mAP.py", "max_stars_repo_name": "xinqi-fan/SL-FMDet", "max_stars_repo_head_hexsha": "8e938cefecc758c04f679bbf157773044d4be103", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
from eodatadown.eodatadownuseranalysis import EODataDownUserAnalysis from eodatadown.eodatadownutils import EODataDownUtils import rsgislib import rsgislib.vectorutils import rsgislib.imagecalc import rsgislib.rastergis import rsgislib.rastergis.ratutils import rsgislib.imageutils.imagelut import rsgislib.imageutils i...
{"hexsha": "51ced61c4e6ad43074ce87da3f4714ea427b8162", "size": 20265, "ext": "py", "lang": "Python", "max_stars_repo_path": "eodd_plugins/sen1/sentinel1_gmw_chng.py", "max_stars_repo_name": "globalmangrovewatch/gmw_monitoring_demo", "max_stars_repo_head_hexsha": "3c8c5df275b2088577f080eb8aaf517cb82927f3", "max_stars_re...
import numpy as np import scipy.signal def discount(x, gamma): return scipy.signal.lfilter([1],[1,-gamma],x[::-1], axis=0)[::-1] def discountedsum(x, gamma, axis=0): """ x[0] + gamma*x[1] + .... """ x = np.rollaxis(x, axis) return discount(x, gamma)[0] def test_discount(): arr = np.rando...
{"hexsha": "948adba5f2875907ed703adc15a5e7bd3d7977c9", "size": 771, "ext": "py", "lang": "Python", "max_stars_repo_path": "control4/maths/discount.py", "max_stars_repo_name": "sfpd/rlreloaded", "max_stars_repo_head_hexsha": "650c64ec22ad45996c8c577d85b1a4f20aa1c692", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
Describe Users/Betina here. Hi Betina, welcome to the wiki! Do you know anything else about Bicycle Bakery that you could add to the entry, like the location, hours, or website? I added a business template so its easy to fill in information but I dont know anything about the bakery itself. Users/ElleWeber
{"hexsha": "02f663baaa91a9aad7827cd1816fad79adaa3d29", "size": 309, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Betina.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
[STATEMENT] lemma lipschitz_on_continuous_within: "continuous (at x within X) f" if "L-lipschitz_on X f" "x \<in> X" [PROOF STATE] proof (prove) goal (1 subgoal): 1. continuous (at x within X) f [PROOF STEP] using lipschitz_on_continuous_on[OF that(1)] that(2) [PROOF STATE] proof (prove) using this: continuous_on X ...
{"llama_tokens": 189, "file": null, "length": 2}
subroutine rentch C rentch 01/02/74 01/09/70 01/09/79 common/gfgobs/njch,nkch,jg,nris,nach(16) if(nkch.eq.0) return j=nkch nach(j)=8 nkch=nkch-1 if(nkch.eq.0) goto 1 nris=0 do 3 j=1,nkch 3 nris=nris+nach(j)/4-2*(nach(j)/8) if(nris.ge.nkch) goto 5 ...
{"hexsha": "ee66c11c6e842eecc6d372c920b939810b1b0a64", "size": 392, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ftn/rentch.f", "max_stars_repo_name": "sergev/grafor", "max_stars_repo_head_hexsha": "2b7b244d84b739bdcdf1717824ee895eb015c4a0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 4, "ma...
"""Implement generators for ``tensorflow`` which will balance the data.""" from scipy.sparse import issparse from sklearn.base import clone from sklearn.utils import safe_indexing from sklearn.utils import check_random_state from sklearn.utils.testing import set_random_state from ..under_sampling import RandomUnderS...
{"hexsha": "4896907cea4bdef565e66ca3d4953de86874549c", "size": 6343, "ext": "py", "lang": "Python", "max_stars_repo_path": "imblearn/tensorflow/_generator.py", "max_stars_repo_name": "sharadgupta27/imbalanced-learn", "max_stars_repo_head_hexsha": "3d7da6fb5118ecf12ff27b1d42d7082d80f87216", "max_stars_repo_licenses": ["...
# 进入kafka安装目录 # 启动zookeeper ./bin/zookeeper-server-start.sh -daemon ./config/zookeeper.properties # 启动kafka ./bin/kafka-server-start.sh -daemon ./config/server.properties ### 作业要求:结果分(11分+6分=17分) 1. `Producer`接口应该有序发送消息:2分 答:在producer的配置中,进行如下设置即可 ``` // max.in.flight.requests.per.connection限制客户端在单个连接上能够发送的未响应请求...
{"hexsha": "710c2d2e095920bd818d7c311753f355e207ebaa", "size": 1114, "ext": "rd", "lang": "R", "max_stars_repo_path": "Readme-answer.rd", "max_stars_repo_name": "jiaruifeng07/training-mq-03", "max_stars_repo_head_hexsha": "9448cdf3261c4abacd96db3c81f4e7be53363021", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
import numpy as np import matplotlib.pyplot as plt import pandas as pd from keras.preprocessing.image import ImageDataGenerator from keras.preprocessing.sequence import TimeseriesGenerator from keras.models import Model from keras.models import Sequential from keras.optimizers import Adam from keras.layers import C...
{"hexsha": "287f72f830b417c8b8926b9ba093645440582f14", "size": 5869, "ext": "py", "lang": "Python", "max_stars_repo_path": "process_image_sequence(CRNN).py", "max_stars_repo_name": "axin233/Deep-Learning-for-Needle-Detection-in-a-Cannulation-Simulator-test-", "max_stars_repo_head_hexsha": "f52084a150c4f2b01d6e08a5a1a0a...