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 display_woocommerce_reviews($atts) { | |
| // Extraire les attributs du shortcode | |
| extract(shortcode_atts(array( | |
| 'product_id' => '0', | |
| ), $atts)); | |
| // Vérifier si l'ID produit est valide | |
| if(!$product_id || $product_id === '0') { | |
| return "Veuillez spécifier un ID produit valide."; | |
| } |
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 fs = require('fs'); | |
| var request = require('request'); | |
| var { google } = require('googleapis'); | |
| var key = require('./cle.json'); | |
| const jwtClient = new google.auth.JWT( | |
| key.client_email, | |
| null, | |
| key.private_key, | |
| ['https://www.googleapis.com/auth/indexing'], |
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 https = require('https'); | |
| const http = require('http'); | |
| const fs = require('fs'); | |
| const htmlparser = require('htmlparser2'); | |
| const urlModule = require('url'); | |
| const MAX_CONCURRENT_REQUESTS = 5; | |
| const MAX_RETRIES = 1; | |
| const RETRY_DELAY = 5000; // Delay in milliseconds (5 seconds) | |
| const EXPIRED_DOMAINS_FILE = 'expired_domains.txt'; |
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 fs = require("fs"); | |
| const moment = require("moment"); | |
| var WPAPI = require("wpapi"); | |
| const blogUrl = "https://site.fr/"; | |
| const login = "LOGIN"; | |
| const password = "PASS"; | |
| const cat = 3; // id de votre catégorie |
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 { Configuration, OpenAIApi } = require("openai"); | |
| const fs = require("fs"); | |
| const { get } = require("https"); | |
| const configuration = new Configuration({ | |
| apiKey: "VOTRE-CLE-API", | |
| }); | |
| const openai = new OpenAIApi(configuration); | |
| async function gpt3_completion(prompt) { | |
| try { | |
| const completion = await openai.createCompletion({ |
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 fs = require("fs"); | |
| module.exports = { | |
| getFileContent: function (file) { | |
| return fs.readFileSync(file, 'utf8'); | |
| }, | |
| logThis: function (file,datas) { | |
| fs.appendFileSync(file, `${datas}\n===\n`); | |
| }, |
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
| <?php | |
| /* | |
| Plugin Name: JA auto Cat | |
| Plugin URI: https://la-faucheuse.fr | |
| Description: Auto set category for post based on GPT-3 | |
| Version: 1.0 | |
| Author: Jeremy ALLARD | |
| Author URI: https://la-faucheuse.fr | |
| License: GPL2 | |
| */ |
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 n_grams(tokens,n = 2,sep = ' ',epoch = 3) { | |
| var ngrams = []; | |
| for (let j=0; j < epoch; j++) { | |
| //remove first token | |
| if (j!=0){tokens.shift();} | |
| for (var i = 0; i < tokens.length -n; i+=n) { | |
| let ng1 = tokens.slice(i, i+n).join(sep); | |
| let ng2 = tokens.slice(i+n, i+n+n).join(sep); | |
| let ngram = [ng1.replace(/\s?(START|END)\s?/gm,'')/*.trim()*/, ng2.replace(/\s?(START|END)\s?/gm,'')/*.trim()*/]; |
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
| Yahoo|66.196.,68.142.,202.165.,66.142. | |
| BingBot|157.55.39,207.46.13,40.77.167,13.66.139,13.66.144,52.167.144,13.67.10,13.69.66,13.71.172,139.217.52,191.233.204,20.36.108,20.43.120,40.79.131,40.79.186,52.231.148,51.8.235,51.105.67 | |
| Yandex|87.250.224.,95.108.213.,5.255.,77.88.,213.180. | |
| Ahrefs|54.36.,51.222. | |
| Semrush|185.191.,85.208. | |
| Majestic|65.21.,65.108.,199.58.,167.114.,162.210.,108.59.,149.202.,176.31.,173.249.,192.99.,195.201.,167.86.,135.181.,173.212.,95.91. | |
| DataForSeoBot|138.201.,142.132.,144.76. | |
| Babbar|154.54.249 | |
| Petalbot|114.119. | |
| SerpsStat|136.243.,94.130. |
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 tokenize(txt) { | |
| // on sépare en phrases pour avoir quelques points de départ dans la génération | |
| let tokens = []; | |
| const sentences = txt.split(/\n/gim).filter((x) => x); | |
| // on tokenize chaque phrase en splitant les mots | |
| for (let i = 0; i < sentences.length; i++) { | |
| // on insert un START | |
| tokens.push("START"); | |
| let tks = sentences[i].match(/\S+/gim).filter((x) => x); | |
| tks.map((token) => tokens.push(token)); |
NewerOlder