Skip to content

Instantly share code, notes, and snippets.

View thiagoolsilva's full-sized avatar
🏠
Working from home

thiago lopes silva thiagoolsilva

🏠
Working from home
View GitHub Profile
@bencord0
bencord0 / appsync.py
Last active February 2, 2022 23:02
Accessing AppSync GraphQL APIs from python
import json
import requests
from boto3.session import Session as AWSSession
from gql_py import Gql
from requests import Session
from requests_aws4auth import AWS4Auth
aws = AWSSession()
session = Session()
class MyTestClass {
companion object {
init {
// things that may need to be setup before companion class member variables are instantiated
}
// variables you initialize for the class just once:
val someClassVar = initializer()
// variables you initialize for the class later in the @BeforeClass method:
@skyfishjy
skyfishjy / CursorRecyclerViewAdapter.java
Last active December 16, 2023 08:55
CursorRecyclerViewAdapter
/*
* Copyright (C) 2014 skyfish.jy@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software