text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
# pylint:disable=unsupported-membership-test
# pylint:disable=unsubscriptable-object
# pylint:disable=unsupported-assignment-operation
"""Antenna Circuit
This module supports:
1. Changing the affinity values of each of the odorant-receptor pairs
characterizing the input of the Odorant Transduction Process.
2. Changin... | {"hexsha": "5ed04b3cb7ca416a5519c2b54058aafcbd446445", "size": 10735, "ext": "py", "lang": "Python", "max_stars_repo_path": "eoscircuits/antcircuits/circuit.py", "max_stars_repo_name": "FlyBrainLab/EOScircuits", "max_stars_repo_head_hexsha": "2ade33db402997f5001f1707f136370c660dce33", "max_stars_repo_licenses": ["BSD-3... |
import sys
import os
sys.path.insert(0, os.path.abspath("../tstcommon"))
import commondata2d as cd
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
from utils import to_cpp
inp = cd.inp.reshape(cd.inp.shape[1:])
inp.requires_grad_()
in_feat = 8
out_feat = 4
batch_size = 3
fc = nn.... | {"hexsha": "a07646559562b92f62c19689d098e227d9c0bcb2", "size": 1137, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/losses/crossentropy.py", "max_stars_repo_name": "fierval/EigenSiNN", "max_stars_repo_head_hexsha": "4ed01b47d4b13b9c9e29622475d821868499942d", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | {"hexsha": "e75666617e245f40ed0b014fde0b345852730ec5", "size": 67569, "ext": "py", "lang": "Python", "max_stars_repo_path": "skbio/alignment/_alignment.py", "max_stars_repo_name": "JWDebelius/scikit-bio", "max_stars_repo_head_hexsha": "9df3edb46eb728f6efbd4f2db74529200ad40a77", "max_stars_repo_licenses": ["BSD-3-Clause... |
from configs import cfg
from src.utils.record_log import _logger
import tensorflow as tf
import numpy as np
from abc import ABCMeta, abstractmethod
class ModelTemplate(metaclass=ABCMeta):
def __init__(self, token_emb_mat, glove_emb_mat, tds, tel, hn, scope):
self.scope = scope
self.global_step = t... | {"hexsha": "748ac366be4939554a7da0e390d70e4e67a98317", "size": 8609, "ext": "py", "lang": "Python", "max_stars_repo_path": "BiBloSA/exp_SQuAD_sim/src/model/model_template.py", "max_stars_repo_name": "mikimaus78/ml_monorepo", "max_stars_repo_head_hexsha": "b2c2627ff0e86e27f6829170d0dac168d8e5783b", "max_stars_repo_licen... |
"""Calculate dynamic aperture."""
import numpy as _np
import pyaccel.naff as _pynaff
from ..utils import DataBaseClass as _BaseClass
class BaseClass(_BaseClass):
"""."""
COLORS = ('k', 'b', 'r', 'g', 'm', 'c')
def __str__(self):
"""."""
return str(self.params)
# class methods
... | {"hexsha": "e73b538111b60395fe8088304e1635f6c76f2c8c", "size": 9550, "ext": "py", "lang": "Python", "max_stars_repo_path": "apsuite/dynap/base.py", "max_stars_repo_name": "carneirofc/apsuite", "max_stars_repo_head_hexsha": "1bbaa44ec6b89f50201790d6fab05c32729db6e1", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
# Defining Custom Display Logic for Your Own Objects
## Overview
In Python, objects can declare their textual representation using the `__repr__` method. IPython expands on this idea and allows objects to declare other, richer representations including:
* HTML
* JSON
* PNG
* JPEG
* SVG
* LaTeX
This Notebook shows ... | {"hexsha": "3e9eba577a70ce0fc1f025f6983e8cc93696f065", "size": 18408, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "001-Jupyter/001-Tutorials/003-IPython-in-Depth/examples/IPython Kernel/Old Custom Display Logic.ipynb", "max_stars_repo_name": "jhgoebbert/jupyter-jsc-notebooks", "max_stars_repo_hea... |
# Core Pkgs
import streamlit as st
# NLP Pkgs
import spacy_streamlit
import spacy
#nlp = spacy.load('en')
import os
from PIL import Image
from gensim.summarization.summarizer import summarize
from gensim.summarization import keywords
import trafilatura
#import pdfplumber
import en_core_web_md
#import zipfile
#!python... | {"hexsha": "51f6a99a412388a572a907fa704c072b216c585e", "size": 19352, "ext": "py", "lang": "Python", "max_stars_repo_path": "streamlit_appv1.py", "max_stars_repo_name": "fm1320/ICL", "max_stars_repo_head_hexsha": "ce43739b202ee1253e6c3b80debc0652d712d4c5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_... |
import tensorflow as tf
import numpy as np
import argparse
import socket
import importlib
import time
import os
import scipy.misc
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(BASE_DIR)
sys.path.append(os.path.join(BASE_DIR, 'models'))
sys.path.append(os.path.join(BASE_DIR, 'utils'))
... | {"hexsha": "28a1b541d33114d422c59b7eb8bb6b0e9fd5ab56", "size": 2113, "ext": "py", "lang": "Python", "max_stars_repo_path": "pointnet/evaluatorOne.py", "max_stars_repo_name": "ErikNoren92/Exjobb", "max_stars_repo_head_hexsha": "eb4b36d2241043a7b81f6bf9ff5596176aebcd27", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import pygame
import numpy as np
from Source import UI_functions as UI
from Source import battleships_functions_bot as bfb
from Source import battleships_functions_check as bfc
def Play_Game(screen, bg, cfg):
#Init
screen, bg = UI.Update_Screen_Values(screen, bg)
pygame.time.Clock().tick(cfg["Basic"].... | {"hexsha": "ac46915ed60f6f977d96ec5919d4614d21f262fd", "size": 3517, "ext": "py", "lang": "Python", "max_stars_repo_path": "Battleships/Source/Set_Ai_ai_game.py", "max_stars_repo_name": "Dorthion/Python-Minigames", "max_stars_repo_head_hexsha": "91ba20d42ac7376ccaad60cd948a576800085623", "max_stars_repo_licenses": ["MI... |
#-*- coding:utf -8-*-
#http://www.cnblogs.com/huadongw/p/6159408.html
#数据重采样
#python SampleData.py -s 0 trainJ/train.txt 64 trainJ/trainSample.txt
#
# 从python调用shell脚本
# !/usr/bin/python
# import sys
# import os
# print "start call sh file"
# os.system('./fromsh.sh')
# print "end call sh file"
#
# 从shell脚本调用python
# !/... | {"hexsha": "0da62838e6709f0bca5a9f36d5156e4155288716", "size": 4314, "ext": "py", "lang": "Python", "max_stars_repo_path": "SampleData.py", "max_stars_repo_name": "xyj77/dataLoader", "max_stars_repo_head_hexsha": "c80dcdb355ff07c1e9e1029e4765ac9546b31522", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 41, "max... |
[STATEMENT]
lemma (in normal) oVeblen_oLimit:
"oVeblen F (oLimit f) = ordering (\<Inter>n. range (oVeblen F (f n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. oVeblen F (oLimit f) = OrdinalVeblen.ordering (\<Inter>n. range (oVeblen F (f n)))
[PROOF STEP]
apply (unfold oVeblen_def)
[PROOF STATE]
proof (prove)
go... | {"llama_tokens": 495, "file": "Ordinal_OrdinalVeblen", "length": 5} |
[STATEMENT]
lemma mset_le_single_iff[iff]: "{#x#} \<le> {#y#} \<longleftrightarrow> x \<le> y" for x y :: "'a::order"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ({#x#} \<le> {#y#}) = (x \<le> y)
[PROOF STEP]
unfolding less_eq_multiset\<^sub>H\<^sub>O
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<forall>ya... | {"llama_tokens": 213, "file": null, "length": 2} |
SUBROUTINE PIECHT(XORIG,YORIG,RADIUS,VALUES,NSECS)
C
C ------------------------------------------------
C ROUTINE NO. ( 86) VERSION (A8.3) 21:MAR:86
C ------------------------------------------------
C
C THIS DRAWS THE PIECHART SECTOR BY SECTOR.
C
C THE ARGUMENT... | {"hexsha": "a71a80f12161ffeecc57fdacea172ae78890ad90", "size": 2852, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/lib/piecht.f", "max_stars_repo_name": "ZedThree/GHOST", "max_stars_repo_head_hexsha": "cba30b43bdcc73fb87cff0724337a7d3a1bd7812", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
-- Andreas, 2015-09-09 Issue 1643
-- {-# OPTIONS -v tc.mod.apply:20 #-}
-- {-# OPTIONS -v tc.signature:30 #-}
-- {-# OPTIONS -v tc.display:100 #-}
-- {-# OPTIONS -v scope:50 -v scope.inverse:100 -v interactive.meta:20 #-}
module _ where
module M where
postulate A : Set
module N = M -- This alias used to introduc... | {"hexsha": "bead4e2ca66a959c5be170734001edadcd6715fa", "size": 442, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Fail/Issue1643a.agda", "max_stars_repo_name": "shlevy/agda", "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c... |
#!/usr/bin/env python
import numpy as np
import pickle
import matplotlib.pyplot as plt
from matplotlib.ticker import FormatStrFormatter,ScalarFormatter
'''
This script generates the average trace over 10 different initial conditions.
GCG
04.02.2020
'''
seed_number = 10 #number of seeds
nv = 6 #number of variables
np... | {"hexsha": "9ad9e509be147302c7206c0a70b183cc43060576", "size": 1629, "ext": "py", "lang": "Python", "max_stars_repo_path": "odes_and_figures/non_equilibrium_induced_gradients/generate_av_hits.py", "max_stars_repo_name": "guadagar/Mitochondrial_morphology", "max_stars_repo_head_hexsha": "39c29b909002f975bab5fe436165d63f... |
import pygame.camera
import sys
import PIL
from PIL import Image
import numpy
from threading import Thread
import SocketServer
import json
import whistler
whistler.im = Image.new("RGB", (1024, 640), "white")
draw_target = whistler.draw_and_compare
import pointillism
class JsonConfigServer(SocketServer.ThreadingTCPSe... | {"hexsha": "8a8940ec6103c4a8d36d71d7c31f6b8f73cf5e6f", "size": 3536, "ext": "py", "lang": "Python", "max_stars_repo_path": "project_code/live_painter.py", "max_stars_repo_name": "BlainMaguire/devart-template", "max_stars_repo_head_hexsha": "f295f91866deb6935b46191bd406e22cf44620ca", "max_stars_repo_licenses": ["Apache-... |
import rosbag
import roslib
import sys
import rospy
import cv2
from std_msgs.msg import String
from sensor_msgs.msg import Image, CameraInfo
from cv_bridge import CvBridge, CvBridgeError
import std_msgs
import os
import glob
import numpy as np
import argparse
import yaml
'''
@author: Pushyami Kaveti
This is a tool t... | {"hexsha": "2c8bfc06c0bd99b09e80a63f70f19ec4853082b0", "size": 5043, "ext": "py", "lang": "Python", "max_stars_repo_path": "image2bag/image2bag.py", "max_stars_repo_name": "neufieldrobotics/rosbag_toolk", "max_stars_repo_head_hexsha": "b8317af1f03ab0e7afe023d7cd884b3418286da9", "max_stars_repo_licenses": ["MIT"], "max_... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: agent.py
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>
import numpy as np
import cv2
import tensorflow as tf
#assert int(tf.__version__.split('.')[1]) == 9
assert int(np.__version__.split('.')[1]) >= 11
from collections import deque, Counter
import random
import time
... | {"hexsha": "a71784285e1103f855a40656cf76344c4fbfb761", "size": 7374, "ext": "py", "lang": "Python", "max_stars_repo_path": "f1/F1_track1/agent.py", "max_stars_repo_name": "ebonyclock/vizdoom_cig2017", "max_stars_repo_head_hexsha": "42baffa7c6ee43db618605838ea6f9e0547001d1", "max_stars_repo_licenses": ["MIT"], "max_star... |
# cd; conda activate food; cd food; python 0_food_app.py &>>$HOME/app1.log & disown
from tendo import singleton
me = singleton.SingleInstance()
import pandas as pd
import numpy as np
from food.tools import *
from food.psql import *
from food.paths import *
from time import sleep
######default_exp psql
from food.too... | {"hexsha": "1b14b2a59f0bd02212d3ba357eb52740ec8e29b0", "size": 1015, "ext": "py", "lang": "Python", "max_stars_repo_path": "0_food_app.py", "max_stars_repo_name": "DmitriyG228/food", "max_stars_repo_head_hexsha": "dc2375b06a47e742573e53b86d87f3ecd5b160bf", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": n... |
\documentclass[11pt]{article}
\usepackage{doc}
\usepackage{fullpage}
\usepackage{fancyvrb}
\usepackage{pdfpages}
\usepackage{url}
\usepackage{color}
\usepackage{hyperref}
\hypersetup{
bookmarks=true, % show bookmarks bar?
colorlinks=true, % false: boxed links; true: colored links
linkcolor... | {"hexsha": "ec352df792a7ce08fe2ef1e25a877029394f52c3", "size": 21545, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/shoc-manual.tex", "max_stars_repo_name": "ashwinma/mpiacc-contention-tests", "max_stars_repo_head_hexsha": "6246ad9b177095220aa9cea5c85def7effd78222", "max_stars_repo_licenses": ["BSD-3-Clause-... |
import numpy as np
import torch
import torch.nn as nn,torch.nn.functional as F,torch.optim as optim
from loader import dataReader
#########2.定义卷积神经网络
class MnistNet(nn.Module):
def __init__(self):
super(MnistNet, self).__init__()
pass
def forward(self, x):
pass
... | {"hexsha": "02686ebcda271d30521c3290be24f6ec956c336b", "size": 2982, "ext": "py", "lang": "Python", "max_stars_repo_path": "task_2/src/mnist_net.py", "max_stars_repo_name": "Hickey3197/educoder", "max_stars_repo_head_hexsha": "bf45cef420c7b1f1d052cb108e9be8e14a724068", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
#! /usr/bin/env python
"""
Author: Jeremy M. Stober
Program: MDP.PY
Date: Monday, January 11 2010
Description: Basic MDP framework for Markov Decision Problems.
"""
import os, sys, getopt, pdb, string
import functools
import random as pr
import numpy as np
import numpy.random as npr
import scipy.sparse as sp
from uti... | {"hexsha": "03d80be79905970ef8e085fd1c68bef24c69a995", "size": 27692, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/markovdp.py", "max_stars_repo_name": "stober/gridworld", "max_stars_repo_head_hexsha": "58762295687f890a66f1bfff0a22b05d62044d80", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_coun... |
from skimage.exposure import rescale_intensity
import numpy as np
import cv2
import argparse
def conv(image,kernal):
iH,iW=image.shape[:2]
kH,kW=kernal.shape[:2]
pad=(kH-1) // 2
image=cv2.copyMakeBorder(image,pad,pad,pad,pad,cv2.BORDER_REPLICATE)
out=np.zeros((iH,iW),dtype="float")
for y in np.arange(pad,iH... | {"hexsha": "bd1c659fb5e18a8efcd9746d29a7d5e185359ced", "size": 1970, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/convolution.py", "max_stars_repo_name": "suhaneshivam/backprop", "max_stars_repo_head_hexsha": "2539948fccf21d4c515476144d8d93b5094f9e09", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import os
import glob
import trimesh
import math
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import cm
from . import utils
def plot_csv_column(pInFolder, pOutFolder, pCSV, pColName, pClip = 1000, label_size=5) :
cwd = os.getcwd()
inFolder = cwd + pInFolder
csv = i... | {"hexsha": "77834090f86dfeb577ea81b23436622b72147c96", "size": 7462, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/src/data_analysis.py", "max_stars_repo_name": "cgaueb/deep_bim", "max_stars_repo_head_hexsha": "d34c4fdefd921a11a26e56b5823ab2a0b64ea311", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import matplotlib.pyplot as plt
import numpy as np
from itertools import combinations, product
from scipy.spatial import KDTree
# GEOMETRY
# --------
def ang(x, y):
"angle between two point x, y with respect to x axis"
return np.arctan(1/np.divide(*(y-x)))
def reorganize(a, b, c, d, return_idxs=False):
... | {"hexsha": "7b54ae5ad1a13e81581b87ee202ebb9ff3d5be30", "size": 8504, "ext": "py", "lang": "Python", "max_stars_repo_path": "prose/twirl/utils.py", "max_stars_repo_name": "lgrcia/prose", "max_stars_repo_head_hexsha": "bf5482f775eb8cfee261620901cebafb6edb650a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 22, "... |
# -*- coding: utf-8 -*-
"""Test of Fancy module
This module test the various functions present in the Fancy module.
"""
import datetime
import unittest
import unittest.mock
import sys
import matplotlib.pyplot as plt
import numpy as np
from numpy.testing import assert_array_equal
import pandas as pd
from pandas.api.typ... | {"hexsha": "d5c793d1224c4425d8525e1c70d71304fa01a31c", "size": 21775, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_fancy.py", "max_stars_repo_name": "axelfahy/FancyPythonThings", "max_stars_repo_head_hexsha": "5df204973f94dab5e7081c59d25554165db955c9", "max_stars_repo_licenses": ["MIT"], "max_stars... |
"""
Methods to load data, analyze customer churn,
train models and plot training results
"""
import os
import logging
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
fr... | {"hexsha": "26fb73760c2950f14e64ed05d6fd880409df16c4", "size": 11333, "ext": "py", "lang": "Python", "max_stars_repo_path": "1 clean code/Project Predict customer churn with clean code/churn_library.py", "max_stars_repo_name": "philippschmalen/ml-devops-engineer", "max_stars_repo_head_hexsha": "98c4c94b807215e2a9099052... |
from __future__ import annotations
__all__ = [
'coroutine', 'lock_seed', 'summary', 'trace', 'trace_module', 'whereami'
]
import functools
import gc
import inspect
import os
import random
import threading
import types
from collections import Counter
from collections.abc import Callable, Generator, Hashable, Itera... | {"hexsha": "8a66e6fa3f6769fcccf3f0692ff22df82ec0c4e8", "size": 4949, "ext": "py", "lang": "Python", "max_stars_repo_path": "glow/core/debug.py", "max_stars_repo_name": "arquolo/glow", "max_stars_repo_head_hexsha": "c4c63e36551cd1eec2e34129dbc0f06c788099de", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
# ---
# title: 1311. Get Watched Videos by Your Friends
# id: problem1311
# author: Tian Jun
# date: 2020-10-31
# difficulty: Medium
# categories: Hash Table, String, Breadth-first Search
# link: <https://leetcode.com/problems/get-watched-videos-by-your-friends/description/>
# hidden: true
# ---
#
# There are `n` peop... | {"hexsha": "0fc282de3d27dc27d90b46199aa6e8303c16b825", "size": 2536, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/unresolved/1311.get-watched-videos-by-your-friends.jl", "max_stars_repo_name": "jmmshn/LeetCode.jl", "max_stars_repo_head_hexsha": "dd2f34af8d253b071e8a36823d390e52ad07ab2e", "max_stars_repo_li... |
"""
module FEIO
All file input/output functionality. Includes 3DG interoperability
"""
module FEIO
using FELinearAlgebra
export dgtraits, read_array, write_array, read_solution, write_solution
"""
dgtraits(a::Array{T,N}) where {T,N}
Compatibility of types with 3DG
"""
dgtraits(a::Array{T,N}) where {T,N} = dg... | {"hexsha": "ff4516895ff64451742b703bb75cef6f498bd706", "size": 2415, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/FEIO.jl", "max_stars_repo_name": "NoseKnowsAll/DGToolkit", "max_stars_repo_head_hexsha": "e029ed96f337b187876a52a3f63b7636336374c6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m... |
import sympy
class Variables:
# lists of sympy variables
x = []
y = []
z = []
def __init__(self, nr_x, nr_y, nr_z):
self.load_variables("x", nr_x)
self.load_variables("y", nr_y)
self.load_variables("z", nr_z)
"""
This generates <code> to be used with exec(<code>)
... | {"hexsha": "6ec60bbbf338a392949c6f9cd958701c59ca1512", "size": 2196, "ext": "py", "lang": "Python", "max_stars_repo_path": "variables.py", "max_stars_repo_name": "iuliansimion/Chevalley", "max_stars_repo_head_hexsha": "9122b1002db99c352533c99f7e143f5be8f8c34b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
import numpy as np
def noise_model():
#######################################################
# Noise model for qBucket
## 0) Additive noise,
## 1) Zero-mean,
## 2) Standard deviation is a fixed at .02
## 3) min: Truncated below at min,
## 4) size: number of samples,
## 5) Closure take... | {"hexsha": "8dbe8c17bb1f224179d4aaf7cb7c724e431060d9", "size": 653, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/wrf_hydro/python/perturb/noise_qBucket_additive.py", "max_stars_repo_name": "hkershaw-brown/feature-preprocess", "max_stars_repo_head_hexsha": "fe2bd77b38c63fa0566c83ebc4d2fac1623aef66", "ma... |
MODULE linear_algebra
CONTAINS
SUBROUTINE solve_leqs(N,A,sol,triv)
! solve the linear equations Ax=0
! return a minimal solution,i.e.,in x the number of nonzero element is samllest but not 0
IMPLICIT NONE
INTEGER,INTENT(IN)::N
REAL(KIND(1d0)),DIMENSION(N,N),INTENT(IN)::A
REAL(KIND(1d0)),DIMENS... | {"hexsha": "6f7082914e14d9b00dc69f90ddb9ef538d1ee779", "size": 5180, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "vendor/IREGI/src/linear_algebra.f90", "max_stars_repo_name": "valassi/mg5amc_test", "max_stars_repo_head_hexsha": "2e04f23353051f64e1604b23105fe3faabd32869", "max_stars_repo_licenses": ["NCSA"],... |
Module Base.
Inductive t :=
| A
| B.
Definition f0 x :=
match x with
| A => A
| B => B
end.
Print f0.
Definition f0bis x y :=
match x, y with
| A, A => A
| _, _ => B
end.
Print f0bis.
End Base.
Definition f1 n :=
match n with
| O => Base.A
| S _ => Base.B
end.
Print f1.
Definition f2 n :=... | {"author": "thierry-martinez", "repo": "small_inversion", "sha": "00714ff638926422a9aa26d10c75fdd1b5625021", "save_path": "github-repos/coq/thierry-martinez-small_inversion", "path": "github-repos/coq/thierry-martinez-small_inversion/small_inversion-00714ff638926422a9aa26d10c75fdd1b5625021/test.v"} |
#using Pkg
#pkg"activate .."
#push!(LOAD_PATH,"../src/")
using MPT, Documenter
DocMeta.setdocmeta!(MPT, :DocTestSetup, :(using MPT); recursive=true)
makedocs(;
modules=[MPT],
authors="Kiar Fatah",
repo="https://github.com/Xiar-fatah/MPT.jl/blob/{commit}{path}#{line}",
sitename="MPT.jl",
format=Do... | {"hexsha": "1ea6c5604a67048dd9d47c574fd84d498055b104", "size": 754, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "Xiar-fatah/MPT.jl", "max_stars_repo_head_hexsha": "aa3225e6e446ce227a3dcbabe54caffcddc01217", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max... |
! Copyright 2019 Khang Hoang Nguyen
!
! Permission is hereby granted, free of charge, to any person obtaining
! a copy of this software and associated documentation files
! (the "Software"), to deal in the Software without restriction,
! including without limitation the rights to use, copy, modify, merge,
! publish, di... | {"hexsha": "5f2178aecda7ed7c2f2e733d6cb69a0de884ce40", "size": 15839, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/fnDecimalUtil64.f90", "max_stars_repo_name": "kevinhng86/Fortran-faiNumber", "max_stars_repo_head_hexsha": "3514b7463ef2c6f8673527a5b3b4184845d0955e", "max_stars_repo_licenses": ["MIT"], "m... |
# -*- coding: utf-8 -*-
#pylint: disable-msg=E0611, E1101, C0103, R0901, R0902, R0903, R0904, W0232
#------------------------------------------------------------------------------
# Copyright (c) 2007-2020, Acoular Development Team.
#------------------------------------------------------------------------------
import ... | {"hexsha": "232a49d6b38a6ed5b35b86c43ba553f5b410012d", "size": 11478, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/Measurement_App/sinus_dev.py", "max_stars_repo_name": "acoular/spectacoular", "max_stars_repo_head_hexsha": "eed39695df6c81cb179eae7429a020f71ed00dfc", "max_stars_repo_licenses": ["BSD-3-Cla... |
[STATEMENT]
lemma exhaust_4:
fixes x :: 4
shows "x = 1 \<or> x = 2 \<or> x = 3 \<or> x = 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. x = 1 \<or> x = 2 \<or> x = 3 \<or> x = 4
[PROOF STEP]
proof (induct x)
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. \<And>z. \<lbrakk>0 \<le> z; z < int CARD(4)\<rbrakk... | {"llama_tokens": 1088, "file": null, "length": 12} |
"""
global-land-mask is a python module for checking whether a lat/lon point is
on land or on sea. In order to do this, we use the globe dataset,
which samples the entire earth at 1 km resolution.
The global mask is of shape (21600, 43200), coming to about 980 mB when
saved without compression. This data can be compr... | {"hexsha": "470b0278ddcd2b1f0b601f6a1d9782d2ee77f7f3", "size": 2925, "ext": "py", "lang": "Python", "max_stars_repo_path": "global_land_mask/globe.py", "max_stars_repo_name": "toddkarin/global-land-mask", "max_stars_repo_head_hexsha": "55b4502f077deb4bfae1c99ff5a2f09ad7db3540", "max_stars_repo_licenses": ["MIT"], "max_... |
using HypothesisTests
using StatsBase
using Base.Test
#Example 1 in R
#Agresti (2007) p. 39
d = [[762,484] [327,239] [468,477]]
m = PowerDivergenceTest(d)
@test_approx_eq m.theta0 [0.25523082406125785,0.19670969099133556,0.11593952361049113,0.08935608756107216,0.1935739395970214,0.1491899341788219]
@test_approx_eq ... | {"hexsha": "08dd87c8719edc85da36fe48fe03be2b4c2889b6", "size": 4271, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/power_divergence.jl", "max_stars_repo_name": "bjarthur/HypothesisTests.jl", "max_stars_repo_head_hexsha": "a964ed55157664c8c8bc3b01cc48f71fef1c90ce", "max_stars_repo_licenses": ["MIT"], "max_s... |
"""
XEM6010 Phase-lock box GUI, displays diagnostics on the raw signal, phase noise measurements, and loop filters tuning
by JD Deschenes, October 2013
"""
from __future__ import print_function
import time
from PyQt5 import QtGui, Qt
#import PyQt5.Qwt5 as Qwt
import numpy as np
import math
from scipy.signal import lfi... | {"hexsha": "dce53fa82ff87ff85fec404b6ed0cdbe92040cc7", "size": 71177, "ext": "py", "lang": "Python", "max_stars_repo_path": "digital_servo_python_gui/XEM_GUI_MainWindow.py", "max_stars_repo_name": "jddes/Frequency-comb-DPLL", "max_stars_repo_head_hexsha": "4b742f852ab1545c54ee17674a5c9bef1f7e3350", "max_stars_repo_lice... |
\hypertarget{section}{%
\section{1}\label{section}}
\bibverse{1} The beginning of the Good News of Jesus Christ, the Son of
God.
\bibverse{2} As it is written in the prophets, ``Behold,+ 1:2
``Behold'', from ``ἰδοὺ'', means look at, take notice, observe, see, or
gaze at. It is often used as an interjection. I send my... | {"hexsha": "d9640f50254ec255d103c7f6f627619adca05dfb", "size": 90102, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Bibles/English.WorldEnglishBibleUS/out/tex/58-Mark.tex", "max_stars_repo_name": "bibliadelpueblo/BibliaLibre", "max_stars_repo_head_hexsha": "039ab9b18364ecade1d56695cb77c40ee62b1317", "max_stars_r... |
import logging
from PlatformNlp.metrics import register_metrices
from PlatformNlp.metrics.platform_metrics import PlatformMetrice
from PlatformNlp.tokenization import load_vocab
import json
import numpy as np
logger = logging.getLogger(__name__)
@register_metrices('word_embedding_metrics')
class WordEmbeddingMetrics... | {"hexsha": "2b96f670e8bdc194d9447ebde0cd91a866ac9a15", "size": 2113, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/nlp/PlatformNlp/metrics/word_embedding_metrics.py", "max_stars_repo_name": "jd-aig/aves2_algorithm_components", "max_stars_repo_head_hexsha": "12e06717596b824f7b0db115b95856606b97cd82", "max_s... |
import os
from numpy.testing import assert_allclose
from glue_geospatial.data_factory import is_geospatial, geospatial_reader
DATA = os.path.join(os.path.dirname(__file__), 'data')
def test_geospatial(tmpdir):
assert not is_geospatial(os.path.join(DATA, 'plain.tif'))
assert is_geospatial(os.path.join(DATA... | {"hexsha": "7880fe22b25f8f6ea2c9d2608fa81eabe491f2d3", "size": 567, "ext": "py", "lang": "Python", "max_stars_repo_path": "glue_geospatial/tests/test_basic.py", "max_stars_repo_name": "glue-viz/glue-satellite", "max_stars_repo_head_hexsha": "ac84454f862cf07367a7e59f1865c71652fb5d2d", "max_stars_repo_licenses": ["BSD-3-... |
"""
Generate samples for calculating EER.
The format of data_dirs
data_dir
|--- {speaker name}.pkl
The format of {speaker name}.pkl
{speaker name}.pkl
|--- "filename": file name
|--- "embedding": embedding
"""
import os
from os.path import join as join_pat... | {"hexsha": "0fc090baa5a93f275c1e5e8535fcd0926bd1126b", "size": 2277, "ext": "py", "lang": "Python", "max_stars_repo_path": "Voice-conversion-evaluation/metrics/speaker_verification/equal_error_rate/prepare_eer_samples.py", "max_stars_repo_name": "ga642381/robust-vc", "max_stars_repo_head_hexsha": "90c5c51007db4544885e9... |
Welcome Community Development graduate students, alumni, prospective students, and friends of the department! This page was created to allow CRD students to communicate important information, from recommended courses to thesis help to upcoming social events. If you have questions, just send out an mailto:gcmdst... | {"hexsha": "0c25277ed3c114bccafe19358fec12a9d1d0aaa7", "size": 9978, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Community_Development_Graduate_Group.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": [... |
\chapter{Wireless Channel Emulator}
\glsresetall
\label{chapter:emulator}
\note{Go through the example wireless channel emulator that we developed.} | {"hexsha": "211b4679226798a7106e769c875a8482b912c534", "size": 149, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "emulator.tex", "max_stars_repo_name": "mithro/pp4fpgas", "max_stars_repo_head_hexsha": "ddede5bd337f4fa33915d7e4ca98f97a7b31413a", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count": 418, "m... |
# Copyright 2018-2021
# Institute of Neuroscience and Medicine (INM-1), Forschungszentrum Jülich GmbH
# 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/LICE... | {"hexsha": "60e574f619f6a448239e5e3754bed6698feff4fd", "size": 32854, "ext": "py", "lang": "Python", "max_stars_repo_path": "siibra/volumes/parcellationmap.py", "max_stars_repo_name": "sdiazpier/siibra-python", "max_stars_repo_head_hexsha": "152330b78ecaddfae6da57a6cbfda8117c889ab1", "max_stars_repo_licenses": ["Apache... |
import os
import numpy as np
from skmultiflow.data.random_tree_generator import RandomTreeGenerator
def test_random_tree_generator(test_path):
stream = RandomTreeGenerator(tree_random_state=23, sample_random_state=12, n_classes=2, n_cat_features=2,
n_num_features=5, n_categories_p... | {"hexsha": "6aad5ed850d879f24da2bbd98916d6d300c9a890", "size": 2553, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/data/test_random_tree_generator.py", "max_stars_repo_name": "tlac980/scikit-multiflow", "max_stars_repo_head_hexsha": "e05a512f3170555767cf229a4f7b5fed2423c86c", "max_stars_repo_licenses": [... |
"""
This module has functions required to perform CUR decomposition
CUR decomposition is a sparse matrix approximation of SVD decomposition. CUR
tries to maintain as much data as possible using sparse matrices as opposed to SVD
"""
import pandas as pd
import numpy as np
import random
from svd import get_... | {"hexsha": "639f6891b6ad80cc7d4054ab7e4a639219b79a4d", "size": 4859, "ext": "py", "lang": "Python", "max_stars_repo_path": "cur.py", "max_stars_repo_name": "kasuba-badri-vishal/Recommender_Systems", "max_stars_repo_head_hexsha": "19409e3c06eef84b7b35d8b71656b2033a5df6a2", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# coding=utf-8
# Author: Rodolfo J. O. Soares <rodolfoj.soares@gmail.com>
from sklearn.metrics.pairwise import euclidean_distances
import numpy as np
def min_rule(perturbations, cluster2class):
"""Compute the minimum perturbation for each sample based on classes's clusters
Parameters
----------
per... | {"hexsha": "0d57a84c92543d1a0cd42383f478397622fc098d", "size": 3924, "ext": "py", "lang": "Python", "max_stars_repo_path": "perturbation_classifiers/subconcept/aggregation.py", "max_stars_repo_name": "rjos/perturbation-classifiers", "max_stars_repo_head_hexsha": "5637b49c5c297e20b4ee6bcee25173d9d11d642f", "max_stars_re... |
using SimpleProbabilitySets
using Base.Test, Distributions
@testset "SimpleProbabilitySets" begin
d = Categorical([0.1, 0.2, 0.7])
d2 = Categorical([0.4, 0.4, 0.2])
pb = PBox(d, d2)
@test cdfs(pb)[2] == [0.4, 0.8, 1.0]
@test pints(pb)[1] ≈ [0.1, 0.0, 0.2] atol = 1e-6
pl = [0.1, 0.2, 0.5]
p... | {"hexsha": "1ecc99eb6505f3fc8a982ded39f2244383eb4a91", "size": 721, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "ajkeith/SimpleProbabilitySets.jl", "max_stars_repo_head_hexsha": "479d32c613ccdf1774a8c29212699f33b51ded4b", "max_stars_repo_licenses": ["MIT"], "max_stars... |
[STATEMENT]
lemma mk_poincare_line_cmat_scale:
"cor k *\<^sub>s\<^sub>m mk_poincare_line_cmat A B = mk_poincare_line_cmat (k * A) (k * B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. cor k *\<^sub>s\<^sub>m mk_poincare_line_cmat A B = mk_poincare_line_cmat (k * A) (cor k * B)
[PROOF STEP]
by simp | {"llama_tokens": 146, "file": "Poincare_Disc_Poincare_Lines", "length": 1} |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
from collections import defaultdict, deque
import json
import os
import random
import sys
import gym
import numpy as np
import tensorflow as tf
from gym_puyopuyo.agent import TsuTreeSearchAgent... | {"hexsha": "2f3d234cc65be46d49b730f478d6b43ff53998f4", "size": 13256, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_deep_student.py", "max_stars_repo_name": "frostburn/rl_puyopuyo", "max_stars_repo_head_hexsha": "9f57d2919351d22ed51672f7dd6b8427e9ad0e91", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import matplotlib.pyplot as plt
import numpy as np
from scipy.io.wavfile import read
(fs, x) = read('../../../sounds/oboe-A4.wav')
M = 256
H = 128
start = int(.8*fs)
plt.figure(1)
x0 = x[start:start+3*M]/float(max(x))
plt.plot(x0)
plt.axis([0, 3*M, min(x0), max(x0)+5.5])
offset = 1.5
x1 = np.zeros(3*M)+offset
x1[0:M... | {"hexsha": "529c78ad617244ce8abad4decab5434fa69bd1bc", "size": 838, "ext": "py", "lang": "Python", "max_stars_repo_path": "stanford/sms-tools/lectures/04-STFT/plots-code/ola.py", "max_stars_repo_name": "phunc20/dsp", "max_stars_repo_head_hexsha": "e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886", "max_stars_repo_licenses": ["... |
using PyPlot
using DelimitedFiles
CPU=Sys.cpu_info()[1].model
scalar=readdlm("jlvtriad-scalar.dat",comments=true)'
scalar_shared=readdlm("jlvtriad-scalar-shared.dat",comments=true)'
scalar_avx=readdlm("jlvtriad-scalar-avx.dat",comments=true)'
scalar_shared_avx=readdlm("jlvtriad-scalar-shared-avx.dat",comments=true)'
... | {"hexsha": "8b8b6eec2f7d01c0c9c2174635684a5ec08029a0", "size": 892, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "parallel/shared-vs-normal-arrays.jl", "max_stars_repo_name": "j-fu/julia-tests", "max_stars_repo_head_hexsha": "d9bad70c8a101151dbf3bd8d8a56ba196a0f8655", "max_stars_repo_licenses": ["MIT"], "max_st... |
!! Copyright (C) Stichting Deltares, 2012-2016.
!!
!! This program is free software: you can redistribute it and/or modify
!! it under the terms of the GNU General Public License version 3,
!! as published by the Free Software Foundation.
!!
!! This program is distributed in the hope that it will be useful,
!! b... | {"hexsha": "fce399b01e78552581a4fd841816c73c4f2c18f6", "size": 1889, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "docker/water/delft3d/tags/v6686/src/engines_gpl/waq/packages/waq_kernel/src/charon/chphas.f", "max_stars_repo_name": "liujiamingustc/phd", "max_stars_repo_head_hexsha": "4f815a738abad43531d02ac66f... |
import numpy as np
import os
import codecs
import torch
from driver import DATA_PATH
def save_np_to_txt(np_input, txt_name, file_dir=""):
if file_dir.startswith("/"):
save_dir = file_dir
else:
save_dir = os.path.join(DATA_PATH, file_dir)
os.makedirs(save_dir, exist_ok=True)
txt_path =... | {"hexsha": "1bb7730f4723e9d2d11045d1cba2b3b269364463", "size": 3019, "ext": "py", "lang": "Python", "max_stars_repo_path": "mtPytorchTest/utils/save.py", "max_stars_repo_name": "bingchengzhou/mtTest", "max_stars_repo_head_hexsha": "8bd72cfbf6acb11322960d199c8ae44919ae0f2f", "max_stars_repo_licenses": ["MIT"], "max_star... |
\chapter{Conclution}
\label{ch:conclution}
Your Conclution. | {"hexsha": "e49d66b546b6ae06563f401508973765a5626e30", "size": 60, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "content/conclution.tex", "max_stars_repo_name": "matthias85/latex_template_thesis", "max_stars_repo_head_hexsha": "9f3583b0a6ca6111f960d8f102d677132cd7a663", "max_stars_repo_licenses": ["MIT"], "max_s... |
from __future__ import print_function
import os
import sys
###########################################################
# Change to your own library path
###########################################################
import pandas as pd
import numpy as np
from datetime import datetime
from datetime import timedelta
from... | {"hexsha": "ead5832ad2d6568fd1a149c1ba44ee2297743ecd", "size": 1422, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/survey/extract_igtb.py", "max_stars_repo_name": "usc-sail/tiles-2019-dataset", "max_stars_repo_head_hexsha": "c91c2da3a282757f67981c5e10aa93faab7b414b", "max_stars_repo_licenses": ["MIT"], "ma... |
"""
Run Matthews example using specified config file.
"""
import os
import pickle
import shutil
import configparser
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import tqdm
import torch
import lpde
from torch.utils.tensorboard import SummaryWriter
import utils
import tests
import int.matth... | {"hexsha": "41396e631718abef4792684c8ef16a1ecc9058c9", "size": 16035, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/sle_gamma/run.py", "max_stars_repo_name": "fkemeth/emergent_pdes", "max_stars_repo_head_hexsha": "d0501f21c9eb569543a19d4d95d6c91a9ccb11fe", "max_stars_repo_licenses": ["MIT"], "max_star... |
from Models import sub_models
import matplotlib.pyplot as plt # plotting
import matplotlib.font_manager as font_manager # plot fonts
import numpy as np # x,y axes values
from sklearn.model_selection import KFold # cross validation
import copy # splice site results copy
import tensorflow as tf
def acc_build_cnn1(
... | {"hexsha": "121133f7d15c0af0310b51ebd102e88a9397fc11", "size": 53639, "ext": "py", "lang": "Python", "max_stars_repo_path": "build_models.py", "max_stars_repo_name": "tmartin2/EnsembleSplice-Inactive", "max_stars_repo_head_hexsha": "a161ff007b47ceadd3a21376f2eac2971bb81d90", "max_stars_repo_licenses": ["MIT"], "max_sta... |
#!/usr/bin/env python
# coding: utf-8
import cv2
from math import sqrt
import numpy as np
in_path = ''
out_directory = ''
cut_count = 100
cut_base = int(sqrt(100))
origin_image = cv2.imread(in_path)
h, w = origin_image.shape[:2]
h_d = int(h / cut_base)
w_d = int(w / cut_base)
for i in range(1, cut_base):
for j ... | {"hexsha": "e08f9b0cd57c420559c1ebde509910866406dbe6", "size": 485, "ext": "py", "lang": "Python", "max_stars_repo_path": "photomosaic/tests/test.py", "max_stars_repo_name": "zibuyu1995/ApplicationInImageProcessing", "max_stars_repo_head_hexsha": "75699ebafdfb6c9b2c800f059e377a13f2409c82", "max_stars_repo_licenses": ["... |
import librosa
from librosa.feature import mfcc
import os
import numpy as np
import scipy
import os.path
import pandas as pd
from sklearn.cluster import KMeans
import h5py
import cv2
from utils import data_cleaner
audio_dir = sys.argv[1]
audio_names = []
def get_mfcc(audio_dir):
result_a... | {"hexsha": "7aa8d76d76886f990150c904cdb7c1076b4d2633", "size": 2346, "ext": "py", "lang": "Python", "max_stars_repo_path": "pretext_training/get_mfcc.py", "max_stars_repo_name": "tensor-flo/ambient-sound-self-supervision", "max_stars_repo_head_hexsha": "72e6944107620fb8c3ef4b428a2dfb1765e59492", "max_stars_repo_license... |
theory GabrielaLimonta
imports "~~/src/HOL/IMP/Star" Complex_Main
begin
text {* We build on @{theory Complex_Main} instead of @{theory Main} to access
the real numbers. *}
subsection "Arithmetic Expressions"
type_synonym val = real
type_synonym vname = string
type_synonym state = "vname \<Rightarrow> val"
text_raw... | {"author": "glimonta", "repo": "Semantics", "sha": "68d3cacdb2101c7e7c67fd3065266bb37db5f760", "save_path": "github-repos/isabelle/glimonta-Semantics", "path": "github-repos/isabelle/glimonta-Semantics/Semantics-68d3cacdb2101c7e7c67fd3065266bb37db5f760/Exercise7/GabrielaLimonta.thy"} |
##*
## MIT License
##
## Plotter - Copyright (c) 2020-2021 Aleksandr Kazakov, Varvara Prokacheva
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to deal
## in the Software without restriction, including without l... | {"hexsha": "9296a83aa3f6579d28b05054f38f4a04cb9ea8d8", "size": 3798, "ext": "py", "lang": "Python", "max_stars_repo_path": "vplotter/engines/gnuplot_engine.py", "max_stars_repo_name": "AlexanderDKazakov/Plotter", "max_stars_repo_head_hexsha": "38874946c0013c30b7749d60368f2e28b6d498fb", "max_stars_repo_licenses": ["MIT"... |
[STATEMENT]
lemma sorted_wrt_gen2: "sorted_wrt (<\<^sub>r\<^sub>l\<^sub>e\<^sub>x\<^sub>2) (gen2 A B m n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. sorted_wrt (<\<^sub>r\<^sub>l\<^sub>e\<^sub>x\<^sub>2) (gen2 A B m n)
[PROOF STEP]
by (intro sorted_wrt_concat_map_map [where Q = "(<\<^sub>r\<^sub>l\<^sub>e\<^sub... | {"llama_tokens": 191, "file": "Diophantine_Eqns_Lin_Hom_Simple_Algorithm", "length": 1} |
using KernelMachines
using Test
using FiniteDiff: finite_difference_gradient
using Zygote: gradient
@testset "utils" begin
s = rand(10, 3)
slices = KernelMachines.split_matrix(s, (2, 3, 5))
@test length(slices) == 3
@test slices[1] == s[1:2, :]
@test slices[2] == s[3:5, :]
@test slices[3] == s[... | {"hexsha": "af3b3d2a86d8bc0bfcac4b89a9e4dc5fde3fd359", "size": 728, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "Veos-Digital/KernelMachines.jl", "max_stars_repo_head_hexsha": "fcd74ecd11e585adf168d78c62a99e75f9f0dec1", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
#include "storage/storage.hpp"
#include "storage/io.hpp"
#include "storage/shared_datatype.hpp"
#include "storage/shared_memory.hpp"
#include "storage/shared_memory_ownership.hpp"
#include "storage/shared_monitor.hpp"
#include "storage/view_factory.hpp"
#include "contractor/files.hpp"
#include "customizer/files.hpp"
... | {"hexsha": "9185d99c0bca88f56b6f78eb9c3d7739e015ee45", "size": 22617, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/storage/storage.cpp", "max_stars_repo_name": "OgreTransporter/osrm-backend", "max_stars_repo_head_hexsha": "35ff807e1d782b71200a1b1b4d9f781fd8352072", "max_stars_repo_licenses": ["BSD-2-Clause"... |
function varargout = grDilate(varargin)
%GRDILATE Morphological dilation on graph.
%
% LBL2 = grDilate(EDGES, LBL1)
% Each label of the graph is assigned the highest label of its
% neighbours, or it keeps the same label this one is bigger.
%
% Example
% grDilate
%
% See also
% grErode, grOpen, grClose
%
... | {"author": "mattools", "repo": "matGeom", "sha": "1fd2c937064be1ee1f4fd09fbfdf96145ebe5271", "save_path": "github-repos/MATLAB/mattools-matGeom", "path": "github-repos/MATLAB/mattools-matGeom/matGeom-1fd2c937064be1ee1f4fd09fbfdf96145ebe5271/matGeom/graphs/grDilate.m"} |
# Taken from https://github.com/psclklnk/spdl and wrapped to our architecture
# Modified by Clément Romac, copy of the license at TeachMyAgent/teachers/LICENSES/SPDL
import torch
import numpy as np
from copy import deepcopy
from functools import partial
from TeachMyAgent.teachers.algos.AbstractTeacher import AbstractT... | {"hexsha": "b8b1742211018e8e348141a3a38b90b6ba5d13e4", "size": 12434, "ext": "py", "lang": "Python", "max_stars_repo_path": "TeachMyAgent/teachers/algos/self_paced_teacher.py", "max_stars_repo_name": "flowersteam/TeachMyAgent", "max_stars_repo_head_hexsha": "a8f71cbfce4cb8ca6da24d00ea690495e3afbd2e", "max_stars_repo_li... |
# importing modules
import cv2 as cv
import numpy as np
import AiPhile
import time
# point seletctor function, which let's select the point, through mouse
def selectPoint(event, x, y, flags, params):
global point, condition, old_points
if event == cv.EVENT_LBUTTONDOWN:
point = (int(x), int(y))
... | {"hexsha": "601f48cee85b6bc8767b1d0a6b06749f24f63155", "size": 1146, "ext": "py", "lang": "Python", "max_stars_repo_path": "Optical Flow Basics/main.py", "max_stars_repo_name": "Asadullah-Dal17/Qr-code-detection-distance-estimation", "max_stars_repo_head_hexsha": "962e48c9524e5fa9be8948fdeb16eedafb7adf30", "max_stars_r... |
"""LieConv Baseline experiments.
requires:
https://github.com/mfinzi/LieConv
Usage:
$ python3 run_LieConv_cifar100.py --epochs 100 --nlay 2 --ker 256 --lr 3e-3 --bn 0 --rot 1 --scr 1
--rot: rotate images
--scr: scramble images (fixed shuffling of pixels in all images)
--nlay: number of layers
--bn: batchnorm (0: ... | {"hexsha": "f8012e3004633b9367565140f7df550e4aec0ea7", "size": 9858, "ext": "py", "lang": "Python", "max_stars_repo_path": "paper-code/D-image-experiments/run_LieConv_cifar100.py", "max_stars_repo_name": "nimadehmamy/L-conv-code", "max_stars_repo_head_hexsha": "5a8abfbff3f6564771234df3e177d1d4aafe371d", "max_stars_repo... |
# Author: cdiazbas@iac.es
import matplotlib.pyplot as plt
import pyLib.imtools as imtools
import numpy as np
# # ========================= CREANDO DICCIONARIO
# cdict1={'red': ((0.0, 0.0, 0.0),
# (0.5, 0.0, 0.1),
# (1.0, 1.0, 1.0)),
# 'green':((0.0, 0.0, 0.0),
# (1.0, 0.0, 0.0)),
# 'bl... | {"hexsha": "b67f07abb2983ff418bbca8544194aaef58e4ab9", "size": 8343, "ext": "py", "lang": "Python", "max_stars_repo_path": "1map_OLD.py", "max_stars_repo_name": "cdiazbas/MPySIR", "max_stars_repo_head_hexsha": "72b1ad5086263e1360cb3c2aa9fd34733fc4cf7b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_sta... |
# MIT License
#
# Copyright (C) IBM Corporation 2019
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... | {"hexsha": "83653bfdb945be307f2238a5de30ec0225a672d2", "size": 4782, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/create_model_weights.py", "max_stars_repo_name": "virkt25/adversarial-robustness-toolbox", "max_stars_repo_head_hexsha": "3cfa6de196cb32a3efafab2ff6bbf44247c9ddbd", "max_stars_repo_licenses... |
[STATEMENT]
lemma master_integral:
fixes a p p' :: real
assumes p: "p \<noteq> p'" and a: "a > 0"
obtains c d where "c \<noteq> 0" "p > p' \<longrightarrow> d \<noteq> 0"
"(\<lambda>x::nat. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p' / u powr (p+1)))) \<in>
\<Theta>(\<lambda>x::nat. d ... | {"llama_tokens": 4411, "file": "Akra_Bazzi_Master_Theorem", "length": 34} |
/-
Copyright (c) 2021 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
import algebra.algebra.subalgebra.basic
import topology.algebra.module.basic
import topology.algebra.field
/-!
# Topological (sub)algebras
A topological algebra ove... | {"author": "nick-kuhn", "repo": "leantools", "sha": "567a98c031fffe3f270b7b8dea48389bc70d7abb", "save_path": "github-repos/lean/nick-kuhn-leantools", "path": "github-repos/lean/nick-kuhn-leantools/leantools-567a98c031fffe3f270b7b8dea48389bc70d7abb/src/topology/algebra/algebra.lean"} |
"""
Tests for the Voice Detector model(s).
"""
import numpy as np
import os
import shutil
import sys
import unittest
import warnings
path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")
sys.path.insert(0, path)
import senses.dataproviders.featureprovider as fp # pylint: disable=locally-disabled, import... | {"hexsha": "195aaa10f8542df3fb115c76fabb8676f394555c", "size": 4281, "ext": "py", "lang": "Python", "max_stars_repo_path": "Artie/tests/test_voice_detector.py", "max_stars_repo_name": "MaxStrange/ArtieInfant", "max_stars_repo_head_hexsha": "1edbb171a5405d2971227f2d2d83acb523c70034", "max_stars_repo_licenses": ["MIT"], ... |
# This file is part of the P3IV Simulator (https://github.com/fzi-forschungszentrum-informatik/P3IV),
# copyright by FZI Forschungszentrum Informatik, licensed under the BSD-3 license (see LICENSE file in main directory)
import numpy as np
class DrivingCorridorCartesian(object):
def __init__(self):
self.... | {"hexsha": "46162bec0dc4187773029acb6a74686bd4406b3a", "size": 1500, "ext": "py", "lang": "Python", "max_stars_repo_path": "p3iv_types/src/p3iv_types/decision_base.py", "max_stars_repo_name": "fzi-forschungszentrum-informatik/P3IV", "max_stars_repo_head_hexsha": "51784e6dc03dcaa0ad58a5078475fa4daec774bd", "max_stars_re... |
import numpy as np
from CartPole.state_utilities import ANGLE_IDX
TARGET_TIME_UP = 3.0 # s
TARGET_TIME_DOWN = 4.0
TARGET_ANGLE_UP = np.pi/5.0
TARGET_ANGLE_DOWN = 4.0*np.pi/5.0
class CheckStabilized:
def __init__(self, dt, pole_position_init='down'):
self.samples_stabilized_min = TARGET_TIME_UP/dt ... | {"hexsha": "f42572a318ad770de0c7f5adb612cfa905c0e77f", "size": 1492, "ext": "py", "lang": "Python", "max_stars_repo_path": "Controllers/CheckStabilized.py", "max_stars_repo_name": "SensorsINI/CartPoleSimulation", "max_stars_repo_head_hexsha": "8f59c21796ed68d224e5f731957e68583f54a10a", "max_stars_repo_licenses": ["MIT"... |
module replace_target_test
use iso_varying_string, only: replace, var_str
use veggies, only: result_t, test_item_t, assert_equals, describe, it
implicit none
private
public :: &
test_replace_character_with_character_in_character, &
test_replace_character_with_character_in_st... | {"hexsha": "8f7b05e186caf5e6bd7261190df1e5674f7360d5", "size": 24493, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/unit_test/replace_target_test.f90", "max_stars_repo_name": "everythingfunctional/iso_varying_string", "max_stars_repo_head_hexsha": "f330d7a246d81aacfbf92f8085a4eca9d2506820", "max_stars_r... |
'''
A linear regression learning algorithm example using TensorFlow library.
Author: Aymeric Damien
Project: https://github.com/aymericdamien/TensorFlow-Examples/
'''
from __future__ import print_function
import tensorflow as tf
import numpy
import matplotlib.pyplot as plt
rng = numpy.random
# Parameter... | {"hexsha": "38c600b2989ef491be9fb12934bd7bb08006c6c2", "size": 3498, "ext": "py", "lang": "Python", "max_stars_repo_path": "425 Machine Learning.py", "max_stars_repo_name": "4saad/425-code", "max_stars_repo_head_hexsha": "3d8a2120dae34807672ab1d7bdf8a840297372f4", "max_stars_repo_licenses": ["Unlicense"], "max_stars_co... |
"""Upsample images."""
import os
import subprocess
import numpy as np
import nibabel as nb
# =============================================================================
NII_NAMES = [
'/home/faruk/data/DATA_MRI_NIFTI/derived/sub-01/T1_wholebrain/01_crop/sub-01_ses-T2s_MP2RAGE_inv1_crop.nii.gz',
'/home/faruk/... | {"hexsha": "ab4d4872148211fe357240e3bd33fb106677a7ee", "size": 1511, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/unused/unused-whole_brain_segmentation/unused_04_upsample.py", "max_stars_repo_name": "ofgulban/meso-MRI", "max_stars_repo_head_hexsha": "15ef8e19aae6218833a06bf01418d3d83eafd8c7", "max_st... |
\chapter{\abstractname}
%TODO: Abstract
Union-Find is a classical data structure whose complexity analysis is famously non-trivial. In this thesis we prove the $\alpha$-bound amortized time complexity of an efficient imperative implementation of this data structure. We first revise the history of this emblematic resul... | {"hexsha": "75ec01ba55c714ba52c70e65056934adc5452117", "size": 1338, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tum-thesis-latex-master/pages/abstract.tex", "max_stars_repo_name": "adrilow/Proof-of-the-amortized-time-complexity-of-the-Union-Find-data-structure-in-Isabelle-HOL", "max_stars_repo_head_hexsha": "... |
"""
Tests for ISMAGS isomorphism algorithm.
"""
import pytest
import networkx as nx
from networkx.algorithms import isomorphism as iso
def _matches_to_sets(matches):
"""
Helper function to facilitate comparing collections of dictionaries in
which order does not matter.
"""
return set(map(lamb... | {"hexsha": "ed3d81ea38804437b785953d511ff0827863de8c", "size": 10542, "ext": "py", "lang": "Python", "max_stars_repo_path": "networkx/algorithms/isomorphism/tests/test_ismags.py", "max_stars_repo_name": "Mackyboy12/networkx", "max_stars_repo_head_hexsha": "2afe713bce0a57dbdd8e51d3b83ae28f73c9b677", "max_stars_repo_lice... |
import os
from pathlib import Path
import pandas as pd
from src.models.ecomplexity_model import EconomicDataModel
import pickle as pkl
import numpy as np
project_dir = Path(__file__).resolve().parents[1]
raw_dir = os.path.join(project_dir, 'data', 'raw')
interim_dir = os.path.join(project_dir, 'data', 'interim')
exter... | {"hexsha": "6cec5d124e6d948e17d11d687321dc839665a5fc", "size": 1916, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/main.py", "max_stars_repo_name": "hydrophis-spiralis/regional_economics_complexity", "max_stars_repo_head_hexsha": "c507c7307c068dd3e1f6b846b5c25641a5dd507b", "max_stars_repo_licenses": ["MIT"... |
from __future__ import annotations
from typing import Callable, Optional, Union
import numpyro
import numpyro.distributions as dist
import jax
import jax.numpy as jnp
from numpy.typing import ArrayLike
from .kernels import Kernel, WhiteNoise
__all__ = [
'GP',
]
class GP:
r"""Gaussian process class.
... | {"hexsha": "223eb7c032d951f0973624cf0cc4558671b9e1c2", "size": 12772, "ext": "py", "lang": "Python", "max_stars_repo_path": "asterion/gp/gp.py", "max_stars_repo_name": "alexlyttle/helium-glitch-fitter", "max_stars_repo_head_hexsha": "22575f0126e3c7c4e124a0acc740b8e71ce5294e", "max_stars_repo_licenses": ["MIT"], "max_st... |
{-# OPTIONS --universe-polymorphism #-}
module LLev where
--****************
-- Universe polymorphism
--****************
data Level : Set where
ze : Level
su : Level -> Level
{-# BUILTIN LEVEL Level #-}
{-# BUILTIN LEVELZERO ze #-}
{-# BUILTIN LEVELSUC su #-}
max : Level -> Level -> Level
max ... | {"hexsha": "2a737abe9b8a45dc6913fa78fdf87ec9a513cdf0", "size": 8129, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "models/LLev.agda", "max_stars_repo_name": "dataronio/epigram2", "max_stars_repo_head_hexsha": "17b7858f51a35b3becb8433028c3f1ba25fbba9a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, ... |
import json
import numpy as np
with open('geo-jsons.json', 'r') as f:
opened = json.load(f)
opened = opened['features']
opened = [{'mentions': x['properties']['mentions'], 'city': x['properties']['city']} for x in opened]
opened = [json.dumps(x) for x in opened]
opened = set(opened)
opened = [json.loads(x) for x i... | {"hexsha": "fbc4bc01b8cf38b16bba486790545bf54d2fc620", "size": 531, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/geo-jsons.py", "max_stars_repo_name": "keelanfh/electionary", "max_stars_repo_head_hexsha": "1c33cc41f2b7357ba45d279d09f13b54026fbba7", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
[STATEMENT]
lemma "((\<lambda>x::real. (ln(ln x + ln (ln x)) - ln (ln x)) /
(ln (ln x + ln (ln (ln x)))) * ln x) \<longlongrightarrow> 1) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ((\<lambda>x. (ln (ln x + ln (ln x)) - ln (ln x)) / ln (ln x + ln (ln (ln x))) * ln x) \<longlongrigh... | {"llama_tokens": 164, "file": null, "length": 1} |
import numpy as np
from numpy import ndarray
def normalize_to_max(intensity: ndarray):
return intensity / np.max(intensity)
def normalize_to_first(intensity: ndarray):
return intensity / intensity[0]
| {"hexsha": "4995a348fa06dc9c2cf2d62fef99d47af3de03bb", "size": 212, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlreflect/xrrloader/footprint/normalization.py", "max_stars_repo_name": "schreiber-lab/mlreflect", "max_stars_repo_head_hexsha": "88a80ccac48461cc8934a46041726b70e469c6b8", "max_stars_repo_licenses... |
from sklearn.ensemble import RandomForestRegressor
from sklearn.linear_model import LinearRegression
from sklearn.svm import SVR
from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os.path as osp
import gc... | {"hexsha": "dfeece6c6b9d007256a036c5a8a3512e7806b021", "size": 1771, "ext": "py", "lang": "Python", "max_stars_repo_path": "machine_learning/regresion-allergy-percentage.py", "max_stars_repo_name": "RQuispeC/fun-with-allergies", "max_stars_repo_head_hexsha": "90d5aa9f5fb80e6139974ae6eb18006ed661bc1c", "max_stars_repo_l... |
import pandas as pd
from sklearn.manifold import TSNE
from numpy import array, dot, diag, nan_to_num
from numpy.random import randn
import sys
features = 'CADD1,CADD2,RecA,EssA,CADD3,CADD4,RecB,EssB,Path'.split(',')
df_data = pd.read_csv("dida_posey_to_predict.csv")
combination = list(map(int, sys.argv... | {"hexsha": "15c1ab7bb83b1732ca5652747ee98f566616a50f", "size": 1126, "ext": "py", "lang": "Python", "max_stars_repo_path": "Visualizer_preparation/preparation.py", "max_stars_repo_name": "oligogenic/DIDA_SSL", "max_stars_repo_head_hexsha": "cbf61892bfde999eadf31db918833f6c75a5c9f3", "max_stars_repo_licenses": ["MIT"], ... |
[STATEMENT]
lemma cp_OclAsType\<^sub>P\<^sub>e\<^sub>r\<^sub>s\<^sub>o\<^sub>n_OclAny_Person: "cp P \<Longrightarrow> cp(\<lambda>X. (P (X::OclAny)::Person) .oclAsType(Person))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. cp P \<Longrightarrow> cp (\<lambda>X. P X .oclAsType(Person))
[PROOF STEP]
by(rule cpI1, si... | {"llama_tokens": 174, "file": "Featherweight_OCL_examples_Employee_Model_Analysis_Analysis_UML", "length": 1} |
#include <gtest/gtest.h>
#include "converter/fixml2fix_converter.hxx"
#include "converter/xml_element_helper.hxx"
#include "converter/fix_helper.hxx"
#include "util/fix_env.hxx"
#include "tools/test_util.hxx"
#include <boost/log/trivial.hpp>
#include <quickfix/fix50sp2/ListExecute.h>
#include <list>
#include <set>
... | {"hexsha": "ff8028acd1fb9f863005b6fac44d83b9b32e8ade", "size": 6012, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tools/generated/fix2xml/test_fix2xml_ListExecute.cpp", "max_stars_repo_name": "abdelkaderamar/fix2xml", "max_stars_repo_head_hexsha": "fa781b747a8e40ed4c2d3dee8294fb51654f7428", "max_stars_repo_lice... |
from typing import List
import gym
import numpy as np
from gym import spaces
class SwitchingWrapper(gym.Wrapper):
def __init__(self, env: gym.Env, env_index: int):
super().__init__(env)
self.env_index = env_index
def reset(self, **kwargs):
return self.env.reset(**kwargs)
def ste... | {"hexsha": "f34a2bed13d750ddcd9154f6f00f40a58290fdd5", "size": 547, "ext": "py", "lang": "Python", "max_stars_repo_path": "rltime/env_wrappers/switching_env_wrapper.py", "max_stars_repo_name": "frederikschubert/rltime", "max_stars_repo_head_hexsha": "d1722ffd4cf7b4599655b8d9c64abc243919afc9", "max_stars_repo_licenses":... |
SUBROUTINE BCKMLT(A,U,N,NA,NU)
C
C PURPOSE:
C Compute the orthogonal matrix that reduces the output matrix A
C from subroutine HSHLDR, to upper Hessenberg form.
C
C REFERENCES:
C Bartels, R.H.; and Stewart, G.W.: Algorithm 432 - Solution of
C the Matrix Equation AX + XB = C. Commun. A... | {"hexsha": "d6a14ae92cfafd8918618e63b3dcd68a5f38db28", "size": 1234, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "gsc-13067/iac/diriac2/oracls/bckmlt.for", "max_stars_repo_name": "SteveDoyle2/nasa-cosmic", "max_stars_repo_head_hexsha": "c8015a9851a04f0483b978d92c2cbaee31c81fe3", "max_stars_repo_licenses": [... |
import jax.numpy as np
import logging
def deinsum(subscript, aa, bb):
real = np.einsum(subscript, aa[0], bb[0]) - np.einsum(subscript, aa[1], bb[1])
imag = np.einsum(subscript, aa[0], bb[1]) + np.einsum(subscript, aa[1], bb[0])
return np.stack([real, imag], axis=0)
def deinsum_ord(subscript, aa, bb):
... | {"hexsha": "bc4cbbda9a587e154bdcd6b9d5f851ad3d51d31d", "size": 841, "ext": "py", "lang": "Python", "max_stars_repo_path": "dplex.py", "max_stars_repo_name": "Dream7-Kim/graduation_code", "max_stars_repo_head_hexsha": "be1808f90589c08d7283a8e12f52e22a5749c27d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
# coding: utf-8
# Copyright (c) 2021 AkaiKKRteam.
# Distributed under the terms of the Apache License, Version 2.0.
import matplotlib.pyplot as plt
import os
import numpy as np
from .AkaiKkr import AkaikkrJob
from .BasePlotter import BaseEXPlotter
class IterPlotter:
"""plotter for history
"""
def __in... | {"hexsha": "6a373b76656fba4d3ba985bcdb55eb2278543d3e", "size": 3278, "ext": "py", "lang": "Python", "max_stars_repo_path": "library/PyAkaiKKR/pyakaikkr/IterPlotter.py", "max_stars_repo_name": "AkaiKKRteam/AkaiKKRPythonUtil", "max_stars_repo_head_hexsha": "be716747de83c9f1787b6ac1c9a61ef725a643dd", "max_stars_repo_licen... |
[STATEMENT]
lemma ndec_seq_mem:"\<lbrakk>a \<in> (A::nat set); \<not> (\<exists>m. m\<in>A \<and> (\<forall>x\<in>A. m \<le> x))\<rbrakk> \<Longrightarrow>
(ndec_seq A a n) \<in> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>a \<in> A; \<nexists>m. m \<in> A \<and> (\<forall>x\<i... | {"llama_tokens": 1888, "file": "Group-Ring-Module_Algebra1", "length": 12} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.