filename stringlengths 13 19 | text stringlengths 134 1.04M |
|---|---|
the-stack_0_2 | # A sample recursive neural network for text classification
# @Time: 8/13/2020
# @Author: lnblanke
# @Email: fjh314.84@gmail.com
# @File: cnn.py
import numpy as np
import tensorflow as tf
from blocks import RNN, Dense
from model import Model
import os
path = os.path.join("glove.6B.100d.txt")
embedding_indices = {}
... |
the-stack_0_3 | # -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# 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... |
the-stack_0_6 | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django_admin_monitoring... |
the-stack_0_7 | # Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author)
# Mathieu Blondel (partial_fit support)
#
# License: BSD 3 clause
"""Classification and regression using Stochastic Gradient Descent (SGD)."""
import numpy as np
import warnings
from abc import ABCMeta, abstractmethod
from... |
the-stack_0_9 | from datetime import datetime, timedelta
import pytest
import pytz
from kaffepause.breaks.selectors import get_pending_break_invitations
from kaffepause.breaks.test.factories import BreakFactory, BreakInvitationFactory
pytestmark = pytest.mark.django_db
def test_get_break_invitations_awaiting_reply_returns_unanswe... |
the-stack_0_10 | import numpy as np
from scipy.sparse import diags
from scipy.sparse import kron
from scipy.sparse import eye
from .two_particles import TwoParticles
from ..util.constants import *
from .. import Eigenstates
class TwoFermions(TwoParticles):
def get_eigenstates(self, H, max_states, eigenvalues, eigenvectors):
... |
the-stack_0_13 | """
Copyright 2018 Google LLC
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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... |
the-stack_0_14 | import base64
import logging
from urllib import urlencode
from dateutil.tz import tzutc
import httplib2
from sharpy.exceptions import AccessDenied
from sharpy.exceptions import BadRequest
from sharpy.exceptions import CheddarError
from sharpy.exceptions import CheddarFailure
from sharpy.exceptions import NaughtyGatewa... |
the-stack_0_15 | from fastbook import *
from fastai.vision.widgets import *
def create_dataloader(path):
print(" Creating dataloader.. ")
db = DataBlock(
blocks=(ImageBlock, CategoryBlock),
get_items=get_image_files,
splitter=RandomSplitter(valid_pct=0.2, seed=42),
get_y=parent_label,
... |
the-stack_0_17 | "# Copyright (c) 2015 Ansible, Inc.\n# All Rights Reserved.\n\n# Python\nimport copy\nimport json\ni(...TRUNCATED) |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 57