text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import scipy import numpy as np import os import sys from data_profiler.labelers.classification_report_utils import classification_report import warnings from sklearn.exceptions import UndefinedMetricWarning warnings.filterwarnings("ignore", category=UndefinedMetricWarning) # in case of data profiler in own repo _f...
{"hexsha": "1c2a3f3cf086618942b658e64f967e06bb6596e3", "size": 7719, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_profiler/labelers/labeler_utils.py", "max_stars_repo_name": "gme5078/data-profiler", "max_stars_repo_head_hexsha": "602cc5e4f4463f9b807000abf3893815918d0723", "max_stars_repo_licenses": ["Apa...
import argparse import baltic as bt import matplotlib.pyplot as plt import matplotlib.patheffects as path_effects from matplotlib.gridspec import GridSpec from matplotlib.patches import Rectangle from matplotlib.colors import LinearSegmentedColormap import seaborn as sns import glob import ast from treetime.utils impor...
{"hexsha": "e6a18ff3874fc854bc7293b87cc8191c6cc96ed6", "size": 3639, "ext": "py", "lang": "Python", "max_stars_repo_path": "phylogenetic_analysis/scripts/plot_clades_per_week.py", "max_stars_repo_name": "Piantadosi-Lab/SARS-CoV-2_ATL_Introductions", "max_stars_repo_head_hexsha": "cf201410454536006508aafff83ad32aecee19b...
## ----author info, include=F---------------------------------------------- ## Author: Yanchang Zhao ## Email: yanchang@RDataMining.com ## Website: http://www.RDataMining.com ## Date: 9 December 2018 ## ----load libraries, include=F, echo=F----------------------------------- ## load required packages library(dtw...
{"hexsha": "4b41b74c6e119114ec1dfd10ac7fea2284a529fa", "size": 5482, "ext": "r", "lang": "R", "max_stars_repo_path": "Scripts/RDM-script-time-series-analysis.r", "max_stars_repo_name": "enriqueescobar-askida/Kinito.R.DataMining", "max_stars_repo_head_hexsha": "766ece2ad9a30a0dc78a9fa9b27efdfb1be96ace", "max_stars_repo_...
import os import sys import random import math import numpy as np import cv2 from mrcnn.config import Config from mrcnn import utils import mrcnn.model as modellib from mrcnn.model import log import tensorflow as tf class PlaneConfig(Config): NAME="multiobject2" GPU_COUNT=1 IMAGES_PER_GPU=2 NUM_CLASSES=...
{"hexsha": "d9b7d93e258790910250c8fac5a653383d82bd63", "size": 4540, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "ChienWong/Mask_RCNN", "max_stars_repo_head_hexsha": "f9d2592d8664a1abd7fd250fd129dc2bdb7c8c18", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_st...
```python # import libraries and modules import numpy as np import sympy as sp from scipy.integrate import odeint import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation from matplotlib.animation import PillowWriter ``` ```python # The symbols and the derivatives which will be used for later c...
{"hexsha": "581da1d8e8958fda4b68f862c488c657506cfeb4", "size": 113364, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Double pendulum.ipynb", "max_stars_repo_name": "ScientificArchisman/Simulations", "max_stars_repo_head_hexsha": "b9f3e7cc5d94a150931c12dac5fa21391736c47f", "max_stars_repo_licenses"...
export eval_apl # eval eval_apl(ex) = eval_apl(ex, nothing, nothing) eval_apl(f, α, ω) = f eval_apl(v::JlVal, α, ω) = v.val eval_apl(::Α, α, ω) = α eval_apl(::Ω, α, ω) = ω eval_apl(x::Apply, α, ω) = eval_apl(x.f, α, ω)(eval_apl(x.r, α, ω)) eval_apl(x::ConcArr, α, ω) = vcat(eval_apl(x.l, α, ω), eval_apl(x.r, α, ω)) ...
{"hexsha": "e5b89c4a645ec66c73ad37f549593880aa22bd40", "size": 1765, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/eval.jl", "max_stars_repo_name": "JuliaTagBot/APL.jl", "max_stars_repo_head_hexsha": "5806736476ad3547b0955f53af5992f35136a35e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 47, "max_...
from __future__ import print_function from __future__ import division from hoomd import * from hoomd import hpmc import hoomd import numpy import math import sys import os import unittest import tempfile context.initialize() class convex_polyhedron(unittest.TestCase): def setUp(self): # setup the MC integ...
{"hexsha": "c6348138eefa232e1c618802e6f7ee948e7b8277", "size": 26915, "ext": "py", "lang": "Python", "max_stars_repo_path": "hoomd/hpmc/test-py/max_verts.py", "max_stars_repo_name": "kmoskovtsev/HOOMD-Blue-fork", "max_stars_repo_head_hexsha": "99560563a5ba9e082b513764bae51a84f48fdc70", "max_stars_repo_licenses": ["BSD-...
[STATEMENT] lemma qbs_bind_return': assumes "x \<in> monadP_qbs_Px X" shows "x \<bind> qbs_return X = x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<bind> qbs_return X = x [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. x \<bind> qbs_return X = x [PROOF STEP] obtain \<alpha> \<mu> w...
{"llama_tokens": 1038, "file": "Quasi_Borel_Spaces_Monad_QuasiBorel", "length": 11}
#include <boost/asio.hpp> #include <boost/asio/spawn.hpp> #include <iostream> using boost::asio::ip::tcp; using boost::asio::yield_context; int main() { boost::asio::io_service svc; tcp::acceptor a(svc); a.open(tcp::v4()); a.set_option(tcp::acceptor::reuse_address(true)); a.bind({{}, 6767}); //...
{"hexsha": "12271fad003488e42f672779db35801cc899692e", "size": 1066, "ext": "cc", "lang": "C++", "max_stars_repo_path": "tests/cpp/hello_boost/echo.cc", "max_stars_repo_name": "resonai/ybt", "max_stars_repo_head_hexsha": "48e9f9b8bc02686c95b2afc29265b799ff9d80da", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
import numpy as np from scipy.stats import norm from scipy.optimize import fminbound __all__ = ["polyserial_correlation"] def polyserial_correlation(continuous, ordinal): """Computes the polyserial correlation. Estimates the correlation value based on a bivariate normal distribution. Args:...
{"hexsha": "f7ab4cf38688f965b63c2bf3c5d3ba9403d12bf5", "size": 1966, "ext": "py", "lang": "Python", "max_stars_repo_path": "common/polyserial.py", "max_stars_repo_name": "eribean/GIRTH", "max_stars_repo_head_hexsha": "daf22773aa9cd1c819bf732e1061ebf5cc4dc40e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 43, ...
# coding=utf-8 # Copyright 2021 Google LLC # # 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 ...
{"hexsha": "934dfeb9d891b5ec6e9953fc9880aff57b36d120", "size": 5907, "ext": "py", "lang": "Python", "max_stars_repo_path": "learned_optimization/outer_trainers/full_es_test.py", "max_stars_repo_name": "google/learned_optimization", "max_stars_repo_head_hexsha": "1c9ee0159c97815fc6afe79a76224fb28b199053", "max_stars_rep...
include("../src/includes.jl") const TEST_EXCHANGE = "testExchange" struct IntSource <: Source{Int} pollFn::Function IntSource(coll) = new(() -> length(v) > 0 ? pop!(coll) : nothing) end v = collect(1:10000) @async source!(IntSource(v)) |> sink!("testExchange") readline()
{"hexsha": "f68a78065e6e1b3708467c461719b5285eebd0e7", "size": 285, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/test-pub-with-config.jl", "max_stars_repo_name": "garethhu/ReactiveAmqp.jl", "max_stars_repo_head_hexsha": "2a916a2965c90d25ed1229bde7c2eb8db202c799", "max_stars_repo_licenses": ["MIT"], "m...
import numpy as np input_data = np.array([2,3]) weights = { 'node_0': np.array([1,1]), 'node_1': np.array([-1,1]), 'output': np.array([2,-1]) } node_0_val = np.dot(input_data,weights['node_0']) node_1_val = np.dot(input_data,weights['node_1']) node_2_val = np.dot(np.array([node_0_val,...
{"hexsha": "510cc2d608983c70234a4b4f564e619895454ceb", "size": 393, "ext": "py", "lang": "Python", "max_stars_repo_path": "Deep-Learning-In-Python/Module-1/forward-propagation.py", "max_stars_repo_name": "vishwesh5/Datacamp-Courses", "max_stars_repo_head_hexsha": "f074ec25e373c3d1d2edb1629c5568001aeadec1", "max_stars_r...
[STATEMENT] lemma both_mono1': "t \<sqsubseteq> t' \<Longrightarrow> t \<otimes>\<otimes> t'' \<sqsubseteq> t' \<otimes>\<otimes> t''" [PROOF STATE] proof (prove) goal (1 subgoal): 1. t \<sqsubseteq> t' \<Longrightarrow> t \<otimes>\<otimes> t'' \<sqsubseteq> t' \<otimes>\<otimes> t'' [PROOF STEP] using both_mono1[...
{"llama_tokens": 244, "file": "Call_Arity_TTree-HOLCF", "length": 2}
-- <html> -- <head> -- <BASE HREF="http://www.numeric-quest.com/haskell/Orthogonals.html"> -- <title> -- Indexless linear algebra algorithms -- </title> -- </head> -- <body> -- <ul> -- <center> -- <h1> -- *** -- </h1> -- <h1> -- Indexless linear algebra algorithms -- </h1> -- <b...
{"hexsha": "a54d8b00f0d433b414de1bfd766b5ffd6e12f7fe", "size": 65137, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "src/Orthogonals.hs", "max_stars_repo_name": "rzil/wLPAs", "max_stars_repo_head_hexsha": "d8cde11e4ff40c802d1f79d423f0e676ccd49d59", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
module Mandelbrot where import Diagrams.Backend.Cairo.CmdLine import Diagrams.Prelude import Data.Complex quadratic :: Complex Double -> Complex Double -> Complex Double quadratic c z = z * z + c orbit :: Complex Double -> Complex Double -> [Complex Double] orbit c = iterate (quadratic c) criticalOrbit :: Complex ...
{"hexsha": "6055a8ead0c2234c028e6ae540c9cb96d75d71ca", "size": 1321, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "src/Mandelbrot.hs", "max_stars_repo_name": "FayeAlephNil/diagrams-fun", "max_stars_repo_head_hexsha": "a59e35a602ef0eb1c8511c86b10a42d3e96c4692", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#!/usr/bin/env python # coding: utf-8 """ BSD 3-Clause License Copyright (c) 2020, Fred Kellerman All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the abov...
{"hexsha": "cdc40706667bd3b96e6116a7fae975bc4d1530c7", "size": 4398, "ext": "py", "lang": "Python", "max_stars_repo_path": "axidma.py", "max_stars_repo_name": "FredKellerman/pynq-juliabrot", "max_stars_repo_head_hexsha": "c79165e021a0e50b0bc1318b54090c1de708e700", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
""" AbstractMod{T} Abstract type for all Modueles of type T """ abstract type AbstractMod{T} end """ Mod{T} <: AbstractMod{T} Structure to store one specific modules of type{T} """ # problem input as array in unique gives an error if dims = 2 not added... ne struct Mod{T} <: AbstractMod{T} m::T end ...
{"hexsha": "ea62bd4a5d88d1e112c8265b762b0b5cee1528a8", "size": 2477, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/design/Mod.jl", "max_stars_repo_name": "MichielStock/BOMoD.jl", "max_stars_repo_head_hexsha": "b2b9b3cda9e010c5ba1c0815ed3e8a31ae232f99", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import logging import time import numpy from cqcpy import ft_utils from cqcpy.ov_blocks import one_e_blocks from cqcpy.ov_blocks import two_e_blocks from cqcpy.ov_blocks import two_e_blocks_full from pyscf import lib from . import ft_cc_energy from . import ft_cc_equations from . import quadrature einsum = lib.einsum ...
{"hexsha": "8ff56292136f2ea65dca497fbd944735f6a798bb", "size": 108567, "ext": "py", "lang": "Python", "max_stars_repo_path": "kelvin/cc_utils.py", "max_stars_repo_name": "MoleOrbitalHybridAnalyst/kelvin", "max_stars_repo_head_hexsha": "99538f8360975e2f80941446d8fbf2e848f74cf9", "max_stars_repo_licenses": ["MIT"], "max_...
import cv2 import numpy as np import picamera import serial import time def identifySq(pt, w, h): tlx = 80 tly = 210 ppx = 94 ppy = 82 sqx = (pt[0]-(tlx-ppx/2))/ppx sqy = (pt[1]-(tly-ppy/2))/ppy # print ("ID",pt, w, h, sqx, sqy) if sqx < 0 or sqx >= 4 or sqy < 0 or sqy >= 4: re...
{"hexsha": "0aa75cc857ce6615a7c8a612ace54be1b4f547fa", "size": 7970, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tests/TestImgRecognitionAndMotorControl/Test2048Detect5.py", "max_stars_repo_name": "robdobsn/RobotPlay2048", "max_stars_repo_head_hexsha": "0715fd67313ccf6015871c2a73f38de3ca014f10", "max_stars_r...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import math __weights_dict = dict() def load_weights(weight_file): if weight_file == None: return try: weights_dict = np.load(weight_file).item() except: weights_dict = np.load(weight_file, encod...
{"hexsha": "9a7a842b68c4f61e8944a20671fa0b27cc9644dc", "size": 8502, "ext": "py", "lang": "Python", "max_stars_repo_path": "models_old/tf_to_pytorch_vgg16.py", "max_stars_repo_name": "jiangyangzhou/Non-targeted-Attack-IJCAI2019-ColdRiver", "max_stars_repo_head_hexsha": "f9f26b4e00241c7831a2e46a0a2c965457fe99e5", "max_s...
import numpy as np import numpy.matlib def get_rigid_transform(A, B): cenA = np.mean(A, 0) # 3 cenB = np.mean(B, 0) # 3 N = A.shape[0] # 24 H = np.dot((B - np.matlib.repmat(cenB, N, 1)).transpose(), (A - np.matlib.repmat(cenA, N, 1))) [U, _, V] = np.linalg.svd(H) R = np.dot(U, V) # matlab...
{"hexsha": "96c5665eda74a7ad5e0837fa5e2870c6c62e0084", "size": 899, "ext": "py", "lang": "Python", "max_stars_repo_path": "meshreg/datasets/coordutils.py", "max_stars_repo_name": "pgrady3/handobjectconsist", "max_stars_repo_head_hexsha": "9651c569c328707cc1ad1e4797b9e4b32083c446", "max_stars_repo_licenses": ["MIT"], "m...
function metID = findMetIDs(model, metList) % Finds metabolite numbers in a model % % USAGE: % % metID = findMetIds(model, metList) % % INPUTS: % model: COBRA model structure % metList: List of metabolites % % OUTPUT: % metID: List of metabolite IDs corresponding to `metList` % % .. Author: - J...
{"author": "opencobra", "repo": "cobratoolbox", "sha": "e60274d127f65d518535fd0814d20c53dc530f73", "save_path": "github-repos/MATLAB/opencobra-cobratoolbox", "path": "github-repos/MATLAB/opencobra-cobratoolbox/cobratoolbox-e60274d127f65d518535fd0814d20c53dc530f73/src/analysis/exploration/findMetIDs.m"}
subsection {* Weakest precondition calculus *} theory utp_wp imports "../hoare/utp_hoare" begin text {* A very quick implementation of wp -- more laws still needed! *} named_theorems wp method wp_tac = (simp add: wp) consts uwp :: "'a \<Rightarrow> 'b \<Rightarrow> 'c" (infix "wp" 60) definition wp_upred :: "('...
{"author": "git-vt", "repo": "orca", "sha": "92bda0f9cfe5cc680b9c405fc38f07a960087a36", "save_path": "github-repos/isabelle/git-vt-orca", "path": "github-repos/isabelle/git-vt-orca/orca-92bda0f9cfe5cc680b9c405fc38f07a960087a36/Archive/Programming-Languages-Semantics/WP11-C-semantics/src/orca/utp/utp_wp.thy"}
import numpy as np from multiprocessing import Pool import os from sklearn.feature_extraction import image def _denoise_pixel(img, x, y, K, L, sig): def getBlock(x, y): return img[x - halfK: x + halfK + 1, y - halfK: y + halfK + 1] # def mse(block): # return np.mean((block - target...
{"hexsha": "edcef0c537fb57e44c80a68a94ef9ead44d9a0e2", "size": 3493, "ext": "py", "lang": "Python", "max_stars_repo_path": "lpg_pca_impl.py", "max_stars_repo_name": "delmarrerikaine/LPG-PCA", "max_stars_repo_head_hexsha": "deb631ee2c4c88190ce4204fcbc0765ae5cd8f53", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from wordcloud import WordCloud import numpy as np import jieba from PIL import Image from scipy.misc import imread import os from os import path import matplotlib.pyplot as plt def draw_wordCloud(): comment_text = open('text.txt', 'r').read() cut_text = "".join(jieba.cut(comment_text)) color_mask = imread...
{"hexsha": "17fd2019deb2b7d429dc226f83dac98e47419fb3", "size": 820, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "mental2008/wordcloud", "max_stars_repo_head_hexsha": "ff9c2d83ddc438e7663d2315860915ca1106d334", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
import Mercury as Hg import ProtoBuf using Sockets using ZMQ using BenchmarkTools using Test using Logging Logging.disable_logging(Logging.Info) # Generate ProtoBuf julia files outdir = joinpath(@__DIR__, "jlout") if !isdir(outdir) Base.Filesystem.mkdir(outdir) end protodir = joinpath(@__DIR__, "proto") msgfile = ...
{"hexsha": "8de25d28410bc3f3c03e289cc254d23420bc0e5d", "size": 619, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "RoboticExplorationLab/Mercury.jl", "max_stars_repo_head_hexsha": "8d000b623ee1a2d5ca676ea10847de3abe6f46b5", "max_stars_repo_licenses": ["MIT"], "max_stars...
import logging import ransac.core as ransac import ransac.models.circle as circle_model import random import math import matplotlib.pyplot as plt import numpy as np logging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(levelname)s \t%(message)s') def main(): logging.info("create_circle_modeler.py main...
{"hexsha": "30c3228bc6dc2fd713a50be8117295f9074c1d04", "size": 2702, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/create_circle_modeler.py", "max_stars_repo_name": "sebastiengilbert73/ransac", "max_stars_repo_head_hexsha": "4c4d683e58b6b73e7877b18d9700b7c63045710a", "max_stars_repo_licenses": ["MIT"], "...
from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.naive_bayes import MultinomialNB from sklearn.pipeline import Pipeline from sklearn.pipeline import make_pipeline from sklearn.linear_model import SGDClassifier from sklearn import...
{"hexsha": "f294cb2b0652e0eecc17fd7120b15a25f42a484b", "size": 2702, "ext": "py", "lang": "Python", "max_stars_repo_path": "alpha/prediction/or.py", "max_stars_repo_name": "MingJerry/Guide", "max_stars_repo_head_hexsha": "0ac6ee9d20a579a93bcf9a90c53937179fdf6875", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
[STATEMENT] lemma aL_circ_ext: "|x\<^sup>\<star>]y \<le> |aL * x\<^sup>\<circ>]y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. | x\<^sup>\<star> ] y \<le> | aL * x\<^sup>\<circ> ] y [PROOF STEP] by (simp add: aL_circ box_left_antitone)
{"llama_tokens": 115, "file": "Correctness_Algebras_Hoare_Modal", "length": 1}
import numpy as np from ..utils import fix_dim_gmm from .base import Acquisition, AcquisitionWeighted class IVR(Acquisition): """A class for Integrated Variance Reduction. Parameters ---------- model, inputs : see parent class (Acquisition) Attributes ---------- model, inputs : see Param...
{"hexsha": "f1130173d164418d864cbc6827304b98d585ef52", "size": 4636, "ext": "py", "lang": "Python", "max_stars_repo_path": "gpsearch/core/acquisitions/ivr.py", "max_stars_repo_name": "Fluid-Dynamics-Group/gpsearch", "max_stars_repo_head_hexsha": "8c5758c9fb2b623ef79952c3e9c113cb157d79bc", "max_stars_repo_licenses": ["M...
From sflib Require Import sflib. From Paco Require Import paco. Require Import Coq.Classes.RelationClasses Lia Program. From Fairness Require Export ITreeLib WFLibLarge FairBeh NatStructsLarge Mod pind. Set Implicit Arguments. Module WMod. Variant output (state: Type) (ident: ID) (mident: ID) (R: Type) := | no...
{"author": "snu-sf", "repo": "fairness", "sha": "170bd1ade88d32ac6ab661ed0c272af8a00d9ea1", "save_path": "github-repos/coq/snu-sf-fairness", "path": "github-repos/coq/snu-sf-fairness/fairness-170bd1ade88d32ac6ab661ed0c272af8a00d9ea1/src/semantics/Wrapper.v"}
# Importing stock libraries import numpy as np import pandas as pd import torch import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader, RandomSampler, SequentialSampler import json from typing import List # Importing the GPT2 modules from huggingface/transformers from transformers import GPT2...
{"hexsha": "23c99f53efc52c496d05c9f34a6ebff0d11b131d", "size": 10278, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/comet_atomic2020_gpt2/comet_gpt2.py", "max_stars_repo_name": "anudeep23/CS7634-FinalProject-COMET2020", "max_stars_repo_head_hexsha": "ef86531719a9016f2597516d84dbcf010fb8699c", "max_stars...
% SPDX-FileCopyrightText: © 2021 Martin Michlmayr <tbm@cyrius.com> % SPDX-License-Identifier: CC-BY-4.0 \setchapterimage[9.5cm]{images/code} \chapter{Licensing and copyright} \labch{copyright} The licensing of open source projects is a widely discussed topic. The choice of a license can greatly influence the impac...
{"hexsha": "7452815be12f5db12c6cd46914c76639acc774c8", "size": 2369, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/legal/copyright.tex", "max_stars_repo_name": "tbm/foss-foundations-primer", "max_stars_repo_head_hexsha": "1c7370b86f9ea5133f6a077d9b7b0105729f21ac", "max_stars_repo_licenses": ["CC-BY-4.0"...
import csv import math import pprint import time from argparse import ArgumentParser import numpy as np import airsim import setup_path class DroneEnv: def __init__(self): self.client = airsim.CarClient() self.client.confirmConnection() self.client.enableApiControl(True) car_cont...
{"hexsha": "3727ad164466bbea23d762b797b5e10bec926067", "size": 3978, "ext": "py", "lang": "Python", "max_stars_repo_path": "env_car.py", "max_stars_repo_name": "ysbsb/code_demo", "max_stars_repo_head_hexsha": "d6ed52506439b7b0fecc01f7c831f257064f97f7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_star...
import os import numpy as np def parse_icd9_range(range_: str) -> (str, str, int, int): ranges = range_.lstrip().split('-') if ranges[0][0] == 'V': prefix = 'V' format_ = '%02d' start, end = int(ranges[0][1:]), int(ranges[1][1:]) elif ranges[0][0] == 'E': prefix = 'E' ...
{"hexsha": "07eb121b53c5428e32450879474b504d0883d89f", "size": 3782, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocess/auxiliary.py", "max_stars_repo_name": "LuChang-CS/sherbet", "max_stars_repo_head_hexsha": "d1061aca108eab8e0ccbd2202460e25261fdf1d5", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import glob import json import os import shutil import operator import sys import argparse import math import numpy as np from copy import deepcopy parser = argparse.ArgumentParser() parser.add_argument('-na', '--no-animation', help="no animation is shown.", action="store_true") parser.add_argument('-np', '--no-plot'...
{"hexsha": "a020629b55ab6abfc8cf8bf22253da2b57e92a2b", "size": 35019, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "vadimen/mAP", "max_stars_repo_head_hexsha": "6b284707d91706d5e261da69c9c7376cd57ee386", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_...
"""Helper methods for deep learning. --- NOTATION --- The following letters will be used throughout this module. E = number of examples (storm objects) M = number of rows per radar image N = number of columns per radar image H_r = number of heights per radar image F_r = number of radar fields (not including differen...
{"hexsha": "af731b4838f3ea3d542e20d80ee02c8cbf06fb52", "size": 43975, "ext": "py", "lang": "Python", "max_stars_repo_path": "gewittergefahr/deep_learning/deep_learning_utils.py", "max_stars_repo_name": "dopplerchase/GewitterGefahr", "max_stars_repo_head_hexsha": "4415b08dd64f37eba5b1b9e8cc5aa9af24f96593", "max_stars_re...
##### Beginning of file function _is_filesystem_root(path::AbstractString)::Bool path::String = abspath(strip(path)) if path == dirname(path) return true else return false end end function _is_package_directory(path::AbstractString)::Bool path::String = abspath(strip(path)) if ...
{"hexsha": "233b515cac8dd06b1fa786482809fd550355eb0e", "size": 4876, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/package_directory.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Snapshots.jl-44eb87bc-f37b-45e8-9f53-3bcb453a652d", "max_stars_repo_head_hexsha": "7d31297350f9ad4af022d8735c19a783...
function DEM_demo_fMRI_HMM % Demonstration of Hidden Markov models for fMRI %__________________________________________________________________________ % This demonstration routine illustrates the modelling of state % transitions generating resting state fMRI timeseries. The hidden states % are modelled as a hidden ...
{"author": "spm", "repo": "spm12", "sha": "3085dac00ac804adb190a7e82c6ef11866c8af02", "save_path": "github-repos/MATLAB/spm-spm12", "path": "github-repos/MATLAB/spm-spm12/spm12-3085dac00ac804adb190a7e82c6ef11866c8af02/toolbox/DEM/DEM_demo_fMRI_HMM.m"}
import os import argparse import time import numpy as np import pickle import torch from torch.autograd import Variable from PIL import Image from yolov2 import Yolov2 from dataset.factory import get_imdb from dataset.roidb import RoiDataset from yolo_eval import yolo_eval from util.visualize import draw_detection_boxe...
{"hexsha": "0c8706c654e9383989e0c18406a17c8f85deff78", "size": 5405, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "minji-o-j/YOLO", "max_stars_repo_head_hexsha": "5f2d12a80879c80d4b04b4b9acd937c290d0fbd8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_re...
// Copyright Ricardo Calheiros de Miranda Cosme 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE or copy at // http://www.boost.org/LICENSE_1_0.txt) #pragma once #include <boost/fusion/include/as_vector.hpp> #include <boost/mpl/vector.hpp> #include <occi.h> #incl...
{"hexsha": "36cd24d9e5b8659d8b824aae6cfe7f837143c745", "size": 2349, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/picapau/oracle/core/result_set.hpp", "max_stars_repo_name": "ricardocosme/picapau", "max_stars_repo_head_hexsha": "751b946b3911f3ff15e19d177b0b561412c5f8d1", "max_stars_repo_licenses": ["BSL...
[STATEMENT] lemma eval_red_Hcomp: assumes "Ide a" and "Ide b" shows "\<lbrace>(a \<^bold>\<star> b)\<^bold>\<down>\<rbrace> = \<lbrace>\<^bold>\<lfloor>a\<^bold>\<rfloor> \<^bold>\<Down> \<^bold>\<lfloor>b\<^bold>\<rfloor>\<rbrace> \<cdot> (\<lbrace>a\<^bold>\<down>\<rbrace> \<star> \<lbrace>b\<^bold>\<down>\<r...
{"llama_tokens": 5392, "file": "Bicategory_Coherence", "length": 26}
#ifndef STAN_MATH_PRIM_SCAL_PROB_UNIFORM_RNG_HPP #define STAN_MATH_PRIM_SCAL_PROB_UNIFORM_RNG_HPP #include <boost/random/uniform_real_distribution.hpp> #include <boost/random/variate_generator.hpp> #include <stan/math/prim/scal/err/check_consistent_sizes.hpp> #include <stan/math/prim/scal/err/check_finite.hpp> #includ...
{"hexsha": "40ddbbd61a89ed0b7c15f54942680113851a4870", "size": 1261, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "stan/math/prim/scal/prob/uniform_rng.hpp", "max_stars_repo_name": "sakrejda/math", "max_stars_repo_head_hexsha": "3cc99955807cf1f4ea51efd79aa3958b74d24af2", "max_stars_repo_licenses": ["BSD-3-Clause...
// __BEGIN_LICENSE__ // Copyright (c) 2006-2013, United States Government as represented by the // Administrator of the National Aeronautics and Space Administration. All // rights reserved. // // The NASA Vision Workbench is licensed under the Apache License, // Version 2.0 (the "License"); you may not use this f...
{"hexsha": "e925f49edbcfa4c32a5e99f2700ba464212b59eb", "size": 2191, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/vw/Cartography/PointImageManipulation.cc", "max_stars_repo_name": "maxerbubba/visionworkbench", "max_stars_repo_head_hexsha": "b06ba0597cd3864bb44ca52671966ca580c02af1", "max_stars_repo_licenses"...
import tensorflow as tf import tensorflow_io as tfio import numpy as np import matplotlib.pyplot as plt from scipy.fftpack import fft from scipy.io import wavfile as wav ''' Tensorflow conversion to spectrograms Maybe use if we go with Mel spectrograms ''' def print_FFT(song_path): rate, data = wav.read(song_...
{"hexsha": "ad7d908389e071f2d689cd1b2d7c4520758f4d25", "size": 1141, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python Files/Dataset_Formating/Tensor_audio_formating.py", "max_stars_repo_name": "brennanMosher/Music-Genre-Recognition-using-a-Machine-Learning-Appraoch", "max_stars_repo_head_hexsha": "7834fe5d...
# coding: utf-8 # Copyright (c) Materials Virtual Lab # Distributed under the terms of the BSD License. import numpy as np class Preprocessing(object): """ Preprocessing class used for spectrum preprocessing. """ def __init__(self, spectrum): """ Create an Preprocessing object ...
{"hexsha": "949a5975e0f1bbcde2799fac9b149a31761ac288", "size": 5913, "ext": "py", "lang": "Python", "max_stars_repo_path": "veidt/elsie/preprocessing.py", "max_stars_repo_name": "yimingchen95/veidt", "max_stars_repo_head_hexsha": "90f201f856d2f71c578f74b7391c0c9ff284986b", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
########################################################################################### # Adapted from https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py # # Mainly changed the model forward() function # ############################################...
{"hexsha": "aad6c46523b0e8a743f17dd3fc5b60c3e4c4fba2", "size": 21760, "ext": "py", "lang": "Python", "max_stars_repo_path": "nets/resnet.py", "max_stars_repo_name": "nicksum107/thesiswork", "max_stars_repo_head_hexsha": "5d175d0e110b08b7da2926fc64287086f503e086", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import pandas as pd import numpy as np import xgboost as xgb import lightgbm as lgb import pyarrow as pa import pyarrow.parquet as pq import json import traceback from utils import * import argparse # specify the version. parser = argparse.ArgumentParser() parser.add_argument('--version', '-v', default=1, help='versio...
{"hexsha": "5821b92614b4d0040f62076c17262ab22757fa75", "size": 3402, "ext": "py", "lang": "Python", "max_stars_repo_path": "yuki/avito/src/lgbm_with_stack_seed_average.py", "max_stars_repo_name": "RandLive/Avito-Demand-Prediction-Challenge", "max_stars_repo_head_hexsha": "eb2955c6cb799907071d8bbf7b31b73b163c604f", "max...
# Orthogonal polynomials Copyright (C) 2020 Andreas Kloeckner <details> <summary>MIT License</summary> 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 limit...
{"hexsha": "aeb5d48d99398b895b8b12191e8997e85b9e1577", "size": 8701, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "cleared-demos/interpolation/Orthogonal Polynomials.ipynb", "max_stars_repo_name": "xywei/numerics-notes", "max_stars_repo_head_hexsha": "70e67e17d855b7bb06a0de7e3570d40ad50f941b", "ma...
import copy from liegroups import SO3, SE3 import transforms3d as tf3d from transforms3d.quaternions import mat2quat from numpy.linalg import lstsq import numpy as np TASK_DIM = 6 JOINT_NAMES = 1 JOINT_ACTIVE = 3 LINK_NAMES = 12 ZERO_DISP = [0, 0, 0] POS = range(0, 3) ROT = range(3, 6) KI = .01 # originally from ht...
{"hexsha": "4e83fe92a15113e803278c7ffeef93f58c769270", "size": 26902, "ext": "py", "lang": "Python", "max_stars_repo_path": "manipulator_learning/sim/robots/manipulator.py", "max_stars_repo_name": "utiasSTARS/manipulator_learning", "max_stars_repo_head_hexsha": "9a0e0c66c0a3c07124331f010bd04bb52eaf95bb", "max_stars_rep...
[STATEMENT] lemma mult_minus_eq_nat: fixes x::nat and y ::nat and z::nat assumes " x+y = z" shows " -x-y = -z " [PROOF STATE] proof (prove) goal (1 subgoal): 1. - int x - int y = - int z [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: x + y = z goal (1 subgoal): 1. - int x - int y = - int z ...
{"llama_tokens": 155, "file": "Amicable_Numbers_Amicable_Numbers", "length": 2}
export parallel parallel() = schedule_on(ThreadsScheduler())
{"hexsha": "e0966ea7ae0b903d7543c22f728afea3852a79af", "size": 62, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/operators/parallel.jl", "max_stars_repo_name": "hgeorgako/Rocket.jl", "max_stars_repo_head_hexsha": "9661dad340e9a079ebd6ed57dcf9e5db31af637f", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Copyright 2021 Mechanics of Microstructures Group # at The University of Manchester # # 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 # #...
{"hexsha": "10e3a72b02ffc19c0e561d284b451942da95bdcc", "size": 25820, "ext": "py", "lang": "Python", "max_stars_repo_path": "defdap/inspector.py", "max_stars_repo_name": "MechMicroMan/DefDAP", "max_stars_repo_head_hexsha": "d8769c9255b6a64ab528d99057afa5c05b8f5cac", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
[STATEMENT] lemma trace_ft_append: "trace_between s (tr1@tr2) s' \<longleftrightarrow> (\<exists>sh. trace_between s tr1 sh \<and> trace_between sh tr2 s')" [PROOF STATE] proof (prove) goal (1 subgoal): 1. trace_between s (tr1 @ tr2) s' = (\<exists>sh. trace_between s tr1 sh \<and> trace_between sh tr2 s') [PROOF ST...
{"llama_tokens": 652, "file": "CoCon_Traceback_Properties", "length": 5}
#generate community p = random_micrm_params(2,2,0.5) #convert to ODESystem @named sys = micrm_system(p) @testset "MTK system" begin @test length(states(sys)) == 4 @test length(parameters(sys)) == 14 end #convert to problem #define starting mass u0 = fill(0.1, 4) u0 = [states(sys)[i] => u0[i] for i = eachind...
{"hexsha": "20cd60a0ec582172c618b69046c4efc2900842e1", "size": 434, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/MTK_test.jl", "max_stars_repo_name": "CleggTom/MiCRM.jl", "max_stars_repo_head_hexsha": "578a31774b81927a444eb39c459e4af4281448b7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; void PolygonToEquations(const MatrixX2d& pts, MatrixX2d& ab, VectorXd& c) { // ax + by + c <= 0 // assume polygon is convex Vector2d p0 = pts.row(0); for (int i=0; i < pts.rows(); ++i) { int i1 = (i+1) % pts.rows(); ...
{"hexsha": "176d0b83e605d5d5c3ec9862f4f5338b3efe44a5", "size": 748, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/sandbox/polygon_expt.cpp", "max_stars_repo_name": "HARPLab/trajopt", "max_stars_repo_head_hexsha": "40e2260d8f1e4d0a6a7a8997927bd65e5f36c3a4", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_st...
@memoize function result(x, y=True, maxdepth=2, truth_table=truths) # if x ⟹ y it will return true, false or missing # hardcoded things if y == True && class(x) <:ASubset sub, super = args(x) if sub == super return True elseif super == Ω return True end ...
{"hexsha": "d6979bc6ea76cb14c551649505ce2141d38064a2", "size": 1493, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/tree_type3/proving/Proving.jl", "max_stars_repo_name": "Maelstrom6/Breadth.jl", "max_stars_repo_head_hexsha": "5ccb6ec063e1d0337856257608ad887a7bd53eb8", "max_stars_repo_licenses": ["MIT"], "ma...
[STATEMENT] lemma alternativelistconc2[rule_format]: "a \<in> set (net_list_aux [x]) \<longrightarrow> a \<in> set (net_list_aux [y,x])" [PROOF STATE] proof (prove) goal (1 subgoal): 1. a \<in> set (net_list_aux [x]) \<longrightarrow> a \<in> set (net_list_aux [y, x]) [PROOF STEP] by (induct y, simp_all)
{"llama_tokens": 132, "file": "UPF_Firewall_FWNormalisation_NormalisationGenericProofs", "length": 1}
#include "CorePch.h" #include <rtp++/network/TcpRtpConnection.h> #include <boost/bind.hpp> #include <boost/asio/ip/multicast.hpp> #include <boost/asio/ip/udp.hpp> #include <boost/asio/placeholders.hpp> #include <boost/make_shared.hpp> #include <cpputil/OBitStream.h> #include <rtp++/RtpTime.h> #include <rtp++/n...
{"hexsha": "a91cac243d49b01c169fbea522276642f5cc7192", "size": 20257, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Lib/network/TcpRtpConnection.cpp", "max_stars_repo_name": "miseri/rtp_plus_plus", "max_stars_repo_head_hexsha": "244ddd86f40f15247dd39ae7f9283114c2ef03a2", "max_stars_repo_licenses": ["BSD-3-Cl...
# This file is auto-generated by AWSMetadata.jl using AWS using AWS.AWSServices: directory_service using AWS.Compat using AWS.UUIDs """ AcceptSharedDirectory() Accepts a directory sharing request that was sent from the directory owner account. # Required Parameters - `SharedDirectoryId`: Identifier of the shared...
{"hexsha": "7668e3b52e59c57c9a5c5ef9b4f11111b8f86af6", "size": 67414, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/services/directory_service.jl", "max_stars_repo_name": "sean-bennett112/AWS.jl", "max_stars_repo_head_hexsha": "08347ed4afdfeb70009369630b4f2de70d8f7b81", "max_stars_repo_licenses": ["MIT"], "...
#! /usr/bin/env python # Author: S.Rodney # Created : 2014.04.21 def reportDone( pid, dayspan=1, emailto='',emailuser='',emailpass='', logfile=None, verbose=False ): """ Check for visits executed in the last <ndays> days. Fetch the visit status page, parse the visit info, print a report to stdo...
{"hexsha": "ec91ace4a5b745db877e8d4fbdcd070f7084b9e5", "size": 14464, "ext": "py", "lang": "Python", "max_stars_repo_path": "hstMonitor.py", "max_stars_repo_name": "srodney/hstsntools", "max_stars_repo_head_hexsha": "a36e0cc89dece4c992bb312df1af1dc5de595619", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
function allen_ccf_2pi(tv,av,st) % allen_ccf_2pi(tv,av,st) % written by Samuel Picard (samuel.picard@ucl.ac.uk) % based on original allen_ccf_npx tool written by Andy Peters (peters.andrew.j@gmail.com) % % GUI for planning 2pi chronic window implant with the Allen CCF % Part of repository: https://github.com/cortex-lab...
{"author": "cortex-lab", "repo": "allenCCF", "sha": "0bbff55fc906fd3f023da81ce1d0e4b8726d4fd0", "save_path": "github-repos/MATLAB/cortex-lab-allenCCF", "path": "github-repos/MATLAB/cortex-lab-allenCCF/allenCCF-0bbff55fc906fd3f023da81ce1d0e4b8726d4fd0/Browsing Functions/allen_ccf_2pi.m"}
module Main import Collie import Interface import Data.Version import System.Directory.Extra import Command %hide Collie.(.handleWith) exitError : HasIO io => String -> io a exitError err = do putStrLn "" putStrLn err putStrLn "" exitFailure exitSuccess : HasIO io => String -> io a exitSuccess msg = do p...
{"hexsha": "5ad97c534ca4b0f70dae15190aca648dba7a7dcb", "size": 1980, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "cli/src/Main.idr", "max_stars_repo_name": "memoryruins/idv", "max_stars_repo_head_hexsha": "7631bd1c0bdea2cfb672fa178918b4e6191a738c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
! path: $Source: /storm/rc1/cvsroot/rc/rrtmg_lw/src/mcica_subcol_gen_lw.1col.f90,v $ ! author: $Author: mike $ ! revision: $Revision: 1.5 $ ! created: $Date: 2009/05/22 21:04:30 $ ! module mcica_subcol_gen_lw ! -------------------------------------------------------------------------...
{"hexsha": "1af55f35ec8ac551799ddd8b78f7dfb2ff3d9e4e", "size": 26312, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "rrtmg_lw/src/mcica_subcol_gen_lw.1col.f90", "max_stars_repo_name": "danielkoll/PyRADS_vs_RRTMG", "max_stars_repo_head_hexsha": "72361b22fbebd96022f9082c306ac30fb8f46b6b", "max_stars_repo_licens...
from nose.tools import raises import networkx as nx # smoke tests for exceptions @raises(nx.NetworkXException) def test_raises_networkx_exception(): raise nx.NetworkXException @raises(nx.NetworkXError) def test_raises_networkx_error(): raise nx.NetworkXError @raises(nx.NetworkXPointlessConcept)...
{"hexsha": "78923ef7c8d57158d71fd027baf4317899917572", "size": 837, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/prism-fruit/Games-DQL/examples/games/car/networkx/tests/test_exceptions.py", "max_stars_repo_name": "kushgrover/apt-vs-dift", "max_stars_repo_head_hexsha": "250f64e6c442f6018cab65ec6979d9568a84...
[STATEMENT] lemma measurable_bind2: assumes "f \<in> measurable M (subprob_algebra N)" and "g \<in> measurable N (subprob_algebra R)" shows "(\<lambda>x. bind (f x) g) \<in> measurable M (subprob_algebra R)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<lambda>x. f x \<bind> g) \<in> M \<rightarrow>\<^sub>M ...
{"llama_tokens": 252, "file": null, "length": 2}
#!/usr/bin/env python3 import sys import numpy import pylab pylab.rcParams["font.size"]=8 pylab.rcParams["legend.fontsize"]=8 #pylab.rcParams["lines.linewidth"]=1 #pylab.rcParams["axes.linewidth"]=2 #pylab.rcParams["axes.labelsize"]="large" #pylab.rcParams["axes.labelweight"]="bold" pylab.rcParams["xtick.major.size"]...
{"hexsha": "8e8c70a570140873f2f3e5b2b1133e4ec943ffc0", "size": 1773, "ext": "py", "lang": "Python", "max_stars_repo_path": "Fig1/ADPmod/plot_spike.py", "max_stars_repo_name": "TatsuyaHaga/reversereplaymodel_codes", "max_stars_repo_head_hexsha": "503d545449efab603e18d224fc2f94158d967530", "max_stars_repo_licenses": ["MI...
"""Mass budget-related quantities.""" try: from animal_spharm import SpharmInterface except ImportError: pass from aospy.constants import grav from aospy.utils.vertcoord import (d_deta_from_pfull, d_deta_from_phalf, to_pfull_from_phalf, dp_from_ps, int_dp_g, ...
{"hexsha": "6cad343ed6f0a202290eac77297896b37706d938", "size": 13401, "ext": "py", "lang": "Python", "max_stars_repo_path": "aospy_user/calcs/mass.py", "max_stars_repo_name": "spencerahill/aospy-obj-lib", "max_stars_repo_head_hexsha": "76803806e8c6b0042c901735eed1c88042d4e4ed", "max_stars_repo_licenses": ["Apache-2.0"]...
import matplotlib.pyplot as plt import numpy as np import argparse parser = argparse.ArgumentParser() parser.add_argument('data', help='Arquivo com as contagens das palavras') parser.add_argument('title', help='Titulo do gráfico') args = parser.parse_args() image_name = args.title.lower().replace(' ', '_') + '.png' w...
{"hexsha": "5e3e4db961805bb5b58ea04dc1478c2e015000db", "size": 1257, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plot_cont.py", "max_stars_repo_name": "Vnicius/filter", "max_stars_repo_head_hexsha": "0e478c5bc02c5152151308a1ca750c458c982135", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
/* * 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) * * (C) Copyright 2013 Andrey Semashev */ /*! * \file exceptions.hpp * * \brief This header includes all exception types. */ #ifndef BOOST...
{"hexsha": "25f5c14fc4a8c2fb8773fcebcbb4cfbcd2b0564b", "size": 789, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/sync/exceptions.hpp", "max_stars_repo_name": "ballisticwhisper/boost", "max_stars_repo_head_hexsha": "f72119ab640b564c4b983bd457457046b52af9ee", "max_stars_repo_licenses": ["BSL-1.0"], "max_sta...
/* * @name BookFiler Library - Sort Filter Table Widget * @author Branden Lee * @version 1.00 * @license MIT * @brief sqlite3 based table widget. */ #ifndef BOOKFILER_LIBRARY_SORT_FILTER_TABLE_WIDGET_MAIN_WIDGET_H #define BOOKFILER_LIBRARY_SORT_FILTER_TABLE_WIDGET_MAIN_WIDGET_H // config #include "../core/confi...
{"hexsha": "3e97c9ee73682ba26e003666a14f0476ef7177e7", "size": 4274, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/UI/MainWidget.hpp", "max_stars_repo_name": "bradosia/BookFiler-Lib-Sort-Filter-Table-Widget", "max_stars_repo_head_hexsha": "6d4b99ed27eb6b43f6ac0495a8adb02bec5c801e", "max_stars_repo_licenses":...
using EasyDataAugmentation using Documenter DocMeta.setdocmeta!(EasyDataAugmentation, :DocTestSetup, :(using EasyDataAugmentation); recursive=true) makedocs(; modules=[EasyDataAugmentation], authors="lilianabs <lilianabsmath@google.com> and contributors", repo="https://github.com/lilianabs/EasyDataAugment...
{"hexsha": "e3bb8ae4269ebdd2446ff47d0d0b033ee74c92d7", "size": 732, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "lilianabs/EasyDataAugmentationNLP.jl", "max_stars_repo_head_hexsha": "bb54e163ef74f10f8dc4e21a1bbc04bb35a3e24a", "max_stars_repo_licenses": ["MIT"], "max_stars...
import numpy as np from scipy import stats, linalg import os import pandas as pd import neurolab as nl from sklearn.model_selection import train_test_split from sklearn.model_selection import KFold from sklearn.metrics import accuracy_score from sklearn.utils import shuffle import matplotlib.pyplot as plt import pickle...
{"hexsha": "7ec6d98eaa1508addabc5b008369c19b8eb6e354", "size": 1526, "ext": "py", "lang": "Python", "max_stars_repo_path": "f_data_prep.py", "max_stars_repo_name": "jungminshan/drosophila", "max_stars_repo_head_hexsha": "8efccfdaaac1404811eac2d81a90f5f42b1d24c1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
/* * libasiotap - A portable TAP adapter extension for Boost::ASIO. * Copyright (C) 2010-2011 Julien KAUFFMANN <julien.kauffmann@freelan.org> * * This file is part of libasiotap. * * libasiotap is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as * pu...
{"hexsha": "0c43ce2b983d57ba1887439ac449e43445f8dc63", "size": 9320, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "blades/freelan/libs/asiotap/include/asiotap/base_dns_servers_manager.hpp", "max_stars_repo_name": "krattai/AEBL", "max_stars_repo_head_hexsha": "a7b12c97479e1236d5370166b15ca9f29d7d4265", "max_stars...
""" Reimplementing segan paper as close as possible. Deepak Baby, UGent, June 2018. """ from __future__ import print_function import tensorflow as tf from tensorflow.contrib.layers import xavier_initializer, flatten, fully_connected import numpy as np from keras.layers import Subtract, Activation, Input from keras.mo...
{"hexsha": "c79696f6cc4b23b6cc0f151867546dbad929fbf3", "size": 13823, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_rsgan-gp_se.py", "max_stars_repo_name": "samiulshuvo/se_relativisticgan", "max_stars_repo_head_hexsha": "5501c4d96faa03eb3c1fd776b232b68940183f4d", "max_stars_repo_licenses": ["MIT"], "max_st...
#This is a code for thresholding the CAM image and output a mask import numpy as np import scipy.misc as misc import matplotlib.pyplot as plt import matplotlib.image as mpimg import cv2 root = "./result/" img_path = root+"00436515-870c-4b36-a041-de91049b9ab4-densenet121-cam.jpg" img = mpimg.imread(img_path) img_name = ...
{"hexsha": "239e4bd97ae40b4086438d36a175d60cdd90b56f", "size": 2204, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/thresholding.py", "max_stars_repo_name": "hizircanbayram/Explainable-Pneumonia-Learning-A-Comprehensive-Study", "max_stars_repo_head_hexsha": "56269d80ca6d5626dc7683d9f699964d6f54044a", "max_...
import time import networks import pdb from data.frankenstein_dataset import FrankensteinDataset from data.horizon_dataset import HorizonDataset from data.eval_dataset import EvalDataset import matplotlib.pyplot as plt from scipy.misc import imsave from torch.utils.data import DataLoader import torch.nn.functional as F...
{"hexsha": "74b9fca82746618fe516f50253b2cb96bcc604c7", "size": 4270, "ext": "py", "lang": "Python", "max_stars_repo_path": "discriminator/vanilla/generate_pano_noGAN.py", "max_stars_repo_name": "dangeng/infiniteGANorama", "max_stars_repo_head_hexsha": "92c9cbe0638cf9fcdc05020759772e36aebf788c", "max_stars_repo_licenses...
#!/usr/bin/env python #!python #command='Produce.Simulated.FussyJuncs.py heterozygous --reference /mnt/EXT/Mills-scratch2/reference/GRCh37/human_g1k_v37.fasta --input-sim /mnt/EXT/Mills-scratch2/Xuefang/Simulate.FussyJunc/Simulate.het.rerun.test.20150901/het.sim --output-prefix /mnt/EXT/Mills-scratch2/Xuefang/Simulate...
{"hexsha": "54b73d4492f7b5357d54e5870dd217f28ae6f560", "size": 152415, "ext": "py", "lang": "Python", "max_stars_repo_path": "Support.Scripts/Produce.Simulated.FussyJuncs.py", "max_stars_repo_name": "mills-lab/svelter", "max_stars_repo_head_hexsha": "d318b06d588483fe8a8ebcac8c8a6c7878f2c2b3", "max_stars_repo_licenses":...
import pymysql import matplotlib import matplotlib.pyplot as plt from matplotlib import font_manager import pandas as pd import numpy as np import jieba import jieba.analyse as analyse username = 'root' password = 'mysql' url = '127.0.0.1' port = 3306 database = 'campus' conn = pymysql.connect(url, port=port, databas...
{"hexsha": "e690e2b33475b8ca9cc4bd7aaedbf5be4e136c6a", "size": 2066, "ext": "py", "lang": "Python", "max_stars_repo_path": "01_crawl_cases/campus_public_opinion/huitu.py", "max_stars_repo_name": "zlj-zz/anti-crawlCase", "max_stars_repo_head_hexsha": "a6ed670ad332bd456572eeff707bd5fc14186b3d", "max_stars_repo_licenses":...
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2010. // 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/lambda.hpp> #include <mpllibs/metamonad/lazy.hpp> #include <mpllibs/m...
{"hexsha": "b12d5b1b56cb93939cc0302cb47bb8bfdbfb940e", "size": 2678, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/metamonad/test/lambda.cpp", "max_stars_repo_name": "sabel83/mpllibs", "max_stars_repo_head_hexsha": "8e245aedcf658fe77bb29537aeba1d4e1a619a19", "max_stars_repo_licenses": ["BSL-1.0"], "max_star...
from autoconf import conf import numba """ Depending on if we're using a super computer, we want two different numba decorators: If on laptop: @numba.jit(nopython=True, cache=True, parallel=False) If on super computer: @numba.jit(nopython=True, cache=False, parallel=True) """ try: nopython = c...
{"hexsha": "2d0a64c5cb29d05754ea444598a6958d21d95e40", "size": 758, "ext": "py", "lang": "Python", "max_stars_repo_path": "autolens/decorator_util.py", "max_stars_repo_name": "rakaar/PyAutoLens", "max_stars_repo_head_hexsha": "bc140c5d196c426092c1178b8abfa492c6fab859", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#!/usr/bin/python3 # -*- coding: utf-8 -*- from numpy import pi from numpy.random import random from modules.growth import spawn_curl from modules.growth import spawn from numpy import zeros NMAX = 10**6 SIZE = 800 ONE = 1./SIZE PROCS = 2 INIT_RAD = 25*ONE INIT_NUM = 40 STP = ONE*0.4 NEARL = 6*ONE FARL = 60*ONE...
{"hexsha": "f449fb773b8144122adcf5b18dc8454949b031c5", "size": 1698, "ext": "py", "lang": "Python", "max_stars_repo_path": "generator/main_detail_ani.py", "max_stars_repo_name": "stevejaxon/leonardo-dao-vinci", "max_stars_repo_head_hexsha": "e1074f872ac83a69a70115e5e5e4376ff4462b36", "max_stars_repo_licenses": ["MIT"],...
""" Visualization functions for forest of trees-based ensemble methods for Uplift modeling on Classification Problem. """ from collections import defaultdict import numpy as np import pydotplus def uplift_tree_string(decisionTree, x_names): ''' Convert the tree to string for print. Args ---- de...
{"hexsha": "1648c75c30512fd3aef04a6175c668b32fd7d314", "size": 8236, "ext": "py", "lang": "Python", "max_stars_repo_path": "causalml/inference/tree/plot.py", "max_stars_repo_name": "lleiou/causalml", "max_stars_repo_head_hexsha": "2d3cacacad5ed3b0e57b593803a33c61c554f3b2", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import numpy as np import itertools import pandas as pd import re import json import matplotlib.pyplot as plt import scipy.io.wavfile import librosa import librosa.display import IPython.display as ipd from random import randint import os from numpy import random as rd from pandas.api.types import is_str...
{"hexsha": "10940bf2a46497aa043bd8de25f05cb06302856a", "size": 34576, "ext": "py", "lang": "Python", "max_stars_repo_path": "functions.py", "max_stars_repo_name": "benedettacandelori/ADM4_group12", "max_stars_repo_head_hexsha": "95a3efe27ec481e1d28a96daef30fd52a9e1419d", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
try: from setuptools import setup except ImportError: from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize from torch.utils.cpp_extension import BuildExtension import numpy # Get the numpy include directory. numpy_include_dir = numpy.get_include() # Ex...
{"hexsha": "d9d21e37c3c740161997946751fd6b3246548c52", "size": 2116, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup.py", "max_stars_repo_name": "ray8828/occupancy_flow", "max_stars_repo_head_hexsha": "09c172262bb151895d450eb323e2383a5c88841c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 146, "m...
### CONCRETE TYPE: DIRECT PROX EVALUATION # prox! is computed using a Cholesky factorization of A'A + I/(lambda*gamma) # or AA' + I/(lambda*gamma), according to which matrix is smaller. # The factorization is cached and recomputed whenever gamma changes using LinearAlgebra using SparseArrays using SuiteSparse mutable...
{"hexsha": "a2b3638949dc4d289bcdbf8183d06e1eff7703b8", "size": 5202, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/functions/leastSquaresDirect.jl", "max_stars_repo_name": "UnofficialJuliaMirror/ProximalOperators.jl-a725b495-10eb-56fe-b38b-717eba820537", "max_stars_repo_head_hexsha": "0e77f72cae83cceb27543a...
import numpy as np import matplotlib.pyplot as plt ''' Equations taken from: Rahvar, S., Mehrabi, A., & Dominik, M. 2011, MNRAS, 410, 912 ''' # speed of light, c, (au/day) # orbital radius, a, (au) # mass of source star, m_star, mass of lens, M (solal masses) # inclination angle with respect to observer-lens line of ...
{"hexsha": "6500259239f3a044b2a508e735a6b95c0aa59ff1", "size": 2213, "ext": "py", "lang": "Python", "max_stars_repo_path": "troia/kartik_eli/rahvar.py", "max_stars_repo_name": "tdaylan/troia", "max_stars_repo_head_hexsha": "55751fbbcab2faddcd157b22b7a127e1afffeeae", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
from sympy.core.symbol import Symbol from .input_size import input_size from .base import call_method_or_dispatch, create_registerer from sklearn.base import BaseEstimator def syms_x(estimator): return [Symbol('x%d' % d) for d in range(input_size(estimator))] syms_dispatcher = { BaseEstimator: ...
{"hexsha": "102be98ba62583f8b69c26795709ca4702b8899c", "size": 472, "ext": "py", "lang": "Python", "max_stars_repo_path": "sklearntools/sym/syms.py", "max_stars_repo_name": "modusdatascience/sklearntools", "max_stars_repo_head_hexsha": "6cb87edcb501440266622fe4c738be3f9015a859", "max_stars_repo_licenses": ["BSD-3-Claus...
from functools import partial import haiku as hk import jax import jax.numpy as jnp class EncoderBlock(hk.Module): def __init__( self, n_in: int, n_out: int, n_layers: int, name: str = "EncoderBlock" ): super().__init__(name=name) n_...
{"hexsha": "263dc0dbf9ff53c68f918d1f285f14388557958d", "size": 3272, "ext": "py", "lang": "Python", "max_stars_repo_path": "dall_e_jax/encoder.py", "max_stars_repo_name": "kingoflolz/DALL-E", "max_stars_repo_head_hexsha": "d3f3e9a57a31b1e1cc74a449a9e6e5a0442f0ac7", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ COCO dataset which returns image_id for evaluation. Mostly copy-paste from https://github.com/pytorch/vision/blob/13b35ff/references/detection/coco_utils.py """ from pathlib import Path import json import os import numpy as np import torch imp...
{"hexsha": "720253ec629410a0cd967e8e81fccee488c898a0", "size": 10033, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/coco.py", "max_stars_repo_name": "wdurhamh/detr_radiate", "max_stars_repo_head_hexsha": "2c9d53914816dd15fc4a6d176d5ea013703db7b3", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
#coding:utf-8 """ #Author : Arijit Mukherjee #Date : June 2016 #B.P. Poddar Institute of Management and Technology #Inteligent Human-Computer Interaction with depth prediction using normal webcam and IR leds #Inspired by : http://research.microsoft.com/pubs/220845/depth4free_SIGGRAPH.pdf Demo Application to estimate h...
{"hexsha": "71d3d3d3284b0c3606c6e23a4830a2c621b083cf", "size": 4440, "ext": "py", "lang": "Python", "max_stars_repo_path": "python-code/opencv-learning/tiny-apps/handgesture/multitouch.py", "max_stars_repo_name": "juxiangwu/image-processing", "max_stars_repo_head_hexsha": "c644ef3386973b2b983c6b6b08f15dc8d52cd39f", "ma...
# Composite pattern - Option import numpy as np import scipy.stats as si class Asset: def price(self, scenario): raise NotImplementedError("Abstract asset does not have a price") def volatility(self, scenario): raise NotImplementedError("Abstract asset does not have a volatility") @stati...
{"hexsha": "54dd2d01fa360c45930d777b83609fa205e2f3ad", "size": 5321, "ext": "py", "lang": "Python", "max_stars_repo_path": "portfolio/portfolio5-creation.py", "max_stars_repo_name": "orest-d/design-patterns-finance", "max_stars_repo_head_hexsha": "5878912dfa5b34925b00c38da978e7b9e4735a14", "max_stars_repo_licenses": ["...
""" Figure 4K: learning angle between habituation and recall population vectors. """ import pickle import numpy as np from scipy.io import savemat import matplotlib.pyplot as plt import seaborn as sns from src.data_utils import get_per_mouse_boutons from src.population_utils import compute_angle, get_learning_angles sn...
{"hexsha": "a37ff2185fe9c0c8b164ae82647368d9d5e4b2dd", "size": 2432, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/learning_angle.py", "max_stars_repo_name": "sprekelerlab/long-range-inhibition", "max_stars_repo_head_hexsha": "61aa94ee853e666304b1ac544cb300528eb3f591", "max_stars_repo_licenses": ["Apac...
#include <boost/type_traits/is_polymorphic.hpp>
{"hexsha": "25c0e229a4bcef4e15c16a1ec10ffa3acb1a39b9", "size": 48, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_type_traits_is_polymorphic.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BS...
import re import torch import jpegio import shutil import numpy as np from pathlib import Path from functools import partial from argus import load_model from src.ema import ModelEma from src import config def deep_chunk(input, chunks, dim=0): partial_deep_chunk = partial(deep_chunk, chunks=chunks, dim=dim) ...
{"hexsha": "bc76ff0a7092d5b657f19a89624f08bea7aba32c", "size": 3448, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils.py", "max_stars_repo_name": "lRomul/argus-alaska", "max_stars_repo_head_hexsha": "f45dca1781b4a5f1336ebf826e3102ad5a6c0aeb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "ma...
import io import pathlib import re from dataclasses import dataclass from functools import singledispatch from typing import Tuple, Any import ipywidgets as widgets import numpy as np from PIL import Image, ImageEnhance, ImageOps URL_REGEX = re.compile( r"^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?" ...
{"hexsha": "a39f30372f5fa5465f5b1a25d9c05f0b8fd2338d", "size": 3127, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ipyannotations/images/canvases/image_utils.py", "max_stars_repo_name": "tabaspki/ipyannotations", "max_stars_repo_head_hexsha": "8253d3a0abcd5644d6e5a0c5b04557ec7f50ba4c", "max_stars_repo_lice...
SUBROUTINE WRITCA(LUNXX,MSGT,MSGL) C$$$ SUBPROGRAM DOCUMENTATION BLOCK C C SUBPROGRAM: WRITCA C PRGMMR: J. ATOR ORG: NP12 DATE: 2004-08-18 C C ABSTRACT: THIS SUBROUTINE IS CONSIDERED OBSOLETE AND MAY BE REMOVED C FROM THE BUFR ARCHIVE LIBRARY IN A FUTURE VERSION. IT NOW SIMPLY C CALLS B...
{"hexsha": "c205ba9b1f4e31d528c5cde91a468c76d1cfb15b", "size": 2320, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "observations/obs_converters/NCEP/prep_bufr/lib/writca.f", "max_stars_repo_name": "hkershaw-brown/feature-preprocess", "max_stars_repo_head_hexsha": "fe2bd77b38c63fa0566c83ebc4d2fac1623aef66", "max...
module AddIntegersF90 using CxxInterface const libAddIntegersF90 = joinpath(pwd(), "libAddIntegersF90") eval(f90setup()) eval(f90newfile("AddIntegersF90.f90", "")) eval(f90function(FnName(:add_int, "add_int", libAddIntegersF90), FnResult(Cint, "integer", Int, expr -> :(convert(Int, $expr))), [FnArg(...
{"hexsha": "34345b5f37256f7e3db685266321aa3be3baea59", "size": 1884, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test-f90.jl", "max_stars_repo_name": "jw3126/CxxInterface.jl", "max_stars_repo_head_hexsha": "4b69da8d7e3497c10d5029c8f0c13ee81019ea13", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import logging import os import random import sys from dataclasses import dataclass, field from typing import Optional import numpy as np from datasets import load_dataset, load_metric import transformers from transformers.trainer_utils import get_last_checkpoint, is_main_process from transformers.utils import check_...
{"hexsha": "837b3344ed03af149d0da7ac919592cece8e698d", "size": 14573, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/train.py", "max_stars_repo_name": "spacemanidol/RankingModelCompression", "max_stars_repo_head_hexsha": "43123fb37d97db3ae4338eb9af28520e2aaf88ea", "max_stars_repo_licenses": ["MIT"], "max_st...