q

Quick and dirty debugging output for tired programmers. ⛺

https://github.com/zestyping/q

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.5%) to scientific vocabulary

Keywords from Contributors

packaging pip wsgi
Last synced: 11 months ago · JSON representation

Repository

Quick and dirty debugging output for tired programmers. ⛺

Basic Info
  • Host: GitHub
  • Owner: zestyping
  • License: apache-2.0
  • Language: Python
  • Default Branch: master
  • Size: 85 KB
Statistics
  • Stars: 1,302
  • Watchers: 27
  • Forks: 64
  • Open Issues: 19
  • Releases: 0
Created over 13 years ago · Last pushed over 2 years ago
Metadata Files
Readme License

README.md

q

Code Shelter

Quick and dirty debugging output for tired programmers.

For a short demo, watch the Lightning Talk from PyCon 2013.

Install q with pip install -U q.

All output goes to /tmp/q (or on Windows, to $HOME/tmp/q). You can watch the output with this shell command while your program is running:

tail -f /tmp/q

To print the value of foo, insert this into your program:

import q; q(foo)

To print the value of something in the middle of an expression, you can wrap it with q(). You can also insert q/ or q| into the expression; q/ binds tightly whereas q| binds loosely. For example, given this statement:

file.write(prefix + (sep or '').join(items))

you can print out various values without using any temporary variables:

file.write(prefix + q(sep or '').join(items))  # prints (sep or '')
file.write(q/prefix + (sep or '').join(items))  # prints prefix
file.write(q|prefix + (sep or '').join(items))  # prints the arg to write

To trace a function (showing its arguments, return value, and running time), insert this above the def:

import q
@q

To start an interactive console at any point in your code, call q.d():

import q; q.d()

By default the output of q is not truncated, but it can be truncated by calling:

q.short

Truncation can be reversed by:

python q.long # Truncates output to 1,000,000 q.long = 2000000 # Truncates output to 2,000,000

Other projects inspired by this one

The following Lightning Talk shows how powerful using q can be.

Owner

  • Name: Ka-Ping Yee
  • Login: zestyping
  • Kind: user
  • Location: Berkeley, California

GitHub Events

Total
  • Watch event: 15
  • Issue comment event: 2
  • Fork event: 1
Last Year
  • Watch event: 15
  • Issue comment event: 2
  • Fork event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 94
  • Total Committers: 19
  • Avg Commits per committer: 4.947
  • Development Distribution Score (DDS): 0.649
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Tim 'mithro' Ansell m****o@m****m 33
Ka-Ping Yee p****g@z****a 17
Thomas Jost s****i@s****t 15
Jerome Leclanche j****e@l****h 7
Toshio Kuratomi t****o@f****g 6
Federico Ceratto f****o@g****m 2
Daniel Lepage d****e@g****m 2
Sean Reifschneider j****o@t****m 1
Shane Chin s****e@s****o 1
Ansgar Grunseid g****d@g****m 1
Christopher Chianelli c****i@g****m 1
Mandar Vaze m****e@g****m 1
Po Chen c****4@g****m 1
Remi Rampin r****n@g****m 1
Stavros Korokithakis hi@s****o 1
Steve Barrau s****x@g****m 1
Tim Burke t****e@g****m 1
Yuriy Taraday y****r@g****m 1
roth r****7@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 29
  • Total pull requests: 38
  • Average time to close issues: about 1 year
  • Average time to close pull requests: 9 months
  • Total issue authors: 24
  • Total pull request authors: 21
  • Average comments per issue: 3.0
  • Average comments per pull request: 2.37
  • Merged pull requests: 26
  • Bot issues: 1
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jleclanche (3)
  • SnoopJ (2)
  • anntzer (2)
  • JPFrancoia (2)
  • DIYer22 (1)
  • r1chardj0n3s (1)
  • alexwlchan (1)
  • alonsocamaro (1)
  • esthicodes (1)
  • merriam (1)
  • proofit404 (1)
  • M0rtenB (1)
  • evertvr (1)
  • skorokithakis (1)
  • hblanks (1)
Pull Request Authors
  • mithro (13)
  • abadger (4)
  • FedericoCeratto (2)
  • Schnouki (2)
  • tipabu (1)
  • BioGeek (1)
  • remram44 (1)
  • mistotebe (1)
  • mandarvaze (1)
  • rothman857 (1)
  • dplepage (1)
  • YorikSar (1)
  • shanechin (1)
  • xsteve (1)
  • Julian (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 42,673 last-month
  • Total docker downloads: 464
  • Total dependent packages: 5
  • Total dependent repositories: 7
  • Total versions: 13
  • Total maintainers: 3
pypi.org: q

Quick-and-dirty debugging output for tired programmers

  • Versions: 13
  • Dependent Packages: 5
  • Dependent Repositories: 7
  • Downloads: 42,673 Last month
  • Docker Downloads: 464
Rankings
Dependent packages count: 1.9%
Stargazers count: 1.9%
Downloads: 2.1%
Docker downloads count: 2.4%
Average: 3.2%
Forks count: 5.2%
Dependent repos count: 5.6%
Maintainers (3)
Last synced: 11 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
setup.py pypi