This file contains 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
credential_path = "credentials.json" # ensure the path is correct. | |
sheet_url = "https://docs.google.com/spreadsheets/d/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # replace with the sheet url | |
worksheet_name = "Sheet1" # Name of the worksheet you want to access | |
gc = gspread.service_account(pkg_resources.resource_filename(__name__, credential_path)) | |
sh = gc.open_by_url(sheet_url) | |
worksheet = sh.worksheet(worksheet_name) | |
records = worksheet.get_all_records() | |
df = pd.DataFrame(records) | |
This file contains 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 App, { NextWebVitalsMetric } from 'next/app' | |
import '../styles/globals.css' | |
import type { AppProps, AppContext } from 'next/app' | |
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types | |
function MyApp({ Component, pageProps }: AppProps) { | |
return ( | |
<Component {…pageProps} /> | |
) | |
} |
This file contains 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 Document, { Head, Html, Main, NextScript } from 'next/document' | |
// You can import from other folder based on your project. | |
import { GA_TRACKING_ID } from '../utils/constants' | |
export default class MyDocument extends Document { | |
render() { | |
return ( | |
<Html> | |
<Head> | |
{/* Global Site Tag (gtag.js) - Google Analytics */} |
This file contains 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
const generate = require("@pdfme/generator").generate; | |
const fs = require('fs'); | |
const path = require('path') | |
const PDFDocument = require('pdf-lib').PDFDocument | |
const degrees = require('pdf-lib').degrees | |
try { | |
(async () => { | |
const template = { | |
"schemas": [ |
This file contains 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
const VirtualRefinement = connectRefinementList(() => null) | |
const ConnectedSort = connectSortBy(({ refine, items, currentRefinement }) => ( | |
<div> | |
{map(items, item => ( | |
<SortingLink key={item.label} selected={currentRefinement === item.value} onClick={() => refine(item.value)}> | |
{item.label} | |
</SortingLink> | |
))} | |
</div> |