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
# NumPy Pro Tips: Data Analysis & EDA Techniques | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
# ====================================================================== | |
# 1. STATISTICAL FUNCTIONS & AGGREGATION | |
# ====================================================================== |
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
# Pandas Power Tips: Essential Techniques for Data Manipulation | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# ====================================================================== | |
# 1. DATA TYPE CONVERSION & HANDLING | |
# ====================================================================== |
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 langchain_core.embeddings import Embeddings | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
from typing import Dict, List, Tuple | |
import numpy as np | |
import plotly.express as px | |
from sklearn.manifold import Isomap | |
from sklearn.preprocessing import StandardScaler | |
from sklearn.decomposition import PCA | |
import umap.umap_ as umap |
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 pathlib import Path | |
from langchain.docstore.document import Document | |
from unstructured.partition.pdf import partition_pdf | |
from unstructured.documents.elements import Text, Image, Table, CompositeElement | |
class ExtractionPipeline: | |
def __init__(self, folder_path): | |
self.folder_path = folder_path | |
self.pdf_filenames = self.get_pdf_filenames_from_folder() |
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
# train_grpo.py | |
import re | |
import torch | |
from datasets import load_dataset, Dataset | |
from transformers import AutoTokenizer, AutoModelForCausalLM | |
from peft import LoraConfig | |
from trl import GRPOConfig, GRPOTrainer | |
# Load and prep dataset |
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
/* | |
input to parse: | |
{"image":"ipfs://QmTE4k9xCaZHKpEmk1vf56xPQdWghtKpT5GZCRbf2eYoSw/de22e8bd5787802d7417009f647bb33b","name":"2 kilobytes low cost Token Eric #137"} | |
output: | |
https://cf-ipfs.com/ipfs/QmTE4k9xCaZHKpEmk1vf56xPQdWghtKpT5GZCRbf2eYoSw/72315d4fbdc4e2d96ea6777b67b5f8a8 | |
*/ | |
function convertIpfsUrl(ipfsUrl: string): string { | |
const cid = ipfsUrl.replace("ipfs://", ""); |
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
const { Kafka } = require('kafka-node'); | |
const { FileSystemWallet, Gateway } = require('fabric-network'); | |
const path = require('path'); | |
const fs = require('fs'); | |
// Load the connection profile | |
const ccpPath = path.resolve(__dirname, '..', 'your_connection_profile.json'); | |
const ccpJSON = fs.readFileSync(ccpPath, 'utf8'); | |
const ccp = JSON.parse(ccpJSON); |
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
node_modules/ | |
*.log |
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
const PubNub = require('pubnub'); | |
const credentials = { | |
publishKey: 'pub-c-...', | |
subscribeKey: 'sub-c-...', | |
secretKey: 'sec-c-...' | |
}; | |
const CHANNELS = { | |
TEST: 'TEST', |
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
/* | |
JavaScript: Higher Order Functions | |
Part 2, JavaScript Map Method by Example | |
YouTube Video: http://uzr.co/javascript-map-method | |
JSFiddle: https://jsfiddle.net/joeyburzynski/j2bewfe9/ | |
Gist: https://gist.github.com/JoeyBurzynski/91e0ea5f480f5f6bfbcca5df832225b7 | |
NewerOlder