Jump to content

flydev

Members
  • Posts

    1,327
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by flydev

  1. I am finetuning existing pre-trained models and using langchain toolchain. (About the later, I suggest you to try and keep an eye on a fork of PrivateGPT which is @su77ungr/CASALIOY). I like to be able to run it without the need to plug Internet wire, which is the most important requirement, and I also got really good results with CASALIOY after ingesting a small part of the company's knowledge base. I made some years ago a license plate recognition system deployed on our parks and I am able to ask a basic question in the context of our proprietary softwares and get a response like "Blabla you need to send this MSG_LPR_.. Windows Message with this LParam and WParam, the block will answer you the current amount due by the client in a JSON string stored in WParam... ". It can also explain what a settings do along with real example context, eg., "If the setting `blabla` is set to true, when a car approach, if it's a VIP or is annual fixed bill is paid, the barrier is opened...". It's really astonishing. I am using Vicuna-13b, not GPT, you can find more infos there: lmsys.org Last week I experimented a model called YOLOv7, which is an algorithm for detecting objects in an image. The challenge for us (I got it almost working) is to detect vehicle type in real-time to apply our logic, example, detecting taxis, ambulance, truck and opening the barrier. Look at that : Above, the AI is triggered in real-time on the picture sent by an IP camera already used in our LPR system. You might want to read this paper: https://arxiv.org/pdf/2212.10560.pdf You will find example of how to implement it on Github. After the release of my ongoing project, I had in mind to try to launch a project if Ryan and the mods team consent to, which consist of scrapping the entire forum and build a chat bot, I find it funny to build it, and I would like to see how good will be answer to issues like the ones that recently popped again, yo know, the "the forged session thing", "backend login crash expiration", etc, more than focusing on the core base code of the tool. We might collaborate to learn together πŸ™‚ Just adding that the main issue, is the hardware power...
  2. As you are on free plan, you are running on GPT 3.5 (fast) model trained. The goal is to trick GPT from the first prompt. For example, I suggest you to give a try to this awesome prompt which can transform ChatGPT into a high-quality programmer with a level 30 code proficiency on steroids πŸ¦ΎπŸ˜‚ And then: 😼 $: programming: I have two words: foo and bar, I join those words with a dash. How many different strings can I get ? πŸ€– $: There is only one way to join the words "foo" and "bar" with a dash, which is "foo-bar". Therefore, there is only one possible string that can be obtained by joining these two words in this specific way. Explore/experiment on flowgpt's prompts, I am sure you will get something amazing for us 🫑 guide link.
  3. Sure, but your prompt is a bit lame, do not hesitate to be highly specific. Especially if you need GPT to work with numbers as she suck with it. You are on 3.5 or 4 ?. The prompt is the key of getting a good result πŸ€–
  4. Yea it’s really pushing productivity to another level, using it every days. Building my own models at work as well..
  5. Hi, without more precise informations about like exact version of the setup, the type of hosting / server, etc, it's quite hard to give you an answer. The only hint I can provide you, as you are talking about MySQL v8 on Ubuntu 20 LTS, it's to look at this known bug: https://bugs.mysql.com/bug.php?id=99593 To test the workaround (second post from the dev team): SET GLOBAL internal_tmp_mem_storage_engine=MEMORY;
  6. What @gebeer said. It explain everything - the typo was provoking an assignment to the page's template passed to this condition. Good catch and thanks for getting back on this, bug killedπŸ‘
  7. Have you tried what I suggested? Also, giving more details on the the type of hosting could help, as you are saying the client is also facing the issue, then the reason could be a system update on the hosting side. I say that because I remember I fixed this issue on a site of @pwired years ago after an update of Plesk on his hosting provider. The whole thread is:
  8. It seem something related to what @ErikMH faced recently, (see: this thread) and as funny thing I had the exactly same behavior on Windows / Chrome on the next morning, it was working with an incognito window, and got it working again by cleaning windows with the standard clean tool, a run of CCleaner. and a reboot. It maybe worth trying CCleaner in first instance, and maybe a Safari reset (from the menu). Please keep us updated.
  9. If you end up writing something with github action / webhooks / etc to automate things on a staging setup, and rockmigrating rolling back if your written test cases fail, please do not hesitate to share it with us (I am not sending subliminal messages) πŸ˜„ I would like to be able to give you more likes πŸ‘πŸ˜Ή
  10. It's weird. Some suggested steps on what I would do if I were in your situation: Check read/write permissions on the server => check Clear browser cache, throwing a Modules Refresh and a Clear Compiled Files => test Logging in admin on a incognito window => test Disabling german language => test Exporting the bugged database and whole files, importing it on local dev to test the setup => test Upgrading Duplicator from dev-version branch, building a fresh package and restoring it again => test Exporting from command-line the database and comparing the export file against the local dev version with a diff tool => check Eating hot pepper 🌢️, sleeping and checking on next morning with a fresh 🧠 Reporting tests made here
  11. I installed a setup with 10.6.11-MariaDB, Duplicator v1.4.21 and did a backup/restore from a utf8mb4 => utf8(mb3). It went good, no problem so far. For information, utf8mb3 is an alias of utf8 on MySQL where on MariaDB is spelled utf8mb3 for less confusion I want to say. So utf8mb3 == utf8 (Will be deprecated soon after MySQL 8 ). Also, you should check what @dragan suggested, and I was wondering if your setup is a multilanguage setup ? It could be a hook or even a module maybe. You could also try to spot the issue by exporting the distant bugged database and importing it on your local dev setting the same charset (utf8/utf8mb3) and see his behavior. Checking/diff the .sql distant/local files with, for example, Beyond Compare (trial test is ok) or MySQL Workbench
  12. I think it should work as the difference reside on utf8mb3 use a maximum of 3 bytes and utf8mb4, 4 bytes which is not really important on your issue (supposing it only..) I will test an utf8 export and restoring it on a mb3 db in less than a hour with Duplicator v1.4.26. Will report result here. Yes ok, you should just have to compare the `pages` table with your dev one to spot something. If you find something, please, keep us updated πŸ™‚ PS: @torf which version of ProcessWire we are working on ?
  13. Ok Database is set to MyISAM or InnoDB ? ℹ️ What I suggest you to do, is : Short process: make a backup before doing everything empty the database, make sure encoding, schema is the same as the dev server restore your site using Duplicator's installer v1.4.29 Long process: make a backup before doing everything comparing the config.php file and making sure there is no glitch compare the database between dev and prod check read/write permission on the server with ssh
  14. Ok. Can you give more details on the prod server ? (database type, charset, version) I you feel confident, you can send me an access using private messaging.
  15. Hello, If the website is working well on dev server, we can assume the site hasn't been compromised and then it seem something is missing from the restore process. I can take a look right now. Which version of Duplicator did you used to migrate the site please ? (FYI, I migrated with success two website with the dev version of Duplicator and one confirmed with v1.4.26)
  16. Hi, With javascript you can achieve it easily. The idea is to add an event listener to each input and re-order an array when the user change an input: <form id="form"> <label for="filter1">filter 1 :</label> <input type="text" id="filter1" name="filter1"><br> <label for="filter2">filter 2 :</label> <input type="text" id="filter2" name="filter2"><br> <label for="filter3">filter 3 :</label> <input type="text" id="filter3" name="filter3"><br> <button type="submit" name="submit">Send β˜‘οΈ</button> </form> <script> // get form and all input const form = document.querySelector('#form'); const filter1_field = document.querySelector('#filter1'); const filter2_field = document.querySelector('#filter2'); const filter3_field = document.querySelector('#filter3'); // array to store the order of the input const order = []; // listen for input fields change to update the order array filter1_field.addEventListener('input', () => updateOrderArray('filter1')); filter2_field.addEventListener('input', () => updateOrderArray('filter2')); filter3_field.addEventListener('input', () => updateOrderArray('filter3')); // update the order array function updateOrderArray(fieldName) { if (!order.includes(fieldName)) { order.push(fieldName); } } form.addEventListener('submit', (event) => { event.preventDefault(); const baseUrl = 'https://example.test/form.php'; // L'URL de base // build the url with the GET parameters in the order specified by the order array let url = baseUrl; order.forEach((fieldName, index) => { const value = encodeURIComponent(document.querySelector(`#${fieldName}`).value); url += `${index === 0 ? '?' : '&'}${fieldName}=${value}`; }); // redirect window.location.href = url; }); </script> Result: /form.php?filter3=processwire&filter2=is&filter1=awesome
  17. Suggesting ProcessWire to your boss. It tend to be similar to answers above, maybe she mean your boss could be your client πŸ‘€πŸ€ͺ β€”- Simple: I can provide you with some key points and resources that you can use to build your own compelling argument in favor of ProcessWire over WordPress. You can use these points to create a presentation, write an article, or as a guide for discussion. 1. Flexibility and Customizability: ProcessWire is known for its flexibility and customizability, making it an ideal choice for projects that require a tailored approach. It allows developers to build custom data structures and tailor the admin interface to suit the specific needs of the project. 2. Simplified Template System: ProcessWire's template system is simple and straightforward, providing developers with the freedom to create custom templates with ease. Unlike WordPress, there is no need for complex themes, which can make site development and maintenance more efficient. 3. Security: ProcessWire has a strong emphasis on security, with built-in protection against common web attacks such as SQL injection and cross-site scripting (XSS). WordPress, on the other hand, can be vulnerable to security issues due to its popularity and the use of third-party plugins. 4. Performance: ProcessWire is known for its fast performance, as it uses an efficient API to access content. This can result in faster page load times, a better user experience, and improved SEO. 5. Developer-friendly: ProcessWire's API is powerful and easy to learn, which can lead to a more efficient development process. It provides a cleaner and more organized code structure, making it easier for developers to maintain and update the website. 6. Supportive Community: ProcessWire has an active and supportive community that can provide help and resources when needed. Although smaller than the WordPress community, it is known for being welcoming and helpful to newcomers. β€”- Business focused answer: Here are some business and financial-focused arguments for choosing ProcessWire over WordPress: 1. Lower Total Cost of Ownership (TCO): ProcessWire's flexibility and customizability can lead to a lower TCO. Since it is easier to develop and maintain custom solutions, your company may require fewer third-party plugins, themes, and external resources, which can reduce ongoing costs. 2. Faster Development Time: ProcessWire's straightforward template system and powerful API can speed up the development process, allowing your team to deliver projects more quickly. This can result in reduced labor costs and a faster time-to-market, giving your company a competitive edge. 3. Improved Site Performance and User Experience: Better site performance and user experience can lead to higher conversion rates, better user engagement, and improved SEO rankings. ProcessWire's performance advantages can directly contribute to increased revenue and profitability for your business. 4. Reduced Security Risks: Since ProcessWire has a strong emphasis on security, your company can minimize the risks associated with data breaches, cyberattacks, and website downtime. This can save your business from potential financial losses, legal liabilities, and damage to your brand reputation. 5. Scalability: ProcessWire is highly scalable, making it suitable for businesses that plan to grow and evolve over time. Its flexible architecture allows you to easily adapt and expand your website as your needs change, without having to invest in a complete overhaul. 6. Easier Staff Training and Onboarding: ProcessWire's developer-friendly API and clean code structure make it easier for new staff members to learn and become productive quickly. This can lead to reduced training costs and faster integration of new team members, further improving your company's efficiency. 7. Long-term Investment: By choosing ProcessWire, your company is investing in a platform that is built for long-term success. Its flexibility and customizability ensure that your website can evolve with your business needs, reducing the likelihood of needing to switch platforms or undertake costly redevelopment projects in the future. When presenting these points to your boss, make sure to emphasize how ProcessWire's features can translate into financial savings, revenue growth, and a stronger competitive position for your company. Tailor your arguments to your organization's specific needs and goals to make the most compelling case possible. πŸ¦ΎπŸ€–
  18. Yesterday I received a mail from Vercel about the successor of Webpack, Turbopack. It seem the adventure will continue.. the only bad news (at least for me) is that the tool is coded in Rust, I can't swallow this language... but in term of features it look really promising.
  19. It's all about consuming data provided in your templates from your components. To give you an example with repeater, imagine the navigation is built from a function in the template home.php which return a JSON object with all required page's name, child, id, href, etc.. Now, I want to use a repeater to build the navigation object. I can add a new repeater in the home template and write the code to make the navigation object with a foreach(...) loop. If the object contain more or less the same structure which can already feed the data expected by the Navigation.svelte component, then you do not need to build the site again. You only need to rebuild when you make change in your component(s). Not the template(s) php or backend field's. If you require a site completely static, this setup is not really made for, you could achieve it already by providing all your data from API and coding the static route in your app.
  20. It depend what you mean by "required content", but let's take the structure above again for the example. Day 1, you pushed the site on your Github repo and set your Vercel workflow to build the static assets on commit changes, the site is live. Day 2, you made some markup and JS code change on the component Hero.svelte you commit your change to Github, Vercel build it and if the build is successful, the update is live (I will not go into caching details which in some situation can be very ineffective since vite v2, we are at v4...). The old way of uploading files by FTP or SFTP can do the job too.
  21. A note to myself.. I think a good example could be to build the Skyscrapers demo using this dev stack.
  22. Okay understood. About the dev environment, I must say that it's not intended to change your habits. For example, my usual directory structure of my web folder containing the index.php/site/wire is the following: . └── /var/ └── html └── example.com β”œβ”€β”€ build/ssr/ssr.js <-- run by NodeJS on the server β”œβ”€β”€ wwwroot <-- directory sent to server hosting β”‚ β”œβ”€β”€ site β”‚ β”‚ β”œβ”€β”€ modules β”‚ β”‚ β”‚ └── ViteJS β”‚ β”‚ β”œβ”€β”€ assets β”‚ β”‚ β”‚ └── static <-- contain assets built by vite β”‚ β”‚ β”‚ β”œβ”€β”€ layout.abc123.js β”‚ β”‚ β”‚ β”œβ”€β”€ home.abc123.js β”‚ β”‚ β”‚ β”œβ”€β”€ about.abc.123.js β”‚ β”‚ β”‚ └── ... β”‚ β”‚ β”œβ”€β”€ ... β”‚ β”‚ └── templates β”‚ β”‚ β”œβ”€β”€ _func.php β”‚ β”‚ β”œβ”€β”€ home.php β”‚ β”‚ └── about.php β”‚ β”œβ”€β”€ wire β”‚ β”œβ”€β”€ index.php β”‚ └── .htaccess β”œβ”€β”€ src <-- development directory & files β”‚ β”œβ”€β”€ styles β”‚ β”‚ └── app.scss β”‚ └── js β”‚ β”œβ”€β”€ components β”‚ β”‚ β”œβ”€β”€ Button.svelte β”‚ β”‚ β”œβ”€β”€ Hero.svelte β”‚ β”‚ └── ... β”‚ β”œβ”€β”€ pages β”‚ β”‚ β”œβ”€β”€ Home.svelte β”‚ β”‚ β”œβ”€β”€ About.svelte β”‚ β”‚ └── ... β”‚ β”œβ”€β”€ app.ts β”‚ └── ssr.js β”œβ”€β”€ .env β”œβ”€β”€ package.json β”œβ”€β”€ vite.config.ts β”œβ”€β”€ tailwind.config.cjs β”œβ”€β”€ tsconfig.json └── ... The structure can be tweaked as you want. In this example, I'm using TailwindCSS, and Svelte. When developing, the result in your browser will be refreshed when you will save the modified file (it's called HMR for Hot Module Replacement). The same thing will happen when you will modify your ProcessWire templates files. In dev mode, files are served by the vite's local dev server. About your question about the "autobuild", with Vite you have basically three commands. Take a look at the following scripts section of a package.json file: "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview" }, When you will run `npm run dev` for example, vite will start the development server, the build command will build the production files, and the preview command will start a local server to serve the built production files. You are free to set up any workflow you are interested in, for example like throwing a build on each HMR event (I've given an example about that on stackoverflow, see https://stackoverflow.com/a/69632090/774432). On my side I am mostly working with private servers, but behind the scene the workflow is quite "the same". On my server, I run on closed environment a simple node command `node ../build/ssr/ssr.js` , where eg. on Vercel, you will want to use their Node.js Runtime features through an API. As I said, you can keep your habits in terms of editing content, let them log in ProcessWire backend and filling their body field. The update/preview is just a matter of refreshing or changing page on the site you are working on. The change is dynamic, you are not required to build or commit any change, and as always, you keep the freedom to make only the content you decide to be available - it's a bit , I made you an example on the bottom of the post. I do not use it and I don't remember how it works, but if you can pull data without markup, then all is βœ… even with markup it should work. I will test it. Enregistrement #52.mp4
  23. Thanks @elabx for your input. The first live example1 will be the doc which is built on top of this stack and it will also be released as a profile. I am currently rushing a thing for the work, so I hope to release the module on incoming week-end or at least next week. (you can find one online, built with Svelte, ProcessWire, ThreeJS and shaders as an experiment, but here is not much thing to see as it's not finished 1). What is planed is to release the ProcessWire's Vite module, to publish the NPM package, the doc and the associated profile. There will be also a profile for React and Vue released. I will release it as an alpha-version, but if the stack is used without SSR, like for building a dashboard, it can be considered as STABLE. If some of you want to integrate, eg. Elm or Angular, I will give support for it on request basis. I think that most users already using Vite are aware of getting their framework working, maybe some of them are just confused about the integration into ProcessWire and using his built-in API/pages/templates. Then once the technical article will be online, you will get the idea of how to integrate Vite or other bundler easily in PW or even other pieces of software. Wordpress what ? 🀣 (you can get deeper on the request, I don't get it πŸ˜‰ )
  24. Interesting, again.. Since when ? Is "current MacOS" == Ventura, correct? is the problem worse than before? πŸ‘‡ Did you enabled ddev mutagen or not ? Is this a typo ? Just asking because default value are: ; Default Value: 100 ; Development Value: 1000 ; Production Value: 1000 Making garbage collector chance jumping from 1% to 0,001%. It could be a hint as it can mean you are overriding things somewhere. Also, take into account that if the gc is misconfigured, it will impact DB session. A dump of phpinfo() would not be too much here to help. Depending on the second question above, did you enabled a caching mechanism? For example (it's just to illustrate) on a production site behind Cloudflare, without a proper configuration, you will end up logged out on every click click. Another thing should be to check the logs of php-fpm with journalctl.
Γ—
Γ—
  • Create New...