text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
shovel_latencies <- function(dir1, dir2) { d1tod2 <- shovel_latency(dir1, dir2) d2tod1 <- shovel_latency(dir2, dir1) df <- data.frame(quantile(d1tod2$latency, c(0, .1, .5, .95, .99, 1)), quantile(d2tod1$latency, c(0, .1, .5, .95, .99, 1))) names(df) <- c(paste(dir1, "to", dir2, sep=" "), ...
{"hexsha": "4de85547b988db24081b059e528a053f6b62c9bd", "size": 839, "ext": "r", "lang": "R", "max_stars_repo_path": "priv/shovel.r", "max_stars_repo_name": "russelldb/rabl", "max_stars_repo_head_hexsha": "9aa140ef5ec09959393adba5a98321b6df8323e1", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 13, "max_s...
""" replica_fidelity(df::DataFrame; p_field = :hproj, skip = 0) Compute the fidelity of the average coefficient vector and the projector defined in `p_field` from the result of replica [`lomc!()`](@ref) passed as argument `df`, using replicas `_1` and `_2`. Calls [`ratio_of_means()`](@ref) to perform a blocking an...
{"hexsha": "9a35c381078e7c49d40cf7184ac038096600eea0", "size": 1369, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/StatsTools/fidelity.jl", "max_stars_repo_name": "joachimbrand/Rimu.jl", "max_stars_repo_head_hexsha": "ee5237794c82e7dc83a9562768cf37c3979c7f55", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import Statistics.LinearRegression import Statistics.Sample import qualified Data.Vector.Unboxed as U import Control.Monad.Random import Control.Monad import Control.Applicative import System.Random.MWC import System.Random.MWC.Distributions import qualified Data.Packed.Vector as V import Graphics.Rendering.Plot main ...
{"hexsha": "46352d50aba46457bad827276912f89ddd472832", "size": 4214, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "tests/linreg.hs", "max_stars_repo_name": "alpmestan/statistics-linreg", "max_stars_repo_head_hexsha": "14c2f10088d1914b0303c191ec0d7243c8eb83ee", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[STATEMENT] lemma invariantQCharacterizationAfterApplyBackjump_1: assumes "InvariantConsistent (getM state)" "InvariantUniq (getM state)" "InvariantWatchListsContainOnlyClausesFromF (getWatchList state) (getF state)" and "InvariantWatchListsUniq (getWatchList state)" and "InvariantWatchListsCharacterization (...
{"llama_tokens": 68503, "file": "SATSolverVerification_ConflictAnalysis", "length": 65}
#= Code related with input output (IO) of .nc files directly to/from ClimArrays utilizing the NCDatasets.jl package and a buttload of convenience code. An initial version of parts of this code was taken from: https://github.com/rafaqz/GeoData.jl =# using NCDatasets: NCDatasets, NCDataset export NCDatasets, NCDataset ex...
{"hexsha": "0587b5a6931e37e0cfe627f5903cdfacbd2e1481", "size": 1789, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/io/netcdf.jl", "max_stars_repo_name": "Balinus/ClimateTypes.jl", "max_stars_repo_head_hexsha": "35b5e8f85638b7f1d3127b7a446de38afba2c6b6", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import Bio.SeqUtils.ProtParam import os import numpy as np SET_NAME = 'MMP-cluster' IF_ONLY_HEAVY = False CNT_DB = 2 CNT_TARGET = 1 REFERENCE_PATH_TESTCASE = './testCase/MMP-cluster/reference-PDB/' TARGETING_PATH_TESTCASE = './testCase/MMP-cluster/targeting-MMP/' TARGET_DESIRE_SIZE = 166 #44 #MMP-cluster # Chothia...
{"hexsha": "39353bc3e62c84bff9ded7c8804063acfe682985", "size": 23004, "ext": "py", "lang": "Python", "max_stars_repo_path": "ASAP/FeatureExtraction.py", "max_stars_repo_name": "HassounLab/ASAP", "max_stars_repo_head_hexsha": "fc02471cd352da1a7783ea48a5caf7874fe4910a", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
[STATEMENT] lemma minus_eq: "x - y = abs_nat (rep_nat x - rep_nat y)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x - y = abs_nat (rep_nat x - rep_nat y) [PROOF STEP] by (metis abs_minus rep_inverse)
{"llama_tokens": 92, "file": "Polynomials_Term_Order", "length": 1}
import cv2 import pandas as pd from face_alignment_1 import face_alignment from face_base import find_face from face_base import license_detection_Rough from face_base import license_detection_Detailed from smooth_sharpen import smooth from smooth_sharpen import sharpen from face_base import divide_image from face_base...
{"hexsha": "37f4419008e2d47b043dbe9ead82398c78862287", "size": 4357, "ext": "py", "lang": "Python", "max_stars_repo_path": "performance_new.py", "max_stars_repo_name": "zacQin/ID_card_identification_2", "max_stars_repo_head_hexsha": "b359e8b0d26352ce359b280c36f2ffa837aa9611", "max_stars_repo_licenses": ["Apache-2.0"], ...
c c Program runs the subroutine iri_sm to obtain IRI13 densities c along an L-shell. c c dlg June 3, 2009 fixed issue with trying to calculate bridge for locations c below the F2 peak along the selected L-shell c dlg June 11, 2009 added switchon feature to field aligned bridge funct...
{"hexsha": "e1af3dc2fde1b36994efefcf94e54ded7dc68d2c", "size": 5940, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "PyGCPM/__data/libgcpm/gcpm/iri_ps_bridge.for", "max_stars_repo_name": "mattkjames7/PyGCPM", "max_stars_repo_head_hexsha": "90d1c29b82b7b286f570eb49f7bf7618ddc4717b", "max_stars_repo_licenses": [...
\cleardoublepage% \phantomsection\addcontentsline{toc}{chapter}{Introduction}% \chapter*{Introduction} As evidenced by Figure~\ref{fig:donald} and a number of films including \emph{Eternal Sunshine of the Spotless Mind} (2004) and \emph{The Discovery} (2017), the idea of directly connecting our brains to machines has ...
{"hexsha": "f3ec389636dca74cfae5a3e3817c289ea5155e84", "size": 39695, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "introduction.tex", "max_stars_repo_name": "lrkrol/dissertation", "max_stars_repo_head_hexsha": "548167344fada64384f95d23be67a48ee08f7449", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count...
import os import numpy as np import torch from torch import nn import gin from sparse_causal_model_learner_rl.trainable.fcnet import build_activation @gin.configurable class AbstractCombinedModel(nn.Module): def __init__(self, n_models, input_shape, output_shape): super(AbstractCombinedModel, s...
{"hexsha": "2e70128a1770db0d3268059518577a4ebfc5794a", "size": 7584, "ext": "py", "lang": "Python", "max_stars_repo_path": "sparse_causal_model_learner_rl/trainable/combined.py", "max_stars_repo_name": "sergeivolodin/causality-disentanglement-rl", "max_stars_repo_head_hexsha": "5a41b4a2e3d85fa7e9c8450215fdc6cf954df867"...
"""Answer to Exercise 1.4 Author: Yuhuang Hu Email : yuhuang.hu@ini.uzh.ch """ from __future__ import print_function import numpy as np import keras.backend as K # define list of placeholders for variables N = 3 theta = [K.placeholder(shape=(), dtype=np.float32) for i in range(N+1)] x = K.placeholder(shape=(), dtype...
{"hexsha": "4737dda146e89a2050d6e4e270dc51e895062989", "size": 813, "ext": "py", "lang": "Python", "max_stars_repo_path": "session_01/ex-1-4.py", "max_stars_repo_name": "PnS2018/exercise-solutions", "max_stars_repo_head_hexsha": "156c07a4cf92f3b6b8af1ac7608a957eba5deba6", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import tensorflow as tf import numpy as np from PIL import Image import imageio import cv2 import glob from skvideo.io import FFmpegWriter as VideoWriter image_shape = (160, 576) filename = 'um_000004.png' image_file = './data/data_road/testing/image_2/' + filename def get_input_image(path): image = Image.open(pa...
{"hexsha": "f192c9b245ac0d7dcfb2808dd7cd4bdc198c5e1a", "size": 3134, "ext": "py", "lang": "Python", "max_stars_repo_path": "run.py", "max_stars_repo_name": "daltonrenaldo/CarND-Semantic-Segmentation", "max_stars_repo_head_hexsha": "720d89a125449f74697e6da4ed59e5934959f306", "max_stars_repo_licenses": ["MIT"], "max_star...
""" Case 27: This case study a three bus system with 1 machine (One d- One q-: 4th order model), a VSM of 19 states and an infinite source. The test changes botht he voltage magnitude and phase angle of the source bus. """ ################################################## ############### LOAD DATA ###################...
{"hexsha": "a4346c53f5bb5b84afb74cfac8653c613f634c68", "size": 4862, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_case27_source_bus_voltage_change.jl", "max_stars_repo_name": "tavovalmo/PowerSimulationsDynamics.jl", "max_stars_repo_head_hexsha": "61ba0433ab89caa37f9cf2caedaa2bcc2566591c", "max_stars_...
[STATEMENT] lemma dlts_rel_eq[unfolded vimage2p_def]: "BNF_Def.vimage2p un_DLTS un_DLTS (rel_fun (=) (rel_option (=))) = (=)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. BNF_Def.vimage2p un_DLTS un_DLTS (rel_map (=)) = (=) [PROOF STEP] by (auto simp add: vimage2p_def pmf.rel_eq option.rel_eq fun.rel_eq fun_eq_i...
{"llama_tokens": 161, "file": "Probabilistic_System_Zoo_Probabilistic_Hierarchy", "length": 1}
import os import re import shutil import subprocess from subprocess import CalledProcessError from cStringIO import StringIO import nibabel as nb import numpy as np from django.core.exceptions import ValidationError from django.forms import ModelForm from django.forms.models import ( ModelMultipleChoiceField ) # ...
{"hexsha": "4af7e47020393d0cace1572802a7ed6a315bed7d", "size": 45749, "ext": "py", "lang": "Python", "max_stars_repo_path": "neurovault/apps/statmaps/forms.py", "max_stars_repo_name": "aphroditepv/NeuroVault", "max_stars_repo_head_hexsha": "14dbe45c24897f250938716c8d6a015a3b06df93", "max_stars_repo_licenses": ["MIT"], ...
import torch import numpy as np import time import torchvision model = torch.hub.load('pytorch/vision:v0.6.0', 'squeezenet1_1', pretrained=True) model.eval() import urllib url, filename = ("https://github.com/pytorch/hub/raw/master/dog.jpg", "cat.png") from PIL import Image from torchvision import transforms input_i...
{"hexsha": "b97423bd557e8b4487fba99aeb1c69c0ac77e920", "size": 1563, "ext": "py", "lang": "Python", "max_stars_repo_path": "squeezenet-v1.1-pytorch.py", "max_stars_repo_name": "tom-gall/torch-bench", "max_stars_repo_head_hexsha": "8d2a938c21637d4305d88a7b2c42d860672d5be2", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
// Copyright 2016 Yahoo Inc. // Licensed under the terms of the Apache 2.0 license. // Please see LICENSE file in the project root for terms. #ifndef CAFFE_DISTRI_SOCKET_HPP_ #define CAFFE_DISTRI_SOCKET_HPP_ #include <stdio.h> #include <map> #include <string> #include <vector> #include <boost/thread.hpp> #include <boo...
{"hexsha": "89b03e5d38ca134fa1bea49b5bfa3d76a6a2bae1", "size": 4473, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "caffe-distri/include/util/socket.hpp", "max_stars_repo_name": "jenniew/IntelCaffeOnSpark_mirror", "max_stars_repo_head_hexsha": "7b79ff25d5eed5f472ea7b1572f9c7fa9dcdc46c", "max_stars_repo_licenses":...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from a2c_ppo_acktr.distributions import Bernoulli, Categorical, DiagGaussian, MultiCategoricalDistribution, \ RobotARCategoricalDistribution from a2c_ppo_acktr.utils import init import gym from models.blocks import RMCBlock cl...
{"hexsha": "dd26b2c3fc1a10d6c606502d393e9e764e0095ff", "size": 11889, "ext": "py", "lang": "Python", "max_stars_repo_path": "a2c_ppo_acktr/model.py", "max_stars_repo_name": "ava6969/AR-Project", "max_stars_repo_head_hexsha": "d34369178d41ac79d73710a2b6681dbde3910e9d", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
function bpsksys(bin,f) disp('========================================'); disp(' HAM DIEU CHE DICH 2 PHA: BPSK'); disp(' VI DU:bpsksys([0 1 0 1 1 0 1 1 0],3)'); disp('Written by Nguyen Hoang Minh DHCNTPHCM. he..he..'); disp('========================================'); bin=[0 1 0 1 1 0 1 1 1 0];f=3;k=1000; t=0:2*pi/(...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/30770-digital-analog-modulation/SignalModula...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest from unittest import TestCase from itertools import chain import numpy as np from numpy.lib import NumpyVersion import sys sys.path.append('../') from fpq.vector import * import fpq.fp class TestVector(TestCase): def test_is_valid_format(self): ...
{"hexsha": "b6380a98f9598dd7ea19c4ccb85b2996a18a5da7", "size": 20869, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_vector.py", "max_stars_repo_name": "Hasenpfote/fpq", "max_stars_repo_head_hexsha": "3154ed1b1d5eca08255e8359b5027439af43691c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
''' Finding the best fit linear slope for a dataset example ''' from statistics import mean import numpy as np import matplotlib.pyplot as plt from matplotlib import style style.use('fivethirtyeight') # test data xs = np.array([1,2,3,4,5,6], dtype=np.float64) ys = np.array([5,4,6,5,6,7], dtype=np.float64) # gene...
{"hexsha": "c00bc499d6e4dc7e449723463e969d6e60c6f6d5", "size": 854, "ext": "py", "lang": "Python", "max_stars_repo_path": "Regression/Linear Regression/sklearn/best-fit-line.py", "max_stars_repo_name": "adam-bhaiji/machine-learning", "max_stars_repo_head_hexsha": "4ea97d6f802791077b8a19ccc2678cff8edcb630", "max_stars_r...
import networkx as nx import matplotlib.pyplot as plt class Top_Sort: # A recursive function used by topologicalSort def __topologicalSortUtil(self, v, visited, stack, G): # Mark the current node as visited. visited[v] = True # Recur for all the vertices adjacent to...
{"hexsha": "8c8f3fd5798c79a9cbda0e540bc92ad515412067", "size": 2828, "ext": "py", "lang": "Python", "max_stars_repo_path": "graph_algo_vis/topological_sort.py", "max_stars_repo_name": "Akarsh654/Graph-Algorithms-Package", "max_stars_repo_head_hexsha": "ceb417ca5e79ca6a26d709aea47ceddb1dbffc4c", "max_stars_repo_licenses...
# BSD Licensed, Copyright (c) 2006-2008 MetaCarta, Inc. from TileCache.Layer import MetaLayer import osgeo.gdal as gdal import osgeo.gdal_array as gdalarray import numpy import PIL class GDAL(MetaLayer): """ The GDAL Layer allows you to set up any GDAL datasource in TileCache. Areas not covered by the im...
{"hexsha": "59c21bc90fa1ad0f3fe8af04876449cb5a6ef39d", "size": 5594, "ext": "py", "lang": "Python", "max_stars_repo_path": "public/cgi/tilecache/TileCache/Layers/GDAL.py", "max_stars_repo_name": "l34marr/mapwarper", "max_stars_repo_head_hexsha": "0bc844c6a9f002157d0c67d2f792b986be0f9133", "max_stars_repo_licenses": ["M...
#!/usr/local/bin/python3 # use age for lineaer regression # accuracy 0.7890 # kaggle score 0.7655 (same as female alone) import sys # pylint: disable=unused-import import numpy as np import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.metrics import accuracy_score import warnings warn...
{"hexsha": "8e295f83c178ec1659214a83d64cba60a85d1f8f", "size": 1440, "ext": "py", "lang": "Python", "max_stars_repo_path": "src-examples/003-age.py", "max_stars_repo_name": "peterorum/kaggle-titanic", "max_stars_repo_head_hexsha": "ae2d5f6fb62ecfee0c2c9f473c3c9d6e7ded836f", "max_stars_repo_licenses": ["MIT"], "max_star...
#this file contains a common tracking code for both elevator and rover #It checks variable from file config.npy to figure out its own type import time from datetime import datetime import subprocess import numpy as np from numpy import linalg from numpy.linalg import inv import math import cmath import linalgfunc im...
{"hexsha": "57e362dfec7baf2a2199c9a511f6bc1b1693aba6", "size": 8811, "ext": "py", "lang": "Python", "max_stars_repo_path": "ExperimentCode/STAC_3D_Air_ExSeeking.py", "max_stars_repo_name": "pratapbhanusolanki/tmech2021", "max_stars_repo_head_hexsha": "8b3d23f3c384482da2f3143b7abd33ac6b65d911", "max_stars_repo_licenses"...
import pytest def test_x_minus_xt(): import jax import jax.numpy as jnp import sake key = jax.random.PRNGKey(2666) x = jax.random.normal(key=key, shape=(5, 3)) x_minus_xt = sake.functional.get_x_minus_xt(x) assert x_minus_xt.shape == (5, 5, 3) def test_x_minus_xt_norm(): import jax ...
{"hexsha": "a23192e13d6b38aa0240402b81bcc56cd7cba53f", "size": 863, "ext": "py", "lang": "Python", "max_stars_repo_path": "sake/tests/test_functional.py", "max_stars_repo_name": "yuanqing-wang/sake", "max_stars_repo_head_hexsha": "9968aeb51ced20e47646762d15416d38b59f8102", "max_stars_repo_licenses": ["MIT"], "max_stars...
#-*- encoding: utf-8 -*- import argparse from tkinter.constants import TRUE import numpy as np import tkinter as tk from tkinter.ttk import Label from multiprocessing import Process, Queue import time class App(object): def __init__(self, queue): self.q = queue self.root = tk.Tk() self.w...
{"hexsha": "5c7564a235a93b0b9da82ce27267878bfe7f5c6b", "size": 2021, "ext": "py", "lang": "Python", "max_stars_repo_path": "zynq/tmp.py", "max_stars_repo_name": "Roxbili/kws-demo", "max_stars_repo_head_hexsha": "7e0674f1407572fc8f148293b23fa20a5164bc5e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nul...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Mar 24 16:45:40 2020 @author: ogurcan """ import networkx as nx import h5py as h5 import matplotlib.pylab as plt import numpy as np #nwflname='run-GOY/nwfile.pkl' #nwflname='run-WS04-static/nwfile.pkl' nwflname='run-NW04-static/nwfile.pkl' gr=nx.read_g...
{"hexsha": "695b48de342ba24b51eddfa1a0191132c77977d7", "size": 1095, "ext": "py", "lang": "Python", "max_stars_repo_path": "draw_bipartite_nw.py", "max_stars_repo_name": "gurcani/dycon", "max_stars_repo_head_hexsha": "64313471a9222682dce12f8623eb5d0563a8bb5c", "max_stars_repo_licenses": ["CECILL-B"], "max_stars_count":...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: Niccolò Bonacchi # @Date: 2018-02-20 14:46:10 # matplotlib.use('Qt5Agg') from pathlib import Path import matplotlib.pyplot as plt import numpy as np def make_fig(sph): plt.ion() f = plt.figure() # figsize=(19.2, 10.8), dpi=100) ax_bars = plt.sub...
{"hexsha": "2d9a67f1574b1c6efa64e702f1b1155de9dee2f3", "size": 8074, "ext": "py", "lang": "Python", "max_stars_repo_path": "tasks/_iblrig_tasks_trainingChoiceWorld/online_plots.py", "max_stars_repo_name": "int-brain-lab/iblr", "max_stars_repo_head_hexsha": "18569278fc2d8cd3266adb2a5f660a43f8f2582e", "max_stars_repo_lic...
""" This file implements the GA algorithm and acts as main(). """ # standard library import multiprocessing as mp import subprocess as sp import logging import glob import shutil import os import time import sys from traceback import print_exc from json import dumps, dump from copy import deepcopy, copy # external lib...
{"hexsha": "6ab847203d3bc7ba87dafbd477b6e149a4f38561", "size": 55285, "ext": "py", "lang": "Python", "max_stars_repo_path": "ilustrado/ilustrado.py", "max_stars_repo_name": "ml-evs/ilustrado", "max_stars_repo_head_hexsha": "3121ecaff9cb517f3946b2283bf50dce499caad9", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python3 import numpy import psycopg2 import dummy from psycopg2.extensions import register_adapter from psycopg2.extras import Json # Start a postgres database via Docker # docker run -ti --rm --name word_psql -e POSTGRES_PASSWORD=mikolov -p 5433:5432 postgres:10.5 def adapt_numpy_ndarray(numpy_nda...
{"hexsha": "569d149543b48f87f8cef3ac17874c6a46e198a6", "size": 1170, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/psql_example.py", "max_stars_repo_name": "krokodilj/word_embedding_storage", "max_stars_repo_head_hexsha": "206c14cee1af0768b6e187167333dcccf0095e9d", "max_stars_repo_licenses": ["MIT"], ...
[STATEMENT] lemma lt_tail_max: assumes "tail p \<noteq> 0" and "v \<in> keys p" and "v \<prec>\<^sub>t lt p" shows "v \<preceq>\<^sub>t lt (tail p)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. v \<preceq>\<^sub>t lt (tail p) [PROOF STEP] proof (rule lt_max_keys, simp add: keys_tail assms(2)) [PROOF STATE] pro...
{"llama_tokens": 334, "file": "Polynomials_MPoly_Type_Class_Ordered", "length": 5}
import numpy as np import os import bilby.core.prior from bilby.core.prior import PriorDict import redback.model_library from redback.utils import logger def get_priors(model, times=None, y=None, yerr=None, dt=None, **kwargs): prompt_prior_functions = dict(gaussian=get_gaussian_priors, skew_gaussian=get_skew_ga...
{"hexsha": "7b4dad189e93fa8a84816256f8531367d1945685", "size": 4050, "ext": "py", "lang": "Python", "max_stars_repo_path": "redback/priors.py", "max_stars_repo_name": "nikhil-sarin/redback", "max_stars_repo_head_hexsha": "b0023b770a3c0a25a18c4f6ff1a07339be7f83fe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# Riduzione della dimensionalità Fino ad ora abbiamo visto come le feature siano importanti per poter definire un algoritmo in grado di eseguire il proprio compito imparando dai dati, ora il problema è che ci potremmo trovare in condizioni in cui sfortunatamente abbiamo troppe feature e troppi pochi dati(troppe colonn...
{"hexsha": "3a8523ed7f36fcf78498c3c7f1700c26c8f2ad5b", "size": 67801, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "3.machine learning/7-PCA_LDA_NMF.ipynb", "max_stars_repo_name": "matinator/Starting-Finance-Club-Torino", "max_stars_repo_head_hexsha": "8abda7caa769f2dc237c4ff520ef1b40038a5f65", "m...
# -*- coding: utf-8 -*- ## @package inversetoon.batch.generate_isophote_scene # # Isophote scene generator. # @author tody # @date 2015/07/31 import numpy as np from inversetoon.batch.batch import normalDataSetBatch from inversetoon.core.silhouette import silhoutteCurve from inversetoon.io.image import...
{"hexsha": "ea9395b920c5fda52d509d7db5510bae8728f14f", "size": 1774, "ext": "py", "lang": "Python", "max_stars_repo_path": "inversetoon/batch/generate_isophote_scene.py", "max_stars_repo_name": "tody411/InverseToon", "max_stars_repo_head_hexsha": "bc5b922cae9bbf99ed1f020c93b1577c4747ff92", "max_stars_repo_licenses": ["...
# import standard plotting and animation import numpy as np import matplotlib.pyplot as plt from matplotlib import gridspec from matplotlib.ticker import FormatStrFormatter import matplotlib.animation as animation from mpl_toolkits.mplot3d import Axes3D from IPython.display import clear_output # import standard librar...
{"hexsha": "37db2cafcfd8adcbccde2258facb71389010d387", "size": 2605, "ext": "py", "lang": "Python", "max_stars_repo_path": "posts/dynamic_systems_unlimited_memory/library/exponential_average_animator.py", "max_stars_repo_name": "jermwatt/blog", "max_stars_repo_head_hexsha": "3dd0d464d7a17c1c7a6508f714edc938dc3c03e9", "...
# # Base solver class # import pybamm import numpy as np from scipy import optimize from scipy.sparse import issparse class DaeSolver(pybamm.BaseSolver): """Solve a discretised model. Parameters ---------- rtol : float, optional The relative tolerance for the solver (default is 1e-6). ato...
{"hexsha": "ba14d26d2cbf5f62e0a15317efedce6c4a381e69", "size": 12151, "ext": "py", "lang": "Python", "max_stars_repo_path": "pybamm/solvers/dae_solver.py", "max_stars_repo_name": "htorodriguez/PyBaMM", "max_stars_repo_head_hexsha": "91e051e8ce287824b41f238ae39f3208606228ff", "max_stars_repo_licenses": ["BSD-3-Clause"],...
// Copyright 2014 BVLC and contributors. #include <algorithm> #include <vector> #include <cmath> #include "google/protobuf/descriptor.h" #include "google/protobuf/descriptor.h" #include "caffe/layer.hpp" #include "caffe/util/rng.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/layers/flow_augmentation_l...
{"hexsha": "51b628a82efb1f6c3966844c539fc04d5284773f", "size": 2942, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/caffe/layers/flow_augmentation_layer.cpp", "max_stars_repo_name": "AyaLotfy/flownet2", "max_stars_repo_head_hexsha": "e3e3dd043d9a65bc8727429938a0d88539f906fd", "max_stars_repo_licenses": ["FSFA...
from typing import Type import torch from torch import nn import numpy as np from nes import NES, Policy, default_config from nes.config import default_config, Config config = Config(default_config) class Ackley(Policy): def __init__(self): super().__init__() self.params = nn.Parameter(torch.r...
{"hexsha": "3029cfbf1f3d3dbd3184923d7a64433b295b34ec", "size": 1250, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ackley.py", "max_stars_repo_name": "goktug97/nes-torch", "max_stars_repo_head_hexsha": "016f2618d2f5019718c62359eebb9fd939647607", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8...
import numpy, logging from sys import exit from Classes.DotData import DotData from Operations.Shari_Operations.localize.xpopMerge import xpopMerge from Operations.Shari_Operations.localize.Scenario import GetSelectionScenarios, GetScenarios from Operations.MiscUtil import MakeAlphaNum, Dict, Sfx, progress, AddFileSfx ...
{"hexsha": "0466cff04c72a86c7320f9131d3a336c0541bc81", "size": 12885, "ext": "py", "lang": "Python", "max_stars_repo_path": "old/Operations/Shari_Operations/localize/mergeSims.py", "max_stars_repo_name": "broadinstitute/cms", "max_stars_repo_head_hexsha": "4743ffd3feac08f02be7719c82b3371cb94a4d6b", "max_stars_repo_lice...
import warnings from typing import Union import numpy as np from scipy.special import betaln from scipy.special import psi, polygamma from autoconf import cached_property from ..messages.abstract import AbstractMessage def grad_betaln(ab): psiab = psi(ab.sum(axis=1, keepdims=True)) return psi(ab) - psiab ...
{"hexsha": "1b31637d78b6fd5c2ef87ba5c8d333e14156e153", "size": 4524, "ext": "py", "lang": "Python", "max_stars_repo_path": "autofit/messages/beta.py", "max_stars_repo_name": "caoxiaoyue/PyAutoFit", "max_stars_repo_head_hexsha": "819cd2acc8d4069497a161c3bb6048128e44d828", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy from crystal_util import bragg_calc2 import scipy.constants as codata def crystal_shadow(filename, str, phot_in): ''' #+ # Singapore Synchrotron Light Source (SSLS) # :Author: X.J. Yu, slsyxj@nus.edu.sg # :Name: crystal_shadow # :Purpose: create a shadow data file for a any cryst...
{"hexsha": "9b4ce491a6202ecb1215b6d4e9a7b015df4deac9", "size": 7210, "ext": "py", "lang": "Python", "max_stars_repo_path": "yb66/create_shadowfile.py", "max_stars_repo_name": "91902078/yb66", "max_stars_repo_head_hexsha": "ece7f637ac8bacb1ba51a6f1f6f1f2e9cdb91bd9", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_cou...
/*============================================================================= Copyright (c) 2002 2004 2006 Joel de Guzman Copyright (c) 2004 Eric Niebler http://spirit.sourceforge.net/ Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file...
{"hexsha": "6d9368f3dce4cad94c39807b3a8969c8ee205966", "size": 47914, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tools/quickbook/src/main_grammar.cpp", "max_stars_repo_name": "cpp-pm/boost", "max_stars_repo_head_hexsha": "38c6c8c07f2fcc42d573b10807fef27ec14930f8", "max_stars_repo_licenses": ["BSL-1.0"], "max_...
""" Name: Pham Tuan Anh Class: K63-K2 MSSV: 18020116 You should understand the code you write. """ import numpy as np import cv2 import sys def q_0(input_file, output_file, delay=1): """ :param input_file: :param output_file: :param delay: :return: """ img = cv2.imread(input_file, cv2.I...
{"hexsha": "8366a93a3aa0cab3464b3dd04bc0f9ffbf67d56e", "size": 2478, "ext": "py", "lang": "Python", "max_stars_repo_path": "week02/week02.py", "max_stars_repo_name": "ptanh2k/int3404", "max_stars_repo_head_hexsha": "ad39ce61b768ef7b55936561c13bfa1c3adf0e92", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
program bspline_tests use utils use bspline use finite_elements use ogpf implicit none !--------------- ! Variables !--------------- integer :: i,j,total_tests, passed_tests real(wp), allocatable :: y(:),x(:) real(wp) :: result,true !--------------- ! Logic !--------------- total_tests = 1 passed_tests = 0 write(*,*...
{"hexsha": "5f3aa56bc74f068580f03c2b7c0125d2ce0f15b8", "size": 6488, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "tests/bspline_tests.f95", "max_stars_repo_name": "AndreTGMello/numerical-analysis-course", "max_stars_repo_head_hexsha": "e2b4b6e7c74e8db9f4f637e7bab5b73ef119a23f", "max_stars_repo_licenses": ["...
"""Generates server for backend API""" from flask import Flask, request import json import numpy as np from skimage.transform import resize from . import predict as pred from . import transform_data as td from . import config as cf flask_app = Flask(__name__) host = cf.HOST port = cf.BACKEND_PORT # load model lea...
{"hexsha": "4ed2f0338406cf9225b2f58e1286a41932193780", "size": 2261, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/backend_api.py", "max_stars_repo_name": "lwang94/sem_size_analysis", "max_stars_repo_head_hexsha": "803251cdcab3d8304a365df9ac5879fcd9346270", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
//========================================================================= // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE...
{"hexsha": "4f3791f4fba2390855c87d6be9ee13266e60e6f9", "size": 5949, "ext": "cxx", "lang": "C++", "max_stars_repo_path": "smtk/session/vtk/operators/Write.cxx", "max_stars_repo_name": "jcfr/SMTK", "max_stars_repo_head_hexsha": "0069ea37f8f71a440b8f10a157b84a56ca004551", "max_stars_repo_licenses": ["BSD-3-Clause-Clear"]...
import numpy as np import torch from torch.utils.data import Dataset from torchsparse import SparseTensor from torchsparse.utils import sparse_quantize import lidar_det.utils.jrdb_transforms as jt import lidar_det.utils.utils_box3d as ub3d from .utils import collate_sparse_tensors, boxes_to_target # from .utils imp...
{"hexsha": "aefd0432893f1bb8cf05501e2190a9ed1549c3e0", "size": 14667, "ext": "py", "lang": "Python", "max_stars_repo_path": "lidar_det/dataset/dataset_det3d.py", "max_stars_repo_name": "VisualComputingInstitute/Person_MinkUNet", "max_stars_repo_head_hexsha": "fa39764245a022740c0a3d8c85026532fff93e74", "max_stars_repo_l...
#Ref: Sreenivas Sarwar Anik """ 1st approach: Perform CLAHE # Equalize light by performing CLAHE on the Luminance channel # The equalize part alreay covered as aprt of previous tutorials about CLAHE # This kind of works but you can still see shading after the correction. 2nd approach: Apply rolling ball background s...
{"hexsha": "a61464a33dbd30b8d213af5309136d0e728b54b5", "size": 2098, "ext": "py", "lang": "Python", "max_stars_repo_path": "117_shading_correction_using_rolling_ball.py", "max_stars_repo_name": "Data-Laboratory/WorkExamples", "max_stars_repo_head_hexsha": "27e58207e664da7813673e6792c0c30c0a5bf74c", "max_stars_repo_lice...
# copyright (C) 2013 Atsushi Togo # All rights reserved. # # This file is part of phonopy. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notic...
{"hexsha": "1bf12919db14c3e8a1d34e4870e7d62281257c31", "size": 11237, "ext": "py", "lang": "Python", "max_stars_repo_path": "phonopy/phonon/tetrahedron_mesh.py", "max_stars_repo_name": "ttadano/phonopy", "max_stars_repo_head_hexsha": "8c03955b2636b22b86e9324f5afcfa36396fa988", "max_stars_repo_licenses": ["BSD-3-Clause"...
\section{Modal pomsets} In order to perform a sharper analysis of dependency, we present an alternate semantics using modal pomsets defined below. Modal pomsets make a formal distinction between strong order and weak order. \begin{definition} A \emph{modal (memory model) pomset} is a tuple $(\Event, {\sle}, {\gtN}...
{"hexsha": "82cb4609778b8971fbcad66f82cde7d5f54642d1", "size": 25732, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "drf-proof.tex", "max_stars_repo_name": "chicago-relaxed-memory/memory-model", "max_stars_repo_head_hexsha": "fd606fdb6a04685d9bb0bee61a5641e4623b10be", "max_stars_repo_licenses": ["CC-BY-4.0"], "ma...
from pathlib import Path from torchvision import transforms as trans from PIL import Image, ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True import numpy as np import cv2 import bcolz import pickle import mxnet as mx from tqdm import tqdm def load_bin(path, rootdir, transform, image_size=[112, 112]): if not rootd...
{"hexsha": "befddee8c70f73b644bf6265f151977b92700580", "size": 2274, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/preprocess.py", "max_stars_repo_name": "leon2milan/faceRecognition", "max_stars_repo_head_hexsha": "c69271c9f808a63fa7dbb856e7726a59a4817515", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# inc_data_dfg.r myC1a<-rgb(251,212,150,maxColorValue=255) myC2a<-rgb(237,153,118,maxColorValue=255) myC3a<-rgb(179,213,148,maxColorValue=255) myC4a<-rgb(112,200,230,maxColorValue=255) myC1b<-rgb(243,178,40,maxColorValue=255) myC2b<-rgb(220,62,42,maxColorValue=255) myC3b<-rgb(109,182,68,maxColorValue=255) myC4b<-rgb(0...
{"hexsha": "91f539f31b1351f54fcb246d510a658ed1c58d80", "size": 761, "ext": "r", "lang": "R", "max_stars_repo_path": "src/scripts/inc_data_dfg.r", "max_stars_repo_name": "wilsonify/data-visualization", "max_stars_repo_head_hexsha": "4a4295a59f666625f4a47b2ad6a6f1eb06f9e8d3", "max_stars_repo_licenses": ["MIT"], "max_star...
import sys import numpy as np reff=sys.argv[1] hybf=sys.argv[2] def read_f(fname): res={} with open(fname, 'r') as fin: for line in fin: uttid, ali = line.split()[0], line.split()[1:] res[uttid]=np.array([ int(x) for x in ali]) return res ref=read_f(reff) hyb=read_f(hybf)...
{"hexsha": "045d1bc35eeef9dc4a12797fa681a20ecab35391", "size": 651, "ext": "py", "lang": "Python", "max_stars_repo_path": "egs/codeswitching/asr/local_jqg01/data/phone/acc.py", "max_stars_repo_name": "luyizhou4/espnet", "max_stars_repo_head_hexsha": "a408b9372df3f57ef33b8a378a8d9abc7f872cf5", "max_stars_repo_licenses":...
#!/usr/bin/env python # coding: utf-8 # # Neng Lu # nengl@student.unimelb.edu.au # ANU & Unimelb # Canberra, Australia # # Version: 1.0 # First version 14 May, 2020 # Last modified 22 May, 2020 import numpy as np import math from osgeo import gdal from osgeo import osr def testimport(): print("It works!") #---...
{"hexsha": "2a0c20d9d8981d579851969e26d9464e203e0ae5", "size": 5689, "ext": "py", "lang": "Python", "max_stars_repo_path": "qixiang/functions.py", "max_stars_repo_name": "NengLu/UWG_QiXiang", "max_stars_repo_head_hexsha": "b2a5782c7794cf2505c696075f437097b03b7662", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import pandas as pd import numpy as np import umap import sklearn.cluster as cluster from sklearn.cluster import KMeans from sklearn.cluster import DBSCAN import spacy import unicodedata import matplotlib.pyplot as plt import logging logging.basicConfig(format='%(asctime)s %(message)s', level=logging.INFO) logging.getL...
{"hexsha": "2589dbf56797c92d3681ef3ca913920f5c6a86a7", "size": 13358, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/semanticClustering/experimentUtil.py", "max_stars_repo_name": "mikiec84/SemanticModels.jl", "max_stars_repo_head_hexsha": "f81baf0789cc547375f300429d0fd49c866d5339", "max_stars_repo_lice...
###### # # 2-dimensional stuff. # function regulargrid2d(box, res) xmin, ymin, xmax, ymax = box rx, ry = res dx = (xmax-xmin)/(rx-1) dy = (ymax-ymin)/(ry-1) vs_cnt = rx*ry # vertices count es_cnt = (rx-1)*ry + rx*(ry-1)+ (rx-1)*(rx-1) # Horizontal + vertical + diagonal fs_cnt = 2*(rx-1)*(r...
{"hexsha": "fe1872dfa6338fc417bd459aebb035654079647d", "size": 5394, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/grids.jl", "max_stars_repo_name": "valerocar/LevelSets.jl", "max_stars_repo_head_hexsha": "9cfc4c0bb2cb80a0d96dca81431daf50aa1f703c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
[STATEMENT] lemma less_eq_multiset_empty_left[simp]: shows "{#} \<le> M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. {#} \<le> M [PROOF STEP] by (simp add: subset_eq_imp_le_multiset)
{"llama_tokens": 88, "file": null, "length": 1}
[STATEMENT] lemma orthogonal_complement_orthogonal_complement_closure_cspan: \<open>orthogonal_complement (orthogonal_complement S) = closure (cspan S)\<close> for S :: \<open>'a::chilbert_space set\<close> [PROOF STATE] proof (prove) goal (1 subgoal): 1. orthogonal_complement (orthogonal_complement S) = closure (cs...
{"llama_tokens": 842, "file": "Complex_Bounded_Operators_Complex_Inner_Product", "length": 10}
import os import sys from functools import partial import numpy as np import pytest import scipy from numpy.testing import assert_array_almost_equal from numpy.testing import assert_array_equal from numpy.testing import assert_equal from scipy.stats import norm from respy import RespyCls from respy.fortran.interface ...
{"hexsha": "6607969d6fc0a3b92bf5d95498a56a0d038ebe2d", "size": 35693, "ext": "py", "lang": "Python", "max_stars_repo_path": "respy/tests/test_f2py.py", "max_stars_repo_name": "tobiasraabe/respy_for_ma", "max_stars_repo_head_hexsha": "405f40851b176705fe924220fba606263d47f3d6", "max_stars_repo_licenses": ["MIT"], "max_st...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! SUBROUTINES FOR BOUNDARY CONDITIONS !!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine apply_BC() use constants implicit none integer :: ...
{"hexsha": "b192a1a98622e6ccbcc8d6dd4902404bf3265198", "size": 13210, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "ibc.f90", "max_stars_repo_name": "cbellei/mION", "max_stars_repo_head_hexsha": "378d1f5ea8c419fdf063947ff54643a580b82174", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star...
using PastaQ using ITensors using Printf # 1. Prepation of a thermal state # # In this example, we show how to prepare the finite-temperature state # of a many-body system: # # ρ̂(β) = exp(-β Ĥ) # # where Ĥ is the Hamiltonian and β is the inverse temperature. # We specificallty consider the one-dimensional Ising m...
{"hexsha": "7422babd0596338ae3f20a9e8334e63dc399f890", "size": 3475, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/5_finitetemperature.jl", "max_stars_repo_name": "GTorlai/PastaQ.jl", "max_stars_repo_head_hexsha": "fc5ae805681df2de8d3fe105b600156997140c18", "max_stars_repo_licenses": ["Apache-2.0"], "m...
% mycorr2 modified version of the 2D correlation % for the use with im2col and col2im % see GETPOINT % % % $Id: mycorr2.m,v 2.0 2003/06/19 12:06:52 svoboda Exp $ % Note: It written in order to gain speed. The clarity of the code suffers accordingly function R = mycorr2(X,G,Gn,Gn2) % Gn = G-mean(G); ...
{"author": "strawlab", "repo": "MultiCamSelfCal", "sha": "0a26c88c63d8513eab76553033a9a6fb15ba6575", "save_path": "github-repos/MATLAB/strawlab-MultiCamSelfCal", "path": "github-repos/MATLAB/strawlab-MultiCamSelfCal/MultiCamSelfCal-0a26c88c63d8513eab76553033a9a6fb15ba6575/MultiCamSelfCal/FindingPoints/mycorr2.m"}
from pyscipopt import Sepa, Conshdlr, SCIP_RESULT, SCIP_STAGE from time import time import networkx as nx import numpy as np from utils.scip_models import maxcut_mccormic_model, MccormickCycleSeparator from utils.misc import get_separator_cuts_applied from utils.data import get_gnn_data import os import torch import p...
{"hexsha": "edef21bea54b66f4f52385a9864670493fdf9d4b", "size": 9723, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/samplers.py", "max_stars_repo_name": "avrech/learning2cut", "max_stars_repo_head_hexsha": "c0febe84db5097413823821510a4ae3c996dec93", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
""" Models for the joint probability distribution. """ from abc import ABC, abstractmethod import numpy as np import scipy.integrate as integrate from virocon.distributions import ConditionalDistribution from virocon.intervals import NumberOfIntervalsSlicer __all__ = ["GlobalHierarchicalModel"] class Multivariat...
{"hexsha": "890b56743d134853b9f30ed0048b7801d2c5471c", "size": 19902, "ext": "py", "lang": "Python", "max_stars_repo_path": "virocon/jointmodels.py", "max_stars_repo_name": "ahaselsteiner/viroconcom", "max_stars_repo_head_hexsha": "69b903dabde1de73c85b5648f66523b9c151996e", "max_stars_repo_licenses": ["MIT"], "max_star...
"""Least squares fitting. Implements a penalised least-squares fit. putting point data onto the mesh. The penalty term (or smoothing term) is controlled by the smoothing parameter alpha. With a value of alpha=0, the fit function will attempt to interpolate as closely as possible in the least-squares...
{"hexsha": "55e1a374ba0859ac219f7d7b84a558a37cfae057", "size": 22547, "ext": "py", "lang": "Python", "max_stars_repo_path": "anuga/fit_interpolate/fit.py", "max_stars_repo_name": "samcom12/anuga_core", "max_stars_repo_head_hexsha": "f4378114dbf02d666fe6423de45798add5c42806", "max_stars_repo_licenses": ["Python-2.0", "O...
# -*- coding: utf-8 -*- """ Created on Sun Aug 28 22:43:10 2016 @author: kevin """ #%% import numpy as np import pandas as pd import matplotlib.pyplot as plt import plotly import plotly.plotly as py from plotly.graph_objs import * plotly.tools.set_credentials_file(username='kevyin', api_key='n3c33j5hac') from ggplot ...
{"hexsha": "2354f83250ffb1469da963b2fce7fc5a9916b98c", "size": 1870, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples-python27/analyse_example.py", "max_stars_repo_name": "kevyin/sitta", "max_stars_repo_head_hexsha": "e2504dc6dddb57742deb22d6ce881925b59070c8", "max_stars_repo_licenses": ["MIT"], "max_sta...
%% loftLinQuad2hex % Below is a demonstration of the features of the |loftLinQuad2hex| function %% clear; close all; clc; %% Syntax % |[varargout]=loftLinQuad2hex(Fq,Vq,Vq2,numSteps);| %% Description % UNDOCUMENTED %% Examples % %% % % <<gibbVerySmall.gif>> % % _*GIBBON*_ % <www.gibboncode.org> % % _Kevin Ma...
{"author": "gibbonCode", "repo": "GIBBON", "sha": "8178520664a6148db939eaea87e75b3cba4f2b4f", "save_path": "github-repos/MATLAB/gibbonCode-GIBBON", "path": "github-repos/MATLAB/gibbonCode-GIBBON/GIBBON-8178520664a6148db939eaea87e75b3cba4f2b4f/docs/HELP_loftLinQuad2hex.m"}
import pdb import sys from functools import reduce import numpy as np from prompt_toolkit import prompt from tabulate import tabulate from ..metadata_interface import * from ..common import * class ReplUi(object): def __init__(self, all_tagsets, pgid=None): self._init_brick(all_tagsets) self.pg...
{"hexsha": "912532dd7c028573ea6415185fa702001034d53d", "size": 9845, "ext": "py", "lang": "Python", "max_stars_repo_path": "plastering/uis/cmdline_ui.py", "max_stars_repo_name": "MingzheWu418/plastering", "max_stars_repo_head_hexsha": "322531e934c3acf2ecc8f520b37a6d255b9959c2", "max_stars_repo_licenses": ["MIT"], "max_...
################################ # EvoMan FrameWork - V1.0 2016 # # Author: Karine Miras # # karine.smiras@gmail.com # ################################ import sys import numpy import random import Base from Base.SpriteConstants import * from Base.SpriteDefinition import * from sensors import Sensors til...
{"hexsha": "a84eab0590d1492a10d5111b6cfabee07fdf57e3", "size": 11183, "ext": "py", "lang": "Python", "max_stars_repo_path": "evoman/enemy4.py", "max_stars_repo_name": "ChristophHoenes/EWoMan2", "max_stars_repo_head_hexsha": "c3a117ba1b217d8b4a8f678a5cb4fda471134bfa", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
import random from typing import Tuple import discord import numpy from discord.ext import commands from .base_cog import BaseCog from ..utils.converters import BoolConverter from ..utils.exceptions import CommandError class PUBGCog(BaseCog): """PUBG commands""" EMOJI = "<:pubghelm:56552...
{"hexsha": "e9a7fb41cbd993bf2ee336b2a08c05aa8dc9bb82", "size": 6678, "ext": "py", "lang": "Python", "max_stars_repo_path": "vjemmie/cogs/pubg_cog.py", "max_stars_repo_name": "PederHA/vjemmie", "max_stars_repo_head_hexsha": "e3742380d3ea06de90f8227a0934569f8fd02b5c", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
/* Copyright 2013 Adobe 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 <adobe/config.hpp> #inc...
{"hexsha": "16bf19b666b45c335620c1929ee363acf726825a", "size": 12506, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/unit_tests/copy_on_write/cow_test.cpp", "max_stars_repo_name": "ilelann/adobe_source_libraries", "max_stars_repo_head_hexsha": "82224d13335398dfebfc77addabab28c4296ecba", "max_stars_repo_licen...
(F::FqFiniteField)(coeffs::Array{T,1}) where {T<:Union{Integer,fmpz}} = begin g = gen(F) x = zero(F) for (i, c) in enumerate(coeffs) x += c * g^(i-1) end x end (F::FqNmodFiniteField)(coeffs::Array{T,1}) where {T<:Union{Integer,fmpz}} = begin g = gen(F) x = zero(F) for (i, c) in ...
{"hexsha": "4d5f260871c97890f932d0f3d8d7d78401b4d7a7", "size": 3966, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Math/Algebra/field.jl", "max_stars_repo_name": "Samayel/Brainstorm.jl", "max_stars_repo_head_hexsha": "9d83bb0a104973e498ba4ca84b0a27ede6c053ac", "max_stars_repo_licenses": ["MIT"], "max_stars_...
(* File: HOL/Computational_Algebra/Squarefree.thy Author: Manuel Eberl <manuel@pruvisto.org> Squarefreeness and decomposition of ring elements into square part and squarefree part *) section \<open>Squarefreeness\<close> theory Squarefree imports Primes begin (* TODO: Generalise to n-th powers *) def...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/Computational_Algebra/Squarefree.thy"}
# adapted from https://github.com/yangheng95/LC-ABSA/blob/c945a94e0f86116c5578245aa9ad36c46c7b9c4a/models/lc_apc/lcf_bert.py # according to import copy from argparse import Namespace from typing import Dict import numpy as np import torch import torch.nn as nn from transformers.modeling_bert import BertPooler, BertSel...
{"hexsha": "f79d7e2ced217adb6732defe255e2c5276aae52f", "size": 8304, "ext": "py", "lang": "Python", "max_stars_repo_path": "NewsSentiment/models/singletarget/lcf2.py", "max_stars_repo_name": "fhamborg/NewsMTSC", "max_stars_repo_head_hexsha": "5a8f88d7fbb921090e984cc378b02d75524c1025", "max_stars_repo_licenses": ["MIT"]...
c c----------------------------------------------------------------------- c subroutine: r8tx c radix 8 iteration subroutine c----------------------------------------------------------------------- c subroutine r8tx(nxtlt, nthpo, lengt, cr0, cr1, cr2, cr3, cr4, * cr5, cr6, cr7, ci0, ci1, ci2, ci3, ci4, c...
{"hexsha": "9cc4f591faa587671eb683fe461fa74c1ca8f09d", "size": 3366, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "iraf.v2161/math/ieee/chap1/r8tx.f", "max_stars_repo_name": "ysBach/irafdocgen", "max_stars_repo_head_hexsha": "b11fcd75cc44b01ae69c9c399e650ec100167a54", "max_stars_repo_licenses": ["MIT"], "max_s...
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
{"hexsha": "ff38aabf8fb292176a2e15ecf3ff226223fd1537", "size": 17970, "ext": "hxx", "lang": "C++", "max_stars_repo_path": "main/unotools/inc/unotools/localedatawrapper.hxx", "max_stars_repo_name": "Grosskopf/openoffice", "max_stars_repo_head_hexsha": "93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7", "max_stars_repo_licenses"...
include(joinpath("gammaReg", "chosenVariables_inverse_test.jl")) include(joinpath("gammaReg", "chosenVariables_log_test.jl")) include(joinpath("gammaReg", "research_inverse_test.jl")) include(joinpath("gammaReg", "research_inverse_test.jl"))
{"hexsha": "34f1547617077eabe04ba581b89be1a6617c35c6", "size": 243, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/dataAnalysis/Duration/gammaReg_test.jl", "max_stars_repo_name": "AlexLsn/CSO", "max_stars_repo_head_hexsha": "b1e2eb949003d9a2ea865581da554ea4ca7c8cf7", "max_stars_repo_licenses": ["MIT"], "max...
""" sciwebvis.material ------------------ :copyright: 2015, Juan David Adarve. See AUTHORS for more details :license: 3-clause BSD, see LICENSE for more details """ import numpy as np from jinja2 import Environment, PackageLoader from .JSRenderable import JSRenderable from .color import Color # from...
{"hexsha": "d310ea6709e311c84e9d23986e03e95b5ceb3595", "size": 5959, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/sciwebvis/material.py", "max_stars_repo_name": "jadarve/sciwebvis", "max_stars_repo_head_hexsha": "887268b310067809a7a7495952f76b1e70aeed64", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
import numpy as np from collections import Counter from sklearn.preprocessing import StandardScaler def min_max_normalize(X): """Min-Max normalization function X = (X - Xmin)/(Xmax - Xmin)""" samples, features = X.shape for i in range(features): xmin = X[:, i].min() xmax = X[:, i].max...
{"hexsha": "1f0fdbe4391269c67fb3e0acaf22c4268dd4f5ff", "size": 2004, "ext": "py", "lang": "Python", "max_stars_repo_path": "Assignment-2/utils.py", "max_stars_repo_name": "PranjalGupta2199/py-classifier", "max_stars_repo_head_hexsha": "e74be0349d755201b7265f125ef81fceec174f64", "max_stars_repo_licenses": ["MIT"], "max_...
import tvm from tvm import topi import numpy as np import torch import torchvision from torch.autograd import Variable from torchvision import transforms from tvm.tensor_graph.nn.layers import Layer from tvm.tensor_graph.nn.functional import dense, gemm from tvm.tensor_graph.core import compute, GraphTensor, GraphOp, G...
{"hexsha": "34f0818143f0849a44af93e6bf5eb355e969015c", "size": 4585, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/tvm/tensor_graph/testing/models/SCRNN.py", "max_stars_repo_name": "QinHan-Erin/AMOS", "max_stars_repo_head_hexsha": "634bf48edf4015e4a69a8c32d49b96bce2b5f16f", "max_stars_repo_licenses": ["...
#pragma once #include <polyfem/ProblemWithSolution.hpp> #include <Eigen/Dense> #include <vector> #include <string> namespace polyfem { class State; class KernelProblem : public ProblemWithSolution { public: KernelProblem(const std::string &name); VectorNd eval_fun(const VectorNd &pt, const double t) const...
{"hexsha": "d9dfe8e1c10e6d0cc2f73e5b366248c1da21c672", "size": 997, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/problem/KernelProblem.hpp", "max_stars_repo_name": "danielepanozzo/polyfem", "max_stars_repo_head_hexsha": "34a7719c2a3874b7ecc865c28d8b3d9bbdf7d0ba", "max_stars_repo_licenses": ["MIT"], "max_sta...
import re import inspect import time import pandas as pd import numpy as np import ipywidgets as ipw import traitlets as tra from multiprocessing import Process from datetime import datetime from IPython import display from collections.abc import Iterator try: from utils import frontend as utils from processin...
{"hexsha": "96cc1d9b841b3d3afd6650a6955a42b1f1b936a6", "size": 19165, "ext": "py", "lang": "Python", "max_stars_repo_path": "interface.py", "max_stars_repo_name": "nuki111/env_explore", "max_stars_repo_head_hexsha": "b5dfa05fbcfb0126e246e4ef4eb5a392a8615cf0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
[STATEMENT] lemma funas_ctxt_of_gctxt_conv [simp]: "funas_ctxt (ctxt_of_gctxt C) = funas_gctxt C" [PROOF STATE] proof (prove) goal (1 subgoal): 1. funas_ctxt (ctxt_of_gctxt C) = funas_gctxt C [PROOF STEP] by (induct C) (auto simp flip: funas_gterm_gterm_of_term)
{"llama_tokens": 132, "file": "Regular_Tree_Relations_Util_Ground_Ctxt", "length": 1}
import os import json from pdf2words import document import numpy as np import re from operator import itemgetter from collections import OrderedDict class name_scoring: def __init__(self): self.top_words = [] self.clusters = [] self.score = [] self.flg = 0 self.size = [] ...
{"hexsha": "76f32185fa21baf1417552938d4d82dcabbb2772", "size": 14011, "ext": "py", "lang": "Python", "max_stars_repo_path": "flask/pdf2words/name_score.py", "max_stars_repo_name": "ishan-modi/docker", "max_stars_repo_head_hexsha": "768ccc3450043d41d1de21ebef28aef6ce4d6149", "max_stars_repo_licenses": ["MIT"], "max_star...
import os import sys import re import importlib import torch import numpy as np import random # @NOTE: https://stackoverflow.com/a/1176023/2425365 first_cap_re = re.compile('(.)([A-Z][a-z]+)') all_cap_re = re.compile('([a-z])([A-Z])') def to_camel_case(name: str): cap_sub = first_cap_re.sub(r'\1_\2', name) retu...
{"hexsha": "8fe83935cfaf217f9386df3c82c3d4380d1ef93b", "size": 1225, "ext": "py", "lang": "Python", "max_stars_repo_path": "torchrl/utils/misc.py", "max_stars_repo_name": "srikarym/torchrl", "max_stars_repo_head_hexsha": "fee98e78ac1657a2c9a4063dd8d63ba207a121e2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
#!/usr/bin/env python # coding=utf-8 import torch.nn.functional as F from scipy.spatial.distance import cdist from utils.utils_pytorch import * import matplotlib.pyplot as plt from utils.general import plot_cm import sys sys.path.append("..") from datasets.utils_dataset import merge_images_labels def test_ac(tg_model,...
{"hexsha": "283b22edd98537c21a1d18544d4b1a22ce2c20a2", "size": 49089, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/compute_accuracy.py", "max_stars_repo_name": "xmengxin/MFGR", "max_stars_repo_head_hexsha": "ba807d0f52c0eb00d330eaa9bcef56c1343d2588", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
r""" Module defining Pyclaw geometry objects. """ from __future__ import absolute_import from __future__ import print_function import numpy as np import warnings import six from six.moves import range from six.moves import zip deprec_message = "'edges' has been deprecated; please use 'nodes' instead." # =============...
{"hexsha": "d2c12e020c3cbffbe52ef5a2a6737b90293c766c", "size": 29397, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pyclaw/geometry.py", "max_stars_repo_name": "BrisaDavis/pyclaw", "max_stars_repo_head_hexsha": "439e5b3f8f1d3892578368c17c4ad584fda706c2", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
#ifndef BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED #define BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://ww...
{"hexsha": "4fbf226090e4518546a97c8a6309253c44196e1c", "size": 1756, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "lshkit/trunk/3rd-party/boost/boost/mpl/aux_/msvc_eti_base.hpp", "max_stars_repo_name": "wzj1695224/BinClone", "max_stars_repo_head_hexsha": "3b6dedb9a1f08be6dbcdce8f3278351ef5530ed8", "max_stars_rep...
# 导入包 import zipfile import paddle import paddle.fluid as fluid import matplotlib.pyplot as plt import matplotlib.image as mping from PIL import Image import json import numpy as np import cv2 import sys import time import h5py # import scipy.io as io from matplotlib import pyplot as plt from scipy.ndimage.filters impo...
{"hexsha": "9965c3ec361436e9af0e16d7f8b897c3185be918", "size": 21130, "ext": "py", "lang": "Python", "max_stars_repo_path": "crowd_density_detection.py", "max_stars_repo_name": "ArseneLupinhb/crowd_density_detection", "max_stars_repo_head_hexsha": "a4f4e955319926a57dcfc0b446f6d40b0449df30", "max_stars_repo_licenses": [...
from collections import defaultdict import numpy as np from datetime import datetime from graph import Graph from graph import FloatVec from graph import LongVec from graph import LongPair from graph import PairVec from graph import constrainedGreedyAdditiveEdgeContraction import progressbar import math def constant_l...
{"hexsha": "c314ff96234ee596398413560ee7b440f5f60bcc", "size": 4941, "ext": "py", "lang": "Python", "max_stars_repo_path": "deploy_python/openem/tracking/graph_utils.py", "max_stars_repo_name": "openem-team/openem", "max_stars_repo_head_hexsha": "45222c9c77084eacab278da25a8734ae7d43f677", "max_stars_repo_licenses": ["M...
import numpy as np import keras from keras import backend as K from keras.layers.core import Dense from keras.optimizers import Adam from keras.metrics import categorical_crossentropy from keras.preprocessing.image import ImageDataGenerator from keras.preprocessing import image from keras.models import Model from keras...
{"hexsha": "8867d713464dc5a67cd98650434be2f7e58d5600", "size": 781, "ext": "py", "lang": "Python", "max_stars_repo_path": "server/model.py", "max_stars_repo_name": "codergab/Vusion", "max_stars_repo_head_hexsha": "44ed404112943531e645db5e4cb03fe44d08a2ef", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
using LazyArrays, ArrayLayouts, LinearAlgebra, FillArrays import LazyArrays: materialize!, MemoryLayout, triangulardata, LazyLayout, UnknownLayout, LazyMatrix # used to test general matrix backends struct MyMatrix{T} <: LazyMatrix{T} A::Matrix{T} end MyMatrix{T}(::UndefInitializer, n::Int, m::Int) where T = MyMat...
{"hexsha": "577332913ad0e72ab8c772e55a3ecced602470c3", "size": 12905, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/lazymultests.jl", "max_stars_repo_name": "johnbcoughlin/LazyArrays.jl", "max_stars_repo_head_hexsha": "6fcc9b900aa147222b259037fd48d4698ad1ad54", "max_stars_repo_licenses": ["MIT"], "max_star...
""" The functions in this module calculate different graph-level properties. The first function is a wrapper that subsamples networks from a list of null models to output a dataframe of set sizes. """ __author__ = 'Lisa Rottjers' __email__ = 'lisa.rottjers@kuleuven.be' __status__ = 'Development' __license__ = 'Apache...
{"hexsha": "da0638de422e26f8cf322702447473851bc7b08e", "size": 7733, "ext": "py", "lang": "Python", "max_stars_repo_path": "anuran/graphvals.py", "max_stars_repo_name": "ramellose/anuran", "max_stars_repo_head_hexsha": "8541f9cedbca00981257564fb8562d46fa5f5cab", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
// Copyright 2017 The Ray Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
{"hexsha": "5bfa82965a83e80a21f8aacf43d8ba2ff28fa889", "size": 3885, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/ray/core_worker/transport/thread_pool_manager.cc", "max_stars_repo_name": "daobook/ray", "max_stars_repo_head_hexsha": "af9f1ef4dc160e0671206556b387f8017f3c3930", "max_stars_repo_licenses": ["Apa...
# # Author: Qiming Sun <osirpt.sun@gmail.com> # ''' C code and some fundamental functions ''' from pyscf.lib import parameters param = parameters from pyscf.lib import numpy_helper from pyscf.lib import linalg_helper from pyscf.lib import logger from pyscf.lib.misc import * from pyscf.lib.numpy_helper import * from p...
{"hexsha": "162173341e35fbc0c6ce22b666ae3dd0f368b269", "size": 449, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/__init__.py", "max_stars_repo_name": "gmwang18/pyscf", "max_stars_repo_head_hexsha": "fcd6877751661c8a9743c1c872a4a2b65f6dd7ac", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": ...
import numpy as np import torch import torch.nn as nn from mbmf import utils class HybridAgent(nn.Module): """ Take an ensemble of SAC agents and an MPC planner """ def __init__(self, sac_agents, planner, ensemble_model, buffer, ...
{"hexsha": "bfa53c0f20474ec4d4fd045c5796a033922752fc", "size": 5487, "ext": "py", "lang": "Python", "max_stars_repo_path": "mbmf/control/hybrid.py", "max_stars_repo_name": "BerenMillidge/state-augmentation", "max_stars_repo_head_hexsha": "b3834b3a99be9854ecf83b6d83e9fbb2184f4861", "max_stars_repo_licenses": ["MIT"], "m...
""" FMA Helpers """ from typing import List, Optional, Tuple, Union import numpy as np import pandas as pd _LIST_GENRE_COLUMNS: Tuple[str, ...] = ("track_genres", "track_genres_all") def join_columns(df: pd.DataFrame) -> pd.DataFrame: df.columns = ["_".join(i) for i in df.columns] return df def sort...
{"hexsha": "fec2cd0ae9f2b6198c2cb3ef0f41999539a84a3a", "size": 1706, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/fma/data/_helpers.py", "max_stars_repo_name": "TariqAHassan/wav2rec", "max_stars_repo_head_hexsha": "8d3f33291f246d80a4935cf7aa2cc75f110d9c15", "max_stars_repo_licenses": ["MIT"], "max...
(* This code is copyrighted by its authors; it is distributed under *) (* the terms of the LGPL license (see LICENSE and description files) *) (****************************************************************************) (* *) (* ...
{"author": "coq-contribs", "repo": "fairisle", "sha": "e36087a6b7e52ef3c6dcfdeba1298e8fde1260a0", "save_path": "github-repos/coq/coq-contribs-fairisle", "path": "github-repos/coq/coq-contribs-fairisle/fairisle-e36087a6b7e52ef3c6dcfdeba1298e8fde1260a0/Libraries/Lib_Arithmetic/Lib_Plus.v"}