Skip to content

Instantly share code, notes, and snippets.

View AJV009's full-sized avatar
🛠️
Learning and Building for Tomorrow ☺️

Alphons Jaimon AJV009

🛠️
Learning and Building for Tomorrow ☺️
View GitHub Profile
from flask import Flask, request, jsonify
from azure.cognitiveservices.vision.face import FaceClient
from msrest.authentication import CognitiveServicesCredentials
import azure.cosmos.cosmos_client as cosmos_client
import io
import uuid
import base64
app = Flask(__name__)
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files (x86)/Microsoft Azure Sphere SDK/Sysroots/3/tools/gcc/arm-poky-linux-musleabi-gcc.exe
Build flags:
Id flags:
The output was:
1
cc1: error: no include path in which to search for stdc-predef.h
# pip install pandas lxml openpyxl
# imports - you know why!
import pandas as pd
# from_seat_number
fr_se = 407515
# to_seat_number
to_se = 407553
# to_se = 407520
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSf2S4iFIPgIB7BO7PN-cACBDMvdOPligeHIgHCXcImewjNbYg/viewform?embedded=true" width="640" height="475" frameborder="0" marginwidth="0" marginheight="0">Loading…</iframe>
// Adding requirements
let gulp = require("gulp"),
sass = require("gulp-sass"),
cleanCss = require("gulp-clean-css"),
minify = require("gulp-minify"),
rename = require("gulp-rename"),
notify = require("gulp-notify"),
plumber = require("gulp-plumber");
// Paths for source and destination
const paths = {
@AJV009
AJV009 / Blocks.md
Created February 25, 2021 07:44 — forked from bdlangton/Blocks.md
Drupal 8 programmatic solutions

Render custom blocks

$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);

Render plugin blocks

$block_manager = \Drupal::service('plugin.manager.block');
@AJV009
AJV009 / get_duplicate_node_paragraph.php
Last active July 6, 2022 06:22
List nodes using same paragraph data items with but with different revisions.
<?php
/**
* Stage 1: Evaluation / Analysis of nodes using same the paragraph data tiem with different revisions.
*/
function analysis($print_output = false, $print_count = 20) {
if ($print_output) print("\nStage 1: Analyze the messed up paragraph data: ------------------------------------------------\n");
$database = \Drupal::database();
/**
@AJV009
AJV009 / downloadPDFjsFIle.js
Last active July 20, 2023 08:17
Download PDF.js PDF files from any site
function downloadPDFs() {
// Query all iframe elements
var iframes = document.querySelectorAll("iframe");
// Function to extract PDF URL
function getPDFUrl(src) {
// Check if it's a PDF.js URL
if (src.includes('pdfjs')) {
// Extract file parameter
var fileParam = new URL(src).searchParams.get('file');
@AJV009
AJV009 / pdfToImg.py
Created July 20, 2023 08:18
PDF to Images
import os
from PyPDF2 import PdfReader
from pdf2image import convert_from_path
# directory where your PDFs are stored
pdf_dir = 'pdfFiles'
# iterate over each file in the directory
for file in os.listdir(pdf_dir):
if file.endswith('.pdf'):
{
"Create new presentation": "Ctrl+N",
"Add a new slide": "Ctrl+M",
"Apply bold formatting to the selected text": "Ctrl+B",
"Open the Font dialog box": "Ctrl+T",
"Cut selected text, object, or slide": "Ctrl+X",
"Copy selected text, object, or slide": "Ctrl+C",
"Paste cut or copied text, object, or slide": "Ctrl+V",
"Insert a hyperlink": "Ctrl+K",
"Insert a new comment": "Ctrl+Alt+M",