Skip to content

Instantly share code, notes, and snippets.

View awave1's full-sized avatar

Artem Golovin awave1

  • Vancouver, Canada
  • 16:00 (UTC -07:00)
View GitHub Profile
@awave1
awave1 / a03.tex
Last active October 29, 2018 06:23
\documentclass[11pt]{article}
\usepackage[shortlabels]{enumerate}
\usepackage{fullpage, verbatim, amsthm, amsmath, amssymb, amsfonts}
% Macros
\def\code#1{\texttt{#1}}
\def\c#1{\texttt{#1}}
# Github (default)
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/github
# Gitlab ()
Host gitlab.com
HostName gitlab.com
User git
/**********************************************
* Last Name: Golovin
* First Name: Artem
* Student ID: 30018900
* Course: CPSC 457
* Tutorial: <your tutorial sction>
* Assignment: 1
* Question: Q4
*
* File name: countLines.cpp
/**********************************************
* Last Name: Golovin
* First Name: Artem
* Student ID: 30018900
* Course: CPSC 457
* Tutorial: T05
* Assignment: 1
* Question: Q5
*
* File name: myWc.cpp
from math import log2
from itertools import product
def h(p):
a, b, c, d = p
calc = ((a ** 4) + (b ** 3) + (c ** 2) + d)
return calc % 100
import urllib.request
import datetime
import os
if not os.path.exists('images/'):
os.makedirs('images/')
def dl_jpg(url, file_path, file_name):
full_path = file_path + file_name + '.jpg'
urllib.request.urlretrieve(url,full_path)
bool Graph::dfs_util(int v, int *colors) {
colors[v] = GRAY;
for (auto *u : n_map[v]->adj) {
if (colors[u->name] == GRAY) {
return true;
} else if (colors[u->name] == WHITE && dfs_util(u->name, colors)) {
return true;
}
}
import math
import operator
def main():
"""
Description
:raises:
:rtype:
#!/usr/bin/python
"""Create a network and configure IP addresses
This script is intentionally verbose to show you
very simple steps to create and configure a network.
You can modify the scripts to create different topologies.
The network topology created by this script is shown below:
#!/usr/bin/python
"""Create a network and configure IP addresses
This script is intentionally verbose to show you
very simple steps to create and configure a network.
You can modify the scripts to create different topologies.
The network topology created by this script is shown below: