text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
%% cv.tex
%% Copyright 2017 Zeyi Fan
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version... | {"hexsha": "addcf1af6387f945004244a64f4cfd6218af0f7c", "size": 7588, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "cv.tex", "max_stars_repo_name": "fanzeyi/cv", "max_stars_repo_head_hexsha": "550f70ab4cc58669afb701d8e5d65811a7416195", "max_stars_repo_licenses": ["LPPL-1.3c"], "max_stars_count": 55, "max_stars_re... |
import matplotlib.pyplot as plt
from sklearn.datasets import load_digits
from sklearn.model_selection import train_test_split
import numpy as np
import pandas as pd
from sklearn import ensemble
import pickle
digits= pd.read_csv("DigitRec/csv/newtraindataset.csv")
digits.rename(columns={'0':'Label'})
x=digits.iloc[:,... | {"hexsha": "0e2179b8e94a56d536354714e01fea5d761260f3", "size": 617, "ext": "py", "lang": "Python", "max_stars_repo_path": "Digitmodel.py", "max_stars_repo_name": "Shriyasehgal/JupyterWorkflow", "max_stars_repo_head_hexsha": "1c7ed1f9f745c0a6d172f125554d9fd1e084d4c6", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
//-*-Mode:C++;coding:utf-8;tab-width:4;c-basic-offset:4;indent-tabs-mode:()-*-
// ex: set ft=cpp fenc=utf-8 sts=4 ts=4 sw=4 et nomod:
//
// MIT License
//
// Copyright (c) 2011-2019 Michael Truog <mjtruog at protonmail dot com>
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of thi... | {"hexsha": "1da6389bea7c784de84314308eb0f31e2c4db5c1", "size": 77519, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/api/c/cloudi.cpp", "max_stars_repo_name": "khzmk/repo1", "max_stars_repo_head_hexsha": "8592061652dbf88fddfca9b65a6a12a01d9e3b47", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
import os
import numpy as np
import pandas as pd
import statsmodels.api as sm
import statsmodels.formula.api as smf
def dnorm(mean, variance, size=1):
if isinstance(size, int):
size = size,
return mean + variance ** (1 / 2) * np.random.randn(*size)
# For reproducibility
np.random.seed(12345)
N = 100
X... | {"hexsha": "e376fd45a520b60a3a51347ba5dbb703490188af", "size": 1667, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_da/p4da/ch13.py", "max_stars_repo_name": "dagtann/learning", "max_stars_repo_head_hexsha": "1fee75e9b975fae4f0e538ce9c4c3ae34cba6361", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
from PySide import QtCore
from PySide.QtCore import QObject, Slot, Signal
from abc import ABCMeta, abstractmethod
from pyqtgraph import GraphicsLayoutWidget
import numpy as np
from os import listdir
from os.path import isfile, join
class Plugin:
__metaclass__ = ABCMeta
@abstractmethod
def execute(self,... | {"hexsha": "70caa32933bd0cfb5fedb4cd87c1af84363c3be2", "size": 3058, "ext": "py", "lang": "Python", "max_stars_repo_path": "speclib/core.py", "max_stars_repo_name": "junglefunkyman/spectracer", "max_stars_repo_head_hexsha": "f595415e4bee19c72b6d7226f05ddd643b4cbe4b", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import numpy as np
class VectorMediatorPositronSpectra:
def positron_spectra(self, eng_ps, cme):
"""Computes total continuum positron spectrum.
"""
total = np.zeros(len(eng_ps))
return {"total": total}
def positron_lines(self, cme):
return {}
| {"hexsha": "b7b0f3bf3a4395f778b1e384e8c6161a26f6ce64", "size": 296, "ext": "py", "lang": "Python", "max_stars_repo_path": "hazma/axial_vector_mediator/_axial_vector_mediator_positron_spectra.py", "max_stars_repo_name": "LoganAMorrison/Hazma", "max_stars_repo_head_hexsha": "e9612729767ff48d5ce50633393f81ee021242d2", "ma... |
# A* shortest-path algorithm
#################################################
#
# A* shortest-path algorithm
#
#################################################
module AStar
# The enqueue! and dequeue! methods defined in Base.Collections (needed for
# PriorityQueues) conflict with those used for queues. Hence we w... | {"hexsha": "c45abd4d10b822df00567afbb3d4e150cf8c623c", "size": 2767, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/a_star_spath.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Graphs.jl-86223c79-3864-5bf0-83f7-82e725a168b6", "max_stars_repo_head_hexsha": "b76b9914178a417085681167643af510547e8a0a... |
import jittor as jt
from jittor import Module
from jittor import nn
import numpy as np
import jittor.transform as transform
from PIL import Image
from combine_model import Combine_Model
import networks
from argparse import ArgumentParser
img_size = 512
transform_image = transform.Compose([
transfor... | {"hexsha": "9224935382723a697ae286d1188635c8f7784f0a", "size": 2787, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_model.py", "max_stars_repo_name": "LiYibai/DeepFaceEditing-Jittor", "max_stars_repo_head_hexsha": "b3e3493a78385eefe18be2bf2e99e917d5e2710f", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
using CSV
using DataFrames
using LinearAlgebra
using RecipesBase
using StateSpaceModels
using Statistics
using Test
# Functions that are used in different tests
include("utils.jl")
# Core functionality
include("systems.jl")
include("prints.jl")
# Models
include("models/locallevel.jl")
include("models/locallineartren... | {"hexsha": "41ee4f8ddf6ce86409dabfcff04b4d5d31209563", "size": 890, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "iagochavarry/StateSpaceModels.jl", "max_stars_repo_head_hexsha": "809189e704ca51277935dd9fac121443a3839e79", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import time
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import nb_cpp
def main():
crmin = -10.0
crmax = 10.0
cimin = -5.0
cimax = 5.0
ratio = (crmax - crmin) / (cimax - cimin)
# imw = 2048
# imw = 4096
# imw = 8192
imw = 1024
t = time.time()
... | {"hexsha": "15eae873373f02494d67c23f35cd64a8243cccf1", "size": 779, "ext": "py", "lang": "Python", "max_stars_repo_path": "example/nb6order.py", "max_stars_repo_name": "gmagno/nb-cpp", "max_stars_repo_head_hexsha": "eb86b02656c693221f6f54cfd74f8d784033a24e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "ma... |
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 21 18:03:01 2018
@author: Alex
Cluster topics using NMF
"""
#%% Import packages
import os
os.chdir('C:\\Users\\Alex\\Documents\\GitHub\\insight-articles-project\\src\\topic modeling\\')
from topic_modeling import load_documents
import pickle
import numpy as np
from t... | {"hexsha": "12bef266062ad993a34fb57355f2fb695494c0fc", "size": 2485, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/topic modeling/meta_topics.py", "max_stars_repo_name": "avbatchelor/insight-articles-project", "max_stars_repo_head_hexsha": "852b338b786cb5b9c281fcec2e378aed8d3dc617", "max_stars_repo_license... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Oct 24 00:34:49 2021
@author: rachel
"""
import numpy as np
import os
import shutil
import matplotlib.pyplot as plt
import math
import pandas as pd
from extentForPlot import *
from scipy.io import loadmat
import seaborn as sns
from posPred2cPosPred imp... | {"hexsha": "972932d7e83580f8af98597e5003f285f76b1362", "size": 20565, "ext": "py", "lang": "Python", "max_stars_repo_path": "pythonVersion/fit.py", "max_stars_repo_name": "oradules/Deconvolution_short_long", "max_stars_repo_head_hexsha": "730a55a257a376e2b347c0d2453347c2c463ab17", "max_stars_repo_licenses": ["BSD-3-Cla... |
[STATEMENT]
lemma not_root_Fr:
assumes "root tr \<notin> ns"
shows "Fr ns tr = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Fr ns tr = {}
[PROOF STEP]
using not_root_inFr[OF assms]
[PROOF STATE]
proof (prove)
using this:
\<not> inFr ns tr ?t
goal (1 subgoal):
1. Fr ns tr = {}
[PROOF STEP]
unfolding Fr_def
[P... | {"llama_tokens": 203, "file": null, "length": 3} |
function shepard_interp_nd_test02 ( prob, p, m, n1d )
%*****************************************************************************80
%
%% SHEPARD_INTERP_ND_TEST02 tests SHEPARD_INTERP_ND on a regular N1D^M grid.
%
% Licensing:
%
% This code is distributed under the GNU LGPL license.
%
% Modified:
%
% 22 Sept... | {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/shepard_interp_nd/shepard_interp_nd_test02.m"} |
import math
import numpy
def distance_btw_two_point(x1, y1, x2, y2):
return math.pow(math.pow((x1 - x2), 2) + math.pow((y1 - y2), 2), 0.5)
class Line:
def __init__(self, x, y, x1, y1):
self.xa = x
self.ya = y
self.tol = 0.0000000001
'''Taking verticality into account'''
... | {"hexsha": "241011527ade292706b85d01b501d9bcde5e2bed", "size": 3851, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/my_utils/my_math/line.py", "max_stars_repo_name": "xenakal/Simulation_Interactions", "max_stars_repo_head_hexsha": "4e428bb70445ba7fd2d102facdd18c5def4542b7", "max_stars_repo_licenses": ["MIT"... |
import numpy as np
from matplotlib import pyplot as plt
import pickle
def read(num):
data = []
for n in np.arange(1, num + 1):
file = open('../../data/real/garch_estimate_{}'.format(n), 'rb')
data.append(pickle.load(file))
return np.vstack(data)
def main():
plt.style.use('ggplot')
... | {"hexsha": "c7bde57b0ebc5a8c49a5b0b2a9fc8e174fc70aa8", "size": 2103, "ext": "py", "lang": "Python", "max_stars_repo_path": "niscv_v2/analysis/real/garch_estimate.py", "max_stars_repo_name": "IanFla/Importance-Sampling", "max_stars_repo_head_hexsha": "f2dd2164e95377d2cf025fcddd19b2592394e4d7", "max_stars_repo_licenses":... |
#-----------------------------------------------------------------------------------------------------------------------
# Project: resnet-finetune-demo
# Filename: helper.py
# Date: 16.06.2017
# Author: Adam Brzeski, Jan Cychnerski - CTA.ai
#-----------------------------------------------------------------------------... | {"hexsha": "5453e80471f42da398ebc3afc0fe5d679f645fd9", "size": 2005, "ext": "py", "lang": "Python", "max_stars_repo_path": "helper.py", "max_stars_repo_name": "cta-ai/resnet-finetune-demo", "max_stars_repo_head_hexsha": "90d652320ee39fb355e3cfa4cd1b6c682211ba28", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1... |
import numpy as np
import pandas as pd
import time
import os
import sys
from copy import copy
from fastdtw import fastdtw
from scipy import interpolate
from scipy.stats import levy, zscore, mode
from sklearn.metrics import silhouette_score
from sklearn.metrics.pairwise import *
from scipy.spatial.distance import *
from... | {"hexsha": "e90d251a6dc2175c5a44f7a147f3eb4398e4d754", "size": 12083, "ext": "py", "lang": "Python", "max_stars_repo_path": "genshapelet.py", "max_stars_repo_name": "KDD-OpenSource/GENSHAPELET", "max_stars_repo_head_hexsha": "c2c459d39c6e4f53147b9409d4e937c38c289923", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
"""
Copyright (C) 2018-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | {"hexsha": "918101586767231f7311bccb771926b99bc3a1a7", "size": 17433, "ext": "py", "lang": "Python", "max_stars_repo_path": "model-optimizer/extensions/middle/TensorIteratorMerge.py", "max_stars_repo_name": "fujunwei/dldt", "max_stars_repo_head_hexsha": "09497b7724de4be92629f7799b8538b483d809a2", "max_stars_repo_licens... |
import pandas as pd
import regex as re
import numpy as np
import sys
import time
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer, TfidfVectorizer
from collections import OrderedDict
from nltk.corpus import words
from preprocess import CustomAnalyzer, doFreq, doTf_IDF
from dataJoin import j... | {"hexsha": "707d97062455c73a75b8e8526326c83720baedd5", "size": 2713, "ext": "py", "lang": "Python", "max_stars_repo_path": "Preprocess/common_vocabulary.py", "max_stars_repo_name": "charx7/MachineLearning", "max_stars_repo_head_hexsha": "527602a40092f1458b6b99f2de48c10d323e8ea4", "max_stars_repo_licenses": ["MIT"], "ma... |
#! /usr/bin/env python3
# ================================== #
# VERIFICATION SCRIPT #
# Controls that generated robot #
# provides the same fitness #
# as the one reported #
# ================================== #
import time
import argparse
import subprocess
from numpy imp... | {"hexsha": "bc424c24c78bd14993e8525177344f5995f3afe3", "size": 3415, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulation/measurements_scripts/verify_fitness.py", "max_stars_repo_name": "lis-epfl/Tensoft-G21", "max_stars_repo_head_hexsha": "7a83c5dabc12906c0a6bd1da0a28a131e9d5e144", "max_stars_repo_license... |
from PIL import Image
import colorsys
import math
from math import cos, sin
from numpy import *
pi = 3.14159
if __name__ == "__main__":
im = Image.new("RGB", (1000,1000))
radius = min(im.size)/2.0
centre = im.size[0]/2, im.size[1]/2
pix = im.load()
for r in range(450, 500):
for theta... | {"hexsha": "d06fd1c946f67df2b9298c602e32d16f417cd86a", "size": 895, "ext": "py", "lang": "Python", "max_stars_repo_path": "arduino/ClockIOT/colorwheel.py", "max_stars_repo_name": "wyolum/ClockIOT", "max_stars_repo_head_hexsha": "52a1bf8e1acc3a5ad8314211ef3bc23186b3be89", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import cv2
import numpy as np
import scipy.optimize as opt
import copy
class KalmanTracker:
def __init__(self, disappear_thr=3, min_matches=5, stabilize_prediction=10,
max_distance=100, detection_area=None):
"""Kalman filter for multi-object tracking
Args:
disappear_th... | {"hexsha": "5eb9f60c4ee64b4039db8fdca422374a17f737ee", "size": 20041, "ext": "py", "lang": "Python", "max_stars_repo_path": "video/tracking.py", "max_stars_repo_name": "mcv-m6-video/mcv-m6-2018-team9", "max_stars_repo_head_hexsha": "a017ce7ef304cc2299263d9166df58d7e93d30b2", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import tensorflow as tf
import numpy as np
import pickle
import time
ISOTIMEFORMAT="%Y-%m-%d %X"
tf.flags.DEFINE_string("data_dir", "./data", "The data dir.")
tf.flags.DEFINE_string("sub_dir", "WikiPeople", "The sub data dir.")
tf.flags.DEFINE_string("dataset_name", "WikiPeople", "The name of the dataset.")
tf.flags.D... | {"hexsha": "316f8f80124ede79279ec71318af187e0676334c", "size": 8984, "ext": "py", "lang": "Python", "max_stars_repo_path": "builddata.py", "max_stars_repo_name": "gsp2014/NeuInfer_forGithub", "max_stars_repo_head_hexsha": "7e8af2f3796cb44ad00416b0b79413153965032b", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_... |
\chapter{Motivation for Classification Plan}
\section {Semisimple and unipotent elements}
{\bf Canonical group:} $GL_n(q), q=p^k$ is a good prototype example of an ``almost simple" group. Doing computations in
$GL_n(q)$ is also easier than doing them in $PSL_n(q)$. There are two kinds of elements in $GL_n(q)$:
\... | {"hexsha": "ba50a36c2f62c0863b48d75b7fea2cf614925a90", "size": 6386, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "groups/gtFSGMotivation.tex", "max_stars_repo_name": "jlmucb/class_notes", "max_stars_repo_head_hexsha": "b8571df2dca933f6594a16eb02b581d38ca4ccfd", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
import os
import numpy as np
import glob
import pdb
from tqdm import tqdm
all_vid_folders = glob.glob('/home/data/vision7/JAAD/flownet2/*')
for vid_folder in tqdm(all_vid_folders):
all_files = sorted(glob.glob(os.path.join(vid_folder, '*.npy')))
per_vid_flows = []
for np_file in all_files:
per_vi... | {"hexsha": "10772e838ea20dc3e2512c08a1a0a6e971b0b4db", "size": 481, "ext": "py", "lang": "Python", "max_stars_repo_path": "per_frame_to_per_video_npy.py", "max_stars_repo_name": "MoonBlvd/flownet2-pytorch", "max_stars_repo_head_hexsha": "db08b78d1389b741a1f10b30ed9a952456518652", "max_stars_repo_licenses": ["Apache-2.0... |
"""Unit tests for stats.correlograms module."""
# -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
import numpy as np
from klustaviewa.stats.correlograms import compute_correlograms
# -------------... | {"hexsha": "bd8c71be1da295ab48a91a3eb0bdeee630e69505", "size": 1604, "ext": "py", "lang": "Python", "max_stars_repo_path": "klustaviewa/stats/tests/test_correlograms.py", "max_stars_repo_name": "fiath/test", "max_stars_repo_head_hexsha": "b50898dafa90e93da48f573e0b3feb1bb6acd8de", "max_stars_repo_licenses": ["MIT", "BS... |
export paramscan
"""
paramscan(parameters, initialize; kwargs...)
Run the model with all the parameter value combinations given in `parameters`
while initializing the model with `initialize`.
This function uses `DrWatson`'s [`dict_list`](https://juliadynamics.github.io/DrWatson.jl/dev/run&list/#DrWatson.dict_list... | {"hexsha": "845ee95e1c4849cc12b3d208d5394f7ebadd8601", "size": 3845, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/simulations/paramscan.jl", "max_stars_repo_name": "melomys/Agents.jl", "max_stars_repo_head_hexsha": "302515429ca67d2e90b71281704b2d2792822efa", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import numpy as np
from numba.ad import Watcher
def sqr(x):
y = 2 * x # irrelevant
return x * x
def compute_stuff(x):
a = np.ones(3) + x
b = 2 * a
c = np.sum(sqr(b))
print 'HELLO', c # <-- way easier to do this than in Theano
return c
def test_foo():
x = np.zeros(3)
w = Wa... | {"hexsha": "7fdd3bcec6235f70dee0c7665032bf66d76b2052", "size": 1123, "ext": "py", "lang": "Python", "max_stars_repo_path": "numba/tests/test_ad.py", "max_stars_repo_name": "teoliphant/numba", "max_stars_repo_head_hexsha": "a2a05737b306853c86c61ef6620c2cc43cb28c18", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star... |
#!/usr/bin/pymol -qc
#
# Aligns hallucination output models to template structures by contig
# (constrained motif) or interface residues
#
# Usage:
#
# ./pymol_align.py --template TEMPLATE_PDB PDB1 PDB2 ...
#
# Updated 2022-1-6
import pandas as pd
import numpy as np
from pymol import cmd
from glob import glob
from... | {"hexsha": "c4e4480d4a2c7ebcec336b80c3fef8c36a4a0f67", "size": 6566, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/pymol_align.py", "max_stars_repo_name": "RosettaCommons/RFDesign", "max_stars_repo_head_hexsha": "b404b8b2c57f89c047529c30259aeeb8f6012b61", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created Jul 2020
@author: TheDrDOS
"""
# Clear the Spyder console and variables
try:
from IPython import get_ipython
get_ipython().magic('clear')
get_ipython().magic('reset -f')
except:
pass
from bokeh.models import ColumnDataSource
import os
import ... | {"hexsha": "64be8ba750e7609aa2c3b7c138f466dfc30beb8f", "size": 5805, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/legacy/make_external_datafiles.py", "max_stars_repo_name": "thedrdos/covid-map", "max_stars_repo_head_hexsha": "745b1ea679da52638abd586e5357aec2cda4cb09", "max_stars_repo_licenses": ["MIT"], ... |
import numpy as np
import scipy.stats
from sklearn import preprocessing
a = np.array([0, 1, 2, 3, 4])
print(a)
# [0 1 2 3 4]
print((a - a.min()) / (a.max() - a.min()))
# [0. 0.25 0.5 0.75 1. ]
print((a - a.mean()) / a.std())
# [-1.41421356 -0.70710678 0. 0.70710678 1.41421356]
print((a - a.mean()) / ... | {"hexsha": "c8300d6a9f170aaf61f8c4d73609956284e57ac5", "size": 3411, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebook/numpy_normalization.py", "max_stars_repo_name": "vhn0912/python-snippets", "max_stars_repo_head_hexsha": "80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038", "max_stars_repo_licenses": ["MIT"], "m... |
\documentclass[10pt]{article}
\usepackage{amsmath}
\begin{document}
\section{Fast image pre-processing}
The objective of the pre-processing is to provide data whose values
are proportional to the incident flux and their respective precision.
This can be time-consuming ($\sim 5 - 7$ operations per pixel are
needed) ... | {"hexsha": "bb0e49f58b2f017d9c4528f8a7fb8f6e85a5de87", "size": 15950, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/fastops.tex", "max_stars_repo_name": "emmt/PVC", "max_stars_repo_head_hexsha": "61bac62ee2c1f28c8bab59d63f39037d2bd17f63", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_r... |
[STATEMENT]
lemma merge_ffold_wf_list_arcs:
"\<lbrakk>\<And>x. x \<in> fset xs \<Longrightarrow> wf_darcs (Node r {|x|}); list_dtree (Node r xs)\<rbrakk>
\<Longrightarrow> wf_list_arcs (ffold (merge_f r xs) [] xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>\<And>x. x \<in> fset xs \<Longrightarro... | {"llama_tokens": 25175, "file": "Query_Optimization_IKKBZ", "length": 49} |
import random
import numpy as np
import tensorflow as tf
from keras.preprocessing.sequence import pad_sequences
from keras_bert import Tokenizer, load_vocabulary, load_trained_model_from_checkpoint
import logging
from utils.text_featurizers import TextFeaturizer
import os
class Punc_DataLoader():
def __init__(sel... | {"hexsha": "b987be99e186870b017299b7a5cbac510542bd12", "size": 8234, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataloaders/punc_dataloader.py", "max_stars_repo_name": "ishine/TensorflowASR-1", "max_stars_repo_head_hexsha": "c0bcaec124dd96138ac401dfbde0b8c795737bb1", "max_stars_repo_licenses": ["Apache-2.0"... |
#!/usr/bin/env python
# coding: utf-8
# # Importing the necessary dependencies
# In[1]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import ac... | {"hexsha": "a04e09eaaa82ff4bca5d9109158392b21b15eefc", "size": 2906, "ext": "py", "lang": "Python", "max_stars_repo_path": "wine quality prediction model.py", "max_stars_repo_name": "Hemant2801/Wine-quality-prediction", "max_stars_repo_head_hexsha": "3daf3f2fcd5e36d0eabba81068b14f1116842999", "max_stars_repo_licenses":... |
/-
Copyright (c) 2018 Patrick Massot. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Patrick Massot, Johannes Hölzl
-/
import order.liminf_limsup
import topology.algebra.uniform_group
import topology.metric_space.algebra
import topology.metric_space.isometry
import top... | {"author": "jjaassoonn", "repo": "projective_space", "sha": "11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce", "save_path": "github-repos/lean/jjaassoonn-projective_space", "path": "github-repos/lean/jjaassoonn-projective_space/projective_space-11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce/src/analysis/normed/group/basic.lean"} |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from collections import defaultdict
import math
import multiprocessing
from multiprocessing import Pool
from itertools import repeat
import json
#from stemming.porter2 import stem
import numpy as np
from multiprocessing import Process, Manager
from multiprocessing.managers... | {"hexsha": "6f8940222236f2f8c26d592a3e0cc9844600c523", "size": 5019, "ext": "py", "lang": "Python", "max_stars_repo_path": "src_SR/monthly_SR_all_Twitter_users.py", "max_stars_repo_name": "sanja7s/SR_Twitter", "max_stars_repo_head_hexsha": "2eb499c9aa25ba6e9860cd77eac6832890d2c126", "max_stars_repo_licenses": ["MIT"], ... |
# Understanding the data + Catalyst/Kekas baseline
import numpy as np
import l5kit, os
import matplotlib.pyplot as plt
from l5kit.rasterization import build_rasterizer
from l5kit.configs import load_config_data
from l5kit.visualization import draw_trajectory, TARGET_POINTS_COLOR
from l5kit.geometry import transform_poi... | {"hexsha": "6f1fded6a98ae555c158ce2ce0bf75e2545b1996", "size": 3547, "ext": "py", "lang": "Python", "max_stars_repo_path": "Kaggle/Lyft Motion Prediction for AVs/map.py", "max_stars_repo_name": "GaryMK/Machine-Learning", "max_stars_repo_head_hexsha": "0eb89ed4c6ea712f518741fdcc63f1b2109b4212", "max_stars_repo_licenses"... |
'''
MFEM example 18 parallel
This is a version of Example 18 with a simple adaptive mesh
refinement loop.
See c++ version in the MFEM library for more detail
'''
import mfem.par as mfem
from ex18_common import FE_Evolution, InitialCondition, RiemannSolver, DomainIntegrator, FaceIntegrator
from m... | {"hexsha": "d2a0c96751deafe84c43c410d8fe1ff999897bf7", "size": 9202, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ex18p.py", "max_stars_repo_name": "mfem/PyMFEM", "max_stars_repo_head_hexsha": "b7b7c3d3de1082eac1015e3a313cf513db06fd7b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": ... |
#---Graph plotting script with classes
#——Author: Silvena Lam
import calendar
import datetime
import re #re = regex
import csv
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import numpy as np
import pandas as pd
from datetime import datetime
from datetime import timedelta
from ... | {"hexsha": "dca442fbfa0a2d357fdf9c8ba346a68764817629", "size": 32624, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot.py", "max_stars_repo_name": "websponse/matplot-qin", "max_stars_repo_head_hexsha": "d93ba3fe382b59097c10171ecaf3cb1bd163a025", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
import torch.utils.data as data
import numpy as np
import torch
import pandas as pd
from torchvision import transforms as tf
from torchvision.transforms import functional as F
import PIL
import random
import os
from pathlib import Path
from PIL import Image
import h5py
import time
try:
from .helper import Augment... | {"hexsha": "83117df3fab1769938dc0111eeaebe9043b5f981", "size": 5125, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset/ml_hypersim.py", "max_stars_repo_name": "JonasFrey96/ml-hypersim-pytorch", "max_stars_repo_head_hexsha": "926192c08689d01bf010976d8d194493f04d2585", "max_stars_repo_licenses": ["Apache-2.0... |
#!/usr/bin/env python
# ===============================================================================
# Copyright 2015 Geoscience Australia
#
# 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
... | {"hexsha": "db55c444781ae722d19a9573e363e12349ac42c4", "size": 7204, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_tiling.py", "max_stars_repo_name": "sixy6e/eo-tools", "max_stars_repo_head_hexsha": "9e2772a5f15e04f6f7e3941541381544247ae1f2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou... |
# -*- coding: utf-8 -*-
"""
File Name: gt_utils
Description : gt 四边形分割为固定宽度的系列gt boxes
Author : mick.yi
date: 2019/3/18
"""
import numpy as np
def linear_fit_y(xs, ys, x_list):
"""
线性函数拟合两点(x1,y1),(x2,y2);并求得x_list在的取值
:param xs: [x1,x2]
:param ys: [y1,... | {"hexsha": "dd475e620e7ba3795cda2d0b07400fd6f7822b17", "size": 3941, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctpn/utils/gt_utils.py", "max_stars_repo_name": "tainenko/keras-ctpn", "max_stars_repo_head_hexsha": "72afbced0d409801dd46307af6d2860c943d500c", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
[STATEMENT]
lemma update_updates_conv_if:
"map_of (updates xs ys (update x y al)) =
map_of
(if x \<in> set (take (length ys) xs)
then updates xs ys al
else (update x y (updates xs ys al)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. map_of (updates xs ys (update x y al)) = map_of (if x \<i... | {"llama_tokens": 192, "file": null, "length": 1} |
function varargout = GUIEditTextualFileHeader(varargin)
% GUIEditTextualFileHeader : GUI for editing the SGY header
%
% Call :
% SH=GUIEditTextualFileHeader(SH);
%
%
% Example :
% [Data,STH,SH]=ReadSegy('841_m.sgy');
% SH=GUIEditTextualFileHeader(SH);
%
%
% GUIEDITTEXTUALFILEHEADER M-file for GUIEditTextualFil... | {"author": "cultpenguin", "repo": "segymat", "sha": "6470f59fd8184f0fff0d89383265417b461cc1da", "save_path": "github-repos/MATLAB/cultpenguin-segymat", "path": "github-repos/MATLAB/cultpenguin-segymat/segymat-6470f59fd8184f0fff0d89383265417b461cc1da/GUI/GUIEditTextualFileHeader.m"} |
# https://github.com/grasingerm/lbxflow/blob/master/inc/lattice.jl
# http://mafija.fmf.uni-lj.si/seminar/files/2012_2013/Lattice_Boltzmann_method.pdf
# const original_order = [1, 2 ,3, 4]
struct D2Q4{
T <: Real,
Abscissaes <: AbstractMatrix{<:Integer},
Weights <: AbstractVector{<:Real},
} <: Quadrature
... | {"hexsha": "6b9fcb661ed84625b45e2d48ea68d1554cec20ef", "size": 713, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/quadratures/D2Q4.jl", "max_stars_repo_name": "MarkRedeman/LatticeBotlzmann.jl", "max_stars_repo_head_hexsha": "7c3e88264aa763f5bf54a4ef7daaa79830faf1bf", "max_stars_repo_licenses": ["MIT"], "max... |
using ChangesOfVariables, InverseFunctions, ArraysOfArrays, Statistics
using Optimisers
using Plots
using EuclidianNormalizingFlows: CenterStretch, JohnsonTrafo, HouseholderTrafo
using EuclidianNormalizingFlows: optimize_whitening
f_fwd_true =
CenterStretch([4.0], [1.0], [0.0]) ∘
JohnsonTrafo([10.0], [3.5], [... | {"hexsha": "c16db08e019acf8344f166831812111da901393f", "size": 1467, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/nf_example_1d.jl", "max_stars_repo_name": "ValentinGumpold/EuclidianNormalizingFlows.jl", "max_stars_repo_head_hexsha": "d188879bd139c37fea666e18bece2f44eb6184ae", "max_stars_repo_licenses... |
#include "MatrixMultiply.hpp"
#include <iostream>
#include <exception>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_proxy.hpp>
#include <numeric>
#include <stdlib.h>
# define ROWMATRIXPOS(rowSize , row, col) (rowSize * row) + col
# define COLMATRIXPOS(colSize , row, col) (colSize * ... | {"hexsha": "e148dfcca38597e221c5967473d931d41f183c3e", "size": 1781, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Matrix-Multiplication-Speedup/src/MatrixMultiply.cpp", "max_stars_repo_name": "samkreter/High-Performance-Computing", "max_stars_repo_head_hexsha": "cb8c944fa0ed39aaea41ee4ecb202dd2c18a52a2", "max_s... |
'''
Created on 31 Oct 2014
@author: Ronny Andersson (ronny@andersson.tk)
@copyright: (c) 2014 Ronny Andersson
@license: MIT
'''
# standard library
import unittest
# external libraries
import numpy as np
import nose
# local libraries
from zignal import Audio
class Test_single_channel(unittest.TestCase):
def set... | {"hexsha": "7ce399122d7bb091ae1cd57803ad15b5b4a54969", "size": 2567, "ext": "py", "lang": "Python", "max_stars_repo_path": "zignal/tests/test_audio_peak.py", "max_stars_repo_name": "ZenulAbidin/zignal", "max_stars_repo_head_hexsha": "df1526aa687f513f096a6c5f6790a34e794752a4", "max_stars_repo_licenses": ["MIT"], "max_st... |
[STATEMENT]
lemma totalize_stable_iff [simp]: "(totalize F \<in> stable A) = (F \<in> stable A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (totalize F \<in> UNITY.stable A) = (F \<in> UNITY.stable A)
[PROOF STEP]
by (simp add: stable_def) | {"llama_tokens": 101, "file": null, "length": 1} |
import logging
import os
import pathlib
import shutil
import subprocess
import tempfile
from datetime import datetime
import numpy as np
from sdgym.constants import CATEGORICAL, ORDINAL
from sdgym.synthesizers.base import LegacySingleTableBaseline
from sdgym.synthesizers.utils import Transformer
LOGGER = logging.get... | {"hexsha": "9c349bb2fd5828f0d53c502d16005bdd9105b58c", "size": 3323, "ext": "py", "lang": "Python", "max_stars_repo_path": "sdgym/synthesizers/privbn.py", "max_stars_repo_name": "EchizenG/SDGym", "max_stars_repo_head_hexsha": "2e56f7c28cc588405f8ec0c4c535845fbf846de4", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
#!/usr/bin/env python
# coding: utf-8
import cv2
import numpy as np
from MyDIPUtils.bitop import is_similar
def floodfill(image, FULL = False):
im_in = image.copy()
# Copy the thresholded image.
im_floodfill = im_in.copy()
# Mask used to flood filling.
# Notice the size nee... | {"hexsha": "6fbd3ad8cd950642fce8f521342d60ee1a5a41e2", "size": 2107, "ext": "py", "lang": "Python", "max_stars_repo_path": "MyDIPUtils/hole.py", "max_stars_repo_name": "DaddyGang/Laser-Shadowgraph-Image-Processing", "max_stars_repo_head_hexsha": "befbba60f88d6ec3b250458733b2d56a3712e970", "max_stars_repo_licenses": ["M... |
import h5py
import numpy as np
from mountaintools import client as mt
from .mdaio import writenpy
import tempfile
import shutil
import mlprocessors as mlpr
import json
import simplejson
def h5_to_dict(fname, *, upload_to=None, use_cache=False):
if use_cache:
result = H5ToDict.execute(
h5_in=fna... | {"hexsha": "bc45e126f8f977fffe047de98a9c743403c6c39f", "size": 5318, "ext": "py", "lang": "Python", "max_stars_repo_path": "widgets/NWBBrowser/h5_to_dict.py", "max_stars_repo_name": "flatironinstitute/ephys-viz", "max_stars_repo_head_hexsha": "8da5f334e5b0cea41ad746872ef82ef858348fdf", "max_stars_repo_licenses": ["Apac... |
[STATEMENT]
lemma expand_next_propag:
fixes n_ns :: "_ \<times> 'a node set"
assumes "next_propag__assm \<mu> n_ns
\<and> next_propag__rslt \<mu> (snd n_ns)
\<and> expand_assm_incoming n_ns
\<and> expand_name_ident (snd n_ns)" (is "?Q n_ns")
shows "expand n_ns \<le> SPEC (\<lambda... | {"llama_tokens": 486054, "file": "LTL_to_GBA_LTL_to_GBA", "length": 227} |
import numpy
import numpy as np
import math
import cv2
from collections import namedtuple
CameraOption = namedtuple('CameraOption', ['focal_x', 'focal_y', 'center_x', 'center_y', 'width', 'height', 'far_point'])
class Camera(object):
def __init__(self, dataset):
intel = [241.42, 241.42, 160, 120, 320, 240... | {"hexsha": "3b926da4a7173dcb0def39eaafaca472d708f144", "size": 12511, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/poseAugment.py", "max_stars_repo_name": "fanglinpu/JGR-P2O", "max_stars_repo_head_hexsha": "bd69ec5181f8d0c3571f4872d458a606be01c573", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
using LTC
using GalacticOptim
using Plots
using Functors
function generate_data()
in_features = 2
out_features = 1
N = 48
data_x = [sin.(range(0,stop=3π,length=N)), cos.(range(0,stop=3π,length=N))]
data_x = [reshape([Float32(data_x[1][i]),Float32(data_x[2][i])],2,1) for i in 1:N]# |> f32
data_y... | {"hexsha": "714695f9878f7c18d8563ddd48f11cfb094d45e1", "size": 2637, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "example/sine-galactic.jl", "max_stars_repo_name": "Vaibhavdixit02/LTC.jl", "max_stars_repo_head_hexsha": "34942b59b5a8a160221d3eb3bb31b94ba1d5f34a", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2011.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <mpllibs/metamonad/try_c.hpp>
#include <mpllibs/metamonad/exception.hpp>
#include <mplli... | {"hexsha": "58c34369fc8f39acb5e8c03408b789eaf200b62f", "size": 1145, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/metamonad/example/exception_debug/main.cpp", "max_stars_repo_name": "sabel83/mpllibs", "max_stars_repo_head_hexsha": "8e245aedcf658fe77bb29537aeba1d4e1a619a19", "max_stars_repo_licenses": ["BSL... |
import numpy as np
import keras
from keras.models import Sequential, Model
from keras.layers import Input, Dense, Activation, Conv2D, MaxPooling2D, Flatten, Dropout
NUM_EPOCHS = 3
NUM_CLASSES = 4
BATCH_SIZE = 512
INPUT_SHAPE = (4, 4, 16)
def match_table(arrnum):
if arrnum==0:
return 0
for i in range(... | {"hexsha": "ce21e57feac401b554b38efc2ed81a00a3867c33", "size": 2773, "ext": "py", "lang": "Python", "max_stars_repo_path": "my_train_offline.py", "max_stars_repo_name": "sjtuchenye/2048-api", "max_stars_repo_head_hexsha": "b449a5135057d3a4a702a1e6f90d9b9455aefe6a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_... |
# The canonical form of a word
canonise_word <- function(word) {
return(word %>% str_trim %>% tolower)
}
# parses a block of word pairs.
# returns 3 lists:
# 1. list of pairs of words
# 2. list of words not in norms
# 3. list of malformed lines
get_word_pairs <- function(word_pairs_block) {
left_words ... | {"hexsha": "b38d9c0b2a48bbef0946dfd5468b47e9c0f33240", "size": 3350, "ext": "r", "lang": "R", "max_stars_repo_path": "app/ui/parse_input.r", "max_stars_repo_name": "emcoglab/sensorimotor-distance-calculator", "max_stars_repo_head_hexsha": "496390f99a0641cb7ff0efc16e100b32be2cdb51", "max_stars_repo_licenses": ["CC-BY-4.... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from tempfile import mkdtemp
from os import path
from inspect import stack, isgeneratorfunction, isfunction
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
import shutil
from sys import modules
from warnings import warn
from tracebac... | {"hexsha": "d6c9d2dc873d0a9464d88367f8f5ac0747e93418", "size": 11806, "ext": "py", "lang": "Python", "max_stars_repo_path": "jitcxde_common/_jitcxde.py", "max_stars_repo_name": "neurophysik/jitcxde_common", "max_stars_repo_head_hexsha": "ac1f11c7f9b43a9f4905ec32712e48122a095e93", "max_stars_repo_licenses": ["BSD-3-Clau... |
! { dg-do compile }
!
! PR 63363: No diagnostic for passing function as actual argument to KIND
!
! Contributed by Ian Harvey <ian_harvey@bigpond.com>
type :: t
end type
type(t) :: d
class(*), allocatable :: c
print *, KIND(d) ! { dg-error "must be of intrinsic type" }
print *, KIND(c) ! { dg-error ... | {"hexsha": "3230bfa5f6432617b51980242550c2ed753e84ac", "size": 608, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/kind_1.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_licenses"... |
# This file is part of GridCal.
#
# GridCal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GridCal is distributed in the hope that... | {"hexsha": "8709447d2d455faca1a286be626fd5acff19b0aa", "size": 49572, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/GridCal/Engine/Simulations/OPF/ntc_opf.py", "max_stars_repo_name": "SanPen/GridCal", "max_stars_repo_head_hexsha": "fd3c24afff91325b8b682b03cab2b8b8edcdda57", "max_stars_repo_licenses": ["BSD... |
import numpy as np
import params
from scipy import fftpack, ndimage
from helpers.decorators import deprecated, timeit
def calculate_energy_over_segments(segments):
"""Iterate over all segments and count energy ( E = sum(x^2))"""
signal_power2 = segments ** 2
return np.sum(signal_power2, axis=1)
def calc... | {"hexsha": "ab649c3409628a15c6346697068f87a21955854c", "size": 6138, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/audio_processing/feature_extraction.py", "max_stars_repo_name": "Lakoc/bachelor_thesis", "max_stars_repo_head_hexsha": "685a81901ac19a318237772f24df1b1e94772b26", "max_stars_repo_licenses": ["... |
import sys
import numpy as np
import logging
import sentry_sdk
from sentry_sdk.integrations.logging import LoggingIntegration
from data_analysis.model import *
from data_analysis.dataset import construct_encoding
from data_analysis.los_alamos_processing.util import load_mapping, calculate_input_vector_length
from data_... | {"hexsha": "4ea67838ed9054ada7579137cfa68948a38069b2", "size": 2952, "ext": "py", "lang": "Python", "max_stars_repo_path": "server/data_analysis/predict.py", "max_stars_repo_name": "xhuang98/Dtect", "max_stars_repo_head_hexsha": "929d01945fd2768032dbb84d8ba1f62069132172", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
"""
Deprecated, most likely broken, to be removed
"""
from pathlib import Path
from string import ascii_uppercase
from typing import Tuple, Any, Union
import numpy as np
from matplotlib import pyplot as plt
from alphafold.common import protein
from alphafold.data import pipeline
from alphafold.data import templates
... | {"hexsha": "4b1f5eed0d5e8dd4bcc6abb3a72636c7c69d0856", "size": 9045, "ext": "py", "lang": "Python", "max_stars_repo_path": "colabfold/single_sequence.py", "max_stars_repo_name": "pankev-in/ColabFold", "max_stars_repo_head_hexsha": "518a57993c9f1559a629b7d78ef99055df409010", "max_stars_repo_licenses": ["MIT"], "max_star... |
[STATEMENT]
lemma combine_r_distr:
"\<lbrakk> set Ks \<subseteq> carrier R; set Us \<subseteq> carrier R \<rbrakk> \<Longrightarrow>
k \<in> carrier R \<Longrightarrow> k \<otimes> (combine Ks Us) = combine (map ((\<otimes>) k) Ks) Us"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>set Ks \<subseteq>... | {"llama_tokens": 207, "file": null, "length": 1} |
import numpy as np
import matplotlib.pyplot as plt
import cv2
# read img
image = cv2.imread('test.jpeg', 0)
# DCT
img_dct = cv2.dct(np.float32(image))
img_dct_log = np.log(abs(img_dct))
# IDCT
img_back = cv2.idct(img_dct)
print(type(img_dct))
ret = image * img_dct
result = np.zeros((8, 8))
for i in range(0, 256):
... | {"hexsha": "c6429f381638948748d5bb94073dd184c60ba20a", "size": 929, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "by-cloud/DCT-Coefficients", "max_stars_repo_head_hexsha": "d49b55829bf2bd2d4955e5636a766782d76ba5d1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
# EMAHelperFunctions.py
#################################################################
## Libraries
import matplotlib.pyplot as plt
import numpy as np
################################################################
## Exponential Moving Average (EMA) Functions
# Calculate the alpha value for a desired period... | {"hexsha": "d2f0b8203bc0eff91aafe947961002e5ecc278fc", "size": 2927, "ext": "py", "lang": "Python", "max_stars_repo_path": "EMAHelperFunctions.py", "max_stars_repo_name": "kilolux/fsp-demos", "max_stars_repo_head_hexsha": "50e96a10729477042b10291471c812d10bfd54fc", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
MODULE biomath_sort_mod
! .. Use Statements ..
USE biomath_constants_mod
! ..
! .. Default Accessibility ..
PRIVATE
! ..
! .. Public Statements ..
PUBLIC :: sort_list
! ..
! .. Generic Interface Blocks ..
INTERFACE sort_list
MODULE PROCEDURE sort_list_char, sort_list_dbl, &
... | {"hexsha": "2b52a196c2df40928b897d8a2674562225aedbc0", "size": 21339, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "mesas/sas/cdflib90/biomath_sort_mod.f90", "max_stars_repo_name": "OliverEvans96/mesas", "max_stars_repo_head_hexsha": "eb830074dd3b2977013cda1e2a30b79e10379190", "max_stars_repo_licenses": ["MI... |
////////////////////////////////////////////////////////////////////////////////
#include "boundary_loop.h"
#include <cellogram/tri2hex.h>
#include <cellogram/navigation.h>
// #include <igl/is_border_vertex.h>
#include <igl/edges.h>
#include <Eigen/Dense>
#include <vector>
#include <iostream>
//////////////////////////... | {"hexsha": "f46f5615435feb0ad91272c15624751bf2a4ef06", "size": 3568, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/cellogram/boundary_loop.cpp", "max_stars_repo_name": "cellogram/cellogram", "max_stars_repo_head_hexsha": "d378e9b87e56b879b2fb352b08b0fed714481968", "max_stars_repo_licenses": ["MIT"], "max_sta... |
\documentclass[11pt, a4paper, leqno]{article}
\usepackage{a4wide}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{float, afterpage, rotating, graphicx}
\usepackage{epstopdf}
\usepackage{longtable, booktabs, tabularx}
\usepackage{fancyvrb, moreverb, relsize}
\usepackage{eurosym, calc}
% \usepackage{chng... | {"hexsha": "e49f2a40fb58e2a2211fe2ab91cda3e3a8675b12", "size": 5109, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/paper/Explanation_of_Findings.tex", "max_stars_repo_name": "burakbalaban/airbnb_project", "max_stars_repo_head_hexsha": "6a67ac32a85dd2a7817682f1b3fa5121f1a8b883", "max_stars_repo_licenses": ["M... |
[STATEMENT]
lemma mult_less_multiset\<^sub>D\<^sub>M: "(M, N) \<in> mult {(x, y). x < y} \<longleftrightarrow> less_multiset\<^sub>D\<^sub>M M N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ((M, N) \<in> mult {(x, y). x < y}) = less_multiset\<^sub>D\<^sub>M M N
[PROOF STEP]
unfolding multp_def[of "(<)", symmetric... | {"llama_tokens": 337, "file": null, "length": 3} |
(* Title: RTS/JVM_RTS/JVMSemantics.thy *)
(* Author: Susannah Mansky, UIUC 2020 *)
section "Instantiating @{term Semantics} with Jinja JVM"
theory JVMSemantics
imports "../Common/Semantics" JinjaDCI.JVMExec
begin
fun JVMsmall :: "jvm_prog \<Rightarrow> jvm_state \<Rightarrow> jvm_state set" where
"JVMsmall P \<sigma... | {"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/Regression_Te... |
import argparse
import torch
import numpy as np
from architectures.hardnet import HardNet, HardNetKernel
from transformation import TransformPipeline, SpatialTransformation, Greyscale
from ika import IKA
import numba
from numba import prange
import math
@numba.jit(parallel=True, nogil=True, fastmath=True, nopython=T... | {"hexsha": "c4d0d3a583c398aa896710676fd1b864817d507a", "size": 2979, "ext": "py", "lang": "Python", "max_stars_repo_path": "paper results/test_model.py", "max_stars_repo_name": "matteo-ronchetti/IKA", "max_stars_repo_head_hexsha": "29d1752a059c3ab7659b332b72bf8c1506e7dd20", "max_stars_repo_licenses": ["MIT"], "max_star... |
#' Describe HILDA variables
#'
#' Matches variable names to data dictionary entries and returns a
#' data table of descriptions. The function is not case sensitive and
#' matches with or without wave prefixes.
#'
#' @param variables A character vector of variable names
#'
#' @return A data table subset of the data \co... | {"hexsha": "0ba26ef1d143bf07aa1971a6ed203c8acb6b67da", "size": 1452, "ext": "r", "lang": "R", "max_stars_repo_path": "R/variable_matching.r", "max_stars_repo_name": "PC-henry/hilda", "max_stars_repo_head_hexsha": "fa24f9351977e2792de5555fd0a513e9383a7dda", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
#include <cstring>
#include <JsonException.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
#include "Utils.hpp"
bool Utils::isCharSpace(char c)
{
return boost::is_any_of(" \t\r\n")(c);
}
bool Utils::isCharQuote(char c)
{
return boost::is_any_of("\'\"")(c);
}
bool Utils::isCharNum... | {"hexsha": "5c0da20af10d3f16ac20988ec37af69901954d89", "size": 634, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "sources/Utils.cpp", "max_stars_repo_name": "CrestoniX/LAB1", "max_stars_repo_head_hexsha": "70db344ac53ee9d2fe5f6abc0c781af0826d533e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5.0, "max... |
import json
from datetime import datetime
from typing import Optional, List, Dict, Tuple
from sage.database.db_iterator import DBIterator
class PostgresIterator(DBIterator):
"""A PostgresIterator fetches RDF triples from a versionned PostgreSQL table using batch queries and lazy loading.
Args:
* curso... | {"hexsha": "4e6dd53dae5d502322f469d3788dbdc0fc24e853", "size": 2802, "ext": "py", "lang": "Python", "max_stars_repo_path": "sage/database/postgres_backends/postgres_mvcc/iterator.py", "max_stars_repo_name": "sage-org/sage-engine", "max_stars_repo_head_hexsha": "33b3c775f6932d0e61bcce2c763f2d63846dba40", "max_stars_repo... |
module ThermalModelM
use UtilitiesM
use SparseKit
use MeshM
use ModelM
use HeatFluxM
implicit none
private
public :: ThermalModelDT, thermalModel
type, extends(modelDT) :: ThermalModelDT
type(Sparse) :: lhs
real(rkind), dimension(:) , allocatable :: rh... | {"hexsha": "c72779523cfc593826cba6a386394285ddcfcfd5", "size": 1974, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "applications/Thermal3D/src/Model/ThermalModel.f90", "max_stars_repo_name": "ponfo/Project790", "max_stars_repo_head_hexsha": "abcfcc4945024bd6bd5832bc3ef3d4e1b0df3b91", "max_stars_repo_licenses"... |
#redirect Recruitment and Retention Organizing Committee
| {"hexsha": "5a3219929efdf670205718524cd08510fe52cad3", "size": 57, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Retention_and_Recruitment_Organizing_Committee_Representative.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_... |
########################################################################
# Code to generate BOSS and 2dFLenS data and random lens catalogues #
# in the KiDS regions, including magnitude weights, from the #
# publicly-available datasets.
# Author: Chris Blake
# Questions to: cblake@swin.edu.au
# Original ... | {"hexsha": "e975c9837f20a5b2067a7eae218ad378302d78a4", "size": 32334, "ext": "py", "lang": "Python", "max_stars_repo_path": "GGL_LensCats/makelenscats.py", "max_stars_repo_name": "KiDS-WL/Cat_to_Obs_K1000_P1", "max_stars_repo_head_hexsha": "0de7f79cab150416859ffe58ac2d0f5659aedb5d", "max_stars_repo_licenses": ["MIT"], ... |
import numpy as np
import statistics
import pandas as pd
from matplotlib import pyplot as plt
from Analysis.Metric_Impact_Hijacking import metric_preprocessing as mp
from Analysis.Metric_Impact_Hijacking import give_metric_ases_from_clusters as gmafc
run_script_with_embeddings = True
monitors_selected = [10, 50, 100]
... | {"hexsha": "e7621affc4d5f61b5d6729ed97dbaa00fc982c75", "size": 4027, "ext": "py", "lang": "Python", "max_stars_repo_path": "Analysis/Metric_not_counting_on_labels/metric_methodology.py", "max_stars_repo_name": "cgeorgitsis/ai4netmon", "max_stars_repo_head_hexsha": "36c4c1695fd980705d3e3f76385cda14baf7f397", "max_stars_... |
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from datetime import datetime
from datagen import TextgenDatagen
from model import textgen_transformer
text_file = '../datasets/text_generation/deeplearning.txt'
output_path = 'output'
total_seqs = 40
seq_len = 100
batch_size = 10
total_batche... | {"hexsha": "4a99e9015d8942448b45e003c971b0acdc1b3f28", "size": 1314, "ext": "py", "lang": "Python", "max_stars_repo_path": "transformer/train_textgen.py", "max_stars_repo_name": "hqbao/dlp_tf", "max_stars_repo_head_hexsha": "e8fe3281470faebbe8e36caf55025c270e84c44f", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
## Change to where you downloaded and unziped to...
setwd("~/Desktop/bggn213_08_rstats/")
## Exercise 1
read.delim("weight_chart.txt") -> weight.chart
plot(weight.chart$Age,
weight.chart$Weight,
type="b",
pch=15,
cex=1.5,
lwd=2,
ylim=c(2,10),
ylab="Weight (kg)",
... | {"hexsha": "3d6cd71b9a29c8bbf019e5ef812bbba79a7f3049", "size": 4499, "ext": "r", "lang": "R", "max_stars_repo_path": "class05/r_core_plots_exercise_answers.r", "max_stars_repo_name": "prpaxson/bimm143", "max_stars_repo_head_hexsha": "ed6ecd640d3904c5997d3eebbbd3057196e54dd6", "max_stars_repo_licenses": ["MIT"], "max_st... |
import multiprocessing
import warnings
from abc import abstractmethod
from datetime import datetime
import os
from pathlib import Path
from gensim import corpora, models
import numpy as np
import csv
import re
# from gttm.word_cloud.wordcloud import generate_wordcloud_of_topic
class TopicIdentifier:
... | {"hexsha": "0788467ff5e6949e8e72ae4bba50de285790162e", "size": 10305, "ext": "py", "lang": "Python", "max_stars_repo_path": "event_detector/gttm/nlp/identify_topic.py", "max_stars_repo_name": "MahdiFarnaghi/gtm", "max_stars_repo_head_hexsha": "adbec372786262607291f901a444a0ebe9e98b48", "max_stars_repo_licenses": ["Apac... |
from scipy.io import netcdf
from scipy.interpolate import UnivariateSpline
import numpy as np
import numpy.matlib
tave=1000
tfave=1090
fpref='center'
basedir = '/marconi_work/FUA34_MULTEI/stonge0_FUA34/rad_test/2nd_deriv/rho_scan2/r0.001ky/'
basedir = '/marconi_work/FUA34_MULTEI/stonge0_FUA34/rad_test/fg_drive/0.00... | {"hexsha": "d5e6465cdf5ee6f6f93ec7566be7af4e28f0379e", "size": 5458, "ext": "py", "lang": "Python", "max_stars_repo_path": "post_processing/zf_single.py", "max_stars_repo_name": "SStroteich/stella-1", "max_stars_repo_head_hexsha": "104556a07b9736e7c28e6f1bf2f799384732f38b", "max_stars_repo_licenses": ["MIT"], "max_star... |
#!/usr/bin/env python3
import sys
sys.path.append('../../../..')
sys.path.append('..')
import numpy as np
import numpy.random as ra
import xarray as xr
import torch
from maker import make_model, load_data, sf
from pyoptmat import optimize
from tqdm import tqdm
import matplotlib.pyplot as plt
import warnings
warn... | {"hexsha": "4b474c8fb3e7eea7bb4b8d6eda4283c028c5e2aa", "size": 2066, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/synthetic/creep-fatigue/eval_speed.py", "max_stars_repo_name": "Argonne-National-Laboratory/pyoptmat", "max_stars_repo_head_hexsha": "a6e5e8d0b93c77374d4ccbc65a86262eec5df77b", "max_stars... |
import sys
sys.path.append("../../external/daisyRec/")
import os
import time
from datetime import datetime
import argparse
import numpy as np
import pandas as pd
from os.path import join
from daisy.utils.metrics import RecallPrecision_ATk,MRRatK_r,NDCGatK_r, HRK_r
from daisy.model.Item2VecRecommender import Item2Vec
fr... | {"hexsha": "e199135308819f9928e8b46ac52cb5f324589e21", "size": 4663, "ext": "py", "lang": "Python", "max_stars_repo_path": "candidate_matching/benchmarks/Item2Vec/Item2Vec.py", "max_stars_repo_name": "jimzhu/OpenCTR-benchmarks", "max_stars_repo_head_hexsha": "e8e723cd7a0ef5ddd40e735b85ce7669955a3a99", "max_stars_repo_l... |
Ramen is a Japanese noodle dish of Chinese origin. You can find it at the following restaurants in Davis:
Davis Oshio Cafe
Mikuni
Ramen Hook
Zen Toro
Instant ramen soup is often jokingly referred to as a staple of the college students students diet. While most cheaply packaged variants are not nutritional unless oth... | {"hexsha": "93d09d6f081dc44730da103748f5e0c7dcbb654b", "size": 4281, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Ramen.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
import backbone.support.configurations_variables as confv
import backbone.support.data_loading as dl
import backbone.support.data_analysis as da
import backbone.support.data_cleaning as dc
import backbone.support.configuration_classes as confc
import backbone.support.saving_loading as sl
import backbone.support.plots_a... | {"hexsha": "7425748c003f9a9efad5d93d7146e540ead3e60f", "size": 12835, "ext": "py", "lang": "Python", "max_stars_repo_path": "backbone/mains-dataset_wise_structural/main_shemo_female.py", "max_stars_repo_name": "Karawalaya/Stress-Detection-Through-Speech-Emotion-Recognition", "max_stars_repo_head_hexsha": "e1ffdb3258bf0... |
Angels Courtyard is one of the features at the Center for Companion Animal Health.
| {"hexsha": "4b31d0f0628d6046b800248c5953f28f120952c4", "size": 86, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Angel%27s_Courtyard.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
"""
Module mpl_tools provides objects to be used in matplotlib plots.
"""
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
from matplotlib.widgets import Slider
import matplotlib.colors as colors
import matplotlib.cm as cmx
import matplotlib as mpl
cmap = plt.... | {"hexsha": "16ddab9aef900343f74d418f0242ec8d187b3932", "size": 19161, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot/mpl_tools.py", "max_stars_repo_name": "yketa/UBC---Spring-2018---code", "max_stars_repo_head_hexsha": "b065544639a483dda48cda89bcbb11c1772232aa", "max_stars_repo_licenses": ["MIT"], "max_sta... |
#! /usr/bin/env python
#===============================================================================
# Copyright 2014 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... | {"hexsha": "864ab5d7d9fb9f87daeb460b18f89a6ff55373c3", "size": 15508, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup.py", "max_stars_repo_name": "yumorozov/scikit-learn-intelex", "max_stars_repo_head_hexsha": "7a39c0a0e208b49f209168b01fb50206f962175f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
function [stack] = fiff_read_mri(fname,read_data)
%
% [stack] = fiff_read_mri(fname,read_data)
%
% read_data argument is optional, if set to false the pixel data are
% not read. The default is to read the pixel data
%
% Read a fif format MRI description file
%
%
% Author : Matti Hamalainen, MGH Martinos Center
% L... | {"author": "fieldtrip", "repo": "fieldtrip", "sha": "c2039be598a02d86b39aae76bfa7aaa720f9801c", "save_path": "github-repos/MATLAB/fieldtrip-fieldtrip", "path": "github-repos/MATLAB/fieldtrip-fieldtrip/fieldtrip-c2039be598a02d86b39aae76bfa7aaa720f9801c/external/mne/fiff_read_mri.m"} |
module VectorWrapper
using JavaCall
const Class = @jimport java.lang.Class
const JString = @jimport java.lang.String
const Object = @jimport java.lang.Object
const RealMatrix = @jimport org.hipparchus.linear.RealMatrix
const StorelessUnivariateStatistic = @jimport org.hipparchus.stat.descriptive.StorelessUnivariateSt... | {"hexsha": "9bb8e13d9d9efbef2cfe7f6421d6b830273cda8c", "size": 875, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "gen/HipparchusWrapper/StatWrapper/DescriptiveWrapper/VectorWrapper/VectorWrapper.jl", "max_stars_repo_name": "JuliaAstrodynamics/Orekit.jl", "max_stars_repo_head_hexsha": "e2dd3d8b2085dcbb1d2c75471d... |
import cv2 as cv
import numpy as np
import math
STD_RES = 512
# Thresholding parameter.
THRESH = 30 # For edge detection
# Canny edge detection parameters.
LOW_THRESH = 0
MAX_THRESH = 255
KERNEL = 3
# Hough Circle Transform parameters.
DP = 2 # Inverse accumulator ratio.
MD = STD_RES # Minimum distance between c... | {"hexsha": "ec32c1d5623e154bc75144bd907bcc7df8a240c4", "size": 15221, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/preprocess_2.py", "max_stars_repo_name": "ss-is-master-chief/diabetic.retinopathy__deep.learning", "max_stars_repo_head_hexsha": "b6a7b57b79f6a26b9ab46055b114c303970beaf6", "max_stars_rep... |
"""Module implementing the networked Participant using gRPC."""
import threading
import time
from enum import Enum, auto
from typing import Dict, List, Tuple
from grpc import Channel, insecure_channel
from numproto import ndarray_to_proto, proto_to_ndarray
from numpy import ndarray
from xain_sdk.cproto.coordinator_p... | {"hexsha": "c3d6081248cf51af879216f0825a84ae3c3faec1", "size": 13107, "ext": "py", "lang": "Python", "max_stars_repo_path": "xain_sdk/participant_state_machine.py", "max_stars_repo_name": "little-dude/xain-sdk", "max_stars_repo_head_hexsha": "fb220301390a0ce0a1afdbc7e9295c5b84863bf8", "max_stars_repo_licenses": ["Apach... |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | {"hexsha": "be5b64dfd4da2997e0f8c374791edb95a73edb4e", "size": 13585, "ext": "py", "lang": "Python", "max_stars_repo_path": "2_raspi_tpu_pose_camera.py", "max_stars_repo_name": "haithienld/AutoModelImproving", "max_stars_repo_head_hexsha": "1f9068cb417775fafea5f25c5ffe222a38657644", "max_stars_repo_licenses": ["Apache-... |
[STATEMENT]
lemma upto_strict[simp]:
"supto\<cdot>\<bottom> = \<bottom>"
"supto\<cdot>m\<cdot>\<bottom> = \<bottom>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. supto\<cdot>\<bottom> = \<bottom> &&& supto\<cdot>m\<cdot>\<bottom> = \<bottom>
[PROOF STEP]
by fixrec_simp+ | {"llama_tokens": 113, "file": "BirdKMP_Theory_Of_Lists", "length": 1} |
#!/usr/bin/env python
import numpy as np
#This function return a TXT file including all poses 1, 2 or 3 gathered in each set into a new txt file representing a participant
#Core variables
itNumber = 6 #Number of iterations
Positions = 3
Participants = 10
Sets = 4
Master_Diss_Path = "/home/generic/ros_workspaces/coach_... | {"hexsha": "47ec2ccd5e04277af39aa55002c9a76403539d44", "size": 1644, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/data_management/Cluster_Creator.py", "max_stars_repo_name": "Uthreloss/Master-Dissertation", "max_stars_repo_head_hexsha": "419faf97d72c762453a3df169d06ad8e7e3daf93", "max_stars_repo_licen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.