Problem Description The stock table records the daily closing prices of many stocks, with the fields CODE (stock code), DT (trading date) and CL (closing price). For a given target stock, find the period during which it rose for the largest number of consecutive days, and give the start date and end date of that period. stock table (only the records of the target stock CODE = 100046 are listed, in ascending DT order): Expected Result Interval 2 covers 2009-01-07 to 2009-01-12, 4 trading days in total. Its starting point 01-07 closed at 3.77, below the 4.04 of 01-06, and then 4.02, 4.42 and 4.86 climbed steadily, without a single down day in between. Interval 3 covers 2009-01-13 to 2009-01-16, also 4 trading days. Its starting point 01-13 closed at 4.44, below the 4.86 of 01-12, and then 4.88, 4.98 and 4.99 rose consecutively, tying with interval 2 for the longest run. SQLazy Step-by-Step Implementation [Click to run this example online] The steps are explained below. Step 1: Take the target stock filter CODE = 100046 Filter the stock table for the records whose CODE equals 100046; the rest of the calculation works on this stock only. The comparison uses the symbol "=", not "==" as in SQL. Step 2: Sort by date in ascending order sort DT asc Sort the filtered records by trading date DT in ascending order. Segmentation walks through the records in order; if the order is wrong, the intervals it produces are meaningless. Step 3: Start a new interval when the closing price drops Step 4: Count how many days each interval has Step 5: Pick out the longest interval Step 6: Take the start and end dates of each interval After confirming the logic of the above 6 steps, SQLazy compiler automatically generates native SQL (MySQL syntax used here): WITH t2 AS ( SELECT CODE, DT, CL FROM stock WHERE CODE = 100046 ), t3 AS ( SELECT CODE, DT, CL , SUM(CASE WHEN CL < col__1 THEN 1 ELSE 0 END) OVER (ORDER BY CASE WHEN DT IS NULL THEN 1 ELSE 0 END, DT ASC ROWS UNBOUNDED PRECEDING) + 1 AS N
Hey everyone, For the Hacktoberfest 2026 challenge, I decided to build something a little different. We use our phones for almost everything, and even AI usually gives us another reason to stay in front of a screen. So I thought, what if I build an AI that actually tells you to put your phone down and go outside? What does it do? How much time you have What you want to do – walking, gardening, birding or running How much energy you have Then Gemma creates an outdoor mission for you. For example: 30 minutes + Walking + Low energy can turn into a simple outdoor activity where you walk, notice things around you, take a break from your phone and spend some time outside. How I built it One thing I really liked about this project is that the AI is running locally instead of depending on a cloud AI API. Why TouchGrass? Here is the link of my repository; https://github.com/Vanshika-Parmar/TouchGrass-AI.git What's next? Thanks for checking out my project. Tags: #devchallenges #hf26challenge #ai #opensource
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Many people want to volunteer and contribute to their communities, but finding suitable volunteering opportunities and getting proper recognition for their contributions can be difficult. That’s why I built Kindred, a volunteering platform that helps people discover volunteering activities near them and keep a verifiable record of their contributions. Users can browse available volunteering activities and participate in projects that interest them. Each volunteering activity creator is provided with a QR code or digital verification code, which participants can use to verify their contribution after completing the activity. Users can participate in multiple volunteering projects, and whenever they need to prove their volunteering experience, they can generate a detailed, verifiable document containing information about all the projects they have contributed to. This document can serve as proof of their volunteering experience for applications, portfolios, scholarships, employment opportunities, or other purposes. Kindred also allows anyone to create and organize their own volunteering activities, making it easier for communities and organizations to connect with people who want to make a difference. https://kindred-tau-olive.vercel.app/ / volunteer-hub I used GitHub Copilot to assist with version control through MCP and to generate code based on comments and instructions. As an open-weight model, I also used Gemma 4 with Ollama through OpenCode to assist with developing several pages of the application. Open innovation made it possible to combine open-source AI tools and models with modern development workflows without relying entirely on closed APIs. Using tools like Ollama, Gemma, and OpenCode allowed me to experiment freely, keep costs low, and have more control over how AI was used while building Kindred. Best use of Github Copilot Best use of Gemma
Redis says the key is gone. The memory comes back 22 seconds later. Remdore Oct 2 #redis #database #performance #devops 13 reactions comments 5 min read
Back in March Canonical announced switching to ntpd-rs was its next target as part of transitioning more Ubuntu Linux system components to Rust-based implementations. This time synchronization package is available for testing in the upcoming Ubuntu 26.10 release while it aims to be the default for Ubuntu 27.04...
Is Sony about to announce a new PlayStation Portal game streaming handheld? The Wi-Fi Alliance recently certified two unannounced PlayStation products of some kind, and the certification documents indicate that they could be updates to the PlayStation Portal, which might mean we're getting the OLED screen rumored earlier this year. The two devices, which are classified as "Gaming Console/Peripherals," have model numbers of CFI-Y2000 and CFI-Y2105, which sound like a clear step up from the CFI-Y1001 model number for the currently available Portal. The docs say that the new models run on Android 15, which further indicates that they might be … Read the full story at The Verge.
Changer+, a self-custodial stablecoin wallet, has launched to simplify holding, moving, and using stablecoins across various blockchain networks. The wallet offers flexible gas-fee options, security features, and practical use cases, with users retaining control of their private keys.
The current beta of iOS 27.2 includes a Siri AI “suggested actions” feature in the Messages app that some will consider useful and others find annoying. A developer who has found a number of unannounced features has discovered that Apple is seeking to keep everyone happy with a new set of options … more…
TL;DR: Logistic regression made simple: sigmoid, probabilities and maximum likelihood, with a real diabetes prediction example anyone can follow. Logistic regression is a supervised machine learning model which is built on the linear regression formula that which is why it is called a regression model. This model is mainly used for classification tasks where the goal is to predict the probability that an instance belongs to a given class or not. Logistic Regression is a statistical algorithm which analyses the relationship between two data factors Types of Logistic Regression Binomial Regression Logistic regression is used for binary classification where we use sigmoid function that takes the input as an independent variable and produces a probability value between 0 and 1 Where we use sigmoid fuction as the activiation Multinomial Regression In multinomial regression there can be 3 or more possible unordered types of dependent variable such a ‘bike’, ‘sedan’, ‘SUV’, etc Where we use the softmax fuction as the activation Ordinal Regression In an ordinal logistic regression there can be 3 or more possible ordered types of dependent variable such as “Low”, “Medium”, or “High”. Here to we use the softmax function as the activation But before you put your data through, logistic regression comes with a few ground rules: Independent Observations : Each data point should stand on its own. Think of them like coworkers at a virtual meeting, no side chats or shared secrets. Binary Dependent Variable : The outcome should be binary (0 or 1). If your target variable has more than two classes (say, cat/dog/hamster), it’s time to invite the softmax function to the party. Linearity of Log Odds : There must be a linear relationship between the independent variables and the log-odds of the dependent variable. In plain English, the predictors should line up nicely when mapped to the odds of your outcome, not too wild, not too weird. No Outliers, Please : Logistic regression is a bit o
My GitHub profile is a stock now. It's called $VJK, it trades in rupees during Indian market hours, and anyone with a GitHub account can buy or sell it. My commits decide what it's worth. Over the last few weeks I kept running into posts here on DEV where people had turned their GitHub profile into something completely different. Giorgi built a cyberpunk console with a city made out of his contributions. Someone turned theirs into a roguelike dungeon, someone else into a spaceship mission console, and there's a Minecraft tree that grows from your commits. I loved all of them. My own profile README at that point was empty. I had cleaned it up and never put anything back. I wanted to make one too, but I didn't want to build another city or another game. What I liked about those posts is that each profile says something about the person who made it. So I asked myself what mine would say. The honest answer is that I spend a lot of my free time reading about markets and finance. So I listed myself on the stock market. From top to bottom: A ticker that scrolls the price, the fair value and the latest market news. A quote panel with the price, the day's open, high, low and volume, and how far the price can still move today. A daily candlestick chart. The dashed orange line is the "fair value" my commits give the stock. Four buttons: buy 5, buy 25, sell 5 and sell 25. The top shareholders and the latest trades. My GitHub numbers, shown like a company's fundamentals. My languages show up as "sector allocation". It follows your GitHub theme, so light mode users get a light version. There's no website and no server. Trading happens through GitHub issues. When you click BUY 5, GitHub opens a new issue in my profile repo with the title BUY 5 $VJK already filled in. You can change the number to anything from 1 to 25. Click Create, and that's your order. Opening the issue starts a GitHub Actions workflow. It reads the title, checks the order and fills it. If it's your first trade,
The Danish government said the breach of names, addresses, and state-issued ID numbers affects 8 million people, including people living abroad and the deceased.
When you run ls -lt, the newest files appear first. Add -r to put the oldest first. The important detail: this sorts by modification time, not necessarily the date a file was created. ls -lt # newest modified first ls -ltr # oldest modified first That distinction matters when you’re checking logs, comparing files, or trying to work out when something changed. Here’s how to choose the right timestamp and read the results. Modification time, or mtime, records when a file’s contents were last changed. It’s the timestamp most people mean when they ask to sort files by date, and it’s the one ls -l normally displays. The -t option sorts by mtime, newest first. The -r option reverses the active order; it doesn’t mean “reverse chronological” on its own. Together, -tr puts the oldest entries first. For example, when checking a directory of logs, ls -ltr places the newest log at the bottom of the output. That can be easier to spot in a long listing than the default newest-first order. To include dotfiles, add -a: ls -lat # newest modified first, including hidden files ls -latr # oldest modified first, including hidden files For a refresher on what long listings and hidden-file output show, see this explanation of the columns in ls -al. “Date” can refer to several different file timestamps. ls can sort on more than one, but the options don’t all mean what their names might suggest. Modification time (mtime): when file contents last changed. Use -t. Access time (atime): when the file was last read. Use -u with -t, as in ls -ltu. Status-change time (ctime): when file metadata changed, such as permissions or ownership. Use -c with -t, as in ls -ltc. Birth or creation time: when the file was created, if the system records it and ls supports displaying it. A common source of confusion is ctime. It is not creation time. Running chmod or chown can change ctime even if the file’s contents stay exactly the same. Creation-time options vary by platform. With GNU ls on Linux, you can requ
I recently wrote a beginner-friendly article about performing linear regression using the Normal Equation. I tried to explain the idea step by step, starting with a simple question: If some coefficients can minimize the prediction error, how can we find them? From there, I introduced the Normal Equation and showed how the formula works: I also implemented the main matrix operations in Python instead of treating the formula as a black box. The goal was not only to use linear regression, but to understand what is happening behind the formula and how the mathematics connects to the code. If you are learning machine learning and want to understand linear regression from the basics, you may find the article useful.
A new patent from Microsoft shows how they want to record your facial expressions, show them to an AI, and have it redesign the game you're playing. It's not only your face they want, but also any words you might be muttering, growls you might be making, or, dare I say, even purrs. The broader technology described in the patent is a process for game designers to prompt an AI to build out the narrative elements of a game, including objectives, sidequests, NPCs, dialogue, and items. Rather than stop at that first pass, the process would continue when players are in the game, analysing how they're playing to then generate new content based on their actions and reactions. A quick peek behind the curtain: I, too, am using this technology and the rest of this article has been rewritten to match exactly the facial expression you are making right… now. Read more
iOS 27 is packed with new features for Apple’s Photos app, including two that have long been on many users’ wish lists: full-featured slideshow creation and upgraded iCloud Shared Albums. more…
Many companies assume everyone craves new AI features. But the reality is that most people don't want more AI — at least not in the way most AI leaders envision it. Brought to you by Design Patterns For AI Interfaces, **friendly video courses on UX** and design patterns by Vitaly.