Skip to content

Instantly share code, notes, and snippets.

View pradyunsg's full-sized avatar

Pradyun Gedam pradyunsg

View GitHub Profile
@pradyunsg
pradyunsg / css_to_inject.css
Created September 21, 2020 15:59
Limited height Repository Files listing, on GitHub
[aria-labelledby="files"] {
overflow-y: auto;
max-height: 46vh;
/* Add a shadow to the edges with scroll-hidden content */
background:
/* Shadow covers */
linear-gradient(white 30%, rgba(255, 255, 255, 0)),
linear-gradient(rgba(255, 255, 255, 0), white 70%) 0 100%,
/* Shadows */
@pradyunsg
pradyunsg / README.md
Created August 26, 2020 12:20
Nicer LimeSurvey form UI

USAGE

  1. Open the "[LimeSurvey]/survey/index.php?r=admin/responses/sa/index/surveyid/[survey-id]".
  2. Get the HTML of the table element containing the responses into a file.
    • Right click the first response, Inspect Element
    • Select "<table class="table-striped table">" in the new window/pane that opened.
    • Copy the HTML for that element (w/ ctrl+c or cmd+c)
    • Paste this into a text editor and save this file (anything works, I'm assuming it's surveys.html).
  3. Install jinja2 and BeautifulSoup4. (pip install jinja2 beautifulsoup4)
  4. Run python nicer-survey-ui.py surveys.html.
function commands_to_test() {
pip install oslo.utils==1.4.0
}
if [ "$VIRTUAL_ENV" ]; then
echo "Please run 'deactivate' and try again."
exit 1
fi
# Make a virtualenv and use that.
This file has been truncated, but you can view the full file.
2020-05-08T17:44:53,092 Non-user install because user site-packages disabled
2020-05-08T17:44:53,102 Created temporary directory: /private/var/folders/4d/bt0_xfx56bjfmmt2bv3r5_qh0000gn/T/pip-ephem-wheel-cache-ql7y4i0p
2020-05-08T17:44:53,103 Created temporary directory: /private/var/folders/4d/bt0_xfx56bjfmmt2bv3r5_qh0000gn/T/pip-req-tracker-ch141f_5
2020-05-08T17:44:53,103 Initialized build tracking at /private/var/folders/4d/bt0_xfx56bjfmmt2bv3r5_qh0000gn/T/pip-req-tracker-ch141f_5
2020-05-08T17:44:53,103 Created build tracker: /private/var/folders/4d/bt0_xfx56bjfmmt2bv3r5_qh0000gn/T/pip-req-tracker-ch141f_5
2020-05-08T17:44:53,103 Entered build tracker: /private/var/folders/4d/bt0_xfx56bjfmmt2bv3r5_qh0000gn/T/pip-req-tracker-ch141f_5
2020-05-08T17:44:53,103 Created temporary directory: /private/var/folders/4d/bt0_xfx56bjfmmt2bv3r5_qh0000gn/T/pip-install-go6b3ifp
2020-05-08T17:44:53,178 1 location(s) to search for versions of alembic:
2020-05-08T17:44:53,178 * https://pypi.org/simple/alembic/
2020-05-08T17:
@pradyunsg
pradyunsg / new.sql
Created April 16, 2020 17:59
Quota Usage with new BigQuery structure
SELECT
COUNT(*) as count
FROM
`the-psf.pypi.file_downloads`
WHERE
DATE(timestamp) between DATE "2020-04-01" and DATE "2020-04-15"
-- This query will process 18.3 GB when run.
@pradyunsg
pradyunsg / django-on_delete-deprecation.txt
Last active March 10, 2020 15:20
Junction Test warnings, as on March 10, 2020
tests/integrations/test_conferences.py::test_conferences
/Users/pradyunsg/Projects/junction/junction/profiles/migrations/0001_initial.py:25: RemovedInDjango20Warning: on_delete will be a required arg for OneToOneField in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.9/ref/models/fields/#django.db.models.ForeignKey.on_delete
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)),
tests/integrations/test_conferences.py::test_conferences
/Users/pradyunsg/Projects/junction/junction/conferences/migrations/0014_conferencesettings.py:63: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.9/ref/models/fields/#django.db.models.ForeignKey.on_delete
('conference', models.ForeignKey(to='confe
@pradyunsg
pradyunsg / pypi-download-dump-20190621.md
Last active June 21, 2019 16:42
6 months of PyPI download information -- project,pyversion,week,year,count -- query and data dump

There's 2 files in this Gist -- the query and the 16000 JSON records (BigQuery download limit) of the result of that executing that query.

It used >500 GB of the free 1 TB quota, so I can't really run this again. :)

@pradyunsg
pradyunsg / keybase.md
Created July 4, 2018 11:03
Keybase Identity stuff

Keybase proof

I hereby claim:

  • I am pradyunsg on github.
  • I am pradyunsg (https://keybase.io/pradyunsg) on keybase.
  • I have a public key whose fingerprint is 1A43 3BF0 F622 C12B 41EF 3A7A DA17 C4B2 9CB3 2E4B

To claim this, I am signing this object:

@pradyunsg
pradyunsg / README.md
Last active January 24, 2019 15:25
A proposal for a new output format for pip

Reworking the output of pip install, download, wheel

Current Output

Collecting Flask
  Downloading Flask-0.12.2-py2.py3-none-any.whl (83kB)
    100% |████████████████████████████████| 92kB 296kB/s
Collecting itsdangerous>=0.21 (from Flask)
  Downloading itsdangerous-0.24.tar.gz (46kB)