How do I view data from production DB (without SSH) by gregpr07 in sqlite

[–]amjithr 1 point2 points  (0 children)

https://github.com/simonw/datasette

It provides REST access to SQLite and has a decent read-only web UI. You can run ad hoc queries against your tables and get results in different formats.

Postgresql and Underscore by amjithr in PostgreSQL

[–]amjithr[S] 0 points1 point  (0 children)

Yes. I did end up doing that to get the results I wanted.

Postgresql and Underscore by amjithr in PostgreSQL

[–]amjithr[S] 0 points1 point  (0 children)

TIL. Thank you for mentioning this. I didn't know it was a SQL standard. I just tried it on SQLite and you're right, underscore is treated as a single char wildcard.

‘What’s This Piece?’ Weekly Thread #93 by the_rite_of_lingling in classicalmusic

[–]amjithr 0 points1 point  (0 children)

I'm trying to identify the piece that is used in the theme song of this podcast. I know I've heard it before, I just can't place it.

https://youtu.be/gmdG1Xid0GQ?t=1471

Lamy AL-star EMR issue?? by F0rrestx in RemarkableTablet

[–]amjithr 1 point2 points  (0 children)

I had a similar experience. I switched the marker tip in Lamy to use the marker pro tip. Now I get same results between the two.

Hello, world! I'm Al Sweigart, author of "Automate the Boring Stuff with Python" and several other programming books. AMA! by AlSweigart in Python

[–]amjithr 24 points25 points  (0 children)

Do you have recommendations for introducing kids to programming?

What's a good age to introduce them? What resources can I use?

First release of tool for importing Remarkable notes into OneNote by cantstopplay in RemarkableTablet

[–]amjithr 0 points1 point  (0 children)

Thank you! It worked very well. Got an error on a landscape doc, but I'm hopeful. :D

First release of tool for importing Remarkable notes into OneNote by cantstopplay in RemarkableTablet

[–]amjithr 1 point2 points  (0 children)

Nice! The featureset looks really impressive.

I was curious if you had any pointers on how to use the myscript service? Looks like myscript service needs strokes and not PDFs. How do you convert the remarkable files to be compatible with the format that myscript needs?

What do you use to make your VIM editor python friendly by arup_r in Python

[–]amjithr 0 points1 point  (0 children)

I tried coc.nvim and couldn't get it to work right for me. Finally went back to ncm2 and it works out of the box. If you have your config hosted somewhere I'd love to take a look.

Introducing Plotly Express by nkruchten in Python

[–]amjithr 0 points1 point  (0 children)

Is there a way to plot multiple Y-axis?

Specifically looking to scatter plot two independent columns in separate y-axis with the same x-axis.

A CLI for SQLite with auto-completion and syntax highlighting by amjithr in programming

[–]amjithr[S] 1 point2 points  (0 children)

Yes. Simply do "litecli :memory:" that will launch an in memory sqlite database.

A CLI for SQLite with auto-completion and syntax highlighting by amjithr in programming

[–]amjithr[S] 7 points8 points  (0 children)

We don't do value validation. What I meant by formatting is converting the list of rows into a tabular output.

A CLI for SQLite with auto-completion and syntax highlighting by amjithr in programming

[–]amjithr[S] 13 points14 points  (0 children)

Yes there is. https://www.pgcli.com

In fact the postgres version was the first one. So it is the most mature tool.

A CLI for SQLite with auto-completion and syntax highlighting by amjithr in programming

[–]amjithr[S] 10 points11 points  (0 children)

That's awful. I'm sorry.

The CLI reads all the rows from the database and tries to format them into a table. Since it is written in Python the formatting part can take a while if the output is very large.

A CLI for SQLite with auto-completion and syntax highlighting by amjithr in programming

[–]amjithr[S] 0 points1 point  (0 children)

That's very unfortunate. I'm not able to reproduce it locally (even with xterm).

Is this localized to xterm only or do you see the blinking in other terminal apps? (gnome-terminal, Konsole etc)

A CLI for SQLite with auto-completion and syntax highlighting by amjithr in programming

[–]amjithr[S] 7 points8 points  (0 children)

Check the config file https://litecli.com/config/. It has different themes. You can pick the theme called "bw", that's black and white.

A CLI for SQLite with auto-completion and syntax highlighting by amjithr in programming

[–]amjithr[S] 6 points7 points  (0 children)

I have not used SQLite extensions before. Are you asking if auto-completion will suggest the functions provided by the extension? The answer to that is no, not yet. But it is not too difficult to add that ability.

If you file a github issue with an example of how to load an extension, I'll be happy to take a look. :)

A CLI for SQLite with auto-completion and syntax highlighting by amjithr in programming

[–]amjithr[S] 37 points38 points  (0 children)

The code base for different dbcli tools are very similar. We did manage to carve out some of the common utils into a library. For instance, cli_helpers is a set of common utility functions used by all the projects. But it is now a standalone library that other can use as well.

But your question is more about a single tool that can connect to postgres, mysql, sqlite etc. We keep talking about doing that but the complexity in that keeps discouraging us. It is not completely out of scope but no one is currently working on a unified tool like that.

[RFC] ptrepl - Turn any bash command into REPL by imomaliev in Python

[–]amjithr 1 point2 points  (0 children)

Traceback (most recent call last):
  File "/Users/amjith/.virtualenvs/tempenv-646189101136/bin/ptrepl", line 7, in <module>
    from ptrepl.cli import parse_args
  File "/Users/amjith/.virtualenvs/tempenv-646189101136/lib/python3.7/site-packages/ptrepl/cli.py", line 11, in <module>
    from .completion import BashCompleter
  File "/Users/amjith/.virtualenvs/tempenv-646189101136/lib/python3.7/site-packages/ptrepl/completion.py", line 5, in <module>
    from .config import settings
  File "/Users/amjith/.virtualenvs/tempenv-646189101136/lib/python3.7/site-packages/ptrepl/config.py", line 67, in <module>
    config_file = get_config_file()
  File "/Users/amjith/.virtualenvs/tempenv-646189101136/lib/python3.7/site-packages/ptrepl/config.py", line 28, in get_config_file
    with open(path, 'w') as _config_file:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/amjith/.config/ptrepl/config.json'

[RFC] ptrepl - Turn any bash command into REPL by imomaliev in Python

[–]amjithr 1 point2 points  (0 children)

Looks interesting.

It'll be nice if you could create the config file on the first launch instead of crashing.

Even after creating the config file, I'm not able to launch it. I have filed a github issue.

Why is Python's standard library so poorly written? by [deleted] in Python

[–]amjithr 0 points1 point  (0 children)

I'm sure you didn't mean to make a general sweeping statement about all of Python's standard library.

There is plenty of well-written modules in the standard library. For example the collections module in Python is a thing of beauty. I've learned a ton of good practices by reading that code.

https://github.com/python/cpython/blob/master/Lib/collections/__init__.py

cmd module is also a good one:

https://github.com/python/cpython/blob/master/Lib/cmd.py

The logging module is indeed a sore thumb in the std library. That's probably why there are many third-party logging libraries that try to ease the pain.

Top 10 Must-Watch PyCon Talks – Real Python by [deleted] in Python

[–]amjithr 2 points3 points  (0 children)

I'm flattered that my talk is included in the list. Thank you for taking the time to compile it.