text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import sys import os sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.model_selection import GridSearchCV from sklearn.metrics import classification_report, accuracy_score from sklearn.svm import ...
{"hexsha": "795f935794071c27064e88aab40b3fa5c116fa9e", "size": 2081, "ext": "py", "lang": "Python", "max_stars_repo_path": "BayesOpt/BayesOpt-SVM.py", "max_stars_repo_name": "Saoge123/ccgnet", "max_stars_repo_head_hexsha": "9359c642bd1faa4c15cae829615385761ebd8d92", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
// ---------------------------------------------------------------------------| // Boost Test Framework // ---------------------------------------------------------------------------| #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE MyTest #include <boost/test/unit_test.hpp> #include <stdint.h> // --------------...
{"hexsha": "93c0b812e43950bd65c4e8c9e67135640eaa2e3f", "size": 4257, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "OpenYuma/netconf/test/subsys-test/ncx-init/ncx-init-test.cpp", "max_stars_repo_name": "5GExchange/escape", "max_stars_repo_head_hexsha": "eb35d460597a0386b18dd5b6a5f62a3f30eed5fa", "max_stars_repo_l...
\documentclass[a4paper, oneside]{book} \usepackage{notebook_Template} \title{MIT 6.006 NoteBook} \author{Fontaine Guo} \begin{document} \maketitle \chapter{introduction} \import{sections/}{lecture1/lecture1} \import{sections/}{lecture2/lecture2} \chapter{Sorting and tree} \import{...
{"hexsha": "b44b918394d12eb5819bab3bdf4044e9d03bc0eb", "size": 502, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "OpenCourse/MIT6.006-Introduction toAlgorithms/NoteBook/MIT6006_Notebook.tex", "max_stars_repo_name": "FontaineGuo/PathOfLearning", "max_stars_repo_head_hexsha": "a5af03af6dcea409375276b53a397f014a4de...
#!/usr/bin/env python """ This file is a Python translation of the MATLAB file covm.m Python version by RDL 31 Mar 2012 Copyright notice from covm.m: copyright 1996, by M.H. Hayes. For use with the book "Statistical Digital Signal Processing and Modeling" (John Wiley & Sons, 1996). """ from __future__ import pr...
{"hexsha": "bab30bb08c42fd98e92d38a8c134d9e559e5f52d", "size": 1363, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/by_hand_code/covm.py", "max_stars_repo_name": "vishalbelsare/parametric_modeling", "max_stars_repo_head_hexsha": "9bfe5df35671930043215c8f6c855af8f49e28bf", "max_stars_repo_licenses": ["BSD-3-...
import sys import os import copy import numpy as np import pandas as pd from traceback import print_exc from pystatplottools.expectation_values.expectation_value import ExpectationValue from mcmctools.utils.json import load_configs from mcmctools.loading.loading import load_data def compute_measure_over_config(d...
{"hexsha": "783c638bd593097d7c22b0d2ff12f722e183b584", "size": 8527, "ext": "py", "lang": "Python", "max_stars_repo_path": "mcmctools/modes/expectation_value.py", "max_stars_repo_name": "statphysandml/MCMCEvaluationLib", "max_stars_repo_head_hexsha": "f722b2c7df88b1b33cd29335a22eef53bdad9665", "max_stars_repo_licenses"...
# inspired by # http://rl-gym-doc.s3-website-us-west-2.amazonaws.com/mlss/lab1.html import numpy class LinearPolicy: def __init__(self, theta, env): obs_dim = env.observation_space.shape[0] act_dim = env.action_space.n self.W = theta[:obs_dim * act_dim].reshape(obs_dim, act_dim) se...
{"hexsha": "03aa9df851e3d362a668781903082f70bd78a227", "size": 2099, "ext": "py", "lang": "Python", "max_stars_repo_path": "classic/cem.py", "max_stars_repo_name": "podondra/roboschool-rl", "max_stars_repo_head_hexsha": "2e6d6b1302eaa9aea12ebd81e2ad7a22d29a8d69", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
import pickle import torch import torchvision import numpy as np class Mnist_M(torch.utils.data.Dataset): def __init__(self, dataset_path, train=True, transform=None): self.train = train self.transform = transform with open(dataset_path, 'rb') as mnist_m: mnist_m_data = pickle.load(mni...
{"hexsha": "7e9df3a302df428101525e81f26fe0f2f0b20ead", "size": 1228, "ext": "py", "lang": "Python", "max_stars_repo_path": "mnist_m.py", "max_stars_repo_name": "wiatrak2/BScThesis", "max_stars_repo_head_hexsha": "e5dd012fd9052e7088d8464b409dc055dbfcf840", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
c______________________________________________________________________ c subroutine cininit(msval,rmsval,nch) include 'iounits.inc' include '../include/datsz.inc' include 'input.inc' character*80 cfin character*40 ctemp,croot,cfpaths character*3 cfn logical lpath c ...
{"hexsha": "cc229b26b5b297d23bdb47cc3b426d10bdee9948", "size": 14945, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "iris_mt_scratch/egbert_codes-20210121T193218Z-001/egbert_codes/EMTF/D/inpu_bin.f", "max_stars_repo_name": "simpeg-research/iris-mt-scratch", "max_stars_repo_head_hexsha": "ea458f253071db513fd0731...
#! /usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from netcdf4 import NcDataset def concatDimension(fnames, dim, dimvar=None, outfname=None, **kwargs): """ Arguments: ---------- datasets (List[str]): datasets to concatenate dim (String): name of the dimen...
{"hexsha": "de76be768405d03fa20656a12d32e0fd8ca05684", "size": 3834, "ext": "py", "lang": "Python", "max_stars_repo_path": "jams/netcdf4/utils.py", "max_stars_repo_name": "MuellerSeb/jams_python", "max_stars_repo_head_hexsha": "1bca04557da79d8f8a4c447f5ccc517c40ab7dfc", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
subroutine intcrv( npts, nsd, s, b, t, sint, r, dr, mpts ) implicit real*8 (a-h,o-z) dimension s(mpts), b(mpts,nsd), t(mpts,nsd), r(nsd), dr(nsd) klo = 1 khi = npts 10 if ( khi-klo .gt. 1 ) then k = (khi+klo)/2 if (s(k) .gt. sint) then ...
{"hexsha": "f508bfc0c312cb02d0a7285478fe2cf8dceeaf44", "size": 911, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "mesh/intcrv.f", "max_stars_repo_name": "sscollis/lns3d", "max_stars_repo_head_hexsha": "f87b06abbb188cce9248092075f71dcce4570493", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": nu...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2019 Ryan L. Collins <rlcollins@g.harvard.edu> # and the Talkowski Laboratory # Distributed under terms of the MIT license. """ Compute quantiles of input data """ import argparse import sys import numpy as np def main(): """ Main block "...
{"hexsha": "b37462d01f3e3170435a38a948b8a16f46e1d347", "size": 1814, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/quantiles.py", "max_stars_repo_name": "talkowski-lab/rCNV2", "max_stars_repo_head_hexsha": "fcc1142d8c13b58d18a37fe129e9bb4d7bd6641d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import tensorflow as tf from django.conf import settings import numpy as np import cv2 import urllib def process_image(img): resp = urllib.request.urlopen(img) image = np.asarray(bytearray(resp.read()), dtype="uint8") img_array = cv2.imdecode(image, cv2.IMREAD_GRAYSCALE) new_array = cv2.resize(img_arra...
{"hexsha": "77647aaf6fae2b900706e7f33d420b8413b36e37", "size": 674, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlapp/helpers.py", "max_stars_repo_name": "AashishDhakal/Covid-Xray-Test", "max_stars_repo_head_hexsha": "d536699f09238537a066c043cbe760dd24bcd57e", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
from tkinter import * import cv2,os import csv import numpy import imutils import pandas as pd import datetime import time from time import sleep import glob from PIL import Image, ImageTk import face_recognition from imutils import face_utils import os import time import numpy as np import matplotlib.pyplot as plt im...
{"hexsha": "9d852ad676620048a1b30491237d9b6bd4669921", "size": 4945, "ext": "py", "lang": "Python", "max_stars_repo_path": "facial_expression_program_cython/check_face_exist.py", "max_stars_repo_name": "NhamNgocTuanAnh/Real_Time_Facial_Expression_Recognition", "max_stars_repo_head_hexsha": "7e7b1ce9eb7b5292087752501c8c...
from sklearn.base import BaseEstimator, ClassifierMixin from sklearn.utils import check_array from groot.util import convert_numpy import numpy as np from numbers import Number import json import warnings def check_features_scaled(X): min_values = np.min(X, axis=0) max_values = np.max(X, axis=0) if n...
{"hexsha": "dcb19b5f5701e221a5ae32fcab7c58f89e961af3", "size": 4776, "ext": "py", "lang": "Python", "max_stars_repo_path": "roct/base.py", "max_stars_repo_name": "tudelft-cda-lab/ROCT", "max_stars_repo_head_hexsha": "c44625dd5d5c2632bf2ddbe2470b42104a5a5e6d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
from torchvision import transforms import drishtypy.data.get_dataset import albumentations as A from drishtypy.data.get_dataset import get_dataset import numpy as np def find_stats(path): mean = [] stdev = [] # Transform to Tensor data_transforms = A.Compose([transforms.ToTensor()]) trainset, tes...
{"hexsha": "7b40d01b133aee83a9fa07dc98f99e879b4ae464", "size": 778, "ext": "py", "lang": "Python", "max_stars_repo_path": "drishtypy/data/data_utils.py", "max_stars_repo_name": "Abhinavl3v3l/Drishtipy", "max_stars_repo_head_hexsha": "5956afe24916bf40dde8d857ed6030de57dea353", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np from fast_functions.geodesic import geodesic_single, geodesic_array avon_lat, avon_lng = 45.6091, -94.4517 minneapolis_lat, minneapolis_lng = 44.9778, -93.2650 def test_geodesic_single(): result = geodesic_single(avon_lat, avon_lng, minneapolis_lat, minneapolis_lng) assert round(result, 2)...
{"hexsha": "39f9ce796eecd157e2f23320e22415a585c96190", "size": 733, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_geodesic.py", "max_stars_repo_name": "TheCulliganMan/fast-functions", "max_stars_repo_head_hexsha": "82ea881c6f78b358dc75374548aebc5d35c8a8e5", "max_stars_repo_licenses": ["MIT"], "max_s...
# SymPy Tutorial *Arthur Ryman* <br/> *Last Updated: 2020-04-16* This notebook contains the examples from the [SymPy Tutorial](https://docs.sympy.org/latest/tutorial/index.html). ## Matrices ```python from sympy import * init_printing(use_unicode=True) ``` ### simplify ```python Matrix([[1, -1], [3, 4], [0, 2...
{"hexsha": "1144e766bf6d14a75bacea4e0f5fceb3012e545d", "size": 126194, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "notes/docs.sympy.org/tutorial/matrices.ipynb", "max_stars_repo_name": "agryman/acmpy", "max_stars_repo_head_hexsha": "9566a0abce51cb610ec6c79eaea2e2b26b707419", "max_stars_repo_lice...
using DiskJockey.constants using DiskJockey.gridding using DiskJockey.visibilities using DiskJockey.image using DiskJockey.gauss # load data and get one channel dv = DataVis("data.hdf5", 1, true) # this shouldn't be flagged=true, but because we changed the masks, etc # now actually create a FullModelVis to be interpo...
{"hexsha": "f38c64cc93dbfcf29730b01fe55445e8ec667fd3", "size": 921, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/interpolation_plan.jl", "max_stars_repo_name": "j6626/DiskJockey", "max_stars_repo_head_hexsha": "7e10f8417fc5769efd9f950a5f1de3949f0df70b", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# -*- coding: utf-8 -*- """ Created on Tue Dec 1 11:56:42 2020 @author: Florian Jehn """ import re import numpy as np import pandas as pd import os from pdfminer3.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer3.converter import TextConverter from pdfminer3.layout import LAParams from pdfminer3...
{"hexsha": "c5226ea52d7a5cbef5b3171fdf66bdfd7c426100", "size": 3166, "ext": "py", "lang": "Python", "max_stars_repo_path": "count_temp_ipcc.py", "max_stars_repo_name": "jasonrwang/Extreme-Climate-Change", "max_stars_repo_head_hexsha": "aee0d6e981d632e87c708cf4a09bd759fdaacc0d", "max_stars_repo_licenses": ["Apache-2.0"]...
import time from pymodelica import compile_fmu from pyfmi.fmi import load_fmu import numpy as np import matplotlib.pyplot as plt model_name = "ApplianceModels.Toaster" file_path = "resources/appliance_models.mo" output_dir = "output/" sim_fmu = compile_fmu(model_name, file_path, version="1.0", compile_to=output_dir) m...
{"hexsha": "63e879b1968db550de70677e1ccec4e30dfd2239", "size": 1401, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/examples/test_modelica.py", "max_stars_repo_name": "aau-daisy/flexibleloadsimulator", "max_stars_repo_head_hexsha": "5f1b37169511ffe2293dc28ce21cf2238a451123", "max_stars_repo_licenses": ["MIT...
import scanpy as sc import numpy as np import pytest from scanpy.tests._data._cached_datasets import pbmc68k_reduced n_neighbors = 5 key = 'test' @pytest.fixture def adata(): return pbmc68k_reduced() @pytest.mark.parametrize('groupby', ['bulk_labels', ['bulk_labels', 'phase']]) @pytest.mark.parametrize('key_ad...
{"hexsha": "a656b03c6ab23485fa926c4cb889bfbfeaf757f5", "size": 737, "ext": "py", "lang": "Python", "max_stars_repo_path": "scanpy/tests/test_dendrogram_key_added.py", "max_stars_repo_name": "lazappi/scanpy", "max_stars_repo_head_hexsha": "9018e16cae6f3199f914f58841b00a00790cd494", "max_stars_repo_licenses": ["BSD-3-Cla...
///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2007-2013 // // 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://w...
{"hexsha": "a3c8bddb83e4a6ef86110f7f197a1e677ea87e05", "size": 20329, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "libs/intrusive/test/test_container.hpp", "max_stars_repo_name": "lijgame/boost", "max_stars_repo_head_hexsha": "ec2214a19cdddd1048058321a8105dd0231dac47", "max_stars_repo_licenses": ["BSL-1.0"], "m...
\input{../header_class} %---------- start document ---------- % \section{poly.multivar -- multivariate polynomial}\linkedzero{poly.multivar} \begin{itemize} \item {\bf Classes} \begin{itemize} \item \negok \linkingone{poly.multivar}{PolynomialInterface} \item \negok \linkingone{poly.multivar}...
{"hexsha": "2c3ae8d874f8aecdb1aced84e0ee46292bd2d719", "size": 2379, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "manual/en/poly.multivar.tex", "max_stars_repo_name": "turkeydonkey/nzmath3", "max_stars_repo_head_hexsha": "a48ae9efcf0d9ad1485c2e9863c948a7f1b20311", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
"""Minimum current estimate""" from load_data import * # def mce(fwd, n_svd): from numpy.linalg import svd from scipy.linalg import block_diag from scipy.optimize import linprog from sklearn.preprocessing import normalize fwd_fix = mne.convert_forward_solution(fwd, surf_ori=True, force_fixed=False) leadfield = fwd_fi...
{"hexsha": "27f224ceba415c297eda5faf37069ec9a20cda23", "size": 2274, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/mce_old.py", "max_stars_repo_name": "FasT93/cognigraph", "max_stars_repo_head_hexsha": "d0373c1a6ca30f3627fd0d5791b0e5517d9814a0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3,...
import planner_tests.ros_oracle_bridge import numpy as np import IPython def sample_action(bounds, state): """ Sample an action in the direction to the closest object. """ robot_state = state[0] delta_pos = state[1:, :2] - robot_state[:2] closest_obj_state = state[np.argmin(np.linalg.norm(...
{"hexsha": "7a0e8c7c6ff9bc86662bd0f4ab8861510953ed56", "size": 3413, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/scripts/box2d/generate_dummy_sas_data.py", "max_stars_repo_name": "JoshuaHaustein/planner_tests", "max_stars_repo_head_hexsha": "4251739668c4b8e95c0ff0f35dcea36b3742ed7e", "max_stars_repo_l...
import torch import numpy as np import higher import os from torch import nn from torch import optim from torch.nn import functional as F from torch.utils.data import TensorDataset, DataLoader from torch import optim from torch.autograd import Variable from lstm_learner import LSTM from copy import deepcopy from plot_...
{"hexsha": "847a2d42599037109a5fb6728a5d2737d02fd0ec", "size": 5703, "ext": "py", "lang": "Python", "max_stars_repo_path": "maml_higher_learner.py", "max_stars_repo_name": "17011813/fsl_ts", "max_stars_repo_head_hexsha": "5d2fad7e869f46b456ca43f513984ec2d4fd7b9f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import cv2 import numpy as np import matplotlib.pyplot as plt import os import glob import argparse parser = argparse.ArgumentParser() parser.add_argument('--scene', default='Scene') parser.add_argument('--isPrecise', action='store_true', help='use this flag to manually select precise circle prediction') opt = parser....
{"hexsha": "6e0f1bb7a4b57f9408ecabf1eeae03b52f9b7084", "size": 3569, "ext": "py", "lang": "Python", "max_stars_repo_path": "createRealData/1_ballDetect.py", "max_stars_repo_name": "Miles629/TransparentShapeRealData", "max_stars_repo_head_hexsha": "b81098a2d1882f5fd33fba6167d7258dbe02d6d2", "max_stars_repo_licenses": ["...
from matplotlib.figure import Figure from utils.db import DB import numpy as np from datetime import datetime, timedelta import matplotlib.pyplot as plt import pandas as pd import sys from pandas.core.frame import DataFrame # Adds higher directory to python modules path. sys.path.append("..") class Analysis(): ...
{"hexsha": "a414794abed1a232d7598404e723e156ec4406dc", "size": 3868, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/analysis/analysis.py", "max_stars_repo_name": "TrisNol/tic-tac-toe", "max_stars_repo_head_hexsha": "710654846da568975aa7e7f7e6d9d7db9cfa6fe0", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** * Copyright (c) 2011-2015 Regents of the University of California. * * This file is part of ndnSIM. See AUTHORS for complete list of ndnSIM authors and * contributors. * * ndnSIM is free software: you can redistribute it and/or modify it under...
{"hexsha": "01c8951278ad8bb562208ba52856928525f92028", "size": 5299, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "trie/multi-policy.hpp", "max_stars_repo_name": "seanbraley/ndn-split-caching", "max_stars_repo_head_hexsha": "58d8c69c0316ed209661fb3f5a99c424847e2e37", "max_stars_repo_licenses": ["MIT"], "max_star...
# -*- coding: utf-8 -*- """ Created on Thu Sep 19 09:15:31 2019 @author: KangmoonKo """ import requests from flask import Flask, request, Response import pandas as pd import numpy as np import re from openpyxl import load_workbook from datetime import datetime, timedelta import calendar import copy app_festibot = Fl...
{"hexsha": "9cb91401796aa246dfab19078180e2d40dbede5e", "size": 19321, "ext": "py", "lang": "Python", "max_stars_repo_path": "Festibot.py", "max_stars_repo_name": "imeeke83/sba_FestiBot", "max_stars_repo_head_hexsha": "69fc2f23988748f2d540501d0423e343be0ba860", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
"""A two-layer clip network with h and g matrices stored as numpy arrays. Copyright 2018 Alexey Melnikov and Katja Ried. Copyright 2020 Julius Wallnöfer, Alexey Melnikov Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. Original code for b...
{"hexsha": "7bf9138639a1fd98f3b5d225768a10315e8a5111", "size": 3569, "ext": "py", "lang": "Python", "max_stars_repo_path": "agents/brains/dense_brain.py", "max_stars_repo_name": "qic-ibk/ps_quantum_comm", "max_stars_repo_head_hexsha": "8af965f994f1a629f64be96a28af7a71aaad342b", "max_stars_repo_licenses": ["Apache-2.0"]...
# coding=utf-8 # Copyleft 2019 project LXRT. import json import numpy as np import torch from torch.utils.data import Dataset from param import args from data import load_obj_tsv # Load part of the dataset for fast checking. # Notice that here is the number of images instead of the number of data, # which means all...
{"hexsha": "0a777ec94bd424e1786f1fb65223120cc56bf7fb", "size": 5984, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tasks/gqa_data.py", "max_stars_repo_name": "csarron/lxmert", "max_stars_repo_head_hexsha": "b58933c61d2715391831a0a4dc4f5dbba7e433ba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import numpy as np import cv2 from dataset_loader import DatasetLoader from constants import * from keras.models import load_model from quiver_engine.server import launch # Load dataset # Comment/uncomment to select dataset to use dataset = DatasetLoader() # JAFFE # dataset.jaffe_load_from_save() # classes = JAFFE...
{"hexsha": "71ff1f3f735f57d723d07b954ac7b12fd4684019", "size": 1188, "ext": "py", "lang": "Python", "max_stars_repo_path": "validate_model.py", "max_stars_repo_name": "jorgimello/meta-learning-fer", "max_stars_repo_head_hexsha": "793610ae8471f794a6837930d8bb51866c1f7c02", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np import cv2 def match_histogram(image, reference): image = cv2.imread(image, cv2.COLOR_BGR2BGRA) reference = cv2.imread(reference, cv2.COLOR_BGR2BGRA) cv2.imshow("image", image) cv2.imshow("reference", reference) img = cv2.imread('wiki.jpg',0) equ = cv2.equalizeHist(imag...
{"hexsha": "d1c46f796dcd598d820d5a4bf203a464880e581a", "size": 597, "ext": "py", "lang": "Python", "max_stars_repo_path": "match_histogram.py", "max_stars_repo_name": "michelecos/py_imagecompose", "max_stars_repo_head_hexsha": "0e0ebeca1a482d1207e1e0740467b980fb2c43a8", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
# import lib import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # features names are not present in dataset so lets read features from features.txt features = list() with open('UCI_HAR_Dataset/features.txt') as f: features = [line.split()[1] for line in f.readline...
{"hexsha": "57d624adae69387da68f0152088ce5aab54869f8", "size": 7846, "ext": "py", "lang": "Python", "max_stars_repo_path": "HAR_EDA.py", "max_stars_repo_name": "Akshaykumarcp/Human-Activity-Recognition-ML-DL", "max_stars_repo_head_hexsha": "fb23c948b458b1e606a4bcf240e5af38c9ab5ae4", "max_stars_repo_licenses": ["MIT"], ...
import pygame import numpy as np import colorsys from typing import List, Union, Tuple import os from PyEvolv.grid_creator.Sidebar import Sidebar from PyEvolv.assets.font import FONT class GridCreator: def __init__(self,display_width:int, display_height:int, grid:np.ndarray, grids_path:str, relatives_on_screen:int...
{"hexsha": "2a69b09f93d4e645ddd5130d2759a0551e9cb112", "size": 9363, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyEvolv/grid_creator/grid_creator.py", "max_stars_repo_name": "peerlator/PyEvolv", "max_stars_repo_head_hexsha": "7f5644e2ea22257f34547c9b050bc4cdd4f3bdec", "max_stars_repo_licenses": ["MIT"], "ma...
from __future__ import annotations from operator import attrgetter from pathlib import Path from typing import TYPE_CHECKING import networkx as nx from networkx.algorithms import shortest_path from networkx.drawing.nx_pydot import to_pydot from networkx.utils import pairwise from wrapt import ObjectProxy from .compo...
{"hexsha": "ec8db23a650b5e8b4b7924190519d337f0a3357e", "size": 4498, "ext": "py", "lang": "Python", "max_stars_repo_path": "momos/graph.py", "max_stars_repo_name": "codetent/project_momos", "max_stars_repo_head_hexsha": "424a46f901941ae0b0641a0c407a1e38ee121e72", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
import glob import os import numpy as np from unyt import dimensions, unyt_array from unyt.unit_registry import UnitRegistry from yt.convenience import load from yt.data_objects.time_series import DatasetSeries, SimulationTimeSeries from yt.funcs import only_on_root from yt.utilities.cosmology import Cosmology from y...
{"hexsha": "37e80e34a7deaa39d0cd2a4fd5732833df7096df", "size": 21613, "ext": "py", "lang": "Python", "max_stars_repo_path": "yt/frontends/gadget/simulation_handling.py", "max_stars_repo_name": "cgyurgyik/yt", "max_stars_repo_head_hexsha": "9251e7bff9112e0f54c9b24f6a8bbba66869bb9d", "max_stars_repo_licenses": ["BSD-3-Cl...
from ..camera import CameraGeometry, make_rectangular_camera_geometry from ..camera import find_neighbor_pixels import numpy as np from astropy import units as u def test_make_rectangular_camera_geometry(): geom = make_rectangular_camera_geometry() assert(geom.pix_x.shape == geom.pix_y.shape) def test_load_...
{"hexsha": "2d3203564e4ebde50a5954ccde8e1b5f5988fcd5", "size": 933, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctapipe/io/tests/test_camera.py", "max_stars_repo_name": "rdelosreyes/myctapipe", "max_stars_repo_head_hexsha": "dad0784b60de986d5ee871e7b61a951e948998d6", "max_stars_repo_licenses": ["BSD-3-Clause...
[STATEMENT] lemma allConsec_set: assumes "(\<Delta>1,\<Delta>2) \<in> allConsec \<Delta>s" shows "\<Delta>1 \<in> set \<Delta>s \<and> \<Delta>2 \<in> set \<Delta>s" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Delta>1 \<in>\<in> \<Delta>s \<and> \<Delta>2 \<in>\<in> \<Delta>s [PROOF STEP] using assms [PROOF STA...
{"llama_tokens": 241, "file": "Bounded_Deducibility_Security_Compositional_Reasoning", "length": 2}
# -*- coding: utf-8 -*- from __future__ import print_function import matplotlib import numpy import CoolProp CP = CoolProp.CoolProp SMALL = 1E-5 class BasePlot(object): #TODO: Simplify / Consolidate dictionary maps AXIS_LABELS = {'kSI': {'T': ["Temperature", r"[K]"], 'P': ["Pres...
{"hexsha": "cb7c7938251f1077fd089edda762e50c243c0656", "size": 11138, "ext": "py", "lang": "Python", "max_stars_repo_path": "wrappers/Python/CoolProp/Plots/Common.py", "max_stars_repo_name": "perrante/coolprop", "max_stars_repo_head_hexsha": "c67ecc570e545d624c18feaf2a01e48b63ae1501", "max_stars_repo_licenses": ["MIT"]...
import sys, os, io import random import json import torch import logging import argparse import gensim import struct import math import itertools import copy import time import warnings if sys.version_info[0] == 2: import cPickle as pickle else: import pickle import numpy as np import torch.nn as nn import to...
{"hexsha": "302a6047cac477dfa317bd335e58796e3fef34fb", "size": 11308, "ext": "py", "lang": "Python", "max_stars_repo_path": "openks/models/pytorch/mimo_learn.py", "max_stars_repo_name": "OpenCKS/OpenKS", "max_stars_repo_head_hexsha": "221c06476518fbde62201aa7be192a38e1d6c3b0", "max_stars_repo_licenses": ["Apache-2.0"],...
[STATEMENT] lemma vifunion_vsingleton_is[simp]: "(\<Union>\<^sub>\<circ>i\<in>\<^sub>\<circ>set {i}. f i) = f i" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Union>\<^sub>\<circ> (VLambda (set {i}) f `\<^sub>\<circ> set {i}) = f i [PROOF STEP] by force
{"llama_tokens": 110, "file": "CZH_Foundations_czh_sets_CZH_Sets_IF", "length": 1}
#workspace() #= using EAGOParametricInterval using IntervalArithmetic opt1 = Param_Bisect_Opts() # sets bisection options to default opt1.kmax_main = 1 # number of iterations for generalized bisection routine opt1.kmax_cntr = 100 # number of iterations for contractor opt1.style = "NewtonGS" # specifies N...
{"hexsha": "fa0b3d08bb4a501bdc53edcf38932791572171b6", "size": 6478, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "example/ParametricBisection.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/EAGOParametricInterval.jl-943bb2e0-4606-56fd-97c8-8e4f771eb881", "max_stars_repo_head_hexsha": "6e82f669c9c3a...
from __future__ import division import numpy as np import matplotlib.pyplot as plt import sys import glob import matplotlib.gridspec as gridspec from mpl_toolkits.mplot3d import Axes3D import os ##Setup plotting environment plt.style.use('science') d = 2 fig,(ax1,ax2)= plt.subplots(2, 1, figsize=(10,10),sharex=Tru...
{"hexsha": "3210c8bbd18a591765fab03c12758b9d8faf4e9a", "size": 1869, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/plot_intersections_and_time_delay.py", "max_stars_repo_name": "tomkimpson/RayTracing", "max_stars_repo_head_hexsha": "fbcffad7185207dabd93eba877b84d88dd5cb789", "max_stars_repo_licenses": ["...
import os import math import random import string from functools import partial import pytest import numpy as np from eight_mile.embeddings import * from eight_mile.utils import Offsets loc = os.path.dirname(os.path.realpath(__file__)) GLOVE_FILE = os.path.join(loc, "test_data", "glove_test.txt") W2V_FILE = os.path.jo...
{"hexsha": "b20d5fa8f581c25f2c16d502a12183e92022f18a", "size": 6472, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_embeddings.py", "max_stars_repo_name": "sagnik/baseline", "max_stars_repo_head_hexsha": "8d75616e04c1cca509dbebbb6d08ad7e1a7b9f88", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
# Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU. # # 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 requi...
{"hexsha": "0a896018857a63f7e2f8d91e765f18d97ede3937", "size": 20337, "ext": "py", "lang": "Python", "max_stars_repo_path": "cameo/strain_design/pathway_prediction/pathway_predictor.py", "max_stars_repo_name": "jlerman44/cameo", "max_stars_repo_head_hexsha": "6aa4b9db7ebcc3e52547821e64b13675cf73f73a", "max_stars_repo_l...
#coding:utf-8 from captcha.image import ImageCaptcha # pip install captcha import numpy as np import matplotlib.pyplot as plt from PIL import Image import random,time,os # 验证码中的字符, 就不用汉字了 number = ['0','1','2','3','4','5','6','7','8','9'] alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q'...
{"hexsha": "545d7a923ef7dc81aa4d9667f5f36921811c9aa3", "size": 1920, "ext": "py", "lang": "Python", "max_stars_repo_path": "ccaptcha.py", "max_stars_repo_name": "lastcaveman/Tensorflow_Captcha_Break", "max_stars_repo_head_hexsha": "11521e09e8b2ab3cb1e91ea6187ef740d7c42cc1", "max_stars_repo_licenses": ["MIT"], "max_star...
/* // Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a // component of the Texas A&M University System. // All rights reserved. // The information and source code contained herein is the exclusive // property of TEES and may not be disclosed, examined or reproduced // in whole or in part withou...
{"hexsha": "79bf8943f53c853737b7cffc822c0d253a694793", "size": 3654, "ext": "cc", "lang": "C++", "max_stars_repo_path": "stapl_release/examples/project_euler/pe_3a.cc", "max_stars_repo_name": "parasol-ppl/PPL_utils", "max_stars_repo_head_hexsha": "92728bb89692fda1705a0dee436592d97922a6cb", "max_stars_repo_licenses": ["...
SUBROUTINE POLYEV(NN,SR,SI,PR,PI,QR,QI,PVR,PVI) POLY3430 C EVALUATES A POLYNOMIAL P AT S BY THE HORNER RECURRENCE C PLACING THE PARTIAL SUMS IN Q AND THE COMPUTED VALUE IN PV. DOUBLE PRECISION PR(NN),PI(NN),QR(NN),QI(NN), * SR,SI,PVR,PVI,T QR(1) = PR(1) QI(1) = PI(1...
{"hexsha": "50d903ab064245508ad1c6680f17bba189b4b1de", "size": 549, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/f2cl/packages/toms/419/polyev.f", "max_stars_repo_name": "sbwhitecap/clocc-hg", "max_stars_repo_head_hexsha": "f6cf2591ceef8a3a80e04da9b414cdf60a25a90f", "max_stars_repo_licenses": ["MIT"], "ma...
""" ####################### # quket # ####################### opelib.py Library for operators. """ import numpy as np from qulacs.observable import create_observable_from_openfermion_text from qulacs.quantum_operator import create_quantum_operator_from_openfermion_text from qulacs.state import inner_pr...
{"hexsha": "3a064a5989d04c1d08bd673201c46ac47c4f39cf", "size": 4615, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/opelib.py", "max_stars_repo_name": "ymori206226/test", "max_stars_repo_head_hexsha": "001639831ea28814e071ba6a23e8c35da85b6908", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": n...
[STATEMENT] lemma product_overlap: "P z x \<Longrightarrow> O z y \<Longrightarrow> O z (x \<otimes> y)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>P z x; O z y\<rbrakk> \<Longrightarrow> O z (x \<otimes> y) [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. \<lbrakk>P z x; O z y\<rb...
{"llama_tokens": 2223, "file": "Mereology_CM", "length": 31}
# -*- coding: utf-8 -*- # DISCLAIMER # This code file is forked and adapted from https://github.com/hwwang55/DKN/blob/master/src/train.py # import libraries import os import tensorflow as tf import numpy as np # import custom code from src.dkn_model import DKN from src.config import MODELS_DIR from src.config import...
{"hexsha": "e15a0e2a025995539559aeb7ebc8874996446192", "size": 3874, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dkn.py", "max_stars_repo_name": "andreeaiana/geneg_benchmarking", "max_stars_repo_head_hexsha": "0b53989c79b8e3771c144c0332fd36587dfe0f4d", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
using FakePackage, ReTest using ReTest: process_args, and import ReTest: Test include("../../setup.jl") retest(FakePackage, recursive=false) @test FakePackage.RUN == [1, 2] FakePackage.runtests(r"begin-end") @test FakePackage.RUN == [1, 2, 1] FakePackage.runtests(r" for") @test FakePackage.RUN == [1, 2, 1, 2] retest...
{"hexsha": "bf4a5dfcaea8e854671db3e98c3b405eba01b32f", "size": 4044, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/FakePackage/test/runtests.jl", "max_stars_repo_name": "danielsoutar/ReTest.jl", "max_stars_repo_head_hexsha": "4831b0fc23f2897bbeb999de9bdd14e968653199", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/env __author__ = 'Florian Hase' #======================================================================== import time import numpy as np from multiprocessing import Process, Manager from gryffin.utilities import Logger from .kernel_prob_reshaping import KernelReshaper #=================================...
{"hexsha": "7e27be0bd7ebdf2bbc6378e09d2a0f4439ee4c79", "size": 5928, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/gryffin/bayesian_network/category_reshaper.py", "max_stars_repo_name": "Atinary-technologies/gryffin", "max_stars_repo_head_hexsha": "9770ffa049076fc0b82619c6f0d3fc32437aaea4", "max_stars_repo...
import os import cv2 import numpy as np import PIL city_indices = { '0': 'tlv', '1': 'haifa', '2': 'netania', '3': 'gaza', '4': 'nazareth', '5': 'j-m', '6': 'aman', '7': 'kiryat gat', '8': 'tiberias', '9': 'kiryat shmona', '10': 'nablus', } class CityDetector: def _...
{"hexsha": "0978526fa8f299dcc23d2d03445b9366cca3d0c5", "size": 6435, "ext": "py", "lang": "Python", "max_stars_repo_path": "cityfinder/city_detector.py", "max_stars_repo_name": "slava-kerner/cityfinder", "max_stars_repo_head_hexsha": "f4bd1b53b6970492f168dc13e990e56d7e75e2e4", "max_stars_repo_licenses": ["BSD-2-Clause"...
SUBROUTINE rkck(y,dydx,n,x,h,yout,yerr,derivs) character*100 id,revision,revdate data id/'$RCSfile: rkck.f,v $'/ data revision/'$Revision: 1.5 $'/ data revdate/'$Date: 1994/03/14 00:34:16 $'/ INTEGER n REAL*8 h,x,dydx(n),y(n),yerr(n),yout(n) EXTERNAL derivs include ...
{"hexsha": "f945ea5bfad038c966604a28aef2d4a5c7ba6d20", "size": 2040, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/rkck.f", "max_stars_repo_name": "phaustin/empm", "max_stars_repo_head_hexsha": "13bbb7c6568e374c973ea570b064f34a48c6cd8e", "max_stars_repo_licenses": ["CC-BY-3.0"], "max_stars_count": null, "m...
import torch import numpy as np from random import shuffle from torch import from_numpy import pytorch_lightning as pl from torch.utils.data import DataLoader from torch.utils.data import TensorDataset from torch.utils.data import BatchSampler from torch.utils.data import RandomSampler class AbstractModel(pl.Lightnin...
{"hexsha": "1ec03a06e48c5fd5e97321cd6c099e979896eba1", "size": 1696, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/abstract_model.py", "max_stars_repo_name": "cemoody/simple_mf", "max_stars_repo_head_hexsha": "95ec1d5592742cc9a167eda873021f4a881ce569", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import unittest import networkx as nx import numpy as np from cdlib.algorithms import louvain, label_propagation from cdlib import evaluation class PartitionsComparisonsTests(unittest.TestCase): def test_nmi(self): g = nx.karate_club_graph() louvain_communities = louvain(g) lp_communities...
{"hexsha": "10751e5b8cd7d56921dbcb949617defcb467174c", "size": 3866, "ext": "py", "lang": "Python", "max_stars_repo_path": "cdlib/test/test_partitions_comparisons.py", "max_stars_repo_name": "xing-lab-pitt/cdlib", "max_stars_repo_head_hexsha": "590e145429cda1db4d3671c994c502bedd77f108", "max_stars_repo_licenses": ["BSD...
"""Tests for the normal distribution.""" import itertools import unittest import numpy as np import scipy.sparse import scipy.stats import probnum from probnum import linops from probnum import random_variables as rvs from tests.testing import NumpyAssertions def _random_spd_matrix(D=10): """ Generates a random...
{"hexsha": "8a9741fca7e1fed4cb24cfdb9c66ea7a2d689fc7", "size": 19270, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_random_variables/test_normal.py", "max_stars_repo_name": "admdev8/probnum", "max_stars_repo_head_hexsha": "792b6299bac247cf8b1b5056756f0f078855d83a", "max_stars_repo_licenses": ["MIT"]...
from __future__ import division import numpy as np def quantize_ydata(ydata, data): """ To quantize, first we need to determine the quantization level or granularity. Granualarity will be the least common denominator of changes """ # we want to find the smallest change that has occured in ydat...
{"hexsha": "3dc3f67d284058d3321a2dc1755e10fa9429f683", "size": 2682, "ext": "py", "lang": "Python", "max_stars_repo_path": "framework/pre_process.py", "max_stars_repo_name": "psrikanthm/tensorflow-wrapper", "max_stars_repo_head_hexsha": "e9fa8e0f5bdb35e6e94a56a028f9012b125ea9b8", "max_stars_repo_licenses": ["MIT"], "ma...
import os import cbmpy as cbm import numpy as np import random def stat(model, sorted_res): """stat.py uses `final.csv` as input and performs different statistical analyses. This file is still to be completed and does not yet provide all the statistical measures that are provided by `stat.m` i...
{"hexsha": "e235c19628253cc3c640a4a2bbda75628c30cc81", "size": 2439, "ext": "py", "lang": "Python", "max_stars_repo_path": "stat_asl.py", "max_stars_repo_name": "babakml/FBA_perturbation", "max_stars_repo_head_hexsha": "f01389a372f6181577ffaa6669872d3075be7735", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c...
/* * parallel_planner.cc * Copyright (C) 2017 Roman C. Podolski <maito:roman.podolski@tum.de> * * Distributed under terms of the MIT license. */ #include "planner/planner.h" #include <glog/logging.h> #include <boost/geometry.hpp> #include <boost/geometry/geometries/point_xy.hpp> #include <boost/geometry/geometrie...
{"hexsha": "23178f9ec95b67b3789210e911b6f3ce0f7d61d0", "size": 3417, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/planner/planner.cc", "max_stars_repo_name": "RomanCPodolski/samling_based_planning", "max_stars_repo_head_hexsha": "30a064d60e1f278459dfeacbc764022346f6ec84", "max_stars_repo_licenses": ["MIT"], ...
""" Functions to solve for antenna/station gain This uses an iterative substitution algorithm due to Larry D'Addario c 1980'ish. Used in the original VLA Dec-10 Antsol. For example:: gtsol = solve_gaintable(vis, originalvis, phase_only=True, niter=niter, crosspol=False, tol=1e-6) vis = apply_gaintable(vis, ...
{"hexsha": "c1247f09fe1bde52ed3acb6c3b6901516959979f", "size": 28547, "ext": "py", "lang": "Python", "max_stars_repo_path": "rascil/processing_components/calibration/solvers.py", "max_stars_repo_name": "SKA-ScienceDataProcessor/rascil", "max_stars_repo_head_hexsha": "bd3b47f779e18e184781e2928ad1539d1fdc1c9b", "max_star...
import numpy as np from io import BytesIO from utilities.data_pb2 import Data def arr2bytes(arr): arr_bytes = BytesIO() np.save(arr_bytes, arr, allow_pickle=False) return arr_bytes.getvalue() def bytes2arr(arr_bytes): arr = np.load(BytesIO(arr_bytes), allow_pickle=False) return arr
{"hexsha": "d96b90bd98ed680f4f409b55eab0eab765293c8c", "size": 307, "ext": "py", "lang": "Python", "max_stars_repo_path": "utilities/data.py", "max_stars_repo_name": "fanzhilei0834/deep-q-learning", "max_stars_repo_head_hexsha": "b2c6386ce4c653758f7c15a5444b6ecdc1ff5806", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from tensorflow import keras from tensorflow.keras.datasets import cifar10 from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.models import Sequential,save_model from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten from tensorflow.keras.layers import Conv2D, Ave...
{"hexsha": "12c09bb489ca6c33ede7439bc8fb20fe7af7804c", "size": 7784, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/cnn_model/train_cnn_model.py", "max_stars_repo_name": "mervess/spkeras", "max_stars_repo_head_hexsha": "7e127569cbab0c7c0dfeb7ff5a091e63b75ce7b0", "max_stars_repo_licenses": ["MIT"], "max...
\docType{data} \name{anket} \alias{anket} \title{General Social Survey (GSS) araştırmasından kategorik değişken örnekleri} \format{21.473 satır ve 9 sütundan oluşan bir tibble \describe{ \item{yıl}{Araştırma yılı, 2000-2014} \item{medeni_durum}{Medeni durum} \item{yaş}{Yaş. Maksimum 89 ile sınırlı} \item{ırk}{Irk} \ite...
{"hexsha": "ef5dcee2b7782f8e7016b78850f5ebb38f569642", "size": 666, "ext": "rd", "lang": "R", "max_stars_repo_path": "man/anket.rd", "max_stars_repo_name": "botan/veriler", "max_stars_repo_head_hexsha": "772733a88024f4a3306a3a0bf9ab1182ce7f446f", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": 1, "max_stars_...
# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved. # # 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 ...
{"hexsha": "17b98e5d8463dd5d74a227bec6714f86cd2eee40", "size": 21493, "ext": "py", "lang": "Python", "max_stars_repo_path": "graphlearn/python/query.py", "max_stars_repo_name": "acezen/graph-learn", "max_stars_repo_head_hexsha": "05292e25b66c4505abb2804903bb838de4cd5e43", "max_stars_repo_licenses": ["Apache-2.0"], "max...
import tensorflow as tf import numpy as np import random from datetime import datetime from neuralnet.transfer_matrix import transfer_matrix class train_transw(object): def __init__(self, target_dic_path, source_dic_path, transfer_path, word_vec_target, ...
{"hexsha": "c01a00c3cc6623b32a578cf0bfdb5c7c664782fb", "size": 6959, "ext": "py", "lang": "Python", "max_stars_repo_path": "neuralnet/train_transw.py", "max_stars_repo_name": "windowsyuli/cross_domain", "max_stars_repo_head_hexsha": "29ee77853369d4c71b760c754b80531c4deab838", "max_stars_repo_licenses": ["Apache-2.0"], ...
#----------------------------- # initializing snapshots field #----------------------------- function init_snap(nt,nz,nr,nskip) #Initializing snapshots snapshots_vr,snapshots_vz,nsnap,itvec_snap=init_snapshots_v(nskip,nt,nz,nr) snapshots_trr,nsnap,itvec_snap=init_snapshots_t(nskip,nt,nz,nr) return nskip,sn...
{"hexsha": "1343ca5dce2398522b97d5862c52c0f0ffe7e76b", "size": 2559, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/FD/snapshots.jl", "max_stars_repo_name": "sminatos/FDModBiotCyl.jl", "max_stars_repo_head_hexsha": "34963c11988a9c73515e7f012e8841172cd3bcba", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import numpy as np from pydantic import BaseModel, Field from typing import Union, List, Tuple from ROAR.utilities_module.data_structures_models import Transform, Location,Vector3D import cv2 import logging import math from typing import Optional, List from ROAR.utilities_module.camera_models import Camera from ROAR.ut...
{"hexsha": "025738e144516d6f5290c4f39574b297d18e344f", "size": 19109, "ext": "py", "lang": "Python", "max_stars_repo_path": "ROAR/utilities_module/occupancy_map.py", "max_stars_repo_name": "fedepal450/ROAR-RL_FullControl", "max_stars_repo_head_hexsha": "99c86b5d2f9da626098c0c13c63cbaf63d78792f", "max_stars_repo_license...
from numpy import * vector1 = mat([1, 2, 3]) vector2 = mat([4, 5, 6]) print(sqrt((vector1 - vector2) * ((vector1 - vector2).T))) print(sum(abs(vector1-vector2))) print(abs(vector1 - vector2).max()) print(dot(vector1,vector2)/(linalg.norm(vector1)*linalg.norm(vector2))) matV = mat([[1,1,0,1,0,1,0,0,1],[0,1,1,0,...
{"hexsha": "8e32202e60f3ffa3f85300e63b2fdb01747fc335", "size": 556, "ext": "py", "lang": "Python", "max_stars_repo_path": "ML/Distances.py", "max_stars_repo_name": "Joaxin/GitComments", "max_stars_repo_head_hexsha": "7aa862f0ee892cbbc94b037395a6273b2654cbea", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
Require Import Fiat.Narcissus.Common.Specs Fiat.Narcissus.Formats.WordOpt. Require Import Bedrock.Word Coq.omega.Omega Coq.Strings.Ascii Coq.Numbers.BinNums Coq.NArith.BinNat. Section Ascii. Context {B : Type}. Context {cache : Cache}. Context {cacheAddNat ...
{"author": "PRECISE", "repo": "smedl-fiat-code", "sha": "0c382ae9aa40df08c982fe0659a09544c69dc479", "save_path": "github-repos/coq/PRECISE-smedl-fiat-code", "path": "github-repos/coq/PRECISE-smedl-fiat-code/smedl-fiat-code-0c382ae9aa40df08c982fe0659a09544c69dc479/fiat/src/Narcissus/Formats/AsciiOpt.v"}
# DynaMine # /Memoire/dynamine # coding=utf-8 from numpy import * import petl as etl from re import * import operator import glob import pandas as pd import re import csv import matplotlib.pyplot as plt import numpy as np from scipy import stats #dsysmap b = pd.read_csv('all_mutations.dat','\t') #28'695 rows x 11 co...
{"hexsha": "85f87eafa93ded6c2545e9e9f25905611d1496b1", "size": 4108, "ext": "py", "lang": "Python", "max_stars_repo_path": "dSysMap/plotcomp_dsysmap.py", "max_stars_repo_name": "najmacherrad/master_thesis", "max_stars_repo_head_hexsha": "4a5c68d6dddb98548ff93105a330e21148a1fa8d", "max_stars_repo_licenses": ["MIT"], "ma...
[STATEMENT] lemma Posix_PosOrd_reverse: assumes "s \<in> r \<rightarrow> v1" shows "\<not>(\<exists>v2 \<in> LV r s. v2 :\<sqsubset>val v1)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> (\<exists>v2\<in>LV r s. v2 :\<sqsubset>val v1) [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: s \<...
{"llama_tokens": 240, "file": "Posix-Lexing_Positions", "length": 2}
import cv2 import imutils import numpy as np import random from enum import Enum import math import time # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # BRUSHES MODULE # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ # ---------------------------------- # ENUMS # ---------------------------------- class Selection...
{"hexsha": "de7be32e032ddc2d5a9e90f7e46b34bb7e54df5a", "size": 18631, "ext": "py", "lang": "Python", "max_stars_repo_path": "brushes/Brushes.py", "max_stars_repo_name": "wranidlo/Camera-Paint", "max_stars_repo_head_hexsha": "0beb058df9e1bda06c3935189cee30d7ff959d40", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
/** * Copyright (c) 2017 Melown Technologies SE * * 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 notice, * this list of conditions and the f...
{"hexsha": "644d55142f432bc919242c6fbd5c4fa1d899dec0", "size": 10436, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "geometry/detail/parse-obj.hpp", "max_stars_repo_name": "Melown/libgeometry", "max_stars_repo_head_hexsha": "cfeba420776193b3daf12b1926c4762334bf572b", "max_stars_repo_licenses": ["BSD-2-Clause"], "...
# -*- coding: utf-8 -*- """ =============================================================================== petsc: A class for solving sparse linear systems using petsc =============================================================================== """ from openpnm.core import Base import scipy as sp import sys # Chec...
{"hexsha": "12f501789c151e167c9842c7534e316c3d319e17", "size": 9775, "ext": "py", "lang": "Python", "max_stars_repo_path": "openpnm/utils/petsc.py", "max_stars_repo_name": "rguan-uoft/OpenPNM", "max_stars_repo_head_hexsha": "b3873d35270b0acaad019264368d0055c677d159", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# Copyright (c) 2019, NVIDIA 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 t...
{"hexsha": "9220f9edfe15bccced309b7682846245e3a2d463", "size": 5809, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/cuml/test/test_kneighbors_classifier.py", "max_stars_repo_name": "levsnv/cuml", "max_stars_repo_head_hexsha": "94a48421b6dc4fac112c329b2fe9c3688c5feb98", "max_stars_repo_licenses": ["Apache...
from __future__ import print_function import cv2 import numpy as np class FaceDB(object): ''' Face DataBase. To store, face id / feature vector, image list, face box and points. ''' def __init__(self, db_path): ''' Initialization ''' # person's feature, (P x (N+1)) ...
{"hexsha": "75192b9debdc84ffcb9e9826880e71562e5b846b", "size": 3552, "ext": "py", "lang": "Python", "max_stars_repo_path": "deploy/face_db.py", "max_stars_repo_name": "samson-wang/insightface", "max_stars_repo_head_hexsha": "8c6523fd671564842928af70117b1c46e2238204", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
SYNC IMAGES (1) sync images (*, STAT=stat_var, ERRMSG=err_var) end
{"hexsha": "9c7b41656eb5085b7d007e500d909bfca9265d5a", "size": 73, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/nonsmoke/functional/CompileTests/Fortran_tests/experimental_frontend_tests/R1166-F2018.f90", "max_stars_repo_name": "ouankou/rose", "max_stars_repo_head_hexsha": "76f2a004bd6d8036bc24be2c566...
[STATEMENT] lemma fdia_split: "|x\<rangle> y = d z \<cdot> |x\<rangle> y + ad z \<cdot> |x\<rangle> y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. |x\<rangle> y = d z \<cdot> |x\<rangle> y + ad z \<cdot> |x\<rangle> y [PROOF STEP] by (metis mult_onel ans3 distrib_right ads_d_def)
{"llama_tokens": 128, "file": "KAD_Antidomain_Semiring", "length": 1}
[STATEMENT] lemma embed_embedS_iff_not_iso: assumes "embed r r' f" shows "embedS r r' f = (\<not> iso r r' f)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. embedS r r' f = (\<not> iso r r' f) [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: embed r r' f goal (1 subgoal): 1. embedS r r' f = (\<not...
{"llama_tokens": 272, "file": null, "length": 3}
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # 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 appli...
{"hexsha": "2a469418e064c5c97e6050c0514917f8f064a38b", "size": 4324, "ext": "py", "lang": "Python", "max_stars_repo_path": "lite/tests/unittest_py/op/test_uniform_random_op.py", "max_stars_repo_name": "714627034/Paddle-Lite", "max_stars_repo_head_hexsha": "015ba88a4d639db0b73603e37f83e47be041a4eb", "max_stars_repo_lice...
\section{The derivation of the ZOGY difference image} % \par In this document, we study some practical issues of performing the ZOGY subtraction and its relation to the Alard--Lupton (AL) method \citep{AL1998} combined with the decorrelation afterburner. We assume that the reader is somewhat familiar with the Zackay--O...
{"hexsha": "5a8f0757b7963d6e9de838f2bc81c9f5ef94b97e", "size": 43595, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "zogy_main.tex", "max_stars_repo_name": "lsst-dm/dmtn-179", "max_stars_repo_head_hexsha": "bf38556421c558aebf91f190ffae5193a5688767", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count": nul...
#!/usr/bin/env python3 import argparse, os, imageio, sys, tfcv, semantic_meshes, yaml import tensorflow as tf import numpy as np from tqdm import tqdm from plyfile import PlyData, PlyElement from collections import defaultdict from distinctipy import distinctipy from columnar import columnar import tinypl as pl import...
{"hexsha": "347def02798f62ad71189e1b8463ccdfe54f4214", "size": 19341, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval-scannet/eval_scannet.py", "max_stars_repo_name": "fferflo/semantic-meshes", "max_stars_repo_head_hexsha": "bfab5a9db268e911e9bf29eabba532fc2d4d8767", "max_stars_repo_licenses": ["MIT"], "max...
/** * This file is part of LSD-SLAM. * * Copyright 2013 Jakob Engel <engelj at in dot tum dot de> (Technical University of Munich) * For more information see <http://vision.in.tum.de/lsdslam> * * LSD-SLAM is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as ...
{"hexsha": "68ef5516877971dac4cf57694a618de2e6f72e3b", "size": 15765, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/ao_pkg/src/util/Undistorter.cpp", "max_stars_repo_name": "Engietoday/ralph", "max_stars_repo_head_hexsha": "f5e4134bf142cb2ab0a8d7f7a3506bff88a11911", "max_stars_repo_licenses": ["Apache-2.0"],...
#include <cmath> #include <cstdlib> #include <iostream> #include <sstream> #include <string> #include <vector> #include <fstream> #include <sys/time.h> #include "GameState.h" #include "Player.h" #include "Config.h" #include "DoTurn.h" #include "Log.h" #include <boost/foreach.hpp> #define foreach BOOST_FOREACH #ifdef ...
{"hexsha": "a4395cf83b09c22090269ab66d4229d6393e5ff9", "size": 8697, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/MyBot.cc", "max_stars_repo_name": "sigh/Planet-Wars", "max_stars_repo_head_hexsha": "7855ea11143ac97c32cd13bcac42d212c8ed3c30", "max_stars_repo_licenses": ["Apache-1.1"], "max_stars_count": null,...
@testset "species" begin amon = Monomer(; id = 1, vol = 2.0) bmon = Monomer(; id = 2, vol = 1.0) point = Point(amon) @test point.Nref ≈ 2.0 chain = Homopolymer(bmon, 100, 1.0, 200) @test chain.Nref ≈ 100.0 chain = Diblock(amon, bmon, 100, 0.25, 1.0, 1.0, 200) @test chain.f_block[1] ≈ 0.4 @test c...
{"hexsha": "e11df8b89bb356ed5685c55a53ca6c48b47a54b5", "size": 514, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_species.jl", "max_stars_repo_name": "sfriedowitz/PolyFields.jl", "max_stars_repo_head_hexsha": "e72fdce603050be30bccea654992d5f0f1d029fa", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[GOAL] x : ℝ hx : 0 < x ⊢ HasStrictDerivAt log x⁻¹ x [PROOFSTEP] have : HasStrictDerivAt log (exp <| log x)⁻¹ x := (hasStrictDerivAt_exp <| log x).of_local_left_inverse (continuousAt_log hx.ne') (ne_of_gt <| exp_pos _) <| Eventually.mono (lt_mem_nhds hx) @exp_log [GOAL] x : ℝ hx : 0 < x this : HasStrictDerivAt lo...
{"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Log.Deriv", "llama_tokens": 14354}
### dropout has been removed in this code. original code had dropout##### ## https://github.com/kuangliu/pytorch-cifar/blob/master/models/resnet.py '''ResNet in PyTorch. For Pre-activation ResNet, see 'preact_resnet.py'. Reference: [1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun Deep Residual Learning for Ima...
{"hexsha": "d20c2f23eb0f3005ec3a1f02686649186ba41abb", "size": 11064, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/preresnet.py", "max_stars_repo_name": "chandar-lab/PatchUp", "max_stars_repo_head_hexsha": "31133f358c2b59536eeb5ef304acec2b1436ec23", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np import scipy as sp def bicubic(source_img, scaling_factor): source_img_size1 = source_img.shape[0] source_img_size2 = source_img.shape[1] x = np.array(list(range(0, int(source_img_size1)))).astype(float) y = np.array(list(range(0, int(source_img_size2)))).astype(float) int_img =...
{"hexsha": "29ad95c1b73ac9661a90fd788ead030eb9b40478", "size": 688, "ext": "py", "lang": "Python", "max_stars_repo_path": "GSRPT_TOPO/baselines/baselines.py", "max_stars_repo_name": "Alina-Mingchi/TOPO_final", "max_stars_repo_head_hexsha": "a8983006929b60bda0ed1d2e9a9130427b628431", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np import pickle import matplotlib.pyplot as plt import random import argparse import os import h5py normal_scale = 0.3 normal_min = 0.2 bbox = [-2,2] L = bbox[1] - bbox[0] def gen_cube(dim): p_min = np.random.rand(dim) * L + bbox[0] p_max = p_min + np.random.rand(dim) * L / 2 return (p_mi...
{"hexsha": "d487e99c98d0f6dfcbeca3cd62cf9b8af4988891", "size": 1177, "ext": "py", "lang": "Python", "max_stars_repo_path": "cwb/tests/comparison/cube/data_generator.py", "max_stars_repo_name": "lingxiaoli94/CWB", "max_stars_repo_head_hexsha": "96bce8c82a7ec39fe730ef6ac372e52c6fadf70f", "max_stars_repo_licenses": ["MIT"...
import pandas as pd from pprint import pprint import os import matplotlib.pyplot as plt import numpy as np from sklearn.preprocessing import LabelBinarizer, LabelEncoder from sklearn.pipeline import Pipeline,FeatureUnion from sklearn.preprocessing import StandardScaler, OneHotEncoder, MultiLabelBinarizer from sklearn.b...
{"hexsha": "ea3869f64794041e56775ca5eebb30be83f41f5c", "size": 5921, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/train_model.py", "max_stars_repo_name": "dakoller/home_credit_kaggle", "max_stars_repo_head_hexsha": "4309500ae69ad43733ac98eec087b8613d1ebe89", "max_stars_repo_licenses": ["MIT"], "max...
"""Generate language using XLNet""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import numpy as np import os import re from tqdm import tqdm import absl.logging as _logging # pylint: disable=unused-import import tensorflow as tf import ...
{"hexsha": "237c1c8e15086e3dde88c3f91572e89f874a2f6d", "size": 25554, "ext": "py", "lang": "Python", "max_stars_repo_path": "language_generation.py", "max_stars_repo_name": "sparthib/XLnet-gen", "max_stars_repo_head_hexsha": "c56c33b1496919711cf2d002e6feb418d7af08f9", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
from copy import deepcopy from typing import Any, Sequence, Tuple, Union from astropy.coordinates import Angle, SkyCoord from astropy.visualization.wcsaxes import WCSAxes from astropy.wcs import WCS from matplotlib.patches import PathPatch from matplotlib.path import Path from imephu.annotation import Annotation from...
{"hexsha": "d7d47a59aceff0360ac437e4b268ac119b2417f2", "size": 4428, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/imephu/annotation/general/line_path.py", "max_stars_repo_name": "saltastroops/imephu", "max_stars_repo_head_hexsha": "0c302a73d01fe3ad018e7adf4b91e0beaecc6709", "max_stars_repo_licenses": ["MI...
import numpy as np import torch from torch.nn.functional import softmax def compute_rollout_attention(all_layer_matrices, start_layer=0): # adding residual consideration num_tokens = all_layer_matrices[0].shape[1] eye = torch.eye(num_tokens).to(all_layer_matrices[0].device) all_layer_matrices = [all_la...
{"hexsha": "4091dc19620db8bad04488e77b474e26125c59c2", "size": 16298, "ext": "py", "lang": "Python", "max_stars_repo_path": "DETR/modules/ExplanationGenerator.py", "max_stars_repo_name": "Fostereee/Transformer-MM-Explainability", "max_stars_repo_head_hexsha": "6dc4925b83a38e39069369da599b11d548128eb5", "max_stars_repo_...
import numpy as np class PotArray: def __init__(self,variables,matrix): self.variables = variables self.matrix = matrix def get_variables(self): return self.variables def get_probability(self): return self.matrix
{"hexsha": "5a86c11dad9001be0d231776e31c7f6cb5a1ff74", "size": 271, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pot_array.py", "max_stars_repo_name": "CharlieShelbourne/algos_practice", "max_stars_repo_head_hexsha": "bf32a739a9ab88f177461057fededb42e2d7fe10", "max_stars_repo_licenses": ["MIT"], "max_star...
from functools import partial from typing import Optional from flax import linen as nn from jax import numpy as jnp from . import TalkingHeadsBlock from .. import RotaryPositionalEmbedding class AttentionBlock(nn.Module): num_heads: int head_ch: Optional[int] = None out_ch: Optional[int] = None talk...
{"hexsha": "8d3f9d8fe5f0208914a84d911e87721c0fa97f4b", "size": 2520, "ext": "py", "lang": "Python", "max_stars_repo_path": "clap/layers/attentions/attention.py", "max_stars_repo_name": "cfoster0/CLAP", "max_stars_repo_head_hexsha": "6414377dc5a461a35a5c75320a4c5effa83df6ae", "max_stars_repo_licenses": ["BSD-3-Clause"],...
[STATEMENT] lemma cl_lcl: assumes "compatible_l R1 R2" shows "locally_compatible_l R1 R2 A B C" [PROOF STATE] proof (prove) goal (1 subgoal): 1. locally_compatible_l R1 R2 A B C [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: compatible_l R1 R2 goal (1 subgoal): 1. locally_compatible_l R1 R2 A B...
{"llama_tokens": 284, "file": "Weighted_Path_Order_Relations", "length": 3}