Jon Parker πŸ‡ΊπŸ‡¦ (@jonathanparker) header
Jon Parker πŸ‡ΊπŸ‡¦ (@jonathanparker) profile picture

Senior Full Stack Developer. Opinions mine

Melbourne, Victoria
Joined June 2007
Photo by Jon Parker πŸ‡ΊπŸ‡¦ (@jonathanparker)Photo by Jon Parker πŸ‡ΊπŸ‡¦ (@jonathanparker)Photo by Jon Parker πŸ‡ΊπŸ‡¦ (@jonathanparker)Photo by Jon Parker πŸ‡ΊπŸ‡¦ (@jonathanparker)Photo by Jon Parker πŸ‡ΊπŸ‡¦ (@jonathanparker)Photo by Jon Parker πŸ‡ΊπŸ‡¦ (@jonathanparker)Photo by Jon Parker πŸ‡ΊπŸ‡¦ (@jonathanparker)Photo by Jon Parker πŸ‡ΊπŸ‡¦ (@jonathanparker)Photo by Jon Parker πŸ‡ΊπŸ‡¦ (@jonathanparker)
The Big Switch by @GriffithSaul just arrived! Time to get Australia switched on πŸ‡¦πŸ‡Ί πŸ§ πŸ’‘βš‘ #electricity #greenenergy #Aussie
1
4
Jon Parker πŸ‡ΊπŸ‡¦ retweeted
It's been 24+ hours now since techstudyslack (a ~90,000 member community) hosted via @SlackHQ just stopped working. I've had little response from support and don't see any evidence of a solution. Techstudyslack is a thriving community where people can discuss tech/certification and career development. I chose @SlackHQ ~5 years ago because it seemed like they supported communities like ours but I'm not so sure anymore.
96
159
48
426
46,953
You can tell how it's going to work out just by comparing the logos!
1
1
Jon Parker πŸ‡ΊπŸ‡¦ retweeted
MelbJS is back to monthly events! Join us Sep 14 at Culture Amp in Richmond. How To Get Everyone’s Mind Blown with TypeScript. β€”@jakubriedl React Devtools in Safari? WebExtensions API and the Open Web. β€”@fycdev Feedback and the REPL. β€”@jamesdiacono πŸ‘‰ melbjs.com
7
12
Jon Parker πŸ‡ΊπŸ‡¦ retweeted
Computation caching doesn't just help for speeding up your CI. It is good for the environment too πŸ€ Compute time saved: πŸ€ last 7 days: ~5 years πŸ€ last 30 days: ~ 23 years πŸ€ since start: 2 centuries blog.nrwl.io/helping-the-env…
2
11
6
43
The output should be: { "data": { "allPeople": [ { "name": "John", "age": 30 }, { "name": "Mary", "age": 28 }, { "name": "Jane", "age": 26 } ] } }
app = Starlette() app.mount("/", GraphQLApp(schema, on_get=make_graphiql_handler())) 6. Run: uvicorn server:app --reload 7. Navigate to http://127.0.0.1:8000 8. Execute a GraphQL query: query { allPeople{ name, age } }
age=Int() def resolve_name(self, info): return self.name def resolve_age(self, info): return self.age class Query(ObjectType): all_people = List(PersonType) def resolve_all_people(self, info): return data.values() schema = Schema(query=Query)
from graphene import ( ObjectType, String, Int, Schema, List, ) Person = namedtuple('Person', ['name', 'age']) data = { 1: Person(name='John', age=30), 2: Person(name='Mary', age=28), 3: Person(name='Jane', age=26), } class PersonType(ObjectType): name=String()
4. Install packages: pip install graphene fastapi starlette-graphene3 5. Create a file called server.py containing: from starlette.applications import Starlette from starlette_graphene3 import GraphQLApp, make_graphiql_handler from collections import namedtuple
1. Create a folder: mkdir python_graphene k && cd python_graphene 2. Make a virtual env: python3 -m venv .env 3. Activate the virtual env: source .env/bin/activate
5. Create a file called app.py containing: from flask import Flask app = Flask(__name__) @app.route('/'): def hello_world(): return "Hello World!" 6. Run: export FLASK_APP=app.py 7. Run: flask run 8. Navigate to http://127.0.0.1:5000
1
1. Create a folder: mkdir python_flask & cd python_flask 2. Make a virtual env: python3 -m venv .env 3. Activate the virtual env: source .env/bin/activate 4. Install Flask: pip install Flask
2
Jon Parker πŸ‡ΊπŸ‡¦ retweeted
Are you or someone you know just starting out with #Python? I stumbled upon this the other day because of a coworker and it's a great FREE workshop. bit.ly/3oYrxDL
4
10
Jon Parker πŸ‡ΊπŸ‡¦ retweeted
This blew my mind today, after a tip from @JakewellTart. It's common to talk about green energy in terms of matching 100% of the power you use with 100% of fossil free on an annual basis. We've used this basis before at @greenwebfound. Once you look at an hourly basis tho…
2
7
1
8