This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import logging | |
import azure.functions as func | |
from azure.servicebus import ServiceBusClient, ServiceBusMessage | |
CONN_STR = "#" | |
QUEUE_NAME = "messages" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import json | |
import azure.functions as func | |
from twilio.rest import Client | |
def main(msg: func.ServiceBusMessage): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/env python | |
from typing import Callable | |
def decorator(function: Callable): | |
def inner_function(*args, **kwargs): | |
newKwargs = {} | |
for argName, typeName in function.__annotations__.items(): | |
if typeName is int: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Callable | |
def decorator(func: Callable): | |
def inner_func(*args, **kwargs): | |
print(kwargs, func.__annotations__) | |
func(*args, **kwargs) | |
return inner_func |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getAge(age: int, name: str): | |
print( f" {age} : {type(age)} , {name} : {type(name)} " ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getAge(age, name): | |
print( f" {age} : {type(age)} , {name} : {type(name)} " ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def someRandomView(slug): | |
... | |
def someRandomProfile(pk): | |
... | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
urlpatterns = [ | |
path("/<str:slug>", someRandomView, name="home"), | |
path("/<int:pk>", someRandomProfile, name="home_profile") | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useReducer } from 'react' | |
export function updateName(name: string) { | |
return <const>{ | |
type: 'UPDATE_NAME', | |
name | |
} | |
} | |
export function addPoints(points: number) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void developer(char *flagString, int length){ | |
flagString[1] = '\0'; | |
} |