text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
module Types.IND where open import Data.Nat open import Data.Fin hiding (_+_) open import Data.Product open import Function open import Relation.Binary.PropositionalEquality hiding (Extensionality) open import Types.Direction open import Auxiliary.Extensionality open import Auxiliary.RewriteLemmas private varia...
{"hexsha": "4d60a5b5789108b822ca5566e0982c9ae49e5ed4", "size": 23563, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/Types/IND.agda", "max_stars_repo_name": "peterthiemann/dual-session", "max_stars_repo_head_hexsha": "7a8bc1f6b2f808bd2a22c592bd482dbcc271979c", "max_stars_repo_licenses": ["BSD-2-Clause"], "m...
module Unmarshal # package code goes here # Helper function function prettyPrint(verboseLvl, str) tabs = "" for cntr = 1:verboseLvl tabs = tabs * "\t" end println("$(tabs)$(str)") end export unmarshal # returns a reconstructed variable from a JSON parsed string using Requires using JSON im...
{"hexsha": "76bae07e0de82098751314e9cda6d337fae176fd", "size": 9270, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Unmarshal.jl", "max_stars_repo_name": "DhairyaLGandhi/Unmarshal.jl", "max_stars_repo_head_hexsha": "1478ff0829f1a835a8775bd8204fe814cbb05bb8", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import bpy import bmesh from mathutils import Vector import numpy as np # Blender import system clutter import sys from pathlib import Path UTILS_PATH = Path.home() / "Documents/python_workspace/data-science-learning" sys.path.append(str(UTILS_PATH)) import utils.blender_utils import importlib importlib.reload(utils...
{"hexsha": "701308a91fe12edf6e6037eef1f740d386fc4a96", "size": 2523, "ext": "py", "lang": "Python", "max_stars_repo_path": "cellular automata/blender-scripting/automata_blender.py", "max_stars_repo_name": "ChrizH/data-science-learning", "max_stars_repo_head_hexsha": "c5770955256ef535e22346f977fb070db98a135d", "max_star...
\section{Introduction} The involvement of the brain and spinal cord in motor control has been recognized since the earliest known clinical records of head and spinal injuries, dating back to ancient Egypt \citep{Louis1994,VanMiddendorp2010}. However, the mechanism used by the nervous system to generate movement was ...
{"hexsha": "9d035b9056673885615256497a810b57ce6973ca", "size": 34398, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/sections/mc-intro.tex", "max_stars_repo_name": "kampff-lab/shuttling-paper", "max_stars_repo_head_hexsha": "00ca13d59b45123cbc77483e0dd93e9b94dbe552", "max_stars_repo_licenses": ["CC-BY-4.0", "...
#!/usr/bin/env python """ Class Timer which provides a context for timing blocks of code. See Also: pisa.utils.profile module, which contains decorators for timing functions and methods. """ from __future__ import absolute_import, division from time import sleep, time import numpy as np from pisa.utils.format im...
{"hexsha": "1ff48a51591cc5dff0fc5665917a8aadd7603a95", "size": 2248, "ext": "py", "lang": "Python", "max_stars_repo_path": "pisa/utils/timer.py", "max_stars_repo_name": "wym109/pisa", "max_stars_repo_head_hexsha": "696803320f577d241651df900726b76a770d072a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
(* * Copyright 2019, NTU * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * Author: Albert Rizaldi, NTU Singapore *) theory NAND_Hoare_Typed imports VHDL_Hoare_Typed NAND_Femto b...
{"author": "rizaldialbert", "repo": "vhdl-semantics", "sha": "352f89c9ccdfe830c054757dfd86caeadbd67159", "save_path": "github-repos/isabelle/rizaldialbert-vhdl-semantics", "path": "github-repos/isabelle/rizaldialbert-vhdl-semantics/vhdl-semantics-352f89c9ccdfe830c054757dfd86caeadbd67159/NAND_Hoare_Typed.thy"}
#!/usr/bin/python # -*- coding: UTF-8 -*- from kfilter.simplify import * from sympy import * dt = Symbol('dt') x0, v0 = symbols('x0, v0') Q00,Q11 = symbols('Q_x, Q_v') # x = x0 + v0*dt + 1/2*a*dt**2 # v = v0 + a*dt x = Matrix([[x0],[v0]]) # vetor de estados A = Matrix([[1, dt], [0, 1]]) # matriz de transição de est...
{"hexsha": "5564cbce9f822e342a909accfa60aef3b9e3cbe8", "size": 738, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ex2.py", "max_stars_repo_name": "clnrp/kfilter", "max_stars_repo_head_hexsha": "5f9e67397f84eccbdd0b14867763b9315c2cd7c8", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nul...
#include <boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp>
{"hexsha": "3fbbc483c1f8f3fe161aeb00c11ec57597e1a76d", "size": 60, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_mpl_aux__preprocessed_mwcw_unpack_args.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_lic...
clear rm a.out -f g++ a.cpp SFMT.c -O3 -fopenmp #gcc -O3 -finline-functions -fomit-frame-pointer -DNDEBUG -fno-strict-aliasing --param max-inline-insns-single=1800 -Wmissing-prototypes -Wall -std=c99 --param inline-unit-growth=500 --param large-function-growth=900 -DSFMT_MEXP=19937 \ #a.c SFMT.c export OMP_NUM_THREA...
{"hexsha": "2c7c47e18c78adfd2c01558c8ea4fb7fa32b97a1", "size": 339, "ext": "r", "lang": "R", "max_stars_repo_path": "Trim/src/sfmt/.r", "max_stars_repo_name": "kkhuang81/AdaptiveSM", "max_stars_repo_head_hexsha": "e960c9f397171014c6d979adfb155ddbeeb11f82", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 23, "max...
import numpy as np from nengo.utils.progress import ProgressTracker class GenericSimulator(object): def __init__(self, dt=0.001, progress_bar=True): self.dt = dt self.progress_bar = progress_bar self.n_steps = 0 self.data = {} def run(self, time_in_seconds, progress_bar=None): ...
{"hexsha": "1b5195f66824ea9eab0ea7b8e1610ab7050cffd0", "size": 1116, "ext": "py", "lang": "Python", "max_stars_repo_path": "nengo_normal_form/generic.py", "max_stars_repo_name": "tcstewar/nengo_normal_form", "max_stars_repo_head_hexsha": "37ca02b20c4cc143a7bf9c27912ead36d23a04d7", "max_stars_repo_licenses": ["MIT"], "m...
[STATEMENT] lemma knowledge_equiv_eq_NS: " evs \<in> ns_public \<Longrightarrow> knows A evs \<union> {Key (priEK B), Key (priSK B), Key (shrK B)} = knows B evs \<union> {Key (priEK A), Key (priSK A), Key (shrK A)}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. evs \<in> ns_public \<Longrightarrow> knows ...
{"llama_tokens": 251, "file": "Inductive_Confidentiality_GeneralAttacker_Knowledge", "length": 2}
import os import numpy as np import pandas as pd import scipy.sparse as sparse from lib5c.util.system import check_outdir from lib5c.util.statistics import adjust_pvalues from hic3defdr.util.printing import eprint from hic3defdr.util.clusters import load_clusters from hic3defdr.util.simulation import simulate from h...
{"hexsha": "c3906544e33c805471d93075c473bc643090ebb1", "size": 10545, "ext": "py", "lang": "Python", "max_stars_repo_path": "hic3defdr/analysis/simulation.py", "max_stars_repo_name": "thomasgilgenast/hic3defdr", "max_stars_repo_head_hexsha": "7498ac468ccc21fa530d584944c1b12c73926755", "max_stars_repo_licenses": ["MIT"]...
\name{circos.raster} \alias{circos.raster} \title{ Add raster images } \description{ Add raster images } \usage{ circos.raster(image, x, y, width, height, facing = c("inside", "outside", "reverse.clockwise", "clockwise", "downward", "bending.inside", "bending.outside"), niceFacing = FALSE, sector.index = ge...
{"hexsha": "2cbbafd78c74bc18c333eb4f394fb4ea6e3e1f74", "size": 2955, "ext": "rd", "lang": "R", "max_stars_repo_path": "man/circos.raster.rd", "max_stars_repo_name": "calpan/circlize", "max_stars_repo_head_hexsha": "33f8f23663768367188e50e93d3f9b2b57edd0e7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max...
[STATEMENT] lemma "(pi * (real u * 2) = pi * (real (xa v) * - 2))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. pi * (real u * 2) = pi * (real (xa v) * - 2) [PROOF STEP] apply simp [PROOF STATE] proof (prove) goal (1 subgoal): 1. pi * real u = - (pi * real (xa v)) [PROOF STEP] oops
{"llama_tokens": 138, "file": null, "length": 2}
export _At_mul_B, _At_ldiv_B, DEFAULT_COND_TOL, hasfullrowrank, issquare, isinvertible, cross_product, nonzero_columns, extend, projection_matrix, remove_zero_columns # default tolerance for matrix condition number (see 'isinvertible') const DEFAULT...
{"hexsha": "a87ec84979dc189416068deff194ba40edffa29e", "size": 7674, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Arrays/matrix_operations.jl", "max_stars_repo_name": "nablabits/LazySets.jl", "max_stars_repo_head_hexsha": "e839322ae970e5b61271b709f8a865184b32c8e5", "max_stars_repo_licenses": ["MIT"], "max_...
import sys # import libraries import pandas as pd import numpy as np import seaborn as sns import sqlite3 from sqlalchemy import create_engine import matplotlib.pyplot as plt # import statements import nltk nltk.download('punkt') nltk.download('stopwords') nltk.download('wordnet') import re from nltk.corpus import st...
{"hexsha": "6f345a39f77ec571e665837daf25ee97a282a190", "size": 9358, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/train_classifier.py", "max_stars_repo_name": "angmx/DisasterResponseProject", "max_stars_repo_head_hexsha": "c2c29fb588570972d81622be79b66d0c41977861", "max_stars_repo_licenses": ["MIT"], "...
MODULE param_db ! Module where global PARAMETERS of Program are defined IMPLICIT NONE !--- Constants for character lenght INTEGER(kind=4),PARAMETER:: midn = 6 ,& !Maximum length for identifier milb = 6 ,& !Maximum length for internal labels ...
{"hexsha": "d98c160c5fea7ab55fe01ce48b2a25860337b503", "size": 2037, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/mainp/param_db.f90", "max_stars_repo_name": "jerebenitez/IFE-simpact-openfoam", "max_stars_repo_head_hexsha": "2dbcbf3195b22fca1c80ad0da6b3822b6cad5cdf", "max_stars_repo_licenses": ["MIT"], ...
import os from torch.utils.data import DataLoader from continuum.datasets import CIFAR10, InMemoryDataset from continuum.datasets import MNIST import torchvision from continuum.scenarios import TransformationIncremental import pytest import numpy as np from continuum.transforms.bg_swap import BackgroundSwap DATA_PAT...
{"hexsha": "f7000bc963cc817a5a5dca6aba86f5ea6dde667e", "size": 3008, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_background_swap.py", "max_stars_repo_name": "pclucas14/continuum", "max_stars_repo_head_hexsha": "3b9b0fc3c2f21dcaeafbccfa29987cefe55f37a0", "max_stars_repo_licenses": ["MIT"], "max_sta...
import json import os import sys import tensorflow as tf from keras import backend as K from keras import optimizers, utils from keras.callbacks import CSVLogger from keras.engine import Model from keras.layers import Dropout, Flatten, Dense from keras.layers import GlobalAveragePooling2D, GlobalMaxPooling2D from src...
{"hexsha": "3928dc4b6e9cf63c1016ce407fd029075ce5875a", "size": 36845, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/train/TrainClassifierEnsemble.py", "max_stars_repo_name": "RamsteinWR/PneumoniaRSNA1", "max_stars_repo_head_hexsha": "08bdba51292307a78ef711c6be4a63faea240ddf", "max_stars_repo_licenses": ["M...
from .parameters import Params from .datasets import Datasets, FdDatasets from .model import Model from collections import OrderedDict from ..detail.utilities import unique, lighten_color from .detail.derivative_manipulation import numerical_jacobian from .detail.utilities import print_styled, optimal_plot_layout from ...
{"hexsha": "b331dfbb3196cba18b9dae5e392bb6590dbce66d", "size": 26815, "ext": "py", "lang": "Python", "max_stars_repo_path": "lumicks/pylake/fitting/fit.py", "max_stars_repo_name": "lumicks/pylake", "max_stars_repo_head_hexsha": "b5875d156d6416793a371198f3f2590fca2be4cd", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
[STATEMENT] lemma INF_commute: assumes "\<forall>x\<in>U\<^sub>2. \<forall>y\<in>U\<^sub>3. f x y \<in> U" and "B \<subseteq> U\<^sub>3" and "A \<subseteq> U\<^sub>2" shows "\<Sqinter>\<^sub>o\<^sub>w ((\<lambda>x. \<Sqinter>\<^sub>o\<^sub>w (f x ` B)) ` A) = \<Sqinter>\<^sub>o\<^sub>w ((\<lambda>j. \<Sqinter...
{"llama_tokens": 4506, "file": "Types_To_Sets_Extension_Examples_SML_Relativization_Lattices_SML_Complete_Lattices", "length": 29}
# A complete use case In this section we present a complete use case, based on the meaning classification dataset introduced in [Lorenz et al. (2021)](https://arxiv.org/abs/2102.12846) QNLP paper. The goal is to classify simple sentences (such as "skillful programmer creates software" and "chef prepares delicious meal...
{"hexsha": "f54e8c0e8e3674fd6144a462dfa25fe2df6f7f72", "size": 35474, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "docs/tutorials/training-usecase.ipynb", "max_stars_repo_name": "Thommy257/lambeq-pub", "max_stars_repo_head_hexsha": "502752346610a50fd26feb27ca6c7f5ceab5eff5", "max_stars_repo_licen...
! Module to define simple error/exit codes ! and output messages. ! MODULE Message_Handler ! Module use statements USE File_Utility, ONLY: Get_Lun ! Disable all implicit typing IMPLICIT NONE ! Visibilities PRIVATE ! Module parameters PUBLIC :: SUCCESS PUBLIC :: INFORMATION PUBLIC :: WARNING PUB...
{"hexsha": "47bdbc638224ddf3f3bdda06f9d6cedbb5eaeb87", "size": 6437, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "var/external/crtm_2.3.0/libsrc/Message_Handler.f90", "max_stars_repo_name": "matzegoebel/WRF-fluxavg", "max_stars_repo_head_hexsha": "686ae53053bf7cb55d6f078916d0de50f819fc62", "max_stars_repo_l...
import gym from gym import spaces from gym.utils import seeding import pandas as pd import numpy as np from enum import Enum import matplotlib.pyplot as plt import csv import gym_anytrading.datasets.b3 as b3 class TradingEnv(gym.Env): def __init__(self): self.n_stocks = 10 self.W = 2 self....
{"hexsha": "02dfe05ca154c107fbf21c455a24cfca7cd6d1c0", "size": 5178, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym_anytrading/envs/trading_env.py", "max_stars_repo_name": "tsb4/dayTradingEnv", "max_stars_repo_head_hexsha": "16d1970a41c8933970152f1f41e504340d48cb08", "max_stars_repo_licenses": ["MIT"], "max...
'''Functions for estimating an adjustment to the posterior prediction over subtypes when making predictions online. Author: Peter Schulam ''' import numpy as np from scipy.optimize import minimize from sklearn.linear_model import LogisticRegressionCV from sklearn.cross_validation import KFold from mypy.models impor...
{"hexsha": "302e3e3eb0268b8ccf8a0c17dc3d00dbb0d024cc", "size": 4717, "ext": "py", "lang": "Python", "max_stars_repo_path": "2015/07/online_old.py", "max_stars_repo_name": "pschulam/Notebook", "max_stars_repo_head_hexsha": "3404ce01a4ebdf23216ff01512a8f84b4f7758aa", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python # -*- coding:utf-8 -*- """ An extension to the standard STScI data model for MIRI readnoise data, based on the base MIRI data model. :Reference: The STScI jwst.datamodels documentation. See https://jwst-pipeline.readthedocs.io/en/latest/jwst/datamodels/index.html :History: 16 Jul 2014: Creat...
{"hexsha": "60a752ed6b592a204a484cb87efbc2c027a8aa28", "size": 6038, "ext": "py", "lang": "Python", "max_stars_repo_path": "miri/datamodels/miri_readnoise_model.py", "max_stars_repo_name": "eslavich/MiriTE", "max_stars_repo_head_hexsha": "05e25e1222e854fef5a72011f6618fa8fb5eaaff", "max_stars_repo_licenses": ["CNRI-Pyth...
# coding:utf-8 import sys import traceback import talib import numpy as np import pandas as pd from pandas import Series from .base import * from .talib_series import LINEARREG_SLOPE as SLOPE def udf_cross(A, B): if isinstance(A, float): A1 = A0 = A ls = len(B) B1 = B.iloc[ls -2] B0 = B.iloc[ls -1] ...
{"hexsha": "080e4566e264f52642e55eeab1ea93a25a56d266", "size": 10352, "ext": "py", "lang": "Python", "max_stars_repo_path": "easyquant/indicator/udf_formula.py", "max_stars_repo_name": "dizzy21c/easyqtrs", "max_stars_repo_head_hexsha": "4704674d2175d40afdc306afd8a002a486c83220", "max_stars_repo_licenses": ["MIT"], "max...
import tensorflow as tf import numpy as np from sklearn import datasets import math import sys neurons = int(sys.argv[1]) val_checks = int(sys.argv[2]) num_epochs = int(sys.argv[3]) iris = datasets.load_iris() x = iris.data y = iris.target perm = np.random.permutation(150) x = x[perm,:] y = y[perm] y_shaped = np....
{"hexsha": "e0b99d28cd33a4bb223103741bd26820176e1ed5", "size": 1586, "ext": "py", "lang": "Python", "max_stars_repo_path": "resources/python/model.py", "max_stars_repo_name": "SvelaT/laravel-app", "max_stars_repo_head_hexsha": "d82b367ef2a9d2f2acc40087ac3a47c51edf4174", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" Support recovery on MEG data ============================ This example compares several methods that recover the support in the MEG/EEG source localization problem with statistical guarantees. Here we work with two datasets that study three different tasks (visual, audio, somato). We reproduce the real data exper...
{"hexsha": "fb955c42cb75fce437df668183295e8a0200a20d", "size": 18473, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/plot_meg_data_example.py", "max_stars_repo_name": "ja-che/hidimstat", "max_stars_repo_head_hexsha": "67189c41279613312688de519d7ea635c7da84ae", "max_stars_repo_licenses": ["BSD-2-Clause"...
# DAY 2 PROBLEM 2 ADVENT OF CODE # Get the final position of the sub starting from (0,0) commands = """forward 2 down 4 down 1 down 4 forward 3 down 6 down 5 forward 3 forward 8 down 2 down 3 up 8 down 5 up 7 down 7 forward 5 up 2 down 6 forward 7 forward 1 forward 2 forward 7 up 7 forward 6 down 3 down 1 up 9 down 2 ...
{"hexsha": "fafb5573762afa90a99a2cf2b66f44a0195880a1", "size": 8876, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "2021/day2/dive_2.jl", "max_stars_repo_name": "CrosleyZack/advent_of_code", "max_stars_repo_head_hexsha": "5dee29c845b88027d1c4b17900e398fe9b3c1e44", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, ...
{"hexsha": "4c39dd45bd94f2646af7527fd33afa7ba43f8645", "size": 4485, "ext": "py", "lang": "Python", "max_stars_repo_path": "tao_triton/python/postprocessing/multitask_classification_postprocessor.py", "max_stars_repo_name": "thtang-nv/tao-toolkit-triton-apps", "max_stars_repo_head_hexsha": "de72ae4fe96986db620b542feed9...
[STATEMENT] lemma norm_sq_mtx_def3: "\<parallel>A\<parallel> = (SUP x. (\<parallel>A *\<^sub>V x\<parallel>) / (\<parallel>x\<parallel>))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<parallel>A\<parallel> = (SUP x. \<parallel>A *\<^sub>V x\<parallel> / \<parallel>x\<parallel>) [PROOF STEP] unfolding norm_sq_mtx...
{"llama_tokens": 237, "file": "Matrices_for_ODEs_SQ_MTX", "length": 2}
#ifndef GLOBAL_TO_LOCAL_H #define GLOBAL_TO_LOCAL_H #include <ros/ros.h> #include <uav_ros_lib/topic_handler.hpp> #include <Eigen/Dense> #include <mavros_msgs/HomePosition.h> namespace tf_util { /** * @brief This class is used to transform global (Lat, Lon, Alt) to local (East, North, * Up) coordinates and the oth...
{"hexsha": "b4b89b45581903d08898724f894bf15740d9cf61", "size": 1505, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/uav_ros_lib/global_to_local.hpp", "max_stars_repo_name": "lmark1/uav_ros_lib", "max_stars_repo_head_hexsha": "be75f43a498dc54a0f696fdaa5490ebcaecb87c4", "max_stars_repo_licenses": ["BSD-3-Cl...
#!/bin/env python """ Tool demonstrating how to convert from Python Dictionaries to XML""" from xmltools import * try : from cxmltools import * # Use CXMLtools if possible except : pass import sys if __name__ == "__main__" : input_stdin = False output_stdout = False if (len(sys.argv)==1) : ...
{"hexsha": "343396d15a57cf347e3c6f6d90849d2f09d003ab", "size": 1366, "ext": "py", "lang": "Python", "max_stars_repo_path": "deps/PicklingTools170Release/Python/dict2xml.py", "max_stars_repo_name": "dcanelhas/sdf_tracker-LS", "max_stars_repo_head_hexsha": "2685ce41fc1c8ae12d270c5e2b88afc987af9f45", "max_stars_repo_licen...
[STATEMENT] lemma iteratei_postfixed_correct : assumes invar: "invar_trie (t :: ('key, 'val) trie)" shows "set_iterator ((iteratei_postfixed ks0 t)::('key list \<times> 'val, '\<sigma>) set_iterator) ((\<lambda>ksv. (rev (fst ksv) @ ks0, (snd ksv))) ` (map_to_set (lookup_trie t)))" [PROOF STATE] proof (p...
{"llama_tokens": 9981, "file": "Collections_ICF_impl_Trie_Impl", "length": 65}
import os import alignfaces as af import numpy as np # plotting results in nice figures from skimage.util import montage import matplotlib.pyplot as plt def slim_fig(ax): ax.set_axis_off() plt.subplots_adjust(top = 1, bottom = 0, right = 1, left = 0, hspace = 0, wspace = 0) plt.margins(0,...
{"hexsha": "81ceb70ba1bee562beb7c8b31f7e90e76eb42a48", "size": 4256, "ext": "py", "lang": "Python", "max_stars_repo_path": "demos/demo_3_averaging/run_demo.py", "max_stars_repo_name": "SourCherries/auto-face-align", "max_stars_repo_head_hexsha": "365bd01c22da6f3a44190261786fcc585687ea50", "max_stars_repo_licenses": ["A...
# Written by Mansur Yeşilbursa import numpy as np import pickle def ml_sentence_splitter(text): ''' Args: text: given a string Returns: sentences: list of sentences in the string ''' model_dir = '../models/sentence_splitting/' with open(model_dir + 'model_liblinear...
{"hexsha": "9d3d5f59d840bb3b0f51c3de97332d6bc2f815bd", "size": 1563, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ml_sentence_splitter.py", "max_stars_repo_name": "garsontrier/turkish-nlp-preprocessor", "max_stars_repo_head_hexsha": "88180c21fe22b7d88e3d6bff82afbf1be7cadd75", "max_stars_repo_licenses": ["...
import copy import math import numpy as np from typing import Any, Mapping from scipy.spatial.transform import Slerp from scipy.spatial.transform import Rotation from src.robots.motors import MotorCommand from src.robots.robot import Robot import lp_python_interface def lerp(a: float, b: float, t: float) -> float: ...
{"hexsha": "17ba5eda36ce013d4299cacb3439c8fb5ecaa400", "size": 11967, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/controller/leg_controller.py", "max_stars_repo_name": "jrenaf/fast_and_efficient", "max_stars_repo_head_hexsha": "708b2e79fba19330190046f29383d298a95c3abd", "max_stars_repo_licenses": ["MIT"]...
import numpy as np import copy import math import cv2 import time import scipy.signal as ss class Node(object): def __init__(self, grid): """ :param grid: np.array nrow*ncolumn author: weiwei date: 20190828, 20200104 """ self.grid = copy.deepcopy(grid) s...
{"hexsha": "7ffa769731987463134bd280ea5bb4c4c7fceff7", "size": 10567, "ext": "py", "lang": "Python", "max_stars_repo_path": "0000_huri/tubepuzzlefast.py", "max_stars_repo_name": "liang324/wrs", "max_stars_repo_head_hexsha": "46eadec355c61a9c7bac1fa0f3cf419b2aac19aa", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
"""OpenCV Camera class for lens correction with Charuco calibration.""" from .Camera import Camera from pathlib import Path import numpy as np from threading import Event, Thread import time import subprocess import os import sys try: import cv2 from cv2 import aruco except ImportError: raise ImportError(...
{"hexsha": "24dd74c29eb7efac9aec5b69f8c9360548d553d9", "size": 22318, "ext": "py", "lang": "Python", "max_stars_repo_path": "camera_fusion/CameraCorrected.py", "max_stars_repo_name": "a1rb4Ck/camera_fusion", "max_stars_repo_head_hexsha": "2c62ec2e9b26c88a5bc8180b3af63d39609b1c21", "max_stars_repo_licenses": ["MIT"], "m...
# tests for tf_util import numpy as np import tensorflow as tf from stable_baselines.common.tf_util import function, initialize, single_threaded_session, is_image def test_function(): """ test the function function in tf_util """ with tf.Graph().as_default(): x_ph = tf.placeholder(tf.int32, (...
{"hexsha": "d71374da03ba1f88fb12b683b4348d5b7f556744", "size": 1713, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_tf_util.py", "max_stars_repo_name": "TreeKid/stable-baselines", "max_stars_repo_head_hexsha": "129c1958160b95962b887c312cd2273aed35df60", "max_stars_repo_licenses": ["MIT"], "max_stars_...
REBOL [] do %rugby.r code: {add1: func [ n [number!]][n + 1]} do get-rugby-service http://localhost:8002 extend-env [add1] code
{"hexsha": "6cb265a376424c35b217165cbc3d8a7c32b49c4e", "size": 129, "ext": "r", "lang": "R", "max_stars_repo_path": "xtest.r", "max_stars_repo_name": "mbk/rugby", "max_stars_repo_head_hexsha": "4c9507aae30b606e702349be8a3e6b9298e75ac7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1, "max_stars_repo_st...
// (C) Copyright John Maddock 2006. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_TOOLS_POLYNOMIAL_HPP #define BOOST_MATH_TOOLS_POLYNOMIAL_HPP #i...
{"hexsha": "8225736b9e5838303d7bcfccdd76d9094ff3e022", "size": 8032, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ReactAndroid/build/third-party-ndk/boost/boost_1_57_0/boost/math/tools/polynomial.hpp", "max_stars_repo_name": "kimwoongkyu/react-native-0-36-1-woogie", "max_stars_repo_head_hexsha": "4fb2d44945a630...
[STATEMENT] lemma dim_solution_set_not_zero_imp_infinite_solutions_no_homogeneous: fixes A::"'a::{field, semiring_char_0}^'n::{mod_type}^'rows::{mod_type}" assumes dim_not_0: "vec.dim (solution_set A 0) > 0" and con: "consistent A b" shows "infinite (solution_set A b)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ...
{"llama_tokens": 2270, "file": "Gauss_Jordan_System_Of_Equations", "length": 28}
[STATEMENT] lemma get_update_eq [simp]: "get (update a i v h) a = (get h a) [i := v]" [PROOF STATE] proof (prove) goal (1 subgoal): 1. get (update a i v h) a = (get h a)[i := v] [PROOF STEP] by (simp add: update_def)
{"llama_tokens": 98, "file": null, "length": 1}
#!/usr/bin/env python # -*- coding: utf-8 -*- # gauss2d.py """ Class for generating and fitting 2D Gaussian peaks Supports both least squares and MLE fitting and gaussian peaks parameterized by a single width, widths along each axis and widths along arbitrary axes. Fitting can be done with manually specified guesses o...
{"hexsha": "30bbb83c9edf3039bfdc37510ad437e42ef27c8a", "size": 36593, "ext": "py", "lang": "Python", "max_stars_repo_path": "peaks/gauss2d.py", "max_stars_repo_name": "david-hoffman/peaks", "max_stars_repo_head_hexsha": "b31a13fcb93005ed01e5295389f91491bafc71cd", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
import numpy as np from libsvmdata.datasets import fetch_libsvm from celer import LogisticRegression # from sklearn.linear_model import LogisticRegression from sparse_ho.models import SparseLogreg from sparse_ho.criterion import LogisticMulticlass from sparse_ho import ImplicitForward from sparse_ho.optimizers import...
{"hexsha": "01effe22c116fec5b3631b30a6556f6f5fea913e", "size": 2599, "ext": "py", "lang": "Python", "max_stars_repo_path": "expes/multiclass/plot_multiclass.py", "max_stars_repo_name": "LeoIV/sparse-ho", "max_stars_repo_head_hexsha": "f0a5792766a7f0c03bba28cddb983621174cb4ea", "max_stars_repo_licenses": ["BSD-3-Clause"...
import os import numpy as np import tensorflow as tf import matplotlib.pyplot as plt import logging import csv import pickle from tensorflow.python import debug as tf_debug logging.basicConfig(level=logging.INFO) DIR_DATASET = "../dataset" FILENAME_PKL = "train.pkl" PATH_IMG_PKL = os.path.join(DIR_DATASET, FILENAME_...
{"hexsha": "ff991666eb966e2fbab7e2d73771a4557f0ecff1", "size": 6177, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/train.py", "max_stars_repo_name": "JaveyWang/5-char-real-number-recognition", "max_stars_repo_head_hexsha": "dca6cb748d466a774b4e5a1daa4a31af7e04a550", "max_stars_repo_licenses": ["MIT"], "max...
[STATEMENT] lemma length_coeffs_degree': "length (coeffs p) = (if p = 0 then 0 else Suc (degree p))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. length (coeffs p) = (if p = 0 then 0 else Suc (degree p)) [PROOF STEP] by (cases "p = 0") (auto simp: length_coeffs_degree)
{"llama_tokens": 124, "file": "Factor_Algebraic_Polynomial_Roots_via_IA", "length": 1}
#Kaplan-Meier Estimator import numpy as np import numpy.linalg as la import matplotlib.pyplot as plt from scipy import stats from statsmodels.iolib.table import SimpleTable class KaplanMeier(object): """ KaplanMeier(...) KaplanMeier(data, endog, exog=None, censoring=None) Create an object of...
{"hexsha": "bbba55503b0f916091ad183467e54bd6d8f8e2d4", "size": 17924, "ext": "py", "lang": "Python", "max_stars_repo_path": "statsmodels/sandbox/survival2.py", "max_stars_repo_name": "yarikoptic/statsmodels", "max_stars_repo_head_hexsha": "f990cb1a1ef0c9883c9394444e6f9d027efabec6", "max_stars_repo_licenses": ["BSD-3-Cl...
\documentclass[a4paper]{article} %\documentclass[a4paper]{scrartcl} \usepackage{url} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{amssymb} \usepackage{subcaption} \usepackage{float} \usepackage{comment} \usepackage{graphicx} \usepackage{xcolor} \renewcommand{\i}[1]{\textit{#1}} \newcommand\blue[1]{\textcol...
{"hexsha": "5adf7456586cbdeda7327ed4e02ee9501796b76a", "size": 5273, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "notes/fomega/cek-cps-experiments/tex/results.tex", "max_stars_repo_name": "AriFordsham/plutus", "max_stars_repo_head_hexsha": "f7d34336cd3d65f62b0da084a16f741dc9156413", "max_stars_repo_licenses": [...
// Boost sorting_algo library float_sort_test.cpp file ---------------------------// // Copyright Steven Ross 2009. Use, modification and // distribution is subject to 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) // See h...
{"hexsha": "105322e2e7065fb19c471a4d5328a02a01f696dd", "size": 3435, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/algorithm/sorting/test/float_sort_test.cpp", "max_stars_repo_name": "spreadsort/algorithm_sorting", "max_stars_repo_head_hexsha": "bc425fcfe8c883f3f6c8a4068bb55d4b7da2d1da", "max_stars_repo_lic...
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
{"hexsha": "4a47cf9bf9062b89c76554720a337296e9ea2703", "size": 10240, "ext": "py", "lang": "Python", "max_stars_repo_path": "ffn/inference/resegmentation.py", "max_stars_repo_name": "necrodancer/ffn", "max_stars_repo_head_hexsha": "43552bbc2585ca350d8495454e7580c47806e637", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import numpy as np import qiskit.quantum_info as qi def concurrence_single(dm): # dm = qi.DensityMatrix(dm) con = qi.concurrence(dm) return con def concurrence(dm_tensor): con_list = list(map(concurrence_single, dm_tensor)) con_tensor = np.array(con_list) return con_tensor
{"hexsha": "9931eecbfc2b91a2e1180514033ded05dc3f5ea4", "size": 299, "ext": "py", "lang": "Python", "max_stars_repo_path": "Toy-model/CP_werner_with_MA/utils/Concurrence_Measure.py", "max_stars_repo_name": "slohani-ai/data-centric-in-qis", "max_stars_repo_head_hexsha": "bbc545454f7d98a28a4fc83f2f6b14de253fcb6c", "max_st...
import matplotlib.pyplot as plt from matplotlib.lines import Line2D import matplotlib.patches as mpatches import numpy as np def histogram(df, df_column, binwidth=10, including=10, ultima_medalha=3, ultima_mencao=10, ax=None): """Gera histograma com os dados de notas, com linhas destacando a zon...
{"hexsha": "bfee71b38b0d7562b527a897d553df6fc15da678", "size": 3935, "ext": "py", "lang": "Python", "max_stars_repo_path": "resultados/plots.py", "max_stars_repo_name": "chicolucio/estatisticas-oiq-2019", "max_stars_repo_head_hexsha": "017da73f3bef6a6f40d7dd1214621cad7c14be2e", "max_stars_repo_licenses": ["MIT"], "max_...
import os.path from os import path from time import sleep import time, random import numpy as np from absl import app, flags, logging import cv2 import matplotlib.pyplot as plt import tensorflow as tf from yolov3_tf2.models import ( YoloV3, YoloV3Tiny ) from yolov3_tf2.dataset import transform_images from yolov3_tf...
{"hexsha": "6c8ce19ce2c8f70eeadf17b77833b7d7d12859bf", "size": 7564, "ext": "py", "lang": "Python", "max_stars_repo_path": "deep_sort/object_track.py", "max_stars_repo_name": "lilun-cheng/vehicle_highway_tracking", "max_stars_repo_head_hexsha": "99c9981c2d9f998d90df070d271b7b88f6dc0a35", "max_stars_repo_licenses": ["Ap...
\par \section{Driver programs for the {\tt DFrontMtx} object} \label{section:DFrontMtx:drivers} \par %======================================================================= \begin{enumerate} %----------------------------------------------------------------------- \item \begin{verbatim} testGrid msglvl msgFile n1 n2 n3...
{"hexsha": "bc351c7014311e2a4dbf52a05b0708a0573bce7e", "size": 4975, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ccx_prool/SPOOLES.2.2/FrontMtx/doc/drivers.tex", "max_stars_repo_name": "alleindrach/calculix-desktop", "max_stars_repo_head_hexsha": "2cb2c434b536eb668ff88bdf82538d22f4f0f711", "max_stars_repo_lice...
MODULE ps_local_fftw_module use rgrid_module, only: Ngrid use ggrid_module, only: NGgrid, MGL, MG_0,MG_1, LLG, allgatherv_ggrid & ,construct_ggrid, destruct_ggrid use fftw_module, only: ML1_c, ML2_c, N_ML3_c, ML3_c0 & ,zwork3_ptr0, zwork3_ptr1, plan_backward, z3_to_d1_fftw use,i...
{"hexsha": "2e105b70a0694f044d98ffc0f19e7f44bbe8737d", "size": 1935, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/ps_local_fftw_module.f90", "max_stars_repo_name": "j-iwata/RSDFT", "max_stars_repo_head_hexsha": "2a961b2c8339a49de9bd09f55e7d6a45b6159d2e", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
"""Random policies. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from tf_agents.policies import random_tf_policy from tf_agents.specs import tensor_spec from tf_agents.trajectories import policy_step from p...
{"hexsha": "92e04289f60703e9b083a2674202d72d57289f30", "size": 3370, "ext": "py", "lang": "Python", "max_stars_repo_path": "policies/random_policy.py", "max_stars_repo_name": "StanfordVL/cavin", "max_stars_repo_head_hexsha": "581f70fefb3a869db739d8539f3b74759ab71777", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
Name: Karahan Mete Long time Davis resident. Educator Business Management Consultant R&D Agriculture: Introduced Black tea farming in California Support sustainable agriculture. Nondenominational Reverend Practice Sufism Social Justice Activist. Concerned and seeking to promote human welfare Born and raised in Turkey...
{"hexsha": "83b612ce8a742e27868d91794b7864530739dffe", "size": 363, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Karahan_Mete.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
[STATEMENT] lemma "add_tvarsT T acc = acc \<union> tvsT T" [PROOF STATE] proof (prove) goal (1 subgoal): 1. add_tvarsT T acc = acc \<union> tvsT T [PROOF STEP] unfolding add_tvarsT_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. fold_atyps (case_typ (\<lambda>literal list. id) (\<lambda>idn s. insert (idn, s))) ...
{"llama_tokens": 1151, "file": "Metalogic_ProofChecker_Term", "length": 7}
import os, sys import csv from os.path import isfile, join from collections import Counter import matplotlib.pyplot as plt import streamlit as st import pandas as pd import numpy as np import altair as alt import sklearn import numpy from sklearn.cluster import DBSCAN from sklearn import metrics from sklearn.datasets i...
{"hexsha": "0980e9359446296b60c4fc76c73be29175075ccf", "size": 5955, "ext": "py", "lang": "Python", "max_stars_repo_path": "otherCodeTaskSnippets/AgeGenderOPTICS.py", "max_stars_repo_name": "s2812135/Data_Challenges_WiSe2122", "max_stars_repo_head_hexsha": "a55372f444e7344af4e2e1f04e4244fb8cefeefe", "max_stars_repo_lic...
from sklearn import skbase import numpy as np #https://www.kaggle.com/c/ashrae-energy-prediction/discussion/113784#latest-656376 class DatetimeConvertCyclical(skbase.BaseEstimator, skbase.TransformerMixin): def __init__(self): self.time_periods = {'second': 24 * 60 * 60, 'minu...
{"hexsha": "189af03652f0c7065c863635cf916ea2100e2baf", "size": 912, "ext": "py", "lang": "Python", "max_stars_repo_path": "python-package/LiteMORT/LiteMORT_time.py", "max_stars_repo_name": "closest-git/LiteMORT", "max_stars_repo_head_hexsha": "4c04277f2c5c7500e00ce4e3d26c2641ea85377e", "max_stars_repo_licenses": ["MIT"...
"""Utility functions used by the notebooks """ import json from pathlib import Path import numpy as np import pandas as pd import matplotlib.pyplot as plt pd.options.display.max_columns = 48 pd.options.display.max_rows = 48 def cal_phrate_alex(d, stream, phrates=None, recompute=False): """Compute peak photon r...
{"hexsha": "cb08969a461738f57c15109c8e903f132edbe0bd", "size": 6689, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "tritemio/48-spot-smFRET-PAX-analysis", "max_stars_repo_head_hexsha": "63c61dc93c9a605796b883ab44ed33ed5f3761d6", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
""" This module helps construct sums of non-hermitian operators for measuring specific sets of amplitudes. The general procedure for measuring individual amplitudes was outlined in Nature Communications 7, Article number: 10439 (2016) doi:10.1038/ncomms10439 Each amplitude c_{j} is associated with an operator |a><j|...
{"hexsha": "94f6a771c24cc7357dcd7c86486c13f4ea818790", "size": 5623, "ext": "py", "lang": "Python", "max_stars_repo_path": "grove/measurements/amplitude_measurement.py", "max_stars_repo_name": "mkeshita/grove", "max_stars_repo_head_hexsha": "dc6bf6ec63e8c435fe52b1e00f707d5ce4cdb9b3", "max_stars_repo_licenses": ["Apache...
# Plots a spectrogram as a figure. This should be a good app to import argparse import matplotlib.pyplot as plt import numpy import mir3.data.self_similarity_matrix as ssm if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('infile', help="""spectrogram file""") parser.add_a...
{"hexsha": "5ddfbbfd3f736f37d6ac4b9000072bd0bc797fb3", "size": 1408, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/pyplot/plot-selfsimilarity.py", "max_stars_repo_name": "pymir3/pymir3", "max_stars_repo_head_hexsha": "c1bcca66a5ef1ff0ebd6373e3820e72dee6b0b70", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np import pandas as pd from sklearn.preprocessing import LabelEncoder from keras.models import Sequential from keras.layers import Dense from keras.layers import Flatten from keras.layers.convolutional import Convolution1D from keras.layers.convolutional import MaxPooling1D from keras.layers.embeddings ...
{"hexsha": "3d1d52b30beec205d711fe78972f366744eadf8d", "size": 4746, "ext": "py", "lang": "Python", "max_stars_repo_path": "ECS_demo/core.py", "max_stars_repo_name": "reconjohn/dev", "max_stars_repo_head_hexsha": "aa2248338d9f3b54c345baf1dcd9531592586925", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_...
import matplotlib.pyplot as plt import matplotlib import numpy as np import argparse import warnings import astropy.units as u from astropy.table import Table from astropy.modeling.fitting import LevMarLSQFitter from G21 import G21, G21_drude_asym def clean_pnames(pnames): """ function to clean of the _? ...
{"hexsha": "532e691ca3d154c5e3dcf83aba77da16c3c9582c", "size": 4283, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/fit_mir_ext_powerlaw_ob12.py", "max_stars_repo_name": "karllark/spitzer_mir_ext", "max_stars_repo_head_hexsha": "72b5af2610761b1056f966299c48f37714d3486c", "max_stars_repo_licenses": ["BSD-3...
from .. import ParallelSampler import numpy as np from . import metropolis from cosmosis.runtime.analytics import Analytics import os #We need a global pipeline #object for MPI to work properly pipeline=None METROPOLIS_INI_SECTION = "metropolis" def posterior(p): return pipeline.run_results(p) class Metropoli...
{"hexsha": "957514dd22e3d1915bee016f9f786f49752a2c4f", "size": 8875, "ext": "py", "lang": "Python", "max_stars_repo_path": "cosmosis/samplers/metropolis/metropolis_sampler.py", "max_stars_repo_name": "annis/cosmosis", "max_stars_repo_head_hexsha": "55efc1bc2260ca39298c584ae809fa2a8e72a38e", "max_stars_repo_licenses": [...
import jax import jax.numpy as jnp import pytreearray as pta def default_norm(res, t): if isinstance(res, jnp.ndarray): return jnp.sqrt(jnp.mean(jnp.abs(res) ** 2)) else: return jnp.sqrt( jax.tree_util.tree_reduce( lambda x, y: x + y, jax.tree_map(l...
{"hexsha": "62e31712d45ca31b3d4be7a8847e9cd0a726b7bc", "size": 851, "ext": "py", "lang": "Python", "max_stars_repo_path": "ode4jax/_src/base/residuals.py", "max_stars_repo_name": "PhilipVinc/netket_dynamics", "max_stars_repo_head_hexsha": "6e8009098c279271cb0f289ba9e85c039bb284e4", "max_stars_repo_licenses": ["Apache-2...
#!/usr/bin/env python3 import json import numpy import os.path import statistics import sys import operator import functools import numbers import math from collections import defaultdict, Counter def main(): paths = sorted(sys.argv[1:], key=get_time) games = list(collect_data(paths)) stats = get_stats(...
{"hexsha": "84bdce1ea747e3344f7b3650458b8fd009188d95", "size": 10854, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/results_stats.py", "max_stars_repo_name": "elsid/CodeSide", "max_stars_repo_head_hexsha": "2c08f73114cd1e4d29cde61b342d1ef4e052e5cc", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
[STATEMENT] lemma sup_left_zero[simp]: "top \<squnion> -x = top" [PROOF STATE] proof (prove) goal (1 subgoal): 1. top \<squnion> - x = top [PROOF STEP] by (metis complement_bot sub_commutative sup_right_zero)
{"llama_tokens": 89, "file": "Subset_Boolean_Algebras_Subset_Boolean_Algebras", "length": 1}
#include <boost/property_tree/ptree.hpp> #include <iostream> using boost::property_tree::ptree; int main() { ptree pt; pt.put("C:.Windows.System", "20 files"); ptree &c = pt.get_child("C:"); ptree &windows = c.get_child("Windows"); ptree &system = windows.get_child("System"); std::cout << system.get_valu...
{"hexsha": "7178b6be4a2fd49bc9a185d54493bdd255cc60d9", "size": 347, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Example/propertytree_01/main.cpp", "max_stars_repo_name": "KwangjoJeong/Boost", "max_stars_repo_head_hexsha": "29c4e2422feded66a689e3aef73086c5cf95b6fe", "max_stars_repo_licenses": ["MIT"], "max_star...
"""TRUNAJOD ttr tests.""" import string from collections import namedtuple import numpy as np import pytest from TRUNAJOD import ttr Token = namedtuple("Token", ["lemma_", "pos_"]) @pytest.fixture def test_doc(): """Fixture to use a doc for tests.""" doc = [ Token(lemma_="hola", pos_="hola"), ...
{"hexsha": "68b7ed9945a1b25acdffd6837ee0418f2b5e830b", "size": 3409, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/ttr_test.py", "max_stars_repo_name": "dpalmasan/TRUNAJOD2.0", "max_stars_repo_head_hexsha": "b718cacf2ec6bf1e868b7cb2c2b89bd4d08f37cc", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import Arena from MCTS import MCTS from go.Game import Game from go.GoPlayers import * from go.pytorch.NNet import NNetWrapper as NNet import numpy as np from utils import * """ use thisss script to play any two agents against each other, or play manually with any agent. """ args = dotdict({ 'size': 9, ...
{"hexsha": "b7bbfd666fe9a020e9d906bbf97885af30d37c2c", "size": 2362, "ext": "py", "lang": "Python", "max_stars_repo_path": "pit.py", "max_stars_repo_name": "jiz322/GoAgent", "max_stars_repo_head_hexsha": "d8a082348b7c0ce0e5cd83d449ad82bf4cc84c56", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_...
from keras.models import Sequential from keras.layers import Dense, Activation, Dropout from keras.layers import LSTM, TimeDistributed import random as rnd import numpy as np def genModel( nChars, nHidden, numLayers = 1, dropout = 0.5, recurrent_dropout = 0.5 ): """Generates the RNN model with nChars characters ...
{"hexsha": "e951dc979213a017eb432c538cc086273035740f", "size": 1661, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/rnnModel.py", "max_stars_repo_name": "m0baxter/twitterBot", "max_stars_repo_head_hexsha": "446b0b76d80a5d2666e69013d9aaf13cb60cc65f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ...
module IdentityVectorsTests using Test using Gridap.Arrays l = 10 a = IdentityVector(l) b = collect(1:l) test_array(a,b) c = rand(l) d = lazy_map(Reindex(c),a) @test d === c end # module
{"hexsha": "3e67241e3e6b95d1b70d77777007f166b9853074", "size": 191, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/ArraysTests/IdentityVectorsTests.jl", "max_stars_repo_name": "aerappa/Gridap.jl", "max_stars_repo_head_hexsha": "1fb3dc9abf8c47685637901bd14a74e4355a9492", "max_stars_repo_licenses": ["MIT"], "...
from __future__ import absolute_import, division, print_function, unicode_literals import fragment import numpy as np import os import tensorflow as tf import utils OUTPUT_DIR = "data/processed" def preprocess_fragment(fragment): np_data = fragment.np_data ds = np_data.shape tf_input = np_data.reshape(1...
{"hexsha": "bf9b5d1c35fc7f82bcd55b6d44a60ba623a68bb7", "size": 2031, "ext": "py", "lang": "Python", "max_stars_repo_path": "load_data.py", "max_stars_repo_name": "sbenthall/deeptune", "max_stars_repo_head_hexsha": "ac74b09367f951df17c986a4890242bee9b2fcb7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max...
# -*- coding: utf-8 -*- """ 1-D model Module Name : Graph Graph module for 2-D data Fanghe @ gatech MoSE 3229 Version: + python => 3.5 + Anaconda recommend USTC-AEMOL Gatech-Apollo """ import numpy as np import matplotlib.pyplot as plt def graph_output(data, time_step, fig_type = "contour"): """ Thi...
{"hexsha": "c723ca9d42534fdb0c71fbaa0ab2e65391fba7ef", "size": 1160, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plot_model.py", "max_stars_repo_name": "zfh1997/P1dD_model", "max_stars_repo_head_hexsha": "506da52a1c2251aee69e8d14cb354d4a6398e9df", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import argparse import json import os from pprint import pprint from collections import Counter import torch import numpy as np from sklearn.metrics import ( precision_recall_fscore_support, confusion_matrix, accuracy_score, ) from .data import SlotFeatures from .wikievents import WikiEventsArgumentDatase...
{"hexsha": "55a8808f416767aa9be9fecb25ef62925cd91d75", "size": 8435, "ext": "py", "lang": "Python", "max_stars_repo_path": "a2t/slot_classification/run_evaluation.py", "max_stars_repo_name": "techthiyanes/Ask2Transformers", "max_stars_repo_head_hexsha": "7ea530eb39db3514f0d9147b783fcd14a184c599", "max_stars_repo_licens...
import pickle import os import numpy as np from gala import imio, agglo, features, classify fman = features.default.snemi3d() def train(index): out_fn = 'training-data-%i.h5' % index if os.path.exists(out_fn): data, labels = classify.load_training_data_from_disk(out_fn, ...
{"hexsha": "2a709f51c95cc669dd78cdec425df1f397b2e9ec", "size": 2192, "ext": "py", "lang": "Python", "max_stars_repo_path": "crossval4x.py", "max_stars_repo_name": "jni/gala-scripts", "max_stars_repo_head_hexsha": "fc0ee0d418496f0ec8da01e8bd8e2d12024accaa", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":...
(* The well-ordering theorem. The proof mostly follows Section III.2 of Bourbaki. *) theory WellOrder imports Interval Wfrec begin section \<open>Operation of adjoining a greatest element to an order\<close> (* Abbreviated to ++ in this theory only *) definition adjoin_greatest :: "[i, i] \<Rightarrow> i" (...
{"author": "bzhan", "repo": "auto2", "sha": "2e83c30b095f2ed9fa5257f79570eb354ed6e6a7", "save_path": "github-repos/isabelle/bzhan-auto2", "path": "github-repos/isabelle/bzhan-auto2/auto2-2e83c30b095f2ed9fa5257f79570eb354ed6e6a7/FOL/WellOrder.thy"}
# Gets parameters from a fit, puts them in a dataframe, prints them pretty. from StringIO import StringIO import pandas as pd import numpy as np import prettytable def get_params(fit_params, u_param=None): afit_params = np.asarray(fit_params) rfit_params = np.around(afit_params, decimals=6) ffit_params...
{"hexsha": "5f7442ef97fde7fb4185bc8d40641e0e851de9dc", "size": 1538, "ext": "py", "lang": "Python", "max_stars_repo_path": "userlib/analysislib/paco_analysis/fit_table.py", "max_stars_repo_name": "specialforcea/labscript_suite", "max_stars_repo_head_hexsha": "a4ad5255207cced671990fff94647b1625aa0049", "max_stars_repo_l...
//------------------------------------------------------------------------------ /* This file is part of cbcd: https://github.com/cbc/cbcd Copyright (c) 2012, 2013 cbc Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, pro...
{"hexsha": "9cf53d0e985ee61b7f65cea92e9ef0b2b55621a0", "size": 5160, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/cbc/app/paths/Flow.cpp", "max_stars_repo_name": "sergeym610/ripple_fork", "max_stars_repo_head_hexsha": "a2c3dbf8cd61adf02d32a32ea6c2c21e547a1367", "max_stars_repo_licenses": ["BSL-1.0"], "max_s...
import OpenMORe.model_order_reduction as model_order_reduction from OpenMORe.utilities import * import matplotlib.pyplot as plt import numpy as np import os ####################################################################################### # In this example it's shown how to use the Varimax rotation to increase ...
{"hexsha": "94bf606b4769dce0cf6a55b2875b0b810ce2c844", "size": 1992, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/others_general/varimaxRotation.py", "max_stars_repo_name": "gdalessi/clustering", "max_stars_repo_head_hexsha": "79988ee565c9d1b00bbcd3c1dbd9a69d9c1c80f1", "max_stars_repo_licenses": ["MI...
import unittest import os import numpy as np from gym.spaces.box import Box from pathlib import Path # BARK imports from bark.runtime.commons.parameters import ParameterServer # BARK-ML imports from bark_ml.library_wrappers.lib_tf2rl.runners.gail_runner import GAILRunner from bark_ml.library_wrappers.lib_tf2rl.agents...
{"hexsha": "2e6dbe889433bcfc959f8d5b75f2d2a299acc053", "size": 4228, "ext": "py", "lang": "Python", "max_stars_repo_path": "bark_ml/tests/py_library_tf2rl_tests/py_gail_training_tests.py", "max_stars_repo_name": "GAIL-4-BARK/bark-ml", "max_stars_repo_head_hexsha": "c61c897842c2184ee842428e451bae3be2cd7242", "max_stars_...
# libraries const libeng = Ref{Ptr{Cvoid}}() const libmx = Ref{Ptr{Cvoid}}() const libmat = Ref{Ptr{Cvoid}}() # matlab engine functions const eng_open = Ref{Ptr{Cvoid}}() const eng_close = Ref{Ptr{Cvoid}}() const eng_set_visible = Ref{Ptr{Cvoid}}() const eng_get_visible = Ref{Ptr{Cvoid}}() cons...
{"hexsha": "63ef6f4036916dc67ec3bc9c01de16de245f1334", "size": 3187, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/init.jl", "max_stars_repo_name": "blegat/MATLAB.jl", "max_stars_repo_head_hexsha": "9c67743e609997060fe1aeab7d9137b7c1dceb67", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 163, "max_s...
//------------------------------------------------------------------ // **MEDYAN** - Simulation Package for the Mechanochemical // Dynamics of Active Networks, v4.0 // // Copyright (2015-2018) Papoian Lab, University of Maryland // // ALL RIGHTS RESERVED // // See the MEDYAN web page ...
{"hexsha": "1552f6d427b30c8d9925889bd09fc1e2cfdb1c8a", "size": 64266, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Output.cpp", "max_stars_repo_name": "allen-cell-animated/medyan", "max_stars_repo_head_hexsha": "0b5ef64fb338c3961673361e5632980617937ee6", "max_stars_repo_licenses": ["BSD-4-Clause-UC"], "max_...
#pragma once #include <boost/filesystem.hpp> #include "../kernel/string/string.h" /////////////////////////////////////////////////////////////////////////////// /// Content addressable storage /////////////////////////////////////////////////////////////////////////////// namespace ork::file { //////////////////////...
{"hexsha": "7d8c71c40bcff30674a5db6fd9fce2c4d64626f6", "size": 832, "ext": "inl", "lang": "C++", "max_stars_repo_path": "ork.core/inc/ork/file/cas.inl", "max_stars_repo_name": "tweakoz/orkid", "max_stars_repo_head_hexsha": "e3f78dfb3375853fd512a9d0828b009075a18345", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_co...
abstract type AbstractBoolDomain <: AbstractDomain end """ struct BoolDomain <: AbstractDomain Boolean domain, uses a IntDomain in it. (true is 1 and false is 0) """ struct BoolDomain <: AbstractBoolDomain inner::IntDomain function BoolDomain(trailer::Trailer) return new(IntDomain(tr...
{"hexsha": "bcef5df773a7f0322d15b686162609329fbc7f27", "size": 2559, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/CP/variables/BoolDomain.jl", "max_stars_repo_name": "pitmonticone/SeaPearl.jl", "max_stars_repo_head_hexsha": "0c0ca5ec5cce81515acd202ea2d87c985c0c3fea", "max_stars_repo_licenses": ["BSD-3-Clau...
# various analytic mass profiles: Hernquist, NFW, Plummer, Isothermal, Miyamoto-Nagai (for disks) import numpy as np import astropy.units as u from astropy import constants from .cosmo_tools import * G = constants.G.to(u.kpc * u.km**2. / u.Msun/ u.s**2.) class NFW: def __init__(self, Mvir, r, cvir): """ ...
{"hexsha": "558f9222afd8e7f80c149473abdf4b62988f80b9", "size": 6369, "ext": "py", "lang": "Python", "max_stars_repo_path": "jellyfish/profiles.py", "max_stars_repo_name": "ekta1224/jellyfish", "max_stars_repo_head_hexsha": "3271019434448b5916dcc920d640b81375b74c05", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
{"hexsha": "fe04f8bcc7df98ea6bc088666d6ad4f6bcc0960b", "size": 8985, "ext": "py", "lang": "Python", "max_stars_repo_path": "idaes/core/util/misc.py", "max_stars_repo_name": "OOAmusat/idaes-pse", "max_stars_repo_head_hexsha": "ae7d3bb8e372bc32822dcdcb75e9fd96b78da539", "max_stars_repo_licenses": ["RSA-MD"], "max_stars_c...
import numpy as np import scipy.spatial as spatial def bilinear_interpolate(img, coords): """ Interpolates over every image channel http://en.wikipedia.org/wiki/Bilinear_interpolation :param img: max 3 channel image :param coords: 2 x _m_ array. 1st row = xcoords, 2nd row = ycoords :returns: array of interp...
{"hexsha": "50b1a3151683891fe29f85b69660417956b904a6", "size": 4473, "ext": "py", "lang": "Python", "max_stars_repo_path": "face_morpher/facemorpher/warper.py", "max_stars_repo_name": "ivan-uskov/faces", "max_stars_repo_head_hexsha": "59a27c305888e8e000cb1549f8b06216449b1f05", "max_stars_repo_licenses": ["MIT"], "max_s...
function marginal = marginal_nodes(engine, nodes, t, add_ev) % MARGINAL_NODES Compute the marginal on the specified query nodes (hmm) % marginal = marginal_nodes(engine, nodes, t, add_ev) % % 'nodes' must be a single node. % t is the time slice. if nargin < 3, t = 1; end if nargin < 4, add_ev = 0; end assert(length(n...
{"author": "bayesnet", "repo": "bnt", "sha": "bebba5f437b4e1e29169f0f3669df59fb5392e62", "save_path": "github-repos/MATLAB/bayesnet-bnt", "path": "github-repos/MATLAB/bayesnet-bnt/bnt-bebba5f437b4e1e29169f0f3669df59fb5392e62/BNT/inference/dynamic/@hmm_inf_engine/marginal_nodes.m"}
from __future__ import print_function from functools import reduce import re import numpy as np from keras.preprocessing.sequence import pad_sequences def tokenize(sent): '''Return the tokens of a sentence including punctuation. >>> tokenize('Bob dropped the apple. Where is the apple?') ['Bob', 'dropped'...
{"hexsha": "caec9aec834d34c2ad236bf5dbd9f557a2747098", "size": 3934, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/babi_sitter.py", "max_stars_repo_name": "jayanthkoushik/eve", "max_stars_repo_head_hexsha": "25d290361c21941f77bb9dd8150048132863184a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8...
#!/usr/bin/env python3 import numpy as np #import scipy.interpolate as spi #from scipy.interpolate import griddata from scipy.interpolate import NearestNDInterpolator from scipy.interpolate import LinearNDInterpolator import matplotlib.pyplot as plt ## if using plot_pcolor function as-is: #params = {'text.latex.pream...
{"hexsha": "fcac1dbae184266b47daf1a9cb982409c3a42ca4", "size": 5720, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/gen3L-sodium/setup_tube0.py", "max_stars_repo_name": "willietheboy/srlife-dev", "max_stars_repo_head_hexsha": "d4c2d28b40d2ee1bf64c7555a913b0a49adffe0f", "max_stars_repo_licenses": ["MIT"...
import pandas as pd from matplotlib import pyplot as plt import seaborn as sns caminho_base='/home/prbpedro/Development/repositories/github/bootcamp_artificial_intelligence/src/input/' dados_completos=pd.read_csv(caminho_base + 'airline-passengers.csv') print(dados_completos.head()) dados_completos.info() dados_comp...
{"hexsha": "39c0a2affa46406897897c0485059e82505e07a4", "size": 6887, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/modulo2/airline_passengers_analysis.py", "max_stars_repo_name": "prbpedro/bootcamp_machine_learning", "max_stars_repo_head_hexsha": "1713e121cd333c8e80ef05aac0365e886ed9dab1", "max_stars_repo_...
\section{Mundane Objects}\label{sec:mundaneObjects} \rowcolors{2}{lightgray}{white} \begin{longtable}{l | r | r} Name & Size & Price (In Gold)\\ \hline Bedroll & M & 5\\ Blanket & M & 3\\ Chain, \passus{2} & S & 20\\ Crowbar & S & 10\\ Fire Steel & T & 10\\ Grappling Hook & S & 50\\ Lantern & S & 100\\ Lock, V...
{"hexsha": "378ba956246ebed1409a7f8608e37622642fb69d", "size": 4097, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "items/items/mundane.tex", "max_stars_repo_name": "NTrixner/RaggedLandsPenAndPaper", "max_stars_repo_head_hexsha": "73781f7cd7035b927a35199af56f9da2ad2c2e95", "max_stars_repo_licenses": ["MIT"], "max...
import flywheel import logging import warnings import argparse import os import pandas as pd import numpy as np from fw_heudiconv.cli import tabulate from fw_heudiconv.cli.export import get_nested logging.basicConfig(level=logging.INFO) logger = logging.getLogger('flaudit') def get_sessions(client, project_label, s...
{"hexsha": "e18fd38b59912cf93c62549fb046557df67c4acf", "size": 12818, "ext": "py", "lang": "Python", "max_stars_repo_path": "flaudit/cli/gather_data.py", "max_stars_repo_name": "PennBBL/flaudit", "max_stars_repo_head_hexsha": "dd022fc93367fc850d05a0e2e901ded246efd724", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
""" Learning with networks that can process sequential data. """ from sklearn.base import ClassifierMixin, RegressorMixin, BaseEstimator, TransformerMixin from sklearn.preprocessing import LabelEncoder, FunctionTransformer from sklearn.metrics import accuracy_score from sklearn.model_selection import train_test_split ...
{"hexsha": "d80859d9b44fcd1b985abe8569f0068b3afb1be0", "size": 10485, "ext": "py", "lang": "Python", "max_stars_repo_path": "noxer/rnn.py", "max_stars_repo_name": "noxer-org/noxer", "max_stars_repo_head_hexsha": "45fa20ac7452c4b9c8ab5ea3f93ab47f41ad29cd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_s...