In Git you can add a submodule to a repository. This is basically a sub-repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
| #cloud-config | |
| autoinstall: | |
| version: 1 | |
| locale: en_US.UTF-8 | |
| keyboard: | |
| layout: us | |
| identity: | |
| hostname: ubuntu | |
| username: danilo |
| # Change to name of TARGET-VM. | |
| $vm='CHANGE_ME' | |
| # Change to PCI device location (💡 Location). | |
| $Location = 'CHANGE_ME' | |
| # Enable CPU features. | |
| Set-VM -GuestControlledCacheTypes $true -VMName $vm | |
| # Host-Shutdown rule must be changed for the VM. | |
| Set-VM -Name $vm -AutomaticStopAction TurnOff |
| // GetFreePort asks the kernel for a free open port that is ready to use. | |
| func GetFreePort() (port int, err error) { | |
| var a *net.TCPAddr | |
| if a, err = net.ResolveTCPAddr("tcp", "localhost:0"); err == nil { | |
| var l *net.TCPListener | |
| if l, err = net.ListenTCP("tcp", a); err == nil { | |
| defer l.Close() | |
| return l.Addr().(*net.TCPAddr).Port, nil | |
| } | |
| } |
| # download miniconda from | |
| # https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe | |
| # open an elevated Miniconda terminal (will appear on Windows' Start Screen/Menu) | |
| # create a separate, virtual Python env for MKL | |
| conda create --name aib-mkl | |
| # switch to the newly created env | |
| conda activate aib-mkl |
| from itertools import product | |
| final_answer = set() | |
| for a in open('mrc2.dct'): | |
| cols = a.split(' ', 1) | |
| b = list(cols[0]) | |
| c = int(b[28] + b[29] + b[30]) # concreteness rating | |
| i = int(b[31] + b[32] + b[33]) # imagery rating | |
| f = int(b[25] + b[26] + b[27]) # familiarity rating |
| public interface LabeledEnum { | |
| String getLabel(); | |
| } |
| /** | |
| * Arrayadapter (for Android) with text filtering for the use with a TextWatcher. | |
| * Note: the objects in the List need a valid toString() method. | |
| * @author Tobias Schürg | |
| * | |
| */ | |
| public class FilteredArrayAdapter extends ArrayAdapter<ImageObject> { |