Programming snippets that you can set up in 20 minutes. Re-blogs may build on previous code, but will only be another bite-sized bit. Happy developing!
Don't wanna be here? Send us removal request.
Text
Deepseek open sourced the model, but the code and training data remains hidden. this effort aims to reproduce (read: validate) that the R1 method works.
This video has the best summary in laymans terms of what is different about the approach of just using Reinforcement learning and rewarding Chain Of Thought.
youtube
HuggingFace announced an initiative to fully replicate the code necessary to train a DeepSeek model from scratch and validate DeepSeeks claims, relevant as I've seen some people asking for thorough proof.
121 notes
·
View notes
Link
I compiled useful refactoring techniques into a course that guides you through different ways to refactor with code examples. Check it out: Get this course!
2 notes
·
View notes
Text
Would love to see git rebase here
Unlock the full potential of Git and take control of your code with our concise and effective ultimate cheat sheet!
Check out daily such informative post also if you find it useful do like and share it👌 👩💻😎










121 notes
·
View notes
Text
Leetcode 36. Sudoku Solver:
Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:
Each row must contain the digits 1-9 without repetition.
Each column must contain the digits 1-9 without repetition.
Each of the nine 3 x 3 sub-boxes of the grid must contain the digits 1-9 without repetition.
Solution follows in c#, algorithm from neetcode.io
public class Solution {
public bool IsValidSudoku(char[][] board) {
Dictionary<int,HashSet<char>> cols = new Dictionary<int,HashSet<char>>(9); Dictionary<(int,int),HashSet<char>> sqrs = new Dictionary<(int,int),HashSet<char>>(9);
for(int r = 0; r<9; r++){
rows.TryAdd(r,new HashSet<char>());
}
cols.TryAdd(r,new HashSet<char>());
}
for(int a = 0; a < 3; a++){
for(int b = 0; b < 3; b++){
sqrs.TryAdd((a,b),new HashSet<char>());
}
for(int r = 0; r<9; r++){
for(int c = 0; c<9; c++){
if(board[r][c] == '.'){
continue;
}
if(rows[r].Add(board[r][c]) &&
cols[c].Add(board[r][c]) &&
sqrs[(r/3,c/3)].Add(board[r][c]) ){
continue;
}else{
return false;
}
}
}
return true;
}
}
1 note
·
View note
Text
Animated Mandalas (With Code!)
In some of the rare times where I create something small and cool, I love sharing it with other people :)
For context, I've been working on a video game and started looking into some loading screens. I got carried away a bit, but I loved the capabilities and parameters I could experiment with here!
Since my game is set in a Mystery Solarpunk world, I was aiming for brighter and lighter color schemes :).
I was surprised with how beautiful all the parameter combinations can be!
Code
So if you want to try it yourself, feel free to check out the following repo:
https://github.com/AB3000/processing-fun/tree/main/MandalaRunner
You will need to download Processing in order to run it. It's a nice open-source sketchbook language built on top of Java to draw some cool visuals :)).
If you end up creating something with it, please tag me so I can see your creations! B)
Also, if you happen to have a GitHub account, I would love it if you could star the repo as well (but no pressure on this!) :))
More Inspiration?
Want some more inspiration? Check out the examples here! :)
youtube
149 notes
·
View notes
Text
C# Garbage Collection
To understand this, we will try What, Why, When & How.
What?
Garbage Collection is a technical word for Memory Management used by Microsoft in C#.
There are basically three Generation of Garbage collection:
Gen 0
Gen 1
Gen 2
The First generation is often designated for the objects that are short lived, while the other two generations are often used for the objects that has longer lifetime.
Why?
We are physically limited with the amount of space that is present inside a system and hence to use it efficiently we need its proper management.
When?
In basic terminology we can compare Garbage Collection with a person cleaning restaurant table using below points,
Whenever a person is using it, it is not generally cleaned until there is no space to put food then the table is cleaned for the dishes in which the food is already finished.
When a person finishes his meal and leaves the Restaurant then the Table(space) can be provided to another one.
A customer arriving always gets a clean table.
A Customer can only use his table and can’t share food from another table as long as they don’t belong to them.
Using the above pointers, we can summarize in a generalized way that:
Entities in C# are Garbage collected from memory if they are out of scope.
Entities are always provided space which are written in a fresh manner by them.
Memory spaces related to particular programs are confined and does not allow any other programs to access its memory space.
How?
Each Program basically has a separate Memory Segment which is allocated using VirtualAlloc and deallocated using VirtualFree Windows functions, Deallocation or compaction process gets triggered on need basis.
Firstly, the objects are checked across Gen0, the object who does not have any references pointing currently gets deallocated and remaining objects are moved to Gen1, this process gets repeated and compaction generally does not occur in Gen1/Gen2 until the space is there in Gen0 heap.
Summarizing everything in a nutshell, basically Garbage collection is a Memory Management Technique using various algorithm, it optimizes the memory usage and negates any memory leaks.
5 notes
·
View notes
Text
Hello rubber ducks. Error im running into is javascript/react project where onclick i want to scroll to the bottom of the page, but the element is null that im trying to reference.
Going to try either setState{this.state} in the else brach that checks if element is null
Or if theres an easy way to scroll to the bottom of the page (not the current element) that would be ideal.
0 notes
Video
“Morse Coding with the D1P! 🤓💻” via @plip.works on TikTok
50K notes
·
View notes
Photo

Hide API Keys with a Node.js API Proxy + Caching, Rate Limiting and Slow Downs ☞ https://bit.ly/39br2O0
#nodejs #javascript
3 notes
·
View notes