Skip to content

Instantly share code, notes, and snippets.

View odigity's full-sized avatar

Ofer Nave odigity

View GitHub Profile
@odigity
odigity / gist:45fbcf3634c6ddafbe1d4e7b822bf2d7
Last active July 2, 2023 22:16
Map of INMOTION Resources
---------------------------------------------------------------------- INMOTION
inmotionworld.com
inmotionworld.com/about/contact
inmotionworld.com/support/app
store.inmotionworld.com
store.inmotionworld.com/pages/contact-us
play.google.com/store/apps/details?id=com.inmotion.android.app
@odigity
odigity / .funktools
Last active October 6, 2023 13:05
Funktools - cobbling together a superset of Python's functools
A collection of Python functools-inspired extensions from other sources.
@odigity
odigity / gist:53bf47cca9a238a905c276760153838d
Created September 3, 2022 23:44
anyk and anyq queryset methods for Django
class FooQS(models.QuerySet):
# expects zero or more filter-style kwargs
def anyk(self, **kwargs):
if len(kwargs) == 0:
return self
if len(kwargs) == 1:
return self.filter(**kwargs)
q = Q(kwargs.popitem())
for k, v in kwargs.items():
@odigity
odigity / README.md
Last active July 27, 2022 16:06
Django 3.2.14 Defaults
@odigity
odigity / gist:d73cf6338a5bb7908399cbe58d84572d
Created June 5, 2022 15:30
Traceback from django-storages dying because no bucket_name is set
Traceback (most recent call last):
File "/home/ofer/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/ofer/.local/lib/python3.8/site-packages/django/core/handlers/base.py", line 204, in _get_response
response = response.render()
File "/home/ofer/.local/lib/python3.8/site-packages/django/template/response.py", line 105, in render
self.content = self.rendered_content
File "/home/ofer/.local/lib/python3.8/site-packages/django/template/response.py", line 83, in rendered_content
return template.render(context, self._request)
File "/home/ofer/.local/lib/python3.8/site-packages/django/template/backends/django.py", line 61, in render
@odigity
odigity / schema.txt
Created May 21, 2022 17:24
Django 3.0 Default Schema
auth_group
id
name varchar(150) NOT NULL UNIQUE
auth_group_permissions
id
group_id integer NOT NULL REFERENCES "auth_group"("id") DEFERRABLE INITIALLY DEFERRED
permission_id integer NOT NULL REFERENCES "auth_permission"("id") DEFERRABLE INITIALLY DEFERRED
auth_permission
@odigity
odigity / COMMAND.txt
Created May 21, 2022 17:21
Django 3.0 App Template Results
$ django-admin startapp polls
@odigity
odigity / COMMAND.txt
Created May 21, 2022 17:16
Django 3.0 Project Template Results
$ django-admin startproject mysite
@odigity
odigity / log.txt
Created May 14, 2022 17:32
Celery Workflows
───────────────────────────────────────────────────────────────────────────
• First Task Enqueuing Second Task
(T)
└────> (T)
---------------------------------------------------------------------------
pr = p.delay() -> <AsyncResult: fe7c16b9>
@odigity
odigity / notes.txt
Created April 7, 2022 15:27
Transportation Research
┌────────────────────┐
│ Metric Conversions │
└────────────────────┘
3.0 kph -> 1.86 mph
5.6 kph <- 3.5 mph
6.0 kph -> 3.73 mph
7.5 kph -> 4.66 mph