Alternatively, only if you are familiar with Docker, you can opt to run
this as a Docker container. You have to install Docker on your machine.
You can then download my container:
$ docker pull grokkaine/pycourse
Once you have the container, run it with (from the project git root):
$ docker run --rm -p 8888:8888 -v /$(pwd):/home/jovyan/ grokkaine/pycourse
That is making a port forwarding, opening your localhost to the docker client
at port 8888. Also your local folder is now mounted to the Docker client. So
all you do now is open a web browser at http://localhost:8888/tree.
It is messy to work with containers, so here is a small reminder on how to
cleanup:
$ docker ps -a
$ docker stop <container_id>
$ docker rm <container_id>
# check again to make sure you are clean
$ docker ps -a
# once you deleted all running containers, delete the images
$ docker images
# choose what you delete
$ docker rmi -f <image_id>
# check again to make sure you are clean
$ docker images
Run the jupyter/scipy-notebook container:
docker run -d -p 8888:8888 jupyter/scipy-notebook
Now go to [http://localhost:8888/tree] to see it in action.
While the scipy stack is pretty solid (see 1), unfortunately pytables
needs to be installed.
To stop it:
$ docker ps -a
# copy the container id
$ docker stop <container_id>
Create your own container
Go to your source root directory, containing the Dockerfile, and run:
“`bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
“`
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
///////////////////
DragonTet v1.1 2025
///////////////////
Programming: salvaKantero
Betatesting: Luna_314
Compatible with:
- Dragon 32/64
- Tandy Color Computer 1/2/3
*at least 16 kb.
The objective of DragonTet is to move, rotate, and place the falling pieces to form complete horizontal lines on the game board.
Each time you complete a line, it disappears, freeing up space on the board and increasing your score.
By completing a certain number of lines, the game level increases. With each level, the falling speed of the pieces accelerates, making the game more challenging.
If the pieces stack up to the top of the board and you can no longer place them, the game is over!
Single-Player Mode:
Compete to achieve the highest score possible.
From level 4 onwards, every 12 pieces played will generate trap lines or blocks.
Two-Player Mode (Optional):
Each player has their own board.
The winner is the one who survives the longest or achieves the highest score.
From level 4 onwards, trap blocks and lines are generated on the opponent's board every 3 lines completed.
CONTROLS
========
PLAYER 1:
Rotate piece:
Press <W>, the up arrow key, or joystick 1 up.
Move piece left:
Press <A>, the left arrow key, or joystick 1 left.
Soft drop (faster descent):
Press <S>, the down arrow key, or joystick 1 down.
Move piece right:
Press <D>, the right arrow key, or joystick 1 right.
PLAYER 2:
Rotate piece:
Press <I> or joystick 2 up.
Move piece left:
Press <J> or joystick 2 left.
Soft drop (faster descent):
Press <K> or joystick 2 down.
Move piece right:
Press <L> or joystick 2 right.
COMMON CONTROLS:
Pause:
Press <H> to pause. Any other key to continue.
Cancel:
Press <X> to exit the game at any time and return to the main menu.
SCORING
=======
1 line: 100 × level number
2 lines: 300 × level number
3 lines: 500 × level number
4 lines: 800 × level number
* Soft dropping a piece awards 1 point per row descended.
TIPS AND TRICKS
===============
Plan Ahead:
Observe the next piece to plan where to place the current one.
Keep the Board Tidy:
Try to keep the board as clear as possible to avoid running out of space.
Maximise Your Score:
Aim to complete multiple lines at the same time for higher scores.
PACKAGE CONTENTS
================
- dtet.c: Source code (includes compilation instructions)
- dtetdr.bin: Binary file for running on Dragon 32/64/200/Tano emulators
- dtetdr.cas: Simple cassette file for loading on Dragon 32/64/200/Tano emulators
- dtetdr.vdk: Simple diskette file for loading on Dragon 64/200/Tano emulators
- dtetdr.wav: Audio file for recording onto a real cassette compatible with Dragon 32/64/200/Tano
- dtetcc.bin: Binary file for running on Tandy Coco 1/2/3 emulators
- dtetcc.cas: Simple cassette file for loading on Tandy Coco 1/2/3 emulators
- dtetcc.wav: Audio file for recording onto a real cassette compatible with Tandy Coco 1/2/3
- dtet.png: Cassette cover
- Readme.txt/Leeme.txt: This file. Instructions and additional information
- License.txt: Legal information about the licence
* BIN files generated with ‘CMOC’ v0.1.89 by Pierre Sarrazin
http://sarrazip.com/dev/cmoc.html
* CAS/WAV files generated with ‘bin2cas.pl’ v3.14 by Ciaran Anscomb
https://www.6809.org.uk/dragon/bin2cas.pl
* VDK file generated with ‘DragonDOS’ v1.0.3 by Robcfg
https://github.com/robcfg/retrotools/releases
Dragontet is released under GPL v3 for all software components* (see license.txt).
C SOURCE CODE AND RESOURCES AVAILABLE AT https://github.com/salvakantero/Dragontet
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
npm test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
npm run build
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
npm run eject
Note: this is a one-way operation. Once you eject, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
NormalDistributiondist=new(mu:1,sigma:3);// PDFfor(ddoublex=-4;x<=4;x+=0.125){ddoublepdf=dist.PDF(x);Console.WriteLine($"pdf({x})={pdf}");}// CDFfor(ddoublex=-4;x<=4;x+=0.125){ddoubleccdf=dist.CDF(x,Interval.Upper);Console.WriteLine($"ccdf({x})={ccdf}");}// Quantilefor(inti=0;i<=10;i++){ddoublep=(ddouble)i/10;ddoublex=dist.Quantile(p,Interval.Upper);Console.WriteLine($"cquantile({p})={x}");}// StatisticConsole.WriteLine($"Support={dist.Support}");Console.WriteLine($"Mu={dist.Mu}");Console.WriteLine($"Sigma={dist.Sigma}");Console.WriteLine($"Mean={dist.Mean}");Console.WriteLine($"Median={dist.Median}");Console.WriteLine($"Mode={dist.Mode}");Console.WriteLine($"Variance={dist.Variance}");Console.WriteLine($"Skewness={dist.Skewness}");Console.WriteLine($"Kurtosis={dist.Kurtosis}");Console.WriteLine($"Entropy={dist.Entropy}");// Random SamplingRandomrandom=new(1234);double[]xs=dist.Sample(random,100000).ToArray();// Fitting// note: The distribution that minimizes the squared error // of the quantile function over the specified interval is return.(NormalDistribution?dist_fit,ddoubleerror)=NormalDistribution.Fit(xs,fitting_quantile_range:(0.1,0.9));
An innovative Android app made with Flutter and Firebase. Utilizing the Bloc pattern for state management, this app allows you to find the location of another phone on a map and use a compass to aim towards it.
Features
Map view to find phone location
Compass to aim towards phone location
Provide distance between 2 phones
Shows message for target phone
Works in the background option
Utilizes Bloc pattern for state management
Built with Flutter and Firebase
Unit test Exemple
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisites
Flutter SDK
Android emulator or a physical device to run the app
yarn – Yarn is a package manager that doubles down as project manager
typescript – TypeScript is JavaScript with syntax for types
nodemon – Simple monitor script for use during development of a Node.js app
ts-node-dev – TypeScript execution environment and REPL for node.js
antd – An enterprise-class UI design language and React UI library with a set of high-quality React components, one of best React UI library for enterprises
json-server – Get a full fake REST API with zero coding in less than 30 seconds (seriously)
react-redux – The official, opinionated, batteries-included toolset for efficient Redux development
mongodb – The official MongoDB driver for Node.js.
Vercel এ ডেপ্লয় এর ক্ষেত্রে কয়েকটি জিনিস খেয়াল রাখতে হবে
Vercel এ ডেপ্লয় এর ক্ষেত্রে কয়েকটি জিনিস খেয়াল রাখতে হবে
tsconfig.json এর মধ্যে
"module": "commonjs"*/* Specify what module code is generated. */*,"rootDir": "./src"*/* Specify the root folder within your source files. */*,"outDir": "./dist"*/* Specify an output folder for all emitted files. */*,
এই কনফিগটি add করে নিতে হবে যদি আগে থেকে করা না থাকে
yarn – Yarn is a package manager that doubles down as project manager
typescript – TypeScript is JavaScript with syntax for types
nodemon – Simple monitor script for use during development of a Node.js app
ts-node-dev – TypeScript execution environment and REPL for node.js
antd – An enterprise-class UI design language and React UI library with a set of high-quality React components, one of best React UI library for enterprises
json-server – Get a full fake REST API with zero coding in less than 30 seconds (seriously)
react-redux – The official, opinionated, batteries-included toolset for efficient Redux development
mongodb – The official MongoDB driver for Node.js.
Vercel এ ডেপ্লয় এর ক্ষেত্রে কয়েকটি জিনিস খেয়াল রাখতে হবে
Vercel এ ডেপ্লয় এর ক্ষেত্রে কয়েকটি জিনিস খেয়াল রাখতে হবে
tsconfig.json এর মধ্যে
"module": "commonjs"*/* Specify what module code is generated. */*,"rootDir": "./src"*/* Specify the root folder within your source files. */*,"outDir": "./dist"*/* Specify an output folder for all emitted files. */*,
এই কনফিগটি add করে নিতে হবে যদি আগে থেকে করা না থাকে
A FastAPI-based web application that visualizes and analyzes mining projects data from Digbee’s API. The application provides an interactive dashboard to explore mining projects, their locations, and nearby operations within a 500km radius.
Application Screenshots
Analytics Dashboard
Visualizes commodity distribution and project status breakdown across the mining industry
Project List View
Interactive table showing detailed mining project information with sorting and filtering capabilities
Project Details
Detailed view of individual projects including location mapping and nearby operations
Features
📊 Interactive data table of mining projects
🗺️ Geographic visualization of project locations
📈 Analytics dashboard with industry insights
🔍 Detailed project views with nearby operations
🌐 REST API endpoints for data access
Tech Stack
Backend: FastAPI, Python 3.8+
Frontend: JavaScript, HTML5, CSS3
Data Handling: Pydantic
Templates: Jinja2
API Integration: Requests
Installation
Clone the repository:
git clone https://github.com/TomAllsop/Mining-Data-Viewer.git
cd Mining-Data-Viewer
Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install dependencies:
pip install -r requirements.txt
Run the application:
uvicorn digbee_list_projects:app --reload
OR
The application will be available at http://localhost:8000 or http://0.0.0.0:8000
The good parts of MVVM (the data bindings) with the simplicity and robustness of an MVU architecture for the rest of your app. Never write an overly-complex ViewModel class again!
Elevator pitch
Elmish.WPF is a production-ready library that allows you to write WPF apps with the robust, simple, well-known, and battle-tested MVU architecture, while still allowing you to use all your XAML knowledge and tooling to create UIs.
Some benefits of MVU you’ll get with Elmish.WPF include:
Simple-to-understand, unidirectional data flow
Single source of truth for all the state in your app
Simple async/IO
Immutable data
Pure functions
Great testability
Simple optimization
78% more rockets 🚀
Even with static views, your central model/update code can follow an idiomatic Elmish/MVU architecture. You could, if you wanted, use the same model/update code to implement an app using a dynamic UI library such as Fabulous or Fable.React, by just rewriting the “U” part of MVU.
Static XAML views is a feature, not a limitation. See the FAQ for several unique benefits to this approach!
Elmish.WPF uses Elmish, an F# implementation of the MVU message loop.
Elm resources may also provide some guidance, but note that not everything is relevant. A significant difference between “normal” Elm architecture and Elmish.WPF is that in Elmish.WPF, the views are statically defined using XAML, and the “view” function does not render views, but set up bindings. See the tutorial for details.
Define an update function that takes a message and a model and returns an updated model:
letupdate msg m =match msg with| Increment ->{ m with Count = m.Count + m.StepSize }| Decrement ->{ m with Count = m.Count - m.StepSize }| SetStepSize x ->{ m with StepSize = x }
Define the “view” function using the Bindings module. This is the central public API of Elmish.WPF.
Normally in Elm/Elmish this function is called view and would take a model and a dispatch function (to dispatch new messages to the update loop) and return the UI (e.g. a HTML DOM to be rendered), but in Elmish.WPF this function is in general only run once and simply sets up bindings that XAML-defined views can use. Therefore, let’s call it bindings instead of view.
openElmish.WPFletbindings()=["CounterValue"|> Binding.oneWay (fun m -> m.Count)"Increment"|> Binding.cmd (fun m -> Increment)"Decrement"|> Binding.cmd (fun m -> Decrement)"StepSize"|> Binding.twoWay((fun m -> float m.StepSize),(fun newVal m -> int newVal |> SetStepSize))]
The strings identify the binding names to be used in the XAML views. The Binding module has many functions to create various types of bindings.
Alternatively, use statically-typed view models in order to get better IDE support in the XAML.
Create a function that accepts the app’s main window (to be created) and configures and starts the Elmish loop for the window with your init, update and bindings:
In the code above, Program.runElmishLoop will set the window’s DataContext to the specified bindings and start the Elmish dispatch loop for the window.
Create a WPF app project (using the Visual Studio template called WPF App (.NET)). This will be your entry point and contain the XAML views. Add a reference to the F# project, and make the following changes in the csproj file:
Currently, the core Elmish logs are only output to the console. If you want a console window for displaying Elmish logs, change <OutputType>WinExe</OutputType> to <OutputType>Exe</OutputType> and add <DisableWinExeOutputInference>true</DisableWinExeOutputInference>.
If the project file starts with the now legacy <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">, change it to <Project Sdk="Microsoft.NET.Sdk">
Change the target framework to match the one used in the F# project (e.g. net5.0-windows).
Make the following changes to App.xaml.cs to initialize Elmish when the app starts:
The Elmish.WPF tutorial provides information on general MVU/Elmish concepts and how they apply to Elmish.WPF, as well as the various Elmish.WPF bindings.
The samples are complete, working mini-apps demonstrating selected aspects of Elmish.WPF.
Static views in MVU? Isn’t that just a half-baked solution that only exists due to a lack of better alternatives?
Not at all! 🙂
It’s true that static views aren’t as composable as dynamic views. It’s also true that at the time of writing, there are no solid, production-ready dynamic UI libraries for WPF (though there are no lack of half-finished attempts or proof-of-concepts: Elmish.WPF.Dynamic, Fabulous.WPF, Skylight, Uil). Heck, it’s even true that Elmish.WPF was originally created with static views due to the difficulty of creating a dynamic UI library, as described in issue #1.
However, Elmish.WPF’s static-view-based solution has several unique benefits:
You can use your existing XAML and MVVM knowledge (that is, the best part of MVVM – the UI bindings – without having to deal with NavigationServices, ViewModelLocators, state synchronization, INotifyPropertyChanged, etc.)
Huge mindshare – there are tons of relevant XAML and MVVM resources on the net which can help with the UI and data binding part if you get stuck
Automatic support for all 3rd party WPF UI libraries like MaterialDesignInXamlToolkit, since it just uses XAML and bindings (support for 3rd party libraries is commonly a major pain point for dynamic UI solutions)
You can use the XAML designer (including design-time data binding)
Automatically puts all the power of WPF at your fingertips, whereas dynamic UI solutions have inherent limitations that are not easy to work around
In short, for WPF apps, a solution based on static XAML views is currently the way to go.
Do I have to use the project structure outlined above?
Not at all. The above example, as well as the samples, keep all non-UI code in a single project for simplicity, and all the XAML in a C# project for better tooling.
An alternative with a clearer separation of UI and core logic can be implemented by splitting the F# project into two projects:
A core library containing the model definitions and update functions.
This library can include a reference to Elmish (e.g. for the Cmd module helpers), but not to Elmish.WPF, which depends on WPF and has a UI-centered API (specifying bindings). This will ensure your core logic (such as the update function) is free from any UI concerns, and allow you to re-use the core library should you want to port your app to another Elmish-based solution (e.g. Fable.React).
An Elmish.WPF project that contains the bindings (or view) function and the call to Program.runElmishLoop.
This project would reference the core library and Elmish.WPF.
Another alternative is to turn the sample code on its head and have the F# project be a console app containing your entry point (with a call to Program.runWindow) and referencing the C#/XAML project (instead of the other way around, as demonstrated above).
In general, you have a large amount of freedom in how you structure your solution and what kind of entry point you use.
How can I test commands? What is the CmdMsg pattern?
Since the commands (Cmd<Msg>) returned by init and update are lists of functions, they are not particularly testable. A general pattern to get around this is to replace the commands with pure data that are transformed to the actual commands elsewhere:
Create a CmdMsg union type with cases for each command you want to execute in the app.
Make init and update return model * CmdMsg list instead of model * Cmd<Msg>. Since init and update now return data, they are much easier to test.
Create a trivial/too-boring-to-test cmdMsgToCmd function that transforms a CmdMsg to the corresponding Cmd.
Finally, create “normal” versions of init and update that you can use when creating Program. Elmish.WPF provides Program.mkProgramWpfWithCmdMsg that does this for you (but there’s no magic going on – it’s really easy to do yourself).
Yes. Assuming you have a C# XAML and entry point project referencing the F# project, simply use ViewModel.designInstance (e.g. in the F# project) to create a view model instance that your XAML can use at design-time:
When targeting legacy .NET Framework, “Project code” must be enabled in the XAML designer for this to work.
If you are using static view models, make sure that the View Model type is in a namespace and add a default constructor that passes a model into ViewModelArgs.simple:
When targeting .NET Core 3, a bug in the XAML designer causes design-time data to not be displayed through DataContext bindings. See this issue for details. One workaround is to add a d:DataContext binding alongside your normal DataContext binding. Another workaround is to change
where T is the type of the parent object that contains local:MyControl (or a more distant ancestor, though there are issues with using Window as the type).
Can I open new windows/dialogs?
Sure! Just use Binding.subModelWin. It works like Binding.subModel, but has a WindowState wrapper around the returned model to control whether the window is closed, hidden, or visible. You can use both modal and non-modal windows/dialogs, and everything is a part of the Elmish core loop. Check out the NewWindow sample.
Note that if you use App.xaml startup, you may want to set ShutdownMode="OnMainWindowClose" in App.xaml if that’s the desired behavior.
Can I bind to events and use behaviors?
Sure! Check out the EventBindingsAndBehaviors sample. Note that you have to install the NuGet package Microsoft.Xaml.Behaviors.Wpf.
How can I control logging?
Elmish.WPF uses Microsoft.Extensions.Logging. To see Elmish.WPF output in your favorite logging framework, use WpfProgram.withLogger to pass an ILoggerFactory:
For example, in Serilog, you need to install Serilog.Extensions.Logging and instantiate SerilogLoggerFactory. The samples demonstrate this.
Elmish.WPF logs to these categories:
Elmish.WPF.Update: Logs exceptions (Error level) and messages/models (Trace/Verbose level) during update.
Elmish.WPF.Bindings: Logs events related to bindings. Some logging is done at the Error level (e.g. developer errors such as duplicated binding names, using non-existent bindings in XAML, etc.), but otherwise it’s generally just Trace/Verbose for when you really want to see everything that’s happening (triggering PropertyChanged, WPF getting/setting bindings, etc.)
Elmish.WPF.Performance: Logs the performance of the functions you pass when creating bindings (get, set, map, equals, etc.) at the Trace/Verbose level. Use WpfProgram.withPerformanceLogThreshold to set the minimum duration to log.
The specific method of controlling what Elmish.WPF logs depends on your logging framework. For Serilog you can use .MinimumLevel.Override(...) to specify the minimum log level per category, like this: