text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
import unittest
import import_ipynb
import pandas as pd
import pandas.testing as pd_testing
import numpy.testing as np_testing
import pandas as pd
import numpy as np
from sklearn import preprocessing
from sklearn import ensemble
from sklearn import model_selection
from scipy import stats
class Test(unittest.TestCase)... | {"hexsha": "21a2ded0d412b6cacee42cf3b37b3d3a1675aadc", "size": 2062, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter08/Activity8.01/Test_Activity8_01.py", "max_stars_repo_name": "pmayd/The-Data-Science-Workshop", "max_stars_repo_head_hexsha": "a712f1fdbdf839c8b9288f4d4cdebcf5ebe146c4", "max_stars_repo_li... |
#!/usr/bin/env python
# Noise2Void - 2D Example for SEM data
from n2v.models import N2V
import numpy as np
from matplotlib import pyplot as plt
from tifffile import imread
from csbdeep.io import save_tiff_imagej_compatible
# A previously trained model is loaded by creating a new N2V-object without providing a 'config'... | {"hexsha": "bec07627ec0e009effde3456e41ef98b870b28f0", "size": 1254, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/functional/test_prediction2D_SEM.py", "max_stars_repo_name": "trasse/n2v", "max_stars_repo_head_hexsha": "5d08eeb694fd1a795c028789c560dd13e90052aa", "max_stars_repo_licenses": ["BSD-3-Clause... |
// All content Copyright (C) 2018 Genomics plc
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include "io/read.hpp"
#include "io/readRange.hpp"
#include "io/readDataSet.hpp"
#include "alignment/cigar.hpp"
#include "alignment/cigarItems.hpp"
#include "common.hpp"
using wecall::io::Read;
using wecall::... | {"hexsha": "e763cb3cbac5b969cebb90d4b71f98c5f14208b6", "size": 33412, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cpp/test/ioTest/io/testRead.cpp", "max_stars_repo_name": "dylex/wecall", "max_stars_repo_head_hexsha": "35d24cefa4fba549e737cd99329ae1b17dd0156b", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
[STATEMENT]
lemma splitting_lemma_left:
assumes ex: "exact_seq ([C,B,A], [g,f])" and f': "f' \<in> hom B A"
and inv: "(\<And>x. x \<in> carrier A \<Longrightarrow> f'(f x) = x)"
and injf: "inj_on f (carrier A)" and surj: "g ` carrier B = carrier C"
obtains H K where "H \<lhd> B" "K \<lhd> B" "H \<inter> K \<... | {"llama_tokens": 1820, "file": null, "length": 16} |
'''
Created on Apr 10, 2019
@author: chengzi
'''
import os,sys,glob,math
from PIL import Image
import numpy as np
from six.moves import cPickle as pickle
import matplotlib.pyplot as plt
import torch
import torch.nn.functional as F
from DepInvercs_model import DeepInverse
block_size =33;
dtype = torch.float32
d... | {"hexsha": "7ffc957048f3abf3b1a6b05997704ca20e66a396", "size": 8092, "ext": "py", "lang": "Python", "max_stars_repo_path": "testDVCSPRW33.py", "max_stars_repo_name": "TaihuLight/DeepInverse-Pytorch", "max_stars_repo_head_hexsha": "b0a8f0672f057ddceee6621d4b842672c26c8654", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
import numpy as np
from glob import glob
from keras.models import Sequential, load_model
from keras.layers import InputLayer, GlobalMaxPool2D, Dense
# from dog_detector import dog_detector,
from dog_detector import path_to_tensor
# from human_detector import face_detector
from extract_bottleneck_features import extra... | {"hexsha": "f40e36625a1b8d9d307c961233dbb84f42786dd3", "size": 1976, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict_dog.py", "max_stars_repo_name": "mhoenick/dogapp", "max_stars_repo_head_hexsha": "c084c84bf988a45ba41746f94d2e0680f4b5a433", "max_stars_repo_licenses": ["FTL", "CNRI-Python"], "max_stars_c... |
import numpy as np
import tensorflow as tf
class VGG16Net(tf.keras.Model):
def __init__(self, num_classes=3):
super(VGG16Net, self).__init__()
# self.block_1 = VGGBlock(conv_layers=2, filters=64)
# self.block_2 = VGGBlock(conv_layers=2, filters=128)
# self.block_3 = VGGBlock(conv_l... | {"hexsha": "e83cf6410560fe4c1db5de9b08453b26f48ac12f", "size": 6200, "ext": "py", "lang": "Python", "max_stars_repo_path": "part4/networks/vgg.py", "max_stars_repo_name": "willogy-team/insights--tensorflow", "max_stars_repo_head_hexsha": "2d4885c99e7b550e94d679bed1f192f62f7e4139", "max_stars_repo_licenses": ["MIT"], "m... |
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 11 11:19:32 2020
@author: luol2
"""
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
from nltk.corpus import wordnet
from nltk.stem.porter import PorterStemmer
import nltk
import numpy as np
import json
import copy
import sys
import argpars... | {"hexsha": "d03625d1786a013aa95d4a38af0deb79136a993b", "size": 7465, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Build_distant_corpus.py", "max_stars_repo_name": "ncbi-nlp/PhenoTagger", "max_stars_repo_head_hexsha": "e2857068def2580a4c3048682787ce7ae9a8d126", "max_stars_repo_licenses": ["MIT"], "max_star... |
@testset "999.available-captures-for-rook.jl" begin
board = [
'.' '.' '.' '.' '.' '.' '.' '.'
'.' '.' '.' 'p' '.' '.' '.' '.'
'.' '.' '.' 'R' '.' '.' '.' 'p'
'.' '.' '.' '.' '.' '.' '.' '.'
'.' '.' '.' '.' '.' '.' '.' '.'
'.' '.' '.' 'p' '.' '.' '.' '.'
'.' '.... | {"hexsha": "ba795a6974ef8d422af65909be93ff9baa7c118c", "size": 1198, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/problems/999.available-captures-for-rook.jl", "max_stars_repo_name": "jmmshn/LeetCode.jl", "max_stars_repo_head_hexsha": "dd2f34af8d253b071e8a36823d390e52ad07ab2e", "max_stars_repo_licenses": ... |
# Import the necessary packages and modules
import matplotlib.pyplot as plt
import numpy as np
# Prepare the data
x = np.linspace(0, 10, 100)
# Plot the data
plt.plot(x, x, label='linear')
# Add a legend
plt.legend()
# Show the plot
plt.show()
print("done")
| {"hexsha": "805cfa57f38d572f8bd8d921e1b13dbfb4eaf62f", "size": 262, "ext": "py", "lang": "Python", "max_stars_repo_path": "coding/plot.py", "max_stars_repo_name": "vadim-ivlev/STUDY", "max_stars_repo_head_hexsha": "286675fcdf154ea605f50059c4a60b212b3ba4b9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
#!/usr/bin/env python3
import matplotlib
matplotlib.use('pdf')
import scrublet as scr
import scipy.io
import scipy.sparse
import numpy
import numpy.ma
from PIL import Image, ImageDraw, ImageFont
import os
import sys
import re
import warnings
import traceback
import argparse
#
# Notes:
# o apply umi_cutoff in filte... | {"hexsha": "aafe3743af6da37d886e1e2a00dcdd64c2dbb7fc", "size": 5744, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/run_scrublet.py", "max_stars_repo_name": "bbi-lab/bbi-sciatac-analyze", "max_stars_repo_head_hexsha": "f5cfb20ed98373a21fdda152f2a91cfd3347411d", "max_stars_repo_licenses": ["MIT"], "max_stars... |
[STATEMENT]
theorem main\<^sub>P\<^sub>K\<^sub>B: \<open>G \<TTurnstile>\<^sub>!\<^sub>K\<^sub>B p \<longleftrightarrow> G \<turnstile>\<^sub>!\<^sub>K\<^sub>B p\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (G \<TTurnstile>\<^sub>!\<^sub>K\<^sub>B p) = (G \<turnstile>\<^sub>!\<^sub>K\<^sub>B p)
[PROOF STEP... | {"llama_tokens": 348, "file": "Public_Announcement_Logic_PAL", "length": 2} |
# the inclusion of the tests module is not meant to offer best practices for
# testing in general, but rather to support the `find_packages` example in
# setup.py that excludes installing the "tests" package
from __future__ import print_function
import networkx as nx
from pyhwcomm import Compute, Transfer
from pyhwc... | {"hexsha": "cb86a9f7cdc84ee45fa5e2c314cf9d6225d8d159", "size": 810, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_simple.py", "max_stars_repo_name": "cwpearson/pyhwcomm", "max_stars_repo_head_hexsha": "7f893552b6a7f4fa5a5cfbc1d9d10e6f51c2c6b9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# USAGE
# python histogram_with_mask.py
# import the necessary packages
from matplotlib import pyplot as plt
import numpy as np
import cv2
def plot_histogram(image, title, mask=None):
# split the image into its respective channels, then initialize
# the tuple of channel names along with our figure for plotting
cha... | {"hexsha": "e04ace0f492036085f4c051f97aa0595a7310288", "size": 1423, "ext": "py", "lang": "Python", "max_stars_repo_path": "OpenCV 104/Histograms/opencv-image-histograms/histogram_with_mask.py", "max_stars_repo_name": "jjaramillo34/pyimagesearchuniversity_course", "max_stars_repo_head_hexsha": "0a4a26c29a6f8122f6a03d33... |
import os
import pathlib
import matplotlib.pyplot as plt
import gdal
import tensorflow as tf
import numpy as np
import sys
import globalvars as g
from data_generator import DataGenerator
from model import get_model
from included_vars import data_vars, vars_to_plot, operators
print('Python version: %s' % sys.version)... | {"hexsha": "698dcfe4b081b56d4322914dba296633e7e6d3d3", "size": 5800, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "EpicScizor/climatenet", "max_stars_repo_head_hexsha": "2d449c4f9700c5ed06f98396378549a4f1d5e9e2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nu... |
import mxnet as mx
import numpy as np
from distutils.util import strtobool
from ..processing.generate_anchor import generate_anchors
from ..processing.bbox_transform import iou_pred, nonlinear_pred
from ..processing.nms import py_nms_wrapper, cpu_nms_wrapper, gpu_nms_wrapper
def check_equal(lst, errstr='check_equal'... | {"hexsha": "45d6e8d60667e568b468137252cf4abbbdadecc5", "size": 11380, "ext": "py", "lang": "Python", "max_stars_repo_path": "rcnn_dff/symbol/sample_anchors.py", "max_stars_repo_name": "tonysy/mx-rcnn-flow", "max_stars_repo_head_hexsha": "b78c3c964c802bb874d673170d7452e7a573a998", "max_stars_repo_licenses": ["Apache-2.0... |
import numpy as np
from phenom.testing import prec_angle_helper as pah
from phenom import HztoMf, m1_m2_M_q
import lal
f_gw_min=1.
f_gw_max=700
df_gw=0.1
f_gw_ref=f_gw_min*2
Npts = int(np.ceil((f_gw_max - f_gw_min)/df_gw))
f_gw_list = lal.CreateREAL8Sequence(Npts)
f_gw_list.data = np.arange(f_gw_min, f_gw_max, df_g... | {"hexsha": "ed6f6b52e720a27a57cd2163eb02df52fd39386b", "size": 2645, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/prec-angles/compare-pv2-pv3.py", "max_stars_repo_name": "LBJ-Wade/phenom_gw_waveform", "max_stars_repo_head_hexsha": "2c705e6ba85510c573d23dca8be4456665d29edf", "max_stars_repo_licenses":... |
# Goal here is to automate saving out dithered positions (RA, Dec, rotTelPos)
# for non-MAF users. See function documentation below for details.
#
# Humna Awan: humna.awan@rutgers.edu
#
##########################################################################################
import matplotlib
matplotlib.use('Agg')
imp... | {"hexsha": "706aed88bcdb3790210aef93960416aa9182c3d1", "size": 13924, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/descDithers/save_csv_dithers.py", "max_stars_repo_name": "galdering/ObsStrat", "max_stars_repo_head_hexsha": "1032e5c66ee9d7e6b8d8ddde443670489d32e7fa", "max_stars_repo_licenses": ["MIT"], "... |
SUBROUTINE zcorec6 (IFTOLD, IFTNEW, CPOLD, CPNEW,
* IBUFF1, KBUFF1, IBUFF2, KBUFF2, LDUP, ISTAT)
C
C
C Copy a single record using buffered reads and writes.
C This allows us to copy as big as record as in the file
C (unlimited size).
C The record can be copied from another file, or can be dup... | {"hexsha": "af9135897c324db4a221df43537749b56fb6c2cc", "size": 12885, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "heclib/heclib_f/src/zcorec6.f", "max_stars_repo_name": "HydrologicEngineeringCenter/heclib", "max_stars_repo_head_hexsha": "dd3111ee2a8d0c80b88d21bd529991f154fec40a", "max_stars_repo_licenses": [... |
/*
@copyright Louis Dionne 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#include <boost/hana/ext/std/type_traits.hpp>
#include <boost/hana/assert.hpp>
#include <boost/hana/integral_constant.hpp>
#include <boost/hana/... | {"hexsha": "53b7594b318d50252a8772e6d6637616742c5cf6", "size": 4199, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/ext/std/type_traits.cpp", "max_stars_repo_name": "josephwinston/hana", "max_stars_repo_head_hexsha": "a8586ec1812e14e43dfd6867209412aa1d254e1a", "max_stars_repo_licenses": ["BSL-1.0"], "max_sta... |
[STATEMENT]
lemma uint_0_iff: "uint x = 0 \<longleftrightarrow> x = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (uint x = 0) = (x = 0)
[PROOF STEP]
by (auto simp add: unsigned_word_eqI) | {"llama_tokens": 88, "file": null, "length": 1} |
# Defined in Section 2.1.2
import numpy as np
M = np.array([[0, 2, 1, 1, 1, 1, 1, 2, 1, 3],
[2, 0, 1, 1, 1, 0, 0, 1, 1, 2],
[1, 1, 0, 1, 1, 0, 0, 0, 0, 1],
[1, 1, 1, 0, 1, 0, 0, 0, 0, 1],
[1, 1, 1, 1, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 1, 1, 0, ... | {"hexsha": "71ea22b7c6d945321f19d74485b1fac6444aa98d", "size": 1401, "ext": "py", "lang": "Python", "max_stars_repo_path": "chp2/svd.py", "max_stars_repo_name": "Sheldoer/plm-nlp-code", "max_stars_repo_head_hexsha": "04127d137c8bd40bc1412bee863640b9d909ddf9", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"... |
(*
Copyright 2014 Cornell University
This file is part of VPrl (the Verified Nuprl project).
VPrl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option)... | {"author": "vrahli", "repo": "NuprlInCoq", "sha": "0c3d7723836d3f615ea47f56e58b2ea6173e7d98", "save_path": "github-repos/coq/vrahli-NuprlInCoq", "path": "github-repos/coq/vrahli-NuprlInCoq/NuprlInCoq-0c3d7723836d3f615ea47f56e58b2ea6173e7d98/continuity/continuity_axiom.v"} |
import numpy as np
from scipy.optimize import curve_fit
from utils import import_qchem
from utils import utils
from core.polymer_chain import Polymer
from core.polymer_chain import RandomChargePolymer
from argparse import ArgumentParser
def run_partial_order_param():
description = "command line interface for run... | {"hexsha": "8dd052857a31df0e01d58ec5d5d4ad4faf1e2b5c", "size": 4327, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/run_partial_order_param.py", "max_stars_repo_name": "wood-b/dihedral_model", "max_stars_repo_head_hexsha": "37b7b1648ff2c36f6319401aa50b8400183312f6", "max_stars_repo_licenses": ["BSD-3-Cl... |
# -*- coding : utf-8-*-
import copy
import json
import os
import zipfile
import numpy as np
import sqlalchemy
from decimal import ROUND_HALF_UP, Decimal
from PyAngle import Angle
from numpy import loadtxt, pi
from sqlalchemy import create_engine, event
from sqlalchemy.orm import sessionmaker
from xml.dom.minidom import... | {"hexsha": "1c055cbe430f74c660c8f820238d7140f74f60d9", "size": 17289, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/srbpy/model/core.py", "max_stars_repo_name": "billhu0228/SmartRoadBridgePy", "max_stars_repo_head_hexsha": "4a5d34028a2612aef846b580733bf6f488110798", "max_stars_repo_licenses": ["MIT"], "max... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on 11/3/2020 15:06:33 2020
@author: cmg
"""
import numpy as np
import matplotlib.pyplot as plt
import timeit
import active_subspaces as ss
from astars.stars_sim import Stars_sim
from astars.utils.misc import subspace_dist, find_active
import pandas as pd
... | {"hexsha": "2d29b8ac010ec05101ba94ba643e85781e16491d", "size": 7578, "ext": "py", "lang": "Python", "max_stars_repo_path": "paper_examples/nesterov_adapt_thresholding.py", "max_stars_repo_name": "variscarey/ASTARS", "max_stars_repo_head_hexsha": "99da27bffe1f843804a85a206686a7f8ae29fa42", "max_stars_repo_licenses": ["M... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init
import numpy as np
from .A2JPoseNet import RegressionModel, ClassificationModel, generate_anchors, shift
from .pose_hrnet import get_pose_net
class HRNetA2JPoseNet(nn.Module):
def __init__(self, cfg):
super(HRNetA2... | {"hexsha": "b345eeb4c47e762153f5a5815d0715dfca347944", "size": 2816, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/models/HRNetA2JPoseNet.py", "max_stars_repo_name": "ZJULiHongxin/two-hand-pose-est", "max_stars_repo_head_hexsha": "e531faacd9cdddcb716b614b832038d079b9663f", "max_stars_repo_licenses": ["MIT"... |
import numpy as np
import pandas as pd
import pytest
from anndata import AnnData
from scipy import sparse
import scanpy as sc
from scanpy.preprocessing._qc import (
top_proportions,
top_segment_proportions,
describe_var,
describe_obs,
)
@pytest.fixture
def anndata():
a = np.random.binomial(100, 0... | {"hexsha": "71f6e728e038eff12d9885d3e4f2c51a5522b12d", "size": 7379, "ext": "py", "lang": "Python", "max_stars_repo_path": "scanpy/tests/test_qc_metrics.py", "max_stars_repo_name": "mkmkryu/scanpy2", "max_stars_repo_head_hexsha": "f3db32a142dc31c1b628380db1c969a6d0b9dc3a", "max_stars_repo_licenses": ["BSD-3-Clause"], "... |
import tensorflow
from tensorflow.keras.layers import *
from tensorflow.keras.models import *
import os
from tensorflow.keras.preprocessing import image
from .net import MobileNetV2
import numpy as np
from tensorflow.keras import backend as K
class OrangeClassifier():
def __init__(self, model_path):
... | {"hexsha": "5a42d9e8f1f674629b5751efe57ef4fa0adfa1ac", "size": 7667, "ext": "py", "lang": "Python", "max_stars_repo_path": "orangelib/build/lib/orangelib/model.py", "max_stars_repo_name": "ayoolaolafenwa/orangelib", "max_stars_repo_head_hexsha": "4fe7d88488482e52d466b8021db3b4e4dc80a484", "max_stars_repo_licenses": ["M... |
# The abstract types provided by InteratomicPotentials.jl
export AbstractPotential, NonTrainablePotential, TrainablePotential, EmpiricalPotential, MixedPotential
"""
AbstractPotential
The abstract supertype of all interatomic potentials.
"""
abstract type AbstractPotential end
include("types/abstract_potential.j... | {"hexsha": "fc5772556f689057c406e09baf60d9b4c317fc57", "size": 1815, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/types.jl", "max_stars_repo_name": "cesmix-mit/InteratomicPotentials.jl", "max_stars_repo_head_hexsha": "100af9067e69d4e3fa2f4697b4915c93cb08f419", "max_stars_repo_licenses": ["MIT"], "max_stars... |
#ifndef HPENFACAG_HPP_INCLUDED
#define HPENFACAG_HPP_INCLUDED
#include <vector>
#include <string>
#include <boost/serialization/list.hpp>
#include <boost/serialization/set.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/deque.hpp>
#include <caffe/util/math_functions.hpp>
#include "arch/AA... | {"hexsha": "037b859947bba1705eaab977f7c2828778b9efa3", "size": 47034, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "agent/cacla/include/HPeNFACAg.hpp", "max_stars_repo_name": "matthieu637/ddrl", "max_stars_repo_head_hexsha": "a454d09a3ac9be5db960ff180b3d075c2f9e4a70", "max_stars_repo_licenses": ["MIT"], "max_sta... |
#!/usr/bin/env python3
import rospy
import numpy as np
import math
from std_msgs.msg import Float32
from std_msgs.msg import Int32
from sensor_msgs.msg import PointCloud2, PointField
from sensor_msgs import point_cloud2
from visualization_msgs.msg import Marker, MarkerArray
import os
import open3d.ml as _ml3d
import op... | {"hexsha": "064aefe7ff0a5195bbcf19f90149b7041d565167", "size": 4992, "ext": "py", "lang": "Python", "max_stars_repo_path": "open3d-ros/catkin_ws/src/open3d_ros/src/clustering_rosbag.py", "max_stars_repo_name": "Yelloooowww/Open3D-ML", "max_stars_repo_head_hexsha": "8029b7e52bb42f4ac73cf20d9da1734d193a1c2c", "max_stars_... |
subroutine r8mktricub(x,nx,y,ny,z,nz,f,nf2,nf3,
> ibcxmin,bcxmin,ibcxmax,bcxmax,inb1x,
> ibcymin,bcymin,ibcymax,bcymax,inb1y,
> ibczmin,bczmin,ibczmax,bczmax,inb1z,
> ilinx,iliny,ilinz,ier)
c
c setup a tricubic spline... | {"hexsha": "a60026c7ef48d7c401b794ac16b37aa6a30c62eb", "size": 13815, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gfile_Bfield/PSPLINE/Pspline/r8mktricub.f", "max_stars_repo_name": "ORNL-Fusion/RFSciDAC-testing", "max_stars_repo_head_hexsha": "c2fa44e00ce8e0af4be6fa662a9e8c94d6c6f60e", "max_stars_repo_licens... |
from __future__ import print_function
# try to connect features that really ought to be connected:
from matplotlib.pyplot import *
from numpy import *
import shapely.wkb,shapely.geometry
try:
from osgeo import ogr
except ImportError:
import ogr
import sys
import os.path
import six
from numpy.linalg import nor... | {"hexsha": "5d3ce39a223d64fed41754ef0add63e1f3d0bb84", "size": 18852, "ext": "py", "lang": "Python", "max_stars_repo_path": "stompy/spatial/join_features.py", "max_stars_repo_name": "oneconcern/stompy", "max_stars_repo_head_hexsha": "d2cb86e7d1a2de698701b8d1b391e27e1ee935c0", "max_stars_repo_licenses": ["MIT"], "max_st... |
mutable struct ILU0Preconditioner{Tv, Ti} <: AbstractExtendablePreconditioner{Tv,Ti}
extmatrix::ExtendableSparseMatrix{Tv,Ti}
xdiag::Array{Tv,1}
idiag::Array{Ti,1}
pattern_timestamp::Float64
end
function ILU0Preconditioner(extmatrix::ExtendableSparseMatrix{Tv,Ti}) where {Tv,Ti}
@assert size(extmat... | {"hexsha": "8c45050a9a9d827a3dd28a0c5e79e84ebbc32bb6", "size": 2336, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ilu0.jl", "max_stars_repo_name": "MaximilianJHuber/ExtendableSparse.jl", "max_stars_repo_head_hexsha": "c7e3a00c7901f0d46d884d6dfc6148bcfa73a268", "max_stars_repo_licenses": ["BSD-3-Clause"], "... |
using Documenter, EqualizerFilters
makedocs(
sitename="EqualizerFilters.jl",
modules=[EqualizerFilters],
pages = [
"index.md",
"IndividualFilters.md",
"TupleFormat.md",
"SamplingRateSettings.md"
])
deploydocs(repo="github.com/Firionus/EqualizerFilters.jl.git")
| {"hexsha": "1517c26482ea0c856995d895943b3810f27bdfbe", "size": 279, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "Firionus/EqualizerFilters.jl", "max_stars_repo_head_hexsha": "aa2415bc5981b67bcddcbfac77c46c1249e69a24", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 5 07:39:31 2020
@author: lizet
"""
from numpy import array
import os
def rename_old( folder):
# olds_files = array([file_name for file_name in name.parent.iterdir() if name.stem in file_name])
olds_files = []
for i in folder.parent.iterdi... | {"hexsha": "29db23313b2f788b829ef3a10087d2d59ff15047", "size": 1069, "ext": "py", "lang": "Python", "max_stars_repo_path": "mscreen/screening/utils.py", "max_stars_repo_name": "e-mayo/mscreen", "max_stars_repo_head_hexsha": "a50f0b2f7104007c730baa51b4ec65c891008c47", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import numpy as np
def CO2_flux(DelCO2, grid_wind, unit='Pg'):
"""
Returns carbon flux in moles, g or Pg (1e15 g) of carbon (not CO2) per year.
F = A * E * DeltaCO2
where:
A is area in m2
E is the gas transfer coefficient (mol CO2 m-2 yr-1 uatm-1) from Wanninkhof (1992)
... | {"hexsha": "91fc25318c8e013c0267f6124ae28ce33fab9fef", "size": 809, "ext": "py", "lang": "Python", "max_stars_repo_path": "helpers/calc.py", "max_stars_repo_name": "ollie-bell/ai4er_ocean", "max_stars_repo_head_hexsha": "16aff3c8ca157ef7fc4becfb94d4c081e80bae12", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2... |
import numpy as np
import pandas as pd
from sklearn import preprocessing
from sklearn.impute import SimpleImputer
continues = [0, 2, 4, 10, 11, 12] # 记录数值型数据的维度
categories = [1, 3, 5, 6, 7, 8, 9] # 记录类别型数的维度
# 类别数据转数值型
def cate_encode(arrays):
enc = preprocessing.OrdinalEncoder()
if len(arrays)... | {"hexsha": "1634ccf4c61496bdd127a13b0d6288a9fce10938", "size": 2268, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataProcess.py", "max_stars_repo_name": "wang534602988/data_mine", "max_stars_repo_head_hexsha": "3797dab412ba49f4440c06f98f7d00c2c2824c9e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c... |
#include "RBGL.hpp"
#include <boost/graph/graph_utility.hpp>
using namespace boost;
typedef adjacency_list<vecS, vecS, undirectedS,
// vertex properties
property<vertex_index_t, int,
property<vertex_centrality_t, double> >,
// edge properties
property<edge_weight_t, double,
property<e... | {"hexsha": "277cab40f48677b28ebb80ab533f25583ef6e434", "size": 5916, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/bbc.cpp", "max_stars_repo_name": "HenrikBengtsson/RBGL", "max_stars_repo_head_hexsha": "9e34efd0dcab3babe1cea49b060a643bee79931c", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": null... |
import sys
import dlib
import numpy as np
MAX_DIMENSION = 1024
WIDTH_MARGIN = 0.18
TOP_SHIFT = 0.2
class Edhead(object):
def __init__(self):
self.detector = dlib.get_frontal_face_detector()
self.overlay = dlib.load_rgb_image('A1opZLgQdoL.jpg')
def _preprocess(self, image):
"""Load ... | {"hexsha": "b3e7ef1432ccf95c9d827725ace0f9ab9746469b", "size": 2268, "ext": "py", "lang": "Python", "max_stars_repo_path": "edhead.py", "max_stars_repo_name": "ivylee/edhead", "max_stars_repo_head_hexsha": "4ec38a3232841669c1162cb9220d78a81c31bd81", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star... |
[STATEMENT]
lemma synth_trans: "\<lbrakk> X \<in> synth G; G \<subseteq> synth H \<rbrakk> \<Longrightarrow> X \<in> synth H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>X \<in> synth G; G \<subseteq> synth H\<rbrakk> \<Longrightarrow> X \<in> synth H
[PROOF STEP]
by (drule synth_mono, blast) | {"llama_tokens": 120, "file": "Key_Agreement_Strong_Adversaries_Message_derivation", "length": 1} |
import IDONE
import numpy as np
import os
from scipy.optimize import rosen
def test_Rosenbrock(d):
print(f"Testing IDONE on the {d}-dimensional Rosenbrock function with integer constraints.")
print("The known global minimum is f(1,1,...,1)=0")
lb = -5*np.ones(d).astype(int) # Lower bound
ub = 10*np.ones(d).astype(... | {"hexsha": "e18332d3f6a2a9b26e522c9c79152fff825692f4", "size": 956, "ext": "py", "lang": "Python", "max_stars_repo_path": "expensiveoptimbenchmark/solvers/IDONE/demo_Rosenbrock.py", "max_stars_repo_name": "AlgTUDelft/ExpensiveOptimBenchmark", "max_stars_repo_head_hexsha": "642056f8d94c7f953e50c3cd05bbbf9f39ad5c3d", "ma... |
import numpy as np
import pcl
import pyrealsense2 as rs
from swagscanner.scanner.d435 import D435
from swagscanner.scanner.kinect import Kinect
import swagscanner.visualization.viewer as viewer
class DepthProcessor():
'''Factory object creator to send processing to either 'fast' or
'slow' DepthProcessor objec... | {"hexsha": "3886542de2c737fa85baf9974e9b8d38080ec71b", "size": 5411, "ext": "py", "lang": "Python", "max_stars_repo_path": "swagscanner/processing/depth.py", "max_stars_repo_name": "seanngpack/swag-scanner", "max_stars_repo_head_hexsha": "8932e4823e7edd570cbb063702ef4be335d12881", "max_stars_repo_licenses": ["MIT"], "m... |
module Altro
import TrajectoryOptimization
import RobotDynamics
using StaticArrays
using BenchmarkTools
using Interpolations
using SolverLogging
using Crayons
using SparseArrays
using LinearAlgebra
using Logging
using Statistics
using TimerOutputs
using ForwardDiff
using FiniteDiff
import Octavian
const TO = Traject... | {"hexsha": "b3a3e448f0f5f73dda5c223f60a33b6481deb72a", "size": 3013, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Altro.jl", "max_stars_repo_name": "bjack205/ALTRO.jl", "max_stars_repo_head_hexsha": "4864df2bb8ab8f629f451304cbaaa8e0017932d9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
#include <atomic>
#include <chrono>
#include <fstream>
#include <future>
#include <memory>
#include <string>
#include <tuple>
#include <boost/asio/steady_timer.hpp>
#include <boost/beast/core.hpp>
#include <boost/beast/http.hpp>
#include <boost/beast/version.hpp>
#include <boost/filesystem.hpp>
#include "TileManager... | {"hexsha": "d96cabf4d3418f68b79e97f9a611f755504143fe", "size": 13606, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "lib/src/TileManager.cpp", "max_stars_repo_name": "ford442/GlobeViewer", "max_stars_repo_head_hexsha": "f9c990322e5d1c9c4beae29b3fb7ff0fb70ce587", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
# Important to keep cv2 top import
import cv2
import os
import copy
import json
from collections import defaultdict
import numpy as np
import logging
import torch
import torchvision
from detectron2.data.dataset_mapper import SimpleDatasetMapper
import detectron2.utils
from detectron2.utils import comm
import detectron... | {"hexsha": "cd186b4135c9508879f3ccb1c5b9585ec53ceee8", "size": 5073, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/run_train.py", "max_stars_repo_name": "superclass-FSIS/test", "max_stars_repo_head_hexsha": "9bb2844c77704a609291135b75e94a794f235aa0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_... |
import numpy as np
from ..editortool import EditorTool
from ... import util
class ContourTool(EditorTool):
def on_paint(self):
if not self.is_mask:
return self.canvas
output = np.zeros(self.canvas.shape, dtype=np.uint8)
util.draw.contours(output, self.canvas, (*self.color, 2... | {"hexsha": "92b9f7492a654220ce7d4c439bbe01f1dfd9d485", "size": 347, "ext": "py", "lang": "Python", "max_stars_repo_path": "segmate/editor/tools/contour.py", "max_stars_repo_name": "justacid/segmate", "max_stars_repo_head_hexsha": "7b66b207ca353805f7ad9c7e003645cd2cbc227a", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | {"hexsha": "42b19a492321184467a3cc379a67149436a3c670", "size": 4374, "ext": "py", "lang": "Python", "max_stars_repo_path": "PaddleNLP/examples/text_graph/erniesage/models/encoder.py", "max_stars_repo_name": "weiwei1115/models", "max_stars_repo_head_hexsha": "e2c96c5f64b1dc8f0d5d9aa121300b87150e11e3", "max_stars_repo_li... |
from collections import defaultdict
import jsonlines
import numpy as np
import os
import tagme
import ujson
import pandas as pd
from tqdm import tqdm
pd.options.display.max_colwidth = 500
from bootleg.symbols.constants import *
def copy_candidates(from_alias, to_alias, alias2qids, max_candidates=30, qids_to_add=Non... | {"hexsha": "425e550ef98ea5edf4de8b3b32a15b4f4e11ee9c", "size": 12904, "ext": "py", "lang": "Python", "max_stars_repo_path": "tutorials/utils.py", "max_stars_repo_name": "mleszczy/bootleg", "max_stars_repo_head_hexsha": "162d74001cdfbbe146753393641d549e0328acb1", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou... |
%ADABOOSTC
%
% [W,V,ALF] = ADABOOSTC(A,CLASSF,N,RULE,VERBOSE);
%
% INPUT
% A Dataset
% CLASSF Untrained weak classifier
% N Number of classifiers to be trained
% RULE Combining rule (default: weighted voting)
% VERBOSE Suppress progress report if 0 (default)
%
% OUTPUT
% W Combined tr... | {"author": "marianux", "repo": "ecg-kit", "sha": "c8e3de47c54a9214138143676d2aa546b0540dd2", "save_path": "github-repos/MATLAB/marianux-ecg-kit", "path": "github-repos/MATLAB/marianux-ecg-kit/ecg-kit-c8e3de47c54a9214138143676d2aa546b0540dd2/common/prtools/adaboostc.m"} |
import unittest
import os
import cPickle as pickle
import skrf as rf
import numpy as npy
from nose.tools import nottest
from nose.plugins.skip import SkipTest
class CalibrationTest(object):
'''
This is the generic Calibration test case which all Calibration
Subclasses should be able to pass. They must im... | {"hexsha": "3d710c38d1188c51e43215f8ee46c9de77fb76ec", "size": 19323, "ext": "py", "lang": "Python", "max_stars_repo_path": "skrf/calibration/tests/test_calibration.py", "max_stars_repo_name": "sdurant/scikit-rf", "max_stars_repo_head_hexsha": "09161b879c1a52a1bc2e2df89f2656c97136c39b", "max_stars_repo_licenses": ["BSD... |
"""Matrix Base Classes
This file contains the base Matrix classes that represent a linear
equation Gm=d. Where G is the design matrix of coefficients, m are the
model parameters and d is the data array of observations.
This file contains the following classes:
* DesignMatrix - handles coefficients of an arbitrar... | {"hexsha": "e878f0a35231eceb38a704653e1c8fd704961606", "size": 5879, "ext": "py", "lang": "Python", "max_stars_repo_path": "lininvbox/lininvbox/basetypes.py", "max_stars_repo_name": "uofuseismo/YPMLRecalibration", "max_stars_repo_head_hexsha": "18a4231eb12775cf808d83d38a11cc02664b3e35", "max_stars_repo_licenses": ["MIT... |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
# List of all csv filenames
GAS_TRAIN_DATA = 'CSV_Files/Gas Data Last Year.csv'
GAS_TEST_DATA = 'CSV_Files/Gas Data Last Month.csv'
GOLD_TRAIN_DATA = 'CSV_Files/Gold Data Last Year.csv'
GOLD_TEST_DATA = 'CSV_Files/Gold Data ... | {"hexsha": "beef34fec145150b23fd94bae3127c8c4e802630", "size": 4430, "ext": "py", "lang": "Python", "max_stars_repo_path": "Stock_Prediction_Model.py", "max_stars_repo_name": "aniirudd/Stock-Market-Prediction", "max_stars_repo_head_hexsha": "1af00c7ef50e982d81f683c3c2203d9097a5e489", "max_stars_repo_licenses": ["Apache... |
\documentclass[11pt,a4paper]{book}
\usepackage{graphicx}
\begin{document}
\title{Book: How to Structure a LaTeX Document}
\author{Author1 \and Author2 \and ...}
\date{\today}
\maketitle
\frontmatter
\chapter{Preface}
\mainmatter
\chapter{First chapter}
\section{Section Title 1}
\section{Sec... | {"hexsha": "7f481da8ea9059eb3aa320466c50966984a7da3b", "size": 490, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ProjectMaterial/LatexEditorProject/tex-templates/book-template.tex", "max_stars_repo_name": "nikosp2196/LatexEditorRefactoring", "max_stars_repo_head_hexsha": "79b97ef212900a6e6970a63ceeccdbfa7e73c02... |
# под вопросом. пока не подключаем
"strftime(\"%F/%H\", now())"
strftime{T<:DateTime}(fmt::AbstractString, t::T) =
Libc.strftime(fmt,Dates.datetime2unix(t))
"strftime(\"%F\", Dates.today())"
strftime{T<:Date}(fmt::AbstractString, d::T) =
strftime(fmt,DateTime(d))
"""
[Dates.Date(2016,4,1), Dates.Date... | {"hexsha": "5a656b4b0e2f69be081feddb4f510d101d13abe1", "size": 449, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/strftime.jl", "max_stars_repo_name": "closescreen/Many", "max_stars_repo_head_hexsha": "cecec0af8c3a22f716412572df3374224c6210d0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
try:
from lapjv import lapjv
# from scipy.optimize import linear_sum_assignment
segment = False
except ImportError:
print('Module lap not found, emulating with much slower scipy.optimize.linear_sum_assignment')
segment = True
from scipy.optimize import linear_sum_assignment
import random
import... | {"hexsha": "eb78335c77d1718578ee251ecc3858b45b79dd4b", "size": 4541, "ext": "py", "lang": "Python", "max_stars_repo_path": "api/classification/siamese/datagen.py", "max_stars_repo_name": "xiafanzeng/Raman-Spectroscopy", "max_stars_repo_head_hexsha": "ba0b8b7ad0d9b9487a7602b0a09a41d970f70598", "max_stars_repo_licenses":... |
[STATEMENT]
lemma rel_witness_gpv_sel [simp]:
"the_gpv (rel_witness_gpv A C R R' (gpv, gpv')) =
map_spmf (map_generat id id (\<lambda>(rpv, rpv'). (rel_witness_gpv A C R R' \<circ> rel_witness_fun R R' (rpv, rpv'))) \<circ> rel_witness_generat)
(rel_witness_spmf (rel_generat A C (rel_fun (R OO R') (rel_gpv'... | {"llama_tokens": 845, "file": "CryptHOL_Generative_Probabilistic_Value", "length": 2} |
# Copyright (c) 2018 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": "c6b386d62c02c27ce72917a19d1bc29a7cd7f3bc", "size": 5677, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/NeurIPS2019-Learn-to-Move-Challenge/final_submit/submit_model.py", "max_stars_repo_name": "jkren6/PARL", "max_stars_repo_head_hexsha": "7299032f8e1804bb4ada0f087fd485816046fa90", "max_sta... |
#!/usr/bin/env python
"""
Created on Wed Feb 26 16:23:30 2014
@author: Bodangles
"""
import os
import numpy as np
import tables
import glob
import matplotlib.pyplot as plt
import pdb
class BeamSelector(object):
"""This class will take in a numpy array with the first column being the beam numbers
the second c... | {"hexsha": "1ec0bbb3296d8c8f38f5acf3e587cd817e9293a6", "size": 12878, "ext": "py", "lang": "Python", "max_stars_repo_path": "beamtools/beamfuncs.py", "max_stars_repo_name": "scienceopen/SimISR", "max_stars_repo_head_hexsha": "f9826c73137113b68dc2b751a735cd96837fceb3", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import numpy as np
import cv2
from glob import glob
from tqdm import tqdm
bird_imgs_train = glob('../Data/bird_or_bicycle/0.0.3/train/bird/*')
bicycle_imgs_train = glob('../Data/bird_or_bicycle/0.0.3/train/bicycle/*')
bird_imgs_test = glob('../Data/bird_or_bicycle/0.0.3/test/bird/*')
bicycle_imgs_test = glob('../Data... | {"hexsha": "bd4494b60ca01674a8d51c5545fd51db457d174c", "size": 1360, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/old_scripts/bird_npdata.py", "max_stars_repo_name": "calvinyong/adversarial_examples_capproj", "max_stars_repo_head_hexsha": "972e89e105dec6dc5f61e62f378d06656698b71d", "max_stars_repo_lic... |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import MinMaxScaler
from sklearn.model_selection import train_test_split, GridSearchCV
from sklearn.metrics import make_scorer, f1_score, classification_report
from sklearn.tree import DecisionTreeClassifier
# adult_inc... | {"hexsha": "95e077299ec656b638156232eb00a14c91c04fff", "size": 4086, "ext": "py", "lang": "Python", "max_stars_repo_path": "4_Tree_And_Ensemble_Methods/PythonSklearn/tree_ensemble_methods.py", "max_stars_repo_name": "vladiant/SoftUniMachineLearning2019", "max_stars_repo_head_hexsha": "29f553000ca5e8fb56ca17b25e581018a6... |
import networkx as nx
import math
from the_traffic_magic import get_pareto_traffic_one
from helper_scratch import chunks, connect_to_db, EdgeNames, graph_open
from dbhelper_scratch import database_commit, get_all_sd_using_this, get_first_last_from_id, add_to_frist_last, add_to_a
c, conn = connect_to_db()
database_com... | {"hexsha": "14638a8380d155452379db3be1b666685e43978d", "size": 2250, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/1_scratch copy.py", "max_stars_repo_name": "UIC-InDeXLab/SignalReconstruction", "max_stars_repo_head_hexsha": "d9d747eb9281c8e2d59d765b6067a2d57d0a3646", "max_stars_repo_licenses": ["MIT"],... |
% !TeX root = ../main.tex
% Add the above to each chapter to make compiling the PDF easier in some editors.
\chapter{Introduction}\label{chapter:introduction}
\section{The Isabelle Proof Assistant}
\section{The B-Tree Data Structure}
Citation test~\parencite{latex}.
\subsection{Definition}
See~\autoref{tab:sample}... | {"hexsha": "185ff2af86f87b9a266685f6be9540ed9a1d560b", "size": 2375, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/examples.tex", "max_stars_repo_name": "nielstron/btrees-thesis", "max_stars_repo_head_hexsha": "14b6d8a4819378140e5a977e5278ae0a48057f6f", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_... |
#=
Copyright (c) 2015, Intel Corporation
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 notice,
this list of conditions and the follo... | {"hexsha": "67760c50291f941839b093b57a69856b9f688f15", "size": 2391, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/parfor.jl", "max_stars_repo_name": "JuliaPackageMirrors/ParallelAccelerator.jl", "max_stars_repo_head_hexsha": "8c38d3aea0d555264c19a39847b8f538596dff04", "max_stars_repo_licenses": ["BSD-2-Cl... |
[STATEMENT]
lemma no_step_none:
"step e s r aa ba = None \<Longrightarrow> \<not> recognises_execution e s r ((aa, ba) # p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. step e s r aa ba = None \<Longrightarrow> \<not> recognises_execution e s r ((aa, ba) # p)
[PROOF STEP]
using recognises_cons_step
[PROOF STATE... | {"llama_tokens": 227, "file": "Extended_Finite_State_Machines_EFSM", "length": 2} |
from __future__ import division, print_function
from sklearn.feature_extraction.text import TfidfVectorizer
from collections import defaultdict
from sklearn import decomposition
import json
import os
import numpy as np
import pandas as pd
class NMF:
"""
Class for NMF model.
This is a wrapper for sklearn.... | {"hexsha": "f0e1d09ffa54f5616d7ffe3e5b1d1717243bf18e", "size": 4655, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/nmf.py", "max_stars_repo_name": "popescuaaa/nmf", "max_stars_repo_head_hexsha": "c65263198158e1ba6e1b9270b7d7a87a8803fb72", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st... |
!*==dlarrk.f90 processed by SPAG 7.51RB at 20:08 on 3 Mar 2022
!> \brief \b DLARRK computes one eigenvalue of a symmetric tridiagonal matrix T to suitable accuracy.
!
! =========== DOCUMENTATION ===========
!
! Online html documentation available at
! http://www.netlib.org/lapack/explore-html/
!
!> \htmlo... | {"hexsha": "a5828f066176146b8f2e8e56ae9a4f616499307e", "size": 6693, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/double/dlarrk.f90", "max_stars_repo_name": "urbanjost/spag_lapack", "max_stars_repo_head_hexsha": "1b082638c0ff5feb1a295a3aa4624c538d14847c", "max_stars_repo_licenses": ["BSD-3-Clause-Open-M... |
# A 1D model with no-flux walls at ends.
# in this case, the orientation becomes +-1
from ald.rtp.rtpcompiler import AbstractCompiler
from jinja2 import Template
from ald.rtp.rtpkernels import AbstractRTPKernel
import pycuda.gpuarray as gpuarray
import numpy as np
from ald.rtp.rtpsimulator import RTPSimulator
import py... | {"hexsha": "6976b3da1dda543ddede7ea6e73d4092ab2a2014", "size": 6045, "ext": "py", "lang": "Python", "max_stars_repo_path": "ald/rtp/rtp1d.py", "max_stars_repo_name": "zpeng2/ald", "max_stars_repo_head_hexsha": "040ce6176998a9ca024eb9f420e8c6c63ca6af81", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_... |
from __future__ import absolute_import
import wx
from wx.lib.pubsub import pub
import wx.lib.layoutf as layoutf
import numpy as np
import threading
import warnings
import psutil
import time
import os
import sys
import pickle
import glob
from astropy.io import fits
from astropy import wcs
from astropy.coordinates import... | {"hexsha": "bbadb364b95e6aa6d25a733136428cd72b27b623", "size": 72350, "ext": "py", "lang": "Python", "max_stars_repo_path": "CAAPR/CAAPR_AstroMagic/PTS/pts/magic/view/ztv.py", "max_stars_repo_name": "wdobbels/CAAPR", "max_stars_repo_head_hexsha": "50d0b32642a61af614c22f1c6dc3c4a00a1e71a3", "max_stars_repo_licenses": ["... |
*DECK DBSPVD
SUBROUTINE DBSPVD (T, K, NDERIV, X, ILEFT, LDVNIK, VNIKX, WORK)
C***BEGIN PROLOGUE DBSPVD
C***PURPOSE Calculate the value and all derivatives of order less than
C NDERIV of all basis functions which do not vanish at X.
C***LIBRARY SLATEC
C***CATEGORY E3, K6
C***TYPE DOUBLE PRECIS... | {"hexsha": "99a8fba2d92aafad37a40294f1cd4070724dcc65", "size": 5744, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "external/SLATEC/src/dbspvd.f", "max_stars_repo_name": "ygeorgi/MESS", "max_stars_repo_head_hexsha": "42db490295b08193dfc37496489467ccd2e5b6ae", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
DOUBLE PRECISION FUNCTION DT_SANO(Ecm)
C***********************************************************************
C This version dated 31.07.96 is written by S. Roesler *
C***********************************************************************
IMPLICIT NONE
DOUBLE PRECISION afra1 , ... | {"hexsha": "5d49f82eb7b802b53c7000596721b221664e5f9e", "size": 2348, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/dpmjet/DT_SANO.f", "max_stars_repo_name": "pzhristov/DPMJET", "max_stars_repo_head_hexsha": "946e001290ca5ece608d7e5d1bfc7311cda7ebaa", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_... |
#!/usr/bin/python
#coding:utf-8
# ***************************************************************
# 绘制正态分布曲线
# author: pruce
# email: 1756983926@qq.com
# date: 20180919
# ***************************************************************
import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot ... | {"hexsha": "81103028631cb7f3e389a5b89146887745b0d166", "size": 776, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/scripts/statistics/PlotDistribution.py", "max_stars_repo_name": "prucehuang/machine-learning-introduction", "max_stars_repo_head_hexsha": "c543548b9f0f49479bcdf0c8e7b0098c4b7b0cac", "max_stars... |
# -*- coding: utf-8 -*-
import sys
import numpy
from HiddenLayer import HiddenLayer
from LogisticRegression import LogisticRegression
from utils import *
class Dropout(object):
def __init__(self, input, label,\
n_in, hidden_layer_sizes, n_out,\
rng=None, activation=ReLU):
... | {"hexsha": "ba991169103263e920a5d3f4e9f27408cc5e9d03", "size": 4094, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/Dropout.py", "max_stars_repo_name": "khalane1221/DeepLearning", "max_stars_repo_head_hexsha": "34448a8fff2309bf85bf29dcb2276a6b4d9e29f4", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
[STATEMENT]
lemma shadow_root_delete_get_6 [simp]: "delete\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t shadow_root_ptr h = Some h' \<Longrightarrow>
get\<^sub>C\<^sub>h\<^sub>a\<^sub>r\<^sub>a\<^sub>c\<^sub>t\<^sub>e\<^sub>r\<^sub>D\<^sub>a\<^sub>t\<^sub>a character_data_ptr h' = get... | {"llama_tokens": 359, "file": "Shadow_SC_DOM_classes_ShadowRootClass", "length": 1} |
# Integer Functions
# TODO: vector types
const generic_integer_types = [Cchar, Cuchar, Cshort, Cushort, Cint, Cuint, Clong, Culong]
# generically typed
for gentype in generic_integer_types
@eval begin
@device_override Base.abs(x::$gentype) = @builtin_ccall("abs", $gentype, ($gentype,), x)
@device_function abs_diff... | {"hexsha": "e8c825118de10cdf34059ec375369d7502d4bd70", "size": 2968, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/device/opencl/integer.jl", "max_stars_repo_name": "troels/oneAPI.jl", "max_stars_repo_head_hexsha": "3aa4fe9383b525c5846c1254db981d431d058810", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#!/usr/bin/env python
import glob
import os
import numpy as np
import torch
from setuptools import find_packages
from setuptools import setup, Extension
from torch.utils.cpp_extension import CUDA_HOME
from torch.utils.cpp_extension import CppExte... | {"hexsha": "0865f3982d1fbc949b352edfe37f363db17ff180", "size": 2443, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/setup.py", "max_stars_repo_name": "Yoo-Youngjae/One-Shot-Object-Detection", "max_stars_repo_head_hexsha": "c560a3dfb042776854bb928682dbbf545e2cd1bf", "max_stars_repo_licenses": ["MIT"], "max_s... |
module ProgressiveAligner
push!(LOAD_PATH, dirname(@__FILE__()))
#export DataReader,
# DataWriter,
# ProfileAligner,
# Clustering
include("DataReader.jl")
include("DataWriter.jl")
include("ProfileAligner.jl")
include("Clustering.jl")
end # module
| {"hexsha": "5fd813c48ab0c199a5658b9dc31a4143b914d8c4", "size": 282, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ProgressiveAligner.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/ProgressiveAligner.jl-6b90eaca-7ca7-5d1d-b675-a9023a889a1d", "max_stars_repo_head_hexsha": "0d08a3d32b98fb31b07c790... |
import numpy as np
def msaeye(msa, unique, turbo):
tic1 = timeit.default_timer()
length = msa.shape[1]
number = msa.shape[0]
# number = 5
array = np.eye(int(number))
seqs = []
for i in range(number):
seqs.append(msa[i,:])
iseq = np.zeros((number, length), dtype=int)
for i ... | {"hexsha": "6a761edffb34f070692ecf5e4e83aa0783990663", "size": 20728, "ext": "py", "lang": "Python", "max_stars_repo_path": "prody/utilities/legacy.py", "max_stars_repo_name": "grandevelia/ProDy", "max_stars_repo_head_hexsha": "7c725640a94c16543423c0756388998cb86a97ae", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
function value = r4_besi1e ( x )
%*****************************************************************************80
%
%% R4_BESI1E: exponentially scaled Bessel function I of order 1 of an R4 argument.
%
% Licensing:
%
% This code is distributed under the GNU LGPL license.
%
% Modified:
%
% 29 September 2011
%
% ... | {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/fn/r4_besi1e.m"} |
! Rice test
! ROSE's unparser fails an assertion on an empty character string constant.
! It doesn't matter whether single or double quotes are used.
program empty_string_constant
character(*), parameter :: c1 = "" , c3 = '', c4 = "Zung" ! produces assertion failure in testTranslator
character(len = 8) :: c2 = '' ... | {"hexsha": "3ebeab8462cec69aea94c5ab09bafc8cea4c274a", "size": 341, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/CompileTests/Fortran_tests/test2011_Rice_empty-string-constant.f90", "max_stars_repo_name": "maurizioabba/rose", "max_stars_repo_head_hexsha": "7597292cf14da292bdb9a4ef573001b6c5b9b6c0", "m... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <float.h>
#include <iostream>
#include <armadillo>
#include <tuple>
#include "sys.h"
#include "grid.h"
#include "vtk_functions.h"
using namespace std;
typedef struct {
double minMag;
double maxMag;
double range;
} SYS... | {"hexsha": "d285ff201f89b63b073fab901ed6d87fcc6d4e92", "size": 7765, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/images.cpp", "max_stars_repo_name": "rubenvanstaden/Magix", "max_stars_repo_head_hexsha": "0b45955d98a57b15b021e3d2e99698972f874a2d", "max_stars_repo_licenses": ["CECILL-B"], "max_stars_count": ... |
"""
Cokriging example from [Forrester 2007] to show
MultiFiMetaModel and MultiFiCoKrigingSurrogate usage
"""
import numpy as np
from openmdao.api import Component, Group, Problem, MultiFiMetaModel, MultiFiCoKrigingSurrogate, KrigingSurrogate
def model_hifi(x):
return ((6*x-2)**2)*np.sin((6*x-2)*2)
def model_lof... | {"hexsha": "76d9ead802915bbabc35a6c596a016858208ca96", "size": 3527, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/cokriging_forrester.py", "max_stars_repo_name": "colinxs/OpenMDAO", "max_stars_repo_head_hexsha": "a9a52be29281a23a102c64b577066ee5fc70f4b4", "max_stars_repo_licenses": ["Apache-2.0"], "m... |
#!/usr/bin/env python
# coding: utf-8
from qiskit.aqua.components.optimizers import COBYLA, ADAM, SPSA
from qiskit.circuit.library import ZZFeatureMap, RealAmplitudes, ZFeatureMap, PauliFeatureMap
from Benchmarking import Benchmark, normalize_data
import csv
import numpy as np
import pandas as pd
from sklearn.prepr... | {"hexsha": "bd6b7a6f8b4f9fd10ad96cb6bef1f26557dad097", "size": 3292, "ext": "py", "lang": "Python", "max_stars_repo_path": "Src/Scripts/generalisation.py", "max_stars_repo_name": "0x6f736f646f/variational-quantum-classifier-on-heartattack", "max_stars_repo_head_hexsha": "b37c8b24cf84b1e697ca2115d7d8cbc5fa83d036", "max_... |
""" Module documentation:
https://medium.com/codingthesmartway-com-blog/the-machine-learning-crash-course-part-2-linear-regression-6a5955792109
__author__ = "R"
__copyright__ = ""
__credits__ = ["Sebastian Eschweiler"]
__license__ = "GPL"
__version__ = "1.0"
__maintainer__ = "R"
__email__ = "~"
__status__ = "P... | {"hexsha": "1e394a383e3f2a35c29d65cf54112f18644563e4", "size": 2946, "ext": "py", "lang": "Python", "max_stars_repo_path": "Networks/TF_Experimental/tf_linreg.py", "max_stars_repo_name": "unigoetheradaw/CTiTN_SS19", "max_stars_repo_head_hexsha": "f9ed90c4ec13a8024b17ff09bfc2ce19a064a879", "max_stars_repo_licenses": ["M... |
# -*- coding: utf-8 -*-
"""Auto-Encoder-v0.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/19KI_q17bSNNI3LNAD9R1x-HCSXl3sZsf
"""
# Commented out IPython magic to ensure Python compatibility.
# %tensorflow_version 2.x
import time
import torch
imp... | {"hexsha": "34566682229056709cbb605513a702dba1001c86", "size": 3893, "ext": "py", "lang": "Python", "max_stars_repo_path": "Source Code/auto_encoder_v0.py", "max_stars_repo_name": "314arham/denoise-AE", "max_stars_repo_head_hexsha": "5fce72273cce26a60837d43dbb0fcea3fed36078", "max_stars_repo_licenses": ["MIT"], "max_st... |
#ifndef SEARCH_NBEST__
#define SEARCH_NBEST__
#include "search/applied.hh"
#include "search/config.hh"
#include "search/edge.hh"
#include <boost/pool/object_pool.hpp>
#include <cstddef>
#include <queue>
#include <vector>
#include <assert.h>
namespace search {
class NBestList;
class NBestList {
private:
cla... | {"hexsha": "cb7651bc2ee0a4b4e3b5e9f3561116a34ad16296", "size": 1699, "ext": "hh", "lang": "C++", "max_stars_repo_path": "moses/search/nbest.hh", "max_stars_repo_name": "anshsarkar/TailBench", "max_stars_repo_head_hexsha": "25845756aee9a892229c25b681051591c94daafd", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
# -*- coding: utf-8 -*-
"""
Author: Philip Anfinrud, Brian Mahon, Friedrich Schotte
Date created: 12/8/2016
Date last modified: 10/17/2017
2017-06-02 1.5 Adapted for 3-way injection port
2017-10-06 1.6 Friedrich, Using IOC
2017-10-17 1.7 Brian, Friedrich, refill_1, refill_3
Setup:
Start desktop shortcut "Centris Syri... | {"hexsha": "bd0b3d509fd42180f1b1ecac7af2aeec5bce0e05", "size": 31552, "ext": "py", "lang": "Python", "max_stars_repo_path": "cavro_centris_syringe_pump.py", "max_stars_repo_name": "bopopescu/Lauecollect", "max_stars_repo_head_hexsha": "60ae2b05ea8596ba0decf426e37aeaca0bc8b6be", "max_stars_repo_licenses": ["MIT"], "max_... |
"""A binary to train using a single GPU.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import os.path
import math
import numpy as np
from six.moves import xrange # pylint: disable=redefined-builtin
import tensorflow as tf
from tensorflow.co... | {"hexsha": "d10b26bfec967e357506542a5714f98130513c48", "size": 4317, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/init_weights.py", "max_stars_repo_name": "abenbihi/elf", "max_stars_repo_head_hexsha": "fb63b7ca316a4da93e75421abbb05663d1c5fe7e", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_cou... |
import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
def cross_entropy2d(input, target, weight=None, size_average=True):
n, c, h, w = input.size()
nt, ht, wt = target.size()
weights = [5.2406, 1.0, 0.0088]
class_weights = torch.FloatTensor(weights).cuda()
# Handle ... | {"hexsha": "fd4871d75100ec0c97334d83d6bfd30241af6717", "size": 987, "ext": "py", "lang": "Python", "max_stars_repo_path": "training/rootnav2/loss/loss.py", "max_stars_repo_name": "robail-yasrab/6-RootNav-2.0", "max_stars_repo_head_hexsha": "3e973c0f7fc34b3938a2294e858d1a0de76e9f0f", "max_stars_repo_licenses": ["BSD-3-C... |
import numpy as np
from typing import Tuple
from numpy.typing import ArrayLike
from liegroups.numpy import SO2, SE2, SO3, SE3
from numpy import sin, cos
def angle_to_se2(a: float, theta: float) -> SE2:
"""Transform a single set of DH parameters into an SE2 matrix
:param a: link length
:param theta: rotati... | {"hexsha": "60adb82750aad0b72acbf4cbcbd16f6d413fce97", "size": 2884, "ext": "py", "lang": "Python", "max_stars_repo_path": "graphik/utils/geometry.py", "max_stars_repo_name": "utiasSTARS/GraphIK", "max_stars_repo_head_hexsha": "c2d05386bf9f9baf8ad146125bfebc3b73fccd14", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
function funcplus(func1, funcs...)
function (k...)
v = func1(k...)
for func in funcs
v += func(k...)
end
v
end
end
function functimes(func1, funcs...)
function (k...)
v = func1(k...)
for func in funcs
v *= func(k...)
end
v
end
end
| {"hexsha": "61c6b56a7c7f7ed5da3ab630d11c71a6e8945046", "size": 284, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/function.jl", "max_stars_repo_name": "kyungminlee/Kore.jl", "max_stars_repo_head_hexsha": "0567080ee8caf6005a83dc6e1f0e37a4ddb321af", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun... |
import geopandas
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from mpl_toolkits.axes_grid1 import make_axes_locatable
from matplotlib.backends.backend_pdf import PdfPages
from matplotlib import cm
import matplotlib.ticker ... | {"hexsha": "eb2edf7926038a269011df1fddea95488cc1520d", "size": 16646, "ext": "py", "lang": "Python", "max_stars_repo_path": "Projects/COVID19/createCOVID19StateVisualizationsByCountyAndState.py", "max_stars_repo_name": "hunterluepke/Learn-Python-for-Stats-and-Econ", "max_stars_repo_head_hexsha": "d580a8e27ba937fc8401ac... |
import numpy as np
import matplotlib.pyplot as plt
deepsea="/home/fast/onimaru/encode/deepsea/deepsea_pred.txt"
deepshark="/home/fast/onimaru/encode/deepsea/deepshark_Tue_Apr_17_183529_2018.ckpt-57883_prediction.log"
deepsea_dict={}
with open(deepsea, 'r') as fin:
for line in fin:
if not line.startswith... | {"hexsha": "c04a01572edb6c0a8ad443fff743f8095f424705", "size": 1505, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepgmap/misc/compare_deepsea_data.py", "max_stars_repo_name": "koonimaru/DeepGMAP", "max_stars_repo_head_hexsha": "7daac354229fc25fba81649b741921345dc5db05", "max_stars_repo_licenses": ["Apache-2... |
import json
import codecs
import numpy as np
import plotly.express as px
import streamlit as st
import os
class Web:
def __init__(self):
self.ruta_menus = os.path.join("scraper_siglas-uc", "outputs", "menus.json")
self.min_rec = 4
self.max_rec = 30
self.step_rec = 2
... | {"hexsha": "83a53092089c83461b4291365f9919130c742576", "size": 3090, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/web.py", "max_stars_repo_name": "estebanrucan/recomendador-cursos-uc", "max_stars_repo_head_hexsha": "5ea1f660832e7b21c4b13031c88e2b3e8d1ce9fe", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
! { dg-do compile }
! { dg-options "-fimplicit-none" }
!
! PR 41121: [4.5 Regression] compile-time error when building BLAS with -fimplicit-none
!
! Original test case: http://www.netlib.org/blas/dgbmv.f
! Reduced by Joost VandeVondele <jv244@cam.ac.uk>
INTRINSIC MIN
INTEGER :: I,J
print *,MIN(I,J)
END
| {"hexsha": "77ecf32beeb5db2432c27a9e0414affb9a617c63", "size": 312, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/intrinsic_5.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_lice... |
[STATEMENT]
lemma maxr_lg: "\<lbrakk>Suc 0 < x; Suc 0 < y\<rbrakk> \<Longrightarrow> Maxr lgR [x, y] x = lg x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>Suc 0 < x; Suc 0 < y\<rbrakk> \<Longrightarrow> Maxr lgR [x, y] x = lg x y
[PROOF STEP]
apply(auto simp add: lg.simps Maxr.simps)
[PROOF STATE]
proo... | {"llama_tokens": 450, "file": "Universal_Turing_Machine_UF", "length": 3} |
from sympl import (
AdamsBashforth, PlotFunctionMonitor)
from climt import (
Frierson06LongwaveOpticalDepth, GrayLongwaveRadiation,
SimplePhysics, DryConvectiveAdjustment, SlabSurface,
get_default_state)
import climt
import datetime
import numpy as np
import sympl
from datetime import timedelta
import m... | {"hexsha": "78f97ae7508ed25bf1cb1ac87358cc72fe4d58e7", "size": 2895, "ext": "py", "lang": "Python", "max_stars_repo_path": "RCEModel/modelTimestep.py", "max_stars_repo_name": "Mihir-DG/Modelling-Planetary-Climate", "max_stars_repo_head_hexsha": "4699d55d6ccecc4938f9844dd658e9c40c6d07c2", "max_stars_repo_licenses": ["MI... |
"""
Training a seq2bow encoder-decoder model
========================================
"""
from tmnt.estimator import SeqBowEstimator
import numpy as np
import gluonnlp as nlp
import os
import mxnet as mx
import logging
from sklearn.datasets import fetch_20newsgroups
from tmnt.preprocess.vectorizer import TMNTVectorizer... | {"hexsha": "d344d61a2ab3fa177256f0730e0eda3a7e1908e3", "size": 2785, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/f_seqbow_20news.py", "max_stars_repo_name": "swfarnsworth/tmnt", "max_stars_repo_head_hexsha": "a53c8d62d0ddc6be5fc62013e6801019c345a6f4", "max_stars_repo_licenses": ["Apache-2.0"], "max_... |
import os
import sys
import numpy as np
import random
import string
import tensorflow as tf
from tensorflow.models.rnn import rnn, rnn_cell
import collections
import urllib
import zipfile
url = 'http://mattmahoney.net/dc/'
def maybe_download(filename, expected_bytes):
"""Download a file if not present, and make sur... | {"hexsha": "d1180e2f598bd13f6f6057e8ee3c4d519de75e13", "size": 14939, "ext": "py", "lang": "Python", "max_stars_repo_path": "autocompletion.py", "max_stars_repo_name": "randomrandom/cbow-ml-autocompletion", "max_stars_repo_head_hexsha": "26bb277626dee2b5bbd92aa268c3f1528c66fbae", "max_stars_repo_licenses": ["MIT"], "ma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.