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 django.conf import settings | |
from rest_framework_simplejwt.authentication import JWTAuthentication | |
class CustomJWTAuthentication(JWTAuthentication): | |
def authenticate(self, request): | |
try: | |
header = self.get_header(request) | |
if header is None: | |
raw_token = request.COOKIES.get(settings.AUTH_COOKIE) |
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 django.conf import settings | |
from rest_framework.views import APIView | |
from rest_framework.response import Response | |
from rest_framework import status | |
from djoser.social.views import ProviderAuthView | |
from rest_framework_simplejwt.views import ( | |
TokenObtainPairView, | |
TokenRefreshView, | |
TokenVerifyView, | |
) |
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 django.urls import path, re_path | |
from .views import ( | |
CustomProviderAuthView, | |
CustomTokenObtainPairView, | |
CustomTokenRefreshView, | |
CustomTokenVerifyView, | |
LogoutView, | |
) | |
urlpatterns = [ |
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
/// <reference path="./.sst/platform/config.d.ts" /> | |
export default $config({ | |
app(input) { | |
return { | |
name: "project-name", | |
removal: input?.stage === "production" ? "retain" : "remove", | |
home: "aws", | |
providers: { | |
aws: { |
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 ubuntu | |
#FROM ubuntu:22.04 as base | |
RUN apt-get update \ | |
&& apt-get upgrade -y \ | |
&& apt-get install -y \ | |
curl \ | |
git \ | |
golang \ | |
sudo \ |
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
Sub DeleteColumns() | |
Dim ws As Worksheet | |
Dim col As Range | |
' Set the worksheet you want to work on | |
Set ws = ThisWorkbook.Sheets("ALL") | |
' Specify the columns you want to delete | |
' You can specify columns by their letters or numbers (e.g., "A", "C", "E" or 1, 3, 5) | |
Dim columnsToDelete As Variant |
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
ERROR! [DEPRECATED]: ansible.builtin.include has been removed. Use include_tasks or import_tasks instead. This feature was removed from ansible-core in a release after 2023-05-16. Please update your playbooks. | |
The error appears to be in '/usr/local/lib/python3.10/dist-packages/bench/playbooks/roles/mariadb/tasks/main.yml': line 2, column 3, but may | |
be elsewhere in the file depending on the exact syntax problem. | |
The offending line appears to be: |
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
version: '3.3' | |
services: | |
stirling-pdf: | |
image: frooodle/s-pdf:latest | |
ports: | |
- '8080:8080' | |
volumes: | |
- ./trainingData:/usr/share/tessdata #Required for extra OCR languages | |
- ./extraConfigs:/configs | |
- ./customFiles:/customFiles/ |
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
aws s3 cp s3://your_bucket_name . --recursive --profile your_profile_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
import local_config as config | |
import pandas as pd | |
import numpy as np | |
import requests | |
# ERPNext API credentials | |
# api_url = config.ERPNEXT_URL_15_ERP + "/api/resource/Sales Invoice" or | |
api_url = "https://your-erpnext-url/api/resource/Sales%20Invoice" | |
api_key = config.ERPNEXT_API_KEY_ADMIN_15_ERP | |
api_secret = config.ERPNEXT_API_SECRET_ADMIN_15_ERP |