text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
#define HAS_HTTP_CLIENT_LOG #include <boost/thread.hpp> #include <boost/locale.hpp> #include "asynchttpclient.h" #include "synchttpclient.h" #include "asyncdownload.h" #include "syncdownload.h" boost::asio::io_service g_io_service; ProxyInfo g_proxy; void handle_response(const ResponseInfo& r) { ...
{"hexsha": "30d720eb71af9077272fdf0ecc81625af9be573a", "size": 3558, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test.cpp", "max_stars_repo_name": "mkdym/httpclient", "max_stars_repo_head_hexsha": "2cadf455315a0031958712fb559ca43c6c3c5a71", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": 11.0, "ma...
[STATEMENT] lemma round_robin_Some_NoneD: assumes rr: "round_robin n0 \<sigma> s = \<lfloor>(t, None, \<sigma>')\<rfloor>" shows "\<exists>x ln n. thr s t = \<lfloor>(x, ln)\<rfloor> \<and> ln $ n > 0 \<and> \<not> waiting (wset s t) \<and> may_acquire_all (locks s) t ln" [PROOF STATE] proof (prove) goal (1 subgoal...
{"llama_tokens": 3645, "file": "JinjaThreads_Execute_Round_Robin", "length": 26}
```python %matplotlib inline ``` ```python %run proof_setup ``` ```python import numpy as np import sympy as sm ``` ```python def do_rotation(sinw, cosw, sini, cosi, x, y): Rw = sm.Matrix([[cosw, -sinw, 0], [sinw, cosw, 0], [0, 0, 1]]) Ri = sm.Matrix([[1, 0, 0], [0, cosi, -sini], [0, sini, cosi]]) v0 ...
{"hexsha": "3e7ba43a0391e470b428a085afbfe75c4591c02b", "size": 104245, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "paper/proofs/contact_impl.ipynb", "max_stars_repo_name": "exowanderer/exoplanet", "max_stars_repo_head_hexsha": "dfd4859525ca574f1936de7b683951c35c292586", "max_stars_repo_licenses"...
\section{Universal coefficient theorem (and $\Hom$, adjointness)} On Wednesday, we'll talk about the K\"{u}nneth theorem, and later we'll talk about the K\"{u}nneth theorem. We've been talking about tensor products of $R$-modules, but we can do something that's more natural in a way. That's the notion of $\Hom_R(M,N)$,...
{"hexsha": "055e850205e6b6fdcd4350b1ec1b4eeb4149915c", "size": 8621, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "old-905/lec-24-uct.tex", "max_stars_repo_name": "ichung/algtop-notes", "max_stars_repo_head_hexsha": "3f5d3189e2082716a69fccc1711d02ed848552d2", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
SUBROUTINE blox(ll, al, bl, cl, s1, s3, srces) ! This subroutine forms the l-row block matrices and sources. ! ! On exit, s1 and s3 contain the sources for Legendre index ll ! a, b, c are the MPNT X MPNT Fourier blocks for this index ! !----------------------------------------------- ! M o d u l e ...
{"hexsha": "85ea0b3915528eb14b5c32be3c877e634a6dc5b0", "size": 1931, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "DKES/Sources/General/blox.f", "max_stars_repo_name": "joseluisvelasco/STELLOPT", "max_stars_repo_head_hexsha": "e064ebb96414d5afc4e205f43b44766558dca2af", "max_stars_repo_licenses": ["MIT"], "max_...
C C C ****************************************************************** C CHECK FOR STEAMBED BELOW CELL BOTTOM. RECORD REACHES FOR PRINTING C ****************************************************************** MODULE GwfSfrCheckModule USE GWFSFRMODULE,ONLY:ISTRM,STRM,NSTRM USE GLOBAL,ONLY...
{"hexsha": "82d9e945d3b0009b9517b2721de8d29fb78a9eb3", "size": 1753, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "utils/mf5to6/src/MF2005/GwfSfrCheck.f", "max_stars_repo_name": "scharlton2/modflow6", "max_stars_repo_head_hexsha": "83ac72ee3b6f580aaffef6352cf15c1697d3ce66", "max_stars_repo_licenses": ["CC0-1.0...
__author__ = 'rvuine' from micropsi_core.nodenet.flow_netapi import FlowNetAPI class TheanoNetAPI(FlowNetAPI): """ Theano extension of the NetAPI, giving native modules access to bulk operations and efficient data structures for machine learning purposes. """ def announce_nodes(self, nodespace_u...
{"hexsha": "600398c6ca1795cf2e69bdea6a23dfd0dd03bdee", "size": 4009, "ext": "py", "lang": "Python", "max_stars_repo_path": "micropsi_core/nodenet/theano_engine/theano_netapi.py", "max_stars_repo_name": "Doik/micropsi2", "max_stars_repo_head_hexsha": "35ef3b48d9da255939e8e7af0e00bbcc98597602", "max_stars_repo_licenses":...
module GDF_test # greet() = print("Hello World!") # include("tables.jl") include("io.jl") export GeoTable, gdf_from_geojson, read_gjt, read_shp end # module
{"hexsha": "c28a16dde5f8093891774b78444b61eb55fd7af3", "size": 160, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/GDF_test.jl", "max_stars_repo_name": "Sov-trotter/GDF_test.jl", "max_stars_repo_head_hexsha": "79d25fd44806cdfe17d9d351c6ebb5cef09686d6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
#!/usr/bin/env python # -*- coding: utf-8 -*- import eegpy from eegpy.misc import FATALERROR, debug from eegpy.formats.iobase import EEG_file try: import scipy except ImportError: raise FATALERROR('SciPy or NumPy not found!\nPlease visit www.scipy.org or numeric.scipy.org for more information.') __biosig_d...
{"hexsha": "0763a384d4f906678c0705ad9d36f3affb974fda", "size": 54363, "ext": "py", "lang": "Python", "max_stars_repo_path": "eegpy/formats/edf.py", "max_stars_repo_name": "thorstenkranz/eegpy", "max_stars_repo_head_hexsha": "0f9461456999874abbb774896ca832eb27740a9d", "max_stars_repo_licenses": ["BSD-2-Clause-FreeBSD"],...
[STATEMENT] lemma hfrefI[intro?]: assumes "\<And>c a. P a \<Longrightarrow> hn_refine (fst RS a c) (f c) (snd RS a c) T (g a)" shows "(f,g)\<in>hfref P RS T" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (f, g) \<in> [P]\<^sub>a RS \<rightarrow> T [PROOF STEP] using assms [PROOF STATE] proof (prove) using ...
{"llama_tokens": 384, "file": "Refine_Imperative_HOL_Sepref_Rules", "length": 3}
import os import numpy as np import cv2 import lmdb import argparse cnt = 0 def filter_text(lang,text): #print(lang,text) unicode_range = {'odia':'[^\u0020-\u0040-\u0B00-\u0B7F]','kanada':'[^\u0020-\u0040-\u0C80-\u0CFF]', 'tamil':'[^\u0020-\u0040-\u0B80-\u0BFF]','malyalam':'[^\u0020-\u0040-\u0D00-\u0D7F]', '...
{"hexsha": "03f0774fce9a08d4a11b3c223b1cf8698b64af1c", "size": 3453, "ext": "py", "lang": "Python", "max_stars_repo_path": "Recognition/prepare_data.py", "max_stars_repo_name": "prabhatrmishra/IDCardInfoExtr", "max_stars_repo_head_hexsha": "c59270f61a3251a6aff55bc7d81f2057c4663a37", "max_stars_repo_licenses": ["Apache-...
import numpy as np import pandas as pd from sklearn import tree from sklearn.model_selection import cross_val_score, train_test_split from sklearn.linear_model import LogisticRegression from statsmodels.imputation import mice def clean(df): d = {'Rural':0,'Semiurban':1,'Urban':2} df['Property_Area'] =...
{"hexsha": "e503603d7603a36cede3471e8c96b946a439ab79", "size": 1568, "ext": "py", "lang": "Python", "max_stars_repo_path": "K-Fold Cross Validation of Prediction Model.py", "max_stars_repo_name": "energy-in-joles/Loan-Prediction-Model", "max_stars_repo_head_hexsha": "9689a4598f37cdf691ef1d9129a4a685bc41f016", "max_star...
#!/usr/bin/env python import rospy import numpy as np import random import geometry_msgs from geometry_msgs.msg import PoseWithCovarianceStamped from nav_msgs.msg import Odometry from geometry_msgs.msg import PoseArray from laser_scan_get_map import MapClientLaserScanSubscriber import tf_conversions import tf from ...
{"hexsha": "7d0c021cc6dd3fdec0e93695c3ef17ca0fc89fcf", "size": 9423, "ext": "py", "lang": "Python", "max_stars_repo_path": "particle_filter/particle_filter.py", "max_stars_repo_name": "or-tal-robotics/mcl_pi", "max_stars_repo_head_hexsha": "02d9b3bdd68c54afde36da320e1ce4bdc8d057d8", "max_stars_repo_licenses": ["Apache-...
import numpy as np import pandas as pd label_name2id = { 'none' : -1, 'normal' : 0, 'snow' : 1, 'ice' : 2, } def sliding_windows(df, window_size, sliding_step): """slide windows to split data Returns: X (numpy.ndarray): shape: [windows_num, channels, H(1), W(window_siz...
{"hexsha": "71e58542f0b00ceb5ef5ef970c1d9d8f94b2d057", "size": 1338, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dataset/process.py", "max_stars_repo_name": "BenbqZhang/ground-recognition", "max_stars_repo_head_hexsha": "09a03d46af6b59fd7b3cba25bb51bc923621c5e3", "max_stars_repo_licenses": ["MIT"], "max_...
# Watershed Se detection function # This function is based on code contributed by Suxing Liu, Arkansas State University. # For more information see https://github.com/lsx1980/Leaf_count import cv2 import os import numpy as np from scipy import ndimage as ndi from skimage.feature import peak_local_max from skimage.segm...
{"hexsha": "b73261aa3445a5ef7d723578ad59245dc62bffb7", "size": 2975, "ext": "py", "lang": "Python", "max_stars_repo_path": "plantcv/plantcv/watershed.py", "max_stars_repo_name": "typelogic/plantcv", "max_stars_repo_head_hexsha": "f375982cd87e0b54e49c09422abaad51ff74c64b", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np import pandas as pd import os abs_dir = os.path.dirname(__file__) data_path = os.path.join(abs_dir, "../../../data/") def sample_beta_binomial(n, p, k, size=None): p = np.random.beta(k/(1-p), k/p, size=size) r = np.random.binomial(n, p) return r def name2nis(name): """ A functi...
{"hexsha": "a5dcefd82cbc2cc3a125b8ea04fcbb0fba30b9ad", "size": 1805, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/covid19model/models/utils.py", "max_stars_repo_name": "JennaVergeynst/COVID19-Model", "max_stars_repo_head_hexsha": "9446147a71ead91a3c32c17680967f61b57c418a", "max_stars_repo_licenses": ["MIT...
include("../src/lstm_g/network.jl") include("../src/lstm_g/viz.jl") nin = 3 nhidden = 2 nout = 1 # basic ANN inputlayer = gatedlayer(3, tag=:input) hiddenlayer = gatedlayer(2, tag=:hidden) outputlayer = gatedlayer(1, tag=:output) @show inputlayer hiddenlayer outputlayer ci = connect(inputlayer, hiddenlayer) co = c...
{"hexsha": "6c5884db4d1608ec915698565d14109c013f8e97", "size": 746, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_lstm_g.jl", "max_stars_repo_name": "tbreloff/OnlineAI.jl", "max_stars_repo_head_hexsha": "b6c2fcb4066c071683c89b519a8760ace27cdbd4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# **************************************************************************** #### randomized inputs w/ scaled flow # **************************************************************************** # **************************************************************************** #### standard imports # ********************...
{"hexsha": "8608fee963c0ff32350cb40651577713b00052f5", "size": 8927, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/example_randominputs_R3.py", "max_stars_repo_name": "GeoDesignTool/GeoDT", "max_stars_repo_head_hexsha": "dea9bfa982213d45328fec339f0ca2cfa130df3d", "max_stars_repo_licenses": ["BSD-3-Cla...
from __future__ import division from __future__ import print_function from pathlib import Path from random import random import sys project_path = Path(__file__).resolve().parents[1] sys.path.append(str(project_path)) import tensorflow as tf import os import scipy.sparse as sp import numpy as np from cor...
{"hexsha": "068af80fc93f008dc8c8532122a15ef102953425", "size": 8736, "ext": "py", "lang": "Python", "max_stars_repo_path": "validation/2_cluster_geometric_ap.py", "max_stars_repo_name": "omarmaddouri/GCNCC_1", "max_stars_repo_head_hexsha": "ec858bbe8246e4af15f7b870ca0ccafdea93d627", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np from astropy.table import Table import astropy.units as u from astropy.nddata import StdDevUncertainty from astropy.utils.exceptions import AstropyUserWarning import warnings import logging from specutils.spectra import Spectrum1D def spectrum_from_column_mapping(table, column_mapping, wcs=None): ...
{"hexsha": "4a0b23dffa318b2c52542937334c5a4f960ab07a", "size": 8445, "ext": "py", "lang": "Python", "max_stars_repo_path": "specutils/io/parsing_utils.py", "max_stars_repo_name": "hamogu/specutils", "max_stars_repo_head_hexsha": "b873f2ac9b3c207c9e670246d102f46a9606d6ed", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
# -------------- #Importing header files import pandas as pd from sklearn.model_selection import train_test_split # Code starts here data=pd.read_csv(path) #X=data[data.columns.difference(['customer.id','paid.back.loan'])] #print(X.head(10)) #y=data['paid.back.loan'] X=data.drop(['customer.id','paid.back.loan'],1) ...
{"hexsha": "86bed80edce7d3160f7901d4cba5bf54b59c9164", "size": 4244, "ext": "py", "lang": "Python", "max_stars_repo_path": "DecisionTree/code.py", "max_stars_repo_name": "anuragswain63/ga-learner-dsmp-repo", "max_stars_repo_head_hexsha": "24c73eacf50e31f90393e388f0b7e66f10d7268b", "max_stars_repo_licenses": ["MIT"], "m...
# 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 app...
{"hexsha": "3919994d6fa4be6c6b1b0d8c44ecb5fd98b3b5e8", "size": 5501, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/drug_target_interaction/moltrans_dti/preprocess.py", "max_stars_repo_name": "agave233/PaddleHelix", "max_stars_repo_head_hexsha": "e5578f72c2a203a27d9df7da111f1ced826c1429", "max_stars_repo_l...
#!/usr/bin/env python3 # # This Python script provides an example usage of RFFGPC class which is a class for # Gaussian process classifier using RFF. Interface of RFFGPC is quite close to # sklearn.gaussian_process.GaussianProcessClassifier. # # Author: Tetsuya Ishikawa <tiskw111@gmail.com> # Date : January 29, 2021 #...
{"hexsha": "9645c26532b6fddc957ba8ed40f8fa19e0e5d64c", "size": 5395, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/gpc_for_mnist/train_gpc_for_mnist.py", "max_stars_repo_name": "Linleaf1996/random-fourier-features", "max_stars_repo_head_hexsha": "6638280e4ff0f334a973a238d5d14ffac6ede9c8", "max_stars_r...
!> @brief This subroutine reads in coordinates (in degrees) on the surface of Earth and a heading (in degrees) and a distance (in metres) it then calculates the coordinates (in degrees) that are at the end of the vector. !> !> @note https://en.wikipedia.org/wiki/Vincenty%27s_formulae !> !> @note https://www.movable-typ...
{"hexsha": "635db23b2cf58652d7f89decfa0ab2fbb1e2f40a", "size": 7208, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "mod_safe/sub_calc_loc_from_loc_and_bearing_and_dist.f90", "max_stars_repo_name": "Guymer/fortranlib", "max_stars_repo_head_hexsha": "30e27b010cf4bc5acf0f3a63d50f11789640e0e3", "max_stars_repo_li...
Require Export Lib. Require Export Coq.Classes.RelationClasses. Require Export Coq.Setoids.Setoid. Parameter set : Type. Parameter In : set → set → Prop. Notation "x ∈ X" := (In x X) (at level 69). Notation "x ∉ X" := (not (In x X)) (at level 69). Definition Subq (X Y : set) : Prop := ∀ x : set, x ∈ X → x ∈ Y. Not...
{"author": "jwiegley", "repo": "set-theory", "sha": "ae9714a5b7355fb23b7383a0bc4c90dc00c50264", "save_path": "github-repos/coq/jwiegley-set-theory", "path": "github-repos/coq/jwiegley-set-theory/set-theory-ae9714a5b7355fb23b7383a0bc4c90dc00c50264/Axioms.v"}
import matplotlib.pyplot as plt import numpy as np import time import matplotlib.cm as cm import sys plt.ion() class GEMDistribution(): def __init__(self, alpha): self.alpha = alpha self.cutoffs = [0] def sample(self): rand = np.random.uniform() while self.cutoffs[-1] < rand:...
{"hexsha": "3617fc45daaacfcabb94238e3cf9d354b5c0d225", "size": 2736, "ext": "py", "lang": "Python", "max_stars_repo_path": "stick_break.py", "max_stars_repo_name": "alexandrwang/6882demos", "max_stars_repo_head_hexsha": "7d5b100f348180dfd58a5f73fb839698bfabe436", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3...
""" Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of ...
{"hexsha": "86d6a1c8794db6775bfb30ec3357109ffde08edc", "size": 6975, "ext": "py", "lang": "Python", "max_stars_repo_path": "aggregation/mcs.py", "max_stars_repo_name": "jacgraz/aggregation", "max_stars_repo_head_hexsha": "e6eb7e39d49d6c278befb191b36dfb41500a5ff2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
/* * systools.cpp * * Created on: Sep 25, 2016 * Author: george */ #define BOOST_FILESYSTEM_NO_DEPRECATED #include <boost/filesystem/operations.hpp> #include <boost/filesystem/path.hpp> #include <ctime> #include <stdexcept> #include "systools.hpp" #include "stringtools.hpp" using namespace std; namespace...
{"hexsha": "dab4cbcf2f3ca87ba817d7842129ea9bd7f5f113", "size": 3776, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/tools/systools.cpp", "max_stars_repo_name": "forsyde/DeSyDe", "max_stars_repo_head_hexsha": "48c55861ed78dd240451787258ee286b0f46aea5", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_co...
/* * MIT License * * Copyright (c) 2020 Koki Shinjo * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, mo...
{"hexsha": "dbc2ac26230c5c958d082832f8d57e477cc4ea3c", "size": 6240, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/pointcloud_accumulator.cpp", "max_stars_repo_name": "sktometometo/pointcloud_accumulator", "max_stars_repo_head_hexsha": "31a5030992eda338aea2b2d85e410bee55602d12", "max_stars_repo_licenses": ["...
[STATEMENT] lemma pmdl_idI: assumes "0 \<in> B" and "\<And>b1 b2. b1 \<in> B \<Longrightarrow> b2 \<in> B \<Longrightarrow> b1 + b2 \<in> B" and "\<And>c t b. b \<in> B \<Longrightarrow> monom_mult c t b \<in> B" shows "pmdl B = B" [PROOF STATE] proof (prove) goal (1 subgoal): 1. pmdl B = B [PROOF STEP] proof ...
{"llama_tokens": 1604, "file": "Polynomials_MPoly_Type_Class", "length": 22}
//! \file //! //! Primary Author: Dylan Leeman #include <algorithm> #include <list> #include <boost/lambda/lambda.hpp> #include <boost/bind.hpp> #include <autonomy/action_handler.hpp> namespace autonomy { template < typename EntityT > void entity_base<EntityT>::clear_actions(size_t which_queue) { ...
{"hexsha": "fcafa043fc66f92339263dc96c913cc2652d714e", "size": 1648, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/autonomy/entity.inc.cpp", "max_stars_repo_name": "medlefsen/autonomy", "max_stars_repo_head_hexsha": "ed9da86e9be98dd2505a7f02af9cd4db995e6baf", "max_stars_repo_licenses": ["Artistic-2.0"], "max...
import numpy as np # Load data programs = [] filename = "day12.txt" with open(filename) as f: # Find the number of programs N = len(f.readlines()) # Build adjacency matrix pipes = np.zeros([N, N]) with open(filename) as f: # Populate the adjacency matrix for line in f.readlines(): lin...
{"hexsha": "296b2fe41f43b7ab64682e9f9c8a2edd931cd6b4", "size": 903, "ext": "py", "lang": "Python", "max_stars_repo_path": "2017/day12-1.py", "max_stars_repo_name": "alvaropp/AdventOfCode2017", "max_stars_repo_head_hexsha": "2827dcc18ecb9ad59a1a5fe11e469f31bafb74ad", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from builtins import input from builtins import map from builtins import str from builtins import zip from builtins import range from past.builtins import basestring from past.utils import old_div from builtins impor...
{"hexsha": "8c2f1a7e859472696c52136fe070895d86c6113f", "size": 16255, "ext": "py", "lang": "Python", "max_stars_repo_path": "libraries/utilities_general_v2.py", "max_stars_repo_name": "CortanaIntelligenceGallery/imageclassificationcntklaptop", "max_stars_repo_head_hexsha": "b9327fc279c5ba020f128faee93eb0e9fc077fa1", "m...
import numpy as np from PIL import Image from typing import Tuple SQUARE_COLOR = (255, 0, 0, 255) # Let's make a red square ICON_SIZE = (512, 512) # The recommended minimum size from WordPress def generate_pixels(resolution: Tuple[int, int]) -> np.ndarray: """Generate pixels of an image with the provi...
{"hexsha": "8f9ffc384df81c97c24e1aa9866cf76a0ed5b6c3", "size": 1086, "ext": "py", "lang": "Python", "max_stars_repo_path": "prototypes/red_square.py", "max_stars_repo_name": "vix597/mp3-to-image", "max_stars_repo_head_hexsha": "e9ee5d7453f274440d81a987c793de5a8a49ec2b", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
# name this file 'solutions.py' """Volume II Lab 13: Optimization Packages I (scipy.optimize) <Name> <Class> <Date> """ import scipy.optimize as opt import numpy as np from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import axes3d from blackbox_function import blackbox # Problem 1: use scipy.optimize.min...
{"hexsha": "9ccfd527d662367f3940d6b321c4e94d5e874c70", "size": 3665, "ext": "py", "lang": "Python", "max_stars_repo_path": "Vol2B/scipyoptimize/spec.py", "max_stars_repo_name": "joshualy/numerical_computing", "max_stars_repo_head_hexsha": "9f474e36fe85ae663bd20e2f2d06265d1f095173", "max_stars_repo_licenses": ["CC-BY-3....
\chapter{Installation} \paragraph{Janne Spijkervet} Installation README: \url{https://gitlab.com/uva-robotics/uva-robotics} \paragraph{Uva Robotics}\label{uva-robotics} Repository for the development of intelligent systems for the UvA Intelligent Robotics Lab. Most programs use either ROS or our own Redis/Websockets...
{"hexsha": "5275ea2f7db909a1c2953f8ecd62473b2282690b", "size": 3542, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/preface/installation.tex", "max_stars_repo_name": "uva-robotics/labbook", "max_stars_repo_head_hexsha": "90a29f73a7a1d7603823d7a10822a12dfb1d4d17", "max_stars_repo_licenses": ["Apache-2.0"]...
############### IMPORT PACKAGES ################## import numpy as np from numpy.linalg import inv as inv #Used in kalman filter #Used for naive bayes decoder try: import statsmodels.api as sm except ImportError: print("\nWARNING: statsmodels is not installed. You will be unable to use the Naive Bayes Decoder...
{"hexsha": "501601b484c2fe12641a9af70be3fe0268a65253", "size": 59370, "ext": "py", "lang": "Python", "max_stars_repo_path": "Neural_Decoding/decoders.py", "max_stars_repo_name": "esiabri/Neural_Decoding", "max_stars_repo_head_hexsha": "c4077d0c90876da260e9416d55e785ebefae369c", "max_stars_repo_licenses": ["BSD-3-Clause...
[STATEMENT] lemma atm_of_map_literal[simp]: "atm_of (map_literal f l) = f (atm_of l)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. atm_of (map_literal f l) = f (atm_of l) [PROOF STEP] by (cases l; simp)
{"llama_tokens": 101, "file": "Functional_Ordered_Resolution_Prover_Executable_Subsumption", "length": 1}
Address(Puma Court) is a residential Culdesacs culdesac in South Davis. Intersecting Streets El Macero Drive
{"hexsha": "154c9f24404925660c60ac1c3040ed041c3553a3", "size": 116, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Puma_Court.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from sklearn.impute import SimpleImputer from sklearn.preprocessing import StandardScaler from sklearn.pipeline import Pipeline from sklearn.model_selection import train_test_split from sklearn.experimental import enable_halving_search_cv # noqa from sklearn.metrics import mean_squared_error, r2_score, mean_squared_lo...
{"hexsha": "80784dfcdb379663be171ab447fe63076eb95bde", "size": 11622, "ext": "py", "lang": "Python", "max_stars_repo_path": "modeler/modeler.py", "max_stars_repo_name": "ajmal017/longshot", "max_stars_repo_head_hexsha": "0978fb107ab83034372e0e633483d381ac06f25f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
# This file is a part of JuliaFEM. # License is MIT: see https://github.com/JuliaFEM/ModelReduction.jl/blob/master/LICENSE using ModelReduction @testset "Perform Guyan Reduction" begin K = [ 1.0 -1.0 0.0 0.0 0.0 -1.0 2.0 -1.0 0.0 0.0 0.0 -1.0 2.0 -1.0 0.0 0.0 0.0 -1.0 ...
{"hexsha": "c2864a61ca5bafb6fb7c05f28994b1805e9891bc", "size": 530, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_guyan_reduction.jl", "max_stars_repo_name": "UnofficialJuliaMirror/ModelReduction.jl-d4b734c2-cabc-57bd-991d-11b386a60271", "max_stars_repo_head_hexsha": "84c4db7b461e0383025c69f38f7b73e9c...
# Evaluate precision of image classification in a given image region # Instructions: # a) Set folder of images in Image_Dir # c) Set folder for ground truth Annotation in AnnotationDir # The Label Maps should be saved as png image with same name as the corresponding image and png ending. The value of each pixel corr...
{"hexsha": "1c465eea594f4a857f85aba181b0c6af1aa42352", "size": 5672, "ext": "py", "lang": "Python", "max_stars_repo_path": "EvaluateAccuracy.py", "max_stars_repo_name": "sagieppel/Classification-of-the-material-given-region-of-an-image-using-a-convolutional-neural-net-with-attent", "max_stars_repo_head_hexsha": "2c78f0...
import os import json import numpy as np import librosa from inputs import get_bit_rates_and_waveforms from inputs import get_truth_ds_filename_pairs import tensorflow as tf from models import deep_residual_network data_settings = os.path.join('settings', 'data_settings.json') model_settings_file = os.path.join('setti...
{"hexsha": "8391a0e5dfcc8064e3472d569a1da9ce92417c7c", "size": 3622, "ext": "py", "lang": "Python", "max_stars_repo_path": "upsample_audio_file.py", "max_stars_repo_name": "Tom-Evers/EnglishSpeechUpsampler", "max_stars_repo_head_hexsha": "779d534e61575cf63fa420274accb0edef6b1597", "max_stars_repo_licenses": ["MIT"], "m...
SUBROUTINE PLTSET C C COMMENTS FROM G.C. - C THE DRIVER FOR DMAP MODULE PLTSET IS DPLTST C THIS ROUTINE HAS NOTHING TO DO WITH DPLTST. IT IS CALLED ONLY C BY PARAM (IN MODULE PLOT), XYPLOT, AND SEEMAT C C LOGICAL TAPBIT INTEGER CHRWRD,PBFSIZ,PBUFSZ,PDATA,PLTDA...
{"hexsha": "0de08bef769ce63713ab3fca404c9ddb1fb8d81b", "size": 3117, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "mis/pltset.f", "max_stars_repo_name": "ldallolio/NASTRAN-95", "max_stars_repo_head_hexsha": "6d2c175f5b53ebaec4ba2b5186f7926ef9d0ed47", "max_stars_repo_licenses": ["NASA-1.3"], "max_stars_count": ...
/******************************************************************************* Copyright (c) 2017, Honda Research Institute Europe GmbH Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of sour...
{"hexsha": "929c99a2491c0b522d044a358cac1cd10b1fc362", "size": 15402, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/RcsCore/Rcs_eigen.cpp", "max_stars_repo_name": "famura/Rcs", "max_stars_repo_head_hexsha": "4f8b997d2649a2cd7a1945ea079e07a71ee215fc", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
''' 140819: move lr into fit add time recording add pred add prob 2014/09/03: change the last layer into softmax 2015/02/01: normalize the w ''' import cPickle import gzip import os import sys import time import numpy from numpy import * import theano import...
{"hexsha": "e04ce3bdbbf6c8d7929e543bb43a061776d919c5", "size": 13318, "ext": "py", "lang": "Python", "max_stars_repo_path": "ML/adder/mnist_mlp.py", "max_stars_repo_name": "PiscesDream/Ideas", "max_stars_repo_head_hexsha": "9ba710e62472f183ae4525f35659cd265c71392e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
import cirq import numpy as np from cirq.ops.common_gates import ZPowGate from cirq.circuits.qasm_output import QasmUGate #Got flags from: https://github.com/alexandrupaler/fondq def is_op_with_decomposed_flag(op, gate_type): if op == gate_type: return hasattr(op, "decomposed") return False def reset...
{"hexsha": "8610c918d4027b84535686024417b317df2c5188", "size": 3327, "ext": "py", "lang": "Python", "max_stars_repo_path": "VOQC/interop/cirq/decompose_cirq_gates.py", "max_stars_repo_name": "taorunz/SQIR", "max_stars_repo_head_hexsha": "e826699c9063be390f7e9d25b6f3c0b52ee5d25c", "max_stars_repo_licenses": ["MIT"], "ma...
OPEN (F,STATUS = 'SCRATCH') !Temporary disc storage.
{"hexsha": "a0a0918f45b6db980ced377ea13ebef9971160ab", "size": 63, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Task/Secure-temporary-file/Fortran/secure-temporary-file.f", "max_stars_repo_name": "LaudateCorpus1/RosettaCodeData", "max_stars_repo_head_hexsha": "9ad63ea473a958506c041077f1d810c0c7c8c18d", "max_s...
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to 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) #i...
{"hexsha": "9c8cef1c5391cfc546325de7dca7cce731ff5768", "size": 10039, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "build/lua-reader/include/boost-1.60.0/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp", "max_stars_repo_name": "LazyPlanet/MX-Client", "max_stars_repo_head_hexsha": "07ac4ada4507fb7...
### A Pluto.jl notebook ### # v0.14.2 using Markdown using InteractiveUtils # This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). macro bind(def, element) quote loc...
{"hexsha": "9449f88a26390bc8eb1778a732f91cc75fd38b36", "size": 43511, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "notebooks/week1/images.jl", "max_stars_repo_name": "rfhklwt/18S191_notebook", "max_stars_repo_head_hexsha": "beb6001d2fc92a317cb9e578a60d83222512bebb", "max_stars_repo_licenses": ["MIT"], "max_sta...
from pytest import approx import pytest import numpy as np from tests.context import LexRankSummarizer from sadedegel.tokenize import Doc @pytest.mark.skip() def test_lxr_summarizer_all_lower(): summ = LexRankSummarizer("log_norm", "smooth", normalize=False) assert summ.predict(Doc('ali topu tut. oya ip atla...
{"hexsha": "c9d9b5e0d23ec6b9aa2a24be9d355456cdda8d98", "size": 793, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/summarizer/test_lxr.py", "max_stars_repo_name": "GlobalMaksimum/sadedegel", "max_stars_repo_head_hexsha": "8e28dbeabc3bf0d6f2222089ac5e3a849f9d3a6b", "max_stars_repo_licenses": ["MIT"], "max_...
from __future__ import print_function, division from random import randint, uniform, choice, sample from sklearn.metrics import roc_curve, auc from sklearn.metrics import confusion_matrix import math import numpy as np PRE, REC, SPEC, FPR, NPV, ACC, F1 = 7, 6, 5, 4, 3, 2, 1 def _randint(a=0,b=0): if a < b: ...
{"hexsha": "61601a714ff4227079bb0e4dc5a84dcd94d50a0b", "size": 4472, "ext": "py", "lang": "Python", "max_stars_repo_path": "utilities.py", "max_stars_repo_name": "snaraya7/simplifying-software-analytics", "max_stars_repo_head_hexsha": "446a687f5d32ab66d53132d0889ce39eaca13ea6", "max_stars_repo_licenses": ["MIT"], "max_...
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) (* v * INRIA, CNRS and contributors - Copyright 1999-2018 *) (* <O___,, * (see CREDITS file for the list of authors) *) (* \VV/ *********...
{"author": "princeton-vl", "repo": "CoqGym", "sha": "0c03a6fba3a3ea7e2aecedc1c624ff3885f7267e", "save_path": "github-repos/coq/princeton-vl-CoqGym", "path": "github-repos/coq/princeton-vl-CoqGym/CoqGym-0c03a6fba3a3ea7e2aecedc1c624ff3885f7267e/coq/test-suite/ssr/have_transp.v"}
[STATEMENT] lemma unique_declared_in: "\<lbrakk>G\<turnstile>m declared_in C; G\<turnstile>n declared_in C; memberid m = memberid n\<rbrakk> \<Longrightarrow> m = n" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>G\<turnstile> m declared_in C; G\<turnstile> n declared_in C; memberid m = memberid n\<rbrakk...
{"llama_tokens": 181, "file": null, "length": 1}
import atexit import csv import os import platform import psutil import random import matplotlib.pyplot as plt import numpy as np from .util.EpisodeScheduler import EpisodeScheduler from .util.StateSet import StateSet, Select, SelectPolicy def get_random_port(): rand = random.Random() while True: po...
{"hexsha": "fe07307ee21bb4874312d17759c9ad5bfe59421f", "size": 7821, "ext": "py", "lang": "Python", "max_stars_repo_path": "minos/lib/common.py", "max_stars_repo_name": "ZhuFengdaaa/minos", "max_stars_repo_head_hexsha": "b710e9fbad67b18bafedd0d528a7559d8379b9cb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Jul 25 14:52:15 2020 @author: cxue2 """ from datetime import datetime import numpy as np from sklearn.metrics import confusion_matrix from sklearn.metrics import roc_auc_score, roc_curve, auc from sklearn.metrics import precision_recall_curve, average_p...
{"hexsha": "c4d843cad53d0408b55fcf053412644c596f52a8", "size": 4554, "ext": "py", "lang": "Python", "max_stars_repo_path": "azrt2021/misc.py", "max_stars_repo_name": "vkola-lab/azrt2021", "max_stars_repo_head_hexsha": "a75c1302434c4578daf4cde119cfa50f552a9a43", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, ...
"""Signal detection capabilities for amodem.""" import collections import itertools import logging import numpy as np from . import dsp from . import equalizer from . import common log = logging.getLogger(__name__) class Detector: COHERENCE_THRESHOLD = 0.9 CARRIER_DURATION = sum(equalizer.prefix) CA...
{"hexsha": "7677e90dbd47270b07d5dc3141dcb467bc7456ef", "size": 4044, "ext": "py", "lang": "Python", "max_stars_repo_path": "amodem/detect.py", "max_stars_repo_name": "Matthew-MK/amodem", "max_stars_repo_head_hexsha": "a75dda9ab0f7445589a036357e604703ccb34726", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 766,...
import os import random import time import cv2 import numpy as np import tensorflow as tf from tensorflow.keras.callbacks import CSVLogger from tensorflow.keras.metrics import Accuracy, CategoricalAccuracy from tensorflow.keras.models import load_model from tensorflow.python.keras.callbacks import LearningRateSchedule...
{"hexsha": "162d4db3235aa0f22a77e3c7280725de879bf93f", "size": 3750, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/densenet/model.py", "max_stars_repo_name": "SchiffFlieger/semantic-segmentation-master-thesis", "max_stars_repo_head_hexsha": "f54b8321a9e0828e492bc6847acbff80c1a75d7c", "max_stars_repo_lic...
# # Copyright 2020 Antoine Sanner # # ### MIT license # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, me...
{"hexsha": "a218731124beda9fb8e32bf37cbbed5536f7bfb9", "size": 9884, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/ReferenceSolutions/test_sphere_jkr.py", "max_stars_repo_name": "ContactEngineering/Adhesion", "max_stars_repo_head_hexsha": "acc46ad9bfe49fec667cb9a116ebde426faa38c4", "max_stars_repo_license...
import statistics import numpy as np import pandas as pd def upSampling(data, column, bins=100, target_samples="mean"): """ This function will down-up sampling data to mean samples of column's data. data: pandas DataFrame column: name of column in DataFrame """ is_warned = False # Get target column from DataFr...
{"hexsha": "0c36e2bb7de339034cf90a399f4a0757df3b727b", "size": 2812, "ext": "py", "lang": "Python", "max_stars_repo_path": "utilities/sampling/upSampling.py", "max_stars_repo_name": "TeaKatz/Binary_Search_Optimization", "max_stars_repo_head_hexsha": "728d17ce5ca91aef62497a749e7dd75475c2bd5a", "max_stars_repo_licenses":...
''' imports and config for image recognition ''' from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import sys import time import numpy as np import tensorflow as tf from PIL import Image # for image resizing UPLOAD_FOLDER = '/home/sidearmjoh...
{"hexsha": "a48e2afe58f76f7cdf2598c5f6511a85dd23153b", "size": 4711, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "john-running/GardenSpy", "max_stars_repo_head_hexsha": "42a3a2797fbc5ca1da1e4fb6c0d597f8a3479e0e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": n...
using Lazy using BenchmarkTools function fib(n) a,b = 0,1 for i in 1:(n-1) a,b = b,a+b end return a end fibs = @lazy 0:1:(fibs + drop(1, fibs)); println(@benchmark fib(20)) println(@benchmark take(20,fibs))
{"hexsha": "f95f84ed350dfcbe4f0dc68a4fcf50f5409f34e2", "size": 222, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "fib-bench.jl", "max_stars_repo_name": "vmchale/julia-problem-solving", "max_stars_repo_head_hexsha": "beac7fcf80f551b3f88eb190e12dead42ccf098a", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
import os import random import sys import catboost import numpy as np import pandas import pandas as pd MODELS_PATH = os.path.dirname(os.path.realpath(__file__)) SEED = 42 def reseed(seed=SEED): np.random.seed(seed) random.seed(seed) def preprocess(df): df['longitude'] = df['longitude'].astype(np.flo...
{"hexsha": "4de21370596af5edc85df245ff8b278258eff078", "size": 1234, "ext": "py", "lang": "Python", "max_stars_repo_path": "catboost_simple/predict.py", "max_stars_repo_name": "vladsam80/wildfire", "max_stars_repo_head_hexsha": "ee8ec6bf6ee9eb490115d2221b1c303422193e69", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# --- # title: 889. Construct Binary Tree from Preorder and Postorder Traversal # id: problem889 # author: Tian Jun # date: 2020-10-31 # difficulty: Medium # categories: Tree # link: <https://leetcode.com/problems/construct-binary-tree-from-preorder-and-postorder-traversal/description/> # hidden: true # --- # # Return...
{"hexsha": "df63aa608173503783179a101607efb4c1bd7bf4", "size": 943, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/unresolved/889.construct-binary-tree-from-preorder-and-postorder-traversal.jl", "max_stars_repo_name": "noob-data-analaysis/LeetCode.jl", "max_stars_repo_head_hexsha": "94d91b295e988948e77e737c1...
! ! CRTM_LowFrequency_MWSSEM ! ! Module containgin routines to compute microwave ocean emissivity components ! (FWD, TL, and AD) for low frequencies. ! ! ! CREATION HISTORY: ! Written by: Masahiro Kazumori, JCSDA 31-Jul-2006 ! Masahiro.Kazumori@noaa.gov ! Quanhua Li...
{"hexsha": "ef3e200756e0aacb4db9efbbb8f0ce1b9bcea9c6", "size": 45299, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/MW/Water/CRTM_FASTEM/CRTM_LowFrequency_MWSSEM.f90", "max_stars_repo_name": "JCSDA-internal/CSEM1.0.0", "max_stars_repo_head_hexsha": "e1adf653b66f129c7c1f8f116b36779b10b7fd44", "max_stars_r...
# -*- python -*- # -*- coding: utf-8 -*- # # eric m. gurrola <eric.m.gurrola@jpl.nasa.gov> # # (c) 2018-2021 jet propulsion laboratory # (c) 2018-2021 california institute of technology # all rights reserved # # United States Government Sponsorship acknowledged. Any commercial use must be negotiated with # the Office o...
{"hexsha": "b779132510a161ee0ff573ac061978270af24e79", "size": 14938, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/cdm/cdm/libcdm.py", "max_stars_repo_name": "lijun99/altar", "max_stars_repo_head_hexsha": "92c2915de3de0c51138d382c8192ead7d6eed1a1", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
//---------------------------------------------------------------------------// //! //! \file tstDynamicOutputFormatterFactory.cpp //! \author Alex Robinson //! \brief The dynamic output formatter factory unit tests //! //---------------------------------------------------------------------------// // Std Lib Inclu...
{"hexsha": "3af11f70762b31c9b5664cb600cdbcfffc9e14ff", "size": 24594, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "packages/utility/core/test/tstDynamicOutputFormatterFactory.cpp", "max_stars_repo_name": "bam241/FRENSIE", "max_stars_repo_head_hexsha": "e1760cd792928699c84f2bdce70ff54228e88094", "max_stars_repo_...
#!/usr/bin/env python # coding: utf-8 # In[1]: import astropy import subprocess import shlex import pandas as pd import numpy as np from astropy.table import Table from astropy.table import Column import os import glob2 import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import SNID_A...
{"hexsha": "1630c522064a0773ae91e4d0fe845b7c0d8ff2c3", "size": 1632, "ext": "py", "lang": "Python", "max_stars_repo_path": "SNID_Multi_Analysis_AllTemplates.py", "max_stars_repo_name": "adamamiller/supernova-spectrum-analysis", "max_stars_repo_head_hexsha": "1f7816bdc7dadb1a9a2ee3a97a1f77dd6f0c06dd", "max_stars_repo_li...
# coding=utf-8 # Copyright 2021 The Ravens Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
{"hexsha": "f36beaa02a48cb6c68edf44e27f6c48b6f313d78", "size": 30459, "ext": "py", "lang": "Python", "max_stars_repo_path": "ravens/agents/transporter.py", "max_stars_repo_name": "YunchuZhang/Learning-to-use-different-tools-for-objects-rearrangement", "max_stars_repo_head_hexsha": "3759664cd77b5810834937c478a9a44ad36ac...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import pandas as pd import numpy as np from reco_utils.common.constants import ( DEFAULT_USER_COL, DEFAULT_ITEM_COL, DEFAULT_RATING_COL, DEFAULT_LABEL_COL ) def user_item_pairs( user_df, item_df, ...
{"hexsha": "576234118ec9b6afcaef5f24d044ebff9e8fb89e", "size": 9338, "ext": "py", "lang": "Python", "max_stars_repo_path": "reco_utils/dataset/pandas_df_utils.py", "max_stars_repo_name": "kecoli/Recommenders", "max_stars_repo_head_hexsha": "892d0d8a3c866eca0b8f55e6f6a58d2b15a56b4c", "max_stars_repo_licenses": ["MIT"], ...
# -*- coding: UTF-8 -*- """ ANTARES Object class specification """ from __future__ import absolute_import from __future__ import unicode_literals import warnings import numpy as np from . import constants from .features.base import BaseMixin from astropy.stats import sigma_clip import extinction __all__ = ['LAobject'...
{"hexsha": "16d3245a3189c51d777ae363f18e0b878a45a160", "size": 16041, "ext": "py", "lang": "Python", "max_stars_repo_path": "astrorapid/ANTARES_object/LAobject.py", "max_stars_repo_name": "mcoughlin/astrorapid", "max_stars_repo_head_hexsha": "ec0cf99d2bca25f617eed4b36185c25ef3015c5b", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python3 # # Copyright 2015 Signal Processing Devices Sweden AB. All rights reserved. # # Description: ADQ14 FWDAQ streaming example # Documentation: # import numpy as np import scipy.signal as signal import ctypes as ct import matplotlib.pyplot as plt import sys import time import os sys.path.insert...
{"hexsha": "913e6b796258f4b8da39a9282fd3c2ac8276a073", "size": 10499, "ext": "py", "lang": "Python", "max_stars_repo_path": "HHGMonitor/ADQ14_FWSDR_streaming_example.py", "max_stars_repo_name": "thomasbarillot/DAQ", "max_stars_repo_head_hexsha": "20126655f74194757d25380680af9429ff27784e", "max_stars_repo_licenses": ["M...
import numpy as np import pytest from sklearn.exceptions import NotFittedError from deslib.static.static_selection import StaticSelection from sklearn.utils.estimator_checks import check_estimator from sklearn.tree import DecisionTreeClassifier def test_check_estimator(): check_estimator(StaticSelection) # Tes...
{"hexsha": "730c4f2a14e23807aeb5875676d2a5d1021d2737", "size": 2722, "ext": "py", "lang": "Python", "max_stars_repo_path": "deslib/tests/static/test_static_selection.py", "max_stars_repo_name": "mrtrunghieu1/Mutil-DesLib-Algorithm", "max_stars_repo_head_hexsha": "4fd82c553adc34561f6698b18a08ad89a58deee6", "max_stars_re...
import copy import itertools import logging import os.path as osp from collections import defaultdict from typing import Any, Dict, Iterable, List, NamedTuple, Optional, Tuple import numpy as np import torch from torch.nn.modules import Module from torch.nn.parallel import DataParallel, DistributedDataParallel from i...
{"hexsha": "562e00b190b47aa2c3f6a299356c14f28c4a5898", "size": 13125, "ext": "py", "lang": "Python", "max_stars_repo_path": "imix/utils/checkpoint.py", "max_stars_repo_name": "linxi1158/iMIX", "max_stars_repo_head_hexsha": "af87a17275f02c94932bb2e29f132a84db812002", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
// // Copyright (c) 2015-2016 Vinnie Falco (vinnie dot falco at gmail dot com) // // 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) // #ifndef BEAST_CORE_FILE_HPP #define BEAST_CORE_FILE_HPP #include <beast/config.h...
{"hexsha": "8b3eecc874a0294b4aa72a0a599273ee92a3ff4e", "size": 888, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/beast/include/beast/core/file.hpp", "max_stars_repo_name": "Py9595/Backpack-Travel-Underlying-Code", "max_stars_repo_head_hexsha": "c5758792eba7cdd62cb6ff46e642e8e4e4e5417e", "max_stars_repo_lice...
import numpy as np import sys import sklearn from sklearn import metrics import matplotlib matplotlib.use('agg') from matplotlib import pyplot as plt models = sys.argv[1:] cnt = 0 maker = ['<','|','^','s','d','x','p','*','o'] #color = ['b','g','c','#FF00FF','y','m','#FF0000'] for model_name in models: x = np.load...
{"hexsha": "6a27cb62f0fbbf1ae26cda9d01b361f22e3caf22", "size": 3905, "ext": "py", "lang": "Python", "max_stars_repo_path": "algorithm/draw_plot.py", "max_stars_repo_name": "CrisJk/PA-TRP", "max_stars_repo_head_hexsha": "e1d846667153787070aaf0fe83414c3d38795941", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
""" Unit tests for trust-region iterative subproblem. To run it in its simplest form:: nosetests test_optimize.py """ from __future__ import division, print_function, absolute_import import numpy as np from scipy.optimize._trustregion_exact import ( estimate_smallest_singular_value, singular_leading_submat...
{"hexsha": "92ffe91873c4c0e6694cad77a8fccb65c37fd9dd", "size": 13044, "ext": "py", "lang": "Python", "max_stars_repo_path": "scipy/optimize/tests/test_trustregion_exact.py", "max_stars_repo_name": "ririw/scipy", "max_stars_repo_head_hexsha": "680ecf8c52966343827903e6b7983b1ef7323fe2", "max_stars_repo_licenses": ["BSD-3...
\documentclass[12pt]{article} \begin{document} \author{Luyu Liu} \newcounter{para} \newcommand\para{\par\refstepcounter{para}\thepara\space} \section*{CSE 5194 WEEK3- Basic idea} \title{CSE 5194 WEEK3 - Basic idea} \paragraph{Define-by-run and define-and-run} Which of them has better performance: ...
{"hexsha": "ceb8ed2bb116b4b1c0eaad4bc94c955fdc788d74", "size": 2783, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "notes/WEEK3_BasicIdeasContinue.tex", "max_stars_repo_name": "luyuliu/CSE-5194", "max_stars_repo_head_hexsha": "52970106c21b30e64d4cf1df26bec09929494060", "max_stars_repo_licenses": ["MIT"], "max_sta...
# License: BSD 3 clause import numpy as np from .base import SolverFirstOrderSto from .build.solver import SGDDouble as _SGDDouble from .build.solver import SGDFloat as _SGDFloat __author__ = "Stephane Gaiffas" dtype_class_mapper = { np.dtype('float32'): _SGDFloat, np.dtype('float64'): _SGDDouble } # TODO:...
{"hexsha": "0af29642979613ca9a864d1637aee1ed5ca3f513", "size": 5714, "ext": "py", "lang": "Python", "max_stars_repo_path": "tick/solver/sgd.py", "max_stars_repo_name": "sumau/tick", "max_stars_repo_head_hexsha": "1b56924a35463e12f7775bc0aec182364f26f2c6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": ...
/* Copyright 2010 Larry Gritz and the other authors and contributors. All Rights Reserved. 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 noti...
{"hexsha": "299a7cd6bae76407465e38af3d3fda5ef212e237", "size": 12626, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/libutil/colortransfer.cpp", "max_stars_repo_name": "ndubey/oiio", "max_stars_repo_head_hexsha": "fb00e178be048c31f478076977d17434c310472c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
/**********************************************************\ Original Author: Richard Bateman and Georg Fritzsche Created: December 3, 2009 License: Dual license model; choose one of two: New BSD License http://www.opensource.org/licenses/bsd-license.php - or - GNU...
{"hexsha": "548e6a71ef3c984b9054622d5c145db127d668f0", "size": 1998, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "chrome/plugin/examples/FBTestPlugin/SimpleMathAPI.cpp", "max_stars_repo_name": "Faham/bric-n-brac", "max_stars_repo_head_hexsha": "c886e0855869a794700eb385171bbf5bfd595aed", "max_stars_repo_licenses...
#----------------------- Artificial Neural Network for classification --------------------# #importing required libraries import numpy as np import pandas as pd import tensorflow as tf from sklearn.compose import ColumnTransformer from sklearn.preprocessing import OneHotEncoder from sklearn.preprocessing import LabelEn...
{"hexsha": "ca9af6e0b8e6544c066119019b6aecc0066d6cb4", "size": 4863, "ext": "py", "lang": "Python", "max_stars_repo_path": "Projects/Image-Recognition-Dog,Cat/Model/Artificial_Neural_Network_Case_Study.py", "max_stars_repo_name": "Raj123-github/Data_Science_portfolio", "max_stars_repo_head_hexsha": "4733f733c0121cef598...
# Standard library import os from os import path import sys # Third-party from astropy.table import Table, hstack import astropy.units as u import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from isochrones import StarModel from isochrones.observation import Source, Observation, ObservationTr...
{"hexsha": "460babdb8710a62ef86a86c7a3e322c110619d4b", "size": 4968, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/run_isochrones_sample.py", "max_stars_repo_name": "adrn/dr2-lmc-cluster", "max_stars_repo_head_hexsha": "9e90cf4c130d35f8c79a327cef978acf99c3b2bf", "max_stars_repo_licenses": ["MIT"], "max...
import numpy import sys import nmslib import time import math from multiprocessing import Process from xclib.data import data_utils def write_knn_out(out_dir,write_dist,num_inst,nbrs,batch_no,metric_space): with open('%s/%d'%(out_dir,batch_no),'w') as fp: fp.write('%d %d\n'%(len(nbrs),num_inst)) if write_dist == ...
{"hexsha": "a67bea23eeccce984afba270d8db02b4599d2f2f", "size": 2111, "ext": "py", "lang": "Python", "max_stars_repo_path": "ANNS/test_hnsw.py", "max_stars_repo_name": "WestbrookGE/SliceSparse", "max_stars_repo_head_hexsha": "a6387763d2e919a995a0b9c9c3e5a3bffef0cf95", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
using LoopVectorization using Base: OneTo using LinearAlgebra: stride1 using Test add_1_dim(x::AbstractArray) = reshape(x, size(x)..., 1) check_finite(x::AbstractArray) = all(isfinite.(x)) || throw(error("x not finite!")) "Given k-dimensional array `x` where `n=size(x,k)`, compute multinomial logistic Pr(i ∈ 1:n | x[...
{"hexsha": "17b0f475731644777747d6d6fa789a9206f40935", "size": 5401, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "example/softmax3test.jl", "max_stars_repo_name": "magerton/ShaleDrillingLikelihood.jl", "max_stars_repo_head_hexsha": "cd883f82ec381d3c6d87db59224e4a35c09c1551", "max_stars_repo_licenses": ["MIT"],...
# -*- coding: utf-8 -*- """ Created on Wed Apr 25 11:34:44 2018 @author: conte """ import sys import cv2 import skimage import numpy import approaches.approach0.approach0 as a0 import approaches.approach1.approach1 as a1 import approaches.approach2.approach2 as a2 import approaches.approach3.approach3 as a3 import app...
{"hexsha": "37b7444ead7f44f1162ffc932716f780ea1e0c92", "size": 2438, "ext": "py", "lang": "Python", "max_stars_repo_path": "virtualHeartRate.py", "max_stars_repo_name": "Aurielws/2SRPy", "max_stars_repo_head_hexsha": "292d36faca8e57ed41635dba1d055e82fb27508f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import numpy as np import pandas as pd import matplotlib.pyplot as plt import warnings warnings.filterwarnings("ignore") import yfinance as yf yf.pdr_override() import datetime as dt from sklearn.metrics import accuracy_score from sklearn.linear_model import LinearRegression import datetime as dt symbol = 'AAPL' star...
{"hexsha": "59954340de4a56634c93e27e3753a0da6cb165eb", "size": 1338, "ext": "py", "lang": "Python", "max_stars_repo_path": "Machine_Learning/stock_simple_ml.py", "max_stars_repo_name": "vhn0912/Finance", "max_stars_repo_head_hexsha": "39cf49d4d778d322537531cee4ce3981cc9951f9", "max_stars_repo_licenses": ["MIT"], "max_s...
""" The pycity_scheduling framework Copyright (C) 2022, Institute for Automation of Complex Power Systems (ACS), E.ON Energy Research Center (E.ON ERC), RWTH Aachen University Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Softwa...
{"hexsha": "5030a6988ac208bd2d3118b05fed4523515306f8", "size": 11526, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pycity_scheduling/classes/timer.py", "max_stars_repo_name": "ElsevierSoftwareX/SOFTX-D-20-00087", "max_stars_repo_head_hexsha": "d2d3f1effda2c0499cb05abf87435375a21379e3", "max_stars_repo_lic...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 9 18:15:20 2019 @author: diyixuan """ from VorDiff.reverse_operator import ReverseOperator as rop from VorDiff.reverse_autodiff import ReverseAutoDiff as rad import numpy as np import math x = rad.reverse_scalar(0.5) c = 0.5 def test_sin(): ...
{"hexsha": "bc42b7ccbaa128e8edbd0c5fcdef7240b252d16e", "size": 2896, "ext": "py", "lang": "Python", "max_stars_repo_path": "VorDiff/tests/test_reverse_operator.py", "max_stars_repo_name": "VoraciousFour/VorDiff", "max_stars_repo_head_hexsha": "9676462b028e532b10ebf38989b5014763b7260e", "max_stars_repo_licenses": ["MIT"...
#include <iostream> #include <cmath> #include <algorithm> #include <vector> #include <boost/multiprecision/cpp_int.hpp> #include <boost/lexical_cast.hpp> using namespace boost::multiprecision; using namespace std; void solve(cpp_int x, vector<cpp_int> &v) { if (x > 3234566667) return; v.push_back(x); cpp_in...
{"hexsha": "354a4ea955cbc0ec09da053b491b72a385d4eaeb", "size": 622, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "AtCoder/abc161/d/main.cpp", "max_stars_repo_name": "H-Tatsuhiro/Com_Pro-Cpp", "max_stars_repo_head_hexsha": "fd79f7821a76b11f4a6f83bbb26a034db577a877", "max_stars_repo_licenses": ["MIT"], "max_stars_...
[STATEMENT] lemma append_rows_access1 [simp]: assumes "i < dim_row A" assumes "dim_col A = dim_col B" shows "row (A @\<^sub>r B) i = row A i" [PROOF STATE] proof (prove) goal (1 subgoal): 1. row (A @\<^sub>r B) i = row A i [PROOF STEP] proof [PROOF STATE] proof (state) goal (2 subgoals): 1. \<And>ia. ia < dim_v...
{"llama_tokens": 2120, "file": "Linear_Programming_More_Jordan_Normal_Forms", "length": 19}
import pygame from neuron import Neuron import numpy as np class NeuronG(Neuron): def __init__(self, pos, v_r = 0, R_m = 1, tau = 1, threshold = 0.2, scale = 1, **kwargs): super().__init__(v_r, R_m, tau, threshold, **kwargs) self.pos = np.array(pos) self.scale = scale self.unit_scale = 20 val = int(self.v /...
{"hexsha": "ef5d341ed87f20065cb472ff5bae657ab6d20c7a", "size": 2036, "ext": "py", "lang": "Python", "max_stars_repo_path": "final/neurongraphics.py", "max_stars_repo_name": "SamKG/bic-final", "max_stars_repo_head_hexsha": "f29f21c4b207e7d84f81f451f3eb677c0be98f0c", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from __future__ import print_function import os import logging import numpy as np import scipy.misc try: from StringIO import StringIO # Python 2.7 except ImportError: from io import BytesIO # Python 3.x def set_logger(log_path, log_name='training'): if log_path is None: print('log_path is empty'...
{"hexsha": "b92811e92f3e3aae1f86e916db3a936523ba9011", "size": 862, "ext": "py", "lang": "Python", "max_stars_repo_path": "framework/logbase.py", "max_stars_repo_name": "AIM3-RUC/video-paragraph", "max_stars_repo_head_hexsha": "072e7447a6bc12080f0baa3d41e9e96d3d240221", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
% Options for packages loaded elsewhere \PassOptionsToPackage{unicode}{hyperref} \PassOptionsToPackage{hyphens}{url} % \documentclass[ man]{apa6} \usepackage{amsmath,amssymb} \usepackage{lmodern} \usepackage{iftex} \ifPDFTeX \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{textcomp} % provide eu...
{"hexsha": "8b477a6982724287f0926e8a372e09ccedb3d7a2", "size": 24733, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "studies/complexity_benchmark/manuscript.tex", "max_stars_repo_name": "danibene/NeuroKit", "max_stars_repo_head_hexsha": "df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a", "max_stars_repo_licenses": ["MIT"...
import numpy as np; from .covariance_target import CovarianceTarget; class AdaptiveCovariance(CovarianceTarget): def __init__(self, decay_rate= 1.0, percentile=.50): self.gamma = decay_rate; self.percentile = percentile; def _reset(self, initial_mean, initial_covariance): self._covari...
{"hexsha": "064b58662165c6012c4d5844b42057afc0af2be3", "size": 1512, "ext": "py", "lang": "Python", "max_stars_repo_path": "learnedevolution/targets/covariance/adaptive_covariance.py", "max_stars_repo_name": "realtwister/LearnedEvolution", "max_stars_repo_head_hexsha": "2ec49b50a49acae9693cfb05ac114dfbcc4aa337", "max_s...
import os, time, glob, imageio import torch import torch.nn as nn from torch.utils.data import DataLoader, Dataset import numpy as np from util import run_model, get_args from dataloader import KneeData, KneeManager from collections import Counter import cv2, glob, scipy.ndimage def get_label(path): """ label...
{"hexsha": "313c3a6a42a93fcc705702b3390fd8dada15934d", "size": 13754, "ext": "py", "lang": "Python", "max_stars_repo_path": "frontend.py", "max_stars_repo_name": "vkola-lab/mrm2019", "max_stars_repo_head_hexsha": "0f0c73e3b4f95b7a5eb06356043455390b8e9109", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_...
module CellMLToolkit using MathML using SymbolicUtils: FnType, Sym, operation using ModelingToolkit using EzXML include("cellml.jl") """ reads a CellML path or io and returns an ODESystem """ function read_cellml(path, tspan) xml = readxml(path) ml = CellModel(xml, process_cellml_xml(xml)) ODEProble...
{"hexsha": "d32e5b1002e09d7bd5ae54c247787784dc17c039", "size": 2574, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/CellMLToolkit.jl", "max_stars_repo_name": "anandijain/CellMLToolkit.jl", "max_stars_repo_head_hexsha": "adf6c38d1f3c125306d8212f5e17d3190a9f6539", "max_stars_repo_licenses": ["MIT"], "max_stars...
[STATEMENT] lemma n_gt_1: "n > 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. 1 < n [PROOF STEP] using kyber_spec_axioms kyber_spec_def [PROOF STATE] proof (prove) using this: kyber_spec TYPE('a) TYPE('k) n q k n' kyber_spec TYPE(?'a) TYPE(?'k) ?n ?q ?k ?n' \<equiv> ((?n = 2 ^ ?n' \<and> 0 < ?n') \<and> 2 < ?q \<...
{"llama_tokens": 283, "file": "CRYSTALS-Kyber_Kyber_spec", "length": 2}
/****************************************************************** * * mUPnP for C * * Copyright (C) Satoshi Konno 2005 * Copyright (C) 2006 Nokia Corporation. All rights reserved. * * This is licensed under BSD-style license, see file COPYING. * ***************************************************************...
{"hexsha": "11a9425983d19d5f3ae5ef3dae2cab5c9fc6e771", "size": 1435, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "app/src/main/cpp/mupnp/src/tests/DeviceTest.cpp", "max_stars_repo_name": "ytxhao/CyberLink2Android", "max_stars_repo_head_hexsha": "3f9777fce21382c32572c524de3b2a9dfeac623f", "max_stars_repo_license...
import math import numpy class FeatureMapper(object): def __init__(self, features): self.features = features def map(self, fv): raise NotImplementedError def __call__(self, doc): for chain in doc.chains: for c in chain.candidates: c.fv = self.map(nu...
{"hexsha": "f85f1170730cc9dd0ec97b456f9f454490b8d4ae", "size": 1503, "ext": "py", "lang": "Python", "max_stars_repo_path": "nel/features/mapping.py", "max_stars_repo_name": "psyML/nel", "max_stars_repo_head_hexsha": "5ce1f0b2ef6246f27113ffe2d80d9b95f05f884e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 196, ...