text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
export DeterministicDistributionModel, get_states, get_actions import ReinforcementLearningEnvironments: observation_space, action_space """ DeterministicDistributionModel(table::Array{Vector{NamedTuple{(:nextstate, :reward, :prob),Tuple{Int,Float64,Float64}}}, 2}) Store all the transformations in the `table` fi...
{"hexsha": "11ced4572d8fb6d2bb83f84498d1a189be634694", "size": 763, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/components/environment_models/deterministic_distribution_model.jl", "max_stars_repo_name": "UnofficialJuliaMirror/ReinforcementLearning.jl-158674fc-8238-5cab-b5ba-03dfc80d1318", "max_stars_repo_...
# -*- coding: utf-8 -*- """ Created on Tue Mar 29 12:45:00 2022 Author: Adam Coxson, PhD student, University of Liverpool Department of Chemistry, Materials Innovation Factory, Levershulme Research Centre Project: Delta ML Zindo Module: FNN.py Dependancies: Sklearn library, Pandas, Scipy, all other libraries are...
{"hexsha": "3e5fe1ca87d093d0420845c2115ba57b4086eed6", "size": 9449, "ext": "py", "lang": "Python", "max_stars_repo_path": "FFNN.py", "max_stars_repo_name": "marcosdelcueto/DeltaML_excited_states", "max_stars_repo_head_hexsha": "aeb1f356e76ebf09334cba75f7d6da4b4020d4db", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import math import cmath import warnings #import scipy.constants as physical_constants # Container of physical constants which might be of use import numpy as np from Material import Material class MaterialSolid(Material): """ Solid material class """ __name__ = 'solid' name__ = 'Solid' ...
{"hexsha": "488f839167b1a579f7172043e8f0d1a29a5b9f63", "size": 6651, "ext": "py", "lang": "Python", "max_stars_repo_path": "Sea/model/materials/MaterialSolid.py", "max_stars_repo_name": "FRidh/Sea", "max_stars_repo_head_hexsha": "b474e93a449570a9ba3b915c4d80f814feee2545", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
import numpy from gensim import models, corpora from gensim.similarities import MatrixSimilarity from nltk.corpus import stopwords as pw from nltk.tokenize import sent_tokenize from nltk.tree import * from spellchecker import SpellChecker from stanfordcorenlp import StanfordCoreNLP from src.config import STANFORDCOREN...
{"hexsha": "990e9df175ccc3f3bd481e0087e5aafdbb0b95e4", "size": 5888, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/feature/iku.py", "max_stars_repo_name": "wangqi1996/Essay_Scoring", "max_stars_repo_head_hexsha": "1194ad6841de3d95cd7e3733f7be152f02e4d93c", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
''' ----------- Example_14 -------------- Load a turbine, tune a controller with open loop control commands ------------------------------------- In this example: - Load a turbine from OpenFAST - Tune a controller - Write open loop inputs - Run simple simulation with open loop control ''' # Python Modules imp...
{"hexsha": "f91d4de5f847d8fcb09421395f3ad05e400a4092", "size": 5295, "ext": "py", "lang": "Python", "max_stars_repo_path": "Examples/example_14.py", "max_stars_repo_name": "ptrbortolotti/ROSCO", "max_stars_repo_head_hexsha": "5d201855f57d0773ad8304349257db19c6db6af2", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
## same as the analytic case but with the fft import numpy as np import matplotlib.pyplot as plt from numpy.linalg import cond import cmath; from scipy import linalg as LA from numpy.linalg import solve as bslash import time from convolution_matrices.convmat1D import * from RCWA_1D_functions.grating_fft.gratin...
{"hexsha": "aa207cf485bf01dae3e9ad7dedc77d78268995c4", "size": 10672, "ext": "py", "lang": "Python", "max_stars_repo_path": "anisotropy_explorations/1D_Longitudinal_Anisotropy.py", "max_stars_repo_name": "zhaonat/RCWA", "max_stars_repo_head_hexsha": "a28fdf90b5b5fc0fedacc8bb44a0a0c2f2a02143", "max_stars_repo_licenses":...
import collections import time import numpy as np from evalRnn import test, testCaptionedImages from ReadCOCOUtil import ReadCOCOUtil import gc import ipdb COCO = ReadCOCOUtil() trainingImageIds = COCO.imgIdsTrain validationImageIds = COCO.imgIdsVal def validateModel(validationX, validationY, model, epoch, loss_acc):...
{"hexsha": "9f135db6aef53638a05185821938ef2641aa50a0", "size": 1812, "ext": "py", "lang": "Python", "max_stars_repo_path": "training/trainOnCaptionedImages.py", "max_stars_repo_name": "dwright37/generative-concatenative-image-captioner", "max_stars_repo_head_hexsha": "2bb257d4791e362e42a30bf0e4ca32e84f80d942", "max_sta...
import numpy as np from bolero.wrapper import CppBLLoader from bolero.environment import ContextualEnvironment from bolero.utils import check_random_state from time import sleep class ThrowEnvironment(ContextualEnvironment): """Extract the relevant feedbacks from the SpaceBot environment.""" def __init__(self...
{"hexsha": "730869418fbda1901033c43426555ce71fae924f", "size": 2403, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluation/throw_environment.py", "max_stars_repo_name": "rock-learning/approxik", "max_stars_repo_head_hexsha": "877d50d4d045457593a2fafefd267339a11de20f", "max_stars_repo_licenses": ["BSD-3-Clau...
module Lens # Lens laws: # get (put x y) == x # put x (put y z) == put x z # put (get x) y == y export test_lens_put_get, test_lens_put_put, test_lens_get_put function test_lens_put_get(get, put, containers, vals) passed = true for x in vals for y in containers passed &= get(put(x, y)) == x end ...
{"hexsha": "82555bc1882372eb738e07d4916afc4135081ded", "size": 709, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/lens.jl", "max_stars_repo_name": "UnofficialJuliaMirror/Omega.jl-1af16e33-887a-59b3-8344-18f1671b3ade", "max_stars_repo_head_hexsha": "9dbaa559991a728e8239767d9627419e41037847", "max_stars_repo...
""" Code to extract a box-like region, typically for another modeler to use as a boundary contition. In cases where it gets velocity in addition to the rho-grid variables the grid limits mimic the standard ROMS organization, with the outermost corners being on the rho-grid. Job definitions are in LO_user/extract/box/...
{"hexsha": "5e03e280ee3d294abc4e24b53e89a4785246d493", "size": 12080, "ext": "py", "lang": "Python", "max_stars_repo_path": "extract/box/extract_box.py", "max_stars_repo_name": "parkermac/LO", "max_stars_repo_head_hexsha": "09e0197de7f2166bfa835ec62018b7a8fbfa7379", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
[STATEMENT] lemma smc_Funct_Comp_vsv[intro]: "vsv (smc_Funct \<alpha> \<AA> \<BB>\<lparr>Comp\<rparr>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. vsv (smc_Funct \<alpha> \<AA> \<BB>\<lparr>Comp\<rparr>) [PROOF STEP] unfolding smc_Funct_Comp [PROOF STATE] proof (prove) goal (1 subgoal): 1. vsv (\<lambda>\<GG>\<...
{"llama_tokens": 258, "file": "CZH_Elementary_Categories_czh_ecategories_CZH_SMC_FUNCT", "length": 2}
import logging log = logging.getLogger(__name__) from math import ceil from numpy import linspace import struct from spacq.interface.resources import Resource from spacq.tool.box import Synchronized from ..abstract_device import AbstractDevice, AbstractSubdevice from ..tools import str_to_bool, quantity_wrapped, qua...
{"hexsha": "45375e428bdc84b80771a9e6942484c260061e1c", "size": 10057, "ext": "py", "lang": "Python", "max_stars_repo_path": "spacq/devices/tektronix/dpo7104.py", "max_stars_repo_name": "zachparrott/SpanishAcquisitionIQC", "max_stars_repo_head_hexsha": "dd2e683c4cbc5fa420226d545077d94bf2dcb46b", "max_stars_repo_licenses...
from misc import parallel, timing import decomposition from decomposition import NotDecomposableError import networkx as nx from datetime import datetime # analysis of graphs on small numbe rof vertices # we generate all possible graphs on n vertices # and check how many are odd decomposable def powerset(iterable, ch...
{"hexsha": "34cf12a66c11af42e9ec904d77db10e59cb4cbc2", "size": 2522, "ext": "py", "lang": "Python", "max_stars_repo_path": "decompositon/small_graphs.py", "max_stars_repo_name": "lodrantl/odd-decomposition", "max_stars_repo_head_hexsha": "11b51f72689d9912b6c31585c4d26aff3e384703", "max_stars_repo_licenses": ["Apache-2....
import numpy as np from sklearn.linear_model import LinearRegression def add_trend_feature(arr, abs_values=False): idx = np.array(range(len(arr))) if abs_values: arr = np.abs(arr) lr = LinearRegression() lr.fit(idx.reshape(-1, 1), arr) return lr.coef_[0] def classic_sta_lta(x, length_sta...
{"hexsha": "552802e00e5363994eded3df59e25a9984439767", "size": 1133, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/features/feature_utils.py", "max_stars_repo_name": "sbussmann/earthquake-prediction", "max_stars_repo_head_hexsha": "ba1e0f1a29cab40c1e659ed372f097b78e8f8483", "max_stars_repo_licenses": ["MIT...
# MTRN4230 Robotics # Group 6 Assignment # Robot Motion Module # # Authors: Samir Mustavi & Matthew Bourke # Date: 27.07.2020 # Description: ROS module for providing actuation functions to the UR5 robot arm in the simulated Gazebo environment. # Desired x, y, z coordinates are received from the Image Proce...
{"hexsha": "10483409d6a3cf67bcf83d24a1a0e5e5808aefe6", "size": 10234, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils/kinematics.py", "max_stars_repo_name": "JimmeeX/ur5_t2_4230", "max_stars_repo_head_hexsha": "ae64c15a5c8040b5f3f5ba19710427c406607973", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" TODO ---- More than one plot """ from string import Template from os.path import join import os import pandas as pd import numpy as np def describe2latex(study_info, stats): """Function to translate the descriptions of the variables to latex. TODO ---- - crete a plot folder - get paths to s...
{"hexsha": "5f50840f37018377e238f96df6af5808875894a3", "size": 14276, "ext": "py", "lang": "Python", "max_stars_repo_path": "FirmsLocations/IO/output_to_latex.py", "max_stars_repo_name": "tgquintela/Firms_locations", "max_stars_repo_head_hexsha": "476680cbc3eb1308811633d24810049e215101a0", "max_stars_repo_licenses": ["...
Require Export Iron.Language.SimpleData.Ty. (* Data Constructors *) Inductive datacon : Type := | DataCon : nat -> datacon. Hint Constructors datacon. Fixpoint datacon_beq t1 t2 := match t1, t2 with | DataCon n1, DataCon n2 => beq_nat n1 n2 end. (* Definitions. Carries meta information about type a...
{"author": "discus-lang", "repo": "iron", "sha": "75c007375eb62e1c0be4b8b8eb17a0fe66880039", "save_path": "github-repos/coq/discus-lang-iron", "path": "github-repos/coq/discus-lang-iron/iron-75c007375eb62e1c0be4b8b8eb17a0fe66880039/done/Iron/Language/SimpleData/Def.v"}
# -*- coding: utf-8 -*- """generate_attack_files.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1CDyCghmEMadl1NHbQvvXXFEsQHckKUtH """ # Commented out IPython magic to ensure Python compatibility. # %cd /content/drive/MyDrive/attacks/ !ls # load...
{"hexsha": "5fd5b95dc55cdd354765c1cba41fc59ead706757", "size": 13008, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate_attack_files.py", "max_stars_repo_name": "sert121/shilling_a_and_d", "max_stars_repo_head_hexsha": "48ab1f2e48c1e13f3b19ab897b3372638d9d4eb3", "max_stars_repo_licenses": ["MIT"], "max_st...
module class_Stack type :: link integer :: i type (link), pointer :: previous end type link type, public :: StackIterator integer, private :: index type(link), pointer, private :: current contains procedure :: create => stack_iterator_create procedure :: next => stack_iterator_nex...
{"hexsha": "61825ec248d8e888e8248cd09cf4a56712af8c35", "size": 4145, "ext": "f08", "lang": "FORTRAN", "max_stars_repo_path": "src/Stack.f08", "max_stars_repo_name": "ironmerchant/dfs_cycles", "max_stars_repo_head_hexsha": "ff2245934fab82f24d8d309d210d37f90f733c58", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star...
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: Ampel-contrib-HU/ampel/contrib/hu/t0/XShooterFilter.py # License: BSD-3-Clause # Author: m. giomi <matteo.giomi@desy.de> # Date: 28.08.2018 # Last Modified Date: 24.11.2021 # Last Modified By: jnordin...
{"hexsha": "e8b760f7e6323bfb4f58f8cce1f844bc6b5c59bf", "size": 4730, "ext": "py", "lang": "Python", "max_stars_repo_path": "ampel/contrib/hu/t0/XShooterFilter.py", "max_stars_repo_name": "mafn/Ampel-HU-astro", "max_stars_repo_head_hexsha": "93cf14874439c1f5d44622407fceff69eef7af2e", "max_stars_repo_licenses": ["BSD-3-C...
(* Title: Environments.thy Author: Florian Kammuller and Henry Sudhof, 2008 *) theory Environments imports Main begin subsection {* Type Environments*} text{*Some basic properties of our variable environments.*} (* We use a wrapped map and an error element *) datatype 'a environment = Env "(string ...
{"author": "Josh-Tilles", "repo": "AFP", "sha": "f4bf1d502bde2a3469d482b62c531f1c3af3e881", "save_path": "github-repos/isabelle/Josh-Tilles-AFP", "path": "github-repos/isabelle/Josh-Tilles-AFP/AFP-f4bf1d502bde2a3469d482b62c531f1c3af3e881/thys/Locally-Nameless-Sigma/preliminary/Environments.thy"}
Some local artists of renown include: (listed alphabetically) Jed Alexander Artist and illustrator. You can see his work at http://jedalexander.com http://www.natsoulas.com/html/artists/robertArneson/robertArneson.html Robert Arneson Former Art Department Art Faculty at UCD http://www.verisimilitudo.com/arneson...
{"hexsha": "3e49db84a31432d784bf90e21bb801303862efc0", "size": 4958, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Local_Artists.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# In order to understand how the code works, it is a good idea to check the # final section of the file that starts with # if __name__ == '__main__' # # Your task is essentially to replace all the parts marked as TODO or as # instructed through comments in the functions, as well as the filenames # and labels in the m...
{"hexsha": "06b82761abbad1af601d433894a876efe7428959", "size": 6988, "ext": "py", "lang": "Python", "max_stars_repo_path": "Exercice 2/properties_of_er_networks.py", "max_stars_repo_name": "Yanko96/CS-E5740-Complex-Networks", "max_stars_repo_head_hexsha": "708af24230218b77f1196c1a0ec5885165491a85", "max_stars_repo_lice...
from deepface import DeepFace import pandas as pd import numpy as np import matplotlib.pyplot as plt import os.path as osp import os import logging logging.basicConfig(filename='example.log', level=logging.DEBUG) df = pd.read_excel('second/sample_identity_gallery_probe.xlsx') galleries = df[df['proposed Gallery/Prob...
{"hexsha": "fbcefad986174bedba148e89951ddf84b21bf42a", "size": 1182, "ext": "py", "lang": "Python", "max_stars_repo_path": "find.py", "max_stars_repo_name": "milad-4274/deepface", "max_stars_repo_head_hexsha": "bde16b2b79946f93c2934d2259daa6444defa248", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
% !TEX root = ../thesis.tex %%% Local Variables: %%% mode: latex %%% TeX-master: "thesis" %%% End: \chapter{Chapter Title}\label{chap:chapter_name} Chapter introduction goes here. \section{Section heading}\label{section:section_name} Section description goes here. And if I want to include a graphic, I can use th...
{"hexsha": "56181e8f8457b2fa0acb259133c9c20d59e77ae4", "size": 1641, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "thesis-template/template/chapters/chapter1.tex", "max_stars_repo_name": "igorbrigadir/insight-templates", "max_stars_repo_head_hexsha": "8722fc7741181fae9fcfa45bce3fc28382729108", "max_stars_repo_li...
#include <string> #include <gtest/gtest.h> #include "ros/ros.h" #include "nav_msgs/Odometry.h" #include "geometry_msgs/PoseWithCovarianceStamped.h" #include <boost/thread.hpp> using namespace ros; int g_argc; char** g_argv; typedef boost::shared_ptr<geometry_msgs::PoseWithCovarianceStamped const> EkfConstPtr; cla...
{"hexsha": "ba7866f69e65ebcc765f9a83758f995ee4255d2c", "size": 1331, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "robot_pose_ekf/test/test_robot_pose_ekf_zero_covariance.cpp", "max_stars_repo_name": "SNU-SF4/viwo", "max_stars_repo_head_hexsha": "8ce0757617b4204e1a367552be7fe6a98ff9363f", "max_stars_repo_license...
# Copyright (c) SenseTime. All Rights Reserved. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import torch as t import torch.nn as nn import torch.nn.functional as F from pysot.core.config import cfg from pysot.model...
{"hexsha": "9c635f05bc5375071108ee16f8720c395bc52567", "size": 5347, "ext": "py", "lang": "Python", "max_stars_repo_path": "pysot/models/utile/model_builder.py", "max_stars_repo_name": "vision4robotics/TCTrack", "max_stars_repo_head_hexsha": "1a094f108e09b40b84e6fa0fa06fc6ae0f53ae54", "max_stars_repo_licenses": ["Apach...
## ## A kind of meta-loader to import data if not already in the workspace ## This lets you run each part of the analysis separately rather than all in a batch, should you prefer ## if (!exists("dyads")) source("init.r") if (!exists("common_theme")) source("init plots.r")
{"hexsha": "7d2aab0273a46e2dc547fd7eee694460b788cc27", "size": 278, "ext": "r", "lang": "R", "max_stars_repo_path": "init if necessary.r", "max_stars_repo_name": "matthewgthomas/hierarchies-gifts", "max_stars_repo_head_hexsha": "7855e25e974b50c4c42d966ccd8ca75b3002f241", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import argparse import joblib import json import numpy as np import os import pandas as pd import warnings from itertools import chain from scipy.io import mmread from sklearn.pipeline import Pipeline from sklearn.metrics._scorer import _check_multimetric_scoring from sklearn.model_selection._validation import _score f...
{"hexsha": "e0962b6c57e7fd2d8b3c35d12081ec1680b1b765", "size": 17734, "ext": "py", "lang": "Python", "max_stars_repo_path": "galaxy_ml/tools/keras_train_and_eval.py", "max_stars_repo_name": "bgruening/Galaxy-ML-1", "max_stars_repo_head_hexsha": "47514940c7ac39d6ca1d595b58b5d1311b3f3840", "max_stars_repo_licenses": ["MI...
from Results import Results from Channel import Channel from Message import Image_message from CorectionCodes import CorectionCodes from Generator import Generator import numpy as np import komm as komm test_image_file_name = "image.jpg" saved_test_image = "save_image.jpeg" results = Results() results_file_name = 'ha...
{"hexsha": "2e7282ba60f28cf4921ffd16ef7556b5ef0de3fc", "size": 11003, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "tomekrzymyszkiewicz/forward-error-correction", "max_stars_repo_head_hexsha": "fba72896b77cd4f5dee79648e3ecbcc1c827e95c", "max_stars_repo_licenses": ["MIT"], "max...
from numpy import genfromtxt import matplotlib.pyplot as plt import mpl_finance import numpy as np import uuid import matplotlib # Input your csv file here with historical data ad = genfromtxt("../financial_data/BPI-copy.csv", delimiter=",", dtype=str) pd = ad buy_dir = "../data/train/buy/" sell_dir = "../data/train...
{"hexsha": "2b0ccf0474eece94bb0ca3f7dd102441ee1350a8", "size": 3479, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/backupSingle.py", "max_stars_repo_name": "accordinglyto/dferte", "max_stars_repo_head_hexsha": "d4b8449c1633973dc538c9e72aca5d37802a4ee4", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* ...
{"author": "coq-contribs", "repo": "cats-in-zfc", "sha": "aa7067a8d0a243caec7288dffd1e0a86c65ece0e", "save_path": "github-repos/coq/coq-contribs-cats-in-zfc", "path": "github-repos/coq/coq-contribs-cats-in-zfc/cats-in-zfc-aa7067a8d0a243caec7288dffd1e0a86c65ece0e/fiprod.v"}
#!/usr/bin/env python import matplotlib.pyplot as plt import matplotlib.animation as animation import math from matplotlib import style from Points import BuildPath from std_msgs.msg import String import rospy import tf import time import datetime ## import numpy as np from numpy.linalg import inv,pinv from threading i...
{"hexsha": "7cda57294d9f20248bceb65d906c2f537eae0803", "size": 11144, "ext": "py", "lang": "Python", "max_stars_repo_path": "Roundabouts/DynamicMerging.py", "max_stars_repo_name": "NKdeveloper/Autonomous-Vehicle-Research", "max_stars_repo_head_hexsha": "93c262a9ae9e6246b7f0d74023cfaadb4ee71eb7", "max_stars_repo_license...
import os import sys from statsmodels.datasets import get_rdataset from numpy.testing import assert_ cur_dir = os.path.dirname(os.path.abspath(__file__)) def test_get_rdataset(): # smoke test if sys.version_info[0] >= 3: #NOTE: there's no way to test both since the cached files were #created w...
{"hexsha": "f3e13fbd2429cb132d89ef667c1533479840b149", "size": 655, "ext": "py", "lang": "Python", "max_stars_repo_path": "statsmodels/datasets/tests/test_utils.py", "max_stars_repo_name": "toobaz/statsmodels", "max_stars_repo_head_hexsha": "5286dd713a809b0630232508bf9ad5104aae1980", "max_stars_repo_licenses": ["BSD-3-...
# -*- coding: utf-8 -*- ''' A Convolutional Neural Network implementation example using Tensorflow Library. The example uses the mnist data in kaggle https://www.kaggle.com/c/digit-recognizer Author:sfailsthy ''' # Libraries import tensorflow as tf import numpy as np import csv # setting parameters learning_rate=1e-4...
{"hexsha": "566fdbe5189bccef6c52203fb6ecceb50215e0f2", "size": 7036, "ext": "py", "lang": "Python", "max_stars_repo_path": "mnist/mnist_with_cnn.py", "max_stars_repo_name": "sfailsthy/kaggle", "max_stars_repo_head_hexsha": "4e03042278e891a99e774a0e0c5a404d62cdfc13", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
# Test script to test solver with JuMP on a closest correlation matrix problem using COSMO, JuMP, LinearAlgebra, SparseArrays, Test, Random rng = Random.MersenneTwister(12345); # Original problem has the following format: # min_X 1/2 ||X-C||^2 # s.t. Xii = 1 # X ⪴ 0 # create a random test matrix C n = 8 ...
{"hexsha": "e296832d7de356c125a9ee029226a13454bae3d4", "size": 1739, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/closest_correlation_matrix.jl", "max_stars_repo_name": "UnofficialJuliaMirror/COSMO.jl-1e616198-aa4e-51ec-90a2-23f7fbd31d8d", "max_stars_repo_head_hexsha": "f90cc6218d86db2fcd47b7ca533df2a...
using OpenVR # include(joinpath((@__DIR__),"..","src","OpenVR_C.jl")) # using Main.OpenVR_C # const OpenVR = OpenVR_C # unfortunatley the C-API is not maintained by Valve … and the currently distributed version does not provide all necessary function pointers in the C-function-tables # https://github.com/ValveSoftw...
{"hexsha": "781623a02822a973ce7dbfa8a54606673866023f", "size": 79804, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/hellovr_opengl_julia.jl", "max_stars_repo_name": "mchristianl/OpenVR.jl", "max_stars_repo_head_hexsha": "55c1a115e518d1176ab885478d20e3dbb324a199", "max_stars_repo_licenses": ["MIT"], "max_st...
import torchvision import torch import numpy as np def get_mnist_batcher(batch_size): """Downloads MNIST and stores in the data folder in case it is not available, and builds a data loader based batcher of the specified size Args: batch_size (int): size of the minibatch Returns: torc...
{"hexsha": "bca06256f758a8ba579feb9b3d8f79516f70bbc7", "size": 723, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data.py", "max_stars_repo_name": "ivallesp/VAE", "max_stars_repo_head_hexsha": "57340b02ee7b07e7e1e236c8a48aa7bd7fab364b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star...
# coding: utf-8 from __future__ import division, print_function, unicode_literals, absolute_import """ This module is a wrapper for AntechamberRunner which generates force field files or a specified molecule using gaussian output file as input. Currently, the AntechamberRunner class does not work properly. """ import...
{"hexsha": "22dc7c7f0b08a9282f0e2a7cc968ae8b17e75583", "size": 29914, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymatgen/io/ambertools.py", "max_stars_repo_name": "mmbliss/pymatgen", "max_stars_repo_head_hexsha": "0d2e39bb6406d934c03e08919f2cd4dedb41bc22", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
[STATEMENT] lemma swap_rule [hoare_triple]: "i < length xs \<Longrightarrow> j < length xs \<Longrightarrow> <p \<mapsto>\<^sub>a xs> swap p i j <\<lambda>_. p \<mapsto>\<^sub>a list_swap xs i j>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>i < length xs; j < length xs\<rbrakk> \<Longrightarro...
{"llama_tokens": 163, "file": "Auto2_Imperative_HOL_Imperative_Arrays_Impl", "length": 1}
# -*- coding: utf-8 -*- """ Created on Wed Nov 11 13:48:41 2020 @author: Amir Moradi """ import cv2 import numpy as np def undistortion(img_1, img_2): h, w = img_1.shape[:2] Camera_L_Matrix = np.load("SmartCar/Calibration/matrices/matrix/Camera_L_Matrix.npy") Camera_R_Matrix = np.load("Smart...
{"hexsha": "f3ea4be195565fa932710c2775cd60dc9db1b2ef", "size": 1346, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utils/undistortion.py", "max_stars_repo_name": "Amirmoradi94/SmartCar", "max_stars_repo_head_hexsha": "4c0f17a6a98e6db46769787dc95d11e48b335488", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import inspect import numpy as np from numpy import testing # def PrintFrame(): # callerframerecord = inspect.stack() #[1] # 0 represents this line # print(callerframerecord[1]) # 1 represents line at caller # frame = callerframerecord[1][0] # print(frame) # info = ...
{"hexsha": "3c70f63edfd8e3e9bde13db6243a84cde60a9f04", "size": 1068, "ext": "py", "lang": "Python", "max_stars_repo_path": "ds_clean/test.py", "max_stars_repo_name": "swjz/DSClean", "max_stars_repo_head_hexsha": "1311ea373049f089b0b96e9913c02fe0c339dee4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from scipy.constants import golden mpl.rc("text", usetex=True) mpl.rc("font", family="serif") x = np.array([-1, -0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8, 1]) t = np.array([-4.9, -3.5, -2.8, 0.8, 0.3, -1.6, -1.3, 0.5, 2.1, 2.9, 5.6]) def...
{"hexsha": "8d7be49f3795ab46f2fc0c42edbf5728487d9d6f", "size": 1339, "ext": "py", "lang": "Python", "max_stars_repo_path": "extra/bsmalea-notes-1a/polynomial_regression.py", "max_stars_repo_name": "cookieblues/cookieblues.github.io", "max_stars_repo_head_hexsha": "9b570d83887eb2d6f92cfaa927a1adf136124a90", "max_stars_r...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * 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 appl...
{"hexsha": "a43e9c36bcf1b21dc3533c4ca7443e9c3f941d43", "size": 4915, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "thrift/test/reflection/FieldsTest.cpp", "max_stars_repo_name": "ahornby/fbthrift", "max_stars_repo_head_hexsha": "59dd614960da745e6a7b89c69c7aac77e0adf9b5", "max_stars_repo_licenses": ["Apache-2.0"]...
from quchem_ibm.IBM_experiment_functions import * import pickle import os import argparse import numpy as np def main(method_name): molecule_name='H2' ## Load input data base_dir = os.getcwd() data_dir = os.path.join(base_dir, 'Input_data') input_file = os.path.join(data_dir, 'H2_bravyi_kitaev_2_...
{"hexsha": "67251399861fd603b6553705254c7783c93c3540", "size": 2637, "ext": "py", "lang": "Python", "max_stars_repo_path": "old_projects/quchem_ibm/Experiments/H2_2_qubit_exp.py", "max_stars_repo_name": "AlexisRalli/VQE-code", "max_stars_repo_head_hexsha": "4112d2bba4c327360e95dfd7cb6120b2ce67bf29", "max_stars_repo_lic...
import os import csv import cv2 import numpy as np from sklearn.utils import shuffle def load_csv_data(log_file, data_dir, steering_correction = 0.25): image_filepaths = [] measurements = [] with open(log_file, 'r') as f: r = csv.reader(f) next(r) # skip the header ...
{"hexsha": "2b1748f4d2509c2159bcc7932408343a6e367c96", "size": 2143, "ext": "py", "lang": "Python", "max_stars_repo_path": "project/data.py", "max_stars_repo_name": "tnweiss/CarND-Behavioral-Cloning-P3", "max_stars_repo_head_hexsha": "dafff3f62f691954012a4a84364dee3a0706414a", "max_stars_repo_licenses": ["MIT"], "max_s...
module NeuroMetadata using NeuroCore.AnatomicalAPI using FieldProperties export EncodingDirection, encoding_names, freqdim, freqdim!, phasedim, phasedim!, slice_start, slice_start!, slice_end, slice_end!, slicedim, slicedim!, slice_duration, slice_duration!, ...
{"hexsha": "ae44195abbfe6601a232c9a16b2d745e3dbe3b65", "size": 1615, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/NeuroMetadata/NeuroMetadata.jl", "max_stars_repo_name": "SimonDanisch/NeuroCore.jl", "max_stars_repo_head_hexsha": "b5d9a85eec4817732bda9bfff87910fae6c7049b", "max_stars_repo_licenses": ["MIT"]...
#include "VMController.h" #include "CollabVM.h" #include "Database/VMSettings.h" #include <boost/asio.hpp> VMController::VMController(CollabVMServer& server, boost::asio::io_service& service, const std::shared_ptr<VMSettings>& settings) : server_(server), io_service_(service), settings_(settings), turn_timer_(serv...
{"hexsha": "64956660c24a1dfda6656bb32a8c67e6c6884bce", "size": 13779, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/VMControllers/VMController.cpp", "max_stars_repo_name": "FurryFan2003/collab-vm-server", "max_stars_repo_head_hexsha": "1b4b2e602dfe61a4502ab3cadcecc4106b5e766e", "max_stars_repo_licenses": ["A...
import isopy import pytest import isopy.toolbox as toolbox import numpy as np class Test_Inversion: def test_one(self): spike = isopy.array(pd104=1, pd106=0, pd108=1, pd110=0) spike = spike.normalise(1) self.compare_rudge_siebert('pd', spike, 1.6, 0.1, 0.5) self.compare_rudge_siebe...
{"hexsha": "b756ad875f33a35b83ff6ca0ea7fc5ed870f249c", "size": 16629, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_tb_doublespike.py", "max_stars_repo_name": "mattias-ek/isopy", "max_stars_repo_head_hexsha": "96d5530034655c7f9559568ab9b0879b978ef566", "max_stars_repo_licenses": ["MIT"], "max_stars_...
using Documenter using StatsBase using MixedModels makedocs( root = joinpath(dirname(pathof(MixedModels)), "..", "docs"), sitename = "MixedModels", pages = [ "index.md", "constructors.md", "optimization.md", "GaussHermite.md", "bootstrap.md", # "SimpleLMM.md"...
{"hexsha": "24197b4f39899c285bcfa383cf12be422231c5fc", "size": 534, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "Nosferican/MixedModels.jl", "max_stars_repo_head_hexsha": "dec030a95103158aa738616f9dc72b9d0563fb26", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
""" Evaluate co-ocurrence between `regions` and `query` """ from __future__ import print_function import sys from argparse import ArgumentParser from collections import defaultdict from concurrent.futures import ProcessPoolExecutor import random import copy from interlap import InterLap from peddy import Ped import t...
{"hexsha": "962665e1bb23ab5f88c149a661b4e3eb29c555a1", "size": 5127, "ext": "py", "lang": "Python", "max_stars_repo_path": "recombinator/enrichment.py", "max_stars_repo_name": "quinlan-lab/recombinator", "max_stars_repo_head_hexsha": "a164c2ea5e91debacbe658e85fa38e89ebafad05", "max_stars_repo_licenses": ["MIT"], "max_s...
from __future__ import annotations from dataclasses import dataclass from typing import Any import numpy as np from edutorch.typing import NPArray from ..nn.module import Module from .optimizer import Optimizer @dataclass class RMSProp(Optimizer): """ Uses the RMSProp update rule, which uses a moving aver...
{"hexsha": "ed20393995b03c32cd0e561458b0de4d96911689", "size": 1250, "ext": "py", "lang": "Python", "max_stars_repo_path": "edutorch/optim/rmsprop.py", "max_stars_repo_name": "TylerYep/edutorch", "max_stars_repo_head_hexsha": "6a4a425cbfd7fcdcd851b010816d29c3b5bae8bd", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
using LinearAlgebra function loss(w, s=4.0) return (w[1]*w[2] - s)^2/2 end function grad_loss(w, s=4.0) term = w[1]*w[2] - s return term*[w[2], w[1]] end function hess_loss(w, s=4.0) term = w[1]*w[2] - s dterm = [w[2] w[1]] return term*[0 1;1 0] .+ [w[2]*dterm; w[1]*dterm] end next(w, η, s=4.0) = w - η*grad_l...
{"hexsha": "356878cdaa964160f932040f309427205b1d74a8", "size": 620, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/nonconvex_smooth_noncompact.jl", "max_stars_repo_name": "nishaChandramoorthy/neuralOMET", "max_stars_repo_head_hexsha": "4be74e94b6ebe3c103e7dee7daada94b8252984c", "max_stars_repo_licenses"...
classdef SOP_F21 < PROBLEM % <single> <real> <expensive/none> % Shekel's family %------------------------------- Reference -------------------------------- % X. Yao, Y. Liu, and G. Lin, Evolutionary programming made faster, IEEE % Transactions on Evolutionary Computation, 1999, 3(2): 82-102. %-------------------------...
{"author": "BIMK", "repo": "PlatEMO", "sha": "c5b5b7c37a9bb42689a5ac2a0d638d9c4f5693d5", "save_path": "github-repos/MATLAB/BIMK-PlatEMO", "path": "github-repos/MATLAB/BIMK-PlatEMO/PlatEMO-c5b5b7c37a9bb42689a5ac2a0d638d9c4f5693d5/PlatEMO/Problems/Single-objective optimization/Simple SOPs/SOP_F21.m"}
[STATEMENT] lemma Trans: assumes "H \<turnstile> x EQ y" "H \<turnstile> y EQ z" shows "H \<turnstile> x EQ z" [PROOF STATE] proof (prove) goal (1 subgoal): 1. H \<turnstile> x EQ z [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. H \<turnstile> x EQ z [PROOF STEP] have "\<And>H. H \<turnstile> (...
{"llama_tokens": 1000, "file": "Robinson_Arithmetic_Robinson_Arithmetic", "length": 12}
import numpy as np from utils import * def sort_pixels(dnn, layer_functions, image, nc_layer, pos, gran=2): sort_list=np.linspace(0, 1, gran) image_batch = np.kron(np.ones((gran, 1, 1, 1)), image) images=[] (row, col, chl) = image.shape dim_row, dim_col=row, col if row>DIM: dim_row=DIM if col>DIM: dim_c...
{"hexsha": "b5cf0ef05b7d4a54460d6ba20b1ae32ce7027cd7", "size": 4326, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/l0_encoding.py", "max_stars_repo_name": "853108389/DeepConcolic", "max_stars_repo_head_hexsha": "2fb4bee11a07dcf39d9df9b2534f377336257def", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: shirui <shirui816@gmail.com> import numpy as np class Evaluation(object): r"""Evaluation of model.""" def __init__(self, model): r"""Initialize with model. Arguments: model: a fit object """ self.model = model ...
{"hexsha": "603abed99b992abc7946158668d8ec5e715dc3bb", "size": 2904, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/Evaluate.py", "max_stars_repo_name": "Shirui816/MultipleDistributionFitting", "max_stars_repo_head_hexsha": "5d3a51383fb8057f725468a5da6bdbc75dc40b99", "max_stars_repo_licenses": ["MIT"], "m...
# Data Preprocessing # Importing the libraries # import matplotlib.pyplot as plt # library pandas offers data structures and operations for manipulating numerical tables and time series import numpy as np import pandas as pd # Importing the dataset df = pd.read_csv('Data.csv') X = df.iloc[:, :-1].values y = df.iloc...
{"hexsha": "ee4e13d85aa42d8c27a08cf542b2cf0cd58d1690", "size": 648, "ext": "py", "lang": "Python", "max_stars_repo_path": "Machine Learning A-Z/Part 1 - Data Preprocessing/missing_data.py", "max_stars_repo_name": "SenonLi/LearnPython", "max_stars_repo_head_hexsha": "0d37ed625c623a79daa9c4407751050e683fa3ed", "max_stars...
from unittest import TestCase, SkipTest import sys from parameterized import parameterized import numpy as np import pandas as pd from holoviews.core import GridMatrix, NdOverlay from holoviews.element import ( Bivariate, Distribution, HexTiles, Histogram, Scatter, ) from hvplot import scatter_mat...
{"hexsha": "e11854296f5437afb6c864388ab500aa8ec27cd4", "size": 5153, "ext": "py", "lang": "Python", "max_stars_repo_path": "hvplot/tests/plotting/testscattermatrix.py", "max_stars_repo_name": "vishalbelsare/hvplot", "max_stars_repo_head_hexsha": "e0767f2533daf0ba8ed5b6ea2f28000803d99b91", "max_stars_repo_licenses": ["B...
import numpy as np import pandas as pd import datetime as dt import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func from dateutil.relativedelta import relativedelta from flask import Flask, jsonify engine = create_engine("sqlite:/...
{"hexsha": "6f06a440dd502c3d59e1cd2921303cdcb6a1b0dd", "size": 3733, "ext": "py", "lang": "Python", "max_stars_repo_path": "appHW.py", "max_stars_repo_name": "kristine848/SQL-Alchemy-challenge", "max_stars_repo_head_hexsha": "3cca93b8c46532c3900da6c8013902fb451dae99", "max_stars_repo_licenses": ["ADSL"], "max_stars_cou...
(******************************************************************************) (* Project: The Isabelle/UTP Proof System *) (* File: Time.thy *) (* Authors: Frank Zeyda and Simon Foster (University of York, UK) ...
{"author": "isabelle-utp", "repo": "utp-main", "sha": "27bdf3aee6d4fc00c8fe4d53283d0101857e0d41", "save_path": "github-repos/isabelle/isabelle-utp-utp-main", "path": "github-repos/isabelle/isabelle-utp-utp-main/utp-main-27bdf3aee6d4fc00c8fe4d53283d0101857e0d41/fmi/Time.thy"}
import numpy as np from rapt import Re, B0 from scipy.interpolate import RegularGridInterpolator class _Field: """ The superclass for fields. Not used directly, but subclassed. All field- related data and methods are defined in field objects. Attributes ---------- gradientstepsize : float ...
{"hexsha": "79eff2c7fcd843cee60c244c17ac5535481bd75e", "size": 27621, "ext": "py", "lang": "Python", "max_stars_repo_path": "rapt/fields.py", "max_stars_repo_name": "mkozturk/rapt", "max_stars_repo_head_hexsha": "cb293ac98d2d7707baf822b4e0efe18b2355f35c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_s...
SUBROUTINE ECCMOD(I,ITERM) * * * Eccentricity modulation of hierarchical binary. * ----------------------------------------------- * INCLUDE 'common6.h' COMMON/BINARY/ CM(4,MMAX),XREL(3,MMAX),VREL(3,MMAX), & HM(MMAX),UM(4,MMAX),UMDOT(4,MMAX),TMDIS(MMAX), & ...
{"hexsha": "6d9aea6f43a8754d4077ea81665bfd6cb3ca5c7e", "size": 4471, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/amuse/community/nbody6xx/src/eccmod.f", "max_stars_repo_name": "rknop/amuse", "max_stars_repo_head_hexsha": "85d5bdcc29cfc87dc69d91c264101fafd6658aec", "max_stars_repo_licenses": ["Apache-2.0"...
import numpy as np import pytest import tinynn as tn tn.seeder.random_seed(31) @pytest.fixture(name="mock_dataset") def fixture_mock_dataset(): X = np.random.normal(size=(100, 5)) y = np.random.uniform(size=(100, 1)) return X, y @pytest.fixture(name="mock_img_dataset") def fixture_mock_img_dataset(): ...
{"hexsha": "8d117c26d6ddf50bc882f2e094b9562629305b38", "size": 2246, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/others/test_functionality.py", "max_stars_repo_name": "lx120/tinynn", "max_stars_repo_head_hexsha": "88b941a706700ca7f6b1cc4ae7f271df7049348c", "max_stars_repo_licenses": ["MIT"], "max_stars...
# Use the Dask executor scheduler with a threadpool executor import dask.array as da import numpy as np from dask_executor_scheduler import executor_scheduler if __name__ == '__main__': x = da.random.random((10000, 1000), chunks=(1000, 1000)) y = np.sum(x, axis=1) z = y.compute(scheduler=executor_schedu...
{"hexsha": "59229956eab17f48f99e5bd917f53c715d242643", "size": 357, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/threadpool_executor.py", "max_stars_repo_name": "arontsang/dask-executor-scheduler", "max_stars_repo_head_hexsha": "c502f128cbad7421493b1dc2a70ee2ce723afaa9", "max_stars_repo_licenses": ["...
"""flat.py Provides alternative functions to hdbscan.HDBSCAN and others to 1. Allow prediction on a flat clustering by specifying 'n_clusters'. This is done by choosing the best cluster_selection_epsilon that produces the required number of clusters without adding unnecessary outliers. 2. Makes approximate_pre...
{"hexsha": "1bbbb5acfb11a629736d380607967ae74a621771", "size": 38864, "ext": "py", "lang": "Python", "max_stars_repo_path": "hdbscan/flat.py", "max_stars_repo_name": "ainkov/hdbscan", "max_stars_repo_head_hexsha": "29dbaedfd281addc86cdae69a65798b9230a2c6e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
function boys_function(n::Int, x::Float64)::Float64 x < 1e-6 && return 1/(2n+1) n == 0 && return 0.5*√(π/x)*erf(√x) return ((2n-1)*boys_function(n-1, x) - exp(-x))/(2x) end "S(gs, gs)" function overlap_integral(g1::Gaussian_s, g2::Gaussian_s)::Float64 p = (g1.α + g2.α) μ = (g1.α * g2.α) / p γ =...
{"hexsha": "cde3a813e5be713001edaa82c8cd80b44521cde1", "size": 5278, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/gto_integral.jl", "max_stars_repo_name": "0382/HartreeFock.jl", "max_stars_repo_head_hexsha": "1cf2c3eb52c84a23ada62196ae5e8739d02027a2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
```python """Purely numerical 1D finite element program.""" import sys, os, time sys.path.insert( 0, os.path.join(os.pardir, os.pardir, 'approx', 'src-approx')) from numint import GaussLegendre, NewtonCotes #from fe_approx1D_numint import u_glob import sympy as sym import numpy as np def Lagrange_polynomial(x, i,...
{"hexsha": "339cdbe704d161afe5e7a1c14307646a0a8c1bf1", "size": 19576, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Data Science and Machine Learning/Machine-Learning-In-Python-THOROUGH/EXAMPLES/FINITE_ELEMENTS/INTRO/SRC/19_FE1D.ipynb", "max_stars_repo_name": "okara83/Becoming-a-Data-Scientist", "...
import os from collections import OrderedDict import numpy as np import scipy.io try: import pandas as pd HAS_PANDAS = True except ImportError: HAS_PANDAS = False class GenericSpikeExporter: def __call__(self,spikes, catalogue, seg_num, chan_grp, export_path, split_by_cluster...
{"hexsha": "b48bae98bb56abf765c039c658f5e90dccfa7b28", "size": 3407, "ext": "py", "lang": "Python", "max_stars_repo_path": "tridesclous/export.py", "max_stars_repo_name": "remi-pr/tridesclous", "max_stars_repo_head_hexsha": "074f425fd40f1fb76f619f74cc024dd9817b7ee7", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020-2021 Alibaba Group Holding Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
{"hexsha": "17f6d65a930270abe03f3a20dceced43683cb5ee", "size": 4285, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/vineyard/deploy/tests/test_migration.py", "max_stars_repo_name": "v6d-io/v6d", "max_stars_repo_head_hexsha": "8f692c9bd95dad06c304a0020d4f946a5756c1e0", "max_stars_repo_licenses": ["Apache-...
[STATEMENT] lemma step_induction[consumes 2, case_names app\<^sub>1 app\<^sub>2 thunk lamvar var\<^sub>2 let\<^sub>1 if\<^sub>1 if\<^sub>2 refl trans]: assumes "c \<Rightarrow>\<^sup>* c'" assumes "\<not> boring_step c'" assumes app\<^sub>1: "\<And> \<Gamma> e x S . P (\<Gamma>, App e x, S) (\<Gamma>, e , Arg x...
{"llama_tokens": 686, "file": "Call_Arity_Sestoft", "length": 1}
c.......subroutine bfilter c c Written by: David R. Russell, AFTAC/TT 10 December 2004 c c Subroutine bfilter executes a fast, stable zero phase butterworth c bandpass filter of order (m), which is optimized for narrow band c applications. The method produces a complex time series output, c of...
{"hexsha": "ebb29972c24598ceecba0f5d7e9aec9fceb1041b", "size": 4541, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ni/src/lib/nfpfort/bfilter1.f", "max_stars_repo_name": "jlost/ncl_ncarg", "max_stars_repo_head_hexsha": "2206367f1887732bc7745bfb5ca56f6543f77948", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
[STATEMENT] lemma (in dist_execution) recv_insert_once: "event_at (i,j) (Receive s (Insert m)) \<Longrightarrow> event_at (i,k) (Receive t (Insert m)) \<Longrightarrow> j = k" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>event_at (i, j) (Receive s (Insert m)); event_at (i, k) (Receive t (Insert m))\<rbr...
{"llama_tokens": 379, "file": "WOOT_Strong_Eventual_Consistency_StrongConvergence", "length": 2}
[STATEMENT] lemma strategy_attracts_irrelevant_override: assumes "strategy_attracts p \<sigma> A W" "strategy p \<sigma>" "strategy p \<sigma>'" shows "strategy_attracts p (override_on \<sigma>' \<sigma> (A - W)) A W" [PROOF STATE] proof (prove) goal (1 subgoal): 1. strategy_attracts p (override_on \<sigma>' \<sig...
{"llama_tokens": 7579, "file": "Parity_Game_AttractingStrategy", "length": 74}
import random from enum import Enum import numpy as np class LocalSearch(Enum): PER_VARIABLE_LOCAL_SEARCH = 1 def local_search_gene(population, fitness_function, method, config): new_population = None if (method == LocalSearch.PER_VARIABLE_LOCAL_SEARCH): new_population = _per_variable_local_se...
{"hexsha": "eb7bec4bad80bfd22abd0bd13810b0e1543a3177", "size": 1548, "ext": "py", "lang": "Python", "max_stars_repo_path": "ga/local_search.py", "max_stars_repo_name": "YannHyaric/evolutionary-computation", "max_stars_repo_head_hexsha": "af7778fd1b5d60a1e5630b483b55257adac0bbc6", "max_stars_repo_licenses": ["MIT"], "ma...
using DashBootstrapComponents, DashHtmlComponents toast = dbc_toast( [html_p("This is the content of the toast", className = "mb-0")], header = "This is the header", );
{"hexsha": "f1969c81c018f8d211dce4d4c3c38f847e73ce25", "size": 178, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/components_page/components/toast/simple.jl", "max_stars_repo_name": "glsdown/dash-bootstrap-components", "max_stars_repo_head_hexsha": "0ebea4f7de43975f6e3a2958359c4480ae1d4927", "max_stars_rep...
import pandas as pd import json import scipy.stats import random import numpy as np from yattag import Doc import itertools from collections import defaultdict import argparse import os random.seed(1) import hashlib def hashhex(s): """Returns a heximal formated SHA1 hash of the input string.""" h = hashlib.s...
{"hexsha": "9ea60931f32fbe346e8f347edcb80e6b554e2979", "size": 1747, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/generate_html_from_outputs.py", "max_stars_repo_name": "oja/qfsumm", "max_stars_repo_head_hexsha": "dfa3541cfad928df412c86888ef0354ea97e8382", "max_stars_repo_licenses": ["MIT"], "max_star...
# !/usr/bin/python # -*- coding:utf-8 -*- # Author: Shengjia Yan # Date: 2017-10-26 # Email: i@yanshengjia.com import sys reload(sys) sys.setdefaultencoding('utf8') import logging import numpy as np import itertools import matplotlib.pyplot as plt from sklearn.metrics import confusion_matrix def load_confusion_ma...
{"hexsha": "04c463c4e66719daeda64853ef761423a9ff054f", "size": 3128, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/plot/plot_confusion_matrix.py", "max_stars_repo_name": "yanshengjia/nlp", "max_stars_repo_head_hexsha": "43398652b2cab9b85fd042f60e6f68c7b48697bc", "max_stars_repo_licenses": ["MIT"], "max_s...
#todo : just for test =================== import numpy from PIL import Image import torch ''' a= numpy.array(Image.open('/home/leejeyeol/Datasets/Avenue/training_videos/15/output_00118.png'),dtype=numpy.float) a2 =Image.fromarray(a) a2.show() print(a) b= numpy.array(Image.open('/home/leejeyeol/Datasets/Avenue/mean_ima...
{"hexsha": "ef77b90621ee2b166cbfc39f6553617928c719a8", "size": 821, "ext": "py", "lang": "Python", "max_stars_repo_path": "legacy/data_generation/NIPS2017_evaluation.py", "max_stars_repo_name": "neohanju/AutoencodingTheWorld", "max_stars_repo_head_hexsha": "23f8a89bb7399df63cd7a0cb1b5a750214a44072", "max_stars_repo_lic...
import numpy as np class Features: def __init__(self): self._horest_features = [] self._texture_feature = [] self._sift_SDS = [] self._sift_SOH = [] @property def horest_features(self): return self._horest_features @property def texture_feature(self): ...
{"hexsha": "2f1158442a599aa1246e5addf62f2e6ec608158f", "size": 866, "ext": "py", "lang": "Python", "max_stars_repo_path": "server/models/features.py", "max_stars_repo_name": "Shaalan31/LIWI", "max_stars_repo_head_hexsha": "b4d615e0951b7c28c9258d0d7a8ff86c73c4ebe2", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy as np import matplotlib.pyplot as plt import imageio import scipy, scipy.misc, scipy.signal import cv2 import sys import PIL from PIL import Image windowName = '' threshold = 11 size = 5 # path to input image is specified and # image is loaded with imread command image1 = cv2.imread('0136ns.png') # ...
{"hexsha": "49a2ab22e8192297490d8fa6636222f77a77ec93", "size": 2229, "ext": "py", "lang": "Python", "max_stars_repo_path": "adaptative_threshold.py", "max_stars_repo_name": "fthernan/interferometry-processing-tools", "max_stars_repo_head_hexsha": "84420990410e117af08675247078734050079a22", "max_stars_repo_licenses": ["...
import argparse from numpy.random import default_rng NUMBER_OF_SAMPLES = 1 def generate_normal_random_numbers(samples=1): rng = default_rng() return rng.standard_normal(samples) if __name__ == '__main__': # parse arguments parser = argparse.ArgumentParser( description="Generate random num...
{"hexsha": "c13616ee0118d701f5ff3c365755a4bd428ecf94", "size": 770, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/normal_numbers.py", "max_stars_repo_name": "sernamar/random-numbers", "max_stars_repo_head_hexsha": "9117a59b246ced3d82803cfd7b82b05f8a456d97", "max_stars_repo_licenses": ["MIT"], "max_stars...
import sys sys.path.insert(1, '..') import pickle import requests from bs4 import BeautifulSoup from tqdm import tqdm import datetime as dt from collections import defaultdict import numpy as np import pandas as pd from sklearn.preprocessing import MinMaxScaler import tensorflow as tf from tensorflow.keras.models impo...
{"hexsha": "44eb4904e210a7a3531ee94621a96fc75ddcc273", "size": 6780, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/offline_predict_q.py", "max_stars_repo_name": "penguinwang96825/Intelligent-Asset-Allocation", "max_stars_repo_head_hexsha": "62aa4e70dae50c60c4dae7acfe0388028be242a2", "max_stars_repo_licen...
import scipy.fft import matplotlib.pyplot as plt import numpy as np x1=([0,4,2,0]) dft=scipy.fft.fft(x1) plt.figure(figsize=(8,9)) plt.subplot(2, 1, 1) plt.stem(dft.real, use_line_collection = True) plt.xlabel('k') plt.ylabel('Real{x[k]}') plt.title('Real part of DFT') plt.subplot(2, 1, 2) plt.s...
{"hexsha": "fc10120e6149f6e7f0da26e9706dbcb0eee7c372", "size": 486, "ext": "py", "lang": "Python", "max_stars_repo_path": "Py_lab/Lab 4/scipy_one.py", "max_stars_repo_name": "veterinarian-5300/Genious-Python-Code-Generator", "max_stars_repo_head_hexsha": "d78cd5f4b64221e8e4dc80d6e1f5ba0a4c613bcd", "max_stars_repo_licen...
import autograd.numpy as np import numpy.random as npr from trajopt import core npr.seed(1337) if __name__ == '__main__': Q = np.eye(2) q = np.zeros((2, )) q0 = 0.0 mu = np.zeros((2, )) sigma = np.eye(2) # expectation of quadratic under gaussian print(core.quad_expectation(mu, sigma, Q,...
{"hexsha": "61eeb54c3ff8e1d4bf4c04a4cc190166f9b9822a", "size": 329, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/arma_test.py", "max_stars_repo_name": "JoeMWatson/trajopt", "max_stars_repo_head_hexsha": "8b98718721e0c373cd7dc01a35f42447c1134713", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
import os, sys, time import argparse import learn_mtfixbmodel import mtfixb_model import parseopts import torch import torch.optim as optim import numpy as np def parse_args(args=None): parser = argparse.ArgumentParser(description='Optimise Z on new data') parser.add_argument('--style_ix', dest='style_ix', ...
{"hexsha": "f2fc35440a5f735f238cbfec1e95b6f216b3caca", "size": 11521, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/optim_z.py", "max_stars_repo_name": "ornithos/pytorch-mtds-mocap", "max_stars_repo_head_hexsha": "3ec10387d3d897e9a20d789bd4a3782a047519f7", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# created by Dmitrey #PythonAll = all from numpy import asarray, empty, inf, any, array, \ asfarray, isscalar, ndarray, int16, int32, int64, float64, tile, vstack, searchsorted, \ logical_or, where, asanyarray, arange, log2, logical_and, ceil, string_, atleast_1d import numpy as np from FDmisc import FuncDesignerExcep...
{"hexsha": "ca4193180bfc9518d393815530f27c1a7d22f9bf", "size": 16356, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/python2.7/site-packages/FuncDesigner/ooVar.py", "max_stars_repo_name": "wangyum/anaconda", "max_stars_repo_head_hexsha": "6e5a0dbead3327661d73a61e85414cf92aa52be6", "max_stars_repo_licenses":...
import argparse import calendar import copy import glob import shutil import subprocess import numpy as np import pandas as pd from sqlalchemy.exc import IntegrityError from datetime import date from urllib2 import urlopen from httplib import BadStatusLine from time import sleep import bom_data_parser as bdp from p...
{"hexsha": "2d9c5a66b7850081772c0dca622f61f827b04ba8", "size": 2363, "ext": "py", "lang": "Python", "max_stars_repo_path": "load_storages.py", "max_stars_repo_name": "amacd31/hydromet-toolkit", "max_stars_repo_head_hexsha": "d39edc6d3e02adeb3cd89ca13fdb9660be3247b4", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
/******************************************************************************* * * MIT License * * Copyright (c) 2019 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * ...
{"hexsha": "b938461d4ee74f45aab6ba355de52c8a16bae59a", "size": 6882, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/include/miopen/find_db.hpp", "max_stars_repo_name": "j4yan/MIOpen", "max_stars_repo_head_hexsha": "dc38f79bee97e047d866d9c1e25289cba86fab56", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#include "driver-test.h" #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_SUITE(BankcardTestSuite) BOOST_AUTO_TEST_CASE(bankcard_test) { Driver driver; DriverTest dt; boost::filesystem::path directory("TestFiles"); std::ifstream metadataFile((directory / "bankcardExample" / "zone_files" / "metadata...
{"hexsha": "fd27c6a404430ab6ff84f515b0e82a71ad616f2f", "size": 1395, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/bankcardTest.cpp", "max_stars_repo_name": "dns-groot/groot", "max_stars_repo_head_hexsha": "995b1bb64bfe4a1407dcf0c5a6910dfe1d60e427", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 58....
from os.path import splitext,basename import os import tensorflow as tf from keras.models import model_from_json from sklearn.preprocessing import LabelEncoder import glob import numpy as np def load_models(wpod_net_path, mobile_net_path): try: #open wpod-net model json file and make model using it ...
{"hexsha": "f407ee047644a13c68908214a11c93852c88aeed", "size": 1639, "ext": "py", "lang": "Python", "max_stars_repo_path": "server/number_plate_detection_and_recognition/load_models.py", "max_stars_repo_name": "CS305-software-Engineering/vehicle-attendance-system", "max_stars_repo_head_hexsha": "b33a583f923d92be669ee89...
(* ** Imports and settings *) From mathcomp Require Import all_ssreflect all_algebra. From mathcomp Require Import word_ssrZ. Require Import strings word utils type var expr. Require Import compiler_util byteset. Require Import ZArith. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. ...
{"author": "jasmin-lang", "repo": "jasmin", "sha": "3c783b662000c371ba924a953d444fd80b860d9f", "save_path": "github-repos/coq/jasmin-lang-jasmin", "path": "github-repos/coq/jasmin-lang-jasmin/jasmin-3c783b662000c371ba924a953d444fd80b860d9f/proofs/compiler/stack_alloc.v"}
import numpy as np import torch from baselines.common.vec_env import VecEnvWrapper from gym import spaces, ActionWrapper from envs.ImageObsVecEnvWrapper import get_image_obs_wrapper from envs.ResidualVecEnvWrapper import get_residual_layers from pose_estimator.utils import unnormalise_y class PoseEstimatorVecEnvWrap...
{"hexsha": "66b21eabe50e9934a4811aa461c0814373767b70", "size": 6412, "ext": "py", "lang": "Python", "max_stars_repo_path": "envs/wrappers.py", "max_stars_repo_name": "harry-uglow/Curriculum-Reinforcement-Learning", "max_stars_repo_head_hexsha": "cb050556e1fdc7b7de8d63ad932fc712a35ac144", "max_stars_repo_licenses": ["MI...
''' Author: S.T. Castle Created: 2015-03-15 ''' #import math import numpy as np from scipy import ndimage from scipy import stats import scipy.ndimage.filters import scipy.linalg #import skimage.feature import cv2 from matplotlib import pyplot as plt def main(): ''' Run the explicit coherence enhancing filt...
{"hexsha": "a78080861ab4e14c3531c836736769622a919864", "size": 8806, "ext": "py", "lang": "Python", "max_stars_repo_path": "coherence-elliptical-kernel/main-iter.py", "max_stars_repo_name": "stcastle/shell-detection", "max_stars_repo_head_hexsha": "cdc49190deae7310db66e56574b6737771821f31", "max_stars_repo_licenses": [...
#!/usr/bin/python #-*- coding: utf-8 -*- #=========================================================== # File Name: layers.py # Author: Xu Zhang, Columbia University # Creation Date: 09-07-2018 # Last Modified: Fri Sep 7 21:07:05 2018 # # Usage: # Description: # # Copyright (C) 2018 Xu Zhang # All rights rese...
{"hexsha": "a4bd4ff95b6323aac18e6acfab16e91f7134ffe1", "size": 2756, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/layers.py", "max_stars_repo_name": "ColumbiaDVMM/Heated_Up_Softmax_Embedding", "max_stars_repo_head_hexsha": "cb62d28e5faaf7fdb134b31c461125e3fef50d06", "max_stars_repo_licenses": ["BSD...
// Copyright 2018 Your Name <your_email> #ifndef INCLUDE_HEADER_HPP_ #define INCLUDE_HEADER_HPP_ #include <iostream> #include <boost/filesystem.hpp> #include <vector> #include <string> #define DIRECTORY 3 #define COM_FILE 2 using boost::filesystem::path; using std::cout; using std::endl; using std::vector; using st...
{"hexsha": "db03c42c2478800918ba605028a0f49b0ce1063b", "size": 4576, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/header.hpp", "max_stars_repo_name": "Darioshka/lab_04", "max_stars_repo_head_hexsha": "91cdb16431394359c2afa42c71b321acbd3a80ee", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import numpy as np import matplotlib.pyplot as plt rau = np.logspace(-1, 3, 1000) # Isella et al. 2009 Rt = [55., 21., 86., 28., 21., 110., 60., 25., 43., 66., 20.] St = [10., 608., 1.5, 13., 80., 4., 31., 58., 12., 4.7, 50.] gam = [-0.3, -0.5, 0.8, 0.0, -0.3, 0.7, -0.8, -0.1, 0.8, 0.5, 0.1] bmaj = np.array([1.05, 0....
{"hexsha": "619d39c8d4e4ebc0cf8b29fad3b36f1880d5dbbf", "size": 912, "ext": "py", "lang": "Python", "max_stars_repo_path": "sigmas_profiles.py", "max_stars_repo_name": "seanandrews/ARAA", "max_stars_repo_head_hexsha": "6c95f88f5619642b6914c611ba6c902b5412ab29", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
#!/usr/bin/python # # Determine signal strength upper limit for Dark Matter Z' mediator simplified model # based on the ATLAS Run 2 dilepton resonance search # import sys, argparse, os, ROOT import numpy as np def getMuLimit(x = np.empty(0), mediator_type = "V"): argParser = argparse.ArgumentParser( descrip...
{"hexsha": "aabeef609b57305da42cb5c84a181a2f45771369", "size": 4993, "ext": "py", "lang": "Python", "max_stars_repo_path": "excursion/testcases/madgraph5atlasval/getMuLimit.py", "max_stars_repo_name": "irinaespejo/excursion", "max_stars_repo_head_hexsha": "c5a5c6d882b8dd1008fbabf1a3b81eaba382bef6", "max_stars_repo_lice...
import numpy as np def lanc(numwt, haf): """ Generates a numwt + 1 + numwt lanczos cosine low pass filter with -6dB (1/4 power, 1/2 amplitude) point at haf Parameters ---------- numwt : int number of points haf : float frequency (in 'cpi' of -6dB point, 'cpi' is cycl...
{"hexsha": "5e5915684ffcce5d999eda9fbdd61b43e78f8c36", "size": 19922, "ext": "py", "lang": "Python", "max_stars_repo_path": "oceans/filters.py", "max_stars_repo_name": "Michelly-GC/python-oceans", "max_stars_repo_head_hexsha": "7b0e12a00cd125683e7b89acea0cdd67f7729a43", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
import numpy as np import os from sklearn import ensemble, feature_extraction, preprocessing from otto_utils import consts, utils MODEL_NAME = 'model_02_random_forest' MODE = 'holdout' # cv|submission|holdout # import data train, labels, test, _, _ = utils.load_data() # transform counts to TFIDF features tfidf =...
{"hexsha": "52339a2d7c8253906fd34a61bc45232f215bc9a0", "size": 1446, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/external/repositories/156296/kaggle_otto-master/otto/model/model_02_random_forest/random_forest.py", "max_stars_repo_name": "Keesiu/meta-kaggle", "max_stars_repo_head_hexsha": "87de739aba2399...