Skip to content

Instantly share code, notes, and snippets.

View relwell's full-sized avatar
😎
keeping it 💯

Robert Elwell relwell

😎
keeping it 💯
View GitHub Profile
# enter pipenv
pipenv shell
# install pipenv dependencies
pipenv install
# get a list of available commands
python manage.py
# run import assessors
# checks out the new branch
git checkout -b my-branch
# add your changes
git add .
# commit your changes
git commit -m 'this is my commit message'
# push your changes
In [11]: for a in AttomAssessor.objects.filter(data__SitusCounty="Fulton"):
...: print("fultoncounty.org/whatever?%s" % urlencode({ "ParcelID": a.data.get("ParcelNumberRaw") }))
@relwell
relwell / gist:f4ac915aa0fd52515be896a03e4e8b0b
Created April 30, 2020 21:06
nested aggregation filter?
{
"aggs": {
"wiki_page_edits": {
"nested": {
"path": "wiki_page_edits"
},
"aggs": {
"wiki_page_edits.email": {
"filter": {
"bool": {
fs.js:3 Circular dependency detected:
app/containers/StudyPage/StudyPage.tsx -> app/containers/WorkflowPage/index.tsx -> app/containers/WorkflowPage/WorkflowPage.tsx -> app/containers/WorkflowPage/SuggestedLabels.tsx -> app/containers/StudyPage/index.ts -> app/containers/StudyPage/StudyPage.tsxCircular dependency detected:
app/containers/StudyPage/index.ts -> app/containers/StudyPage/StudyPage.tsx -> app/containers/WorkflowPage/index.tsx -> app/containers/WorkflowPage/WorkflowPage.tsx -> app/containers/WorkflowPage/SuggestedLabels.tsx -> app/containers/StudyPage/index.tsCircular dependency detected:
app/containers/WorkflowPage/SuggestedLabels.tsx -> app/containers/StudyPage/index.ts -> app/containers/StudyPage/StudyPage.tsx -> app/containers/WorkflowPage/index.tsx -> app/containers/WorkflowPage/WorkflowPage.tsx -> app/containers/WorkflowPage/SuggestedLabels.tsxCircular dependency detected:
app/containers/WorkflowPage/WorkflowPage.tsx -> app/containers/WorkflowPage/SuggestedLabels.tsx -> app/containers/StudyPa
@relwell
relwell / gist:fb2c3f693e39e8cdde40d27a2099fac9
Created March 23, 2020 20:45
hash query component log output
inside params query component
{data: {…}, variables: {…}, refetch: ƒ, fetchMore: ƒ, updateQuery: ƒ, …}
data:
searchParams: {q: "{"children":[{"children":[],"key":"stomach"}],"key":"AND"}", sorts: Array(0), aggFilters: Array(1), crowdAggFilters: Array(0), page: 0, …}
variables: {hash: "pQJf6HTK"}
refetch: ƒ ()
fetchMore: ƒ ()
updateQuery: ƒ ()
startPolling: ƒ ()
stopPolling: ƒ ()
@relwell
relwell / gist:2566769b7d6b38b3742069a781de749d
Created February 28, 2020 17:38
oktaoauth monkeypatch
# frozen_string_literal: true
module OmniAuth::Strategies
class Oktaoauth
undef :access_token
attr :access_token
end
end
Zappa (and AWS Lambda) support the following versions of Python: ['2.7', '3.6']
Traceback (most recent call last):
File "/var/lang/lib/python3.7/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/var/lang/lib/python3.7/imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 696, in _load
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
"""Dump the GraphQL schema for the frontend."""
from your.graphql_api import schema
print(schema)
```
query GetUserPanels {
currentUser {
panelDetails {
privatePanelActiveSession
myPanelActiveSession
utPanelActiveSession
}
}
}