curl -X POST "https://mongo.fillcreative.io/api/folders/create" \
-H "Content-Type: application/json" \
-d '{
"user_id": "test",
"name": "Marketing Campaigns 2024"
}'
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
| function initFacebookAdDownloader() { | |
| // Queue to store pending GraphQL responses | |
| const processingQueue = { | |
| items: [], | |
| isProcessing: false, | |
| processDelay: 500, // Delay between processing items | |
| async add(response) { | |
| this.items.push(response); | |
| if (!this.isProcessing) { |
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
| // Function to check if an ad has EU data without fetching the full data | |
| async function checkEUDataEligibility(requestIndex, adID) { | |
| // Check if we already have information about this ad | |
| const collectionIndex = findCollectionIndex(adsCollections, adID); | |
| if (collectionIndex === -1) return false; | |
| const adIndex = findAdIndex(adsCollections[collectionIndex], adID); | |
| if (adIndex === -1) return false; | |
| const ad = adsCollections[collectionIndex][adIndex]; |
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
| { | |
| "data": [ | |
| { | |
| "id": "m975975870876394", | |
| "version": "v1", | |
| "brand": { | |
| "id": "m103697922099853", | |
| "page_id": "103697922099853", | |
| "name": "Investing Journal", | |
| "avatar_url": "https://cdn.tryatria.com/adfiles/m975975870876394_vgOxxk9-W4M.jpeg", |
في هذا المستند، سنقوم بشرح مفصل لكود نظام الأسئلة والأجوبة (RAG) المطبق في ملف Python. سنتناول كيفية عمل النظام من الأساسيات إلى التفاصيل التقنية، بما في ذلك تقسيم المستندات، التضمين (embedding)، ونظام البحث القائم على FAISS.
نظام الأسئلة والأجوبة (RAG) هو نظام يتعامل مع استخراج المعلومات من مستندات نصية للإجابة على الأسئلة بناءً على المحتوى المستخرج. يتضمن هذا النظام عدة خطوات أساسية: تحميل المستندات، تقسيم النصوص، إنشاء قاعدة بيانات بحثية، والتعامل مع نموذج ذكاء اصطناعي للإجابة على الأسئلة.
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Response> | |
| <Say voice="woman" language="es-ES"> Hola cómo estás </Say> | |
| </Response> |
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 librosa | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import tensorflow as tf | |
| def plot_spectrogram(sound, sr): | |
| S = librosa.feature.melspectrogram(sound, sr=sr) | |
| log_S = librosa.power_to_db(S, ref=np.max) | |
| plt.figure(figsize=(12, 4)) | |
| librosa.display.specshow(log_S, sr=sr, x_axis='time', y_axis='mel') |
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 numpy as np | |
| from scipy.fftpack import fft | |
| def vehicle_condition_detection(acc_info, g, h, h_prime, h_1, h_2, T): | |
| time = 0 | |
| vehicle_condition = "Unknown" | |
| while True: | |
| for t in range(len(acc_info)): | |
| Ax, Ay, Az = acc_info[t] |
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
| urls = """https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/sentinel-2-part1.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/extra_train-planet-dec17.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/extra_train-planet-jun18.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/starter-notebook.ipynb | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/extra_train-sentinel.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/sentinel_for_points_collected_in_2015.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/extra_train-planet-jun17.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/extra_train-planet-dec18.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/f |
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
| # installation | |
| !pip install knockknock #For sending message to telegram | |
| # Importation | |
| from knockknock import telegram_sender | |
| from kaggle_secrets import UserSecretsClient | |
| user_secrets = UserSecretsClient() | |
| token = user_secrets.get_secret("token") | |
| chat_id = user_secrets.get_secret("chat_id") |
NewerOlder