text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
program hello !$OMP parallel print *, "Hello world" !$OMP end parallel end program hello
{"hexsha": "0b1def5b458afa554d986b01d272f2e25e67ddac", "size": 97, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "others/parallel_computting/hello-omp.f90", "max_stars_repo_name": "bt3gl/Resources-Numerical_Methods_for_Physics", "max_stars_repo_head_hexsha": "8668215f107230fafd9bdeb0061d353328cf03e8", "max_st...
/* * Copyright (C) 2012-2015 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
{"hexsha": "cdfd76f6b02af5079e3da590c68e74eb831401fb", "size": 9474, "ext": "cc", "lang": "C++", "max_stars_repo_path": "gazebo/sensors/WirelessReceiver_TEST.cc", "max_stars_repo_name": "horikawahorikawa/gazebo-PR", "max_stars_repo_head_hexsha": "bdb99bec78b8adb95f8855057aae7c028f9e78c2", "max_stars_repo_licenses": ["E...
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2013. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <mpllibs/metamonad/try_c.hpp> #include <mpllibs/metamonad/exception.hpp> #include <mplli...
{"hexsha": "8414e10acfabc0165a2d11dab4be5029d32b63be", "size": 3190, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/metamonad/test/try_c.cpp", "max_stars_repo_name": "sabel83/mpllibs", "max_stars_repo_head_hexsha": "8e245aedcf658fe77bb29537aeba1d4e1a619a19", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars...
(* Copyright 2016 Luxembourg University Copyright 2017 Luxembourg University This file is part of Velisarios. Velisarios is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the Licen...
{"author": "vrahli", "repo": "Velisarios", "sha": "6fb353b18610cd79210755fcc90123536c367aaa", "save_path": "github-repos/coq/vrahli-Velisarios", "path": "github-repos/coq/vrahli-Velisarios/Velisarios-6fb353b18610cd79210755fcc90123536c367aaa/PBFT/PBFTlearns_or_knows_nv.v"}
"""This model creates the ModelInterface for PyTorch.""" from contextlib import suppress from copy import deepcopy from typing import Optional, Tuple import torch import numpy as np from ..helpers.model_interface import ModelInterface from ..helpers import utils class PyTorchModel(ModelInterface): """Interface ...
{"hexsha": "05ea239f48efd6005dc9763f35e3a69f4b812612", "size": 2824, "ext": "py", "lang": "Python", "max_stars_repo_path": "quantus/helpers/pytorch_model.py", "max_stars_repo_name": "sebastian-lapuschkin/Quantus", "max_stars_repo_head_hexsha": "c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f", "max_stars_repo_licenses": ["MIT...
struct InconsistentVRep{T, AT, D<:Polyhedra.FullDim} <: VRepresentation{T} points::Polyhedra.PointsHull{T, AT, D} rays::Polyhedra.RaysHull{T, AT, D} function InconsistentVRep{T, AT, D}(d::Polyhedra.FullDim, points, lines, rays) where {T, AT, D} new{T, AT, D}(P...
{"hexsha": "d58b775c65d94c9906e1156a68b6d9cee3f21e0d", "size": 1258, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/inconsistentvrep.jl", "max_stars_repo_name": "mforets/Polyhedra.jl", "max_stars_repo_head_hexsha": "58013aefabcc3bbc71832ae8d9af495c613ab21a", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import pandas as pd import numpy as np import copy as cp import math def compute_functions(index): invocations = pd.read_csv(f"/media/soufianej/Transcend/Traces/Azure/invocations/invocations_per_function_md.anon.d0{index}.csv", index_col=False) exec_times = pd.read_csv(f"/media/soufianej/Transcend/Traces/Azur...
{"hexsha": "319b6a93ad5e05f4ea1ef32f1193fc2f83a197b3", "size": 4311, "ext": "py", "lang": "Python", "max_stars_repo_path": "trace-generation/AzurePreProcessing.py", "max_stars_repo_name": "atlarge-research/opendc-serverless", "max_stars_repo_head_hexsha": "11c772bcb3fc7a7c2590d6ed6ab979b78cb9fec9", "max_stars_repo_lice...
import enum from typing import Optional import numpy as np import feast class BqType(enum.Enum): """ BigQuery enum types. Used when dealing with types in any big query operation. """ FLOAT = 0 STRING = 1 DATETIME = 2 TIMESTAMP = 3 ARRAY = 4 BOOL = 5 STRUCT = 6 INTEGER = 7 c...
{"hexsha": "d1f456aa0e717d96a6684183de1672b0b27d83f5", "size": 3095, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/elemeno_ai_sdk/features/types.py", "max_stars_repo_name": "elemeno-ai/elemeno-ai-sdk", "max_stars_repo_head_hexsha": "2737b2c9c575119bd40efcd8c5e91a98f9d8b6b1", "max_stars_repo_licenses": ["Ap...
module millerlocal use common_types, only: flux_surface_type implicit none public :: init_local_defaults public :: read_local_parameters public :: communicate_parameters_multibox public :: get_local_geo public :: finish_local_geo public :: local private integer :: nzed_local real :...
{"hexsha": "bea47de47fae31f393715608faa1a5e5baa040fc", "size": 53935, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "geo/millerlocal.f90", "max_stars_repo_name": "AntonioG-Jerez/stella", "max_stars_repo_head_hexsha": "b9d0257ea3639218b7546116c1235ebd4a8e0752", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#include <fstream> #include <iostream> #include <string> #include <utility> #include <vector> #include <map> #include <algorithm> #include <stdint.h> #include <boost/foreach.hpp> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/xml_parser.hpp> using namespace boost::property_tree; using namespace ...
{"hexsha": "814468f21591b04ad2ee72cd1e6e82b7f9c360ae", "size": 841, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "remodet_repository_wdh_part/tools/test_loadxml.cpp", "max_stars_repo_name": "UrwLee/Remo_experience", "max_stars_repo_head_hexsha": "a59d5b9d6d009524672e415c77d056bc9dd88c72", "max_stars_repo_license...
import matplotlib.pyplot as plt import matplotlib.image as mpimg import pandas as pd import pylab as pl import numpy as np from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier from sklearn import preprocessing, metrics, tree from io import StringIO import pydotplus ...
{"hexsha": "2afcf783632f51465c9e2f2290e153e614378cd7", "size": 1816, "ext": "py", "lang": "Python", "max_stars_repo_path": "Decision Tree Classification/app.py", "max_stars_repo_name": "fiend361/IBM-Machine-Learning-with-Python-Course", "max_stars_repo_head_hexsha": "e0d5e078eb79837f957a6d0c332639259992c384", "max_star...
from abc import ABCMeta, abstractmethod from random import choice, random, uniform from numpy import argmax, argmin # Harmony Search class # Taken from Solid library # https://100.github.io/Solid/_modules/Solid/HarmonySearch.html # Adapted for Python 3 # Class was not imported, as it contains python2 style prints clas...
{"hexsha": "d7018461f5f1785c363cb9871a45171a5bba565a", "size": 5156, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/optimization/HarmonySearch.py", "max_stars_repo_name": "lyonva/Nue", "max_stars_repo_head_hexsha": "90680de00b0c76f6bfdbed71b785671e7c3a3f54", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
# # Copyright (c) 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
{"hexsha": "8abe030999e5409f36ccff8a48b245e0c639aeab", "size": 1854, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl_coach/exploration_policies/greedy.py", "max_stars_repo_name": "jl45621/coach", "max_stars_repo_head_hexsha": "9a895a1ac73aff44b2e6eb8e4d01e8ec35ceb084", "max_stars_repo_licenses": ["Apache-2.0"...
%Program for creating CSV File %Author : Athi Narayanan S %M.E, Embedded Systems, %K.S.R College of Engineering %Erode, Tamil Nadu, India. %http://sites.google.com/site/athisnarayanan/ %Program Description %This program generates a CSV file containing the colors in the output image. %The CSV format is as follows %Pal...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/31687-color-quantization/K-Means-Color-Reduc...
\documentclass{uofsthesis-cs} % Documentation for the uofsthesis-cs class is given in uofsthesis-cs.dvi % % It is recommended that you read the CGSR thesis preparation % guidelines before proceeding. % They can be found at http://www.usask.ca/cgsr/thesis/index.htm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
{"hexsha": "32e4d9a48f2e86268bcb3d16341b2238034bc23b", "size": 11009, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "main.tex", "max_stars_repo_name": "kiranbandi/synvisio-thesis", "max_stars_repo_head_hexsha": "99a85c6c081c9c628a655eb9a9d841059f6f3e3b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import numpy as np import matplotlib.pyplot as plt import sys def extract_significant_data(input_file): raw_table = np.genfromtxt(input_file, dtype=None, delimiter="\t", encoding="UTF-8", usecols=(0, 3, 5)) polished_table = [] # print(raw_table) for row in raw_table: ...
{"hexsha": "93d42295cb9c9629e222b69ecfed88e1e6de7a61", "size": 1815, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_processing/kraken/plot_single_sample_kraken_data.py", "max_stars_repo_name": "robymetallo/lferriphilum", "max_stars_repo_head_hexsha": "ab72a4e11bfd9b8947d1f2b2bb5fe1b852d313eb", "max_stars_r...
""" A very simple FCFF NN intended to be used for comparing tensorflow to other libraries. """ import tensorflow as tf import numpy as np class FeedforwardNetwork(object): """ A simple, fully-connected feedforward neural network. """ def __init__(self, layers, outputs): """ Args: layers: A list ...
{"hexsha": "31172cf09f43f6af000d5045b016f6e720d20257", "size": 4670, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/simple_feedforward.py", "max_stars_repo_name": "djpetti/rpinets", "max_stars_repo_head_hexsha": "8b6ebc969f3c75a0d0f5b414ed7faa7b65754892", "max_stars_repo_licenses": ["MIT"], "max_star...
__precompile__(true) module KernelDensityEstimate using Gadfly, Colors, Cairo, Fontconfig import Base: promote_rule, *, rand export kde!, getPoints, getBW, root, Npts, Ndim, getWeights, marginal, sample, rand, resample, evaluateDualTree, BallTree, BallTreeDens...
{"hexsha": "65fe673d28aa72a5019507c4a4106d33f580e2b0", "size": 942, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/KernelDensityEstimate.jl", "max_stars_repo_name": "tkelman/KernelDensityEstimate.jl", "max_stars_repo_head_hexsha": "c44bdd9dcae8aa07a24f6f885c2ec8787a1dae10", "max_stars_repo_licenses": ["MIT"]...
# Copyright 2019 Prashant Singh, Fredrik Wrede and Andreas Hellander # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{"hexsha": "5d6af6cd0d94a697378f227de5e8ce0495c2a21b", "size": 7364, "ext": "py", "lang": "Python", "max_stars_repo_path": "sciope/tests/test_stochmet.py", "max_stars_repo_name": "sciope/sciope", "max_stars_repo_head_hexsha": "4da87ef9a1e1a5561286ce3eaffdb51183bf5c94", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
"""Correlation inferencer.""" import logging import numpy as np import sys import scipy.sparse as ss from scipy.special import betainc from ..collections.graph import Graph from .network_inferencer import NetworkInferencer from ..utils.stats import CORRECTIONS_SIGNIFICANCE logger = logging.getLogger(__name__.split('.'...
{"hexsha": "436dc4420ae48bf62ab9896620ce81d4fba8e7c8", "size": 2853, "ext": "py", "lang": "Python", "max_stars_repo_path": "cosifer/inferencers/correlation.py", "max_stars_repo_name": "C-nit/cosifer", "max_stars_repo_head_hexsha": "550b3ee1055bf1ceb8883ee8736c8d538ceb6ee4", "max_stars_repo_licenses": ["MIT"], "max_star...
const RectilinearPointLoad{dim, T, N, M} = Union{PointLoadCantilever{dim, T, N, M}, HalfMBB{dim, T, N, M}, LBeam{T, N, M}} @params struct ElementMatrix{T, TM <: AbstractMatrix{T}} <: AbstractMatrix{T} matrix::TM mask meandiag::T end ElementMatrix(matrix, mask) = ElementMatrix(matrix, mask, sumdiag(matrix)/...
{"hexsha": "6591303f6d92d3325a1ce97c46bd4284db604908", "size": 13553, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/TopOptProblems/matrices_and_vectors.jl", "max_stars_repo_name": "AlexanderBakerChris/TopOpt.jl", "max_stars_repo_head_hexsha": "eb9e8ee08f570a40d00eccef5c954353bffbad52", "max_stars_repo_licen...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import logging import numpy as np import nevergrad.common.typing as tp from nevergrad.parametrization import pa...
{"hexsha": "0a6a76ff99417355a013d5f23dc21316984a26ad", "size": 10066, "ext": "py", "lang": "Python", "max_stars_repo_path": "nevergrad/optimization/multiobjective/nsga2.py", "max_stars_repo_name": "vishalbelsare/nevergrad", "max_stars_repo_head_hexsha": "f0fd681320609146e116322756cee9bf2388be9c", "max_stars_repo_licens...
import numpy as np from pymoo.algorithms.genetic_algorithm import GeneticAlgorithm from pymoo.docs import parse_doc_string from pymoo.model.survival import Survival from pymoo.operators.crossover.simulated_binary_crossover import SimulatedBinaryCrossover from pymoo.operators.mutation.polynomial_mutation import Polynom...
{"hexsha": "c3760ce3b65e8b6234e97b55c10e267df65c09be", "size": 3459, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymoo/algorithms/so_genetic_algorithm.py", "max_stars_repo_name": "gabicavalcante/pymoo", "max_stars_repo_head_hexsha": "1711ce3a96e5ef622d0116d6c7ea4d26cbe2c846", "max_stars_repo_licenses": ["Apa...
import numpy as np; from .problem import Problem; from ..utils.random import RandomGeneratable, RandomGenerator; class TranslateProblem: def __init__(self, problem_cls, spread= [100,None]): self._problem = problem_cls; self._spread = spread; def random(self, random_state, dimension,**kwargs):...
{"hexsha": "f89895d1e5892265b73e5b8a9b3848a6c6f79cbe", "size": 1756, "ext": "py", "lang": "Python", "max_stars_repo_path": "learnedevolution/problems/translated.py", "max_stars_repo_name": "realtwister/LearnedEvolution", "max_stars_repo_head_hexsha": "2ec49b50a49acae9693cfb05ac114dfbcc4aa337", "max_stars_repo_licenses"...
# ------------------------------------------------------------------------------ # @brief: # ------------------------------------------------------------------------------ from .base_worker import base_worker from mbbl.config import init_path from mbbl.env.env_util import play_episode_with_env from mbbl.util.common i...
{"hexsha": "42786ee4051e5c6dee1a647f277e1e88fa636d64", "size": 2866, "ext": "py", "lang": "Python", "max_stars_repo_path": "mbbl_envs/mbbl/worker/mf_worker.py", "max_stars_repo_name": "hbutsuak95/iv_rl", "max_stars_repo_head_hexsha": "0f72a8f077a238237027ea96b7d1160c35ac9959", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np from sklearn.pipeline import Pipeline from sklearn.svm import SVC from sklearn.model_selection import cross_val_score from gensim.models.word2vec import Word2Vec from csv import reader TRAIN_FILE = "SampleSetConditions.csv" TEST_FILE = "TestSet.csv" print("loading samples...",end="") X, y = [], [] ...
{"hexsha": "a695d5d94a966bf01c54070c6619f637afc8a574", "size": 2236, "ext": "py", "lang": "Python", "max_stars_repo_path": "script.py", "max_stars_repo_name": "christocs/MiningTenemantsSVM", "max_stars_repo_head_hexsha": "b7f239b5a2f9d1a4b326b477922998dd4aa416e9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# Copyright 2018 Cognibit Solutions LLP. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
{"hexsha": "3941703025fe2beb80c23167be7d3cc82ac99a96", "size": 3317, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/classification_report.py", "max_stars_repo_name": "cognibit/Text-Normalization-Demo", "max_stars_repo_head_hexsha": "36355f4a2c5187948fe786b7318259151f9a9db6", "max_stars_repo_licenses": ["Apa...
# Imports import pyperf as perf # import icclim import numpy as np x = np.array(np.random.rand(1000)) P = np.linspace(0.01, 0.99, 50) def bench_argsort(): # np.quantile(x, P) x.argsort().argsort() / len(x) def bench_quantile(): np.quantile(x, P) # x.argsort.argsort() runner = perf.Runner() runner...
{"hexsha": "046d0c0aa5f5ad346722d7895d0af1c85a1c7469", "size": 422, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/quantile_bench.py", "max_stars_repo_name": "Ouranosinc/xclim-benchmark", "max_stars_repo_head_hexsha": "72fbb5db0cd29df6f263c536529fe815ac3cca48", "max_stars_repo_licenses": ["MIT"], "max_s...
theory SINVAR_NoRefl_impl imports SINVAR_NoRefl "../TopoS_Interface_impl" begin code_identifier code_module SINVAR_NoRefl_impl => (Scala) SINVAR_NoRefl subsubsection \<open>SecurityInvariant NoRefl List Implementation\<close> fun sinvar :: "'v list_graph \<Rightarrow> ('v \<Rightarrow> node_config) \<Rightarrow> b...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Network_Security_Policy_Verification/Security_Invariants/SINVA...
from pathlib import Path from shutil import copyfile import pandas as pd import numpy as np import unicodedata from haversine import haversine import time import ast from sklearn.metrics import average_precision_score import statistics """ Evaluate ranking for MAP """ def find_closest_distance(altname, gsco...
{"hexsha": "a513cfd6f1e3fcb42c94f81ec475b123d68ccc2f", "size": 10931, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/evaluation_functions.py", "max_stars_repo_name": "Living-with-machines/LwM_SIGSPATIAL2020_ToponymMatching", "max_stars_repo_head_hexsha": "41fd23288b49cbd96d2ddd4ec763606e70e430a7", "...
import argparse import numpy as np from gym_duckietown.envs import DuckietownEnv import torch import os import sys import cv2 import math sys.path.append(os.path.join(os.path.dirname(__file__), "./gym-duckietown/learning/")) sys.path.append(os.path.join(os.path.dirname(__file__), "./gym-duckietown/learning/reinforceme...
{"hexsha": "93e30175e24963af9ee34dca42b94662342c77f6", "size": 6768, "ext": "py", "lang": "Python", "max_stars_repo_path": "our_policy.py", "max_stars_repo_name": "lyf44/CS4278-5478-Project-Materials", "max_stars_repo_head_hexsha": "685419c65847e72450e99586e9e0f3794369b4a3", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sun Feb 5 23:00:34 2017 @author: shenda """ from collections import Counter import numpy as np import pandas as pd import MyEval import ReadData import dill from sklearn.model_selection import KFold from sklearn.model_selection import StratifiedKFold from...
{"hexsha": "0f34f0b0963ca26e207e03f39bf32182889db138", "size": 4835, "ext": "py", "lang": "Python", "max_stars_repo_path": "references/encase/code/TestXGB_cut.py", "max_stars_repo_name": "wenh06/cinc2020", "max_stars_repo_head_hexsha": "b3757f54df86c8470e8f22f3399b4aecd64dd5d1", "max_stars_repo_licenses": ["BSD-2-Claus...
# Licensed with the 3-clause BSD license. See LICENSE for details. from typing import List import pytest import numpy as np from astropy.table import Table from astropy.time import Time import astropy.units as u from astropy.tests.helper import remote_data from ..ephemeris import (get_ephemeris_generator, set_ephem...
{"hexsha": "581ba08e84e488b3aa25b0c1c13add67c75a45a0", "size": 5019, "ext": "py", "lang": "Python", "max_stars_repo_path": "sbsearch/test/test_ephemeris.py", "max_stars_repo_name": "mkelley/sbsearch", "max_stars_repo_head_hexsha": "7569e473cf0b8f5df3cfc7332ae4287a780d28d2", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
import OpenGL from OpenGL.GL import * from OpenGL.GLU import * import numpy import random from math_utils import * def drawOrigin(): glBegin(GL_LINES) glColor(1,0,0) glVertex3f(0,0,0) glVertex3f(0,1000,0) glColor(0,1,0) glVertex3f(0,0,0) glVertex3f(1000,0,0) glColor(0,0,1) glVertex...
{"hexsha": "1ab518a5c81a417a3b41fe367b304e866a25a77a", "size": 10009, "ext": "py", "lang": "Python", "max_stars_repo_path": "graphics.py", "max_stars_repo_name": "arda-guler/miniLanding3D", "max_stars_repo_head_hexsha": "83c4884378e0f57853a1fb09b1fdbe36e15bacd7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
[STATEMENT] lemma real_binomial_eq_mult_binomial_Suc: assumes "k \<le> n" shows "real(n choose k) = (n + 1 - k) / (n + 1) * (Suc n choose k)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. real (n choose k) = (real n + 1 - real k) / (real n + 1) * real (Suc n choose k) [PROOF STEP] using assms [PROOF STATE] proo...
{"llama_tokens": 249, "file": null, "length": 2}
""" Program to get average editing frequency from CrispEsso. """ import matplotlib import pandas as pd matplotlib.use('agg') import matplotlib.pyplot as plt import seaborn as sns import string import glob import numpy as np def revcomp(seq): try: ## python2 tab = string.maketrans(b"ACTG", b"TG...
{"hexsha": "c9651f42d8f1d1f4b02e455062a477334640bb22", "size": 1848, "ext": "py", "lang": "Python", "max_stars_repo_path": "per_A_base_score/editing_frequency/average_model/get_average_frequency.py", "max_stars_repo_name": "YichaoOU/ABE_NonCoding_functional_score", "max_stars_repo_head_hexsha": "cef8dbbd74e5f9359feb6cf...
From MetaCoq.Lob.Template.QuoteGround Require Export config utils Ast AstUtils Environment Primitive LiftSubst UnivSubst EnvironmentTyping Reflect ReflectAst TermEquality WfAst. From MetaCoq.Template Require Import Ast Typing. #[export] Instance quote_isSort {T} : ground_quotable (isSort T) := ltac:(cbv [isSort];...
{"author": "JasonGross", "repo": "metacoq-lob", "sha": "acfc938eb79cac82c3c7d306f6d7010a4ad6492e", "save_path": "github-repos/coq/JasonGross-metacoq-lob", "path": "github-repos/coq/JasonGross-metacoq-lob/metacoq-lob-acfc938eb79cac82c3c7d306f6d7010a4ad6492e/theories/Template/QuoteGround/Typing.v"}
import os from pathlib import Path from tqdm import tqdm import numpy as np import cv2 from PIL import Image import torch import torchvision as tv from mycv.paths import IMAGENET_DIR from mycv.utils.general import ANSI from mycv.datasets.imcls import imcls_evaluate, get_input_normalization, get_tv_interpolation def ...
{"hexsha": "c6c959d99b70cb24728fef6fab2f3fca740764e5", "size": 8448, "ext": "py", "lang": "Python", "max_stars_repo_path": "mycv/datasets/imagenet.py", "max_stars_repo_name": "duanzhiihao/mycv", "max_stars_repo_head_hexsha": "184b52f7a5c1b6f603122d4f4050952b65ba0ead", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Hack. :) import site; site.addsitedir("/usr/local/lib/python2.7/site-packages") # Standard imports import cv2; import numpy as np; # print cv2.__version__; # Read image im = cv2.imread("test-images/still2.jpg", cv2.IMREAD_GRAYSCALE) im = cv2.bitwise_not(im) # Setup SimpleBlobDetector parameters. params = cv2.Simp...
{"hexsha": "d18ddab76e208621ca79c38c5b1338421cf1433e", "size": 1150, "ext": "py", "lang": "Python", "max_stars_repo_path": "Trial1.py", "max_stars_repo_name": "aliceyoung9/bubblewrap", "max_stars_repo_head_hexsha": "46066605f114f07bd78efec0740ff2b6c5b83189", "max_stars_repo_licenses": ["WTFPL"], "max_stars_count": null...
module LPA using Graphs export nsdlpa, nsdlpa1, nmi, voi, modularity, avedegree, similarity, triangle, quadrangle, triquadrsim include("labelpropagation.jl") include("modularity.jl") include("nmi.jl") include("voi.jl") include("utils.jl") include("rankedge.jl") end # module
{"hexsha": "a5a38884d55d75b5b31cb54a793bd8e29dbd6138", "size": 278, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/LPA.jl", "max_stars_repo_name": "afternone/LPA", "max_stars_repo_head_hexsha": "deefee07b004e26e1bd6a35419c43b5cf0a7b775", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars...
import numpy as np import cv2 from ndu_gate_camera.api.video_source import VideoSource, log from ndu_gate_camera.utility.ndu_utility import NDUUtility # try: # from picamera import PiCamera # except ImportError: # print("picamera library not found - installing...") # if NDUUtility.install_package("picamer...
{"hexsha": "7fe45144fe04dea28cf17307131124cf42f50096", "size": 2143, "ext": "py", "lang": "Python", "max_stars_repo_path": "ndu_gate_camera/camera/video_sources/pi_camera_video_source.py", "max_stars_repo_name": "netcadlabs/ndu-gate", "max_stars_repo_head_hexsha": "f479c293284fa6582d8682c98abf88e3da33b406", "max_stars_...
import collections import torch from torch.autograd import Variable import numpy as np NUMPY_RANDOM_STATE = np.random.RandomState() def try_keys(input_dict, keys): for k in keys: try: return input_dict[k] except BaseException: pass return None def ...
{"hexsha": "8f7f90ec90abf16de6479718c78a1a319be501f4", "size": 4679, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch_metric_learning/utils/common_functions.py", "max_stars_repo_name": "jacobdanovitch/pytorch_metric_learning", "max_stars_repo_head_hexsha": "dbcf2d49fffe92f7dc1221b939e182c214633520", "max_...
#include <boost/test/unit_test.hpp> #include <boost/concept_check.hpp> #include "che/atom.h" // header to test using namespace biosim; BOOST_AUTO_TEST_SUITE(suite_atom) BOOST_AUTO_TEST_CASE(atom_ctor) { che::atom a; BOOST_CHECK(a.get_identifier().empty()); BOOST_CHECK(a.get_position() == math::point()); st...
{"hexsha": "ff479e49c15d165d74e897b6adff5b1f0d3d4a5c", "size": 769, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/che/atom.cpp", "max_stars_repo_name": "shze/biosim", "max_stars_repo_head_hexsha": "e9e6d97de0ccf8067e1db15980eb600389fff6ca", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
import numpy as np from automon import SlackType, SyncType, AutomonCoordinator, RlvCoordinator def _get_node(NodeClass, domain, d, node_idx, func_to_monitor, max_f_val=np.inf, min_f_val=-np.inf): if max_f_val != np.inf or min_f_val != -np.inf: node = NodeClass(idx=node_idx, d=d, domain=domain, func_to_mon...
{"hexsha": "5a5dd17a833456d25a0e3789c4a52982a51eb0e5", "size": 2112, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_utils/object_factory.py", "max_stars_repo_name": "hsivan/automon", "max_stars_repo_head_hexsha": "222b17651533bdb2abce7de36a80156ab7b9cc21", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of cond...
{"hexsha": "e61edba00e3cb50664b7e0127c25dc7e90563c38", "size": 7821, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/model/arithmetic.hpp", "max_stars_repo_name": "rbshi/timeloop", "max_stars_repo_head_hexsha": "434d15e85e7ec95a2b87f83fbf0f14885dc7fa75", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
""" extract_col_feats(df, cols) find mean, std, minimum, maximum in df[!, col] default value of columns are all numeric columns except date """ function extract_col_statvals(df::DataFrame, cols::Array{Symbol, 1}) syms = [] types = [] vals = [] for col in cols μ, σ = mean_and_std(skipmissing...
{"hexsha": "281d1c3c6caf7b6c27e889d97951695ecebcbdb0", "size": 5400, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utils.jl", "max_stars_repo_name": "appleparan/Mise.jl", "max_stars_repo_head_hexsha": "2b4d3d6012d830ac37edf60e276fb47d8bc3a493", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
classdef ConstantDetectionProbabilityX < DetectionModelX % ConstantDetectionProbabilityX class % % Summary of ConstantDetectionProbabilityX % This is a class implementation of a detection model, described by a Poisson % distributed false alarm rate and a Uniform spatial distribution. % % ConstantDetectionProbabilityX P...
{"author": "sglvladi", "repo": "TrackingX", "sha": "f737445c070f0d7d470f52f8a2b5540d5bb682da", "save_path": "github-repos/MATLAB/sglvladi-TrackingX", "path": "github-repos/MATLAB/sglvladi-TrackingX/TrackingX-f737445c070f0d7d470f52f8a2b5540d5bb682da/Models/Detection/ConstantDetectionProbabilityX/ConstantDetectionProbabi...
using LinearAlgebra using DynamicPolynomials using SwitchOnSafety using Combinatorics using SparseArrays using JuMP, Ipopt, MosekTools,NLopt using SpecialFunctions include("../src/RandomTrajectories.jl") include("../src/AlgebraicLift.jl") include("../src/ScenarioOpti.jl") include("../src/Probabilistic...
{"hexsha": "9b3f2be00a65f03894dbd0114489b490b3c3c01a", "size": 10701, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/QuadvsSOSexample.jl", "max_stars_repo_name": "zhemingwang/DataDrivenSwitchControl", "max_stars_repo_head_hexsha": "2bb43ad448d77d52a8c1633a225549c3160f2eb7", "max_stars_repo_licenses": ["...
"""The WaveBlocks Project Plot the evolution of the relations between the parameters P and Q homogeneous or inhomogeneous Hagedorn wavepacket during the time propagation. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011 R. Bourquin @license: Modified BSD License """ import sys from numpy import conj, abs fr...
{"hexsha": "51b56ab06a3c4ea38a073f2ed8990e556628d499", "size": 2944, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plotters_simple/PlotPQRelation.py", "max_stars_repo_name": "WaveBlocks/WaveBlocks", "max_stars_repo_head_hexsha": "2af3730dcf27e54006ec602e696b4d4df25459d8", "max_stars_repo_licenses": ["BSD-3...
import time from typing import Callable, Union import numpy as np from .utils import time_fn from .stopping_reason import StoppingReason class Settings: def __init__(self, n_max_iterations=50, damping_constant=0.0, loss_stop_threshold=0.0, grad_...
{"hexsha": "b898162c53987c297a15ddd28e30703408c68cc0", "size": 4168, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygauss_newton/gauss_newton.py", "max_stars_repo_name": "Daiver/pygauss_newton", "max_stars_repo_head_hexsha": "63dd741c6edaeb2891842dc4d0b714412b30a04c", "max_stars_repo_licenses": ["MIT"], "max_...
""" Tests sklearn Imputers: MissingIndicator and SimpleImputer """ import unittest import warnings import numpy as np import torch from sklearn.impute import MissingIndicator, SimpleImputer try: from sklearn.preprocessing import Imputer except ImportError: # Imputer was deprecate in sklearn >= 0.22 Imput...
{"hexsha": "d4e049e4c8eb759332ccca716aa561151db7386a", "size": 5777, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_sklearn_imputer_converter.py", "max_stars_repo_name": "vumichien/hummingbird", "max_stars_repo_head_hexsha": "8981e11ce2536167c329a5d9d20e81125a792fe4", "max_stars_repo_licenses": ["MIT...
using Test using Unitful: m, s, cm using UnitfulRecipes: recipe!, UnitFormatter import RecipesBase Attributes = Dict{Symbol, Any} @testset "One Array" begin attr = Attributes() ys_val = [1, 2.3] ys = ys_val * m ys_ret = recipe!(attr, ys) @test ys_ret ≈ ys_val @test attr[:yformatter] == UnitForm...
{"hexsha": "05d8ada9198fae44160d9ac24bd99ec25f8fdb8c", "size": 1537, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "UnofficialJuliaMirror/UnitfulRecipes.jl-42071c24-d89e-48dd-8a24-8a12d9b8861f", "max_stars_repo_head_hexsha": "d7d1c530c2b5a60a7b0acad23c25445324d45dbb", "...
import torch import scipy from torch_geometric.utils import add_self_loops from torch_scatter import scatter_add ############################# Our model def get_directed_adj(edge_index, num_nodes, dtype, edge_weight=None): if edge_weight is None: edge_weight = torch.ones((edge_index.size(1),), dtype=dtype...
{"hexsha": "585f823bfdb591a7a40e49a20de9e52e5e175584", "size": 8357, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/get_adj.py", "max_stars_repo_name": "dfuttu1/AGNN", "max_stars_repo_head_hexsha": "579a28388ba3e28d3382ef71c4ab089bedb4705a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_st...
""" Object to process a single raw image""" import inspect import numpy as np from pypeit import msgs from pypeit.core import procimg from pypeit.core import flat from pypeit.images import pypeitimage from pypeit.par import pypeitpar from IPython import embed class ProcessRawImage(pypeitimage.PypeItImage): ""...
{"hexsha": "ec2c731d8c13c2458cd2bbc3c02aecc1c4970fa1", "size": 11177, "ext": "py", "lang": "Python", "max_stars_repo_path": "pypeit/images/processrawimage.py", "max_stars_repo_name": "seib2/PypeIt", "max_stars_repo_head_hexsha": "18ce33aa8aa12b8ee51303ad87a723ec81e0e6f8", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
from coopihc.base.StateElement import StateElement from coopihc.base.utils import ( StateNotContainedError, StateNotContainedWarning, ) from coopihc.base.elements import integer_set, box_space import numpy import pytest import json import copy from tabulate import tabulate def test_array_init_integer(): ...
{"hexsha": "56d7927077bc5c01fd5071b79c41451ae9231fc8", "size": 22653, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/components/base/stateelement/test_statelement.py", "max_stars_repo_name": "jgori-ouistiti/CoopIHC", "max_stars_repo_head_hexsha": "0fe24c618a430517c1394625275faff3ce344f7f", "max_stars_repo_...
import matplotlib.pyplot as plt from numpy import matlib from scipy.sparse.linalg import svds import numpy as np from scipy.sparse import csc_matrix, lil_matrix import multiprocessing as mp m, n = 3, 10 l = int(1.0 * m * n * m * n) dist = np.random.normal dist_par = (0.0, 1.0 / np.sqrt(m * n)) w_size = (m * n, m * n...
{"hexsha": "5f0f0eb95d202642e5a2da5a0b987c9194047181", "size": 3322, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/scripts/2main.py", "max_stars_repo_name": "joepatmckenna/fem", "max_stars_repo_head_hexsha": "18b3e3cb0b83f7a4eb464c84f09f00673ea2fcb3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import os.path as op import sys import re import logging from astropy.table import Table, Column from maize.apps.base import AttrDict, str2bool, eprint, sh, mkdir, which from maize.formats.base import must_open from maize.formats.pbs import PbsJob, create_job_ch...
{"hexsha": "4d0d63e284dc6afaf8bb5b791110dc92a4efc766", "size": 7532, "ext": "py", "lang": "Python", "max_stars_repo_path": "old/pipelines/dnaseq.py", "max_stars_repo_name": "orionzhou/biolib", "max_stars_repo_head_hexsha": "940fb66f1b2608d34a2d00ebdf41dc84c6381f42", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_sta...
import uuid import nibabel as nb import numpy as np import pytest from ..nibabel import MergeROIs @pytest.fixture def create_roi(tmp_path): files = [] def _create_roi(affine, img_data, roi_index): img_data[tuple(roi_index)] = 1 nii = nb.Nifti1Image(img_data, affine) filename = tmp_p...
{"hexsha": "4b40d38420e7fc6d934cdb8a1bfe784b4b11749f", "size": 1824, "ext": "py", "lang": "Python", "max_stars_repo_path": "nibabies/interfaces/tests/test_nibabel.py", "max_stars_repo_name": "nipreps/nibabies", "max_stars_repo_head_hexsha": "55143215eaebca4924cefdc74d8008a347efea16", "max_stars_repo_licenses": ["Apache...
"""Train the model""" import argparse import os import tensorflow as tf from model.input_fn import train_input_fn from model.input_fn import test_input_fn from model.model_fn import TripletLoss from model.utils import Params import random from tqdm import tqdm from numpy import savez_compressed import model.multi_mo...
{"hexsha": "3b42a03acfa7cfb4cfa43a94235ae6735a77703e", "size": 5662, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "meryemmhamdi1/tensorflow-triplet-loss", "max_stars_repo_head_hexsha": "9c40ad45fddfb8d2b955faf2973385f6985f72aa", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# from typing import List import itertools as it import difflib import numpy as np def to_string_seq(tour: List[int]) -> str: """Convert tour to a string sequence.""" return ' '.join(str(e) for e in tour) def plan_to_string_seq(plan: List[List[int]]) -> str: """Convert tour plan represented as list of l...
{"hexsha": "fa52c36757218242abdfc44511cf416e5fb4662e", "size": 3580, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/utils/seq_match.py", "max_stars_repo_name": "jokofa/JAMPR_plus", "max_stars_repo_head_hexsha": "6500c7ef36e7aad5d00b6c7cf98266b8a1979955", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
[STATEMENT] lemma perp_per_2: assumes "A B Perp A C" shows "Per B A C" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Per B A C [PROOF STEP] by (simp add: Perp_perm assms perp_per_1)
{"llama_tokens": 88, "file": "IsaGeoCoq_Tarski_Neutral", "length": 1}
import os import torch import torch.nn as nn import numpy as np from tensorboardX import SummaryWriter import util from config import Configuration from dataset import Dataset from models import ENAS, FPN #import ENAScontroller, ENAStrainer def load_controller_and_trainer(args, logger, data): if args.name == 'ENAS...
{"hexsha": "ebc917971beeb7af4830457061447e85d974d7a9", "size": 990, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "imhgchoi/Architecture-Search", "max_stars_repo_head_hexsha": "38027d91fc8928b5c5a6ccde0013e571527a5293", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
[STATEMENT] lemma ereal_MInf_plus[simp]: "-\<infinity> + x = (if x = \<infinity> then \<infinity> else -\<infinity>::ereal)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. - \<infinity> + x = (if x = \<infinity> then \<infinity> else - \<infinity>) [PROOF STEP] by simp
{"llama_tokens": 117, "file": "Lower_Semicontinuous_Lower_Semicontinuous", "length": 1}
''' Generating music ''' import pickle import numpy as np from music21 import instrument,note, stream, chord from keras.models import Sequential from keras.layers import Activation, BatchNormalization, Dense, Dropout, LSTM def generate(): with open('misc/notes','rb') as filepath: notes = pickle.load(fi...
{"hexsha": "e45b16a1e2dda3412dbd04087d0502d76ce86bae", "size": 662, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate.py", "max_stars_repo_name": "7wikd/Jazz-LSTM", "max_stars_repo_head_hexsha": "9510ef1b4f427fde68d2afa8d72bcb7b4d96ad61", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
import numpy as np import igraph as ig import matplotlib.pyplot as plt from collections import defaultdict error = 0.0001 # constante utilizada como limite para considerar dois valores float como iguais class Point: """ Representação de um ponto com coordenadas x, y. Alguns métodos foram...
{"hexsha": "76303996b5600869db689522c5d3412ad3fad62f", "size": 5702, "ext": "py", "lang": "Python", "max_stars_repo_path": "instance_generation.py", "max_stars_repo_name": "carolmb/ia_part1", "max_stars_repo_head_hexsha": "95b94e6570834cb60703b1d79180c21ab218b52d", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
Yolo Property Management is a residential property management company that manages over 300 units across Davis. Their most well known communities include Aspen Village, Glacier Point and Saratoga West Apartments located in West Davis. Yolo Property Management has recently partnered with the University to create Grad...
{"hexsha": "5c8a31d05827a66a5b67a85cb470475cf0703ecf", "size": 930, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Yolo_Property_Management.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_...
# Copyright 2017 Hugh Salimbeni # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
{"hexsha": "a16ea6150ea9619cadbcbfa4a67dae69369ed67f", "size": 22808, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/uci_exps/bayesian_benchmarks/data.py", "max_stars_repo_name": "b4thesunrise/drbayes", "max_stars_repo_head_hexsha": "9bc827aea2c7f084fb1ee77a4bd9f3c9726ecf8c", "max_stars_repo_license...
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # # TITLE : # AUTHOR : # PROJECT : # # ---------------------------------------------------------------------------- # Docstring """GC Orbit Solution Script. Convert the sky coordinates, distances, mean PM and li...
{"hexsha": "5ac7d7104956548987c97732b8b6831ed8aebdca", "size": 10825, "ext": "py", "lang": "Python", "max_stars_repo_path": "jas1101finalproject/scripts/get_globular_clusters/run_orbits.py", "max_stars_repo_name": "nstarman/jas1101_project", "max_stars_repo_head_hexsha": "f54620b715eb2f7dbe7bd39d4a1e21e50bc06541", "max...
import numpy as np import pytest from ermaket.utils import Singleton _created = 0 class Dummy(metaclass=Singleton): def __init__(self): global _created _created += 1 self.info = np.random.random() def test_create(): global _created _created = 0 a = Dummy() b = Dummy() ...
{"hexsha": "b9eeb3a88fc6a0854872d822b27c34a4b6c45cd4", "size": 846, "ext": "py", "lang": "Python", "max_stars_repo_path": "ermaket/tests/test_singleton.py", "max_stars_repo_name": "SqrtMinusOne/ERMaket_Experiment", "max_stars_repo_head_hexsha": "c4a7b61651edd15a619d9b690e2aaeaab4de282d", "max_stars_repo_licenses": ["Ap...
[STATEMENT] lemma I_def'_rl': "Der_1b \<D> \<Longrightarrow> \<forall>A p. (\<I> A p) \<longleftarrow> (\<exists>E. (\<I> E p) \<and> E \<^bold>\<preceq> A)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Der_1b \<D> \<Longrightarrow> \<forall>A. contains (\<I> A) (\<lambda>p. nonEmpty (\<lambda>E. \<I> E p \<and> c...
{"llama_tokens": 297, "file": "Topological_Semantics_topo_derivative_algebra", "length": 2}
import os from gtts import gTTS import numpy as np def to_speech(text): tts = gTTS(text=text, lang = 'en') return tts def save(tts, filename): tts.save(filename + '.mp3') data = {'A':158, 'E':9307, 'M':1318, 'R':576, 'T':637, 'N':5707} labels = ['A','E','M','R','T','N'] values = [158, 9307, 1318, 576, 637, 570...
{"hexsha": "994d9143b80f597bf70c1d9d9b23540a35923855", "size": 866, "ext": "py", "lang": "Python", "max_stars_repo_path": "to_speech.py", "max_stars_repo_name": "10DarkShadow01/Emotional-Intelligence-alpha-", "max_stars_repo_head_hexsha": "60542236f02c7955a786401e00a24b1a2853532d", "max_stars_repo_licenses": ["Apache-2...
# SPDX-FileCopyrightText: 2021 Division of Intelligent Medical Systems, DKFZ # SPDX-FileCopyrightText: 2021 Janek Groehl # SPDX-License-Identifier: MIT import os import numpy as np import pandas as pd def read_rxt_file(file_path: str) -> (np.ndarray, np.ndarray, np.ndarray, float): if not os.path.exists(file_pat...
{"hexsha": "50bac01b0515507a676e5b3ac3d4cb506185bb02", "size": 1254, "ext": "py", "lang": "Python", "max_stars_repo_path": "simpa_tests/manual_tests/test_with_experimental_measurements/utils.py", "max_stars_repo_name": "IMSY-DKFZ/simpa", "max_stars_repo_head_hexsha": "b8bddcf43a4bff2564f0ec208dc511b82e49bfb4", "max_sta...
#! /usr/bin/python # -*- coding: utf8 -*- import struct import os import StringIO import tempfile import numpy as np #from scipy.signal import butter from eegpy.formats.iobase import (MemoryMappedBinaryDataFile, EEGfiltered) fmtF32header = "= 21p 7p i i H i d d d 13p i H f f 931p" #Erklaerung # =...
{"hexsha": "698ae822015eca40ba0b4257f4199d2b7cb0b707", "size": 9607, "ext": "py", "lang": "Python", "max_stars_repo_path": "eegpy/formats/f32.py", "max_stars_repo_name": "thorstenkranz/eegpy", "max_stars_repo_head_hexsha": "0f9461456999874abbb774896ca832eb27740a9d", "max_stars_repo_licenses": ["BSD-2-Clause-FreeBSD"], ...
# -*- coding: utf-8 -*- """ Created on Sun Nov 19 18:05:04 2017 @author: David Jarron """ # !/usr/bin/python import cv2 import numpy as np import matplotlib.pyplot as plt #import hough_line_linker as hll img = cv2.imread('IMG_3380.JPG') gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) height, width = gr...
{"hexsha": "9578e0025ee2ec5268d1fd092a3474b3145f85be", "size": 2870, "ext": "py", "lang": "Python", "max_stars_repo_path": "opencvtestfile.py", "max_stars_repo_name": "dmjarron/2D_3D", "max_stars_repo_head_hexsha": "5da8760b2df751f19c04fc2c1eeeeb8e6ad73e67", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count...
import geopandas as gpd import pandas as pd import numpy as np import matplotlib.pyplot as plt stations_list = ['SJOSC120', 'SJOSC119', 'SJOSC118', 'SJOSC117', 'SJOSC116', 'SJOSC115', 'SJO SC29', 'SJ...
{"hexsha": "66ef2ddb5eb06a2d490516b59104f5e0e03b0791", "size": 3800, "ext": "py", "lang": "Python", "max_stars_repo_path": "task_scripts/task2.py", "max_stars_repo_name": "collincr/ini_team_13", "max_stars_repo_head_hexsha": "dca3d88fc31515ec0127cfd03963ce0b5ed735d8", "max_stars_repo_licenses": ["Unlicense"], "max_star...
""" Modified From https://github.com/OpenNMT/OpenNMT-tf/blob/r1/examples/library/minimal_transformer_training.py MIT License Copyright (c) 2017-present The OpenNMT Authors. This example demonstrates how to train a standard Transformer model using OpenNMT-tf as a library in about 200 lines of code. While relatively s...
{"hexsha": "5e2f1137ea89458380c94e9002f795712109dcc6", "size": 22291, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/tensorflow/decoding/translate_example.py", "max_stars_repo_name": "hieuhoang/FasterTransformer", "max_stars_repo_head_hexsha": "440695ccac874574b1d2e1121788e8fa674b4381", "max_stars_repo...
import numpy as np import pandas as pd import argparse def load_csv(data_dir, filename): """ Loades a pandas DataFrame df inside a data_dir folder with a filename.csv extension Robust for all OS because of pathlib module """ import pandas as pd from pathlib import Path return pd.read_csv(Pa...
{"hexsha": "e8c19df01ed6e09ad1639d9045308af6b66156b1", "size": 3557, "ext": "py", "lang": "Python", "max_stars_repo_path": "tweet_classifier.py", "max_stars_repo_name": "codatmo/Brazil-Tweet-Classifier", "max_stars_repo_head_hexsha": "5aab126323df748e15189dd67f7e39a6ed3e678d", "max_stars_repo_licenses": ["BSD-3-Clause"...
No push, lets try to reduce deprecated support in this. Keep NEEDS just in case. --- boost/system/config.hpp.orig 2016-09-21 17:33:27.000000000 +0300 +++ boost/system/config.hpp @@ -10,6 +10,12 @@ #ifndef BOOST_SYSTEM_CONFIG_HPP #define BOOST_SYSTEM_CONFIG_HPP +#if defined(__DragonFly__) && !defi...
{"hexsha": "690b7684d710d1fc7089efdf003db66f4a00afa4", "size": 595, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ports/devel/boost-libs/dragonfly/patch-boost_system_config.hpp", "max_stars_repo_name": "liweitianux/DeltaPorts", "max_stars_repo_head_hexsha": "b907de0ceb9c0e46ae8961896e97b361aa7c62c0", "max_stars_...
""" Print out a length distribution for used WAV files. TODO: This module is not updated to the current TXT to CSV changes. """ import os import pickle import sys from multiprocessing import Pool, Lock, cpu_count import numpy as np from scipy.io import wavfile from tqdm import tqdm from asr.params import MIN_EXAMPL...
{"hexsha": "69ef2841d8c99da3b389749e15e48d9403af6284", "size": 5356, "ext": "py", "lang": "Python", "max_stars_repo_path": "asr/dataset/wav_lengths.py", "max_stars_repo_name": "aflyingwolf/ctc-asr", "max_stars_repo_head_hexsha": "6f1a17366b942c1a70230e170da4d0ae15fa52da", "max_stars_repo_licenses": ["MIT"], "max_stars_...
include("../src/nn.jl") using Test Random.seed!(1) """ charge distribution -> potential (Poisson's eqn), electric field (Gauss's law) """ # input Scalar field inranks = [0] # output scalar field, vector field outranks = [0, 1] sz=(8,8,8) dx = 0.1 dV=dx^3 rmax = 2dx lmax = 1 # charge distribution x = [zeros(sz...)]...
{"hexsha": "57cfffa3198336379f7baf305a8af3edccae577b", "size": 1625, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "aced-differentiate/equivariant-operators-website", "max_stars_repo_head_hexsha": "62d65317d0f96c6fc8490a22d76ef307e585e972", "max_stars_repo_licenses": ["...
import pandas as pd import panel as pn import numpy as np from .config import filters, datastyles, categories, plot_data_path def get_numbers(df, filt, datastyle): if df is None: return [] numbers = list(df.query(f'filt == "{filt}" and datastyle == "{datastyle}"').number.unique()) numbers.sort()...
{"hexsha": "237c5b0dbdea2130fb115090f6aab9dff8694caf", "size": 1003, "ext": "py", "lang": "Python", "max_stars_repo_path": "navigator/gui.py", "max_stars_repo_name": "timothydmorton/pipe-analysis-navigator", "max_stars_repo_head_hexsha": "85b05053324f693386a0c12b292ab38d452a01db", "max_stars_repo_licenses": ["MIT"], "m...
import numpy as np from flask import Flask from flask import render_template,request from sklearn.externals import joblib from forms import CarForm from config import Config app = Flask("Car Price Prediction") app.config.from_object(Config) @app.route("/", methods=["GET"]) def home(): car_form = CarForm() i...
{"hexsha": "5295b32d2293fe5eca60d4e39c1e0332034ecca2", "size": 1928, "ext": "py", "lang": "Python", "max_stars_repo_path": "Day 17/src/app.py", "max_stars_repo_name": "vgaurav3011/100-Days-of-ML", "max_stars_repo_head_hexsha": "ec302b03fd492c459cff2592b3a4f5e38f9c9d72", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np import matplotlib.pyplot as plt from imageio import imwrite import matplotlib.patches as patches from sklearn.cluster import DBSCAN import json from PIL import Image def read_json_coords(label): '''Read a json file containing bounding boxes into coordinate arrays ''' coords, centres = [], []...
{"hexsha": "ad7cbdd00daf97d63c4c09e57caa08f371c266ec", "size": 4422, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/preprocessing/aerialdataprocessing.py", "max_stars_repo_name": "KMacfarlaneGreen/mres_whales", "max_stars_repo_head_hexsha": "11b96a824d9d302afbcb192d24f5087e77721a30", "max_stars_repo_license...
import warnings warnings.simplefilter(action='ignore',category=FutureWarning) import cv2 ## openCV import os import numpy as np import matplotlib.pyplot as plt import operator from IPython.display import Markdown, display def printmd(string, color=None): colorstr = "<span style='color:{}'>{}</span>".format(color,...
{"hexsha": "6ebf67c7c073223c5e6799beaef1c7cad9d142a1", "size": 8293, "ext": "py", "lang": "Python", "max_stars_repo_path": "helper_module.py", "max_stars_repo_name": "sungsujaing/Insight_workshop", "max_stars_repo_head_hexsha": "a951903794cc37fb21d1228a38a3ad6798a7987f", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
"""Tasks for generating Sample Similarity results.""" import numpy as np from sklearn.manifold import TSNE from app.extensions import celery from app.display_modules.utils import persist_result_helper, scrub_category_val from app.tool_results.kraken import KrakenResultModule from app.tool_results.krakenhll import Kra...
{"hexsha": "9242b175e301bf9df4123201f6c613fd105d8e78", "size": 6071, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/display_modules/sample_similarity/tasks.py", "max_stars_repo_name": "MetaGenScope/metagenscope-server", "max_stars_repo_head_hexsha": "609cd57c626c857c8efde8237a1f22f4d1e6065d", "max_stars_rep...
from __future__ import print_function import time import sys from io import StringIO import os import shutil import argparse import csv import json import numpy as np import pandas as pd import logging from sklearn.compose import ColumnTransformer from sklearn.externals import joblib from sklearn.impute import Simp...
{"hexsha": "4610395b3205173ac6dd5ae978bde489e6cbbe2c", "size": 9424, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing.py", "max_stars_repo_name": "gonsoomoon-ml/churn-prediction-workshop2", "max_stars_repo_head_hexsha": "54d80cd3df42868ec26e5b28f9a15fd32ae80a3e", "max_stars_repo_licenses": ["MIT"], ...
################################################################################ # Script: sp.py # Description: This script is for preparing all the fields for sample points # All the cities should run this script first to get the pre-prepared sample points # before running the aggregation. # Two major outputs: # 1. a...
{"hexsha": "40588f1859fe952e0d5af42b67d7ec702bd69af7", "size": 13778, "ext": "py", "lang": "Python", "max_stars_repo_path": "process/sp.py", "max_stars_repo_name": "carlhiggs/global-indicators", "max_stars_repo_head_hexsha": "c2973aaf372fde3ae2290ad75f0766f6263a4e18", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
from SkateUtils.KeyPoseState import State import numpy as np import pydart2 as pydart import pickle if __name__ == '__main__': pydart.init() world = pydart.World(1./1200., '../data/skel/skater_3dof_with_ground.skel') skel = world.skeletons[1] pelvis_pos_y = skel.dof_indices(["j_pelvis_pos_y"]) pe...
{"hexsha": "c551df35159f9b0c82577d91165fdbe764a29441", "size": 3146, "ext": "py", "lang": "Python", "max_stars_repo_path": "swizzle/make_skate_keyframe.py", "max_stars_repo_name": "snumrl/skate", "max_stars_repo_head_hexsha": "a57ec2dc81dc2502da8886b92b870d2c8d65b838", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
import numpy.testing as npt from cvdm.score import fremantle, Fremantle def test_fremantle(): tmp = fremantle(59, True, True, 8, 0.92, 0.79, True, False) npt.assert_almost_equal(tmp, 0.062, decimal=3) def test_fremantle_json(): fr = Fremantle() tmp = fr.score({"index_age": 59, ...
{"hexsha": "77f00e3a539aa81f026dfacc448f5c9db7dba2b4", "size": 624, "ext": "py", "lang": "Python", "max_stars_repo_path": "cvdm/score/tests/test_fremantle.py", "max_stars_repo_name": "joyceho/cvdm", "max_stars_repo_head_hexsha": "df386290221fd1388bef06104db0dd07978f91d9", "max_stars_repo_licenses": ["MIT"], "max_stars_...
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at ht...
{"hexsha": "4f9a657ca510983950ca9f27d025dfdc11a8215e", "size": 13443, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "igl/opengl/ViewerCore.cpp", "max_stars_repo_name": "chenhadad/EngineI_GL_new_Final", "max_stars_repo_head_hexsha": "31fd37c617a6d82117e36676786bac8c0f04c278", "max_stars_repo_licenses": ["Apache-2....
'''Uses pushshift to pull data from farther back than Reddit allows us to go''' import sys import requests import numpy as np from datetime import datetime as dt from dateutil import tz joke_file_base = 'data_%%%%.csv' record_file_base = 'data_%%%%.txt' base_URL = 'https://api.pushshift.io/reddit/submission/search/?...
{"hexsha": "8414094985ec435ee2afb60a91886c207d27e867", "size": 4729, "ext": "py", "lang": "Python", "max_stars_repo_path": "subreddits/pushshift.py", "max_stars_repo_name": "jojordan3/dad-joke-ai", "max_stars_repo_head_hexsha": "a5e955fc78807e8810256d3fb758d3b3a089c136", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#!/usr/bin/env python import numpy as np import de421 from time import time from jplephem import Ephemeris from jplephem.spk import SPK def main(): for size in 10, 1000, 100000: jd = np.linspace(2414992.5, 2471184.50, size) kernel = SPK.open('de421.bsp') ephem = Ephemeris(de421) ma...
{"hexsha": "9361df73e58a22f40f9e9ef28bcfae07500f1a80", "size": 906, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/benchmark.py", "max_stars_repo_name": "jayvdb/python-jplephem", "max_stars_repo_head_hexsha": "331f0fff156ddd83acd5d5a6d8e3be5e07d9dd04", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# TODO: error calculation import numpy as np def get_mse(feature_data, gt, function, *params): prediction = function(feature_data, *params) squared_difference = np.square(np.subtract(gt, prediction)) return squared_difference.mean()
{"hexsha": "d4ad67cdaac3abcb2d07d7248fba278ed49049cd", "size": 245, "ext": "py", "lang": "Python", "max_stars_repo_path": "error_calc.py", "max_stars_repo_name": "Alice-OSENSE/feature_err_analysis", "max_stars_repo_head_hexsha": "39b0d79b9bd5b60a94851fc6a5b458c4d28427dc", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# Model include_model("hopper") # Dimensions nq = 4 # configuration dimension nu = 2 # control dimension nc = 1 # number of contact points nf = 2 # number of faces for friction cone nb = nc * nf ns = nq # Parameters g = 9.81 # gravity μ = 1.0 # coefficient of friction mb = 10.0 # body mass ml = 1.0 # leg mass Jb = ...
{"hexsha": "f5c7ed84c34606d25bf3101fe6020915cc7a74a4", "size": 7329, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/development/hopper_flip_al.jl", "max_stars_repo_name": "jmichaux/motion_planning", "max_stars_repo_head_hexsha": "9a36f394261ff11ca8325d8a5e9d8a79f18b2744", "max_stars_repo_licenses": ["MI...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
{"hexsha": "e00f8c810ed28f442f17a44888c59b7bb723866c", "size": 31037, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/python/debug/cli/analyzer_cli.py", "max_stars_repo_name": "RMORIOKA/tensorflow", "max_stars_repo_head_hexsha": "6886eb9c73940fd3b4dfadc3d6964ae9aa71eef6", "max_stars_repo_licenses": ["...
""" OSC server ofr BITalino R-IoT """ import argparse import math from tornado import websocket, web, ioloop import _thread as thread import asyncio import websockets import json import signal import numpy import sys, traceback, os, time, platform import subprocess #from os.path import expanduser from pythonosc impo...
{"hexsha": "83d95cc63191408d778eda62faf583aefb4761ce", "size": 15748, "ext": "py", "lang": "Python", "max_stars_repo_path": "CEG_pyr/xriot_serverBIT.py", "max_stars_repo_name": "malfarasplux/sigaloud", "max_stars_repo_head_hexsha": "cf35dd51aaa332e9938db57c6aaf19470cc7675e", "max_stars_repo_licenses": ["BSD-3-Clause"],...
import numpy as np # ---------- # Functions to compute in log-domain. # ---------- def logzero(): return -np.inf def safe_log(x): if x == 0: return logzero() return np.log(x) def logsum_pair(logx, logy): """ Return log(x+y), avoiding arithmetic underflow/overflow. logx: log(x) ...
{"hexsha": "22519b691fc9ad1a1c452a70a1f93b516915b9ae", "size": 1474, "ext": "py", "lang": "Python", "max_stars_repo_path": "lxmls/sequences/log_domain.py", "max_stars_repo_name": "mtreviso/lxmls-toolkit", "max_stars_repo_head_hexsha": "7b135d98c8bde592649fface8e6f24f112939937", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma convex_same_rel_interior_closure_straddle: fixes S :: "'n::euclidean_space set" shows "\<lbrakk>convex S; convex T\<rbrakk> \<Longrightarrow> rel_interior S = rel_interior T \<longleftrightarrow> rel_interior S \<subseteq> T \<and> T \<subseteq> closure S" [PROOF STATE] proof...
{"llama_tokens": 202, "file": null, "length": 1}
using LinearAlgebra using MAT using Plots using Statistics file = matread("Data2.mat"); X = file["data"]; # Visualize the first two dimension of the data scatter(X[:,1], X[:,2], aspect_ratio=:equal, leg=false) # input: X - data points # output: E - distance matrix # function get_E(X) n = size(X,1); # number of p...
{"hexsha": "fc64a7c2288153876714b3cb69be5ce4991afad0", "size": 2533, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "julia/diffuse_local.jl", "max_stars_repo_name": "teshenglin/diffusion_maps", "max_stars_repo_head_hexsha": "ee9ffff7773ebfa1953a833235e41eb13ddff9d7", "max_stars_repo_licenses": ["MIT"], "max_stars...
#! /usr/bin/env python # by weil # Sep 16, 2020 import pandas as pd import numpy as np import Cell_BLAST as cb import scipy import os import scanpy as sc from anndata import AnnData from utils import construct_dataset # expr_mat # choose to use raw read counts, not processed data expr_mat=pd.read_csv("../download/Luk...
{"hexsha": "f9eaa036053edfdded4984ad53d7bd19e51f399e", "size": 1300, "ext": "py", "lang": "Python", "max_stars_repo_path": "Datasets/collect/collect_lukowski.py", "max_stars_repo_name": "gao-lab/Cell_BLAST", "max_stars_repo_head_hexsha": "45b14bbd3385b8a7be0b48ef5ab42bc946f3558f", "max_stars_repo_licenses": ["MIT"], "m...