text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
c Subroutine to define height obs above surface
c AJ_Kettle, 11Nov2019
SUBROUTINE get_hght_obs_above_sfc(l_channel,
+ s_vec_hgt_obs_above_sfc)
IMPLICIT NONE
c************************************************************************
c Declare variables passed into subroutine
INTEGER... | {"hexsha": "c8e2025c51fdf54043cfab6bb6c41f9a8e7ed1b9", "size": 1209, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "r202106_ghcnd_to_cdm/Step2_cdmmake/Subroutine/get_hght_obs_above_sfc.f", "max_stars_repo_name": "glamod/glamod-nuim", "max_stars_repo_head_hexsha": "eed6f9d7d71b0c456ef39fdea6b58677e13ab50c", "max... |
(* ll_cut library for yalla *)
(** * Cut admissibility for [ll] *)
Require Import Arith_base.
Require Import Injective.
Require Import List_more.
Require Import List_Type_more.
Require Import Permutation_Type_more.
Require Import genperm_Type.
Require Import flat_map_Type_more.
Require Import wf_nat_more.
Require ... | {"author": "olaure01", "repo": "yalla", "sha": "9c6a66fa3a3d68b5a21ce7fa695402a0f2dda4d7", "save_path": "github-repos/coq/olaure01-yalla", "path": "github-repos/coq/olaure01-yalla/yalla-9c6a66fa3a3d68b5a21ce7fa695402a0f2dda4d7/yalla/ll_cut.v"} |
[STATEMENT]
lemma almost_full_on_hom:
fixes h :: "'a \<Rightarrow> 'b"
assumes hom: "\<And>x y. \<lbrakk>x \<in> A; y \<in> A; P x y\<rbrakk> \<Longrightarrow> Q (h x) (h y)"
and af: "almost_full_on P A"
shows "almost_full_on Q (h ` A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. almost_full_on Q (h ` A... | {"llama_tokens": 2286, "file": "Well_Quasi_Orders_Almost_Full", "length": 32} |
import sys
import numpy as np
from copy import copy
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from concurrent.futures import ProcessPoolExecutor, as_completed
from helper_functions import *
def surface_area_calculation(l_axis, d_axis, bins, bin_range, p_init, i):
fig = plt.figure()
... | {"hexsha": "bb591a8c1587eb0581977e787c33529fb6b19137", "size": 4883, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/leaf_axis_determination.py", "max_stars_repo_name": "oceam/LeafSurfaceReconstruction", "max_stars_repo_head_hexsha": "ab6e71cc1a4f1f4afdd1fe93077cb2debb4eeccf", "max_stars_repo_licenses": ["... |
\subsection{Undirected graphs}\label{subsec:undirected_graphs}
\begin{remark}\label{rem:graph_etymology}
Unfortunately, the term \enquote{graph} has at least several distinct established meanings:
\begin{itemize}
\item The \hyperref[def:multi_valued_function/graph]{graph of a valued function} (or relation).
... | {"hexsha": "0b246f2392babd203c6accc731d432b879404520", "size": 12600, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/undirected_graphs.tex", "max_stars_repo_name": "v--/anthology", "max_stars_repo_head_hexsha": "89a91b5182f187bc1aa37a2054762dd0078a7b56", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_coun... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 20 14:19:54 2021
@author: gregstacey
"""
import os
import pandas as pd
import numpy as np
import sys
from itertools import chain
from rdkit import Chem
from tqdm import tqdm
if os.path.isdir("~/git/bespoke-deepgen"):
git_dir = os.path.expandus... | {"hexsha": "3b0084d294196a83980226857af028f0a50fceb3", "size": 2702, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/util/split_hmdb.py", "max_stars_repo_name": "GregStacey/bespoke-deepgen", "max_stars_repo_head_hexsha": "8f27e976ced3c0b06ec7cd71f51474b235de866a", "max_stars_repo_licenses": ["MIT"], "max_... |
"""
function length_conversion(value, from_type, to_type)
A function that converts a value from a measurement unit to another one
Accepted units are: millimeter(s), centimeter(s), meter(s), kilometer(s),
inch(es), feet, foot, yard(s), mile(s). Abbreviations are also supported.
# Examples/Tests (optional but reco... | {"hexsha": "cca0f8a872331af67233632ca0ca8d32dd67c4b2", "size": 2409, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/conversions/length_conversion.jl", "max_stars_repo_name": "Whiteshark-314/Julia", "max_stars_repo_head_hexsha": "3285d8d6b7585cc1075831c2c210b891151da0c2", "max_stars_repo_licenses": ["MIT"], "... |
[STATEMENT]
lemma lset_Lazy_llist [code]:
"gen_lset A (Lazy_llist xs) =
(case xs () of None \<Rightarrow> A | Some (y, ys) \<Rightarrow> gen_lset (insert y A) ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. gen_lset A (Lazy_llist xs) = (case xs () of None \<Rightarrow> A | Some (y, ys) \<Rightarrow> gen_lset... | {"llama_tokens": 162, "file": "Coinductive_Lazy_LList", "length": 1} |
#!/usr/bin/python
#
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | {"hexsha": "18a40bd26fbe026f2bf72fddf2159dba0861d92e", "size": 2467, "ext": "py", "lang": "Python", "max_stars_repo_path": "ssl_hsic/eval_config.py", "max_stars_repo_name": "deepmind/ssl_hsic", "max_stars_repo_head_hexsha": "d7ea38d263f7438fe41ae5c2e2c38c63a9fc36c0", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
"""
The pycity_scheduling framework
Copyright (C) 2022,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Softwa... | {"hexsha": "fd2ab00dbeda808ba417e7d0ecc3dc864b9f3391", "size": 8933, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pycity_scheduling/algorithms/exchange_admm_algorithm.py", "max_stars_repo_name": "ElsevierSoftwareX/SOFTX-D-20-00087", "max_stars_repo_head_hexsha": "d2d3f1effda2c0499cb05abf87435375a21379e3",... |
import numpy as np
import dp_penalty
params = dp_penalty.PenaltyParams(
tau = 0.07,
prop_sigma = np.repeat(0.0002, 6),
r_clip_bound = 25,
ocu = True,
grw = True
)
| {"hexsha": "98c6b7019b826daebcda72502e03cdfe5c3c0f03", "size": 183, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/params/dppa_hard-gauss-6d.py", "max_stars_repo_name": "oraisa/masters-thesis", "max_stars_repo_head_hexsha": "f859f560b8a8c7b535bd2a70c406f3b571ff6b9c", "max_stars_repo_licenses": ["MIT"], "ma... |
from typing import Any, Tuple
from abc import abstractmethod
import cv2
import numpy as np
import utils.Detectors as Detectors
import utils.Descriptors as Descriptors
from utils.utils import baseClass
class feature(baseClass):
def __init__(self) -> None:
super().__init__()
@abstractmethod
def d... | {"hexsha": "4b855ce62f3398f764b6724ee99528d806d9376b", "size": 3391, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils/features.py", "max_stars_repo_name": "tonywangziteng/Monocular-VO-Python", "max_stars_repo_head_hexsha": "37762fa6c4712b9a4860d1c4e919685f71490463", "max_stars_repo_licenses": ["MIT"], "... |
#include <cslibs_kdl/dynamic_model.h>
#include <cslibs_kdl/kdl_conversion.h>
#include <random>
#include <kdl_parser/kdl_parser.hpp>
#include <kdl/chainidsolver.hpp>
#include <kdl/chainfksolverpos_recursive.hpp>
#include <tf_conversions/tf_kdl.h>
#include <ros/ros.h>
#include <Eigen/SVD>
using namespace cslibs_kdl;
Dy... | {"hexsha": "60c5cf3ff050fad597a4b530583c49e6ef18cb70", "size": 38333, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cslibs_kdl/src/dynamic_model.cpp", "max_stars_repo_name": "cogsys-tuebingen/cslibs_kdl", "max_stars_repo_head_hexsha": "a71ab9a1f6f7b854d17d4fdc0c4d7b01c72bec65", "max_stars_repo_licenses": ["BSD-3... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Classes used in keras_model_to_pmml.py
"""
from __future__ import absolute_import
import sys, os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
sys.path.append(BASE_DIR)
# python imports
import datetime
import json
import numpy as np
# nyoka imports
import... | {"hexsha": "8fb9cf7a85b032eafa55d2e200e5aeda52d3f216", "size": 23082, "ext": "py", "lang": "Python", "max_stars_repo_path": "nyoka/keras/keras_model_to_pmml.py", "max_stars_repo_name": "Chiragasourabh/nyoka", "max_stars_repo_head_hexsha": "44003b5dc500b18d3a2b2c6ed6fc4db217e2d2c0", "max_stars_repo_licenses": ["Apache-2... |
import argparse
import calendar
import copy
import glob
import subprocess
import numpy as np
import pandas as pd
from sqlalchemy.exc import IntegrityError
from datetime import date
import catchment_tools as ct
from phildb.database import PhilDB
from phildb.exceptions import DuplicateError
def main(phildb_name, gri... | {"hexsha": "c95e2320bc0a59a461e5165950746a7e9a4ccc0e", "size": 3216, "ext": "py", "lang": "Python", "max_stars_repo_path": "process_rainfall.py", "max_stars_repo_name": "amacd31/hydromet-toolkit", "max_stars_repo_head_hexsha": "d39edc6d3e02adeb3cd89ca13fdb9660be3247b4", "max_stars_repo_licenses": ["BSD-3-Clause"], "max... |
# emacs: -*- coding: utf-8; mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
"""
Relevant Transforms of 2D/3D Biomedical Images using itk (sitk) images.
Transforms
1. ITK image to another ITK image
2. ITK image to pytorch tensors
3. Pytorch tensors to ITK images
"""
# Authors:
# Bishesh Khanal <bisheshkh@... | {"hexsha": "aa04117fd9c77f57fe6853820ffd042aeb6d0a87", "size": 8919, "ext": "py", "lang": "Python", "max_stars_repo_path": "fetalnav/transforms/itk_transforms.py", "max_stars_repo_name": "ntoussaint/fetalnav", "max_stars_repo_head_hexsha": "a6701a33f1ed8ac412f5ee09c0704d866ce7dad2", "max_stars_repo_licenses": ["MIT"], ... |
"""Fits a sum of Gaussians model to a spike.
Adapted from http://www.scipy.org/Cookbook/FittingData"""
import numpy as np
import scipy.optimize
from scipy.optimize import leastsq, fmin_cobyla
from pylab import *
import time
import spyke
from spyke.core import g, dgdmu, dgdsigma, g2
"""
Don't forget, need to enforce... | {"hexsha": "9cd895881f2a26a5d00f4acd99b8a05b21e852f6", "size": 9443, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo/fit_demo.py", "max_stars_repo_name": "spyke/spyke", "max_stars_repo_head_hexsha": "20934521de9c557924911cf6190690ac1c6f8e80", "max_stars_repo_licenses": ["CNRI-Python"], "max_stars_count": 22... |
#!/usr/bin/env python
# training data for collision detection
# use joystick and RPi_v2 camera
# button left/right would save current camera capture as negative/positive (there is obstacle/no obstacle found)
import pygame
import sys
import os
import time
import cv2
from datetime import datetime
from matplotlib.image im... | {"hexsha": "6fe2aea48ec8cbeab61567a7a8e19bcfd4233f17", "size": 2920, "ext": "py", "lang": "Python", "max_stars_repo_path": "jetbot/annotation_joystic.py", "max_stars_repo_name": "miroslavradojevic/python-snippets", "max_stars_repo_head_hexsha": "753e1c15dc077d3bcf5de4fd5d3a675daf0da27c", "max_stars_repo_licenses": ["MI... |
[STATEMENT]
lemma
conc_fun_FAIL[simp]: "\<Down>R FAIL = FAIL" and
conc_fun_RES: "\<Down>R (RES X) = RES (R\<inverse>``X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<Down> R FAIL = FAIL &&& \<Down> R (RES X) = RES (R\<inverse> `` X)
[PROOF STEP]
unfolding conc_fun_def
[PROOF STATE]
proof (prove)
goal (1 su... | {"llama_tokens": 252, "file": "Refine_Monadic_Refine_Basic", "length": 2} |
----------------------------------------------------------------------------------
-- Types for parse trees
----------------------------------------------------------------------------------
module cedille-types where
open import lib
-- open import parse-tree
open import general-util
{-# FOREIGN GHC import qualified... | {"hexsha": "667fac2bf2f0578f60e17f037b970ce5f67eb8bc", "size": 10978, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/cedille-types.agda", "max_stars_repo_name": "zmthy/cedille", "max_stars_repo_head_hexsha": "9df4b85b55b57f97466242fdbb499adbd3bca893", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
"""
coordGeoRegion(geo::PolyRegion) ->
blon::Vector{<:Real}, blat::Vector{<:Real},
slon::Vector{<:Real}, slat::Vector{<:Real},
For a given RectRegion, extract the [N,S,E,W] bounds and create a longitude and latitude vectors for the bound and the shape of the GeoRegion
Arguments
=========
- `geo` ... | {"hexsha": "9195de81f9d53905cbb54161b42b4676d910205e", "size": 2004, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Query.jl", "max_stars_repo_name": "natgeo-wong/GeoRegions.jl", "max_stars_repo_head_hexsha": "88941db24b7386729271739ba676789fa7a02b8b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1... |
"""
Title: Next-frame prediction with Conv-LSTM
Author: [jeammimi](https://github.com/jeammimi)
Date created: 2016/11/02
Last modified: 2020/05/01
Description: Predict the next frame in a sequence using a Conv-LSTM model.
"""
"""
## Introduction
This script demonstrates the use of a convolutional LSTM model.
The model... | {"hexsha": "fb9c77dd210b5d8c5902917bd8c1f9fa49d07bdb", "size": 4908, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/vision/conv_lstm.py", "max_stars_repo_name": "mplaul/keras-io", "max_stars_repo_head_hexsha": "5bf2b282c4e9809a028e1601611afaafd76b80dd", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
function _make_table_gui()
#Table of Values Popup
table_grid=Grid()
table_list=ListStore(Int32,Int32,Int32,Int32,Bool)
for i=1:0
push!(table_list,(i,125,0,0,true))
end
table_tv=TreeView(TreeModel(table_list))
table_rtext1=CellRendererText()
table_rtext2=CellRendererText()
... | {"hexsha": "737997a923fc9bc66167b5eaebc00d9a7fb8d703", "size": 3245, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/gui/parameter_table.jl", "max_stars_repo_name": "paulmthompson/Intan.jl", "max_stars_repo_head_hexsha": "e01905739f08f42d1445cd41febf77564e7435d7", "max_stars_repo_licenses": ["BSD-2-Clause"], ... |
import os
import sys
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
tf.logging.set_verbosity(tf.logging.ERROR)
import random
import numpy as np
from mpi4py import MPI
from rl import logger
from rl import trpo_mpi
from envs.race_strategy import Race
from rl.common.models import mlp
import utils.tf_util as U... | {"hexsha": "c4a5bcdf1f8a3db27e0bc77b4f08bc7468a50b6c", "size": 5442, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_race_trpo.py", "max_stars_repo_name": "amarildolikmeta/alphazero_singleplayer", "max_stars_repo_head_hexsha": "06f62c82f428dbe82afab16c1955b82aeedd8737", "max_stars_repo_licenses": ["MIT"], "m... |
from pyspark.sql import SparkSession, Row, Window, types
from pyspark.sql.types import StringType
import boto3
import argparse
import sys
import functools
import pyspark.sql.functions as func
import numpy
import json
def distance(p1, p2):
a = numpy.array((p1['x'], p1['y'], 0))
b = numpy.array((p2['x'], p2['y... | {"hexsha": "319dd2e95c63563dd8f8de2ef2bb67104cc8c63e", "size": 8979, "ext": "py", "lang": "Python", "max_stars_repo_path": "spark_scripts/detect_scenes.py", "max_stars_repo_name": "BWCXME/aws-autonomous-driving-data-lake-ros-bag-scene-detection-pipeline", "max_stars_repo_head_hexsha": "4552bbeb41dfe1a0a282b0944f2676c07... |
Check true.
Inductive day : Type :=
| monday
| tuesday
| wednesday
| thursday
| friday
| saturday
| sunday.
Definition next_weekday (d : day) : day :=
match d with
| monday => tuesday
| tuesday => wednesday
| wednesday => thursday
| thursday => friday
| friday => saturday
| saturday => su... | {"author": "tor4z", "repo": "SoftwareFoundations", "sha": "ad0d3d65d0deb4c0f1ea76b54cfb5ce2d8fcdef6", "save_path": "github-repos/coq/tor4z-SoftwareFoundations", "path": "github-repos/coq/tor4z-SoftwareFoundations/SoftwareFoundations-ad0d3d65d0deb4c0f1ea76b54cfb5ce2d8fcdef6/lf/Basics.v"} |
import contextlib
import matplotlib.lines as lines
import matplotlib.patches as patches
import matplotlib.pyplot as plt
import numpy as np
class MPLBoss:
def __init__(self, settings):
self.outf_dirname = settings._temp_r_dirname
self.png_dirname = settings.output_dirname
self.png_fname_b... | {"hexsha": "e1ab9b7db182a2d7a32d6b64d118db8a045a5f73", "size": 4502, "ext": "py", "lang": "Python", "max_stars_repo_path": "midani/plt_boss.py", "max_stars_repo_name": "malcolmsailor/midani", "max_stars_repo_head_hexsha": "3dc5ed38188d372a36df405a142a1185676dba6e", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
function test_smoothing()
mat1 = [1.0, 2.0]
mat2 = [
1.0222393236943468,
1.1016905849861969,
1.1915263437469639,
1.289583214110971,
1.3933349449133303,
1.5,
1.6066650550866697,
... | {"hexsha": "adbf284126ca014403e0a9d4da8b2d40d61124fa", "size": 996, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_smoothing.jl", "max_stars_repo_name": "yusri-dh/MVApp.jl", "max_stars_repo_head_hexsha": "c5694839d2229982b0ae5cec7c18390019222c7a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import numpy as np
import matplotlib.pyplot as plt
import math
num_points = 1000
turn_fraction = (1.0 + math.sqrt(5.0)) / 2.0
indices = np.arange(0, num_points, dtype=float) + 0.5
ax = plt.axes(projection='3d')
xs = []
ys = []
zs = []
sphere_radius = 3
for index in indices:
r = (index / num_points)
inclina... | {"hexsha": "afc9a1622ca0f74df5f30e4f2db0a224dc323fcd", "size": 709, "ext": "py", "lang": "Python", "max_stars_repo_path": "obsolete/sphere_ray_casting.py", "max_stars_repo_name": "zigakleine/ProceduralCellShapeModel", "max_stars_repo_head_hexsha": "13e3ca3207e77ce65d3f43e18c2c6b60a30935f8", "max_stars_repo_licenses": [... |
args = commandArgs(TRUE)
fns = args[1:(length(args)-3)]
fnToVal = list()
counter = 0
for (fn in fns) {
print(fn)
data = read.delim(fn, colClasses=c("character", "numeric", "numeric", "numeric"), header=FALSE)
vals = list()
for (row in 1:nrow(data)) {
start = data[row,2]
end = data[row,3]
val = da... | {"hexsha": "fd57beec607ff18421ed2ac8bafa1585554feed9", "size": 3288, "ext": "r", "lang": "R", "max_stars_repo_path": "plotChIRPRepeat.r", "max_stars_repo_name": "bdo311/chirpseq-analysis", "max_stars_repo_head_hexsha": "64a5cdbb1fbac1ef8c5cca844ea743b80641287c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou... |
#!/usr/bin/env python
import numpy as np
import hdphmm
import mdtraj
import matplotlib.pyplot as plt
from LLC_Membranes.llclib import file_rw
from hdphmm.generate_timeseries import GenARData
from hdphmm import timeseries as ts
def ihmm(res, traj_no, ntraj, hyperparams, plot=False, niter=100):
print('Trajectory %... | {"hexsha": "6cf165b845cbb4113e5debff194af46558fea5c3", "size": 8152, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/single_trajectories.py", "max_stars_repo_name": "bencoscia/hdphmm", "max_stars_repo_head_hexsha": "2c65c58a69d31015652a2681bcd4b3d983704e28", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import numpy as np
from collections import Counter
#from utils import Distances
#k = 1
#distance_function = utils.Distances.euclidean_distance
class KNN:
def __init__(self, k, distance_function):
"""
:param k: int
:param distance_function
"""
# self.k = k
self.k = k
... | {"hexsha": "f8a119e6caa4900d922fb2983a2a4a26a53ce379", "size": 3443, "ext": "py", "lang": "Python", "max_stars_repo_path": "PA1/KNN/knn.py", "max_stars_repo_name": "anishvaidya/CSCI-567-Machine-Learning", "max_stars_repo_head_hexsha": "385e1a152abfadcc754429c1b1d0fcb2f3d63c6a", "max_stars_repo_licenses": ["MIT"], "max_... |
'''
Copyleft May 11, 2016 Arya Iranmehr, PhD Student, Bafna Lab, UC San Diego, Email: airanmehr@gmail.com
'''
from __future__ import print_function
import matplotlib as mpl
import numpy as np
import pandas as pd
import pylab as plt
import seaborn as sns
import UTILS.Util as utl
import UTILS.Hyperoxia as htl
from UTIL... | {"hexsha": "ee3b1cdbe153a355c0ebba271f78bce9b15463eb", "size": 43086, "ext": "py", "lang": "Python", "max_stars_repo_path": "Plots.py", "max_stars_repo_name": "airanmehr/Utils", "max_stars_repo_head_hexsha": "f97d704bb075b249d2b0dde5473327249f9deef4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Sep 27 16:46:45 2020
@author: pfm
"""
from scipy.spatial.distance import cdist
import numpy as np
# Filename: kdtw_cdist.py
# Python source code for the "Kernelized" Dynamic Time Warping similarity (as defined in the reference below).
# Author: Pierre-F... | {"hexsha": "80c68546dbec636311705487cd504e72f8613e37", "size": 4198, "ext": "py", "lang": "Python", "max_stars_repo_path": "kdtw_cdist.py", "max_stars_repo_name": "pfmarteau/KDTW", "max_stars_repo_head_hexsha": "e2bb620b67e832fd993dc37b3ae8775cc04b6ac1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_st... |
import cv2
import numpy as np
import pyautogui
import time, keyboard
from python_bot_toolbox.image import *
# Function to capture a video of the screen
# @fps: Frames per second for recording
# @monitor: Defines the monitor from which the video should be captured - Default=1
def recordScreen_func(fps = 25.0, monitor =... | {"hexsha": "a219ab17225507b631d24404d0592fdd39b7d911", "size": 1115, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_bot_toolbox/video/videofind.py", "max_stars_repo_name": "thisiscyberbear/python_bot_toolbox", "max_stars_repo_head_hexsha": "ff5fe99216f9b26c7543f2cdc85f2da1865910ff", "max_stars_repo_licen... |
from mesh import Mesh
import scipy.sparse
m = Mesh("input-face.obj") # load mesh
A = scipy.sparse.lil_matrix((m.nverts, m.nverts))
for v in range(m.nverts): # build a smoothing operator as a sparse matrix
if m.on_border(v):
A[v,v] = 1 # fix boundary verts
else:
neigh_list = m.neighbors(v)
... | {"hexsha": "216fa5d6e27095cd075c4b3c88c5022e7fce7909", "size": 628, "ext": "py", "lang": "Python", "max_stars_repo_path": "manuscript/listings/example_3.3.py", "max_stars_repo_name": "ssloy/least-squares-course", "max_stars_repo_head_hexsha": "e51206d795bd8385779f13fd611ed91624095d04", "max_stars_repo_licenses": ["WTFP... |
# std
from collections import defaultdict
# third-party
import numpy as np
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d.art3d import Line3DCollection
from astropy import units as u
from astropy.utils import lazyproperty
# local
from recipes.array import... | {"hexsha": "211f5cc39c07067c1ab84880037ffa58913b064d", "size": 4731, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mCV/axes_helpers.py", "max_stars_repo_name": "astromancer/mCV", "max_stars_repo_head_hexsha": "16647f31bf90ae6dde61927ba52c58b891deba52", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
# FSETC Workshops: Introduction to Functions in MATLAB
*Functions* are a way for programmers to generalize some piece of code so that it can be reused. Functions isolate the implementation details and variables used from your main program.
<p style="color: gray; padding-top: 1cm;text-align: center;">▶️Press the spaceb... | {"hexsha": "fde199505233776085a6e4c7360e9bea2c0a8538", "size": 10311, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Functions.ipynb", "max_stars_repo_name": "BrianChevalier/MATLAB101", "max_stars_repo_head_hexsha": "7a8d7ced44c296fe3ae4f90944d96ea14bf453a6", "max_stars_repo_licenses": ["MIT"], "ma... |
"""
spin22.jl - dynamic sampling robustness for the δf_q problem
"""
WDIR = joinpath(@__DIR__, "../../")
include(joinpath(WDIR, "src", "spin", "spin.jl"))
using Altro
using HDF5
using LinearAlgebra
using Random
using RobotDynamics
using StaticArrays
using TrajectoryOptimization
const RD = RobotDynamics
const TO = Tra... | {"hexsha": "e8674c93a54e73fbe495c6fa0f2022df2b62ebb3", "size": 10343, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/spin/spin22.jl", "max_stars_repo_name": "SchusterLab/rbqoc", "max_stars_repo_head_hexsha": "70bac2d8a9cd3c96928fc52821c59534305c20ed", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10... |
#include <functional>
#include <iostream>
#include <thread>
#include <boost/asio/signal_set.hpp>
#include <boost/lexical_cast.hpp>
#include "common/util/config.h"
#include "common/util/log.h"
#include "common/util/strings.h"
#include "../ws_client.h"
namespace ansi {
constexpr auto kRed = "\033[31m";
constexpr ... | {"hexsha": "65c074cf87bb6c96782e899ec56a020bf296394e", "size": 3567, "ext": "cc", "lang": "C++", "max_stars_repo_path": "ws-local-player/chat/main.cc", "max_stars_repo_name": "ikuokuo/rtsp-wasm-player", "max_stars_repo_head_hexsha": "88332dab4402c491bf47a36f6671e640075471ff", "max_stars_repo_licenses": ["MIT"], "max_st... |
import pandas as pd
import numpy as np
import os
import sys
from src.Preprocess import Utils
from src.Correlations import Correlations
# Set seed for all libraries
np.random.seed(123)
# To print the whole df
pd.options.display.width= None
pd.options.display.max_columns= None
pd.set_option('display.max_rows', 100)
pd... | {"hexsha": "be412191783279d2165f42ff0785dc3782e3f808", "size": 2909, "ext": "py", "lang": "Python", "max_stars_repo_path": "01.launchCorrelations.py", "max_stars_repo_name": "lgazpio/PhrasIS-baselines", "max_stars_repo_head_hexsha": "6d0f3b768569f8c23014bb3f9811b870747ab6e7", "max_stars_repo_licenses": ["MIT"], "max_st... |
from hydroDL import kPath, utils
from hydroDL.app import waterQuality
from hydroDL.master import basins
from hydroDL.data import usgs, gageII, gridMET, ntn
from hydroDL.post import axplot, figplot
import numpy as np
import matplotlib.pyplot as plt
import os
import pandas as pd
import json
import scipy
from hydroDL.util... | {"hexsha": "8d94da5449ad57a610a4d9f73017d752c494dd4d", "size": 1392, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/waterQual/30yr/reason/cq_range.py", "max_stars_repo_name": "fkwai/geolearn", "max_stars_repo_head_hexsha": "30cb4353d22af5020a48100d07ab04f465a315b0", "max_stars_repo_licenses": ["MIT"], "max_... |
#
# StemWF Class
#
# This file is part of CMMLINFLAM
# (https://github.com/I-Bouros/cmml-inflam.git) which is
# released under the MIT license. See accompanying LICENSE for copyright
# notice and full license details.
#
"""
This script contains code for the forward simulation of the STEM cells
population, both mutated ... | {"hexsha": "421728160dc77c786e6354efdcd0f52bbcc9164f", "size": 28185, "ext": "py", "lang": "Python", "max_stars_repo_path": "cmmlinflam/stem_wf.py", "max_stars_repo_name": "I-Bouros/cmml-inflam", "max_stars_repo_head_hexsha": "9fe318fc88b98aa8251daa11a48c9af1a3a50c00", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import sys
import json
with open('../infos/directory.json') as fp: all_data_dir = json.load(fp)
path = all_data_dir + 'v-coco/'
sys.path.insert(0, path)
import __init__
import vsrl_utils as vu
import numpy as np
import argparse
import pickle
parser = argparse.ArgumentParser()
# parser.add_argument('-l','--learning_r... | {"hexsha": "4c33909dc96e89f973268fea9e80a88aeae6b6c9", "size": 2362, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/calculate_map_vcoco.py", "max_stars_repo_name": "roy881020/VSGNet", "max_stars_repo_head_hexsha": "a9ba741871d1d7ff401cecf23659f0b75576e7c3", "max_stars_repo_licenses": ["MIT"], "max_stars... |
"""
Experiment class that models and simulates the whole experiment.
It combines the information about the model of the quantum device, the control stack
and the operations that can be done on the device.
Given this information an experiment run is simulated, returning either processes,
states or populations.
"""
im... | {"hexsha": "69f8515624643ed481cb290e51ffcb13bd260d7f", "size": 26048, "ext": "py", "lang": "Python", "max_stars_repo_path": "c3/experiment.py", "max_stars_repo_name": "flo-maier/c3", "max_stars_repo_head_hexsha": "6bfd72d49fbe47c33038a73436f51f4e454f5ccb", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": n... |
[STATEMENT]
lemma ground_aux_simps[simp]:
"ground_aux zer S = True"
"ground_aux (Var k) S = (if atom k \<in> S then True else False)"
"ground_aux (suc t) S = (ground_aux t S)"
"ground_aux (pls t u) S = (ground_aux t S \<and> ground_aux u S)"
"ground_aux (tms t u) S = (ground_aux t S \<and> ground_aux u S)"
[P... | {"llama_tokens": 450, "file": "Robinson_Arithmetic_Instance", "length": 2} |
import keras
from keras import backend as K
import tensorflow as tf
import numpy as np
import time
import os
import json
import argparse
import superloop
"""
Toy example for the attention superloop which should find the last 2. value before a 9. value
"""
Parser = argparse.ArgumentParser(description='Toy example for... | {"hexsha": "deef25b096a91a65108cfd6fb3677338d4837545", "size": 5631, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_attention.py", "max_stars_repo_name": "csirmaz/superloop", "max_stars_repo_head_hexsha": "a0c4923725df069f93bf16fd2fe533823b857bca", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Create data files
"""
import os
import sys
import argparse
import numpy as np
import pickle
import itertools
from collections import defaultdict
import utils
import re
import shutil
import json
from pathlib import Path
from tempfile import NamedTemporaryFile
from multi... | {"hexsha": "757c0404509ef9407950c1b18f405e364fcbf17d", "size": 28523, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocess.py", "max_stars_repo_name": "ekayen/rnng-pytorch", "max_stars_repo_head_hexsha": "4cdfcb62f18a214011a8ea4c034fbf9041ac6012", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
import glob
import os
from typing import List
import numpy as np
import pandas as pd
def average_results(source_files: List[str], output_filename: str, weight: List[float] = None,
input_format: str = 'csv', sample_submission_filename: str = None):
"""
Calculate ensemble
Args:
... | {"hexsha": "06187c963ac2a272f1ba8cd1e130cad10552c95a", "size": 1907, "ext": "py", "lang": "Python", "max_stars_repo_path": "nyaggle/experiment/averaging.py", "max_stars_repo_name": "harupy/nyaggle", "max_stars_repo_head_hexsha": "132a93079e364d60b5598de77ab636a603ec06a4", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import numpy as np
from pydts.examples_utils.simulations_data_config import *
from pydts.config import *
import pandas as pd
from scipy.special import expit
from pandarallel import pandarallel
def sample_los(new_patient, age_mean, age_std, bmi_mean, bmi_std, coefs=COEFS, baseline_hazard_scale=8,
los_bo... | {"hexsha": "c355a99387c2e0061a8d9b747f950abb7db9bb25", "size": 10409, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pydts/examples_utils/generate_simulations_data.py", "max_stars_repo_name": "tomer1812/pydts", "max_stars_repo_head_hexsha": "7891a0b4b66dc7b986ebb7344c2c8f8d54e56ccc", "max_stars_repo_license... |
#!/usr/bin/env python
#-*- coding:utf-8 -*-
# Author: LiuHuan
# Datetime: 2020/1/15 15:03
import pandas as pd
import numpy as np
def get_nums(file_from):
nums = []
with open(file_from, 'r', encoding='utf-8') as f:
sentences, tags = [],[]
for line in f.readlines():
line = line.stri... | {"hexsha": "d8dd2cd11dfc64602b58a5c2a9544b519b93cf72", "size": 3331, "ext": "py", "lang": "Python", "max_stars_repo_path": "work/pubmed_20k/mask_label_model/create_test_data_from_mask_sens_results.py", "max_stars_repo_name": "LeoWood/bert", "max_stars_repo_head_hexsha": "bb916e2038e9c8360463e60678d999606f58ad0d", "max_... |
using FastMarching
using Base.Test
using LinearAlgebra
function eye(n)
fill(0,(n,n))+I
end
function testeye(n::Integer,endpoint=[1.,1.],stepsize=0.1)
speedmap = eye(n) .* 1000 .+ 0.001
source = [float(size(speedmap,1)), float(size(speedmap,2))]
distancemap = FastMarching.msfm(speedmap,source,true,true)
end... | {"hexsha": "2710c479c003301084b1f85e0e969274d8bcaab5", "size": 943, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "jgoldfar/FastMarching.jl", "max_stars_repo_head_hexsha": "ecd9bbb5b5b1120ca9e4fb88f36af679017d93c3", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star... |
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Vicente J. Botet Escriba 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)
//
// See http://www.boost.org/... | {"hexsha": "a3a35229030a371c52182e6ebf4198f8668e3a61", "size": 706, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "thirdparty/boost_1_67_0/boost/chrono.hpp", "max_stars_repo_name": "cfsengineering/tigl", "max_stars_repo_head_hexsha": "abfbb57b82dc6beac7cde212a4cd5e0aed866db8", "max_stars_repo_licenses": ["Apache-... |
using Dates
struct LSB
lsb # используется для расчетов
amp # только для справки, 0 = не задано
div # только для справки, 0 = не задано
end
#если просто Int, то потом выдает ошибку в parseChAttr
LSB(amp, div) = LSB(amp / div, amp,div)
LSB(lsb::Float64) = LSB(lsb, 0, 0)
tounits(lsb::LSB, pt) = pt * lsb.lsb... | {"hexsha": "d31f0e51a75a509c3aac7d47037f779ee22cde14", "size": 6324, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/datasets.jl", "max_stars_repo_name": "YuliyaCl/helloIBox.jl", "max_stars_repo_head_hexsha": "3663c245ff11314de6075dc6bf043088584c1e37", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
!! these functions could be implemented via C runtime library,
!! but for speed/ease of implementation, for now we use
!! compiler-specific intrinsic functions
submodule (pathlib) pathlib_intel
implicit none (type, external)
contains
module procedure cwd
use ifport, only : getcwd
integer :: i
character(4096) :: wor... | {"hexsha": "b7156e55bb2f5163716ae3d7d206e54e3969f0c9", "size": 1425, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/intel.f90", "max_stars_repo_name": "caguerra/fortran-pathlib", "max_stars_repo_head_hexsha": "ae6846ca3bb13ef39f5b136072bb0417adea0133", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import Functions_Features.functionsToUnfoldAndCalculateEnergyOfRegionOfInterest as fcu
import subprocess
import numpy as np
# This function will get the median delta G of unfolding for a given start and end site
def getAverageDeltaGUnfoldingForCoords(folder,foldingType,MutType,subMotiffolder,mutID,start,end,genename,s... | {"hexsha": "978f7b904ac351a19681eaf82ad109d9111eb585", "size": 8518, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/Feature_Generation/Functions_Features/functionsToDetermineMotifStructure.py", "max_stars_repo_name": "JayKu4418/Computational-Experimental-framework-for-predicting-effects-of-variants-on-a... |
# Code base on
# @article{thomas2019KPConv,
# Author = {Thomas, Hugues and Qi, Charles R. and Deschaud, Jean-Emmanuel and Marcotegui, Beatriz and Goulette, Fran{\c{c}}ois and Guibas, Leonidas J.},
# Title = {KPConv: Flexible and Deformable Convolution for Point Clouds},
# Journal = {Proceedings of the IEEE ... | {"hexsha": "48b0e0a9a93640e50556d51930c18345ffe5ddd0", "size": 7532, "ext": "py", "lang": "Python", "max_stars_repo_path": "KPConv-PyTorch/test_models.py", "max_stars_repo_name": "dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images", "max_stars_repo_head_hexsha": "b0e9c0d26177f74b20cbf... |
abstract type AbstractProblem end
struct CellProblemAdvecTemp{MeshType,TbfType,TypeK,TypeS,VType,BcondType,LaplacianStruct,AdvectionStruct} <: AbstractProblem
Tc::Vector{Float64}
k::TypeK
s::TypeS
ρC::Float64
u::VType
bcond::BcondType
mesh::MeshType
laplacian!::LaplacianStruct
advec... | {"hexsha": "2926cf834da844d5ddee178fac43a2e66ad8844b", "size": 5695, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/solvers.jl", "max_stars_repo_name": "favba/FiniteVolumeMesh.jl", "max_stars_repo_head_hexsha": "6d39a3ec27b29da028ff8f27227d1de60bae4580", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
#--------------------------------------------------------------------------
# one-way or two-way analysis of variance
#--------------------------------------------------------------------------
struct ANOVAReturn
title::String
colnms::Vector
array::Vector
F::Vector
p::Vector
bartlett::Float64 # Bartlett's test... | {"hexsha": "a1d50be4e3ed20ca186e29c1e23cde6c2020354d", "size": 7801, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/anova.jl", "max_stars_repo_name": "mwsohn/Stella.jl", "max_stars_repo_head_hexsha": "dac7eb673f8e7b63071852a3f9a20629aa79bcdb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "max_st... |
import pytest
import numpy as np
import pandas as pd
from vivarium.framework.utilities import (from_yearly, to_yearly, rate_to_probability, probability_to_rate,
collapse_nested_dict, import_by_path, handle_exceptions)
def test_from_yearly():
one_month = pd.Timedelta(days... | {"hexsha": "14a88b1db1400be1e6f1f416193885953a519f17", "size": 2546, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/framework/test_utilities.py", "max_stars_repo_name": "ihmeuw/vivarium", "max_stars_repo_head_hexsha": "77393d2e84ff2351c926f65b33272b7225cf9628", "max_stars_repo_licenses": ["BSD-3-Clause"],... |
subroutine mapc2m_annulus2(xc,yc,xp,yp,zp)
implicit none
double precision xc,yc,xp,yp,zp
double precision theta, r
call map_comp2annulus(xc,yc,theta,r)
xp = r*cos(theta)
yp = r*sin(theta)
zp = 0
end
| {"hexsha": "f794f280ef7c6071d4fbec2b32bbc9aed3359f30", "size": 258, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "applications/paper/all/mapc2m_annulus.f", "max_stars_repo_name": "ECLAIRWaveS/ForestClaw", "max_stars_repo_head_hexsha": "0a18a563b8c91c55fb51b56034fe5d3928db37dd", "max_stars_repo_licenses": ["BSD... |
"""
Stochastic Shortest Paths - Learning the costs
Dynamic Model - search for the parameter theta,
which represents the percentile of the distribution
of each cost to use to make sure we get a penalty as
small as possible. Run it using python command.
Author: Andrei Graur
"""
from collections import namedtuple
imp... | {"hexsha": "fba4415fad97de0e1c6a69a016f015ef4368b2c6", "size": 2908, "ext": "py", "lang": "Python", "max_stars_repo_path": "StochasticShortestPath_Dynamic/Driver.py", "max_stars_repo_name": "nikunjpansari/stochastic-optimization", "max_stars_repo_head_hexsha": "a01e95e9168dd8f87751c29f94bb382f83567e71", "max_stars_repo... |
from typing import List, Optional
import numpy as np
import torch
from purano.annotator.processors import Processor
from purano.models import Document
from purano.proto.info_pb2 import Info as InfoPb
from purano.training.models.tfidf import load_idfs, get_tfidf_vector, SVDEmbedder
@Processor.register("tfidf")
class... | {"hexsha": "a941fe233977a850b27bd0b8b8c0de80ed1d253d", "size": 1588, "ext": "py", "lang": "Python", "max_stars_repo_path": "purano/annotator/processors/tfidf.py", "max_stars_repo_name": "IlyaGusev/purano", "max_stars_repo_head_hexsha": "07234a55e8c80d1e9d8aeb8197c58e36dd26da54", "max_stars_repo_licenses": ["Apache-2.0"... |
module BitConverter
export bytes, to_big, to_int
"""
bytes(x::Integer; len::Integer, little_endian::Bool)
-> Vector{len, UInt8}
Convert an Integer `x` to a Vector{UInt8}
Options (not available for `x::BigInt`):
- `len` to define a minimum Vector lenght in bytes, result will show no leading
zero by default.
-... | {"hexsha": "badf536cfb01dae4c6b8ade17a6276d6ac1b3ad3", "size": 3515, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/BitConverter.jl", "max_stars_repo_name": "roshii/bitconverter.jl", "max_stars_repo_head_hexsha": "f3d4fd1cccf2c8c4bd72a79a58e908f316bc3610", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
#! /usr/bin/env python3
import numpy as np # type: ignore
import argparse
from vasppy.poscar import Poscar
from vasppy.cell import Cell
from vasppy.pimaim import get_cart_coords_from_pimaim_restart
def parse_command_line_arguments():
parser = argparse.ArgumentParser( description = 'TODO' )
parser.add_argumen... | {"hexsha": "a37920d1542217fd7139aab876e265d9d05f6b90", "size": 2837, "ext": "py", "lang": "Python", "max_stars_repo_path": "vasppy/scripts/pimaim_to_poscar.py", "max_stars_repo_name": "cajfisher/vasppy", "max_stars_repo_head_hexsha": "a460db14163b7db3bce54d754dd476c45a3ed85b", "max_stars_repo_licenses": ["MIT"], "max_s... |
# -*- coding: utf-8 -*-
"""
Written by Daniel M. Aukes
Email: danaukes<at>gmail.com
Please see LICENSE for full license.
"""
import pynamics
from pynamics.frame import Frame
from pynamics.variable_types import Differentiable,Constant
from pynamics.system import System
from pynamics.body import Body
from pynamics.dyadi... | {"hexsha": "b996dca1ea9d8d50fa638718474db2dfb83c8ac5", "size": 7666, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/pynamics_examples/four_bar2.py", "max_stars_repo_name": "idealabasu/code_pynamics", "max_stars_repo_head_hexsha": "7c05817a69fc8b3da1aa2c482818152d05be9ff5", "max_stars_repo_licenses": ["MI... |
# This file is called `config_.py` and not `config.py` to avoid circular
# imports from the fact that also the package `core/config` can be imported as
# `import config`.
import collections
import copy
import logging
import re
from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
import numpy as np
im... | {"hexsha": "13bf2dd02bcd87b6db833d875091b6095b3b5814", "size": 13254, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/config/config_.py", "max_stars_repo_name": "ajmal017/amp", "max_stars_repo_head_hexsha": "8de7e3b88be87605ec3bad03c139ac64eb460e5c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c... |
abstract type AbstractRLEnvMDP{S, A} <: MDP{S, A} end
abstract type AbstractRLEnvPOMDP{S, A, O} <: POMDP{S, A, O} end
const AbstractRLEnvProblem = Union{AbstractRLEnvMDP, AbstractRLEnvPOMDP}
POMDPs.actions(m::AbstractRLEnvProblem) = RL.actions(m.env)
POMDPs.discount(m::AbstractRLEnvProblem) = m.discount
function POM... | {"hexsha": "7e3e2c7c38c5e5ee9d0199fff71156940eb5c34d", "size": 7343, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/common_rl/from_env.jl", "max_stars_repo_name": "johannes-fischer/POMDPModelTools.jl", "max_stars_repo_head_hexsha": "9164f5839ac7568155285eb4e916d19c7129b205", "max_stars_repo_licenses": ["MIT"... |
from typing import List
import matplotlib
from pathlib import Path
from sklearn.metrics import confusion_matrix, plot_confusion_matrix, f1_score
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import numpy as np
class score_keeper:
def add_prediction(self, predicted, label):
sel... | {"hexsha": "92494db19c60ef8360fb8b24366a4f588fcbb0b6", "size": 8964, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/score_keeper.py", "max_stars_repo_name": "AU-DIS/LSTM_langid", "max_stars_repo_head_hexsha": "ca58c1386ad04d17f4fc436755c24163aba4b169", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
// Copyright (c) 2019 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chain.h>
#include <chainparams.h>
#include <config.h>
#include <consensus/activation.h>
#include <test/test_bitcoin.h>
#inc... | {"hexsha": "0ea695f39e04489aa8c16eb37db76473005bc4e8", "size": 700, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/test/activation_tests.cpp", "max_stars_repo_name": "dmitriy79/Freecash", "max_stars_repo_head_hexsha": "e3c817575a4a711ca414b6a129e3e62eed79e519", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import scipy.special
import numpy as np
def post_proba(Q, x, actions, T=1):
"""Posteria proba of c in actions
{p(a|x)} ~ softmax(Q(x,a))
Arguments:
Q {dict} -- Q table
x {array} -- state
actions {array|list} -- array of actions
... | {"hexsha": "2c0769964053392576afce61ff1c67d05b270ddc", "size": 1401, "ext": "py", "lang": "Python", "max_stars_repo_path": "skinner/utils.py", "max_stars_repo_name": "Freakwill/skinner", "max_stars_repo_head_hexsha": "bcb036fc753addcd09655b7a775dbcdb1f99f1f6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
Require Export Stlc.Inst.
Require Export Coq.Relations.Relation_Operators.
Require Export Common.Relations.
(** ** Evaluation *)
Fixpoint Value (t: Tm) : Prop :=
match t with
| abs τ t => True
| unit => True
| true => True
| false => True
| pair t₁ t₂ => Value t₁ ∧ ... | {"author": "dominiquedevriese", "repo": "facomp-stlc-coq", "sha": "77043e68813d3a7ed8926802191638f063de1544", "save_path": "github-repos/coq/dominiquedevriese-facomp-stlc-coq", "path": "github-repos/coq/dominiquedevriese-facomp-stlc-coq/facomp-stlc-coq-77043e68813d3a7ed8926802191638f063de1544/Stlc/SpecEvaluation.v"} |
import random
import numpy as np
import mnperm
from utils import mnperm_trn_size, schema_split_helper
''' Create datasets and save them to disk. '''
def get_state():
return random.getstate(), np.random.get_state()
def set_state(state):
rs, ns = state
random.setstate(rs)
np.random.set_state(ns)
def... | {"hexsha": "cde64059e07b8b0f578804f28b090f83ba6ab7ae", "size": 1415, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/creators.py", "max_stars_repo_name": "awd4/spnss", "max_stars_repo_head_hexsha": "1da2bf5c9c943bf02b6aef7cd7f53a457660499e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max... |
import ctypes
import numpy as np
from teplugins import *
#Get a lmfit plugin object
chiPlugin = Plugin("tel_chisquare")
lm = Plugin("tel_levenberg_marquardt")
#========== EVENT FUNCTION SETUP ===========================
def pluginIsProgressing(lmP):
# The plugin don't know what a python object is.
... | {"hexsha": "91ec4201570c853d05bcd50fb553255d727bd54b", "size": 2805, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/python/parameter_minimization/hard_model/telLevenbergMarquardt.py", "max_stars_repo_name": "sys-bio/rrplugins", "max_stars_repo_head_hexsha": "03af6ea70d73462ad88103f1e446dc0c5f3f971c", "... |
import numpy as np
from yggdrasil.metaschema.datatypes.tests import (
test_ScalarMetaschemaType as parent)
class TestOneDArrayMetaschemaType(parent.TestScalarMetaschemaType):
r"""Test class for ArrayMetaschemaType class."""
_mod = 'ArrayMetaschemaType'
_cls = 'OneDArrayMetaschemaType'
_shape = 10
... | {"hexsha": "d1e8d243caf4b7f3a98e596efa62ac003248b3b8", "size": 1281, "ext": "py", "lang": "Python", "max_stars_repo_path": "yggdrasil/metaschema/datatypes/tests/test_ArrayMetaschemaType.py", "max_stars_repo_name": "astro-friedel/yggdrasil", "max_stars_repo_head_hexsha": "5ecbfd083240965c20c502b4795b6dc93d94b020", "max_... |
import cv2
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = ['KaiTi'] # 指定默认字体
plt.rcParams['axes.unicode_minus'] = False # 解决保存图像是负号'-'显示为方块的问题
img_gray0 = cv2.imread("david_head.jpg", cv2.IMREAD_GRAYSCALE)
img_gray0 = 255 - img_gray0
h, w= img_gray0.shape
img_gray0 = cv2.resize(... | {"hexsha": "f10224ac3057fca2fa1310e3d1dd4da6a0ccdae8", "size": 2899, "ext": "py", "lang": "Python", "max_stars_repo_path": "ALGO/Floyd-Steinberg/Floyd_Steinberg.py", "max_stars_repo_name": "luhterluo/Zynq7010_eink_controller", "max_stars_repo_head_hexsha": "bb6a3cc8017d27abaf288a50589ef03cb6ae0e5a", "max_stars_repo_lic... |
import numpy as np
from qsim import Circuit, Executor, Operation
# subclass Executor
class CustomExecutor(Executor):
"""
Custom quantum operation executor for external backend, for example, based on GPU.
"""
def __init__(self, initial_state: np.ndarray):
# TODO: implement custom logic for stat... | {"hexsha": "a38721b5a520f9dc86f09ec1170231da880eb46f", "size": 784, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/custom_backend.py", "max_stars_repo_name": "ruanton/qsim", "max_stars_repo_head_hexsha": "5cfe6fb5e20c85749490bf5c69921e9902fa2e75", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# -*- coding: utf-8 -*
from unittest import TestCase
from pathlib import Path
import tempfile
import genty
import numpy as np
from . import _game
from . import _deck
from . import _utils
from ._deck import Card as C
_PLAYED_CARDS = ((0, '10❤'), (1, '9❤'), (2, '7❤'), (3, 'J❤'), (3, 'K♦'), (0, 'Q♦'), (1, '8♦'), (2, '7♦... | {"hexsha": "8a52fd9fcfd130946963efe28c0b284da6a89d14", "size": 6501, "ext": "py", "lang": "Python", "max_stars_repo_path": "qprojects/test_game.py", "max_stars_repo_name": "jrapin/qprojects", "max_stars_repo_head_hexsha": "85cee49f9606e61214711d47c585602a419a87ac", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
from io import BytesIO
import lmdb
from PIL import Image
from torch.utils.data import Dataset
from torchvision import transforms
import math
import torch
import json
import numpy as np
import os
transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize(0.5, 0.5)])
class Recipe1MDataset(Dat... | {"hexsha": "5f3dbe7de8e32c5d9881122b597aa77ebb7b90a7", "size": 4899, "ext": "py", "lang": "Python", "max_stars_repo_path": "metrics/datasets_inception.py", "max_stars_repo_name": "klory/CookGAN", "max_stars_repo_head_hexsha": "fbb71242376a2d4dc11577b8f2302c41fe0030f9", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
# -*- encoding: utf-8 -*-
#print(__doc__)
# Code source: Gaël Varoquaux
# Modified for documentation by Jaques Grobler
# License: BSD 3 clause
import numpy as np
import matplotlib.pyplot as plt
from sklearn import linear_model, datasets
# import some data to play with
iris = datasets.load_iris()
X = iris.data[:, :2... | {"hexsha": "e0181dad30fc4c904546daa07d22c11d993441f2", "size": 1361, "ext": "py", "lang": "Python", "max_stars_repo_path": "iris.py", "max_stars_repo_name": "Mineria/Titanic", "max_stars_repo_head_hexsha": "a2d0ccd7b8c9f74d2d4da183afc2ee9f34306d04", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "max_stars_r... |
import os
import gym
import numpy as np
import copy
import torch
from tensorboardX import SummaryWriter
from ding.config import compile_config
from ding.worker import BaseLearner, BattleInteractionSerialEvaluator, NaiveReplayBuffer
from ding.envs import BaseEnvManager, DingEnvWrapper
from ding.policy import PPOPolicy
... | {"hexsha": "e6aed59f397ac1bc3a5f23ce781ce98b8c9dfae6", "size": 4662, "ext": "py", "lang": "Python", "max_stars_repo_path": "dizoo/league_demo/selfplay_demo_ppo_main.py", "max_stars_repo_name": "jayyoung0802/DI-engine", "max_stars_repo_head_hexsha": "efbb35ddaf184d1009291e6842fbbae09f193492", "max_stars_repo_licenses": ... |
#-*-coding:Utf-8-*-
__author__ ="Virginie Lollier"
__version__ = "1.0.1"
__license__ = "BSD"
import re,os
# for array intersection (pb sur set() & set() qui ne conserve pas l'ordre des éléments)
import numpy as np
import random
import platform
import networkx as nx
import matplotlib.pyplot as plt
from utils impor... | {"hexsha": "50f498aa5ac974192306bfb425f9c6ea9418e37e", "size": 27457, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/MassSpectrometry.py", "max_stars_repo_name": "vlollier/oligator", "max_stars_repo_head_hexsha": "5e9ee77f7087eed274f9ffff27d5c695bfc14231", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s... |
using DataDeps
register(DataDep(
"HAR",
"""
Dataset: HAR
Website: https://archive.ics.uci.edu/ml/datasets/human+activity+recognition+using+smartphones
Observations: 10299 (7352 + 2947)
Features: 561
Classes: 6
Jorge L. Reyes-Ortiz(1,2), Davide Anguita(1), Alessandro Ghio(1), ... | {"hexsha": "0d5540d114f688ff2514b655c027de0b8b306148", "size": 3938, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/data/HAR.jl", "max_stars_repo_name": "alanderos91/SparseMVDA", "max_stars_repo_head_hexsha": "a2ade5627b3d05fb8346ee8f7f342b312011f6b4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
import os
import numpy
from .base import (
_base_mesh,
compute_ce_ratios,
compute_tri_areas,
compute_triangle_circumcenters,
)
from .helpers import grp_start_len, unique_rows
__all__ = ["MeshTri"]
class MeshTri(_base_mesh):
"""Class for handling triangular meshes."""
def __init__(self, nod... | {"hexsha": "f7bdbd6b3b17c4f3b8ddb710a434b7a126d20012", "size": 48219, "ext": "py", "lang": "Python", "max_stars_repo_path": "adaptmesh/meshplex/mesh_tri.py", "max_stars_repo_name": "arturs-berzins/adaptmesh", "max_stars_repo_head_hexsha": "8ce257d85b5943d2bca578ca67490e6b85ea8bec", "max_stars_repo_licenses": ["MIT"], "... |
[STATEMENT]
lemma ranI: "m a = Some b \<Longrightarrow> b \<in> ran m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. m a = Some b \<Longrightarrow> b \<in> ran m
[PROOF STEP]
by (auto simp: ran_def) | {"llama_tokens": 81, "file": null, "length": 1} |
"""
This version of autoencoder is able to save weights and load weights for the
encoder and decoder portions of the network
"""
# from gpu_utils import pick_gpu_lowest_memory
# gpu_free_number = str(pick_gpu_lowest_memory())
#
# import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '{}'.format(gpu_free_number)
import a... | {"hexsha": "0eec077a2bf6050c181ca776850ab2390f8608ad", "size": 15185, "ext": "py", "lang": "Python", "max_stars_repo_path": "chemvae/train_vae.py", "max_stars_repo_name": "samuel-velez/chemical_vae", "max_stars_repo_head_hexsha": "389e9822b1ee7a1f28cc0b0a21bb1b7fdf8218a5", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
import os
import cv2 as cv
import numpy as np
BaseDir = os.path.dirname(os.path.abspath(__file__))
path = os.path.join(BaseDir, 'haarcascade_frontalface_alt_tree.xml')
def face_detect_demo(image):
# 人脸识别
gray = cv.cvtColor(image, cv.COLOR_BGR2GRAY)
face_detector = cv.CascadeClassifier(path)
faces = f... | {"hexsha": "c32a13b198fd78026c2003746be40b338c5eae85", "size": 895, "ext": "py", "lang": "Python", "max_stars_repo_path": "BaseSkill/opencv_test/face.py", "max_stars_repo_name": "ktjack2009/MachineLearing", "max_stars_repo_head_hexsha": "fcb6e491f3f74ef1046d19e38af99b0973709b16", "max_stars_repo_licenses": ["Apache-2.0... |
"""
Widgets for plotting multi-channel signals.
"""
import numpy as np
import pyqtgraph as pg
from PyQt5.QtGui import QFont
class SignalWidget(pg.GraphicsLayoutWidget):
"""
Scrolling oscilloscope-like widget for displaying real-time signals.
Intended for multi-channel viewing, each channel gets its own ro... | {"hexsha": "067d0fe6a2be0a681785f5bb3c04ffb0db3ce05e", "size": 10932, "ext": "py", "lang": "Python", "max_stars_repo_path": "axopy/gui/graph.py", "max_stars_repo_name": "agamemnonc/axopy", "max_stars_repo_head_hexsha": "e8c324a4ecfc0abdec3016bca62dcf84d371b6c0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2,... |
import sys
import json
import logging
import numpy as np
from os.path import join, abspath, dirname, pardir
from pycocotools.coco import COCO
from pycocotools.cocoeval import COCOeval
import contextlib
import io
import os
LOG_FORMAT = "%(asctime)s %(name)-12s %(levelname)-8s %(message)s"
BASE_DIR = abspath(join(dirnam... | {"hexsha": "1209bf111b6442b91fde9b3640f11a65f4555ae9", "size": 9914, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/results2mAP_cdsb.py", "max_stars_repo_name": "WFDetector/WFDetection", "max_stars_repo_head_hexsha": "b16d35b3a3a5de62de9e0bac83eccd21b6358b53", "max_stars_repo_licenses": ["Apache-2.0"], "m... |
[STATEMENT]
lemma gba_rename_correct:
fixes G :: "('v,'l,'m) gba_rec_scheme"
assumes "gba G"
assumes INJ: "inj_on f (g_V G)"
defines "G' \<equiv> gba_rename f G"
shows "gba G'"
and "finite (g_V G) \<Longrightarrow> finite (g_V G')"
and "gba.accept G' = gba.accept G"
and "gba.lang G' = gba.lang G"
[PRO... | {"llama_tokens": 1377, "file": "CAVA_Automata_Automata", "length": 17} |
#=
Aodwt.jl
2019-02-23 Jeff Fessler, University of Michigan
=#
export Aodwt
using LinearMapsAA: LinearMapAA, LinearMapAM, LinearMapAO
using Wavelets: dwt!, idwt!, wavelet, WT
"""
A, levels, mfun = Aodwt(dims ; level::Int=3, wt=wavelet(WT.haar))
Create orthogonal discrete wavelet transform (ODWT) `LinearMapAA`
... | {"hexsha": "f595481606b1318cafe294f1285f3d2ab69cde50", "size": 2110, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/regularize/Aodwt.jl", "max_stars_repo_name": "jamesthesnake/MIRT.jl", "max_stars_repo_head_hexsha": "3a4b1e33a35e2ab062f532a22866bfb11f6e5cd5", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import numpy as np
def calculate_distance(longitude, latitude, units_gps='semicircles', units_d='m',
mode='start', fixed_lon=1601994.0, fixed_lat=622913929.0):
"""Calculate the great circle distance between two points
on the earth using the Haversine formula.
Arguments:
longitu... | {"hexsha": "0d5f1ef917de1e394cd84f206f2de9686dc105c6", "size": 3024, "ext": "py", "lang": "Python", "max_stars_repo_path": "fitness/gps.py", "max_stars_repo_name": "anaandresarroyo/GarminDataAnalyserOld", "max_stars_repo_head_hexsha": "6f215e59903395b2fccfd54f0d083cee563d39e0", "max_stars_repo_licenses": ["MIT"], "max_... |
export TransposeOperator
mutable struct TransposeOperator{T<:Number,B<:Operator} <: Operator{T}
op::B
end
TransposeOperator(B::Operator{T}) where {T<:Number}=TransposeOperator{T,typeof(B)}(B)
convert(::Type{Operator{T}},A::TransposeOperator) where {T}=TransposeOperator(convert(Operator{T},A.op))
domainspac... | {"hexsha": "e4cbdfc9a0b98c24b29bc937aae738cec4b735ce", "size": 862, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Operators/general/TransposeOperator.jl", "max_stars_repo_name": "jw3126/ApproxFun.jl", "max_stars_repo_head_hexsha": "e244b8c3481467c3f38b56bf5170c89104194b47", "max_stars_repo_licenses": ["BSD-... |
import os
import sys
import pickle
import numpy as np
import pandas as pd
from os import path
import seaborn as sns
from scipy import sparse, io
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
from dotenv import load_dotenv, find_dotenv
%matplotlib inline
dotenv_path = find_dotenv()
load_doten... | {"hexsha": "daf0f3e2b98f134f9aa0cc44ad26b147fcba8917", "size": 9920, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/position_exploration.py", "max_stars_repo_name": "Kebniss/Capstone-project", "max_stars_repo_head_hexsha": "4364246a7faf838fae8b558a3f66bbd9cc1f73e6", "max_stars_repo_licenses": ["MIT"], ... |
from flask_restplus import Namespace, Resource, fields
from SPARQLWrapper import SPARQLWrapper, JSON
import re
import os
import operator
import datetime
import json
import pprint
import random
import string
import sys
import tensorflow as tf
import time
import spacy
import requests
import bs4
import torch
import numpy ... | {"hexsha": "201865b97ed0f24713493b0d5ed9f1e80f7b080b", "size": 15949, "ext": "py", "lang": "Python", "max_stars_repo_path": "BackEnd/api/endpoints/graph/askquestion.py", "max_stars_repo_name": "camilleAmaury/X5GON_project", "max_stars_repo_head_hexsha": "8d5b61eb45a357fe1881c0523389d463724c6448", "max_stars_repo_licens... |
#
# SPDX-FileCopyrightText: Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
"""Layer for utility functions needed for Convolutional Codes."""
import numpy as np
import tensorflow as tf
from sionna.fec.utils import int2bin, bin2int
def polynomial_se... | {"hexsha": "8b9f06c161370bd128fc64d19a0d70b16a0bbcd2", "size": 4881, "ext": "py", "lang": "Python", "max_stars_repo_path": "sionna/fec/conv/utils.py", "max_stars_repo_name": "NVlabs/sionna", "max_stars_repo_head_hexsha": "488e6c3ff6ff2b3313d0ca0f94e4247b8dd6ff35", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c... |
(* Property from Productive Use of Failure in Inductive Proof,
Andrew Ireland and Alan Bundy, JAR 1996.
This Isabelle theory is produced using the TIP tool offered at the following website:
https://github.com/tip-org/tools
This file was originally provided as part of TIP benchmark at the following web... | {"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/UR/TIP_with_Proof/Prod/Prod/TIP_prop_09.thy"} |
import numpy as np
from scipy.optimize import linear_sum_assignment
from utils.cost import compute_iou_dist
def match_bbox_keypoint(bboxes, all_keypoints):
# Group bboxes & keypoints together
kbboxes = []
for keypoints in all_keypoints:
valids = keypoints[(keypoints[:, 0]*keypoints[:, 1])>0, :]
... | {"hexsha": "587cbca98842fbd5410801e6023bb190d14bc237", "size": 1137, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/assign.py", "max_stars_repo_name": "johnnylord/trytry-bodypose-orientation", "max_stars_repo_head_hexsha": "96fc9a2a60608c192bde84d5dd0422b33875d35d", "max_stars_repo_licenses": ["MIT"], "ma... |
! MPI example (Distributed memory)
! module load openmpi-x86_64
! mpif90 hello_mpi.f90 -o hello_mpi
! To execute it on 4 processors:
! mpirun -np 4 ./hello_mpi
program hello_mpi
implicit none
include 'mpif.h'
integer :: rank, size, ierror, tag
integer :: status(MPI_STATUS_SIZE)
call MPI_INIT(ierr... | {"hexsha": "7cfe492da6061631b8af1b78df9f09bb8360a9db", "size": 520, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/otherFortran/hello_mpi.f90", "max_stars_repo_name": "annefou/Fortran", "max_stars_repo_head_hexsha": "9d3d81de1ae32723e64eb3d07195867293a82c5e", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
def generateKey(x):
import string
import numpy as np
import sympy
import random
key=""
if x>10:
randomlist = random.sample(range(0, 100), 10)
else:
randomlist=random.sample(range(0,100),x-1)
rand_prime=sympy.randprime(0,9999)
key_array=np.identity(x)
key_array=key... | {"hexsha": "2a4a2cdf3a4a705cd72dee782f52f73ef447304c", "size": 2903, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/EncryptionAlgo_Py/HillCipher.py", "max_stars_repo_name": "shruti8301/Algorithms-Cheatsheet-Resources", "max_stars_repo_head_hexsha": "cece012bba7f47c3a1ecfaff380dcbc787c26149", "max_stars_r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.