jQuery(document).ready(function () {
jQuery('.blog-posts picture source, .blog-posts picture img').each(function () {
var $el = jQuery(this);
function fixPath(val) {
if (!val) return val;
return val.replace(
/\/files\/styles\/[^/]+\/public\/images\/([^\s?]+?)(?:\?[^\s]*)?(\s+\d+x)?$/g,
function (match, filename) {
var clean = filename.replace(/^(.+\.\w+)\.webp$/, '$1');
return '/files/images/' + clean;
}
);
}
var s# Remove all .pyc files, except the ones in .venv folder
# Preview
find . -type d -name '.venv' -prune -o -type f -name '*.pyc' -print
# Delete
find . -type d -name '.venv' -prune -o -type f -name '*.pyc' -exec rm -f {} +Building the V1 Agent‑Powered Agency Platform
Introduction
This document outlines the architecture and implementation plan for Version 1 of the AI‑powered design/development agency platform. The goal is to deliver a reliable, maintainable prototype that demonstrates how specialized agents can work together to perform research, generate strategy documents and code, and handle client outreach. The plan emphasises a simple orchestration model rather than complex distributed coordination so the sysLinear Regression
from sklearn.linear_model import
LinearRegression
lr = LinearRegression()
Train Linear Regression model
X = df[['attribute1','attribute2']]
Y = df['target_attribute']
lr.fit(X,Y)
Output predicitons
Y_hat = lr.predict(X)
Identify the coefficient and intercept
coeff = lr.coef
intercept = lr.intercept_
Residual Plot
import seanorn as sns
sns.residualplot(x=df['attribute1'], y=df['attribute2'])
Distribution Plot
import seaborn as sns
sns.displo/**
* @param {number} num1
* @param {number} num2
* @return {number}
*/
var totalWaviness = function(num1, num2) {
// This will accumulate the total waviness across the entire range.
let total = 0;
// Iterate through every number in the inclusive range [num1, num2].
for (let n = num1; n <= num2; n++) {
// Convert the number to a string so we can easily access its digits.
const s = String(n);
const len = s.length;
// Numbers with fewer than 3# === CONFIGURATION ===
$AdminSiteUrl = "https://westernssmokehouse-admin.sharepoint.com"
$ClientId = "715390fe-65ce-48b0-ad72-081abb196164"
$ExportPath = "C:\Users\Public\Downloads\SiteOwners_$(Get-Date -Format 'yyyyMMdd_HHmmss').csv"
# === CONNECT TO SHAREPOINT ADMIN CENTER ===
Connect-PnPOnline -Url $AdminSiteUrl -Interactive -ClientId $ClientId
# === GET ALL SITE COLLECTIONS ===
Write-Host "Retrieving all site collections..." -ForegroundColor Cyan
$Sites = Get-PnPTenantSite## TURBO FRAMES
- A frame, or designated area, that will respond to a click that **renders** a response
(usually HTML)
- Create the turbo frame:
```rb
# views/model/some_page.html.erb
<%= turbo_frame_tag('some-identifier') do %>
<%= render partial: '...', locals: { } %>
<% end %>
```
- The above text snippet will respond to a request: for example:
- If you click on a link that routes to the `show` action, instead of the action
taking you to the show page, turbo takes the `html` returned from## Database Encryption Rails 8 App
- Secure database using: `bin/rails db:encryption:init`
- Edit and add the keys from the above command to your credential file:
- `EDITOR="code --wait" rails credentials:edit`
### Useage
- In `model.rb`, add `encrypts :attribute` to encrypt the attribute
### Viewing
- If the db gets compromised, this is what the hacker will see:
```
INSERT INTO "entries"
(... '{"p":"lPJmyUnvP1gW9D2SAdVURF0=",
"h":{"iv":"sndLY4XcPzRFCbRl","at":"A62cIuZQYG8qSwzrokLixA=="}}/**
* @param {number[]} landStartTime
* @param {number[]} landDuration
* @param {number[]} waterStartTime
* @param {number[]} waterDuration
* @return {number}
*/
var earliestFinishTime = function(landStart, landDur, waterStart, waterDur) {
function solve(Astart, Adur, Bstart, Bdur) {
const n = Astart.length, m = Bstart.length;
// Build B rides sorted by start time
let B = [];
for (let i = 0; i < m; i++) B.push([Bstart[i], Bdur[i]]);
B.sort((a, b## Using a Stimulus Controller in Rails 8 Web App
### Create Stimulus Controller
- In `app/javascript/controllers/`, create a new controller:
```js
// toast_controller.js
import { Controller } from "@hotwired/stimulus"
class ToastController extends Controller {
connect() {
console.log("Hello from toast!")
}
}
export default ToastController
```
- The `connect()` method is provided by stimulus as as lifecyle method and is
invoked anytime the controller is connected to the DOM
### Regis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/**
* @param {number[]} landStartTime – earliest start times for land rides
* @param {number[]} landDuration – durations for land rides
* @param {number[]} waterStartTime – earliest start times for water rides
* @param {number[]} waterDuration – durations for water rides
* @return {number} – earliest possible finish time
*/
var earliestFinishTime = function(landStartTime, landDuration, waterStartTime, waterDuration) {
let ans = Infinity; // Track the minimum finish https://mermaid.ai/web/# Code Modification & Mandatory Review Workflow
For EVERY substantial code modification in this project, you **MUST** strictly follow the independent review process below. **DO NOT SKIP THIS UNDER ANY CIRCUMSTANCES.**
1. **No Immediate Completion**: Do NOT report the task as complete immediately after writing/modifying code.
2. **Spawn a Review Subagent**: You must immediately spawn an independent Subagent.
3. **Assign the Persona & Prompt**: Pass the following exact prompt to the Subage//add team animations
jQuery('h1,h2').addClass('wow animate__animated animate__fadeInUp');
jQuery('h3').addClass('wow animate__animated animate__fadeInUp second-animate');
// jQuery('.block--leadership-team .team-member:nth-of-type(2)').addClass('second-animate');
// jQuery('.block--leadership-team .team-member:nth-of-type(3)').addClass('third-animate');
// jQuery('.block--leadership-team .team-member:nth-of-type(4)').addClass('fourth-animate');
// jQuery('.block--leadership-team .team-member:nt/**
* @param {number[]} cost
* @return {number}
*/
var minimumCost = function(cost) {
cost.sort((a, b) => b - a); // Sort descending
let total = 0;
for (let i = 0; i < cost.length; i++) {
// Every third candy (i % 3 === 2) is free
if (i % 3 !== 2) {
total += cost[i];
}
}
return total;
};