Easy to use health check for your FastAPI. This is the root module that will let you add implement and expand your usage of health checks, with FastAPI.
This module does not contain any service checkers, but you can easily add them. The other modules are not in this root module due to different dependencies required for each one. This is made so you only bring in the packages that you need to not add extra packages.
Install
pip install fastapi-healthcheck or poetry add fastapi-healthcheck
Adding Health Checks
Here is what you need to get started.
fromfastapiimportFastAPIfromfastapi_healthcheckimportHealthCheckFactory, healthCheckRoutefromfastapi_healthcheck_sqlalchemyimportHealthCheckSQLAlchemyapp=FastAPI()
# Add Health Checks_healthChecks=HealthCheckFactory()
# SQLAlchemy comes from fastapi-healthcheck-sqlalchemy_healthChecks.add(HealthCheckSQLAlchemy(alias='postgres db', connectionUri=cs.value, table=SmtpContactsSqlModel, tags=('postgres', 'db', 'sql01')))
# This will check external URI and validate the response that is returned.# fastapi-healthcheck-uri_healthChecks.add(HealthCheckUri(alias='reddit', connectionUri="https://www.reddit.com/r/aww.json", tags=('external', 'reddit', 'aww')))
app.add_api_route('/health', endpoint=healthCheckRoute(factory=_healthChecks))
Returned Data
When you request your health check, it will go and check all the entries that have been submitted and run a basic query against them. If they come back as expected, then a status code is 200. But if it runs into an error, it will return a 500 error.
If you have made a public service module and want to see it on this list, please open a new issue so we can add it to the list.
Writing a custom module
You can easily expand on this core module to add other health checks for other services. Generate a new service that pulls in HealthCheckInterface and HealthCheckBase. With those, you can build the respective class around the interface.
Once you have your service ready to go, add it to the HealthCheckFactory, and let the testing start.
If you would like to see an example of a custom service see fastapi_healthcheck_sqlalchemy. This will give you a better example of what you need to do to create your own module to interface with healthcheck.
The Forms package lets you generate forms as well as fields with standard make commands. Inside your forms for models you can specify the fields that need to be generated and then simply pass the form to the view. No more writing html forms, error handling etc. It can handle Eloquent relationships and easily work with ajax requests for more dynamic form submissions.
Forms is open-sourced software licensed under the MIT license
Bug Reporting and Feature Requests
Please add as many details as possible regarding submission of issues and feature requests
Disclaimer
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The theme is based on Bootstrap3. And it is built with HTML5, CSS and jQuery with proper use of google rich-snippets markup.
Layout
Boxed
Full Width
Changes
Colours better, but we need the nav link text not to be orange -just white, hover pale blue
Can we the links be made up of a smaller dark blue box inside the nav (like the reference site)
The mini logo isn’t working as it’s tiny. It should be text (eg Choose a currency…) until you scroll down, and when nav becomes sticky we replace that text with the mini logo (but much bigger than you have it right now.
The posted by text at the top of the article wants to be viewed by user as continuous text eg. “Posted by John Cameron on February 17, 2017 in AUD, GBP, GBP to AUD.” but in code each will be inside schema.
Can you make the related posts at bottom exactly the same format at the ones on the side column?
The rates scroller at bottom needs to be width of container not full-width. Also it doesn’t scroll anymore?
#Final Changes
The side image banners, are they the same size as the Torfx ad on the Future Currency website? Reason being, I want the side column width to be same as the ads.
the related posts at bottom, there will be no image as the text is taking up too much space. Any ideas?
can we lose the icon/bottom border under the side bar headings (eg Exchange Rate Calc) and can the margins be so that the headings start further to the left so the text lines up with the text underneath?
RSSBud can help you quickly discover and subscribe to RSS feeds from websites or apps, especially those provided by RSSHub. It supports the parameters feature of RSSHub which facilitates extra functionalities such as filtering by feed content and full text fetching.
Detects RSSHub feeds applicable for web pages (supports almost all rules of RSSHub Radar)
Detects other RSS feeds applicable for web pages (powered by RSSBud Rules)
Optimized for mobile environment (automatically expands URLs and adapts to common mobile sub-domains)
Share sheet extension
Quick subscription to Reeder, Fiery Feeds, Ego Reader, and system default RSS reader
Quick subscription to Tiny Tiny RSS, Miniflux, Fresh RSS, Feedly, Inoreader, Feedbin, The Old Reader, Feeds Pub
Parameter editor for RSSHub feeds
Rules kept up-to-date automatically
Customizable remote rules files
Simultaneously matches against multiple rules files
RSSHub access control (automatically generates MD5 access code)
Supports x-callback-url; can be used in “Shortcuts” app to facilitate a variety of powerful functions (see Shortcut Workshop and Scheme)
Shortcut Workshop
If RSSBud doesn’t support your RSS reader/service, or you want to integrate RSSBud into your workflow, you can write shortcuts utilizing RSSBud’s support for x-callback-url to fulfill your needs. Let’s start with the following ones!
RSSBud Starter Shortcut by cayZ | A template for RSSBud related shortcuts that sets up the variables and supports share sheets.
If you think you’ve got an idea of a shortcut that can benefit a larger audience, you’re welcomed to submit an issue!
X-callback-url Scheme
RSSBud has implemented the x-callback-url protocol, which provides a standardized means for iOS developers to expose and document the methods they make available to other apps via custom URL schemes.
You can open the following URL to let RSSBud analyze the provided URL and return the RSS feed chosen by the user:
feed_title The name of the RSS feed chosen by the user
feed_url The URL of the RSS feed chosen by the user
PopClip Extension
If you happen use both RSSBud and PopClip on macOS, here’s a handy extension that can be used to analyze selected URLs with RSSBud. Simply select everything in the code block below and you will see an option to install the extension in PopClip.
The core functionality of RSSBud comes from RSSBud Core, a sub-project written in JavaScript. The code is mainly referenced from RSSHub Radar.
Make sure you have Node.js installed before you build with Xcode.
If you wish to use the action extension, please set up your own App Group in both the iOS and Action Extension targets and modify RSSBud.appGroupIdentifier accordingly.
Rules
RSSBud’s functionality is largely powered by rules from two open-source projects. Please consider contributing to the appropriate rules if a particular feed can’t be discovered by RSSBud.
RSSHub Radar Rules are created and maintained by the RSSHub community. They are used to discover RSSHub feeds.
RSSBud Rules are a superset of RSSHub Radar rules. The extended schema allows non-RSSHub feeds (e.g. official RSS feeds that are not discoverable by parsing HTML) to be discovered. Please consider contributing to RSSHub Radar rules first if the feed is an RSSHub feed.
This repository contains my personal solutions to LeetCode problems, written in Java, JavaScript, SQL, and pandas.
All solution files are kept directly in the root of the repository. Each file is named after the problem it solves, often including the problem number and a descriptive title.
Some time ago I’ve cloned the original argbash repository, because the original Docker image available on the Docker Hub has been outdated at that time.
Later I’ve added two wrapper utilities that make using the dockerized argbash even more convenient. They are pretty straightforward and the embedded help should be probably sufficient, but I’ve added also the following description page.
Do you write Bash scripts that should accept arguments?
But they don’t since arguments support is a daunting task, because …
getopt is discouraged, getopts doesn’t support long options, there is no widely-accepted Bash module to do the task and some solutions don’t work on all platforms (Linux, OSX, MSW)…
Give Argbash a try and stop being terrorized by those pesky arguments! With Argbash, you will get:
Fast, minimalistic declaration of arguments your script expects (see below for supported argument types).
Scripts generated from definitions once that can be used on all platforms that have bash.
Definitions embedded in few lines of the script itself (so you can use Argbash to regenerate the parsing part of your script easily).
Ability to re-use low-level Argbash-aware scripts by wrapping them by higher-level Argbash-aware ones conveniently, without duplicating code.
Easy installation (optional). Just grab a release, unzip it, go inside and run cd resources && make install (you may want to run sudo make install PREFIX=/usr for a system-wide installation).
Pretty much like Argbash CLI, but you don’t have to install it, you just download the image.
What it is
Argbash is not a parsing library, but it is rather a code generator that generates a bash library tailor-made for your script.
It lets you to describe arguments your script should take and then, you can generate the bash parsing code.
It stays in your script by default, but you can have it generated to a separate file and let Argbash to include it in your script for you.
In any case, you won’t need Argbash to run the script.
Argbash is very simple to use and the generated code is relatively nice to read.
Moreover, argument definitions stay embedded in the script, so when you need to update the parsing logic, you just re-run the argbash script on the already generated script.
So by writing few comments to your script and running the Argbash’s bin/argbash over it, you will get a bash script with argument parsing.
See the simple example source template and simple example script for the result.
If you are not into long reading, let bin/argbash-init generate the template for you.
Following argument types are supported:
Positional arguments (defaults supported, possibility of fixed, variable or infinite number of arguments),
A drop-in animation replacement for Titanium. This module’s aim is to mimick as much of the Titanium animation module as possible with the addition of new timing functions and better performance. As of right now the only properties that can be animated are: rotate, transform, top, bottom, left, right, width, height, opacity, color and backgroundColor. The transform property is not supported at this time.
If you are animating views that don’t contain any sort of transparency you will see performance gains when animating large or otherwise complex view groups.
If you need to perform a rotation you can pass the rotate property which accepts a float. The rotate property is the angle you wish to rotate to; A positive value will result in a counter-clockwise rotation, while a negative value will result in a clockwise rotation.
Once a rotation has been performed subsequent rotations will be performed from its last rotation angle. To simplify multiple rotations you can pass values > 360. For example to do two complete rotations you can pass a value of 720.
Layout Support
When animating a complex layout (such as a vertical layout inside a vertical layout) it may be necessary to specify which parent to propogate the animimations from, you can do this by setting parentForAnimation and passing the proxy that holds the views that should animate. This is especially useful in cases where you are animating inside of a Ti.UI.ScrollView.
Easing Functions
The below easing functions can be accessed as you would any other Titanium constant. Assuming the above usage example you can access all of these by passing the below name to the module, such as in: Animator.ELASTIC_IN_OUT
Note : All the Rendered Juypter Notebooks(in nbviewer) for better view are availabe by clicking on the links embedded below. Also some links might not work so you can direcly click here and paste the link of the notebook you want to render
DNA Sequencing is the process of determining the nucleic acid sequence – the order of nucleotides in DNA. It includes any method or technology that is used to determine the order of the four bases: Adenine(A), Guanine(G), Cytosine(C), and Thymine(T).
DNA Sequencing may be used to determine the sequence of individual genes, larger genetic regions (i.e. clusters of genes or operons), full chromosomes, or entire genomes of any organism. DNA sequencing is also the most efficient way to indirectly sequence RNA or proteins.
Read Alignment Algorithms Covered :
Online Algorithms:
The algorithm in which the text ‘T’ (in our case the reference genome) is not pre-processed, and it doesn’t matter if the pattern ‘P’ is pre-processed or not.
We use the term k-mer to refer to a substring of length k. For each offset that the index reports back, that’s called an index hit. When P matches within T, we’ve been calling that a match, or an occurrence. But, an index hit may or may not correspond to a match, it’s just a hint that we should look harder in that particular region of T. So, not all index hits lead to matches, because we don’t know whether the rest of P matches where it should within T. We have to do more character comparisons. And, this additional work that we do is called verification.
This kind of data structure is called a multimap. It’s a map because it associates keys, k-mers, in this case with values, offsets in the genome. And it’s a multimap because a k-mer may be associated with many different offsets in the genome.
In mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements.
Need for Approximate Matching Algorithms :
We need algorithms that can do approximate matching. Allowing for differences between the pattern and the text. One of the reason we might expect differences between the read and the reference is because of sequencing errors. Sometimes the sequencer will make mistakes. It will miscall a base in the sequencing read. And when that happens, that base might no longer match the reference genome.
We want to be able to talk about the distance between two strings. In other words, we want to be able to describe how different they are, how many differences there are. But we have to define exactly what we mean by distance.
So the first kind of distance we’ll define is called Hamming Distance. So if you have two strings, X & Y, that are of the same length, we can define the hamming distance between X and Y as the minimal number of substitutions we need to make to turn one of the strings into the other.
Another is Edit Distance(AKA levenshtein Distance) between two strings equals the minimal number of edits required to turn one string into the other. Where a single edit could be a substitution, or it could be an insertion or a deletion. (In this case X & Y could be of different length)
Approximate Matching Algorithm using Pigeonhole Principle (and Boyer Moore) : The Pigeonhole Principle states that if items are put into containers, with, then at least one container must contain more than one item. In our case we will split pattern ‘P’ (k+1) times when we are looking for an approximate match of upto ‘k’ mismatches, that means even if we have ‘k’ mismatches in ‘k’ partitions of pattern ‘P’, still there will be atleast one partition which will exactly match with the reference genome, which we can later confirm by verification as stated in indexing techiques.
Global Alignment: Calculating a global alignment is a form of global optimization that “forces” the alignment to span the entire length of all query sequences. By contrast, local alignments identify regions of similarity within long sequences that are often widely divergent overall. An attempt is made to align the entire sequence (end to end alignment) Finds local regions with the highest level of similarity between the two sequences. A global alignment contains all letters from both the query and target sequences. It penalises the Substitution/ Insertion/ Deletion differently than editDistance.
Overlaps: Overlap–layout–consensus genome assembly algorithm: Reads are provided to the algorithm. Overlapping regions are identified. Each read is graphed as a node and the overlaps are represented as edges joining the two nodes involved. The algorithm determines the best path through the graph (Hamiltonian path).
Shortest Common Superstring: A shortest common supersequence (SCS) is a common supersequence of minimal length. In the shortest common supersequence problem, two sequences X and Y are given, and the task is to find a shortest possible common supersequence of these sequences.