Getting started:
Related tutorials:
import torch | |
from torch import nn | |
from torch.autograd import Variable | |
import torch.nn.functional as F | |
import torch.optim as optim | |
# toy feed-forward net | |
class Net(nn.Module): | |
def __init__(self): |
Getting started:
Related tutorials:
package myfile | |
// openFileInPath Opens a file in the fileLocation path. | |
// It return the file pointer or any error encountered. | |
func openFile(fileLocation string) (*os.File, error) { | |
filePointer, err := os.Open(fileLocation) | |
if err != nil { | |
return nil, err | |
} |
#Resource location: thttps://raw.githubusercontent.com/inlets/inlets-operator/master/artifacts/crd.yaml | |
apiVersion: apiextensions.k8s.io/v1beta1 | |
kind: CustomResourceDefinition | |
metadata: | |
name: tunnels.inlets.inlets.dev | |
spec: | |
group: inlets.inlets.dev | |
version: v1alpha1 | |
names: |
This gist will be about git.
Read Before: Understaing Unit Test In short, unit tests are codes focusing on a small part of the software system.
After understanding why developers needs to write unit tests, let's Go.
Go Official
A test is not a unit test if:
It talks to the database
It communicates across the network
It touches the file system
It can't run correctly at the same time as any of your other unit tests
You have to do special things to your environment (such as editing
config files) to run it.