Skip to content

Instantly share code, notes, and snippets.

View Bijitakc's full-sized avatar

Bijita kc Bijitakc

View GitHub Profile
@Bijitakc
Bijitakc / gist:0e1b82331cde7f8c3c2155aa50dc9805
Created January 26, 2024 05:36
SNS_HTTP_Subscription_verification.php
<?php
// Read the JSON input from the SNS subscription confirmation
$jsonInput = file_get_contents('php://input');
// Decode the JSON input
$data = json_decode($jsonInput, true);
// Check if it's a subscription confirmation message
if (isset($data['Type']) && $data['Type'] === 'SubscriptionConfirmation') {
import os
import jwt
import json
import requests
from core import cache
from functools import wraps
from flask import request, abort, g
def login_required(func):
from flask import g
from core.auth_app import bp
from core.decorators import login_required
@bp.route('/test', methods=['GET'])
@login_required
def test():
context = {
"user_id": g.user_id,
This file has been truncated, but you can view the full file.
{
"id": "629409c4694e810b25ff0163",
"nodeId": "ari:cloud:trello::board/workspace/603c60b56f40746dad62b9c3/629409c4694e810b25ff0163",
"name": "RideON 2.0",
"desc": "",
"descData": null,
"closed": false,
"dateClosed": null,
"idOrganization": "603c60b56f40746dad62b9c3",
"idEnterprise": null,
We can't make this file beautiful and searchable because it's too large.
Code,ACTION CD,Display,Definition
A9596,ADD,Gallium illuccix 1 millicure,"Gallium ga-68 gozetotide, diagnostic, (illuccix), 1 millicurie"
A9601,ADD,Flortaucipir inj 1 millicuri,"Flortaucipir f 18 injection, diagnostic, 1 millicurie"
C9094,ADD,"Inj, sutimlimab-jome, 10 mg","Inj, sutimlimab-jome, 10 mg"
C9095,ADD,"Inj, tebentafusp-tebn, 1 mcg","Inj, tebentafusp-tebn, 1 mcg"
C9096,ADD,"Inj, releuko, 1 mcg","Injection, filgrastim-ayow, biosimilar, (releuko), 1 microgram"
C9097,ADD,"Inj, faricimab-svoa, 0.1 mg","Inj, faricimab-svoa, 0.1 mg"
C9098,ADD,Ciltacabtagene car pos t,"Ciltacabtagene autoleucel, up to 100 million autologous b-cell maturation antigen (bcma) directed car-positive t cells, including leukapheresis and dose preparation procedures, per therapeutic dose"
G0308,ADD,180 d implant glucose sensor,"Creation of subcutaneous pocket with insertion of 180 day implantable interstitial glucose sensor, including system activation and patient training"
G0309,ADD,Rem/inser glu sensor dif sit,"Removal of implant
We couldn’t find that file to show.
We can't make this file beautiful and searchable because it's too large.
Code,ACTION CD,Display,Definition
A9596,ADD,Gallium illuccix 1 millicure,"Gallium ga-68 gozetotide, diagnostic, (illuccix), 1 millicurie"
A9601,ADD,Flortaucipir inj 1 millicuri,"Flortaucipir f 18 injection, diagnostic, 1 millicurie"
C9094,ADD,"Inj, sutimlimab-jome, 10 mg","Inj, sutimlimab-jome, 10 mg"
C9095,ADD,"Inj, tebentafusp-tebn, 1 mcg","Inj, tebentafusp-tebn, 1 mcg"
C9096,ADD,"Inj, releuko, 1 mcg","Injection, filgrastim-ayow, biosimilar, (releuko), 1 microgram"
C9097,ADD,"Inj, faricimab-svoa, 0.1 mg","Inj, faricimab-svoa, 0.1 mg"
C9098,ADD,Ciltacabtagene car pos t,"Ciltacabtagene autoleucel, up to 100 million autologous b-cell maturation antigen (bcma) directed car-positive t cells, including leukapheresis and dose preparation procedures, per therapeutic dose"
G0308,ADD,180 d implant glucose sensor,"Creation of subcutaneous pocket with insertion of 180 day implantable interstitial glucose sensor, including system activation and patient training"
G0309,ADD,Rem/inser glu sensor dif sit,"Removal of implant
{
"query": "mutation($title: String!, $photo: Upload!, $caption: String!){createPost(title: $title, photo: $photo, caption: $caption){post {id}}}",
"variables": {
"title": "New Post",
"photo": null,
"caption": "This is a new post"
}
}
from django.db import models
class Post(models.Model):
title = models.CharField(max_length=250)
photo = models.FileField()
caption = models.TextField()
class Meta:
verbose_name = "Post"
from django.urls import path
from django.views.decorators.csrf import csrf_exempt
from graphene_file_upload.django import FileUploadGraphQLView
from .schema import schema
urlpatterns = [
path('graphql/', csrf_exempt(FileUploadGraphQLView.as_view(graphiql=True, schema=schema)))
]