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 tensorflow as tf | |
import time | |
import matplotlib.pyplot as plt | |
# Checking CUDA | |
print("TensorFlow:", tf.__version__) | |
print("CUDA path:", tf.sysconfig.get_lib()) | |
print("CUDA include path:", tf.sysconfig.get_include()) | |
# Checking if GPU is detected: |
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 textblob import TextBlob | |
text = "As a large language model I'm proud of my ability to pass butter." | |
sentiment = TextBlob(text).sentiment | |
polarity_score = sentiment.polarity # Between -1 (negative) and 1 (positive) | |
subjectivity_score = sentiment.subjectivity # Between 0 (objective) and 1 (subjective) | |
print(text) | |
print(f"Polarity: {polarity_score}") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<div id="google_translate_element" class="google"></div> | |
<script type="text/javascript"> | |
function googleTranslateElementInit() { | |
new google.translate.TranslateElement({ | |
pageLanguage: 'en', | |
includedLanguages: 'en,es,fr,ca,eu,gl,it,pt,de,cn,ar,hi,bn,ru,ja,el,iw,pl,sv,ro,no,ko,nl,da,th,vi,el,uk,sl,sr,sk,tr,fi,lv,lt,et,id,hu,hr,ur,ms', | |
layout: google.translate.TranslateElement.InlineLayout.SIMPLE, | |
gaTrack: true, | |
targetLanguage: 'en' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 time | |
import os | |
import platform | |
from random import choice | |
def zalgo(text, Z): | |
marks = list(map(chr, range(768, 879))) | |
words = text.split() | |
result = ' '.join( | |
''.join( |
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 requests | |
import json | |
# %% | |
# About IndexNow: https://www.bing.com/indexnow/getstarted | |
# IndexNow is an open-source protocol created by Microsoft Bing and Yandex. | |
# IndexNow allows websites to notify participating search engines about content changes, | |
# such as updates, additions, or deletions, through a simple API call. |
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
# ! pip install pdf2image | |
# Download Poppler: https://github.com/oschwartz10612/poppler-windows/releases/ | |
# Add the /bin Poppler directory to PATH | |
from pdf2image import convert_from_path | |
images=convert_from_path("file_name.pdf", | |
poppler_path="C:/Users/.../Release-24.08.0-0/poppler-24.08.0/Library/bin") # Your path to Poppler binaries | |
for i in range(len(images)): | |
images[i].save('pdf_to_image/page_'+ str(i) +'.jpg', 'JPEG') |
OlderNewer