This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// go get github.com/dolthub/dolt/go@main github.com/dolthub/dolt/go/gen/proto/dolt/services/eventsapi@main | |
func TestWithDB(t *testing.T) { | |
ctx, cancel := context.WithCancel(context.Background()) | |
defer cancel() | |
// start dolt and connect to existing database | |
defer RunDolt(t, ctx, "my_database")() | |
conn := getConnection() | |
// read from and write to database and run tests here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> poetry run mypy --strict worker_typing.py | |
worker_typing.py:10: error: Value of type variable "NodeType" of function cannot be "int" [type-var] | |
worker_typing.py:17: error: Value of type variable "NodeType" of function cannot be "NotAWidget" [type-var] | |
worker_typing.py:28: error: Argument 1 has incompatible type "Callable[[MyWidget, float], set[str]]"; expected "Callable[[MyWidget, float], Coroutine[None, None, Never]]" [arg-type] | |
worker_typing.py:28: note: This is likely because "blocking_local_worker of MyWidget" has named arguments: "self". Consider marking them positional-only | |
worker_typing.py:41: error: Argument 1 to "work" has incompatible type "Callable[[MyWidget, float], int]"; expected "Callable[[MyWidget, float], Coroutine[None, None, Never]]" [arg-type] | |
worker_typing.py:41: note: This is likely because "blocking_simple_decorator of MyWidget" has named arguments: "self". Consider marking them positional-only | |
worker_typing.py:51: error: Missing positional arguments "arg1", "arg2" in call to "my_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pyright --version | |
pyright 1.1.329 | |
$ pyright test.py | |
/tmp/test.py | |
/tmp/test.py:1395:1 - warning: Unsupported escape sequence in string literal (reportInvalidStringEscapeSequence) | |
0 errors, 1 warning, 0 informations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import timeit | |
import numpy as np | |
import theano | |
import theano.tensor as T | |
x = theano.shared(np.random.rand(500, 100).astype(theano.config.floatX)) | |
W = theano.shared(np.random.rand(10, 100, 50).astype(theano.config.floatX)) | |
y = theano.shared(np.random.randint(0, 10, 500).astype(theano.config.floatX)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File ".../.venv/lib/python3.5/site-packages/theano/gof/link.py", line 1012, in f | |
wrapper(i, node, *thunks) | |
File ".../.venv/lib/python3.5/site-packages/theano/compile/nanguardmode.py", line 307, in nan_check | |
do_check_on(x[0], node, fn, False) | |
File ".../.venv/lib/python3.5/site-packages/theano/compile/nanguardmode.py", line 272, in do_check_on | |
raise AssertionError(msg) | |
AssertionError: NaN detected | |
NanGuardMode found an error in the output of a node in this variable: | |
Elemwise{true_div} [id A] '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import asyncio | |
import re | |
import sys | |
import aiohttp | |
import lxml.html | |
async def get_periods(session, course): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################################################################### | |
# Automatically generated by qmake (3.0) Sun Nov 9 18:05:54 2014 | |
###################################################################### | |
TEMPLATE = app | |
TARGET = anthy-testcase | |
INCLUDEPATH += . | |
QT -= gui | |
LIBS += -lanthy | |
CONFIG += debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anthy_set_string(this->context, "b") | |
anthy_get_stat(this->context, &this->conv_stat) -> 1 (conv_stat.nr_segment) | |
anthy_get_segment(this->context, 0, 0, buf, 1000) -> "B" (buf) | |
anthy_get_stat(this->context, &this->conv_stat) -> 1 (conv_stat.nr_segment) | |
anthy_get_segment_stat(this->context, 0, &this->segment_stat) -> 4 (segment_stat.nr_candidate) | |
anthy_get_segment(this->context, 0, 0, buf, 1000) -> "B" (buf) | |
anthy_get_segment(this->context, 0, 1, buf, 1000) -> "B" (buf) | |
anthy_get_segment(this->context, 0, 2, buf, 1000) -> "b" (buf) | |
anthy_get_segment(this->context, 0, 3, buf, 1000) -> "b" (buf) | |
anthy_set_prediction_string(this->context, "b") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import tornado.concurrent | |
import tornado.ioloop | |
import tornado.web | |
import tornado.platform.asyncio | |
import tornado.httpclient | |
class ReqHandler(tornado.web.RequestHandler): | |
async def get(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEMPLATE = lib | |
TARGET = keepaliveplugin | |
TARGET = $$qtLibraryTarget($$TARGET) | |
QT += dbus qml | |
CONFIG += debug plugin | |
INCLUDEPATH += nemo-keepalive/lib | |
PROJECT = PROJECT_NAME_HERE | |
TARGET_PATH = /usr/share/harbour-$$PROJECT/harbour/$$PROJECT/keepalive |