1675398377
This is a template for secure electron applications. Written following the latest safety requirements, recommendations and best practices.
Under the hood is Vite — A next-generation blazing fast bundler, and electron-builder for packaging.
Follow these steps to get started with the template:
.github/workflows
— it uses npm
by default.That's all you need. 😉
Note: This template uses npm v7 feature — Installing Peer Dependencies Automatically. If you are using a different package manager, you may need to install some peerDependencies manually.
.env
files. You can also specify the types of your environment variables in types/env.d.ts
.Main
and Renderer
processes.Vite provides many useful features, such as: TypeScript
, TSX/JSX
, CSS/JSON Importing
, CSS Modules
, Web Assembly
and much more.
tests
directory and use playwright.main
branch, the release
workflow starts, which creates a new draft release. For each next commit will be created and replaced artifacts. That way you will always have draft with latest artifacts, and the release can be published once it is ready.release
workflow.Note: This template configured only for GitHub public repository, but electron-builder also supports other update distribution servers. Find more in electron-builder docs.
The template requires a minimum amount dependencies. Only Vite is used for building, nothing more.
The structure of this template is very similar to a monorepo. The entire source code of the project is divided into three modules (packages) that are each bundled independently:
packages/renderer
. Responsible for the contents of the application window. In fact, it is a regular web application. In developer mode, you can even open it in a browser. The development and build process is the same as for classic web applications. Access to low-level API electrons or Node.js is done through the preload layer.packages/preload
. Contain Electron preload scripts. Acts as an intermediate bridge between the renderer process and the API exposed by electron and Node.js. Runs in an isolated browser context, but has direct access to the full Node.js functionality.packages/main
Contain Electron main script. This is the main process that powers the application. It manages creating and handling the spawned BrowserWindow, setting and enforcing secure permissions and request handlers. You can also configure it to do much more as per your need, such as: logging, reporting statistics and health status among others.Schematically, the structure of the application and the method of communication between packages can be depicted as follows:
flowchart TB;
packages/preload <-. IPC Messages .-> packages/main
subgraph packages/main["packages/main (Shared beatween all windows)"]
M[index.ts] --> EM[Electron Main Process Modules]
M --> N2[Node.js API]
end
subgraph Window["Browser Window"]
subgraph packages/preload["packages/preload (Works in isolated context)"]
P[index.ts] --> N[Node.js API]
P --> ED[External dependencies]
P --> ER[Electron Renderer Process Modules]
end
subgraph packages/renderer
R[index.html] --> W[Web API]
R --> BD[Bundled dependencies]
R --> F[Web Frameforks]
end
end
packages/renderer -- Call Exposed API --> P
The main
and preload
packages are built in library mode as it is simple javascript. The renderer
package builds as a regular web app.
The next step is to package a ready to distribute Electron app for macOS, Windows and Linux with "auto update" support out of the box.
To do this, use electron-builder:
compile
: This script is configured to compile the application as quickly as possible. It is not ready for distribution, it is compiled only for the current platform and is used for debugging.Because the renderer
works and builds like a regular web application, you can only use dependencies that support the browser or compile to a browser-friendly format.
This means that in the renderer
you are free to use any frontend dependencies such as Vue, React, lodash, axios and so on. However, you CANNOT use any native Node.js APIs, such as, systeminformation
. These APIs are only available in a Node.js runtime environment and will cause your application to crash if used in the renderer
layer. Instead, if you need access to Node.js runtime APIs in your frontend, export a function form the preload
package.
All dependencies that require Node.js api can be used in the preload
script.
Here is an example. Let's say you need to read some data from the file system or database in the renderer.
In the preload context, create a function that reads and returns data. To make the function announced in the preload available in the render, you usually need to call the electron.contextBridge.exposeInMainWorld
. However, this template uses the unplugin-auto-expose plugin, so you just need to export the method from the preload. The exposeInMainWorld
will be called automatically.
// preload/index.ts
import { readFile } from 'node:fs/promises';
// Encapsulate types if you use typescript
interface UserData {
prop: string
}
// Encapsulate all node.js api
// Everything you exported from preload/index.ts may be called in renderer
export function getUserData(): Promise<UserData> {
return readFile('/path/to/file/in/user/filesystem.json', {encoding:'utf8'}).then(JSON.parse);
}
Now you can import and call the method in renderer
// renderer/anywere/component.ts
import { getUserData } from '#preload'
const userData = await getUserData()
Find more in Context Isolation tutorial.
Although the preload has access to all of Node.js's API, it still runs in the BrowserWindow context, so a limited electron modules are available in it. Check the electron docs for full list of available methods.
All other electron methods can be invoked in the main
.
As a result, the architecture of interaction between all modules is as follows:
sequenceDiagram
renderer->>+preload: Read data from file system
preload->>-renderer: Data
renderer->>preload: Maximize window
activate preload
preload-->>main: Invoke IPC command
activate main
main-->>preload: IPC response
deactivate main
preload->>renderer: Window maximized
deactivate preload
Find more in Inter-Process Communication tutorial.
All environment variables are set as part of the import.meta
, so you can access them vie the following way: import.meta.env
.
Note: If you are using TypeScript and want to get code completion you must add all the environment variables to the
ImportMetaEnv
intypes/env.d.ts
.
The mode option is used to specify the value of import.meta.env.MODE
and the corresponding environment variables files that need to be loaded.
By default, there are two modes:
production
is used by defaultdevelopment
is used by npm run watch
scriptWhen running the build script, the environment variables are loaded from the following files in your project root:
.env # loaded in all cases
.env.local # loaded in all cases, ignored by git
.env.[mode] # only loaded in specified env mode
.env.[mode].local # only loaded in specified env mode, ignored by git
Warning: To prevent accidentally leaking env variables to the client, only variables prefixed with
VITE_
are exposed to your Vite-processed code.
For example let's take the following .env
file:
DB_PASSWORD=foobar
VITE_SOME_KEY=123
Only VITE_SOME_KEY
will be exposed as import.meta.env.VITE_SOME_KEY
to your client source code, but DB_PASSWORD
will not.
You can change that prefix or add another. See envPrefix
See Contributing Guide.
Author: Cawa-93
Source Code: https://github.com/cawa-93/vite-electron-builder
License: MIT license
1673860260
ARM template is used to create resources as per the Azure Resource Manager. The template file is written in JSON. And we can deploy it using the azure portal or locally using Azure CLI or Azure PowerShell. Here, in this blog, we will deploy the template using the local method.
If you have visual studio code installed on your system locally, you can install the following extension for the ARM template: Azure Resource Manager (ARM) tools. This provides snippets and auto-completion for ARM templates.
We need to install Azure CLI on our local system. And so, we follow the steps defined here. These are steps for Ubuntu but you may change them as per your Operating System.
Then do login on to your Azure account using Azure CLI
Now configure default values to make it easy for deployment, like location and resource group.
Adding parameters
Modify them as per use.
Modify values in resources.
Define the outputs.
We run the following set of commands.
And when it says running on Azure CLI, we move to the azure portal to see if it is deploying: Home —> Resource groups —> Resource Group selected —> deployments
Once the deployment completes, it shows completed. Click on the deployment name and go to the resource.
Similarly, the Azure CLI gives output.
Conclusion
The ARM template is similar to AWS cloud formation and other IaC automation available. This was for learning you can modify and play with source code from Knoldus TechHub. Keep Learning!
Original article source at: https://blog.knoldus.com/
1671660840
ng-template
, ng-container
, and ngTemplateOutlet
provide the ability to reuse content inside an Angular component. Understanding what’s going on and how to use these methods allows a developer to build what they want without needing to duplicate parts of the template.
Have you ever needed to use *ngIf
in your template, and if the expression evaluates to false use a backup template? On top of that, maybe both situations (if the expression is true or false) require the same layout inside of the element that has the *ngIf
directive on it.
I recently had came across this situation. We had some data that was being output in a list either had a link that stayed internal to the app or opened a link in a new tab external to the application. The content inside the links, however, always had the same layout. I didn’t want to duplicate the inner content, and luckily Angular provides the ability to accomplish this. The method includes using ng-template
, ng-container
, and ngTemplateOutlet
.
Before getting to the end solution, let’s look at an example of the data and how it’s output without using ng-template
.
export class ListComponent {
links = [
{ internal: true, display: "Home", url: "/" },
{ internal: false, display: "External", url: "https://test.com" },
];
}
<ul>
<li *ngFor="let link of links">
<a *ngIf="link.internal" [routerLink]="link.url">
<img src="/assets/icon.svg" alt="">
<span>{{ link.display }}</span>
</a>
<a *ngIf="!link.internal" [attr.href]="link.url">
<img src="/assets/icon.svg" alt="">
<span>{{ link.display }}</span>
</a>
</li>
</ul>
In this method, we have two *ngIf
directives on two separate a
tags, and the inner content of the link is the same in both cases. If that inner content changes, we have to make the change to both places or else there are inconsistencies in the layout. This is not ideal; we are repeating ourselves and there are multiple locations where we can introduce bugs.
Angular provides a much more elegant solution to our problem. Our TypeScript code from above will remain the same, but we can have a lot less duplication in the HTML by using a couple special Angular tags. First I’ll show the HTML, and then we’ll discuss the different pieces.
<ul>
<li *ngFor="let link of links">
<a *ngIf="link.internal; else externalLink" [routerLink]="link.url">
<ng-container
[ngTemplateOutlet]="linkLayout"
[ngTemplateOutletContext]="{ link: link }"
></ng-container>
</a>
<ng-template #externalLink>
<a [attr.href]="link.url">
<ng-container
[ngTemplateOutlet]="linkLayout"
[ngTemplateOutletContext]="{ link: link }"
></ng-container>
</a>
</ng-template>
</li>
</ul>
<ng-template #linkLayout let-link="link">
<img src="/assets/icon.svg" alt="" />
<span>{{ link.display }}</span>
</ng-template>
There’s a lot going on here, so let’s break it down. We’ll start with the *ngIf
on the a
tag.
<a *ngIf="link.internal; else externalLink" [routerLink]="link.url">
<ng-container
[ngTemplateOutlet]="linkLayout"
[ngTemplateOutletContext]="{ link: link }"
></ng-container>
</a>
<ng-template #externalLink>
<a [attr.href]="link.url">
<ng-container
[ngTemplateOutlet]="linkLayout"
[ngTemplateOutletContext]="{ link: link }"
></ng-container>
</a>
</ng-template>
The *ngIf
directive has an expression listed: if link.internal
evaluates to true
, then show this a
tag. If it’s false, output the ng-template
tag that’s referenced by the externalLink
local template variable. This is how we can either navigate to a new route that’s part of the Angular app or external to the app. This is a method that can be used in any situation where your *ngIf
needs an else
clause.
Next up, let’s look at what’s going on with the ng-container
inside both of the a
tags in the example.
<ng-container
[ngTemplateOutlet]="linkLayout"
[ngTemplateOutletContext]="{ link: link }"
></ng-container>
You can read more about the ng-container
element in the Angular docs, but at a high level it’s a special element that can hold structural directives without adding new elements to the DOM. It can also be used in situations like this, with the ngTemplateOutlet
structural directive. The ngTemplateOutlet
directive determines what ng-template
will be output on the page inside the ng-container
. The context for the template, or needed variables, can be declared with the ngTemplateOutletContext
directive. In the above case, we are saying that the #linkLayout
content should be output on the page, and that there should be a variable called link
that will be used inside the ng-template
. The contents of the ng-template tag can be placed anywhere in the HTML file, though I’ve placed them at the bottom in this example.
<ng-template #linkLayout let-link="link">
<img src="/assets/icon.svg" alt="" />
<span>{{ link.display }}</span>
</ng-template>
This template will be output on the screen anywhere it’s referenced. In this case, inside both a
tags. If we want to change the layout inside the a
tags, we need only change this one spot in the HTML. Everything will be kept in sync, and we have fewer possibilities of inconsistencies in the component.
There is one alternate way of declaring the ngTemplateOutlet
. The result will be the same as the method shown above.
<ng-container
*ngTemplateOutlet="linkLayout; context: { link: link }"
></ng-container>
The above method limits the duplication to a certain degree, especially for the content inside the a
tag. The example here is a fairly simple layout. This method becomes more useful when the internal layout becomes more complicated. That inner layout is defined once and reused in multiple locations. You could create a new component if you wanted, but that can introduce complexity sometimes as well.
Knowing how to use ng-template
, ng-container
, and ngTemplateOutlet
can allow you to effectively output the content of a component with minimal duplication.
Original article source at: https://www.prestonlamb.com/
1671004162
Infracost is an open-source tool used to forecast & estimates your cloud cost on every pull request on terraform.
Multiple scenarios & scripts can be created to forecast cloud costs. It supports AWS, Azure, GCP cloud platforms & over 230 Terraform resources.
It also works with Terraform Cloud & Terragrunt. Infracost can use hosted Cloud Pricing API or self-host.
Infracost can be integrated with any CICD tool which will break down the cost of new terraform resources every time a Pull request or Merge request is created. In this blog, we will see how we can use Gitlab CI templates for the merge request pipeline to estimate & forecast cloud costs.
The directory structure for your application or pipeline repo should look like this. Command to check directory structure is tree -I .git -a
tree -I .git -a
The output will look like this:
.
├── .gitlab
│ └── plan-json.yml
├── .gitlab-ci.yml
├── README.md
└── terraform
├── .infracost
│ └── terraform_modules
├── main.tf
└── README.md
1. Create .gitlab-ci.yml file in the main directory. The main Gitlab pipeline is defined in .gitlab-ci.yml file.
This acts as parent job which triggers a downstream pipeline that is called the child pipeline.
stages:
- all_stage
mr-gitlab-terraform:
stage: all_stage
rules:
- if: "$CI_MERGE_REQUEST_IID"
- if: "$CI_COMMIT_TAG"
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
trigger:
include: ".gitlab/plan-json.yml"
strategy: depend
2. Create GitLab merge request job template.
Create a file plan-json.yml & copy the below content in it. This will act as downstream pipeline triggered by the parent pipeline.
workflow:
rules:
- if: "$CI_MERGE_REQUEST_IID"
- if: "$CI_COMMIT_TAG"
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
variables:
# If your terraform files are in a subdirectory, set TF_ROOT accordingly
TF_ROOT: terraform
stages:
- plan
- infracost
cache:
key: "${TF_ROOT}"
paths:
- ${TF_ROOT}/.terraform
plan:
stage: plan
image:
name: hashicorp/terraform:latest
entrypoint: [""]
before_script:
- cd ${TF_ROOT}
- terraform init
script:
- terraform plan -out tfplan.binary
- terraform show -json tfplan.binary > tplan.json
artifacts:
paths:
- ${TF_ROOT}/tplan.json
infracost:
stage: infracost
image:
name: infracost/infracost:ci-0.10
entrypoint: [""]
dependencies:
- plan
script:
- git clone $CI_REPOSITORY_URL --branch=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME --single-branch /tmp/base
- ls /tmp/base
- infracost configure set api_key $INFRACOST_API_KEY
- infracost breakdown --path=/tmp/base/${TF_ROOT} --format=json --out-file=infracost-base.json
- INFRACOST_ENABLE_CLOUD=true infracost diff --path=${TF_ROOT} --compare-to=infracost-base.json --format=json --out-file=infracost.json
- infracost comment gitlab --path=infracost.json --repo=$CI_PROJECT_PATH --merge-request=$CI_MERGE_REQUEST_IID --gitlab-server-url=$CI_SERVER_URL --gitlab-token=$GITLAB_TOKEN --behavior=update
variables:
INFRACOST_API_KEY: $INFRACOST_API_KEY
GITLAB_TOKEN: $GITLAB_TOKEN
Explanation: First this downstream pipeline creates terraform plan in JSON from the current branch. Then it plans out in JSON but from the target branch that is main in this case. Then it compares both terraform plans & breakdowns the cost difference and finally comments on the merge request.
3. Now whenever you create a MR in Gitlab it will forecast terraform infrastructure cost for you
When pipeline succeeds It will comment down on your MR with cost estimation & breakdowns
extends:
keyword to extend this job template.terraform/
dir.Infracost is used to forecast cloud infra costs before it creates any resources. You can integrate this tool with any CICD to forecast cost whenever a pull or merge request is created.
Original article source at: https://blog.knoldus.com/
1669922040
SharePoint Online is being used by many organizations not only for collaboration and document management but it is used for several business activities which involve similar types of custom sites.
Let’s take an example project site. User creates a separate site to manage each of the project where the architecture, configuration, and design of the site are the same. SharePoint provides the ability to create a Site Template using an existing site using PnP PowerShell Script.
I am describing here the steps to create a SharePoint site automatically using the existing site template. In this article, we will be using SharePoint List, Power Automate, Azure Automation, and Azure Runbook.
First create a template file using the existing SharePoint Site using below PowerShell Script
$TemplateSiteUrl = "https://tenant.sharepoint.com/sites/templateSite"
$TemplateFile = "\TemplateFile.xml"
Connect - PnPOnline - Url $TemplateSiteUrl - PnPManagementShell
Get - PnPSiteTemplate - Out $SiteTemplateFile
The above script creates a XML file called TemplateFile.xml. Upload this file to a SharePoint Library somewhere so that we can use it each time by PowerShell to create a new site.
Now login to Azure Portal and create an Automation Account.
Once automation account is created, then go to automation account.
First you need to install the module you require to run the PowerShell.
Click the “Modules” under “Shared Resource” from the left panel and click the “Browse Gallery”
Then search the pnp.powershell. This will show the module and select.
When you installed the required modules, go to the Runbook.
You will see a Runbook under Process Automation in the left panel.
Click the runbook and create a new runbook. Provide the name of runbook, select PowerShell as runbook type, runtime version, and description.
More details about the runbook https://learn.microsoft.com/en-us/azure/automation/manage-runbooks
Once runbook is created, go to runbook. You will find "Edit" link on top with other links.
Click the edit link. You will find an editor to put your PowerShell Script. Now enter the below PowerShell Script. We will be passing SiteURL as parameter.
param(
[parameter(Mandatory = $true)]
[string] $SiteURL = "https://tenant.sharepoint.com/sites/SiteName")
$UserName = "username@tenant.onmicrosoft.com"
$Password = "xxxxxxxxx"
$SecurePassword = ConvertTo - SecureString - String $Password - AsPlainText - Force
$Cred = New - Object - TypeName System.Management.Automation.PSCredential - argumentlist $UserName, $SecurePassword
#Above line will connect SharePoint Site
Connect - PnPOnline - Url "https://tenant.sharepoint.com/sites/NewSiteName" - Credentials $Cred
$fileRelativeURL = "/sites/SiteName/shared Documents/TemplateFile.xml"
#Download template xml file.
$file = Get - PnPFile - Url $fileRelativeURL - AsFile - Path c: \temp - Filename " TemplateFile.xml"
# Connect new site where template will be implemented.
Connect - PnPOnline - Url $SiteURL - Credentials $Cred
#Implement the template.
Invoke - PnPSiteTemplate - Path "c:\temp\TemplateFile.xml" - ClearNavigation
After putting the script, click Save and Publish the runbook.
Now Create a SharePoint List that will contain a list of projects.
Then create a new flow using Power Automate connected to the above list triggered “When an item is created” so that flow trigger as soon as a new item is created in the list. Add next steps in the flow as “Send an HTTP request to SharePoint” and put the details as below:
Site Address: Your SharePoint site address
Method: POST
Uri: /_api/SPSiteManager / create
Headers: accept - application / json;
odata.metadata = none
Body: {
"request": {
"Title": "Site Name returned from list",
"Url": "https://tenant.sharepoint.com/sites/SiteName",
"Lcid": 1033,
"ShareByEmailEnabled": false,
"Description": "Description of site",
"WebTemplate": "STS#0",
"Owner": "owner@tenant.onmicrosoft.com",
}
}
Microsoft Power Automate has connector available to connect with a runbook under an automation account. Add an action and select "Azure Automation" connector, then select “Create a job” from the list of actions.
This will require your azure details like subscriptions, resource group, automation account, and runbook. When you select your runbook, it will prompt for parameter defined in the runbook. Pass the parameter and save. This will call the script and pass the parameter to script.
You can add more actions in the flow like updating a list or sending a notification mail etc.
Your flow will look like below.
Now automation is ready.
Please create a new item to the list. It will trigger the flow and create a new site with custom template.
Original article source at: https://www.c-sharpcorner.com/
1668045720
Ivy is an ML framework that currently supports JAX, TensorFlow, PyTorch, and Numpy. We’re very excited for you to try it out!
Next on our roadmap is to support automatic code conversions between all frameworks 🔄, and add instant multi-framework support for all open-source libraries with only a few lines of code changed! Read on to learn more 😊
The docs are split into a number of sub-pages explaining different aspects of why we created Ivy, how to use it, what we’ve got planned on our roadmap, and how to contribute! Click on the sub-headings below to check out these pages!
We use 🚧 to indicate that the feature being discussed is in development. We use ✅ to indicate that it is already implemented!
Check out the docs for more info, and check out our Google Colabs for some interactive demos!
🚨 Ivy is still at a relatively early stage of development. Expect breaking changes and sharp edges until we release version 1.2.0 in the next few weeks!
If you would like to contribute, please check out our contributor guide, and take a look at the open tasks if you'd like to dive straight in! 🧑💻
Ivy can be installed like so: pip install ivy-core
You can immediately use Ivy to train a neural network, using your favorite framework in the background, like so:
import ivy
class MyModel(ivy.Module):
def __init__(self):
self.linear0 = ivy.Linear(3, 64)
self.linear1 = ivy.Linear(64, 1)
ivy.Module.__init__(self)
def _forward(self, x):
x = ivy.relu(self.linear0(x))
return ivy.sigmoid(self.linear1(x))
ivy.set_backend('torch') # change to any backend!
model = MyModel()
optimizer = ivy.Adam(1e-4)
x_in = ivy.array([1., 2., 3.])
target = ivy.array([0.])
def loss_fn(v):
out = model(x_in, v=v)
return ivy.mean((out - target)**2)
for step in range(100):
loss, grads = ivy.execute_with_gradients(loss_fn, model.v)
model.v = optimizer.step(model.v, grads)
print('step {} loss {}'.format(step, ivy.to_numpy(loss).item()))
print('Finished training!')
This example uses PyTorch as a backend framework, but the backend can easily be changed to your favorite frameworks, such as TensorFlow, or JAX.
Framework Agnostic Functions
In the example below we show how Ivy's concatenation function is compatible with tensors from different frameworks. This is the same for ALL Ivy functions. They can accept tensors from any framework and return the correct result.
import jax.numpy as jnp
import tensorflow as tf
import numpy as np
import torch
import ivy
jax_concatted = ivy.concat((jnp.ones((1,)), jnp.ones((1,))), -1)
tf_concatted = ivy.concat((tf.ones((1,)), tf.ones((1,))), -1)
np_concatted = ivy.concat((np.ones((1,)), np.ones((1,))), -1)
torch_concatted = ivy.concat((torch.ones((1,)), torch.ones((1,))), -1)
To see a list of all Ivy methods, type ivy.
into a python command prompt and press tab
. You should then see output like the following:
ivy.Container( ivy.general ivy.reduce_min(
ivy.abs( ivy.get_device( ivy.reduce_prod(
ivy.acos( ivy.get_num_dims( ivy.reduce_sum(
ivy.acosh( ivy.gradient_descent_update( ivy.reductions
ivy.activations ivy.gradient_image( ivy.relu(
ivy.arange( ivy.gradients ivy.reshape(
ivy.argmax( ivy.identity( ivy.round(
ivy.argmin( ivy.image ivy.scatter_nd(
ivy.array( ivy.indices_where( ivy.seed(
ivy.asin( ivy.inv( ivy.shape(
ivy.asinh( ivy.layers ivy.shuffle(
ivy.atan( ivy.leaky_relu( ivy.sigmoid(
ivy.atan2( ivy.linalg ivy.sin(
ivy.atanh( ivy.linear( ivy.sinh(
ivy.bilinear_resample( ivy.linspace( ivy.softmax(
ivy.cast( ivy.log( ivy.softplus(
ivy.ceil( ivy.logic ivy.split(
ivy.clip( ivy.logical_and( ivy.squeeze(
ivy.concatenate( ivy.logical_not( ivy.stack(
ivy.container ivy.logical_or( ivy.stack_images(
ivy.conv2d( ivy.math ivy.stop_gradient(
ivy.core ivy.matmul( ivy.svd(
ivy.cos( ivy.maximum( ivy.tan(
ivy.cosh( ivy.minimum( ivy.tanh(
ivy.cross( ivy.neural_net ivy.tile(
ivy.cumsum( ivy.nn ivy.to_list(
ivy.depthwise_conv2d( ivy.norm( ivy.to_numpy(
ivy.dtype( ivy.one_hot( ivy.transpose(
ivy.execute_with_gradients( ivy.ones( ivy.unstack(
ivy.exp( ivy.ones_like( ivy.variable(
ivy.expand_dims( ivy.pinv( ivy.vector_to_skew_symmetric_matrix(
ivy.flip( ivy.randint( ivy.verbosity
ivy.floor( ivy.random ivy.where(
ivy.floormod( ivy.random_uniform( ivy.zero_pad(
ivy.backend_handler ivy.reduce_max( ivy.zeros(
ivy.gather_nd( ivy.reduce_mean( ivy.zeros_like(
(a) ML Explosion
A huge number of ML tools have exploded onto the scene!
(b) Why Unify?
Why should we try to unify them?
(c) Standardization
We’re collaborating with The Consortium for Python Data API Standards
Ivy can fulfill two distinct purposes:
1. Serve as a transpiler between frameworks 🚧
2. Serve as a new ML framework with multi-framework support ✅
The Ivy codebase can then be split into three categories, and can be further split into 8 distinct submodules, each of which falls into one of these three categories as follows:
(a) Building Blocks
Backend functional APIs ✅
Ivy functional API ✅
Backend Handler ✅
Ivy Compiler 🚧
Front-end functional APIs 🚧
Ivy stateful API ✅
Ivy Container ✅
Ivy Array 🚧
(a) Applied Libraries ✅
Ivy libraries in mechanics, vision, robotics, memory, and other areas
(b) Builder [page coming soon!] ✅
ivy.Trainer
, ivy.Dataset
, ivy.Dataloader
and other helpful classes and functions for creating training workflows in only a few lines of code
Join our community as a code contributor, and help accelerate our journey to unify all ML frameworks! Check out all of our open tasks, and find out more info in our Contributing guide!
@article{lenton2021ivy,
title={Ivy: Templated deep learning for inter-framework portability},
author={Lenton, Daniel and Pardo, Fabio and Falck, Fabian and James, Stephen and Clark, Ronald},
journal={arXiv preprint arXiv:2102.02886},
year={2021}
}
Author: unifyai
Source Code: https://github.com/unifyai/ivy
License: Apache-2.0 license
1667429580
A Minimalist Resume Template for Jekyll and Hexo
This is a responsive minimal résumé template made by Crisp, powered by Jekyll. And we also provide an official Hexo port for Hexo users.
You may config all the data in yaml
and make it your own résumé. Then, you might use on GitHub Pages, your website, or wherever you want.
Clone the repo
git clone https://github.com/crispgm/resume.git
Install Jekyll
gem install jekyll
Config your résumé data
The baseurl
is required in _config.yml
if you serve this page as part of your website. And your contact information, EDUCATION, SKILLS, EXPERIENCE, and PROJECTS data will be set in _data/resume.yml
.
Run and Debug
jekyll serve
Build
jekyll build
Create a Gemfile
source "https://rubygems.org"
gem "jekyll-theme-minimal-resume"
And then,
bundle install
Init _config.yml
title: Résumé Title
baseurl: "/resume/"
theme: "jekyll-theme-minimal-resume"
Create a index.html
---
layout: resume
---
Create _data/resume.yml
and fill in your resume data. Example data is available here.
contact:
- icon: fa-envelope
text: youremail@example.com
- icon: fa-phone-square
text: your-phone-num
- icon: fa-globe
text: your-website.com
link: https://crispgm.github.io/resume/resume.html
FontAwesome iconfont is embedded, so use the fa-
class name as icon. link
is optional, present if you want a link for your web version.
There are a set of colorscheme. color
may be specified in _config.yml
. The default colorscheme is gray.
color: gray
Colors powered by Open-Color:
Colors powered by Nord:
Add new section in _data/resume.yml
languages:
- name: English
proficiency: Professional working proficiency
- name: Mandarin Chinese
proficiency: Native or bilingual proficiency
Add section to _layouts/resume.html
:
<section id="languages">
<div class="section-title">Language</div>
<div class="section-content">
{% for lang in site.data.resume.languages %}
<div class="block">
<div class="block-title">{{ lang.name }}</div>
<div class="block-content">{{ lang.proficiency }}</div>
</div>
{% endfor %}
</div>
</section>
Feel free to add yours here.
Author: Crispgm
Source Code: https://github.com/crispgm/resume
License: MIT license
1667409960
Neumorphism designed Jekyll theme for personal websites, portfolios and resumes.
This is a personal website built with Jekyll
and hosted on Github Pages
, which is based on the new Neumorphism
design trend and was developed with a mobile-first approach. This can be used by developers, who want to showcase their resume and portfolio. If you want to use this for your own website, fork this repository and then refer to personalize and customize.
JS
& SCSS
minifying.To get a local copy up and running follow these simple steps.
The commands and instructions I provide are for MacOS - please look up the specific commands for your OS on your own.
brew install node
If you need to switch between Node versions regurlarly, I would recommend to install Node via Node Version Manager.
gem install bundler jekyll
For more information, refer to this.
npm install -g yarn
Recommended way: If you want to contribute to this theme or open issues due to problems implementing this on your own, I would recommend forking the repository directly. This makes it easier for me to solve open issues and questions or check pull requests.
1.1: Fork the repository (using the Fork
button at the top) and then clone the repository
# Replace {YOUR_USERNAME} with your actual username
git clone https://github.com/{YOUR_USERNAME}/neumorphism.git
or
1.2: Create your own repository (using the green Use this template
button at the top) and then clone the repository
# Replace {YOUR_USERNAME}, {YOUR_REPOSITORY} with the actual values
git clone https://github.com/{YOUR_USERNAME}/{YOUR_REPOSITORY}.git
2: Change directory into neumorphism
cd neumorphism
3: Install dependencies
yarn
bundle install
http://localhost:4000
, this will also build production-ready JS
and SCSS
assets with every changegulp
Settings
page of your repository to see where your site is published at via Github Pages
.Edit _config.yml
to personalize your site. For documentation, refer to docs/config.md.
If you want to automatically have your Github repositories pulled for the Open Source Projects section, then you also need to authenticate yourself for the Github Metadata plugin to work.
You need to generate a new personal access token on GitHub:
public_repository
, and add a description..env
file inside your repository and add your generated JEKYLL_GITHUB_TOKEN
:JEKYLL_GITHUB_TOKEN=0YOUR0GENERATED0TOKEN0
To complete the configuration for the Github Metadata plugin, you also need to change the value of repository
inside _config.yml
. After this, you should the Github Metadata plugin should work properly.
For optimal results, you should make sure, that every Github project, you want included on this portfolio, has added following informations on Github:
Example:
Edit files inside _data
to add information to the portfolio. For documentation, refer to docs/data.md.
Edit assets/particles.json
to customize the landing page backgorund animation. For more information, refer to this.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Author: longpdo
Source Code: https://github.com/longpdo/neumorphism
License: MIT license
1667386980
This Jekyll theme is a port of ThemeFisher's Airspace template, originally ported by @ndrewtl. It is released under ThemeFisher's license , which requires attribution. Concern about the licnese please contact with them
To start your project, fork this respository, put in your content, and go!
Here are some projects that have used this Jekyll Theme:
First, make sure you have Ruby installed. You can confirm this by running ruby -v
on the command line:
$ ruby -v
ruby [version number] (date) [your platform]
If you get something like "Error, command not found"
visit the link above and install Ruby for your platform.
Next, make sure you have Bundler installed. Just like above, run bundle -v
on the command line:
$ bundle -v
bundle [version number]
If you get "Error, command not found"
run gem install bundler
to install it using RubyGems.
Clone the repository, and cd
into it:
$ git clone https://github.com/ndrewtl/airspace-jekyll.git
$ cd airspace-jekyll
Install dependencies locally:
$ bundle install --path vendor/bundle
This should install a local copy of jekyll.
Now run the server:
$ ./vendor/bundle/ruby/#{YOUR_RUBY_VERSION}/bin/jekyll server
Author: ndrewtl
Source Code: https://github.com/ndrewtl/airspace-jekyll
License: View license
1667375340
Knowledge base template for Jekyll. Browse through a live demo.
Base was made by CloudCannon, the Cloud CMS for Jekyll.
Find more templates, themes and step-by-step Jekyll tutorials at CloudCannon Academy.
_config.yml
._config.yml
.Base was built with Jekyll version 3.4.3, but should support newer versions as well.
Install the dependencies with Bundler:
$ bundle install
Run jekyll
commands through Bundler to ensure you're using the right versions:
$ bundle exec jekyll serve
Base is already optimised for adding, updating and removing tutorials, navigation, footer and FAQ information in CloudCannon.
The sticky sidebar in tutorials in populated by pulling out <h2>
elements from the content.
_posts/_defaults.md
.To create a new series:
sets
collection.title
and description
.To add a tutorial/post to a series:
set
field to the tutorial front matter which points to the file name of the desired set without the .md
extention. e.g. If I have a set at _sets/getting-started.md
I would use this in my tutorial front matter: set: getting-started
.order_number
field to the tutorial front matter and specify a number. This is the tutorials order in the set.Author: CloudCannon
Source Code: https://github.com/CloudCannon/base-jekyll-template
License: MIT license
1667363940
Product documentation template for Jekyll. Browse through a live demo. Start documenting your product, application, service or website with this configurable theme.
Edition was made by CloudCannon, the Cloud CMS for Jekyll.
Find more templates, themes and step-by-step Jekyll tutorials at CloudCannon Academy.
_config.yml
.Edition was built with Jekyll version 3.3.1, but should support newer versions as well.
Install the dependencies with Bundler:
$ bundle install
Run jekyll
commands through Bundler to ensure you're using the right versions:
$ bundle exec jekyll serve
Edition is already optimised for adding, updating and removing documentation pages in CloudCannon.
_docs
folder.excluded_in_search: true
to any documentation page's front matter to exclude that page in the search results.site.show_full_navigation
to control all or only the current navigation group being open.Author: CloudCannon
Source Code: https://github.com/CloudCannon/edition-jekyll-template
License: MIT license
1667333280
API documentation template for Jekyll. Browse through a live demo. Start documenting your API with this configurable theme.
Aviator was made by CloudCannon, the Cloud CMS for Jekyll.
Find more templates, themes and step-by-step Jekyll tutorials at CloudCannon Academy.
_config.yml
.Aviator was built with Jekyll version 3.7.2, but should support newer versions as well.
Install the dependencies with Bundler:
$ bundle install
Run jekyll
commands through Bundler to ensure you're using the right versions:
$ bundle exec jekyll serve
Aviator is already optimised for adding, updating and removing documentation pages in CloudCannon.
_config.yml
.excluded_in_search: true
to any documentation page's front matter to exclude that page in the search results.Author: CloudCannon
Source Code: https://github.com/CloudCannon/aviator-jekyll-template
License: MIT license
1667317628
A simple and elegant Jekyll theme based on Spacemacs. The theme works well on mobile devices as well.
customize your site in _config.yml
# Site settings
description: A blog about lorem ipsum
baseurl: "" # the subpath
url: "" # the base hostname &/|| protocol for your site
# User settings
username: Lorem Ipsum
user_description: Lorem Developer
user_title: Lorem Ipsum
email: lorem@ipsum.com
twitter_username: loremipsum
github_username: loremipsum
gplus_username: loremipsum
disqus_username: loremipsum
See more about project and links in _config.yml
_posts create a file .md with structure:
---
layout: post
title: "Lorem ipsum speak.."
date: 2016-09-13 01:00:00
image: '/assets/img/post-image.png'
description: 'about tech'
tags:
- lorem
- tech
categories:
- Lorem ipsum
twitter_text: 'How to speak with Lorem'
---
You should open _config.yml
and change/add links
section:
links:
section_1: # you can use any name
- title: home # show on menu
url: / #link
key_trigger: 1 # link shortcut and show on the left of the title
- title: my posts
url: /posts
key_trigger: 2
- title: series
url: /series
key_trigger: 3
- title: tags
url: /tags
key_trigger: 4
- title: about me
url: /about
key_trigger: 5
First, install jekyll and node.js.
charlie.github.io
npm install
gulp
Space Jekyll uses the Stylus to process his css, then modifies the style of the theme in this folder.
You can go in the variable.styl and modify the colors.
See a live demo here.
Author: Victorvoid
Source Code: https://github.com/victorvoid/space-jekyll-template
License: View license
1667306061
Screenshot
Quick Setup
gem install jekyll bundler
_config.yml
to personalize your siteSettings
You have to fill some informations on _config.yml
to customize your site:
description: A blog about lorem ipsum dolor sit amet
baseurl: "" # the subpath of your site, e.g. /blog/
url: "http://localhost:3000" # the base hostname & protocol for your site
username: Lorem Ipsum
user_description: Software Engineer at Lorem Ipsum Dolor
user_title: Mauricio Urraco
email: mauriurraco@gmail.com
Don't forget to change your URL before you deploy your site!
Color and Particle Customization
.sass
variablesapp.js
Particle.js
for helpContent
You can (and should) edit the .html
files for adding your own information, icons, working experience, social links or whatever you want to add. I.e.:
<a aria-label="My Github" target="_blank" href="https://github.com/murraco">
<i class="icon fa fa-github-alt" aria-hidden="true"></i>
</a>
Running locally
In order to compile the assets and run Jekyll
locally you need to follow those steps:
bundle install
bundle exec jekyll build
_site
Contribution
Credits
Live demo at https://jekyll-theme-minimal-resume.netlify.com/
Author: Murraco
Source Code: https://github.com/murraco/jekyll-theme-minimal-resume
License: MIT license
1667282945
📱 Free to use static generated landing page template for your mobile app
Mobile App Landing Page Template comes with pre-installed features and options:
Check out websites using the Mobile App Template:
_config.yml
, feel free to commut/uncomment what you need (google analtytics, or github for example)_data/app.yml
with your app data_data/strings.yml
, you can customize there the footer's links_images
folder and icon.png
in the root_src/index.js
to update the product hunt modal (or to remove it) and to remove the darkmode plugin if you don't want itPublish
button then Save Webpage as .zip
npm install
bundler install
npm start
npm run build
This templates uses Jekyll-webpack-boilerplate, read more documentation there.
Contributions, issues and feature requests are welcome!
Author: Sandoche
Source Code: https://github.com/sandoche/Mobile-app-landingpage-template
License: MIT license