HVMC is a more-strongly design pattern based on MVC (Model-View-Controller). You got many advantages by using this pattern, especially if your project is very big.
Key advantages (M.O.R.E):
Modularization: Reduction of dependencies between the disparate parts of the application.
Organization: Having a folder for each of the relevant triads makes for a lighter work load.
Reusability: By nature of the design it is easy to reuse nearly every piece of code.
Extendibility: Makes the application more extensible without sacrificing ease of maintenance.
This script validates the message structure of the commit command.
The line: msg=”$(cat $1 | grep -v # | head -n 1)” takes the
message passed though the argument -m or by the interactive editor
(vim, nano, etc) and procces the first not comment line (excludes the
The lines with the # symbol.
In the line: if ! [[ $msg =~ ^(feat|fix|docs?|style|refactor|pref|chore|revert?)(.+):{1}\ ?.{3,}$ ]]; then Validates the message structure.
Instructions
Write the following code into a file named commit-msg and save it into: /repo/path/.git/hooks/
#!/bin/sh
RED='\033[0;31m'
YELLOW='\e[33m'
GREEN='\e[32m'
CYAN='\e[36m'
NC='\033[0m'
BOLD='\e[1m'
NORMAL='\e[0m'
msg="$(cat $1 | grep -v \# | head -n 1)"
if ! [[ $msg =~ ^(feat|fix|docs?|style|refactor|pref|chore|revert?)\(.+\):{1}\ ?.{3,}$ ]]; then
echo -e "${RED}${BOLD}Invalid commit${NORMAL}${NC}"
echo -e "\t${YELLOW}Follow the structure: \"type(module): description, at lease 3 words\""
echo -e "\tAvailable types:"
echo -e "\t\tfeat|fix|docs?|style|refactor|pref|chore|revert?${NC}"
echo -e "\t${CYAN}${BOLD}Example:${NORMAL} "
echo -e "\t\t${CYAN}revert(usersController): remove t3 validation${NC}"
exit 1
fi
Examples
Navigate to your repo path
Invalid commit message
$ git commit -m "Invalid message"
Invalid commit
Follow the structure: "type(module): description, at lease 3 words"
Available types:
feat|fix|docs?|style|refactor|pref|chore|revert?
Example:
revert(usersController): remove t3 validation
Valid commit message
git commit -m "chore(BashCommitRule): write a valid message"
[master ebdf4ef] chore(BashCommitRule): write a valid message
1 file changed, 1 insertion(+)
Ward is a secure, cross-platform, zero-install, single-file password manager.
Ward stores your passwords in an encrypted file which you manage with a single master password. You can keep track of multiple complex passwords without having to remember any of them.
go get -u github.com/schmich/ward/... && go install github.com/schmich/ward/...
Usage
Usage: ward [OPTIONS] COMMAND [arg...]
Secure password manager - https://github.com/schmich/ward
Options:
-v, --version Show the version and exit
Commands:
init Create a new credential database.
add Add a new credential.
copy Copy a password to the clipboard.
edit Edit an existing credential.
del Delete a stored credential.
qr Print password formatted as a QR code.
import Import JSON-formatted credentials.
export Export JSON-formatted credentials.
list Print a table-formatted list of credentials.
master Update master password.
Run 'ward COMMAND --help' for more information on a command.
Create a new credential database:
> ward init
Creating new credential database.
Master password:
Master password (confirm):
✓ Credential database created at C:\Users\schmich\.ward.
Link to an existing credential database. This requires administrator privileges on Windows. A symlink will be created to the specified file:
The Ward database is stored at ~/.ward. This can be overridden with the WARDFILE environment variable, e.g. in .bashrc:
export WARDFILE=~/dotfiles/ward
Password Generator
Ward comes with a constraint-solving password generator that you can use when adding a new credential (ward add --gen). You can control length, character requirements, and exclusions:
> ward add --help
Usage: ward add [--login] [--realm] [--note] [--no-copy] [--gen [--length] [--min-length] [--max-length] [--no-upper] [--no-lower] [--no-digit] [--no-symbol] [--no-similar] [--min-upper] [--max-upper] [--min-lower] [--max-lower] [--min-digit] [--max-digit] [--min-symbol] [--max-symbol] [--exclude]]
Options:
--login="" Login for credential, e.g. username or email.
--realm="" Realm for credential, e.g. website or WiFi AP name.
--note="" Note for credential.
--no-copy=false Do not copy password to the clipboard.
--gen=false Generate a password.
--length=0 Password length.
--min-length=30 Minimum length password.
--max-length=40 Maximum length password.
--no-upper=false Exclude uppercase characters from password.
--no-lower=false Exclude lowercase characters from password.
--no-digit=false Exclude digit characters from password.
--no-symbol=false Exclude symbol characters from password.
--no-similar=false Exclude similar characters from password: 5SB8|1IiLl0Oo.
--min-upper=0 Minimum number of uppercase characters in password.
--max-upper=-1 Maximum number of uppercase characters in password.
--min-lower=0 Minimum number of lowercase characters in password.
--max-lower=-1 Maximum number of lowercase characters in password.
--min-digit=0 Minimum number of digit characters in password.
--max-digit=-1 Maximum number of digit characters in password.
--min-symbol=0 Minimum number of symbol characters in password.
--max-symbol=-1 Maximum number of symbol characters in password.
--exclude="" Exclude specific characters from password.
vulkan-sxs – explain the Vulkan API step by step and vulkan-sync – rephrase Vulkan’s requirements on execution dependencies in a more precise form. [MIT]
Vulkan Lecture Series – University lectures by Johannes Unterguggenberger from the Research Unit of Computer Graphics, TU Wien. Covers basic and advanced topics like: Vulkan essentials, the swap chain, resources and descriptors, commands and command buffers, pipelines and stages, real-time ray tracing, and synchronization.
Fossilize – serialization format for various persistent Vulkan object types. [MIT]
vk-bootstrap – C++ utility library to jump start Vulkan development by automating instance, physical device, device, and swapchain creation. [MIT]
Google’s vulkan-cpp-library – Vulkan abstraction library using C++11 for memory, resource management, type and thread safety as well as system independency. [Apache]
FrameGraph – Vulkan abstraction layer that represent frame as a task graph. [BSD 2-clause]
V-EZ – light-weight middleware layer for the Vulkan API targeting Professional Workstation ISVs. [MIT]
Vookoo – Vookoo is a set of dependency-free utilities to assist in the construction and updating of Vulkan graphics data structres. [MIT]
vpp – Modern C++ Vulkan Abstraction focused on performance and a straightforward interface. [MIT]
Auto-Vk – Vulkan convenience and productivity layer for modern C++, atop Vulkan-Hpp, by the Research Unit of Computer Graphics, TU Wien. [MIT]
Auto-Vk-Toolkit – C++ framework around Auto-Vk for rapid prototyping, research, and teaching, by the Research Unit of Computer Graphics, TU Wien. [MIT for the framework’s code]
bgfx – Cross-platform, graphics API agnostic, “Bring Your Own Engine/Framework” style rendering library. [BSD-2-clause]
bsf – Modern C++14 library for the development of real-time graphical applications. [MIT]
VKFS – Cross-platform easy-to-use C++ framework that allows you to quickly initialize Vulkan and get a ready-made environment. Provides high-level abstraction over basic Vulkan objects.
Vulkan Launchpad – Vulkan framework for Windows, macOS, and Linux. Especially well-suited for Vulkan beginners, used in university education, by the Research Unit of Computer Graphics, TU Wien. [MIT]
Arm Mobile Studio – includes the Arm Graphics Analyzer to trace graphics performance issues easily, and Arm Streamline performance analyzer, for a whole-system view of performance to determine bottlenecks quickly across both the CPU and GPU.
Vulkan Programming Guide – by Graham Sellers and John Kessenich – Introduces powerful 3D development techniques for many fields.
Mastering Graphics Programming with Vulkan – Develop a modern rendering engine from first principles to state-of-the-art techniques, by Marco Castorina and Gabriel Sassone.
Debido a que este manual ejecuta funciones avanzadas de JavaScript, requiere ser interpretado en un servidor web HTTP,
como Apache, IIS o Ngnix.
Sistema de Plantilla
Este manual usa un sistema de plantillas propio. En vez de tener que repetir todas las etiquetas HTML en cada página,
usa un código HTML mínimo para crear los artículos y el motor en JavaScript de la plantilla se encarga de crear el
resto del documento. El menú y el paginado se crean de forma automática configurando un archivo.
Note
Creé este sistema, porque a medida que el manual iba teniéndo más páginas se volvía un engorro tanto el modificar código
que afectaba a muchas páginas, como el reestructurar el orden de las páginas (cuando tienes que cambiar la URL
de un enlace en más de 100 páginas HTML, echas de menos los sistemas de plantillas propios de los backends).
Estructura de las páginas
Existen dos tipos de páginas, las individuales y las que tienen sub-páginas.
Para crear una nueva página, hay que crear una nueva carpeta en la carpeta “pages”, situada en la raíz del proyecto.
Crear una página individual
Si la página nueva, es una página individual, dentro de la carpeta creada deben de añadirse dos documentos:
index.html – Contendrá el HTML de la página.
page.css – Contendrá el CSS específico de esa página. (en muchas páginas está en blanco)
El archivo index.html tendrá el siguiente esquema:
<!DOCTYPE html><metacharset="UTF-8" xmlns="http://www.w3.org/1999/html"><scriptsrc="../../js/init.js"></script><pagedata-dir="../.." data-chapter="3">
HTML propio de ese artículo.
</page>
El código HTML de la página va dentro de la etiqueta page. Esta etiqueta tiene dos atributos: data-dir
y data-chapter.
data-dir : Indica la ruta a la raíz del proyecto, se usa para cargar correctamente los archivos. En las páginas
individuales su valor es: “../..”
data-chapter : Es un ID que indica con que entrada del archivo chapters.json(ver más adelante) se
corresponde ésta página.
A continuación hay que añadir la entrada de la página al archivo de configuración de capítulos: chapters.json en ./js/db/chapters.json:
El ID de cada entrada es un número “0”, “1”, “2”… que van ordenados de forma auto-incremental y comenzando siempre en
cero. El cero es la portada y no será visible en el menú ni en el paginado. El orden del resto de entradas será con el
que aparezcan en el menú y en el paginado. Así, en el ejemplo de arriba, la entrada con el ID 2, Tiro Base, sería el
segundo enlace en el menú.
La entrada tiene dos atributos: title y url.
title : Es el título de la página, se usa tanto en el menú, como en el encabezado de la página, como en la
etiqueta <title>
url : Es la URL de donde va a cargar los archivos. Se compone de la concatenación de /pages/ más el nombre de
la nueva carpeta que se ha creado.
Crear una página con sub-páginas
Si la página nueva, es una página con sub-páginas, dentro de la carpeta creada deben de añadirse, a su vez, una
sub-carpeta por cada sub-página. Y dentro de cada sub-carpeta, deben de añadirse dos documentos:
index.html – Contendrá el HTML de la página.
page.css – Contendrá el CSS específico de esa página. (en muchas páginas está en blanco)
El archivo index.html tendrá el siguiente esquema:
<!DOCTYPE html><metacharset="UTF-8" xmlns="http://www.w3.org/1999/html"><scriptsrc="../../../js/init.js"></script><pagedata-dir="../../.." data-chapter="7" data-section="1">
HTML propio de ese artículo.
</page>
El código HTML de la página va dentro de la etiqueta page. Esta etiqueta tiene tres atributos: data-dir, data-chapter y data-section.
data-dir : Indica la ruta a la raíz del proyecto, se usa para cargar correctamente los archivos. En las páginas
con sub-páginas su valor es: “../../..”
data-chapter : Es un ID que indica con que entrada del archivo chapters.json(ver más adelante) se
corresponde ésta página.
data-section : Es un ID que indica con que sección de la entrada se corresponde ésta página (ver más adelante).
A continuación hay que añadir la entrada de la página al archivo de configuración de capítulos: chapters.json en ./js/db/chapters.json:
En el código de ejemplo anterior, la entrada del archivo con el ID 6 es una página individual, y la entrada con el ID 7
es una página con sub-páginas.
Las entradas con sub-páginas tiene dos atributos: title y sections.
title : Es el título de la página, se usa en el menú.
sections : Son las entradas de las sub-páginas. Sus IDs son auto-incrementales y comienzan en 1. A su vez,
tienen dos atributos: title y url, funcionan como las páginas individuales.
Uso real de JQuery
Note
Aunque el proyecto usa la biblioteca JQuery, la mayoría del código es JavaScript vanilla, simplemente he usado JQuery
por la sintaxis de selectores del DOM abreviada y por el bindeo de eventos con propagación, que funcionan muy bien,
me parecen las funcionalidades mejor optimizadas de JQuery. No soy muy fan del resto de funcionalidades de JQuery y creo
que las soluciones en vainilla JS no sólo obtienen mejor performance, sino que aportan una metodología más ordenada.
Por eso no he creado los componentes usando el sistema de componentes de JQuery, no me aportaban nada.
Por qué no BEM
Tip
BEM sigue siendo un estándar importante para coordinar proyectos grandes donde múltiples personas trabajarán con los
archivos CSS. Sin embargo, desde que CSS incorporó el nesting de forma nativa en 2021, se han facilitado métodos
alternativos para mantener un código CSS limpio y organizado.
Además, creo que existe un mito exagerado, mal entendido, con la especificidad de los selectores CSS, y que la
propagación de BEM y las enseñanzas de ciertos “gurús” contribuyeron a ello.
La especificidad es una característica buscada por el W3C y es
MUY UTIL. Una cosa es tener un lío impresionante con la jerarquía de los selectores y otra es que no aproveches una
característica perfectamente válida de las hojas de estilos.
Por todo ello, y porque es un proyecto personal, con el que no voy a entrar en conflicto con otros desarrolladores,
he decidido usar, no solo native nesting, sino usar selectores con IDs y etiquetas genéricas como: <aside>, <header>…
Aún así, como se puede ver en la imagen inferior, el nivel de especificidad es bajo, se puede mantener un
equilibrio entre utilidad jerárquica y código limpio y ordenado.
Componentes
Auto-creación de anchors internos
Nombre del componente: internal-anchors
Si a unas de las etiquetas usadas en los títulos (<h2>, <h3> o <h4>) se le
coloca un atributo ID, automáticamente se convierte en un enlace interno a ese título de la página.
Enlaces referenciales
Nombre del componente: pages-links
En el archivo links.json se registran enlaces con un nombre de referencia, a modo de identificador.
En las páginas del manual que lo necesiten se agrega el enlace por el nombre de referencia, así, si luego el enlace
cambia, no hay que cambiarlo en cada página donde se usó, solo hay que cambiarlo en el archivo links.json.
Probably the second most popular copula package in Python. 😣
Copulae is a package used to model complex dependency structures. Copulae implements common and popular copula
structures to bind multiple univariate streams of data together. All copula implemented are multivariate by default.
fromcopulaeimportNormalCopulaimportnumpyasnpnp.random.seed(8)
data=np.random.normal(size=(300, 8))
cop=NormalCopula(8)
cop.fit(data)
cop.random(10) # simulate random number# getting parametersp=cop.params# cop.params = ... # you can override parameters too, even after it's fitted! # get a summary of the copula. If it's fitted, fit details will be present toocop.summary()
# overriding parameters, for Elliptical Copulae, you can override the correlation matrixcop[:] =np.eye(8) # in this case, this will be equivalent to an Independent Copula
Most of the copulae work roughly the same way. They share pretty much the same API. The difference lies in the way they are parameterized. Read the docs to learn more about them. 😊
Acknowledgements
Most of the code has been implemented by learning from others. Copulas are not the easiest beasts to understand but here are some items that helped me along the way. I would recommend all the works listed below.
I referred quite a lot to the textbook when first learning. The authors give a pretty thorough explanation of copula from ground up. They go from describing when you can use copulas for modeling to the different classes of copulas to how to fit them and more.
This blogpost gives a very gentle introduction to copulas. Before diving into all the complex math you’d find in textbooks, this is probably the best place to start.
Motivations
I started working on the copulae package because I couldn’t find a good existing package that does multivariate copula modeling. Presently, I’m building up the package according to my needs at work. If you feel that you’ll need some features, you can drop me a message. I’ll see how I can schedule it. 😊
TODOS
Set up package for pip and conda installation
More documentation on usage and post docs on rtd (Permanently in the works 😊)
It produces the quarkus-run.jar file in the build/quarkus-app/ directory.
Be aware that it’s not an über-jar as the dependencies are copied into the build/quarkus-app/lib/ directory.
The application is now runnable using java -jar build/quarkus-app/quarkus-run.jar.
If you want to build an über-jar, execute the following command:
REST (guide): A Jakarta REST implementation utilizing build time processing and Vert.x. This extension is not compatible with the quarkus-resteasy extension, or any of the extensions that depend on it.
Ganalytics is tiny api layer for any analytics in application. It provides an object oriented, typesafe, strict and testable way to organize work with analytics in the application. More information on wiki pages.