text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import rospy import smach import smach_ros import message_filters import tf from tf import transformations from tf import TransformListener from tf import transformations from geometry_msgs.msg import PoseStamped import apc_msgs.srv from sensor_msgs.msg import PointCloud2 from sensor_msgs.msg import Image from apc_...
{"hexsha": "0b839bf026ed25aee300f21392507580457c42ec", "size": 10084, "ext": "py", "lang": "Python", "max_stars_repo_path": "apc_state_machine/state_machine/scripts/OBSOLETE_decideGraspPoseStateFromPointCloud.py", "max_stars_repo_name": "Juxi/apb-baseline", "max_stars_repo_head_hexsha": "fd47a5fd78cdfd75c68601a40ca4726...
import os import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pandas as pd folder = '/home/sebastian/Programs/iblrig/tasks/_iblrig_tasks_ephysChoiceWorld/sessions/' # location of datasets show = 0 # whether or not to show plots (they will be saved anyway) plot = 0 # whether or not to compu...
{"hexsha": "139132199bb945aa249774c4ebbef367ebff436f", "size": 3782, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/sequence_analysis.py", "max_stars_repo_name": "ineslaranjeira/analysis", "max_stars_repo_head_hexsha": "ef262cc0d4e04ffb59d81aeb8f135790778b8bbf", "max_stars_repo_licenses": ["MIT"], "max_s...
from numpy.random import choice from srcs.agent.Tree import Tree from srcs.agent.auxilliary import ucb from srcs.agent.auxilliary import NodeAttr as NodeAttr from enum import IntEnum # # An enum for the type of rollout policy to be used. # class RolloutPolicy(IntEnum): RANDOM_ACTION = 0 RANDOM_ACTION_AVOIDING...
{"hexsha": "3cca799a503d3e7acd83d6a7a03aac8a2e383f01", "size": 12185, "ext": "py", "lang": "Python", "max_stars_repo_path": "srcs/agent/POMCP.py", "max_stars_repo_name": "ChampiB/POMCP", "max_stars_repo_head_hexsha": "af6b7f9df3476126abad2adf21cc618e1d9898d1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
[STATEMENT] lemma HNatInfinite_FreeUltrafilterNat_iff: "(star_n X \<in> HNatInfinite) = (\<forall>u. eventually (\<lambda>n. u < X n) \<U>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (star_n X \<in> HNatInfinite) = (\<forall>u. \<forall>\<^sub>F n in \<U>. u < X n) [PROOF STEP] by (rule iffI [OF HNatInfinite_...
{"llama_tokens": 163, "file": null, "length": 1}
from .dummy_gym_env import DummyEnv from gym.spaces import Box, Discrete import numpy as np from supersuit import ( frame_stack_v1, reshape_v0, observation_lambda_v0, action_lambda_v1, dtype_v0, ) import supersuit import pytest base_obs = (np.zeros([8, 8, 3]) + np.arange(3)).astype(np.float32) base...
{"hexsha": "c376d28fac88d1d3096419bbeb3b5b1f44942736", "size": 4227, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/gym_mock_test.py", "max_stars_repo_name": "PettingZoo-Team/SuperSu", "max_stars_repo_head_hexsha": "3c4e364b4744649cb9eaa9201d70b5be3d43730f", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from tqdm import tqdm from agent import CUDAAgent from .base_student import BaseStudent def softmax(x): """Compute softmax values for each sets of scores in x.""" return np.exp(x) / np.sum(np.ex...
{"hexsha": "0caad34d85bfdcdf380dd2ad1a004435160d7875", "size": 9262, "ext": "py", "lang": "Python", "max_stars_repo_path": "student/icil_student.py", "max_stars_repo_name": "ioanabica/Invariant-Causal-Imitation-Learning", "max_stars_repo_head_hexsha": "eb92fac1db6e418250ad383d888d69faa667e7aa", "max_stars_repo_licenses...
#These are the basics + the ability to shut the program down. import pygame as pg #This is where I get all the pygame stuff import numpy as np #I import this becouse I'm in love with numpy from pygame.locals import QUIT #QUIT is a constant (I think) that indicates wether the user is trying to quit the program by pushi...
{"hexsha": "9b93715695dfe8d510ac19a3ce21651ea45f0373", "size": 1361, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyGame/pygame2/ex1/ex2.py", "max_stars_repo_name": "hoppfull/Legacy-Python", "max_stars_repo_head_hexsha": "43f465bfdb76c91f2ac16aabb0783fdf5f459adb", "max_stars_repo_licenses": ["MIT"], "max_star...
from scipy.io import loadmat from datetime import datetime import os def calc_age(taken, dob): birth = datetime.fromordinal(max(int(dob) - 366, 1)) # assume the photo was taken in the middle of the year if birth.month < 7: return taken - birth.year else: return taken - birth.year - 1 ...
{"hexsha": "3c2ed32ba4dbe6a1edbd1f4e8fd1625291fe8fc3", "size": 3060, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils.py", "max_stars_repo_name": "phanbaominh/age-gender-estimation", "max_stars_repo_head_hexsha": "a157e486f11b21fa46b447a2d7e978e0ff94a919", "max_stars_repo_licenses": ["MIT"], "max_stars_...
[STATEMENT] lemma (in Ring) LSM_eq_linear_span:"\<lbrakk>R module M; T \<subseteq> carrier M\<rbrakk> \<Longrightarrow> (LSM\<^bsub>R\<^esub> M T) = linear_span R M (carrier R) T" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>R module M; T \<subseteq> carrier M\<rbrakk> \<Longrightarrow> LSM\<^b...
{"llama_tokens": 1105, "file": "Group-Ring-Module_Algebra9", "length": 8}
[STATEMENT] lemma plusl_bot_infty: "\<bottom>\<^sub>1 +\<^sub>1 \<infinity>\<^sub>1 = \<bottom>\<^sub>1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<bottom>\<^sub>1 +\<^sub>1 \<infinity>\<^sub>1 = \<bottom>\<^sub>1 [PROOF STEP] by (simp)
{"llama_tokens": 103, "file": "Regular_Algebras_Pratts_Counterexamples", "length": 1}
% Part: first-order-logic % Chapter: tableaux % Section: quantifier-rules \documentclass[../../../include/open-logic-section]{subfiles} \begin{document} \olfileid{fol}{tab}{qrl} \olsection{Quantifier Rules} \subsection{Rules for $\lforall$} \begin{defish} \AxiomC{\sFmla{\True}{\lforall[x][!A(x)]}} \RightLabel{\TR...
{"hexsha": "60158f3b85d68251e086522c9da02ff9959cfbde", "size": 3850, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "content/first-order-logic/tableaux/quantifier-rules.tex", "max_stars_repo_name": "GKerfImf/OpenLogic", "max_stars_repo_head_hexsha": "5791905d3149f68e05885290f448054b98a0e51b", "max_stars_repo_licen...
""" Copyright (c) Facebook, Inc. and its affiliates. """ """This file has functions to implement different dances for the agent. """ import numpy as np import tasks import shapes import search from util import ErrorWithResponse # FIXME! actual jump on client jump = [{"translate": (0, 1, 0)}, {"translate": (0, -1, 0)}...
{"hexsha": "0a646f079abbf0892aa42a6aeba9e5fdf6fd004a", "size": 4760, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/craftassist/dance.py", "max_stars_repo_name": "anoushkt/craftassist", "max_stars_repo_head_hexsha": "c200af65e52e800f0f0cc540fe836b644383349d", "max_stars_repo_licenses": ["MIT"], "max_star...
from zipfile import ZipFile import pandas as pd from scipy.io import savemat def read_filename(filename): with ZipFile(f'../contests/responses/{filename}') as myzip: csv_file = filename.replace('.zip', '') with myzip.open(csv_file) as f: df = pd.read_csv(f, index_col=0) print(df.co...
{"hexsha": "d5d09c3ffe89cec265996de0cbbdba42b3ff8bc0", "size": 823, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/example-analyses/_unused-scripts/dueling-responses.py", "max_stars_repo_name": "kgjamieson/NEXT_data", "max_stars_repo_head_hexsha": "7cbe8080b441fc91e2e8198ec47c750e6517f83f", "max_stars_repo...
""" Train videos are convert into the image frames according to what UCF annotation and readMe. Training models is created if no training has been done before, weights can be loaded from a pretrained model. Training process is done using Faster R-CNN with VGG16 network. The length of each epoch used to do training is 1...
{"hexsha": "45035253616fae9d29c4f2ccd865e036ec60eac6", "size": 16687, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_frcnn.py", "max_stars_repo_name": "piranavie/final_project_behaviour_detection", "max_stars_repo_head_hexsha": "84f91ed240b2be02e6d4ad562c2f4a9a185583e4", "max_stars_repo_licenses": ["MIT"]...
import numpy as np from rlpyt.replays.non_sequence.n_step import (NStepReturnBuffer, SamplesFromReplay) from rlpyt.replays.non_sequence.uniform import UniformReplay from rlpyt.replays.non_sequence.prioritized import PrioritizedReplay from rlpyt.replays.async_ import AsyncReplayBufferMixin from rlpyt.utils.collect...
{"hexsha": "9cf3518a21621c2de17079fae0411364460a5d42", "size": 2318, "ext": "py", "lang": "Python", "max_stars_repo_path": "rlpyt/replays/non_sequence/time_limit.py", "max_stars_repo_name": "cambel/rlpyt", "max_stars_repo_head_hexsha": "96e231d6c77ba5ff06dd09f6e9c8837f0abb1a89", "max_stars_repo_licenses": ["MIT"], "max...
# Copyright 2020 The TensorFlow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
{"hexsha": "69284c726a35484b66a007fd7755ca1de73bc4d4", "size": 4574, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylib/pc/tests/sample_test.py", "max_stars_repo_name": "schellmi42/tensorflow_graphics_point_clouds", "max_stars_repo_head_hexsha": "c8e2dc2963c3eecfb27542449603f81d78494783", "max_stars_repo_lice...
import attr import torch import numpy import pytest import tattr def test_attrib_metadata(): """tattrs are defined by metadata on attrs classes. * Dispatches through ``attr.s`` if the class is not already attr-ed. * Creates __tattr_attrs__ entries for any attribs with "tensor" metadata. * Captures ...
{"hexsha": "8356cb3d8e5d8af4bea2c62a5c4542c006316c51", "size": 2267, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_primitive.py", "max_stars_repo_name": "uw-ipd/tattrs", "max_stars_repo_head_hexsha": "267314a0f315035862392e7ebe35aa15a07549f8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 1 22:54:02 2019 @author: alex """ ############################################################################### import numpy as np ############################################################################### from pyro.control import controlle...
{"hexsha": "d4a3a4a874620c817d936242db12bf7be958bfde", "size": 10885, "ext": "py", "lang": "Python", "max_stars_repo_path": "projects/vehicle_modeling/test_vehicle_controllers.py", "max_stars_repo_name": "simonchamorro/pyro", "max_stars_repo_head_hexsha": "a637d61e1d49b22f178b3889dc0092c9e1704adc", "max_stars_repo_lice...
# Author: Javad Amirian # Email: amiryan.j@gmail.com import glob import os import cv2 import numpy as np def make_bg_image_from_screenshots(im_files): im_sum = None for im_file in im_files: im_i = cv2.imread(im_file) if im_sum is None: im_sum = im_i.astype(np.float) else:...
{"hexsha": "ae75c63549de1f6903f68bbc43516f1f8970610f", "size": 731, "ext": "py", "lang": "Python", "max_stars_repo_path": "opentraj/toolkit/ui/build_background_image.py", "max_stars_repo_name": "fengzileee/OpenTraj", "max_stars_repo_head_hexsha": "71fdfd1e3420d6a3859ae0acaa4acf85abbc1f64", "max_stars_repo_licenses": ["...
base_vals = Base.ImmutableDict(DNA_A=>0,DNA_C=>1,DNA_G=>2,DNA_T=>3) function get_mer_idx(mer,k=5) idx = 0 @turbo for i in 1:k idx = 4*idx + base_vals[mer[i]] end return idx +1 end function count_mers_4_dist(seq,k = 5) counts = zeros(Int,4^k) for mer in each(DNAMer{k}, seq) cur...
{"hexsha": "501468f0da9e27eb03bc3edb0a91dd1ad1289be1", "size": 1700, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/kmers.jl", "max_stars_repo_name": "EvoArt/DenoiseDNA.jl", "max_stars_repo_head_hexsha": "2e4ac9079469ee1cdb87b6d00943a80cfc42f954", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
#ヒルベルト行列のcondition numberを求める import scipy.linalg as linalg import numpy as np from numpy import linalg as LA def calc_hilbert_condition(n): A = np.zeros((n,n)) for i in range(n): for j in range(n): A[i][j] = 1/(i+j+1) print("matrix size =", n) print("condition number is", LA.cond(...
{"hexsha": "47e64602e38677700cc58c1386b798ee9b042d73", "size": 444, "ext": "py", "lang": "Python", "max_stars_repo_path": "Numerical_Analysis/report/5/3.py", "max_stars_repo_name": "yoshi-ki/BACHELOR", "max_stars_repo_head_hexsha": "65d01c62ab2ea4a6d2616a6b6c535bd4f1645630", "max_stars_repo_licenses": ["MIT"], "max_sta...
""" Script for training a Random Forest model on fingerprint representations of molecules. """ import os import warnings import argparse import pandas as pd import numpy as np from rdkit.Chem import MolFromSmiles, AllChem from rdkit import DataStructs from sklearn.model_selection import train_test_split, KFold from ...
{"hexsha": "dc76343107c75e04fe0518fb84c8b8043bceecf5", "size": 4148, "ext": "py", "lang": "Python", "max_stars_repo_path": "morgan_rf.py", "max_stars_repo_name": "wjm41/soapgp", "max_stars_repo_head_hexsha": "ef57cebb7413abb96b54983141e188dff5166d03", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 18, "max_star...
using JuMP, Base.Test, AmplNLWriter # solver = AmplNLSolver(Ipopt.amplexe, ["print_level=0"]) # Note min and max not implemented in Couenne ## Solve test problem with simple min functions # # max min( x^2, x ) # s.t. -0.5 <= x <= 0.5 # # The optimal objective value is 0.25. # x = 0.5 ## @testset "ex...
{"hexsha": "7b6acf14fc4229e002d426a72c968d487f96df0f", "size": 1046, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/jump_maxmin.jl", "max_stars_repo_name": "tkoolen/AmplNLWriter.jl", "max_stars_repo_head_hexsha": "c3ab02096a96122bcad0b04067990611d0492c41", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import unittest import numpy as np import scipy.signal as signal import filterdesigner.FIRDesign as FIRDesign class TestSgolay(unittest.TestCase): def setUp(self): self.order = 4 self.framelen = 21 def test_sgolay(self): # Test case for sgolay FIR = FIRDesign.sgolay...
{"hexsha": "54781c1d046004ccf0c543f27cce945aebe6cde7", "size": 470, "ext": "py", "lang": "Python", "max_stars_repo_path": "filterdesigner/tests/test_sgolay.py", "max_stars_repo_name": "Yuki-F-HCU/filterdesigner", "max_stars_repo_head_hexsha": "bb735d507da0338b2925f84e54df091ce1c32f95", "max_stars_repo_licenses": ["BSD-...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # IkaLog # ====== # Copyright (C) 2015 Takeshi HASEGAWA # # 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/l...
{"hexsha": "2cb0b2643c54666ea12f68aac59d2f25aff15d14", "size": 6084, "ext": "py", "lang": "Python", "max_stars_repo_path": "ikalog/inputs/win/videoinput_wrapper.py", "max_stars_repo_name": "fetus-hina/IkaLog", "max_stars_repo_head_hexsha": "bd476da541fcc296f792d4db76a6b9174c4777ad", "max_stars_repo_licenses": ["Apache-...
#!/usr/bin/env python3 import json import models import utils import argparse,random,logging,numpy,os import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from torch.autograd import Variable from torch.utils.data import DataLoader from torch.nn.utils import clip_grad_norm from time im...
{"hexsha": "44aac7340455240cb503034c9a8a3f6e30c2d7a8", "size": 13614, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "hyunbool/SummaRuNNer", "max_stars_repo_head_hexsha": "2a9fe75fa9d47bd13b2143ecb3f1acb65a11d701", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
import numpy as np import tensorflow as tf import os import pickle import random from generator import Generator from mobilenet import MobileNet from PIL import Image EMB_DIM = 300 # embedding dimension HIDDEN_DIM = 300 # hidden state dimension of lstm cell SEQ_LENGTH = 12 # sequence length START_TOKEN = 0...
{"hexsha": "db04d435881721649befc2aad7bc8a6de345bdba", "size": 2424, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "GeneZC/AlphaPoet", "max_stars_repo_head_hexsha": "82715e9cc36aedfa78c250a7a7f8129669eea440", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9, "max_stars_...
import torch from torch import nn, einsum import numpy as np from einops import rearrange, repeat import torch.nn.functional as F def number_parameters(Net, type_size=8): para = sum([np.prod(list(p.size())) for p in Net.parameters()]) return para / 1024 * type_size / 1024 class Residual_Connection(nn.Module...
{"hexsha": "c0e92d44a97df35eef7e4d29a2ddbd1ba194c217", "size": 5833, "ext": "py", "lang": "Python", "max_stars_repo_path": "method/model.py", "max_stars_repo_name": "XinghuaMa/TR-Net", "max_stars_repo_head_hexsha": "879c32e130df668636a27ce5cb5e5d76cf90de66", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12, "m...
#Show which groups fit very poorly at the site levelbut fit well in sample. rm(list=ls()) source('paths.r') #set output path.---- output.path <- 'Supp._Fig._3._bad_out.of.sample_fits.png' #load data.---- #grab prior fits. prior <- readRDS(ted_ITS_prior_all.groups_JAGSfits.path) #all phylo and functional groups. #grab...
{"hexsha": "1106301115f2d052e53419cc760a101d5345e60d", "size": 4300, "ext": "r", "lang": "R", "max_stars_repo_path": "to_retire/Supp._Fig._3._bad_out.of.sample_fits.r", "max_stars_repo_name": "colinaverill/NEFI_microbe", "max_stars_repo_head_hexsha": "e59ddef4aafcefdf0aff61765a8684859daad6e0", "max_stars_repo_licenses"...
""" ------------------------------------------------------- helper a couple of helper functions ------------------------------------------------------- Author: Dallas Fraser ID: 110242560 Email: fras2560@mylaurier.ca Version: 2014-09-10 ------------------------------------------------------- """ import networkx...
{"hexsha": "9d81f6ebf5d50aa404086d76b76a02f69d588483", "size": 7579, "ext": "py", "lang": "Python", "max_stars_repo_path": "inducer/helper.py", "max_stars_repo_name": "fras2560/InducedSubgraph", "max_stars_repo_head_hexsha": "be06a444a2ef0d244831ee74152a8ef2711cdbe3", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# ========== Transforms On A Group Of Signals ========== # ----- SDWT on a set of signals ----- """ sdwtall(x, wt[, L]) Computes the stationary discrete wavelet transform (SDWT) on each slice of signal. # Arguments - `x::AbstractArray{T} where T<:Number`: Input `N-1`-D signals, where each signal is sliced at di...
{"hexsha": "28e9139efecfe62d1d6954a0cd7f1af0ab99e7aa", "size": 10649, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/mod/swt_all.jl", "max_stars_repo_name": "UCD4IDS/WaveletsExt.jl", "max_stars_repo_head_hexsha": "cfde3ae0cea370b7da0e8d5723f0793bb87beb68", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
""" GANTT Chart with Matplotlib Sukhbinder Inspired from <div class="embed-theclowersgroup"><blockquote class="wp-embedded-content"><a href="http://www.clowersresearch.com/main/gantt-charts-in-matplotlib/">Gantt Charts in Matplotlib</a></blockquote><script type="text/javascript"><!--//--><![CDATA[//><!-- !functi...
{"hexsha": "6376cb1af729c668f9be0d3da4ca2a2fe3fbe64d", "size": 4817, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/gantt.plot.py", "max_stars_repo_name": "jackmo375/Planner2", "max_stars_repo_head_hexsha": "61bf816113fbd31604c5bd5d686c62d4f3764892", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
# -*- coding: utf-8 -*- """Simulation Task3.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1hujTQ6qyEX9-NPn1bD_p4D8ZpGZ0t7rw """ from collections import deque import pandas as pd import numpy as np import scipy.stats as st import matplotlib.pypl...
{"hexsha": "4a5004dfb8a58465aa5037c6002089fdbcadaeef", "size": 10781, "ext": "py", "lang": "Python", "max_stars_repo_path": "Simulation Task/Task 3/simulation_task3.py", "max_stars_repo_name": "ayush-bisht/IoT-Analytics", "max_stars_repo_head_hexsha": "edd41f9fe6749e7d7b0ce5b15f0e7b7e0db3e66a", "max_stars_repo_licenses...
#!/usr/bin/env python import rospy import sys import numpy as np import math from geometry_msgs.msg import Vector3 from std_msgs.msg import Float64 from dynamixel_msgs.msg import JointState PI = 3.14159265359 class TiltController: def __init__(self): # Create the Subscriber recive degree and publish i...
{"hexsha": "427f2f48bd507d97a3166970f7fdee55099f75fe", "size": 1854, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/platform_controller/scripts/tiltController.py", "max_stars_repo_name": "ahmohamed1/activeStereoVisionPlatform", "max_stars_repo_head_hexsha": "6c928ca242e4de68c7b15a8748bff1d9f7fa1382", "max_s...
""" AbstractInput Abstract supertype for all input types. ### Notes The input types defined here implement an iterator interface, such that other methods can build upon the behavior of inputs which are either constant or varying. Iteration is supported with an index number called *iterator state*. The iteration...
{"hexsha": "2dfd8441c471ea6546d92e87e0704f03c1437e42", "size": 5233, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/inputs.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/MathematicalSystems.jl-d14a8603-c872-5ed3-9ece-53e0e82e39da", "max_stars_repo_head_hexsha": "af916edc33ab9d27f064a8be5c96a5cb9...
import numpy as np from .PSpecCls import PSpecCls def CombinePSpecCls(A): ''' Combine an array/list/tuple of SpecCls objects into a single one. This assumes that all axis labels and stuff are identical. Input ===== A : array/list/tuple Each element should be a SpecCls object Returns ======= SpecCls ...
{"hexsha": "64b5f47f0c6ff572589715a588d4e0089330d85c", "size": 958, "ext": "py", "lang": "Python", "max_stars_repo_path": "Arase/Tools/CombinePSpecCls.py", "max_stars_repo_name": "mattkjames7/Arase", "max_stars_repo_head_hexsha": "996167be35a13bbb1fdddfbe75e3a06d124b1d25", "max_stars_repo_licenses": ["MIT"], "max_stars...
#import uuid import argparse import glob import os import tifffile import numpy as np #Example usage: #python im2npy.py --source_dir="C:\Users\PROCOMP11-PC\Desktop\PanColorGAN\PanColorGAN-master\PanColorGAN-master\dataset\PAN\tif" --save_to="C:\Users\PROCOMP11-PC\Desktop\PanColorGAN\PanColorGAN-master\PanColo...
{"hexsha": "3fcef12abdb6d6a1ba10b2c5b9846a2e8cb5521a", "size": 2137, "ext": "py", "lang": "Python", "max_stars_repo_path": "Script/im2npy.py", "max_stars_repo_name": "ataozarslan/GEO_tutorial", "max_stars_repo_head_hexsha": "c02c8bcfbdf89deabaaea259195e57d669ad3f69", "max_stars_repo_licenses": ["Unlicense"], "max_stars...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- from numpy import array def dY_dt(Y,t,p): return array([ (- p[0] * Y[0]) * ( k__mCLN ), (p[10] * p[1] * Y[0]/p[11] * Y[2]) * ( k__Cln_plus ) - (p[2] * Y[1]) * ( k__Cln_minus ), (p[6] * p[10] * Y[5]/p[11] * (p[3]/(p[3]+p[4]+p[5])) * Y[2]) * ( k__B_R ), (p[6] * p...
{"hexsha": "da19b9f9f504b02a89227a8caf4a88f34d1ac17a", "size": 674, "ext": "py", "lang": "Python", "max_stars_repo_path": "core_eq_system_w_modifiers.py", "max_stars_repo_name": "thomasspiesser/MYpop", "max_stars_repo_head_hexsha": "aa26659af75e99189e77c4f4e046985e536918b1", "max_stars_repo_licenses": ["MIT"], "max_sta...
function fill_cpmodel!(optimizer::Optimizer) # Adding variables bridge_variables!(optimizer) # Adding affine functions bridge_affines!(optimizer) # Adding constraints bridge_constraints!(optimizer) # Adding objective bridge_objective!(optimizer) optimizer end ...
{"hexsha": "8c88f56f3b1b107d908edb9b6dea41154ceb8a9c", "size": 4792, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/MOI_wrapper/homemade_bridging.jl", "max_stars_repo_name": "pitmonticone/SeaPearl.jl", "max_stars_repo_head_hexsha": "0c0ca5ec5cce81515acd202ea2d87c985c0c3fea", "max_stars_repo_licenses": ["BSD-...
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Polyhedron_3.h> #include <CGAL/point_generators_3.h> #include <CGAL/Side_of_triangle_mesh.h> #include <vector> #include <fstream> #include <limits> #include <boost/foreach.hpp> typedef CGAL::Exact_predicates_inexact_constructions_kernel K...
{"hexsha": "ca3e886360f6e61ac57163cbf27fbeabf1a1cfa8", "size": 2103, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "ext/libigl/external/cgal/src/CGAL_Project/examples/Polygon_mesh_processing/point_inside_example.cpp", "max_stars_repo_name": "liminchen/OptCuts", "max_stars_repo_head_hexsha": "cb85b06ece3a6d1279863...
(* *********************************************************************) (* *) (* The Compcert verified compiler *) (* *) (* Xavier Leroy...
{"author": "PrincetonUniversity", "repo": "compcomp", "sha": "eebb7d5a95fed97775cef7f014399be78abbe7bf", "save_path": "github-repos/coq/PrincetonUniversity-compcomp", "path": "github-repos/coq/PrincetonUniversity-compcomp/compcomp-eebb7d5a95fed97775cef7f014399be78abbe7bf/backend/CSEproof_comp.v"}
# -*- coding: utf-8 -*- from abc import ABC, abstractmethod from typing import Callable, NamedTuple, Set import numpy as np from sktime.distances.base._types import DistanceCallable class NumbaDistance(ABC): """Abstract class to define a numba compatible distance metric.""" def distance(self, x: np.ndarray...
{"hexsha": "e7e836639eab0646d004fa5ca3040d4c4005af05", "size": 4653, "ext": "py", "lang": "Python", "max_stars_repo_path": "sktime/distances/base/_base.py", "max_stars_repo_name": "Tomiiwa/sktime", "max_stars_repo_head_hexsha": "9c7600287e7d52556784a3da3a3c83f1a7499610", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
# Removing t = 0, such that Σ is invertible t = Vector(0.1:0.1:100); p = 2; # Creating generators U,V that result in a positive-definite matrix Σ Ut, Vt = spline_kernel(t', p) K = SymEGRQSMatrix(Ut,Vt,ones(size(Ut,2))) x = randn(size(K,1)) Kfull = Matrix(K) # Testing multiplication @test K*x ≈ Kfull*x @test K'*x ≈ K...
{"hexsha": "49273cf24d083419a905d24b55e3e9bb3361ba79", "size": 624, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_SymEGRQSMatrix.jl", "max_stars_repo_name": "mipals/SymEGRSSMatrices", "max_stars_repo_head_hexsha": "67e59dfc74c692ca13ce603385cf1af2e6742e56", "max_stars_repo_licenses": ["MIT"], "max_sta...
import .brown universes v u open category_theory local notation f ` ∘ `:80 g:80 := g ≫ f namespace homotopy_theory.cofibrations open precofibration_category cofibration_category open homotopy_theory.weak_equivalences variables {C : Type u} [category.{v} C] [cofibration_category.{v} C] [has_initial_object.{v} C] ...
{"author": "rwbarton", "repo": "lean-homotopy-theory", "sha": "39e1b4ea1ed1b0eca2f68bc64162dde6a6396dee", "save_path": "github-repos/lean/rwbarton-lean-homotopy-theory", "path": "github-repos/lean/rwbarton-lean-homotopy-theory/lean-homotopy-theory-39e1b4ea1ed1b0eca2f68bc64162dde6a6396dee/src/homotopy_theory/formal/cofi...
import cv2 import os import sys import pickle import numpy as np from PIL import Image sys.path.insert(0, '/Workspace-Github/face_recognition/code') import opencv_tools import keras from keras.callbacks import ModelCheckpoint from keras.models import Sequential from keras.layers import Dense, Conv2D, MaxPooling2D, Drop...
{"hexsha": "682d443793dbb88e8d42967168fcba44bce7a690", "size": 3419, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/CNN_tools.py", "max_stars_repo_name": "yc930401/face_recognition", "max_stars_repo_head_hexsha": "475b9d8766bd76657d83f899e77d2688694fd010", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
[STATEMENT] lemma classes_above_ifields: "\<lbrakk> classes_above P C \<inter> classes_changed P P' = {} \<rbrakk> \<Longrightarrow> ifields P C = ifields P' C" [PROOF STATE] proof (prove) goal (1 subgoal): 1. classes_above P C \<inter> classes_changed P P' = {} \<Longrightarrow> ifields P C = ifields P' C [PROOF ...
{"llama_tokens": 140, "file": "Regression_Test_Selection_JinjaSuppl_ClassesAbove", "length": 1}
import numpy as np import cv2 import glob import matplotlib.pyplot as plt import matplotlib.image as mpimg %matplotlib qt def camera_calibration(): nx=9 ny=6 # prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0) objp = np.zeros((ny*nx,3), np.float32) objp[:,:2] = np.mgrid[0:nx, 0:ny].T.reshape(-1,2...
{"hexsha": "6697d640a63867bd713984669d124db7e22dfae0", "size": 14871, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/pipeline.py", "max_stars_repo_name": "PrabhaSNR/ND_Project2_AdvancedLaneFinding", "max_stars_repo_head_hexsha": "e303d71a0c071b0042b72cefe0cedf525d42b407", "max_stars_repo_licenses": ["M...
// Copyright (C) 2014, Pawel Tomulik <ptomulik@meil.pw.edu.pl> // // 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) #define BOOST_TEST_MODULE test_tml_xxx #include <boost/test/unit_test.hpp> #include <yaul/tml/xxx...
{"hexsha": "cba9ec16486e263c471614f7160ba7ef754c0f36", "size": 378, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "template/unit_test.cpp", "max_stars_repo_name": "ptomulik/yaul-tml", "max_stars_repo_head_hexsha": "2b8bf3f88742996bd8199375678cdebd6e3206d9", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2021 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 # # Unl...
{"hexsha": "b92eaac994e1c1dd55b3a92f47b0702a6a3cf561", "size": 7315, "ext": "py", "lang": "Python", "max_stars_repo_path": "neural_compressor/adaptor/tf_utils/graph_rewriter/generic/fold_constant.py", "max_stars_repo_name": "kevinintel/neural-compressor", "max_stars_repo_head_hexsha": "b57645566aeff8d3c18dc49d2739a583c...
## @ingroup Methods-Flight_Dynamics-Static_Stability-Approximations-Supporting_Functions # extend_to_ref_area.py # # Created: Mar 2014, T. Momose # Modified: Jan 2016, E. Botero # ---------------------------------------------------------------------- # Imports # ------------------------------------------------------...
{"hexsha": "1c4d108d3bdbcac2b7a8970a73d48ccc520c47ae", "size": 4404, "ext": "py", "lang": "Python", "max_stars_repo_path": "SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Flight_Dynamics/Static_Stability/Approximations/Supporting_Functions/extend_to_ref_area.py", "max_stars_repo_name": "Vinicius-Tanigawa/Undergraduate-Research-...
from __future__ import print_function import numpy as np import theano import theano.tensor as T import lasagne import time import random import argparse import re import glob import sys import os import copy # import matplotlib.pyplot as plt from helpers.data_handling import DataHandler from helpers import evaluation...
{"hexsha": "a17c50ac45f32c0d93d272ac943c5121b5859b56", "size": 6018, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "Kanika91/sequence-based-recommendations_clone", "max_stars_repo_head_hexsha": "73adddf747f1e3d986d7321c3567ee069f7b248b", "max_stars_repo_licenses": ["MIT"], "max...
module HardTestProblems import BSON import Statistics: mean # Multiobjective problems include("Multiobjective/RW_MOP_2021/RW_MOP_2021.jl") include("Singleobjective/CEC2020/CEC2020.jl") include("Bilevel/SMD/SMD.jl") include("Bilevel/PMM/PMM.jl") end
{"hexsha": "019e8b2cee4815602dca454136fd71f1fd86384f", "size": 253, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/HardTestProblems.jl", "max_stars_repo_name": "jmejia8/HardTestProblems.jl", "max_stars_repo_head_hexsha": "cde9e6c654f046fc8b9f01a434f7b213a0fab182", "max_stars_repo_licenses": ["MIT"], "max_sta...
#ifndef MSRP_MESSAGE_HXX #define MSRP_MESSAGE_HXX #include <map> #include <ostream> #include <string> #include <boost/shared_ptr.hpp> #include <asio/buffer.hpp> #include <rutil/Data.hxx> #include "msrp/Header.hxx" #include "msrp/ParseException.hxx" namespace msrp { namespace parser { struct Message; } class Mes...
{"hexsha": "73f489d72933b5026f3d82b0b586fab8b94f673a", "size": 7394, "ext": "hxx", "lang": "C++", "max_stars_repo_path": "Message.hxx", "max_stars_repo_name": "cbond/msrp", "max_stars_repo_head_hexsha": "d498f1ac8848319f4ecb617ad251e76de827a9a2", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": null, "max_sta...
#!/usr/bin/env python """Show an example of how to re-sample high-pass DT-CWT coefficients. """ import os import dtcwt import dtcwt.compat import dtcwt.sampling # Use an off-screen backend for matplotlib import matplotlib matplotlib.use('agg') # Import numpy and matplotlib's pyplot interface import numpy as np from...
{"hexsha": "36eb2a369bf334a667e8a4805659beebe9c62845", "size": 2376, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/resampling_highpass_coefficients.py", "max_stars_repo_name": "santosh653/dtcwt", "max_stars_repo_head_hexsha": "01d9e87dc9abfa244a89c1f05aebf3dec6999f3a", "max_stars_repo_licenses": ["BSD...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Functions for plotting. :copyright: 2015 Agile Geoscience :license: Apache 2.0 """ import csv import os import numpy as np import matplotlib.pyplot as plt import matplotlib.transforms as transforms from striplog import Legend import utils from notice import Notice ...
{"hexsha": "5f16da6e5d48c447fcd54440348594a3b5af85a4", "size": 10843, "ext": "py", "lang": "Python", "max_stars_repo_path": "feature_plot.py", "max_stars_repo_name": "hyperiongeo/geotransect", "max_stars_repo_head_hexsha": "559c4c2fec4b628d8f156e0b0b6d7cdb36323d64", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
Davis Housing: The Print Edition is a free publication listing most/all of the commercial apartments available for lease. It is nicely laid out, lists the amenities, floor plan, map location, and rates for each apartment complex. You should also check out their website. It can be found at the west entrance to the Cof...
{"hexsha": "ddd39a6a0ac97389c451efd429f0094d1adf0f90", "size": 541, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Davis_Housing.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
/*! \file \brief A JSON parser. Copyright (C) 2019-2021 kaoru https://www.tetengo.org/ */ #include <cassert> #include <cstddef> #include <cstdint> #include <filesystem> #include <iterator> #include <memory> #include <optional> #include <stdexcept> #include <string> #include <string_view> #inc...
{"hexsha": "8222045da230412a82821c016131165a14685d0d", "size": 14545, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "library/property/cpp/src/tetengo.property.json_parser.cpp", "max_stars_repo_name": "kaorut/tetengo", "max_stars_repo_head_hexsha": "3360cce3e3f4c92b18154927685986c1fa7b4e8e", "max_stars_repo_licens...
import numpy from keras.utils import np_utils from tensorflow.keras.callbacks import ModelCheckpoint from tensorflow.keras.layers import Activation from tensorflow.keras.layers import BatchNormalization as BatchNorm from tensorflow.keras.layers import Dense from tensorflow.keras.layers import Dropout from tensorflow.ke...
{"hexsha": "03a2afde1c86566aad4d8f2c0b7aa01759904edd", "size": 4059, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/lstm.py", "max_stars_repo_name": "ilyamirin/OrganGrinder", "max_stars_repo_head_hexsha": "7cff1a399d1439a06ee0ba90428a6542ebddb966", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
from qtpy import QtCore from qtpy.QtWidgets import QApplication import numpy as np from ..table_dictionary.table_dictionary_handler import TableDictionaryHandler from ..fitting.initialization_sigma_alpha import InitializationSigmaAlpha # from iBeatles.py.utilities.math_tools import calculate_inflection_point class...
{"hexsha": "c83eb3030e4058f37b80dc87a71f14bbc4c1d9ac", "size": 10304, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/iBeatles/fitting/fitting_initialization_handler.py", "max_stars_repo_name": "ornlneutronimaging/iBeatles", "max_stars_repo_head_hexsha": "0a6ca1e18780cf08ad97b6cedede5a23f52bc953", "max_stars...
[STATEMENT] lemma length_filtermap: "length (filtermap pred func tr) \<le> length tr" [PROOF STATE] proof (prove) goal (1 subgoal): 1. length (Filtermap.filtermap pred func tr) \<le> length tr [PROOF STEP] proof(induction tr) [PROOF STATE] proof (state) goal (2 subgoals): 1. length (Filtermap.filtermap pred func []) ...
{"llama_tokens": 485, "file": "Bounded_Deducibility_Security_Filtermap", "length": 5}
import numpy as np import pandas as pd import os import sys sys.path.append('/home/akagi/github/RIPS_kircheis/RIPS') import rect_grid import cable acsr = [ u'Bittern', u'Bluebird', u'Bluejay', u'Bobolink', u'Bunting', u'Canary', u'Cardinal', u'Chickadee', u'Chukar', u'Cochin', u'Co...
{"hexsha": "acbb5fa68751148bd155dd5cc6294affcca6fcd7", "size": 8433, "ext": "py", "lang": "Python", "max_stars_repo_path": "temporary/cable_range_test.py", "max_stars_repo_name": "mdbartos/RIPS", "max_stars_repo_head_hexsha": "ab654138ccdcd8cb7c4ab53092132e0156812e95", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <cblas.h> int main() { //set up some data int n=300; float* x = malloc( n*sizeof(float) ); float* y = malloc( n*sizeof(float) ); for( int i=0; i<n; ++i ) { x[i]=i+1; y[i]=(i+1)*(i+1); } //calculate y = a...
{"hexsha": "332dd426b29eb4769788ff7b848bb5a5a6ef44d7", "size": 807, "ext": "c", "lang": "C", "max_stars_repo_path": "src/CBLAS/test/tstCBLAS.c", "max_stars_repo_name": "murraypurves/BootsOnTheGround", "max_stars_repo_head_hexsha": "15acc4ed064e368f6af5114408f1be8a62749f32", "max_stars_repo_licenses": ["MIT"], "max_star...
import glob import os import os.path as osp import cv2 import random import numpy as np dst = 'sampled_images_test_1' os.system('mkdir %s' % dst ) maxNum =3 with open('test.txt', 'r') as fIn: testScenes = fIn.readlines() testScenes = [x.strip() for x in testScenes ] dirs = glob.glob('main*_xml1') cnt =...
{"hexsha": "20ed97ca2b00814a5d094a2cfed741433e3e7147", "size": 1338, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils_OR/DatasetCreation/copyImages.py", "max_stars_repo_name": "Jerrypiglet/Total3DUnderstanding", "max_stars_repo_head_hexsha": "655d00a988c839af3b73f8ab890c3f70c1500147", "max_stars_repo_licens...
// This file is auto-generated, don't edit it. Thanks. #include <alibabacloud/yundun_dbaudit_20180320.hpp> #include <alibabacloud/endpoint_util.hpp> #include <alibabacloud/open_api.hpp> #include <boost/any.hpp> #include <boost/throw_exception.hpp> #include <darabonba/core.hpp> #include <darabonba/util.hpp> #include <i...
{"hexsha": "778eb8c5be6375ad91838ceec324dbe09dab9ba9", "size": 114741, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "yundun-dbaudit-20180320/src/yundun_dbaudit_20180320.cpp", "max_stars_repo_name": "aliyun/alibabacloud-cpp-sdk", "max_stars_repo_head_hexsha": "0e7c0576abcd4ef1aef07d714b92654deb713c36", "max_stars...
# standard library imports import sys import os from os import path # third party import numpy as np # local application imports sys.path.append(path.dirname( path.dirname( path.abspath(__file__)))) from .base_lot import Lot from utilities import * class Orca(Lot): def run(self,geom,multiplicity): ...
{"hexsha": "7cb118173279e42eee0f72b122f3c3038cc38123", "size": 4358, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygsm/level_of_theories/orca.py", "max_stars_repo_name": "espottesmith/pyGSM", "max_stars_repo_head_hexsha": "5bf263f9ef6cbee3ec16355c5eb1839446e704e7", "max_stars_repo_licenses": ["MIT"], "max_st...
[STATEMENT] lemma mod_less_diff_mod: " \<lbrakk> n mod m < r; r \<le> m; r \<le> (n::nat) \<rbrakk> \<Longrightarrow> (n - r) mod m = m + n mod m - r" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>n mod m < r; r \<le> m; r \<le> n\<rbrakk> \<Longrightarrow> (n - r) mod m = m + n mod m - r [PROOF STEP] ...
{"llama_tokens": 442, "file": "List-Infinite_CommonArith_Util_Div", "length": 4}
/** * @file fsareasearch.cpp * @brief Floater to search and list objects in view or is known to the viewer. * * $LicenseInfo:firstyear=2012&license=viewerlgpl$ * Phoenix Firestorm Viewer Source Code * Copyright (c) 2012 Techwolf Lupindo * * This library is free software; you can redistribute it and/or * modify...
{"hexsha": "6b70748d4831a518c7fe84b4c224a1edcae68a9d", "size": 70811, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "indra/newview/fsareasearch.cpp", "max_stars_repo_name": "SaladDais/LLUDP-Encryption", "max_stars_repo_head_hexsha": "8a426cd0dd154e1a10903e0e6383f4deb2a6098a", "max_stars_repo_licenses": ["ISC"], "...
From Coq Require Import List. From Coq Require Import Morphisms. From Coq Require Import PArith. From Coq Require Import Permutation. From Coq Require Import Psatz. From Coq Require Import SetoidTactics. From Coq Require Import Field. From Coq Require Import ZArith. From Coq Require Import Znumtheory. From Bignums Requ...
{"author": "malthelange", "repo": "CLVM", "sha": "e80aef02c3112b5b62db79bc2b233020367b0bde", "save_path": "github-repos/coq/malthelange-CLVM", "path": "github-repos/coq/malthelange-CLVM/CLVM-e80aef02c3112b5b62db79bc2b233020367b0bde/execution/theories/Examples/BoardroomMath.v"}
"""These are statistical tests for the Infrequent sampling results.""" import numpy as np from scipy.optimize import curve_fit from scipy.stats import ks_2samp from scipy import stats import pandas as pd def perform_ks_analysis(dataframe): """ Perform the KS Test and determines statistics. Parameters: ...
{"hexsha": "f127d3153c50ab6d07dcc90115dd9cf1a0dcad06", "size": 4747, "ext": "py", "lang": "Python", "max_stars_repo_path": "LimPy/statistical_functions.py", "max_stars_repo_name": "UWPRG/LimPy", "max_stars_repo_head_hexsha": "2a2979306ec4264de31d5ce1d2f8a59bd6eb7e9c", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_s...
# ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ # MIT License # # Copyright (c) 2022 Nathan Juraj Michlo # # 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 Softwar...
{"hexsha": "eb079949b0e969ef600853562d4788e8c3a93d0f", "size": 26147, "ext": "py", "lang": "Python", "max_stars_repo_path": "research/part04_application_to_rl/e01_learn_xy_representations/train_vae.py", "max_stars_repo_name": "nmichlo/msc-research", "max_stars_repo_head_hexsha": "625e57eca77bbfbc4728ccebdb0733e1613bd25...
/***************************************************************************** * * This file is part of Mapnik (c++ mapping toolkit) * * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
{"hexsha": "19b6db245ef0e23ac0407e987d1b688afbf7de34", "size": 2060, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "external/include/mapnik/datasource_cache.hpp", "max_stars_repo_name": "Wujingli/OpenWebGlobeDataProcessing", "max_stars_repo_head_hexsha": "932eaa00c81fc0571122bc618ade010fa255735e", "max_stars_repo...
print('Loading...') import numpy as np import numpy as num from statistics import mean import matplotlib.pyplot as plt import aubio import pyaudio import wave import os def wavelength_to_rgb(wavelength, gamma=0.8): '''This converts a given wavelength of light to an approximate RGB color value. The wavelen...
{"hexsha": "d816b2e9a2f34bb891acee10098413128598c3f4", "size": 3288, "ext": "py", "lang": "Python", "max_stars_repo_path": "pitch_plotting.py", "max_stars_repo_name": "Animenosekai/AudioVisualization.py", "max_stars_repo_head_hexsha": "6742388a564883532188c9b720a491b561134bae", "max_stars_repo_licenses": ["MIT"], "max_...
#include <stan/math/prim/scal.hpp> #include <boost/math/special_functions/digamma.hpp> #include <gtest/gtest.h> #include <cmath> #include <limits> TEST(MathFunctions, digamma) { EXPECT_FLOAT_EQ(boost::math::digamma(0.5), stan::math::digamma(0.5)); EXPECT_FLOAT_EQ(boost::math::digamma(-1.5), stan::math::digamma(-1....
{"hexsha": "20acf1aba327c39bc09d49c6e384f279a4326482", "size": 589, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/unit/math/prim/scal/fun/digamma_test.cpp", "max_stars_repo_name": "christophernhill/math", "max_stars_repo_head_hexsha": "dc41aba296d592c7099be15eed6ba136d0f140b3", "max_stars_repo_licenses": ["...
from PIL import Image import numpy as np from GrayScale import GrayScale from matplotlib import pyplot as plt def GaussianBlur(img, window_size = 3, sigma = 0.5): """ Performs a Blurring operation on the input grayscale image using the Normalized Gaussian Kernel. Input: numpy array of grayscale image ...
{"hexsha": "b149d60c22972ba766b62feafd256d6c6439bedc", "size": 1536, "ext": "py", "lang": "Python", "max_stars_repo_path": "GaussianBlur.py", "max_stars_repo_name": "saurabh1002/Computer_Vision_Python", "max_stars_repo_head_hexsha": "83feee97082bf09ddbd3d79ff546d9d545c3c8ed", "max_stars_repo_licenses": ["MIT"], "max_st...
import sys import numpy as np from MCEq.misc import theta_rad import mceq_config as config class EarthGeometry(object): r"""A model of the Earth's geometry, approximating it by a sphere. The figure below illustrates the meaning of the parameters. .. figure:: graphics/geometry.* :scale: 30 % ...
{"hexsha": "9f8f7e55a5b978802a081784dabd7196e7c53257", "size": 7994, "ext": "py", "lang": "Python", "max_stars_repo_path": "MCEq/geometry/geometry.py", "max_stars_repo_name": "joheinze/MCEq", "max_stars_repo_head_hexsha": "7f10aae90d1714997216edcf82a099628d1ff3c6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import cv2 import time import argparse import torch import torchvision import numpy as np from torch.utils.data import DataLoader from dataset.datasets import WLFWDatasets from models.pfld import PFLDbackbone, AuxiliaryNet, PFLDLoss def validate(wlfw_val_dataloader, pl...
{"hexsha": "de13d3bcd16b424a616b6216dcae76159904bb66", "size": 3889, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "Ontheway361/pfld-pytorch", "max_stars_repo_head_hexsha": "7c967623b930eba312d092519d804a103332a38a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "ma...
theory ITree_Iteration imports ITree_Divergence ITree_Deadlock begin subsection \<open> Iteration \<close> text \<open> For now we support only basic tail-recursive iteration. \<close> corec iterate :: "('s \<Rightarrow> bool) \<Rightarrow> ('e, 's) htree \<Rightarrow> ('e, 's) htree" where "iterate b P s = (if (b...
{"author": "isabelle-utp", "repo": "interaction-trees", "sha": "90510d119364f534d2ab61daf2f274060f0a040e", "save_path": "github-repos/isabelle/isabelle-utp-interaction-trees", "path": "github-repos/isabelle/isabelle-utp-interaction-trees/interaction-trees-90510d119364f534d2ab61daf2f274060f0a040e/ITree_Iteration.thy"}
[STATEMENT] lemma del_bal: assumes "k > 0" and "root_order k t" and "bal t" shows "bal (del k x t)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. bal (del k x t) [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: 0 < k root_order k t bal t goal (1 subgoal): 1. bal (del k x t) [PROOF STE...
{"llama_tokens": 8017, "file": "BTree_BPlusTree_Set", "length": 66}
#!/usr/bin/env python3 import numpy as np import cv2 import face_recognition import sys from multiprocessing import Queue from multiprocessing.managers import SyncManager from queue import Queue as ImageQueue from pylibfreenect2 import Freenect2, SyncMultiFrameListener from pylibfreenect2 import FrameType, Registrati...
{"hexsha": "e89753a08f5c6f06d3fad38c5c20bb8818c9b58d", "size": 3881, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/pure_face_tracking.py", "max_stars_repo_name": "J-Pai/408DaisyJetson", "max_stars_repo_head_hexsha": "a873154325c790303f09ecfc03377066751cd601", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np from matplotlib import pyplot import qutip delta = 0.2 * 2*np.pi eps0 = 0.0 * 2*np.pi omega = 1.0 * 2*np.pi A_vec = np.linspace(0, 10, 100) * omega T = 2*np.pi/omega tlist = np.linspace(0.0, 10 * T, 101) psi0 = qutip.basis(2, 0) q_energies = np.zeros((len(A_vec), 2)) H0 = delta/2.0 * quti...
{"hexsha": "5781e829910948807e4174030b31d5648f267eb9", "size": 851, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/guide/scripts/floquet_ex0.py", "max_stars_repo_name": "camponogaraviera/qutip", "max_stars_repo_head_hexsha": "1b1f6dffcb3ab97f11b8c6114293e09f378d2e8f", "max_stars_repo_licenses": ["BSD-3-Clau...
#!/usr/bin/env python3 """ https://www.mathworks.com/help/control/ref/parallel.html https://www.mathworks.com/help/control/ref/feedback.html https://www.mathworks.com/help/control/ref/series.html Transfer functions applys to LTI systems and is defined as H(s) = Y(s)/X(s) (output/input) in the laplace domain In the ...
{"hexsha": "efdb438a4502f760cd21ed3fe79ecc509bdf60c6", "size": 1631, "ext": "py", "lang": "Python", "max_stars_repo_path": "math/controls/tfchain.py", "max_stars_repo_name": "qeedquan/misc_utilities", "max_stars_repo_head_hexsha": "94c6363388662ac8ebbf075b9c853ce6defbb5b3", "max_stars_repo_licenses": ["MIT"], "max_star...
import sys import numpy import powerbox from matplotlib import pyplot from radiotelescope import RadioTelescope from skymodel import SkyRealisation from radiotelescope import ideal_gaussian_beam from generaltools import from_lm_to_theta_phi from generaltools import colorbar import matplotlib.colors as colors from sci...
{"hexsha": "f4579b33ecea5d3e837232156bf76015e08fc6da", "size": 12112, "ext": "py", "lang": "Python", "max_stars_repo_path": "approximations/baseline_participation_weights.py", "max_stars_repo_name": "ronniyjoseph/Beam-Perturbations", "max_stars_repo_head_hexsha": "0122fed7e3018f2e188e12b62ad760e11f6eb158", "max_stars_r...
""" Helpers for randomized testing """ from sympy import I, nsimplify, S, Tuple, Dummy from random import uniform def random_complex_number(a=2, b=-1, c=3, d=1, rational=False): """ Return a random complex number. To reduce chance of hitting branch cuts or anything, we guarantee b <= Im z <= d, a <= ...
{"hexsha": "967467db675e752ecdb26779d55c049076dca1b2", "size": 2608, "ext": "py", "lang": "Python", "max_stars_repo_path": "sympy/utilities/randtest.py", "max_stars_repo_name": "goodok/sympy", "max_stars_repo_head_hexsha": "de84ed2139125a755ea7b6ba91d945d9fbbe5ed9", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
from contextlib import contextmanager from exptools.logging.tabulate import tabulate from exptools.logging.console import mkdir_p, colorize from exptools.logging.autoargs import get_all_parameters import numpy as np from collections import OrderedDict, defaultdict import os, shutil import os.path as osp import sys impo...
{"hexsha": "a563f82ef8ef5124ae4f2f49deb3e538cd7aa1b4", "size": 18364, "ext": "py", "lang": "Python", "max_stars_repo_path": "exptools/logging/_logger.py", "max_stars_repo_name": "ZiwenZhuang/exptools", "max_stars_repo_head_hexsha": "aa6853f1fb463955e5983a81bfd1d31ba3e7e34a", "max_stars_repo_licenses": ["MIT"], "max_sta...
import cupy as cp class KMEANS: #kmeans模型聚类 def __init__(self, k): self.train_data = None self.k = k self.centers = None self.clusters = None self.test = None self.seed = None self.tolerance = None self.max_iter = None def distance(self, vect...
{"hexsha": "3f9576e672f0a47bffcb953ddaba849d7bc2fb6a", "size": 2003, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlcu/ml/KMEANS.py", "max_stars_repo_name": "haomingdouranggouqil/cuml", "max_stars_repo_head_hexsha": "4fbbc2bcf381f57333be99fa8490eccb3168b641", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
// Copyright (c) 2021 Graphcore Ltd. All rights reserved. #include "poplin/Cholesky.hpp" #include "poplin/MatMul.hpp" #include "poplin/TriangularSolve.hpp" #include <boost/assign/list_of.hpp> #include <boost/optional.hpp> #include <boost/optional/optional_io.hpp> #include <boost/program_options.hpp> #include <boost/ran...
{"hexsha": "77280576be1497b1d657048e9936f4b47b1f996c", "size": 13316, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tools/matrix_solver.cpp", "max_stars_repo_name": "graphcore/poplibs", "max_stars_repo_head_hexsha": "3fe5a3ecafe995eddb72675d1b4a7af8a622009e", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
subroutine wrimap(lundia ,error ,filename ,selmap ,simdat , & & itdate ,tzone ,tunit ,dt ,mmax , & & kmax ,lmax ,lstsci ,ltur ,nmaxus , & & noroco ,norow ,nostat ,nsrc ,ntruv , & ...
{"hexsha": "1681d910baf1ee91e3953a99233fae0a851e3487", "size": 60014, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "docker/water/delft3d/tags/v6686/src/engines_gpl/flow2d3d/packages/io/src/output/wrimap.f90", "max_stars_repo_name": "liujiamingustc/phd", "max_stars_repo_head_hexsha": "4f815a738abad43531d02ac6...
# This script is borrowed and extended from https://github.com/nkolot/SPIN/blob/master/models/hmr.py # Adhere to their licence to use this script import math import torch import numpy as np import os.path as osp import torch.nn as nn import torchvision.models.resnet as resnet from lib.core.config import VIBE_DATA_DIR...
{"hexsha": "079d10b0cb968b1fc025b1989b6c01442ccdb432", "size": 12757, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/models/spin.py", "max_stars_repo_name": "omidrk/computervisionPanopticToSMPLAuto", "max_stars_repo_head_hexsha": "b84b60f0ec4ffdb4ae61348919a95f7bb2eab926", "max_stars_repo_licenses": ["MIT"]...
"""The following module stores all methods used in the notebook.""" import ppscore as pps import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sb from sklearn.preprocessing import LabelBinarizer from sklearn.metrics import accuracy_score, confusion_matrix, precision_score from sklear...
{"hexsha": "3600f8b956c3e25d881716d3de198116e8abcbad", "size": 5515, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/src/note.py", "max_stars_repo_name": "ahmed14-cell/breast-cancer-classification", "max_stars_repo_head_hexsha": "7e37145c8d7fe267a12bc42b2e8e80d97b031390", "max_stars_repo_licenses": ["M...
export Arguments """ type Arguments positional::Tuple keyword::Dict{Symbol, Any} end Will store positional and keyword arguments for later use. Create with [`collect_arguments`](@ref). You can also [`merge`](@ref) two `Arguments`, [`push`](@ref) or [`unshift`](@ref) in new arguments, and run w...
{"hexsha": "a94c33a0f2edc9200f9f6f38f7dbaf60dc6d60de", "size": 6792, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/LazyCall.jl", "max_stars_repo_name": "JuliaPackageMirrors/ChainMap.jl", "max_stars_repo_head_hexsha": "7217dd05ee494751a81469cd0082a0972e95591b", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# Placeholders for built-in ports module Fw { port Cmd port CmdReg port CmdResponse port Log port LogText port PrmGet port PrmSet port Time port Tlm } port P active component C { async input port t1: [10] P priority 3 drop sync input port t2: P guarded input port t3: P output port t4: P ...
{"hexsha": "01cb6356df6dff5c80667152b410f3e6860e75d9", "size": 709, "ext": "fpp", "lang": "FORTRAN", "max_stars_repo_path": "compiler/tools/fpp-check/test/port_instance/ok.fpp", "max_stars_repo_name": "kevin-f-ortega/fpp", "max_stars_repo_head_hexsha": "ee355fc99eb8040157c62e69f58ac6a8435cd981", "max_stars_repo_license...
[STATEMENT] lemma exception_of_option_\<I> [simp]: "map_\<I> id exception_of_option (stop_\<I> \<I>) = exception_\<I> \<I>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. map_\<I> id exception_of_option (stop_\<I> \<I>) = exception_\<I> \<I> [PROOF STEP] by(simp add: exception_\<I>_def)
{"llama_tokens": 123, "file": "Constructive_Cryptography_CM_More_CC", "length": 1}
[STATEMENT] lemma elements_matD [dest]: "a \<in> elements_mat A \<Longrightarrow> \<exists>i j. i < dim_row A \<and> j < dim_col A \<and> a = A $$ (i,j)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. a \<in> elements_mat A \<Longrightarrow> \<exists>i j. i < dim_row A \<and> j < dim_col A \<and> a = A $$ (i, j) [...
{"llama_tokens": 261, "file": "Jordan_Normal_Form_Matrix", "length": 2}
import cv2 import numpy as np from car import Car from liness import Line from liness import Area # def from_new_to_car_dic_and_obj(id): # """ # 从new_car_dic中转移到car_dic中 # """ # global new_car_dic, cars_dic # cars_dic[id] = new_car_dic[id] #转移数据 # del new_car_dic[id] #从new_car_dic删除该数据...
{"hexsha": "5b1cea7e7f172637607a1cd337f3bd93e61e39b3", "size": 9693, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/prediction/Violation.py", "max_stars_repo_name": "csd2022fuchuang/yolov5-opencv-cpp-python", "max_stars_repo_head_hexsha": "5b52dbffed6733a1353bd27a0001c09821ee0714", "max_stars_repo_licens...
# # This file is a part of MolecularGraph.jl # Licensed under the MIT License http://opensource.org/licenses/MIT # @testset "graph.dag" begin graph = plaindigraph(10, [ (1, 4), (2, 4), (3, 7), (4, 5), (4, 6), (4, 7), (6, 9), (7, 8), (7, 9), (7, 10) ]) @test issetequal(ancestors(graph, 7), [...
{"hexsha": "01d46885f4a30ee2a05208996da7f71810c1c0ad", "size": 520, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/graph/dag.jl", "max_stars_repo_name": "hhaensel/MolecularGraph.jl", "max_stars_repo_head_hexsha": "c54ccdf09274e36ed3d866604f99b497a39bfaf5", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
################################################################################ # # Abstract types # ################################################################################ # abstract spaces abstract type AbsSpace{S} end # abstract lattices abstract type AbsLat{S} end #####################################...
{"hexsha": "6762d0ccf5a1e1a0c8aa13073044fbc459a17aa8", "size": 2126, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/QuadForm/Types.jl", "max_stars_repo_name": "albinahlback/Hecke.jl", "max_stars_repo_head_hexsha": "728be6098a8dbfe2589fca77e57f10950cefe9e7", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_s...
module FIGlet using Pkg if isdefined(Pkg, :Artifacts) using Pkg.Artifacts @eval fontsroot = artifact"fonts" else fontsroot = normpath(@__DIR__, "..", "deps") end const FONTSDIR = abspath(normpath(joinpath(fontsroot, "FIGletFonts-0.5.0", "fonts"))) const UNPARSEABLES = [ "nvscript.flf", ...
{"hexsha": "513b32a3d2fe8a5ecf4ff6670b03cfee226cb2f6", "size": 8298, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/FIGlet.jl", "max_stars_repo_name": "wookay/TestFIGlet", "max_stars_repo_head_hexsha": "44ecf528acc28b925a1523093f4ccf4372973a42", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
@testset "Forcings" begin fx = zeros(5,5) fy = zeros(5,5) f1 = zeros(30) # For structs sys = Swalbe.SysConst(Lx=5, Ly=5) state = Swalbe.Sys(sys, "CPU") state.height .= 1.0 # One dim model sys1D = Swalbe.SysConst_1D(L=30) state1D = Swalbe.Sys(sys1D) state1D.height .= 1.0 ...
{"hexsha": "350b00b5f1e3a67f3a4de2c416c9575f4617ee69", "size": 6734, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/forcing.jl", "max_stars_repo_name": "aedolfi/Swalbe.jl", "max_stars_repo_head_hexsha": "8722b1e2f881b2917d8e2faca1ea58b0e9485ce5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
import sys if sys.path[0] != '/mnt/home/landerson/.local/lib/python3.6/site-packages': sys.path.insert(0, '/mnt/home/landerson/.local/lib/python3.6/site-packages/astroML-0.3-py3.6.egg') sys.path.insert(0, '/mnt/home/landerson/.local/lib/python3.6/site-packages/xdgmm-1.0.9-py3.6.egg') sys.path.insert(0, '/m...
{"hexsha": "a8e08c874e9b933b61e12b4dc019ca654de35b67", "size": 7361, "ext": "py", "lang": "Python", "max_stars_repo_path": "GPdust.py", "max_stars_repo_name": "andersdot/dust", "max_stars_repo_head_hexsha": "44460ac2e8bf46db5ab27862bf775cf93531742e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta...
import cv2 import numpy as np from random import randint from copy import deepcopy color = (255, 255, 0) font = cv2.FONT_HERSHEY_DUPLEX fontColor = (255, 255, 0) def draw_count(frame, crowd_count, ignore_polys=[], gt_count=None, alpha=0.5): """ :param ignore_polys: list of polygons, each polygon being a lis...
{"hexsha": "47af1240f6410827cfb6b5867f2a6cc5012103e3", "size": 1255, "ext": "py", "lang": "Python", "max_stars_repo_path": "drawer.py", "max_stars_repo_name": "asanakoy/lsc-cnn", "max_stars_repo_head_hexsha": "d389e3598c5ec34254200160c0c4a1904e61eb1b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...